:root {
  --paper: #f2ede3;
  --paper-soft: #faf7f0;
  --paper-deep: #e4ddd0;
  --ink: #171815;
  --ink-soft: #55564f;
  --muted: #858278;
  --line: rgba(23, 24, 21, 0.16);
  --line-strong: rgba(23, 24, 21, 0.34);
  --white: #fffdf7;
  --verm: #a64734;
  --verm-bright: #db674e;
  --green: #718367;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --header: 72px;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
body::before {
  position: fixed;
  z-index: 100;
  inset: 0;
  content: "";
  opacity: .28;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
}
[hidden] { display: none !important; }
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
#process-image:not([src]) { visibility: hidden; }
button, label, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, label:focus-within {
  outline: 2px solid var(--verm);
  outline-offset: 3px;
}

.app { min-height: 100svh; }
.offline-bar {
  position: fixed;
  z-index: 80;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 7px 20px;
  color: var(--white);
  background: var(--verm);
  text-align: center;
  font-size: 11px;
  letter-spacing: .04em;
}
.offline-bar button {
  flex: 0 0 auto;
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .72);
  color: inherit;
  background: none;
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}
.offline-bar button:disabled { opacity: .55; cursor: wait; }
.app-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  height: var(--header);
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(242, 237, 227, .9);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; width: max-content; align-items: center; gap: 12px; text-decoration: none; }
.brand-seal {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--ink);
  font-family: var(--serif);
  font-size: 17px;
}
.brand-name { display: grid; gap: 1px; font-family: var(--serif); font-size: 16px; letter-spacing: .19em; }
.brand-name small { color: var(--muted); font-family: var(--sans); font-size: 7px; letter-spacing: .2em; }
.primary-nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 42px); }
.primary-nav a { position: relative; padding: 25px 0 23px; color: var(--ink-soft); text-decoration: none; font-size: 12px; }
.primary-nav a::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; content: ""; background: var(--verm); transform: scaleX(0); transition: transform .28s ease; }
.primary-nav a:hover, .primary-nav a.is-active { color: var(--ink); }
.primary-nav a.is-active::after { transform: scaleX(1); }
.header-meta { display: flex; justify-self: end; align-items: center; gap: 20px; color: var(--muted); font-size: 10px; }
.header-meta span { letter-spacing: .08em; }
.header-meta b { color: var(--verm); font-family: var(--serif); font-size: 18px; font-weight: 500; }
.header-meta button { padding: 5px 0; border: 0; border-bottom: 1px solid var(--line-strong); background: transparent; cursor: pointer; font-size: 10px; }

