/* Tamwheel brand layer — the Brand Book, September 2026.
 *
 * Loaded by all 16 pages after their own <style>, so what is here wins. Each page still carries
 * its own layout; this file carries the identity: palette (book page 08), proportion and
 * contrast (09), Latin type (10), Arabic type (11), and the logo's placement (03–06, 12).
 *
 * Contrast is the book's standard (page 09): body text 4.5:1 against its ground, text from
 * 24px and interface borders 3:1. Where one of the book's own mock-ups falls short of that —
 * brand gold as small text on green is 2.75:1 — the standard wins.
 */

:root {
  /* Palette, page 08. Gradients run top to bottom, light stop first — never diagonal or radial. */
  --tw-green: #0F6E56;          /* Wordmark Green — headlines on light, brand surfaces */
  --tw-green-deep: #16855F;     /* Deep Green flat */
  --tw-green-grad: linear-gradient(180deg, #1C9C74, #0F7057);
  --tw-mint: #3DB48D;           /* Mint flat — second step, charts, highlights. A fill, never an ink */
  --tw-mint-lt: #5AC8A3;
  --tw-mint-grad: linear-gradient(180deg, #5AC8A3, #20A077);
  --tw-gold: #D58A1F;           /* Gold flat — third step, accent only, never more than 5% */
  --tw-gold-lt: #EB9C26;
  --tw-gold-grad: linear-gradient(180deg, #EB9C26, #BE7818);
  --tw-gold-deep: #8A5A12;      /* Deep Gold — the only gold that is text on a light ground */
  --tw-gold-ar: #BA7517;        /* Arabic Gold — the Arabic wordmark only */
  --tw-leaf: #8C9E4C;           /* Leaf — illustration and pattern only, never the mark or text */
  --tw-ink: #12241E;
  --tw-surface: #F5F7F5;
  --tw-paper: #FFFFFF;

  /* Neutrals the book's pages are built with. */
  --tw-body: #3E4C46;           /* 9.0:1 on paper */
  --tw-muted: #6B756F;          /* 4.8:1 on paper — captions, never on Surface */
  --tw-rule: #E3E7E4;           /* hairlines and card edges — decoration, not controls */
  --tw-field: #8A948F;          /* form controls: 3.1:1 on paper */
  --tw-wash: #FDF6EA;           /* the book's gold-edged note panel */
  --tw-on-green: #FFFFFF;       /* 6.2:1 on Wordmark Green */
  --tw-on-green-2: #CFE2DD;     /* 4.6:1 on Wordmark Green — secondary text on green */
  --tw-on-green-rule: rgba(255, 255, 255, 0.18);

  /* Type, pages 10 and 11. Fallbacks: Segoe UI, then Georgia, then Consolas. */
  --tw-sans: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --tw-serif: 'Newsreader', Georgia, serif;
  --tw-mono: 'Geist Mono', Consolas, monospace;
  /* Jakarta first so Latin runs and figures inside Arabic stay in Jakarta; it has no Arabic
     glyphs, so Arabic falls through to Naskh. */
  --tw-arabic: 'Plus Jakarta Sans', 'Noto Naskh Arabic', 'Segoe UI', Tahoma, sans-serif;

  /* The pages' own variables, re-pointed at the palette, so every page-specific rule that
     uses them follows without being rewritten. */
  --petrol: var(--tw-green);
  --petrol-dk: var(--tw-ink);
  --petrol-lt: var(--tw-green-deep);
  --teal: var(--tw-mint);
  --teal-dk: var(--tw-green);
  --teal-lt: var(--tw-mint-lt);
  --gold: var(--tw-gold);
  --gold-lt: var(--tw-gold-lt);
  --gold-tx: var(--tw-gold-deep);
  --bone: var(--tw-paper);
  --frost: var(--tw-surface);
  --frost-dk: var(--tw-rule);
  --midnight: var(--tw-ink);
  --steel: var(--tw-body);
  --steel-lt: var(--tw-muted);
  --line: var(--tw-rule);
  --line-dk: var(--tw-on-green-rule);
  --display: var(--tw-sans);
  --sans: var(--tw-sans);
  --latin: var(--tw-sans);
  --mono: var(--tw-mono);
  --arabic: var(--tw-arabic);
}
html[lang="ar"] { --sans: var(--tw-arabic); }

/* ── Base ─────────────────────────────────────────────────────────────────────────────── */

body { font-family: var(--sans); color: var(--tw-ink); background: var(--tw-paper); font-size: 16px; line-height: 1.65; }
p { text-wrap: pretty; }
em { font-style: normal; }
::selection { background: rgba(61, 180, 141, 0.28); color: var(--tw-ink); }
:focus-visible { outline: 2px solid var(--tw-green); outline-offset: 2px; }
.tnum { font-family: var(--tw-sans); font-variant-numeric: tabular-nums; }
.lat { font-family: var(--tw-sans); }
[lang="ar"] { font-family: var(--tw-arabic); letter-spacing: normal; }

/* ── Latin type, page 10 ──────────────────────────────────────────────────────────────── */

/* Display: Jakarta 800 at -4.5%, and never below 40px. */
.hero h1 { font-family: var(--tw-sans); font-weight: 800; letter-spacing: -0.045em; line-height: 1.02; font-size: clamp(56px, 9vw, 120px); color: var(--tw-ink); }
.phero h1 { font-family: var(--tw-sans); font-weight: 800; letter-spacing: -0.045em; line-height: 1.04; font-size: clamp(40px, 6vw, 76px); color: var(--tw-ink); }

/* H1 of the book — the site's section heads: Jakarta 700 at -2.5%. */
h2, .section-head, .problem h2, .closing h2, .tok h2, .roles h2, .control h2, .elig h2, .pillars h2, .endcta h2, .fnumbers h2, .whyt h2 {
  font-family: var(--tw-sans); font-weight: 700; letter-spacing: -0.025em; line-height: 1.12; font-size: clamp(32px, 4.2vw, 50px);
}
h2, .section-head { color: var(--tw-ink); }

/* H2 of the book — card and step titles: Jakarta 600 at -1.5%. */
h3, h4, .step h3, .path-card h3, .tstrip-item h4, .brf-card h3, .brf-sub h3, .tcard h3, .mcard h3, .fcard h3, .keep h4 {
  font-family: var(--tw-sans); font-weight: 600; letter-spacing: -0.015em; line-height: 1.25;
}
.step h3 { font-size: 22px; }
.path-card h3 { font-size: 24px; }
.brf-card h3, .brf-sub h3 { font-size: 24px; }
.tcard h3, .mcard h3, .fcard h3, .tstrip-item h4, .keep h4 { font-size: 19px; }

/* Emphasis is colour, not a second face or a gradient. */
.hero h1 em, .phero h1 em, .section-head em, h2 em { font-style: normal; font-weight: inherit; color: var(--tw-green); background: none; -webkit-text-fill-color: currentColor; padding: 0; margin: 0; display: inline; }

/* Body: Jakarta 400/16/1.65. Measure 60–75 characters. Never justify. */
.section-lead, .hero-sub, .phero .lead { color: var(--tw-body); }
.section-lead { font-size: 18px; line-height: 1.65; max-width: 36em; }
.hero-sub, .phero .lead { line-height: 1.55; max-width: 32em; }

/* Label: Jakarta 700/11/+16%, capitals, Deep Gold on light grounds. Screen sizes a step up. */
.eyebrow, .hero-eyebrow, .step-num, .path-tag, .brf-meta, .foot-col h5, .chain-cap, .krow .k, .cmp h4 {
  font-family: var(--tw-sans); font-weight: 700; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--tw-gold-deep);
}
.eyebrow, .hero-eyebrow { margin-bottom: 20px; }
.phero .eyebrow::before, .hero-eyebrow::before { background: var(--tw-gold); height: 2px; border-radius: 1px; }

/* Figures: money and dates in Jakarta 700 tabular. Never mono. */
.stat-big .num, .mock-cash .big, .calc-out .v, .calc-hl .v, .fnum .n, .tokbig, .lc-num, .mock-row .amt {
  font-family: var(--tw-sans); font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -0.02em;
}
.mock-row .amt { font-size: 11px; letter-spacing: 0; }

/* Reference: Geist Mono 500, only where a string is read character by character — status codes,
   ledger states, IDs. */
.chain-block .hash, .ref { font-family: var(--tw-mono); font-weight: 500; letter-spacing: 0.04em; }
.chain-block .hash { font-size: 8px; color: var(--tw-muted); }
.chain-block.lit .hash { color: var(--tw-on-green); }
.mock-cash .sub { font-family: var(--tw-sans); font-weight: 700; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--tw-body); }

/* Pull quote: Newsreader 400, and nothing else is ever set in it. */
blockquote, .thesis blockquote { font-family: var(--tw-serif); font-style: normal; font-weight: 400; font-optical-sizing: auto; font-size: clamp(24px, 3vw, 34px); line-height: 1.4; letter-spacing: -0.005em; color: var(--tw-green); }

/* Small print stays Jakarta, not mono. */
.frm-note, .hero-trust { font-family: var(--tw-sans); }
.frm-note { font-size: 13px; line-height: 1.6; color: var(--tw-muted); }
.hero-trust { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; text-transform: none; color: var(--tw-body); }
.hero-trust span::before { background: var(--tw-mint); }

/* The pages' own small labels and figures, in the same two roles. */
.rmcard .tag, .rolecard .tag, .compare-cell.head, .tokbig .lbl, .lc-content .tagrole, .keep .kt, .brf-date, .ba .bt, .calc-field label, .fstep .n, .p3a {
  font-family: var(--tw-sans); font-weight: 700; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
}
.calc-tv, .calc-rr .v, .calc-iw .cur { font-family: var(--tw-sans); font-variant-numeric: tabular-nums; font-weight: 600; }
.calc-card input[type=number] { font-family: var(--tw-sans); font-variant-numeric: tabular-nums; font-weight: 600; border-color: var(--tw-field); }
.compare-cell.old.head, .ba.before .bt { color: var(--tw-body); }
.rmcard.now .tag, .ba.after .bt, .tokbig .lbl { color: var(--tw-on-green); }
.tokbig { background: var(--tw-green); color: var(--tw-on-green); }
/* Figures on a light ground (the funders page's constraint section) are green; on ink, white. */
.fnum .n { color: var(--tw-green); font-weight: 700; }
.fnum .l { color: var(--tw-body); }
.fnumbers .fnum .n { color: var(--tw-on-green); }
.fnumbers .fnum .l { color: var(--tw-on-green-2); }
/* The lifecycle's large step numerals: quiet, but readable at 3:1. */
.lc-num { color: var(--tw-field); }

/* ── The logo in the header — primary horizontal bilingual lockup (pages 04 and 05) ──────── */

nav { background: var(--tw-paper); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 1px solid var(--tw-rule); padding: 18px 40px; }
.nav-brand { display: flex; align-items: center; gap: 0; flex: none; }
/* 48px tall is 161px wide — above the 140px the bilingual lockup needs, with 1X (the width of
   one square, 17.6px) clear on every side. */
.nav-brand .lockup { display: block; height: 48px; width: auto; }
.nav-links { gap: 26px; }
.nav-links a { font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--tw-body); }
.nav-links a:hover, .nav-links a.active { color: var(--tw-green); }
.nav-links a.active::after { background: var(--tw-green); }
@media (max-width: 1040px) { nav { padding: 16px 20px; } }
/* Below 140px the Arabic stops resolving: phones get the Latin-only lockup. */
@media (max-width: 560px) { .nav-brand .lockup { height: 40px; } }
/* The language switch stays on every width; on phones the header's buttons tighten to fit. */
@media (max-width: 1040px) { .nav-cta .lang { display: inline-block; } }
@media (max-width: 560px) {
  nav { padding: 14px 16px; }
  .nav-cta { gap: 8px; }
  .nav-cta .btn { padding: 8px 12px; font-size: 13px; }
  .nav-cta .lang[lang="ar"] { font-size: 14px; padding: 6px 10px; }
}

