/* doorway.css - the website's look on the app's doorway pages: /login, /signup, /forgot, /reset, /accept-team
 * and the free report at /report (George, 1 October 2026: "re-design this page to match the main site ... &
 * login page etc").
 *
 * WHERE THE VALUES COME FROM. tryinciteful.com is a separate Next.js site (repo inciteful-site); these are its
 * tokens and roles from src/app/globals.css and its components at b14603d, checked against the live pages'
 * computed styles on 2 October 2026 (desktop 1440 and phone 390). They are NOT ui-contract/tokens.json, whose
 * marketing profile describes the app's older marketing pages: matching the site was George's ask, and the
 * deviation is his to rule on (docs/UI_AGENT_RULES.md - no exception registry exists to claim one).
 *
 * SCOPE. Everything hangs off body.doorway, and the tokens are prefixed --door- so nothing inside the pages
 * (the dashboard embed's chrome reads --accent, --line and friends from marketing.css) changes colour. The
 * pages still load marketing.css for the Epilogue faces and the skip link; its base rules (blue links, 600
 * headings, the 17px body) are overridden here, under .doorway, rather than edited there, because that bundle
 * serves sixty other pages.
 *
 * DECISIONS ON THE DRAFTS (George, 3-4 October 2026): main buttons black on the account pages and lime only on
 * the report page, as the site does; square chrome throughout (the site's rule: docs/PRINCIPLES.md 6 there).
 */

.doorway {
  --door-ground: #FBFBFF;
  --door-panel: #FFFFFF;
  --door-raised: #F1F2F7;
  --door-ink: #121619;
  --door-ink-2: #8E9197;            /* second headline line; never small text (3.06:1) */
  --door-body: #6B6F75;             /* body and the faintest small text (4.9:1) */
  --door-line: rgba(18, 22, 25, .08);
  --door-line-strong: rgba(18, 22, 25, .16);
  --door-btn: #121619;
  --door-btn-ink: #FBFBFF;
  --door-accent: #A2D729;
  --door-on-accent: #121619;
  --door-accent-ink: #4E7A00;       /* the accent as text on light */
  --door-focus: #121619;
  --door-container: 1360px;
  --door-gutter: 24px;
  --door-shadow-card: 0 12px 32px rgba(18, 22, 25, .05);
  --door-shadow-overlay: 0 28px 60px rgba(18, 22, 25, .12);
  margin: 0;
  background: var(--door-ground);
  color: var(--door-ink);
  font-family: 'Epilogue', ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
}

/* The site's rails: hairlines at the container's edges, 12px in from the screen on a phone. marketing.css
   already draws body::before as fixed column rules; only its width and colour differ. */
.doorway::before {
  display: block;
  width: min(100% - 24px, var(--door-container));
  border-left-color: var(--door-line);
  border-right-color: var(--door-line);
}

/* Unclassed links take the text colour, not marketing.css's blue. :where() keeps this at the specificity of that
   rule (it wins on order), so every classed link and button below still sets its own colour. */
:where(.doorway) a { color: inherit; }
:where(.doorway) a:hover { color: inherit; }
.doorway h1, .doorway h2, .doorway h3 { font-weight: 500; }
.doorway :focus-visible { outline: 2px solid var(--door-focus); outline-offset: 2px; }
.doorway .skip-link { padding: 10px 14px; border-radius: 0; background: var(--door-btn); color: var(--door-btn-ink); font-size: 14px; font-weight: 500; }
.doorway .skip-link:focus { left: 12px; top: 12px; color: var(--door-btn-ink); }

/* ---- header: the site's bar (64px, the 32px lockup, Sign in + the black trial button) ---------------------- */
.door-head { position: relative; z-index: 2; }
/* The free report's stylesheet (report.css, loaded on /report for its example modules) gives its own page's header a
   solid ground and a hairline; this header sits on the page, as the site's does at the top of a page. */
.doorway > .door-head { background: none; border-bottom: 0; }
.door-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; max-width: var(--door-container); margin: 0 auto; padding: 0 var(--door-gutter); }
.door-logo { display: inline-flex; color: var(--door-ink); }
.door-logo svg { display: block; width: auto; height: 32px; max-width: none; }
.door-acts { display: flex; align-items: center; gap: 8px; }
/* A page hides the header link to itself (body.door-at-login / body.door-at-signup). The trial button's label
   shortens on small phones, as the site's does. */
.door-at-login .door-to-login, .door-at-signup .door-to-signup { display: none; }
/* The team invite offers its own Log in and Create account, each carrying the invitation (?next=); the header's would
   drop it, so that page shows the lockup alone. */
.door-at-invite .door-acts { display: none; }
.door-short { display: none; }
.door-link { padding: 8px 12px; font-size: 14px; line-height: 20px; font-weight: 500; color: rgba(18, 22, 25, .85); text-decoration: none; transition: color .15s; }
.doorway .door-link:hover { color: var(--door-ink); text-decoration: none; }

