/* ============================================================
   VORTEX ADVENTURES — SELF-HELP DESIGN SYSTEM
   Tokens + reference-page styling
   "Guild Hall, legible" — heraldic soul, fixed for the kiosk
   ============================================================ */

/* ---------- TOKENS ---------- */
:root {
  /* Brand — Vortex crimson + heraldic gilt */
  --va-crest:        #6E0808;  /* deep oxblood — crest field, headers */
  --va-crimson:      #930000;  /* KEPT primary brand red */
  --va-crimson-hover:#760000;  /* pressed / hover */
  --va-crimson-tint: #F3DEDE;  /* soft red wash */
  --gilt:            #9A7726;  /* antique heraldic gold — ornament */
  --gilt-light:      #C2A24E;  /* lit gold edge */
  --gilt-wash:       #EFE3C4;  /* faint gilt fill */

  /* Parchment surfaces (warm, replacing flat white) */
  --paper:        #FBF5E9;  /* page ground */
  --paper-raised: #FFFDF6;  /* cards, fields */
  --paper-sunken: #F1E7D2;  /* inset / code wells */
  --vellum-line:  #E2D5B8;  /* hairline divider on parchment */
  --vellum-line-2:#D3C2A0;  /* stronger rule */

  /* Ink (warm near-black, replacing #171717 / pure black) */
  --ink:    #221C14;  /* primary text  ~13:1 on paper */
  --ink-2:  #4A3E2D;  /* secondary     ~8:1 */
  --ink-3:  #6B5C46;  /* tertiary/muted ~5:1 */
  --ink-faint: #B9A988; /* disabled / hairline control border */

  /* Energy / mana — semantic palette (oklch: family hues, tuned for parchment) */
  --en-elemental:  oklch(0.56 0.16 40);   /* Elemental Mana — ember */
  --en-elemental-r:oklch(0.46 0.15 33);   /* Elemental Ritual — deep ember */
  --en-spiritual:  oklch(0.52 0.15 295);  /* Spiritual Mana — arcane violet */
  --en-spiritual-r:oklch(0.43 0.14 290);  /* Spiritual Ritual — deep violet */
  --en-willpower:  oklch(0.58 0.12 78);   /* Willpower — gold */
  --en-inspiration:oklch(0.54 0.11 178);  /* Inspiration — verdant teal */

  /* Functional */
  --success: #3C6B2A;
  --warning: #8A5E12;
  --error:   #930000;
  --notice-bg:     #EFD9C2;  /* "Tijd In" service banner */
  --notice-border: #D5AE84;

  /* Radius */
  --r-sm: 3px;
  --r-md: 5px;   /* controls (refines the old 4dp) */
  --r-lg: 10px;  /* cards */
  --r-seal: 999px;

  /* Borders */
  --bd-hair: 1px solid var(--vellum-line);
  --bd-rule: 1px solid var(--vellum-line-2);
  --bd-ctl:  1.5px solid var(--ink-faint);
  --bd-print:2px solid var(--ink);

  /* Elevation (warm) */
  --sh-sm: 0 1px 2px rgba(50,34,12,.10);
  --sh-md: 0 4px 14px rgba(50,34,12,.12);
  --sh-lg: 0 14px 36px rgba(50,34,12,.16);

  /* Type families */
  --f-display: "Inknut Antiqua", Georgia, serif;
  --f-text:    "Spectral", Georgia, serif;
  --f-mono:    "Spline Sans Mono", ui-monospace, monospace;

  /* Spacing scale (4-based) */
  --s-1: 2px;  --s-2: 4px;  --s-3: 8px;  --s-4: 12px; --s-5: 16px;
  --s-6: 20px; --s-7: 24px; --s-8: 32px; --s-9: 40px; --s-10:48px; --s-11:64px;
}

