/* ============================================================================
   The app's stylesheet entry (imported by src/main.tsx): the five design-system
   token files in the order the legacy helmet <link>s had them, then runtime.css
   (the runtime's and the helmet's own rules), which must come after the tokens:
   its "a { color:#000 }" and html/body background override tokens/base.css
   (docs/rebuild/template-to-jsx.md §1.3, R11; runtime.css header).

   Why one file of @imports instead of six imports in main.tsx: about.html links
   the same token files. CSS modules that two build entries share go into a
   shared CSS-only chunk, and Vite 8 (vite:css generateBundle, pure CSS chunks)
   adds that chunk's file AFTER the entry's own CSS, so the built index.html
   linked runtime.css before the tokens and the cascade was reversed in
   production (dev was fine). Vite inlines these @imports (url()s rebased), so
   the app's CSS is one file in this order and shares nothing with about.html.
   ========================================================================== *//* ============================================================
   MatterMake — Webfonts
   Primary display: Titling Gothic FB (Font Bureau) — an extended
   neo-grotesque used across widths. Body: Suisse Intl.
   The connected "matter make" wordmark is custom lettering and is
   delivered as an image asset (see assets/logos), not a webfont.
   ============================================================ */

/* --- Titling Gothic FB — standard width (headings, UI) --- */
@font-face {
  font-family: "Titling Gothic FB";
  src: url("/assets/TitlingGothicFB-Regular-DbP5nGmw.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Titling Gothic FB";
  src: url("/assets/TitlingGothicFB-Medium-Dlpqwg16.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* --- Titling Gothic FB Std — the slightly tighter standard cut --- */
@font-face {
  font-family: "Titling Gothic FB Std";
  src: url("/assets/TitlingGothicFB-Standard-BLGpKyyZ.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --- Titling Gothic FB Wide — oversized numerals & big statements --- */
@font-face {
  font-family: "Titling Gothic FB Wide";
  src: url("/assets/TitlingGothicFB-WideStandard-Ba_Vl5mt.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --- Titling Gothic FB Ext — extended light, airy hero lettering --- */
@font-face {
  font-family: "Titling Gothic FB Ext";
  src: url("/assets/TitlingGothicFB-ExtendedLight-DROqPmzE.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* --- Suisse Intl — body copy --- */
@font-face {
  font-family: "Suisse Intl";
  src: url("/assets/SuisseIntl-Book-DxGosl3D.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* ============================================================
   MatterMake — Colour
   A stark black/white base with a single signature accent:
   terracotta-rust (#E45C44). Beyond that sits the "material
   palette" — muted clay / sand / water / olive tones drawn
   straight from the studio's renders and reef ceramics.
   Default is always black on white, lots of negative space.
   Use rust as a full-bleed field or single accent — never a
   busy multi-colour layout. Material tones support imagery,
   section tints and data, not UI chrome.
   ============================================================ */

:root {
  /* --- Base / ink --- */
  --ink: #000000;          /* primary text, lines, the mark */
  --paper: #ffffff;        /* default ground */

  /* --- Neutral grade (grey) --- */
  --grey-900: #1a1a1a;
  --grey-700: #454e4d;     /* slate — desaturated dark, secondary text */
  --grey-500: #7f7f7f;     /* mid grey — captions, meta */
  --grey-300: #d7d7cf;     /* stone — hairlines, disabled, fills */
  --grey-100: #f2f1ec;     /* faint warm grey — alt surface */

  /* --- Signature accent --- */
  --rust: #e45c44;         /* terracotta-rust — THE accent */
  --rust-deep: #854b4b;    /* brick — pressed / shadowed rust */
  --rust-tint: #fff3e1;    /* sand — warm paper, rust at 6% */

  /* --- Material palette (imagery, tints, data, diagrams) --- */
  --mat-clay: #a56559;     /* fired clay / reef ceramic */
  --mat-brick: #854b4b;    /* dark brick / patinated copper */
  --mat-sand: #fff3e1;     /* warm paper / EPS foam */
  --mat-sage: #e8eac7;     /* pale sage / planting */
  --mat-olive: #7b7055;    /* olive / timber shadow */
  --mat-water: #cce5e1;    /* soft Mediterranean water */
  --mat-mint: #ecfef7;     /* pale aqua highlight */
  --mat-mauve: #d2bfc2;    /* clay grey / dusk */
  --mat-slate: #454e4d;    /* slate green / steel */
  --mat-stone: #d7d7cf;    /* warm grey / concrete */

  /* ---------- Semantic aliases ---------- */
  --text-primary: var(--ink);
  --text-secondary: var(--grey-700);
  --text-muted: var(--grey-500);
  --text-on-ink: var(--paper);
  --text-on-rust: var(--paper);

  --surface: var(--paper);
  --surface-alt: var(--grey-100);
  --surface-sand: var(--mat-sand);
  --surface-ink: var(--ink);
  --surface-rust: var(--rust);

  --accent: var(--rust);
  --accent-hover: #d44e38;     /* rust, ~6% darker — hover */
  --accent-press: var(--rust-deep);

  --border: var(--ink);            /* hairline rule, 1px solid ink */
  --border-soft: var(--grey-300);  /* quiet divider */

  --focus-ring: var(--rust);
}

/* ============================================================
   MatterMake — Typography
   Headings & UI: Titling Gothic FB (standard). Big statements
   and the signature oversized numerals: Titling Gothic FB Wide.
   Body: Suisse Intl. Headings lean sentence-case / lowercase,
   often closed with a trailing full stop ("about us.").
   ============================================================ */

:root {
  /* --- Families --- */
  --font-display: "Titling Gothic FB", "Helvetica Neue", Arial, sans-serif;
  --font-display-wide: "Titling Gothic FB Wide", "Titling Gothic FB", "Helvetica Neue", sans-serif;
  --font-display-ext: "Titling Gothic FB Ext", "Titling Gothic FB", "Helvetica Neue", sans-serif;
  --font-body: "Suisse Intl", "Helvetica Neue", Arial, sans-serif;
  --font-numeral: "Titling Gothic FB Wide", "Titling Gothic FB", sans-serif;

  /* --- Weights --- */
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;

  /* --- Type scale (px on a 1.0rem = 16px base) --- */
  --text-3xs: 0.6875rem;   /* 11 — micro labels, page numbers */
  --text-2xs: 0.75rem;     /* 12 — meta, captions */
  --text-xs: 0.8125rem;    /* 13 — small UI */
  --text-sm: 0.9375rem;    /* 15 — secondary body */
  --text-base: 1.0625rem;  /* 17 — body */
  --text-md: 1.25rem;      /* 20 — lead / large body */
  --text-lg: 1.625rem;     /* 26 — H4 / subhead */
  --text-xl: 2.25rem;      /* 36 — H3 */
  --text-2xl: 3.25rem;     /* 52 — H2 */
  --text-3xl: 4.5rem;      /* 72 — H1 */
  --text-4xl: 6.5rem;      /* 104 — display */
  --text-numeral: 12rem;   /* 192 — oversized section numerals */

  /* --- Line heights --- */
  --leading-none: 1;
  --leading-tight: 1.08;   /* display headlines */
  --leading-snug: 1.22;    /* subheads */
  --leading-body: 1.55;    /* body copy, comfortable */
  --leading-loose: 1.7;    /* multi-column body */

  /* --- Letter-spacing --- */
  --tracking-tight: -0.02em;   /* large display */
  --tracking-normal: 0;
  --tracking-wide: 0.04em;     /* labels */
  --tracking-caps: 0.14em;     /* all-caps eyebrows */

  /* ---------- Semantic roles ---------- */
  --type-display: var(--weight-regular) var(--text-4xl)/var(--leading-tight) var(--font-display-wide);
  --type-h1: var(--weight-regular) var(--text-3xl)/var(--leading-tight) var(--font-display);
  --type-h2: var(--weight-regular) var(--text-2xl)/var(--leading-tight) var(--font-display);
  --type-h3: var(--weight-medium) var(--text-xl)/var(--leading-snug) var(--font-display);
  --type-h4: var(--weight-medium) var(--text-lg)/var(--leading-snug) var(--font-display);
  --type-lead: var(--weight-regular) var(--text-md)/var(--leading-body) var(--font-body);
  --type-body: var(--weight-regular) var(--text-base)/var(--leading-body) var(--font-body);
  --type-small: var(--weight-regular) var(--text-sm)/var(--leading-body) var(--font-body);
  --type-caption: var(--weight-regular) var(--text-2xs)/var(--leading-snug) var(--font-body);
  --type-eyebrow: var(--weight-medium) var(--text-2xs)/var(--leading-none) var(--font-display);
}

/* ============================================================
   MatterMake — Spacing, layout, line & shadow
   The identity is architectural: generous margins, content
   pushed toward the page edges, a measured column grid, and
   negative space treated as material. Corners are essentially
   square. Lines do the work that shadows do elsewhere.
   ============================================================ */

:root {
  /* --- Spacing scale (4px base) --- */
  --space-0: 0;
  --space-1: 0.25rem;   /* 4 */
  --space-2: 0.5rem;    /* 8 */
  --space-3: 0.75rem;   /* 12 */
  --space-4: 1rem;      /* 16 */
  --space-5: 1.5rem;    /* 24 */
  --space-6: 2rem;      /* 32 */
  --space-7: 3rem;      /* 48 */
  --space-8: 4rem;      /* 64 */
  --space-9: 6rem;      /* 96 */
  --space-10: 8rem;     /* 128 */

  /* --- Layout --- */
  --measure: 64ch;             /* ideal body line length */
  --page-margin: 6rem;         /* generous outer margin */
  --page-margin-sm: 1.5rem;
  --grid-columns: 12; /* @kind other */
  --grid-gutter: 1.5rem;
  --container-max: 1440px;

  /* --- Radii (near-square; the brand resists roundness) --- */
  --radius-none: 0;
  --radius-sm: 2px;
  --radius-md: 3px;        /* default for inputs / small controls */
  --radius-pill: 999px;    /* reserved for tags / avatars only */

  /* --- Border / line --- */
  --line: 1px;
  --line-bold: 2px;
  --line-rule: 1px solid var(--ink);
  --line-soft: 1px solid var(--grey-300);

  /* --- Shadow: used sparingly. Lines first, elevation last. --- */
  --shadow-none: none;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);

  /* --- Motion: quiet, precise. No bounce. --- */
  --ease-standard: cubic-bezier(0.2, 0, 0.1, 1); /* @kind other */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); /* @kind other */
  --dur-fast: 120ms; /* @kind other */
  --dur-base: 200ms; /* @kind other */
  --dur-slow: 360ms; /* @kind other */

  /* --- Z layers --- */
  --z-base: 0; /* @kind other */
  --z-sticky: 100; /* @kind other */
  --z-overlay: 800; /* @kind other */
  --z-modal: 900; /* @kind other */
  --z-toast: 1000; /* @kind other */
}

/* ============================================================
   MatterMake — Base
   A light, opinionated reset that establishes the black-on-white
   ground, body type and heading rhythm. Consumers get this for
   free by linking styles.css.
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font: var(--type-body);
  color: var(--text-primary);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  text-wrap: balance;
}

h1 { font: var(--type-h1); letter-spacing: var(--tracking-tight); }
h2 { font: var(--type-h2); letter-spacing: var(--tracking-tight); }
h3 { font: var(--type-h3); }
h4 { font: var(--type-h4); }

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: color var(--dur-fast) var(--ease-standard);
}
a:hover { color: var(--accent); }

strong, b { font-weight: var(--weight-medium); }

hr {
  border: none;
  border-top: var(--line-rule);
  margin: var(--space-6) 0;
}

::selection {
  background: var(--rust);
  color: var(--paper);
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

img { max-width: 100%; display: block; }

/* ---------- A few brand utilities ---------- */

/* The signature eyebrow: small caps display label, wide tracking */
.mm-eyebrow {
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* Oversized section numeral — the studio's signature device */
.mm-numeral {
  font-family: var(--font-numeral);
  font-weight: var(--weight-regular);
  font-size: var(--text-numeral);
  line-height: var(--leading-none);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
}

/* Full-bleed rust field (section dividers, covers) */
.mm-field-rust {
  background: var(--rust);
  color: var(--paper);
}
.mm-field-ink {
  background: var(--ink);
  color: var(--paper);
}
/* ============================================================================
   runtime.css: every stylesheet rule the legacy page carried apart from the
   design-system token files.

   Sources:
     - legacy/support.js (the design-tool runtime that compiled <x-dc> to React):
       BASE_CSS, FULL_PAGE_CSS and the pseudo-class sheet built from style-hover.
     - legacy/index.html: the <helmet>\3c style> block (lines 33-39) and the
       narrow-screen notice \3c style> in <body> (lines 620-635).

   Mount mapping: the legacy runtime replaced <x-dc> with <div id="dc-root"> and
   rendered one <div class="sc-host" data-sc-name="Root"> inside it, which held
   the whole template. The name comes from the URL path: "Root" at /, "index"
   at /index.html. No CSS reads it. The rebuild mounts React into <div id="root">, and the App
   root renders <div className="sc-host"> (see docs/rebuild/template-to-jsx.md
   §1). So "#dc-root" becomes "#root" below, and ".sc-host" stays the same.

   IMPORT ORDER: import this file AFTER the five token files (fonts, colors,
   typography, spacing, base). In legacy the helmet \3c style> came after the
   design-system <link>s, so "a { color:#000 }" and the html/body background
   override tokens/base.css. The rules from support.js came before the tokens in
   legacy. None of them conflict with a token rule, so placing them here gives
   the same cascade. Measured in legacy (headless Chrome, 13 Oct 2026), <head>
   held these stylesheets, in this order:
     1 \3c style> BASE_CSS (prepended, so it sits before the static <meta>, <title>,
       icon <link> and the three <script>s of index.html 4-21)
     2 \3c style> x-dc{display:none!important}     3 \3c style> .scp0:hover {...}
     4 \3c style> FULL_PAGE_CSS
     5-9 <link> tokens/fonts, colors, typography, spacing, base
     10 <link> styles.css (only @imports 5-9 again)   11 <script> _ds_bundle.js
     12 \3c style> helmet block (index.html 33-39)
   and <body>, after the template and the narrow notice's markup, held
     13 \3c style> #mtg-narrow (index.html 620-635), followed only by its <script>.
   ========================================================================== */


/* ---------------------------------------------------------------------------
   1. BASE_CSS (support.js 86-131): only the @media print block survives.
   The screen rules in BASE_CSS style runtime-only states the rebuild never
   produces, so they are left out:
     .sc-placeholder, .sc-placeholder-error         loading placeholder for an x-import
     @keyframes sc-shine, html.sc-dc-streaming ...  shimmer while the design tool streamed a template
     .sc-interp.sc-missing / .sc-unresolved         holes in {{ }} while streaming or in the editor
     .sc-host.sc-has-error, .sc-logic-error         the runtime's error-boundary overlay
   (The plain .sc-interp class itself has NO style. The spans the rebuild
   renders for {{ }} interpolations carry that class only so the DOM matches.)
   ------------------------------------------------------------------------- */
@media print {
  @page { margin: 0.5cm; }
  figure, table { break-inside: avoid; }
  /* Comes before the full-page rule in §3 on purpose. Both selectors have the
     same specificity and the later one wins, so in print #root and .sc-host stay
     at height:100%. Legacy behaves the same way (checked with print emulation:
     #dc-root computed height 900px). */
  #root, #root > .sc-host { height: auto; }
  *, *::before, *::after {
    print-color-adjust: exact; -webkit-print-color-adjust: exact;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    animation-delay: -99s !important; animation-duration: .001s !important;
    animation-iteration-count: 1 !important; animation-fill-mode: both !important;
    animation-play-state: running !important; transition-duration: 0s !important;
  }
}


/* ---------------------------------------------------------------------------
   2. Pseudo-class sheet (support.js createPseudoSheet 1567-1589).
   The template's only style-* attribute is style-hover on the start-screen
   preset buttons (index.html 332). The runtime turned it into the class "scp0"
   (base-36 counter, first and only entry), added that class to the button, and
   inserted this rule after importantify() appended !important to every
   declaration. The rebuild must put className="scp0" on those buttons.
   ------------------------------------------------------------------------- */
.scp0:hover { border: 1px solid var(--ink) !important; }


/* ---------------------------------------------------------------------------
   3. FULL_PAGE_CSS (support.js 132). boot() injects it because the page's
   data-props declare no $preview.
   ------------------------------------------------------------------------- */
html, body { height: 100%; margin: 0; }
#root, #root > .sc-host { height: 100%; }


/* ---------------------------------------------------------------------------
   Omitted runtime CSS (listed for completeness):
     x-dc{display:none!important}   (support.js hideRawTemplate) - there is no <x-dc>.
     ATOMIC_CSS (.fx, .col, .gap8, ...)  only injected for <helmet data-dc-atomics>, which this page does not use.
     [data-dc-canvas] canvas background  only for <meta name="design_doc_mode" content="canvas">, also unused.
   Nothing else adds stylesheet rules: _ds_bundle.js (Button, Switch, Tabs) and
   the mtg-*.js modules never create a \3c style> or call insertRule. They only
   set inline styles (the DS components' style props, and the engine's canvas
   display/width/height), which belong to those ports, not to this file.
   ------------------------------------------------------------------------- */


/* ---------------------------------------------------------------------------
   4. The app's own rules: legacy/index.html <helmet>\3c style> (lines 33-39),
   verbatim. In legacy these came after the token <link>s and so override
   tokens/base.css (body background, a colour).
   ------------------------------------------------------------------------- */
html, body { margin: 0; height: 100%; overflow: hidden; background: #fff; }
a { color: #000; } a:hover { color: #e45c44; }
select, input[type=number] { font: inherit; }
@media (max-width: 1239px) { [data-hide-narrow] { display: none !important; } }
@media print { [data-print-hide] { display: none !important; } [data-print-page] { position: static !important; overflow: visible !important; height: auto !important; } }


/* ---------------------------------------------------------------------------
   5. Narrow-screen notice: the \3c style> element in <body> after the template,
   legacy/index.html 620-635, verbatim. It came last in the legacy cascade.
   Its markup (#mtg-narrow, index.html 609-619) and dismiss script (636-645)
   sit outside <x-dc>, so they belong in the rebuild's index.html or App, not
   in the template translation.
   ------------------------------------------------------------------------- */
#mtg-narrow { display: none; }
@media (max-width: 899px) {
  #mtg-narrow { display: flex; position: fixed; inset: 0; z-index: 9999; background: #fff; align-items: center; justify-content: center; padding: 24px 16px; overflow: auto; font-family: "Suisse Intl", system-ui, sans-serif; color: #000; }
  #mtg-narrow.mtg-dismissed { display: none; }
}
.mtg-narrow-card { max-width: 420px; border-top: 3px solid #e45c44; padding-top: 18px; }
.mtg-narrow-eyebrow { font-family: "Titling Gothic FB", system-ui, sans-serif; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 12px; }
.mtg-narrow-card h2 { font-family: "Titling Gothic FB", system-ui, sans-serif; font-weight: 500; font-size: 32px; letter-spacing: -0.01em; margin: 0 0 12px; }
.mtg-narrow-card p { font-size: 15px; line-height: 1.5; margin: 0 0 20px; }
.mtg-narrow-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
#mtg-narrow-go { height: 40px; padding: 0 18px; border: 0; border-radius: 3px; background: #e45c44; color: #fff; font: 500 14px "Titling Gothic FB", system-ui, sans-serif; cursor: pointer; }
#mtg-narrow-go:hover { background: #d44e38; }
.mtg-narrow-actions a { font: 14px "Titling Gothic FB", system-ui, sans-serif; color: #000; }
@media print { #mtg-narrow { display: none !important; } }
