/* AdGraph app prototypes: shared tokens and components (design program, 12 Nov 2026).
   For the builders of app.adgraph.ai. Geist stays in the app (D57 Q6 B); self-host it and allow
   `font-src 'self'` (Q16 A). Text and tables only, no chart (L10.R10). No script of ours.
   State colours (Q5 B): one red for broken, one amber for about to lapse; always with words,
   never decoration, never on the public site. Floor: text >= 12px, contrast >= 4.5:1,
   targets >= 44px. */

@font-face { font-family: "Geist"; src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #0B0D0A;
  --ink2: rgba(11, 13, 10, .68);   /* secondary text: 6.3:1 on paper */
  --line: rgba(11, 13, 10, .10);
  --line2: rgba(11, 13, 10, .22);
  --paper: #FAFAF6;
  --paper2: #F3F4ED;
  --card: #FFFFFF;
  --broken: #B3261E;        --broken-tint: #FBEDEC;   /* 5.7:1 on its tint */
  --lapse: #8A5300;         --lapse-tint: #FBF1E3;    /* 5.7:1 on its tint */
  --sans: Geist, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); font: 400 15px/1.55 var(--sans); letter-spacing: -.006em; -webkit-font-smoothing: antialiased; }
body { margin: 0; }
::selection { background: var(--ink); color: var(--paper); }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums slashed-zero; }
h1 { font-size: 30px; line-height: 1.15; font-weight: 400; letter-spacing: -.035em; margin: 0 0 6px; }
h2 { font-size: 19px; line-height: 1.3; font-weight: 400; letter-spacing: -.02em; margin: 0 0 8px; }
p { margin: 0 0 10px; }
.sub, .fine, .note { color: var(--ink2); }
.fine { font-size: 13px; }

/* Shell: a standard top bar and the in-page index (one page, D57 Q15 B) */
.bar { background: color-mix(in srgb, var(--paper) 94%, transparent); border-bottom: 1px solid var(--line); }
.bar__in { max-width: 1080px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 500; letter-spacing: -.04em; font-size: 17px; text-decoration: none; }
.mark { display: inline-flex; align-items: center; }
.mark i { display: block; }
.mark .o { width: 9px; height: 9px; border: 1.5px solid currentColor; }
.mark .e { width: 9px; height: 1.5px; background: currentColor; }
.mark .s { width: 11px; height: 11px; background: currentColor; }
.bar__end { margin-left: auto; display: flex; align-items: center; gap: 16px; color: var(--ink2); }
.bar__end a { display: inline-flex; align-items: center; min-height: 44px; }
.index { position: sticky; top: 0; z-index: 2; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.index ol { max-width: 1080px; margin: 0 auto; padding: 0 24px; list-style: none; display: flex; gap: 22px; overflow-x: auto; }
.index a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--ink2); border-bottom: 2px solid transparent; }
.index a[aria-current] { color: var(--ink); border-bottom-color: var(--ink); }

.page { max-width: 1080px; margin: 0 auto; padding: 36px 24px 96px; }
.col { max-width: 760px; }

