@font-face {
  font-family: Inter;
  src: url("/fonts/Inter-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Inter;
  src: url("/fonts/Inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  color-scheme: light;
  --bg: #fafafa;
  --paper: #fff;
  --text: #1a1a1a;
  --muted: #666;
  --body: #444;
  --line: #eaeaea;
  --field-line: #858585;
  --hover: #f0f0f0;
  --primary: #1a1a1a;
  --on-primary: #fff;
  --link: #005bbd;
  --blue-bg: #eef4fb;
  --green: #136c36;
  --green-bg: #e8f6ed;
  --amber: #834800;
  --amber-bg: #fff4de;
  --amber-row: #fffaf0;
  --error: #9c291c;
  --error-bg: #fff1ef;
  --shadow: 0 1px 2px rgb(0 0 0 / 4%), 0 8px 24px rgb(0 0 0 / 4%);
}
html[data-theme="night"] {
  color-scheme: dark;
  --bg: #121212;
  --paper: #1c1c1c;
  --text: #e0e0e0;
  --muted: #aaa;
  --body: #c6c6c6;
  --line: #333;
  --field-line: #777;
  --hover: #292929;
  --primary: #e0e0e0;
  --on-primary: #181818;
  --link: #91bfff;
  --blue-bg: #20304a;
  --green: #9ee0b1;
  --green-bg: #173224;
  --amber: #f4c783;
  --amber-bg: #412b12;
  --amber-row: #2d2114;
  --error: #ffb6a8;
  --error-bg: #381b17;
  --shadow: 0 1px 2px rgb(0 0 0 / 15%), 0 8px 24px rgb(0 0 0 / 20%);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 Inter, system-ui, sans-serif; }
p, h1, h2, h3 { margin: 0; }
a { color: var(--link); text-underline-offset: .2em; }
button, input, textarea, summary { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: default; opacity: .58; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
::placeholder { color: var(--muted); opacity: 1; }
.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 20; padding: 12px; background: var(--paper); }
.muted { color: var(--muted); }
.print-only { display: none; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  text-align: center;
}
.button svg { flex: none; }
.quiet:not(:disabled):hover, .secondary:not(:disabled):hover, .text-button:not(:disabled):hover { background: var(--hover); }
.secondary, .choice { background: var(--paper); border-color: var(--line); }
.primary { padding-inline: 18px; background: var(--primary); color: var(--on-primary); font-size: 14px; }
.primary:not(:disabled):hover { filter: brightness(.86); }
.icon-button { width: 44px; flex: none; padding: 0; }
.text-button {
  min-height: 44px;
  padding: 0 3px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 3px;
}
.field {
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--field-line);
  border-radius: 8px;
  background: var(--paper);
  font-size: 14px;
}
.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}
.brand, .apps {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.brand { font-size: 17px; font-weight: 600; }
.apps { min-width: 44px; justify-content: center; font-size: 13px; font-weight: 500; }
.topbar .divider { height: 28px; width: 1px; background: var(--line); flex: none; }
#workspace-control, .header-controls, .lang-switch { display: flex; align-items: center; min-width: 0; }
#workspace-control { gap: 8px; }
.header-controls { gap: 10px; margin-left: auto; }
.header-controls > button { white-space: nowrap; padding-inline: 6px; }
.usage-badge, .soon {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--green-bg);
  color: var(--green);
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
}
.usage-badge.used-up, .soon { background: var(--hover); color: var(--muted); }
.usage-compact, .workspace-icon { display: none; }
.lang-switch { gap: 0; color: var(--muted); }
.lang-switch .button { min-width: 44px; padding: 0; color: var(--muted); }
.lang-switch .button[aria-pressed="true"] { color: var(--text); font-weight: 700; }
.back-link { min-width: 0; justify-content: flex-start; }
.back-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.disclosure { position: relative; min-width: 0; }
.disclosure > summary { list-style: none; width: max-content; max-width: 100%; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure-panel {
  position: absolute;
  z-index: 5;
  top: calc(100% + 4px);
  inset-inline-start: 0;
  width: max-content;
  min-width: min(174px, calc(100vw - 32px));
  max-width: min(320px, calc(100vw - 32px));
  max-height: min(330px, 60vh);
  overflow: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: normal;
  text-align: left;
}
.disclosure-panel .button, .menu-check {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}
.disclosure-panel [aria-current], .disclosure-panel [aria-pressed="true"] { background: var(--blue-bg); color: var(--link); }
.disclosure-panel .menu-note { padding: 7px 12px; }
.align-end > .disclosure-panel { inset-inline: auto 0; }
.menu-check { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px; cursor: pointer; }
.menu-check:hover { background: var(--hover); border-radius: 8px; }
.menu-check input { accent-color: var(--link); width: 18px; height: 18px; flex: none; }
.history-list { padding: 2px 0 5px; border-bottom: 1px solid var(--line); }
.workspace-menu > summary { padding-inline: 0; white-space: nowrap; }

.shell { max-width: 720px; margin: 0 auto; padding-inline: 20px; }
.start { padding-block: 88px 104px; }
.start.working { padding-block: 48px 80px; }
.hero-heading { margin: 0 auto 40px; text-align: center; }
.hero-heading h1 { font-size: clamp(32px, 5vw, 44px); font-weight: 700; line-height: 1.08; letter-spacing: -.025em; }
.hero-heading p { max-width: 520px; margin: 18px auto 0; color: var(--body); font-size: 16px; }
.composer-card { border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: var(--shadow); }
#inquiry-text {
  display: block;
  width: 100%;
  padding: 20px 22px 8px;
  border: 0;
  border-radius: 16px 16px 0 0;
  resize: vertical;
  background: transparent;
  font-size: 16px;
  line-height: 1.6;
}
#inquiry-text:focus-visible { outline-offset: -3px; }
.composer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 8px 12px 12px;
}
.drop-hint { color: var(--muted); font-size: 13px; }
.composer-actions .primary { margin-left: auto; }
.composer-foot { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; column-gap: 4px; padding-top: 7px; color: var(--muted); text-align: center; font-size: 13px; }
.demo-link { color: var(--link); text-decoration-color: var(--link); }
.intro-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 32px; margin-top: 54px; padding-top: 28px; border-top: 1px solid var(--line); }
.intro-steps h2 { margin-bottom: 4px; font-size: 13px; font-weight: 600; }
.intro-steps p, .sorting { color: var(--muted); font-size: 13px; }
.sorting { margin-top: 20px; }