/* ---------- RESET / BASE ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--f-text);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 50% -10%, #FFFCF3 0%, rgba(255,252,243,0) 60%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,h2,h3,h4 { font-family: var(--f-display); font-weight: 700; color: var(--ink); margin: 0; line-height: 1.18; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--va-crimson); }
code, .mono { font-family: var(--f-mono); }

/* ---------- LAYOUT ---------- */
.shell { display: grid; grid-template-columns: 260px 1fr; align-items: start; }

/* Sidebar nav */
.rail {
  position: sticky; top: 0; align-self: start;
  height: 100vh; overflow-y: auto;
  background: var(--va-crest);
  color: #F4E8CF;
  padding: var(--s-8) var(--s-6) var(--s-9);
  border-right: 3px solid var(--gilt);
}
.rail .crest-mini { display: flex; align-items: center; gap: var(--s-4); margin-bottom: var(--s-8); }
.rail .crest-mini img { width: 46px; height: auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
.rail .crest-mini .wm { font-family: var(--f-display); font-size: 15px; line-height: 1.15; color: #fff; }
.rail .crest-mini .wm small { display:block; font-family: var(--f-text); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gilt-light); margin-top: 3px; }
.rail nav { display: flex; flex-direction: column; gap: 1px; }
.rail .nav-group { font-family: var(--f-text); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gilt-light); margin: var(--s-6) 0 var(--s-3); }
.rail a {
  color: #EBDFC6; text-decoration: none; font-size: 15px;
  padding: 7px var(--s-4); border-radius: var(--r-sm);
  border-left: 2px solid transparent; transition: background .15s, border-color .15s;
}
.rail a:hover { background: rgba(255,255,255,.07); border-left-color: var(--gilt-light); color: #fff; }

.main { padding: 0 0 var(--s-11); min-width: 0; }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 var(--s-8); }

