/* Hateable: paper and ink, blueprint blue for actions, pencil yellow only where it costs or ships. */
:root {
  --blueprint: #1D3E8C;
  --blueprint-deep: #152E6A;
  --ink: #0E1733;
  --graphite: #4A5573;
  --paper: #F3F5F9;
  --white: #FFFFFF;
  --rule: #C7CEDD;
  --pencil: #F4C430;
  --pencil-deep: #D9A915;
  --fault: #B3261E;
  --ok: #1E6B3A;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Public Sans", system-ui, sans-serif;
  --focus: 0 0 0 3px var(--white), 0 0 0 5px var(--blueprint);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1rem/1.55 var(--body); color: var(--ink); background: var(--paper); }
img, svg { max-width: 100%; }
a { color: var(--blueprint); text-underline-offset: 2px; }
a:hover { color: var(--blueprint-deep); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.05; letter-spacing: 0.005em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--white); padding: 8px 12px; z-index: 10; }
.skip:focus { top: 8px; }
.muted { color: var(--graphite); }
.small { font-size: 0.85rem; }
.fine { font-size: 0.9rem; color: var(--graphite); }
.lede { font-size: 1.15rem; max-width: 60ch; }
.inline { display: inline; }

/* Buttons */
[hidden] { display: none !important; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px; border: 1px solid var(--blueprint); border-radius: 3px; background: var(--white); color: var(--blueprint); font: 600 1rem/1.2 var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { background: #E8EDF8; color: var(--blueprint-deep); }
.btn-primary { background: var(--blueprint); color: var(--white); }
.btn-primary:hover { background: var(--blueprint-deep); color: var(--white); }
.btn-quiet { border-color: var(--rule); color: var(--ink); }
.btn-small { min-height: 36px; padding: 6px 12px; font-size: 0.92rem; }
.btn-publish { background: var(--pencil); border-color: var(--pencil-deep); color: var(--ink); }
.btn-publish:hover { background: var(--pencil-deep); color: var(--ink); }
.btn-danger { border-color: var(--fault); color: var(--fault); }
.btn-stop { border-color: var(--fault); color: var(--fault); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--blueprint); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.link.danger { color: var(--fault); }

/* Forms */
label { display: block; font-weight: 600; margin: 14px 0 6px; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--white); border: 1px solid #8C96AE; border-radius: 3px; padding: 10px 12px; min-height: 44px; }
input[type="checkbox"] { width: 20px; min-height: 20px; height: 20px; }
textarea { resize: vertical; }
input[aria-invalid="true"] { border-color: var(--fault); }
.hint { font-size: 0.88rem; color: var(--graphite); margin: 4px 0 0; }
.field-err { color: var(--fault); font-size: 0.92rem; margin: 6px 0 0; }
form .btn { margin-top: 16px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0 0 16px; }
.inline-form > div { flex: 1 1 200px; }
.inline-form label { margin-top: 0; }
.inline-form .btn { margin-top: 0; }
.addon-input { display: flex; align-items: stretch; }
.addon-input input { border-radius: 3px 0 0 3px; }
.addon-input span { display: flex; align-items: center; padding: 0 10px; border: 1px solid #8C96AE; border-left: 0; border-radius: 0 3px 3px 0; background: var(--paper); font-size: 0.9rem; white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis; }

/* Messages */
.flash { padding: 12px 14px; border-left: 4px solid var(--blueprint); background: var(--white); margin: 16px 0; }
.flash-error { border-color: var(--fault); }
.flash-ok { border-color: var(--ok); }
.notice { padding: 12px 14px; border: 1px solid var(--pencil-deep); background: #FFF8DE; margin: 0 0 16px; }

/* Top bar */
.topbar { background: var(--white); border-bottom: 1px solid var(--rule); }
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.topbar nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.topbar nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.topbar nav a[aria-current="page"] { color: var(--blueprint); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.topbar nav .btn { background: var(--blueprint); color: var(--white); }
.topbar nav .btn:hover { background: var(--blueprint-deep); color: var(--white); }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 1.9rem; color: var(--ink); text-decoration: none; letter-spacing: 0.01em; line-height: 1; }
.wordmark.small { font-size: 1.5rem; }
.wordmark-sub { font-family: var(--body); font-size: 0.85rem; font-weight: 600; color: var(--graphite); }
.credit-pill { display: inline-block; padding: 4px 10px; border: 1px solid var(--pencil-deep); background: #FFF6D2; border-radius: 3px; font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.viewing { display: flex; gap: 12px; justify-content: center; align-items: center; padding: 6px 16px; background: var(--pencil); font-weight: 600; }

/* Public pages */
.hero { background: var(--white); border-bottom: 1px solid var(--rule); padding: 48px 0 56px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.hero-copy h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 12px; }
.blueprint { margin: 0; background: var(--blueprint); color: var(--white); border-radius: 4px; padding: 18px; }
.blueprint figcaption { font-size: 0.88rem; color: #C9D5F2; margin-top: 10px; }
.bp-prompt { display: flex; gap: 10px; align-items: baseline; font-size: 0.95rem; padding: 10px 12px; border: 1px dashed #7F98D6; margin-bottom: 14px; min-height: 3.4em; }
.bp-label { font-weight: 700; color: var(--pencil); }
.bp-drawing { display: block; width: 100%; height: auto; }
.bp-grid line { stroke: #3C5BA8; stroke-width: 0.5; }
.bp-lines rect, .bp-lines line { fill: none; stroke: #E9EEFA; stroke-width: 1.5; }
.bp-fill rect { fill: #E9EEFA; }
.bp-fill .field { fill: none; stroke: #E9EEFA; stroke-width: 1; }
.bp-fill .go { fill: var(--pencil); }
/* The one orchestrated moment: the prompt types, the page is drawn, then filled. */
@media (prefers-reduced-motion: no-preference) {
  .bp-typed { display: inline-block; clip-path: inset(0 100% 0 0); animation: type 1.8s steps(40, end) 0.2s forwards; }
  .bp-lines > * { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 0.9s ease-out forwards; }
  .bp-lines .d1 { animation-delay: 2.0s; } .bp-lines .d2 { animation-delay: 2.3s; } .bp-lines .d3 { animation-delay: 2.6s; } .bp-lines .d4 { animation-delay: 2.8s; }
  .bp-fill > * { opacity: 0; animation: fill 0.5s ease-out forwards; }
  .bp-fill .f1 { animation-delay: 3.3s; } .bp-fill .f2 { animation-delay: 3.5s; } .bp-fill .f3 { animation-delay: 3.7s; } .bp-fill .f4 { animation-delay: 3.9s; }
}
@keyframes type { to { clip-path: inset(0 0 0 0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fill { to { opacity: 1; } }

.band { padding: 56px 16px 8px; }
.narrowish { max-width: 880px; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.steps li { counter-increment: step; padding: 18px 24px 8px 0; border-right: 1px solid var(--rule); margin-right: 24px; }
.steps li:last-child { border-right: 0; }
.steps li::before { content: counter(step); display: block; font-family: var(--display); font-weight: 800; font-size: 2.6rem; color: var(--blueprint); line-height: 1; margin-bottom: 8px; }
.steps p { max-width: 36ch; }

table { border-collapse: collapse; width: 100%; }
.table-scroll { width: 100%; overflow-x: auto; }
.plans { background: var(--white); border-top: 2px solid var(--ink); }
.plans caption { text-align: left; caption-side: bottom; padding-top: 10px; color: var(--graphite); font-size: 0.92rem; }
.plans th, .plans td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.plans thead th { font-size: 0.85rem; color: var(--graphite); font-weight: 600; }
.plans tbody th { font-family: var(--display); font-size: 1.4rem; font-weight: 800; }
.plans .per { color: var(--graphite); font-size: 0.85rem; }
.plan-top { background: #F6F8FD; }

.foot { border-top: 1px solid var(--rule); margin-top: 64px; padding: 24px 0; background: var(--white); font-size: 0.92rem; color: var(--graphite); }
.foot-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-row p { margin: 0; }
.foot-row a { margin-left: 16px; }

.sheet { background: var(--white); border: 1px solid var(--rule); border-radius: 3px; padding: 24px; margin: 0 0 20px; }
.sheet.narrow { max-width: 460px; margin: 40px auto; }
.sheet.narrowish { max-width: 720px; }
.public .sheet.narrowish { margin: 40px auto; }
.prose li { margin-bottom: 6px; }

/* App pages */
.app-main { padding-top: 28px; padding-bottom: 48px; }
.page-head { margin-bottom: 20px; }
.page-head h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 6px; }
.meta-line { color: var(--graphite); }
.crumb { margin: 0 0 4px; font-size: 0.92rem; }
.new-site-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 0 16px; }
.new-site-grid label { margin-top: 0; }
.list { background: var(--white); border: 1px solid var(--rule); }
.list th, .list td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.list thead th { font-size: 0.85rem; color: var(--graphite); font-weight: 600; background: var(--paper); }
.list tbody th { font-weight: 600; }
.list .num { text-align: right; white-space: nowrap; }
.list .clip { max-width: 260px; }
.row-actions { white-space: nowrap; }
.row-actions > * + * { margin-left: 12px; }
.status { font-weight: 600; font-size: 0.9rem; }
.status-live { color: var(--ok); }
.status-draft { color: var(--graphite); }
.status-suspended { color: var(--fault); }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; margin: 0; }
.facts dt { color: var(--graphite); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.two-col.tight { gap: 0 16px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; margin: 0 0 20px; border-top: 2px solid var(--ink); background: var(--white); }
.stat-row div { padding: 14px 16px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.stat-row dt { font-size: 0.85rem; color: var(--graphite); }
.stat-row dd { margin: 4px 0 0; font-family: var(--display); font-weight: 800; font-size: 1.8rem; }
.stat-row dd .muted { font-family: var(--body); font-weight: 400; font-size: 0.8rem; }
.secret-key { font-size: 1.2rem; font-weight: 700; letter-spacing: 0.06em; word-break: break-all; padding: 10px; background: var(--paper); }
details summary { cursor: pointer; color: var(--blueprint); }
.inline-details { display: inline-block; }
.inline-details form { margin-top: 8px; max-width: 280px; white-space: normal; }
.danger-zone { margin-top: 20px; border-top: 1px solid var(--rule); padding-top: 14px; }
.danger-zone summary { color: var(--fault); }

/* Builder */
.builder-body { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
.builder { flex: 1; min-height: 0; display: grid; grid-template-columns: 380px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
.bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 8px 16px; background: var(--white); border-bottom: 1px solid var(--rule); min-height: 52px; }
.bar-site { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bar-spacer { flex: 1; }
.bar-link { font-weight: 600; }
.tabs { display: none; }
.pane { min-height: 0; display: flex; flex-direction: column; }
.pane-chat { background: var(--white); border-right: 1px solid var(--rule); }
.chat { list-style: none; margin: 0; padding: 16px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 100%; }
.msg-who { display: block; font-size: 0.8rem; font-weight: 700; color: var(--graphite); margin-bottom: 2px; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-user .msg-body { background: var(--paper); border: 1px solid var(--rule); padding: 10px 12px; border-radius: 3px; }
.msg-system { color: var(--graphite); font-size: 0.88rem; border-top: 1px dashed var(--rule); padding-top: 8px; }
.msg-cost { display: block; font-size: 0.8rem; color: var(--graphite); margin-top: 4px; }
.msg-error .msg-body { color: var(--fault); }
.work { font-size: 0.9rem; color: var(--graphite); border-left: 2px solid var(--blueprint); padding-left: 10px; }
.work ul { list-style: none; margin: 4px 0 0; padding: 0; }
.work li { padding: 1px 0; }
.work-live::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--blueprint); }
@media (prefers-reduced-motion: no-preference) { .work-live::after { animation: blink 1s infinite; } }
@keyframes blink { 50% { opacity: 0.2; } }
.chat-empty { color: var(--graphite); }
.composer { border-top: 1px solid var(--rule); padding: 12px 16px 14px; }
.composer textarea { min-height: 76px; max-height: 40vh; }
.composer-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.composer-row .btn { margin-top: 0; }
.composer-row .file-btn { margin-right: auto; }
.file-btn { margin: 0; font-weight: 600; cursor: pointer; }
.file-btn:focus-within { box-shadow: var(--focus); }
.attach-list { display: flex; flex-wrap: wrap; gap: 6px; }
.attach-list:not(:empty) { margin-bottom: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 8px; border: 1px solid var(--rule); border-radius: 3px; font-size: 0.85rem; background: var(--paper); }
.chip button { border: 0; background: none; cursor: pointer; font: inherit; color: var(--graphite); min-width: 28px; min-height: 28px; }
.pane-preview { background: var(--paper); }
.preview-bar { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--white); border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.preview-bar select { width: auto; min-height: 36px; padding: 4px 8px; max-width: 220px; }
.preview-bar .btn { margin: 0; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; }
.seg button { border: 0; background: var(--white); font: 600 0.88rem var(--body); padding: 0 12px; min-height: 36px; cursor: pointer; color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.publish-note { margin: 0; padding: 0 16px; font-size: 0.88rem; color: var(--graphite); }
.publish-note:not(:empty) { padding: 6px 16px; background: var(--white); border-bottom: 1px solid var(--rule); }
/* The drafting sheet the preview sits on. */
.sheet-frame { position: relative; flex: 1; min-height: 0; margin: 16px; background-color: #E7EBF3; background-image: linear-gradient(#D7DDEA 1px, transparent 1px), linear-gradient(90deg, #D7DDEA 1px, transparent 1px); background-size: 24px 24px; border: 1px solid var(--rule); display: flex; justify-content: center; padding: 14px; }
.sheet-frame iframe { width: 100%; height: 100%; border: 1px solid #9AA4BC; background: var(--white); transition: width 0.2s; }
.sheet-frame.mobile iframe { width: 390px; max-width: 100%; }
.empty-preview { position: absolute; inset: 14px; display: grid; place-items: center; text-align: center; color: var(--graphite); padding: 24px; overflow: auto; background: var(--paper); }
.empty-preview[hidden] { display: none; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li { border-right: 0; margin-right: 0; border-bottom: 1px solid var(--rule); }
  .two-col, .new-site-grid { grid-template-columns: minmax(0, 1fr); }
  .builder { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); }
  .tabs { display: flex; grid-column: 1; background: var(--white); border-bottom: 1px solid var(--rule); }
  .tabs button { flex: 1; min-height: 44px; border: 0; background: none; font: 600 0.95rem var(--body); color: var(--graphite); border-bottom: 3px solid transparent; cursor: pointer; }
  .tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--blueprint); }
  .pane[hidden] { display: none; }
  .pane-chat { border-right: 0; }
  .sheet-frame { margin: 8px; padding: 8px; }
  .bar .bar-site { display: none; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts dd { margin-bottom: 8px; }
}
@media (max-width: 480px) {
  .sheet { padding: 18px 16px; }
  .topbar nav { gap: 12px; font-size: 0.95rem; }
  .composer-hint { display: none; }
  .row-actions { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Site list stacks into cards on phones. */
@media (max-width: 640px) {
  .list-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .list-stack, .list-stack tbody, .list-stack tr, .list-stack th, .list-stack td { display: block; width: 100%; }
  .list-stack tr { padding: 12px 14px; border-bottom: 1px solid var(--rule); }
  .list-stack th, .list-stack td { padding: 3px 0; border: 0; }
  .list-stack td[data-label]::before { content: attr(data-label) ": "; color: var(--graphite); font-size: 0.85rem; }
  .list-stack .row-actions { display: flex; gap: 18px; padding-top: 8px; }
}
@media (max-width: 640px) {
  .list-stack caption { display: block; text-align: left; }
  .list-stack td:empty { display: none; }
  .plans.list-stack th[scope="row"] { font-size: 1.4rem; }
  .plans.list-stack .plan-note { padding-top: 6px; }
}

/* Build / Plan / Chat modes */
.modes { display: flex; align-items: center; gap: 0; flex-wrap: wrap; border: 0; padding: 0; margin: 0 0 8px; }
.modes label { position: relative; margin: 0; }
.modes input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.modes label span { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border: 1px solid var(--rule); margin-left: -1px; font: 600 0.88rem var(--body); color: var(--ink); background: var(--white); cursor: pointer; }
.modes label:first-of-type span { margin-left: 0; border-radius: 3px 0 0 3px; }
.modes label:nth-of-type(3) span { border-radius: 0 3px 3px 0; }
.modes input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--white); }
.modes input:focus-visible + span { box-shadow: var(--focus); position: relative; z-index: 1; }
.mode-note { flex: 1 1 160px; margin-left: 10px; font-size: 0.8rem; color: var(--graphite); }
.mode-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid var(--rule); border-radius: 3px; font-size: 0.72rem; font-weight: 700; color: var(--blueprint); text-transform: uppercase; letter-spacing: 0.04em; }

/* Formatted replies */
.msg-rich { white-space: normal; }
.msg-rich p { margin: 0 0 8px; }
.msg-rich p:last-child { margin-bottom: 0; }
.msg-rich .msg-h { font-weight: 700; color: var(--ink); margin: 12px 0 4px; }
.msg-rich .msg-h:first-child { margin-top: 0; }
.msg-rich ul { margin: 0 0 8px; padding-left: 20px; }
.msg-rich li { margin: 2px 0; }
.build-plan { margin-top: 10px; }

/* Questions with tap-to-answer options */
.qcard { margin-top: 10px; border: 1px solid var(--rule); border-left: 3px solid var(--blueprint); border-radius: 3px; padding: 12px; background: var(--white); }
.qcard .q { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.qcard legend { font-weight: 700; color: var(--ink); padding: 0; margin-bottom: 8px; }
.q-options { display: flex; flex-direction: column; gap: 6px; }
.q-opt { position: relative; display: block; margin: 0; }
.q-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.q-opt span { display: block; padding: 9px 12px; border: 1px solid var(--rule); border-radius: 3px; background: var(--paper); cursor: pointer; }
.q-opt input:hover + span { border-color: var(--blueprint); }
.q-opt input:checked + span { border-color: var(--blueprint); background: #E8EDF8; color: var(--blueprint-deep); font-weight: 600; }
.q-opt input:focus-visible + span { box-shadow: var(--focus); }
.q-other { margin-top: 6px; min-height: 40px; }
.qcard .btn { margin: 0; }
.qcard-done { opacity: 0.7; }
.qcard-done .q-opt span, .qcard-done .q-opt input { cursor: default; }
.qcard-done .q-other { display: none; }

/* Empty preview: a page being sketched, and the stacking game */
.empty-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 340px; }
.sketch { width: 220px; height: auto; fill: none; stroke: var(--blueprint); stroke-width: 2; stroke-linecap: round; margin-bottom: 6px; }
.sketch .s4 { fill: rgba(244,196,48,0.0); }
.empty-title { margin: 0; font: 700 1.5rem/1.1 var(--display); color: var(--ink); }
.empty-sub { margin: 0; font-size: 0.92rem; min-height: 1.4em; }
.game { margin-top: 6px; }
.game canvas { display: block; width: 300px; max-width: 100%; height: auto; aspect-ratio: 1; border: 1px solid var(--rule); border-radius: 3px; touch-action: manipulation; cursor: pointer; }
.game canvas:focus-visible { box-shadow: var(--focus); outline: none; }
.game-score { margin: 6px 0 0; font-size: 0.85rem; }
#game-toggle { margin-top: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .sketch path, .sketch rect { stroke-dasharray: 400; stroke-dashoffset: 400; animation: sketch 7s ease-in-out infinite; }
  .sketch .s2 { animation-delay: 0.4s; }
  .sketch .s3 { animation-delay: 0.9s; }
  .sketch .s4 { animation-name: sketch, sketchfill; animation-delay: 1.4s; }
  .sketch .s5 { animation-delay: 1.8s; }
  .sketch .s6 { animation-delay: 2.3s; }
}
@keyframes sketch { 0% { stroke-dashoffset: 400; opacity: 1; } 40%, 85% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes sketchfill { 0%, 35% { fill: rgba(244,196,48,0); } 50%, 85% { fill: rgba(244,196,48,1); } 100% { fill: rgba(244,196,48,0); } }
@media (max-height: 760px) { .sketch { width: 150px; } }
.work-bar { height: 6px; margin: 6px 0 4px; background: var(--rule); border-radius: 3px; overflow: hidden; max-width: 320px; }
.work-bar span { display: block; height: 100%; width: 0; background: var(--blueprint); border-radius: 3px; transition: width 0.25s linear; }
.work-meta { font-size: 0.78rem; color: var(--graphite); }
@media (prefers-reduced-motion: reduce) { .work-bar span { transition: none; } }