.view { min-height: calc(100svh - var(--header)); animation: view-in .56s cubic-bezier(.22,1,.36,1) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: none; } }
.eyebrow { margin: 0 0 16px; color: var(--verm); font-size: 9px; font-weight: 650; letter-spacing: .23em; text-transform: uppercase; }
.ink-action, .outline-action {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: color .25s ease, background .25s ease, transform .25s ease;
}
.ink-action { color: var(--white); background: var(--ink); }
.outline-action { color: var(--ink); background: transparent; }
.ink-action:hover, .outline-action:hover { color: var(--white); background: var(--verm); border-color: var(--verm); transform: translateY(-2px); }
.ink-action:disabled { color: rgba(255,255,255,.42); background: #55564f; border-color: #55564f; cursor: not-allowed; transform: none; }
.ink-action span, .outline-action span { font-size: 12px; font-weight: 650; letter-spacing: .08em; }
.ink-action i, .outline-action i { font-family: var(--serif); font-size: 20px; font-style: normal; }
.text-button, .danger-text { padding: 5px 0; border: 0; border-bottom: 1px solid var(--line-strong); background: transparent; cursor: pointer; font-size: 11px; }
.danger-text { color: var(--verm); border-color: rgba(166,71,52,.4); }
.inline-error, .form-error { margin: 14px 0 0; color: var(--verm); font-size: 11px; line-height: 1.65; }
.form-note a, .data-notice a, .settings-form a { color: var(--verm); text-underline-offset: 3px; }
.data-notice { margin: 13px 0 0; color: var(--muted); font-size: 10px; line-height: 1.75; }
.data-notice strong { color: var(--ink-soft); font-weight: 650; }

/* Privacy */
.privacy-body { background: var(--paper-soft); }
.privacy-header { grid-template-columns: 1fr auto; }
.privacy-back { color: var(--ink-soft); font-size: 11px; text-decoration: underline; text-underline-offset: 4px; }
.privacy-page { width: min(980px, calc(100% - 40px)); margin: 0 auto; padding: clamp(64px, 9vw, 120px) 0 90px; }
.privacy-hero { max-width: 760px; margin-bottom: clamp(64px, 9vw, 110px); }
.privacy-hero h1 { margin: 0; font-family: var(--serif); font-size: clamp(38px, 6vw, 76px); font-weight: 500; letter-spacing: -.05em; line-height: 1.08; }
.privacy-hero > p:last-child { max-width: 680px; margin: 28px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.9; }
.privacy-section { display: grid; grid-template-columns: 72px 1fr; gap: clamp(20px, 4vw, 64px); padding: 38px 0 42px; border-top: 1px solid var(--line); }
.privacy-section > span { color: var(--verm); font-family: var(--serif); font-size: 14px; }
.privacy-section h2 { margin: -5px 0 18px; font-family: var(--serif); font-size: clamp(24px, 3vw, 34px); font-weight: 500; }
.privacy-section p { margin: 0 0 14px; color: var(--ink-soft); font-size: 13px; line-height: 1.9; }
.privacy-section b { color: var(--ink); }
.privacy-section a { color: var(--verm); font-size: 11px; text-underline-offset: 4px; }
.privacy-section .privacy-caveat { padding: 16px 18px; border-left: 2px solid var(--verm); background: rgba(166, 71, 52, .055); color: var(--ink); }
.privacy-footer { display: grid; grid-template-columns: 1fr minmax(240px, 300px); align-items: center; gap: 40px; padding-top: 46px; border-top: 1px solid var(--ink); }
.privacy-footer p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.privacy-footer .outline-action { text-decoration: none; }

/* Access */
.access-view { display: grid; grid-template-columns: minmax(360px, .92fr) minmax(520px, 1.08fr); }
.access-visual {
  position: relative;
  display: grid;
  min-height: calc(100svh - var(--header));
  place-items: center;
  overflow: hidden;
  color: var(--white);
  background: #181916;
}
.access-visual::before, .access-visual::after { position: absolute; content: ""; border: 1px solid rgba(255,255,255,.07); border-radius: 50%; }
.access-visual::before { width: 76vw; height: 76vw; max-width: 920px; max-height: 920px; }
.access-visual::after { width: 54vw; height: 54vw; max-width: 680px; max-height: 680px; }
.access-grid {
  position: relative;
  display: grid;
  width: min(54vh, 72%);
  aspect-ratio: 1;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  border: 1px solid rgba(255,255,255,.54);
  box-shadow: 0 0 80px rgba(105,137,176,.08);
}
.access-grid > span {
  position: relative;
  display: grid;
  place-content: center;
  gap: 6px;
  border-right: 1px solid rgba(255,255,255,.28);
  border-bottom: 1px solid rgba(255,255,255,.28);
  color: rgba(255,255,255,.64);
  font-family: var(--serif);
  font-size: clamp(13px, 1.3vw, 18px);
  letter-spacing: .1em;
  text-align: center;
  animation: palace-in .7s cubic-bezier(.22,1,.36,1) both;
}
.access-grid > span:nth-child(2) { animation-delay: .05s; }
.access-grid > span:nth-child(3) { animation-delay: .1s; }
.access-grid > span:nth-child(4) { animation-delay: .15s; }
.access-grid > span:nth-child(5) { animation-delay: .2s; }
.access-grid > span:nth-child(6) { animation-delay: .25s; }
.access-grid > span:nth-child(7) { animation-delay: .3s; }
.access-grid > span:nth-child(8) { animation-delay: .35s; }
.access-grid > span:nth-child(9) { animation-delay: .4s; }
@keyframes palace-in { from { opacity: 0; transform: scale(.84); } to { opacity: 1; transform: none; } }
.access-grid > span:nth-child(3n) { border-right: 0; }
.access-grid > span:nth-child(n+7) { border-bottom: 0; }
.access-grid small { font-family: var(--sans); font-size: 8px; font-weight: 400; letter-spacing: .08em; opacity: .48; }
.access-grid .grid-center { color: var(--white); background: rgba(166,71,52,.24); }
.axis { position: absolute; z-index: 4; background: var(--verm-bright); }
.axis-x { top: 50%; left: -9px; width: 18px; height: 1px; }
.axis-y { top: -9px; left: 50%; width: 1px; height: 18px; }
.scan-light { position: absolute; z-index: 3; inset: 0; overflow: hidden; pointer-events: none; }
.scan-light::before { position: absolute; top: -10%; bottom: -10%; left: -30%; width: 18%; content: ""; background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent); transform: skewX(-15deg); animation: access-scan 4.8s ease-in-out infinite; }
@keyframes access-scan { 0%, 18% { left: -30%; } 72%, 100% { left: 112%; } }
.access-visual > p { position: absolute; bottom: 6vh; left: clamp(24px, 5vw, 70px); margin: 0; color: rgba(255,255,255,.54); font-family: var(--serif); font-size: clamp(14px, 1.5vw, 20px); line-height: 1.7; letter-spacing: .08em; }
.access-panel { display: grid; width: min(590px, 100%); align-content: center; justify-self: center; padding: 60px clamp(34px, 7vw, 92px); }
.access-copy h1 { max-width: 520px; margin: 0; font-family: var(--serif); font-size: clamp(34px, 3.3vw, 52px); font-weight: 500; line-height: 1.34; letter-spacing: .025em; }
.access-copy > p:last-child { max-width: 490px; margin: 23px 0 36px; color: var(--ink-soft); font-size: 12px; line-height: 1.9; }
.access-tabs { display: flex; margin-bottom: 25px; border-bottom: 1px solid var(--line); }
.access-tabs button { position: relative; flex: 1; padding: 13px 4px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; }
.access-tabs button::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; content: ""; background: var(--verm); transform: scaleX(0); transition: transform .25s ease; }
.access-tabs button.is-active { color: var(--ink); }
.access-tabs button.is-active::after { transform: scaleX(1); }
.access-form { display: grid; gap: 16px; }
.access-form label, .settings-form label { display: grid; gap: 7px; }
.access-form label > span, .settings-form label > span { color: var(--muted); font-size: 9px; letter-spacing: .12em; }
.access-form input, .settings-form input {
  width: 100%;
  height: 49px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
}
.access-form input:focus, .settings-form input:focus { border-color: var(--verm); box-shadow: 0 1px 0 var(--verm); }
.access-form .ink-action { margin-top: 10px; }
.credential-username { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%) !important; opacity: 0 !important; pointer-events: none !important; }
.form-note, .reset-intro { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.7; }
.reset-intro { padding-bottom: 8px; font-size: 11px; }

