:root {
  --white: #ffffff;
  --bg: #f6f7fb;
  --bg-alt: #eef1f8;
  --bg-card: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #5a5a7a;
  --text-muted: #8a8aa0;
  --accent: #6c5ce7;
  --accent-hover: #5a4bd4;
  --accent-light: rgba(108, 92, 231, 0.1);
  --accent-glow: rgba(108, 92, 231, 0.22);
  --accent-secondary: #00b8b3;
  --success: #00b894;
  --warning: #e08a00;
  --danger: #e17055;
  --border: #e2e4ed;
  --border-light: #eceef5;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(26, 26, 46, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 26, 46, 0.08);
  --shadow-lg: 0 16px 40px rgba(26, 26, 46, 0.1);
  --header-h: 68px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }
h1, h2, h3, h4 { font-family: Manrope, Inter, sans-serif; line-height: 1.2; letter-spacing: -0.02em; }

.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.container-wide { width: min(1200px, calc(100% - 40px)); margin: 0 auto; }

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: rgba(246, 247, 251, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
}
.header.scrolled { border-bottom-color: var(--border); background: rgba(255, 255, 255, 0.9); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: Manrope, sans-serif; font-weight: 800; font-size: 18px; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent);
  display: grid; place-items: center;
  box-shadow: 0 6px 16px var(--accent-glow);
}
.logo span { color: var(--text-muted); font-weight: 600; font-size: 13px; }
.nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.nav a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
}
.nav a:hover { color: var(--text-primary); background: var(--accent-light); }
.nav-toggle { display: none; margin-left: auto; border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 8px 10px; cursor: pointer; }

.hero { padding: 36px 0 20px; position: relative; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
}
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-secondary); display: block; }
h1 { font-size: clamp(34px, 4.4vw, 54px); margin: 16px 0 14px; max-width: 14ch; }
.lead { font-size: 18px; color: var(--text-secondary); max-width: 58ch; }
.hero-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 18px; border-radius: 12px;
  font-weight: 700; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px var(--accent-glow); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: #fff; border-color: var(--border); color: var(--text-primary); }
.btn-ghost:hover { border-color: var(--accent); }

.panel-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow-lg);
}
.section-svg { width: 100%; height: auto; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 28px; }
.stat {
  background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 16px 16px 14px;
}
.stat b { display: block; font-family: Manrope, sans-serif; font-size: 22px; letter-spacing: -0.03em; }
.stat span { color: var(--text-secondary); font-size: 13px; }

section { padding: 56px 0; }
.section-head { max-width: 720px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(28px, 3vw, 38px); margin-bottom: 10px; }
.section-head p { color: var(--text-secondary); font-size: 17px; }
.alt { background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); }

.prose { color: var(--text-secondary); font-size: 16.5px; }
.prose strong { color: var(--text-primary); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-sm);
}
.card h3 { font-size: 18px; margin: 8px 0; }
.card p, .card li { color: var(--text-secondary); font-size: 14.5px; }
.card ul { padding-left: 18px; display: grid; gap: 6px; }
.tag {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--accent); background: var(--accent-light);
  border-radius: 999px; padding: 4px 8px;
}
.tag.teal { color: #0b7f7b; background: rgba(0, 184, 179, 0.12); }
.tag.warn { color: #9a5b00; background: rgba(224, 138, 0, 0.14); }

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border-light); font-size: 14.5px; vertical-align: top; }
th { background: #fafbff; color: var(--text-secondary); font-weight: 700; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap { overflow-x: auto; border-radius: 16px; }

.stack { display: grid; gap: 14px; }
.reason {
  background: #fff; border-left: 3px solid var(--accent-secondary);
  border-radius: 0 14px 14px 0; padding: 14px 16px; color: var(--text-secondary);
  border-top: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.reason b { color: var(--text-primary); }

.layers { display: grid; gap: 6px; }
.layer { border-radius: 10px; padding: 10px 12px; display: flex; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 650; }
.layer span { font-weight: 500; color: var(--text-secondary); }
.l-concrete { background: #ece7df; }
.l-mesh { background: rgba(0, 184, 179, 0.18); }
.l-eps { background: #efe7ff; }

.steps { display: grid; gap: 12px; }
.step { display: grid; grid-template-columns: 52px 1fr; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 14px; }
.step-n {
  width: 52px; height: 52px; border-radius: 14px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-family: Manrope, sans-serif; font-weight: 800; font-size: 18px;
}
.step h3 { font-size: 17px; margin-bottom: 4px; }
.step p { color: var(--text-secondary); font-size: 14.5px; }

.quiz { display: grid; gap: 14px; }
.q {
  background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 16px;
}
.q h3 { font-size: 17px; margin-bottom: 12px; }
.options { display: grid; gap: 8px; }
.opt {
  text-align: left; background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 12px; cursor: pointer; color: var(--text-primary); font-size: 14.5px;
}
.opt:hover { border-color: var(--accent); }
.opt.good { background: rgba(0, 184, 148, 0.12); border-color: var(--success); }
.opt.bad { background: rgba(225, 112, 85, 0.12); border-color: var(--danger); }
.opt:disabled { cursor: default; }
.explain { margin-top: 10px; color: var(--text-secondary); font-size: 14.5px; }
.score { font-family: Manrope, sans-serif; font-weight: 800; }

.footer { padding: 28px 0 40px; color: var(--text-muted); font-size: 13px; border-top: 1px solid var(--border); }
.footer a { color: var(--accent); font-weight: 700; }

@media (max-width: 900px) {
  .hero-grid, .cards, .cards-2, .stat-row { grid-template-columns: 1fr; }
  .nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 8px 16px 14px; flex-direction: column; align-items: stretch; }
  .nav.open { display: flex; }
  .nav-toggle { display: inline-flex; }
  h1 { max-width: none; }
}
