/* Shared base for the site and the app (packages/brand/ui/site-base.css).
   apps/site/scripts/stamp.ts inlines it at the top of site.css; apps/web/build.ts ships it as the app's base stylesheet.
   Brand tokens (colors.*, fonts.* in double braces) are filled from packages/brand by both. Font URLs are relative to the
   stylesheet: /fonts/ on the site, /app/assets/fonts/ in the app. The site has no dark theme; neither does the app. */
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/instrument-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url(fonts/instrument-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/instrument-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/instrument-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }

:root {
  --paper: #f1f2ed;
  --paper2: #e7e9e1;
  --ink: #101512;
  --ink2: #39413c;
  --mute: #646c66;
  --line: #d3d7cc;
  --flag: #ff5a1f;
  --flag-ink: #a8320a;
  --ok: #1d8a58;
  --panel: #0e1310;
  --panel2: #151b17;
  --pline: #252e28;
  --ptext: #e4e8e0;
  --pmute: #8a948d;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --gut: clamp(16px, 4vw, 64px);
  --gap: clamp(28px, 3.2vw, 72px);
  /* one vertical padding for every section, top and bottom: 96px desktop, 56px mobile */
  --sp: clamp(56px, 6.7vw, 96px);
  --r: 10px;
  --card: #fff;
  --flag-soft: #fbe1d6;
  --ok-ink: #146b43;
  /* type scale for key numbers */
  --t-stat: clamp(56px, 6vw, 120px);
  --t-num: clamp(40px, 3.6vw, 72px);
  --t-num-sm: clamp(28px, 2.2vw, 40px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--sans); overflow-x: hidden; }
a { color: inherit; }
.w { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 var(--gut); }
.mono { font-family: var(--mono); }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.03em; margin: 0; }
p { margin: 0; }