/* ---------- HERO ---------- */
.hero {
  background:
    radial-gradient(140% 120% at 85% -20%, rgba(154,119,38,.22), transparent 55%),
    linear-gradient(180deg, #7A0A0A, var(--va-crest));
  color: #F6ECD6; padding: var(--s-11) 0 var(--s-10);
  border-bottom: 3px solid var(--gilt);
  position: relative; overflow: hidden;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-watermark { position: absolute; right: -40px; top: -30px; width: 360px; opacity: .10; transform: rotate(-6deg); z-index: 0; }
.hero .kicker { font-family: var(--f-text); letter-spacing: .22em; text-transform: uppercase; font-size: 13px; color: var(--gilt-light); margin-bottom: var(--s-4); }
.hero h1 { color: #fff; font-size: clamp(34px, 5vw, 54px); margin-bottom: var(--s-4); }
.hero .lede { font-size: 19px; max-width: 60ch; color: #F1E5CD; }
.hero .crest-lockup { display: flex; align-items: center; gap: var(--s-6); margin-bottom: var(--s-7); }
.hero .crest-lockup img { width: 76px; height: auto; filter: drop-shadow(0 4px 10px rgba(0,0,0,.45)); }

/* ---------- SECTIONS ---------- */
section { padding-top: var(--s-11); }
.sec-head { display: flex; align-items: baseline; gap: var(--s-5); margin-bottom: var(--s-7); }
.sec-head .num { font-family: var(--f-mono); font-size: 13px; color: var(--gilt); padding-top: 6px; }
.sec-head h2 { font-size: 30px; }
.sec-head h2 + p { margin: 0; }
.sec-intro { color: var(--ink-2); max-width: 64ch; margin-top: var(--s-3); }
.rule-gilt { height: 0; border: none; border-top: 1px solid var(--gilt); position: relative; margin: var(--s-7) 0; opacity: .5; }
.rule-gilt::after { content: "❧"; position: absolute; left: 50%; top: -12px; transform: translateX(-50%); background: var(--paper); color: var(--gilt); padding: 0 10px; font-size: 15px; }

.subhead { font-family: var(--f-text); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: var(--s-8) 0 var(--s-4); }

/* ---------- CARDS / PANELS ---------- */
.panel {
  background: var(--paper-raised); border: var(--bd-hair); border-radius: var(--r-lg);
  box-shadow: var(--sh-sm); padding: var(--s-7);
}
.note {
  font-size: 14px; color: var(--ink-2); background: var(--gilt-wash);
  border-left: 3px solid var(--gilt); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: var(--s-4) var(--s-5); margin-top: var(--s-5);
}
.note strong { color: var(--ink); }

/* ---------- SWATCHES ---------- */
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-5); }
.swatch {
  border: var(--bd-hair); border-radius: var(--r-lg); overflow: hidden;
  background: var(--paper-raised); box-shadow: var(--sh-sm);
}
.swatch .chip { height: 84px; display: flex; align-items: flex-end; padding: var(--s-3); }
.swatch .meta { padding: var(--s-4) var(--s-4) var(--s-5); }
.swatch .meta .name { font-weight: 600; font-size: 15px; }
.swatch .meta .desc { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; line-height: 1.4; }
.swatch .meta .hex { font-family: var(--f-mono); font-size: 12px; color: var(--ink-2); margin-top: var(--s-3); }
.swatch .chip.onlight { color: var(--ink); }
.swatch .chip.ondark { color: #FFFCF3; }

/* energy chips legend row */
.energy-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: var(--s-4); }
.energy-card {
  display: flex; align-items: center; gap: var(--s-4);
  border: var(--bd-hair); border-radius: var(--r-lg); background: var(--paper-raised);
  padding: var(--s-4) var(--s-5); box-shadow: var(--sh-sm);
}
.energy-card .orb { width: 30px; height: 30px; border-radius: var(--r-seal); flex: 0 0 auto; box-shadow: inset 0 0 0 2px rgba(255,255,255,.45), 0 1px 3px rgba(0,0,0,.25); }
.energy-card .lbl { font-weight: 600; font-size: 15px; }
.energy-card .lbl small { display:block; font-family: var(--f-mono); font-size: 11px; color: var(--ink-3); font-weight: 400; }

/* ---------- TYPE SPECIMENS ---------- */
.type-row { display: grid; grid-template-columns: 140px 1fr; gap: var(--s-6); padding: var(--s-5) 0; border-bottom: var(--bd-hair); align-items: baseline; }
.type-row .spec { font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.type-row .spec b { display:block; color: var(--ink); font-family: var(--f-text); font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.font-card { border: var(--bd-hair); border-radius: var(--r-lg); background: var(--paper-raised); padding: var(--s-6); box-shadow: var(--sh-sm); }
.font-card .glyphs { font-size: 40px; line-height: 1.1; color: var(--ink); margin-bottom: var(--s-3); }
.font-card .fname { font-family: var(--f-text); font-weight: 600; font-size: 14px; }
.font-card .frole { font-size: 13px; color: var(--ink-3); }
.fonts-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--s-5); }

/* ---------- COMPONENT DEMOS ---------- */
.demo { border: var(--bd-hair); border-radius: var(--r-lg); background: var(--paper-raised); box-shadow: var(--sh-sm); padding: var(--s-7); margin-bottom: var(--s-5); }
.demo-grid { display: grid; gap: var(--s-7); }
.demo-grid.two { grid-template-columns: 1fr 1fr; }
.demo-label { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: var(--s-4); }
.demo-stage { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; }

/* Buttons (the real VortexButton, refined) */
.va-btn {
  font-family: var(--f-text); font-weight: 600; font-size: 17px; line-height: 1.2;
  min-height: 48px; padding: 0 var(--s-7); border-radius: var(--r-md);
  border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-3);
  transition: background .15s, transform .05s, box-shadow .15s;
}
.va-btn:active { transform: translateY(1px); }
.va-btn--primary { background: var(--va-crimson); color: #fff; box-shadow: var(--sh-sm); }
.va-btn--primary:hover { background: var(--va-crimson-hover); }
.va-btn--secondary { background: transparent; color: var(--va-crimson); box-shadow: inset 0 0 0 1.5px var(--va-crimson); }
.va-btn--secondary:hover { background: var(--va-crimson-tint); }
.va-btn--ghost { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--ink-faint); }
.va-btn--ghost:hover { background: var(--paper-sunken); }
.va-btn[disabled] { background: var(--paper-sunken); color: var(--ink-faint); box-shadow: none; cursor: not-allowed; }

/* Big task tile (landing 100dp tiles) */
.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); max-width: 460px; }
.va-tile {
  min-height: 104px; border-radius: var(--r-md); border: none; cursor: pointer;
  background: var(--va-crimson); color: #fff; font-family: var(--f-display); font-weight: 700; font-size: 21px;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: var(--s-5);
  box-shadow: var(--sh-sm); transition: background .15s, transform .05s;
  position: relative; overflow: hidden;
}
.va-tile::before { content:""; position: absolute; inset: 6px; border: 1px solid rgba(255,255,255,.22); border-radius: var(--r-sm); pointer-events: none; }
.va-tile:hover { background: var(--va-crimson-hover); }
.va-tile:active { transform: translateY(1px); }