/* The site's one button set: solid (ink), accent (lime) and outline, at 36px (sm) and 44px; the submit of a
   field row takes the field's 48px. */
.door-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 20px; border: 0; border-radius: 0; background: var(--door-btn); color: var(--door-btn-ink); font: inherit; font-size: 14px; line-height: 20px; font-weight: 500; white-space: nowrap; text-decoration: none; cursor: pointer; transition: opacity .15s, filter .15s, background-color .15s; }
.doorway .door-btn:hover { color: var(--door-btn-ink); text-decoration: none; opacity: .85; }
.door-btn:active { opacity: .75; }
.door-btn:disabled, .door-btn[aria-disabled="true"] { opacity: .4; cursor: default; }
.door-btn-accent { background: var(--door-accent); color: var(--door-on-accent); }
.doorway .door-btn-accent:hover { color: var(--door-on-accent); opacity: 1; filter: brightness(.95); }
.door-btn-accent:active { filter: brightness(.9); }
.door-btn-outline { background: transparent; color: var(--door-ink); border: 1px solid var(--door-line-strong); }
.doorway .door-btn-outline:hover { color: var(--door-ink); opacity: 1; background: var(--door-raised); }
.door-btn svg { flex: none; }

/* ---- type: the site's roles ---------------------------------------------------------------------------- */
.door-main { position: relative; z-index: 1; max-width: var(--door-container); margin: 0 auto; padding: 88px var(--door-gutter) 96px; }
/* t-h1: 500, -0.04em, 1.04, balanced; the second line in --door-ink-2. The site's hero runs to 60px; a
   heading beside a form or a dashboard tops out at 52px, as in the drafts George reviewed. */
.door-h1 { margin: 0 0 0 calc(.75px - .05em); font-size: clamp(2.125rem, 1.2rem + 3.4vw, 3.25rem); line-height: 1.04; letter-spacing: -.04em; font-weight: 500; color: var(--door-ink); text-wrap: balance; }
.door-h1 > span { display: block; color: var(--door-ink-2); text-wrap: balance; }
.door-h1 > span[hidden] { display: none; }
/* t-lead */
.door-lead { margin: 20px 0 0; max-width: 42rem; font-size: 15px; line-height: 28px; letter-spacing: -.04em; color: var(--door-body); text-wrap: pretty; }
.door-lead:empty { display: none; }

/* ---- the page-not-found page (marketing/pages/404.html): the account pages' centred column and button size -- */
.door-404 { max-width: 720px; text-align: center; }
.door-404 .door-h1 { margin-left: 0; }
.door-404-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.door-404-btn { height: 48px; padding: 0 24px; font-size: 15px; }
@media (max-width: 479px) {
  .door-404-acts { flex-direction: column; }
  .door-404-btn { width: 100%; }
}

@media (max-width: 767px) {
  .door-main { padding: 48px var(--door-gutter) 72px; }
}
@media (max-width: 479px) {
  .door-bar { gap: 12px; }
  .door-logo svg { height: 28px; }
  .door-long { display: none; }
  .door-short { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .door-btn, .door-link { transition: none; }
}

/* ---- section headings (t-h2) ----------------------------------------------------------------------------- */
.door-h2 { margin: 0 0 0 calc(.75px - .05em); font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); line-height: 1.1; letter-spacing: -.04em; font-weight: 500; color: var(--door-ink); text-wrap: balance; }
.door-h2 > span { display: block; color: var(--door-ink-2); }

/* ---- /report: the free report's funnel, reached from the website's report bars ------------------------------
   The class names .step/.on/.in/.go/.err/.note/.otp and the .tz* teaser set are LOAD-BEARING: the funnel script at the
   foot of public/report.html toggles them (the run's own step went with the baseline, A5, 11 Oct 2026). Each step is the site's report
   bar (ReportBar.tsx): a white box on a 1px line holding the field and the lime submit. */
/* Centred, like the website's hero (George, 5 Oct 2026: "i hate the left aligned-ness of that"). The fields inside the
   560px column keep their labels on the left. */