.docs-list { padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; min-width: 0; }
#composer .docs-list:not(:empty) { padding: 8px 14px; }
.doc-item { max-width: 100%; }
.doc-chip { display: flex; align-items: center; max-width: 100%; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); }
.doc-menu > summary { border: 0; padding: 0 2px 0 10px; border-radius: 999px 0 0 999px; font-size: 12px; }
.doc-menu > summary > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.doc-menu > summary > svg { display: none; }
.chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-role, .chip-progress { color: var(--muted); font-size: 11px; white-space: nowrap; }
.chip-role { padding: 2px 6px; background: var(--hover); border-radius: 7px; }
.chip-remove { margin-right: 1px; border-radius: 50%; color: var(--muted); }
.chip-error, .chip-status { display: block; padding: 3px 8px 0; }
.chip-error { color: var(--error); }
.quick-role { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; padding: 3px 6px 0; font-size: 12px; }
.quick-role .button { font-size: 12px; }

.analysis { padding-block: 48px 96px; }
.analysis-heading { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.analysis-heading h1 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.analysis-meta { margin: 6px 0 24px; color: var(--muted); font-size: 13px; }
.inquiry-facts { padding: 20px 22px 18px; color: var(--body); line-height: 1.65; }
.inquiry-preview { max-height: 7em; overflow: hidden; overflow-wrap: anywhere; white-space: pre-line; padding: 18px 22px 0; color: var(--body); }
.inquiry-preview.expanded { max-height: none; }
.inquiry-expand { margin: 8px 22px 16px; }
.analysis-files { display: flex; flex-wrap: wrap; align-items: start; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.analysis-files .docs-list { flex: 1 1 430px; }
.jev { padding: 38px 2px 28px; }
.jev-sentence { margin-top: 10px; font-size: 21px; line-height: 1.7; letter-spacing: -.01em; overflow-wrap: anywhere; }
.token { display: inline-block; vertical-align: baseline; max-width: 100%; }
.token > summary {
  min-height: 44px;
  padding: 0 1px;
  border-radius: 3px;
  border: 0;
  color: var(--text);
  font-size: inherit;
  font-weight: 600;
  letter-spacing: inherit;
  line-height: 1.25;
  text-align: start;
}
.token > summary span { text-decoration: underline dotted var(--muted); text-underline-offset: 5px; }
.alternatives { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; margin-top: 4px; color: var(--muted); font-size: 13px; }
.questions { padding: 0 2px 28px; }
.questions .eyebrow { margin-bottom: 12px; }
.question-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.question-text { flex: 1 1 200px; font-size: 14px; }
.question-text p { margin-top: 2px; font-size: 13px; }
.question-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.choice { border-radius: 999px; }
.choice[aria-pressed="true"] { background: var(--blue-bg); border-color: var(--link); color: var(--link); }
.question-input { width: 155px; }
.instruction-form { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 20px; }
.inline-instruction { flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; padding: 4px 0; font-size: 15px; }
.hints { display: flex; align-items: center; flex-wrap: wrap; gap: 0 12px; padding: 3px 18px 0; }
.suggestions { display: flex; flex-wrap: wrap; gap: 0 9px; }
.usage-note { margin-left: auto; color: var(--muted); font-size: 12px; }

.result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  align-items: start;
  gap: 40px 56px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 96px;
}
.result-column { min-width: 0; }
.result-toolbar { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 2px 14px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.result-tabs { display: flex; gap: 24px; margin-bottom: -1px; }
.result-tab { border-radius: 0; padding: 0; border-bottom: 2px solid transparent; color: var(--muted); font-size: 14px; }
.result-tab[aria-selected="true"] { border-bottom-color: var(--text); color: var(--text); font-weight: 600; }
.result-actions { display: flex; gap: 6px; margin-left: auto; padding-bottom: 6px; }
.stream-status { margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.paper {
  min-width: 0;
  min-height: 160px;
  padding: 48px clamp(20px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 1px 2px rgb(0 0 0 / 4%);
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.paper > :first-child { margin-top: 0; }
.paper h1 { margin: 0 0 14px; font-size: 26px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.paper h2, .paper h3, .paper h4, .paper h5, .paper h6 { margin: 30px 0 8px; font-size: 15px; font-weight: 600; }
.paper p { margin: 0 0 18px; }
.paper > p:first-child:has(+ h1), .paper h1 + p:has(br) { margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.paper h1 + p:has(br) { margin-bottom: 28px; }
.paper > :last-child { margin-bottom: 0; }
.letterhead { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: start; gap: 8px 18px; margin-bottom: 30px; }
.letterhead p { margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.letterhead h1 { margin-bottom: 0; }
.letterhead > p { font-size: 13px; }
.paper :is(ul, ol) { padding-left: 24px; }
.paper pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px; }
.paper code, .paper pre { background: var(--hover); border-radius: 4px; }
.paper-table { margin: 24px 0 14px; overflow-x: auto; }
.paper table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.45; }
.paper th, .paper td { padding: 12px 0 12px 10px; text-align: right; vertical-align: top; }
.paper th { padding-top: 0; border-bottom: 1px solid var(--text); color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
.paper tr :first-child:is(th, td) { padding-left: 0; text-align: left; }
.paper td { border-bottom: 1px solid var(--line); }
.paper td:last-child { font-weight: 600; }
.paper td:not(:first-child) { white-space: nowrap; }
.paper .missing-row { background: var(--amber-row); }
.paper .missing-row > td:first-child { padding-left: 6px; }
.price-note { display: block; color: var(--amber); font-size: 12px; }
.price-form { display: inline-flex; align-items: center; gap: 2px; }
.price-form .price-input { width: 125px; font-size: 12px; }
.price-form .icon-button { color: var(--amber); }
.price-fallback { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0; padding: 6px 10px; background: var(--amber-row); }
.citation { display: inline-grid; place-items: center; min-width: 16px; padding: 0 3px; border-radius: 5px; background: var(--blue-bg); color: var(--link); font-size: 11px; font-weight: 600; line-height: 16px; text-decoration: none; vertical-align: 2px; }
a.citation { min-width: 24px; min-height: 24px; margin-inline: 1px; vertical-align: middle; }
@media (pointer: coarse) {
  a.citation { min-width: 44px; min-height: 44px; }
}
.refine { position: sticky; bottom: 0; margin-top: 20px; padding: 5px 0 max(4px, env(safe-area-inset-bottom)); background: var(--bg); z-index: 2; }
.result-margin { padding-top: 56px; font-size: 13px; }
.margin-section { margin-bottom: 28px; }
.margin-section h2 { margin-bottom: 10px; }
.margin-section p { color: var(--body); }
.check-list, .sources { padding: 0; margin: 0; list-style: none; }
.check-list { margin-bottom: 6px; }
.sources { border-bottom: 1px solid var(--line); }
.sources li { display: flex; align-items: start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.sources strong, .sources .muted { display: block; }
.sources .citation { margin-top: 2px; }

.landing { max-width: 1008px; padding: 0 24px; margin: 0 auto; }
.landing-section { padding: 72px 0; border-top: 1px solid var(--line); }
.landing-section h2 { margin: 0 0 10px; font-size: 24px; line-height: 1.22; letter-spacing: -.01em; }
.landing-section h3 { font-size: 16px; font-weight: 600; }
.landing-section p { color: var(--body); }
.proof { display: grid; grid-template-columns: 1fr 1.15fr; align-items: center; gap: 40px 56px; }
.proof-card { padding: 7px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); font-size: 14px; }
.proof-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 0; }
.proof-row strong { text-align: right; white-space: nowrap; }
.proof-card p { padding: 8px 0 12px; border-block: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.amber-label { padding: 3px 8px; border-radius: 6px; background: var(--amber-bg); color: var(--amber); font-size: 12px; font-weight: 500; }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 56px; margin-top: 28px; }
.feature-grid h3 { margin-bottom: 6px; }
.feature-grid p, .faq p { font-size: 14px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 28px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--line); }
.plans > div { display: flex; flex-direction: column; gap: 10px; padding: 26px; background: var(--paper); }
.plans h3 { font-size: 14px; }
.plans p, .plans ul { font-size: 14px; }
.plans .plan-price { color: var(--text); font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.plans ul { padding: 0; margin: 0 0 8px; list-style: none; line-height: 1.9; }
.plans .button { margin-top: auto; }
.faq { padding-bottom: 96px; }
.faq div { padding: 18px 0; border-top: 1px solid var(--line); }
.faq div:last-child { border-bottom: 1px solid var(--line); }
.faq h3 { margin-bottom: 6px; font-size: 15px; }
.site-footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px 20px; padding: 22px; border-top: 1px solid var(--line); font-size: 13px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }

.error-banner, .workspace-progress { max-width: 680px; margin: 16px auto 0; padding: 7px 12px; border-radius: 8px; font-size: 13px; }
.error-banner { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--error-bg); color: var(--error); }
.workspace-progress { color: var(--muted); text-align: center; }
.toast { position: fixed; z-index: 11; right: 16px; bottom: 16px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); box-shadow: var(--shadow); }
.drop-overlay { position: fixed; z-index: 12; inset: 0; display: grid; place-items: center; padding: 20px; background: color-mix(in srgb, var(--bg) 94%, transparent); pointer-events: none; }
.drop-overlay::before { content: ""; position: absolute; inset: 16px; border: 2px dashed var(--link); border-radius: 18px; }
.drop-overlay strong { color: var(--link); font-size: clamp(22px, 4vw, 38px); text-align: center; }

.modal {
  width: min(440px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  color: var(--text);
  box-shadow: 0 24px 64px rgb(0 0 0 / 20%);
}
.modal::backdrop { background: rgb(26 26 26 / 40%); }
.modal-close { position: absolute; top: 9px; right: 9px; color: var(--muted); }
.modal h2 { margin: 0 24px 8px 0; font-size: 22px; font-weight: 700; line-height: 1.24; letter-spacing: -.01em; }
.dialog-intro { margin-bottom: 22px; color: var(--body); font-size: 14px; line-height: 1.6; }
.dialog-plans { border: 1px solid var(--line); border-radius: 14px; }
.dialog-plan { padding: 14px 16px; }
.dialog-plan + .dialog-plan { border-top: 1px solid var(--line); }
.plan-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dialog-plan .muted { margin-top: 3px; font-size: 13px; }
.dialog-content > .primary { width: 100%; min-height: 48px; margin-top: 16px; }
.dialog-note { margin-top: 12px; color: var(--muted); font-size: 12px; text-align: center; }
.profile-error { margin-bottom: 12px; color: var(--error); font-size: 13px; }
.profile-form { display: grid; gap: 12px; }
.profile-form label { display: grid; gap: 4px; font-size: 13px; }
.profile-form textarea { resize: vertical; }
.profile-form > .primary { justify-self: end; }

@media (max-width: 990px) {
  .result { gap: 30px; grid-template-columns: minmax(0, 1fr) 195px; }
  .paper { padding-inline: 28px; }
  .topbar { gap: 12px; }
}
@media (max-width: 820px) {
  .result { grid-template-columns: minmax(0, 1fr); max-width: 720px; gap: 18px; }
  .result-margin { padding-top: 0; }
  .refine { position: static; }
  .refine-form {
    position: fixed;
    inset-inline: max(20px, calc((100% - 680px) / 2));
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 3;
  }
  .result { padding-bottom: 95px; }
  .topbar .back-link span { display: none; }
  .back-link { min-width: 44px; justify-content: center; }
  .usage-compact { display: inline; }
  .usage-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (max-width: 660px) {
  .topbar { gap: 6px; padding-inline: 12px; }
  .header-controls { gap: 2px; }
  #workspace-control { gap: 0; }
  .workspace-menu > summary > span, .workspace-menu > summary > svg:last-child, .topbar .back-link { display: none; }
  .workspace-icon { display: inline; }
  .workspace-menu > summary { width: 44px; }
  .workspace-menu > .disclosure-panel { inset-inline-start: -58px; }
  .start { padding-block: 56px 66px; }
  .start.working { padding-top: 34px; }
  .hero-heading { margin-bottom: 28px; }
  .intro-steps { grid-template-columns: 1fr; gap: 16px; margin-top: 34px; }
  .landing-section { padding-block: 48px; }
  .proof, .feature-grid, .plans { grid-template-columns: 1fr; }
  .proof, .feature-grid { gap: 22px; }
  .plans > div { padding: 20px; }
  .analysis { padding-block: 32px 48px; }
  .jev { padding-top: 28px; }
  .jev-sentence { font-size: 18px; }
  .jev-sentence .disclosure-panel, .doc-menu .disclosure-panel {
    position: fixed;
    inset: auto 16px max(16px, env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    max-height: 55vh;
    z-index: 8;
  }
  .question-controls { width: 100%; }
  .result { padding-top: 20px; }
  .paper { padding: 30px 20px; }
  .paper-table { overflow: visible; }
  .paper table, .paper tbody, .paper tr { display: block; }
  .paper thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .paper tbody tr { padding: 8px; border-bottom: 1px solid var(--line); }
  .paper tbody td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; }
  .paper tbody td:first-child { display: block; padding: 3px 0 6px; font-weight: 600; }
  .paper tbody td:not(:first-child)::before { content: attr(data-label); color: var(--muted); font-weight: 400; white-space: normal; text-align: left; }
  .paper tbody td:has(.price-form) { flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .topbar { padding-inline: 8px; gap: 4px; }
  .topbar .brand { gap: 4px; font-size: 15px; }
  .brand svg { width: 19px; }
  .lang-switch .button { min-width: 44px; }
  .usage-badge { padding-inline: 7px; }
  .composer-actions .drop-hint { order: 2; flex-basis: 100%; padding-inline: 12px; }
  .composer-foot { padding-top: 13px; }
  .instruction-form:not(.refine-form) { flex-wrap: wrap; padding-left: 12px; }
  .instruction-form:not(.refine-form) .inline-instruction { flex-basis: 100%; }
  .instruction-form:not(.refine-form) .primary { margin-left: auto; }
  .usage-note { margin-left: 0; padding-bottom: 5px; }
  .result-tabs { gap: 18px; }
  .result-actions { margin-left: 0; }
}
@media (max-width: 350px) {
  .header-controls > button { font-size: 12px; padding-inline: 3px; }
  .topbar .brand svg { display: none; }
}
@page { size: A4; margin: 16mm; }
@media print {
  html, html[data-theme="night"] { color-scheme: light; }
  body { background: #fff; color: #000; }
  body > :not(main), main > :not(#result), #result > :not(.result-column), .result-column > :not(.paper), .screen-only { display: none !important; }
  #result { display: block; max-width: none; margin: 0; padding: 0; }
  #result[hidden] { display: none !important; }
  .paper { padding: 0; min-height: 0; border: 0; box-shadow: none; background: #fff; color: #000; }
  .paper :is(h1, h2, h3) { break-after: avoid; }
  .paper > p:first-child:has(+ h1), .paper h1 + p:has(br), .paper th { color: #444; }
  .paper-table { overflow: visible; }
  .paper table { display: table; }
  .paper thead { display: table-header-group; position: static; clip-path: none; width: auto; height: auto; overflow: visible; }
  .paper tbody { display: table-row-group; }
  .paper tr { display: table-row; break-inside: avoid; }
  .paper th, .paper tbody td, .paper tbody td:first-child { display: table-cell; background: #fff; border-bottom: 1px solid #ccc; padding: 8px 5px; }
  .paper tbody td::before { content: none !important; }
  .print-only { display: inline; }
  .citation, a.citation { min-width: 0; min-height: 0; background: none; color: #333; font-size: 9px; }
}
