:root {
  --paper: #f4f0e8;
  --paper-bright: #fbfaf7;
  --paper-deep: #eae5db;
  --ink: #1e2928;
  --muted: #64716e;
  --line: #d8d4cb;
  --line-strong: #c4c3bb;
  --green: #2f6a5b;
  --green-deep: #204d43;
  --green-soft: #dcebe3;
  --gold: #aa7b38;
  --gold-soft: #f3e8ca;
  --red: #a35b4d;
  --red-soft: #f3dfd9;
  --blue: #517689;
  --shadow: 0 16px 50px rgba(45, 51, 47, .08);
  font-family: "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: var(--paper); font-size: 17px; line-height: 1.52; }
button { color: inherit; font: inherit; }
button:focus-visible { outline: 3px solid rgba(47, 106, 91, .35); outline-offset: 2px; }

.prototype-ribbon { min-height: 28px; display: flex; align-items: center; justify-content: center; padding: 4px 16px; background: var(--ink); color: #e7eee9; font-size: 13px; letter-spacing: .04em; }
.app-shell { min-height: calc(100vh - 28px); display: flex; flex-direction: column; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 28px; background: var(--paper-bright); border-bottom: 1px solid var(--line); }
.brand-lockup, .topbar-actions, .rail-heading, .context-heading, .rail-section-heading, .button-row, .section-heading, .surface-meta, .surface-toolbar, .work-row, .language-switch { display: flex; align-items: center; }
.brand-lockup { min-width: 280px; gap: 12px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--paper-bright); background: var(--green-deep); font-family: Georgia, serif; font-size: 24px; font-weight: 700; }
.eyebrow { margin: 0; color: var(--muted); font-size: 12px; letter-spacing: .11em; line-height: 1.2; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 2px 0 0; font-family: Georgia, "Noto Serif TC", serif; font-size: 22px; line-height: 1.1; letter-spacing: -.015em; }
h2 { margin: 2px 0 0; font-family: Georgia, "Noto Serif TC", serif; font-size: 21px; line-height: 1.18; }
h3 { margin: 0; font-size: 19px; line-height: 1.28; }
.topbar-actions { gap: 14px; }
.rail-quick-actions { display: flex; align-items: center; gap: 5px; }
.rail-quick-button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--green-deep); cursor: pointer; font-size: 13px; font-weight: 700; }
.rail-quick-button:hover { border-color: var(--green); background: var(--green-soft); }
.rail-quick-button.hidden, .hidden { display: none !important; }
.language-switch { padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.language-button, .icon-button, .surface-add, .surface-tab, .rail-action, .project-item, .work-item, .mini-button, .text-button, .primary-button, .secondary-button, .chip-button, .mobile-context-bar button { border: 0; cursor: pointer; }
.language-button { padding: 6px 11px; border-radius: 999px; background: transparent; color: var(--muted); font-size: 14px; }
.language-button.active { background: var(--ink); color: var(--paper-bright); }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: transparent; color: var(--muted); font-size: 20px; }
.icon-button:hover { background: var(--paper-deep); color: var(--ink); }
.mobile-only { display: none; }

.surface-tabs { min-height: 56px; display: flex; align-items: end; gap: 4px; padding: 0 22px; overflow-x: auto; background: var(--paper-bright); border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.surface-tab, .surface-add { min-height: 48px; display: inline-flex; align-items: center; gap: 8px; padding: 0 13px; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); white-space: nowrap; font-size: 15px; }
.surface-tab { flex: 1 1 168px; min-width: 124px; max-width: 228px; min-height: 0; overflow: hidden; }
.surface-tab > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.surface-tab.dragging { opacity: .45; }
.surface-tab.drag-target { outline: 2px dashed var(--green); outline-offset: -3px; background: var(--green-soft); }
.surface-tab:hover, .surface-add:hover { color: var(--ink); background: var(--paper); }
.surface-tab.active { color: var(--green-deep); border-bottom-color: var(--green); font-weight: 700; }
.tab-icon { display: inline-grid; place-items: center; min-width: 18px; color: currentColor; font-size: 17px; }
.tab-close { margin-left: 2px; color: var(--line-strong); font-size: 17px; }
.surface-add { flex: 0 0 auto; position: sticky; right: 0; z-index: 1; margin-left: 6px; color: var(--green); background: var(--paper-bright); box-shadow: -8px 0 12px rgba(247,245,239,.92); }
.surface-add:hover { background: var(--paper); }

.workspace-body { min-height: 0; flex: 1; display: grid; --project-col: 246px; --context-col: 270px; grid-template-columns: var(--project-col) minmax(0, 1fr) var(--context-col); }
.workspace-body.project-compact { --project-col: 78px; }
.workspace-body.project-hidden { --project-col: 0px; }
.workspace-body.context-collapsed { --context-col: 62px; }
.workspace-body.context-hidden { --context-col: 0px; }
.project-rail, .context-rail { background: rgba(251, 250, 247, .64); }
.project-rail { padding: 25px 14px 16px 20px; border-right: 1px solid var(--line); }
.project-rail.hidden { display: none; }
.project-rail.compact { padding: 22px 8px 16px; }
.project-rail.compact .rail-heading { justify-content: center; padding: 0; }
.project-rail.compact .rail-heading > div, .project-rail.compact .rail-actions span:not(.action-symbol), .project-rail.compact .rail-label, .project-rail.compact .mini-button, .project-rail.compact .project-item small, .project-rail.compact .work-item small, .project-rail.compact .rail-footer span:not(.local-dot) { display: none; }
.project-rail.compact .rail-actions { margin: 20px 0; }
.project-rail.compact .rail-action, .project-rail.compact .project-item, .project-rail.compact .work-item { justify-content: center; padding-inline: 5px; }
.project-rail.compact .project-item strong, .project-rail.compact .work-item strong { overflow: hidden; width: 27px; height: 27px; border-radius: 8px; background: var(--paper-deep); color: transparent; font-size: 0; text-align: center; }
.project-rail.compact .project-item strong::after, .project-rail.compact .work-item strong::after { content: attr(data-initial); color: var(--ink); font-size: 16px; line-height: 27px; }
.project-rail.compact .project-item.active strong, .project-rail.compact .work-item.active strong { background: var(--green); color: white; }
.project-rail.compact .project-item.active strong::after, .project-rail.compact .work-item.active strong::after { color: white; }
.project-rail.compact .rail-footer { justify-content: center; margin-inline: 0; }
.rail-behavior { padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted); cursor: pointer; font-size: 11px; white-space: nowrap; }
.rail-behavior:hover { color: var(--green-deep); border-color: var(--green); }
.context-rail { padding: 25px 20px 18px; border-left: 1px solid var(--line); }
.context-rail.hidden { display: none; }
.rail-heading, .context-heading { justify-content: space-between; padding: 0 6px; }
.rail-actions { display: grid; gap: 3px; margin: 22px 0 24px; }
.rail-action { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 8px; background: transparent; color: var(--green-deep); text-align: left; font-size: 15px; }
.rail-action:hover { background: var(--green-soft); }
.action-symbol { width: 20px; color: var(--green); font-size: 20px; line-height: 1; text-align: center; }
.rail-section { padding-top: 17px; border-top: 1px solid var(--line); }
.rail-section + .rail-section { margin-top: 18px; }
.rail-label, .context-label { margin: 0 7px 8px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.project-item, .work-item { width: 100%; display: flex; gap: 9px; align-items: flex-start; padding: 9px 8px; border-radius: 9px; background: transparent; text-align: left; }
.project-item:hover, .work-item:hover { background: var(--paper-deep); }
.project-item.active, .work-item.active { background: var(--green-soft); }
.project-item strong, .work-item strong { display: block; font-size: 15px; font-weight: 700; line-height: 1.25; }
.project-item small, .work-item small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.25; }
.status-dot, .work-dot, .local-dot, .note-dot { flex: 0 0 auto; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(47, 106, 91, .12); }
.status-dot.quiet, .work-dot.paused { background: var(--line-strong); box-shadow: none; }
.work-dot.verified { background: var(--green); }
.current-work-section { padding-bottom: 12px; }
.rail-section-heading { justify-content: space-between; gap: 8px; }
.rail-section-heading .rail-label { margin-right: 0; }
.mini-button { padding: 3px 5px; background: transparent; color: var(--muted); font-size: 12px; }
.mini-button:hover { color: var(--green-deep); }
.rail-footer { display: flex; align-items: center; gap: 8px; margin: 30px 7px 0; color: var(--muted); font-size: 13px; }
.local-dot { width: 7px; height: 7px; margin: 0; background: var(--green); box-shadow: none; }

