/* The instructions file. Loaded after articles.css, for this article only.

   The colour rule does the arguing. Orange is a correction you typed by hand: a leak, because it comes
   back. Indigo is the file doing that job for you. Everything else stays grey, and the file itself is
   the one dark thing on the page, because it is what changed. Each element gets one mark, no more. */

.a-hero h1, .a-body h2, .a-body h3 { text-wrap: balance; }
.a-hero .lead, .a-body p, .a-body li { text-wrap: pretty; }

/* ---------- The set piece: one request, two Claudes ----------
   One request across the top, then 4 against 1 as big as the column allows: that is the whole argument,
   so it stays side by side at every width, and on a phone it is on the first screen. Under it the two
   conversations, ending on the same reply. Each numbered correction is the same row in the file.
   Armed by articles.js. The armed state is a complete picture on purpose: the file's rows are only
   dimmer. On arrival they turn on, one by one. Without JS, or with reduced motion, they are simply on. */
.tc-fig { margin: 22px 0 0; padding: clamp(12px, 2vw, 18px); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-float); display: grid; gap: 10px; min-width: 0; }
.a-hero .tc-head { padding: 2px 4px 0; color: var(--ink-hint); }
.tc-ask { display: grid; gap: 1px; padding: 9px 14px 11px; border-radius: 14px; background: var(--grid); font-size: 0.9375rem; font-weight: 600; line-height: 1.4; color: var(--ink); text-wrap: pretty; }
.tc-ask b, .tc-talk b { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; line-height: 1.5; text-transform: uppercase; color: var(--ink-hint); }
.tc-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.tc-into { display: none; }
.tc-big { display: flex; align-items: center; gap: clamp(8px, 1.6vw, 14px); padding: 10px clamp(10px, 2vw, 16px); border-radius: 16px; min-width: 0; font-size: 1rem; font-weight: 700; line-height: 1.2; color: var(--ink); }
.tc-big b { font-family: var(--serif); font-size: clamp(3.5rem, 2.9rem + 3vw, 5rem); font-weight: 700; line-height: 0.95; letter-spacing: -0.03em; }
.tc-big span { min-width: 0; }
.tc-big small { display: block; margin-top: 3px; font-size: 0.875rem; font-weight: 500; color: var(--ink-2); }
.tc-big.is-leak { background: var(--lift-tint); }
.tc-big.is-leak b { color: var(--lift-ink); }
.tc-big.is-back { background: var(--primary-tint); }
.tc-big.is-back b { color: var(--primary-deep); }

.tc-side { display: grid; grid-template-rows: 1fr; gap: 12px; padding: 4px; min-width: 0; }
.tc-filed { grid-template-rows: auto 1fr; }
.tc-title { display: none; }

.tc-talk { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; align-content: space-between; min-width: 0; }
.tc-talk li { display: grid; gap: 1px; min-width: 0; font-size: 0.875rem; line-height: 1.42; color: var(--ink-2); }
.tc-talk .tc-more { margin-bottom: -4px; }
.tc-filed .tc-talk { align-content: end; }

/* A correction: the orange tint is its one mark, and the number ties it to its row in the file. */
.tc-talk .tc-fix { grid-template-columns: 1.3rem minmax(0, 1fr); gap: 8px; align-items: start; padding: 7px 10px; border-radius: 10px; background: var(--lift-tint); font-weight: 600; color: var(--ink); }

.tc-fix > i, .tc-file li > i { display: grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; font: 600 0.75rem/1 var(--mono); font-style: normal; }
.tc-fix > i { background: var(--surface); color: var(--lift-ink); }

