/* Ulysses. Paper, ink, one accent. See design-review/SPEC.md for the system:
 * type scale, colours (all text AAA on its background), targets of 48px+. */

:root {
  --paper: #faf7f0;
  --surface: #ffffff;
  --sunk: #f2ede2;
  --ink: #1b1915;
  --ink-2: #3f3a32;
  --rule: #8c8270;
  --rule-soft: #d9d1c1;
  --accent: #1f3f6e;
  --accent-hover: #16305a;
  --accent-tint: #e9eef6;
  --good: #245a26;
  --good-tint: #e8f1e4;
  --mid: #6e4600;
  --mid-tint: #fbf0d9;
  --bad: #8f1d1d;
  --bad-tint: #fbe9e7;
  --focus: #b5560b;
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --measure: 68ch;
  --frame: 65rem;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--ink); line-height: 1.25; margin: 0 0 0.5em; }
h1 { font-size: 2.5rem; line-height: 1.2; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.4375rem; line-height: 1.3; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
strong { font-weight: 700; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
main:focus { outline: none; }

.hidden { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link {
  position: absolute; left: 1rem; top: -6.25rem; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 0.75rem 1.125rem; font-family: var(--sans); font-weight: 600;
}
.skip-link:focus { top: 0.75rem; color: var(--paper); }

/* ---------------- top bar ---------------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--rule-soft); }
.topbar-inner {
  max-width: var(--frame); margin: 0 auto; padding: 0.75rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 0.75rem; color: var(--ink); text-decoration: none; min-height: 3rem; }
.brand:hover { color: var(--ink); }
.brand-mark { color: var(--accent); flex: none; }
.brand-text { font-family: var(--serif); font-weight: 600; font-size: 1.75rem; letter-spacing: 0.01em; }
.account-slot { display: flex; align-items: center; gap: 0.5rem 1.25rem; flex-wrap: wrap; font-family: var(--sans); font-size: 1.1875rem; }
.nav-link {
  display: inline-flex; align-items: center; min-height: 3rem; padding: 0 0.25rem;
  color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 4px;
}
.nav-link[aria-current="page"] { color: var(--ink); text-decoration: none; }
.acct-name { color: var(--ink-2); }
.acct-balance { color: var(--ink-2); }

/* ---------------- page frame ---------------- */
main { flex: 1 0 auto; width: 100%; max-width: var(--frame); margin: 0 auto; padding: 2rem 1.5rem 6rem; }
.site-footer { border-top: 1px solid var(--rule-soft); background: var(--surface); }
.footer-inner { max-width: var(--frame); margin: 0 auto; padding: 1.5rem; font-family: var(--sans); font-size: 1.125rem; color: var(--ink-2); }
.footer-inner p { margin: 0 0 0.25rem; }
/* Harbor's corner badge sits over the bottom-right of the window: leave room so
   the last words on the page scroll clear of it. */
.site-footer { padding-bottom: 6rem; }

.empty-note { color: var(--ink-2); font-size: 1.25rem; }

/* ---------------- buttons ---------------- */
.btn, .btn-secondary, .btn-quiet, .btn-link, .btn-danger, .btn-stop {
  font-family: var(--sans); font-size: 1.1875rem; font-weight: 600; line-height: 1.25;
  min-height: 3rem; padding: 0.625rem 1.375rem; border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  cursor: pointer; text-decoration: none; text-align: center;
}
.btn { background: var(--accent); color: #fff; border: 2px solid var(--accent); }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn:disabled, .btn-secondary:disabled, .btn-quiet:disabled, .btn-link:disabled, .btn-danger:disabled, .btn-stop:disabled {
  background: var(--sunk); color: var(--ink-2); border-color: var(--rule-soft); cursor: not-allowed;
}
.btn-large { min-height: 3.5rem; font-size: 1.3125rem; padding: 0.75rem 1.875rem; }
.btn.btn-secondary, .btn-secondary { background: var(--surface); color: var(--accent); border: 2px solid var(--accent); }
.btn.btn-secondary:hover, .btn-secondary:hover { background: var(--accent-tint); color: var(--accent-hover); }
.btn-quiet, .btn-link {
  background: transparent; border: 2px solid transparent; color: var(--accent);
  text-decoration: underline; text-underline-offset: 4px; padding: 0.625rem 0.5rem;
}
.btn-quiet:hover, .btn-link:hover { color: var(--accent-hover); text-decoration-thickness: 2px; background: var(--accent-tint); }
.btn-danger, .btn-stop, .btn-link.danger { background: var(--surface); color: var(--bad); border: 2px solid var(--bad); text-decoration: none; padding: 0.625rem 1.375rem; }
.btn-danger:hover, .btn-stop:hover, .btn-link.danger:hover { background: var(--bad-tint); color: var(--bad); }
.btn-small { min-height: 3rem; padding: 0.5rem 1rem; font-size: 1.125rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; margin: 1.5rem 0 0; }

/* ---------------- landing page ---------------- */
html.member #marketing { display: none; }
.lp-inner { max-width: var(--frame); margin: 0 auto; padding: 0 1.5rem; }
.lp-prose > * { max-width: var(--measure); }
.lp-hero { background: var(--surface); border-bottom: 1px solid var(--rule-soft); padding: 4rem 0 3.5rem; }
.lp-hero .lp-inner > * { max-width: 47.5rem; }
.lp-eyebrow { font-family: var(--sans); font-weight: 600; font-size: 1.1875rem; color: var(--accent); margin-bottom: 1rem; }
.lp-title { font-size: 3rem; line-height: 1.15; margin-bottom: 1.5rem; }
.lp-lede { font-size: 1.375rem; line-height: 1.6; color: var(--ink); }
.lp-actions { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; margin-top: 2rem; }
.lp-section { padding: 3.5rem 0; border-bottom: 1px solid var(--rule-soft); }
.lp-section h2 { margin-bottom: 1.25rem; }
.lp-note { color: var(--ink-2); }
.lp-steps { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3rem; }
.lp-steps h3 { display: flex; align-items: center; gap: 0.875rem; margin-bottom: 0.5rem; }
.lp-step-n {
  flex: none; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 2px solid var(--accent); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--sans); font-weight: 700; font-size: 1.3125rem;
}
.lp-steps p { margin: 0; }
.lp-promise { background: var(--surface); }
.lp-list { padding-left: 1.2em; margin: 0; }
.lp-list li { margin-bottom: 0.875rem; padding-left: 0.25rem; }
.lp-samples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; margin-top: 1.5rem; }
.sample { margin: 0; }
.sample figcaption { font-family: var(--sans); font-weight: 600; font-size: 1.125rem; color: var(--ink-2); margin-bottom: 0.625rem; }
.sample-body { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.5rem 1.75rem; height: calc(100% - 2.5rem); }
.sample-kicker { font-family: var(--sans); font-weight: 600; font-size: 1.125rem; color: var(--ink-2); margin-bottom: 0.375rem; }
.sample-title { font-size: 1.5rem; margin-bottom: 1rem; }
.sample-fact { border-top: 1px solid var(--rule-soft); padding-top: 0.875rem; margin-top: 0.875rem; }
.sample-claim { margin-bottom: 0.5rem; font-size: 1.1875rem; }
.sample-picture { border-radius: 4px; overflow: hidden; border: 1px solid var(--rule-soft); line-height: 0; }
.sample-label { font-family: var(--sans); font-size: 1.0625rem; color: var(--ink-2); margin: 0.5rem 0 0.75rem; }
.sample-narr { font-size: 1.25rem; }
.lp-final { border-bottom: none; }
.lp-signin-note { font-family: var(--sans); font-size: 1.125rem; line-height: 1.5; color: var(--ink-2); margin: 1.25rem 0 0; max-width: 40rem; }
.lp-final .lp-signin-note { margin-top: 1rem; }
.sample-sources { font-family: var(--sans); font-size: 1.0625rem; color: var(--ink-2); margin: 0.5rem 0 0; }
.lp-reads { margin-top: 2.5rem; }
.contact-line { margin-top: 0.25rem; }
/* Members land on their dashboard: don't flash the page's static "Sign in". */
.member #acct-signin { visibility: hidden; }

/* ---------------- support / status words ---------------- */
.support {
  font-family: var(--sans); font-size: 1.125rem; line-height: 1.45; margin: 0;
  border-left: 5px solid var(--rule); padding: 0.375rem 0 0.375rem 0.75rem; color: var(--ink);
}
.support strong { font-weight: 700; }
.support-good { border-left-color: var(--good); }
.support-good strong { color: var(--good); }
.support-mid { border-left-color: var(--mid); }
.support-mid strong { color: var(--mid); }
.support-bad { border-left-color: var(--bad); background: var(--bad-tint); padding-right: 0.75rem; }
.support-bad strong { color: var(--bad); }
.support-none strong { color: var(--ink-2); }

.state { font-family: var(--sans); font-weight: 700; font-size: 1.1875rem; }
.state-good { color: var(--good); }
.state-mid { color: var(--mid); }
.state-bad { color: var(--bad); }
.state-busy { color: var(--accent); }
.state-plain { color: var(--ink-2); }

/* ---------------- page heading, back link, steps ---------------- */
.back-link {
  display: inline-flex; align-items: center; min-height: 3rem; font-family: var(--sans); font-weight: 600; font-size: 1.1875rem;
  color: var(--accent); text-decoration: underline; text-underline-offset: 4px;
}
.page-head { margin-bottom: 2rem; }
.page-head h1 { margin: 0.25rem 0 0.5rem; }
.page-sub { font-size: 1.375rem; color: var(--ink-2); max-width: var(--measure); margin: 0 0 0.5rem; }
.meta-line { font-family: var(--sans); font-size: 1.125rem; color: var(--ink-2); margin: 0; }
.meta-line strong { color: var(--ink); }

.steps { list-style: none; margin: 0 0 2.5rem; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--rule-soft); border-radius: var(--radius); background: var(--surface); }
.step { padding: 1rem 1.125rem; border-right: 1px solid var(--rule-soft); font-family: var(--sans); font-size: 1.0625rem; color: var(--ink-2); line-height: 1.4; }
.step:last-child { border-right: none; }
.step-name { display: flex; align-items: center; gap: 0.625rem; font-size: 1.25rem; font-weight: 700; color: var(--ink); margin-bottom: 0.25rem; }
.step-n {
  flex: none; width: 2rem; height: 2rem; border-radius: 50%; border: 2px solid var(--rule); color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.0625rem; font-weight: 700;
}
.step-where { display: block; font-weight: 700; margin-top: 0.375rem; }
.step-current { background: var(--accent-tint); box-shadow: inset 0 -4px 0 var(--accent); }
.step-current .step-n { background: var(--accent); border-color: var(--accent); color: #fff; }
.step-current .step-where { color: var(--accent); }
.step-done .step-n { border-color: var(--good); color: var(--good); }
.step-done .step-where { color: var(--good); }

/* ---------------- panels ---------------- */
.panel { background: var(--surface); border: 1px solid var(--rule-soft); border-radius: var(--radius); padding: 1.75rem 2rem; margin: 0 0 2rem; }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }
.panel-quiet { background: var(--sunk); border-color: var(--rule-soft); }
.panel-warn { background: var(--mid-tint); border: 2px solid var(--mid); }
.panel-bad, .error-panel { background: var(--bad-tint); border: 2px solid var(--bad); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 0 0 2rem; color: var(--ink); }
.error-panel strong { color: var(--bad); }
.lede { font-size: 1.3125rem; max-width: var(--measure); }
.prose { max-width: var(--measure); }
.help { color: var(--ink-2); font-size: 1.1875rem; max-width: var(--measure); }
.form-hint { color: var(--ink-2); font-size: 1.1875rem; margin: 0.5rem 0 0; max-width: var(--measure); }
.pay-note, .pay-fine { color: var(--ink-2); font-size: 1.1875rem; }

