/* PaperCurrent design system — tokens and components from the design handoff.
   Fonts are self-hosted (no third-party requests, GDPR). */

@font-face {
  font-family: "EB Garamond"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/eb-garamond-v33-latin-regular.005abdc3a2d3.woff2") format("woff2");
}
@font-face {
  font-family: "EB Garamond"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/eb-garamond-v33-latin-italic.985f75b87984.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/inter-v20-latin-regular.da03732a27e1.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/inter-v20-latin-500.51205681a1ba.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/inter-v20-latin-600.2ede57db1a3a.woff2") format("woff2");
}

:root {
  --canvas: #f5f5f5;
  --canvas-soft: #fafafa;
  --surface-card: #ffffff;
  --surface-strong: #f0efed;
  --primary: #292524;
  --ink: #0c0a09;
  --body: #4e4e4e;
  /* Text-role greys darkened to clear WCAG AA (>=4.5:1 on the #f5f5f5 canvas).
     The old #777169/#a8a29e read at ~4.4 and ~2.3 and failed on metadata,
     footer, and the "/5" score suffix. --muted-soft stays the lightest tier. */
  --muted: #655f59;
  --muted-soft: #6f6a63;
  --hairline: #e7e5e4;
  --hairline-soft: #f0efed;
  --hairline-strong: #d6d3d1;
  --error: #dc2626;
  --error-hover: #b91c1c;
  --email-desk: #e9e8e6;
  --mint: 167, 229, 211;
  --peach: 244, 197, 168;
  --lavender: 200, 184, 224;
  --sky: 168, 200, 232;
  --rose: 232, 184, 196;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--canvas); color: var(--body);
  font-family: var(--sans); font-size: 15.5px; line-height: 1.6;
  letter-spacing: 0.15px;
}
a { color: inherit; }
a:hover { color: var(--muted); }
h1, h2, h3 { font-weight: 400; color: var(--ink); margin: 0; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 2px; }

/* --- Typography ---------------------------------------------------------- */
.display-hero { font-family: var(--serif); font-size: 64px; line-height: 1.05; letter-spacing: -1.9px; color: var(--ink); }
.display-page { font-family: var(--serif); font-size: 48px; line-height: 1.08; letter-spacing: -0.96px; color: var(--ink); }
.display-app  { font-family: var(--serif); font-size: 40px; line-height: 1.1; letter-spacing: -0.8px; color: var(--ink); }
.section-head { font-family: var(--serif); font-size: 36px; line-height: 1.17; letter-spacing: -0.36px; color: var(--ink); }
.serif-title  { font-family: var(--serif); font-size: 21px; line-height: 1.25; color: var(--ink); }
.numeral      { font-family: var(--serif); font-size: 42px; color: var(--muted-soft); }
.score        { font-family: var(--serif); font-size: 24px; color: var(--ink); }
.score small  { font-size: 14px; color: var(--muted-soft); }
.eyebrow, .cap {
  font-family: var(--sans); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.92px; text-transform: uppercase; color: var(--muted);
}
.meta { font-size: 13px; color: var(--muted-soft); }
.mono { font-family: var(--mono); font-size: 13px; }
.mut  { color: var(--muted); }

@media (max-width: 720px) {
  .display-hero { font-size: 42px; letter-spacing: -1.1px; }
  .display-page { font-size: 36px; }
  .display-app { font-size: 32px; }
  .section-head { font-size: 28px; }
}

