/* ==========================================================================
   DULA DESIGN SYSTEM — "An Atlas That Becomes a Workspace"

   The STRUCTURE is inherited, not reinvented: the token names, the serif/sans pairing and
   the density scale are web/dula/dula.css's. The VALUES were reset to the approved
   direction -- white, sage, deep forest green -- in the block immediately below this one,
   which is the single place the palette is decided.

   What is new is a DENSITY SCALE. The atlas and the workspace want opposite things:
   one is a page you read, the other is an instrument you work in. Rather than two
   visual languages, there is one language with three densities — the same tokens,
   different spacing, type size and illustration budget.

       .d-explore   editorial   generous leading, serif display, illustration welcome
       .d-model     analytical  tighter, mono for figures, illustration only where it
                                carries information (a map, a chain, a sparkline)
       .d-develop   operational tightest, tabular numerals, NO decorative illustration

   That is the whole concept: the surface gets quieter and denser as the participant
   moves from understanding a place to doing work in it.
   ========================================================================== */

/* ==========================================================================
   THE PALETTE, RESET TO WHITE AND FOREST GREEN.

   The identity used to be warm paper (#faf6f0) and terracotta. The approved direction is
   white backgrounds, pastel sage accents, deep forest-green text and buttons, and
   terracotta used sparingly. That is a change of VALUES, not of structure: every token
   name below is the one the existing stylesheets already reference, so redefining the
   values here restyles the Atlas and the workspace together without touching a single
   renderer, and without touching web/ -- the frozen public release -- at all.

   --clay is the load-bearing accent in both existing sheets: the active nav item, the
   primary button, every figure, every eyebrow. It is therefore now DEEP FOREST GREEN,
   not terracotta. Terracotta moves to --terra and is spent deliberately, in a handful of
   places, which is the only way "sparingly" can be enforced rather than hoped for.
   ========================================================================== */
