/* Prowrit — ink on paper. One accent. Line-art brand, professional tool. */
:root {
  --paper: #faf7f0;
  --wall: #efeadd;
  --ink: #191713;
  --accent: #2e6e8e;
  --soft: #6a6458;
  /* Decorative hairlines only — dividers, card outlines, section rules. At
     1.86:1 on --card it is deliberately below the 3:1 non-text minimum, because
     WCAG 1.4.11 covers borders that IDENTIFY a component or its state, and the
     line-art look is load-bearing for this product. Anything that delineates an
     interactive control uses --edge instead. */
  --faint: #c3bcae;
  /* 3.4:1 on --card, 3.2:1 on --paper — for the borders a user has to find:
     inputs, selects, textareas, the question fieldsets. */
  --edge: #92897a;
  --card: #fffdf8;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ── keyboard access ────────────────────────────────────────────────────── */
/* Every page repeats the same masthead — up to five focusable items — before
   its h1 and its main control. Without this, reaching the paste box on the
   landing page means tabbing past the whole nav, on every visit. */
.skip-link{position:absolute;left:8px;top:-44px;z-index:50;background:var(--ink);color:var(--paper);padding:9px 14px;border-radius:0 0 3px 3px;font-size:13px;font-weight:600;text-decoration:none;transition:top .12s ease;}
.skip-link:focus{top:0;}
/* The skip target takes focus programmatically; it must not draw a ring around
   the whole page when it does. */
[tabindex="-1"]:focus{outline:none;}

/* One visible focus style for everything. There were exactly two focus rules in
   this file before, and one of them REMOVED the outline. :focus-visible keeps
   rings off mouse clicks and on for keyboards. */
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,[tabindex="0"]:focus-visible{
  outline:2px solid var(--accent);outline-offset:2px;border-radius:1px;
}
/* Legends take focus when a question round opens (see app.js). */
legend:focus-visible{outline:2px solid var(--accent);outline-offset:3px;}

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
  .skip-link{transition:none;}
}
body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  background: radial-gradient(circle at 50% -20%, #f6f2e8 0, transparent 60%), var(--wall);
  color: var(--ink);
  line-height: 1.5;
}
.masthead {
  padding: 18px 28px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  border-bottom: 1.5px solid var(--ink);
  background: var(--paper);
}
.masthead .mark { font-weight: 700; letter-spacing: 4px; font-size: 15px; }
.masthead .tagline { color: var(--soft); font-size: 13px; letter-spacing: 1px; }
.masthead .nav { margin-left: auto; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.masthead .navlink {
  color: var(--soft); font-size: 13px; text-decoration: none; letter-spacing: .3px;
  border: none; background: none; font-family: inherit; cursor: pointer; padding: 0;
  border-bottom: 1px solid transparent;
}
.masthead .navlink:hover { color: var(--accent); border-bottom-color: var(--accent); }
.masthead .ghost {
  color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none;
  border: 1px solid var(--ink); padding: 6px 16px; border-radius: 2px; background: none; font-family: inherit; cursor: pointer;
}
.masthead .ghost:hover { color: var(--paper); background: var(--accent); border-color: var(--accent); }

main { max-width: min(980px, 94vw); margin: 0 auto; padding: 40px 16px 24px; }
button { font-family: inherit; cursor: pointer; }

/* ── hero ─────────────────────────────────────────────────────────────────── */
/* The premise before the question: one small-caps line so the h1 reads as an
   invitation, not a pop quiz. */
.studio .kicker {
  font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--accent); margin: 26px 0 0; font-weight: 500;
}
.studio h1 {
  font-weight: 300; font-size: clamp(30px, 5.4vw, 54px); line-height: 1.05;
  letter-spacing: -1.4px; margin: 18px 0 10px; max-width: 18ch;
}
.studio .kicker + h1 { margin-top: 8px; }
.studio .sub {
  font-weight: 300; font-size: clamp(15px, 2vw, 18px); color: var(--soft);
  max-width: 62ch; margin: 0 0 22px;
}
.studio .sub b { color: var(--ink); font-weight: 500; }