/* nav */
nav.top { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid transparent; }
nav.top.stuck { border-bottom-color: var(--line); }
nav.top .w { display: flex; align-items: center; gap: 28px; height: 64px; }
.mark { display: inline-flex; align-items: center; gap: 8px; font: 700 21px/1 var(--sans); letter-spacing: -0.04em; text-decoration: none; }
.mark svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; }
.mark svg circle { fill: var(--flag); stroke: none; }
.mark.sm { font-size: 17px; }
.links { display: flex; gap: 24px; margin-left: auto; }
.links a { text-decoration: none; color: var(--ink2); font-size: 15px; }
.links a:hover { color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); font: 600 15.5px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #2a322d; }
.btn:disabled { opacity: .6; cursor: default; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2.5px solid var(--flag); outline-offset: 2px; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.sm { height: 38px; padding: 0 16px; font-size: 14.5px; }
.lnk { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.lnk:hover { text-decoration-color: var(--flag); }

/* chips */
.out { font: 500 12.5px/1.3 var(--mono); padding: 5px 8px; border-radius: 5px; display: inline-block; white-space: nowrap; }
.out.ok { color: #146b43; background: #dcebe0; }
.out.bad { color: var(--flag-ink); background: #fbe1d6; }
.out a { color: inherit !important; }

/* forms */
.reqform { border-top: 1.5px solid var(--ink); }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.fgrid .full { grid-column: 1 / -1; }
.field { display: block; margin-top: 22px; min-width: 0; }
.field > span, .yn legend { display: block; font: 500 12.5px/1 var(--mono); color: var(--mute); margin-bottom: 8px; padding: 0; }
.field em { font-style: normal; color: var(--mute); margin-left: 6px; }
.field input, .field select { width: 100%; height: 48px; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 14px; font: 400 15px/1 var(--sans); background: #fff; color: var(--ink); }
.field select { padding-right: 36px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23101512' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 14px center / 10px; -webkit-appearance: none; appearance: none; }
.field input:focus, .field select:focus { border-color: var(--ink); }
.field input:focus:not(:focus-visible), .field select:focus:not(:focus-visible) { outline: none; }
.yn { border: 0; padding: 0; }
.yn label { display: inline-flex; margin-right: 8px; cursor: pointer; position: relative; }
.yn input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.yn label span { display: inline-flex; align-items: center; height: 48px; padding: 0 22px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-size: 15px; }
.yn input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.yn input:focus-visible + span { outline: 2.5px solid var(--flag); outline-offset: 2px; }

/* footer: one pattern for the site and the app (packages/brand/footer.ts). 4 columns at desktop, brand block + 2-column groups on mobile. */
footer { margin-top: 0; border-top: 1px solid var(--line); padding: 40px 0 28px; color: var(--ink); }
.ft-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.ft-brand { display: grid; gap: 12px; align-content: start; justify-items: start; min-width: 0; }
.ft-logo { display: inline-flex; align-items: center; gap: 10px; font: 700 17px/1 var(--sans); letter-spacing: -0.04em; text-decoration: none; color: var(--ink); }
.ft-tile { display: inline-flex; width: 28px; height: 28px; flex: none; }
.ft-tile svg { width: 100%; height: 100%; display: block; }
.ft-mail { font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.ft-mail:hover, .ft-col a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ft-col { min-width: 0; }
.ft-h { margin: 0 0 12px; font: 600 12px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--mute); }
.ft-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ft-col a { font-size: 14px; line-height: 1.4; color: var(--ink); text-decoration: none; }
.ft-promise { margin-top: 32px; font-size: 13px; color: var(--mute); }
.ft-bottom { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.ft-bottom p { font-size: 13px; color: var(--mute); text-align: left; }

/* mobile menu (shown when the nav links are hidden) */
.menu { display: none; position: relative; margin-left: auto; }
.menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; font: 600 14.5px/1 var(--sans); color: var(--ink); background: var(--paper); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::before { content: ""; width: 14px; height: 10px; background: linear-gradient(var(--ink), var(--ink)) top / 100% 1.5px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 100% 1.5px no-repeat, linear-gradient(var(--ink), var(--ink)) bottom / 100% 1.5px no-repeat; }
.menu[open] summary { border-color: var(--ink); }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; display: grid; padding: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -20px rgba(16, 21, 18, .45); z-index: 30; }
.menu-panel a { padding: 11px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 15.5px; }
.menu-panel a:hover { background: var(--paper2); }

/* visually hidden */
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* form actions (request access, /report, /access): one row, right-aligned, primary rightmost with Back to its left;
   stacked full width below 600px with the primary last */
.step-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px 14px; margin-top: 24px; }
.step-actions .fine { flex: 1 1 14em; text-align: right; }
.step-actions .fine:empty { display: none; }
.step-actions .btn { order: 2; }
.step-actions .btn.back { order: 1; }
@media (max-width: 599px) {
  .step-actions { flex-direction: column; align-items: stretch; }
  .step-actions .fine { flex: none; text-align: left; order: 0; }
  .step-actions .btn { width: 100%; }
}

/* collapsibles: one component for every <details class="acc"> (FAQ, Sources, menu). site.js animates the
   .acc-body height over 200ms on open and close; without JS, or with reduced motion, it opens instantly. */
.acc > summary { list-style: none; cursor: pointer; }
.acc > summary::-webkit-details-marker { display: none; }
.acc:not(.menu) > summary::after { content: ""; flex: none; width: 8px; height: 8px; margin: -4px 4px 0 0; border-right: 2px solid var(--mute); border-bottom: 2px solid var(--mute); transform: rotate(45deg); transition: transform .2s ease; }
.acc[open]:not(.closing) > summary::after, .acc.opening > summary::after { transform: rotate(-135deg); margin-top: 4px; border-color: var(--flag); }
.acc:not(.menu) > .acc-body { display: flow-root; } /* margins stay inside, so the animated height matches the final one */
.acc.opening > .acc-body, .acc.closing > .acc-body { overflow: hidden; }

/* plan cards (pricing on the site, plan page in the app) */
.plan-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; max-width: 1000px; margin: 56px auto 0; background: var(--paper2); border-radius: 20px; padding: 10px; gap: 10px; }
.plan { display: flex; flex-direction: column; gap: 12px; padding: 30px 26px 28px; border-radius: 14px; background: var(--paper); min-width: 0; }
.plan-stage .plan h3 { font-size: 19px; margin: 0; letter-spacing: -0.02em; } /* beats the site's .sec h3 wherever the base sits */
.plan .who { color: var(--ink2); font-size: 15px; min-height: 4.6em; }
.plan .amt { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }
.plan .amt b { font-size: 40px; font-weight: 600; letter-spacing: -0.045em; line-height: 1; }
.plan .amt span { color: var(--mute); font-size: 13.5px; line-height: 1.3; }
.plan .alt { color: var(--mute); font-size: 14px; }
.plan ul { list-style: none; margin: 8px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; align-content: start; font-size: 15px; color: var(--ink2); flex: 1; }
.plan li { padding-left: 20px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 0; top: .55em; width: 9px; height: 5px; border-left: 1.5px solid var(--mute); border-bottom: 1.5px solid var(--mute); transform: rotate(-45deg); }
.plan .btn { align-self: flex-start; margin-top: 18px; }
.plan.feat { background: var(--panel); color: var(--ptext); box-shadow: 0 0 0 1px var(--panel); }
.plan.feat h3 { color: #fff; }
.plan.feat .who { color: var(--ptext); }
.plan.feat .amt b { color: #fff; }
.plan.feat .amt span { color: var(--pmute); }
.plan.feat .alt { color: var(--pmute); }
.plan.feat ul { border-top-color: var(--pline); color: var(--ptext); }
.plan.feat li::before { border-color: var(--flag); }
.btn.hot { background: var(--flag); border-color: var(--flag); color: #1b0b03; height: 54px; padding: 0 24px; font-size: 16px; align-self: stretch !important; }
.btn.hot:hover { background: var(--flag-ink); border-color: var(--flag-ink); color: #fff; }
.btn.hot:focus-visible { outline-color: #fff; }
@media (max-width: 1020px) {
  .plan .who { min-height: 0; }
}
@media (max-width: 760px) {
  .plan-stage { grid-template-columns: minmax(0, 1fr); margin-top: 32px; padding: 8px; border-radius: 16px; }
  .plan { padding: 24px 20px; }
}

/* nav and footer breakpoints */
@media (max-width: 1020px) {
  .links { display: none; }
  .menu { display: block; }
  nav.top .w { gap: 12px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .ft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ft-brand { grid-column: 1 / -1; }
}
