:root {
  --bg: #000;
  --fg: #e6e6e6;
  --dim: #888;
  --skynet: #ff0033;
  --utopia: #00ff88;
  --amber: #ffcc00;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  padding: 24px 16px 80px;
}

main {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* ───── HERO / COUNTDOWN ───── */
.hero {
  text-align: center;
  padding-top: 16px;
}

.hero h1 {
  font-size: clamp(20px, 3.2vw, 32px);
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 32px;
  color: var(--fg);
}

.countdown-label {
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--dim);
  margin-bottom: 4px;
}

.countdown-value {
  font-size: clamp(32px, 7.5vw, 72px);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--amber);
  text-shadow: 0 0 24px rgba(255, 204, 0, 0.35);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.countdown-caption {
  font-size: 13px;
  color: var(--dim);
  letter-spacing: 0.1em;
  margin-top: 8px;
}

.sub-countdown {
  margin-top: 20px;
  font-size: 13px;
  color: var(--dim);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.sub-countdown span + span,
.sub-countdown #t-rsi {
  color: var(--fg);
}

/* ───── GRID 2-COL ───── */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.attractor {
  position: relative;
  padding: 24px;
  border: 1px solid #222;
  background: #060606;
  overflow: hidden;
}

.attractor header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #222;
}

.badge {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.sub {
  font-size: 12px;
  color: var(--dim);
  margin-top: 2px;
}

dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  font-size: 13px;
}

dt {
  color: var(--dim);
  letter-spacing: 0.08em;
  font-weight: 400;
}

dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.bar {
  margin-top: 20px;
  height: 8px;
  background: #111;
  position: relative;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
}

.converge {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.15em;
  font-weight: 700;
}

/* ─── SKYNET side ─── */
.skynet { border-color: rgba(255, 0, 51, 0.35); }
.skynet .badge,
.skynet .converge,
.skynet dd { color: var(--skynet); }
.skynet .bar span {
  background: var(--skynet);
  box-shadow: 0 0 12px rgba(255, 0, 51, 0.6);
}
.skynet::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 0, 51, 0.04) 0px,
    rgba(255, 0, 51, 0.04) 1px,
    transparent 1px,
    transparent 3px
  );
  animation: scan 6s linear infinite;
}

/* ─── UTOPIA side ─── */
.utopia { border-color: rgba(0, 255, 136, 0.35); }
.utopia .badge,
.utopia .converge,
.utopia dd { color: var(--utopia); }
.utopia .bar span {
  background: var(--utopia);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.6);
}
.utopia {
  animation: breath 4s ease-in-out infinite;
}

@keyframes scan {
  from { background-position: 0 0; }
  to   { background-position: 0 100px; }
}

@keyframes breath {
  0%, 100% { box-shadow: inset 0 0 0 rgba(0, 255, 136, 0); }
  50%      { box-shadow: inset 0 0 40px rgba(0, 255, 136, 0.08); }
}

/* ───── TIMELINE ───── */
.timeline svg {
  width: 100%;
  height: auto;
  display: block;
}

.timeline text {
  font-family: var(--mono);
  font-size: 11px;
  fill: var(--dim);
  text-anchor: middle;
  letter-spacing: 0.08em;
}

.timeline .urgent text { fill: var(--amber); }

/* ───── CLOSING ───── */
.closing {
  text-align: center;
  padding-top: 16px;
  border-top: 1px dashed #222;
}

.statement {
  font-size: clamp(14px, 2vw, 18px);
  line-height: 1.7;
  color: var(--fg);
  margin: 0 0 32px;
}

.cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.btn {
  display: inline-block;
  padding: 14px 24px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--dim);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.btn:hover {
  border-color: var(--fg);
  color: #fff;
}

.btn.primary {
  border-color: var(--amber);
  color: var(--amber);
}

.btn.primary:hover {
  background: var(--amber);
  color: #000;
}

.foot {
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.06em;
}

.foot a {
  color: var(--dim);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.foot code {
  background: #111;
  padding: 2px 6px;
  border: 1px solid #222;
  font-size: 10px;
}

/* ───── PHASE DIAGRAM (closing sub-block) ───── */
.phase {
  margin: 28px auto 32px;
  max-width: 920px;
  text-align: left;
  border: 1px dashed #222;
  padding: 22px 20px;
  background: #050505;
}

.phase-title {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.35em;
  color: var(--amber);
  margin-bottom: 14px;
}

.phase-diagram {
  font-size: 11px;
  line-height: 1.35;
  color: #bbb;
  overflow-x: auto;
  margin: 0 0 18px;
  padding: 12px 14px;
  background: #000;
  border: 1px solid #151515;
  white-space: pre;
}

.phase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.phase-col {
  padding: 14px 16px;
  border: 1px solid #161616;
  background: #080808;
}

.phase-col.skynet { border-color: rgba(255, 0, 51, 0.25); }
.phase-col.utopia { border-color: rgba(0, 255, 136, 0.25); }

.phase-head {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.15em;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #161616;
}
.phase-col.skynet .phase-head { color: var(--skynet); }
.phase-col.utopia .phase-head { color: var(--utopia); }

.phase-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--fg);
}

