/**
 * Jacarandá — a white-label skin. The client's identity on SazAI's elements. (data-skin="jacaranda")
 *
 * THE NAME. The jacarandá turns a whole avenue one colour for three weeks a year and is bare
 * the rest of it. That is this identity: a near-monochrome grid where a single saturated
 * gesture appears on the one thing you are meant to press, and nowhere else.
 *
 * 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. So this file re-lays the
 * page: the rail becomes a slim near-black chrome bar, the hero goes to a very large display
 * head on white, the panels become a hard grid of square cells, and the footer becomes a dark
 * plane. Nothing is removed.
 *
 * WHERE THE VALUES COME FROM. The client's public brand book, which is open and unusually
 * complete, cross-read against computed styles on their home and one interior page
 * (2026-09-11). 96.6% of home elements and 97.8% of interior elements compute border-radius 0,
 * so the square corner is structural, not stylistic. The accent rides on exactly one gesture,
 * a lime gradient on primary actions; a second green paints one fill on the entire page.
 * Where the book and the served page disagree the book wins: the book specifies the gradient
 * at 40 degrees, the site paints it at 90, and 40 is what ships here.
 *
 * TYPE. One face carries everything from body to a 120px display head, and the hierarchy comes
 * from scale and weight rather than from a second family. The book names three faces and all
 * three are freely licensed, so the stack can name the real one. Nothing is downloaded: it
 * renders where installed and falls back otherwise, and the chain continues into Arabic,
 * Hebrew and CJK, because this product serves eleven locales.
 *
 * CONTRAST. The lime gradient is an action surface, never a text ground: its lightest stop
 * against white measures under 1.5:1, so labels on it are always near-black. The accent is
 * never ink on white.
 *
 * NO MARKS. No logo, no wordmark, no company name anywhere, comments included: a skin sheet is
 * served verbatim, so a name in a comment is a name in the served bytes. The client's book is
 * explicit that their mark may be used only under an existing partnership, which is one more
 * reason the identity here is carried by shape, scale and colour alone.
 *
 * DIRECTION. Every inline offset is logical, so the skin flips with the document in ar and he.
 */

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

  /* ========================= BRAND VALUES ========================= */
  --jac-ink:#121212;          /* the ink, and the label on every accent surface */
  --jac-chrome:#0f1014;       /* the bar and the footer plane */
  --jac-paper:#ffffff;
  --jac-lime-a:#d9e021;       /* the gradient's first stop */
  --jac-lime-b:#8cc63f;       /* the gradient's second stop */
  --jac-green:#bfd732;        /* the one fill on the page */
  --jac-grey:#5a5a5e;         /* secondary text, 6.4:1 on paper */
  --jac-hair:#e3e3e6;
  --jac-action:linear-gradient(40deg, var(--jac-lime-a), var(--jac-lime-b));

  /* geometry: a slim bar, a very wide measure, hard edges */
  --jac-bar:4.5rem;
  --jac-measure:82rem;
  --jac-gutter:clamp(1.25rem, 6vw, 5rem);
  --jac-cell:1px;             /* the grid is drawn with hairlines, not with gaps */

  --jac-sans:"Heebo", "Roboto", "Open Sans", "Helvetica Neue", Arial,
             "Noto Sans Arabic", "Noto Sans Hebrew",
             "Hiragino Sans", "Noto Sans JP", "Noto Sans KR", "Noto Sans SC",
             system-ui, sans-serif;
  --jac-w-light:300; --jac-w-reg:400; --jac-w-med:500; --jac-w-bold:700; --jac-w-black:900;

  color-scheme: light dark;

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

  body { background:var(--jac-paper); color:var(--jac-ink); font-family:var(--jac-sans);
         font-weight:var(--jac-w-reg); }

  /* The host lays #quartz-body out in columns and the rail gets a 320px track, so a
     `width:100%` on the rail resolves against 320 and the bar is not a bar. This rule was
     in my first version and I deleted it when I rewrote the block. Measured after: 320px. */
  .page > #quartz-body { display:block !important; max-inline-size:none !important;
                         padding-block-start:0 !important; }
  .page > #quartz-body > * { max-inline-size: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(--jac-gutter) !important; padding-block:0 !important;
    background:var(--jac-chrome) !important; border:0 !important; }

  .sidebar.left > .page-title { grid-area:title; margin:0 !important;
    block-size:var(--jac-bar); display:flex; align-items:center; }
  .sidebar.left > .sazai-nav-menu-mount { grid-area:nav; display:flex; align-items:center;
    block-size:var(--jac-bar); }
  .sidebar.left > .flex-component { grid-area:search; display:flex !important;
    align-items:center; block-size:var(--jac-bar); }
  .sidebar.left > .sazai-rail-chrome { grid-area:chrome; display:flex !important;
    align-items:center; gap:2rem; min-block-size:var(--jac-bar);
    margin-inline:calc(-1 * var(--jac-gutter)) !important; padding-inline:var(--jac-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(--jac-paper); font-weight:var(--jac-w-bold);
    font-size:1.125rem; letter-spacing:-.01em; 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(--jac-paper); font-weight:var(--jac-w-reg);
                           font-size:.9rem; }
  sz-nav-menu::part(row):hover { color:var(--jac-green); }
  sz-nav-menu::part(box) { background:var(--jac-chrome); border:0; }

  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(--jac-paper); }

  /* ===================== THE DISPLAY HEAD DOES THE WORK ===================== */
  .center > .page-header { background:var(--jac-paper); padding:6rem var(--jac-gutter) 3rem; }
  .center > .page-header h1,
  .center article h1 { font-size:clamp(3rem, 8vw, 7.5rem); line-height:1; letter-spacing:-.032em;
    font-weight:var(--jac-w-black); color:var(--jac-ink); }

  sz-lotus { background:var(--jac-paper) !important; }
  sz-lotus::part(stage) { background:var(--jac-paper); }
  sz-lotus > [slot="title"] { color:var(--jac-ink); font-weight:var(--jac-w-black);
    font-size:clamp(2.25rem, 6vw, 5rem); line-height:1; letter-spacing:-.03em; }

  /* ===================== A HARD GRID DRAWN IN HAIRLINES ===================== */
  .center > article { max-inline-size:var(--jac-measure); padding-inline:var(--jac-gutter); }
  .center article h2 { font-size:2.75rem; font-weight:var(--jac-w-bold); line-height:1.05;
                       letter-spacing:-.022em; }
  .center article h3 { font-size:1.5rem;  font-weight:var(--jac-w-med); line-height:1.2;
                       letter-spacing:-.01em; }
  .center article p  { font-size:1rem; line-height:1.625; font-weight:var(--jac-w-reg); }
  .center article p > strong { font-weight:var(--jac-w-bold); }
  .center > hr { border:0; border-block-start:var(--jac-cell) solid var(--jac-hair); }

  .acts { display:grid; grid-template-columns:repeat(auto-fit, minmax(16rem, 1fr));
          gap:0; border-block-start:var(--jac-cell) solid var(--jac-hair);
          border-inline-start:var(--jac-cell) solid var(--jac-hair); }
  .act { padding:2.25rem 1.75rem; background:var(--jac-paper);
         border-block-end:var(--jac-cell) solid var(--jac-hair);
         border-inline-end:var(--jac-cell) solid var(--jac-hair); }
  .act > b    { display:block; font-size:1.25rem; font-weight:var(--jac-w-bold);
                letter-spacing:-.015em; margin-block-end:.5rem; }
  .act > span { color:var(--jac-grey); font-size:.95rem; }

  /* ===================== THE ONE GESTURE: THE ACTION SURFACE ===================== */
  a, a.internal { color:var(--jac-ink); text-decoration:underline;
                  text-underline-offset:.2em; text-decoration-thickness:1px; }
  a:hover { color:var(--jac-grey); }

  sz-vault-access::part(google), sz-vault-access::part(microsoft) {
    background:var(--jac-action); color:var(--jac-ink); border:0;
    padding:1rem 2rem; font-weight:var(--jac-w-bold); letter-spacing:-.01em; }
  sz-vault-access::part(google):hover, sz-vault-access::part(microsoft):hover {
    background:var(--jac-green); }
  sz-vault-access::part(heading) { font-weight:var(--jac-w-bold); letter-spacing:-.02em; }

  /* ===================== RAIL, FOOTER, PANELS ===================== */
  .page > #quartz-body .sidebar.right { background:var(--jac-paper);
    border-inline-start:var(--jac-cell) solid var(--jac-hair); padding:2rem 1.5rem; }
  .sidebar.right h3 { font-size:.75rem; font-weight:var(--jac-w-bold);
    text-transform:uppercase; letter-spacing:.08em; color:var(--jac-grey); }

  .page > #quartz-body > footer { background:var(--jac-chrome); color:var(--jac-paper);
                                  padding-block:4rem; }
  sz-site-footer::part(heading) { color:var(--jac-green); font-size:.75rem;
    text-transform:uppercase; letter-spacing:.08em; font-weight:var(--jac-w-bold); }
  sz-site-footer::part(row) { color:var(--jac-paper); font-weight:var(--jac-w-reg);
                              text-decoration:none; }
  sz-site-footer::part(row):hover { color:var(--jac-green); }
  sz-site-footer::part(copyright) { color:var(--jac-grey); font-size:.8125rem; }

  sz-side-menu::part(panel) { background:var(--jac-chrome); color:var(--jac-paper); border:0; }
  sz-side-menu::part(pitch) { color:var(--jac-hair); font-weight:var(--jac-w-light);
    border-inline-start:var(--jac-cell) solid rgba(255,255,255,.22); padding-inline-start:1.5rem; }
  sz-side-menu::part(here) { color:var(--jac-green); }
  sz-user-panel::part(panel) { background:var(--jac-chrome); color:var(--jac-paper); }
  sz-user-panel::part(email) { color:var(--jac-hair); }

  sz-library::part(card) { background:var(--jac-paper);
                           border:var(--jac-cell) solid var(--jac-hair); }
  sz-library::part(header) { font-weight:var(--jac-w-bold); letter-spacing:-.015em; }

  .center article pre { background:var(--jac-chrome); color:var(--jac-paper); }
  .center article :not(pre) > code { background:var(--jac-hair); color:var(--jac-ink); }
  .center article table { border-collapse:collapse; }
  .center article th { background:var(--jac-ink); color:var(--jac-paper);
                       font-weight:var(--jac-w-bold); text-align:start; }
  .center article td { border-block-start:var(--jac-cell) solid var(--jac-hair); }
  ::selection { background:var(--jac-green); color:var(--jac-ink); }
}