/* Outlined text field */
.field { display: block; max-width: 360px; }
.field + .field { margin-top: var(--s-6); }
/* side-by-side fields in a grid row must not inherit the stacked-field gap */
.two-col .field + .field, .three-col .field + .field { margin-top: 0; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: var(--s-3); }
.field .ctl {
  width: 100%; font-family: var(--f-text); font-size: 17px; color: var(--ink);
  background: var(--paper-raised); border: var(--bd-ctl); border-radius: var(--r-md);
  padding: 13px var(--s-5); min-height: 48px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field .ctl::placeholder { color: var(--ink-faint); }
.field .ctl:focus { border-color: var(--va-crest); box-shadow: 0 0 0 3px rgba(110,8,8,.12); }
.field.is-error .ctl { border-color: var(--error); }
.field .ctl.mono { font-family: var(--f-mono); letter-spacing: .08em; }
.field .hint { font-size: 12.5px; color: var(--ink-3); margin-top: var(--s-3); }
.field .err { font-size: 12.5px; color: var(--error); margin-top: var(--s-3); }
/* hint + error coexist: the wrapper owns the spacing so both lines can show */
.field-msgs { display: flex; flex-direction: column; gap: 5px; margin-top: var(--s-3); }
.field-msgs > .hint, .field-msgs > .err { margin-top: 0; }
/* error reads as primary: weight + a small crimson alert glyph */
.field .err { font-weight: 600; display: flex; align-items: flex-start; gap: 6px; }
.field .err::before {
  content: "!"; flex: 0 0 auto; width: 15px; height: 15px; margin-top: .5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-text); font-weight: 700; font-size: 11px; line-height: 1;
  color: var(--paper-raised); background: var(--error); border-radius: 50%;
}
/* when an error is showing, the persistent hint steps back to a quieter tone */
.field.is-error .field-msgs > .hint { color: var(--ink-faint); }

/* Composite PLIN + CHIN field (six digits in two parts) */
.plin-row { display: flex; align-items: flex-start; }
.plin-box { display: flex; flex-direction: column; }
.plin-box .plin-sub { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; color: var(--ink-3); margin-bottom: 5px; padding-left: 2px; }
.plin-box.plin { flex: 0 0 auto; width: 84px; min-width: 0; }
.plin-box.chin { width: 68px; flex: 0 0 auto; }
.plin-box input { width: 100%; }
.plin-box.plin input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.plin-box.chin input { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1.5px; }
.plin-box input:focus { position: relative; z-index: 1; }

