/* SI Law, v2: dark "lab" take on library green + brass. Instrument Sans display and text, Newsreader italic accent, IBM Plex Mono labels. */
:root {
  --bg: #07110d;
  --bg-2: #0a1712;
  --surface: rgba(16, 34, 27, 0.62);
  --surface-solid: #0d1b16;
  --line: rgba(201, 164, 92, 0.16);
  --line-soft: rgba(234, 241, 236, 0.08);
  --line-strong: rgba(201, 164, 92, 0.38);
  --ink: #eaf1ec;
  --muted: #a7bab1;
  --faint: #8aa197;
  --brass: #c9a45c;
  --brass-hi: #e6c983;
  --brass-lo: #a8823a;
  --green-glow: 46, 140, 104;
  --red: #ff8f84;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gutter: 32px;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; font-family: var(--sans); font-weight: 600; letter-spacing: -0.025em; text-wrap: balance; }
p { margin: 0; }
a { color: var(--brass-hi); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); position: relative; }
.mono { font-family: var(--mono); font-size: 13px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--brass); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 50; font-weight: 700; }
.skip:focus { left: 8px; }

/* Background: faint grid + two slow glows */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(rgba(201, 164, 92, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 164, 92, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.bg-glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55; animation: breathe 14s ease-in-out infinite; }
.bg-glow-a { width: 620px; height: 620px; top: -220px; right: -120px; background: radial-gradient(circle, rgba(201, 164, 92, 0.32), transparent 65%); }
.bg-glow-b { width: 720px; height: 720px; top: 120px; left: -280px; background: radial-gradient(circle, rgba(var(--green-glow), 0.38), transparent 65%); animation-delay: -7s; }
@keyframes breathe { 0%, 100% { transform: scale(1) translate(0, 0); opacity: 0.5; } 50% { transform: scale(1.08) translate(20px, 14px); opacity: 0.68; } }

/* Nav */
.nav-wrap {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7, 17, 13, 0.62);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
          backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}
