/* Taskd kit 0.2.2 (8 Oct 2026; 0.1.x from 7 Oct): tokens and components shared by Atlas, Documents and Admin. Framework-free; products
   pin a version. Calm, editorial: typography first, generous space, ink as the only accent (no brand hue), colour only for status and
   connection types, a marker-yellow evidence highlight. Dark is the default. */
:root {  /* Taskd accent A, ink only (Alex, 8 Oct): no brand hue; colour only for status and connection types. Dark is the default. */
  --tk-bg: #0a0a09; --tk-surface: #141716; --tk-raised: #181b1a; --tk-line: #262a28; --tk-line-strong: #3a3f3c;
  --tk-ink: #f2f2ee; --tk-muted: #9aa09c; --tk-faint: #8a908c; --tk-accent: #f2f2ee; --tk-danger: #ff8f80;
  --tk-on-accent: #0a0a09; --tk-focus: #f2f2ee; --tk-highlight: #4a4012;
  --tk-ok: #8fd16a; --tk-wait: #f2c14e;
  --tk-same-story: #8fb8ff; --tk-who-said: #f2c14e; --tk-what-changed: #c29bff; --tk-shared-method: #ffa36b; --tk-same-people: #f68fbc;
  --tk-proven: var(--tk-ok); --tk-insufficient: var(--tk-wait); --tk-conflicting: var(--tk-danger); --tk-checked: var(--tk-muted);
  --tk-serif: "Iowan Old Style", "Charter", Georgia, serif;
  --tk-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  --tk-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --tk-step--1: 12px; --tk-step-0: 15px; --tk-step-1: 18px; --tk-step-2: 22px; --tk-step-3: 30px;
  --tk-space-1: 4px; --tk-space-2: 8px; --tk-space-3: 12px; --tk-space-4: 16px; --tk-space-5: 24px; --tk-space-6: 36px;
  --tk-radius: 12px; --tk-measure: 720px;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --tk-bg: #f7f7f4; --tk-surface: #ffffff; --tk-raised: #fbfbf8; --tk-line: #e3e3dd; --tk-line-strong: #cbcbc3;
    --tk-ink: #111110; --tk-muted: #5f6360; --tk-faint: #6b6f6c; --tk-accent: #111110; --tk-danger: #c62a2a;
    --tk-on-accent: #ffffff; --tk-focus: #111110; --tk-highlight: #fbeea0;
    --tk-ok: #2e7d1f; --tk-wait: #8a5d00;
    --tk-same-story: #3b62c4; --tk-who-said: #8a5d00; --tk-what-changed: #7a4fd0; --tk-shared-method: #b5541a; --tk-same-people: #c23d7d;
    --tk-proven: var(--tk-ok); --tk-insufficient: var(--tk-wait); --tk-conflicting: var(--tk-danger); --tk-checked: var(--tk-muted);
  }
}
:root[data-theme="light"] {  /* a product that forces light gets it on a dark-mode system too */
  --tk-bg: #f7f7f4; --tk-surface: #ffffff; --tk-raised: #fbfbf8; --tk-line: #e3e3dd; --tk-line-strong: #cbcbc3;
  --tk-ink: #111110; --tk-muted: #5f6360; --tk-faint: #6b6f6c; --tk-accent: #111110; --tk-danger: #c62a2a;
  --tk-on-accent: #ffffff; --tk-focus: #111110; --tk-highlight: #fbeea0;
  --tk-ok: #2e7d1f; --tk-wait: #8a5d00;
  --tk-same-story: #3b62c4; --tk-who-said: #8a5d00; --tk-what-changed: #7a4fd0; --tk-shared-method: #b5541a; --tk-same-people: #c23d7d;
  --tk-proven: var(--tk-ok); --tk-insufficient: var(--tk-wait); --tk-conflicting: var(--tk-danger); --tk-checked: var(--tk-muted);
}
.tk-body { margin: 0; background: var(--tk-bg); color: var(--tk-ink); font: var(--tk-step-0)/1.55 var(--tk-sans); -webkit-font-smoothing: antialiased; }
.tk-body * { box-sizing: border-box; }
.tk-body [hidden] { display: none !important; }  /* the hidden attribute wins over component display rules */
.tk-body button, .tk-body input, .tk-body select { font: inherit; color: inherit; }
:where(.tk-body) a { color: var(--tk-ink); text-decoration: underline; text-underline-offset: 3px; }  /* plain links; components restyle theirs */
.tk-body :focus-visible { outline: 2px solid var(--tk-focus); outline-offset: 2px; }  /* the kit's focus ring, never the browser's (0.1.1) */
.tk-ask:focus-within { outline: 2px solid var(--tk-focus); outline-offset: 2px; }  /* the ask box draws the ring, not its input */
.tk-body .tk-ask input:focus-visible { outline: none; }