/* Home */
.workspace-view { display: grid; grid-template-columns: minmax(380px, .9fr) minmax(560px, 1.1fr); }
.home-intro { display: flex; min-height: calc(100svh - var(--header)); flex-direction: column; justify-content: center; padding: 70px clamp(34px, 5vw, 76px); border-right: 1px solid var(--line); }
.home-intro h1 { max-width: 650px; margin: 0; font-family: var(--serif); font-size: clamp(38px, 3.6vw, 54px); font-weight: 500; line-height: 1.28; letter-spacing: .02em; }
.home-intro h1 span { display: block; white-space: nowrap; }
.home-lead { max-width: 590px; margin: 28px 0 42px; color: var(--ink-soft); font-size: 13px; line-height: 1.9; }
.principles { max-width: 610px; border-top: 1px solid var(--line); }
.principles p { display: grid; grid-template-columns: 42px 1fr; gap: 12px; margin: 0; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.principles b { color: var(--verm); font-family: var(--serif); font-size: 14px; font-weight: 500; }
.principles strong { margin-right: 8px; color: var(--ink); }
.upload-workspace { display: grid; min-height: calc(100svh - var(--header)); align-content: center; padding: 48px clamp(28px, 6vw, 90px); background: var(--paper-soft); }
.primer-heading { display: flex; width: min(500px, 100%); justify-content: space-between; margin: 0 auto 13px; color: var(--muted); font-size: 9px; letter-spacing: .16em; }
.primer-grid { position: relative; display: grid; width: min(500px, 100%); aspect-ratio: 1.55; grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(3,1fr); margin: 0 auto; overflow: hidden; border: 1px solid var(--ink); color: var(--white); background: #1a1b18; }
.primer-grid button { position: relative; display: grid; place-content: center; gap: 5px; border: 0; border-right: 1px solid rgba(255,255,255,.27); border-bottom: 1px solid rgba(255,255,255,.27); color: rgba(255,255,255,.55); background: transparent; text-align: center; cursor: pointer; transition: color .24s ease, background .24s ease; }
.primer-grid button:nth-child(3n) { border-right: 0; }
.primer-grid button:nth-child(n+7) { border-bottom: 0; }
.primer-grid button:hover, .primer-grid button.is-active { color: var(--white); background: rgba(166,71,52,.32); }
.primer-grid button span { font-family: var(--serif); font-size: 14px; letter-spacing: .08em; }
.primer-grid button small { font-size: 7px; letter-spacing: .08em; opacity: .58; }
.primer-scan { position: absolute; z-index: 4; top: 0; bottom: 0; width: 14%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.13), transparent); transform: skewX(-14deg); pointer-events: none; animation: primer-scan 5.5s ease-in-out infinite; }
@keyframes primer-scan { 0%, 20% { left: -20%; } 78%, 100% { left: 108%; } }
.primer-copy { width: min(500px, 100%); min-height: 36px; margin: 12px auto 22px; color: var(--muted); font-size: 9px; line-height: 1.65; }
.primer-copy strong { color: var(--verm); font-family: var(--serif); font-size: 12px; }
.drop-zone { display: grid; width: min(500px, 100%); min-height: 80px; grid-template-columns: 52px 1fr auto; align-items: center; gap: 16px; margin: 0 auto; padding: 13px 16px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); cursor: pointer; transition: color .25s ease, background .25s ease; }
.drop-zone:hover, .drop-zone.is-dragging { color: var(--white); background: var(--verm); }
.drop-index { display: grid; width: 43px; height: 43px; place-items: center; border: 1px solid currentColor; font-family: var(--serif); font-size: 12px; }
.drop-main { display: grid; gap: 4px; }
.drop-main strong { font-size: 12px; letter-spacing: .04em; }
.drop-main small { color: var(--muted); font-size: 8px; }
.drop-zone:hover .drop-main small { color: rgba(255,255,255,.65); }
.drop-zone > i { font-family: var(--serif); font-size: 20px; font-style: normal; }
.upload-preview { display: grid; width: min(500px, 100%); grid-template-columns: 78px 1fr auto; align-items: center; gap: 15px; margin: 0 auto; padding: 12px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.preview-image { position: relative; width: 78px; aspect-ratio: 1; overflow: hidden; background: var(--paper-deep); }
.preview-image img { width: 100%; height: 100%; object-fit: cover; }
.preview-grid { position: absolute; inset: 0; opacity: .72; background-image: linear-gradient(to right, transparent 33.1%, rgba(255,255,255,.8) 33.2%, rgba(255,255,255,.8) 33.6%, transparent 33.7%, transparent 66.2%, rgba(255,255,255,.8) 66.3%, rgba(255,255,255,.8) 66.7%, transparent 66.8%), linear-gradient(to bottom, transparent 33.1%, rgba(255,255,255,.8) 33.2%, rgba(255,255,255,.8) 33.6%, transparent 33.7%, transparent 66.2%, rgba(255,255,255,.8) 66.3%, rgba(255,255,255,.8) 66.7%, transparent 66.8%); }
.upload-preview > div:nth-child(2) { display: grid; gap: 6px; min-width: 0; }
.upload-preview strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.upload-preview small { color: var(--muted); font-size: 8px; line-height: 1.5; }
.upload-preview button { padding: 5px 0; border: 0; border-bottom: 1px solid var(--line-strong); background: transparent; cursor: pointer; font-size: 9px; }
.start-action { width: min(500px, 100%); margin: 18px auto 0; }
.upload-workspace .inline-error { width: min(500px, 100%); margin-right: auto; margin-left: auto; }

/* Process */
.process-view { display: grid; grid-template-columns: minmax(420px, 1fr) minmax(500px, .9fr); color: var(--white); background: #161714; }
.process-visual { position: sticky; top: var(--header); height: calc(100svh - var(--header)); overflow: hidden; background: #272923; }
.process-visual > img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.62) saturate(.78); transform: scale(1.02); }
.process-visual::after { position: absolute; inset: 0; content: ""; background: radial-gradient(circle at 50% 50%, transparent 25%, rgba(8,9,8,.46)); }
.process-grid { position: absolute; z-index: 2; inset: 0; opacity: .52; background-image: linear-gradient(to right, transparent 33.2%, rgba(255,255,255,.66) 33.25%, rgba(255,255,255,.66) 33.45%, transparent 33.5%, transparent 66.55%, rgba(255,255,255,.66) 66.6%, rgba(255,255,255,.66) 66.8%, transparent 66.85%), linear-gradient(to bottom, transparent 33.2%, rgba(255,255,255,.66) 33.25%, rgba(255,255,255,.66) 33.45%, transparent 33.5%, transparent 66.55%, rgba(255,255,255,.66) 66.6%, rgba(255,255,255,.66) 66.8%, transparent 66.85%); }
.process-beam { position: absolute; z-index: 3; right: 0; left: 0; height: 1px; background: var(--verm-bright); box-shadow: 0 0 22px 8px rgba(219,103,78,.22); animation: beam 3.2s ease-in-out infinite; }
@keyframes beam { 0%,100% { top: 8%; opacity: .35; } 50% { top: 92%; opacity: 1; } }
.process-stamp { position: absolute; z-index: 4; top: 34px; left: 38px; display: grid; gap: 3px; padding-left: 12px; border-left: 2px solid var(--verm-bright); }
.process-stamp span { font-family: var(--serif); font-size: 18px; letter-spacing: .12em; }
.process-stamp small { color: rgba(255,255,255,.46); font-size: 7px; letter-spacing: .22em; }
.process-copy { display: flex; min-height: calc(100svh - var(--header)); flex-direction: column; justify-content: center; padding: 64px clamp(36px, 6vw, 90px); }
.process-copy .eyebrow { color: #dc7c66; }
.process-copy h1 { max-width: 560px; margin: 0; font-family: var(--serif); font-size: clamp(36px, 4vw, 58px); font-weight: 500; line-height: 1.3; }
.process-copy > p:nth-of-type(2) { margin: 20px 0 32px; color: rgba(255,255,255,.56); font-size: 12px; }
.process-line { position: relative; margin: 0; padding: 0; list-style: none; }
.process-line::before { position: absolute; top: 15px; bottom: 15px; left: 5px; width: 1px; content: ""; background: rgba(255,255,255,.13); }
.process-line li { position: relative; display: grid; min-height: 58px; grid-template-columns: 12px 1fr auto; align-items: center; gap: 14px; color: rgba(255,255,255,.3); }
.process-line li > i { z-index: 1; width: 11px; height: 11px; border: 1px solid rgba(255,255,255,.34); border-radius: 50%; background: #161714; }
.process-line li > span { display: grid; gap: 4px; }
.process-line strong { font-size: 11px; font-weight: 550; }
.process-line small { font-size: 8px; }
.process-line b { font-size: 8px; font-weight: 400; letter-spacing: .1em; }
.process-line li.is-active { color: var(--white); }
.process-line li.is-active > i { border-color: var(--verm-bright); background: var(--verm-bright); box-shadow: 0 0 0 5px rgba(219,103,78,.13); }
.process-line li.is-done { color: rgba(255,255,255,.63); }
.process-line li.is-done > i { border-color: var(--green); background: var(--green); }
.process-note { margin: 29px 0 14px; padding-top: 17px; border-top: 1px solid rgba(255,255,255,.13); color: rgba(255,255,255,.38); font-size: 9px; line-height: 1.7; }
.process-copy .text-button { width: max-content; color: rgba(255,255,255,.72); border-color: rgba(255,255,255,.3); }

/* Explicit terminal state */
.terminal-view { display: grid; min-height: calc(100svh - var(--header)); grid-template-columns: minmax(360px,.72fr) minmax(540px,1.28fr); background: var(--paper-soft); }
.terminal-mark { position: relative; display: grid; min-height: calc(100svh - var(--header)); place-content: center; overflow: hidden; color: rgba(255,255,255,.88); background: #171815; text-align: center; }
.terminal-mark::before, .terminal-mark::after { position: absolute; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; content: ""; }
.terminal-mark::before { width: 70%; aspect-ratio: 1; inset: 15%; }
.terminal-mark::after { width: 110%; aspect-ratio: 1; inset: -5%; }
.terminal-mark > span { z-index: 1; font-family: var(--serif); font-size: clamp(100px,14vw,190px); font-weight: 400; line-height: 1; opacity: .88; }
.terminal-mark > i { z-index: 1; width: 1px; height: 62px; margin: 19px auto; background: var(--verm-bright); }
.terminal-mark > small { z-index: 1; max-width: 240px; overflow-wrap: anywhere; color: rgba(255,255,255,.42); font-size: 8px; letter-spacing: .18em; }
.terminal-copy { display: flex; max-width: 760px; flex-direction: column; justify-content: center; padding: 72px clamp(40px,8vw,120px); }
.terminal-copy h1 { max-width: 650px; margin: 0; font-family: var(--serif); font-size: clamp(42px,5vw,72px); font-weight: 500; line-height: 1.25; }
.terminal-copy > p:nth-of-type(2) { max-width: 620px; margin: 27px 0 40px; color: var(--ink-soft); font-size: 13px; line-height: 1.9; }
.terminal-copy dl { margin: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.terminal-copy dl > div { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 15px 0; }
.terminal-copy dl > div + div { border-top: 1px solid var(--line); }
.terminal-copy dt { color: var(--muted); font-size: 9px; }
.terminal-copy dd { margin: 0; font-size: 10px; }
.terminal-actions { display: grid; grid-template-columns: minmax(220px,1fr) auto; gap: 28px; align-items: center; margin-top: 34px; }
.terminal-actions .text-button { width: max-content; }

/* Feedback */
.feedback-view { display: grid; grid-template-columns: minmax(380px, .78fr) minmax(560px, 1.22fr); }
.section-heading { display: flex; min-height: calc(100svh - var(--header)); flex-direction: column; justify-content: center; padding: 72px clamp(34px, 7vw, 104px); border-right: 1px solid var(--line); }
.section-heading h1 { max-width: 630px; margin: 0; font-family: var(--serif); font-size: clamp(38px, 4.3vw, 65px); font-weight: 500; line-height: 1.28; }
.section-heading > p:last-child { max-width: 560px; margin: 27px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.9; }
.question-sheet { display: grid; align-content: center; padding: 54px clamp(28px, 6vw, 90px); background: var(--paper-soft); }
.question-sheet > ol { margin: 0; padding: 0; list-style: none; counter-reset: question; border-top: 1px solid var(--ink); }
.question-sheet > ol > li { display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding: 28px 0; border-bottom: 1px solid var(--ink); counter-increment: question; }
.question-sheet > ol > li::before { content: "0" counter(question); color: var(--verm); font-family: var(--serif); font-size: 18px; }
.question-copy p { max-width: 700px; margin: 0 0 21px; font-family: var(--serif); font-size: clamp(18px, 2vw, 25px); line-height: 1.65; }
.answer-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.answer-options label { position: relative; display: grid; min-height: 46px; place-items: center; background: var(--paper-soft); cursor: pointer; font-size: 10px; transition: color .2s ease, background .2s ease; }
.answer-options input { position: absolute; opacity: 0; }
.answer-options label:has(input:checked) { color: var(--white); background: var(--verm); }
.blind-boundary { display: grid; grid-template-columns: 62px 1fr; gap: 15px; margin: 22px 0; padding: 17px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.blind-boundary span { color: var(--verm); font-family: var(--serif); font-size: 15px; }
.blind-boundary p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.7; }
.feedback-decline { width: max-content; margin: 18px auto 0; }

/* Result */
.result-view { display: grid; grid-template-columns: minmax(430px, .94fr) minmax(620px, 1.06fr); align-items: start; }
.result-visual { position: sticky; top: var(--header); height: calc(100svh - var(--header)); overflow: hidden; color: var(--white); background: #252721; }
.result-visual > img { width: 100%; height: 100%; object-fit: cover; }
.result-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9,11,10,.42), transparent 33%, transparent 52%, rgba(9,10,9,.78)); }
.result-status { position: absolute; top: 37px; right: 38px; left: 38px; display: flex; justify-content: space-between; align-items: center; color: rgba(255,255,255,.64); font-size: 8px; letter-spacing: .14em; }
.result-status span::before { display: inline-block; width: 5px; height: 5px; margin-right: 7px; border-radius: 50%; content: ""; background: #9caf8d; box-shadow: 0 0 0 4px rgba(156,175,141,.17); }
.result-headline { position: absolute; right: clamp(28px, 5vw, 72px); bottom: 7vh; left: clamp(28px, 5vw, 72px); }
.result-headline p { margin: 0 0 13px; color: #efa08d; font-size: 9px; font-weight: 650; letter-spacing: .24em; }
.result-headline h1 { margin: 0; white-space: pre-line; font-family: var(--serif); font-size: clamp(35px, 4vw, 58px); font-weight: 500; line-height: 1.35; }
.result-article { min-height: calc(100svh - var(--header)); padding: clamp(54px, 7vw, 98px) clamp(34px, 7vw, 104px); background: var(--paper-soft); }
.result-lead { margin: 0; font-family: var(--serif); font-size: clamp(20px, 2.1vw, 29px); line-height: 1.7; }
.signal-list { display: grid; grid-template-columns: repeat(3, 1fr); margin: 42px 0 50px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.signal-list > div { min-height: 108px; padding: 18px 15px; border-right: 1px solid var(--line); }
.signal-list > div:last-child { border-right: 0; }
.signal-list dt { margin-bottom: 12px; color: var(--verm); font-size: 8px; letter-spacing: .15em; }
.signal-list dd { margin: 0; font-size: 11px; line-height: 1.65; }
.reading-sections { display: grid; gap: 0; }
.reading-section { display: grid; grid-template-columns: 42px 1fr; gap: 16px; padding: 27px 0; border-top: 1px solid var(--line); }
.reading-section > span { color: var(--verm); font-family: var(--serif); font-size: 21px; }
.reading-section h2 { margin: 0 0 10px; font-family: var(--serif); font-size: 20px; font-weight: 500; }
.reading-section p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.9; white-space: pre-line; }
.evidence-index { margin-top: 40px; padding: 38px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
.evidence-index > div:first-child { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.evidence-index h2 { max-width: 520px; margin: 0; font-family: var(--serif); font-size: 28px; font-weight: 500; line-height: 1.45; }
.evidence-index .outline-action { margin: 25px 0 30px; }
.evidence-summary { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); }
.evidence-summary article { padding: 18px 14px 0 0; border-right: 1px solid var(--line); }
.evidence-summary article + article { padding-left: 14px; }
.evidence-summary article:last-child { border-right: 0; }
.evidence-summary span { color: var(--verm); font-size: 8px; letter-spacing: .12em; }
.evidence-summary p { margin: 9px 0 0; color: var(--ink-soft); font-size: 9px; line-height: 1.7; }
.reality-checks { padding: 30px 0; border-bottom: 1px solid var(--line); }
.reality-checks ol { margin: 0; padding-left: 20px; color: var(--ink-soft); font-size: 11px; line-height: 1.8; }
.result-actions { display: flex; justify-content: space-between; padding-top: 30px; }

/* Evidence */
.evidence-view { padding: 42px clamp(22px, 4vw, 64px) 64px; color: var(--white); background: #171815; }
.evidence-heading { display: grid; grid-template-columns: 190px 1fr 190px; align-items: end; margin-bottom: 27px; }
.evidence-heading > div { text-align: center; }
.evidence-heading h1 { margin: 0; font-family: var(--serif); font-size: 29px; font-weight: 500; }
.evidence-heading .eyebrow { color: #de7a64; }
.back-button { width: max-content; padding: 7px 0; border: 0; border-bottom: 1px solid rgba(255,255,255,.3); color: rgba(255,255,255,.72); background: transparent; cursor: pointer; font-size: 11px; }
.back-button span { margin-left: 7px; }
.evidence-layout { display: grid; max-width: 1360px; grid-template-columns: minmax(480px, 1fr) minmax(380px, .65fr); gap: clamp(30px, 6vw, 90px); align-items: center; margin: 0 auto; }
.evidence-stage { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; background: #292b25; }
.evidence-stage > img { width: 100%; height: 100%; object-fit: cover; }
.evidence-wash { position: absolute; inset: 0; background: rgba(8,10,9,.14); transition: background .3s ease; }
.nine-grid { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(3,1fr); transition: opacity .3s ease; }
.nine-grid button { position: relative; padding: 12px; border: 0; border-right: 1px solid rgba(255,255,255,.73); border-bottom: 1px solid rgba(255,255,255,.73); color: var(--white); background: transparent; text-align: left; cursor: pointer; }
.nine-grid button:nth-child(3n) { border-right: 0; }
.nine-grid button:nth-child(n+7) { border-bottom: 0; }
.nine-grid button.is-signal { background: rgba(166,71,52,.23); }
.nine-grid button.is-signal::after { position: absolute; top: 11px; right: 11px; width: 6px; height: 6px; border-radius: 50%; content: ""; background: #ff967e; box-shadow: 0 0 0 4px rgba(255,150,126,.18); }
.nine-grid span { font-family: var(--serif); font-size: 12px; letter-spacing: .08em; }
.nine-grid small { display: block; margin-top: 6px; font-size: 7px; opacity: .74; }
.vector-svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.vector-svg path { fill: none; stroke: #ff8168; stroke-width: 1.6; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 5px rgba(255,102,75,.8)); stroke-dasharray: 180; animation: draw-vector 1.5s ease both; }
.vector-svg circle { fill: var(--white); stroke: var(--verm-bright); stroke-width: 1; vector-effect: non-scaling-stroke; }
.vector-svg text { fill: var(--white); font-family: var(--sans); font-size: 3px; paint-order: stroke; stroke: rgba(14,15,13,.82); stroke-width: 1.2px; }
@keyframes draw-vector { from { stroke-dashoffset: 180; } to { stroke-dashoffset: 0; } }
.evidence-stage[data-layer="vector"] .vector-svg { opacity: 1; }
.evidence-stage[data-layer="vector"] .nine-grid { opacity: .34; }
.evidence-stage[data-layer="vector"] .evidence-wash { background: rgba(8,10,9,.35); }
.evidence-stage[data-layer="color"] .evidence-wash { background: rgba(166,71,52,.18); mix-blend-mode: color; }
.evidence-inspector { align-self: center; }
.layer-tabs { display: grid; grid-template-columns: repeat(3,1fr); border-bottom: 1px solid rgba(255,255,255,.23); }
.layer-tabs button { position: relative; padding: 14px 5px; border: 0; color: rgba(255,255,255,.38); background: transparent; cursor: pointer; font-size: 10px; }
.layer-tabs button::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; content: ""; background: var(--verm-bright); transform: scaleX(0); transition: transform .25s ease; }
.layer-tabs button.is-active { color: var(--white); }
.layer-tabs button.is-active::after { transform: scaleX(1); }
.inspector-copy { min-height: 360px; padding-top: 34px; }
.inspector-copy .eyebrow { color: #de7a64; }
.inspector-copy h2 { margin: 0 0 18px; font-family: var(--serif); font-size: clamp(27px, 3vw, 42px); font-weight: 500; line-height: 1.4; }
.inspector-copy p { margin: 0; color: rgba(255,255,255,.56); font-size: 11px; line-height: 1.9; }
.inspector-list { margin: 25px 0 0; padding: 0; list-style: none; border-top: 1px solid rgba(255,255,255,.16); }
.inspector-list li { display: grid; grid-template-columns: 60px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.16); font-size: 9px; line-height: 1.6; }
.inspector-list b { color: #e58974; font-weight: 500; }
.candidate-note { margin: 0; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.16); color: rgba(255,255,255,.34); font-size: 8px; line-height: 1.7; }

/* Reports */
.reports-view, .account-view { padding-bottom: 80px; }
.compact-heading { min-height: auto; padding-top: 80px; padding-bottom: 60px; border-right: 0; border-bottom: 1px solid var(--line); }
.compact-heading h1 { font-size: clamp(38px, 4vw, 60px); }
.report-list { max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); }
.report-row { display: grid; grid-template-columns: 70px minmax(0,1fr) 170px 34px; align-items: center; gap: 20px; min-height: 112px; border-bottom: 1px solid var(--line); cursor: pointer; transition: padding .25s ease, background .25s ease; }
.report-row:hover { padding-right: 13px; padding-left: 13px; background: rgba(255,255,255,.34); }
.report-row time { color: var(--muted); font-size: 9px; line-height: 1.5; }
.report-row > div { display: grid; gap: 7px; min-width: 0; }
.report-row strong { overflow: hidden; font-family: var(--serif); font-size: 18px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.report-row small { color: var(--muted); font-size: 9px; }
.job-state { justify-self: end; padding: 6px 10px; border: 1px solid var(--line); font-size: 8px; letter-spacing: .1em; }
.job-state[data-state="complete"] { color: var(--green); border-color: rgba(113,131,103,.45); }
.job-state[data-state="failed"] { color: var(--verm); border-color: rgba(166,71,52,.4); }
.report-row > i { font-family: var(--serif); font-size: 18px; font-style: normal; }
.empty-state { max-width: 620px; margin: 90px auto; padding: 0 24px; text-align: center; }
.empty-state > span { font-family: var(--serif); font-size: 31px; }
.empty-state p { margin: 15px 0 25px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.empty-state .outline-action { width: 260px; margin: 0 auto; }

/* Account */
.account-layout { display: grid; max-width: 1180px; grid-template-columns: .72fr 1.28fr; gap: 80px; margin: 0 auto; padding: 65px clamp(22px, 5vw, 64px); }
.account-summary { position: sticky; top: calc(var(--header) + 35px); align-self: start; display: grid; gap: 13px; padding-bottom: 25px; border-bottom: 1px solid var(--ink); }
.account-summary > span { color: var(--muted); font-size: 9px; letter-spacing: .14em; }
.account-summary > strong { overflow-wrap: anywhere; font-family: var(--serif); font-size: 26px; font-weight: 500; }
.account-summary p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.account-summary b { color: var(--verm); font-family: var(--serif); font-size: 24px; font-weight: 500; }
.settings-form { display: grid; grid-template-columns: minmax(190px,.8fr) minmax(260px,1.2fr); gap: 24px 42px; padding: 0 0 48px; border-bottom: 1px solid var(--line); }
.settings-form + .settings-form { padding-top: 48px; }
.settings-form > div { grid-row: span 3; }
.settings-form > div > span { color: var(--verm); font-size: 8px; letter-spacing: .16em; }
.settings-form h2 { margin: 8px 0 10px; font-family: var(--serif); font-size: 25px; font-weight: 500; }
.settings-form p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.75; }
.settings-form .outline-action { min-height: 48px; }
.danger-zone { border-bottom: 0; }
.danger-action { min-height: 46px; padding: 0 18px; border: 1px solid var(--verm); color: var(--verm); background: transparent; cursor: pointer; font-size: 10px; transition: color .2s, background .2s; }
.danger-action:hover { color: var(--white); background: var(--verm); }
.account-view > .inline-error { max-width: 1180px; margin: 0 auto; padding: 0 64px; }

/* Utility */
.toast { position: fixed; z-index: 90; right: 26px; bottom: 26px; max-width: min(380px, calc(100vw - 40px)); padding: 14px 18px; color: var(--white); background: var(--ink); box-shadow: 0 15px 40px rgba(20,20,18,.24); font-size: 10px; line-height: 1.6; animation: toast-in .35s cubic-bezier(.22,1,.36,1); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.confirm-dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--ink); color: var(--ink); background: var(--paper-soft); }
.confirm-dialog::backdrop { background: rgba(14,15,13,.66); backdrop-filter: blur(4px); }
.confirm-dialog form { padding: 32px; }
.confirm-dialog form > span { color: var(--verm); font-size: 8px; letter-spacing: .18em; }
.confirm-dialog h2 { margin: 11px 0; font-family: var(--serif); font-size: 27px; font-weight: 500; }
.confirm-dialog p { margin: 0 0 28px; color: var(--muted); font-size: 10px; line-height: 1.75; }
.confirm-dialog form > div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.confirm-dialog form > div > button:first-child { border: 1px solid var(--line-strong); background: transparent; cursor: pointer; }

@media (max-width: 980px) {
  :root { --header: 64px; }
  .app-header { grid-template-columns: 1fr auto; padding: 0 22px; }
  .primary-nav { position: fixed; z-index: 60; right: 0; bottom: 0; left: 0; display: grid; height: 58px; grid-template-columns: repeat(3,1fr); gap: 0; border-top: 1px solid var(--line); background: rgba(250,247,240,.96); backdrop-filter: blur(18px); }
  .primary-nav a { display: grid; place-items: center; padding: 0; font-size: 10px; }
  .primary-nav a::after { top: -1px; bottom: auto; }
  .header-meta span { display: none; }
  .access-view, .workspace-view, .feedback-view, .result-view, .process-view, .terminal-view { grid-template-columns: 1fr; }
  .access-visual { min-height: 48svh; }
  .access-grid { width: min(70vw, 360px); }
  .access-visual > p { bottom: 28px; left: 26px; font-size: 14px; }
  .access-panel { width: 100%; min-height: 52svh; padding: 46px clamp(24px, 8vw, 70px) 70px; }
  .home-intro, .section-heading { min-height: auto; padding: 72px clamp(24px, 8vw, 70px); border-right: 0; border-bottom: 1px solid var(--line); }
  .upload-workspace, .question-sheet { min-height: auto; padding: 52px clamp(22px, 8vw, 70px) 90px; }
  .process-visual, .result-visual { position: relative; top: 0; height: min(70svh, 720px); }
  .process-copy { min-height: auto; padding: 58px clamp(28px, 8vw, 70px) 100px; }
  .terminal-mark { min-height: 38svh; }
  .terminal-copy { min-height: 54svh; max-width: none; padding: 58px clamp(28px,8vw,70px) 100px; }
  .result-article { min-height: auto; padding: 58px clamp(24px, 8vw, 70px) 100px; }
  .evidence-layout { grid-template-columns: 1fr; max-width: 720px; }
  .evidence-inspector { padding-bottom: 60px; }
  .inspector-copy { min-height: 260px; }
  .account-layout { grid-template-columns: 1fr; gap: 48px; padding-bottom: 110px; }
  .account-summary { position: static; }
}

@media (max-width: 640px) {
  .app-header { padding: 0 16px; }
  .brand-seal { width: 31px; height: 31px; }
  .brand-name { font-size: 14px; }
  .header-meta { gap: 12px; }
  .access-visual { min-height: 42svh; }
  .access-grid { width: min(72vw, 300px); }
  .access-visual > p { display: none; }
  .access-panel { min-height: 58svh; padding: 38px 22px 62px; }
  .access-copy h1 { font-size: 31px; }
  .access-copy > p:last-child { margin: 18px 0 27px; font-size: 11px; }
  .home-intro, .section-heading { padding: 55px 22px; }
  .home-intro h1 { font-size: clamp(30px, 9.2vw, 36px); }
  .section-heading h1 { font-size: 36px; }
  .home-lead { margin: 20px 0 30px; font-size: 11px; }
  .upload-workspace, .question-sheet { padding: 38px 18px 92px; }
  .primer-grid { aspect-ratio: 1.12; }
  .drop-zone { grid-template-columns: 44px 1fr auto; gap: 11px; padding: 11px 8px; }
  .drop-index { width: 38px; height: 38px; }
  .process-visual, .result-visual { height: 59svh; min-height: 420px; }
  .process-stamp { top: 23px; left: 21px; }
  .process-copy { padding: 44px 22px 92px; }
  .process-copy h1 { font-size: 34px; }
  .terminal-mark { min-height: 34svh; }
  .terminal-mark > span { font-size: 100px; }
  .terminal-mark > i { height: 38px; margin: 12px auto; }
  .terminal-copy { min-height: auto; padding: 44px 22px 96px; }
  .terminal-copy h1 { font-size: 36px; }
  .terminal-copy > p:nth-of-type(2) { margin: 20px 0 30px; font-size: 11px; }
  .terminal-actions { grid-template-columns: 1fr; gap: 16px; }
  .question-sheet > ol > li { grid-template-columns: 32px 1fr; padding: 23px 0; }
  .question-copy p { font-size: 18px; }
  .answer-options label { min-height: 48px; }
  .result-headline { right: 22px; bottom: 30px; left: 22px; }
  .result-headline h1 { font-size: 33px; }
  .result-status { top: 24px; right: 21px; left: 21px; }
  .result-status small { display: none; }
  .result-article { padding: 43px 21px 96px; }
  .result-lead { font-size: 20px; }
  .signal-list, .evidence-summary { grid-template-columns: 1fr; }
  .signal-list > div { min-height: auto; padding: 13px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .signal-list > div:last-child { border-bottom: 0; }
  .evidence-summary article, .evidence-summary article + article { padding: 15px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .evidence-summary article:last-child { border-bottom: 0; }
  .reading-section { grid-template-columns: 32px 1fr; }
  .evidence-index h2 { font-size: 24px; }
  .evidence-view { padding: 28px 14px 88px; }
  .evidence-heading { grid-template-columns: 1fr; align-items: start; }
  .evidence-heading > div { margin-top: 24px; text-align: left; }
  .evidence-heading h1 { font-size: 25px; }
  .evidence-layout { gap: 25px; }
  .inspector-copy { min-height: 235px; padding-top: 25px; }
  .inspector-copy h2 { font-size: 27px; }
  .compact-heading { padding-top: 55px; padding-bottom: 42px; }
  .report-list { padding: 0 18px 70px; }
  .report-row { grid-template-columns: 55px minmax(0,1fr) 26px; gap: 12px; }
  .job-state { display: none; }
  .report-row strong { font-size: 16px; }
  .account-layout { padding: 44px 20px 100px; }
  .settings-form { grid-template-columns: 1fr; gap: 20px; }
  .settings-form > div { grid-row: auto; }
  .account-view > .inline-error { padding: 0 20px; }
  .privacy-page { width: min(100% - 32px, 980px); padding-top: 56px; }
  .privacy-header { padding: 0 16px; }
  .privacy-section { grid-template-columns: 34px 1fr; gap: 12px; padding: 30px 0 34px; }
  .privacy-footer { grid-template-columns: 1fr; }
  .toast { right: 18px; bottom: 78px; left: 18px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
