/* cai.canine.dev — the open standard. Neutral, authoritative standards-home aesthetic (SPDX/OWASP/schema.org),
   product-agnostic; Watchdog stewardship lives in the footer only. No framework, no JS required. */
:root {
  --ink: #11161d; --ink-soft: #44505e; --line: #e2e7ee; --bg: #ffffff; --bg-soft: #f6f8fb;
  --accent: #1f6feb; --accent-soft: #e7f0fe; --ok: #1a7f4b; --warn: #b9770a; --crit: #c0392b;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 60rem; --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #e7edf5; --ink-soft: #a3b0c0; --line: #232c38; --bg: #0d1117; --bg-soft: #141b24;
          --accent: #589bff; --accent-soft: #15233b; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.6;
       -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
code, pre, .mono { font-family: var(--mono); }

/* Header — neutral masthead */
header.site { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); z-index: 10; }
header.site .wrap { display: flex; align-items: center; gap: 1.5rem; height: 3.6rem; }
.brand { font-weight: 700; letter-spacing: -0.01em; font-size: 1.05rem; color: var(--ink); }
.brand b { color: var(--accent); }
header.site nav { display: flex; gap: 1.1rem; flex: 1; flex-wrap: wrap; font-size: 0.92rem; }
header.site nav a { color: var(--ink-soft); }
header.site nav a:hover, header.site nav a[aria-current] { color: var(--ink); }
.cta { background: var(--accent); color: #fff !important; padding: 0.45rem 0.9rem; border-radius: 8px; font-size: 0.9rem; font-weight: 600; white-space: nowrap; }
.cta:hover { text-decoration: none; filter: brightness(1.07); }

/* Hero + sections */
.hero { padding: 4rem 0 2.5rem; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 1rem; }
.hero .lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 44rem; }
.eyebrow { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin: 0 0 0.5rem; }
section { padding: 2.75rem 0; border-bottom: 1px solid var(--line); }
section h2 { font-size: 1.6rem; letter-spacing: -0.01em; margin: 0 0 0.75rem; }
section h3 { font-size: 1.1rem; margin: 1.5rem 0 0.4rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--ink-soft); }

/* The Open · Verifiable · Referenced trinity + cards */
.trio, .cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin: 1.5rem 0; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; background: var(--bg-soft); }
.card h2, .card h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.card p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }

/* Buttons */
.btns { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1.75rem 0 0; }
.btn { display: inline-block; padding: 0.6rem 1.1rem; border-radius: 8px; font-weight: 600; border: 1px solid var(--line); color: var(--ink); background: var(--bg-soft); cursor: pointer; font-size: 1rem; font-family: inherit; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn:hover { text-decoration: none; border-color: var(--accent); }

/* Code + manifest blocks */
pre { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; overflow-x: auto; font-size: 0.88rem; }
.firewall { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; margin: 1.5rem 0; text-align: center; }
.firewall .side { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; background: var(--bg-soft); }
.firewall .bar { font-family: var(--mono); color: var(--accent); font-weight: 700; }
@media (max-width: 40rem) { .firewall { grid-template-columns: 1fr; } .firewall .bar { writing-mode: initial; } }

/* Firewall infographic (the deterministic open standard vs advisory) */
.fig { margin: 1.5rem 0 0; }
.fig svg { width: 100%; max-width: 760px; height: auto; display: block; margin: 0 auto; }
.fig figcaption { max-width: 62ch; margin: 0.85rem auto 0; text-align: center; color: var(--ink-soft); font-size: 0.85rem; line-height: 1.55; }
.fig .ff-box { fill: var(--bg-soft); stroke: var(--line); stroke-width: 1; }
.fig .ff-box-dim { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 4 4; }
.fig .ff-circle { fill: var(--bg); stroke: var(--accent); stroke-width: 1.5; }
.fig .ff-firewall { stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 2 5; opacity: 0.75; }
.fig .ff-t { fill: var(--ink); font-family: var(--sans); font-size: 14px; font-weight: 600; }
.fig .ff-tm { fill: var(--ink-soft); font-family: var(--sans); font-size: 12px; }

/* Dimension catalog filter */
.dim-toolbar { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin: 1.25rem 0 1.5rem; }
.dim-toolbar input[type="search"] { flex: 1; min-width: 16rem; padding: 0.55rem 0.8rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font-size: 1rem; font-family: inherit; }
.dim-toolbar input[type="search"]:focus { outline: none; border-color: var(--accent); }
.dim-toolbar .count { color: var(--ink-soft); font-size: 0.9rem; white-space: nowrap; }

/* Lens cards (what it measures · why it matters · what it protects against) */
.lens-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.5rem; }
.lens-card-head h2 { margin: 0; font-size: 1.05rem; }
.lens-card p { font-size: 0.95rem; }

/* Lens table */
table.lenses { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 0.94rem; }
table.lenses th, table.lenses td { text-align: left; padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.lenses th { color: var(--ink-soft); font-weight: 600; }
.pill { display: inline-block; font-size: 0.78rem; padding: 0.1rem 0.55rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* Bands */
.bands { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1rem 0; }
.band { padding: 0.4rem 0.8rem; border-radius: 8px; font-weight: 600; font-size: 0.88rem; color: #fff; }
.b-exemplary { background: #0E5C3A; } .b-strong { background: #3C8F59; } .b-adequate { background: #2f7fb5; }
.b-weak { background: #CF6B3A; } .b-critical { background: #9C2D2A; }

/* Footer — Watchdog stewardship lives here only */
footer.site { padding: 2.5rem 0; color: var(--ink-soft); font-size: 0.9rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; }
footer.site a { color: var(--ink-soft); }
footer.site nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.callout { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 1.5rem 0; }

.lens-filter-note { margin: 0 0 1rem; padding: .6rem .9rem; border-radius: 8px; background: var(--bg-soft); color: var(--ink); border: 1px solid var(--line); font-size: .95rem; }
.lens-filter-note a { font-weight: 600; color: var(--accent); }

/* Parent-studio byline (footer): Canine badge as a currentColor mask + link to canine.dev. */
.canine-by { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.6rem; color: var(--ink-soft); font-size: 0.85rem; }
.canine-by:hover { color: var(--ink); text-decoration: none; }
.canine-badge { display: inline-block; width: 16px; height: 18px; background: currentColor; -webkit-mask: url("/brand/canine-badge-flat.svg") no-repeat center / contain; mask: url("/brand/canine-badge-flat.svg") no-repeat center / contain; }
