/**
 * Mangrove — a white-label skin. The client's identity on SazAI's elements. (data-skin="mangrove")
 *
 * THE NAME. A mangrove grows in salt water where nothing else will, and the land other species
 * later live on is land it built. An infrastructure business, named for the plant that is
 * infrastructure.
 *
 * THE RULE (Rames, 2026-09-11): elements and tokens.css are the guardrails; inside them the
 * skin may change whatever it wants, but it must keep every element. This file re-lays the
 * page: the rail becomes a white bar, the hero ends in the client's single curved edge, the
 * emphasis inside a headline changes colour rather than weight, and the footer becomes a deep
 * slate plane over a dark red strip. Nothing is removed.
 *
 * WHERE THE VALUES COME FROM. No public brand book exists anywhere: eight guessed paths return
 * 404, a twenty-file sitemap index carries no brand or press URL, the privacy policy mentions
 * neither mark nor intellectual property, and there is no terms page. The only proprietary
 * assertion published is a registered-trademark glyph in the footer. Absence recorded, not
 * filled. Every value here is a computed style measured on the home and one interior page
 * (2026-09-11).
 *
 * THE SIGNATURE, AND IT IS ONE GESTURE. A headline is grey except for the phrase that carries
 * its meaning, and that phrase is red. Not bolder, not larger: a different colour inside the
 * same sentence. Everything else on the page is restraint, so that one move does all the work.
 *
 * THE CURVE. 87 to 91% of elements compute zero radius, and the exception is not a card corner:
 * it is the hero's own elliptical bottom edge, one wide shallow curve across the full width.
 * That curve is reproduced and nothing else is rounded.
 *
 * TYPE. Two openly licensed faces, so the stack can name them honestly. A semibold in capitals
 * carries the navigation, and a thin weight at large sizes carries the headings and every
 * numeral, which is what gives the pages their wide, quiet voice. Nothing is downloaded, and the
 * chain continues into Arabic, Hebrew and CJK for the five locales a Latin-only stack would
 * leave as tofu.
 *
 * NO MARKS. No logo, no wordmark, no company name anywhere, comments included.
 * DIRECTION. Every inline offset is logical, so the skin flips with the document in ar and he.
 */