#brief-form textarea {
  width: 100%; padding: 16px 18px; font-size: 14px; line-height: 1.6;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  border: 1.5px solid var(--ink); border-radius: 3px; background: var(--card);
  color: var(--ink); resize: vertical; min-height: 130px;
}
#brief-form textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
/* WCAG contrast: the old #a89f8d was 2.58:1 on the card background. */
#brief-form textarea::placeholder { color: var(--soft); }
.controls { display: flex; gap: 14px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.reviewed-note { font-size: 12.5px; color: var(--soft); max-width: 52ch; }

/* ── fact chips: the trust facts as scannable metadata, not prose ─────────── */
.fact-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fact-chip { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .3px;
  color: var(--soft); border: 1px solid var(--faint); border-radius: 999px; padding: 4px 11px;
  background: var(--card); white-space: nowrap; }

.library-legend { display: block; margin-top: 8px; font-size: 12px; color: var(--soft); letter-spacing: .2px; }
.library-checked { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px;
  padding: 2px 9px; white-space: nowrap; vertical-align: 1px; }

/* ── the duel: one-line ask vs the engineered workflow, both real runs ─────── */
.duel { margin-top: 48px; }
.duel h2 { font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--accent);
  border-bottom: 1.5px solid var(--ink); padding-bottom: 8px; margin: 0 0 10px; }
.duel-sub { font-weight: 300; font-size: 13.5px; color: var(--soft); margin: 0 0 16px; max-width: 68ch; }
.duel-sub a { color: var(--accent); }
.duel-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .duel-cols { grid-template-columns: 1fr; } }

/* Phones. This file had exactly ONE breakpoint before (the line above), so the
   rest of the layout relied on flex-wrap: the masthead's five nav items wrapped
   to two or three rows above the h1, and the primary CTA ended up alone on its
   own row after the fact chips. */
@media (max-width: 560px) {
  .masthead { gap: 6px 12px; }
  .nav { gap: 12px; row-gap: 6px; }
  .controls { flex-direction: column; align-items: stretch; }
  .controls button[type="submit"] { margin-left: 0; width: 100%; }
  .fact-chips { order: 2; }
  /* Each of these was 13px text with padding:0 — the hit area for "copy card
     link", "save & refine", "see more", "edit & rerun", "delete this workflow",
     "Forgot password?". Nowhere near a comfortable target. */
  .link, .navlink { padding: 9px 2px; }
  .sent-actions, .detail-tools, .run-actions, .result-actions { gap: 10px 18px; flex-wrap: wrap; }
  .ctl input, .ctl select { min-width: 0; width: 100%; }
  .cabinet-controls .ctl { flex: 1 1 100%; }
}
.duel-col { border: 1px solid var(--faint); background: var(--card); padding: 14px 16px; }
.duel-col.after { border: 1.5px solid var(--accent); }
.duel-tag { display: inline-block; font-family: "IBM Plex Mono", monospace; font-size: 11px;
  letter-spacing: 1px; color: var(--soft); margin-bottom: 10px; text-transform: uppercase; }
.duel-col.after .duel-tag { color: var(--accent); font-weight: 600; }
.duel-col pre { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; line-height: 1.55;
  white-space: pre-wrap; background: var(--paper); border: 1px dashed var(--faint); padding: 12px; margin: 0; }
.duel-verdict { font-size: 12.5px; color: var(--soft); font-weight: 300; margin: 10px 0 0; line-height: 1.5; }
.duel-col.after .duel-verdict { color: var(--ink); }
.duel-note { font-size: 11.5px; color: var(--soft); font-weight: 300; margin: 12px 0 0; font-style: italic; }
.controls button[type="submit"] {
  margin-left: auto; padding: 13px 30px; font-size: 14px; font-weight: 600;
  letter-spacing: 1.4px; text-transform: uppercase;
  background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink); border-radius: 2px;
  transition: background .12s ease, border-color .12s ease;
}
.controls button[type="submit"]:hover { background: var(--accent); border-color: var(--accent); }

