:root {
  --bg: #0f1117;
  --panel: #181b24;
  --panel-2: #1f2330;
  --ink: #eef1f7;
  --muted: #9aa3b5;
  --line: #2a2f3d;
  --accent: #ffb020;
  --accent-2: #4cc9f0;
  --gta6: #ff7a3d;
  --other: #5b8def;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

header.site { border-bottom: 1px solid var(--line); padding: 16px 0; position: sticky; top: 0; background: rgba(15,17,23,.92); backdrop-filter: blur(8px); z-index: 10; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-weight: 800; letter-spacing: -0.5px; font-size: 18px; }
.brand span { color: var(--accent); }
nav a { color: var(--muted); font-size: 14px; margin-left: 18px; }
nav a:hover { color: var(--ink); text-decoration: none; }
nav a.active { color: var(--accent); }

.hero { padding: 46px 0 26px; }
.hero h1 { font-size: clamp(28px, 5vw, 46px); line-height: 1.14; margin: 0 0 14px; letter-spacing: -1.2px; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p.lede { font-size: 17px; color: var(--muted); max-width: 720px; margin: 0 0 8px; }
.kicker { color: var(--accent); font-weight: 700; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; margin-bottom: 10px; }

.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin: 24px 0 16px;
}
.toolbar label { font-size: 13px; color: var(--muted); }
select, button, input[type="search"] {
  font: inherit; color: var(--ink); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px;
}
select { min-width: 230px; cursor: pointer; }
button { cursor: pointer; }
button:hover { border-color: var(--accent); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: transparent; padding: 9px 14px; color: var(--muted); }
.seg button.on { background: var(--accent); color: #111; font-weight: 700; }

.result { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; min-height: 340px; display: flex; flex-direction: column; align-items: center;
}
.card h3 { margin: 0 0 2px; font-size: 15px; text-align: center; }
.card .region { color: var(--muted); font-size: 12px; margin-bottom: 14px; text-align: center; }
.square-wrap { flex: 1; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 212px; }
.square {
  position: relative; border-radius: 6px; display: flex; align-items: center; justify-content: center;
  transition: width .4s cubic-bezier(.2,.8,.2,1), height .4s cubic-bezier(.2,.8,.2,1);
  min-width: 30px; min-height: 30px;
}
.card.a .square { background: linear-gradient(135deg, #ff7a3d, #ff5e3a); box-shadow: 0 8px 28px rgba(255,122,61,.25); }
.card.b .square { background: linear-gradient(135deg, #5b8def, #3f6fd8); box-shadow: 0 8px 28px rgba(91,141,239,.22); }
.square .sq-label { font-size: 10px; font-weight: 800; color: rgba(0,0,0,.6); }
.area-num { font-size: 25px; font-weight: 800; margin-top: 12px; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.area-unit { color: var(--muted); font-size: 12px; }
.area-mi { color: var(--muted); font-size: 12px; margin-top: 2px; }

.verdict {
  background: linear-gradient(135deg, rgba(255,176,32,.13), rgba(255,122,61,.06));
  border: 1px solid rgba(255,176,32,.35); border-radius: var(--radius);
  padding: 22px; text-align: center; margin: 16px 0;
}
.verdict .big { font-size: clamp(26px, 5vw, 42px); font-weight: 800; color: var(--accent); letter-spacing: -1px; line-height: 1.1; }
.verdict .txt { color: var(--muted); font-size: 14px; margin-top: 4px; }
.verdict .ratio-note { color: var(--ink); font-size: 15px; margin-top: 8px; }

.conf { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; border: 1px solid var(--line); white-space: nowrap; }
.conf.high { color: #5fe0a0; border-color: #235c43; }
.conf.medium { color: #ffd166; border-color: #6b5620; }
.conf.low { color: #ff8f8f; border-color: #6b2b2b; }

section.block { margin: 38px 0; }
section.block h2 { font-size: 21px; letter-spacing: -0.4px; margin: 0 0 12px; }
section.block h3 { font-size: 16px; margin: 22px 0 8px; }
section.block p { color: var(--muted); }
section.block ul { color: var(--muted); padding-left: 22px; }
section.block li { margin-bottom: 6px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
td.num { font-variant-numeric: tabular-nums; text-align: right; }
tr.hl td { color: var(--accent); font-weight: 700; }
.table-scroll { overflow-x: auto; }

details { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; background: var(--panel); }
details summary { cursor: pointer; font-weight: 600; font-size: 14px; }
details p, details li { color: var(--muted); font-size: 13.5px; }

.disclaimer { border-left: 3px solid var(--accent); background: var(--panel); padding: 14px 18px; border-radius: 0 10px 10px 0; color: var(--muted); font-size: 13px; }
.aff-box { background: var(--panel); border: 1px dashed var(--line); border-radius: 10px; padding: 16px; margin: 16px 0; font-size: 14px; }
.aff-box strong { color: var(--ink); }
.aff-box .small { color: var(--muted); font-size: 12px; }

footer.site { border-top: 1px solid var(--line); padding: 26px 0 50px; margin-top: 46px; color: var(--muted); font-size: 13px; }
footer.site a { color: var(--muted); }
.src-list { font-size: 13px; padding-left: 20px; }
.src-list li { margin-bottom: 5px; }

@media (max-width: 720px) {
  .result { grid-template-columns: 1fr; }
  select { min-width: 0; width: 100%; }
  nav a { margin-left: 10px; font-size: 12.5px; }
  table { font-size: 12.5px; }
  th, td { padding: 8px 6px; }
}