/* --- Layout -------------------------------------------------------------- */
/* Keyboard/screen-reader users jump past the nav straight to content. */
.skip-link {
  position: absolute; left: 12px; top: -52px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
  text-decoration: none; font-size: 14px; font-weight: 500; transition: top 0.15s;
}
.skip-link:focus { top: 12px; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.container-mid { max-width: 880px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.app-main { padding: 48px 0 96px; }
.band { background: var(--canvas-soft); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }

/* --- Nav ------------------------------------------------------------------ */
.nav {
  position: sticky; top: 0; z-index: 40; height: 64px;
  background: rgba(245, 245, 245, 0.88); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
/* :not(.btn) so the "Request access" pill keeps its own white-on-dark colours;
   without this, .nav-links a (0,0,1,1) overrode .btn-primary (0,0,1,0) and the
   CTA rendered dark-grey text on the dark pill (~1.8:1). */
.nav-links a:not(.btn) { font-size: 13.5px; font-weight: 500; text-decoration: none; color: var(--body); }
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); padding-bottom: 20px; margin-bottom: -20px; }
.wordmark { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.wordmark-glyph {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 9999px; background: var(--ink);
  color: #fff; font-family: var(--serif); font-size: 15px;
}
.wordmark-name { font-weight: 600; font-size: 16px; letter-spacing: -0.2px; color: var(--ink); }
.wordmark-by { font-size: 12px; color: var(--muted-soft); }
@media (max-width: 860px) { .wordmark-by, .nav-links a.optional { display: none; } }
/* Phones: tighten the bar and drop the nav "Method" link (still in the footer)
   so the wordmark + Sign in + Request access fit without overflowing the body. */
@media (max-width: 640px) {
  .nav-inner { gap: 16px; }
  .nav-links { gap: 16px; }
  .nav-links a.phone-hide { display: none; }
  /* App nav carries 3 sections + avatar + sign-out; on phones show just the
     glyph home mark and drop the avatar so the row fits. Public brand wordmark
     is untouched. */
  .nav-app .wordmark-name, .nav-app .avatar { display: none; }
}
.avatar {
  width: 32px; height: 32px; border-radius: 9999px; background: var(--surface-strong);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--ink);
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 22px; border-radius: 9999px; border: 0;
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  cursor: pointer; text-decoration: none; transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--ink); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--hairline-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); background: var(--canvas-soft); color: var(--ink); }
.btn-invert { background: #fff; color: var(--ink); }
.btn-invert:hover { background: var(--surface-strong); color: var(--ink); }
.btn-danger { background: transparent; border: 1px solid var(--error); color: var(--error); }
.btn-danger:hover { background: var(--error); color: #fff; }
.btn[disabled], .btn.disabled { opacity: 0.4; pointer-events: none; }
.btn-sm { height: 34px; padding: 0 16px; font-size: 13px; }
.link { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; font-weight: 500; color: var(--body); cursor: pointer; text-decoration: none; }
.link:hover { color: var(--ink); }
.link-muted { color: var(--muted); }

/* --- Pills & chips --------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 9999px;
  background: var(--surface-strong); color: var(--body);
  font-size: 12.5px; font-weight: 500; padding: 4px 12px;
}
.chip-outline { background: transparent; border: 1px solid var(--hairline-strong); }
.chip-new { border: 1px solid var(--hairline-strong); }
.tag {
  display: inline-block; border-radius: 9999px; padding: 3px 10px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.9px; text-transform: uppercase;
  color: var(--ink); background: var(--surface-strong);
}
.tag-challenge { background: rgba(var(--rose), 0.55); }
.tag-method { background: rgba(var(--sky), 0.55); }
.tag-theory { background: rgba(var(--lavender), 0.55); }

/* --- Cards ----------------------------------------------------------------- */
.card {
  background: var(--surface-card); border: 1px solid var(--hairline);
  border-radius: 16px; padding: 24px;
}
.card:hover { box-shadow: var(--shadow); }
.card-static:hover { box-shadow: none; }
.panel { border-radius: 12px; padding: 14px 16px; }
.panel-challenge { background: rgba(var(--rose), 0.16); }
.panel-method { background: rgba(var(--sky), 0.16); }
.panel-theory { background: rgba(var(--lavender), 0.16); }
.panel-neutral { background: var(--surface-strong); }
.callout { background: var(--surface-strong); border-radius: 12px; padding: 14px 16px; }

/* --- Result card ----------------------------------------------------------- */
.result-card { background: var(--surface-card); border: 1px solid var(--hairline); border-radius: 16px; padding: 20px 22px; margin-bottom: 16px; }
.result-title { font-family: var(--serif); font-size: 21px; line-height: 1.25; color: var(--ink); margin: 0 0 6px; }
.result-meta { font-size: 13px; color: var(--muted-soft); margin-bottom: 12px; }
.assess-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.assess-label { font-size: 11px; font-weight: 600; letter-spacing: 0.9px; color: var(--muted); text-transform: uppercase; }
.assess-why { font-size: 15px; color: var(--primary); margin: 8px 0 0; }
.assess-evidence { margin: 8px 0 0; }
.assess-evidence .cap { font-size: 10.5px; }
.assess-evidence em { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--body); }
.assess-basis { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; align-items: center; }
.result-actions form { display: inline; }
.status-chip { background: var(--surface-strong); border-radius: 9999px; padding: 4px 12px; font-size: 12.5px; font-weight: 500; }

/* --- Forms ----------------------------------------------------------------- */
.input, input[type="text"], input[type="email"], input[type="url"], textarea, select {
  width: 100%; height: 44px; border-radius: 8px; border: 1px solid var(--hairline-strong);
  background: var(--surface-card); padding: 0 15px; font-family: var(--sans);
  font-size: 14.5px; color: var(--ink);
}
textarea { height: auto; min-height: 96px; padding: 12px 14px; line-height: 1.55; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted-soft); }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink);
}
label { font-size: 13.5px; font-weight: 500; color: var(--ink); display: block; margin-bottom: 6px; }
.field { margin-bottom: 18px; }
.help { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.errorlist { color: var(--error); font-size: 13px; list-style: none; padding: 0; margin: 6px 0 0; }

/* --- Toggle ---------------------------------------------------------------- */
.toggle { position: relative; display: inline-block; width: 40px; height: 22px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute; inset: 0; border-radius: 9999px; background: var(--hairline-strong);
  transition: background 0.15s ease; cursor: pointer;
}
.toggle-track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 9999px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: left 0.15s ease;
}
.toggle input:checked + .toggle-track { background: var(--primary); }
.toggle input:checked + .toggle-track::after { left: 20px; }

