:root {
  --ink: #13282b;
  --ink-soft: #526466;
  --ink-faint: #758486;
  --night: #0a2426;
  --night-soft: #143638;
  --paper: #f5f2eb;
  --paper-deep: #ece8df;
  --surface: #fffdf8;
  --surface-raised: #ffffff;
  --line: #d9d5ca;
  --line-strong: #bdb9ae;
  --accent: #d86749;
  --accent-dark: #b9482e;
  --accent-wash: #fae4dc;
  --sage: #3f806f;
  --sage-dark: #276152;
  --sage-wash: #dfece7;
  --gold: #c39445;
  --danger: #ad3f35;
  --danger-wash: #f8e3e0;
  --shadow-sm: 0 1px 2px rgba(15, 38, 39, .06), 0 6px 20px rgba(15, 38, 39, .04);
  --shadow-md: 0 16px 50px rgba(11, 35, 37, .12);
  --shadow-lg: 0 30px 90px rgba(4, 20, 21, .25);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 34px;
  --reader-font-size: 16px;
  --reader-line-height: 1.6;
  --reader-width: 68ch;
  --studio-font: Inter, "Avenir Next", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --studio-display: "Avenir Next", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --studio-ethiopic: "Noto Sans Ethiopic", "Nyala", var(--studio-font);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); color-scheme: light; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--studio-font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [contenteditable]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 3px;
}
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--studio-display); letter-spacing: -.035em; }
h1 { font-size: clamp(2.2rem, 5vw, 4.7rem); line-height: .98; }
h2 { font-size: clamp(1.4rem, 2.5vw, 2rem); line-height: 1.1; }
h3 { font-size: 1.1rem; line-height: 1.2; }
small { color: var(--ink-soft); }
code { font-family: "SFMono-Regular", Consolas, monospace; }