/* shell */
.tk-shell { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--tk-space-3); padding: 10px var(--tk-space-4);
  background: color-mix(in srgb, var(--tk-bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--tk-line); }
.tk-mark { display: flex; align-items: center; gap: var(--tk-space-2); color: var(--tk-ink); text-decoration: none; font-weight: 600; white-space: nowrap; }
.tk-mark img { height: 18px; width: auto; }
:root[data-theme="light"] .tk-mark img { filter: invert(1); }  /* the wordmark is white ink: black on light pages */
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .tk-mark img { filter: invert(1); } }
.tk-mark span { color: var(--tk-muted); font-weight: 500; }
.tk-nav { display: flex; gap: 2px; }
.tk-nav a { padding: 6px 10px; border-radius: 999px; color: var(--tk-muted); text-decoration: none; font-size: 14px; }
.tk-nav a[aria-current="page"] { color: var(--tk-ink); background: var(--tk-raised); }
.tk-shell-spacer { flex: 1; }
.tk-ask { flex: 1 1 280px; max-width: 420px; display: flex; align-items: center; gap: var(--tk-space-2); padding: 7px 12px; border: 1px solid var(--tk-line);
  border-radius: 999px; background: var(--tk-surface); }
.tk-ask input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; }
.tk-ask:focus-within { border-color: var(--tk-line-strong); }

/* buttons */
.tk-button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 7px 14px; border: 1px solid var(--tk-line); border-radius: 999px;
  background: transparent; color: var(--tk-ink); cursor: pointer; text-decoration: none; font-size: 14px; white-space: nowrap; }
.tk-button:hover { border-color: var(--tk-line-strong); }
.tk-button.tk-primary { background: var(--tk-accent); border-color: var(--tk-accent); color: var(--tk-on-accent); font-weight: 600; }
.tk-button.tk-quiet { border-color: transparent; color: var(--tk-muted); padding-inline: 8px; }
.tk-button.tk-quiet:hover { color: var(--tk-ink); }

/* page */
.tk-page { max-width: var(--tk-measure); margin: 0 auto; padding: var(--tk-space-6) var(--tk-space-4) 80px; }
.tk-eyebrow { color: var(--tk-muted); font: 12px/1.4 var(--tk-mono); letter-spacing: .08em; text-transform: uppercase; }
.tk-title { margin: 6px 0 var(--tk-space-4); font: 600 var(--tk-step-3)/1.15 var(--tk-serif); letter-spacing: -.01em; }
.tk-daynav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tk-space-2); margin-bottom: var(--tk-space-4); color: var(--tk-muted); font-size: 14px; }
.tk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--tk-space-5); }
.tk-toolbar { display: flex; align-items: center; gap: 6px; margin-bottom: var(--tk-space-5); overflow-x: auto; scrollbar-width: none; }
.tk-toolbar::-webkit-scrollbar { display: none; }
.tk-toolbar .tk-chip { flex-shrink: 0; white-space: nowrap; }
.tk-daystep { display: inline-flex; align-items: center; flex-shrink: 0; gap: 2px; margin-right: 6px; padding: 2px; border: 1px solid var(--tk-line); border-radius: 999px; font-size: 13px; white-space: nowrap; }
.tk-daystep button { min-width: 30px; min-height: 30px; border: 0; border-radius: 999px; background: transparent; color: var(--tk-ink); cursor: pointer; }
.tk-daystep button[disabled] { opacity: .3; cursor: default; }
.tk-chip { min-height: 36px; padding: 5px 12px; border: 1px solid var(--tk-line); border-radius: 999px; background: transparent; color: var(--tk-muted); cursor: pointer; font-size: 13px; }
.tk-chip[aria-pressed="true"] { color: var(--tk-ink); border-color: var(--tk-line-strong); background: var(--tk-raised); }