/* ── Buttons ──────────────────────────────────────────────────────────────────────────── */

.btn { font-family: var(--sans); font-weight: 600; border-radius: 10px; letter-spacing: 0; }
.btn-solid { background: var(--tw-green); color: var(--tw-paper); border: 1px solid var(--tw-green); }
.btn-solid:hover { background: var(--tw-green-deep); border-color: var(--tw-green-deep); color: var(--tw-paper); }
.btn-ghost { background: transparent; color: var(--tw-green); border: 1.5px solid var(--tw-green); }
.btn-ghost:hover { background: var(--tw-surface); color: var(--tw-green); border-color: var(--tw-green); }
/* On green: Mint is a fill, so it carries ink, not white. */
.btn-teal { background: var(--tw-mint); color: var(--tw-ink); border: 1px solid var(--tw-mint); }
.btn-teal:hover { background: var(--tw-mint-lt); border-color: var(--tw-mint-lt); color: var(--tw-ink); }
.nav-cta .lang { color: var(--tw-green); border: 1.5px solid var(--tw-rule); font-weight: 600; }
.nav-cta .lang:hover { border-color: var(--tw-green); background: var(--tw-surface); color: var(--tw-green); }
.nav-cta .lang[lang="ar"] { font-family: 'Noto Naskh Arabic', 'Segoe UI', serif; font-weight: 600; font-size: 16px; padding-top: 6px; padding-bottom: 6px; }