.active-surface { min-width: 0; padding: 34px clamp(26px, 4vw, 64px) 68px; overflow: auto; background: var(--paper); }
.surface-inner { width: min(930px, 100%); margin: 0 auto; }
.surface-kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--muted); font-size: 14px; }
.surface-kicker .rule { width: 32px; height: 1px; background: var(--line-strong); }
.hero-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; margin-bottom: 26px; }
.hero-heading h2 { max-width: 670px; font-size: clamp(31px, 4vw, 48px); letter-spacing: -.04em; }
.hero-heading p { max-width: 650px; margin: 12px 0 0; color: var(--muted); font-size: 18px; }
.hero-badge { flex: 0 0 auto; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.section-label { margin: 0 0 10px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.lead-copy { font-family: Georgia, "Noto Serif TC", serif; font-size: 25px; line-height: 1.4; letter-spacing: -.02em; }
.surface-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.surface-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.surface-card { padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper-bright); box-shadow: 0 8px 26px rgba(45, 51, 47, .035); }
.surface-card.soft { background: rgba(220, 235, 227, .45); border-color: #c2d8cd; }
.surface-card.warm { background: rgba(243, 232, 202, .44); border-color: #e2d4b4; }
.surface-card h3 { margin-bottom: 8px; }
.surface-card p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
.tiny { color: var(--muted); font-size: 13px; }
.button-row { flex-wrap: wrap; gap: 10px; }
.primary-button, .secondary-button, .chip-button { min-height: 44px; padding: 8px 16px; border-radius: 9px; font-size: 16px; font-weight: 700; }
.primary-button { background: var(--green-deep); color: white; }
.primary-button:hover { background: #173e35; }
.secondary-button { border: 1px solid var(--line-strong); background: var(--paper-bright); }
.secondary-button:hover { border-color: var(--green); color: var(--green-deep); }
.chip-button { min-height: 36px; padding: 5px 10px; border: 1px solid var(--line); background: var(--paper-bright); color: var(--muted); font-size: 14px; font-weight: 600; }
.chip-button.active { border-color: var(--green); background: var(--green-soft); color: var(--green-deep); }
.text-button { padding: 0; background: transparent; color: var(--green-deep); font-size: 14px; font-weight: 700; }
.text-button:hover { text-decoration: underline; }
.divider { height: 1px; margin: 26px 0; background: var(--line); }

.home-intro { max-width: 720px; padding-top: 4vh; }
.home-intro h2 { font-size: clamp(40px, 5vw, 66px); letter-spacing: -.05em; }
.home-intro .lead-copy { max-width: 620px; margin: 20px 0 30px; }
.home-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-bottom: 46px; }
.project-card { min-height: 160px; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }
.project-card .card-top { display: flex; justify-content: space-between; gap: 12px; }
.project-card h3 { font-family: Georgia, "Noto Serif TC", serif; font-size: 24px; }
.state-pill { padding: 4px 8px; border-radius: 999px; color: var(--green-deep); background: var(--green-soft); font-size: 12px; font-weight: 700; white-space: nowrap; }
.state-pill.paused { color: #735b31; background: var(--gold-soft); }
.project-card .card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }

.project-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 26px; }
.project-header h2 { font-size: clamp(36px, 5vw, 58px); letter-spacing: -.05em; }
.project-header p { margin: 9px 0 0; color: var(--muted); font-size: 18px; }
.project-mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; background: var(--green-deep); color: white; font-family: Georgia, serif; font-size: 30px; }
.state-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 22px; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: var(--paper-bright); }
.state-strip > div { padding: 17px 19px; border-right: 1px solid var(--line); }
.state-strip > div:last-child { border-right: 0; }
.state-strip strong { display: block; margin-top: 4px; font-family: Georgia, serif; font-size: 20px; }
.work-list { display: grid; gap: 8px; }
.work-row { justify-content: space-between; gap: 16px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-bright); }
.work-row .work-name { display: flex; align-items: center; gap: 11px; }
.work-row .work-name strong { font-size: 16px; }
.work-row small { color: var(--muted); font-size: 14px; }

.work-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 21px; }
.work-header h2 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -.045em; }
.work-header p { margin: 8px 0 0; color: var(--muted); }
.work-state-switcher { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; padding: 5px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper-deep); }
.work-state-switcher .chip-button { border: 0; background: transparent; }
.work-state-switcher .chip-button.active { background: var(--paper-bright); box-shadow: 0 2px 7px rgba(0,0,0,.07); }
.request-block { margin-bottom: 22px; padding: 20px 22px; border-left: 3px solid var(--green); background: var(--paper-bright); }
.request-block blockquote { margin: 0; font-family: Georgia, "Noto Serif TC", serif; font-size: 23px; line-height: 1.45; }
.now-band { display: flex; gap: 14px; align-items: flex-start; padding: 19px 21px; border: 1px solid #bdd4c8; border-radius: 13px; background: var(--green-soft); }
.now-mark { width: 37px; height: 37px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: var(--green-deep); color: white; font-weight: 800; font-size: 13px; }
.now-band p { margin: 2px 0 0; font-family: Georgia, "Noto Serif TC", serif; font-size: 22px; line-height: 1.35; }
.criteria { display: grid; gap: 10px; }
.criterion { display: grid; grid-template-columns: 33px minmax(0, 1fr); gap: 10px; align-items: start; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.criterion:last-child { border-bottom: 0; }
.criterion-num { color: var(--muted); font-family: Georgia, serif; font-size: 16px; }
.criterion strong { display: block; font-size: 16px; }
.criterion small { display: block; margin-top: 3px; color: var(--muted); font-size: 14px; }
.decision-box { margin-top: 21px; padding: 17px 19px; border: 1px solid #d6c89e; border-radius: 12px; background: var(--gold-soft); }
.decision-box h3 { margin-bottom: 4px; font-size: 18px; }
.decision-box p { margin-bottom: 13px; }
.approval-record { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 999px; background: var(--green-soft); color: var(--green-deep); font-size: 14px; font-weight: 700; }
.future-slot { margin-top: 20px; padding: 18px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); }
.future-slot strong { display: block; margin-bottom: 4px; color: var(--ink); }
.result-hero { display: flex; align-items: flex-start; gap: 17px; margin-bottom: 20px; padding: 20px 22px; border: 1px solid #bad2c5; border-radius: 14px; background: var(--green-soft); }
.result-hero.setback { border-color: #e2bcb3; background: var(--red-soft); }
.result-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--green-deep); color: white; font-size: 22px; }
.setback .result-icon { background: var(--red); }
.result-hero h3 { font-family: Georgia, "Noto Serif TC", serif; font-size: 28px; }
.result-hero p { margin: 5px 0 0; color: var(--muted); }
.pairing { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--paper-bright); }
.pairing-head, .pairing-row { display: grid; grid-template-columns: 1fr 1fr; }
.pairing-head { padding: 12px 17px; background: var(--ink); color: var(--paper-bright); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pairing-row { border-top: 1px solid var(--line); }
.pairing-row > div { min-width: 0; padding: 15px 17px; border-right: 1px solid var(--line); }
.pairing-row > div:last-child { border-right: 0; }
.pairing-row strong { display: block; font-size: 16px; }
.pairing-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 14px; }
.check-status { display: inline-flex; align-items: center; gap: 7px; padding: 4px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green-deep); font-size: 13px; font-weight: 700; }
.check-status.failed { background: var(--red-soft); color: #81433a; }
.check-status.unchecked { background: var(--paper-deep); color: var(--muted); }
.check-status.unverified { background: var(--gold-soft); color: #735b31; }
.evidence-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; color: var(--muted); font-size: 14px; }
.prototype-note { margin-top: 17px; padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,.45); color: var(--muted); font-size: 13px; }

