/* Day-job field notes: the key account (2.4) and the linking failure (2.5).
   Loaded only on those two pages. Red is for the broken link and what it leaves uncovered. */

.cap { margin: var(--s3) 0 0; font-size: 14px; color: var(--ink-2); max-width: 46em; }
.cap .lbl { margin-right: var(--s2); color: var(--ink); }

/* numbered list of actions (key account 2.0) */
.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.steps li { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: var(--s3); align-items: baseline; padding: var(--s4) 0; border-bottom: 1px solid var(--hair); }
.steps li .lbl { color: var(--ink); }
.steps p { margin: 0 !important; max-width: 34em !important; font-size: clamp(18px, 2.1vw, 22px); line-height: 1.3; letter-spacing: -.01em; }

.outcome { font-size: clamp(28px, 4.4vw, 48px) !important; line-height: 1.08; letter-spacing: -.03em; font-weight: 600; max-width: 18em !important; text-wrap: balance; }

/* ===== Fig. 1.1: linked records (linking) ===== */
.lk-fig { margin: 0; }
.lk { border: 1px solid var(--ink); background: var(--sheet); padding: 14px 14px 12px; max-width: 44rem; }
.lk-top { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--ink); padding-bottom: 8px; margin-bottom: 12px; }
.lk-top .lbl { color: var(--ink); }
.lk-modes { max-width: 22rem; }
.lk-modes { margin: 0 0 12px; }
.lk-modes[hidden] { display: none; }
.lk-svg { display: block; width: 100%; height: auto; margin: 0 0 6px; }
.lk-svg text { font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.lk-t { font-size: 9px; font-weight: 500; fill: var(--ink); }
.lk-s { font-size: 7.5px; fill: var(--ink-2); }
.lk-on { fill: var(--bg); }
.lk-box { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.lk-line { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.lk-ink, .lk-cat, .lk-tag { fill: var(--ink); }
.lk-none { fill: var(--paper); stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 2; }
.lk-red-s { fill: none; stroke: var(--red); stroke-width: 2; }
.lk-red-t { fill: var(--red-ink); }
.lk-miss-line { fill: none; stroke: var(--red); stroke-width: 1.5; stroke-dasharray: 3 3; }
.lk-rec, .lk-brk, .lk-link2, .lk-none, .lk-miss, .lk-reach-all, .lk-reach-some, .lk-miss-line { transition: opacity .25s var(--ease); }

.lk[data-state="works"] .lk-brk, .lk[data-state="works"] .lk-none, .lk[data-state="works"] .lk-miss,
.lk[data-state="works"] .lk-reach-some, .lk[data-state="works"] .lk-miss-line { opacity: 0; }
.lk[data-state="breaks"] .lk-link2, .lk[data-state="breaks"] .lk-reach-all { opacity: 0; }
.lk[data-state="breaks"] .lk-far .lk-box { stroke-dasharray: 4 3; }
.lk[data-state="breaks"] .lk-far { opacity: .7; }

.lk-read { margin: 4px 0 8px !important; padding-top: 8px; border-top: 1px solid var(--ink); font: 500 12px/1.4 var(--mono); color: var(--ink); max-width: none !important; }
.lk .flow-legend { margin-bottom: 0; }
.lk-lg-none { background: transparent; outline: 1px dashed var(--ink-2); outline-offset: -1px; }

/* ===== Fig. 3.1: three tiers (linking) ===== */
.tiers { margin: 0; }
.tiers ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; border-left: 3px solid var(--ink); padding-left: var(--s3); }
.tiers li {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px var(--s4);
  border: 1px solid var(--ink); background: var(--sheet); padding: var(--s3) var(--s4); color: var(--ink);
}
.tiers .tn { color: var(--ink); }
.tiers .tt { font-weight: 600; font-size: clamp(19px, 2.2vw, 23px); line-height: 1.2; letter-spacing: -.012em; }
.tiers .td { font-size: 16px; line-height: 1.45; color: var(--ink-2); }
.tiers .t1 { width: 86%; }
.tiers .t2 { width: 93%; }
.tiers .t3 { width: 100%; border-width: 1.5px; background: var(--paper); }
@media (min-width: 720px) {
  .tiers li { grid-template-columns: 4.6rem 9rem minmax(0, 1fr); align-items: baseline; }
  .tiers .t1 { width: 70%; }
  .tiers .t2 { width: 85%; }
}
@media (min-width: 720px) and (max-width: 959px) {
  .tiers li { grid-template-columns: 4.6rem minmax(0, 1fr); }
  .tiers .td { grid-column: 2; }
}

/* 15 of 15 kept */
.kept { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2); align-items: center; margin: var(--s3) 0 0; max-width: 20rem; }
.kept .lbl { color: var(--ink); }
.kept-row { display: block; height: 14px; background: linear-gradient(to right, var(--ink) 0 calc(100% - 3px), transparent 0) 0 0 / calc(100% / var(--n)) 100% repeat-x; }