/* ── Forms ────────────────────────────────────────────────────────────────────────────── */

.fld { font-family: var(--sans); border: 1px solid var(--tw-field); border-radius: 10px; background: var(--tw-paper); color: var(--tw-ink); }
.fld::placeholder { color: var(--tw-muted); opacity: 1; }
.fld:focus { outline: 2px solid var(--tw-green); outline-offset: 1px; border-color: var(--tw-green); }

/* ── Surfaces: paper and surface for 60%, green for 25% (page 09) ─────────────────────── */

/* Flat grounds only — the page 06 grounds the logo may sit on. The hero keeps its grid as a
   pattern, drawn in Leaf, the colour the book reserves for pattern. */
.hero, .phero { background: var(--tw-paper); }
.hero-grid, .phero::before { background-image: linear-gradient(rgba(140, 158, 76, 0.14) 1px, transparent 1px), linear-gradient(90deg, rgba(140, 158, 76, 0.14) 1px, transparent 1px); }
.problem, .elig, .control, .tok, .pillars, .closing, .path-card.fund, .brf-sub, .rmcard.now, .ba.after { background: var(--tw-green); color: var(--tw-on-green); }
.fnumbers { background: var(--tw-ink); color: var(--tw-on-green); }
.problem::before { opacity: 0.35; }
.chain-block.lit, .mock-chain .cb.lit { background: var(--tw-green); border-color: var(--tw-green); }
.tstrip-item .ico, .whyt-point .ico, .tcard .ico, .mcard .ico { background: var(--tw-green); }
.path-card.biz, .brf-strip { background: var(--tw-surface); }
.path-card, .tstrip-item, .brf-card, .tcard, .mcard, .fcard { border-color: var(--tw-rule); border-radius: 14px; }
.path-card:hover { box-shadow: 0 18px 44px rgba(18, 36, 30, 0.08); }