/* type label: one colour per connection type */
.tk-type { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--tk-sans); letter-spacing: .02em; color: var(--tk-type-color, var(--tk-muted)); }
.tk-type::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tk-type-color, var(--tk-muted)); }
[data-type="same-story"] { --tk-type-color: var(--tk-same-story); }
[data-type="who-said"] { --tk-type-color: var(--tk-who-said); }
[data-type="what-changed"] { --tk-type-color: var(--tk-what-changed); }
[data-type="shared-method"] { --tk-type-color: var(--tk-shared-method); }
[data-type="same-people"] { --tk-type-color: var(--tk-same-people); }
[data-type="answer"] { --tk-type-color: var(--tk-accent); }
[data-type="shape"] { --tk-type-color: var(--tk-accent); }
[data-type="proven"] { --tk-type-color: var(--tk-proven); }
[data-type="insufficient"] { --tk-type-color: var(--tk-insufficient); }
[data-type="conflicting"] { --tk-type-color: var(--tk-conflicting); }
[data-type="checked"] { --tk-type-color: var(--tk-checked); }
.tk-card[data-severity="blocker"] .tk-severity { color: var(--tk-conflicting); border-color: currentColor; }
.tk-card-exception { margin: 4px 0 0; color: var(--tk-muted); font-size: 14px; }
.tk-exception { margin-top: var(--tk-space-4); padding-top: var(--tk-space-3); border-top: 1px dashed var(--tk-line-strong); }
.tk-coverage { display: flex; flex-direction: column; gap: 2px; padding: 11px 2px; border-bottom: 1px solid var(--tk-line); list-style: none; }
.tk-coverage .tk-tag { margin-left: 0; align-self: flex-start; }
.tk-coverage-title { color: var(--tk-ink); font-weight: 500; }