:root[data-skin="mangrove"] {

  /* ========================= BRAND VALUES ========================= */
  --man-red:#f20024;          /* the emphasis phrase inside a headline, and nothing else */
  --man-red-fill:#e50022;     /* button fields */
  --man-red-deep:#990017;     /* the sub-navigation strip and the footer rule */
  --man-ink:#212529;
  --man-ink-2:#1a1a1a;
  --man-body:#606d78;
  --man-field:#f2f5f8;        /* the alternating ground */
  --man-footer:#454d54;
  --man-paper:#ffffff;
  --man-hair:#dbe2e8;

  /* geometry: square, except for the one wide curve the hero ends on */
  --man-bar:4.75rem;
  --man-measure:80rem;
  --man-gutter:clamp(1.25rem, 5vw, 4.5rem);
  --man-hero-curve:0 0 70% 70% / 0 0 17% 17%;

  --man-display:"Poppins", "Montserrat", "Helvetica Neue", Arial,
                "Noto Sans Arabic", "Noto Sans Hebrew",
                "Hiragino Sans", "Noto Sans JP", "Noto Sans KR", "Noto Sans SC",
                system-ui, sans-serif;
  --man-nav:"Montserrat", "Helvetica Neue", Arial,
            "Noto Sans Arabic", "Noto Sans Hebrew",
            "Hiragino Sans", "Noto Sans JP", "Noto Sans KR", "Noto Sans SC",
            system-ui, sans-serif;
  --man-w-thin:300; --man-w-reg:400; --man-w-semi:600; --man-w-bold:700;

  color-scheme: light dark;

  *, *::before, *::after { border-radius:0 !important; box-shadow:none !important;
                           letter-spacing:normal !important; }

  body { background:var(--man-paper); color:var(--man-body); font-family:var(--man-display);
         font-weight:var(--man-w-reg); }

  .page > #quartz-body { display:block !important; max-width:none !important;
                         padding-block-start:var(--man-bar) !important; }
  .page > #quartz-body > * { max-width:none !important; }

  /* ===================== THE RAIL BECOMES A BAR, AND IT IS A GRID =====================
     Corrected 2026-09-11 after rendering the first skin on a served page and measuring it.
     My first version made the rail `display:flex` with a fixed `block-size`, and the children
     spilled down the page: `.flex-component` landed at y=354 and the nav mount at y=414 with
     the bar ending at y=84. The cause is one line of the HOST's own CSS: `.sazai-rail-chrome`
     computes `display: contents`, so it is not a box — its descendants are promoted into
     whatever formatting context the rail declares, they bring their own height, and 84px does
     not hold them. The reference skin solved this before me and I had read the file:
     a GRID with named areas, so the chrome gets a row of its OWN below the bar row, every
     child is placed explicitly, and the chrome is given a real `display` so it stops being
     `contents`. No fixed height on the rail: the rows size themselves. */
  .page > #quartz-body .sidebar.left {
    order:0; position:sticky !important; inset-block-start:0; z-index:120;
    inline-size:100% !important; max-inline-size:none !important;
    display:grid !important;
    grid-template-columns:auto 1fr auto;
    grid-template-areas:"title nav search" "chrome chrome chrome";
    column-gap:1.5rem; row-gap:0; align-items:center;
    /* The host gives the rail a height of its own and the grid rows then stretch to fill
       it: measured 842px, two rows of 431 and 411, with nothing inside taller than 120.
       A bar has to say so. */
    block-size:auto !important; margin:0 !important;
    padding-inline:var(--man-gutter) !important; padding-block:0 !important;
    background:var(--man-paper) !important; border-block-end:1px solid var(--man-hair) !important; }

  .sidebar.left > .page-title { grid-area:title; margin:0 !important;
    block-size:var(--man-bar); display:flex; align-items:center; }
  .sidebar.left > .sazai-nav-menu-mount { grid-area:nav; display:flex; align-items:center;
    block-size:var(--man-bar); }
  .sidebar.left > .flex-component { grid-area:search; display:flex !important;
    align-items:center; block-size:var(--man-bar); }
  .sidebar.left > .sazai-rail-chrome { grid-area:chrome; display:flex !important;
    align-items:center; gap:2rem; min-block-size:var(--man-bar);
    margin-inline:calc(-1 * var(--man-gutter)) !important; padding-inline:var(--man-gutter); }
  .sazai-rail-chrome > .sazai-side-menu-mount { flex:1 1 auto; min-inline-size:0; }

  /* ============ THE SIDE MENU LIES DOWN, AND THIS IS THE OTHER HALF OF THE BAR ============
     Measured 2026-09-11: with the grid alone the bar rendered 842px tall. The chrome row got a
     row of its own, correctly, and then the side-menu component kept its own vertical layout
     inside it. A bar is not a bar until the component in it lies down. 48 of the reference
     skin's 139 rules are this conversion, and it is brand-independent: what follows is that
     structure, parameterised by this skin's own tokens. Every part below is one the component
     publishes; nothing reaches into its internals. */
  sz-side-menu::part(menu), sz-side-menu::part(panel), sz-side-menu::part(variable),
  sz-side-menu::part(vault), sz-side-menu::part(pitch) {
    display:flex; flex-direction:row; align-items:center; gap:1.5rem;
    flex:0 1 auto; min-inline-size:0; min-block-size:0; block-size:auto;
    background:transparent; border:0; outline:0; box-shadow:none; padding:0; margin:0; }
  sz-side-menu::part(menu) { gap:2.5rem; }
  sz-side-menu::part(panel) { flex:1 1 auto; }
  sz-side-menu::part(variable) { flex:1 1 auto; }
  sz-side-menu::part(variable)::before { display:none; }
  sz-side-menu::part(lockup) { display:flex; align-items:center; gap:.75rem;
    margin:0; padding:0; flex:0 0 auto; min-inline-size:0; order:2; }
  sz-side-menu::part(mark) { inline-size:1.25rem; block-size:1.25rem; flex:0 0 auto; opacity:.9; }
  sz-side-menu::part(ways) { display:flex; gap:1.5rem; margin:0; font-size:.75rem;
    text-transform:uppercase; letter-spacing:.08em; font-weight:600; }
  /* the two labels are for a screen reader, not for a bar: hidden visually, never removed */
  sz-side-menu::part(controls-label), sz-side-menu::part(vault-controls-label) {
    position:absolute; inline-size:1px; block-size:1px; overflow:hidden;
    clip-path:inset(50%); white-space:nowrap; margin:0; }
  sz-side-menu::part(controls), sz-user-panel::part(toolbar) { border:0; background:transparent; }
  sz-user-panel::part(panel) { display:flex; align-items:center; gap:1rem;
    background:transparent; border:0; padding:0; margin:0; }
  sz-user-panel::part(identity) { gap:.5rem; }
  sz-user-panel::part(welcome), sz-user-panel::part(email) { font-size:.6875rem; }
  sz-user-panel::part(name) { font-size:.8125rem; }

  .sidebar.left > .page-title a { color:var(--man-ink); font-family:var(--man-nav);
    font-weight:var(--man-w-semi); font-size:1.0625rem; text-transform:uppercase;
    text-decoration:none; }

  .sazai-nav-menu-mount > .sazai-nav-content {
    display:flex !important; gap:1.75rem; align-items:center; position:static !important;
    background:transparent !important; border:0 !important; padding:0 !important; }
  sz-nav-menu::part(row) { color:var(--man-ink); font-family:var(--man-nav);
    font-weight:var(--man-w-semi); font-size:.8125rem; text-transform:uppercase; }
  sz-nav-menu::part(row):hover { color:var(--man-red); }
  sz-nav-menu::part(box) { background:var(--man-paper); border:1px solid var(--man-hair); }

  body > .search, .sidebar.left .search { margin-inline-start:auto; }
  .search-button { background:transparent !important; border:0 !important; }
  .search-button p, .search-button svg { color:var(--man-ink); }

  /* ===================== THE HERO ENDS ON A WIDE SHALLOW CURVE ===================== */
  .center > .page-header { background:var(--man-field); padding:5.5rem var(--man-gutter) 4.5rem;
    border-radius:var(--man-hero-curve) !important; }
  .center > .page-header h1, .center article h1 {
    color:var(--man-ink); font-size:clamp(2.25rem, 5.2vw, 3.5rem); line-height:1.125;
    font-weight:var(--man-w-thin); }

  sz-lotus { background:var(--man-field) !important;
             border-radius:var(--man-hero-curve) !important; }
  sz-lotus::part(stage) { background:var(--man-field); }
  sz-lotus > [slot="title"] { color:var(--man-ink); font-weight:var(--man-w-thin);
    font-size:clamp(2rem, 4.6vw, 3.25rem); line-height:1.125; }
  /* the one gesture: the phrase that carries the meaning turns red */
  sz-lotus > [slot="title"] br + * { color:var(--man-red); }

  .center > article { max-inline-size:var(--man-measure); padding-inline:var(--man-gutter); }
  .center article h2 { color:var(--man-ink); font-size:2.25rem; line-height:1.15;
                       font-weight:var(--man-w-thin); }
  .center article h3 { color:var(--man-ink); font-size:1.375rem; line-height:1.25;
                       font-weight:var(--man-w-reg); }
  .center article p  { font-size:1rem; line-height:1.7; color:var(--man-body); }
  .center article p > strong { color:var(--man-red); font-weight:var(--man-w-reg); }
  .center > hr { border:0; border-block-start:2px solid var(--man-red);
                 inline-size:3rem; margin-inline-end:auto; }

  .acts { display:grid; grid-template-columns:repeat(auto-fit, minmax(15rem, 1fr)); gap:1.25rem; }
  .act { background:var(--man-field); padding:2rem 1.75rem; border:0; }
  .act > b    { display:block; color:var(--man-ink); font-size:1.5rem;
                font-weight:var(--man-w-thin); margin-block-end:.5rem; }
  .act > span { color:var(--man-body); font-size:.96rem; }

  a, a.internal { color:var(--man-red); text-decoration:underline;
                  text-underline-offset:.2em; text-decoration-thickness:1px; }
  a:hover { color:var(--man-red-deep); }

  sz-vault-access::part(google), sz-vault-access::part(microsoft) {
    background:var(--man-red-fill); color:var(--man-paper); border:0;
    padding:.9rem 1.75rem; font-family:var(--man-nav); font-weight:var(--man-w-semi);
    text-transform:uppercase; font-size:.8125rem; }
  sz-vault-access::part(google):hover, sz-vault-access::part(microsoft):hover {
    background:var(--man-red-deep); }
  sz-vault-access::part(heading) { color:var(--man-ink); font-weight:var(--man-w-thin); }

  .page > #quartz-body .sidebar.right { background:var(--man-field); padding:2rem 1.5rem; }
  .sidebar.right h3 { color:var(--man-ink); font-family:var(--man-nav); font-size:.8125rem;
                      font-weight:var(--man-w-semi); text-transform:uppercase; }

  .page > #quartz-body > footer { background:var(--man-footer); color:var(--man-paper);
    padding-block:3.5rem; border-block-start:4px solid var(--man-red-deep); }
  sz-site-footer::part(heading) { color:var(--man-paper); font-family:var(--man-nav);
    font-size:.8125rem; font-weight:var(--man-w-semi); text-transform:uppercase; }
  sz-site-footer::part(row) { color:var(--man-hair); font-weight:var(--man-w-reg); }
  sz-site-footer::part(row):hover { color:var(--man-paper); }
  sz-site-footer::part(copyright) { color:var(--man-hair); font-size:.8125rem; }

  sz-side-menu::part(panel) { background:var(--man-ink-2); color:var(--man-paper); border:0; }
  sz-side-menu::part(pitch) { color:var(--man-hair); font-weight:var(--man-w-thin);
    border-inline-start:1px solid rgba(255,255,255,.25); padding-inline-start:1.5rem; }
  sz-side-menu::part(here) { color:var(--man-red); }
  sz-user-panel::part(panel) { background:var(--man-ink-2); color:var(--man-paper); }
  sz-user-panel::part(email) { color:var(--man-hair); }

  sz-library::part(card) { background:var(--man-paper); border:1px solid var(--man-hair); }
  sz-library::part(header) { color:var(--man-ink); font-weight:var(--man-w-reg); }

  .center article pre { background:var(--man-ink-2); color:var(--man-paper); }
  .center article :not(pre) > code { background:var(--man-field); color:var(--man-red-deep); }
  .center article table { border-collapse:collapse; }
  .center article th { background:var(--man-field); color:var(--man-ink);
    font-family:var(--man-nav); font-size:.8125rem; font-weight:var(--man-w-semi);
    text-transform:uppercase; text-align:start; }
  .center article td { border-block-start:1px solid var(--man-hair); }
  ::selection { background:var(--man-red); color:var(--man-paper); }
}