/* Text on green and ink: white for anything that must be read, #CFE2DD for what is secondary. */
:is(.problem, .elig, .control, .tok, .pillars, .closing, .fnumbers, .path-card.fund, .brf-sub, .rmcard.now, .ba.after) :is(h2, h3, h4, .section-head) { color: var(--tw-on-green); }
:is(.problem, .elig, .control, .tok, .pillars, .closing, .fnumbers, .path-card.fund, .brf-sub, .rmcard.now, .ba.after) :is(h2, h3, .section-head) em { color: var(--tw-mint-lt); }
:is(.problem, .elig, .control, .tok, .pillars, .closing, .fnumbers, .path-card.fund, .brf-sub, .rmcard.now, .ba.after) :is(p, li, .label, .pdesc, .section-lead) { color: var(--tw-on-green-2); }
/* Brand gold as small text on green fails page 09's 4.5:1 — the label goes white, and the gold
   moves to a rule beside it, a fill. */
:is(.problem, .elig, .control, .tok, .pillars, .closing, .fnumbers, .path-card.fund, .brf-sub, .rmcard.now, .ba.after) :is(.eyebrow, .path-tag, .brf-meta, .step-num) { color: var(--tw-on-green) !important; display: flex; align-items: center; gap: 12px; }
:is(.problem, .elig, .control, .tok, .pillars, .closing, .fnumbers, .path-card.fund, .brf-sub, .rmcard.now, .ba.after) :is(.eyebrow, .path-tag, .brf-meta, .step-num)::before { content: ''; width: 22px; height: 2px; border-radius: 1px; background: var(--tw-gold-lt); flex: none; }
.stat-big { border-inline-start: 3px solid var(--tw-mint); }
html[dir="rtl"] .stat-big { border-left: none; border-right: 3px solid var(--tw-mint); }
.stat-big .num { color: var(--tw-on-green); }
.stat-big .label { color: var(--tw-on-green-2); }
.brf-sub .fld { border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.08); color: var(--tw-on-green); }
.brf-sub .fld::placeholder { color: var(--tw-on-green-2); }