.tc-file { padding: 12px 14px 14px; border-radius: 12px; background: var(--night); color: var(--on-night); }
.tc-fname { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; font-size: 0.8125rem; font-weight: 700; line-height: 1.3; color: var(--on-night); }
.tc-fname span { font-weight: 500; color: var(--on-night-2); }
.tc-file ol { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 7px; }
.tc-file li { display: grid; grid-template-columns: 1.3rem minmax(0, 1fr); gap: 8px; align-items: start; font: 500 0.8125rem/1.4 var(--mono); color: var(--on-night); transition: color 0.4s; transition-delay: calc(var(--n, 0) * 320ms + 180ms); }
/* The chip never changes colour. It used to, and for a moment its dark number sat on a dark chip. */
.tc-file li > i { background: #C9D2FC; color: var(--night); }

.is-armed:not(.is-cut) .tc-file li { color: var(--on-night-2); transition: none; }

.tc-cap { font-size: 0.9375rem; line-height: 1.5; color: var(--ink-hint); }
.a-hero .tc-cap { margin-top: 12px; }
.a-hero .a-by { margin-top: 20px; }

/* ---------- How the file loads ---------- */
.tc-load { margin: 0; padding: clamp(16px, 2.6vw, 24px); border-radius: 22px; background: var(--wash); display: grid; gap: 0; min-width: 0; }
.tc-order { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: var(--t-eyebrow); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.a-body .tc-load ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tc-load li { display: grid; gap: 5px; align-content: start; padding: 12px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); font-size: 0.875rem; line-height: 1.3; min-width: 0; }
.tc-load li b { color: var(--ink); font-weight: 700; }
.a-body .tc-load code { padding: 0; background: none; font-size: 0.75rem; line-height: 1.35; color: var(--ink-2); overflow-wrap: normal; white-space: normal; }
.tc-load small, .tc-load em { font-size: 0.8125rem; font-style: normal; line-height: 1.3; color: var(--ink-hint); }
.tc-load .is-yours { background: var(--night); box-shadow: none; }
.tc-load .is-yours b { color: #fff; }
.a-body .tc-load .is-yours code { color: var(--on-night); }
.tc-load .is-yours em { font-weight: 700; color: var(--on-night); }
/* Four sheets draining into one session. */
.tc-join { height: 26px; margin-inline: 12.5%; border: 2px solid #AEB5D6; border-top: 0; border-radius: 0 0 12px 12px; position: relative; margin-bottom: 18px; }
.tc-join::before { content: ""; position: absolute; left: 33.33%; right: 33.33%; top: 0; bottom: 0; border-inline: 2px solid #AEB5D6; }
.tc-join::after { content: ""; position: absolute; left: 50%; bottom: -19px; height: 18px; border-left: 2px solid #AEB5D6; }
.tc-session { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 2px 12px; padding: 13px 18px; border-radius: 14px; background: var(--night); color: var(--on-night-2); font-size: 0.9375rem; line-height: 1.35; text-align: center; }
.tc-session b { font-family: var(--serif); font-size: 1.1875rem; font-weight: 700; color: #fff; }

/* ---------- Hard to check, easy to check ---------- */
.tc-sharp { margin: 0; display: grid; gap: 8px; min-width: 0; }
.tc-sh { display: grid; grid-template-columns: minmax(0, 12rem) 1.6rem minmax(0, 1fr); gap: 0; align-items: center; min-width: 0; }
.tc-sh::before { content: ""; grid-column: 2; grid-row: 1; height: 2px; margin-right: 6px; background: #AEB5D6; }
.tc-sh > .tc-soft { grid-column: 1; grid-row: 1; }
.tc-sh > .tc-hard { grid-column: 3; grid-row: 1; }
.tc-soft, .tc-hard { padding: 9px 12px; border-radius: 10px; font-size: 0.9375rem; font-weight: 600; line-height: 1.3; }
.tc-soft { background: var(--lift-tint); color: var(--lift-ink); }
.tc-hard { background: var(--primary-tint); color: var(--primary-deep); }
.tc-sh-head { font-size: var(--t-eyebrow); font-weight: 700; letter-spacing: 0.14em; line-height: 1.4; text-transform: uppercase; color: var(--ink-hint); }
.tc-sh-head::before { display: none; }
.tc-sh-head > span:first-child { grid-column: 1; grid-row: 1; }
.tc-sh-head > span:last-child { grid-column: 3; grid-row: 1; }
.tc-sharp figcaption { font-size: 0.9375rem; line-height: 1.5; color: var(--ink-hint); }

/* ---------- The tool ----------
   No panel: the questions sit in the reading column, with only their fields on white. The file in
   step 3 is the one dark surface, because it is what all of this produces. A chosen answer goes dark
   for the same reason, and because indigo and orange are spoken for. */
.tc-tool { display: grid; gap: 14px; margin-top: 6px; min-width: 0; }
.a-body .tc-tool .fine { line-height: 1.5; color: var(--ink-hint); }
.tc-form { gap: 22px; }
.tc-label, .tc-q > label, .tc-q > legend { padding: 0; font-size: 0.9375rem; font-weight: 700; line-height: 1.35; color: var(--ink); }
.tc-q { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.tc-q > legend { margin-bottom: 8px; }
.tc-tool input[type="text"] { min-width: 0; width: 100%; padding: 0.65em 0.8em; border: 1px solid #D5D9EA; border-radius: 10px; background: var(--surface); color: var(--ink); font: 500 1rem/1.3 var(--sans); text-overflow: ellipsis; transition: border-color 0.2s, box-shadow 0.2s; }
.tc-tool input[type="text"]::placeholder { color: var(--ink-hint); font-weight: 400; }
.tc-tool input[type="text"]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 108, 248, 0.25); }

.tc-fixes { display: grid; gap: 8px; min-width: 0; }
.tc-fix-row { display: grid; grid-template-columns: minmax(0, 1fr) 2.2rem; gap: 6px; align-items: center; }
.tc-x { width: 2.2rem; height: 2.2rem; border: 0; border-radius: 10px; background: none; color: var(--ink-hint); font: 600 1.25rem/1 var(--sans); cursor: pointer; }
.tc-x:hover { background: var(--grid); color: var(--ink); }

.tc-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-seg input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tc-seg label { padding: 0.55em 0.95em; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px #D5D9EA; color: var(--ink); font-size: 0.9375rem; font-weight: 600; line-height: 1.25; cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.tc-seg label:hover { box-shadow: inset 0 0 0 2px #B5BAD2; }
.tc-seg input:checked + label { background: var(--night); box-shadow: none; color: #fff; }
.tc-seg input:focus-visible + label { outline: 3px solid var(--primary); outline-offset: 2px; }
.tc-writes { font: 500 0.8125rem/1.45 var(--mono); color: var(--ink-hint); }
.tc-writes::before { content: "Writes: "; color: var(--ink); }

.tc-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tc-checks label { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; padding-block: 3px; color: var(--ink); font-size: 0.9375rem; font-weight: 600; line-height: 1.3; cursor: pointer; }
.tc-checks input { width: 20px; height: 20px; margin: 0; accent-color: var(--night); }

.tc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.tc-add { padding: 0.6em 1.05em; border: 0; border-radius: 999px; background: var(--primary); color: #fff; font: 700 0.9375rem/1.2 var(--sans); cursor: pointer; }
.tc-add:hover { background: var(--primary-deep); }
.tc-text { padding: 0.2em 0; border: 0; background: none; color: var(--ink); font: 600 0.9375rem/1.2 var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tc-text:hover { color: var(--primary-deep); }
.tc-tool button:focus-visible, .tc-route button:focus-visible, .tc-mark button:focus-visible, .tc-send:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.tc-nojs { font-size: 0.9375rem; line-height: 1.5; color: var(--ink-hint); }

/* ---------- The file ---------- */
.tc-out { display: grid; gap: 12px; min-width: 0; }
/* The reader's own file, so all of it stays readable. Nothing scrolls away, on any width. */
.tc-out .a-code.is-tall pre { max-height: none; white-space: pre-wrap; overflow-wrap: anywhere; }
.tc-size { font-size: 0.9375rem; line-height: 1.5; color: var(--ink-hint); }
.tc-lint { display: grid; gap: 8px; min-width: 0; }
.tc-lint:empty { display: none; }
.tc-flag { padding: 12px 14px; border-radius: 12px; background: var(--lift-tint); font-size: 0.9375rem; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.tc-flag b { display: block; font-weight: 700; color: var(--lift-ink); }
.tc-clean { padding: 12px 14px; border-radius: 12px; background: var(--primary-tint); font-size: 0.9375rem; line-height: 1.45; color: var(--ink); }
.tc-wait { padding: 12px 14px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); font-size: 0.9375rem; line-height: 1.45; color: var(--ink-hint); }

/* ---------- Two routes ---------- */
.tc-route { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
.tc-route[hidden] { display: none; }
.tc-route button { padding: 0.55em 1em; border: 0; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink); font: 700 0.9375rem/1.2 var(--sans); cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.tc-route button:hover { box-shadow: inset 0 0 0 2px #B5BAD2; }
.tc-route [aria-pressed="true"] { background: var(--night); box-shadow: none; color: #fff; }
.tc-how { display: grid; gap: 10px; padding: 16px 18px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); font-size: 1rem; line-height: 1.55; min-width: 0; }
.tc-how[hidden] { display: none; }
.tc-who { font-size: 1.0625rem; font-weight: 700; color: var(--ink); }
.tc-path { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 0.9375rem; font-weight: 700; color: var(--ink); }
.tc-path span { padding: 0.25em 0.7em; border-radius: 8px; background: var(--grid); }
.tc-path span + span::before { content: "›"; margin-left: -1.35em; margin-right: 0.8em; color: var(--ink-hint); }
.tc-path span + span { margin-left: 0.9em; }

/* ---------- The real test ---------- */
.tc-score { display: grid; gap: 10px; min-width: 0; }
.a-body .tc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-bottom: 1px solid var(--rule); }
.tc-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding-block: 8px; border-top: 1px solid var(--rule); font-size: 1rem; line-height: 1.4; color: var(--ink); }
.tc-line > span { min-width: 0; overflow-wrap: anywhere; }
.tc-mark { display: flex; gap: 4px; }
.tc-mark button { min-height: 2.4rem; padding: 0.3em 0.75em; border: 0; border-radius: 10px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink-2); font: 700 0.875rem/1.15 var(--sans); cursor: pointer; transition: background-color 0.2s, box-shadow 0.2s, color 0.2s; }
.tc-mark button:hover { box-shadow: inset 0 0 0 2px #B5BAD2; }
.tc-mark .is-held[aria-pressed="true"] { background: var(--primary-tint); box-shadow: inset 0 0 0 1px var(--primary); color: var(--primary-deep); }
.tc-mark .is-miss[aria-pressed="true"] { background: var(--lift-tint); box-shadow: inset 0 0 0 1px var(--lift); color: var(--lift-ink); }
.tc-tally { font-size: 1rem; font-weight: 600; line-height: 1.5; color: var(--ink); }

/* ---------- Six sessions ---------- */
.tc-runs { margin: 0; padding: clamp(16px, 2.6vw, 24px); border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); display: grid; gap: 10px; min-width: 0; }
.tc-run { display: grid; grid-template-columns: 11.5rem minmax(0, 1fr); gap: 10px; align-items: center; font-size: 0.9375rem; font-weight: 600; line-height: 1.3; color: var(--ink); }
.tc-cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: center; height: 22px; }
.tc-cells i { position: relative; display: block; height: 100%; }
.tc-cells .is-fix::before { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--lift); }
.tc-cells .is-file::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 8px; margin-top: -4px; background: var(--primary-deep); }
.tc-cells .is-fix + .is-file::before, .tc-cells i:not(.is-file) + .is-file::before { left: 50%; border-radius: 4px 0 0 4px; }
.tc-cells .is-file:last-child::before { border-radius: 0 4px 4px 0; }
.tc-run-head { font-size: var(--t-eyebrow); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-hint); }
.tc-run-head .tc-cells { height: auto; }
.tc-run-head b { font: 600 0.8125rem/1 var(--mono); letter-spacing: 0; text-align: center; color: var(--ink-hint); }
.a-body .tc-key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 6px 0 0; padding: 0; list-style: none; font-size: 0.875rem; line-height: 1.3; color: var(--ink-2); }
.tc-key li { display: flex; align-items: center; gap: 7px; }
.tc-key i { display: block; }
.tc-key .k-fix { width: 12px; height: 12px; border-radius: 50%; background: var(--lift); }
.tc-key .k-file { width: 22px; height: 8px; border-radius: 4px; background: var(--primary-deep); }

/* ---------- The door ---------- */
.tc-send { justify-self: start; padding: 0.2em 0; border: 0; background: none; color: #fff; font: 600 0.9375rem/1.3 var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tc-send[hidden], .tc-sent[hidden] { display: none; }
.a-body .a-cta-co .tc-sent { line-height: 1.5; }

/* ---------- Phones ----------
   Side by side leaves no room for a sentence here, so the figure becomes a story read downwards: the
   long way, the corrections turning into a file, then the short way. */
@media (max-width: 640px) {
  .tc-two { gap: 8px; }
  .tc-side, .tc-into { grid-column: 1 / -1; }
  .tc-side { padding: 8px 4px 4px; }
  .tc-title { display: block; font-size: 1rem; font-weight: 700; line-height: 1.25; color: var(--ink); }
  .tc-filed { grid-template-rows: auto auto auto; }
  .tc-big { font-size: 0.9375rem; }
  .tc-big small { font-size: 0.8125rem; }
  .tc-into { position: relative; display: block; padding: 14px 0; font-size: 0.875rem; font-weight: 700; line-height: 1.3; text-align: center; color: var(--ink-2); }
  .tc-into::before { content: "↓ "; color: var(--ink-hint); }
  .tc-talk li { font-size: 0.9375rem; }
  .tc-file li { font-size: 0.875rem; }

  .tc-order { display: none; }
  .a-body .tc-load ol { grid-template-columns: minmax(0, 1fr); gap: 0; padding-left: 26px; position: relative; }
  .a-body .tc-load ol::before { content: ""; position: absolute; left: 8px; top: 12px; bottom: -14px; border-left: 2px solid #AEB5D6; }
  .tc-load li { position: relative; margin-bottom: 8px; }
  .tc-load li::before { content: ""; position: absolute; left: -18px; top: 18px; width: 18px; border-top: 2px solid #AEB5D6; }
  .a-body .tc-load code { font-size: 0.8125rem; }
  .tc-join { display: none; }
  .tc-session { margin-top: 6px; justify-content: flex-start; text-align: left; }

  .tc-sh { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .tc-sh::before { display: none; }
  .tc-sh > .tc-soft, .tc-sh > .tc-hard { grid-column: 1; grid-row: auto; }
  .tc-sh { padding-bottom: 8px; }
  .tc-soft { justify-self: start; }
  .tc-hard { justify-self: stretch; }
  .tc-sh-head { display: none; }

  .tc-checks { grid-template-columns: minmax(0, 1fr); }
  .tc-line { grid-template-columns: minmax(0, 1fr); }
  .tc-mark button { flex: 1; }

  .tc-run { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .tc-run-head > span { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .tc-file li, .tc-seg label, .tc-mark button, .tc-route button { transition: none; }
}
