/* Kept web — additions over the shared renderer styles.
 * The desktop stylesheet stays a pristine copy; everything web-specific
 * (connect screen, read-only banner, touch layout) lives here. */

/* No mac traffic lights on the web: reclaim the left inset. */
#topbar { padding-left: 16px; }
.drag-region { display: none; }
/* "All" starts where the page starts — no brand dot, no offset. */
.tabs { margin-left: 0; }

/* ---------- read-only banner ---------- */

#kept-banner {
  position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%);
  z-index: 60; display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 7px 8px 7px 16px; box-shadow: var(--shadow);
  font-size: var(--fs-meta); color: var(--muted); white-space: nowrap;
}
#kept-banner button {
  font: inherit; font-size: var(--fs-meta); color: var(--text);
  background: var(--field); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 12px; cursor: pointer;
}
#kept-banner button:hover { background: var(--field-hover); }

/* The drawer already offers Update/Edit for the selected card — the hover
 * chrome on the card itself only covers its own title. */
.card.drawer-selected .card-actions { display: none !important; }

/* Demo and local fixtures stay look-only; a connected board is read-write. */
body.kept-readonly .card-actions, body.kept-readonly .add-card, body.kept-readonly .col-foot { display: none !important; }

/* ---------- connect screen ---------- */

#kept-setup {
  position: fixed; inset: 0; z-index: 100; display: flex;
  align-items: center; justify-content: center; background: var(--bg); padding: 20px;
}
.ks-card {
  width: min(430px, 100%); background: var(--panel);
  border: 1px solid var(--line-strong); border-radius: 16px;
  padding: 30px 32px; box-shadow: var(--shadow);
}
.ks-card h1 { margin: 0 0 10px; font-size: 24px; letter-spacing: -0.02em; }
.ks-card p { margin: 0 0 20px; color: var(--muted); font-size: var(--fs-body); line-height: 1.55; }
.ks-card label {
  display: block; font-size: var(--fs-meta); color: var(--muted);
  font-weight: 600; margin-bottom: 12px;
}
.ks-card label span { font-weight: 400; color: var(--faint); }
.ks-card input {
  display: block; width: 100%; margin-top: 5px;
  font: inherit; font-size: var(--fs-body); color: var(--text);
  background: var(--field); border: 1px solid var(--input, var(--line-strong));
  border-radius: 8px; padding: 9px 11px; outline: none;
}
.ks-card input:focus { border-color: var(--brand); }
.ks-card button {
  margin-top: 8px; width: 100%;
  font: inherit; font-size: var(--fs-title); font-weight: 650;
  background: var(--brand); color: var(--brand-ink, #1a1400);
  border: none; border-radius: 999px; padding: 11px 0; cursor: pointer;
}
.ks-err { color: var(--danger); min-height: 1.4em; margin-top: 10px !important; }

/* ---------- touch layout ---------- */

@media (max-width: 760px) {
  #topbar { height: auto; flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .tools { flex: 1 1 100%; }
  #filter { flex: 1; width: auto; }
  .subtitle { display: none; }
  .column { min-width: 84vw; }
  .card-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
    width: min(440px, 94vw);
  }
  /* The banner carries the demo's only CTA — it must wrap, never clip. */
  #kept-banner {
    bottom: 10px; max-width: 94vw; white-space: normal; text-align: center;
    flex-wrap: wrap; justify-content: center; border-radius: 18px; padding: 8px 12px;
  }
}

/* ---------- connect v2 ---------- */

.ks-primary {
  display: block; width: 100%; text-align: center; text-decoration: none;
  font: inherit; font-size: var(--fs-title); font-weight: 650;
  background: var(--brand); color: #1a1400;
  border: none; border-radius: 999px; padding: 12px 0; cursor: pointer;
  margin-top: 6px;
}
.ks-primary:hover { filter: brightness(1.05); }
.ks-fine { font-size: var(--fs-meta) !important; color: var(--faint) !important; margin-top: 14px !important; }
.ks-card select {
  display: block; width: 100%; margin-top: 5px; margin-bottom: 4px;
  font: inherit; font-size: var(--fs-body); color: var(--text);
  background: var(--field); border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 9px 11px; outline: none;
}
.ks-card select:focus { border-color: var(--brand); }

.ks-secondary {
  display: block; width: 100%; text-align: center;
  font: inherit; font-size: var(--fs-meta); font-weight: 600;
  color: var(--muted); background: none; border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 0; cursor: pointer; text-decoration: none;
  margin-top: 10px;
}
.ks-secondary:hover { color: var(--text); border-color: var(--line-strong); }
.ks-help { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 14px; }
.ks-help a[href^="https://github.com/settings"] { color: var(--brand-on-surface, var(--brand)); }
#kept-banner a { color: var(--text); }