/* ── Details ──────────────────────────────────────────────────────────────────────────── */

.tdisc summary { font-family: var(--tw-sans); font-weight: 600; border-color: var(--tw-field); color: var(--tw-green); border-radius: 8px; }
.tdisc summary:hover { border-color: var(--tw-green); background: var(--tw-surface); }
.tdisc[open] summary { background: var(--tw-green); border-color: var(--tw-green); color: var(--tw-paper); }
.tdisc li::before { background: var(--tw-mint); }
.step::before { background: var(--tw-mint); }
.mock-row .dot { background: var(--tw-mint); }
.chain-link, .mock-chain .ln { background: var(--tw-mint); opacity: 1; }
.chain-block .mark, .mock-chain .cb .mark { display: block; width: 30px; height: 30px; }

/* ── Footer: reversed lockup on brand green (page 06) ─────────────────────────────────── */

footer { background: var(--tw-green); color: var(--tw-on-green-2); }
.foot-top { border-bottom-color: var(--tw-on-green-rule); }
/* 56px tall is 188px wide, with 1X of green on every side. */
.foot-brand .lockup { display: block; height: 56px; width: auto; margin: 0 0 22px; }
.foot-brand p, .foot-addr, .foot-sub p, .foot-bottom, .foot-bottom .legal { color: var(--tw-on-green-2); }
.foot-col h5 { color: var(--tw-on-green); }
.foot-col a, footer .foot-col a { color: var(--tw-on-green-2); }
.foot-col a:hover, footer .foot-col a:hover { color: var(--tw-on-green); }
.foot-addr a { color: var(--tw-on-green); border-bottom-color: rgba(255, 255, 255, 0.4); }
.foot-sub .fld { border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.08); color: var(--tw-on-green); }
.foot-sub .fld::placeholder { color: var(--tw-on-green-2); }
.foot-status { border-color: var(--tw-on-green-rule); color: var(--tw-on-green-2); }

/* ── Arabic, page 11 ──────────────────────────────────────────────────────────────────── */
/* Noto Naskh Arabic, at 1.15× the Latin size to match its apparent weight, on a 1.9–2.0 line
   to clear the ascenders. Never letterspaced, never in capitals styling. The layout mirrors;
   the logo and the numerals do not. */