/* Selectable dropdown (closed + open) */
.select-closed {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 360px; font-size: 17px; color: var(--ink);
  border: var(--bd-ctl); border-radius: var(--r-md); padding: 14px var(--s-5); min-height: 48px;
  background: var(--paper-raised); cursor: pointer;
}
.select-closed .caret { color: var(--ink-3); }
.select-panel {
  max-width: 280px; margin-top: var(--s-3);
  background: var(--paper-raised); border: var(--bd-hair); border-radius: var(--r-lg); box-shadow: var(--sh-md); padding: var(--s-3);
}
.select-panel .opt { padding: 11px var(--s-4); border-radius: var(--r-sm); cursor: pointer; }
.select-panel .opt:hover { background: var(--paper-sunken); }
.select-panel .opt.sel { background: var(--va-crimson-tint); color: var(--va-crimson-hover); font-weight: 600; }

/* Energy selector chips (interactive style) */
.chip-set { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.echip {
  display: inline-flex; align-items: center; gap: var(--s-3);
  font-size: 14.5px; font-weight: 600; padding: 8px 14px 8px 11px; border-radius: var(--r-seal);
  background: var(--paper-raised); color: var(--ink); cursor: pointer;
  box-shadow: inset 0 0 0 1.5px var(--vellum-line-2);
}
.echip .dot { width: 12px; height: 12px; border-radius: var(--r-seal); }
.echip[data-on="true"] { box-shadow: inset 0 0 0 2px currentColor; }

/* Code well + supplier row */
.code-well { background: var(--paper-sunken); border: var(--bd-hair); border-radius: var(--r-md); padding: var(--s-5); font-family: var(--f-mono); }
.supplier-row { display: grid; grid-template-columns: auto 90px 44px; justify-content: start; gap: var(--s-3); align-items: end; }
.icon-btn { width: 44px; height: 44px; border-radius: var(--r-md); border: var(--bd-ctl); background: var(--paper-raised); color: var(--ink-2); font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--paper-sunken); }

