/* furoki-type.css v2: shared product type roles, aligned with furoki.com after D1.
   The :root block uses the website type scale in apps/website/css/site-tokens.css, plus two product-only tokens
   for dense app UI (--type-dense, --leading-dense). Shared brand components map to these roles, so product pages
   use the same Inter, display sizes, leading and tracking as furoki.com.
   Load order: furoki-tokens.css (or the product's mapped tokens), furoki.css, furoki-type.css, then the product's own CSS.
   This file and the product token file are the only places raw px sizes or colour literals are allowed (npm run check:tokens).
   Keep it byte-identical in Concierge, Bingo, Marco and Gateway. Docs: apps/website/docs/design-tokens.md and each product's docs/design-tokens.md. */
:root {
  /* type scale: one body size for every reading surface, phones included */
  --type-micro: 13px;                                  /* mock UI inside the landscape scenes (glass panels) only */
  --type-caption: 14px;                                /* captions, footnotes, legal line, contents list, small buttons */
  --type-small: 15px;                                  /* UI and meta: nav, buttons, eyebrows, dates, labels, footer links */
  --type-ui: 16px;                                     /* large buttons, table cells, the author name */
  --type-body: 18px;                                   /* body and paragraph text, everywhere */
  --type-quote: 20px;                                  /* pull quotes, h4-level subheads, the avatar letter */
  --type-lead: clamp(20px, .5vw + 17px, 24px);         /* lead/intro: a post's dek, a hero's sub line */
  --type-h4: 20px;                                     /* card and cell titles, FAQ questions */
  --type-h3: clamp(21px, .8vw + 15px, 26px);           /* subsection heads */
  --type-card: 22px;                                   /* Keep reading card titles */
  --type-h2: clamp(26px, 1.25vw + 18px, 34px);         /* section heads inside a post or page column */
  --type-title-sm: clamp(22px, .5vw + 18px, 26px);     /* compact list titles */
  --type-title: clamp(28px, 1.6vw + 14px, 40px);       /* blog list titles, homepage section heads */
  --type-feature: clamp(32px, 1.2vw + 23px, 38px);     /* the featured post title */
  --type-section: clamp(32px, 2.2vw + 14px, 48px);    /* homepage and landing-page section heads */
  --type-h1-compact: clamp(32px, 2vw + 20px, 44px);    /* h1 on tools, legal and 404 pages */
  --type-h1: clamp(40px, 3.6vw + 14px, 64px);          /* page and post headlines, the homepage hero */
  --type-art: clamp(40px, 3.6vw + 14px, 64px);         /* big word on a brand panel */
  --type-btn: 17px;
  --type-metric: 30px;                                 /* a single large number */

  --type-dense: 13px;                                  /* products only: dense app UI (dashboards, tables, chat chrome); never page copy */

  /* line heights (unitless, so they scale with the size) */
  --leading-tight: 1.02;    /* display headlines */
  --leading-heading: 1.08;  /* h1/h2, list titles */
  --leading-snug: 1.36;     /* h3/h4, card titles */
  --leading-lead: 1.45;     /* lead text */
  --leading-ui: 1.5;        /* captions, table cells */
  --leading-small: 1.6;     /* UI/meta text (15px -> 24px) */
  --leading-body: 1.56;     /* body text (18px -> 28px) */
  --leading-dense: 1.45;    /* products only: dense app UI */

  /* letter spacing */
  --tracking-display: -.03em;
  --tracking-tight: -.02em;
  --tracking-label: .06em;

  /* measure: the width text runs to */
  --measure-body: 736px;    /* post and page body column (~70 characters at 18px) */
  --measure-page: 760px;    /* tools, legal and FAQ columns */
  --measure-text: 640px;    /* a paragraph beside other content (cells, split sections) */
  --measure-dek: 600px;     /* a list dek */
  --measure-note: 420px;    /* the short note set beside a headline */

  /* text colours (roles; values come from brand/furoki-tokens.css) */
  --text-body: var(--text-strong);         /* #0b0b0b ink on white: body, lead and headings */
  --text-meta: var(--text-subtle);         /* #6b6b6b on white: dates, captions, labels, footer small print */
  --text-on-dark: var(--on-gfx);           /* white on flat dark panels */
  --text-on-dark-muted: rgba(255, 255, 255, .85);
  --text-on-glass-muted: var(--muted-on-white);
  --line-on-dark: var(--panel-dark-line);
  --line-on-dark-strong: rgba(255, 255, 255, .55);
  --shadow-glass: var(--shadow-card);
  --shadow-raised: 0 2px 6px rgba(0, 0, 0, .04);
}