/* status panel: what is happening, what it means, what happens next */
.status-panel { border-left: 6px solid var(--accent); }
.status-panel.is-paused { border-left-color: var(--mid); }
.status-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.status-head h2 { margin: 0; font-size: 1.75rem; }
.status-explain { font-size: 1.25rem; max-width: var(--measure); }
.status-explain p { margin: 0 0 0.625rem; }
.spinner {
  width: 1.5rem; height: 1.5rem; border: 3px solid var(--rule-soft); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 1s linear infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

.log-title { font-size: 1.3125rem; margin: 1.75rem 0 0.5rem; }
.event-log { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-soft); font-size: 1.125rem; font-family: var(--sans); }
.event-log li { display: grid; grid-template-columns: 6.5em 1fr; gap: 0.75rem; padding: 0.625rem 0; border-bottom: 1px solid var(--rule-soft); }
.log-time { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.log-text { overflow-wrap: anywhere; }
.log-stage .log-text { font-weight: 700; }
.log-warn .log-text, .log-error .log-text { color: var(--bad); font-weight: 600; }
.log-ok .log-text { color: var(--good); font-weight: 600; }
.log-more { font-family: var(--sans); font-size: 1.125rem; color: var(--ink-2); margin-top: 0.5rem; }

/* ---------------- forms ---------------- */
.field { margin-bottom: 1.75rem; max-width: 47.5rem; }
.field > label, .field-label, legend.field-label { display: block; font-family: var(--sans); font-weight: 700; font-size: 1.25rem; margin-bottom: 0.25rem; color: var(--ink); }
.field-help { display: block; color: var(--ink-2); font-size: 1.125rem; font-family: var(--sans); margin: 0 0 0.625rem; }
.optional { font-weight: 400; color: var(--ink-2); }
input[type=text], input[type=number], input[type=search], input:not([type]), textarea, select {
  font: inherit; font-size: 1.25rem; color: var(--ink); background: var(--surface);
  border: 2px solid var(--rule); border-radius: var(--radius); padding: 0.625rem 0.875rem; min-height: 3.25rem; width: 100%;
}
textarea { line-height: 1.5; resize: vertical; }
select { font-family: var(--sans); padding-right: 2.25rem; }
input::placeholder, textarea::placeholder { color: #6b6457; opacity: 1; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--ink); }
input[type=checkbox], input[type=radio] { width: 1.5rem; height: 1.5rem; accent-color: var(--accent); flex: none; margin: 0; }
fieldset { border: none; padding: 0; margin: 0 0 1.75rem; min-width: 0; }

.choices { display: grid; gap: 0.75rem; max-width: 47.5rem; }
.choice {
  display: flex; gap: 0.875rem; align-items: flex-start; padding: 1rem 1.125rem; min-height: 3.5rem;
  border: 2px solid var(--rule-soft); border-radius: var(--radius); background: var(--surface); cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }
.choice input { margin-top: 0.25rem; }
.choice-title { font-family: var(--sans); font-weight: 700; font-size: 1.25rem; display: block; }
.choice-text { display: block; font-size: 1.125rem; color: var(--ink-2); font-family: var(--sans); }
.choice-inline { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.choice-inline .choice { min-width: 8.75rem; align-items: center; }
.choice-inline .choice input[type=number] { width: 5.625rem; min-height: 2.75rem; padding: 0.375rem 0.625rem; }

.cost-line { font-family: var(--sans); font-size: 1.25rem; margin: 0 0 1rem; }
.cost-line strong { font-weight: 700; }
.error-text { color: var(--bad); font-family: var(--sans); font-weight: 600; font-size: 1.1875rem; margin-top: 0.75rem; }
.signin-gate { background: var(--sunk); border: 2px solid var(--rule-soft); border-radius: var(--radius); padding: 1.25rem 1.5rem; }

/* ---------------- dashboard ---------------- */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.dash-head h1 { margin: 0 0 0.375rem; }
.dash-head p { margin: 0; color: var(--ink-2); }
.dash-tools { display: flex; align-items: center; gap: 0.75rem 1rem; flex-wrap: wrap; margin: 0 0 1.25rem; font-family: var(--sans); }
.dash-tools-label { font-weight: 700; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 0.5rem; }
.seg-btn {
  font-family: var(--sans); font-size: 1.1875rem; font-weight: 600; min-height: 3rem; padding: 0.5rem 1.125rem;
  border: 2px solid var(--rule); border-radius: var(--radius); background: var(--surface); color: var(--ink); cursor: pointer;
}
.seg-btn.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.dash-list { display: grid; gap: 1.25rem; }
.dash-item { background: var(--surface); border: 1px solid var(--rule-soft); border-radius: var(--radius); padding: 1.5rem 1.75rem; }
.dash-item.deleting { opacity: 0.6; pointer-events: none; }
.di-title { font-size: 1.625rem; margin: 0 0 0.375rem; }
.di-title a { color: var(--ink); text-decoration: none; }
.di-title a:hover { color: var(--accent); text-decoration: underline; }
.di-question { color: var(--ink-2); margin: 0 0 0.875rem; max-width: var(--measure); overflow-wrap: anywhere; }
.di-status { font-family: var(--sans); font-size: 1.1875rem; margin: 0 0 0.25rem; }
.di-status-explain { font-family: var(--sans); font-size: 1.125rem; color: var(--ink-2); margin: 0; max-width: var(--measure); }
.di-meta { font-family: var(--sans); font-size: 1.125rem; color: var(--ink-2); margin: 0.375rem 0 0; }
.di-actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; margin-top: 1.25rem; }
.di-actions .push { margin-left: auto; }
.di-film { margin-top: 1.25rem; padding: 1rem 1.25rem; background: var(--sunk); border-radius: var(--radius); }
.di-film-head { font-family: var(--sans); font-size: 1.125rem; color: var(--ink-2); margin: 0 0 2px; }
.di-film-title { font-size: 1.375rem; font-weight: 600; margin: 0 0 0.25rem; }
.di-film .di-actions { margin-top: 0.75rem; }
.dash-empty { background: var(--surface); border: 1px solid var(--rule-soft); border-radius: var(--radius); padding: 2rem; }
.dash-empty p { max-width: var(--measure); }
.new-form-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.new-form-head h2 { margin: 0 0 0.5rem; }

/* ---------------- clarifying questions ---------------- */
.q-item { margin-bottom: 1.75rem; }
.q-item label { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.375rem; margin-bottom: 0.375rem; }
.q-why { display: block; font-family: var(--sans); font-size: 1.125rem; color: var(--ink-2); margin: 0 0 0.625rem; max-width: var(--measure); }

/* ---------------- research report ---------------- */
.report-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; margin: 0 0 1.5rem; }
.summary-box { background: var(--surface); border: 1px solid var(--rule-soft); border-radius: var(--radius); padding: 1rem 1.25rem; font-family: var(--sans); }
.summary-box .n { display: block; font-size: 1.875rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
.summary-box .l { display: block; font-size: 1.125rem; color: var(--ink-2); }
.summary-box.disputed .n { color: var(--bad); }
.downloads { margin: 0 0 2rem; }
.downloads h2 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.report {
  background: var(--surface); border: 1px solid var(--rule-soft); border-radius: var(--radius);
  padding: 2.5rem 3rem; margin: 0 0 2rem;
}
.report > * { max-width: var(--measure); }
.report h1 { font-size: 2.125rem; border-bottom: 1px solid var(--rule-soft); padding-bottom: 0.875rem; margin-bottom: 1.25rem; }
.report h2 { font-size: 1.6875rem; margin-top: 2.5rem; }
.report h3 { font-size: 1.375rem; margin-top: 1.75rem; }
.report li { margin-bottom: 0.5rem; }
.report blockquote { border-left: 4px solid var(--rule); margin: 1em 0; padding: 0.25rem 1.25rem; color: var(--ink); }
.report table { border-collapse: collapse; width: 100%; font-size: 1.125rem; }
.report th, .report td { border: 1px solid var(--rule-soft); padding: 0.5rem 0.75rem; text-align: left; }
.report .cite { font-size: 0.8em; vertical-align: super; text-decoration: none; font-weight: 700; }
.report-section-label { font-family: var(--sans); font-size: 1.125rem; font-weight: 600; color: var(--ink-2); margin: 0 0 0.25rem; }
.how-sure { background: var(--sunk); border-radius: var(--radius); padding: 1.125rem 1.375rem; margin: 1.75rem 0; }
.how-sure h3 { margin: 0 0 0.375rem; font-size: 1.375rem; }
.how-sure p { margin: 0; }
.unsourced { background: var(--bad-tint); border: 2px solid var(--bad); border-radius: var(--radius); padding: 1.125rem 1.375rem; margin: 2rem 0; }
.unsourced h2 { margin-top: 0; }
.unsourced ul { margin: 0.75rem 0 0; padding-left: 1.25rem; }
.unsourced li { margin: 0 0 0.625rem; }
.unsourced li strong { color: var(--bad); }
.unsourced .fact-ref { color: var(--ink-2); font-size: 0.95em; }
.integrity-note { background: var(--sunk); border-radius: var(--radius); padding: 0.875rem 1.125rem; font-family: var(--sans); font-size: 1.125rem; margin: 0 0 1.5rem; }
.cap-note { display: block; font-weight: 400; margin-top: 0.25rem; }
.bibliography { padding-left: 1.6em; font-size: 1.1875rem; }
.bibliography li { margin-bottom: 0.5rem; overflow-wrap: anywhere; }
.open-questions li { margin-bottom: 0.5rem; }

.facts { margin: 0 0 2.5rem; }
.facts-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.facts-head h2 { margin: 0; }
.facts-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 1rem; }
.fact { background: var(--surface); border: 1px solid var(--rule-soft); border-radius: var(--radius); padding: 1.375rem 1.625rem; }
.fact.is-disputed { border: 2px solid var(--bad); }
.fact-claim { font-size: 1.3125rem; font-weight: 600; margin: 0 0 0.75rem; max-width: var(--measure); }
.fact-n { font-family: var(--sans); font-weight: 700; color: var(--ink-2); margin-right: 0.5rem; }
.fact-detail { margin: 0.75rem 0 0; max-width: var(--measure); }
.fact-note { margin: 0.625rem 0 0; font-size: 1.1875rem; max-width: var(--measure); }
.fact-note strong { font-family: var(--sans); }
.fact-sources { margin: 0.75rem 0 0; font-family: var(--sans); font-size: 1.125rem; }
.fact-sources ul { margin: 0.25rem 0 0; padding-left: 1.2em; }
.fact-sources li { margin-bottom: 0.25rem; overflow-wrap: anywhere; }
.f-no-sources { font-family: var(--sans); font-size: 1.125rem; color: var(--bad); font-weight: 600; margin: 0.625rem 0 0; }

/* ---------------- documentary: setup + estimate ---------------- */
.film-panel { border-left: 6px solid var(--accent); }
.film-panel h2 { margin-top: 0; }
.film-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.film-item { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; padding: 0.875rem 1.125rem; background: var(--sunk); border-radius: var(--radius); font-family: var(--sans); }
.film-item-title { font-family: var(--serif); font-weight: 600; font-size: 1.3125rem; flex: 1 1 16.25rem; }
table.estimate { width: 100%; max-width: 47.5rem; border-collapse: collapse; font-size: 1.1875rem; margin: 0.5rem 0 0.75rem; }
table.estimate td { padding: 0.75rem 0.5rem; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
table.estimate td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-family: var(--sans); font-weight: 600; }
table.estimate tfoot td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: none; font-size: 1.25rem; }
.est-detail { color: var(--ink-2); font-size: 1.0625rem; font-family: var(--sans); }