/* --- Tabs ------------------------------------------------------------------ */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.tab {
  height: 34px; display: inline-flex; align-items: center; padding: 0 16px;
  border-radius: 9999px; border: 1px solid var(--hairline-strong);
  background: transparent; color: var(--body); font-size: 13px; font-weight: 500;
  cursor: pointer; text-decoration: none;
}
.tab:hover { color: var(--ink); border-color: var(--ink); }
.tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* --- Orbs (decoration only, never behind text containers) ----------------- */
.orb {
  position: absolute; border-radius: 50%; filter: blur(56px); pointer-events: none;
  animation: drift 24s ease-in-out infinite alternate; z-index: 0;
}
.orb-lavender-sky { background: radial-gradient(closest-side, rgba(var(--lavender), 0.5), rgba(var(--sky), 0.35) 55%, transparent 74%); }
.orb-peach-rose { background: radial-gradient(closest-side, rgba(var(--peach), 0.5), rgba(var(--rose), 0.4) 55%, transparent 74%); }
.orb-mint { background: radial-gradient(closest-side, rgba(var(--mint), 0.45), transparent 74%); }
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(40px, 24px); } }
@media (prefers-reduced-motion: reduce) { .orb { animation: none; } }

/* --- Progress / quota ------------------------------------------------------ */
.progressbar { width: 120px; height: 4px; border-radius: 9999px; background: var(--hairline); overflow: hidden; }
.progressbar > span { display: block; height: 100%; background: var(--ink); border-radius: 9999px; }
.quota-track { height: 4px; border-radius: 9999px; background: var(--hairline); overflow: hidden; }
.quota-track > span { display: block; height: 100%; background: var(--ink); }

/* --- Save bar -------------------------------------------------------------- */
.savebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--ink); color: #d6d3d1; box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
}
.savebar-inner { display: flex; align-items: center; gap: 18px; padding: 14px 24px; max-width: 1200px; margin: 0 auto; }
.savebar .link { color: #a8a29e; }
.savebar .link:hover { color: #fff; }

/* --- Tables ---------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.compare { width: 100%; border-collapse: collapse; font-size: 14.5px; }
/* Below the phone breakpoint the table keeps a readable width and scrolls
   inside .table-wrap, so the page body never scrolls sideways. */
@media (max-width: 640px) { table.compare { min-width: 440px; } }
table.compare th, table.compare td { text-align: left; padding: 14px 16px; border-top: 1px solid var(--hairline); vertical-align: top; }
table.compare th { font-weight: 600; color: var(--ink); font-size: 13px; }

/* --- Footer ---------------------------------------------------------------- */
.footer { border-top: 1px solid var(--hairline); padding: 48px 0 32px; font-size: 13.5px; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px; }
.footer h4 { font-size: 12px; font-weight: 600; letter-spacing: 0.9px; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; }
.footer a { text-decoration: none; color: var(--body); }
.footer a:hover { color: var(--ink); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--hairline-soft); color: var(--muted-soft); font-size: 12.5px; }

/* --- Misc ------------------------------------------------------------------ */
.grid-2 { display: grid; grid-template-columns: 250px 1fr; gap: 40px; }
.grid-2r { display: grid; grid-template-columns: 1fr 290px; gap: 40px; }
@media (max-width: 900px) { .grid-2, .grid-2r { grid-template-columns: 1fr; } }
.rail { position: sticky; top: 96px; align-self: start; }
.divider { border: 0; border-top: 1px solid var(--hairline); margin: 24px 0; }
.pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
.check {
  display: inline-flex; width: 20px; height: 20px; border-radius: 9999px;
  border: 1px solid var(--hairline-strong); align-items: center; justify-content: center;
  font-size: 12px; color: transparent; flex: none;
}
.selected .check { background: var(--ink); border-color: var(--ink); color: #fff; }
.seed-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--hairline); border-radius: 12px; background: #fff; cursor: pointer; margin-bottom: 10px; }
.seed-row.selected { border-color: var(--ink); }
.notice { background: var(--surface-strong); border-radius: 12px; padding: 12px 16px; font-size: 13.5px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
