/* Sete a Zero — migration theme. Tight token palette ported from the legacy site. */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --text: #161a2b;
  --muted: #555d7a;
  --border: #d7dceb;
  --accent: #3f47d6;
  --accent-hover: #3239ad;
  --btn-bg: #3f47d6;
  --btn-bg-hover: #3239ad;
  --on-accent: #ffffff;
  --stage-bg: #0b0d18;
  --stage-text: #c8cbe9;
  --veil: rgba(0, 0, 0, .42);
  --spinner-track: rgba(255, 255, 255, .18);
  --stage-shadow: 0 18px 48px rgba(0, 0, 0, .35);
  --shadow-sm: 0 1px 2px rgba(15, 20, 40, .06);
  --shadow-md: 0 10px 28px rgba(15, 20, 40, .12);
  --radius: 14px;
  --radius-sm: 8px;
  --header-h: 60px;
  --maxw: 1280px;
  --readw: 860px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
:root[data-theme="dark"] {
  --bg: #131320;
  --surface: #1a1a2b;
  --surface-2: #23253c;
  --text: #f4f5ff;
  --muted: #aab0da;
  --border: #2b2b40;
  --accent: #9299ff;
  --accent-hover: #b0b6ff;
  --shadow-md: 0 10px 28px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  transition: background-color .25s ease, color .25s ease;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  max-width: var(--maxw); margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 24px;
  padding: 0 16px;
}
.brand {
  font-size: 22px; font-weight: 300; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text); white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.main-nav a {
  padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--text); font-size: 15px; font-weight: 600;
}
.main-nav a:hover { background: var(--surface-2); text-decoration: none; }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  height: 38px; min-width: 38px; padding: 0 12px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); border-radius: 999px; font-size: 13px;
}
.icon-btn:hover { background: var(--surface-2); }
.menu-toggle { display: none; }

/* ---------- Layout ---------- */
.page-wrap { max-width: var(--maxw); margin: 0 auto; padding: 16px; }
.layout-split {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px; align-items: start;
}
.layout-read { max-width: var(--readw); margin: 0 auto; padding: 24px 16px 48px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  overflow: hidden;
}

/* ---------- Game stage ---------- */
.stage {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: var(--stage-bg); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--stage-shadow);
}
.stage-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage-cover {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  cursor: pointer; background: var(--stage-bg);
}
.stage-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage-cover .veil { position: absolute; inset: 0; background: var(--veil); display: flex; align-items: center; justify-content: center; }
.play-big {
  position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 10px;
  background: transparent; border: 0; color: var(--on-accent); font-size: 18px; font-weight: 600;
}
.play-big .circle {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--btn-bg); display: flex; align-items: center; justify-content: center;
  transition: transform .2s ease, background .2s ease;
}
.stage-cover:hover .play-big .circle { transform: scale(1.08); background: var(--btn-bg-hover); }
.stage-loading {
  position: absolute; inset: 0; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: var(--stage-bg); color: var(--stage-text);
}
.stage[data-gf-state="loading"] .stage-loading { display: flex; }
.stage[data-gf-state="loading"] .stage-cover { display: none; }
.spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid var(--spinner-track); border-top-color: var(--accent);
  animation: gf-spin .9s linear infinite;
}
@keyframes gf-spin { to { transform: rotate(360deg); } }
.stage-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 10px; flex-wrap: wrap;
}
.stage-actions { display: flex; align-items: center; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 42px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: 14px; font-weight: 600;
}
.pill:hover { background: var(--surface-2); }
.pill[data-gf-liked], .pill[aria-pressed="true"] {
  background: var(--surface-2); border-color: var(--accent); color: var(--accent);
}
.pill.primary { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--on-accent); }
.pill.primary:hover { background: var(--btn-bg-hover); }
.source-note {
  margin-top: 10px; padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--muted); font-size: 12px; line-height: 1.6;
}

/* ---------- Article / prose ---------- */
.article-card { margin-top: 16px; }
.article-body { padding: 24px 24px 8px; }
.article-body .lead { font-size: 15px; color: var(--muted); margin: 0 0 20px; }
.prose { max-width: 70ch; }
.prose h1 { font-size: 34px; line-height: 1.2; font-weight: 700; margin: 0 0 20px; }
.prose h2 {
  font-size: 24px; font-weight: 700; margin: 36px 0 14px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.prose h3 { font-size: 19px; font-weight: 700; margin: 26px 0 10px; }
.prose p { color: var(--muted); margin: 0 0 18px; }
.prose strong { color: var(--text); }
.prose ul, .prose ol { color: var(--muted); padding-left: 22px; margin: 0 0 18px; }
.prose li { margin-bottom: 7px; }
.prose ul li::marker { color: var(--accent); }
.prose a { font-weight: 600; }
.prose img { border-radius: var(--radius-sm); margin: 20px 0; }
.prose blockquote {
  margin: 20px 0; padding: 10px 18px; border-left: 4px solid var(--accent);
  background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic; color: var(--muted);
}
.prose code {
  background: var(--surface-2); border-radius: 4px; padding: 2px 6px;
  font-size: 14px; color: var(--accent);
}
.prose table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 14px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 12px 14px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); color: var(--text); font-weight: 700; }
.prose td { color: var(--muted); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 22px 0; }
.info-box { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px; background: var(--surface); }
.info-box .k { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
.info-box .v { font-size: 20px; font-weight: 700; margin: 0 0 6px; }
.info-box .d { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.5; }
.link-card {
  display: block; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 18px; margin-bottom: 12px; background: var(--surface); color: inherit;
}
.link-card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); transition: transform .2s ease; }
.link-card .k { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.link-card .v { font-size: 17px; font-weight: 700; margin: 6px 0; color: var(--text); }
.link-card .d { font-size: 13px; color: var(--muted); margin: 0; }
.expand-bar { border-top: 1px solid var(--border); padding: 14px; text-align: center; }
.expand-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; color: var(--muted); font-size: 16px;
}
.expand-btn:hover { color: var(--text); }
.article-collapse { max-height: 720px; overflow: hidden; position: relative; transition: max-height .5s ease; }
.article-collapse.open { max-height: none; overflow: visible; }
.article-collapse:not(.open)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px;
  background: linear-gradient(to top, var(--surface), transparent); pointer-events: none;
}