.phase-col li {
  padding-left: 12px;
  position: relative;
}

.phase-col li::before {
  content: '›';
  position: absolute;
  left: 0;
}
.phase-col.skynet li::before { color: var(--skynet); }
.phase-col.utopia li::before { color: var(--utopia); }

.phase-key {
  margin: 0;
  padding: 10px 14px;
  background: #080808;
  border-left: 2px solid var(--amber);
  font-size: 12px;
  color: var(--fg);
}

.phase-key b {
  color: var(--amber);
  letter-spacing: 0.12em;
  margin-right: 6px;
}

@media (max-width: 720px) {
  .phase { padding: 16px 14px; }
  .phase-diagram { font-size: 10px; }
  .phase-grid { grid-template-columns: 1fr; gap: 10px; }
  .phase-col { padding: 12px 14px; }
}

/* ───── PROOF SECTION ───── */
html { scroll-behavior: smooth; }

.proof {
  margin-top: 16px;
  padding: 36px 28px 40px;
  border: 1px solid #222;
  background: #050505;
}

.proof-head {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px dashed #222;
}

.proof-kicker {
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--dim);
  margin-bottom: 10px;
}

.proof h2 {
  font-size: clamp(18px, 2.6vw, 26px);
  font-weight: 800;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
  color: var(--fg);
}

.proof-meta {
  font-size: 12px;
  color: var(--dim);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

.sect {
  border-top: 1px solid #161616;
  padding: 14px 0;
}

.sect:first-of-type { border-top: none; padding-top: 4px; }

.sect summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--fg);
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  user-select: none;
  transition: background 0.15s;
}

.sect summary::-webkit-details-marker { display: none; }

.sect summary::before {
  content: '▸ ';
  display: inline-block;
  width: 14px;
  color: var(--amber);
  transition: transform 0.2s;
}

.sect[open] summary::before { content: '▾ '; }

.sect summary:hover { background: #0f0f0f; }

.sect .sect-en { color: var(--fg); }
.sect .sect-ko { color: var(--dim); font-size: 12px; }

.sect-body {
  padding: 16px 14px 8px;
  font-size: 13px;
  line-height: 1.65;
  color: #d0d0d0;
}

.sect-body h4 {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin: 18px 0 8px;
  color: var(--utopia);
}

.sect-body h4:first-child { margin-top: 0; }

.sect-body p { margin: 0 0 12px; }

.sect-body b { color: var(--amber); }

.sect-body pre {
  font-size: 11.5px;
  line-height: 1.4;
  color: #c4c4c4;
  background: #000;
  border: 1px solid #151515;
  padding: 12px 14px;
  margin: 8px 0 14px;
  overflow-x: auto;
  white-space: pre;
}

.sect-body table.data {
  width: 100%;
  font-family: var(--mono);
  font-size: 12px;
  border-collapse: collapse;
  background: #000;
  border: 1px solid #151515;
  margin: 8px 0 16px;
}

.sect-body table.data caption {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--dim);
  text-align: left;
  margin-bottom: 6px;
  padding: 0 4px;
}

.sect-body table.data th,
.sect-body table.data td {
  padding: 7px 10px;
  border: 1px solid #151515;
  text-align: left;
  vertical-align: top;
  line-height: 1.45;
}

.sect-body table.data thead th {
  background: #0a0a0a;
  color: var(--amber);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 11px;
  text-transform: uppercase;
}

.sect-body table.data tbody th {
  color: var(--dim);
  font-weight: 400;
  white-space: nowrap;
}

.sect-body table.data .num { font-variant-numeric: tabular-nums; text-align: right; }
.sect-body table.data .ok { color: var(--utopia); font-weight: 700; }
.sect-body table.data .bad { color: var(--skynet); font-weight: 700; }
.sect-body table.data .warn { color: var(--amber); font-weight: 700; }
.sect-body table.data .code { color: var(--amber); }

.sect-body .table-src {
  font-size: 10.5px;
  color: var(--dim);
  letter-spacing: 0.06em;
  margin: -8px 0 16px;
}

@media (max-width: 560px) {
  .sect-body table.data,
  .sect-body table.data thead,
  .sect-body table.data tbody,
  .sect-body table.data tr,
  .sect-body table.data th,
  .sect-body table.data td {
    display: block;
  }
  .sect-body table.data thead { display: none; }
  .sect-body table.data tr {
    border: 1px solid #151515;
    margin-bottom: 8px;
    padding: 4px;
    background: #050505;
  }
  .sect-body table.data td {
    border: none;
    padding: 4px 8px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }
  .sect-body table.data td::before {
    content: attr(data-col);
    color: var(--dim);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    flex-shrink: 0;
  }
}

