/* ==========================================================================
   Ethics Testbed — Universal Styles
   ========================================================================== */

/* ----- Design tokens ----- */
:root {
  --jade: #00A86B; /* brand */
  --ink: #0b1220;
  --ink-2: #1f2637;
  --fog: #f6f7fb;
  --muted: #6b7280;
  --ring: rgba(0,168,107,0.25);
  --radius: 14px;
  --maxw: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #0b0f14;
    --ink-2: #111827;
    --fog: #0b0f14;
    --muted: #9aa4b2;
  }
  body { color-scheme: dark; }
}

/* ----- Base ----- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  color: #111827;
  background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
}
@media (prefers-color-scheme: dark) {
  body { color: #e5e7eb; background: radial-gradient(1200px 600px at 20% -10%, #0c1720, transparent), #0b0f14; }
}
a { color: var(--jade); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ----- Header / Nav ----- */
header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: saturate(120%) blur(10px);
  background: color-mix(in srgb, var(--fog) 80%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 20%, transparent);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.2px; }
.brand-logo {
  width: 28px; height: 28px; border-radius: 8px;
  background: conic-gradient(from 180deg at 50% 50%, #00a86b, #00c38a, #00a86b);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--jade) 20%, #ffffff);
}
.nav-links { display: none; gap: 18px; }
.nav-links a { font-weight: 600; color: inherit; opacity: 0.85; }
.nav-cta { display: flex; gap: 10px; align-items: center; }

.btn {
  appearance: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 700;
  padding: 10px 16px; border-radius: 999px;
  transition: transform .06s ease, box-shadow .2s ease, background .2s ease;
  background: var(--jade); color: #fff;
  box-shadow: 0 6px 18px -8px var(--ring), 0 2px 6px -2px var(--ring);
}
.btn:hover { transform: translateY(-1px); }
.btn.outline {
  background: transparent; color: var(--jade); border: 1.5px solid var(--jade);
  box-shadow: none;
}
.menu { display: inline-flex; background: transparent; border: 0; font-size: 20px; }
.theme { display: inline-flex; background: transparent; border: 0; font-size: 18px; }
@media (min-width: 860px) {
  .nav-links { display: flex; }
  .menu { display: none; }
}

/* ----- Hero ----- */
.hero { position: relative; overflow: clip; padding: 88px 0 54px; }
.hero h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700; line-height: 1.1; letter-spacing: -0.5px;
  font-size: clamp(36px, 4.2vw, 56px);
  margin: 0 0 16px;
}
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--jade);
  background: color-mix(in srgb, var(--jade) 12%, transparent);
  padding: 6px 10px; border-radius: 999px;
}
.hero p { max-width: 780px; font-size: 18px; line-height: 1.6; color: var(--muted); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* ----- Grid & Cards ----- */
.grid {
  display: grid; gap: 18px; margin: 42px 0 0;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
@media (min-width: 920px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: linear-gradient(180deg, color-mix(in srgb, #fff 85%, var(--jade) 5%), color-mix(in srgb, #fff 95%, transparent));
  border: 1px solid color-mix(in srgb, var(--muted) 14%, transparent);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: 0 12px 34px -24px rgba(0,0,0,.25);
}
@media (prefers-color-scheme: dark) {
  .card { background: linear-gradient(180deg, #0f1520, #0b0f14); }
}
.card h3 { margin: 8px 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

/* ----- Sections / Headings ----- */
section { padding: 58px 0; }
section h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(26px, 3.2vw, 38px); margin: 0 0 14px;
}
.lead { color: var(--muted); max-width: 820px; }

/* ----- Details / Disclosure ----- */
details {
  background: color-mix(in srgb, var(--jade) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--jade) 22%, transparent);
  border-radius: 12px; padding: 12px 14px; margin: 12px 0;
}
summary { cursor: pointer; font-weight: 700; }

/* ----- Code blocks ----- */
pre, code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: #0d1117; color: #e5e7eb;
}
pre {
  border-radius: 12px; padding: 14px; overflow-x: auto; border: 1px solid #1f2937;
}

/* ----- Pills / Lists ----- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--jade) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--jade) 24%, transparent);
  font-size: 13px; font-weight: 700; color: var(--jade);
}
.list-axioms { display: grid; gap: 10px; margin-top: 12px; }
.list-axioms li { padding-left: 8px; }

/* ----- Footer ----- */
footer {
  margin-top: 40px; padding: 40px 0 60px; color: var(--muted);
  border-top: 1px dashed color-mix(in srgb, var(--muted) 24%, transparent);
}
.foot-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .foot-grid { grid-template-columns: 1fr auto; align-items: center; } }
.tiny { font-size: 12px; opacity: .8; }

/* ----- Accessibility: Skip link ----- */
.skip { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip:focus { left: 12px; top: 12px; width: auto; height: auto; background: #fff; padding: 8px 12px; border-radius: 8px; outline: 2px solid var(--jade); }

/* ----- Utilities (site-wide helpers) ----- */
.muted { color: var(--muted); }
code { border-radius: 8px; padding: 2px 6px; }