/* ---------------- outline review ---------------- */
.part { border-top: 2px solid var(--ink); padding-top: 1.25rem; margin-top: 2.25rem; }
.part-label { font-family: var(--sans); font-weight: 700; font-size: 1.125rem; color: var(--ink-2); display: block; margin-bottom: 0.25rem; }
.scene-edit { background: var(--sunk); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 1rem 0; }
.scene-edit-head { display: flex; gap: 0.75rem 1rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 0.75rem; }
.scene-edit-head .field { flex: 1 1 20rem; margin: 0; }
.scene-sec { font-family: var(--sans); font-size: 1.125rem; flex: none; }
.scene-sec label { display: block; font-weight: 700; margin-bottom: 0.25rem; }
.scene-sec input { width: 6.875rem; }
.scene-facts { margin-top: 0.75rem; font-family: var(--sans); font-size: 1.125rem; }
.scene-facts-title { font-weight: 700; margin: 0 0 0.375rem; }
.scene-facts ul { margin: 0; padding-left: 1.2em; }
.scene-facts li { margin-bottom: 0.25rem; }
.cite-disputed { color: var(--bad); font-weight: 600; }
.redo-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: flex-end; }
.redo-row > input, .redo-row > .field { flex: 1 1 20rem; margin: 0; }

/* ---------------- storyboard ---------------- */
.board-section { margin: 0 0 2.5rem; }
.board-section > h2 { margin-bottom: 0.5rem; }
.board-counts { font-size: 1.25rem; margin: 0 0 0.5rem; }
.tool-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-top: 1.25rem; }
.tool-box { background: var(--sunk); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.tool-box h3 { font-size: 1.3125rem; margin-bottom: 0.5rem; }
.tool-box .field { margin-bottom: 0.75rem; }
.tool-box .btn-row { margin-top: 0.75rem; }
.tool { display: inline-flex; gap: 0.625rem; align-items: center; font-family: var(--sans); font-size: 1.1875rem; min-height: 3rem; }
.tool select { width: auto; max-width: 100%; }

.continuity { border-left: 6px solid var(--bad); }
.continuity.is-clear { border-left-color: var(--good); }
.continuity h2 { margin-top: 0; }
.continuity ul { padding-left: 1.2em; margin: 1rem 0 0; }
.continuity li { margin-bottom: 0.75rem; max-width: var(--measure); }
.continuity li.issue-dismissed, .continuity li.issue-fixed { color: var(--ink-2); }
.issue-tag { font-family: var(--sans); font-weight: 700; }
.issue-tag-fix { color: var(--bad); }
.issue-tag-check { color: var(--mid); }
.issue-state { color: var(--ink-2); font-family: var(--sans); font-size: 1.125rem; }
.cite-ref { background: none; border: none; padding: 0 2px; font: inherit; font-weight: 700; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.preview-panel { background: var(--surface); border: 1px solid var(--rule-soft); border-radius: var(--radius); padding: 1.75rem 2rem; margin: 0 0 2.5rem; }
.preview-panel h2 { margin-top: 0; }
.preview-stage { background: #111; border-radius: 4px; display: flex; justify-content: center; }
.preview-stage canvas { width: 100%; max-width: 56.25rem; aspect-ratio: 16 / 9; display: block; }
.preview-controls { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; margin-top: 1rem; }
.preview-controls input[type=range] { flex: 1 1 15rem; height: 2rem; accent-color: var(--accent); }
.pv-time { font-family: var(--sans); font-size: 1.1875rem; font-variant-numeric: tabular-nums; }
.preview-options { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; margin-top: 0.75rem; }
.check { display: inline-flex; gap: 0.75rem; align-items: center; min-height: 3rem; font-family: var(--sans); font-size: 1.1875rem; cursor: pointer; }

.board-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 0; overflow: hidden;
}
.card.approved { border: 2px solid var(--good); }
.card.is-disputed { border: 2px solid var(--bad); }
.card.dragging { opacity: 0.5; }
.card.drop-before { box-shadow: 0 -6px 0 var(--accent); }
.card.drop-after { box-shadow: 0 6px 0 var(--accent); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; padding: 0.875rem 1.5rem; background: var(--sunk); border-bottom: 1px solid var(--rule-soft); }
.card-n { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; margin: 0; }
.card-scene { font-family: var(--sans); font-size: 1.125rem; color: var(--ink-2); }
.card-state { margin-left: auto; font-family: var(--sans); font-weight: 700; font-size: 1.1875rem; }
.card-state.ok { color: var(--good); }
.card-state.todo { color: var(--ink-2); }
.card-disputed { margin: 0; padding: 0.75rem 1.5rem; background: var(--bad-tint); border-bottom: 1px solid var(--bad); font-family: var(--sans); font-size: 1.125rem; }
.card-disputed strong { color: var(--bad); }
.card-body { display: grid; grid-template-columns: minmax(0, 22.5rem) minmax(0, 1fr); gap: 1.75rem; padding: 1.5rem; }
.card-picture { display: flex; flex-direction: column; gap: 0.625rem; }
.card-thumb { width: 100%; aspect-ratio: 16 / 9; background: var(--sunk); border-radius: 4px; display: block; border: 1px solid var(--rule-soft); }
.card-media-label { font-family: var(--sans); font-size: 1.125rem; margin: 0; }
.card-media-label strong { font-weight: 700; }
.card-media { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.arch-credit-line { font-family: var(--sans); font-size: 1.0625rem; color: var(--ink-2); }
.card-words > label { display: block; font-family: var(--sans); font-weight: 700; font-size: 1.1875rem; margin-bottom: 0.375rem; }
.card-narr { font-family: var(--serif); font-size: 1.3125rem; line-height: 1.55; min-height: 8.75rem; }
.card-cites { margin: 0.875rem 0 0; font-family: var(--sans); font-size: 1.125rem; }
.card-cites-title { font-weight: 700; margin: 0 0 0.25rem; }
.card-cites ul { margin: 0; padding-left: 1.2em; }
.card-cites li { margin-bottom: 0.25rem; }
.card-cites .disputed-word { color: var(--bad); font-weight: 700; }
.card-sound, .card-note { font-family: var(--sans); font-size: 1.125rem; color: var(--ink-2); margin: 0.625rem 0 0; }
.card-voice { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; margin-top: 0.875rem; }
.card-dur { display: inline-flex; align-items: center; gap: 0.625rem; font-family: var(--sans); font-size: 1.1875rem; }
.card-dur input { width: 6rem; }
.stale-voice { font-family: var(--sans); font-size: 1.125rem; color: var(--mid); font-weight: 600; margin-top: 0.625rem; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; padding: 1rem 1.5rem; border-top: 1px solid var(--rule-soft); background: var(--surface); }
.card-approve { display: inline-flex; gap: 0.75rem; align-items: center; min-height: 3rem; padding: 0.375rem 1rem; border: 2px solid var(--good); border-radius: var(--radius); font-family: var(--sans); font-weight: 700; font-size: 1.1875rem; color: var(--good); cursor: pointer; }
.card.approved .card-approve { background: var(--good-tint); }
.card-foot .spacer { flex: 1 1 auto; }
.card.busy .card-body, .card.busy .card-foot { opacity: 0.55; }
.card-busy { display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 1.5rem; background: var(--accent-tint); font-family: var(--sans); font-weight: 600; }

.card-issue { margin-top: 1rem; padding: 0.875rem 1rem; border-left: 5px solid var(--bad); background: var(--bad-tint); border-radius: 0 var(--radius) var(--radius) 0; }
.card-issue.issue-check { border-left-color: var(--mid); background: var(--mid-tint); }
.card-issue.issue-dismissed, .card-issue.issue-fixed { background: var(--sunk); border-left-color: var(--rule); }
.card-issue.issue-fixed { border-left-color: var(--good); }
.issue-head { font-family: var(--sans); font-weight: 700; font-size: 1.125rem; }
.card-issue.issue-fix .issue-head { color: var(--bad); }
.card-issue.issue-check .issue-head { color: var(--mid); }
.card-issue.issue-fixed .issue-head { color: var(--good); }
.card-issue.issue-dismissed .issue-head { color: var(--ink-2); }
.issue-msg { margin: 0.25rem 0 0.5rem; font-size: 1.1875rem; }
.issue-actions { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; }

.render-panel { background: var(--surface); border: 1px solid var(--rule-soft); border-radius: var(--radius); padding: 1.75rem 2rem; margin: 2.5rem 0 0; border-left: 6px solid var(--accent); }
.render-panel h2 { margin-top: 0; }
.render-panel h3 { margin-top: 2rem; }
.render-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; margin: 1rem 0; }
.render-bar { height: 1rem; background: var(--sunk); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; margin: 1rem 0 0.5rem; max-width: 47.5rem; }
.render-fill { height: 100%; background: var(--accent); }
.render-video { width: 100%; max-width: 56.25rem; border-radius: 4px; background: #000; display: block; margin: 1rem 0; }
.render-history { font-family: var(--sans); font-size: 1.125rem; padding-left: 1.2em; }
.render-history li { margin-bottom: 0.5rem; }

.film-actions { margin: 1.75rem 0 0; display: flex; gap: 0.75rem 1rem; flex-wrap: wrap; align-items: center; }

/* ---------------- dialogs ---------------- */
.pay-gate { position: fixed; inset: 0; background: rgba(27, 25, 21, 0.6); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 50; }
.pay-card {
  background: var(--paper); color: var(--ink); border-radius: 8px; padding: 2rem 2.25rem; max-width: 37.5rem; width: 100%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3); max-height: calc(100vh - 2rem); overflow: auto; border: 1px solid var(--rule);
}
.pay-card h3 { font-size: 1.6875rem; margin: 0 0 1rem; }
.pay-packs { display: grid; gap: 0.75rem; margin: 1.25rem 0; }
.pay-pack { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; width: 100%; text-align: left; }
.pay-price { font-weight: 700; }
.doc-modal-card.wide { max-width: 60rem; }
.doc-modal-body p { margin: 0 0 0.875rem; }
.doc-modal-body label { font-family: var(--sans); font-weight: 700; display: block; margin-bottom: 0.375rem; }
.doc-modal-actions { display: flex; gap: 0.75rem 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.cost-box { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 0 1rem; font-family: var(--sans); }
.cost-box p { margin: 0 0 0.375rem; font-size: 1.25rem; }
.cost-box p:last-child { margin-bottom: 0; }
.cost-big { font-size: 1.5rem !important; }

.drawer-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.drawer-tab {
  font-family: var(--sans); font-size: 1.125rem; font-weight: 600; min-height: 3rem; padding: 0.5rem 1rem;
  background: var(--surface); border: 2px solid var(--rule); border-radius: var(--radius); color: var(--ink); cursor: pointer;
}
.drawer-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.drawer-pane .redo-row { margin: 0.75rem 0; }
.arch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.75rem, 1fr)); gap: 1rem; }
.arch-item { border: 1px solid var(--rule-soft); border-radius: var(--radius); background: var(--surface); padding: 0.625rem; display: flex; flex-direction: column; gap: 0.5rem; font-family: var(--sans); }
.arch-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--sunk); border-radius: 3px; }
.arch-title { font-weight: 700; font-size: 1.125rem; overflow-wrap: anywhere; }
.arch-credit, .arch-lic { font-size: 1.0625rem; color: var(--ink-2); overflow-wrap: anywhere; }
.arch-item .btn-secondary { margin-top: auto; }
.anim-kinds { display: flex; gap: 0.5rem 1.25rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.anim-kinds label, .anim-route { display: inline-flex; align-items: center; gap: 0.625rem; min-height: 3rem; font-family: var(--sans); font-size: 1.1875rem; cursor: pointer; }
.drawer-pane input[type=file] { font-family: var(--sans); font-size: 1.1875rem; min-height: 3rem; }

.doc-toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); opacity: 0;
  background: var(--ink); color: var(--paper); padding: 1rem 1.375rem; border-radius: 6px; z-index: 60;
  max-width: min(40rem, 92vw); font-family: var(--sans); font-size: 1.1875rem; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.doc-toast.show { opacity: 1; }