.surface-toolbar { justify-content: space-between; gap: 12px; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.surface-launcher { position: fixed; top: 145px; right: 24px; z-index: 18; display: none; width: min(390px, calc(100vw - 32px)); max-height: calc(100vh - 165px); overflow: auto; }
.surface-launcher.open { display: block; }
.launcher-panel { padding: 19px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--paper-bright); box-shadow: 0 22px 60px rgba(30,41,40,.18); }
.launcher-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.launcher-head h2 { font-size: 27px; }
.launcher-hint { margin: 9px 0 18px; color: var(--muted); font-size: 14px; }
.launcher-group + .launcher-group { margin-top: 13px; }
.launcher-label { margin: 0 0 5px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.launcher-item { width: 100%; display: grid; grid-template-columns: 30px minmax(0,1fr) auto; gap: 9px; align-items: center; padding: 9px 8px; border: 0; border-radius: 9px; background: transparent; cursor: pointer; text-align: left; }
.launcher-item:hover { background: var(--green-soft); }
.launcher-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--paper-deep); color: var(--green-deep); }
.launcher-item strong, .launcher-item small { display: block; }
.launcher-item strong { font-size: 15px; }
.launcher-item small { color: var(--muted); font-size: 12px; }
.agent-layout, .context-truth-grid, .tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.agent-layout .surface-card h3, .context-truth-grid .surface-card p:last-child { margin-bottom: 0; }
.tool-row { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; gap: 7px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.tool-row:last-child { border-bottom: 0; }
.tool-check { color: var(--green); font-weight: 800; }
.tool-row small { color: var(--muted); font-size: 12px; }
.attention-panel, .start-panel { margin: 26px 0; padding: 19px 21px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper-bright); }
.attention-panel { background: rgba(243,232,202,.34); border-color: #e2d4b4; }
.attention-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-top: 1px solid var(--line); }
.attention-row p, .activity-card p { margin: 3px 0 0; color: var(--muted); }
.start-lanes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.start-lane { min-height: 112px; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-bright); cursor: pointer; text-align: left; }
.start-lane:hover { border-color: var(--green); background: var(--green-soft); }
.start-lane strong { font-size: 17px; }
.start-lane span { color: var(--muted); font-size: 14px; line-height: 1.4; }
.start-lane.soft { background: rgba(220,235,227,.52); }
.start-lane.advanced { background: rgba(243,232,202,.34); }
.activity-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.project-detail-grid { margin-top: 16px; }
.reality-card { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-top: 16px; }
.reality-card p { margin: 0 0 11px; color: var(--muted); }
.reality-card p:last-child { margin-bottom: 0; }
.stale-banner, .unknown-card { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin: 0 0 20px; padding: 17px 19px; border: 1px solid #e2c2b9; border-radius: 12px; background: var(--red-soft); }
.stale-banner p { margin: 4px 0 0; color: #81433a; }
.unknown-card { display: block; margin-top: 16px; background: rgba(243,232,202,.55); border-color: #e2d4b4; }
.unknown-card p { margin: 7px 0; }
.provenance-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 0 0 18px; padding: 11px 13px; border: 1px solid #c2d8cd; border-radius: 9px; background: rgba(220,235,227,.55); color: var(--green-deep); font-size: 14px; }
.provenance-strip span { padding-left: 9px; border-left: 1px solid #a8c6b8; }
.provenance-strip.stale { border-color: #e2c2b9; background: var(--red-soft); color: #81433a; }
.truth-list { display: grid; gap: 10px; margin-bottom: 17px; }
.truth-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 17px 19px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-bright); }
.truth-row p { margin: 0; }
.truth-row .section-label { margin-bottom: 6px; }
.truth-badge { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; color: var(--muted); background: var(--paper-deep); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.truth-badge.owner { color: var(--green-deep); background: var(--green-soft); }
.truth-badge.assumption { background: var(--gold-soft); color: #735b31; }
.truth-badge.external { background: #e2edf1; color: var(--blue); }
.entry-flow { max-width: 760px; }
.back-link { margin: 0 0 23px; border: 0; background: transparent; color: var(--green-deep); cursor: pointer; font-weight: 700; }
.step-progress { margin: -8px 0 18px; color: var(--muted); font-size: 14px; }
.prototype-input { width: 100%; min-height: 110px; margin: 4px 0 15px; padding: 12px; resize: vertical; border: 1px solid var(--line-strong); border-radius: 9px; background: white; color: var(--ink); font: inherit; }
.finding-list p, .unknown-list p { margin: 6px 0; }
.unknown-list { margin-top: 19px; padding-top: 14px; border-top: 1px solid var(--line); }
.import-counts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 10px 0 17px; }
.import-counts strong { padding: 13px; border-radius: 9px; background: var(--paper-bright); font-size: 23px; }
.import-counts span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 400; }
.import-options .surface-card { cursor: pointer; text-align: left; }
.import-options .surface-card:hover { border-color: var(--green); }
.modal-scrim { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 22px; background: rgba(30,41,40,.28); }
.close-prompt { width: min(500px,100%); padding: 25px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--paper-bright); box-shadow: 0 24px 80px rgba(30,41,40,.22); }
.close-prompt h3 { margin: 7px 0; font-family: Georgia, "Noto Serif TC", serif; font-size: 27px; }
.close-prompt p { margin-bottom: 17px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.surface-toolbar h2 { font-size: 27px; }
.surface-url { flex: 1; max-width: 440px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper-bright); color: var(--muted); font-size: 14px; }
.preview-frame { min-height: 470px; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 10px solid #273432; border-radius: 12px; background: #f6f3ea; box-shadow: var(--shadow); }
.preview-chrome { position: absolute; inset: 0 0 auto; display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; background: #273432; color: #cdd8d1; font-size: 12px; }
.preview-chrome span { width: 7px; height: 7px; border-radius: 50%; background: #8a9a91; }
.preview-content { width: min(520px, 78%); text-align: center; }
.preview-content .pixel-art { width: 150px; height: 110px; margin: 0 auto 22px; border: 7px solid #233d36; border-radius: 18px 18px 45px 45px; background: linear-gradient(135deg, #e8c78b 0 49%, #83a58e 49% 100%); box-shadow: 18px 12px 0 #d8a95e; transform: rotate(-3deg); }
.preview-content h3 { margin-bottom: 8px; font-family: Georgia, serif; font-size: 30px; }
.preview-content p { color: var(--muted); }
.terminal { min-height: 470px; padding: 24px; border-radius: 12px; background: #1f2a29; color: #d9e6dc; box-shadow: var(--shadow); font-family: "Cascadia Mono", Consolas, monospace; font-size: 15px; }
.terminal .terminal-title { margin-bottom: 25px; color: #8fb8a6; font-family: var(--font, sans-serif); font-size: 14px; }
.terminal-line { margin: 10px 0; white-space: pre-wrap; }
.terminal .prompt { color: #e5bc6d; }
.terminal .comment { color: #86a295; }
.browser-surface { min-height: 470px; padding: 38px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-bright); box-shadow: var(--shadow); }
.browser-surface .web-logo { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin-bottom: 16px; border-radius: 10px; background: var(--ink); color: white; font-weight: 800; }
.browser-surface h3 { max-width: 640px; margin-bottom: 11px; font-family: Georgia, serif; font-size: clamp(28px, 4vw, 42px); }
.browser-surface p { max-width: 620px; color: var(--muted); font-size: 18px; }
.surface-callout { margin-top: 28px; padding: 14px 15px; border-left: 3px solid var(--gold); background: var(--gold-soft); color: #604b29; font-size: 15px; }
.evidence-records { display: grid; gap: 10px; }
.evidence-record { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper-bright); }
.evidence-record strong { display: block; font-size: 16px; }
.evidence-record small { display: block; margin-top: 3px; color: var(--muted); font-size: 14px; }
.evidence-presenter { min-height: 220px; display: grid; place-items: center; padding: 25px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--paper-bright); }
.evidence-flow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px; color: var(--green-deep); font-weight: 700; text-align: center; }
.evidence-flow span { padding: 10px 12px; border: 1px solid #bdd4c8; border-radius: 9px; background: var(--green-soft); }
.evidence-flow b { color: var(--muted); }

.context-heading .icon-button { transform: rotate(180deg); transition: transform .2s ease; }
.context-rail.collapsed { padding-inline: 10px; }
.context-rail.collapsed .context-content, .context-rail.collapsed .context-heading .eyebrow, .context-rail.collapsed .context-heading h2 { display: none; }
.context-rail.collapsed .context-heading { justify-content: center; }
.context-rail.collapsed .context-heading .icon-button { transform: none; }
.context-block { padding: 18px 6px; border-bottom: 1px solid var(--line); }
.context-label { margin-left: 0; margin-right: 0; }
.context-value { margin: 0; font-family: Georgia, "Noto Serif TC", serif; font-size: 18px; line-height: 1.4; }
.accent-text { color: var(--green-deep); }
.context-evidence .text-button { margin-top: 9px; }
.context-note { display: flex; gap: 9px; margin: 21px 6px 0; color: var(--muted); font-size: 13px; }
.context-note p { margin: 0; }
.note-dot { width: 7px; height: 7px; margin-top: 8px; background: var(--gold); box-shadow: none; }
.mobile-context-bar { display: none; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 20; max-width: 360px; padding: 12px 15px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--ink); color: white; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; font-size: 14px; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; } }
@media (max-width: 1180px) {
  .workspace-body { --context-col: 0px; grid-template-columns: var(--project-col) minmax(0, 1fr) var(--context-col); }
  .context-rail { display: none; }
  .context-rail.hidden { display: none !important; }
  .project-rail.hidden { display: none !important; }
  .mobile-context-bar { display: block; position: fixed; right: 16px; bottom: 16px; z-index: 10; }
  .mobile-context-bar button { display: inline-flex; align-items: center; gap: 7px; padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper-bright); color: var(--green-deep); box-shadow: 0 8px 20px rgba(45,51,47,.12); font-size: 14px; font-weight: 700; }
  .surface-grid.three { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .prototype-ribbon { justify-content: flex-start; overflow: hidden; white-space: nowrap; font-size: 11px; }
  .topbar { height: 66px; padding: 0 15px; }
  .brand-lockup { min-width: 0; gap: 8px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; font-size: 20px; }
  .brand-lockup .eyebrow { display: none; }
  h1 { font-size: 18px; }
  .topbar-actions { gap: 5px; }
  .mobile-only { display: grid; }
  .surface-tabs { min-height: 50px; padding: 0 10px; }
  .surface-tab, .surface-add { min-height: 44px; padding-inline: 10px; font-size: 14px; }
  .surface-tab .tab-close { display: none; }
  .workspace-body { display: block; }
  .project-rail { position: fixed; inset: 94px auto 0 0; z-index: 12; width: min(300px, 88vw); padding-top: 18px; background: var(--paper-bright); transform: translateX(-102%); transition: transform .22s ease; box-shadow: 18px 0 45px rgba(0,0,0,.12); }
  .project-rail.open { transform: translateX(0); }
  .project-rail.hidden { display: none !important; }
  .context-rail { position: fixed; inset: 94px 0 auto auto; z-index: 12; width: 100vw; display: block; max-height: calc(100vh - 120px); overflow: auto; background: var(--paper-bright); transform: translateX(102%); transition: transform .22s ease; box-shadow: -18px 0 45px rgba(0,0,0,.12); }
  .context-rail.hidden { display: none !important; }
  .context-rail.open { transform: translateX(0); }
  .context-rail.collapsed { padding-inline: 20px; }
  .context-rail.collapsed .context-content, .context-rail.collapsed .context-heading .eyebrow, .context-rail.collapsed .context-heading h2 { display: block; }
  .context-rail.collapsed .context-content { display: none; }
  .context-rail.collapsed .context-heading { justify-content: space-between; }
  .mobile-context-bar { right: 12px; bottom: 12px; }
  .active-surface { min-height: calc(100vh - 144px); padding: 27px 16px 76px; }
  .hero-heading, .project-header, .work-header, .surface-toolbar { display: block; }
  .hero-badge, .project-mark { display: inline-flex; margin-top: 15px; }
  .hero-heading p { font-size: 17px; }
  .home-intro { padding-top: 2vh; }
  .home-intro h2 { font-size: 43px; }
  .lead-copy { font-size: 22px; }
  .surface-grid, .state-strip { grid-template-columns: 1fr; }
  .start-lanes, .import-counts { grid-template-columns: 1fr; }
  .attention-row, .activity-card, .reality-card, .stale-banner { align-items: flex-start; flex-direction: column; }
  .truth-row { flex-direction: column; }
  .state-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .state-strip > div:last-child { border-bottom: 0; }
  .surface-url { display: block; max-width: none; margin-top: 14px; }
  .surface-launcher { top: 113px; right: 10px; width: calc(100vw - 20px); }
  .agent-layout, .context-truth-grid, .tools-grid { grid-template-columns: 1fr; }
  .request-block blockquote { font-size: 21px; }
  .now-band p { font-size: 20px; }
  .pairing-head, .pairing-row { grid-template-columns: 1fr; }
  .pairing-head > div { padding: 4px 0; }
  .pairing-row > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .pairing-row > div:last-child { border-bottom: 0; }
  .evidence-footer, .evidence-record { align-items: flex-start; flex-direction: column; }
  .browser-surface, .terminal { min-height: 420px; padding: 25px 19px; }
  .preview-frame { min-height: 410px; }
}

/* Contest Phase C1: selected-project bounded read-only tree. */
.real-project-tree-surface { width: min(920px, 100%); }
.project-tree-source { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin: 8px 0 0; padding: 18px 0 20px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.project-tree-source h3 { margin: 3px 0; font-family: var(--serif); font-size: 34px; font-weight: 480; }
.project-tree-source p { margin: 0; color: var(--muted); }
.project-tree-source > span { flex: 0 0 auto; padding: 6px 9px; border: 1px solid rgba(47,107,89,.24); color: var(--green-deep); font-size: 13px; font-weight: 700; }
.project-tree-contract { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 14px 0; color: var(--muted); font-size: 13px; }
.project-tree-contract span::before { content: "✓"; margin-right: 6px; color: var(--green-deep); font-weight: 800; }
.project-tree-panel { border-top: 2px solid var(--green-deep); border-bottom: 1px solid var(--line); background: rgba(252,250,245,.7); }
.project-tree-root, .project-tree-row { display: grid; grid-template-columns: 23px minmax(0,1fr) auto; gap: 10px; align-items: center; }
.project-tree-root { padding: 13px 15px; border-bottom: 1px solid var(--line-strong); background: var(--green-soft); }
.project-tree-root > span:last-child { color: var(--muted); font-size: 12px; font-weight: 700; }
.project-tree-icon { display: inline-grid; place-items: center; color: var(--green-deep); }
.project-tree-icon .line-icon { width: 17px; height: 17px; }
.project-tree-list { margin: 0; padding: 0; list-style: none; }
.project-tree-list .project-tree-list { margin-left: 29px; border-left: 1px solid var(--line); }
.project-tree-row { min-height: 39px; padding: 6px 14px; border-bottom: 1px solid rgba(205,200,188,.62); }
.project-tree-list .project-tree-list .project-tree-row { padding-left: 13px; }
.project-tree-row:hover { background: rgba(220,233,226,.45); }
.project-tree-name { overflow-wrap: anywhere; font-family: "Cascadia Mono", Consolas, monospace; font-size: 14px; }
.project-tree-type { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.project-tree-more { padding: 9px 14px 10px 47px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.project-tree-truncation { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 12px; padding: 11px 14px; border-left: 3px solid #927039; background: var(--gold-soft); font-size: 13px; }
.project-tree-truncation span { color: var(--muted); }
.project-tree-boundary { margin-top: 18px; padding: 14px 16px; border-left: 3px solid var(--green-deep); background: var(--green-soft); }
.project-tree-boundary p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.project-tree-technical { margin-top: 14px; }
.project-tree-technical dl { margin: 10px 0 0; }
.project-tree-technical dl > div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.project-tree-technical dt { color: var(--muted); }
.project-tree-technical dd { margin: 0; overflow-wrap: anywhere; }
.project-tree-actions { margin-top: 19px; }
.project-tree-state { min-height: 360px; display: grid; place-content: center; justify-items: start; gap: 10px; margin-top: 10px; padding: 48px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.project-tree-state h3 { margin: 0; font-family: var(--serif); font-size: 31px; font-weight: 480; }
.project-tree-state p { max-width: 620px; margin: 0 0 8px; color: var(--muted); }
.project-tree-state-icon { color: var(--green-deep); }
.project-tree-state-icon .line-icon { width: 30px; height: 30px; }
.project-tree-empty { padding: 28px 16px; color: var(--muted); }

@media (max-width: 700px) {
  .project-tree-source, .project-tree-truncation { align-items: flex-start; flex-direction: column; }
  .project-tree-technical dl > div { grid-template-columns: 1fr; gap: 3px; }
  .project-tree-state { padding: 38px 12px; }
}

/* Contest Phase C2: fixed-command, local-only Git state. */
.git-local-surface { width: min(920px, 100%); }
.git-local-source { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-top: 8px; padding: 18px 0 20px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.git-local-source h3 { margin: 3px 0; font-family: var(--serif); font-size: 34px; font-weight: 480; }
.git-local-source p { margin: 0; color: var(--muted); }
.git-local-source > span { flex: 0 0 auto; padding: 6px 9px; border: 1px solid rgba(47,107,89,.24); color: var(--green-deep); font-size: 13px; font-weight: 700; }
.git-local-empty { min-height: 360px; display: grid; place-content: center; justify-items: start; gap: 10px; margin-top: 10px; padding: 48px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.git-local-empty > span:not(.discovery-pulse) { color: var(--green-deep); }
.git-local-empty .line-icon { width: 31px; height: 31px; }
.git-local-empty h3, .git-local-state h3, .git-local-hero h3 { margin: 0; font-family: var(--serif); font-size: clamp(28px,3vw,38px); font-weight: 480; }
.git-local-empty p, .git-local-state p, .git-local-hero p { max-width: 680px; margin: 3px 0 9px; color: var(--muted); }
.git-local-state { margin-top: 20px; padding: 28px 0; border-top: 2px solid #6f8197; border-bottom: 1px solid var(--line); }
.git-local-state > span { display: inline-grid; margin-bottom: 14px; color: var(--green-deep); }
.git-local-state .line-icon { width: 29px; height: 29px; }
.git-local-state.not-git { border-top-color: var(--line-strong); }
.git-local-state.unknown { border-top-color: #927039; }
.git-local-hero { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-top: 20px; padding: 24px 26px; border-top: 2px solid var(--green-deep); background: var(--green-soft); }
.git-local-hero.dirty { border-top-color: #927039; background: var(--gold-soft); }
.git-local-hero > span { color: var(--green-deep); }
.git-local-hero.dirty > span { color: #785d2e; }
.git-local-hero .line-icon { width: 38px; height: 38px; }
.git-local-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 18px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.git-local-grid section { display: grid; gap: 7px; min-height: 82px; padding: 16px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(252,250,245,.65); }
.git-local-grid span { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.git-local-grid strong { font-size: 18px; font-weight: 650; }
.git-local-grid code { font-size: 17px; }
.git-local-commit { padding: 17px 18px; border-bottom: 1px solid var(--line); }
.git-local-commit p:last-child { margin: 6px 0 0; font-family: var(--serif); font-size: 20px; }
.git-local-boundary { margin-top: 18px; padding: 14px 16px; border-left: 3px solid #6f8197; background: #e8edf1; }
.git-local-boundary p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.git-local-technical { margin-top: 14px; }
.git-local-technical dl { margin: 10px 0 0; }
.git-local-technical dl > div { display: grid; grid-template-columns: 145px 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.git-local-technical dt { color: var(--muted); }
.git-local-technical dd { margin: 0; overflow-wrap: anywhere; }
.git-local-actions { margin-top: 19px; }

@media (max-width: 700px) {
  .git-local-source, .git-local-hero { align-items: flex-start; flex-direction: column; }
  .git-local-grid { grid-template-columns: 1fr; }
  .git-local-technical dl > div { grid-template-columns: 1fr; gap: 3px; }
  .git-local-empty { padding: 38px 12px; }
}

/* Visual identity and Product Hunt polish v0.1 — presentation layer only. */
:root {
  --paper: #f2eee5;
  --paper-bright: #fffdfa;
  --paper-deep: #e9e5dc;
  --ink: #182724;
  --muted: #66736f;
  --line: rgba(37, 67, 59, .14);
  --line-strong: rgba(37, 67, 59, .24);
  --green: #2f6b59;
  --green-deep: #1c4a3e;
  --green-soft: #dce9e2;
  --gold: #9b6c2c;
  --gold-soft: #f2e7cc;
  --red: #985346;
  --red-soft: #f2dfd9;
  --shadow: 0 20px 60px rgba(31, 55, 48, .10), 0 2px 8px rgba(31, 55, 48, .05);
  --shadow-small: 0 8px 24px rgba(31, 55, 48, .08), 0 1px 3px rgba(31, 55, 48, .05);
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", Georgia, serif;
}

body {
  background:
    radial-gradient(circle at 76% 4%, rgba(220, 233, 226, .44), transparent 32rem),
    radial-gradient(circle at 20% 90%, rgba(244, 232, 205, .35), transparent 34rem),
    var(--paper);
  color: var(--ink);
  font-size: 17px;
}

button { transition: color .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
button:active { transform: translateY(1px); }
button:focus-visible { outline: 3px solid rgba(47, 107, 89, .28); outline-offset: 3px; }
.line-icon { display: block; width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.control-icon { display: inline-grid; flex: 0 0 auto; place-items: center; width: 19px; height: 19px; }
.control-icon .line-icon { width: 19px; height: 19px; }

.prototype-ribbon {
  min-height: 30px;
  background: linear-gradient(90deg, #173d34, #244f43 52%, #173d34);
  color: #eaf2ed;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .065em;
}
.topbar {
  height: 82px;
  padding-inline: clamp(18px, 2.2vw, 34px);
  background: rgba(255, 253, 250, .92);
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,.8);
  backdrop-filter: blur(14px);
}
.brand-lockup { gap: 14px; }
.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 13px;
  background: linear-gradient(145deg, #285f50, #173f36);
  box-shadow: 0 8px 20px rgba(28, 74, 62, .18), inset 0 1px rgba(255,255,255,.16);
  font-family: var(--serif);
  font-size: 25px;
}
.eyebrow { color: #71807b; font-size: 12px; font-weight: 750; letter-spacing: .13em; }
h1, h2 { font-family: var(--serif); }
h1 { font-size: 23px; letter-spacing: -.02em; }
.topbar-actions { gap: 12px; }
.rail-quick-actions { gap: 7px; }
.rail-quick-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-color: var(--line);
  border-radius: 10px;
  background: rgba(242, 238, 229, .72);
  color: var(--green-deep);
  font-size: 13px;
}
.language-switch { padding: 4px; border-color: var(--line); background: var(--paper-deep); }
.language-button { min-width: 48px; padding: 6px 12px; font-size: 14px; font-weight: 700; }
.language-button.active { background: var(--green-deep); box-shadow: 0 2px 7px rgba(28,74,62,.18); }
.icon-button { width: 38px; height: 38px; border-radius: 11px; font-size: 19px; }
.icon-button:hover { background: var(--green-soft); color: var(--green-deep); }

.surface-tabs {
  min-height: 59px;
  gap: 5px;
  padding-inline: clamp(14px, 1.8vw, 28px);
  overflow-y: hidden;
  background: rgba(255, 253, 250, .88);
  box-shadow: inset 0 -1px var(--line);
}
.surface-tab, .surface-add {
  min-height: 49px;
  margin-top: 9px;
  padding-inline: 14px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 11px 11px 0 0;
  color: #6b7773;
  font-size: 15px;
}
.surface-tab:hover, .surface-add:hover { background: rgba(242,238,229,.72); color: var(--ink); }
.surface-tab.active {
  position: relative;
  border-color: var(--line-strong);
  background: var(--paper);
  color: var(--green-deep);
  box-shadow: 0 -5px 14px rgba(31,55,48,.055), inset 0 3px var(--green);
}
.surface-tab.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--paper); }
.tab-icon { min-width: 19px; font-size: 19px; }
.tab-close { width: 24px; height: 24px; display: grid; place-items: center; margin-left: 2px; border-radius: 50%; color: #89938f; }
.tab-close .line-icon { width: 14px; height: 14px; }
.tab-close:hover { background: rgba(28,74,62,.10); color: var(--green-deep); }
.surface-add { align-self: stretch; margin-left: 8px; border-radius: 10px; background: var(--paper-bright); box-shadow: -12px 0 18px rgba(255,253,250,.96); color: var(--green-deep); font-weight: 720; }

.workspace-body { --project-col: 258px; --context-col: 286px; }
.project-rail, .context-rail { background: rgba(250, 248, 243, .82); backdrop-filter: blur(10px); }
.project-rail { padding: 28px 15px 18px 21px; border-right-color: var(--line); }
.context-rail { padding: 28px 21px 20px; border-left-color: var(--line); }
.rail-heading, .context-heading { padding-inline: 5px; }
.rail-heading h2, .context-heading h2 { font-size: 23px; }
.rail-behavior { padding: 5px 8px; border-color: var(--line); background: rgba(255,253,250,.72); font-size: 11px; font-weight: 700; }
.rail-actions { gap: 4px; margin: 22px 0 25px; }
.rail-action { gap: 10px; padding: 9px 10px; border: 1px solid transparent; border-radius: 10px; font-size: 15px; font-weight: 680; }
.rail-action:hover { border-color: rgba(47,107,89,.15); background: var(--green-soft); }
.action-symbol { width: 20px; height: 20px; font-size: 19px; }
.rail-section { border-top-color: var(--line); }
.rail-label, .context-label { color: #78847f; font-size: 11px; letter-spacing: .12em; }
.project-item, .work-item { position: relative; gap: 10px; padding: 10px 9px; border: 1px solid transparent; border-radius: 11px; }
.project-item:hover, .work-item:hover { background: rgba(233,229,220,.78); }
.project-item.active {
  border-color: rgba(47,107,89,.18);
  background: linear-gradient(90deg, rgba(220,233,226,.96), rgba(220,233,226,.56));
  box-shadow: inset 3px 0 var(--green);
}
.work-item.active { border-color: rgba(47,107,89,.12); background: rgba(220,233,226,.55); }
.project-item strong, .work-item strong { font-size: 15px; }
.project-item small, .work-item small { margin-top: 3px; font-size: 13px; }
.status-dot, .work-dot { margin-top: 7px; }
.rail-footer { margin-top: 32px; }
.context-block { padding: 20px 7px; border-bottom-color: var(--line); }
.context-value { font-family: var(--serif); font-size: 19px; }

.active-surface {
  padding: 42px clamp(30px, 4.6vw, 74px) 76px;
  background:
    linear-gradient(90deg, rgba(255,253,250,.22), transparent 14%, transparent 86%, rgba(255,253,250,.22)),
    transparent;
}
.surface-inner { width: min(960px, 100%); }
.surface-kicker { margin-bottom: 20px; font-size: 14px; font-weight: 650; }
.surface-kicker .rule { width: 38px; background: var(--green); }
.hero-heading { margin-bottom: 30px; }
.hero-heading h2, .project-header h2, .work-header h2 { font-family: var(--serif); line-height: 1.08; }
.hero-heading h2 { font-size: clamp(36px, 4vw, 52px); }
.hero-heading p, .project-header p { color: #64716d; font-size: 18px; line-height: 1.6; }
.hero-badge { padding: 8px 11px; border-color: var(--line-strong); background: rgba(255,253,250,.62); font-weight: 700; }
.lead-copy { font-family: var(--serif); font-size: 27px; }
.section-label { color: #74817c; font-size: 11px; letter-spacing: .13em; }
.surface-grid { gap: 18px; }
.surface-card {
  padding: 23px;
  border-color: var(--line);
  border-radius: 16px;
  background: rgba(255,253,250,.84);
  box-shadow: none;
}
.surface-card:hover { border-color: var(--line-strong); }
.surface-card.soft { border-color: rgba(47,107,89,.19); background: rgba(220,233,226,.52); }
.surface-card.warm { border-color: rgba(155,108,44,.20); background: rgba(242,231,204,.54); }
.primary-button, .secondary-button, .chip-button { border-radius: 10px; }
.primary-button { background: linear-gradient(180deg, #24594b, #193f36); box-shadow: 0 8px 18px rgba(28,74,62,.16), inset 0 1px rgba(255,255,255,.14); }
.primary-button:hover { background: #163c33; box-shadow: 0 10px 22px rgba(28,74,62,.20); transform: translateY(-1px); }
.secondary-button { border-color: var(--line-strong); background: rgba(255,253,250,.9); box-shadow: 0 1px 2px rgba(31,55,48,.04); }
.secondary-button:hover { background: var(--green-soft); }
.chip-button.active { box-shadow: inset 0 0 0 1px rgba(47,107,89,.08); }

.home-intro { max-width: 750px; padding-top: 3vh; }
.home-intro h2 { font-family: var(--serif); font-size: clamp(43px, 5vw, 68px); }
.home-actions { margin-bottom: 50px; }
.project-card { min-height: 170px; }
.project-card h3 { font-family: var(--serif); font-size: 25px; }
.state-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid rgba(47,107,89,.13); }
.state-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.state-pill.paused { border-color: rgba(155,108,44,.16); }
.project-mark { border: 1px solid rgba(255,255,255,.18); background: linear-gradient(145deg, #2e6756, #183f35); box-shadow: 0 10px 24px rgba(28,74,62,.16); font-family: var(--serif); }
.project-header > .hero-badge { display: none; }
.state-strip { border-color: var(--line); border-radius: 15px; background: rgba(255,253,250,.82); box-shadow: 0 1px 2px rgba(31,55,48,.03); }
.state-strip > div { padding: 18px 20px; border-right-color: var(--line); }
.state-strip strong { font-family: var(--serif); font-size: 21px; }
.work-row { padding: 14px 15px; border-color: var(--line); border-radius: 12px; background: rgba(255,253,250,.82); }
.work-row:hover { border-color: var(--line-strong); }
.work-state-switcher { padding: 6px; border-color: var(--line); border-radius: 13px; }
.request-block { padding: 22px 24px; border-left-width: 4px; border-radius: 0 13px 13px 0; background: rgba(255,253,250,.82); }
.request-block blockquote, .now-band p { font-family: var(--serif); }
.now-band { border-color: rgba(47,107,89,.22); border-radius: 15px; }

.surface-toolbar { margin-bottom: 24px; padding-bottom: 16px; border-bottom-color: var(--line); }
.surface-toolbar h2 { font-size: 29px; }
.surface-url { border-color: var(--line); background: rgba(255,253,250,.75); }
.preview-frame {
  min-height: 480px;
  padding-top: 32px;
  border: 1px solid rgba(19,45,38,.38);
  border-radius: 17px;
  background: #f7f3e9;
  box-shadow: var(--shadow);
}
.preview-chrome { height: 32px; background: linear-gradient(90deg, #1c302b, #263d37); }
.terminal { border: 1px solid rgba(255,255,255,.08); border-radius: 16px; background: linear-gradient(145deg, #1d2c29, #162320); box-shadow: var(--shadow); }
.browser-surface { border-color: var(--line-strong); border-radius: 16px; background: rgba(255,253,250,.92); box-shadow: var(--shadow-small); }
.browser-surface h3 { font-family: var(--serif); }
.evidence-record { padding: 16px 17px; border-color: var(--line); border-radius: 13px; background: rgba(255,253,250,.84); }
.evidence-record:hover { border-color: var(--line-strong); }
.attention-panel, .start-panel { padding: 21px 23px; border-radius: 16px; background: rgba(255,253,250,.82); }
.attention-panel { border-color: rgba(155,108,44,.25); border-left: 4px solid var(--gold); background: rgba(242,231,204,.50); }
.reality-card, .activity-card { border-color: var(--line); }
.stale-banner, .unknown-card { border-color: rgba(152,83,70,.25); border-left: 4px solid var(--red); border-radius: 14px; }

.surface-launcher { top: 157px; right: 28px; width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 180px); }
.launcher-panel { padding: 22px; border-color: var(--line-strong); border-radius: 18px; background: rgba(255,253,250,.98); box-shadow: 0 28px 80px rgba(21,48,40,.22), 0 4px 14px rgba(21,48,40,.08); backdrop-filter: blur(20px); }
.launcher-head h2 { font-size: 30px; }
.launcher-hint { margin: 10px 0 20px; font-size: 15px; }
.launcher-group + .launcher-group { margin-top: 16px; }
.launcher-label { margin-bottom: 7px; font-size: 11px; letter-spacing: .14em; }
.launcher-item { grid-template-columns: 34px minmax(0,1fr) 22px; gap: 11px; padding: 10px; border: 1px solid transparent; border-radius: 11px; }
.launcher-item:hover { border-color: rgba(47,107,89,.14); background: rgba(220,233,226,.68); transform: translateX(2px); }
.launcher-icon { width: 32px; height: 32px; border-radius: 9px; background: var(--paper-deep); font-size: 18px; }
.launcher-item strong { font-size: 16px; }
.launcher-item small { font-size: 13px; }
.launcher-arrow { color: #7b8883; font-size: 17px; }
.toast { border-color: rgba(255,255,255,.12); border-radius: 12px; background: #172722; box-shadow: 0 16px 44px rgba(21,48,40,.22); }

@media (max-width: 1180px) {
  .workspace-body { --project-col: 236px; }
  .active-surface { padding-inline: clamp(26px, 5vw, 60px); }
}

@media (max-width: 1080px) {
  .state-strip { grid-template-columns: 1fr; }
  .state-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .state-strip > div:last-child { border-bottom: 0; }
  .surface-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar { height: 68px; padding-inline: 14px; }
  .brand-lockup { flex: 1 1 auto; min-width: 0; gap: 7px; }
  .brand-lockup h1 { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
  .brand-mark { width: 33px; height: 33px; border-radius: 10px; font-size: 20px; }
  .topbar-actions { flex: 0 0 auto; gap: 4px; }
  .rail-quick-actions { gap: 3px; }
  .rail-quick-button { width: 34px; min-height: 34px; justify-content: center; padding: 6px; }
  .rail-quick-button span[data-i18n] { display: none; }
  .language-switch { padding: 3px; }
  .language-button { min-width: 36px; padding: 5px 7px; font-size: 13px; }
  .icon-button { width: 34px; height: 34px; }
  .surface-tabs { min-height: 52px; padding-inline: 9px; }
  .surface-tab, .surface-add { min-height: 44px; margin-top: 7px; padding-inline: 11px; }
  .project-rail, .context-rail { inset-block-start: 98px; }
  .active-surface { min-height: calc(100vh - 150px); padding: 30px 17px 80px; }
  .home-intro h2 { font-size: 45px; }
  .lead-copy { font-size: 23px; }
  .surface-launcher { top: 119px; right: 10px; width: calc(100vw - 20px); max-height: calc(100vh - 136px); }
  .launcher-panel { padding: 18px; }
}

/* Visual truth and attention closure v0.1.2 — no interaction-model changes. */
:root {
  --brand-accent: var(--green);
  --brand-accent-deep: var(--green-deep);
  --truth-verified-ink: #31584c;
  --truth-verified-bg: #e3ece7;
  --truth-verified-border: #b9cdc3;
  --truth-unverified-ink: #745f39;
  --truth-unverified-bg: #f3ead6;
  --truth-unverified-border: #d9c69d;
  --attention-ink: #76501f;
  --attention-bg: #f4ead3;
  --attention-border: #d9bd85;
}

.tab-compact-label { display: none; }
.surface-tab.identity-compact .tab-full-label { display: none; }
.surface-tab.identity-compact .tab-compact-label { display: inline; }
.surface-tab.identity-compact { flex-basis: 112px; min-width: 92px; }
.surface-tab .tab-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.project-item { padding-left: 13px; }
.project-item.active {
  background: linear-gradient(90deg, rgba(220,233,226,.90), rgba(220,233,226,.38));
  box-shadow: inset 3px 0 var(--brand-accent);
}
.project-item > span { min-width: 0; }
.work-dot {
  width: 10px;
  height: 10px;
  border: 2px solid #7d8985;
  border-radius: 3px;
  background: transparent;
  box-shadow: none;
  transform: rotate(45deg);
}
.work-dot.verified {
  position: relative;
  width: 15px;
  height: 15px;
  margin-top: 3px;
  border: 1px solid var(--truth-verified-border);
  border-radius: 5px;
  background: var(--truth-verified-bg);
  color: var(--truth-verified-ink);
  transform: none;
}
.work-dot.verified::after { content: "✓"; position: absolute; inset: -3px 0 0 2px; font-size: 11px; font-weight: 900; }
.work-dot.paused { border-color: #9a927f; border-radius: 50%; background: transparent; transform: none; }

.state-pill::before { display: none; }
.evidence-record .state-pill { min-width: 92px; justify-content: center; border-width: 1px; border-style: solid; }
.evidence-record .state-pill::before { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 5px; font-size: 11px; font-weight: 900; }
.evidence-record .state-pill.verified { border-color: var(--truth-verified-border); background: var(--truth-verified-bg); color: var(--truth-verified-ink); }
.evidence-record .state-pill.verified::before { content: "✓"; background: #fff; }
.evidence-record .state-pill.unverified { border-color: var(--truth-unverified-border); background: var(--truth-unverified-bg); color: var(--truth-unverified-ink); }
.evidence-record .state-pill.unverified::before { content: "—"; border: 1px solid currentColor; background: transparent; }

.workspace-returning { padding-top: 0; }
.owner-priority { margin-top: 0; border-left-width: 4px; box-shadow: var(--shadow-small); }
.owner-priority .section-heading { align-items: flex-start; margin-bottom: 13px; }
.owner-priority .section-heading h2 { margin-top: 5px; font-size: clamp(31px, 3.2vw, 42px); }
.attention-count { display: grid; place-items: center; min-width: 38px; height: 38px; border: 1px solid var(--attention-border); border-radius: 12px; background: #fffaf0; color: var(--attention-ink); font-size: 18px; font-weight: 800; }
.resume-point { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 4px 0 10px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,253,250,.74); }
.resume-point .section-label { margin-bottom: 4px; }
.resume-point strong { font-size: 16px; }
.attention-row { border-top-color: rgba(116,80,31,.16); }
.attention-row > div { min-width: 0; }
.attention-kind { display: inline-block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.attention-kind.external { color: var(--attention-ink); }
.external-decision { margin-inline: -8px; padding-inline: 8px; border: 1px solid var(--attention-border); border-radius: 12px; background: rgba(255,249,236,.66); }
.consequence-button { min-height: 44px; padding: 8px 15px; border: 1px solid #987039; border-radius: 10px; background: #fffaf0; color: #684719; cursor: pointer; font-size: 16px; font-weight: 750; }
.consequence-button:hover { background: #f2dfba; box-shadow: 0 7px 16px rgba(118,80,31,.12); }
.returning-intro { max-width: 650px; padding-top: 12px; }
.returning-intro h2 { font-size: clamp(30px, 3.2vw, 42px); }
.returning-intro .lead-copy { margin: 12px 0 18px; color: var(--muted); font-family: inherit; font-size: 18px; }
.returning-bootstrap { margin-top: 18px; background: rgba(255,253,250,.55); box-shadow: none; }
.returning-bootstrap .start-lane { min-height: 94px; background: rgba(255,253,250,.62); }
.activity-state { max-width: 220px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; }

.context-rail .context-value { font-family: inherit; font-size: 16px; line-height: 1.5; }
.context-rail .context-block:first-child .context-value { color: var(--ink); font-weight: 750; }
.context-rail .accent-text { color: var(--brand-accent-deep); }
.context-note { color: #7a8581; }

.project-actions { margin-bottom: 25px; }
.project-actions .secondary-button { display: inline-flex; align-items: center; gap: 7px; }
.project-actions .line-icon { width: 17px; height: 17px; }
.evidence-summary { border-color: var(--truth-verified-border); background: rgba(227,236,231,.66); }
.technical-details { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.technical-details summary { color: var(--brand-accent-deep); cursor: pointer; font-size: 14px; font-weight: 750; }
.technical-details code { display: block; margin-top: 9px; padding: 9px 10px; overflow-wrap: anywhere; border-radius: 8px; background: var(--paper-deep); color: var(--muted); font-size: 13px; }
.recovery-card { border-color: rgba(155,108,44,.24); }
.consequence-summary p { margin-bottom: 14px; }
.consequence-summary p:last-child { margin-bottom: 0; padding: 11px 12px; border: 1px solid var(--attention-border); border-radius: 10px; background: var(--attention-bg); color: var(--attention-ink); }

.page-connection-state, .claim-note { display: flex; align-items: center; gap: 9px; margin: 0 0 18px; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 10px; background: rgba(255,253,250,.52); color: var(--muted); font-size: 14px; font-weight: 650; }
.page-connection-state .line-icon, .claim-note .line-icon { width: 18px; height: 18px; }
.claim-note { border-color: var(--truth-verified-border); background: rgba(227,236,231,.52); color: var(--truth-verified-ink); }
.evidence-modes { margin-bottom: 18px; }
.evidence-caption { margin: 18px 0 0; text-align: center; }
.instance-surface .web-logo + .section-label, .browser-surface .web-logo + .section-label { margin-top: 4px; }

.truth-row.assumption { border-style: dashed; border-color: rgba(102,115,111,.32); background: transparent; color: #66736f; }
.truth-row.assumption p:not(.section-label) { color: #78837f; }
.truth-badge.assumption { border: 1px dashed #a79c82; background: transparent; color: #7f745f; font-weight: 700; }
.truth-badge.observed { border: 1px solid var(--line-strong); background: var(--paper-deep); color: #53615d; }
.truth-badge.external { border: 1px solid #bccdd4; background: #edf3f5; }

@media (max-width: 1080px) {
  .resume-point { align-items: flex-start; flex-direction: column; }
  .owner-priority .section-heading h2 { font-size: 32px; }
}

@media (max-width: 760px) {
  .owner-priority { padding: 18px; }
  .owner-priority .section-heading h2 { font-size: 29px; }
  .attention-row { align-items: flex-start; }
  .external-decision { margin-inline: 0; }
  .consequence-button { width: 100%; }
  .evidence-record .state-pill { min-width: 0; }
}

/* Quiet Editorial Workbench — Owner-selected Direction B.
   Presentation only: existing shell, state, and interaction contracts remain unchanged. */
:root {
  --paper: #f6f3ec;
  --paper-bright: #fcfaf5;
  --paper-deep: #edeae2;
  --ink: #273446;
  --muted: #676d76;
  --line: rgba(42, 55, 74, .16);
  --line-strong: rgba(42, 55, 74, .28);
  --green: #536b88;
  --green-deep: #293b56;
  --green-soft: #e7ebf0;
  --brand-accent: #536b88;
  --brand-accent-deep: #293b56;
  --gold: #a27639;
  --gold-soft: #f2e7d2;
  --attention-ink: #6f5027;
  --attention-bg: #f2e7d2;
  --attention-border: #c7a56f;
  --shadow: 0 18px 50px rgba(37, 48, 65, .09);
  --shadow-small: 0 7px 22px rgba(37, 48, 65, .07);
}

body { background: var(--paper); color: var(--ink); }
button:focus-visible { outline-color: rgba(83, 107, 136, .35); }
.prototype-ribbon { background: #293b56; color: #f4f1e9; }
.topbar { height: 72px; background: var(--paper-bright); box-shadow: none; backdrop-filter: none; }
.brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid var(--green-deep);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--green-deep);
  font-weight: 500;
}
.brand-lockup h1 { font-size: 23px; font-weight: 450; }
.eyebrow { color: #747982; font-weight: 680; }
.rail-quick-button, .rail-behavior { border-radius: 2px; background: transparent; }
.language-switch { border-radius: 2px; background: var(--paper-deep); }
.language-button { border-radius: 1px; }
.language-button.active { background: var(--green-deep); box-shadow: none; }
.icon-button { border-radius: 2px; }

.surface-tabs { min-height: 55px; padding-inline: 24px; background: var(--paper-bright); box-shadow: inset 0 -1px var(--line); }
.surface-tab, .surface-add { min-height: 47px; margin-top: 7px; border-radius: 0; }
.surface-tab.active {
  border-color: transparent;
  background: var(--paper);
  color: var(--green-deep);
  box-shadow: inset 0 2px var(--green-deep);
}
.surface-tab.active::after { background: var(--paper); }
.surface-add { border-radius: 0; background: var(--paper-bright); box-shadow: -12px 0 18px var(--paper-bright); }
.tab-close { border-radius: 2px; }

.workspace-body { --project-col: 252px; --context-col: 278px; }
.project-rail { padding: 27px 16px 18px 20px; background: var(--paper-bright); }
.context-rail { padding: 27px 21px 20px; border-left-color: transparent; background: var(--paper); }
.project-rail, .context-rail { backdrop-filter: none; }
.rail-heading h2, .context-heading h2 { font-family: var(--serif); font-size: 24px; font-weight: 450; }
.rail-action, .project-item, .work-item { border-radius: 1px; }
.rail-action:hover, .project-item:hover, .work-item:hover { background: var(--paper-deep); }
.project-item.active {
  border-color: transparent;
  background: transparent;
  box-shadow: inset 2px 0 var(--green-deep);
}
.project-item.active strong { color: var(--green-deep); }
.work-item.active { border-color: transparent; background: #eeece6; }
.context-block { padding: 19px 0; }
.context-block:first-child { margin-top: 18px; border-top: 2px solid var(--green-deep); }
.context-rail .context-value { font-size: 16px; }

/* Phase B1: real local Preview projection. */
.real-preview-surface { width: min(1120px, 100%); }
.preview-truth-strip {
  display: grid;
  grid-template-columns: 1.05fr 1.25fr .7fr 1.5fr;
  margin: 0 0 18px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}
.preview-truth-strip > div { min-width: 0; padding: 13px 16px; border-right: 1px solid var(--line); }
.preview-truth-strip > div:first-child { padding-left: 0; }
.preview-truth-strip > div:last-child { border-right: 0; }
.preview-truth-strip span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.preview-truth-strip strong { display: block; font-size: 14px; font-weight: 620; line-height: 1.45; }
.preview-load-state { color: var(--muted); }
.preview-load-state.available { color: var(--green-deep); }
.preview-load-state.unavailable { color: var(--red); }
.preview-toolbar { margin-bottom: 14px; }
.preview-toolbar .button-row { margin-top: 0; }
.preview-toolbar a.secondary-button { display: inline-flex; align-items: center; text-decoration: none; }
.real-preview-frame { display: block; min-height: 480px; padding-top: 32px; background: #fff; }
.real-preview-frame iframe { display: block; width: 100%; height: 446px; border: 0; background: #fff; }
.preview-unavailable { min-height: 430px; padding: 70px clamp(28px, 8vw, 90px); text-align: left; }
.preview-unavailable > div { width: min(620px, 100%); }
.preview-unavailable h3 { margin: 7px 0 10px; color: var(--ink); font-family: var(--serif); font-size: clamp(27px, 4vw, 38px); font-weight: 480; }
.preview-unavailable p:not(.section-label) { color: var(--muted); font-size: 16px; }
.preview-start-details { align-self: center; margin: 0; }
.preview-start-details code { display: block; margin-top: 8px; padding: 10px 12px; background: var(--paper-deep); line-height: 1.6; }
.preview-boundary { margin: 12px 0 0; color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
  .preview-truth-strip { grid-template-columns: 1fr 1fr; }
  .preview-truth-strip > div:nth-child(2) { border-right: 0; }
  .preview-truth-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .preview-truth-strip > div:nth-child(3) { padding-left: 0; }
}

@media (max-width: 620px) {
  .preview-truth-strip { grid-template-columns: 1fr; }
  .preview-truth-strip > div { padding-left: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .preview-truth-strip > div:last-child { border-bottom: 0; }
}

/* Phase B2: real read-only existing-project discovery. */
.real-discovery-flow { width: min(920px, 100%); max-width: 920px; }
.discovery-select { margin-top: 6px; padding: 24px 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.discovery-select label { display: grid; gap: 4px; margin-bottom: 12px; color: var(--muted); font-size: 14px; }
.discovery-select label span { color: var(--ink); font-size: 17px; font-weight: 660; }
.discovery-path-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: stretch; }
.discovery-path-input { min-width: 0; font-family: "Cascadia Mono", Consolas, monospace; font-size: 14px; }
.discovery-contract { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.discovery-contract span::before { content: "✓"; margin-right: 6px; color: var(--green-deep); font-weight: 750; }
.discovery-error { margin-top: 16px; padding: 16px 18px; border-left: 3px solid var(--red); background: var(--red-soft); }
.discovery-error p { margin: 4px 0 0; color: var(--muted); }
.discovery-wait { min-height: 330px; display: grid; place-content: center; justify-items: start; padding: 50px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.discovery-wait h3 { margin: 6px 0 8px; font-family: var(--serif); font-size: 30px; font-weight: 480; }
.discovery-wait p:last-child { color: var(--muted); }
.discovery-pulse { width: 10px; height: 10px; margin-bottom: 18px; border-radius: 50%; background: var(--green-deep); box-shadow: 0 0 0 8px rgba(41,73,64,.08); }
.discovery-result-head { display: flex; justify-content: space-between; gap: 22px; align-items: end; margin-bottom: 18px; padding: 16px 0 20px; border-bottom: 1px solid var(--line-strong); }
.discovery-result-head h3 { margin: 2px 0; font-family: var(--serif); font-size: 35px; font-weight: 480; }
.discovery-result-head p:last-child { margin: 0; color: var(--muted); }
.discovery-result-head > span { padding: 6px 9px; border: 1px solid rgba(47,107,89,.24); color: var(--green-deep); font-size: 13px; font-weight: 680; }
.discovery-findings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.discovery-findings-grid section { min-height: 86px; padding: 14px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(252,250,245,.56); }
.discovery-findings-grid span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; letter-spacing: .07em; text-transform: uppercase; }
.discovery-findings-grid strong { font-size: 15px; line-height: 1.45; }
.discovery-command-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.discovery-command-grid section { padding: 16px 0; border-top: 2px solid #6f8197; }
.discovery-command-grid code { display: block; margin: 4px 0 6px; color: var(--ink); font-size: 16px; font-weight: 650; }
.discovery-command-grid small { color: var(--muted); font-size: 13px; }
.discovery-secret-note { display: flex; gap: 16px; margin-top: 18px; padding: 13px 15px; border-left: 3px solid var(--green-deep); background: var(--green-soft); font-size: 14px; }
.discovery-secret-note span { color: var(--muted); }
.discovery-technical { margin-top: 14px; }
.discovery-technical dl { margin: 10px 0 0; }
.discovery-technical dl > div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.discovery-technical dt { color: var(--muted); }
.discovery-technical dd { margin: 0; overflow-wrap: anywhere; }
.discovery-actions { margin-top: 22px; }
.discovery-source-line { display: flex; gap: 10px; align-items: baseline; padding: 11px 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.discovery-source-line span { color: var(--muted); font-size: 13px; }
.discovery-unknowns { margin-top: 22px; }
.discovery-unknowns h3, .discovery-next h3 { margin: 5px 0 14px; font-family: var(--serif); font-size: clamp(27px, 4vw, 37px); font-weight: 480; line-height: 1.2; }
.discovery-unknowns ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.discovery-unknowns li { padding: 13px 16px; border-left: 2px solid #c8b58f; background: #eee9df; }
.discovery-warning { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); }
.discovery-warning p { margin: 5px 0 0; color: var(--muted); }
.discovery-next { margin-top: 24px; padding: 22px 24px; border-top: 2px solid var(--green-deep); background: var(--green-soft); }
.discovery-next p:last-child { margin: 0; color: var(--muted); }

@media (max-width: 700px) {
  .discovery-path-row, .discovery-findings-grid, .discovery-command-grid { grid-template-columns: 1fr; }
  .discovery-path-row .primary-button { width: 100%; }
  .discovery-secret-note, .discovery-result-head { align-items: start; flex-direction: column; }
  .discovery-technical dl > div { grid-template-columns: 1fr; gap: 3px; }
}

.active-surface { padding: 32px clamp(30px, 4vw, 64px) 72px; background: transparent; }
.surface-inner { width: min(1000px, 100%); }
.surface-kicker .rule { background: var(--green-deep); }
.hero-heading h2, .project-header h2, .work-header h2 { color: #223149; font-weight: 430; }
.hero-heading h2 { font-size: clamp(34px, 3.8vw, 50px); }
.project-header h2 { font-size: clamp(40px, 4.3vw, 54px); }
.home-intro h2 { font-size: clamp(34px, 4vw, 50px); }
.lead-copy { font-size: 25px; }
.hero-badge { border-radius: 1px; }

.primary-button, .secondary-button, .chip-button, .consequence-button {
  border-radius: 2px;
  box-shadow: none;
}
.primary-button { background: var(--green-deep); }
.primary-button:hover { background: #1f3049; box-shadow: none; }
.secondary-button:hover { border-color: var(--green); background: var(--green-soft); color: var(--green-deep); }
.chip-button.active { border-color: var(--green); background: var(--green-soft); color: var(--green-deep); }

.surface-card, .project-card, .work-row, .evidence-record, .attention-panel, .start-panel,
.resume-point, .reality-card, .activity-card, .stale-banner, .unknown-card,
.page-connection-state, .claim-note, .browser-surface, .terminal, .preview-frame,
.launcher-panel, .launcher-item, .decision-box, .now-band, .result-hero, .pairing {
  border-radius: 2px;
}
.surface-card { background: rgba(252, 250, 245, .74); box-shadow: none; }
.surface-grid > .surface-card:not(.evidence-summary):not(.recovery-card):not(.consequence-summary) {
  padding: 17px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
}
.surface-grid > .evidence-summary { padding: 17px 20px; border: 0; border-top: 2px solid #6f8197; background: #e8edf1; }
.project-detail-grid > .recovery-card { padding: 18px 20px; border: 0; border-top: 1px solid #c8b58f; background: #eee9df; }
.project-detail-grid > .consequence-summary { padding: 18px 20px; border: 0; border-top: 1px solid var(--line-strong); background: transparent; }
.context-truth-grid > .surface-card, .tools-grid > .surface-card, .agent-layout > .surface-card {
  padding: 18px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
}
.state-strip { margin-bottom: 18px; padding: 13px 0; border: 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.state-strip > div { padding: 0 18px; }
.state-strip > div:first-child { padding-left: 0; }
.state-strip strong { font-family: inherit; font-size: 18px; font-weight: 520; }
.state-strip > div:first-child strong { font-weight: 720; }
.project-actions { margin-bottom: 25px; }
.project-header { margin-bottom: 20px; }
.project-header .hero-heading { margin-bottom: 0; }
.work-row { padding: 12px 0; border-width: 0 0 1px; background: transparent; }
.reality-card {
  align-items: start;
  padding: 17px 0;
  border-width: 1px 0 0;
  background: transparent;
}
.reality-card > div:first-child {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 28px;
}
.reality-card > div:first-child > .section-label,
.reality-card > div:first-child > .technical-details { grid-column: 1 / -1; }
.reality-card > div:first-child > .section-label { margin-bottom: -2px; }
.reality-card .technical-details { margin-top: 0; }
.evidence-record { border-color: var(--line); background: rgba(252, 250, 245, .78); }
.recovery-card { border-color: #c8b58f; background: #eee9df; }
.consequence-summary p:last-child { border-radius: 1px; background: var(--attention-bg); }
.owner-priority { border-left-color: var(--gold); background: rgba(242, 231, 210, .58); box-shadow: none; }
.attention-count { border-radius: 2px; }
.returning-bootstrap { background: transparent; }
.returning-bootstrap .start-lane { border-radius: 2px; background: rgba(252, 250, 245, .58); }
.activity-state, .state-pill, .approval-record, .check-status { border-radius: 2px; }
.truth-badge { border-radius: 1px; }
.truth-badge.owner { border: 1px solid rgba(83,107,136,.25); background: var(--green-soft); color: var(--green-deep); }
.truth-row { border-radius: 1px; }
.truth-row.assumption { background: transparent; }
.claim-note { border-color: var(--truth-verified-border); background: var(--truth-verified-bg); color: var(--truth-verified-ink); }
.surface-launcher { top: 143px; }
.launcher-panel { background: var(--paper-bright); box-shadow: var(--shadow); backdrop-filter: none; }
.launcher-item:hover { border-color: var(--line); background: var(--green-soft); transform: none; }
.toast { border-radius: 2px; background: #24344d; }

@media (max-width: 1080px) {
  .state-strip { padding: 0; }
  .state-strip > div { padding: 14px 0; }
  .reality-card > div:first-child { grid-template-columns: 1fr; }
  .reality-card > div:first-child > .section-label,
  .reality-card > div:first-child > .technical-details { grid-column: auto; }
}

@media (max-width: 760px) {
  .topbar { height: 68px; }
  .brand-mark { width: 33px; height: 33px; border-radius: 0; }
  .active-surface { padding: 28px 17px 80px; }
  .surface-launcher { top: 119px; }
}

/* Intent-first onboarding patch. Presentation and local mock state only. */
.returning-bootstrap [data-action="quick-play"] {
  border-style: dashed;
  background: transparent;
}
.returning-bootstrap [data-action="new-project-path"] {
  border-top: 2px solid var(--green-deep);
  background: var(--paper-bright);
}
.intent-onboarding { max-width: 860px; }
.intent-onboarding .hero-heading { margin-bottom: 25px; }
.intent-onboarding .hero-heading p { max-width: 720px; }
.intent-panel {
  padding: 26px 0 4px;
  border-top: 1px solid var(--line-strong);
}
.scratch-intent { border-top-style: dashed; }
.intent-label {
  display: block;
  margin-bottom: 14px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.15;
}
.intent-input {
  min-height: 176px;
  margin: 0 0 12px;
  padding: 18px 19px;
  border-radius: 2px;
  background: var(--paper-bright);
  font-size: 18px;
  line-height: 1.55;
}
.intent-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(83, 107, 136, .1); }
.intent-example, .intent-reassurance {
  max-width: 680px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 16px;
}
.intent-reassurance { padding-left: 14px; border-left: 2px solid var(--gold); color: var(--attention-ink); }
.onboarding-status, .decision-count {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.onboarding-status.ready { border-color: #c8b58f; background: #eee9df; color: var(--attention-ink); }
.organized-summary, .material-question, .setup-sheet {
  padding: 24px 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}
.organized-summary h3, .material-question h3, .setup-sheet h3, .scratch-ready h3 {
  margin: 5px 0 17px;
  color: #223149;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 450;
}
.summary-list, .setup-list { margin: 0; }
.summary-list > div, .setup-list > div {
  display: grid;
  grid-template-columns: minmax(150px, .34fr) minmax(0, 1fr);
  gap: 20px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}
.summary-list dt, .setup-list dt { color: var(--muted); font-size: 15px; font-weight: 700; }
.summary-list dd, .setup-list dd { margin: 0; font-size: 18px; line-height: 1.45; }
.assumption-row { border-top-style: dashed !important; background: transparent; }
.assumption-row dt span {
  display: block;
  width: fit-content;
  margin-top: 6px;
  padding: 3px 6px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.decision-count { border-color: #c8b58f; background: var(--attention-bg); color: var(--attention-ink); }
.decision-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.decision-options button {
  min-height: 74px;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--paper-bright);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.decision-options button:hover { border-color: var(--green); background: var(--green-soft); }
.quiet-actions { margin-top: 17px; }
.onboarding-actions { margin-top: 20px; }
.setup-list .unresolved-row { border-top-style: dashed; }
.setup-list .boundary-row { padding-inline: 13px; border-top: 1px solid #c8b58f; background: rgba(242, 231, 210, .58); }
.scratch-ready {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 25px 0;
  border-top: 1px dashed var(--line-strong);
  border-bottom: 1px dashed var(--line-strong);
}
.scratch-mark { color: var(--green); }
.scratch-mark .line-icon { width: 34px; height: 34px; }

@media (max-width: 900px) {
  .decision-options { grid-template-columns: 1fr; }
  .summary-list > div, .setup-list > div { grid-template-columns: 1fr; gap: 6px; }
}

@media (max-width: 560px) {
  .intent-input { min-height: 150px; font-size: 17px; }
  .onboarding-actions, .quiet-actions { align-items: stretch; }
  .onboarding-actions > *, .quiet-actions > * { width: 100%; }
}

/* Final bounded visual polish: retain the quiet editorial system while
   clarifying nested tool-page hierarchy and low-confidence states. */
.instance-surface h3 {
  margin: 4px 0 8px;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.2;
}

.instance-surface .surface-callout {
  border-left-color: var(--brand-accent);
  background: #e8edf1;
  color: #4f5e70;
}

.attention-kind + strong {
  margin-left: 10px;
}

.truth-row.assumption p:not(.section-label) {
  color: #59645f;
  font-weight: 500;
}

.check-status.failed {
  color: #70352f;
  font-weight: 750;
}

.result-hero.setback p {
  color: #6f413b;
  font-weight: 500;
}

/* Contest Phase A: one real, read-only evidence replay shared by three surfaces. */
.replay-marker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid var(--truth-verified-border);
  border-radius: 2px;
  background: var(--truth-verified-bg);
  color: var(--truth-verified-ink);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .01em;
}
.replay-marker .line-icon { width: 15px; height: 15px; }
.replay-card-heading, .replay-overview-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.replay-card-heading h3 { margin: 3px 0 0; }
.replay-source-line { margin: 15px 0 11px; font-size: 14px; }
.replay-result-line { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 14px; }
.replay-truth-note { margin: 0 0 12px; font-size: 13px; line-height: 1.55; }
.replay-unavailable {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 72px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
}
.replay-unavailable .line-icon { width: 19px; height: 19px; }
.replay-overview {
  margin-bottom: 18px;
  padding: 20px 0 18px;
  border-top: 2px solid var(--green-deep);
  border-bottom: 1px solid var(--line);
}
.replay-overview-main > div { display: grid; gap: 8px; }
.replay-overview-main h3 { margin: 0; font-family: var(--serif); font-size: 29px; font-weight: 450; }
.replay-overview-main p { margin: 0; }
.replay-summary { max-width: 700px; margin: 17px 0; font-size: 18px; }
.replay-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.replay-meta span { display: grid; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.replay-meta code, .replay-identities code, .provenance-grid code { color: var(--ink); font-size: 13px; }
.direction-comparison { margin-top: 18px; border-top: 1px solid var(--line-strong); }
.direction-head, .direction-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.direction-head { padding: 13px 16px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.direction-row { padding: 16px; border-top: 1px solid var(--line); }
.direction-row p { margin: 6px 0 0; line-height: 1.45; }
.criterion-id { color: var(--muted); font-size: 12px; font-weight: 750; }
.check-status.passed { color: var(--truth-verified-ink); font-weight: 750; }
.replay-details { margin-top: 20px; }
.replay-identities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin: 12px 0; }
.replay-identities span { display: grid; gap: 3px; color: var(--muted); font-size: 12px; }
.replay-source-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.replay-source-list li { display: grid; gap: 5px; padding-top: 10px; border-top: 1px solid var(--line); }
.replay-source-list code { overflow-wrap: anywhere; color: var(--muted); font-size: 12px; }
.real-provenance-block { margin-bottom: 26px; padding: 20px 0; border-top: 2px solid var(--green-deep); border-bottom: 1px solid var(--line); }
.real-provenance-block > .replay-truth-note { margin-top: 12px; }
.provenance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 16px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.provenance-grid > div { display: grid; gap: 5px; min-height: 72px; padding: 13px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper-bright); }
.provenance-grid span { color: var(--muted); font-size: 12px; font-weight: 700; }
.provenance-grid strong { overflow-wrap: anywhere; font-size: 14px; }
.prototype-context-label { margin: 0 0 10px; }

@media (max-width: 760px) {
  .replay-card-heading, .replay-overview-main, .replay-result-line { align-items: flex-start; flex-direction: column; }
  .replay-meta, .provenance-grid, .direction-head, .direction-row, .replay-identities { grid-template-columns: 1fr; }
  .direction-head span:last-child { display: none; }
}


/* Route C public-static local-only treatment. */
.public-local-only { border-style: solid; background: color-mix(in srgb, var(--paper, #f7f4ed) 88%, white); }
.public-local-only .section-label { color: var(--muted, #6d6a62); }
.public-mode-pill { display: inline-flex; margin-top: 12px; padding: 5px 9px; border: 1px solid currentColor; border-radius: 999px; color: var(--muted, #6d6a62); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