:root[data-skin="mangrove"][data-theme="dark"] {
  body { background:var(--man-ink-2); color:var(--man-hair); }
  .page > #quartz-body .sidebar.left { background:var(--man-ink-2) !important;
    border-block-end-color:rgba(255,255,255,.16) !important; }
  .sidebar.left > .page-title a, sz-nav-menu::part(row) { color:var(--man-paper); }
  .search-button p, .search-button svg { color:var(--man-paper); }
  .center > .page-header { background:var(--man-ink); }
  sz-lotus, sz-lotus::part(stage) { background:var(--man-ink) !important; }
  .center > .page-header h1, .center article h1, .center article h2, .center article h3,
  sz-lotus > [slot="title"] { color:var(--man-paper); }
  .center article p { color:var(--man-hair); }
  .act { background:var(--man-ink); }
  .act > b { color:var(--man-paper); }
  .act > span { color:var(--man-hair); }
  a, a.internal { color:var(--man-paper); }
  a:hover { color:var(--man-red); }
  .page > #quartz-body .sidebar.right { background:var(--man-ink); }
  .sidebar.right h3 { color:var(--man-paper); }
  .page > #quartz-body > footer { background:var(--man-ink); }
  sz-library::part(card) { background:var(--man-ink); border-color:rgba(255,255,255,.18); }
  sz-library::part(header) { color:var(--man-paper); }
  .center article :not(pre) > code { background:var(--man-ink); color:var(--man-hair); }
  .center article th { background:var(--man-ink); color:var(--man-paper); }
  .center article td { border-block-start-color:rgba(255,255,255,.18); }
}