.ks-tag { font-size: var(--fs-headline) !important; color: var(--text) !important; font-weight: 650; letter-spacing: -0.01em; margin: -6px 0 12px !important; }

.tab-plus { font-size: var(--fs-title); color: var(--faint); padding: 0 9px; }
.tab-plus:hover { color: var(--text); background: var(--field-hover); }
.tab-plus-input {
  width: 110px; height: 26px; font: inherit; font-size: var(--fs-body);
  color: var(--text); background: var(--field); border: 1px solid var(--brand);
  border-radius: 7px; padding: 0 9px; outline: none; margin: 0 2px;
}
.tab[draggable="true"] { cursor: grab; }

/* ---------- hand to agent ---------- */

.cd-agent {
  border: 1px solid var(--line-strong); background: var(--field);
  border-radius: 12px; padding: 12px 14px; margin: 0 0 14px;
}
.cd-agent p { margin: 6px 0 0; color: var(--muted); font-size: var(--fs-body); line-height: 1.5; }
.cd-agent-chip {
  display: inline-block; font-size: var(--fs-meta); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--text);
}
.cd-agent-handed { border-color: var(--brand); }
.cd-agent textarea { margin-top: 10px; min-height: 60px; }
.cd-phrase { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.cd-phrase b { font-size: 19px; letter-spacing: -0.01em; }
.cd-phrase button {
  font: inherit; font-size: var(--fs-meta); font-weight: 600; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 12px; cursor: pointer;
}
.cd-phrase button:hover { border-color: var(--line-strong); }
.cd-reply { margin-top: 14px; }
.cd-reply textarea { min-height: 56px; }
.cd-reply-row { display: flex; gap: 8px; margin-top: 8px; }

/* In-drawer card editor: full width, the pane stays open while you type. */
.cd-editform { margin: 2px 0 10px; }
.cd-editform .card-editor { width: 100%; box-sizing: border-box; }

/* The drawer is the READING surface — notes show in full there, always.
 * The 3-line clamp is for cards on the board, where space is shared. */
.cd-notes .note-text {
  display: block; -webkit-line-clamp: unset; max-height: none; overflow: visible;
}

/* ---------- who am I (profile menu identity) ---------- */

.pm-identity {
  display: block; padding: 10px 14px 9px; cursor: pointer;
  border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.pm-identity b { display: block; font-size: var(--fs-body); letter-spacing: -0.01em; }
.pm-identity span { display: block; margin-top: 2px; color: var(--muted); font-size: var(--fs-meta); }
.pm-identity:hover span { color: var(--text); }

/* Failure text on the empty screen: readable, supportable, never a black void. */
.empty-fine { display: block; margin-top: 10px; color: var(--faint); font-size: var(--fs-meta); }
#empty-msg code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9em; }

.ks-step2 { background: var(--field) !important; color: var(--text) !important; border: 1px solid var(--line-strong) !important; margin-top: 10px !important; }
.ks-step2:hover { background: var(--field-hover) !important; filter: none !important; }

/* ══════════════════════════════════════════════════════════════════════════
   LANDING — the Kept modernist identity (adopted 2026-08-02).
   Blue #8FA5F2 + ink #1a1400 on paper #f3f2f2. Archivo 400/800, radius 0,
   2px rules, hard offset shadows. Light-only by design. Scoped to the
   landing overlay; the app migrates to this identity later.
   ══════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/archivo-var-latin.woff2') format('woff2');
}

@keyframes keptTicker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes keptBar { 0% { left: -38%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

#kept-landing {
  position: fixed; inset: 0; z-index: 90; overflow-y: auto; overflow-x: hidden;
  --mg: #f3f2f2; --mi: #1a1400; --mb: #8FA5F2; --mcard: #f8f7f6;
  --mdiv: color-mix(in srgb, #1a1400 40%, transparent);
  --mgut: clamp(20px, 5vw, 72px);
  background: var(--mg); color: var(--mi);
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 17px; line-height: 28px; font-weight: 400;
  overflow-x: hidden;
}
#kept-landing .m-wrap { margin: 0 auto; padding-left: var(--mgut); padding-right: var(--mgut); }
#kept-landing section { padding-top: clamp(48px, 7vw, 92px); padding-bottom: clamp(48px, 7vw, 92px); }
#kept-landing a { color: var(--mi); text-decoration-color: var(--mb); text-decoration-thickness: 2px; text-underline-offset: 3px; }
#kept-landing ::selection { background: var(--mb); color: var(--mi); }
#kept-landing :focus-visible { outline: 2px solid var(--mi); outline-offset: 2px; }

/* — kicker — */
.m-kicker {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; line-height: 14px; letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 800; color: color-mix(in srgb, #1a1400 62%, transparent); margin: 0 0 18px;
}
.m-kicker i { width: 9px; height: 9px; background: var(--mb); border: 2px solid var(--mi); flex: none; }

/* — headings — */
.m-h1 {
  font-size: clamp(40px, 7.1vw, 100px); line-height: 1.03; letter-spacing: -0.035em;
  font-weight: 800; margin: 0 0 26px -0.058em;
}
.m-h1 span, .m-h2 span, .m-bandh2 span { display: block; }
.m-h2 {
  font-size: clamp(30px, 4.4vw, 58px); line-height: 1.06; letter-spacing: -0.028em;
  font-weight: 800; margin: 0 0 28px -0.05em;
}

/* — buttons — */
.m-cta, .m-cta2 {
  display: inline-flex; align-items: center; height: 52px; padding: 0 22px;
  font-family: inherit; font-size: 16px; font-weight: 800; text-decoration: none;
  border: 2px solid var(--mi); color: var(--mi); cursor: pointer; white-space: nowrap;
}
.m-cta { background: var(--mb); box-shadow: 6px 6px 0 var(--mi); }
#kept-landing .m-cta:hover { box-shadow: 2px 2px 0 var(--mi); transform: translate(4px, 4px); color: var(--mi); }
#kept-landing .m-cta:active { box-shadow: 0 0 0 var(--mi); transform: translate(6px, 6px); }
.m-cta2 { background: transparent; }
#kept-landing .m-cta2:hover { background: var(--mi); color: var(--mg); }
.m-ctas { display: flex; flex-wrap: wrap; gap: 16px; margin: 26px 0 0; }

/* — nav — */
.m-nav { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(16px, 3vw, 34px); padding: 18px var(--mgut); }
.m-logo { display: flex; align-items: center; gap: 11px; text-decoration: none !important; margin-right: auto; }
/* The wordmark's box is trimmed to exactly cap-and-baseline, so centering
 * the 17px bars against it aligns top-bar-to-cap and bottom-bar-to-baseline
 * by geometry, with no font-metric guesswork. */
.m-logomark { display: block; height: 22px; width: auto; color: var(--mi); }
.m-navlink { font-size: 14px; font-weight: 800; text-decoration: none !important; }
.m-navcta {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px;
  background: var(--mb); border: 2px solid var(--mi); color: var(--mi);
  font-size: 14px; font-weight: 800; text-decoration: none !important;
  box-shadow: 4px 4px 0 var(--mi);
}
.m-navcta:hover { box-shadow: 1px 1px 0 var(--mi); transform: translate(3px, 3px); }

/* — hero — */
.m-hero { padding-top: clamp(48px, 8vw, 104px) !important; }
.m-sub { font-size: 17px; line-height: 28px; margin: 0; }
.m-fine { font-size: 14px; line-height: 24px; color: color-mix(in srgb, #1a1400 68%, transparent); margin: 18px 0 0; max-width: 46ch; }

/* — ticker — */
.m-ticker { display: flex; align-items: stretch; background: var(--mi); color: var(--mg); }
.m-ticklabel {
  flex: 0 1 auto; display: flex; align-items: center; padding: 16px clamp(20px, 5vw, 34px);
  background: var(--mb); color: var(--mi); font-weight: 800; border-right: 2px solid var(--mi);
  font-size: clamp(15px, 1.5vw, 18px); letter-spacing: -0.015em;
}
.m-ticktrack { flex: 1 1 300px; min-width: 0; overflow: hidden; display: flex; align-items: center; }
.m-tickrow { display: flex; gap: 24px; align-items: center; white-space: nowrap; animation: keptTicker 52s linear infinite; padding-left: 24px; height: 60px; }
.m-ticktrack:hover .m-tickrow { animation-play-state: paused; }
.m-tickrow span { font-size: clamp(15px, 1.5vw, 18px); font-weight: 800; letter-spacing: -0.015em; color: color-mix(in srgb, #f3f2f2 72%, transparent); display: flex; align-items: center; gap: 24px; }
.m-tickrow span::after { content: ''; width: 8px; height: 8px; background: var(--mb); flex: none; }

/* — the loop — */
.m-loopgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: clamp(36px, 5vw, 72px); align-items: start; }
.m-step {
  display: grid; grid-template-columns: 44px 1fr; gap: 4px 12px; width: 100%;
  padding: 20px 16px; text-align: left; font-family: inherit; color: var(--mi);
  background: transparent; border: 0; border-bottom: 2px solid var(--mdiv); cursor: pointer;
  transition: background 220ms ease;
}
.m-step:last-of-type { border-bottom-color: var(--mi); }
.m-step i { grid-row: 1 / 3; font-style: normal; font-size: 21px; font-weight: 800; color: color-mix(in srgb, #1a1400 45%, transparent); }
.m-step b { font-size: 21px; line-height: 26px; letter-spacing: -0.015em; font-weight: 800; }
.m-step p { margin: 0; font-size: 15.5px; line-height: 26px; color: color-mix(in srgb, #1a1400 74%, transparent); }
#kept-landing[data-step="1"] .m-step[data-n="1"], #kept-landing[data-step="2"] .m-step[data-n="2"], #kept-landing[data-step="3"] .m-step[data-n="3"], #kept-landing[data-step="4"] .m-step[data-n="3"] { background: var(--mb); }
#kept-landing[data-step="1"] .m-step[data-n="1"] i, #kept-landing[data-step="2"] .m-step[data-n="2"] i, #kept-landing[data-step="3"] .m-step[data-n="3"] i, #kept-landing[data-step="4"] .m-step[data-n="3"] i,
#kept-landing[data-step="1"] .m-step[data-n="1"] p, #kept-landing[data-step="2"] .m-step[data-n="2"] p, #kept-landing[data-step="3"] .m-step[data-n="3"] p, #kept-landing[data-step="4"] .m-step[data-n="3"] p { color: var(--mi); }
.m-stepcap { margin: 14px 0 0; font-size: 13px; line-height: 20px; color: color-mix(in srgb, #1a1400 60%, transparent); }

/* — demo card — */
.m-democard { border: 2px solid var(--mi); background: var(--mcard); box-shadow: 10px 10px 0 rgba(143, 165, 242, 0.25); min-height: 372px; align-self: start; }
.m-dchead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 18px; border-bottom: 2px solid var(--mi); }
.m-dchead b { font-size: 19px; line-height: 26px; letter-spacing: -0.015em; font-weight: 800; }
.m-dchead s { text-decoration: none; font-size: 11px; font-weight: 800; letter-spacing: 0.09em; color: color-mix(in srgb, #1a1400 58%, transparent); }
.m-dcbody { padding: 18px; display: grid; gap: 14px; align-content: start; }
.m-state { display: none; grid-template-columns: 1fr; gap: 14px; align-content: start; }
#kept-landing[data-step="0"] .m-state[data-n="0"], #kept-landing[data-step="1"] .m-state[data-n="1"],
#kept-landing[data-step="2"] .m-state[data-n="2"], #kept-landing[data-step="3"] .m-state[data-n="3"],
#kept-landing[data-step="4"] .m-state[data-n="4"] { display: grid; }
.m-chip {
  justify-self: start; display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase;
  border: 2px solid var(--mi); background: var(--mb); color: var(--mi);
}
.m-chip.idle { background: transparent; border-color: var(--mdiv); color: color-mix(in srgb, #1a1400 62%, transparent); }
.m-chip.done { background: var(--mi); color: var(--mb); border-color: var(--mi); }
.m-state p { margin: 0; font-size: 15.5px; line-height: 26px; }
.m-handbtn {
  justify-self: start; display: inline-flex; align-items: center; height: 44px; padding: 0 18px;
  font-family: inherit; font-size: 15px; font-weight: 800; color: var(--mi);
  background: var(--mb); border: 2px solid var(--mi); box-shadow: 4px 4px 0 var(--mi); cursor: pointer;
}
.m-handbtn:hover { box-shadow: 1px 1px 0 var(--mi); transform: translate(3px, 3px); }
.m-note { border-left: 4px solid var(--mi); padding-left: 14px; }
.m-note s { display: block; text-decoration: none; font-size: 11px; font-weight: 800; letter-spacing: 0.09em; color: color-mix(in srgb, #1a1400 58%, transparent); margin-bottom: 4px; }
.m-track { position: relative; height: 8px; border: 2px solid var(--mi); overflow: hidden; }
.m-track i { position: absolute; top: 0; bottom: 0; width: 38%; background: var(--mb); animation: keptBar 1.9s linear infinite; }
.m-payoff { background: var(--mb); border: 2px solid var(--mi); padding: 12px 14px; font-size: 16px; font-weight: 800; line-height: 24px; }
.m-replyrow { display: flex; align-items: center; gap: 10px; border: 2px solid var(--mdiv); padding: 10px 12px; }
.m-replyrow span { flex: 1; font-size: 14px; color: color-mix(in srgb, #1a1400 52%, transparent); }
.m-replyrow b { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border: 2px solid var(--mi); font-size: 13px; font-weight: 800; }

/* — the blue band — */
.m-band { background: var(--mb); }
.m-band .m-kicker { color: var(--mi); }
.m-band .m-kicker i { background: var(--mi); border-color: var(--mi); }
.m-bandh2 { font-size: clamp(28px, 3.9vw, 50px); line-height: 1.08; letter-spacing: -0.028em; font-weight: 800; margin: 0 0 30px -0.05em; }
.m-goword { font-size: clamp(64px, 18.6vw, 244px); line-height: 0.92; letter-spacing: -0.055em; font-weight: 800; margin: 24px 0 24px -0.062em; }
.m-rule { height: 2px; background: var(--mi); border: 0; margin: 0; }
.m-bandgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(24px, 4vw, 64px); margin-top: 30px; }
.m-bandgrid p { margin: 0; font-size: 17px; line-height: 28px; }

/* — seam grids (setup, triangle) — */
.m-seams { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 2px; background: var(--mi); border: 2px solid var(--mi); box-shadow: 10px 10px 0 rgba(143, 165, 242, 0.25); }
.m-seams > div { background: var(--mg); padding: clamp(20px, 3vw, 32px); }
.m-seams i { display: block; font-style: normal; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; color: color-mix(in srgb, #1a1400 60%, transparent); margin-bottom: 12px; }
.m-seams b { display: block; font-size: 24px; line-height: 30px; letter-spacing: -0.02em; font-weight: 800; margin-bottom: 10px; }
.m-seams p { margin: 0; font-size: 15.5px; line-height: 26px; color: color-mix(in srgb, #1a1400 78%, transparent); }
.m-seams > div.ink { background: var(--mi); }
.m-seams > div.ink i, .m-seams > div.ink b { color: var(--mb); }
.m-seams > div.ink p { color: color-mix(in srgb, #f3f2f2 82%, transparent); }
.m-trisq { display: block; width: 16px; height: 16px; background: var(--mb); border: 2px solid var(--mi); margin-bottom: 14px; }
.m-closing { font-size: clamp(22px, 2.7vw, 34px); line-height: 1.25; font-weight: 800; letter-spacing: -0.02em; max-width: 26ch; margin: 36px 0 0; }

/* — data diagram — */
.m-diagram { border: 2px solid var(--mi); background: var(--mcard); padding: clamp(20px, 3vw, 36px); margin-bottom: clamp(28px, 4vw, 48px); }
.m-diarow { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.m-diabox { flex: 1 1 220px; border: 2px solid var(--mi); background: var(--mg); padding: 14px 16px; font-size: 16px; font-weight: 800; }
.m-diabox.blue { background: var(--mb); }
.m-dialine { flex: 1 1 60px; min-width: 48px; height: 2px; background: var(--mi); }
.m-diacap { margin: 10px 0 0; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, #1a1400 58%, transparent); }
.m-diarow2 { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 18px; padding-top: 18px; border-top: 2px solid var(--mdiv); }
.m-diabox.dead { border: 2px dashed color-mix(in srgb, #1a1400 45%, transparent); color: color-mix(in srgb, #1a1400 50%, transparent); text-decoration: line-through; text-decoration-thickness: 2px; background: transparent; }
.m-diarow2 p { margin: 0; flex: 1 1 240px; font-size: 15.5px; line-height: 26px; color: color-mix(in srgb, #1a1400 78%, transparent); }
.m-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: clamp(24px, 3vw, 48px); }
.m-points b { display: block; font-size: 21px; line-height: 28px; letter-spacing: -0.02em; font-weight: 800; margin-bottom: 8px; }
.m-points p { margin: 0; font-size: 15.5px; line-height: 26px; color: color-mix(in srgb, #1a1400 78%, transparent); }

/* — manifesto — */
.m-refusal { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 8px 40px; align-items: start; padding: 26px 0; border-bottom: 2px solid var(--mdiv); }
.m-refusal:last-of-type { border-bottom-color: var(--mi); }
.m-refusal b { font-size: clamp(34px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; text-decoration: line-through; text-decoration-thickness: 4px; text-decoration-color: var(--mb); }
.m-refusal p { margin: 0; font-size: 16.5px; line-height: 28px; color: color-mix(in srgb, #1a1400 80%, transparent); max-width: 42ch; }

/* — close — */
.m-close { background: var(--mi); color: var(--mg); padding-top: clamp(56px, 8vw, 108px) !important; padding-bottom: clamp(56px, 8vw, 108px) !important; }
.m-close .m-h2 { font-size: clamp(34px, 5.6vw, 76px); line-height: 1.04; letter-spacing: -0.035em; margin-left: -0.058em; }
.m-close .m-h2 em { font-style: normal; color: var(--mb); }
#kept-landing .m-close .m-cta { border-color: var(--mb); color: var(--mi); }
#kept-landing .m-close .m-cta:hover { background: var(--mg); border-color: var(--mg); box-shadow: 2px 2px 0 var(--mb); }
#kept-landing .m-close .m-cta2 { border-color: var(--mg); color: var(--mg); }
#kept-landing .m-close .m-cta2:hover { background: var(--mg); color: var(--mi); }
.m-close .m-fine { color: color-mix(in srgb, #f3f2f2 72%, transparent); }

/* — footer — */
.m-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 26px; padding: 22px var(--mgut); font-size: 13px; color: color-mix(in srgb, #1a1400 66%, transparent); }
.m-foot .m-logo { margin-right: auto; }
.m-foot .m-logomark { height: 17px; }


/* ══════════════════════════════════════════════════════════════════════════
   APP REBRAND — the modernist identity reaches the app (2026-08-02).
   Token remap wins over styles.css by load order: light-only paper ground,
   blue for action, ink for structure, Archivo, radius zero. The desktop
   stylesheet stays untouched; this layer is the divergence.
   ══════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #f3f2f2;
  --panel: #eae9e9;
  --card: #f8f7f6;
  --card-hover: #ffffff;
  --line: color-mix(in srgb, #1a1400 22%, transparent);
  --line-strong: #1a1400;
  --field: #ffffff;
  --field-hover: #eae9e9;
  --text: #1a1400;
  --muted: color-mix(in srgb, #1a1400 64%, transparent);
  --faint: color-mix(in srgb, #1a1400 46%, transparent);
  --brand: #8FA5F2;
  --brand-ink: #1a1400;
  /* Blue as TEXT needs its dark sibling on paper, same rule the yellow had. */
  --brand-on-surface: #44549c;
  --accent: #1a1400;
  --accent-ink: #f3f2f2;
  --secondary: #eae9e9;
  --radius: 0px;
  --shadow: 4px 4px 0 rgba(26, 20, 0, 0.07);
  --chip-ink-mix: 46%;
  --input: color-mix(in srgb, #1a1400 40%, transparent);
}

body { font-family: 'Archivo', -apple-system, system-ui, sans-serif; }
* { border-radius: 0 !important; }

/* Silo colours ride the top tabs, same muted mix as the tag chips. */
.tab.tinted .tab-label { color: color-mix(in oklab, var(--chip) var(--chip-ink-mix), var(--text)); }
.tab.tinted:hover .tab-label { color: var(--chip); }

/* Structure is ink, not gray. */
#topbar { border-bottom: 1px solid var(--line); height: 46px; }

/* Columns are tone, not line: gray panels with no hairline (JVM 08-03,
 * "it feels a little dense"). Drag feedback moves to an outline. */
.column { border: none; }
.column.drop-target { outline: 2px solid var(--brand); outline-offset: -2px; border: none; }
/* Cards: white, no keylines, the silo arrives as the coloured left edge
 * (JVM 08-03, "smooth things out"). Border-colour states become outlines. */
.card {
  background: #ffffff;
  border: none;
  border-left: 4px solid var(--card-silo, color-mix(in srgb, #1a1400 18%, transparent));
}
.card:hover { background: color-mix(in srgb, #1a1400 3%, #ffffff); }
.card.has-unread, .card.composing { outline: 2px solid var(--brand); outline-offset: -2px; }
.card.drawer-selected { outline: 2px solid var(--line-strong); outline-offset: -2px; box-shadow: var(--shadow); }
.card-drawer { border-left: 2px solid var(--line-strong); }
#kept-banner { border: 2px solid var(--line-strong); background: var(--card); box-shadow: 4px 4px 0 rgba(26, 20, 0, 0.18); }
#kept-banner button { border: 2px solid var(--line-strong); background: var(--card); }
#kept-banner button:hover { background: var(--mb, #8FA5F2); }

/* Drawer actions (base styles lost in the landing-CSS cut — modernist now). */
.cd-actions { display: flex; gap: 8px; margin: 2px 0 12px; flex-wrap: wrap; }
.cd-actions button {
  font: inherit; font-size: var(--fs-meta); font-weight: 700; color: var(--text);
  background: var(--card); border: 2px solid var(--line-strong);
  padding: 5px 14px; cursor: pointer;
}
.cd-actions button:hover { background: var(--field-hover); }

/* The one loud button in the drawer earns the landing's hard shadow. */
.cd-actions .cd-hand { background: var(--brand); border: 2px solid var(--line-strong); box-shadow: 3px 3px 0 var(--line-strong); }
.cd-actions .cd-hand:hover { box-shadow: 1px 1px 0 var(--line-strong); transform: translate(2px, 2px); background: var(--brand); }
.composer-save { border: 2px solid var(--line-strong) !important; }

/* Agent-state chips follow the landing's grammar: blue while moving,
 * ink-on-blue-text when the report is in. */
.cd-agent { border: 2px solid var(--line-strong); background: var(--card); }
.cd-agent-handed { border-color: var(--line-strong); }
.cd-agent-handed .cd-agent-chip { background: var(--brand); padding: 2px 8px; }
.cd-agent-reported .cd-agent-chip { background: var(--line-strong); color: var(--brand); padding: 2px 8px; }

/* Yellow's last three holdouts in the task layer turn blue. */
.task-owner-jimmy::before,
.task-state-inprogress::before,
.task-status-inprogress::before { background: #8FA5F2 !important; }

/* ---------- mobile, properly ---------- */

@media (max-width: 760px) {
  /* iOS zooms any focused input under 16px — the known Safari trap. */
  input, textarea, select { font-size: 16px !important; }

  /* Tabs and tag sub-bar scroll sideways instead of wrapping into a wall. */
  #tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  #tabs::-webkit-scrollbar { display: none; }
  #subbar { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; white-space: nowrap; }
  #subbar::-webkit-scrollbar { display: none; }

  /* One column at a time, snapped — a board you thumb through. */
  #board { scroll-snap-type: x proximity; }
  .column { min-width: 88vw; scroll-snap-align: start; }

  /* The drawer is the reading surface: full width on a phone. */
  .card-drawer { width: 100vw; border-left: none; }
}

/* ---------- structured card editor ---------- */

.cd-editlabel {
  font-size: var(--fs-micro); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); margin: 12px 0 6px;
}
.cd-edittitle { font-weight: 700; }
.cd-editchips { display: flex; flex-wrap: wrap; gap: 6px; }
.cd-editchip {
  font: inherit; font-size: var(--fs-meta); font-weight: 700; cursor: pointer;
  padding: 4px 12px; background: var(--card); color: var(--muted);
  border: 2px solid var(--line);
}
.cd-editchip:hover { border-color: var(--line-strong); color: var(--text); }
.cd-editchip.on {
  background: var(--brand); color: var(--brand-ink); border-color: var(--line-strong);
}
.cd-editdate { margin-top: 12px; }
.cd-editdate label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-meta); font-weight: 700; color: var(--muted);
}
.cd-rawlink {
  margin-left: auto; font: inherit; font-size: var(--fs-meta); color: var(--faint);
  background: none; border: none; cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px;
}
.cd-rawlink:hover { color: var(--text); }
.cd-editform .composer-input { width: 100%; box-sizing: border-box; }

/* Structured editor, round 2: full-width growing title, toolbar, preview. */
.cd-edittitle { resize: none; overflow: hidden; line-height: 1.45; }
.cd-edittools { display: flex; gap: 6px; margin: 0 0 6px; }
.cd-edittools button {
  font: inherit; font-size: var(--fs-meta); font-weight: 700; cursor: pointer;
  min-width: 34px; padding: 3px 10px; background: var(--card); color: var(--text);
  border: 2px solid var(--line);
}
.cd-edittools button:hover { border-color: var(--line-strong); }
.cd-editpreview {
  margin-top: 8px; padding: 10px 12px; border-left: 2px solid var(--line-strong);
  background: var(--card);
}
.cd-editpreview p { margin: 0 0 6px; font-size: var(--fs-body); line-height: 1.5; color: var(--muted); }
.cd-editpreview p:last-child { margin-bottom: 0; }
.cd-editpreview a { color: var(--brand-on-surface); }

/* Constrained WYSIWYG body + the link panel. */
.cd-editbody {
  min-height: 90px; max-height: 40vh; overflow-y: auto; cursor: text;
  font-size: var(--fs-body); line-height: 1.55; padding: 9px 11px;
}
.cd-editbody:focus { outline: none; border-color: var(--brand); }
.cd-editbody a { color: var(--brand-on-surface); text-decoration: underline; text-underline-offset: 2px; }
.cd-editbody code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.92em; background: var(--panel); padding: 0 3px; }
/* URL on its own line, buttons left beneath — never squeezed side by side. */
.cd-linkrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; justify-content: flex-start; }
.cd-linkrow.hidden { display: none; }
.cd-linkrow input { flex: 1 1 100%; min-width: 0; box-sizing: border-box; }
.cd-linkrow button { white-space: nowrap; }

/* The text being linked stays visibly selected while the URL panel is open. */
.cd-linkmark { background: var(--brand); color: var(--brand-ink); }
/* And the URL box is a one-line field, same height as its buttons. */
.cd-linkrow input.composer-input {
  min-height: 0; height: 30px; padding: 0 10px;
  font-size: var(--fs-meta); line-height: 28px;
}

/* Heartbeat, permalink, staleness. */
.kept-at { font-size: var(--fs-meta); color: var(--muted); white-space: nowrap; }
.kept-at.stale { color: var(--danger); font-weight: 700; }
.kept-at.hidden { display: none; }
.cd-copylink {
  margin-left: auto; margin-right: 8px; font: inherit; font-size: var(--fs-meta);
  font-weight: 700; color: var(--muted); background: var(--card);
  border: 2px solid var(--line); padding: 3px 10px; cursor: pointer;
}
.cd-copylink:hover { border-color: var(--line-strong); color: var(--text); }


/* — the phase frame: real product, cycling — */
.m-sub { max-width: 54ch; }
.m-phasecap {
  display: flex; gap: 10px; align-items: baseline; margin: 36px 0 14px;
  font-size: 13px; line-height: 20px; letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, #1a1400 62%, transparent);
}
.m-phasecap b { color: var(--mi); font-weight: 800; }
.m-phaseframe {
  position: relative; border: 2px solid var(--mi); background: #ffffff;
  box-shadow: 16px 16px 0 rgba(143, 165, 242, 0.25);
}
.m-phaseframe img { display: block; width: 100%; height: auto; opacity: 0; transition: opacity 700ms ease; }
.m-ph1 { position: relative; }
.m-ph2, .m-ph3, .m-ph4 { position: absolute; inset: 0; }
#kept-landing[data-step="0"] .m-ph1 { opacity: 1; }
#kept-landing[data-step="1"] .m-ph2, #kept-landing[data-step="2"] .m-ph2 { opacity: 1; }
#kept-landing[data-step="3"] .m-ph3 { opacity: 1; }
#kept-landing[data-step="4"] .m-ph4 { opacity: 1; }

.m-gokline { margin: 0; font-size: 15.5px; line-height: 26px; }
.m-gokchip {
  display: inline-block; margin-left: 6px; padding: 2px 10px;
  border: 2px solid var(--mi); font-weight: 800; letter-spacing: -0.01em;
}
.m-movedcap { margin: 0; font-size: 13px; line-height: 20px; color: color-mix(in srgb, #1a1400 60%, transparent); }

/* Founder note. */
.m-founder { margin: 0 0 clamp(26px, 3vw, 40px); font-size: 17px; line-height: 28px; max-width: 62ch; }

/* The one-click board heal on the empty screen. */
.empty-setup {
  display: inline-block; margin-top: 14px; font: inherit; font-size: var(--fs-body);
  font-weight: 700; color: var(--brand-ink); background: var(--brand);
  border: 2px solid var(--line-strong); padding: 8px 20px; cursor: pointer;
  box-shadow: 3px 3px 0 var(--line-strong);
}
.empty-setup:hover { box-shadow: 1px 1px 0 var(--line-strong); transform: translate(2px, 2px); }
.empty-setup:disabled { opacity: 0.6; cursor: default; }


/* Agent-setup panel copy blocks (restored: lost in a landing-CSS cut). */
.ks-copylabel { font-size: var(--fs-meta) !important; color: var(--muted) !important; font-weight: 700; margin: 14px 0 6px !important; }
.ks-copyblock {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: var(--fs-meta);
  background: var(--field); border: 2px solid var(--line); padding: 10px 12px;
  white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
  max-height: 130px; overflow-y: auto; margin: 0; color: var(--text);
}

/* The beginner walkthrough in the agent panel. */
.ks-divide { margin: 20px 0 10px; font-weight: 800; font-size: var(--fs-title); letter-spacing: -0.01em; color: var(--text); border-top: 2px solid var(--line); padding-top: 16px; }
.ks-steps { margin: 0 0 12px; padding-left: 20px; }
.ks-steps li { margin-bottom: 9px; font-size: var(--fs-body); line-height: 1.55; color: var(--muted); }
.ks-steps li b { color: var(--text); }
.ks-steps li i { font-style: normal; font-family: ui-monospace, "SF Mono", Menlo, monospace; background: var(--field); padding: 0 4px; border: 1px solid var(--line); }
.ks-steps a { color: var(--brand-on-surface); font-weight: 700; }

/* Wizard chrome. */
.ks-choice { display: flex; gap: 10px; margin: 14px 0 10px; }
.ks-choice button {
  flex: 1; font: inherit; font-size: var(--fs-title); font-weight: 800;
  color: var(--text); background: var(--card); border: 2px solid var(--line-strong);
  padding: 12px 0; cursor: pointer; box-shadow: 3px 3px 0 var(--line-strong);
}
.ks-choice button:hover { background: var(--brand); box-shadow: 1px 1px 0 var(--line-strong); transform: translate(2px, 2px); }
.ks-linkbtn { font: inherit; font-size: var(--fs-meta); font-weight: 700; color: var(--brand-on-surface); background: none; border: none; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ks-details { margin: 8px 0 14px; }
.ks-details summary { font-size: var(--fs-meta); font-weight: 700; color: var(--muted); cursor: pointer; margin-bottom: 8px; }

/* Button hierarchy inside setup cards: the card's base rule painted every
 * button primary-blue; secondaries and link-buttons reclaim their roles. */
.ks-card .ks-secondary {
  background: var(--card); color: var(--text); border: 2px solid var(--line-strong);
  font-weight: 700; width: 100%; padding: 9px 0; margin-top: 10px;
}
.ks-card .ks-secondary:hover { background: var(--field-hover); }
.ks-card .ks-linkbtn {
  display: inline; width: auto; background: none; border: none; margin: 0; padding: 0;
  font-size: var(--fs-meta); font-weight: 700; color: var(--brand-on-surface);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