/* Banners / messaging */
.banner { border-radius: var(--r-md); padding: var(--s-5) var(--s-6); font-size: 15.5px; }
.banner.service { background: var(--notice-bg); border: 1px solid var(--notice-border); color: #5A3A1B; }
.banner.error { background: var(--va-crimson-tint); border: 1px solid #D8A6A6; color: #6E0808; }
.banner.success { background: #DDEBD2; border: 1px solid #A9C795; color: #2C5220; }
.banner .b-title { font-weight: 700; margin-bottom: 2px; }

/* ---------- PRINTED LAMMY CARD ---------- */
.lammy-stage { background: var(--paper-sunken); border: var(--bd-hair); border-radius: var(--r-lg); padding: var(--s-8); display: flex; gap: var(--s-8); flex-wrap: wrap; justify-content: center; }
.lammy {
  width: 320px; background: #fff; color: #000; border: var(--bd-print); border-radius: 8px;
  padding: 14px; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; box-shadow: var(--sh-md);
}
.lammy .l-titlerow { position: relative; display: flex; align-items: center; min-height: 22px; }
.lammy .l-event { font-weight: 700; font-size: 13px; }
.lammy .l-titlerow .l-head { position: absolute; left: 0; right: 0; margin: 0; font-size: 13px; }
.lammy .l-idrow { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: 6px 0 10px; }
.lammy .l-id { text-align: right; font-weight: 700; }
.lammy .l-id small { display: block; font-size: 11px; }
.lammy .l-id .big { font-family: var(--f-mono); font-size: 18px; }
.lammy .l-crest { width: 34px; height: auto; }
.lammy .l-head { text-align: center; font-weight: 700; font-size: 15px; margin: 2px 0 10px; }
.lammy .l-field { display: flex; gap: 8px; font-size: 13px; margin-bottom: 7px; }
.lammy .l-field .k { width: 92px; font-weight: 700; flex: 0 0 auto; }
.lammy .l-field .v { font-weight: 700; }
.lammy .l-energy { margin: 8px 0; padding-left: 8px; }
.lammy .l-energy .e { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; }
.lammy.back { background: #fff; }
.lammy .l-inner { flex: 1 1 auto; border: 2px solid #000; border-radius: 8px; padding: 10px; font-size: 13px; font-weight: 700; min-height: 110px; }
.lammy-caption { font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); text-align: center; margin-top: var(--s-4); }
.spec-list { list-style: none; padding: 0; margin: 0; }
.spec-list li { display: flex; gap: var(--s-4); padding: 9px 0; border-bottom: var(--bd-hair); font-size: 14.5px; }
.spec-list li .sk { font-family: var(--f-mono); font-size: 12.5px; color: var(--va-crimson); width: 150px; flex: 0 0 auto; padding-top: 2px; }

/* ---------- SPACING / RADIUS VIS ---------- */
.scale-row { display: flex; align-items: center; gap: var(--s-5); padding: 7px 0; }
.scale-row .bar { background: var(--va-crimson); height: 18px; border-radius: 2px; }
.scale-row .lab { font-family: var(--f-mono); font-size: 13px; color: var(--ink-2); width: 120px; }
.radius-grid, .shadow-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap: var(--s-5); }
.radius-demo { height: 90px; background: var(--va-crimson-tint); border: 1.5px solid var(--va-crimson); display: flex; align-items: flex-end; padding: var(--s-3); font-family: var(--f-mono); font-size: 12px; color: var(--va-crimson-hover); }
.shadow-demo { height: 90px; background: var(--paper-raised); border-radius: var(--r-lg); display: flex; align-items: flex-end; padding: var(--s-4); font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); }

/* a11y principles */
.principles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: var(--s-5); }
.principle { border: var(--bd-hair); border-left: 3px solid var(--gilt); border-radius: 0 var(--r-lg) var(--r-lg) 0; background: var(--paper-raised); padding: var(--s-6); box-shadow: var(--sh-sm); }
.principle h4 { font-family: var(--f-text); font-weight: 600; font-size: 16px; margin-bottom: var(--s-3); }
.principle p { font-size: 14px; color: var(--ink-2); margin: 0; }
.principle .tag { font-family: var(--f-mono); font-size: 11px; color: var(--gilt); letter-spacing: .08em; }

footer { text-align: center; color: var(--ink-3); font-size: 13px; padding: var(--s-10) var(--s-8) var(--s-8); }
footer .f-crest { width: 40px; opacity: .7; margin-bottom: var(--s-4); }

/* ---------- MOBILE NAV ---------- */
.menu-toggle { display: none; }

@media (max-width: 880px) {
  .shell { grid-template-columns: 1fr; }
  .rail {
    position: fixed; z-index: 50; top: 0; left: 0; width: 248px; height: 100vh;
    transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--sh-lg);
  }
  body.nav-open .rail { transform: translateX(0); }
  .menu-toggle {
    display: flex; position: fixed; z-index: 60; top: 14px; left: 14px;
    width: 46px; height: 46px; border-radius: var(--r-md); align-items: center; justify-content: center;
    background: var(--va-crest); color: var(--gilt-light); border: 1.5px solid var(--gilt); cursor: pointer; font-size: 20px;
    box-shadow: var(--sh-md);
  }
  .nav-scrim { display: none; position: fixed; inset: 0; background: rgba(34,28,20,.5); z-index: 40; }
  body.nav-open .nav-scrim { display: block; }
  .wrap { padding: 0 var(--s-6); }
  .demo-grid.two { grid-template-columns: 1fr; }
  .fonts-3 { grid-template-columns: 1fr; }
  .hero { padding-top: var(--s-10); }
  .hero h1 { font-size: clamp(28px, 8vw, 40px); }
}

@media (max-width: 520px) {
  .tile-grid { grid-template-columns: 1fr; }
  .type-row { grid-template-columns: 1fr; gap: var(--s-3); }
  .supplier-row { grid-template-columns: 1fr 70px 44px; }
}