html[lang="ar"] body { font-family: var(--tw-arabic); line-height: 2; font-size: 18.4px; }
html[lang="ar"] body * { letter-spacing: normal !important; }
html[lang="ar"] :is(.eyebrow, .hero-eyebrow, .step-num, .path-tag, .brf-meta, .foot-col h5, .chain-cap, .tag, .pill, .krow .k, .cmp h4, .sig) {
  font-family: var(--tw-arabic) !important; text-transform: none; font-weight: 700; font-size: 15px; line-height: 1.9;
}
html[lang="ar"] .hero h1 { font-weight: 700; line-height: 1.5; font-size: clamp(48px, 7.5vw, 104px); }
html[lang="ar"] .phero h1 { font-weight: 700; line-height: 1.5; font-size: clamp(38px, 5.6vw, 70px); }
html[lang="ar"] :is(h2, .section-head, .problem h2, .closing h2, .tok h2, .roles h2, .control h2, .elig h2, .pillars h2, .endcta h2, .fnumbers h2, .whyt h2) { font-weight: 700; line-height: 1.55; font-size: clamp(30px, 4vw, 48px); }
html[lang="ar"] :is(h3, h4, .step h3, .path-card h3, .tstrip-item h4, .brf-card h3, .brf-sub h3, .tcard h3, .mcard h3, .fcard h3, .keep h4) { font-weight: 700; line-height: 1.6; }
html[lang="ar"] .step h3 { font-size: 25px; }
html[lang="ar"] :is(.path-card h3, .brf-card h3, .brf-sub h3) { font-size: 27px; }
html[lang="ar"] :is(.tcard h3, .mcard h3, .fcard h3, .tstrip-item h4, .keep h4) { font-size: 22px; }
html[lang="ar"] :is(.section-lead) { font-size: 20.5px; line-height: 2; }
html[lang="ar"] :is(.hero-sub, .phero .lead) { line-height: 1.95; }
html[lang="ar"] :is(p, li) { line-height: 2; }
html[lang="ar"] :is(.frm-note, .foot-bottom .legal, .foot-addr, .foot-sub p, .tdisc li) { line-height: 1.9; }
html[lang="ar"] .frm-note { font-size: 15px; }
html[lang="ar"] .nav-links a { font-size: 16.5px; }
html[lang="ar"] .btn { font-size: 16.5px; font-weight: 700; }
html[lang="ar"] .hero-trust { font-size: 15px; }
html[lang="ar"] blockquote { font-family: var(--tw-arabic); font-weight: 400; font-size: clamp(26px, 3.2vw, 38px); line-height: 1.8; }
html[lang="ar"] .fld { font-family: var(--tw-arabic); font-size: 17px; }
/* Latin inside Arabic pages keeps its Latin setting. */
html[lang="ar"] :is(.lat, .tnum, .stat-big .num, .mock-row .amt, .calc-out .v, .fnum .n) { font-family: var(--tw-sans); direction: ltr; unicode-bidi: isolate; }
html[lang="ar"] .nav-cta .lang[lang="en"] { font-family: var(--tw-sans); font-size: 14px; }

/* ── Phones: the header on one row ─────────────────────────────────────────────────────── */

/* Below 480px the mark, the language switch, Sign In and Request access no longer fit beside the
   wordmark, so the <picture> in each page serves the mark alone, and the switch shows a short
   label — its aria-label still names the language in full. Last in the file, and as specific as
   the Arabic page's own rule for the switch above, so it wins on both languages. */
@media (max-width: 480px) {
  nav { padding: 12px 14px; }
  .nav-cta { gap: 6px; }
  .nav-cta .btn { padding: 8px 10px; }
  html[lang] .nav-cta .lang[lang] { font-size: 0; min-width: 38px; padding: 7px 8px; text-align: center; line-height: 1; }
  html[lang] .nav-cta .lang[lang]::after { font-size: 13px; line-height: 18px; }
  html[lang] .nav-cta .lang[lang="ar"]::after { content: "ع"; font-family: 'Noto Naskh Arabic', 'Segoe UI', serif; font-size: 16px; }
  html[lang] .nav-cta .lang[lang="en"]::after { content: "EN"; font-family: var(--tw-sans); }
}
