:root {
  --bg: #f5f7fb;
  --card: rgba(255, 255, 255, 0.86);
  --text: #182033;
  --muted: #667085;
  --line: #e6eaf2;
  --blue: #1d4ed8;
  --blue-dark: #173a8a;
  --sky: #eaf3ff;
  --gold: #b7791f;
  --green: #0f8a5f;
  --green-soft: #e7f8ef;
  --red: #c62828;
  --red-soft: #ffe6e8;
  --shadow: 0 24px 70px rgba(29, 78, 216, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top left, #dbeafe 0, transparent 34%), var(--bg);
  color: var(--text);
}

.page-glow {
  position: fixed;
  inset: auto -10% -30% auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(183, 121, 31, .22), transparent 65%);
  pointer-events: none;
  z-index: -1;
}

.hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 24px 30px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,.65);
  background: rgba(255,255,255,.56);
  backdrop-filter: blur(18px);
  border-radius: 28px;
  box-shadow: 0 14px 40px rgba(16, 24, 40, .06);
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 18px;
  color: white;
  font-weight: 800;
  letter-spacing: .5px;
  background: linear-gradient(135deg, var(--blue), #0f172a);
  box-shadow: 0 14px 30px rgba(29, 78, 216, .26);
}
.brand-kicker { margin: 0 0 3px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.brand h1 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.nav-pill {
  text-decoration: none;
  color: var(--blue-dark);
  font-weight: 700;
  background: #fff;
  border: 1px solid var(--line);
  padding: 12px 18px;
  border-radius: 999px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr .85fr;
  gap: 24px;
  align-items: stretch;
  padding: 44px 0 18px;
}
.hero-copy, .summary-card, .rule-card, .table-card, .note-card {
  border: 1px solid rgba(255,255,255,.72);
  background: var(--card);
  backdrop-filter: blur(18px);
  border-radius: 34px;
  box-shadow: var(--shadow);
}
.hero-copy { padding: 44px; position: relative; overflow: hidden; }
.hero-copy::after {
  content: "";
  position: absolute;
  right: -70px; top: -70px;
  width: 210px; height: 210px;
  background: linear-gradient(135deg, rgba(29,78,216,.14), rgba(183,121,31,.12));
  border-radius: 50%;
}
.eyebrow, .section-title span {
  display: inline-flex;
  color: var(--blue);
  background: var(--sky);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 999px;
}
.hero-copy h2 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: .98;
  letter-spacing: -.07em;
  max-width: 780px;
}
.hero-copy p { font-size: 17px; line-height: 1.75; color: var(--muted); max-width: 780px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.primary-btn, .secondary-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 20px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 800;
}
.primary-btn { color: white; background: linear-gradient(135deg, var(--blue), #0f172a); box-shadow: 0 14px 28px rgba(29,78,216,.22); }
.secondary-btn { color: var(--blue-dark); background: white; border: 1px solid var(--line); }

.summary-card { padding: 28px; }
.summary-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.summary-head span { font-weight: 800; font-size: 20px; }
.summary-head small { color: var(--muted); font-weight: 600; }
.stats { display: grid; gap: 14px; }
.stat {
  padding: 20px;
  background: linear-gradient(135deg, #fff, #f8fbff);
  border: 1px solid var(--line);
  border-radius: 24px;
}
.stat strong { display: block; font-size: 36px; line-height: 1; letter-spacing: -.05em; }
.stat span { display: block; color: var(--muted); font-weight: 700; margin-top: 8px; }
.stat.danger { background: linear-gradient(135deg, #fff, var(--red-soft)); border-color: #ffc9ce; }
.stat.danger strong, .stat.danger span { color: var(--red); }

main { max-width: 1240px; margin: 0 auto; padding: 0 24px 40px; }
.section-title { margin: 22px 0 18px; }
.section-title h2 { margin: 14px 0 0; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.05em; }
.rules-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rule-card { padding: 26px; }
.rule-icon {
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 16px;
  background: #0f172a; color: white; font-weight: 800;
}
.rule-card h3 { margin: 18px 0 8px; font-size: 21px; }
.rule-card p { color: var(--muted); line-height: 1.7; margin: 0; }

.table-title-row { display: flex; justify-content: space-between; gap: 18px; align-items: end; }
.tools { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
input, select {
  height: 46px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: white;
  color: var(--text);
  padding: 0 14px;
  font: inherit;
  font-weight: 600;
  outline: none;
}
input { min-width: 280px; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin: 0 0 14px; color: var(--muted); font-weight: 700; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 999px; margin-right: 7px; }
.dot.green { background: var(--green); }
.dot.red { background: var(--red); }
.dot.gold { background: var(--gold); }

.table-card { overflow: hidden; padding: 0; }
.table-card { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1120px; background: rgba(255,255,255,.8); }
th {
  position: sticky; top: 0;
  background: #0f172a;
  color: white;
  font-size: 12px;
  text-align: left;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 16px 14px;
  z-index: 1;
}
td {
  padding: 15px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 14px;
  line-height: 1.45;
}
tbody tr:nth-child(even):not(.row-danger) { background: #fafcff; }
tbody tr:hover { background: #eef6ff; }
.row-danger { background: var(--red-soft) !important; }
.row-danger td { border-bottom-color: #ffc7cc; }
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
}
.badge.ok { color: var(--green); background: var(--green-soft); }
.badge.no { color: var(--red); background: #fff1f2; border: 1px solid #ffc7cc; }

.note-section { margin-top: 26px; }
.note-card { padding: 26px 30px; border-left: 7px solid var(--gold); }
.note-card h3 { margin: 0 0 8px; }
.note-card p { color: var(--muted); line-height: 1.7; margin: 0; }
footer { text-align: center; color: var(--muted); padding: 28px; font-size: 14px; }

@media (max-width: 920px) {
  .hero-grid, .rules-grid { grid-template-columns: 1fr; }
  .hero-copy { padding: 30px; }
  .table-title-row { align-items: stretch; flex-direction: column; }
  .tools { justify-content: stretch; }
  input, select { width: 100%; }
  .topbar { align-items: flex-start; flex-direction: column; }
}