/* ===================== THE SECOND FACE: THE DARK PLANE ===================== */
:root[data-skin="jacaranda"][data-theme="dark"] {
  body { background:var(--jac-chrome); color:var(--jac-paper); }
  .center > .page-header { background:var(--jac-chrome); }
  .center > .page-header h1, .center article h1, .center article h2, .center article h3,
  sz-lotus > [slot="title"] { color:var(--jac-paper); }
  sz-lotus, sz-lotus::part(stage) { background:var(--jac-chrome) !important; }
  .center article p { color:var(--jac-hair); }
  .act { background:var(--jac-chrome); border-color:rgba(255,255,255,.16); }
  .acts { border-color:rgba(255,255,255,.16); }
  .act > span { color:var(--jac-hair); }
  a, a.internal { color:var(--jac-paper); }
  a:hover { color:var(--jac-green); }
  .page > #quartz-body .sidebar.right { background:var(--jac-chrome);
    border-inline-start-color:rgba(255,255,255,.16); }
  .sidebar.right h3 { color:var(--jac-hair); }
  sz-library::part(card) { background:var(--jac-chrome); border-color:rgba(255,255,255,.16); }
  sz-library::part(header) { color:var(--jac-paper); }
  .center article :not(pre) > code { background:rgba(255,255,255,.1); color:var(--jac-hair); }
  .center article td { border-block-start-color:rgba(255,255,255,.16); }
}