.doc-toast-warn { background: #4a3000; }
.doc-toast-bad { background: var(--bad); }
.card.flash { outline: 4px solid var(--focus); outline-offset: 3px; }

/* ---------------- narrower screens ---------------- */
@media (max-width: 53.75em) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(2) { border-right: none; }
  .step:nth-child(-n+2) { border-bottom: 1px solid var(--rule-soft); }
  .card-body { grid-template-columns: 1fr; }
  .tool-group, .lp-samples, .lp-steps { grid-template-columns: 1fr; }
  .report-summary { grid-template-columns: 1fr; }
}
@media (max-width: 37.5em) {
  body { font-size: 1.1875rem; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.625rem; }
  .lp-title { font-size: 2.125rem; }
  .lp-lede { font-size: 1.25rem; }
  .lp-hero { padding: 2.5rem 0; }
  .lp-section { padding: 2.5rem 0; }
  .lp-inner, .topbar-inner, .footer-inner { padding-left: 1rem; padding-right: 1rem; }
  main { padding: 1.5rem 1rem 4.5rem; }
  .brand-text { font-size: 1.5rem; }
  .account-slot { font-size: 1.125rem; gap: 0.25rem 0.875rem; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: none; border-bottom: 1px solid var(--rule-soft); }
  .step:last-child { border-bottom: none; }
  .panel, .report, .preview-panel, .render-panel { padding: 1.25rem; }
  .report { padding: 1.5rem 1.25rem; }
  .card-body { padding: 1rem; gap: 1rem; }
  .card-head, .card-foot, .card-disputed { padding-left: 1rem; padding-right: 1rem; }
  .dash-item { padding: 1.25rem; }
  .pay-card { padding: 1.5rem 1.25rem; }
  .btn, .btn-secondary, .btn-danger { width: 100%; }
  .btn-quiet, .btn-link { padding-left: 0.25rem; padding-right: 0.25rem; }
  .lp-actions .btn, .dash-head .btn { width: 100%; }
  .card-state { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .spinner { border-top-color: var(--accent); border-right-color: var(--accent); }
}

.legend-title { font-family: var(--serif); font-size: 1.875rem; font-weight: 600; line-height: 1.25; margin-bottom: 0.5rem; padding: 0; }
.tool { flex-wrap: wrap; max-width: 100%; }
.tool select { min-width: 0; }
@media (max-width: 37.5em) {
  .tool { display: flex; width: 100%; }
  .tool select { width: 100%; }
}
@media (max-width: 37.5em) {
  .step { padding: 0.625rem 1rem; }
  .step:not(.step-current) .step-text { display: none; }
  .step:not(.step-current) { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
  .step:not(.step-current) .step-name { margin: 0; }
  .step:not(.step-current) .step-where { margin: 0; }
  .account-slot .btn-secondary { width: auto; }
}
/* Links that stand alone in lists get a full-height target. */
.bibliography a, .fact-sources a, .card-cites a, .continuity li a, .render-history .btn-link { display: inline-block; padding-block: 0.6875rem; }
.bibliography li, .fact-sources li { margin-bottom: 0; }
.di-title a { display: inline-block; padding-block: 0.375rem; }

/* ---------------- "Check my writing" ---------------- */
.dash-start { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; }
.di-type { font-family: var(--sans); font-weight: 600; font-size: 1.0625rem; color: var(--ink-2); margin: 0 0 0.25rem; }
.page-head .di-type { margin: 0.5rem 0 0; }
.fc-privacy { font-family: var(--sans); font-size: 1.125rem; color: var(--ink-2); background: var(--sunk); border-radius: var(--radius); padding: 0.875rem 1.125rem; max-width: 47.5rem; margin: 0 0 1.5rem; }
.fc-privacy strong { color: var(--ink); }
.field-wide { max-width: none; }
#fc-text { min-height: 18rem; font-family: var(--serif); }
.fc-count { font-family: var(--sans); font-size: 1.125rem; color: var(--ink-2); margin: 0.5rem 0 0; }
.fc-count.fc-over { color: var(--bad); font-weight: 700; }
.fc-file-btn { cursor: pointer; }
.field:has(#fc-file:focus-visible) .fc-file-btn { outline: 3px solid var(--focus); outline-offset: 2px; }
.fc-file-status { font-family: var(--sans); font-size: 1.125rem; margin: 0.625rem 0 0; max-width: var(--measure); }
.fc-file-status:empty { display: none; }
.fc-step-cost { max-width: 47.5rem; }

.fc-choose-tools { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; margin: 1.25rem 0; }
.fc-top { display: inline-flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; font-family: var(--sans); font-size: 1.1875rem; }
.fc-top label { font-weight: 600; }
.fc-top input { width: 5.5rem; }
.fc-choose { margin: 0 0 1.5rem; }
.fc-choose-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.625rem; }
.fc-pick { display: flex; gap: 0.875rem; align-items: flex-start; padding: 0.875rem 1.125rem; min-height: 3rem; border: 2px solid var(--rule-soft); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.fc-pick:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }
.fc-pick input { margin-top: 0.25rem; }
.fc-pick > span { display: block; min-width: 0; }
.fc-pick-meta { display: block; font-family: var(--sans); font-weight: 700; font-size: 1.0625rem; color: var(--ink-2); }
.fc-personal { display: block; font-family: var(--sans); font-size: 1rem; color: var(--ink-2); font-style: italic; }
.fc-again { border-left: 5px solid var(--mid); margin: 1rem 0 1.5rem; }
.fc-again h3 { margin-top: 0; }
.fc-pick-statement { display: block; font-size: 1.25rem; }
.fc-pick-quote { display: block; font-family: var(--sans); font-size: 1.0625rem; color: var(--ink-2); margin-top: 0.25rem; overflow-wrap: anywhere; }

.fc-label { font-family: var(--sans); font-weight: 700; font-size: 1.125rem; border-left: 5px solid var(--rule); padding: 0.125rem 0.5rem; display: inline-block; }
.fc-label.tone-good { color: var(--good); border-left-color: var(--good); background: var(--good-tint); }
.fc-label.tone-mid { color: var(--mid); border-left-color: var(--mid); background: var(--mid-tint); }
.fc-label.tone-bad { color: var(--bad); border-left-color: var(--bad); background: var(--bad-tint); }
.fc-label.tone-none { color: var(--ink-2); border-left-color: var(--rule); background: var(--sunk); }
.fc-summary { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.fc-box { border-left: 6px solid var(--rule); }
.fc-box.tone-good { border-left-color: var(--good); }
.fc-box.tone-mid { border-left-color: var(--mid); }
.fc-box.tone-bad { border-left-color: var(--bad); }
.fc-box-label { display: block; font-weight: 700; font-size: 1.1875rem; color: var(--ink); margin: 0.125rem 0 0.25rem; }
.fc-box.tone-bad .n { color: var(--bad); }
.fc-first h3 { margin-top: 0; }
.fc-first-list { margin: 0.75rem 0 0; padding-left: 1.4em; }
.fc-first-list li { margin-bottom: 1rem; max-width: var(--measure); }
.fc-first-quote { display: block; margin-top: 0.375rem; overflow-wrap: anywhere; }
.fc-first-fix { display: block; font-family: var(--sans); font-size: 1.125rem; margin-top: 0.25rem; }
.fc-first-list .btn-quiet { padding-left: 0; }
.fc-row-label { margin: 0 0 0.5rem; }

.fc-text { background: var(--surface); border: 1px solid var(--rule-soft); border-radius: var(--radius); padding: 2rem 2.5rem; margin: 0 0 2.5rem; line-height: 1.9; }
.fc-text p { max-width: var(--measure); margin: 0 0 1.25em; overflow-wrap: anywhere; }
.fc-mark { color: inherit; background: var(--sunk); border-bottom: 3px solid var(--rule); padding: 0.1em 0; }
.fc-mark.tone-good { background: var(--good-tint); border-bottom-color: var(--good); }
.fc-mark.tone-mid { background: var(--mid-tint); border-bottom-color: var(--mid); }
.fc-mark.tone-bad { background: var(--bad-tint); border-bottom-color: var(--bad); }
.fc-mark.tone-none { background: var(--sunk); border-bottom: 3px dashed var(--ink-2); }
.fc-tag {
  display: inline-flex; align-items: center; min-height: 3rem; vertical-align: middle; margin: 0.125rem 0;
  font-family: var(--sans); font-weight: 700; font-size: 1.0625rem; line-height: 1.2; padding: 0.25rem 0.625rem;
  border: 2px solid var(--rule); border-radius: var(--radius); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.fc-tag.tone-good { border-color: var(--good); color: var(--good); }
.fc-tag.tone-mid { border-color: var(--mid); color: var(--mid); }
.fc-tag.tone-bad { border-color: var(--bad); color: var(--bad); background: var(--bad-tint); }
.fc-tag.tone-none { border-color: var(--ink-2); color: var(--ink-2); border-style: dashed; }
.fc-tag:hover { background: var(--accent-tint); }
.fc-panel-quote { overflow-wrap: anywhere; }
.fc-correction { background: var(--surface); border: 2px solid var(--accent); border-radius: var(--radius); padding: 0.75rem 1rem; margin: 0 0 0.875rem; }
.fc-correction p { margin: 0 !important; }
.fc-rule { font-family: var(--sans); font-size: 1.125rem; color: var(--ink-2); }
.fc-stance { font-weight: 700; }
.fc-nosrc { font-family: var(--sans); font-weight: 600; color: var(--ink-2); }
.doc-modal-body .support { margin-bottom: 0.875rem; }

@media (max-width: 37.5em) {
  .dash-start { width: 100%; }
  .dash-start .btn, .dash-start .btn-secondary { width: 100%; }
  .fc-text { padding: 1.25rem 1rem; }
  .fc-top { width: 100%; }
  .fc-choose-tools .btn-secondary { width: 100%; }
  .fc-tag { white-space: normal; }
}

/* ---------------- the three ways in ---------------- */
/* Top bar: brand and account on the first line, the three destinations on
   their own line beneath, always as words. */
.main-nav {
  flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 0.25rem 2rem;
  border-top: 1px solid var(--rule-soft); padding-top: 0.25rem; font-family: var(--sans); font-size: 1.1875rem;
}
.main-nav-link {
  display: inline-flex; align-items: center; min-height: 3rem; padding: 0 0.25rem;
  color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 4px;
  border-bottom: 4px solid transparent;
}
.main-nav-link:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
.main-nav-link[aria-current="page"] { color: var(--ink); text-decoration: none; border-bottom-color: var(--accent); }

.ways, .start-ways { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.way, .start-way {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.25rem;
}
.way h3 { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.way p, .start-way p { margin: 0 0 0.75rem; }
.way .btn, .start-way .btn { margin-top: auto; align-self: flex-start; }
.way-cost { font-family: var(--sans); font-size: 1.125rem; color: var(--ink-2); }
.lp-ways { background: var(--paper); }
.lp-ways .lp-note { margin: 1.5rem 0 0; max-width: var(--measure); }
.start-panel { margin: 0 0 2.5rem; }
.start-title { font-size: 1.4375rem; margin-bottom: 1rem; }
.start-way-title { margin-bottom: 0.375rem; }
.di-nested { border-left: 5px solid var(--rule-soft); padding: 0.5rem 0 0.5rem 1rem; margin: 1rem 0; }
.di-nested .di-film-head { margin-top: 0; }
.ff-from .choices { margin-top: 0.5rem; }
.ff-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.ff-item { border: 1px solid var(--rule-soft); border-radius: var(--radius); padding: 1.25rem; background: var(--surface); }
.ff-item-title { margin-bottom: 0.25rem; }
.estimate .est-now td { font-weight: 700; }
.signed-out-start .cost-line { margin-top: 1rem; }

@media (max-width: 53.75em) {
  .ways, .start-ways { grid-template-columns: 1fr; }
  .way .btn, .start-way .btn { align-self: stretch; }
}
@media (max-width: 37.5em) {
  .account-slot .btn { width: auto; }
  .main-nav { flex-direction: column; gap: 0; }
  .main-nav-link { border-bottom: 1px solid var(--rule-soft); padding: 0 0.25rem; }
  .main-nav-link:last-child { border-bottom: none; }
  .main-nav-link[aria-current="page"] { border-bottom-color: var(--rule-soft); border-left: 5px solid var(--accent); padding-left: 0.75rem; }
}
.dash-head { display: block; }
.estimate .est-now .est-detail { font-weight: 400; }