.door-report .rp-hero { max-width: 760px; margin-left: auto; margin-right: auto; text-align: center; }
.door-report .rp-hero .door-h1 { margin-left: 0; }
.door-report .rp-hero .door-lead { margin-left: auto; margin-right: auto; }
.door-report .funnel { max-width: 560px; margin: 36px auto 0; text-align: left; }
.door-report .funnel .note, .door-report .funnel .err, .door-report #s-otp .lbl { text-align: center; }
.door-report .funnel .rp-switch { justify-content: center; }
.door-report .rp-switch[hidden] { display: none; }
.door-report .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* The single form: once the site is in, Agency name and Email drop down under the bar (both at full width on a phone). */
.door-report .rp-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; animation: rp-drop .22s ease-out both; }
.door-report .rp-more[hidden], .door-report .rp-more .rp-field[hidden] { display: none; }
.door-report .rp-more:has(> .rp-field[hidden]) { grid-template-columns: minmax(0, 1fr); }
.door-report .rp-field label { display: block; margin: 0 0 6px; font-size: 13px; line-height: 20px; font-weight: 500; color: var(--door-ink); }
.door-report .rp-field .in { display: block; width: 100%; height: 48px; margin: 0; padding: 0 14px; border: 1px solid var(--door-line-strong); border-radius: 0; background: var(--door-panel); color: var(--door-ink); font: inherit; font-size: 16px; line-height: 24px; }
.door-report .rp-field .in::placeholder { color: var(--door-body); opacity: 1; }
.door-report .rp-field .in:focus { outline: none; border-color: var(--door-ink); }
@keyframes rp-drop { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .door-report .rp-more { animation: none; } }
@media (max-width: 479px) { .door-report .rp-more { grid-template-columns: minmax(0, 1fr); } }
.door-report .step { display: none; }
/* The lead flow's two steps (plan §A4 stage 1): the place and reach, then the competitors as removable chips. Tokens only. */
.door-report .rp-lead { animation: none; margin-top: 0; }
.door-report .rp-field select.in { padding-right: 12px; }
.door-report .rp-reach { margin: 16px 0 0; padding: 0; border: 0; }
.door-report .rp-reach .lbl { margin-bottom: 8px; }
.door-report .rp-choice { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin: 0 0 8px; border: 1px solid var(--door-line-strong); border-radius: 12px; background: var(--door-panel); font-size: 15px; line-height: 20px; color: var(--door-ink); cursor: pointer; }
.door-report .rp-choice:has(input:checked) { border-color: var(--door-ink); }
.door-report .rp-choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--door-ink); }
.door-report .rp-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.door-report .rp-actions .go { height: 48px; padding: 0 24px; margin-left: auto; }
.door-report .rp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.door-report .rp-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 8px 6px 14px; border: 1px solid var(--door-line-strong); border-radius: 999px; background: var(--door-panel); font-size: 14px; line-height: 20px; color: var(--door-ink); }
.door-report .rp-chip-site { font-size: 12px; color: var(--door-body); }
.door-report .rp-chip-x { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin: 0; padding: 0; border: 0; border-radius: 999px; background: var(--door-raised); color: var(--door-ink); font-size: 16px; line-height: 1; cursor: pointer; }
.door-report .rp-chip-x:hover { background: var(--door-line-strong); }
.door-report .rp-bar-add .go { background: var(--door-raised); color: var(--door-ink); }
.door-report .rp-bar-add .go:disabled, .door-report .rp-bar-add .in:disabled { opacity: .5; cursor: default; }
.door-report .step.on { display: block; }
.door-report .rp-for { margin: 0 0 16px; font-size: 15px; line-height: 24px; font-weight: 500; color: var(--door-ink); }
.door-report .lbl { display: block; margin: 0 0 8px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--door-ink); }
.door-report .rp-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1px solid var(--door-line-strong); background: var(--door-panel); box-shadow: var(--door-shadow-card); }
/* Focus: the bar's own line darkens to ink (the site sweeps lime light along it; a gradient is not ours to add). */
.door-report .rp-bar:focus-within { border-color: var(--door-ink); }
.door-report .rp-bar .in { flex: 1 1 200px; min-width: 0; height: 48px; margin: 0; padding: 0 16px; border: 0; border-radius: 0; background: transparent; color: var(--door-ink); font: inherit; font-size: 16px; line-height: 24px; box-shadow: none; -webkit-appearance: none; appearance: none; }
.door-report .rp-bar .in:focus, .door-report .rp-bar .in:focus-visible { outline: none; }
.door-report .rp-bar .in::placeholder { color: var(--door-body); opacity: 1; }
.door-report .rp-bar .go { flex: 0 0 auto; height: 48px; padding: 0 24px; }
.door-report .go:disabled { opacity: .55; cursor: default; }
.door-report .in.otp { letter-spacing: 10px; font-size: 22px; font-weight: 500; }
.door-report .err { min-height: 20px; margin-top: 8px; font-size: 14px; line-height: 20px; color: #973A34; }
.door-report .note { margin: 12px 0 0; font-size: 14px; line-height: 20px; color: var(--door-body); }
.door-report .note a { color: var(--door-ink); text-decoration: underline; text-decoration-color: rgba(18, 22, 25, .35); text-underline-offset: 3px; }
.door-report .linklike { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 0; border: 0; background: none; color: var(--door-ink); font: inherit; font-weight: 500; text-decoration: underline; text-decoration-color: rgba(18, 22, 25, .35); text-underline-offset: 3px; cursor: pointer; }
.door-report .linklike:hover { text-decoration-color: var(--door-ink); }
.door-report .linklike .arrow { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; }
.door-report .rp-switch { display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; min-height: 44px; margin-top: 16px; font-size: 14px; line-height: 20px; color: var(--door-body); }
.door-report .optin { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 0; font-size: 14px; line-height: 20px; color: var(--door-body); }
.door-report .optin input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--door-ink); }

