/* A card's own page (server/views/card.mjs, card Nr. 191): inside the board's frame, the sidebar beside it.
   One calm card of fixed height in two columns, the comments below it. Tokens only. */

#cardpage { container: cardpage / inline-size; grid-column: 2; min-width: 0; min-height: 0; overflow-y: auto; background: var(--surface); padding: 72px var(--gutter) var(--s-10); scrollbar-width: thin; }
.tc-page { --card-h: clamp(420px, calc(100dvh - 170px), 600px); --right: 330px; }
.tc-page > * { max-width: 1040px; margin-inline: auto; }
.tc-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- the row above the card: the way back, where it stands, More ---- */
.tc-head { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-3); }
/* The way back is plain words with its key beside it ("Back to Desk  Esc"), no frame; on touch screens the key goes. */
.tc-back { color: var(--fg); text-decoration: none; }
.tc-head .tc-back { display: inline-flex; align-items: center; gap: 8px; min-width: 0; min-height: 36px; font: 700 var(--t-sm)/1 var(--font); }
.tc-head .tc-back:hover span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.tc-back span { max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-back kbd { flex: none; padding: 3px 6px; border-radius: 5px; background: var(--surface); box-shadow: 0 0 0 1px var(--line-strong), 0 1px 0 var(--line-strong); color: var(--muted); font: 500 .68rem/1 var(--mono); }
@media (hover: none) and (pointer: coarse) { .tc-back kbd { display: none; } }
.tc-place { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; color: var(--muted); font: 500 var(--t-sm)/1 var(--font); }
.tc-count { padding: 0 6px; white-space: nowrap; }
.tc-step-card { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--muted); text-decoration: none; }
a.tc-step-card:hover { background: var(--sunken); color: var(--fg); }
span.tc-step-card { opacity: .3; }
.tc-more { position: relative; }
.tc-place + .tc-more { margin-left: 0; }
.tc-head > .tc-more:only-of-type:not(.tc-place ~ *) { margin-left: auto; }
.tc-more-open { list-style: none; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 10px 0 12px; border-radius: var(--r-pill, 999px); cursor: pointer; color: var(--muted); font: 600 var(--t-sm)/1 var(--font); }
.tc-more-open::-webkit-details-marker { display: none; }
.tc-more-open:hover, .tc-more[open] > .tc-more-open { background: var(--sunken); color: var(--fg); }
.tc-more-open .sketch { width: 16px; height: 16px; }
.tc-more-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 220px; display: grid; padding: 6px; border-radius: var(--r-md); background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow-md); }
.tc-more-item, .tc-more-list > .cardclip-copy { display: flex; align-items: center; gap: 10px; width: 100%; height: auto; min-height: 38px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--fg); font: 500 var(--t-sm)/1.2 var(--font); text-align: left; text-decoration: none; cursor: pointer; }
.tc-more-list > .cardclip-copy::after { content: "Copy"; }
.tc-more-item:hover, .tc-more-list > .cardclip-copy:hover { background: var(--sunken); }
.tc-more-item .sketch, .tc-more-list .cardclip-ico { flex: none; width: 20px; height: 20px; }
.tc-more-item.is-shred { color: var(--urg-high); }

/* ---- the card: fixed height, two columns ---- */
.tc-card { position: relative; isolation: isolate; height: var(--card-h); display: grid; grid-template-columns: minmax(0, 1fr) var(--right); border-radius: var(--r-xl); background: var(--sunken); box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.tc-left { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-6) var(--s-6) var(--s-4) var(--s-8); overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; }
.tc-lead { flex: none; display: grid; gap: var(--s-2); min-width: 0; }
.tc-knock { justify-self: start; }
.tc-title { margin: 0; font: 800 var(--t-2xl)/1.12 var(--display); letter-spacing: -.01em; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tc-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; color: var(--muted); font: 500 var(--t-xs)/1.4 var(--font); }
.tc-meta a { color: inherit; text-decoration: none; }
.tc-meta a:hover { color: var(--fg); text-decoration: underline; }
.tc-from { display: inline-flex; align-items: center; gap: 5px; }
.tc-from .doodle { width: 18px; height: 18px; fill: none; stroke: var(--tone-pen); stroke-width: 2.2; stroke-linecap: round; }
.tc-text { font: 400 var(--t-md)/1.55 var(--font); color: var(--fg); max-height: calc(1.55em * 5); overflow: hidden; }
.tc-text .rich > :first-child { margin-top: 0; }
.tc-text .rich > :last-child { margin-bottom: 0; }
.tc-more-text { justify-self: start; color: var(--accent); font: 600 var(--t-xs)/1 var(--font); text-decoration: none; }
.tc-more-text:hover { text-decoration: underline; }