/* card: headline, why it matters (one line), evidence (count and first quote), actions */
.tk-cards { display: grid; gap: var(--tk-space-4); }
.tk-card { position: relative; padding: var(--tk-space-5); border: 1px solid var(--tk-line); border-radius: var(--tk-radius); background: var(--tk-surface); }
.tk-card:hover { border-color: var(--tk-line-strong); }
.tk-card-headline { margin: var(--tk-space-3) 0 var(--tk-space-2); font: 600 var(--tk-step-2)/1.25 var(--tk-serif); }
.tk-card-headline a { color: inherit; text-decoration: none; }
.tk-card-headline a::after { content: ""; position: absolute; inset: 0; }
.tk-card-why { margin: 0 0 var(--tk-space-3); color: var(--tk-muted); }
.tk-card-quote { margin: 0 0 var(--tk-space-3); padding-left: var(--tk-space-3); border-left: 2px solid var(--tk-type-color, var(--tk-line-strong)); font: italic 15px/1.5 var(--tk-serif); }
.tk-card-sources { color: var(--tk-faint); font-size: 13px; }
.tk-card-note { margin: calc(-1 * var(--tk-space-2)) 0 var(--tk-space-3); color: var(--tk-accent); font-size: 14px; }
.tk-card-quote mark { background: var(--tk-highlight); color: var(--tk-ink); padding: 0 2px; border-radius: 3px; }
.tk-bullets { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--tk-line); }
.tk-bullet { position: relative; padding: 11px 26px 11px 2px; border-bottom: 1px solid var(--tk-line); font-size: 16px; line-height: 1.45; cursor: pointer; }
.tk-bullet:hover { background: color-mix(in srgb, var(--tk-surface) 70%, transparent); }
.tk-bullet::after { content: "›"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); color: var(--tk-faint); font-size: 20px; }
.tk-bullet-open { position: absolute; inset: 0; z-index: 0; }
.tk-bullet-open:focus-visible { outline: 2px solid var(--tk-focus); outline-offset: -2px; }
.tk-bullet > :not(.tk-bullet-open) { position: relative; z-index: 1; }
.tk-tag { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; vertical-align: 1px; color: var(--tk-muted); font: 500 12px/1.4 var(--tk-sans); white-space: nowrap; }
.tk-tags { display: inline; white-space: nowrap; }
.tk-type-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tk-type-color, var(--tk-muted)); }
.tk-topic { position: relative; pointer-events: auto; color: var(--tk-muted) !important; text-decoration: none; padding: 0 6px; border: 1px solid var(--tk-line); border-radius: 999px; }
.tk-topic:hover { border-color: var(--tk-line-strong); color: var(--tk-ink) !important; }
.tk-bullet .tk-badge { margin-right: 4px; vertical-align: 2px; }
.tk-bullet-text { color: var(--tk-ink); font-weight: 500; pointer-events: none; }
/* Concepts read as quiet emphasis (weight and a touch of colour), each with a 44px tap area that doesn't move the text. */
.tk-concept { position: relative; pointer-events: auto; color: var(--tk-ink) !important; font-weight: 650; text-decoration: none; }
.tk-concept:hover { text-decoration: underline; text-underline-offset: 3px; }
.tk-concept::after, .tk-topic::after { content: ""; position: absolute; left: -4px; right: -4px; top: 50%; height: 44px; transform: translateY(-50%); }
.tk-concept:focus-visible, .tk-topic:focus-visible { outline: 2px solid var(--tk-focus); outline-offset: 2px; border-radius: 3px; }
/* A value in the line (verb, amount, round): tappable for "more of this", so it reads as the text with a quiet dotted underline. */
button.tk-concept { display: inline; margin: 0; padding: 0; border: 0; background: none; font: inherit; line-height: inherit; cursor: pointer; }
.tk-value { color: inherit !important; font-weight: inherit; text-decoration: underline dotted var(--tk-ink); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.tk-value:hover { text-decoration-style: solid; }
.tk-menu { position: absolute; z-index: 60; min-width: 180px; max-width: min(300px, calc(100vw - 16px)); padding: 6px; border: 1px solid var(--tk-line-strong); border-radius: 12px;
           background: var(--tk-raised); box-shadow: 0 10px 30px rgb(0 0 0 / .18); }
.tk-menu-title { margin: 2px 8px 6px; overflow: hidden; color: var(--tk-faint); font: 500 12px/1.4 var(--tk-sans); text-overflow: ellipsis; white-space: nowrap; }
.tk-menu-item { display: block; width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--tk-ink) !important;
                font: 500 14px/1.4 var(--tk-sans); text-align: left; text-decoration: none; cursor: pointer; }
.tk-menu-item:hover, .tk-menu-item:focus-visible { background: var(--tk-surface); outline: none; }
.tk-menu-hint { display: block; color: var(--tk-faint); font-size: 12.5px; font-weight: 400; }
/* First-time hints (hints.js): an inline line under its control, never floating, no motion. */
.tk-hint { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 8px 0 10px; padding: 2px 0 2px 12px; list-style: none;
           border-left: 2px solid var(--tk-line-strong); color: var(--tk-muted); font: 400 14px/1.45 var(--tk-sans); }  /* a small inline note (0.2.1) */
