/* Public sub-pages: Terms, Privacy, Let's talk, How it works.
   Every size, spacing and dark colour is read from the Paper file "Nexus · Landing mockup",
   artboards "Public — Terms", "Public — Privacy", "Public — Let's talk" and "Public — How it works".
   Loaded after base.css and clinical.css: nav, footer, buttons, tags and both themes come from there.
   Rules use tokens only; the Paper values that have no token yet are added below with a white-view pair. */

:root {
  --pg-rule: #FFFFFF1F;
  --pg-check: #DDF1EC;
  --pg-err: #F5A08C;
  --pg-err-line: #F08A72;
  --pg-cta: #0B0B0C;
  --pg-cta-line: #FFFFFF14;
  --pg-cta-ink: #FFFFFF;
  --pg-cta-sub: #FFFFFFDB;
  --pg-cta-btn: #0B0B0C66;
  --pg-cta-btn-line: #FFFFFF66;
  --pg-cta-shade: linear-gradient(in oklab 180deg, #0B0B0C 0%, #0B0B0C 24%, #0B0B0CE0 48%, #0B0B0C9E 72%, #0B0B0C59 100%);
}
:root[data-theme="light"] {
  --pg-rule: #1C1D1F1F;
  --pg-check: var(--teal-ink);
  --pg-err: #A83E28;
  --pg-err-line: #C4573F;
  --pg-cta: #FFFFFF;
  --pg-cta-line: #1C1D1F0F;
  --pg-cta-ink: #1C1D1F;
  --pg-cta-sub: #1C1D1F;
  --pg-cta-btn: #FFFFFF;
  --pg-cta-btn-line: #D9D9D4;
  --pg-cta-shade: linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 24%, #FFFFFFE6 45%, #FFFFFF8C 64%, #FFFFFF00 100%);
}

/* Paper: the nav row is 40 + 44 + 24 = 108px tall and in the flow; here the nav is fixed, so the page starts below it */
.pg { display: block; padding-top: 108px; }
.pg-sec { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
/* The rule runs the full window width while the content stays on the 1440 artboard */
.pg-band { border-top: 1px solid var(--c-line); }

/* ───────── Shared type ───────── */
.pg h1 { font-size: 64px; line-height: 72px; font-weight: 300; letter-spacing: -0.03em; color: var(--ink); text-wrap: wrap; }
.pg-lede { font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 30px; color: var(--c-sub); }
.pg-body { font-size: 16px; line-height: 26px; color: var(--c-sub); }
.pg-chip { background: var(--row-2); color: var(--chip-ink); }
.pg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pg-btn { height: 44px; padding: 0 20px; gap: 8px; font-size: 15px; line-height: 18px; }
.pg-btn:focus-visible, .pg-cta .btn:focus-visible, .nav .btn-talk:focus-visible { border-radius: 999px; }

/* ───────── Hero (Terms, Privacy, How it works) ───────── */
.pg-hero { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; padding-top: 72px; padding-bottom: 80px; }
.pg-hero-how { padding-bottom: 96px; }
.pg-hero-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.pg-hero-title { display: flex; flex-direction: column; gap: 20px; width: 860px; max-width: 100%; }
.pg-updated { font-size: 13px; line-height: 18px; color: var(--c-label); }

/* ───────── Legal body: contents list and text ───────── */
.pg-legal { display: flex; align-items: flex-start; justify-content: space-between; gap: 48px; padding-top: 80px; padding-bottom: 120px; }
.pg-toc { flex-shrink: 0; width: 280px; display: flex; flex-direction: column; gap: 14px; }
.pg-toc-title { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--c-label); }
.pg-toc ol { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.pg-toc a { position: relative; display: block; font-size: 15px; line-height: 22px; color: var(--c-sub); transition: color 150ms ease; }
.pg-toc a::before { content: ""; position: absolute; inset: -7px 0; }
.pg-toc a[aria-current="true"] { font-weight: 500; color: var(--ink); }
.pg-text { flex-shrink: 0; width: 760px; display: flex; flex-direction: column; }
.pg-text section { display: flex; flex-direction: column; gap: 12px; padding-block: 40px; border-bottom: 1px dashed var(--c-dash); scroll-margin-top: 108px; }
.pg-text section:first-child { padding-top: 0; }
.pg-text section:last-child { padding-bottom: 0; border-bottom: 0; }
.pg-text h2 { font-size: 24px; line-height: 32px; font-weight: 400; letter-spacing: -0.01em; color: var(--ink); }
.pg-text p { font-size: 16px; line-height: 26px; color: var(--c-sub); }
.pg-text p.is-pending { color: var(--c-label); }
@media (hover: hover) and (pointer: fine) { .pg-toc a:hover { color: var(--ink); } }
/* The contents list stays in view while the text scrolls (not drawn in Paper) */
@media (min-width: 1200px) { .pg-toc { position: sticky; top: 108px; } }

/* ───────── Let's talk ───────── */
.pg-talk { display: flex; align-items: flex-start; justify-content: space-between; gap: 48px; padding-top: 72px; padding-bottom: 96px; }
.pg-talk-intro { flex-shrink: 0; width: 520px; display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.pg-talk-title { display: flex; flex-direction: column; gap: 20px; }
.pg .pg-talk h1 { font-size: 60px; line-height: 68px; }
.pg-talk-note { width: 440px; max-width: 100%; font-size: 15px; line-height: 24px; color: var(--c-sub); }
.pg-card { flex-shrink: 0; scroll-margin-top: 108px; width: 620px; padding: 28px; border-radius: 12px; background: var(--panel); border: 1px solid var(--c-line); }
.pg-form { display: flex; flex-direction: column; gap: 28px; }
.pg-group { display: flex; flex-direction: column; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.pg-group legend, .pg-field label { padding: 0; font-size: 13px; line-height: 18px; color: var(--c-label); }
.pg-group legend { float: left; width: 100%; }
.pg-options { clear: both; display: flex; gap: 8px; }
.pg-option { position: relative; flex: 1 1 0%; min-width: 0; height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 8px; background: var(--row); border: 1px solid var(--c-line); font-size: 15px; line-height: 18px; font-weight: 500; color: var(--chip-ink); cursor: pointer; transition: background-color 150ms ease, border-color 150ms ease, scale 150ms ease-out; }
.pg-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pg-option svg { display: none; flex-shrink: 0; }
.pg-option:has(input:checked) { background: var(--row-2); border-color: var(--ink); font-weight: 600; color: var(--ink); }
.pg-option:has(input:checked) svg { display: block; }
.pg-option:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.pg-option:active { scale: 0.98; }
.pg-pair { display: flex; gap: 16px; }
.pg-field { flex: 1 1 0%; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pg-field input, .pg-field textarea { display: block; width: 100%; margin: 0; border: 1.5px solid transparent; border-radius: 8px; background: var(--row-2); color: var(--ink); font-family: var(--sans); font-size: 16px; font-weight: 400; outline: none; }
.pg-field input { height: 48px; padding: 0 14.5px; line-height: 20px; }
.pg-field textarea { height: 128px; min-height: 128px; padding: 12.5px 14.5px; line-height: 24px; resize: none; }
.pg-field input, .pg-field textarea, .pg-consent input { scroll-margin-top: 140px; }
.pg-field ::placeholder { color: var(--c-dim); opacity: 1; }
.pg-field input:focus-visible, .pg-field textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 8px; }
.pg-field [aria-invalid="true"] { border-color: var(--pg-err-line); }
.pg-error { font-size: 13px; line-height: 20px; font-weight: 500; color: var(--pg-err); }
.pg-consent-wrap { display: flex; flex-direction: column; gap: 8px; }
.pg-consent { position: relative; display: flex; align-items: center; gap: 12px; font-size: 14px; line-height: 20px; color: var(--chip-ink); }
.pg-consent input { position: absolute; left: -13px; top: -12px; width: 44px; height: 44px; margin: 0; opacity: 0; cursor: pointer; }
.pg-box { flex-shrink: 0; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--c-dim); color: var(--btn-ink); transition: background-color 150ms ease, border-color 150ms ease; }
.pg-box svg { opacity: 0; transform: scale(0.6); transition: opacity 150ms ease, transform 200ms var(--ease-out); }
.pg-consent:has(input:checked) .pg-box { background: var(--ink); border-color: var(--ink); }
.pg-consent:has(input:checked) .pg-box svg { opacity: 1; transform: none; }
.pg-consent:has(input:focus-visible) .pg-box { outline: 2px solid var(--ink); outline-offset: 2px; }
.pg-consent:has(input[aria-invalid="true"]) .pg-box { border-color: var(--pg-err-line); }
.pg-consent a { position: relative; color: var(--ink); text-decoration: underline 1px; text-underline-position: from-font; }
.pg-consent a::before { content: ""; position: absolute; inset: -12px -4px; }
.pg-submit { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.pg-submit .btn { flex-shrink: 0; }
.pg-submit p { font-size: 13px; line-height: 18px; text-align: right; color: var(--c-sub); }

/* Confirmation: takes the form's place inside the same card */
.pg-done { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; outline: none; }
.pg-done-top { display: flex; align-items: center; gap: 10px; }
.pg-done-mark { flex-shrink: 0; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 4px; background: var(--teal); color: var(--pg-check); }
.pg-done-copy { display: flex; flex-direction: column; gap: 10px; }
.pg-done h2 { font-size: 28px; line-height: 36px; font-weight: 300; letter-spacing: -0.02em; color: var(--ink); }
.pg-done-copy p { font-size: 15px; line-height: 24px; color: var(--c-sub); }
.pg-done-rows { align-self: stretch; display: flex; flex-direction: column; gap: 8px; margin: 0; }
.pg-done-rows div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-radius: 8px; background: var(--row); font-size: 14px; line-height: 20px; }
.pg-done-rows dt { color: var(--c-label); }
.pg-done-rows dd { margin: 0; font-weight: 500; color: var(--ink); }
.pg-done-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.pg-done-note { font-size: 13px; line-height: 18px; color: var(--c-sub); }
.js-motion .pg-done { animation: rise 500ms var(--ease-out) both; }

/* ───────── How it works: section heads ───────── */
.pg-block { display: flex; flex-direction: column; gap: 56px; padding-block: 96px; }
.pg-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.pg-head-main { flex: 0 1 640px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.pg-head .pg-body { flex: 0 1 520px; }

/* The five phases: a lettered marker on a rail, then name, description and tags */
.pg-steps { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.pg-step { display: flex; gap: 16px; }
.pg-rail { flex-shrink: 0; width: 17px; display: flex; flex-direction: column; align-items: center; }
.pg-rail::before { content: ""; flex-shrink: 0; width: 1px; height: 70px; background: var(--c-rail); }
.pg-rail::after { content: ""; flex: 1 1 0%; width: 1px; background: var(--c-rail); }
.pg-step:first-child .pg-rail::before { height: 30px; background: none; }
.pg-step:last-child .pg-rail::after { content: none; }
.pg-mark { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 2px; background: var(--btn); color: var(--btn-ink); font-size: 11px; line-height: 12px; font-weight: 800; }
.pg-mark::before { content: attr(data-l); }
.pg-step-in { flex: 1 1 0%; min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; padding-block: 40px; border-bottom: 1px dashed var(--c-dash); }
.pg-step:first-child .pg-step-in { padding-top: 0; }
.pg-step:last-child .pg-step-in { padding-bottom: 0; border-bottom: 0; }
.pg-step-name { flex-shrink: 0; width: 300px; display: flex; flex-direction: column; gap: 6px; }
.pg-step-kind { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--c-label); }
.pg-step h3 { font-size: 28px; line-height: 36px; font-weight: 300; letter-spacing: -0.02em; color: var(--ink); }
.pg-step-text { flex-shrink: 0; width: 400px; padding-top: 24px; font-size: 16px; line-height: 26px; color: var(--c-sub); }
.pg-step .pg-chips { flex-shrink: 0; width: 420px; justify-content: flex-end; padding-top: 26px; }
.pg-steps-cta { display: flex; padding-left: 33px; }

/* ───────── How it works: confidentiality cards ───────── */
.pg-duo { display: flex; gap: 20px; }
.pg-duo-card { flex: 1 1 0%; min-width: 0; display: flex; flex-direction: column; gap: 20px; padding: 28px; border-radius: 12px; background: var(--panel); border: 1px solid var(--c-line); }
.pg-duo-copy { display: flex; flex-direction: column; gap: 10px; }
.pg-duo-card h3 { font-size: 20px; line-height: 28px; font-weight: 500; color: var(--ink); }
.pg-duo-card p { font-size: 15px; line-height: 24px; color: var(--c-sub); }
.pg-duo-card .pg-duo-kind { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--c-label); }

/* ───────── How it works: questions ───────── */
.pg-faq { display: flex; align-items: flex-start; justify-content: space-between; gap: 48px; padding-block: 96px; }
.pg-faq-head { flex-shrink: 0; width: 440px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.pg-faq-list { flex-shrink: 0; width: 720px; display: flex; flex-direction: column; }
.pg-q { border-bottom: 1px solid var(--pg-rule); }
.pg-q:last-child { border-bottom: 0; }
.pg-q h3 { font-weight: 500; }
.pg-q-btn { position: relative; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 28px; font-size: 18px; line-height: 26px; font-weight: 500; text-align: left; color: var(--ink); }
.pg-q:first-child .pg-q-btn { padding-top: 0; }
.pg-q:first-child .pg-q-btn::before { content: ""; position: absolute; inset: -18px 0 0; }
.pg-q:last-child .pg-q-btn[aria-expanded="false"] { padding-bottom: 0; }
.pg-q:last-child .pg-q-btn[aria-expanded="false"]::before { content: ""; position: absolute; inset: 0 0 -18px; }
.pg-q-btn[aria-expanded="true"] { padding-bottom: 12px; }
.pg-q-btn svg { flex-shrink: 0; }
.pg-q-btn .pg-q-v { transform-origin: 8px 8px; transition: transform 250ms var(--ease-out), opacity 200ms ease; }
.pg-q-btn[aria-expanded="true"] .pg-q-v { transform: rotate(90deg); opacity: 0; }
.pg-q-btn:focus-visible { outline-offset: 4px; }
.pg-a { padding-bottom: 28px; }
.pg-a p { width: 600px; max-width: 100%; font-size: 15px; line-height: 24px; color: var(--c-sub); }
.js-motion .pg-a:not([hidden]) { animation: pg-answer 300ms var(--ease-out) both; }
@keyframes pg-answer { from { opacity: 0; transform: translateY(-6px); } }

/* ───────── How it works: closing card ───────── */
.pg-cta { display: flex; justify-content: center; padding: 0 24px 120px; }
.pg-cta-card { position: relative; flex-shrink: 0; width: 992px; max-width: 100%; height: 500px; display: flex; flex-direction: column; align-items: center; gap: 22px; padding-top: 108px; overflow: clip; border-radius: 12px; background: var(--pg-cta); border: 1px solid var(--pg-cta-line); color: var(--pg-cta-ink); }
/* The Paper asset carries a 2px dark edge on its right and bottom; the box overhangs the card by 2px so the clip hides it */
.pg-cta-img { position: absolute; inset: 120px -2px -2px 0; background: url("assets/hillside-cta.jpg") 50% / cover no-repeat; }
.pg-cta-shade { position: absolute; inset: 0; background: var(--pg-cta-shade); }
.pg-cta h2 { position: relative; font-size: 40px; line-height: 48px; text-align: center; color: var(--pg-cta-ink); }
.pg-cta p { position: relative; width: 440px; max-width: calc(100% - 40px); font-size: 14px; line-height: 22px; text-align: center; color: var(--pg-cta-sub); }
.pg-cta-buttons { position: relative; display: flex; gap: 14px; padding-top: 6px; }
.pg-cta-ghost { background: var(--pg-cta-btn); border: 1px solid var(--pg-cta-btn-line); }
@media (hover: hover) and (pointer: fine) { .pg-cta-ghost:hover { border-color: var(--ink); } }

/* The fixed nav's "Let's talk" is a link on these pages */
.nav a.btn-talk[aria-current="page"] { border-color: var(--ink); }

/* ───────── Below the 1440 artboard's range (not drawn in Paper): one column ───────── */
@media (max-width: 1199px) {
  .pg h1, .pg .pg-talk h1 { font-size: 52px; line-height: 60px; }
  .pg-legal { flex-direction: column; align-items: stretch; gap: 48px; padding-top: 56px; padding-bottom: 96px; }
  .pg-toc { width: auto; gap: 6px; }
  .pg-toc ol { gap: 0; }
  .pg-toc a { display: flex; align-items: center; min-height: 44px; }
  .pg-toc a::before { content: none; }
  .pg-text { width: auto; max-width: 760px; }
  .pg-talk { flex-direction: column; align-items: stretch; gap: 48px; }
  .pg-talk-intro { width: auto; max-width: 620px; }
  .pg-card { width: auto; max-width: 720px; }
  .pg-block, .pg-faq { padding-block: 72px; }
  .pg-head { flex-direction: column; align-items: flex-start; }
  .pg-head-main, .pg-head .pg-body { flex: none; max-width: 640px; }
  .pg-step-in { flex-direction: column; gap: 14px; }
  .pg-step-name, .pg-step-text, .pg-step .pg-chips { width: auto; max-width: 640px; padding-top: 0; }
  .pg-step .pg-chips { justify-content: flex-start; padding-top: 6px; }
  .pg-faq { flex-direction: column; align-items: stretch; gap: 40px; }
  .pg-faq-head { width: auto; }
  .pg-faq-list { width: auto; max-width: 720px; }
}
@media (max-width: 700px) {
  .pg { padding-top: 68px; }
  .pg h1, .pg .pg-talk h1 { font-size: 36px; line-height: 42px; letter-spacing: -0.02em; }
  .pg-lede { font-size: 18px; line-height: 26px; }
  .pg-hero, .pg-hero-how { gap: 20px; padding-top: 32px; padding-bottom: 48px; }
  .pg-legal { gap: 36px; padding-top: 40px; padding-bottom: 72px; }
  .pg-text section { padding-block: 32px; scroll-margin-top: 84px; }
  .pg-talk { gap: 32px; padding-top: 32px; padding-bottom: 64px; }
  .pg-talk-intro { gap: 20px; }
  .pg-card { padding: 20px; }
  .pg-form { gap: 24px; }
  .pg-options { flex-wrap: wrap; }
  .pg-option { flex-basis: calc(50% - 4px); }
  .pg-pair { flex-direction: column; gap: 24px; }
  .pg-submit { flex-direction: column; align-items: stretch; gap: 14px; }
  .pg-submit p { text-align: left; }
  .pg-done h2 { font-size: 24px; line-height: 32px; }
  .pg-done-actions { align-self: stretch; flex-direction: column; }
  .pg-block, .pg-faq { gap: 36px; padding-block: 56px; }
  .pg-step h3 { font-size: 24px; line-height: 32px; }
  .pg-steps-cta { padding-left: 0; }
  .pg-steps-cta .btn { width: 100%; }
  .pg-duo { flex-direction: column; }
  .pg-duo-card { padding: 20px; }
  .pg-q-btn { font-size: 17px; line-height: 24px; }
  .pg-cta { padding: 0 20px 72px; }
  .pg-cta-card { height: auto; min-height: 460px; padding: 72px 0 56px; }
  .pg-cta h2 { font-size: 32px; line-height: 40px; }
  .pg-cta-buttons { flex-direction: column; align-items: stretch; width: calc(100% - 40px); }
}

@media (prefers-reduced-motion: reduce) {
  .rise, .js-motion .pg-done, .js-motion .pg-a:not([hidden]) { animation: none; }
}
