:root {
  --bg: #04080a;
  --bg-2: #0a1316;
  --panel: rgba(12, 28, 30, 0.72);
  --line: rgba(46, 230, 176, 0.18);
  --emerald: #2ee6b0;
  --teal: #19b3a6;
  --gold: #d6b25e;
  --gold-soft: rgba(214, 178, 94, 0.55);
  --text: #d9ece8;
  --muted: #7e9a96;
  --warn: #e0a54a;
  --serif: "Cinzel", "Times New Roman", serif;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(ellipse at 50% -10%, rgba(25, 179, 166, 0.16), transparent 60%),
    radial-gradient(ellipse at 90% 110%, rgba(214, 178, 94, 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--emerald); text-decoration: none; }
a:hover { color: var(--gold); }

#particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
header.site {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(4, 8, 10, 0.72);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); letter-spacing: 0.18em; color: var(--text); font-size: 0.95rem; }
.brand svg { width: 26px; height: 26px; }
.brand small { display: block; font-family: var(--mono); font-size: 0.6rem; color: var(--muted); letter-spacing: 0.25em; }
nav.main { display: flex; gap: 22px; }
nav.main a { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; }
nav.main a.active, nav.main a:hover { color: var(--emerald); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--emerald); padding: 6px 10px; border-radius: 6px; font-family: var(--mono); }

/* ---------- status strip ---------- */
.status-strip { border-bottom: 1px solid var(--line); background: rgba(10, 19, 22, 0.6); font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; color: var(--muted); }
.status-strip .wrap { display: flex; flex-wrap: wrap; gap: 6px 26px; padding-top: 7px; padding-bottom: 7px; }
.status-strip b { color: var(--emerald); font-weight: 500; }
.status-strip b.warn { color: var(--warn); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding: 70px 0 40px; }
.eyebrow { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.32em; color: var(--gold); text-transform: uppercase; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: 0.06em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.1; margin: 14px 0 18px; background: linear-gradient(120deg, #eafff8, var(--emerald) 55%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 14px; }
h3 { font-size: 1.05rem; margin-bottom: 8px; color: var(--gold); }
.lead { color: var(--muted); font-size: 1.05rem; max-width: 520px; }
.quote { margin-top: 26px; padding-left: 16px; border-left: 2px solid var(--gold-soft); font-family: var(--serif); color: var(--gold); font-style: italic; letter-spacing: 0.04em; }
.quote cite { display: block; margin-top: 6px; font-family: var(--mono); font-size: 0.68rem; color: var(--muted); font-style: normal; letter-spacing: 0.2em; }

/* ---------- shard visual ---------- */
.shard-stage { position: relative; aspect-ratio: 1; width: 100%; max-width: 470px; justify-self: center; }
.shard-stage svg { width: 100%; height: 100%; overflow: visible; }
.ring { transform-origin: 250px 250px; transform-box: view-box; }
.ring.r1 { animation: spin 90s linear infinite; }
.ring.r2 { animation: spin 140s linear infinite reverse; }
.ring.r3 { animation: spin 60s linear infinite; }
.ring.r4 { animation: spin 220s linear infinite reverse; }
.hand { transform-origin: 250px 250px; transform-box: view-box; animation: spin 12s steps(60) infinite; }
.shard { animation: float 7s ease-in-out infinite; transform-origin: 250px 250px; transform-box: view-box; }
.shard-glow { animation: pulse 4.5s ease-in-out infinite; transform-origin: 250px 250px; transform-box: view-box; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(-6px); } 50% { transform: translateY(6px); } }
@keyframes pulse { 0%, 100% { opacity: 0.45; transform: scale(0.96); } 50% { opacity: 0.85; transform: scale(1.04); } }

/* ---------- panels ---------- */
section { padding: 46px 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 26px; position: relative; overflow: hidden; }
.panel::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(90deg, transparent, var(--emerald), transparent); opacity: 0.5; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.24em; color: var(--muted); text-transform: uppercase; }