.eyebrow {
  margin-bottom: 10px;
  color: var(--sage-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1.2;
  text-transform: uppercase;
}
.primary-action, .secondary-action {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 750;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.primary-action { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(216, 103, 73, .22); }
.primary-action:hover:not(:disabled) { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 11px 26px rgba(216, 103, 73, .28); }
.secondary-action { border-color: var(--line); background: var(--surface); color: var(--ink); }
.secondary-action:hover:not(:disabled) { border-color: var(--sage); background: var(--sage-wash); transform: translateY(-1px); }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

/* Private entry */
.passkey-entry {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .72fr);
  align-items: center;
  gap: clamp(40px, 7vw, 120px);
  overflow: hidden;
  padding: clamp(32px, 7vw, 110px);
  background:
    radial-gradient(circle at 14% 8%, rgba(92, 162, 139, .18), transparent 34%),
    radial-gradient(circle at 82% 90%, rgba(216, 103, 73, .15), transparent 30%),
    var(--night);
  color: #f8f4eb;
}
.entry-orbit { position: absolute; border: 1px solid rgba(223, 236, 231, .11); border-radius: 50%; pointer-events: none; }
.entry-orbit-one { width: 510px; height: 510px; top: -280px; right: 20%; }
.entry-orbit-two { width: 760px; height: 760px; left: -480px; bottom: -470px; }
.entry-story, .passkey-card { position: relative; z-index: 1; }
.entry-story { max-width: 760px; }
.studio-mark, .studio-brand-mark {
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  letter-spacing: -.06em;
}
.studio-mark { width: 54px; height: 54px; margin-bottom: 58px; font-size: 25px; box-shadow: 0 18px 50px rgba(216, 103, 73, .28); transform: rotate(-4deg); }
.entry-kicker { margin-bottom: 20px; color: #92b8ab; font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.entry-story h1 { max-width: 820px; margin-bottom: 28px; color: #fffdf7; font-size: clamp(3.1rem, 6.5vw, 6.8rem); line-height: .91; letter-spacing: -.068em; }
.entry-intro { max-width: 610px; margin-bottom: 42px; color: #b9cbc7; font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.7; }
.entry-proof { display: flex; flex-wrap: wrap; gap: 10px 34px; color: #97aaa7; font-size: 13px; }
.entry-proof span { display: flex; align-items: baseline; gap: 8px; }
.entry-proof b { color: #fff; font-size: 23px; }
.passkey-card {
  width: 100%;
  max-width: 510px;
  justify-self: end;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: var(--radius-xl);
  padding: clamp(28px, 4.4vw, 58px);
  background: rgba(249, 247, 240, .98);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.passkey-card .eyebrow { color: var(--accent-dark); }
.passkey-card h2 { margin-bottom: 12px; font-size: clamp(2rem, 3vw, 2.8rem); }
.passkey-card > p:not(.eyebrow, .privacy-note, .entry-error) { margin-bottom: 28px; color: var(--ink-soft); }
.studio-passphrase { display: grid; gap: 8px; color: var(--ink); font-size: 13px; font-weight: 800; }
.studio-passphrase input {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  background: #fff;
  color: var(--ink);
}
.studio-passphrase input::placeholder { color: #929b99; }
.entry-submit { width: 100%; min-height: 56px; display: flex; justify-content: space-between; align-items: center; margin-top: 15px; padding-inline: 22px; border-radius: var(--radius-sm); }
.entry-submit span { font-size: 20px; }
.entry-error { margin: 10px 0 0; border-radius: 8px; padding: 10px 12px; background: var(--danger-wash); color: var(--danger); font-size: 13px; }
.passkey-fallback { margin-top: 23px; border-top: 1px solid var(--line); padding-top: 18px; }
.passkey-fallback summary { color: var(--ink-soft); cursor: pointer; font-size: 13px; font-weight: 700; }
.passkey-fallback button { width: 100%; min-height: 44px; margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; background: transparent; }
.privacy-note { margin: 24px 0 0; color: var(--ink-faint); font-size: 12px; font-weight: 650; }
.privacy-note > span { margin-right: 7px; color: var(--sage); font-size: 9px; }

/* Global Studio frame */
.studio-shell { min-height: 100svh; background: var(--paper); }
.studio-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  padding: 10px clamp(18px, 3vw, 48px);
  background: rgba(245, 242, 235, .92);
  backdrop-filter: blur(16px);
}
.studio-header-left, .studio-header-right { display: flex; align-items: center; min-width: 0; }
.studio-header-left { gap: 18px; }
.studio-header-right { justify-content: flex-end; gap: 14px; }
.studio-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
}
button.studio-brand:hover .studio-brand-mark { transform: rotate(-5deg) scale(1.04); }
.studio-brand-mark { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 9px; transition: transform .18s ease; }
.studio-brand-copy { display: grid; line-height: 1.05; }
.studio-brand-copy strong { font-size: 14px; letter-spacing: -.01em; }
.studio-brand-copy small { margin-top: 4px; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.header-divider { width: 1px; height: 25px; background: var(--line); }
.header-context { max-width: 36vw; overflow: hidden; color: var(--ink-soft); font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.private-session { display: flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.private-session i, .queue-live i, .home-guide-foot i { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sage) 12%, transparent); }
.avatar { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; background: var(--night); color: #fff; font-size: 13px; font-weight: 850; }
.sync-status { display: flex; align-items: center; gap: 10px; color: var(--sage-dark); font-size: 12px; }
.lease-state { max-width: 260px; overflow: hidden; border-left: 1px solid var(--line); padding-left: 10px; color: var(--ink-soft); text-overflow: ellipsis; white-space: nowrap; }

/* Review home */
.review-home { width: min(1480px, 100%); margin: 0 auto; padding: clamp(34px, 6vw, 88px) clamp(18px, 4vw, 62px) 80px; }
.home-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: clamp(36px, 5vw, 64px); }
.home-hero-copy { max-width: 790px; }
.home-hero h1 { max-width: 760px; margin-bottom: 24px; }
.home-hero-copy > p:last-child { max-width: 620px; margin-bottom: 0; color: var(--ink-soft); font-size: 18px; line-height: 1.65; }
.home-pulse { display: flex; align-items: center; padding-bottom: 9px; }
.home-pulse span { width: 60px; height: 60px; display: grid; place-items: center; margin-left: -10px; border: 4px solid var(--paper); border-radius: 50%; background: var(--night); color: #fff; font-size: 12px; font-weight: 850; box-shadow: var(--shadow-sm); }
.home-pulse span:nth-child(2) { background: var(--sage); }
.home-pulse span:nth-child(3) { background: var(--accent); font-family: var(--studio-ethiopic); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .6fr); gap: clamp(22px, 3vw, 42px); align-items: start; }
.device-boundary { display: flex; align-items: flex-start; gap: 10px; margin: -16px 0 28px; border: 1px solid #e4d2aa; border-radius: 12px; padding: 13px 15px; background: #fbf2dd; color: #715725; font-size: 13px; }
.device-boundary span { width: 20px; height: 20px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #d2a657; color: #fff; font-weight: 900; }
.work-queue, .home-guide { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.work-queue { padding: clamp(22px, 3vw, 38px); }
.queue-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.queue-header h2 { margin-bottom: 0; }
.queue-live { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; color: var(--ink-soft); font-size: 11px; font-weight: 750; }
.queue-search, .phrase-search {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  background: var(--paper);
  color: var(--ink-faint);
}
.queue-search:focus-within, .phrase-search:focus-within { border-color: var(--sage); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sage) 12%, transparent); }
.queue-search input, .phrase-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); }
.queue-search button, .phrase-search button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--paper-deep); color: var(--ink-soft); }
.queue-list { display: grid; gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; }
.queue-row {
  width: 100%;
  min-height: 132px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(150px, .42fr);
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  background: #fff;
  text-align: left;
  transition: border .18s ease, transform .18s ease, box-shadow .18s ease;
}
.queue-row:hover { border-color: color-mix(in srgb, var(--sage) 55%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.queue-row:disabled { cursor: wait; opacity: .72; transform: none; }
.queue-state { align-self: start; border-radius: 999px; padding: 6px 9px; background: var(--sage-wash); color: var(--sage-dark); font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.queue-state-re-review { background: var(--accent-wash); color: var(--accent-dark); }
.queue-copy { display: grid; gap: 7px; min-width: 0; }
.queue-copy > strong { font-size: 18px; letter-spacing: -.02em; }
.queue-copy > small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-meta { display: flex; flex-wrap: wrap; gap: 7px 18px; margin-top: 4px; color: var(--ink-soft); font-size: 12px; }
.queue-meta b { color: var(--ink); }
.queue-next { display: grid; align-self: stretch; align-content: space-between; justify-items: end; border-left: 1px solid var(--line); padding-left: 18px; text-align: right; }
.queue-next strong { color: var(--accent-dark); font-size: 13px; }
.queue-empty { min-height: 260px; display: grid; place-items: center; align-content: center; padding: 40px; text-align: center; }
.empty-mark { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 50%; background: var(--sage-wash); color: var(--sage); font-size: 22px; }
.queue-empty h3 { margin-bottom: 8px; }
.queue-empty p { max-width: 420px; margin-bottom: 0; color: var(--ink-soft); }
.queue-loading, .queue-error { min-height: 160px; display: grid; place-items: center; }
.queue-error { color: var(--danger); }
.home-guide { position: sticky; top: 94px; padding: clamp(24px, 3vw, 34px); background: var(--night); color: #fff; box-shadow: var(--shadow-md); }
.home-guide .eyebrow { color: #85b5a6; }
.home-guide h2 { margin-bottom: 28px; }
.home-guide ol { display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; }
.home-guide li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; }
.home-guide li > span { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.19); border-radius: 50%; color: #a9c6bd; font-size: 11px; font-weight: 850; }
.home-guide li strong { display: block; margin-bottom: 5px; font-size: 14px; }
.home-guide li p { margin-bottom: 0; color: #9fb2af; font-size: 12px; line-height: 1.55; }
.home-guide-foot { display: flex; align-items: center; gap: 9px; margin: 30px 0 0; border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; color: #a9b9b6; font-size: 11px; }

/* Proposal review */
.proposal-workspace { min-height: calc(100svh - 72px); background: var(--paper); }
.proposal-hero { padding: clamp(36px, 5vw, 74px) max(clamp(18px, 4vw, 64px), calc((100vw - 1600px) / 2)); background: var(--night); color: #fff; }
.proposal-hero .eyebrow { color: #89b6a9; }
.proposal-hero-top { min-height: 44px; display: flex; align-items: center; gap: 12px; margin-bottom: clamp(35px, 5vw, 68px); }
.back-button { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 7px 13px; background: transparent; color: #dbe7e3; font-weight: 750; }
.back-button:hover { background: rgba(255,255,255,.08); }
.proposal-revision { border-radius: 999px; padding: 7px 10px; background: rgba(255,255,255,.08); color: #9eb2ae; font: 700 10px "SFMono-Regular", Consolas, monospace; text-transform: uppercase; }
.proposal-hero-top .secondary-action { margin-left: auto; border-color: rgba(255,255,255,.23); background: #f8f4eb; }
.proposal-hero h1 { max-width: 940px; margin-bottom: 22px; color: #fff; }
.proposal-summary { max-width: 700px; margin-bottom: 40px; color: #b4c6c2; font-size: 17px; line-height: 1.65; }
.proposal-stats { max-width: 670px; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border-top: 1px solid rgba(255,255,255,.14); }
.proposal-stats div { display: flex; flex-direction: column-reverse; gap: 4px; border-right: 1px solid rgba(255,255,255,.14); padding: 20px 20px 0 0; }
.proposal-stats div + div { padding-left: 20px; }
.proposal-stats div:last-child { border-right: 0; }
.proposal-stats dt { color: #90a9a4; font-size: 10px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.proposal-stats dd { margin: 0; color: #fff; font-size: 27px; font-weight: 850; letter-spacing: -.04em; }
.proposal-layout { width: min(1680px, 100%); display: grid; grid-template-columns: 320px minmax(440px, 1fr) 350px; gap: 20px; align-items: start; margin: 0 auto; padding: 28px clamp(18px, 3vw, 42px) 70px; }
.phrase-rail, .phrase-stage, .notes-drawer { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.phrase-rail, .notes-drawer { position: sticky; top: 100px; max-height: calc(100svh - 122px); overflow: hidden; }
.phrase-rail { display: flex; flex-direction: column; padding: 22px 14px 14px; }
.phrase-rail-heading, .notes-drawer-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 0 8px; }
.phrase-rail-heading h2, .notes-drawer-heading h2 { margin-bottom: 0; font-size: 21px; }
.phrase-rail-heading > span, .notes-drawer-heading > span { min-width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: var(--paper-deep); color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.phrase-search { flex: 0 0 auto; margin: 20px 0 11px; background: #fff; }
.scope-filters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 9px; border-radius: 10px; padding: 4px; background: var(--paper-deep); }
.scope-filters button { min-width: 0; display: grid; gap: 2px; border: 0; border-radius: 8px; padding: 7px 4px; background: transparent; color: var(--ink-soft); font-size: 10px; font-weight: 750; }
.scope-filters button span { color: var(--ink-faint); font-size: 9px; }
.scope-filters button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.phrase-list { min-height: 0; display: grid; gap: 4px; overflow-y: auto; padding: 2px 2px 12px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.phrase-list > button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 0; border-radius: 10px; padding: 12px 11px; background: transparent; text-align: left; }
.phrase-list > button:hover { background: var(--paper); }
.phrase-list > button[aria-current="true"] { background: var(--sage-wash); color: var(--sage-dark); }
.phrase-list-copy { min-width: 0; display: grid; gap: 4px; }
.phrase-list-copy strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.phrase-list-copy small { font-size: 10px; }
.phrase-list > button[aria-current="true"] small { color: var(--sage-dark); opacity: .76; }
.phrase-empty { display: grid; justify-items: center; padding: 36px 12px; text-align: center; }
.phrase-empty p { margin-bottom: 13px; color: var(--ink-soft); font-size: 12px; }
.phrase-empty button { border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; background: #fff; font-size: 11px; font-weight: 750; }
.phrase-stage { min-height: 610px; padding: clamp(26px, 4vw, 52px); }
.phrase-stage-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 10px; }
.phrase-stage-header h2 { margin-bottom: 0; font-size: clamp(2rem, 4vw, 3.5rem); }
.scope-badge { flex: 0 0 auto; border-radius: 999px; padding: 8px 11px; font-size: 10px; font-weight: 850; letter-spacing: .04em; }
.scope-current { background: var(--sage-wash); color: var(--sage-dark); }
.scope-future { background: var(--accent-wash); color: var(--accent-dark); }
.phrase-context { max-width: 650px; margin: 16px 0 34px; color: var(--ink-soft); line-height: 1.65; }
.language-comparison { display: grid; gap: 12px; }
.language-card { min-height: 150px; display: grid; grid-template-rows: auto 1fr auto; gap: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px 22px; background: #fff; text-align: left; transition: border .18s ease, transform .18s ease, box-shadow .18s ease; }
.language-card:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.language-card[aria-pressed="true"] { border: 2px solid var(--sage); padding: 19px 21px; background: color-mix(in srgb, var(--sage-wash) 45%, #fff); }
.language-card-head { display: flex; justify-content: space-between; gap: 16px; }
.language-card-head strong { font-size: 13px; }
.language-card-head small { font: 750 9px "SFMono-Regular", Consolas, monospace; letter-spacing: .08em; }
.language-copy { align-self: center; color: var(--ink); font-size: clamp(1.15rem, 2vw, 1.55rem); font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.language-tig .language-copy { font-family: var(--studio-ethiopic); font-size: clamp(1.2rem, 2.15vw, 1.65rem); }
.language-select { color: var(--ink-faint); font-size: 10px; font-weight: 700; }
.language-card[aria-pressed="true"] .language-select { color: var(--sage-dark); }
.selection-receipt { display: grid; grid-template-columns: 38px 1fr; gap: 13px; margin-top: 24px; border-radius: 13px; padding: 16px; background: var(--paper); }
.selection-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--sage-wash); color: var(--sage); }
.selection-receipt strong { font-size: 12px; }
.selection-receipt p { margin: 4px 0 0; color: var(--ink-soft); font-size: 11px; }
.notes-drawer { padding: 22px; overflow-y: auto; }
.annotation-panel { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 22px; }
.annotation-panel h3 { margin-bottom: 7px; }
.annotation-panel > p { color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.annotation-panel label, .checkpoint-controls label { display: grid; gap: 7px; margin-top: 15px; color: var(--ink); font-size: 11px; font-weight: 800; }
.annotation-panel select, .annotation-panel textarea, .checkpoint-controls select, .checkpoint-controls input, .lease-banner input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
}
.annotation-panel textarea { min-height: 118px; resize: vertical; line-height: 1.5; }
.annotation-submit { width: 100%; margin-top: 12px; border-radius: 10px; }
.saved-annotations { margin-top: 27px; border-top: 1px solid var(--line); padding-top: 21px; }
.saved-annotations h3 { margin-bottom: 14px; font-size: 13px; letter-spacing: -.01em; }
.saved-annotations ol { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.saved-annotations li { border-radius: 10px; padding: 13px; background: var(--paper); }
.saved-annotations li > span { color: var(--accent-dark); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.saved-annotations li p { margin: 6px 0; font-size: 12px; line-height: 1.5; }
.saved-annotations li small { font-size: 9px; }
.notes-empty { display: grid; justify-items: center; padding: 22px 8px; color: var(--ink-faint); text-align: center; }
.notes-empty span { font-size: 22px; }
.notes-empty p { margin: 6px 0 0; font-size: 11px; }

/* Phone card flow */
.phone-flow {
  min-height: calc(100svh - 62px);
  padding: 0 14px 48px;
  background:
    radial-gradient(circle at 12% 3%, rgba(218, 103, 72, .18), transparent 26rem),
    linear-gradient(180deg, #082f30 0 355px, var(--paper) 355px);
  color: #fff;
  overflow: hidden;
}
.phone-flow-top {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}
.phone-flow-back {
  min-height: 38px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255,255,255,.05);
  color: #eaf3f0;
  font-size: 12px;
  font-weight: 800;
}
.phone-flow-run { justify-self: center; display: flex; align-items: center; gap: 7px; color: #a9c5bd; }
.phone-flow-run > span:first-child { color: #f19a7f; font-size: 15px; }
.phone-flow-run > span:last-child { display: grid; line-height: 1; }
.phone-flow-run small { margin-bottom: 4px; color: #86a9a0; font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.phone-flow-run strong { color: #fff; font-size: 13px; }
.phone-flow-streak { min-width: 43px; height: 35px; display: flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid rgba(241,154,127,.28); border-radius: 999px; background: rgba(241,154,127,.1); color: #f6a98f; }
.phone-flow-streak span { font-size: 10px; }
.phone-flow-streak strong { font-size: 12px; }
.phone-flow-progress { display: grid; grid-template-columns: 1fr auto; gap: 6px 15px; padding: 13px 5px 16px; }
.phone-flow-progress .eyebrow { margin-bottom: 6px; color: #88b4a8; }
.phone-flow-progress h1 { margin: 0; color: #fff; font-size: clamp(1.7rem, 8vw, 2.2rem); line-height: .98; }
.phone-flow-progress > span { align-self: end; color: #f1a086; font-size: 23px; font-weight: 900; letter-spacing: -.04em; }
.phone-flow-progress > p { grid-column: 1 / -1; margin: 0; color: #8faea6; font-size: 10px; }
.phone-flow-progress > p strong { color: #dcece7; }
.flow-meter { grid-column: 1 / -1; height: 5px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; }
.flow-meter i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #f4b067); transition: width .35s ease; }
.flow-scope {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 13px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 14px;
  padding: 4px;
  background: rgba(0,0,0,.13);
}
.flow-scope button { min-width: 0; min-height: 36px; display: flex; align-items: center; justify-content: center; gap: 5px; border: 0; border-radius: 10px; padding: 5px 4px; background: transparent; color: #89aaa2; font-size: 9px; font-weight: 800; white-space: nowrap; }
.flow-scope button span { color: #6f9289; font-size: 8px; }
.flow-scope button[aria-pressed="true"] { background: #f5f0e7; color: #123536; box-shadow: 0 5px 15px rgba(0,0,0,.18); }
.flow-scope button[aria-pressed="true"] span { color: var(--accent-dark); }
.flow-deck { position: relative; min-height: 410px; margin: 0 3px; perspective: 1100px; }
.flow-card {
  border: 1px solid rgba(16, 55, 55, .14);
  border-radius: 28px;
  background: #fffdf8;
  box-shadow: 0 24px 55px rgba(4, 27, 28, .18);
}
.flow-card-back { position: absolute; inset: 0; pointer-events: none; }
.flow-card-back-two { transform: translateY(18px) scale(.92); background: #d7e3dc; opacity: .58; }
.flow-card-back-one { transform: translateY(10px) scale(.96); background: #edf0e8; opacity: .86; }
.flow-card-active { position: relative; z-index: 2; min-height: 390px; display: flex; flex-direction: column; padding: 18px 15px 13px; color: var(--ink); transform-origin: 50% 95%; transition: transform .19s ease, opacity .19s ease; }
.flow-forward .flow-card-active { transform: translateX(-115%) rotate(-7deg); opacity: .15; }
.flow-back .flow-card-active { transform: translateX(115%) rotate(7deg); opacity: .15; }
.flow-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.flow-card-heading p { margin: 0 0 4px; color: var(--sage-dark); font-size: 10px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.flow-card-heading h2 { margin: 0; font-size: clamp(1.65rem, 8vw, 2.2rem); line-height: 1; overflow-wrap: anywhere; }
.flow-scope-badge { flex: 0 0 auto; max-width: 90px; border-radius: 999px; padding: 7px 9px; font-size: 8px; font-style: normal; font-weight: 900; text-align: center; }
.flow-context { margin: 0 0 14px; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.flow-languages { display: grid; gap: 6px; }
.flow-language { min-height: 76px; display: grid; grid-template-columns: 1fr; gap: 4px; border: 1px solid var(--line); border-radius: 14px; padding: 9px 11px; background: #fff; color: var(--ink); text-align: left; transition: border .16s ease, background .16s ease, transform .16s ease; }
.flow-language > span { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.flow-language > span strong { font-size: 10px; }
.flow-language > span small { color: var(--ink-faint); font: 800 10px "SFMono-Regular", Consolas, monospace; }
.flow-language > b { align-self: center; font-size: 14px; line-height: 1.28; overflow-wrap: anywhere; }
.flow-language-tig > b { font-family: var(--studio-ethiopic); font-size: 15px; }
.flow-language > em { color: var(--ink-faint); font-size: 10px; font-style: normal; font-weight: 800; }
.flow-language[aria-pressed="true"] { border: 2px solid var(--sage); padding: 8px 10px; background: color-mix(in srgb, var(--sage-wash) 56%, #fff); transform: translateX(2px); }
.flow-language[aria-pressed="true"] > em { color: var(--sage-dark); }
.flow-card-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; border-top: 1px solid var(--line); padding-top: 13px; color: var(--ink-faint); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.flow-gesture-hint { display: flex; justify-content: center; gap: 8px; margin: 14px 0 8px; color: #718482; font-size: 10px; font-weight: 750; }
.flow-actions { display: grid; grid-template-columns: 46px minmax(0, .82fr) minmax(0, 1.2fr); gap: 7px; }
.flow-actions button { min-height: 52px; border-radius: 15px; padding: 8px 9px; font-size: 10px; font-weight: 900; }
.flow-previous { border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 17px !important; }
.flow-note { border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); background: var(--accent-wash); color: var(--accent-dark); }
.flow-reviewed { border: 0; background: var(--night); color: #fff; box-shadow: 0 9px 22px rgba(5, 45, 46, .19); }
.flow-authority { margin: 10px 0 27px; color: #738481; font-size: 10px; text-align: center; }
.flow-library { margin-bottom: 14px; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,255,255,.82); color: var(--ink); overflow: hidden; }
.flow-library > summary { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.flow-library > summary::-webkit-details-marker { display: none; }
.flow-library > summary > span { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 850; }
.flow-library > summary i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--sage-wash); color: var(--sage-dark); font-style: normal; }
.flow-library > summary strong { min-width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: var(--paper-deep); font-size: 9px; }
.flow-library[open] > summary { border-bottom: 1px solid var(--line); }
.flow-library-body { padding: 12px; }
.flow-library-body label input { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; background: #fff; }
.flow-library nav { max-height: 390px; display: grid; gap: 4px; margin-top: 8px; overflow-y: auto; }
.flow-library nav button { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; border-radius: 10px; padding: 9px 10px; background: transparent; color: var(--ink); text-align: left; }
.flow-library nav button[aria-current="true"] { background: var(--sage-wash); color: var(--sage-dark); }
.flow-library nav button > span:first-child { min-width: 0; display: grid; gap: 2px; }
.flow-library nav button strong, .flow-library nav button small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-library nav button strong { font-size: 11px; }
.flow-library nav button small { color: var(--ink-faint); font-size: 8px; }
.flow-library nav > p { margin: 18px; color: var(--ink-soft); font-size: 11px; text-align: center; }
.flow-notes { scroll-margin-top: 76px; border: 1px solid var(--line); border-radius: 22px; padding: 20px 16px; background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.flow-notes > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.flow-notes > header .eyebrow { color: var(--sage-dark); }
.flow-notes > header h2 { margin: 0; font-size: 22px; }
.flow-notes > header > span { min-width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: var(--paper-deep); font-size: 10px; font-weight: 850; }
.flow-note-target { margin: 13px 0 0; border-radius: 10px; padding: 11px; background: var(--paper); color: var(--ink-soft); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.flow-notes .annotation-panel { margin-top: 17px; }
.flow-saved-notes { display: grid; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.flow-saved-notes li { border-radius: 11px; padding: 12px; background: var(--paper); }
.flow-saved-notes span { color: var(--accent-dark); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.flow-saved-notes p { margin: 6px 0; font-size: 11px; }
.flow-saved-notes small, .flow-no-notes { color: var(--ink-faint); font-size: 9px; }
.flow-no-notes { margin: 20px 0 0; text-align: center; }
.phone-flow-footer { display: flex; justify-content: space-between; gap: 12px; padding: 22px 5px 0; color: #71817e; font-size: 10px; }
.phone-flow-footer span { font-family: "SFMono-Regular", Consolas, monospace; text-transform: uppercase; }
.phone-flow-footer button { border: 0; border-bottom: 1px solid currentColor; padding: 0; background: transparent; color: var(--accent-dark); font-size: 10px; font-weight: 800; }
.phone-flow-empty { padding-top: 55px; }
.phone-flow-empty h1 { margin-top: 45px; color: #fff; }
.phone-flow-empty p { color: #a4bab4; }

/* Editable document */
.document-workspace { width: min(1680px, 100%); margin: 0 auto; padding: 32px clamp(18px, 3vw, 42px) 70px; }
.document-toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 25px; }
.document-toolbar h1 { margin-bottom: 0; font-size: clamp(2.1rem, 4vw, 3.8rem); }
.document-tools, .mode-switch { display: flex; align-items: center; gap: 7px; }
.mode-switch { border-radius: 999px; padding: 4px; background: var(--paper-deep); }
.mode-switch button { min-height: 38px; border: 0; border-radius: 999px; padding: 8px 13px; background: transparent; color: var(--ink-soft); font-size: 12px; font-weight: 750; }
.mode-switch button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.reading-menu { position: relative; }
.reading-menu summary { border: 1px solid var(--line); border-radius: 999px; padding: 9px 13px; background: var(--surface); cursor: pointer; font-size: 12px; font-weight: 750; list-style: none; }
.reading-menu summary::-webkit-details-marker { display: none; }
.reading-controls { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; width: 250px; display: grid; gap: 12px; margin: 0; border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: #fff; box-shadow: var(--shadow-md); }
.reading-controls legend { color: var(--ink); font-weight: 800; }
.reading-controls label { display: grid; gap: 5px; color: var(--ink-soft); font-size: 11px; font-weight: 750; }
.reading-controls select { min-height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: #fff; }
.document-layout { display: grid; grid-template-columns: 290px minmax(460px, 1fr) 350px; gap: 18px; align-items: start; }
.document-outline, .document-canvas, .compare-canvas, .review-drawer { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.document-outline { position: sticky; top: 96px; max-height: calc(100svh - 120px); display: flex; flex-direction: column; padding: 20px 13px 13px; overflow: hidden; }
.outline-heading { padding: 0 8px; }
.outline-heading h2 { margin-bottom: 7px; font-size: 22px; }
.outline-back { width: fit-content; border: 0; padding: 2px 8px; background: transparent; color: var(--accent-dark); font-size: 11px; font-weight: 750; }
.outline-search { padding: 13px 6px 8px; }
.outline-search input { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: #fff; }
.document-outline ol { min-height: 0; display: grid; gap: 3px; margin: 0; padding: 0 2px 10px; overflow-y: auto; list-style: none; }
.document-outline li button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 0; border-radius: 9px; padding: 10px; background: transparent; text-align: left; }
.document-outline li button:hover { background: var(--paper); }
.document-outline li button[aria-current="true"] { background: var(--sage-wash); color: var(--sage-dark); }
.document-outline li button > span:first-child { min-width: 0; display: grid; gap: 2px; }
.document-outline li strong, .document-outline li small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-outline li strong { font-size: 12px; }
.document-outline li small { font-size: 8px; }
.field-language { flex: 0 0 auto; color: var(--ink-faint); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.document-canvas, .compare-canvas { min-height: 640px; padding: clamp(26px, 4vw, 52px); }
.field-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 40px; }
.field-heading h2 { margin-bottom: 7px; font-size: clamp(2rem, 4vw, 3.3rem); }
.field-heading small { font: 10px "SFMono-Regular", Consolas, monospace; }
.field-prose, .rich-prose, .markdown-source-mode textarea { width: min(100%, var(--reader-width)); font-size: var(--reader-font-size); line-height: var(--reader-line-height); }
.field-prose { margin: 0 auto; overflow-wrap: anywhere; }
.constrained-editor > header { display: flex; justify-content: space-between; align-items: center; }
.constrained-editor > header button, .editor-toolbar button { min-height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: #fff; font-size: 11px; font-weight: 700; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 10px; }
.rich-prose, .markdown-source-mode textarea { min-height: 360px; border: 1px solid var(--line); border-radius: 12px; padding: 22px; background: #fff; }
.compare-canvas header { margin-bottom: 28px; }
.compare-columns { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 12px; overflow-x: auto; }
.compare-columns article { min-height: 270px; display: grid; grid-template-rows: auto 1fr auto; border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: #fff; }
.compare-columns article p { align-self: center; font-size: 19px; overflow-wrap: anywhere; }
.compare-columns article button { min-height: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.review-drawer { position: sticky; top: 96px; max-height: calc(100svh - 120px); overflow-y: auto; padding: 22px; }
.review-loop-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.review-loop-heading h2 { margin-bottom: 0; font-size: 22px; }
.eligibility-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--gold); }
.eligibility-dot.eligibility-eligible { background: var(--sage); }
.eligibility-dot.eligibility-error { background: var(--danger); }
.eligibility-status { margin: 18px 0; border-radius: 9px; padding: 10px 12px; background: var(--paper); color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.eligibility-status.eligibility-eligible { background: var(--sage-wash); color: var(--sage-dark); }
.release-issues { margin-bottom: 18px; font-size: 11px; }
.release-issues summary { cursor: pointer; color: var(--accent-dark); font-weight: 750; }
.selected-review-field { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 15px; }
.selected-review-field > span { color: var(--sage-dark); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.selected-review-field > small { overflow: hidden; font-size: 8px; text-overflow: ellipsis; }
.selected-review-field > p { margin: 3px 0 0; color: var(--ink-soft); font-size: 10px; line-height: 1.45; }
.approve-field { width: 100%; margin-top: 7px; border-radius: 9px; }
.checkpoint-controls { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 20px; }
.checkpoint-heading { display: grid; grid-template-columns: 32px 1fr; gap: 10px; }
.checkpoint-heading > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--paper-deep); }
.checkpoint-heading h3 { margin-bottom: 3px; font-size: 14px; }
.checkpoint-heading p { margin-bottom: 0; color: var(--ink-soft); font-size: 10px; }
.checkpoint-button { width: 100%; margin-top: 12px; border-radius: 9px; }
.checkpoint-receipt { font-size: 10px; }
.lease-banner, .recovery-draft-panel { margin-bottom: 20px; border: 1px solid #e3c98f; border-radius: 12px; padding: 16px; background: #fbf3df; }
.lease-banner h2, .recovery-draft-panel h2 { font-size: 18px; }
.lease-banner p, .recovery-draft-panel p { font-size: 12px; }
.lease-banner button { min-height: 42px; margin-top: 10px; border: 1px solid #c89e48; border-radius: 8px; background: #fff; }

/* Dialogs, feedback, and legacy review surfaces */
.adopt-dialog-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(5, 26, 27, .66); backdrop-filter: blur(8px); }
.adopt-dialog { width: min(100%, 520px); display: grid; gap: 15px; border: 1px solid rgba(255,255,255,.22); border-radius: var(--radius-lg); padding: 34px; background: var(--surface); box-shadow: var(--shadow-lg); }
.adopt-dialog h2 { margin-bottom: 0; }
.adopt-dialog p { color: var(--ink-soft); }
.adopt-dialog label { display: grid; gap: 7px; font-size: 12px; font-weight: 800; }
.adopt-dialog input { min-height: 48px; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; background: #fff; }
.adopt-dialog input[aria-invalid="true"] { border-color: var(--danger); }
.adopt-dialog [role="alert"] { color: var(--danger); }
.adopt-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }
.adopt-dialog-actions button { min-height: 44px; border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; background: #fff; font-weight: 750; }
.adopt-dialog-actions .primary-action { background: var(--accent); color: #fff; }
.studio-toast { position: fixed; z-index: 80; right: 20px; bottom: 20px; max-width: min(430px, calc(100vw - 40px)); display: flex; align-items: center; gap: 16px; border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line)); border-radius: 12px; padding: 13px 15px; background: #fff; color: var(--danger); box-shadow: var(--shadow-md); font-size: 13px; }
.studio-toast button { width: 28px; height: 28px; flex: 0 0 auto; border: 0; border-radius: 50%; background: var(--danger-wash); color: var(--danger); }
.ethiopic, [lang="tig"] { font-family: var(--studio-ethiopic); }
.review-panel, .re-review-pack, .audit-timeline, .global-search, .learner-preview { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px; background: var(--surface); }
.review-diff [data-change="deleted"] { color: var(--danger); text-decoration: line-through; }
.review-diff [data-change="inserted"] { color: var(--sage-dark); text-decoration: underline; }
.destructive { color: var(--danger); border-color: var(--danger) !important; }

@media (max-width: 1280px) {
  .proposal-layout { grid-template-columns: 290px minmax(430px, 1fr); }
  .notes-drawer { position: static; grid-column: 2; max-height: none; }
  .document-layout { grid-template-columns: 250px minmax(420px, 1fr); }
  .review-drawer { position: static; grid-column: 2; max-height: none; }
  .compare-columns { grid-template-columns: repeat(3, minmax(210px, 1fr)); }
}

@media (max-width: 920px) {
  .passkey-entry { grid-template-columns: 1fr; gap: 44px; padding: 50px clamp(20px, 7vw, 70px); }
  .entry-story { max-width: 700px; }
  .studio-mark { margin-bottom: 36px; }
  .entry-story h1 { font-size: clamp(3rem, 10vw, 5.2rem); }
  .passkey-card { max-width: 700px; justify-self: stretch; }
  .home-grid { grid-template-columns: 1fr; }
  .home-guide { position: static; }
  .proposal-layout, .document-layout { grid-template-columns: 1fr; }
  .phrase-rail, .notes-drawer, .document-outline, .review-drawer { position: static; max-height: none; }
  .phrase-rail { max-height: 560px; }
  .phrase-stage { grid-row: 1; scroll-margin-top: 76px; }
  .phrase-rail { grid-row: 2; }
  .notes-drawer { grid-row: 3; }
  .notes-drawer, .review-drawer { grid-column: 1; }
  .document-outline { max-height: 440px; }
  .document-toolbar { align-items: flex-start; flex-direction: column; }
  .compare-columns { grid-template-columns: 1fr; overflow: visible; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .passkey-entry { align-content: start; min-height: 100svh; gap: 35px; padding: 34px 17px; }
  .entry-story h1 { margin-bottom: 20px; font-size: clamp(2.7rem, 13vw, 4.2rem); }
  .entry-intro { margin-bottom: 26px; font-size: 15px; }
  .entry-proof { gap: 8px 18px; }
  .entry-proof b { font-size: 18px; }
  .passkey-card { border-radius: 24px; padding: 27px 20px; }
  .studio-header { min-height: 62px; padding: 9px 14px; }
  .studio-brand-copy small, .header-divider, .header-context, .private-session, .sync-status { display: none; }
  .studio-header-right { margin-left: auto; }
  .studio-brand-mark { width: 34px; height: 34px; }
  .review-home { padding-top: 38px; }
  .home-hero { align-items: flex-start; flex-direction: column; gap: 25px; margin-bottom: 32px; }
  .home-hero h1 { margin-bottom: 18px; font-size: clamp(2.7rem, 13vw, 4.1rem); }
  .home-hero-copy > p:last-child { font-size: 15px; }
  .home-pulse span { width: 48px; height: 48px; }
  .home-pulse { align-self: flex-end; }
  .work-queue { padding: 18px 14px; }
  .queue-header { align-items: center; }
  .queue-row { min-height: 0; grid-template-columns: 1fr auto; gap: 12px; padding: 16px; }
  .queue-state { grid-column: 1; width: fit-content; }
  .queue-copy { grid-column: 1 / -1; }
  .queue-copy > strong { font-size: 16px; }
  .queue-copy > small { white-space: normal; }
  .queue-next { grid-column: 1 / -1; align-content: start; justify-items: start; gap: 6px; border: 0; border-top: 1px solid var(--line); padding: 12px 0 0; text-align: left; }
  .queue-meta { display: grid; gap: 5px; }
  .home-guide { border-radius: 18px; }
  .proposal-hero { padding: 26px 18px 38px; }
  .proposal-hero-top { margin-bottom: 38px; }
  .proposal-hero-top .secondary-action { display: none; }
  .proposal-hero h1 { font-size: clamp(2.7rem, 13vw, 4.1rem); }
  .proposal-summary { margin-bottom: 28px; font-size: 14px; }
  .proposal-stats { grid-template-columns: repeat(2, 1fr); }
  .proposal-stats div { border-bottom: 1px solid rgba(255,255,255,.14); padding-bottom: 13px; }
  .proposal-stats div:nth-child(even) { border-right: 0; }
  .proposal-stats div:nth-child(n+3) { padding-top: 13px; border-bottom: 0; }
  .proposal-stats div:nth-child(3) { padding-left: 0; }
  .proposal-layout { gap: 14px; padding: 14px 12px 50px; }
  .phrase-rail { max-height: 520px; border-radius: 18px; padding: 18px 10px 10px; }
  .phrase-stage, .notes-drawer { border-radius: 18px; }
  .phrase-stage { min-height: 0; padding: 24px 18px; }
  .phrase-stage-header { align-items: flex-start; flex-direction: column; gap: 12px; }
  .phrase-stage-header h2 { font-size: 2.25rem; }
  .phrase-context { margin-bottom: 24px; }
  .language-card { min-height: 132px; padding: 17px; }
  .language-card[aria-pressed="true"] { padding: 16px; }
  .language-copy { font-size: 1.18rem; }
  .selection-receipt { grid-template-columns: 31px 1fr; }
  .selection-icon { width: 30px; height: 30px; }
  .notes-drawer { padding: 20px 17px; }
  .document-workspace { padding: 24px 12px 50px; }
  .document-toolbar h1 { overflow-wrap: anywhere; }
  .document-tools { width: 100%; align-items: stretch; flex-direction: column; }
  .mode-switch { width: 100%; }
  .mode-switch button { flex: 1; }
  .reading-menu summary { text-align: center; }
  .reading-controls { position: static; width: 100%; margin-top: 8px; }
  .document-canvas, .compare-canvas { min-height: 0; border-radius: 18px; padding: 23px 17px; }
  .field-heading { flex-direction: column; margin-bottom: 28px; }
  .review-drawer { border-radius: 18px; padding: 18px; }
  .adopt-dialog { padding: 25px 19px; }
}

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