.tk-hint-text { flex: 1 1 auto; }
button.tk-hint-try { padding: 0; border: 0; background: none; color: var(--tk-accent); font: inherit; text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tk-hint-ok { padding: 0; border: 0; background: none; color: var(--tk-ink); font: 500 13px/1.45 var(--tk-sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tk-grab { margin: 0 0 var(--tk-space-4); }
.tk-grab-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tk-grab-label { color: var(--tk-faint); font-size: 13px; }
.tk-grab-chip { color: var(--tk-ink); border-color: var(--tk-line-strong); background: var(--tk-raised); }
.tk-grab-x { margin-left: 6px; color: var(--tk-faint); }
.tk-grab-clear { min-height: 36px; padding: 0 6px; border: 0; background: none; color: var(--tk-ink); font: 500 13px/1 var(--tk-sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tk-grab-summary { margin: var(--tk-space-2) 0 0; color: var(--tk-muted); font-size: 14px; }
.tk-grab-summary a { color: var(--tk-accent); }
.tk-bullet-detail { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: 3px; color: var(--tk-faint); font-size: 14px; line-height: 1.45; pointer-events: none; }
.tk-locked .tk-bullet-text { color: var(--tk-muted); }
.tk-locked-line { display: flex; align-items: center; gap: 6px; }
.tk-bullet-note { display: block; margin-top: 2px; color: var(--tk-accent); font-size: 13px; pointer-events: none; }
.tk-tabs { display: flex; gap: 2px; margin: 0 0 var(--tk-space-4); border-bottom: 1px solid var(--tk-line); overflow-x: auto; scrollbar-width: none; }
.tk-tabs::-webkit-scrollbar { display: none; }
.tk-tabs-more { -webkit-mask-image: linear-gradient(to right, #000 80%, transparent); mask-image: linear-gradient(to right, #000 80%, transparent); }
.tk-tab { flex-shrink: 0; min-height: 44px; padding: 8px 12px 10px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--tk-muted); font: 500 15px/1.2 var(--tk-sans); cursor: pointer; white-space: nowrap; }
.tk-tab[aria-selected="true"] { color: var(--tk-ink); border-bottom-color: var(--tk-ink); font-weight: 600; }
.tk-tab:focus-visible { outline: 2px solid var(--tk-focus); outline-offset: -2px; }
.tk-premium { margin-top: var(--tk-space-4); padding: var(--tk-space-5); border: 1px dashed var(--tk-line-strong); border-radius: var(--tk-radius); text-align: center; }
.tk-premium h3 { margin: 0 0 var(--tk-space-2); font: 600 var(--tk-step-1)/1.25 var(--tk-serif); }
.tk-premium p { margin: 0 auto var(--tk-space-3); max-width: 46ch; color: var(--tk-muted); }
.tk-busier { margin-bottom: var(--tk-space-4); padding: 10px 14px; border: 1px solid var(--tk-line); border-radius: 10px; background: var(--tk-surface); font-size: 14px; color: var(--tk-muted); }
.tk-busier summary { cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-busier-one { margin-top: 10px; }
.tk-busier summary strong { color: var(--tk-ink); }
.tk-busier ul { margin: 4px 0 0; padding-left: 18px; }
.tk-busier li { margin: 4px 0; }
.tk-card-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--tk-space-4); }

/* evidence drawer */
.tk-drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .2s; }
.tk-drawer { position: fixed; z-index: 41; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); overflow-y: auto; padding: var(--tk-space-5);
  background: var(--tk-bg); border-left: 1px solid var(--tk-line); transform: translateX(100%); transition: transform .22s ease; }
.tk-drawer-open .tk-drawer-backdrop { opacity: 1; }
.tk-drawer-open .tk-drawer { transform: none; }
.tk-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: var(--tk-space-3); margin-bottom: var(--tk-space-3); }
.tk-drawer h2 { margin: var(--tk-space-2) 0; font: 600 var(--tk-step-2)/1.25 var(--tk-serif); }
.tk-sides { display: grid; gap: var(--tk-space-4); margin: var(--tk-space-4) 0; }
@media (min-width: 640px) { .tk-sides.tk-two { grid-template-columns: 1fr 1fr; } }
.tk-side-label { margin-bottom: var(--tk-space-2); font-weight: 600; font-size: 14px; }
.tk-point { margin: var(--tk-space-5) 0; padding-top: var(--tk-space-4); border-top: 1px solid var(--tk-line); }
.tk-point-head { margin: 0 0 4px; font: 600 var(--tk-step-1)/1.3 var(--tk-serif); }
.tk-point-meta { margin-bottom: var(--tk-space-2); color: var(--tk-faint); font-size: 13px; }
.tk-evidence { margin: 0 0 var(--tk-space-3); padding: var(--tk-space-3) var(--tk-space-4); border: 1px solid var(--tk-line); border-radius: 10px; background: var(--tk-surface); }
.tk-evidence blockquote { margin: 0 0 6px; font: 15px/1.5 var(--tk-serif); }
.tk-evidence mark { background: var(--tk-highlight); color: var(--tk-ink); padding: 0 2px; border-radius: 3px; }
.tk-evidence-meta { color: var(--tk-faint); font-size: 13px; }
.tk-asks { margin: var(--tk-space-4) 0; }
.tk-asks-label { margin-bottom: 6px; color: var(--tk-muted); font-size: 13px; }
.tk-asks-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-ask-chip { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 8px 8px 14px; border: 1px solid var(--tk-line-strong);
  border-radius: 999px; background: var(--tk-surface); color: var(--tk-ink); cursor: pointer; text-align: left; font-size: 14px; }
.tk-ask-chip:hover { border-color: var(--tk-accent); }
.tk-ask-tag { flex-shrink: 0; padding: 3px 9px; border-radius: 999px; background: var(--tk-accent); color: var(--tk-on-accent); font-size: 12px; font-weight: 600; }
.tk-how { margin-top: var(--tk-space-5); color: var(--tk-muted); font-size: 14px; }
.tk-how summary { cursor: pointer; color: var(--tk-muted); }

/* states and toast */
.tk-state { padding: var(--tk-space-6) var(--tk-space-4); border: 1px dashed var(--tk-line); border-radius: var(--tk-radius); text-align: center; color: var(--tk-muted); }
.tk-state strong { display: block; margin-bottom: 6px; color: var(--tk-ink); font: 600 var(--tk-step-1)/1.3 var(--tk-serif); }
.tk-skeleton { height: 168px; border-radius: var(--tk-radius); background: linear-gradient(90deg, var(--tk-surface), var(--tk-raised), var(--tk-surface)); background-size: 200% 100%; animation: tk-shimmer 1.4s infinite; }
@keyframes tk-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.tk-toast { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translate(-50%, 20px); padding: 9px 14px; border: 1px solid var(--tk-line-strong);
  border-radius: 10px; background: var(--tk-raised); color: var(--tk-ink); font-size: 14px; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.tk-toast.tk-shown { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  .tk-shell { flex-wrap: wrap; }
  .tk-ask { order: 5; flex-basis: 100%; max-width: none; }
  .tk-wide-only { display: none !important; }  /* header extras that cards already offer */
  .tk-mark span { display: none; }  /* the product name sits in the nav on phones */
  .tk-shell { gap: var(--tk-space-2); }
  .tk-nav a { padding: 6px 8px; }
  .tk-page { padding-top: var(--tk-space-5); }
  .tk-title { font-size: 25px; }
  .tk-card { padding: var(--tk-space-4); }
  .tk-card-headline { font-size: 19px; }
}

/* dialog and form (join) */
.tk-dialog { position: fixed; z-index: 41; left: 50%; top: 50%; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow-y: auto;
  transform: translate(-50%, -50%); padding: var(--tk-space-5); border: 1px solid var(--tk-line-strong); border-radius: var(--tk-radius); background: var(--tk-bg); }
.tk-dialog h2 { margin: var(--tk-space-2) 0; font: 600 var(--tk-step-2)/1.25 var(--tk-serif); }
.tk-form { display: grid; gap: var(--tk-space-4); margin-top: var(--tk-space-4); }
.tk-field { display: grid; gap: 6px; color: var(--tk-muted); font-size: 13px; }
.tk-input { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--tk-line-strong); border-radius: 10px; background: var(--tk-surface); color: var(--tk-ink); font-size: 15px; }
.tk-input:focus { outline: 2px solid var(--tk-focus); outline-offset: 1px; }
.tk-form-status { min-height: 1.2em; margin: 0; color: var(--tk-muted); font-size: 14px; }
.tk-form .tk-primary { justify-self: start; }
.tk-me { max-width: 160px; overflow: hidden; color: var(--tk-muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.tk-account { position: relative; display: inline-flex; }
.tk-account-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 60; display: flex; flex-direction: column; gap: 8px; min-width: 220px;
                   max-width: min(320px, calc(100vw - 24px)); padding: 12px; border: 1px solid var(--tk-line-strong); border-radius: 12px; background: var(--tk-raised);
                   box-shadow: 0 10px 30px rgb(0 0 0 / .18); }
.tk-account-menu[hidden] { display: none; }
.tk-account-who { color: var(--tk-muted); font-size: 13px; overflow-wrap: anywhere; }
.tk-onlist { margin: 0 0 var(--tk-space-4); padding: 10px 14px; border: 1px solid var(--tk-line-strong); border-radius: 10px; background: var(--tk-raised);
             color: var(--tk-muted); font-size: 14px; overflow-wrap: anywhere; }
.tk-onlist button { margin-left: 2px; padding: 0; border: 0; background: none; color: var(--tk-accent); font: inherit; text-decoration: underline; cursor: pointer; }
.tk-icon { min-width: 36px; padding: 7px; justify-content: center; }
.tk-card-actions { flex-wrap: nowrap; }
.tk-card-actions > * { flex-shrink: 0; }
.tk-answers { display: grid; gap: var(--tk-space-4); margin-bottom: var(--tk-space-5); }
.tk-asked { margin: 0 0 6px; color: var(--tk-muted); font-size: 14px; }
.tk-asked strong { color: var(--tk-ink); font-weight: 600; }
.tk-followup { display: flex; gap: 8px; margin-top: var(--tk-space-3); }
.tk-followup .tk-input { flex: 1; min-width: 0; }
.tk-card-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tk-card-labels { display: inline-flex; align-items: center; gap: 8px; }
.tk-badge { padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--tk-accent) 22%, transparent); color: var(--tk-accent); font: 600 11px/1.6 var(--tk-sans); letter-spacing: .02em; }
.tk-follow { flex-shrink: 0; max-width: 55%; overflow: hidden; padding: 4px 10px; border: 1px solid var(--tk-line); border-radius: 999px; background: transparent; color: var(--tk-muted); cursor: pointer; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tk-follow:hover { border-color: var(--tk-line-strong); color: var(--tk-ink); }
.tk-follow[aria-pressed="true"] { border-color: var(--tk-accent); color: var(--tk-accent); }
.tk-follows { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--tk-space-3) 0; }
.tk-changes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: var(--tk-space-4); padding: 10px 14px; border: 1px solid var(--tk-line); border-radius: 10px; background: var(--tk-surface); font-size: 14px; }
.tk-changes strong { color: var(--tk-ink); }
.tk-answers:empty { display: none; }
.tk-turnstile { min-height: 65px; }

/* Touch screens: every control is at least 44px tall. */
@media (pointer: coarse) {
  .tk-button, .tk-chip, .tk-follow, .tk-ask-chip, .tk-tab, .tk-daystep button, .tk-menu-item, .tk-grab-clear, .tk-hint-ok { min-height: 44px; }
  .tk-daystep button { min-width: 44px; }
}