/* The light report's grid on the waiting page (George, 7 Oct 2026: "semi-dynamic"): each question and what each engine
   has said so far, filled in as the answers land. */

/* The readiness teaser shown with the email step: the site's score, its answers still masked. */
.door-report .teaser { margin: 0 0 20px; padding: 16px; border: 1px solid var(--door-line); background: var(--door-panel); }
.door-report .tzhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; }
.door-report .tzdot { flex: none; width: 9px; height: 9px; border-radius: 50%; }
.door-report .tzlogo { flex: none; width: 24px; height: 24px; border: 1px solid var(--door-line); background: var(--door-panel); object-fit: contain; }
.door-report .tzlogo[hidden] { display: none; }
.door-report .tzname { font-weight: 500; }
.door-report .tzscore { margin-left: auto; font-size: 12px; line-height: 1.2; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--door-body); }
.door-report .tzscore b { font-size: 16px; font-weight: 500; letter-spacing: normal; }
.door-report .tzq { margin: 12px 0 8px; padding-top: 12px; border-top: 1px solid var(--door-line); font-size: 14px; line-height: 20px; font-weight: 500; }
.door-report .tzrow { display: flex; align-items: center; gap: 12px; padding: 5px 0; font-size: 13px; }
.door-report .tzrow .a { flex: none; width: 112px; font-size: 12px; line-height: 1.3; font-weight: 500; }
.door-report .tzmask { flex: 1; min-height: 20px; padding: 3px 10px; overflow: hidden; white-space: nowrap; background: var(--door-raised); }
.door-report .tzblur { filter: blur(5px); -webkit-user-select: none; user-select: none; pointer-events: none; font-size: 12px; color: var(--door-body); }
.door-report .tzlock { display: flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 12px; font-weight: 500; }
.door-report .tzlock svg { flex: none; width: 13px; height: 13px; }


/* The example: the free report's own modules on the site's evidence panel (the dot grid on --door-raised). The
   cards are product UI in the product's face, Instrument Sans, which the report's stylesheet names --font-product. */
@font-face { font-family: 'Instrument Sans'; src: url('/fonts/InstrumentSans-Variable.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
.door-report .rp-example { margin-top: 112px; }
.door-report .rp-stage { --font-product: 'Instrument Sans'; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; margin-top: 40px; padding: 32px; border: 1px solid var(--door-line); background-color: var(--door-raised); background-image: radial-gradient(circle, rgba(18, 22, 25, .07) 1px, transparent 1px); background-size: 16px 16px; }
.door-report .rp-stage .report-native { min-height: 460px; }
.door-report .rp-stage[data-modules-ready] .report-native { min-height: 0; }

/* The questions: hairline rows, the site's FAQ rhythm. */
.door-report .rp-faq { max-width: 760px; margin-top: 112px; }
.door-report .rp-acc { margin-top: 32px; border-top: 1px solid var(--door-line-strong); }
.door-report .rp-acc details { border-bottom: 1px solid var(--door-line-strong); }
.door-report .rp-acc summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 18px 0; font-size: 17px; line-height: 24px; font-weight: 500; cursor: pointer; list-style: none; }
.door-report .rp-acc summary::-webkit-details-marker { display: none; }
.door-report .rp-acc summary .ic { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform .2s; }
.door-report .rp-acc details[open] summary .ic { transform: rotate(180deg); }
.door-report .rp-acc details p { max-width: 640px; margin: 0 0 20px; font-size: 15px; line-height: 26px; color: var(--door-body); }

@media (max-width: 1023px) {
  .door-report .rp-stage { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .door-report .rp-example, .door-report .rp-faq { margin-top: 80px; }
  .door-report .rp-stage { padding: 12px; }
}
/* On a phone the steps' buttons ("Save and run my report") outgrow the row, so the bar stacks: field, then button. */
@media (max-width: 479px) {
  .door-report .rp-bar .in, .door-report .rp-bar .go { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .door-report .rp-acc summary .ic { transition: none; }
}

/* The consent banner (src/analytics.js) sits over the foot of a phone screen until it is answered; the page gets the
   room to scroll its last lines clear of it. */
@media (max-width: 767px) {
  body.doorway:has(#inc-consent) .door-main { padding-bottom: 200px; }
}