/* ---------- Side rail ---------- */
.side-rail { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--header-h) + 16px); }
.rail-title { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.promo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.promo-card {
  display: block; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-2);
  transition: transform .2s ease;
}
.promo-card:hover { transform: translateY(-3px); text-decoration: none; }
.promo-card img { aspect-ratio: 4/3; width: 100%; object-fit: cover; }
.promo-card span { display: block; font-size: 12px; padding: 7px 9px; color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-label { text-align: center; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }

/* ---------- Comments / engage ---------- */
.engage-section { border-top: 1px solid var(--border); padding: 20px 24px 24px; }
.engage-section h2 { font-size: 18px; margin: 0 0 14px; }
.comment { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 12px; background: var(--surface); }
.comment .c-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.comment .c-name { font-weight: 700; font-size: 14px; }
.comment[data-gf-owner] { border-color: var(--accent); background: var(--surface-2); }
.owner-tag { font-size: 12px; background: var(--btn-bg); color: var(--on-accent); border-radius: 999px; padding: 2px 8px; }
.comment .c-text { margin: 0; font-size: 14px; color: var(--text); white-space: pre-wrap; }
.comment .c-time { font-size: 12px; color: var(--muted); }
.comment-replies { margin-top: 10px; padding-left: 16px; border-left: 2px solid var(--border); }
.comment-form { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.comment-form input, .comment-form textarea {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); padding: 11px 13px; font-size: 14px; font-family: inherit;
}
.comment-form textarea { min-height: 96px; resize: vertical; }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--accent); }
.comment-form button { align-self: flex-start; }
.form-msg { font-size: 13px; color: var(--accent); margin: 0; }
.empty-hint { color: var(--muted); font-size: 14px; padding: 14px; border: 1px dashed var(--border); border-radius: var(--radius-sm); text-align: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 48px; }
.site-footer .inner { max-width: var(--maxw); margin: 0 auto; padding: 32px 16px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.footer-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.footer-desc { font-size: 14px; color: var(--muted); margin: 0; max-width: 520px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { color: var(--muted); font-size: 14px; }
.footer-links a:hover { color: var(--text); }
.footer-copy { width: 100%; font-size: 13px; color: var(--muted); margin: 8px 0 0; }

/* ---------- Legal / content header ---------- */
.page-head { border-bottom: 1px solid var(--border); padding: 26px 24px; }
.page-head .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.page-head h1 { font-size: 30px; margin: 0 0 10px; line-height: 1.25; }
.page-head p { margin: 0; font-size: 14px; color: var(--muted); }
.legal-card .article-body { padding-top: 26px; }

/* ---------- Locale ---------- */
.locale-switch { position: relative; }
.locale-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 150px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); padding: 6px; display: none;
}
.locale-switch.open .locale-menu { display: block; }
.locale-menu a { display: block; padding: 9px 12px; border-radius: 6px; color: var(--text); font-size: 14px; }
.locale-menu a:hover { background: var(--surface-2); text-decoration: none; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
  max-width: 720px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 18px 20px;
  display: none; gap: 14px; align-items: center; flex-wrap: wrap;
}
.cookie-banner.show { display: flex; }
.cookie-banner p { margin: 0; font-size: 14px; color: var(--muted); flex: 1 1 320px; }
.cookie-banner .btns { display: flex; gap: 10px; }

/* ---------- 404 ---------- */
.error-page { max-width: 640px; margin: 80px auto; text-align: center; padding: 0 16px; }
.error-page .code { font-size: 64px; font-weight: 800; color: var(--accent); margin: 0; }
.error-page h1 { font-size: 28px; margin: 8px 0 12px; }
.error-page p { color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .layout-split { grid-template-columns: 1fr; }
  .side-rail { position: static; }
}
@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; bottom: 0; width: 280px;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border-right: 1px solid var(--border);
    padding: 16px; transform: translateX(-100%); transition: transform .25s ease; z-index: 49;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { font-size: 16px; padding: 12px; }
  .brand { font-size: 17px; letter-spacing: .1em; }
  .article-body, .engage-section { padding-left: 16px; padding-right: 16px; }
  .prose h1 { font-size: 27px; }
  .prose h2 { font-size: 21px; }
  .page-wrap { padding: 12px; }
  .pill { min-height: 44px; padding: 0 15px; }
  .promo-grid { grid-template-columns: repeat(3, 1fr); }
}