/* Buttons: solid commits a change; line is safe or secondary */
.btn { font: inherit; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 6px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); cursor: pointer; text-decoration: none; }
.btn:hover { background: #262a24; }
.btn--line { background: transparent; color: var(--ink); border-color: var(--line2); }
.btn--line:hover { background: var(--paper2); border-color: var(--ink2); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* The sample label (home page and anything simulated, A6.9) */
.chip { display: inline-flex; align-items: center; gap: 7px; border: 1px dashed var(--line2); border-radius: 999px; padding: 3px 11px; font-size: 13px; color: var(--ink2); white-space: nowrap; }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px dashed currentColor; }

/* Blocks and tables */
.block { padding: 28px 0; border-top: 1px solid var(--line); }
.tbl { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 6px 0 12px; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 11px 14px; border-top: 1px solid var(--line); font-weight: 400; }
.tbl thead th { border-top: 0; color: var(--ink2); font-size: 13px; background: var(--paper); }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl tr.total td, .tbl tr.total th { border-top: 1.5px solid var(--ink); }

/* The grammar: claimed is outlined or hatched, paid is solid, unknown is dashed */
.m { display: inline-block; width: 10px; height: 10px; margin-right: 8px; vertical-align: 0; }
.m--claim { border: 1.5px solid var(--ink2); }
.m--paid { background: var(--ink); }
.m--wait { border: 1.5px dashed var(--ink2); border-radius: 50%; }
.claimed { color: var(--ink2); }
.figs { display: flex; flex-wrap: wrap; gap: 14px 40px; align-items: flex-end; margin: 22px 0 16px; }
.fig .n { display: block; font-size: clamp(64px, 11vw, 104px); line-height: .84; letter-spacing: -.055em; font-variant-numeric: tabular-nums lining-nums; }
.fig small { display: block; margin-top: 10px; font-size: 13px; line-height: 1.35; color: var(--ink2); }
.fig small b { font-weight: 400; color: var(--ink); }
.hatch { color: transparent; -webkit-text-stroke: 1.5px var(--ink2); background: repeating-linear-gradient(135deg, rgba(11,13,10,.34) 0 1.5px, transparent 1.5px 7px); -webkit-background-clip: text; background-clip: text; }

/* Setup and progress steps (same markers as the account page) */
.steps { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.step { display: grid; grid-template-columns: 26px minmax(0,1fr) auto; gap: 12px; padding: 16px 18px; align-items: start; }
.step + .step { border-top: 1px solid var(--line); }
.st { width: 15px; height: 15px; margin-top: 4px; display: block; }
.st--done { background: var(--ink); }
.st--todo { border: 1.5px solid var(--ink); }
.st--wait { border: 1.5px dashed var(--ink2); border-radius: 50%; }
.st--broken { border: 1.5px solid var(--broken); background:
  linear-gradient(45deg, transparent 44%, var(--broken) 44% 56%, transparent 56%),
  linear-gradient(-45deg, transparent 44%, var(--broken) 44% 56%, transparent 56%); }  /* a cross, like Cut: not colour alone */
.step__t { margin: 0; }
.step__d { margin: 2px 0 0; color: var(--ink2); }
.state { font-size: 13px; color: var(--ink2); white-space: nowrap; padding-top: 2px; }
.state--broken { color: var(--broken); }

/* State flags: words first, colour second */
.flag { border-radius: 8px; padding: 12px 14px; margin: 14px 0; display: grid; gap: 8px; }
.flag p { margin: 0; }
.flag--broken { background: var(--broken-tint); color: var(--broken); }
.flag--lapse { background: var(--lapse-tint); color: var(--lapse); }
.flag .btn--line { border-color: currentColor; color: inherit; justify-self: start; }

/* Lists of findings and changes */
.list { margin: 6px 0 0; padding: 0; list-style: none; counter-reset: item; }
.list > li { position: relative; padding: 12px 0 12px 34px; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list > li::before { counter-increment: item; content: counter(item); position: absolute; left: 0; top: 12px; width: 22px; height: 22px; border: 1px solid var(--line2); border-radius: 50%; display: grid; place-items: center; font-size: 12px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.where { display: block; font-size: 13px; color: var(--ink2); margin-bottom: 2px; }
.quote { display: block; margin-top: 6px; padding-left: 12px; border-left: 1px solid var(--line2); }

textarea { font: inherit; color: inherit; width: 100%; min-height: 96px; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 8px; background: var(--card); resize: vertical; }

@media (max-width: 720px) {
  .page { padding: 24px 18px 72px; }
  .bar__in { padding: 0 18px; }
  .bar__end .who { display: none; }
  .index ol { padding: 0 18px; gap: 18px; }
  .figs { gap: 12px 18px; flex-wrap: nowrap; }
  .fig .n { font-size: 54px; }
  .fig small { max-width: 12ch; font-size: 12px; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl th, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 10px 14px; border-top: 1px solid var(--line); }
  .tbl tr:first-child { border-top: 0; }
  .tbl th, .tbl td { border: 0; padding: 2px 0; text-align: left !important; }
  .tbl td[data-l]::before { content: attr(data-l) ": "; color: var(--ink2); }
  .tbl tr.total { border-top: 1.5px solid var(--ink); }
  .tbl tr.total td, .tbl tr.total th { border-top: 0; }
  .step { grid-template-columns: 22px minmax(0,1fr); padding: 14px; }
  .state { grid-column: 2; padding-top: 0; }
}
