:root {
  --bg: rgb(239, 245, 247);
  --surface: rgb(252, 254, 255);
  --surface-soft: rgb(245, 250, 252);
  --text: rgb(39, 52, 60);
  --muted: rgb(96, 110, 119);
  --primary: rgb(72, 121, 151);
  --primary-dark: rgb(55, 97, 123);
  --line: rgb(201, 215, 222);
  --good: rgb(92, 156, 112);
  --mid: rgb(176, 145, 90);
  --high: rgb(175, 92, 92);
  --shadow: 0 16px 40px rgba(45, 68, 84, 0.12);
}

body.dark {
  --bg: rgb(28, 39, 46);
  --surface: rgb(44, 56, 65);
  --surface-soft: rgb(53, 67, 77);
  --text: rgb(229, 238, 243);
  --muted: rgb(177, 192, 199);
  --primary: rgb(103, 149, 174);
  --primary-dark: rgb(77, 121, 147);
  --line: rgb(81, 101, 115);
  --shadow: 0 18px 36px rgba(7, 12, 18, 0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  background: radial-gradient(circle at top right, rgba(183, 206, 220, 0.25), transparent 40%), var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background .3s ease, color .3s ease;
}

.container { width: min(1140px, 92%); margin: 0 auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, white 12%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.header-row {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}
.brand {
  text-decoration: none;
  color: var(--primary-dark);
  font-weight: 800;
  letter-spacing: .2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 99px;
  background: linear-gradient(135deg, rgb(139, 188, 211), var(--primary-dark));
  box-shadow: 0 0 0 5px rgba(131, 172, 194, 0.2);
}
.tab-nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tab-btn {
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 8px 14px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.tab-btn:hover { transform: translateY(-1px); }
.tab-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(60, 95, 117, 0.25);
}
.btn-theme {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 8px 12px;
  cursor: pointer;
}
.main-wrap { padding: 28px 0 14px; }
.tab-panel { display: none; animation: fadePanel .3s ease; }
.tab-panel.active { display: block; }

@keyframes fadePanel {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, white 12%), var(--surface));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
}
h1, h2, h3, h4 { margin-top: 0; line-height: 1.2; }
h1 { font-size: clamp(2rem, 4.8vw, 3.3rem); margin-bottom: 12px; }
.eyebrow { color: var(--muted); font-weight: 700; margin: 0 0 10px; }
.section-head p, .small-note { color: var(--muted); }
.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.hero-copy p { max-width: 60ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn-primary, .btn-secondary {
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 10px 16px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 10px 18px rgba(69, 111, 137, 0.26);
}
.btn-secondary {
  background: var(--surface-soft);
  color: var(--primary-dark);
  border-color: var(--line);
}
.btn-primary:hover, .btn-secondary:hover { transform: translateY(-2px); }
.hero-pills {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero-pills span {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .9rem;
  color: var(--muted);
}
.hero-side { display: grid; gap: 10px; }
.mini-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface-soft) 90%, white 10%);
}
.mini-card.accent { border-left: 5px solid var(--primary); }
.stat-number { margin: 0; font-size: 1.4rem; font-weight: 800; color: var(--primary-dark); }
.stat-label { margin: 3px 0 0; color: var(--muted); font-size: .92rem; }
.tip-day { margin: 6px 0 0; font-weight: 600; }
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.value-card h3 { margin-bottom: 8px; }
.video-section {
  margin-top: 14px;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 14px;
  align-items: center;
}
.video-frame {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgb(20, 28, 33);
  min-height: 320px;
}
.video-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  display: block;
}
.showcase-flow { display: grid; gap: 12px; margin-top: 14px; }
.split-block { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: center; }
.split-block.reverse .split-media { order: 2; }
.split-media { min-height: 420px; }
.split-content h3 { margin-bottom: 8px; }
.ceo-card { border-left: 6px solid var(--primary); }
.photo-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(140deg, rgba(156, 190, 208, 0.25), rgba(215, 231, 238, 0.32));
}
.photo-frame img {
  width: 100%;
  height: 420px;
  object-fit: contain;
  background: color-mix(in srgb, var(--surface-soft) 88%, white 12%);
  display: block;
}
.support-block { border-left: 5px solid color-mix(in srgb, var(--primary) 70%, var(--line) 30%); }
.support-contact { font-weight: 700; margin-top: 10px; }
.support-contact a { color: var(--primary-dark); }
.question { margin: 0 0 16px; padding-bottom: 12px; border: 0; border-bottom: 1px dashed var(--line); }
.question legend { font-weight: 700; margin-bottom: 10px; }
.scale-group { display: flex; flex-wrap: wrap; gap: 8px; }
.scale-option {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--surface-soft);
}
.error-message { min-height: 22px; color: var(--high); font-weight: 700; }
.result { margin-top: 14px; border-left: 7px solid rgb(140, 173, 153); }
.result-category { font-weight: 700; font-size: 1.1rem; }
.result-animate { animation: pop .42s ease; }
@keyframes pop {
  from { transform: translateY(8px) scale(.98); opacity: .45; }
  to { transform: none; opacity: 1; }
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 14px;
}
.metric-card p { margin: 0; font-size: 1.45rem; font-weight: 800; color: var(--primary-dark); }
.progress-grid { display: grid; grid-template-columns: 1.5fr .85fr; gap: 12px; }
.chart-card { min-height: 470px; }
.legend-row { display: flex; gap: 8px; margin-bottom: 10px; }
.legend-pill { border-radius: 999px; padding: 5px 10px; font-size: .86rem; color: white; }
.legend-pill.low { background: var(--good); }
.legend-pill.mid { background: var(--mid); }
.legend-pill.high { background: var(--high); }
#progressChart { width: 100% !important; height: 360px !important; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 8px 4px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.checklist { display: grid; gap: 8px; }
details { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
summary { cursor: pointer; font-weight: 700; }
.quote-card { text-align: center; }
.contact-list a { color: var(--primary-dark); text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.footer { margin-top: 20px; padding: 0 0 18px; color: var(--muted); }
.footer-contact-bar {
  margin-top: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 24%, var(--surface) 76%), var(--surface));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}
.footer-contact-bar h3 { margin: 0 0 4px; color: var(--primary-dark); }
.footer-contact-bar p { margin: 0; }
.footer-list { margin: 0; padding-left: 18px; }
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .header-row { grid-template-columns: 1fr; padding: 10px 0; }
  .tab-nav { justify-content: flex-start; }
  .hero, .value-grid, .video-section, .stats-grid, .progress-grid, .about-grid, .split-block, .footer-contact-bar { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .card { padding: 14px; }
  .btn-primary, .btn-secondary, .btn-theme { width: 100%; }
  .tab-btn { min-height: 44px; }
  .scale-option { min-height: 44px; }
  .photo-frame,
  .photo-frame img { height: 300px; min-height: 300px; }
}