.chips { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.try-label { font-size: 12px; color: var(--soft); letter-spacing: 1px; text-transform: uppercase; }
.chip {
  font-size: 12.5px; color: var(--ink); background: var(--card);
  border: 1px solid var(--faint); border-radius: 999px; padding: 6px 14px;
  transition: border-color .12s ease, color .12s ease;
}
.chip:hover { color: var(--accent); border-color: var(--accent); }

.status { min-height: 1.5em; color: var(--accent); font-weight: 500; margin-top: 16px; }

/* ── the library ──────────────────────────────────────────────────────────── */
.library { margin-top: 34px; }
.library h2 {
  font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--accent);
  border-bottom: 1.5px solid var(--ink); padding-bottom: 8px; margin: 0 0 6px;
}
.library-sub { font-weight: 300; font-size: 13.5px; color: var(--soft); margin: 0 0 16px; max-width: 68ch; }
.library-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.lib-card {
  text-align: left; font-family: inherit; cursor: pointer; text-decoration: none;
  border: 1px solid var(--faint); background: var(--card); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color .12s ease, transform .12s ease;
}
.lib-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.lib-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.lib-tagline { font-weight: 300; font-size: 13px; color: var(--soft); line-height: 1.5; flex: 1; }
.lib-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--soft); }
.lib-shape {
  letter-spacing: 1px; text-transform: uppercase; font-weight: 700; font-size: 10px;
  padding: 2px 8px; border-radius: 2px; color: var(--paper);
}
/* Paper-on-colour at 10px/700. The three badges are the product's core
   taxonomy and were inconsistently legible: single passed at 5.25:1 while
   pipeline sat at 2.63:1 and orchestra at 3.48:1. Darkened within the same hue
   families — 4.86:1 and 5.24:1 — so the set reads as one system. */
.lib-shape.single { background: #2e6e8e; }
.lib-shape.pipeline { background: #8f6512; }
.lib-shape.orchestra { background: #bb3a24; }
.lib-open { margin-left: auto; color: var(--accent); font-weight: 600; font-size: 12px; }

/* ── result ───────────────────────────────────────────────────────────────── */
.result { margin: 26px 0 8px; }
.card-holder iframe {
  /* Real height is set by JS from the card's postMessage; this is a fallback. */
  width: 100%; height: 1100px; border: 1.5px solid var(--ink); border-radius: 3px;
  display: block; background: var(--paper);
}
.result-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.hint { color: var(--soft); }
.link { background: none; border: none; color: var(--accent); text-decoration: underline; font-size: 13px; padding: 0; }

/* ── how + pains ──────────────────────────────────────────────────────────── */
.how-section { margin-top: 56px; }
.how-section h2, .pains h2 {
  font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--accent);
  border-bottom: 1.5px solid var(--ink); padding-bottom: 8px;
}
.how { display: flex; gap: 22px; list-style: none; padding: 0; flex-wrap: wrap; counter-reset: step; }
.how li {
  flex: 1 1 240px; border-left: 2px solid var(--accent); padding-left: 14px;
  font-weight: 300; font-size: 14.5px; color: var(--soft);
}
.how li strong { color: var(--ink); display: block; font-weight: 600; margin-bottom: 4px; }

.pains { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 40px; }
/* The section's heading spans the grid rather than becoming a first cell. */
.pains > h2 { grid-column: 1 / -1; margin-bottom: 0; }
.pain { border: 1px solid var(--faint); background: none; padding: 16px 18px; }
.pain h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--soft); }
.pain p { margin: 0; font-weight: 300; font-size: 13.5px; color: var(--soft); }
.pain em { color: var(--accent); font-style: normal; font-weight: 500; }