.sect-body ul.refs {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.7;
}

.sect-body ul.refs li {
  padding-left: 12px;
  position: relative;
  color: var(--fg);
}

.sect-body ul.refs li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--amber);
}

.sect-body a {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.proof-foot {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px dashed #222;
  text-align: center;
}

@media (max-width: 720px) {
  .proof { padding: 24px 14px 28px; }
  .sect summary { font-size: 12px; padding: 10px; }
  .sect .sect-ko { display: block; margin-top: 2px; }
  .sect-body { padding: 14px 6px 6px; font-size: 12.5px; }
  .sect-body pre { font-size: 10.5px; padding: 10px; }
}

/* ───── TREATY (ΦNPT) ───── */
.treaty {
  margin-top: 16px;
  padding: 32px 28px;
  border: 1px solid #222;
  background: #050505;
  position: relative;
}

.treaty::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    var(--skynet) 0%, var(--skynet) 48%,
    var(--amber) 50%,
    var(--utopia) 52%, var(--utopia) 100%);
  opacity: 0.6;
}

.treaty-head {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px dashed #222;
}

.treaty-kicker {
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--dim);
  margin-bottom: 10px;
}

.treaty h2 {
  font-size: clamp(16px, 2.4vw, 22px);
  font-weight: 800;
  letter-spacing: 0.1em;
  margin: 0 0 12px;
  color: var(--amber);
}

.treaty-lede {
  font-size: 13px;
  color: var(--fg);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

.articles {
  list-style: none;
  counter-reset: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 28px;
}

.articles > li {
  padding: 18px;
  background: #080808;
  border: 1px solid #161616;
}

.articles h3 {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--utopia);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #161616;
}

.articles ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--fg);
}

.articles ul li {
  padding-left: 14px;
  position: relative;
}

.articles ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--amber);
  font-weight: 700;
}

.articles b { color: var(--amber); font-weight: 700; }

@media (max-width: 720px) {
  .treaty { padding: 24px 18px; }
  .treaty-head { margin-bottom: 20px; padding-bottom: 16px; }
  .treaty h2 { letter-spacing: 0.06em; }
  .articles { grid-template-columns: 1fr; gap: 12px; }
  .articles > li { padding: 14px; }
  .articles ul { font-size: 12px; }
}

/* ───── LANG SWITCH ───── */
.lang-switch {
  position: fixed;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 4px;
  z-index: 10;
}

.lang-switch button {
  width: 32px;
  height: 32px;
  padding: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--dim);
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #222;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.lang-switch button[aria-current="true"] {
  color: var(--amber);
  border-color: var(--amber);
}

.lang-switch button:hover {
  color: var(--fg);
  border-color: var(--fg);
}

/* ───── MOBILE ───── */
@media (max-width: 720px) {
  body { padding: 16px 12px 64px; }
  main { gap: 32px; }
  .grid-2col { grid-template-columns: 1fr; gap: 12px; }
  .hero h1 { letter-spacing: 0.04em; }
  .hero { padding-top: 40px; }
  .attractor { padding: 18px; }
  .attractor header { margin-bottom: 12px; padding-bottom: 10px; }
  dl { font-size: 12px; gap: 4px 12px; }
  .badge { font-size: 12px; letter-spacing: 0.16em; }
  .sub { font-size: 11px; }
  .countdown-label { font-size: 10px; letter-spacing: 0.3em; }
  .countdown-caption { font-size: 11px; letter-spacing: 0.06em; }
  .sub-countdown { font-size: 12px; }
  .timeline svg { max-width: 560px; margin: 0 auto; }
  .timeline text { font-size: 10px; }
  .cta { gap: 8px; }
  .btn { padding: 12px 18px; font-size: 12px; letter-spacing: 0.12em; }
  .foot { font-size: 10px; }
  .lang-switch { top: 8px; right: 8px; }
  .lang-switch button { width: 28px; height: 28px; font-size: 11px; }
}

@media (max-width: 420px) {
  body { padding: 12px 10px 56px; }
  main { gap: 24px; }
  .hero h1 { font-size: 17px; letter-spacing: 0.03em; margin-bottom: 20px; }
  .countdown-value { font-size: 34px; letter-spacing: 0; }
  .countdown-caption { font-size: 10px; }
  .attractor { padding: 14px; }
  dl { grid-template-columns: auto 1fr; }
  dd { font-size: 12px; }
  .btn { padding: 10px 14px; font-size: 11px; flex: 1 1 140px; text-align: center; }
  .cta { flex-wrap: wrap; }
  .statement { font-size: 13px; line-height: 1.6; }
}

/* landscape phones: keep hero tight */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .hero { padding-top: 8px; }
  .countdown-value { font-size: 40px; }
  main { gap: 20px; }
}

/* ───── REDUCED MOTION ───── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