.stat { font-family: var(--mono); }
.stat .v { font-size: 1.7rem; color: var(--emerald); }
.stat .v.warn { color: var(--warn); }
.meter { height: 6px; background: rgba(255, 255, 255, 0.06); border-radius: 4px; margin-top: 10px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--emerald)); border-radius: 4px; transition: width 1.8s cubic-bezier(.2, .8, .2, 1); }

.notice { display: flex; gap: 14px; align-items: flex-start; border: 1px solid rgba(224, 165, 74, 0.35); background: rgba(224, 165, 74, 0.06); border-radius: 12px; padding: 16px 18px; color: #f0d7a8; font-size: 0.92rem; }
.notice .ico { font-family: var(--mono); color: var(--warn); }

/* ---------- timeline ---------- */
.timeline { position: relative; margin-top: 18px; }
.timeline::before { content: ""; position: absolute; left: 13px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(var(--emerald), var(--gold-soft), transparent); }
.t-item { position: relative; padding: 0 0 26px 46px; opacity: 0; transform: translateY(14px); transition: all 0.8s ease; }
.t-item.in { opacity: 1; transform: none; }
.t-item::before { content: ""; position: absolute; left: 6px; top: 6px; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--emerald); background: var(--bg); box-shadow: 0 0 12px rgba(46, 230, 176, 0.5); }
.t-item.gold::before { border-color: var(--gold); box-shadow: 0 0 12px rgba(214, 178, 94, 0.5); }
.t-year { font-family: var(--mono); color: var(--gold); letter-spacing: 0.2em; font-size: 0.8rem; }
.t-title { font-family: var(--serif); font-size: 1.15rem; margin: 2px 0 4px; }

/* ---------- tables / logs ---------- */
table.states { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 0.82rem; }
table.states th, table.states td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); }
table.states th { color: var(--muted); font-weight: 400; letter-spacing: 0.18em; font-size: 0.68rem; text-transform: uppercase; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 0.68rem; letter-spacing: 0.12em; border: 1px solid var(--line); }
.tag.ok { color: var(--emerald); border-color: rgba(46, 230, 176, 0.4); }
.tag.lost { color: var(--warn); border-color: rgba(224, 165, 74, 0.45); }
.tag.dim { color: var(--muted); }

.log { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; background: rgba(10, 19, 22, 0.55); }
.log + .log { margin-top: 14px; }
.log .head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.14em; margin-bottom: 8px; }
.log.missing { border-style: dashed; border-color: rgba(224, 165, 74, 0.4); }
.log.missing .body { font-family: var(--mono); color: var(--warn); font-size: 0.85rem; }
.redact { background: rgba(126, 154, 150, 0.25); color: transparent; border-radius: 3px; user-select: none; }

/* ---------- contact ---------- */
form.contact { display: grid; gap: 14px; }
form.contact input, form.contact textarea { width: 100%; background: rgba(4, 8, 10, 0.6); border: 1px solid var(--line); border-radius: 8px; padding: 11px 13px; color: var(--muted); font-family: var(--sans); }
form.contact button { justify-self: start; background: transparent; border: 1px solid var(--gold-soft); color: var(--gold); padding: 10px 22px; border-radius: 8px; font-family: var(--mono); letter-spacing: 0.18em; cursor: not-allowed; opacity: 0.6; }

/* ---------- footer ---------- */
footer.site { border-top: 1px solid var(--line); margin-top: 40px; padding: 26px 0 34px; font-family: var(--mono); font-size: 0.7rem; color: var(--muted); letter-spacing: 0.14em; }
footer.site .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

.page-head { padding: 60px 0 10px; }
.page-head p { max-width: 640px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  nav.main { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; background: rgba(4, 8, 10, 0.96); border-bottom: 1px solid var(--line); }
  nav.main.open { display: flex; }
  nav.main a { padding: 14px 20px; border-top: 1px solid var(--line); }
  .menu-btn { display: block; }
  table.states { font-size: 0.74rem; }
  table.states th:nth-child(3), table.states td:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ring, .hand, .shard, .shard-glow { animation: none; }
}