:root{
  /* ---- surfaces: white, with sage-tinted planes rather than beige ---- */
  --paper:#ffffff; --paper-2:#f6f9f5; --paper-3:#eaf0e8;
  --ink:#17271d; --ink-2:#48584d; --ink-3:#7c8c81;
  --line:#e4e9e3; --line-2:#ccd6cb;

  /* ---- THE PALETTE. These name colours. Nothing in the product should reference them
         directly; they exist so the semantic tokens below have something to be. ---- */
  --forest:#1f3b2c; --forest-2:#2d5340; --forest-ink:#17271d;
  --sage:#8fa98a; --sage-soft:#dfe8dc; --sage-tint:#f2f6f0;
  --terra:#bd6239; --terra-soft:#f1ded5;

  /* ---- THE SEMANTIC LAYER. These name ROLES, and they are what new code references.
         A role can be repointed at a different colour without every rule that used it
         having to be read to find out whether it meant "the accent" or "that orange". ---- */
  --accent:var(--forest);            /* primary action, emphasis, active state */
  --accent-2:var(--forest-2);        /* its hover */
  --accent-soft:var(--sage-soft);    /* a filled companion surface */
  --accent-tint:var(--sage-tint);    /* its faintest wash */
  --accent-on:#ffffff;               /* text ON the accent */
  --accent-rule:var(--sage);         /* a hairline that belongs to the accent family */
  --caution:var(--terra);            /* sparing: errors, and the one editorial mark */
  --caution-soft:var(--terra-soft);

  /* ---- LEGACY ALIASES, AND WHY THEY SURVIVE.
     web/dula/dula.css is the approved public release and is not edited here. It
     references --clay 175 times for what this system now calls --accent: the active
     nav item, the primary button, every figure, every eyebrow. Deleting the name would
     unstyle the Atlas; leaving it pointing at a colour whose name no longer describes it
     would be worse, because the next person to read `var(--clay)` would reasonably expect
     clay. So it is declared, here and only here, as an ALIAS for a role -- not as a
     colour with a misleading name. New code uses --accent. ---- */
  --clay:var(--accent); --clay-soft:var(--accent-soft);

  /* ---- kept because evidence semantics depend on them staying distinguishable ---- */
  --water:#3d7a8c; --water-soft:#dbeaee;
  --sand:#d9c39a; --stone:#8a8178; --warn:#8a6a22;
  --serif:"Iowan Old Style","Palatino Linotype",Palatino,"Hoefler Text",Georgia,serif;
  --sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,system-ui,sans-serif;
  --mono:ui-monospace,SFMono-Regular,Menlo,monospace;

  /* ---- working surfaces. White is now the page, so a plane is a faint sage tint. ---- */
  --surface:#ffffff; --surface-2:#f8faf7; --surface-sunk:#eef3ec;

  /* ---- EVIDENCE: TWO INDEPENDENT DIMENSIONS, NOT ONE ROW OF CHIPS.
     The first draft put measured / proxy / not measured / unreviewed / modelled in one
     vocabulary, which reads as five mutually exclusive states. They are not. A measured
     observation CAN be unreviewed; a proxy CAN be reviewed; a modelled output can rest on
     provisional observations. The data says so -- the live model holds OBSERVED+provisional
     and PROXIED+reviewed side by side -- and the backend has always kept them apart
     (dp_plan.BASIS vs dp_promote.APPROVAL_STATE). The design collapsed them; the model
     never did.

       KIND    what it is          observation · proxy · assumption · modelled · absence
       TRUST   how far it is stood behind   reviewed · provisional · unverified

     Rendered as two separate marks, and NEVER BY COLOUR ALONE: every state carries a word,
     and kind additionally carries a leading glyph, so the distinction survives greyscale,
     colour-blindness and a printed page.

     THE HUES ARE UNCHANGED. Observation stays green, proxy amber, assumption teal, modelled
     violet, absence grey. Only the tinted backgrounds move off cream, because the page they
     sit on is now white. Changing a hue here would change what a mark MEANS to anyone who
     has learned to read them, which is not a visual decision. ---- */
  --ev-observation:#44583a; --ev-observation-bg:#eef3e9;
  --ev-proxy:#9c6f1c;       --ev-proxy-bg:#fbf3e2;
  --ev-absence:#7d8a80;     --ev-absence-bg:#f1f3f0;
  --ev-assumption:#35707f;  --ev-assumption-bg:#e7f1f3;
  --ev-modelled:#5551a0;    --ev-modelled-bg:#eceaf6;
  --trust-reviewed:#44583a; --trust-provisional:#a2502b; --trust-provisional-bg:#f7e8e0;

  /* kept so the existing prototypes keep rendering while they are migrated */
  --ev-measured:#44583a; --ev-measured-bg:#eef3e9;
  --ev-absent:#7d8a80;   --ev-absent-bg:#f1f3f0;
  --ev-unreviewed:#a2502b;--ev-unreviewed-bg:#f7e8e0;

  /* ---- spacing: a 4px base, so density changes are arithmetic rather than taste ---- */
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:24px; --s6:32px; --s7:48px; --s8:64px;
  --radius:8px; --radius-s:4px;
  /* MINIMAL SHADOWS. Thin precise borders carry separation now; a shadow only lifts
     something the participant is actively holding. */
  --shadow:0 1px 1px rgba(23,39,29,.03);
  --shadow-lift:0 1px 2px rgba(23,39,29,.05),0 6px 18px rgba(23,39,29,.06);

  /* ---- type scale ---- */
  --t-display:46px; --t-h1:34px; --t-h2:23px; --t-h3:17px;
  --t-body:15px; --t-small:13px; --t-micro:11px; --t-label:10px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{background:var(--paper);color:var(--ink);font-family:var(--sans);font-size:var(--t-body);
  line-height:1.55;-webkit-font-smoothing:antialiased}

/* ---------------------------------------------------------------- density */
.d-explore{--pad:var(--s7); --gap:var(--s5); --lead:1.6}
.d-model{--pad:var(--s5); --gap:var(--s4); --lead:1.5}
.d-develop{--pad:var(--s4); --gap:var(--s3); --lead:1.45}

/* numbers are read in columns and compared; they align or they are harder to compare */
.num,.d-model .fig,.d-develop .fig,table td.n,table th.n{
  font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1}

/* ---------------------------------------------------------------- the spine
   One navigation element across all three environments. It is how a participant knows
   the atlas and the workspace are the same product rather than two sites. */
.spine{position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:var(--s4);
  padding:0 var(--s5);height:52px;background:rgba(255,255,255,.93);
  backdrop-filter:saturate(140%) blur(8px);border-bottom:1px solid var(--line)}
.spine-mark{font-family:var(--serif);font-size:15px;letter-spacing:.16em;color:var(--clay);
  font-weight:600;text-decoration:none}
.spine-alpha{font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:var(--ev-unreviewed);
  background:var(--ev-unreviewed-bg);border:1px solid #e3c6b8;border-radius:999px;padding:1px 6px;
  cursor:help}
.spine-nav{display:flex;gap:2px;margin-left:var(--s3)}
.spine-nav a{font-size:var(--t-small);color:var(--ink-2);text-decoration:none;padding:6px 11px;
  border-radius:var(--radius-s);white-space:nowrap}
.spine-nav a:hover{background:var(--paper-2);color:var(--ink)}
.spine-nav a.on{background:var(--clay);color:#fff}
.spine-sp{flex:1}
.spine-ctx{font-size:var(--t-micro);color:var(--ink-3);display:flex;gap:var(--s2);align-items:center}
.spine-ctx b{color:var(--ink-2);font-weight:600}

/* ---------------------------------------------------------------- evidence marks
   TWO components, because there are two questions. `.kind` answers "what is this?" and
   always leads with a glyph; `.trust` answers "how far has anyone stood behind it?" and
   always carries a word. They sit next to each other and compose freely:

       <span class="kind k-observation">◆ observation</span>
       <span class="trust t-provisional">unreviewed</span>

   Colour is the LAST carrier of meaning here, never the only one. */
.ev{display:inline-flex;align-items:center;gap:4px;font-size:9.5px;letter-spacing:.08em;
  text-transform:uppercase;padding:2px 7px;border-radius:999px;border:1px solid transparent;
  white-space:nowrap;font-weight:600}
.ev-measured{background:var(--ev-measured-bg);color:var(--ev-measured);border-color:#c8d4ba}
.ev-proxy{background:var(--ev-proxy-bg);color:var(--ev-proxy);border-color:#e3cd9c}
.ev-absent{background:var(--ev-absent-bg);color:var(--ev-absent);border-color:var(--line-2)}
.ev-unreviewed{background:var(--ev-unreviewed-bg);color:var(--ev-unreviewed);border-color:#e3c6b8}
.ev-assumption{background:var(--ev-assumption-bg);color:var(--ev-assumption);border-color:#b7d3da}

/* --- dimension 1: KIND. Glyph + word. The glyph is the redundant encoding. --- */
.kind{display:inline-flex;align-items:center;gap:5px;font-size:9.5px;letter-spacing:.08em;
  text-transform:uppercase;padding:2px 8px;border-radius:999px;border:1px solid transparent;
  white-space:nowrap;font-weight:600}
.kind:before{font-size:9px;line-height:1}
.k-observation{background:var(--ev-observation-bg);color:var(--ev-observation);border-color:#c5d0b6}
.k-observation:before{content:"\25C6"}            /* ◆ solid — measured directly */
.k-proxy{background:var(--ev-proxy-bg);color:var(--ev-proxy);border-color:#e3cd9c}
.k-proxy:before{content:"\25C7"}                  /* ◇ hollow — a stand-in */
.k-absence{background:var(--ev-absence-bg);color:var(--ev-absence);border-color:var(--line-2)}
.k-absence:before{content:"\2014"}                /* — nothing is there */
.k-assumption{background:var(--ev-assumption-bg);color:var(--ev-assumption);border-color:#b7d3da}
.k-assumption:before{content:"\25B3"}             /* △ chosen, not found */
.k-modelled{background:var(--ev-modelled-bg);color:var(--ev-modelled);border-color:#c6c2e4}
.k-modelled:before{content:"\0192"}               /* ƒ computed from inputs */

/* --- dimension 2: TRUST. A word, always, and an underline so it survives greyscale. --- */
.trust{display:inline-flex;align-items:center;font-size:9.5px;letter-spacing:.08em;
  text-transform:uppercase;padding:2px 7px;border-radius:999px;white-space:nowrap;font-weight:600;
  border:1px solid transparent}
.t-reviewed{color:var(--trust-reviewed);background:transparent;border-color:#c5d0b6}
.t-provisional{color:var(--trust-provisional);background:var(--trust-provisional-bg);
  border-color:#e3c6b8;text-decoration:underline;text-decoration-style:wavy;
  text-underline-offset:2px;text-decoration-thickness:1px}
.t-unverified{color:var(--ink-2);background:var(--paper-2);border-color:var(--line-2);
  text-decoration:underline;text-decoration-style:dotted;text-underline-offset:2px}

/* the pair, when both are shown together */
.evpair{display:inline-flex;gap:4px;align-items:center;flex-wrap:wrap}

/* ---------------------------------------------------------------- primitives */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  padding:var(--s4);box-shadow:var(--shadow)}
.card-q{background:var(--surface-2);border:1px solid var(--line);border-radius:var(--radius);
  padding:var(--s4)}
.eyebrow{font-size:var(--t-label);letter-spacing:.17em;text-transform:uppercase;color:var(--clay);
  font-weight:700;margin:0 0 var(--s3)}
.lede{font-family:var(--serif);font-size:20px;line-height:1.5;color:var(--ink-2);max-width:46rem}
h1,h2,h3{margin:0}
.h-display{font-family:var(--serif);font-size:var(--t-display);line-height:1.05;font-weight:600;
  letter-spacing:-.01em}
.h1{font-family:var(--serif);font-size:var(--t-h1);line-height:1.15;font-weight:600}
.h2{font-family:var(--serif);font-size:var(--t-h2);line-height:1.25;font-weight:600}
.h3{font-size:var(--t-h3);font-weight:600}
.muted{color:var(--ink-2)}
.faint{color:var(--ink-3);font-size:var(--t-small)}
.micro{font-size:var(--t-micro);color:var(--ink-3)}
.wrap{max-width:1360px;margin:0 auto;padding:0 var(--s5)}
.wrap-read{max-width:62rem;margin:0 auto;padding:0 var(--s5)}

.btn{font:inherit;font-size:var(--t-small);border:1px solid var(--clay);background:var(--clay);
  color:#fff;border-radius:var(--radius-s);padding:7px 14px;cursor:pointer}
.btn:hover{filter:brightness(1.06)}
.btn-ghost{background:transparent;color:var(--clay)}
.btn-ghost:hover{background:var(--clay);color:#fff;filter:none}
.btn-quiet{border-color:var(--line-2);background:var(--surface);color:var(--ink-2)}
.btn-quiet:hover{border-color:var(--clay);color:var(--clay);background:var(--surface);filter:none}

/* a figure, at three densities */
.fig{font-family:var(--serif);color:var(--clay);line-height:1}
.d-explore .fig{font-size:30px}
.d-model .fig{font-size:24px}
.d-develop .fig{font-size:19px}
.fig-unit{font-family:var(--sans);font-size:var(--t-micro);color:var(--ink-3);letter-spacing:.04em}

/* ---------------------------------------------------------------- responsive */
@media(max-width:1100px){
  .wrap{padding:0 var(--s4)}
  :root{--t-display:36px; --t-h1:28px}
}
@media(max-width:720px){
  .spine{gap:var(--s2);padding:0 var(--s3);height:auto;flex-wrap:wrap;padding-bottom:var(--s2)}
  .spine-nav{margin-left:0;width:100%;overflow-x:auto}
  :root{--t-display:30px}
}

/* ==========================================================================
   HOMEPAGE DENSITY AND THE CTA PAIR.

   .d-home is a fourth density, quieter than .d-explore: the homepage is read once,
   so it gets the most whitespace and the largest display type, and it is the only
   environment where a decorative illustration is allowed at all.
   ========================================================================== */
.d-home{--pad:var(--s8); --gap:var(--s6); --lead:1.65}

/* THE CTA PAIR, EQUALLY DISCOVERABLE.
   Explore and Develop are two doors into the same product, not a primary action and a
   fallback. They are therefore the same size, the same weight and the same shape, and
   differ only in fill: forest for one, its pale companion for the other. A ghost button
   or a text link beside a solid one would rank them, and nothing about the product says
   understanding a place outranks developing in it. */
.btn-lg{font-size:var(--t-body);padding:12px 22px;border-radius:var(--radius-s);
  letter-spacing:.01em;font-weight:500}
.btn-sage{background:var(--accent-soft);border-color:var(--accent-soft);color:var(--accent)}
.btn-sage:hover{background:#d3e0cf;border-color:#d3e0cf;filter:none}

/* Terracotta is spent here and in a small number of marked places, never as a surface. */
.accent-terra{color:var(--caution)}
.rule-terra{border:0;border-top:1px solid var(--caution);width:34px;margin:0 0 var(--s4)}