/* ── Type roles for the shared brand components (and reusable .t-* classes) ── */
body { font-size: var(--type-body); line-height: var(--leading-body); }
main { --text-default: var(--text-body); }

/* body */
.t-body, .body, .ticks li, .features p, .product .txt p, .steps p, details p, .price li, .pro p, .legal p, .legal li {
  font-size: var(--type-body); line-height: var(--leading-body); color: var(--text-body); }
.body, .t-measure { max-width: var(--measure-text); }
.legal p, .legal li { max-width: var(--measure-body); }

/* lead */
.t-lead, .hero .sub, .sub-c { font-size: var(--type-lead); line-height: var(--leading-lead); color: var(--text-body); }
.final .sub-c { color: var(--text-on-dark-muted); }

/* headings */
.t-h1, .hero h1 { font-size: var(--type-h1); line-height: var(--leading-tight); letter-spacing: var(--tracking-display); }
.t-h1-compact, .legal h1 { font-size: var(--type-h1-compact); line-height: var(--leading-tight); letter-spacing: var(--tracking-display); }
.t-section, .section h2, .final h2 { font-size: var(--type-section); line-height: var(--leading-tight); letter-spacing: var(--tracking-display); }
.t-h2 { font-size: var(--type-h2); line-height: var(--leading-heading); letter-spacing: var(--tracking-tight); }
.t-h3, .legal h2 { font-size: var(--type-h3); line-height: var(--leading-snug); }
.t-h4, .features h3, .product .txt h3, .steps h3, .pro h3 { font-size: var(--type-h4); line-height: var(--leading-snug); }
.product .pic .name, .amt { font-size: var(--type-h2); }
.legal h2 { margin: 40px 0 12px; }

/* small: UI and meta (15px) */
.t-small, .eyebrow, .trust, .for, .price h3, .amt small, .links a, .nav-cta .txt, .menu > summary, .foot nav a, .btn {
  font-size: var(--type-small); line-height: var(--leading-small); }
.t-meta, .eyebrow, .trust, .for { color: var(--text-meta); }
.btn.lg, .menu > nav a { font-size: var(--type-ui); }
summary { font-size: var(--type-body); line-height: var(--leading-snug); }

/* form labels and controls */
.t-ui { font-size: var(--type-ui); line-height: var(--leading-ui); }

/* caption (14px): small buttons, badges, footer small print, fine print */
.t-caption, .btn.sm, .n, .ribbon, .fine, .foot-brand p, .foot .foot-legal, .foot h4, .foot .foot-h { font-size: var(--type-caption); line-height: var(--leading-ui); }
.fine, .foot-brand p, .foot .foot-legal { color: var(--text-meta); }

/* dense app UI (dashboards, tables, chat chrome): a smaller step, still a token */
.t-dense { font-size: var(--type-dense); line-height: var(--leading-dense); }

/* bigger button text must never push a narrow card wider than the screen */
.cta-row .btn { max-width: 100%; }

@media (max-width: 480px) { :root { --type-h1: 40px; --type-art: 40px; --type-section: 34px; } }
@media (max-width: 340px) { .cta-row .btn { white-space: normal; text-align: center; } }
/* the 15px nav type must still fit a 320px phone: menu, button and product name tighten below 360px */
@media (max-width: 360px) {
  .nav-cta { gap: 4px; }
  .menu > summary { font-size: var(--type-caption); padding: 0 8px; }
  .nav-cta .btn.sm { padding-inline: 8px; }
  .brand .prod { margin-left: 6px; padding-left: 6px; }
}
