/* AI Digest — shared design tokens and the card / signal-strip component.
   Linked by the daily editions, the editions index and the landing page, so the
   badge language cannot drift between the three.

   The rule this file exists to enforce: colour on an AI Digest page means
   IMPACT SEVERITY and nothing else. Every other axis carries a glyph, not a
   hue. Theme identity lives in the --t-* tokens and is used only for a section
   dot and the card's top rule. */

:root{
  --bg:#F6F4EF;--surface:#FFFFFF;--surface2:#EFEBE3;--surface-hover:#E6E1D6;
  --text:#1D1B16;--text-2:#4a463c;--muted:#6B665A;--border:#E4DFD3;--border-light:rgba(0,0,0,.10);
  --ai:#6E56CF;--rule:#DAD4C6;
  /* the single semantic scale */
  --k1:#3F7A57;--k2:#6E7C46;--k3:#9A6F0B;--k4:#B2541F;--k5:#A32B23;
  /* theme identity — muted, deliberately outside the severity hues */
  --t-reg:#5B6B86;--t-res:#3F736E;--t-sec:#7A5A6E;--t-cap:#6E56CF;--t-inf:#5F7042;--t-mkt:#8A6A50;
}
[data-theme="dark"]{
  --bg:#191813;--surface:#211F19;--surface2:#2A2821;--surface-hover:#322F27;
  --text:#ECE8DD;--text-2:#C9C3B4;--muted:#A39C8D;--border:#3A372E;--border-light:rgba(255,255,255,.10);
  --ai:#9B85F5;--rule:#3A372E;
  --k1:#6FC491;--k2:#B9C077;--k3:#D9A93C;--k4:#E29060;--k5:#E0776E;
  --t-reg:#8FA3C0;--t-res:#6FB3AC;--t-sec:#B08AA3;--t-cap:#9B85F5;--t-inf:#A3B380;--t-mkt:#C09A78;
}

/* ---------- story card ---------- */
article.card{position:relative;background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:20px 22px 16px;margin:14px 0 0;overflow:hidden}
article.card .bar{position:absolute;top:0;left:0;right:0;height:3px}
article.card .num{position:absolute;top:16px;right:18px;font-family:'Source Serif 4',serif;font-size:22px;font-weight:600;color:var(--border);line-height:1}
article.card h3{font-family:'Source Serif 4',serif;font-size:18px;font-weight:600;line-height:1.32;margin-bottom:10px;padding-right:34px}
article.card h3 a{color:inherit;text-decoration:none}
article.card p.sum{font-size:14.5px;color:var(--text-2);margin-bottom:12px}
article.card p.sum strong{color:var(--text);font-weight:600}
.srcrow{font-size:11.5px;margin-bottom:12px}
a.src{color:var(--ai);text-decoration:none;font-weight:600}
a.src:hover{text-decoration:underline}

/* ---------- the signal strip ----------
   One line, hairlines between segments; colour in exactly one place. */
.strip{display:flex;flex-wrap:wrap;align-items:center;gap:0;font-size:12px;color:var(--text-2);padding-top:12px;border-top:1px solid var(--border);font-variant-numeric:tabular-nums}
.rd{display:inline-flex;align-items:center;gap:6px;padding:0 12px;border-left:1px solid var(--rule);line-height:1.35;max-width:100%}
.strip .rd:first-child{padding-left:0;border-left:0}
.rd .lb{font-size:9.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.rd b{font-weight:600;color:var(--text);font-size:12px}
.rd .gl{width:8px;height:8px;border-radius:2px;flex:0 0 auto;background:var(--muted);opacity:.8}
.rd .gf{font-size:11px;color:var(--muted);flex:0 0 auto;line-height:1}
.rd .q{color:var(--muted);font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:180px}
.strip .date{margin-left:auto;padding-left:12px;border-left:1px solid var(--rule);color:var(--muted);font-variant-numeric:tabular-nums}

/* Impact — the only axis that gets a colour */
.rd.i-low .gl{background:var(--k1);opacity:1}.rd.i-low b{color:var(--k1)}
.rd.i-guarded .gl{background:var(--k2);opacity:1}.rd.i-guarded b{color:var(--k2)}
.rd.i-elevated .gl{background:var(--k3);opacity:1}.rd.i-elevated b{color:var(--k3)}
.rd.i-severe .gl{background:var(--k4);opacity:1}.rd.i-severe b{color:var(--k4)}
.rd.i-critical .gl{background:var(--k5);opacity:1}.rd.i-critical b{color:var(--k5)}
.rd.b-tier b{color:var(--text-2)}

/* the five-step legend, used in the "how to read this edition" disclosure */
.swatchrow{display:flex;gap:3px;margin-bottom:10px}
.swatchrow span{height:7px;border-radius:99px;flex:1}
.kcard .demo .rd{padding:0 9px}
.kcard .demo{display:flex;flex-wrap:wrap;gap:4px 10px;margin-bottom:9px;font-size:11.5px;align-items:center}

@media(max-width:640px){
  article.card{padding:17px 16px 14px}
  .rd{padding:0 9px;gap:5px}
  .rd .q{display:none}
  .strip .date{margin-left:0}
}