.note { background: #f3ead2; padding: 8px 12px; border-radius: 3px; font-size: 13px; }
.flags { background: #f6ddd6; border: 1px solid #c85a3c; padding: 8px 12px; border-radius: 3px; font-size: 13px; }
.muted { color: var(--soft); }
.hidden { display: none; }
footer { text-align: center; padding: 32px 16px 40px; color: var(--soft); font-size: 13px; }

/* ── my studio (auth + cabinet) ─────────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.auth-form input {
  font-family: inherit; font-size: 14px; padding: 10px 12px;
  border: 1px solid var(--line, #d8d3c8); border-radius: 6px; background: transparent; color: inherit;
}
.auth-form .controls { margin-top: 4px; }
.auth-form button[type="submit"] {
  padding: 10px 18px; border: 1px solid var(--ink); background: var(--ink);
  color: var(--paper, #faf7f0); border-radius: 6px; font-size: 14px;
}
.auth-form button[type="submit"]:hover { background: var(--accent); border-color: var(--accent); }
.masthead button.ghost { background: none; font: inherit; }
.link.danger { color: #b3341f; }

/* ── the stage checklist (the route, drawn up front) ───────────────────── */
/* The only determinate signal in the wait: three named steps, visible from
   second one, ticked off as they finish. No bar and no ETA — both would be
   invented numbers, and this product doesn't make time promises. */
.stages{list-style:none;margin:0 0 14px;padding:0 0 12px;border-bottom:1px dashed var(--faint);display:flex;flex-wrap:wrap;gap:6px 20px;}
.stages:empty{display:none;margin:0;padding:0;border:none;}
.stage{display:flex;align-items:baseline;gap:7px;font-size:12px;}
.stage-mark{flex:none;width:12px;text-align:center;font-size:11px;}
.stage.pending{color:var(--soft);}
.stage.now{color:var(--ink);font-weight:600;}
.stage.now .stage-mark,.stage.done .stage-mark{color:var(--accent);}
.stage.done{color:var(--soft);}

/* ── the drafting-table feed (transcript + ephemeral ticker) ───────────── */
.status-feed{margin-top:16px;display:flex;flex-direction:column;gap:6px;min-height:1.5em;}
/* The ticker's own host, deliberately OUTSIDE the live region: it rewrites the
   elapsed clock once a second for minutes, which no screen reader should
   narrate. aria-hidden on the element, separated in the DOM here. */
.ticker-host{margin:2px 0 0;}
.ticker-host:empty{display:none;}
.feed-line{margin:0;display:flex;align-items:baseline;gap:9px;font-size:13.5px;font-weight:300;color:var(--soft);}
.feed-line.real{color:var(--ink);font-weight:500;}
.feed-line.past{opacity:.55;}
.feed-line.final{color:var(--accent);font-weight:600;}
.feed-line.fail{color:#b3341f;font-weight:500;}
.feed-mark{flex:none;width:14px;text-align:center;font-size:12px;}
.feed-mark.done{color:var(--accent);}
.feed-mark.now{color:var(--accent);}
.feed-mark.fail{color:#b3341f;}
.feed-ticker{margin:2px 0 0;display:flex;align-items:baseline;gap:9px;font-size:13px;color:var(--soft);font-weight:300;}
.feed-pen{flex:none;width:14px;text-align:center;color:var(--accent);animation:pen-pulse 1.6s ease-in-out infinite;}
.feed-ticker-text{transition:opacity .18s ease;font-style:italic;}
.feed-ticker-text.swap{opacity:0;}
.feed-elapsed{font-size:11px;color:var(--soft);font-weight:400;}
@keyframes pen-pulse{0%,100%{opacity:1;transform:rotate(0)}50%{opacity:.35;transform:rotate(-8deg)}}
@media (prefers-reduced-motion: reduce){
  .feed-pen{animation:none;}
  .feed-ticker-text{transition:none;}
}
/* The disabled label ("On the drafting table…") is the primary status
   affordance for a 3-7 minute wait. opacity:.4 over --soft composited to
   1.77:1 — about a third of the AA minimum. Keep the full-strength ink on a
   lightened ground instead: 5.5:1, and it still reads as unavailable. */
.controls button[type="submit"]:disabled{cursor:default;background:var(--wall);border-color:var(--faint);color:var(--soft);}
.controls button[type="submit"]:disabled:hover{background:var(--wall);border-color:var(--faint);}

/* ── the studio cabinet: search, sort, count ───────────────────────────── */
.cabinet-controls{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px 20px;margin:0 0 16px;padding-bottom:14px;border-bottom:1px dashed var(--faint);}
.ctl{display:flex;flex-direction:column;gap:3px;}
.ctl-label{font-size:10px;letter-spacing:1.4px;text-transform:uppercase;color:var(--soft);font-weight:600;}
.ctl input,.ctl select{font-family:inherit;font-size:13px;padding:5px 8px;border:1px solid var(--edge);background:var(--card);color:inherit;border-radius:2px;min-width:170px;}
.ctl input:focus-visible,.ctl select:focus-visible{outline:2px solid var(--accent);outline-offset:1px;}
.ctl-count{font-size:12px;color:var(--soft);padding-bottom:6px;}

/* ── detail view: tools, brief, corrections, revision history ──────────── */
.detail-tools{display:flex;flex-wrap:wrap;gap:16px;margin:0 0 14px;}
.disclosure{margin:0 0 10px;border:1px solid var(--faint);background:var(--card);padding:0;}
.disclosure > summary{cursor:pointer;padding:9px 14px;font-size:12.5px;font-weight:600;color:var(--soft);}
.disclosure > summary:focus-visible{outline:2px solid var(--accent);outline-offset:-2px;}
.disclosure[open] > summary{border-bottom:1px dashed var(--faint);}
.brief-text{padding:12px 14px;font-size:13.5px;font-weight:300;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;max-height:340px;overflow:auto;}
.corrections{margin:0;padding:10px 14px 12px 30px;display:flex;flex-direction:column;gap:9px;}
.correction{font-size:13.5px;font-weight:300;line-height:1.55;}
.correction-when{display:block;font-size:10.5px;letter-spacing:.8px;text-transform:uppercase;color:var(--soft);font-weight:600;}
.correction-text{display:block;margin-top:2px;}
.history-controls{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px 18px;padding:12px 14px 0;}
.diff{margin:10px 0 0;padding:0 14px 12px;max-height:420px;overflow:auto;}
.diff-row{font-family:'IBM Plex Mono',ui-monospace,monospace;font-size:11.5px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere;padding:0 4px;}
/* Never colour alone: the +/− prefix carries the same information, so the diff
   is readable without colour vision. */
.diff-row.add{background:#eaf3ec;color:#245c33;}
.diff-row.del{background:#fbecea;color:#8f2b1a;}
.diff-row.same{color:var(--soft);}
.diff-row.gap{color:var(--soft);font-style:italic;text-align:center;padding:5px 0;border-top:1px dashed var(--faint);border-bottom:1px dashed var(--faint);margin:5px 0;}

/* ── MCP access (studio account) ────────────────────────────────────────── */
.mcp-h{font-size:15px;margin:34px 0 4px;border-top:1px solid var(--faint);padding-top:22px;}
.mcp-cmd{font-family:'IBM Plex Mono',ui-monospace,monospace;font-size:12px;line-height:1.6;background:#191713;color:#efe9dc;padding:12px 14px;white-space:pre-wrap;word-break:break-all;border-radius:2px;max-width:640px;}

/* ── clarifying questions + direct replies ─────────────────────────────── */
.qa{margin-top:14px;display:flex;flex-direction:column;gap:12px;}
/* --edge, not --faint: this fieldset groups radio controls, so its boundary
   identifies a component rather than decorating a section. */
.q-card{border:1px solid var(--edge);background:#fffdf8;padding:12px 16px 14px;margin:0;}
.q-card legend{font-size:14.5px;font-weight:600;padding:0 6px;margin-left:-6px;}
.q-why{margin:2px 0 10px;font-size:12px;color:var(--soft);font-weight:300;font-style:italic;}
.q-opt{display:flex;align-items:baseline;gap:8px;margin:6px 0;font-size:13.5px;cursor:pointer;}
.q-opt b{font-weight:600;}
.q-meaning{color:var(--soft);font-weight:300;}
.q-own{flex:1;font-family:inherit;font-size:13px;border:none;border-bottom:1px dashed var(--edge);background:transparent;padding:2px 4px;color:inherit;}
/* Was `outline:none` with a 1px underline colour change as the only focus
   signal — on a field that is already underlined. A real ring instead. */
.q-own:focus-visible{outline:2px solid var(--accent);outline-offset:2px;}
.qa .controls button{padding:10px 18px;border:1px solid var(--ink);background:var(--ink);color:var(--paper,#faf7f0);border-radius:6px;font-size:14px;font-family:inherit;cursor:pointer;}
.qa .controls button:hover{background:var(--accent);border-color:var(--accent);}
.direct-reply{margin-top:14px;border:1px solid var(--faint);border-left:3px solid var(--accent);background:#fffdf8;padding:14px 16px;max-width:70ch;}
.direct-reply p{margin:0 0 8px;font-size:14.5px;font-weight:300;line-height:1.55;}
.direct-reply .direct-hint{margin:0;font-size:13px;color:var(--soft);}
.direct-reply a{color:var(--accent);}

/* ── studio first-run empty state ──────────────────────────────────────── */
.empty-state{border:1px dashed var(--faint);background:#fffdf8;padding:26px 28px;max-width:560px;}
.empty-title{margin:0 0 6px;font-size:19px;font-weight:600;}
.empty-sub{margin:0 0 14px;font-size:14px;font-weight:300;color:var(--soft);line-height:1.55;}
.empty-chips{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px;}
.empty-cta{display:inline-block;padding:11px 20px;background:var(--ink);color:var(--paper,#faf7f0);text-decoration:none;font-size:14px;font-weight:600;border-radius:6px;}
.empty-cta:hover{background:var(--accent);}

/* ── the run window (the editor becomes the exchange) ──────────────────── */
.run-window{width:100%;padding:16px 18px;border:1.5px solid var(--ink);border-radius:3px;background:var(--card);min-height:130px;}
.run-window .status-feed{margin-top:0;}
.sent-brief{border-bottom:1px dashed var(--faint);padding:0 0 10px;margin-bottom:12px;}
.sent-kicker{font-size:10px;letter-spacing:1.6px;text-transform:uppercase;color:var(--soft);font-weight:600;}
.sent-text{margin-top:4px;font-size:13.5px;font-weight:300;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;}
.sent-text.expanded{display:block;-webkit-line-clamp:unset;overflow:visible;}
.sent-actions{display:flex;gap:16px;margin-top:6px;}
.hint-line{margin:12px 0 0;font-size:13.5px;font-weight:300;color:var(--soft);}
.run-actions{margin:12px 0 0;display:flex;gap:16px;}
.run-actions:empty{display:none;}
/* Its own live region so a question round or a direct reply is announced when
   it appears. Both used to be inserted as siblings of the transcript's region,
   which meant they arrived in silence. */
.outcome:empty{display:none;}

/* ── the understanding, shown while the design passes are still running ──── */
/* THE INTENT lands at ~45s; the blueprint takes another 5-6 minutes. These are
   the assumptions the design is about to be built on, put on screen while
   correcting them is still cheap. */
.understanding{margin:14px 0 0;padding:14px 16px;border:1px solid var(--faint);border-left:3px solid var(--accent);background:var(--card);max-width:70ch;}
.understanding-h{margin:0 0 8px;font-size:10px;letter-spacing:1.6px;text-transform:uppercase;color:var(--soft);font-weight:600;}
.u-goal{margin:0 0 6px;font-size:14.5px;font-weight:500;line-height:1.5;}
.u-shape{margin:0 0 10px;font-size:12.5px;font-weight:300;color:var(--soft);font-style:italic;}
.u-label{margin:0 0 4px;font-size:12px;font-weight:600;color:var(--soft);}
.u-list{margin:0;padding-left:18px;}
.u-list li{font-size:13.5px;font-weight:300;line-height:1.55;margin:2px 0;}
.u-foot{margin:10px 0 0;font-size:12.5px;font-weight:300;color:var(--soft);}

/* ── the download that makes "you walk away with it" literal ───────────── */
/* Every real action lived inside the card's iframe, behind a nested scrollbar,
   so the page around it looked like it offered a link and a save. */
.primary-action{font-family:inherit;font-size:13px;font-weight:600;background:var(--ink);color:var(--paper);border:1px solid var(--ink);padding:8px 14px;border-radius:2px;cursor:pointer;}
.primary-action:hover{background:var(--accent);border-color:var(--accent);}
.primary-action:focus-visible{outline:2px solid var(--accent);outline-offset:2px;}

/* ── post-run studio offer ─────────────────────────────────────────────── */
#save-studio{border:1px solid var(--accent);color:var(--accent);padding:6px 14px;border-radius:2px;text-decoration:none;font-weight:600;}
#save-studio:hover{background:var(--accent);color:var(--paper,#faf7f0);}
#save-studio.saved{border-color:#4a6b52;color:#4a6b52;}
#save-studio.saved:hover{background:#4a6b52;color:var(--paper,#faf7f0);}