/* the picture: low, it takes what the words leave of the card's height */
turbo-frame.tc-media { flex: 1 1 0; min-height: 110px; display: flex; flex-direction: column; gap: 6px; }
.tc-stage { position: relative; flex: 1 1 0; min-height: 0; max-height: 280px; display: flex; align-items: center; align-self: flex-start; max-width: 100%; }
.tc-figure { position: relative; height: 100%; max-width: 100%; display: block; cursor: zoom-in; }
.tc-figure img { height: 100%; max-width: 100%; width: auto; object-fit: contain; object-position: left center; border-radius: var(--r-md); box-shadow: 0 0 0 1px var(--line); background: var(--surface); display: block; }
.tc-zoom { position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); color: var(--fg); box-shadow: var(--shadow-md); opacity: 0; transition: opacity var(--d-fast, 120ms); }
.tc-figure:hover .tc-zoom, .tc-figure:focus-visible .tc-zoom { opacity: 1; }
.tc-step { position: absolute; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface); color: var(--fg); box-shadow: var(--shadow-md); text-decoration: none; }
.tc-stage .tc-step.is-prev { left: 6px; }
.tc-stage .tc-step.is-next { right: 6px; }
.tc-thumbs { flex: none; display: flex; align-items: center; gap: 6px; min-width: 0; }
.tc-thumb { flex: none; width: 48px; height: 34px; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.tc-thumb[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); }
.tc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tc-where { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font: 400 var(--t-xs)/1 var(--font); }
.focus-circles { position: absolute; overflow: visible; pointer-events: none; fill: none; stroke: var(--urg-high); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.focus-circles text { fill: var(--urg-high); stroke: var(--surface); stroke-width: 3; paint-order: stroke; font: 700 14px/1 var(--display); }
.focus-arrow { position: absolute; left: 0; top: 0; width: 1px; height: 1px; z-index: 3; overflow: visible; pointer-events: none; fill: none; stroke: var(--fg); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* the right column: the options (they scroll inside the card when many), "or" the duck, the field */
.tc-right { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-5) var(--s-5) var(--s-4); background: var(--surface); box-shadow: -1px 0 0 var(--line); }
.tc-answer { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: var(--s-3); overflow-y: auto; scrollbar-width: thin; margin: -4px; padding: 4px; }
.tc-opts { display: grid; gap: 8px; }
.tc-opt { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 10px 34px 10px 14px; border: 0; border-radius: var(--r-md); background: var(--tone-wash, var(--sunken)); box-shadow: inset 0 0 0 1px var(--tone-edge, var(--line)); color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.tc-opt:hover { box-shadow: inset 0 0 0 2px var(--tone-mid, var(--accent)); }
.tc-opt:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tc-opt.is-still { cursor: default; box-shadow: inset 0 0 0 1px var(--line); background: var(--sunken); }
.tc-opt.is-picked { box-shadow: inset 0 0 0 2px var(--accent); }
.tc-opt.is-picked .tc-opt-label { color: var(--accent); }
.tc-opt[data-match] { box-shadow: inset 0 0 0 2px var(--fg); }
.tc-opt.is-picked-now { opacity: .6; }
.tc-opt-words { display: grid; gap: 2px; min-width: 0; }
.tc-opt-label { font: 700 var(--t-md)/1.25 var(--display); overflow-wrap: anywhere; }
.tc-opt-detail { color: var(--muted); font: 400 var(--t-xs)/1.35 var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-opt-pen { position: absolute; right: 6px; top: 6px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: var(--muted); opacity: 0; }
.tc-opt-pen .sketch { width: 14px; height: 14px; }
.tc-opt:hover .tc-opt-pen, .tc-opt:focus-within .tc-opt-pen, .tc-opt-pen[data-noted] { opacity: 1; }
.tc-opt-pen[data-noted] { color: var(--urg-high); }
@media (hover: none) { .tc-opt-pen { opacity: .6; } }
label.tc-opt > input { position: absolute; opacity: 0; pointer-events: none; }
.tc-tick { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--line-strong); color: transparent; }
label.tc-opt:has(> input:checked) .tc-tick { background: var(--accent); color: var(--accent-fg, #fff); box-shadow: none; }
.tc-send-many { justify-content: center; background: var(--accent); color: var(--accent-fg, #fff); box-shadow: none; }
.tc-opt-note { display: flex; align-items: center; gap: 6px; height: 38px; margin-top: -4px; padding: 0 10px; border-radius: var(--r-sm, 8px); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); }
.tc-opt-note[hidden] { display: none; }
.tc-opt-note:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.tc-opt-note .sketch { flex: none; width: 15px; height: 15px; }
.tc-opt-note input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font: inherit; font-size: var(--t-sm); color: var(--fg); outline: none; }
.tc-or { display: grid; justify-items: stretch; gap: 8px; }
.tc-or > i { display: flex; align-items: center; gap: 10px; width: 100%; color: var(--muted); font: 600 var(--t-xs)/1 var(--font); font-style: normal; text-transform: uppercase; letter-spacing: .08em; }
.tc-or > i::before, .tc-or > i::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.tc-whatever { display: grid; justify-items: center; gap: 2px; min-height: 64px; min-width: 96px; padding: 6px 14px; border: 0; border-radius: var(--r-md); background: none; color: var(--fg); cursor: pointer; }
.tc-whatever:hover { background: var(--sunken); }
.tc-whatever .sketch-duck { width: 60px; height: 50px; stroke-width: 2; }
.tc-duck-line { display: none; color: var(--muted); font: 500 var(--t-xs)/1.2 var(--font); }
@media (hover: none) { .tc-duck-line { display: block; } }
.tc-way { align-self: start; min-height: 36px; padding: 0 14px; border: 0; border-radius: var(--r-pill, 999px); background: var(--sunken); color: var(--fg); font: 600 var(--t-sm)/1 var(--font); cursor: pointer; }
.tc-way:hover { background: var(--line); }
.tc-quiet { margin: 0; color: var(--muted); font-size: var(--t-sm); }
.tc-error { margin: 0; color: var(--urg-critical, var(--urg-high)); font: 600 var(--t-sm)/1.3 var(--font); }
.tc-error[hidden] { display: none; }

.tc-ask { flex: none; display: grid; gap: 6px; padding: 8px; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); }
.tc-ask:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.tc-field { width: 100%; min-height: 44px; max-height: 160px; field-sizing: content; resize: none; border: 0; background: none; color: var(--fg); font: 400 var(--t-sm)/1.45 var(--font); outline: none; padding: 2px 4px; }
.tc-ask-row { display: flex; align-items: center; gap: 6px; }
.tc-clip { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--muted); cursor: pointer; }
.tc-clip:hover { background: var(--sunken); color: var(--fg); }
.tc-clip .sketch { width: 19px; height: 19px; }
.tc-saved { color: var(--muted); font: 500 var(--t-xs)/1 var(--font); }
.tc-saved[data-state="saved"] { color: var(--accent); }
.tc-saved[data-state="failed"] { color: var(--urg-high); }
.tc-send { margin-left: auto; flex: none; width: 48px; height: 48px; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--r-md); background: var(--accent); color: var(--accent-fg, #fff); cursor: pointer; }
.tc-send:hover { filter: brightness(1.08); }
.tc-send:active { transform: scale(.94); }
.tc-send .sketch { width: 30px; height: 30px; stroke-width: 2; }
.tc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-chips[hidden] { display: none; }
.tc-chips .focus-chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border: 0; border-radius: 999px; background: var(--sunken); color: var(--fg); font: 500 var(--t-xs)/1 var(--font); }
.tc-chips .t-chip-drop { background: none; color: var(--muted); text-decoration: underline; cursor: pointer; }

/* something to read: two clear tiles */
.tc-info-ways { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tc-tile { display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 110px; padding: 10px; border: 0; border-radius: var(--r-md); background: var(--sunken); color: var(--fg); font: 700 var(--t-sm)/1.2 var(--display); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.tc-tile .sketch { width: 30px; height: 30px; }
.tc-tile.is-ack { background: var(--accent); color: var(--accent-fg, #fff); box-shadow: none; }
.tc-tile:hover { filter: brightness(.96); }

/* ---- the comments under the card ---- */
.tc-feed { display: grid; gap: var(--s-4); margin-top: var(--s-6); padding: 0 var(--s-2); }
.tc-feed[hidden] { display: none; }
.tc-feed .msg { max-width: 46rem; }
.tc-feed .msg-head { gap: var(--s-2); }
.tc-feed .focus-msg-mark { flex: none; width: 22px; height: 22px; color: var(--tone-pen, var(--muted)); }
.tc-feed .focus-msg-mark .doodle { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; }
.tc-said { font: 700 var(--t-sm)/1 var(--display); }
.tc-whole { padding: var(--s-4) var(--s-5); border-radius: var(--r-lg); background: var(--sunken); }
.tc-sec { padding-top: var(--s-3); border-top: 1px solid var(--line); margin-top: var(--s-3); }
.tc-sec:first-of-type { border-top: 0; margin-top: 0; }
.tc-sec h3 { margin: 0 0 4px; font: 700 var(--t-md)/1.25 var(--display); }
.tc-advised-word { color: var(--accent); font: 600 var(--t-xs)/1 var(--font); }
.tc-sec-pic img { max-width: min(100%, 320px); border-radius: var(--r-md); box-shadow: 0 0 0 1px var(--line); }
.tc-did { display: flex; align-items: baseline; gap: 10px; margin: 0; color: var(--muted); font: 500 var(--t-sm)/1.4 var(--font); }
.tc-did ul { margin: 4px 0 0; padding-left: 1.1em; }
.t-opt-links { display: block; }
.tc-feed a { color: var(--accent); text-underline-offset: 3px; }
.tc-feed a.tc-older { justify-self: center; display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: var(--r-pill); background: var(--sunken); color: var(--muted); font: 500 var(--t-sm)/1 var(--font); text-decoration: none; }
.tc-feed a.tc-older:hover { color: var(--fg); }
.tc-turn { padding: var(--s-3) var(--s-4); border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line); }
.tc-turn-head { display: flex; align-items: center; gap: 8px; margin: 0; font: 500 var(--t-sm)/1 var(--font); color: var(--muted); }
.tc-turn-head b { color: var(--fg); }
.tc-turn-head .sketch { width: 18px; height: 18px; }
.tc-turn-note { margin: 6px 0 0; }
.tc-turn-before { display: inline-block; margin-top: 6px; color: var(--accent); font: 600 var(--t-xs)/1 var(--font); }
.tc-files a { margin-right: 8px; }

/* ---- a phone, or a narrow window: one column ---- */
@container cardpage (max-width: 760px) {
  .tc-card { height: auto; grid-template-columns: minmax(0, 1fr); }
  .tc-left { padding: var(--s-5) var(--s-5) var(--s-3); overflow: visible; }
  turbo-frame.tc-media { flex: none; }
  .tc-stage { height: 200px; flex: none; }
  .tc-card[data-kind="info"] .tc-stage { height: 140px; }
  .tc-right { box-shadow: 0 -1px 0 var(--line); padding: var(--s-4); }
  .tc-answer { overflow: visible; }
  .tc-text { max-height: none; }
  .tc-count { display: none; }
}
@media (min-width: 861px) { #cardpage { grid-row: 1; } }
@media (max-width: 860px) {
  #cardpage { grid-column: 1; grid-row: 3; padding: var(--s-4) var(--s-3) 96px; }
}

/* ---- one picture, large, at its own address ---- */
.t-picture { position: fixed; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--bg); }
.t-picture-bar { display: flex; align-items: center; gap: var(--s-3); padding: 10px 14px; min-width: 0; }
.t-picture-where { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font: 400 var(--t-sm)/1.3 var(--font); }
.t-picture-view { display: grid; place-items: center; min-height: 0; padding: 0 14px 14px; cursor: zoom-out; }
.t-picture-fit { position: relative; display: inline-block; max-width: 100%; max-height: 100%; }
.t-picture-fit img { display: block; max-width: 100%; max-height: calc(100dvh - 90px); object-fit: contain; border-radius: var(--r-md); box-shadow: var(--shadow-md); background: var(--surface); }
.t-picture .tc-step { position: fixed; }
.t-picture .tc-step.is-prev { left: 14px; }
.t-picture .tc-step.is-next { right: 14px; }

/* "or": the duck and ??? side by side, as tiles (card Nr. 176 and his word on the card page) */
.tc-or-pair { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.tc-or-pair .tc-tile { min-height: 72px; gap: 2px; }
.tc-or-pair .tc-whatever .sketch-duck { width: 48px; height: 40px; stroke-width: 2; }
.tc-wtf b { font: 800 1.5rem/40px var(--display); letter-spacing: .06em; }
.tc-or-pair .tc-duck-line { display: block; color: var(--muted); font: 500 var(--t-xs)/1.2 var(--font); }

/* ---- marks on the card: the pen's ink over the left column, a written note at a paragraph (js/focus-marks.js) ---- */
.focus-ink { position: absolute; left: 0; top: 0; width: 100%; z-index: 3; overflow: visible; pointer-events: none; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.focus-ink[data-pen] { pointer-events: auto; cursor: crosshair; touch-action: none; }
.focus-ink[data-rub] { cursor: cell; }
.focus-ink[data-rub] path { pointer-events: stroke; stroke-width: 9; stroke-opacity: .5; }
.tc-text:has(.focus-mark) { max-height: none; }
.focus-mark { display: flex; align-items: flex-start; gap: 6px; margin: 6px 0 10px 10px; padding: 4px 8px; border-left: 2px solid var(--urg-high); color: var(--urg-high); cursor: text; }
.focus-mark .sketch { flex: none; width: 15px; height: 15px; margin-top: 5px; }
.focus-mark textarea { flex: 1; min-width: 0; padding: 0; border: 0; background: none; resize: none; overflow: hidden; font: 500 1rem/1.5 var(--font); color: inherit; outline: none; }
.focus-mark-quill { position: absolute; z-index: 2; width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--muted); background: var(--surface); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; }
.focus-mark-quill .sketch { width: 14px; height: 14px; }
.focus-mark-quill:hover { color: var(--urg-high); box-shadow: 0 0 0 1px var(--urg-high); }
.focus-mark-tools { display: inline-flex; align-items: center; gap: 0; }
.focus-mark-tool { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.focus-mark-tool .sketch { width: 18px; height: 18px; }
.focus-mark-tool:hover { background: var(--sunken); color: var(--fg); }
.focus-mark-tool[aria-pressed="true"] { background: var(--fg); color: var(--surface); }
.focus-mark-state { padding: 0 4px 0 2px; font: 600 var(--t-xs)/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--urg-high); white-space: nowrap; }
.focus-mark-done, .focus-mark-clear { flex: none; height: 28px; padding: 0 8px; border: 0; border-radius: 8px; background: none; font: 600 var(--t-xs)/1 var(--font); white-space: nowrap; color: var(--muted); cursor: pointer; }
.focus-mark-done { background: var(--fg); color: var(--surface); }
.focus-mark-tools[hidden], .focus-mark-tool[hidden], .focus-mark-state[hidden], .focus-mark-done[hidden], .focus-mark-clear[hidden] { display: none; }
.tc-ask-row:has(.focus-mark-tools[data-pen]) .tc-saved { display: none; }

/* What??: the word written by hand (pen.js sketchSvg('what'), card Nr. 206), no caption under it */
.tc-wtf .sketch-what, .tc-tile.is-what .sketch-what { width: 92px; height: 32px; stroke-width: 2.6; }

/* the agent's advice: the drawn highlighter behind the label (controller "advice") */
.tc-opt-label[data-controller~="advice"] { position: relative; isolation: isolate; width: fit-content; }

/* ---- the walk: an answered card flies off to the side, the next one is simply there (a view transition between the
   two pages; Turbo starts it, the layout's <meta name="view-transition">) ---- */
.tc-card { view-transition-name: tc-card; }
::view-transition-old(tc-card) { animation: tc-fly 260ms cubic-bezier(.5, 0, .75, 0) both; }
::view-transition-new(tc-card) { animation: tc-land 220ms 80ms ease-out both; }
@keyframes tc-fly { to { translate: 46% -6%; rotate: 5deg; opacity: 0; } }
@keyframes tc-land { from { opacity: 0; scale: .985; } }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(tc-card), ::view-transition-new(tc-card) { animation: none; } }

/* ---- the comments: sober, a conversation ---- */
#cardpage .rich { font-size: var(--t-md); line-height: 1.6; overflow-wrap: anywhere; min-width: 0; }
#cardpage .rich > * + * { margin-top: .75em; }
#cardpage .rich p { margin: 0; white-space: pre-wrap; }
#cardpage .rich :is(ul, ol) { margin: 0; padding-left: 1.4em; }
#cardpage .rich li + li { margin-top: .25em; }
#cardpage .rich a { color: var(--accent); text-underline-offset: 3px; }
#cardpage .rich :not(pre) > code { padding: .1em .35em; border-radius: 5px; background: var(--sunken); font: .9em var(--mono, monospace); }
#cardpage .rich pre { overflow-x: auto; padding: 10px 12px; border-radius: var(--r-md); background: var(--sunken); }
#cardpage .rich .rich-point { font-weight: 600; }
.tc-feed .msg-user { justify-self: end; max-width: min(82%, 34rem); }
.tc-feed .msg-user .bubble { width: fit-content; margin-left: auto; }
.tc-fold { border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line); }
.tc-fold > summary { cursor: pointer; padding: 10px 14px; color: var(--muted); font: 600 var(--t-sm)/1 var(--font); list-style: none; }
.tc-fold > summary::after { content: " ▸"; }
.tc-fold[open] > summary::after { content: " ▾"; }
.tc-fold > summary::-webkit-details-marker { display: none; }
.tc-fold[open] { padding-bottom: var(--s-4); }
.tc-fold[open] > :not(summary) { margin: var(--s-3) var(--s-4) 0; }
.tc-earlier[open] { display: grid; gap: var(--s-4); }
.tc-explained { display: grid; gap: var(--s-2); padding: var(--s-3) var(--s-4); border-left: 3px solid var(--line-strong); }
.tc-explained-head { display: flex; align-items: baseline; gap: 10px; margin: 0; color: var(--muted); font: 600 var(--t-sm)/1.3 var(--font); }
.tc-turn-head { gap: 10px; }

/* the agent's advice on a card tile: a stronger marker than in running text, so it reads at a glance */
.tc-opt.is-advised { --marker: .42; }
:root[data-theme="dark"] .tc-opt.is-advised { --marker: .5; }

/* Revise: the reverse card opens a small field right under the row (views/card.mjs reviseTile) */
.tc-revise > summary { list-style: none; height: 100%; box-sizing: border-box; }
.tc-revise > summary::-webkit-details-marker { display: none; }
.tc-revise > summary .sketch { width: 34px; height: 34px; stroke-width: 2; }
.tc-revise[open] > summary { box-shadow: inset 0 0 0 2px var(--accent); }
.tc-revise-form { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 4; display: grid; gap: 6px; padding: 8px; border-radius: var(--r-md); background: var(--surface); box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-md); }
.tc-revise-form textarea { width: 100%; min-height: 56px; resize: none; border: 0; background: none; color: var(--fg); font: 400 var(--t-sm)/1.45 var(--font); outline: none; }
.tc-revise-send { justify-self: end; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px 0 10px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-fg, #fff); font: 600 var(--t-sm)/1 var(--font); cursor: pointer; }
.tc-revise-send .sketch { width: 16px; height: 16px; }
@container cardpage (max-width: 760px) { .tc-revise-form { position: static; grid-column: 1 / -1; } .tc-or-pair:has(.tc-revise[open]) { grid-template-rows: auto auto; } }

/* the duck as a wide tile, written out (his word: as wide as the options) */
.tc-opt.tc-whatever { display: flex; flex-direction: row; align-items: center; min-width: 0; justify-items: start; justify-content: flex-start; gap: 12px; min-height: 56px; padding-right: 14px; background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); }
.tc-opt.tc-whatever .sketch-duck { flex: none; width: 38px; height: 32px; stroke-width: 2; }
.tc-revise-form { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.tc-revise-form input[type="text"] { min-width: 0; height: 36px; border: 0; background: none; color: var(--fg); font: 400 var(--t-sm)/1 var(--font); outline: none; padding: 0 4px; }
.tc-revise-send { justify-self: auto; }
/* the chat under the comments: a plain message to the agent, the card stays with him */
.tc-chat { position: sticky; bottom: 0; z-index: 5; margin: var(--s-6) auto 0; box-shadow: inset 0 0 0 1px var(--line-strong), 0 -10px 18px -12px rgb(0 0 0 / .18); }
.tc-right { overflow: hidden; }