.nav-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 28px; padding-top: 14px; padding-bottom: 14px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.wordmark:hover { color: var(--ink); }
.wm-mark {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  font-family: var(--mono); font-weight: 500; font-size: 14px; color: var(--bg);
  background: linear-gradient(135deg, var(--brass-hi), var(--brass-lo));
  box-shadow: 0 0 18px rgba(201, 164, 92, 0.35);
}
.wm-text { font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.wm-full { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 26px; font-size: 15px; }
.nav a:not(.btn) { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.nav a:not(.btn):hover { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 11px 22px;
  border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 16px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: 15px; }
.btn-brass { color: var(--bg); background: linear-gradient(135deg, var(--brass-hi), var(--brass) 55%, var(--brass-lo)); box-shadow: 0 0 0 1px rgba(230, 201, 131, 0.4) inset, 0 8px 28px rgba(201, 164, 92, 0.28); }
.btn-brass:hover { color: var(--bg); transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(230, 201, 131, 0.6) inset, 0 10px 36px rgba(201, 164, 92, 0.42); }
.btn-ghost { color: var(--ink); border: 1px solid var(--line-strong); background: rgba(201, 164, 92, 0.06); }
.btn-ghost:hover { color: var(--ink); border-color: var(--brass); background: rgba(201, 164, 92, 0.12); }

/* Hero */
.hero-row { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: 96px; padding-bottom: 104px; }
.hero-copy { flex: 999 1 560px; min-width: 0; }
.hero-aside { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.status {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 12px; margin-bottom: 26px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(201, 164, 92, 0.06);
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.04em; color: var(--muted);
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #5fd39a; box-shadow: 0 0 0 0 rgba(95, 211, 154, 0.6); animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(95, 211, 154, 0.55); } 70% { box-shadow: 0 0 0 9px rgba(95, 211, 154, 0); } 100% { box-shadow: 0 0 0 0 rgba(95, 211, 154, 0); } }
h1 { font-size: clamp(46px, 7.2vw, 92px); line-height: 0.98; letter-spacing: -0.045em; max-width: 12ch; }
h1 del { color: var(--red); text-decoration-thickness: 0.07em; text-decoration-color: rgba(255, 143, 132, 0.85); font-weight: 500; }
h1 ins {
  text-decoration: none; font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: -0.02em;
  background: linear-gradient(100deg, var(--brass-hi) 10%, var(--brass) 50%, #f3dca6 90%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 9s ease-in-out infinite;
}
@keyframes sheen { 0%, 100% { background-position: 0% 0; } 50% { background-position: 100% 0; } }
.lede { margin-top: 26px; font-size: 20px; color: var(--muted); max-width: 54ch; }

.signup { margin-top: 34px; max-width: 580px; padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.subscribe { min-height: 104px; }
.subscribe iframe { max-width: 100%; }
.fine { margin-top: 10px; font-size: 13.5px; color: var(--faint); }
.fine a { color: var(--muted); }
.fallback { margin-top: 4px; font-size: 13px; }

.stats { display: flex; flex-wrap: wrap; gap: 10px 36px; margin: 30px 0 0; padding: 0; }
.stats div { display: flex; flex-direction: column; gap: 2px; }
.stats dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.stats dd { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }

/* Console-style scorecard */
.console {
  position: relative; border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, rgba(20, 40, 32, 0.9), rgba(10, 22, 17, 0.92));
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(201, 164, 92, 0.12);
  animation: float 8s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.console-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); background: rgba(0, 0, 0, 0.22); }
.console-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(234, 241, 236, 0.18); }
.console-bar .dot:first-child { background: rgba(255, 143, 132, 0.7); }
.console-bar .dot:nth-child(2) { background: rgba(230, 201, 131, 0.7); }
.console-bar .dot:nth-child(3) { background: rgba(95, 211, 154, 0.7); }
.console-path { margin-left: 8px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.console-body { position: relative; padding: 20px 22px 22px; }
.console-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.console-title { font-weight: 600; font-size: 20px; letter-spacing: -0.02em; }
.chip { font-family: var(--mono); font-size: 11.5px; padding: 4px 10px; border-radius: 999px; color: var(--brass-hi); border: 1px solid var(--line-strong); background: rgba(201, 164, 92, 0.08); }
.console-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; padding: 11px 0; border-top: 1px dashed rgba(234, 241, 236, 0.1); font-size: 15px; color: var(--ink); }
.console-row .mono { color: var(--muted); }
.verdict { margin-top: 12px; padding: 14px 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.verdict-label { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass); }
.verdict-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vchip { --on: #5fd39a; font-size: 13.5px; font-weight: 600; padding: 5px 11px; border-radius: 8px; color: var(--muted); border: 1px solid var(--line-soft); animation: vcycle 9s ease-in-out infinite; }
.vchip:nth-child(2) { --on: #e6c983; animation-delay: 3s; }
.vchip:nth-child(3) { --on: #ff8f84; animation-delay: 6s; }
@keyframes vcycle { 0%, 28% { color: #08140f; background: var(--on); border-color: var(--on); } 34%, 100% { color: var(--muted); background: transparent; border-color: var(--line-soft); } }
.scan { position: absolute; left: 0; right: 0; top: 0; height: 60px; background: linear-gradient(180deg, transparent, rgba(201, 164, 92, 0.08), transparent); animation: scan 6s linear infinite; pointer-events: none; }
@keyframes scan { 0% { transform: translateY(-60px); } 100% { transform: translateY(340px); } }
.note { align-self: flex-end; max-width: 330px; font-size: 14px; color: var(--muted); padding: 10px 14px; border-left: 2px solid var(--brass); background: rgba(201, 164, 92, 0.06); border-radius: 0 10px 10px 0; }
.note-tag { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--brass); margin-bottom: 2px; }

/* Sections */
.section { padding-top: 96px; padding-bottom: 96px; border-top: 1px solid var(--line-soft); }
.section-head { margin-bottom: 40px; max-width: 760px; }
.section-head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 24px; max-width: none; }
.kicker { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; color: var(--brass); margin-bottom: 14px; }
.section h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.06; }
.sub { margin-top: 14px; color: var(--muted); max-width: 60ch; }
.badge { display: inline-block; margin-left: 4px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--brass-hi); font-size: 11.5px; letter-spacing: 0.04em; }

/* Bento */
.bento { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.tile {
  grid-column: span 2; position: relative; padding: 24px 22px 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line-soft);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.tile-wide { grid-column: span 4; }
.bento .tile:nth-child(2) { grid-column: span 2; }
.bento .tile:nth-child(n+3) { grid-column: span 2; }
.tile:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 40px rgba(201, 164, 92, 0.1); background: rgba(20, 40, 32, 0.72); }
.tile-num { position: absolute; top: 20px; right: 22px; font-family: var(--mono); font-size: 13px; color: var(--faint); }
.tile-icon { width: 34px; height: 34px; fill: none; stroke: var(--brass-hi); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; padding: 6px; border-radius: 10px; background: rgba(201, 164, 92, 0.1); border: 1px solid var(--line); box-sizing: content-box; }
.tile h3 { margin-top: 18px; font-size: 22px; }
.tile p { margin-top: 6px; font-size: 15.5px; color: var(--muted); max-width: 46ch; }
.tile-wide { background: linear-gradient(135deg, rgba(201, 164, 92, 0.12), rgba(16, 34, 27, 0.62) 55%); border-color: var(--line); }
.tile-wide h3 { font-size: 28px; }

/* Directory */
.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.split-copy { flex: 1 1 360px; min-width: 0; }
.split-copy .btn { margin-top: 26px; }
.cats { flex: 1 1 480px; min-width: 0; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cats li {
  display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 14px 18px; border-radius: 12px;
  border: 1px solid var(--line-soft); background: var(--surface); font-weight: 600; font-size: 16px;
  transition: border-color 0.2s, background 0.2s;
}
.cats li:hover { border-color: var(--line-strong); background: rgba(20, 40, 32, 0.72); }
.cat-idx { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--brass); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 12px; bottom: 12px; width: 1px; background: linear-gradient(180deg, var(--brass), rgba(201, 164, 92, 0.1)); }
.t-item { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; padding: 20px 0 20px 40px; border-bottom: 1px solid var(--line-soft); }
.t-dot { position: absolute; left: 0; top: 27px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--brass); }
.t-next .t-dot { background: var(--brass); box-shadow: 0 0 14px rgba(201, 164, 92, 0.7); }
.t-cite { flex: 0 0 210px; font-family: var(--mono); font-size: 13px; color: var(--brass); }
.t-title { flex: 1 1 280px; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.t-tag { font-family: var(--mono); font-size: 11.5px; padding: 3px 9px; border-radius: 999px; color: #08140f; background: #5fd39a; }
.sched-note { margin-top: 22px; font-size: 15px; }
.sched-note strong { color: var(--ink); font-weight: 600; }
.link-arrow { font-weight: 700; text-decoration: none; color: var(--brass-hi); }
.link-arrow:hover { color: var(--ink); }

/* Sponsors + workshops */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.panel {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 34px 32px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.panel::after { content: ""; position: absolute; width: 320px; height: 320px; right: -140px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(201, 164, 92, 0.16), transparent 65%); pointer-events: none; }
.panel h2 { font-size: clamp(26px, 2.8vw, 34px); line-height: 1.12; }
.panel .btn, .panel .link-arrow { margin-top: 24px; }
.rule { margin-top: 18px; padding-left: 14px; border-left: 2px solid var(--brass); font-family: var(--serif); font-style: italic; font-size: 21px; color: var(--ink); }

/* Footer */
.footer { border-top: 1px solid var(--line-soft); }
.footer-col { display: flex; flex-direction: column; gap: 10px; padding-top: 40px; padding-bottom: 56px; font-size: 14px; color: var(--faint); }
.footer-col p { max-width: 82ch; }
.footer-col a { color: var(--muted); }
.wordmark-sm { margin-bottom: 8px; }
.wordmark-sm .wm-mark { width: 26px; height: 26px; font-size: 12px; }
.wordmark-sm .wm-text { font-size: 17px; }

/* Scroll reveal (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.bento .reveal:nth-child(2) { transition-delay: 0.05s; }
.bento .reveal:nth-child(3) { transition-delay: 0.1s; }
.bento .reveal:nth-child(4) { transition-delay: 0.15s; }
.bento .reveal:nth-child(5) { transition-delay: 0.2s; }

/* Text pages (privacy, 404) */
.doc { padding-top: 72px; padding-bottom: 96px; }
.doc .wrap { max-width: 780px; }
.doc-card { padding: 40px 40px 44px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.doc h1 { font-size: clamp(38px, 5.5vw, 56px); max-width: none; line-height: 1.02; }
.doc h2 { font-size: 22px; margin: 34px 0 10px; letter-spacing: -0.015em; }
.doc p, .doc li { color: var(--muted); }
.doc strong { color: var(--ink); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 22px; margin: 10px 0 0; }
.doc li + li { margin-top: 6px; }
.doc .updated { margin-top: 10px; font-family: var(--mono); font-size: 13px; color: var(--faint); }

/* Tablet */
@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento .tile, .bento .tile:nth-child(n) { grid-column: span 1; }
  .bento .tile-wide { grid-column: span 2; }
  .duo { grid-template-columns: minmax(0, 1fr); }
}

/* Phones */
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .hero-row { padding-top: 48px; padding-bottom: 64px; gap: 40px; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .lede { font-size: 18px; }
  .wm-full { display: none; }
  .nav-row { flex-wrap: nowrap; padding-top: 10px; padding-bottom: 10px; }
  .nav a:not(.btn) { display: none; }
  .signup { padding: 14px 12px 12px; }
  .stats { gap: 14px 26px; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .bento .tile, .bento .tile:nth-child(n), .bento .tile-wide { grid-column: span 1; }
  .cats { grid-template-columns: minmax(0, 1fr); }
  .t-cite { flex-basis: 100%; }
  .t-title { font-size: 21px; }
  .panel { padding: 26px 20px; }
  .doc-card { padding: 26px 20px 30px; }
  .note { align-self: flex-start; }
  .console-path { display: none; }
}

/* Respect reduced-motion settings */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
