:root {
  color-scheme: light;
  --font-ui: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Manrope, sans-serif;
  --bg: #f5f6f8;
  --bg-soft: #eceff4;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --surface-muted: #f3f5f9;
  --surface-elevated: #ffffff;
  --line: #d9dfeb;
  --line-strong: #c5cedd;
  --text: #111217;
  --muted: #646b78;
  --muted-strong: #4b5361;
  --primary: #0a74ff;
  --primary-strong: #035fd1;
  --primary-soft: #e8f2ff;
  --success: #0a9d75;
  --warning-bg: #fff5e8;
  --warning-border: #f1d6aa;
  --warning-text: #8d5a07;
  --danger-bg: #fff1f1;
  --danger-border: #efb7b7;
  --danger-text: #af2c2c;
  --shadow-soft: 0 30px 70px rgba(15, 28, 52, 0.08);
  --shadow-card: 0 18px 44px rgba(11, 28, 51, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --container: 1180px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1218;
  --bg-soft: #171d27;
  --surface: rgba(22, 27, 37, 0.84);
  --surface-strong: #1f2633;
  --surface-muted: #242c3b;
  --surface-elevated: #202938;
  --line: #343f52;
  --line-strong: #45556d;
  --text: #f5f7fb;
  --muted: #a2abbb;
  --muted-strong: #c2cad7;
  --primary: #4da1ff;
  --primary-strong: #78b7ff;
  --primary-soft: #1f3e60;
  --success: #27c49a;
  --warning-bg: #3e3323;
  --warning-border: #67573a;
  --warning-text: #ffd49a;
  --danger-bg: #42272b;
  --danger-border: #75474f;
  --danger-text: #ffb8be;
  --shadow-soft: 0 30px 70px rgba(0, 0, 0, 0.42);
  --shadow-card: 0 18px 44px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.58;
  background:
    radial-gradient(circle at 10% 8%, rgba(11, 116, 255, 0.13), transparent 38%),
    radial-gradient(circle at 90% 82%, rgba(86, 194, 164, 0.13), transparent 35%),
    linear-gradient(160deg, #ffffff 0%, #f7f8fb 38%, var(--bg) 100%);
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 10% 8%, rgba(54, 128, 210, 0.19), transparent 38%),
    radial-gradient(circle at 90% 82%, rgba(58, 132, 114, 0.16), transparent 35%),
    linear-gradient(160deg, #171c26 0%, #121821 40%, var(--bg) 100%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

::selection {
  background: rgba(10, 116, 255, 0.22);
  color: var(--text);
}

.container {
  width: min(100% - 42px, var(--container));
  margin-inline: auto;
}

.noise-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.28;
  background-image: radial-gradient(rgba(17, 23, 37, 0.05) 0.45px, transparent 0.45px);
  background-size: 4px 4px;
}

html[data-theme="dark"] .noise-layer {
  opacity: 0.17;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 0.45px, transparent 0.45px);
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(86px);
  z-index: -2;
  opacity: 0.66;
}

.orb-1 {
  top: 96px;
  left: -125px;
  width: 360px;
  height: 360px;
  background: #bfdfff;
}

.orb-2 {
  right: -120px;
  bottom: 70px;
  width: 330px;
  height: 330px;
  background: #c5f0df;
}

html[data-theme="dark"] .orb-1 {
  background: #2f5e97;
}

html[data-theme="dark"] .orb-2 {
  background: #2f6357;
}

.glass {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px) saturate(165%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px) saturate(170%);
}

html[data-theme="dark"] .site-header {
  background: rgba(17, 22, 30, 0.78);
}

.nav {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.brand-wordmark {
  font-size: 1.92rem;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #5baeff, #7adbc0);
  color: #05213f;
  font-weight: 800;
}

.brand-badge-logo {
  width: 58px;
  height: 58px;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.8);
  transform-origin: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  border-radius: 999px;
  padding: 10px 15px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 610;
  letter-spacing: -0.01em;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
  background: var(--surface-muted);
}

.nav-links a.is-active {
  color: var(--text);
  background: rgba(10, 116, 255, 0.1);
}

.nav-links .nav-build-cta {
  color: #ffffff;
  border: 1px solid rgba(3, 95, 209, 0.8);
  background: linear-gradient(145deg, var(--primary), var(--primary-strong));
  box-shadow: 0 12px 28px rgba(10, 116, 255, 0.28);
}

.nav-links .nav-build-cta:hover,
.nav-links .nav-build-cta:focus-visible {
  color: #ffffff;
  background: linear-gradient(145deg, #2383ff, #0567df);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 11px;
  line-height: 1;
}

.theme-toggle {
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.8rem;
  line-height: 1;
}

.hero {
  position: relative;
}

.hero-home {
  padding: 86px 0 56px;
}

.hero-headline-band {
  margin-bottom: 24px;
}

.hero-status {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(10, 116, 255, 0.22);
  background: rgba(232, 242, 255, 0.76);
  color: var(--primary-strong);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html[data-theme="dark"] .hero-status {
  background: rgba(38, 65, 95, 0.66);
  border-color: rgba(96, 156, 228, 0.35);
  color: #9dc9ff;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  align-items: center;
  gap: 34px;
}

.hero-copy-shell {
  max-width: 640px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary-strong);
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-size: 0.74rem;
}

.hero h1,
.page-intro h1 {
  margin: 0;
  letter-spacing: -0.05em;
  line-height: 1.01;
  font-size: clamp(2.5rem, 5vw, 5.05rem);
}

.hero-copy {
  margin: 19px 0 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.06rem;
}

.hero-actions,
.form-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 0.93rem;
  font-weight: 620;
  letter-spacing: -0.01em;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.17s ease, box-shadow 0.17s ease, border-color 0.17s ease, background-color 0.17s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(145deg, var(--primary), var(--primary-strong));
  border-color: rgba(3, 95, 209, 0.88);
  box-shadow: 0 14px 30px rgba(10, 116, 255, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 16px 32px rgba(10, 116, 255, 0.33);
}

.btn-secondary {
  color: var(--text);
  background: var(--surface-strong);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  background: var(--surface-muted);
  border-color: var(--line);
}

.hero-trust {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.trust-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-md);
  padding: 14px;
}

html[data-theme="dark"] .trust-card {
  background: rgba(33, 41, 56, 0.66);
}

.trust-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 0.93rem;
  letter-spacing: -0.01em;
}

.trust-card span {
  color: var(--muted);
  font-size: 0.88rem;
}

.hero-panel {
  padding: 24px;
}

.hero-panel-preview {
  position: relative;
  overflow: hidden;
}

.hero-panel-preview::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(140deg, rgba(10, 116, 255, 0.12), transparent 36%, rgba(103, 198, 176, 0.11) 100%);
}

.panel-top {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(10, 157, 117, 0.18);
}

.protocol-preview {
  display: grid;
  gap: 11px;
  position: relative;
  z-index: 1;
}

.time-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 15px 15px 14px;
  background: rgba(249, 251, 255, 0.86);
}

html[data-theme="dark"] .time-block {
  background: rgba(35, 44, 60, 0.78);
}

.time-block h4 {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted-strong);
}

.time-block p {
  margin: 4px 0;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.014em;
}

.time-block small {
  color: var(--muted);
}

.section {
  padding: 74px 0;
}

.signature-band {
  padding-top: 0;
}

.signature-band-inner {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.signature-band-inner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.page-intro {
  padding: 52px 0 0;
}

.intro-shell {
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.intro-shell::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -36px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(10, 116, 255, 0.16), transparent 70%);
  pointer-events: none;
}

html[data-theme="dark"] .intro-shell::after {
  background: radial-gradient(circle, rgba(72, 151, 236, 0.18), transparent 70%);
}

.intro-shell h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.intro-shell p {
  margin: 14px 0 0;
  max-width: 66ch;
  color: var(--muted);
}

.intro-tags {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.section-heading {
  margin-bottom: 24px;
  max-width: 72ch;
}

.section-heading h2 {
  margin: 0;
  letter-spacing: -0.036em;
  font-size: clamp(1.86rem, 3vw, 3rem);
}

.section-heading p {
  margin: 10px 0 0;
  color: var(--muted);
}

.builder-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.builder-aside {
  padding: 22px;
  position: sticky;
  top: 104px;
}

.builder-aside h3 {
  margin: 0;
  letter-spacing: -0.02em;
  font-size: 1.22rem;
}

.builder-aside > p {
  margin: 9px 0 0;
  color: var(--muted);
}

.builder-points {
  margin: 16px 0 18px;
  display: grid;
  gap: 10px;
}

.builder-points p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.92rem;
}

.builder-main {
  min-width: 0;
}

.form-card,
.results-card,
.why-card,
.info-card,
.footer-note,
.quality-card {
  padding: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  font-size: 0.9rem;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.field-hint {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
  transition: border-color 0.17s ease, box-shadow 0.17s ease, background-color 0.17s ease;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: rgba(30, 38, 52, 0.9);
}

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #8790a0;
}

select[multiple] {
  min-height: 168px;
  padding: 7px;
}

select[multiple] option {
  border-radius: 8px;
  margin: 2px 0;
  padding: 6px 7px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(10, 116, 255, 0.52);
  box-shadow: 0 0 0 4px rgba(10, 116, 255, 0.16);
}

.hidden {
  display: none !important;
}

.yes-no-group {
  display: inline-flex;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  border-radius: 999px;
  padding: 4px;
}

.yes-no-option {
  position: relative;
}

.yes-no-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.yes-no-option span {
  min-width: 82px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 620;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.yes-no-option input:checked + span {
  border-color: rgba(10, 116, 255, 0.3);
  background: rgba(10, 116, 255, 0.11);
  color: var(--primary-strong);
}

.current-picker {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 10px;
}

.current-picker .btn {
  white-space: nowrap;
}

.selected-items {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selected-chip {
  border-radius: 999px;
  border: 1px solid rgba(10, 116, 255, 0.24);
  background: rgba(232, 242, 255, 0.84);
  color: #184b86;
  padding: 5px 11px;
  font-size: 0.82rem;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

html[data-theme="dark"] .selected-chip {
  color: #d5e9ff;
  background: rgba(36, 63, 94, 0.62);
  border-color: rgba(114, 166, 232, 0.35);
}

.selected-chip button {
  border: 0;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(10, 116, 255, 0.18);
  color: #1d4d83;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

html[data-theme="dark"] .selected-chip button {
  color: #d5e9ff;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px;
  background: rgba(249, 251, 255, 0.9);
}

.checkbox-grid input {
  width: auto;
  margin: 0;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
}

.results-grid-optimized {
  grid-template-columns: 1.2fr 0.8fr;
}

.results-primary-card {
  grid-row: span 2;
}

.protocol-overview {
  padding-bottom: 18px;
}

.protocol-summary-shell {
  padding: 28px;
}

.protocol-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.protocol-subtitle {
  margin-top: 12px;
  max-width: 62ch;
}

.protocol-summary-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.protocol-summary-meta {
  margin-top: 16px;
  display: grid;
  gap: 6px;
}

.protocol-stats {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.protocol-stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(249, 251, 255, 0.82);
  padding: 14px;
}

html[data-theme="dark"] .protocol-stat-card {
  background: rgba(34, 42, 56, 0.76);
}

.protocol-stat-card h3 {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: -0.015em;
}

.protocol-stat-card .stat-value {
  margin: 8px 0 4px;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.protocol-stat-card-confidence.confidence-high {
  border-color: rgba(36, 149, 86, 0.36);
  background: linear-gradient(145deg, rgba(237, 251, 242, 0.94), rgba(245, 255, 249, 0.9));
}

.protocol-stat-card-confidence.confidence-moderate {
  border-color: rgba(214, 158, 46, 0.34);
  background: linear-gradient(145deg, rgba(255, 248, 231, 0.92), rgba(255, 252, 242, 0.88));
}

.protocol-stat-card-confidence.confidence-cautious {
  border-color: rgba(225, 114, 54, 0.36);
  background: linear-gradient(145deg, rgba(255, 240, 234, 0.92), rgba(255, 248, 244, 0.88));
}

html[data-theme="dark"] .protocol-stat-card-confidence.confidence-high {
  border-color: rgba(93, 212, 149, 0.48);
  background: linear-gradient(145deg, rgba(20, 62, 44, 0.84), rgba(14, 46, 32, 0.84));
}

html[data-theme="dark"] .protocol-stat-card-confidence.confidence-moderate {
  border-color: rgba(234, 190, 98, 0.42);
  background: linear-gradient(145deg, rgba(78, 59, 24, 0.84), rgba(64, 48, 18, 0.84));
}

html[data-theme="dark"] .protocol-stat-card-confidence.confidence-cautious {
  border-color: rgba(245, 150, 102, 0.44);
  background: linear-gradient(145deg, rgba(84, 42, 28, 0.84), rgba(67, 33, 21, 0.84));
}

.protocol-confidence-pill,
.evidence-strength-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  vertical-align: middle;
}

.protocol-confidence-pill.confidence-high,
.evidence-strength-pill.evidence-high {
  color: #0f6b3f;
  background: rgba(20, 145, 80, 0.14);
  border-color: rgba(20, 145, 80, 0.3);
}

.protocol-confidence-pill.confidence-moderate,
.evidence-strength-pill.evidence-moderate {
  color: #7e5709;
  background: rgba(214, 158, 46, 0.17);
  border-color: rgba(214, 158, 46, 0.31);
}

.protocol-confidence-pill.confidence-cautious,
.evidence-strength-pill.evidence-emerging {
  color: #8a3d13;
  background: rgba(225, 114, 54, 0.15);
  border-color: rgba(225, 114, 54, 0.31);
}

html[data-theme="dark"] .protocol-confidence-pill.confidence-high,
html[data-theme="dark"] .evidence-strength-pill.evidence-high {
  color: #b8f6d8;
  background: rgba(32, 137, 83, 0.32);
  border-color: rgba(113, 225, 170, 0.46);
}

html[data-theme="dark"] .protocol-confidence-pill.confidence-moderate,
html[data-theme="dark"] .evidence-strength-pill.evidence-moderate {
  color: #ffdea0;
  background: rgba(176, 124, 33, 0.32);
  border-color: rgba(247, 204, 123, 0.44);
}

html[data-theme="dark"] .protocol-confidence-pill.confidence-cautious,
html[data-theme="dark"] .evidence-strength-pill.evidence-emerging {
  color: #ffd0b3;
  background: rgba(175, 92, 44, 0.33);
  border-color: rgba(245, 155, 112, 0.46);
}

.protocol-results-section {
  padding-top: 18px;
}

.results-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.results-tab {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.86rem;
  font-weight: 620;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

html[data-theme="dark"] .results-tab {
  background: rgba(32, 40, 54, 0.8);
}

.results-tab:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.results-tab.is-active {
  color: var(--primary-strong);
  border-color: rgba(10, 116, 255, 0.3);
  background: rgba(232, 242, 255, 0.88);
}

html[data-theme="dark"] .results-tab.is-active {
  color: #a5ceff;
  background: rgba(34, 65, 99, 0.72);
}

.results-panel {
  display: none;
}

.results-panel.is-active {
  display: block;
}

.results-panel-card {
  padding: 22px;
}

.section-intro-copy {
  margin: -4px 0 14px;
}

.insights-layout {
  display: grid;
  gap: 16px;
}

.schedule-time-group + .schedule-time-group {
  margin-top: 18px;
}

.schedule-time-head {
  margin-bottom: 10px;
}

.schedule-time-head h3 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.schedule-time-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.schedule-timeline-list {
  display: grid;
  gap: 10px;
}

.schedule-timeline-item {
  position: relative;
  padding: 14px;
}

.schedule-item-quick p {
  margin: 5px 0 0;
}

.schedule-item-quick p:first-child {
  margin-top: 0;
}

.schedule-detail-panel {
  margin-top: 10px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}

.schedule-detail-toggle {
  cursor: pointer;
  font-size: 0.84rem;
  color: var(--primary-strong);
  font-weight: 620;
}

.schedule-detail-panel[open] .schedule-detail-toggle {
  margin-bottom: 8px;
}

.schedule-detail-body {
  display: grid;
  gap: 4px;
}

.supplements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.supplement-filters-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.supplement-filter-dropdown {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

html[data-theme="dark"] .supplement-filter-dropdown {
  background: rgba(28, 36, 50, 0.82);
}

.supplement-filter-summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
}

.supplement-filter-summary::-webkit-details-marker {
  display: none;
}

.supplement-filter-summary::after {
  content: "▾";
  color: var(--muted-strong);
  font-size: 0.92rem;
  transition: transform 180ms ease;
}

.supplement-filter-dropdown[open] .supplement-filter-summary::after {
  transform: rotate(180deg);
}

.supplement-filter-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.supplement-filter-value {
  font-weight: 700;
  color: var(--text);
}

.supplement-filter-menu {
  border-top: 1px solid var(--line);
  padding: 8px;
  display: grid;
  gap: 6px;
  max-height: 300px;
  overflow: auto;
}

.supplement-filter-option {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  padding: 8px 10px;
  text-align: left;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

html[data-theme="dark"] .supplement-filter-option {
  background: rgba(20, 28, 42, 0.82);
}

.supplement-filter-option:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.supplement-filter-option.is-active {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary-soft) 72%, white 28%);
}

html[data-theme="dark"] .supplement-filter-option.is-active {
  background: color-mix(in srgb, var(--primary-soft) 36%, #0b1220 64%);
}

.supplement-filter-no-items {
  margin: 2px 2px 4px;
}

.supplement-filter-note,
.supplement-filter-empty {
  margin: 0 0 10px;
}

.food-target-line {
  opacity: 0.72;
}

.supplement-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(249, 251, 255, 0.86);
  padding: 14px;
}

html[data-theme="dark"] .supplement-card {
  background: rgba(34, 42, 56, 0.78);
}

.supplement-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.supplement-card-head h4 {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: -0.015em;
}

.supplement-card-actions {
  margin-top: 10px;
}

.alerts-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.alert-overview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(249, 251, 255, 0.84);
  padding: 12px;
}

html[data-theme="dark"] .alert-overview-card {
  background: rgba(34, 42, 56, 0.76);
}

.alert-overview-card h4 {
  margin: 0;
  font-size: 1.38rem;
  letter-spacing: -0.03em;
}

.alert-overview-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.reason-context-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(249, 251, 255, 0.84);
  padding: 12px;
  margin-bottom: 12px;
}

html[data-theme="dark"] .reason-context-card {
  background: rgba(34, 42, 56, 0.76);
}

.reason-sources-panel {
  margin-top: 12px;
}

.source-list {
  margin-top: 10px;
}

.reason-citation-row {
  margin-top: 8px;
}

.reason-citation-label {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reason-citation-links {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.reason-citation-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.74rem;
  color: var(--muted);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.72);
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

html[data-theme="dark"] .reason-citation-link {
  background: rgba(26, 34, 46, 0.8);
}

.reason-citation-link:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.tracking-layout {
  display: grid;
  gap: 12px;
}

.tracking-card-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(249, 251, 255, 0.84);
  padding: 14px;
}

html[data-theme="dark"] .tracking-card-block {
  background: rgba(34, 42, 56, 0.76);
}

.tracking-card-block h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  letter-spacing: -0.014em;
}

.tracking-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.tracking-list-full {
  margin-top: 10px;
}

.tracking-evidence {
  display: block;
  margin-top: 4px;
}

.tracking-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tracking-safety-gate {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
}

.tracking-safety-gate p {
  margin: 0;
}

.tracking-safety-gate .btn {
  margin-top: 8px;
}

.tracking-safety-gate.is-blocking {
  border-color: rgba(220, 53, 69, 0.4);
  background: rgba(220, 53, 69, 0.08);
}

.tracking-safety-gate.is-cleared,
.tracking-safety-gate.is-clear {
  border-color: rgba(20, 123, 80, 0.35);
  background: rgba(20, 123, 80, 0.08);
}

.tracking-save-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 8px;
}

.tracking-version-name-input,
.tracking-version-notes-input,
.tracking-compare-grid select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
}

.tracking-version-notes-input {
  margin-top: 8px;
  resize: vertical;
  min-height: 68px;
}

.tracking-version-status {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.85rem;
}

.tracking-version-status.is-success {
  border-color: rgba(20, 123, 80, 0.4);
  background: rgba(20, 123, 80, 0.08);
}

.tracking-version-status.is-warning {
  border-color: rgba(198, 146, 32, 0.4);
  background: rgba(198, 146, 32, 0.08);
}

.tracking-version-status.is-error {
  border-color: rgba(220, 53, 69, 0.4);
  background: rgba(220, 53, 69, 0.08);
}

.tracking-version-history-head {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tracking-version-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.tracking-version-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: var(--surface);
}

.tracking-version-title {
  margin: 0;
  font-weight: 700;
}

.tracking-version-item .meta {
  margin: 4px 0 0;
}

.tracking-version-empty {
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  padding: 10px;
  color: var(--muted);
  background: var(--surface-muted);
}

.tracking-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.tracking-compare-grid label {
  display: grid;
  gap: 4px;
}

.tracking-compare-actions {
  margin-top: 8px;
}

.tracking-compare-output {
  margin-top: 8px;
}

.tracking-compare-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: var(--surface);
}

.tracking-compare-card h5 {
  margin: 0 0 6px;
  font-size: 0.95rem;
}

.tracking-compare-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.tracking-compare-label {
  margin: 6px 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted-strong);
}

.tracking-compare-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.dose-reason-panel {
  margin-top: 8px;
}

.why-card {
  margin-top: 18px;
}

.card-head {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-head h3 {
  margin: 0;
  font-size: 1.17rem;
  letter-spacing: -0.02em;
}

.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.77rem;
  color: var(--muted);
  background: var(--surface-muted);
  font-weight: 600;
}

.pill-warning {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning-text);
}

.empty-state {
  color: var(--muted);
}

.empty-state a {
  color: var(--primary-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.schedule-list,
.alert-list,
.reason-list,
.quality-list {
  display: grid;
  gap: 12px;
}

.schedule-item,
.alert-item,
.reason-item,
.library-card,
.metric-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(249, 251, 255, 0.88);
}

html[data-theme="dark"] .schedule-item,
html[data-theme="dark"] .alert-item,
html[data-theme="dark"] .reason-item,
html[data-theme="dark"] .library-card,
html[data-theme="dark"] .metric-item {
  background: rgba(34, 42, 56, 0.76);
}

.schedule-item,
.alert-item,
.reason-item,
.library-card {
  padding: 15px;
}

.schedule-item h4,
.alert-item h4,
.reason-item h4,
.library-card h3,
.info-card h3,
.footer-note h3,
.quality-card h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.015em;
}

.schedule-item-head {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.schedule-select-btn {
  padding: 6px 9px;
  font-size: 0.74rem;
  line-height: 1;
}

.schedule-select-btn.is-selected {
  border-color: rgba(10, 116, 255, 0.35);
  background: rgba(10, 116, 255, 0.12);
  color: var(--primary-strong);
}

.schedule-select-btn.is-excluded {
  border-color: var(--line);
  background: var(--surface-muted);
  color: var(--muted);
}

.schedule-item.selected {
  border-color: rgba(10, 116, 255, 0.34);
}

.schedule-item.excluded {
  opacity: 0.66;
}

.schedule-item.excluded .schedule-item-body {
  display: none;
}

.schedule-item.excluded .schedule-item-head {
  margin-bottom: 0;
}

.schedule-actions {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: grid;
  gap: 10px;
}

.schedule-item p,
.alert-item p,
.reason-item p,
.library-card p,
.info-card p,
.footer-note p,
.quality-card p {
  margin: 7px 0 0;
}

.meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric-item {
  padding: 11px;
}

.metric-label {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.metric-value {
  font-weight: 650;
  letter-spacing: -0.012em;
}

.alert-item.warning {
  background: var(--warning-bg);
  border-color: var(--warning-border);
}

.alert-item.danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
}

.library-grid,
.safety-grid {
  display: grid;
  gap: 18px;
}

.library-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.safety-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.library-card .tag-row {
  margin: 13px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  border-radius: 999px;
  border: 1px solid rgba(10, 116, 255, 0.2);
  background: rgba(232, 242, 255, 0.76);
  color: #205591;
  padding: 6px 9px;
  font-size: 0.75rem;
  font-weight: 600;
}

html[data-theme="dark"] .tag {
  color: #d5e8ff;
  border-color: rgba(98, 160, 236, 0.35);
  background: rgba(34, 64, 97, 0.62);
}

.quality-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quality-layout > .section-heading {
  grid-column: 1 / -1;
}

.quality-card h4 {
  margin: 10px 0 0;
}

.quality-list {
  margin: 7px 0 0;
  padding-left: 18px;
}

.quality-list li {
  margin: 0;
}

.quality-list a {
  color: var(--primary-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.quality-full {
  grid-column: 1 / -1;
}

.quality-btn {
  display: inline-flex;
  padding: 8px 13px;
  font-size: 0.81rem;
}

.disclaimer-bar {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.64);
}

html[data-theme="dark"] .disclaimer-bar {
  background: rgba(23, 30, 41, 0.66);
}

.disclaimer-bar .container {
  padding: 14px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer {
  padding: 26px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-inner a:hover {
  opacity: 0.86;
}

@media (max-width: 1180px) {
  .builder-layout {
    grid-template-columns: 1fr;
  }

  .builder-aside {
    position: static;
  }

  .results-grid-optimized {
    grid-template-columns: 1fr;
  }

  .results-primary-card {
    grid-row: auto;
  }
}

@media (max-width: 1020px) {
  .hero-grid,
  .safety-grid,
  .quality-layout,
  .hero-trust,
  .form-grid,
  .current-picker,
  .metric-grid,
  .checkbox-grid,
  .protocol-stats,
  .alerts-overview-grid {
    grid-template-columns: 1fr;
  }

  .quality-layout > .section-heading,
  .quality-full {
    grid-column: auto;
  }

  .hero h1,
  .page-intro h1 {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 28px, var(--container));
  }

  .nav {
    min-height: 74px;
  }

  .brand-wordmark {
    font-size: 1.6rem;
  }

  .brand-badge-logo {
    width: 50px;
    height: 50px;
  }

  .brand-logo {
    transform: scale(1.72);
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: absolute;
    top: 74px;
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-soft);
  }

  html[data-theme="dark"] .nav-links {
    background: rgba(24, 31, 43, 0.95);
  }

  .nav-links a,
  .theme-toggle {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .nav-links.open {
    display: flex;
  }

  .hero-home {
    padding-top: 48px;
  }

  .protocol-summary-head {
    flex-direction: column;
    align-items: stretch;
  }

  .protocol-summary-actions {
    width: 100%;
  }

  .protocol-summary-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .results-tabs {
    gap: 6px;
  }

  .results-tab {
    width: 100%;
    text-align: center;
  }

  .hero h1,
  .page-intro h1 {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  .section {
    padding: 60px 0;
  }

  .page-intro {
    padding-top: 34px;
  }

  .intro-shell,
  .form-card,
  .results-card,
  .why-card,
  .info-card,
  .footer-note,
  .quality-card,
  .builder-aside,
  .hero-panel {
    padding: 18px;
    border-radius: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* === Reference-inspired redesign overrides === */
:root {
  --bg: #eff1ec;
  --bg-soft: #e7e9e4;
  --surface: rgba(248, 248, 245, 0.92);
  --surface-strong: #f7f7f4;
  --surface-muted: #eceee9;
  --surface-elevated: #fbfbf8;
  --line: #d8dbd3;
  --line-strong: #c7cbc2;
  --text: #0d0f0f;
  --muted: #6f736d;
  --muted-strong: #4d514c;
  --primary: #31c973;
  --primary-strong: #1db861;
  --primary-soft: #e6f8ee;
  --shadow-soft: 0 18px 40px rgba(12, 15, 12, 0.05);
  --shadow-card: 0 12px 24px rgba(12, 15, 12, 0.035);
  --radius-xl: 34px;
  --radius-lg: 28px;
  --radius-md: 22px;
  --radius-sm: 14px;
  --container: 1230px;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.noise-layer {
  opacity: 0.10;
  background-image: radial-gradient(rgba(17, 20, 18, 0.06) 0.55px, transparent 0.55px);
  background-size: 10px 10px;
}

.bg-orb { display: none; }

.container {
  width: min(100% - 48px, var(--container));
}

.site-header {
  position: sticky;
  top: 0;
  padding-top: 10px;
  border-bottom: 0;
  background: transparent;
  backdrop-filter: none;
}

.nav {
  min-height: 82px;
  padding: 10px 22px;
  border: 1px solid rgba(255,255,255,0.95);
  background: rgba(243, 244, 239, 0.9);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
  margin-top: 2px;
}

.brand-wordmark {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-badge-logo {
  width: 34px;
  height: 34px;
  border-radius: 999px;
}

.brand-logo {
  transform: scale(1.35);
}

.nav-links {
  gap: 12px;
}

.nav-links a {
  font-size: 1rem;
  font-weight: 600;
  padding: 10px 14px;
  color: #777b75;
  background: transparent;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.is-active {
  background: transparent;
  color: var(--text);
}

.nav-links .nav-build-cta,
.btn-primary {
  background: #0d0f0f;
  border-color: #0d0f0f;
  color: #fff;
  box-shadow: none;
  padding-inline: 22px;
}

.nav-links .nav-build-cta:hover,
.btn-primary:hover {
  background: #171919;
  border-color: #171919;
  color: #fff;
}

.hero-home {
  padding: 46px 0 72px;
}

.hero-headline-band {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.hero-status,
.eyebrow {
  background: transparent;
  border: 0;
  padding: 0;
  color: #7b7f79;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
}

.hero-status::before,
.eyebrow::before {
  content: "•";
  color: var(--primary);
  margin-right: 8px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
  gap: 34px;
  align-items: center;
}

.hero-copy-shell {
  max-width: 760px;
}

.hero h1,
.page-intro h1,
.section-heading h2 {
  font-size: clamp(3rem, 7vw, 5.6rem);
  letter-spacing: -0.07em;
  line-height: 0.94;
  text-wrap: balance;
}

.hero h1 em,
.page-intro h1 em,
.section-heading h2 em,
#qualityTitle em {
  font-style: italic;
  font-weight: 500;
  color: #242724;
}

.hero-copy,
.intro-shell p,
.section-heading p,
.signature-band-inner p,
.meta,
.time-block small,
.library-card p,
.info-card p,
.footer-note p,
.quality-card p,
.quality-list li {
  color: var(--muted);
}

.hero-copy {
  font-size: 1.12rem;
  max-width: 56ch;
}

.hero-actions, .form-actions {
  margin-top: 26px;
}

.btn,
.results-tab,
.pill,
.tag,
.yes-no-option span {
  border-radius: 999px;
}

.btn-secondary {
  background: #f5f6f2;
  border-color: var(--line);
  color: var(--text);
}

.hero-trust {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.trust-card,
.library-card,
.info-card,
.footer-note,
.quality-card,
.protocol-stat-card,
.results-card,
.time-block,
.intro-shell,
.hero-panel,
.glass {
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(248, 248, 245, 0.84);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.trust-card {
  padding: 18px;
  min-height: 130px;
}

.trust-card strong,
.library-card h3,
.info-card h3,
.protocol-stat-card h3,
.card-head h3,
.quality-card h3 {
  font-size: 1.1rem;
  letter-spacing: -0.035em;
}

.hero-panel {
  padding: 26px;
  position: relative;
  overflow: hidden;
}

.hero-panel-preview::before {
  background: radial-gradient(circle at center, rgba(49, 201, 115, 0.10), transparent 60%);
}

.panel-top {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  box-shadow: 0 0 0 5px rgba(49, 201, 115, 0.12);
  background: var(--primary);
}

.time-block h4 {
  color: #7d817c;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.time-block p {
  font-size: 1.05rem;
  margin: 8px 0 6px;
}

.signature-band-inner {
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.disclaimer-bar {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  color: #5c615b;
  background: rgba(245,246,241,0.7);
}

.site-footer {
  padding: 34px 0 48px;
  background: transparent;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #686c67;
}

.page-intro {
  padding-top: 42px;
}

.intro-shell {
  padding: 38px;
}

.intro-shell::after { display: none; }

.library-grid,
.safety-grid,
.quality-layout {
  gap: 18px;
}

.library-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.library-card,
.quality-card,
.info-card,
.results-card,
.protocol-stat-card {
  padding: 20px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.tag,
.pill {
  padding: 9px 13px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: #f3f4ef;
  border: 1px solid var(--line);
  color: #555954;
}

.pill-warning {
  background: #f7f0dd;
  border-color: #eadbb1;
  color: #7b6121;
}

.safety-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-page="safety"] .section#safety {
  background: #080a09;
  margin: 36px 24px 0;
  border-radius: 34px;
  position: relative;
  overflow: hidden;
}

body[data-page="safety"] .section#safety::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 0.6px, transparent 0.6px);
  background-size: 18px 18px;
  opacity: 0.32;
}

body[data-page="safety"] .section#safety .container {
  position: relative;
  z-index: 1;
}

body[data-page="safety"] .safety-grid,
body[data-page="safety"] .footer-note {
  color: #f5f6f3;
}

body[data-page="safety"] .info-card,
body[data-page="safety"] .footer-note {
  background: rgba(10, 12, 11, 0.82);
  border-color: rgba(255,255,255,0.08);
}

body[data-page="safety"] .info-card h3,
body[data-page="safety"] .footer-note h3,
body[data-page="safety"] .intro-shell h1,
body[data-page="safety"] .eyebrow {
  color: inherit;
}

body[data-page="optimized"] .protocol-summary-shell,
body[data-page="quality"] .section .quality-layout > .section-heading {
  background: rgba(248,248,245,0.9);
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 28px;
}

.results-tabs {
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.results-tab {
  border: 1px solid var(--line);
  background: #f5f6f2;
  padding: 12px 16px;
  font-weight: 700;
}

.results-tab.is-active {
  background: #0d0f0f;
  border-color: #0d0f0f;
  color: #fff;
}

.protocol-stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.card-head {
  align-items: center;
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  background: rgba(241,242,237,0.65);
}

#qualityTitle {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: .96;
  letter-spacing: -0.07em;
}

.quality-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.quality-full {
  grid-column: 1 / -1;
}

/* Build page overrides */
body:has(#protocolForm) {
  background: var(--bg);
}

body:has(#protocolForm) header {
  position: sticky;
  top: 0;
  z-index: 40;
  border: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
}

body:has(#protocolForm) header > div {
  margin-top: 10px;
  border: 1px solid rgba(255,255,255,0.95);
  background: rgba(243, 244, 239, 0.9) !important;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

body:has(#protocolForm) .bg-white,
body:has(#protocolForm) section[data-step],
body:has(#protocolForm) .border.rounded-2xl,
body:has(#protocolForm) .border.rounded-3xl,
body:has(#protocolForm) .rounded-3xl,
body:has(#protocolForm) .rounded-2xl {
  border-radius: 28px !important;
}

body:has(#protocolForm) .bg-white,
body:has(#protocolForm) section[data-step],
body:has(#protocolForm) .border.rounded-2xl,
body:has(#protocolForm) .border.rounded-3xl,
body:has(#protocolForm) .rounded-3xl {
  background: rgba(248,248,245,0.88) !important;
  border-color: var(--line) !important;
  box-shadow: none !important;
}

body:has(#protocolForm) h1 {
  letter-spacing: -0.06em;
  line-height: .95;
}

body:has(#protocolForm) .bg-gradient-to-r,
body:has(#protocolForm) .from-sky-600,
body:has(#protocolForm) .to-cyan-500,
body:has(#protocolForm) .from-sky-500,
body:has(#protocolForm) .to-cyan-400 {
  background-image: none !important;
  background-color: #0d0f0f !important;
  color: #fff !important;
}

body:has(#protocolForm) .goal.sel,
body:has(#protocolForm) .chip.sel {
  border-color: rgba(49, 201, 115, 0.35) !important;
  background: rgba(49, 201, 115, 0.10) !important;
  box-shadow: none !important;
}

@media (max-width: 980px) {
  .hero-grid,
  .library-grid,
  .safety-grid,
  .quality-layout {
    grid-template-columns: 1fr;
  }

  .hero-trust,
  .protocol-stats,
  .insights-layout {
    grid-template-columns: 1fr;
  }

  .nav {
    border-radius: 28px;
    padding: 16px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  body[data-page="safety"] .section#safety {
    margin: 28px 0 0;
    border-radius: 0;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 26px, var(--container));
  }

  .site-header {
    padding-top: 0;
  }

  .nav {
    min-height: 72px;
  }

  .brand-wordmark { font-size: 1rem; }
  .hero-home { padding-top: 24px; }
  .hero h1, .page-intro h1, .section-heading h2, #qualityTitle {
    font-size: clamp(2.3rem, 11vw, 3.8rem);
  }

  .hero-actions,
  .form-actions { flex-direction: column; }

  .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .footer-inner {
    flex-direction: column;
  }
}

/* === Codex visual redesign: clinical editorial system === */
:root {
  --bg: #f2f6f0;
  --bg-soft: #e8f0e5;
  --surface: #fbfcf8;
  --surface-strong: #ffffff;
  --surface-muted: #edf3ea;
  --surface-elevated: #ffffff;
  --line: #cfd8ca;
  --line-strong: #aebbaa;
  --text: #10120f;
  --muted: #5c665a;
  --muted-strong: #384138;
  --primary: #20a66a;
  --primary-strong: #147b50;
  --primary-soft: #dff4e8;
  --success: #20a66a;
  --warning-bg: #fff7dc;
  --warning-border: #e0c972;
  --warning-text: #735f12;
  --danger-bg: #fff0ed;
  --danger-border: #dfa79b;
  --danger-text: #993827;
  --shadow-soft: 0 18px 60px rgba(16, 18, 15, 0.08);
  --shadow-card: 0 12px 30px rgba(16, 18, 15, 0.07);
  --radius-xl: 8px;
  --radius-lg: 8px;
  --radius-md: 8px;
  --radius-sm: 8px;
  --container: 1180px;
}

html[data-theme="dark"] {
  --bg: #10120f;
  --bg-soft: #171a15;
  --surface: #191d17;
  --surface-strong: #1f241d;
  --surface-muted: #232a21;
  --surface-elevated: #20251e;
  --line: #3a4437;
  --line-strong: #566152;
  --text: #f5f8f1;
  --muted: #b7c1b2;
  --muted-strong: #d7dfd2;
  --primary: #42c982;
  --primary-strong: #77e5aa;
  --primary-soft: #203b2b;
  --shadow-soft: 0 20px 64px rgba(0, 0, 0, 0.38);
  --shadow-card: 0 14px 34px rgba(0, 0, 0, 0.34);
}

*,
*::before,
*::after {
  letter-spacing: 0 !important;
}

body {
  background: var(--bg) !important;
  color: var(--text);
  line-height: 1.52;
}

html[data-theme="dark"] body {
  background: var(--bg) !important;
}

.noise-layer {
  opacity: 0.08;
  background-image: linear-gradient(rgba(16, 18, 15, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 18, 15, 0.055) 1px, transparent 1px);
  background-size: 34px 34px;
}

html[data-theme="dark"] .noise-layer {
  opacity: 0.06;
}

.bg-orb,
.orb-1,
.orb-2 {
  display: none !important;
}

.container {
  width: min(100% - 48px, var(--container));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 10px 0;
  border-bottom: 1px solid rgba(207, 216, 202, 0.72);
  background: rgba(242, 246, 240, 0.9);
  backdrop-filter: blur(18px);
}

html[data-theme="dark"] .site-header {
  background: rgba(16, 18, 15, 0.88);
  border-color: rgba(255, 255, 255, 0.08);
}

.nav {
  min-height: 62px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand {
  gap: 10px;
}

.brand-wordmark {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text);
}

.brand-badge,
.brand-badge-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.brand-logo {
  transform: scale(1.45);
}

.nav-links {
  gap: 4px;
}

.nav-links a,
.theme-toggle,
.btn,
button {
  border-radius: 8px !important;
}

.nav-links a {
  padding: 10px 13px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.is-active {
  color: var(--text);
  background: var(--surface-muted);
}

.nav-links .nav-build-cta,
.btn-primary {
  color: #ffffff;
  background: #10120f;
  border-color: #10120f;
  box-shadow: none;
}

.nav-links .nav-build-cta:hover,
.nav-links .nav-build-cta:focus-visible,
.btn-primary:hover,
.btn-primary:focus-visible {
  color: #ffffff;
  background: #1a1d18;
  border-color: #1a1d18;
  box-shadow: none;
}

html[data-theme="dark"] .nav-links .nav-build-cta,
html[data-theme="dark"] .btn-primary {
  background: #f5f8f1;
  border-color: #f5f8f1;
  color: #10120f;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1;
}

.btn-secondary {
  color: var(--text);
  background: var(--surface-strong);
  border-color: var(--line-strong);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--surface-muted);
  border-color: var(--line-strong);
}

.hero-home {
  min-height: 620px;
  padding: 76px 0 48px;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background: #10120f;
}

.hero-photo,
.hero-scrim {
  position: absolute;
  inset: 0;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  filter: saturate(0.9) contrast(1.04);
}

.hero-scrim {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 10, 8, 0.9) 0%, rgba(8, 10, 8, 0.72) 42%, rgba(8, 10, 8, 0.26) 100%),
    linear-gradient(0deg, rgba(8, 10, 8, 0.46), rgba(8, 10, 8, 0.06));
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 54px;
  align-items: end;
}

.hero-copy-shell {
  max-width: 760px;
}

.hero-status,
.eyebrow {
  display: block;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary-strong);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-status::before,
.eyebrow::before {
  content: "";
  margin: 0;
}

.hero-home .hero-status {
  color: #a9efc6;
}

.hero h1,
.page-intro h1,
.section-heading h2,
.visual-copy h2,
.final-cta h2,
#qualityTitle {
  margin: 0;
  max-width: 880px;
  font-size: 4.75rem;
  line-height: 0.98;
  font-weight: 800;
}

.hero h1 {
  color: #ffffff;
  max-width: 780px;
}

.hero h1 em,
.page-intro h1 em,
.section-heading h2 em,
#qualityTitle em {
  font-style: normal;
  color: inherit;
}

.hero-copy {
  margin: 22px 0 0;
  max-width: 620px;
  color: #e4eee2;
  font-size: 1.12rem;
}

.hero-actions,
.form-actions {
  margin-top: 28px;
  gap: 10px;
}

.hero-home .btn-primary {
  background: #f7fbf3;
  border-color: #f7fbf3;
  color: #10120f;
}

.hero-home .btn-primary:hover,
.hero-home .btn-primary:focus-visible {
  background: #ffffff;
  border-color: #ffffff;
  color: #10120f;
}

.hero-home .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.34);
  color: #ffffff;
}

.hero-panel {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(251, 252, 248, 0.9);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
}

.hero-panel-preview::before {
  display: none;
}

.panel-top {
  margin-bottom: 12px;
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(32, 166, 106, 0.16);
}

.protocol-preview {
  gap: 8px;
}

.time-block {
  border-radius: 8px;
  border-color: rgba(16, 18, 15, 0.12);
  background: rgba(255, 255, 255, 0.76);
  padding: 14px;
}

.time-block h4 {
  color: var(--primary-strong);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.time-block p {
  margin: 5px 0;
  font-size: 1rem;
  font-weight: 800;
}

.time-block small {
  color: var(--muted);
  font-size: 0.86rem;
}

.industry-counter {
  min-height: 205px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 16px 10px 20px;
  text-align: center;
  transition: transform 1400ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.hero-home .hero-panel-preview {
  background: rgba(30, 34, 32, 0.68);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.26);
  color: #ffffff;
  justify-self: end;
  max-width: 310px;
  width: 100%;
  padding: 16px;
}

.hero-home .hero-panel-preview .panel-top {
  color: rgba(255, 255, 255, 0.72);
}

.industry-counter.is-complete {
  transform: translateY(14px);
}

.industry-kicker {
  max-width: 24ch;
  margin: 0 auto 12px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

.industry-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.2em;
  min-height: 1.05em;
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.25rem, 4.8vw, 3.2rem);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 0.9;
}

.industry-value span:first-child {
  min-width: 5.8ch;
  text-align: right;
}

.industry-cents {
  display: inline-block;
  min-width: 0 !important;
  margin-left: 0.03em;
  font-size: 0.48em;
  line-height: 1;
  vertical-align: super;
  transform: translateY(-0.42em);
}

.industry-unit {
  min-width: 4.6ch;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.33em;
  font-weight: 900;
  letter-spacing: 0;
  text-align: left;
  text-transform: uppercase;
}

.industry-subline {
  min-height: 1.35em;
  margin: 12px 0 0;
  color: #a9efc6;
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.proof-strip {
  color: #f7fbf3;
  background: #10120f;
}

.proof-strip-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.proof-strip-inner > div {
  padding: 26px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.proof-strip-inner > div:last-child {
  border-right: 0;
}

.proof-strip strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.02rem;
}

.proof-strip span {
  display: block;
  color: #c9d6c4;
  font-size: 0.94rem;
}

.section {
  padding: 86px 0;
}

.split-section,
.visual-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 56px;
  align-items: start;
}

.section-heading p,
.visual-copy p,
.intro-shell p,
.signature-band-inner p,
.meta,
.library-card p,
.info-card p,
.footer-note p,
.quality-card p,
.quality-list li {
  color: var(--muted);
}

.feature-list {
  border-top: 1px solid var(--line);
}

.feature-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 22px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  transition: transform 0.18s ease;
}

.feature-row:hover {
  transform: translateX(4px);
}

.feature-row span {
  color: var(--primary-strong);
  font-weight: 900;
}

.feature-row h3 {
  margin: 0;
  font-size: 1.28rem;
}

.feature-row p {
  margin: 7px 0 0;
  color: var(--muted);
}

.visual-section {
  padding-top: 0;
}

.visual-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
}

.visual-copy h2,
.final-cta h2 {
  font-size: 3.5rem;
}

.visual-copy p {
  max-width: 560px;
  margin: 18px 0 0;
  font-size: 1.04rem;
}

.detail-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.text-link {
  display: inline-flex;
  margin-top: 22px;
  color: var(--primary-strong);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.final-cta {
  padding: 78px 0;
  color: #f7fbf3;
  background: #10120f;
}

.final-cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
}

.final-cta .eyebrow {
  color: #a9efc6;
}

.final-cta h2 {
  max-width: 720px;
  color: #ffffff;
}

.final-cta .btn-primary {
  background: #ffffff;
  border-color: #ffffff;
  color: #10120f;
}

.glass,
.trust-card,
.library-card,
.info-card,
.footer-note,
.quality-card,
.protocol-stat-card,
.results-card,
.alert-overview-card,
.reason-context-card,
.tracking-card-block,
.supplement-card,
.schedule-item,
.alert-item,
.reason-item,
.metric-item,
.intro-shell {
  border-radius: 8px !important;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: none;
  backdrop-filter: none;
}

.page-intro {
  padding: 70px 0 22px;
}

.intro-shell {
  padding: 0;
  border: 0;
  background: transparent;
}

.intro-shell::after {
  display: none;
}

.intro-shell h1 {
  font-size: 4.2rem;
}

.intro-shell p {
  max-width: 690px;
  margin-top: 16px;
  font-size: 1.04rem;
}

.library-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.library-card,
.quality-card,
.info-card,
.footer-note,
.results-card,
.protocol-stat-card {
  padding: 20px;
}

.library-card,
.info-card,
.quality-card,
.protocol-stat-card,
.results-card {
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.library-card:hover,
.info-card:hover,
.quality-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}

.library-card h3,
.info-card h3,
.footer-note h3,
.quality-card h3,
.protocol-stat-card h3,
.card-head h3 {
  font-size: 1.1rem;
  font-weight: 900;
}

.tag-row,
.library-card .tag-row {
  margin: 13px 0;
  gap: 7px;
}

.tag,
.pill,
.results-tab,
.yes-no-option span,
.selected-chip {
  border-radius: 8px !important;
}

.tag,
.pill {
  padding: 6px 9px;
  border-color: var(--line);
  background: var(--surface-muted);
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.safety-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

body[data-page="safety"] .section#safety {
  margin: 34px 24px 0;
  border-radius: 8px;
  background: #10120f;
}

body[data-page="safety"] .section#safety::before {
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
}

body[data-page="safety"] .info-card,
body[data-page="safety"] .footer-note {
  color: #f7fbf3;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

body[data-page="safety"] .info-card p,
body[data-page="safety"] .footer-note p {
  color: #c9d6c4;
}

.protocol-summary-shell,
body[data-page="optimized"] .protocol-summary-shell,
body[data-page="quality"] .section .quality-layout > .section-heading {
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 24px;
}

.protocol-stats {
  gap: 12px;
}

.protocol-stat-card .stat-value {
  color: var(--primary-strong);
  font-size: 2.1rem;
}

.results-tabs {
  gap: 8px;
}

.results-tab {
  padding: 10px 13px;
  background: var(--surface);
  border-color: var(--line);
  color: var(--muted);
  font-weight: 800;
}

.results-tab.is-active {
  color: #ffffff;
  background: #10120f;
  border-color: #10120f;
}

html[data-theme="dark"] .results-tab.is-active {
  color: #10120f;
  background: #f5f8f1;
  border-color: #f5f8f1;
}

.empty-state {
  border-radius: 8px;
  background: var(--surface-muted);
  border: 1px dashed var(--line-strong);
  padding: 16px;
}

.quality-layout {
  gap: 14px;
}

.quality-list a,
.empty-state a {
  color: var(--primary-strong);
}

.disclaimer-bar {
  padding: 0;
  border-color: var(--line);
  background: rgba(251, 252, 248, 0.74);
}

html[data-theme="dark"] .disclaimer-bar {
  background: rgba(25, 29, 23, 0.74);
}

.disclaimer-bar .container {
  padding: 16px 0;
  color: var(--muted);
}

.site-footer {
  padding: 30px 0 44px;
  color: var(--muted);
  background: transparent;
}

/* Build page */
body[data-page="build"] {
  background: var(--bg) !important;
  color: var(--text) !important;
}

body[data-page="build"] > .absolute {
  display: none !important;
}

body[data-page="build"] header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(207, 216, 202, 0.72) !important;
  background: rgba(242, 246, 240, 0.92) !important;
  backdrop-filter: blur(18px) !important;
}

body[data-page="build"] header > div {
  max-width: var(--container) !important;
  padding: 12px 24px !important;
  margin: 0 auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-page="build"] main {
  max-width: var(--container) !important;
  padding: 42px 24px 96px !important;
}

body[data-page="build"] .rounded-full,
body[data-page="build"] .rounded-xl,
body[data-page="build"] .rounded-2xl,
body[data-page="build"] .rounded-3xl {
  border-radius: 8px !important;
}

body[data-page="build"] .shadow {
  box-shadow: none !important;
}

body[data-page="build"] .bg-white,
body[data-page="build"] section[data-step],
body[data-page="build"] .border.rounded-2xl,
body[data-page="build"] .border.rounded-3xl {
  background: var(--surface) !important;
  border-color: var(--line) !important;
}

body[data-page="build"] main > div:first-child {
  padding: 18px !important;
  background: #10120f !important;
  color: #ffffff !important;
  border-color: #10120f !important;
}

body[data-page="build"] main > div:first-child p {
  color: #ffffff !important;
}

body[data-page="build"] #bar,
body[data-page="build"] .bg-gradient-to-r,
body[data-page="build"] .from-sky-500,
body[data-page="build"] .from-sky-600,
body[data-page="build"] .to-cyan-400,
body[data-page="build"] .to-cyan-500 {
  background-image: none !important;
  background-color: var(--primary) !important;
}

body[data-page="build"] section[data-step] {
  padding: 28px !important;
}

body[data-page="build"] h1 {
  font-size: 3.2rem !important;
  line-height: 1 !important;
  color: var(--text) !important;
}

body[data-page="build"] h2 {
  font-size: 2rem !important;
  line-height: 1.1 !important;
}

body[data-page="build"] .goal {
  min-height: 122px;
  background: var(--surface-strong) !important;
  border-color: var(--line) !important;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

body[data-page="build"] .goal:hover,
body[data-page="build"] .chip:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong) !important;
}

body[data-page="build"] .goal.sel,
body[data-page="build"] .chip.sel,
body[data-page="build"] label:has(input:checked) {
  border-color: var(--primary) !important;
  background: var(--primary-soft) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

body[data-page="build"] .chip,
body[data-page="build"] input,
body[data-page="build"] select,
body[data-page="build"] textarea,
body[data-page="build"] label.border {
  border-radius: 8px !important;
}

body[data-page="build"] input,
body[data-page="build"] select,
body[data-page="build"] textarea {
  background: var(--surface-strong) !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
}

body[data-page="build"] button[type="submit"],
body[data-page="build"] #quick,
body[data-page="build"] #to3 {
  background: #10120f !important;
  color: #ffffff !important;
  border-color: #10120f !important;
}

body[data-page="build"] #toast {
  border-radius: 8px !important;
}

@media (max-width: 1100px) {
  .hero-grid,
  .split-section,
  .visual-grid,
  .library-grid,
  .safety-grid,
  .quality-layout {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 30px;
  }

  .hero-panel {
    max-width: 560px;
  }

  .proof-strip-inner {
    grid-template-columns: 1fr;
  }

  .proof-strip-inner > div {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .proof-strip-inner > div:last-child {
    border-bottom: 0;
  }

  .final-cta-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 28px, var(--container));
  }

  .site-header {
    padding: 6px 0;
  }

  .nav {
    min-height: 58px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .brand-wordmark {
    font-size: 0.98rem;
  }

  .brand-badge-logo {
    width: 34px;
    height: 34px;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px !important;
  }

  .nav-links {
    top: 70px;
    left: 14px;
    right: 14px;
    display: none !important;
    border-radius: 8px;
    background: var(--surface-strong);
  }

  .nav-links.open {
    display: flex !important;
  }

  .hero-home {
    min-height: auto;
    padding: 48px 0 34px;
  }

  .hero h1,
  .page-intro h1,
  .section-heading h2,
  .visual-copy h2,
  .final-cta h2,
  #qualityTitle {
    font-size: 2.75rem;
    line-height: 1;
  }

  .hero-copy,
  .visual-copy p,
  .intro-shell p {
    font-size: 1rem;
  }

  .hero-actions,
  .form-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .hero-panel {
    padding: 12px;
  }

  .proof-strip-inner > div {
    padding: 20px;
  }

  .section {
    padding: 58px 0;
  }

  .feature-row {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
  }

  .final-cta {
    padding: 58px 0;
  }

  .footer-inner {
    align-items: flex-start;
  }

  body[data-page="safety"] .section#safety {
    margin: 24px 0 0;
    border-radius: 0;
  }

  body[data-page="build"] main {
    padding: 28px 14px 76px !important;
  }

  body[data-page="build"] section[data-step] {
    padding: 20px !important;
  }

  body[data-page="build"] h1 {
    font-size: 2.4rem !important;
  }
}

/* Final conflict fixes for older high-specificity builder/theme overrides */
html[data-theme="dark"] .hero-status,
html[data-theme="dark"] .eyebrow {
  background: transparent !important;
  border: 0 !important;
}

body[data-page="build"] {
  --bg: #f2f6f0;
  --surface: #fbfcf8;
  --surface-strong: #ffffff;
  --surface-muted: #edf3ea;
  --line: #cfd8ca;
  --line-strong: #aebbaa;
  --text: #10120f;
  --muted: #5c665a;
  --muted-strong: #384138;
  --primary: #20a66a;
  --primary-strong: #147b50;
  --primary-soft: #dff4e8;
}

body[data-page="build"]:has(#protocolForm) {
  background: var(--bg) !important;
  color: var(--text) !important;
}

body[data-page="build"]:has(#protocolForm) header {
  background: rgba(242, 246, 240, 0.94) !important;
  border-bottom: 1px solid var(--line) !important;
}

body[data-page="build"]:has(#protocolForm) header > div {
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-page="build"]:has(#protocolForm) main > div:first-child {
  border-radius: 8px !important;
  background: var(--surface) !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
}

body[data-page="build"]:has(#protocolForm) main > div:first-child p {
  color: var(--muted-strong) !important;
}

body[data-page="build"]:has(#protocolForm) .bg-white,
body[data-page="build"]:has(#protocolForm) section[data-step],
body[data-page="build"]:has(#protocolForm) .border.rounded-2xl,
body[data-page="build"]:has(#protocolForm) .border.rounded-3xl,
body[data-page="build"]:has(#protocolForm) .rounded-3xl {
  border-radius: 8px !important;
  background: var(--surface) !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
}

body[data-page="build"]:has(#protocolForm) .rounded-full,
body[data-page="build"]:has(#protocolForm) .rounded-xl,
body[data-page="build"]:has(#protocolForm) .rounded-2xl,
body[data-page="build"]:has(#protocolForm) button,
body[data-page="build"]:has(#protocolForm) input,
body[data-page="build"]:has(#protocolForm) select,
body[data-page="build"]:has(#protocolForm) textarea {
  border-radius: 8px !important;
}

body[data-page="build"]:has(#protocolForm) h1,
body[data-page="build"]:has(#protocolForm) h2,
body[data-page="build"]:has(#protocolForm) h3,
body[data-page="build"]:has(#protocolForm) p,
body[data-page="build"]:has(#protocolForm) label,
body[data-page="build"]:has(#protocolForm) span {
  color: inherit;
}

body[data-page="build"]:has(#protocolForm) h1 {
  color: var(--text) !important;
}

body[data-page="build"]:has(#protocolForm) .text-slate-500,
body[data-page="build"]:has(#protocolForm) .text-slate-600,
body[data-page="build"]:has(#protocolForm) .text-xs {
  color: var(--muted) !important;
}

body[data-page="build"]:has(#protocolForm) .goal {
  background: var(--surface-strong) !important;
  border-color: var(--line) !important;
}

body[data-page="build"]:has(#protocolForm) .goal p:first-of-type {
  color: var(--text) !important;
}

body[data-page="build"]:has(#protocolForm) .goal.sel,
body[data-page="build"]:has(#protocolForm) .chip.sel,
body[data-page="build"]:has(#protocolForm) label:has(input:checked) {
  border-color: var(--primary) !important;
  background: var(--primary-soft) !important;
  color: var(--text) !important;
}

body[data-page="build"]:has(#protocolForm) .bg-gradient-to-r,
body[data-page="build"]:has(#protocolForm) .from-sky-600,
body[data-page="build"]:has(#protocolForm) .to-cyan-500,
body[data-page="build"]:has(#protocolForm) .from-sky-500,
body[data-page="build"]:has(#protocolForm) .to-cyan-400 {
  background-image: none !important;
  background-color: #10120f !important;
  color: #ffffff !important;
}

body[data-page="build"]:has(#protocolForm) #bar {
  background-color: var(--primary) !important;
}

@media (max-width: 760px) {
  body {
    overflow-x: hidden;
  }

  .hero h1,
  .page-intro h1,
  .section-heading h2,
  .visual-copy h2,
  .final-cta h2,
  #qualityTitle {
    font-size: 2.25rem;
    overflow-wrap: break-word;
  }

  .hero-panel {
    display: none;
  }

  .hero-home .hero-panel {
    display: block;
    max-width: 100%;
  }

  .industry-counter {
    min-height: 185px;
    padding: 14px 8px 18px;
  }

  .industry-counter.is-complete {
    transform: translateY(12px);
  }

  .hero-copy-shell,
  .hero-copy {
    max-width: 100%;
  }

  .hero-copy {
    max-width: 32ch;
    font-size: 0.96rem;
  }

  .menu-toggle {
    display: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 0 0 40px;
    margin-left: auto;
    min-width: 40px;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 3;
    color: #10120f !important;
    background: #f5f8f1 !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
  }

  #menuToggle.menu-toggle {
    display: none !important;
  }

  .nav-links,
  .nav-links.open {
    position: static;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: calc(100vw - 28px);
    overflow: hidden;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .nav-links a {
    width: auto !important;
    padding: 8px 6px;
    font-size: 0.76rem;
    min-width: 0;
    white-space: normal;
    line-height: 1.1;
    text-align: center;
  }

  .nav-links a:nth-child(n + 3),
  .nav-links .nav-build-cta {
    display: none !important;
  }

  .nav-links .theme-toggle {
    display: inline-flex !important;
    grid-column: 1 / -1;
    width: 100% !important;
    justify-content: center;
  }

  .tracking-save-row,
  .tracking-version-item {
    grid-template-columns: 1fr;
  }

  .tracking-export-actions .btn,
  .tracking-version-item .btn {
    width: 100%;
  }
}

/* === Unified index/build/optimized theme pass === */
:root {
  color-scheme: light;
  --bg: #f2f6f0;
  --surface: #fbfcf8;
  --surface-strong: #ffffff;
  --surface-muted: #edf3ea;
  --line: #cfd8ca;
  --line-strong: #aebbaa;
  --text: #10120f;
  --muted: #5c665a;
  --muted-strong: #384138;
  --primary: #20a66a;
  --primary-strong: #147b50;
  --primary-soft: #dff4e8;
  --hero-ink: #f7fbf3;
  --hero-muted: #dce8d7;
  --dark-panel: #10120f;
  --shadow-soft: 0 18px 58px rgba(16, 18, 15, 0.08);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0f0c;
  --surface: #131812;
  --surface-strong: #182017;
  --surface-muted: #20291e;
  --line: #334030;
  --line-strong: #596653;
  --text: #f5f8f1;
  --muted: #b8c5b2;
  --muted-strong: #dae4d5;
  --primary: #42c982;
  --primary-strong: #9af0bd;
  --primary-soft: #193322;
  --hero-ink: #f7fbf3;
  --hero-muted: #d3dfce;
  --dark-panel: #090c09;
  --shadow-soft: 0 18px 58px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] body[data-page="build"] {
  --bg: #0c0f0c;
  --surface: #131812;
  --surface-strong: #182017;
  --surface-muted: #20291e;
  --line: #334030;
  --line-strong: #596653;
  --text: #f5f8f1;
  --muted: #b8c5b2;
  --muted-strong: #dae4d5;
  --primary: #42c982;
  --primary-strong: #9af0bd;
  --primary-soft: #193322;
}

body {
  background: var(--bg) !important;
  color: var(--text);
}

.site-header,
body[data-page="build"] header,
body[data-page="build"]:has(#protocolForm) header {
  background: color-mix(in srgb, var(--bg) 90%, transparent) !important;
  border-bottom: 1px solid var(--line) !important;
  backdrop-filter: blur(18px) saturate(140%) !important;
}

.nav,
body[data-page="build"] header > div,
body[data-page="build"]:has(#protocolForm) header > div {
  width: min(100% - 48px, var(--container)) !important;
  min-height: 62px;
  margin-inline: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-links {
  margin-left: auto;
}

.theme-toggle {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  padding: 0 !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 8px !important;
  background: var(--surface-strong) !important;
  color: var(--text) !important;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--surface-muted) !important;
  transform: translateY(-1px);
}

.theme-toggle span[aria-hidden="true"] {
  line-height: 1;
  transform: translateY(-1px);
}

.language-control {
  flex: 0 0 auto;
  margin-left: 8px;
}

.language-control select {
  min-width: 128px;
  height: 44px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line-strong) !important;
  border-radius: 8px !important;
  color: var(--text) !important;
  background: var(--surface-strong) !important;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1;
}

.language-control select:hover,
.language-control select:focus-visible {
  background: var(--surface-muted) !important;
}

.translation-widget-host,
.goog-te-banner-frame,
.skiptranslate iframe {
  display: none !important;
}

body {
  top: 0 !important;
}

.brand-wordmark,
.nav-links a,
.theme-toggle,
.language-control select,
body[data-page="build"] header a,
body[data-page="build"] header p {
  color: var(--text) !important;
}

.brand-badge-logo {
  background: var(--surface-strong);
  border-color: var(--line);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.is-active {
  color: var(--text) !important;
  background: var(--surface-muted);
}

.nav-links .nav-build-cta,
body[data-page="build"] .nav-links .nav-build-cta,
.btn-primary {
  color: #f7fbf3 !important;
  background: #10120f !important;
  border-color: #10120f !important;
}

html[data-theme="dark"] .nav-links .nav-build-cta,
html[data-theme="dark"] body[data-page="build"] .nav-links .nav-build-cta,
html[data-theme="dark"] .btn-primary {
  color: #10120f !important;
  background: #f5f8f1 !important;
  border-color: #f5f8f1 !important;
}

.btn-secondary,
.theme-toggle,
.language-control select,
body[data-page="build"] #to2,
body[data-page="build"] [data-back],
body[data-page="build"] #resetBtn,
body[data-page="build"] #addCurrentSupplementBtn,
body[data-page="build"] #skip {
  color: var(--text) !important;
  background: var(--surface-strong) !important;
  border-color: var(--line-strong) !important;
}

body[data-page="build"] .supplement-rich-toggle-card {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body[data-page="build"] .supplement-rich-toggle-hit {
  width: 100%;
  cursor: pointer;
  user-select: none;
}

body[data-page="build"] .supplement-rich-toggle-copy {
  display: block;
  min-width: 0;
}

body[data-page="build"] .supplement-rich-toggle-title {
  display: block;
}

body[data-page="build"] .supplement-rich-toggle-input {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
}

body[data-page="build"] .lab-aware-panel {
  border-color: var(--line) !important;
  background: color-mix(in srgb, var(--surface-muted) 78%, transparent) !important;
  overflow: hidden;
}

body[data-page="build"] .lab-aware-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  list-style: none;
}

body[data-page="build"] .lab-aware-summary::-webkit-details-marker {
  display: none;
}

body[data-page="build"] .lab-aware-summary-title {
  font-size: 0.76rem;
  line-height: 1;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-strong) !important;
}

body[data-page="build"] .lab-aware-summary-title em {
  font-style: normal;
  color: var(--muted);
}

body[data-page="build"] .lab-aware-summary-meta {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
}

body[data-page="build"] .lab-aware-body {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

body[data-page="build"] .lab-aware-intro {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted) !important;
}

body[data-page="build"] .lab-aware-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 8px;
}

body[data-page="build"] .lab-aware-field {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 8px 10px;
}

body[data-page="build"] .lab-aware-field > span {
  font-size: 0.72rem;
  line-height: 1.1;
  font-weight: 700;
  color: var(--muted-strong);
}

body[data-page="build"] .lab-aware-field > span small {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
}

body[data-page="build"] .lab-aware-field input {
  border-radius: 8px !important;
  height: 34px;
  font-size: 0.85rem;
  padding: 0 9px !important;
  background: var(--surface-strong) !important;
}

body[data-page="build"] .lab-aware-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body[data-page="build"] .lab-aware-note {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

body[data-page="build"] .lab-aware-clear {
  border: 1px solid var(--line-strong) !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  border-radius: 8px !important;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 10px !important;
}

body[data-page="build"] .lab-aware-clear:hover,
body[data-page="build"] .lab-aware-clear:focus-visible {
  border-color: var(--primary) !important;
  background: var(--primary-soft) !important;
}

.hero-home .btn-primary,
.build-hero .btn-primary {
  background: #f7fbf3 !important;
  border-color: #f7fbf3 !important;
  color: #10120f !important;
}

.hero-home .btn-secondary,
.build-hero .btn-secondary {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.36) !important;
}

.glass,
.library-card,
.info-card,
.footer-note,
.quality-card,
.protocol-stat-card,
.results-card,
.alert-overview-card,
.reason-context-card,
.tracking-card-block,
.supplement-card,
.schedule-item,
.alert-item,
.reason-item,
.metric-item,
.empty-state,
.time-block,
input,
select,
textarea {
  color: var(--text);
  background: var(--surface) !important;
  border-color: var(--line) !important;
}

.tag,
.pill,
.results-tab,
.selected-chip,
body[data-page="build"] .chip,
body[data-page="build"] .goal,
body[data-page="build"] label.border,
body[data-page="build"] .border.rounded-xl,
body[data-page="build"] .border.rounded-2xl,
body[data-page="build"] .border.rounded-3xl {
  color: var(--muted-strong) !important;
  background: var(--surface-muted) !important;
  border-color: var(--line) !important;
}

.meta,
.library-card p,
.info-card p,
.footer-note p,
.quality-card p,
.quality-list li,
.schedule-time-head p,
.empty-state,
body[data-page="build"] .text-slate-500,
body[data-page="build"] .text-slate-600,
body[data-page="build"] .text-xs {
  color: var(--muted) !important;
}

body[data-page="build"] .goal p:first-of-type,
body[data-page="build"] section[data-step] h1,
body[data-page="build"] section[data-step] h2,
body[data-page="build"] section[data-step] .font-bold,
body[data-page="build"] section[data-step] .font-extrabold {
  color: var(--text) !important;
}

body[data-page="build"] .goal.sel,
body[data-page="build"] .chip.sel,
body[data-page="build"] label:has(input:checked) {
  color: var(--text) !important;
  background: var(--primary-soft) !important;
  border-color: var(--primary) !important;
}

body[data-page="build"] #quick,
body[data-page="build"] #to3,
body[data-page="build"] button[type="submit"],
body[data-page="build"]:has(#protocolForm) .bg-gradient-to-r,
body[data-page="build"]:has(#protocolForm) .from-sky-600,
body[data-page="build"]:has(#protocolForm) .to-cyan-500,
body[data-page="build"]:has(#protocolForm) .from-sky-500,
body[data-page="build"]:has(#protocolForm) .to-cyan-400 {
  color: #f7fbf3 !important;
  background: #10120f !important;
  border-color: #10120f !important;
}

html[data-theme="dark"] body[data-page="build"] #quick,
html[data-theme="dark"] body[data-page="build"] #to3,
html[data-theme="dark"] body[data-page="build"] button[type="submit"],
html[data-theme="dark"] body[data-page="build"]:has(#protocolForm) .bg-gradient-to-r {
  color: #10120f !important;
  background: #f5f8f1 !important;
  border-color: #f5f8f1 !important;
}

.build-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 360px;
  background: #10120f;
}

.build-hero .hero-photo,
body[data-page="optimized"] .protocol-overview::before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.build-hero .hero-scrim {
  z-index: -1;
}

.build-hero-inner {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  padding: 72px 0 48px;
  color: var(--hero-ink);
}

.build-hero h1 {
  max-width: 780px;
  margin: 0;
  color: #ffffff !important;
  font-size: 4.2rem;
  line-height: 0.98;
  font-weight: 800;
}

.build-hero p:not(.hero-status) {
  max-width: 590px;
  margin: 18px 0 0;
  color: var(--hero-muted);
  font-size: 1.08rem;
}

body[data-page="build"] main {
  width: min(100% - 48px, var(--container)) !important;
  max-width: var(--container) !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
  padding-top: 34px !important;
}

body[data-page="build"] main > div:first-child,
body[data-page="build"]:has(#protocolForm) main > div:first-child,
body[data-page="build"] section[data-step] {
  background: var(--surface) !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

body[data-page="build"] main > div:first-child {
  margin-top: 0;
}

body[data-page="build"] #bar,
body[data-page="build"]:has(#protocolForm) #bar {
  background: var(--primary) !important;
}

body[data-page="build"] .h-2 {
  background: var(--surface-muted) !important;
}

body[data-page="build"] section[data-step] {
  padding: 30px !important;
}

body[data-page="build"] section[data-step] h1 {
  max-width: 760px;
  font-size: 3.4rem !important;
}

body[data-page="build"] .goal {
  min-height: 124px;
  padding: 16px !important;
  background: var(--surface-strong) !important;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

body[data-page="build"] .goal:hover,
.library-card:hover,
.info-card:hover,
.quality-card:hover,
.results-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong) !important;
  box-shadow: var(--shadow-soft);
}

body[data-page="optimized"] .protocol-overview {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 82px 0 58px;
  background: #10120f;
}

body[data-page="optimized"] .protocol-overview > .container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}

body[data-page="optimized"] .protocol-overview::before {
  content: "";
  background-image: url("https://images.pexels.com/photos/13787596/pexels-photo-13787596.jpeg?auto=compress&cs=tinysrgb&w=1800");
  background-size: cover;
  background-position: center;
  filter: saturate(0.88) contrast(1.04);
}

body[data-page="optimized"] .protocol-overview::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 10, 8, 0.88), rgba(8, 10, 8, 0.56)),
    linear-gradient(0deg, rgba(8, 10, 8, 0.32), rgba(8, 10, 8, 0.1));
}

body[data-page="optimized"] .protocol-summary-shell {
  background: color-mix(in srgb, var(--surface) 92%, transparent) !important;
  border-color: color-mix(in srgb, var(--line) 82%, transparent) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
}

html[data-theme="dark"] body[data-page="optimized"] .protocol-summary-shell {
  background: rgba(19, 24, 18, 0.88) !important;
}

body[data-page="optimized"] .protocol-summary-shell h1 {
  color: var(--text);
  font-size: 4.2rem;
}

body[data-page="optimized"] .protocol-subtitle {
  color: var(--muted) !important;
}

body[data-page="optimized"] .protocol-stat-card {
  min-height: 138px;
  background: var(--surface-strong) !important;
}

body[data-page="optimized"] .protocol-results-section {
  padding-top: 38px;
}

body[data-page="optimized"] .results-tabs {
  position: sticky;
  top: 82px;
  z-index: 20;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
}

body[data-page="optimized"] .results-tab.is-active {
  color: #f7fbf3 !important;
  background: #10120f !important;
  border-color: #10120f !important;
}

html[data-theme="dark"] body[data-page="optimized"] .results-tab.is-active {
  color: #10120f !important;
  background: #f5f8f1 !important;
  border-color: #f5f8f1 !important;
}

html[data-theme="dark"] body[data-page="safety"] .section#safety {
  background: #090c09;
}

html[data-theme="dark"] body[data-page="safety"] .info-card,
html[data-theme="dark"] body[data-page="safety"] .footer-note {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

html[data-theme="dark"] body[data-page="safety"] .info-card p,
html[data-theme="dark"] body[data-page="safety"] .footer-note p {
  color: #d3dfce !important;
}

@media (max-width: 980px) {
  .build-hero-inner,
  body[data-page="optimized"] .protocol-summary-head {
    grid-template-columns: 1fr;
  }

  .build-hero h1,
  body[data-page="optimized"] .protocol-summary-shell h1 {
    font-size: 3rem;
  }

  body[data-page="optimized"] .results-tabs {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-header {
    transform: translateY(0);
    transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
  }

  .site-header.is-hidden-mobile {
    transform: translateY(calc(-100% - 10px));
  }

  .nav,
  body[data-page="build"] header > div,
  body[data-page="build"]:has(#protocolForm) header > div {
    width: min(100% - 28px, var(--container)) !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto 44px;
    align-items: center;
    gap: 10px;
  }

  .brand {
    min-width: 0;
  }

  .theme-toggle {
    grid-column: 3;
    grid-row: 1;
    width: 44px !important;
    height: 44px;
    margin-left: 0;
    justify-self: end;
  }

  .language-control {
    grid-column: 2;
    grid-row: 1;
    margin-left: 0;
    justify-self: end;
  }

  .language-control select {
    width: 112px;
    min-width: 112px;
    height: 44px;
    padding-left: 10px;
    padding-right: 26px;
    font-size: 0.78rem;
  }

  .nav-links,
  .nav-links.open {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: none;
    overflow: visible;
  }

  .nav-links a:nth-child(n + 3) {
    display: inline-flex !important;
  }

  .nav-links .nav-build-cta {
    display: inline-flex !important;
  }

  .nav-links .theme-toggle {
    display: inline-flex !important;
    grid-column: 1 / -1;
    width: 100% !important;
    justify-content: center;
  }

  .build-hero {
    min-height: 330px;
  }

  .build-hero-inner {
    width: min(100% - 28px, var(--container));
    min-height: 330px;
    padding: 48px 0 34px;
  }

  body[data-page="optimized"] .protocol-overview > .container {
    width: min(100% - 28px, var(--container));
  }

  .build-hero h1,
  body[data-page="optimized"] .protocol-summary-shell h1 {
    font-size: 2.15rem !important;
    line-height: 1;
  }

  .build-hero p:not(.hero-status) {
    max-width: 31ch;
    font-size: 0.98rem;
  }

  body[data-page="build"] main {
    width: min(100% - 28px, var(--container)) !important;
    padding-inline: 0 !important;
  }

  body[data-page="build"] section[data-step] {
    padding: 20px !important;
  }

  body[data-page="build"] section[data-step] h1 {
    font-size: 2.35rem !important;
  }

  body[data-page="build"] .supplement-rich-toggle-hit {
    min-height: 48px;
    align-items: flex-start;
  }

  body[data-page="optimized"] .protocol-overview {
    padding: 44px 0 34px;
  }

  body[data-page="optimized"] .protocol-summary-shell {
    padding: 20px !important;
  }
}

body[data-page="build"]:has(#protocolForm) .build-hero .build-hero-inner {
  width: min(100% - 48px, var(--container)) !important;
  margin-inline: auto !important;
}

body[data-page="build"]:has(#protocolForm) .build-hero h1 {
  color: #ffffff !important;
}

body[data-page="build"]:has(#protocolForm) .build-hero p {
  color: var(--hero-muted) !important;
}

body[data-page="build"]:has(#protocolForm) .build-hero .hero-status {
  color: #a9efc6 !important;
}

.protocol-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #f7fbf3;
  background: rgba(7, 10, 8, 0.66);
  backdrop-filter: blur(18px) saturate(130%);
  opacity: 0;
  transition: opacity 220ms ease;
}

.protocol-loading-overlay.is-visible {
  opacity: 1;
}

.protocol-loading-card {
  width: min(calc(100vw - 32px), 310px);
  height: 310px;
  min-height: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  padding: 22px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(30, 34, 32, 0.74);
  box-shadow: 0 24px 74px rgba(0, 0, 0, 0.28);
}

.protocol-loading-card::before {
  display: none;
}

.protocol-loading-card > * {
  position: relative;
  z-index: 1;
}

.protocol-loading-orbit {
  width: 58px;
  height: 58px;
  position: relative;
  border: 1px solid rgba(169, 239, 198, 0.26);
  border-radius: 999px;
  animation: protocolPulse 1.7s ease-in-out infinite;
}

.protocol-loading-orbit::before,
.protocol-loading-orbit::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: inherit;
}

.protocol-loading-orbit::after {
  inset: 22px;
  background: radial-gradient(circle, rgba(169, 239, 198, 0.95), rgba(169, 239, 198, 0.08) 62%, transparent 64%);
  border: 0;
}

.protocol-loading-orbit span {
  display: none;
}

.protocol-loading-eyebrow {
  margin: 0;
  color: #a9efc6;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.protocol-loading-card h2 {
  width: 100%;
  max-width: 22ch;
  min-height: 4.35em;
  display: grid;
  place-items: center;
  margin: 0;
  color: #ffffff;
  font-size: 1.15rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.protocol-loading-track {
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.protocol-loading-track span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, #a9efc6, #ffffff);
}

.protocol-loading-note {
  max-width: 28ch;
  margin: 0;
  color: rgba(247, 251, 243, 0.72);
  font-size: 0.82rem;
  line-height: 1.35;
}

.protocol-loading-pills {
  display: none;
}

.food-plan {
  border-color: rgba(20, 184, 166, 0.28);
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.92), rgba(255, 255, 255, 0.9));
}

html[data-theme="dark"] .food-plan {
  border-color: rgba(45, 212, 191, 0.26);
  background:
    linear-gradient(135deg, rgba(20, 83, 72, 0.34), rgba(18, 24, 38, 0.86));
}

@keyframes protocolPulse {
  50% {
    transform: scale(1.06);
    opacity: 0.72;
  }
}

@media (max-width: 760px) {
  body[data-page="build"]:has(#protocolForm) .build-hero .build-hero-inner {
    width: min(100% - 28px, var(--container)) !important;
  }

  .protocol-loading-card {
    width: min(calc(100vw - 32px), 310px);
    height: 310px;
    padding: 22px;
  }

  .protocol-loading-orbit {
    width: 58px;
    height: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .protocol-loading-card::before,
  .protocol-loading-orbit,
  .protocol-loading-orbit::after {
    animation: none !important;
  }
}

body[data-page="account"] .account-hero {
  padding: 78px 0 56px;
}

body[data-page="account"] .account-hero-grid {
  grid-template-columns: 1.06fr 0.94fr;
}

.account-hero-panel {
  position: relative;
  overflow: hidden;
}

.account-hero-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(10, 116, 255, 0.16), transparent 44%, rgba(10, 157, 117, 0.16));
}

.account-hero-panel-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.account-hero-panel-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  background: rgba(249, 251, 255, 0.88);
}

html[data-theme="dark"] .account-hero-panel-grid article {
  background: rgba(34, 42, 56, 0.76);
}

.account-hero-panel-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.account-hero-panel-grid h3 {
  margin: 8px 0 0;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.account-hero-panel-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  position: relative;
  z-index: 1;
}

.account-live-graph-wrap {
  position: relative;
  z-index: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 16% 14%, rgba(31, 140, 255, 0.18), transparent 52%),
    radial-gradient(circle at 82% 82%, rgba(46, 211, 183, 0.14), transparent 48%),
    rgba(249, 251, 255, 0.9);
  padding: 10px;
  min-height: 170px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

html[data-theme="dark"] .account-live-graph-wrap {
  background:
    radial-gradient(circle at 15% 20%, rgba(31, 140, 255, 0.26), transparent 48%),
    radial-gradient(circle at 85% 80%, rgba(46, 211, 183, 0.18), transparent 48%),
    rgba(34, 42, 56, 0.82);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.22);
}

.account-live-graph-wrap canvas {
  width: 100%;
  height: 148px !important;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.account-grid.is-auth-hidden {
  grid-template-columns: 1fr;
}

.account-card {
  padding: 24px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.account-card.is-visible,
.account-chart-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.account-auth-toggle {
  margin-top: 2px;
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(249, 251, 255, 0.86);
}

.account-auth-toggle .results-tab {
  min-width: 118px;
  border: none;
  border-radius: 10px;
  box-shadow: none;
  background: transparent;
  color: var(--muted-strong);
  padding: 10px 13px;
}

.account-auth-toggle .results-tab.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, #0a74ff, #0b9f79);
  box-shadow: 0 10px 22px rgba(10, 116, 255, 0.22);
}

.account-auth-card {
  position: relative;
  overflow: hidden;
}

.account-auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle at center, rgba(10, 116, 255, 0.18), transparent 68%);
  pointer-events: none;
}

.account-auth-head {
  position: relative;
  z-index: 1;
}

.account-auth-subtitle {
  margin-top: 8px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.account-auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 14px;
}

.account-auth-shell.is-signed-in {
  grid-template-columns: 1fr;
}

.account-auth-main {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

html[data-theme="dark"] .account-auth-main,
html[data-theme="dark"] .account-auth-toggle {
  background: rgba(34, 42, 56, 0.82);
}

.account-auth-field {
  gap: 7px;
}

.account-field-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  font-weight: 700;
}

.account-auth-field input {
  border: 1px solid color-mix(in srgb, var(--line) 82%, #8db9ff);
  border-radius: 12px;
  height: 46px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.95);
  font-size: 0.94rem;
  transition: border-color 170ms ease, box-shadow 170ms ease, transform 170ms ease;
}

.account-auth-field input:focus-visible {
  outline: none;
  border-color: rgba(10, 116, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(10, 116, 255, 0.14);
  transform: translateY(-1px);
}

html[data-theme="dark"] .account-auth-field input {
  background: rgba(20, 26, 36, 0.94);
  border-color: rgba(116, 136, 168, 0.48);
  color: #edf2ff;
}

html[data-theme="dark"] .account-auth-field input::placeholder {
  color: rgba(201, 212, 229, 0.58);
}

.account-submit-btn {
  margin-top: 8px;
  min-height: 46px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.account-auth-side {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px;
  background:
    linear-gradient(165deg, rgba(10, 116, 255, 0.1), rgba(10, 157, 117, 0.08)),
    rgba(249, 251, 255, 0.82);
}

.account-auth-side-kicker {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--primary-strong);
  font-weight: 700;
}

.account-auth-side h3 {
  margin: 6px 0 0;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.account-auth-benefits {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.account-auth-benefits li {
  position: relative;
  padding-left: 20px;
  color: var(--muted-strong);
  font-size: 0.87rem;
  line-height: 1.35;
}

.account-auth-benefits li::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0a74ff, #0b9f79);
  box-shadow: 0 0 0 3px rgba(10, 116, 255, 0.12);
}

.account-auth-side-note {
  margin: 12px 0 0;
  font-size: 0.79rem;
  color: var(--muted);
}

html[data-theme="dark"] .account-auth-side {
  background:
    linear-gradient(165deg, rgba(11, 95, 204, 0.22), rgba(7, 115, 86, 0.16)),
    rgba(34, 42, 56, 0.82);
}

.account-form {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.account-fullname-field.hidden,
.account-form .field.hidden {
  display: none;
}

.account-auth-message {
  min-height: 1.4em;
  margin: 10px 0 0;
  font-size: 0.86rem;
  color: var(--muted);
  border-radius: 10px;
  padding: 4px 0;
}

.account-auth-message.is-success {
  color: #0d7a5c;
  background: rgba(10, 157, 117, 0.12);
  padding: 8px 10px;
}

.account-auth-message.is-error {
  color: #a22121;
  background: rgba(198, 58, 58, 0.12);
  padding: 8px 10px;
}

.account-auth-message.is-warning {
  color: #8b5806;
  background: rgba(223, 154, 16, 0.13);
  padding: 8px 10px;
}

html[data-theme="dark"] .account-auth-message.is-success {
  color: #7ce4bf;
  background: rgba(15, 134, 102, 0.24);
}

html[data-theme="dark"] .account-auth-message.is-error {
  color: #ffaaaa;
  background: rgba(154, 46, 46, 0.26);
}

html[data-theme="dark"] .account-auth-message.is-warning {
  color: #ffd99a;
  background: rgba(145, 97, 28, 0.3);
}

.account-member-card {
  display: grid;
  align-content: start;
}

.account-member-details {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  background: rgba(249, 251, 255, 0.86);
  display: grid;
  gap: 10px;
}

html[data-theme="dark"] .account-member-details {
  background: rgba(34, 42, 56, 0.76);
}

.account-member-details h3 {
  margin: 4px 0 0;
  letter-spacing: -0.02em;
}

.account-id {
  margin: 4px 0 0;
  color: var(--muted-strong);
  font-size: 0.84rem;
  word-break: break-all;
}

.account-subscription-status {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font-size: 0.9rem;
  color: var(--muted-strong);
  background: var(--surface-muted);
}

.account-delete-btn {
  color: #9f2323;
  border-color: rgba(159, 35, 35, 0.38);
  background: rgba(255, 237, 237, 0.78);
}

.account-delete-btn:hover,
.account-delete-btn:focus-visible {
  color: #ffffff;
  border-color: rgba(159, 35, 35, 0.9);
  background: linear-gradient(135deg, #c63a3a, #9f2323);
}

html[data-theme="dark"] .account-delete-btn {
  color: #ffb7b7;
  border-color: rgba(198, 58, 58, 0.5);
  background: rgba(68, 28, 28, 0.76);
}

html[data-theme="dark"] .account-delete-btn:hover,
html[data-theme="dark"] .account-delete-btn:focus-visible {
  color: #ffffff;
  background: linear-gradient(135deg, #c63a3a, #9f2323);
}

.account-danger-note {
  margin-top: 10px;
}

.account-subscription-badge.is-success {
  color: #ffffff;
  background: linear-gradient(135deg, #0a9d75, #0c815f);
  border-color: rgba(8, 99, 75, 0.7);
}

.account-subscription-badge.is-danger {
  color: #ffffff;
  background: linear-gradient(135deg, #c63a3a, #9f2323);
  border-color: rgba(129, 27, 27, 0.8);
}

.account-subscription-badge.is-warning {
  color: var(--text);
}

.account-analytics-section {
  padding-top: 10px;
}

.account-analytics-head {
  align-items: flex-start;
}

.account-lookback-field {
  min-width: 170px;
  margin: 0;
}

.account-metrics-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.account-charts-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.account-chart-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 8% 10%, rgba(31, 140, 255, 0.16), transparent 48%),
    radial-gradient(circle at 92% 88%, rgba(139, 125, 255, 0.12), transparent 44%),
    rgba(249, 251, 255, 0.9);
  padding: 14px;
  min-height: 282px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 420ms ease, transform 420ms ease, box-shadow 320ms ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

html[data-theme="dark"] .account-chart-card {
  background:
    radial-gradient(circle at 10% 12%, rgba(31, 140, 255, 0.24), transparent 44%),
    radial-gradient(circle at 90% 86%, rgba(139, 125, 255, 0.2), transparent 44%),
    rgba(34, 42, 56, 0.82);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.34);
}

.account-chart-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 35%, rgba(255, 255, 255, 0.03));
}

.account-chart-card.is-visible:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
}

html[data-theme="dark"] .account-chart-card.is-visible:hover {
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.48);
}

.account-chart-card canvas {
  margin-top: 10px;
  width: 100%;
  height: 210px !important;
}

.account-chart-wide {
  grid-column: 1 / -1;
  min-height: 290px;
}

.account-list-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.account-history-card {
  display: grid;
  gap: 12px;
}

.account-history-head {
  align-items: flex-start;
}

.account-history-refresh-btn {
  min-width: 100px;
}

.account-history-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.account-history-status {
  margin: 0;
}

.account-history-status.is-success {
  color: #087443;
}

.account-history-status.is-warning {
  color: #9a6a00;
}

.account-history-status.is-error {
  color: #b42318;
}

html[data-theme="dark"] .account-history-status.is-success {
  color: #7ce4b4;
}

html[data-theme="dark"] .account-history-status.is-warning {
  color: #ffd17a;
}

html[data-theme="dark"] .account-history-status.is-error {
  color: #ff9c92;
}

.account-history-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.account-history-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.78);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

html[data-theme="dark"] .account-history-item {
  background: rgba(32, 40, 54, 0.74);
}

.account-history-item.is-unavailable {
  opacity: 0.72;
}

.account-history-item-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.account-history-item-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

.account-history-item-meta,
.account-history-item-summary,
.account-history-item-preview {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted-strong);
}

.account-history-item-preview {
  color: var(--muted);
}

.account-history-open-btn {
  white-space: nowrap;
  min-width: 92px;
}

.account-history-list li.empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.52);
}

html[data-theme="dark"] .account-history-list li.empty {
  background: rgba(32, 40, 54, 0.5);
}

.account-simple-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.account-simple-list li {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.76);
}

html[data-theme="dark"] .account-simple-list li {
  background: rgba(32, 40, 54, 0.74);
}

.account-simple-list li strong {
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.account-simple-list li small {
  color: var(--muted);
  font-weight: 500;
}

.account-simple-list li.empty {
  color: var(--muted);
}

.account-analytics-footnote {
  margin-top: 14px;
}

@media (max-width: 1080px) {
  body[data-page="account"] .account-hero-grid {
    grid-template-columns: 1fr;
  }

  .account-grid {
    grid-template-columns: 1fr;
  }

  .account-auth-shell {
    grid-template-columns: 1fr;
  }

  .account-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-charts-grid {
    grid-template-columns: 1fr;
  }

  .account-chart-wide {
    grid-column: auto;
  }

  .account-list-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .account-card {
    padding: 18px;
  }

  .account-hero-panel-grid {
    grid-template-columns: 1fr;
  }

  .account-auth-toggle .results-tab {
    min-width: 0;
    flex: 1 1 0;
  }

  .account-auth-toggle {
    width: 100%;
  }

  .account-metrics-grid {
    grid-template-columns: 1fr;
  }

  .account-history-item {
    flex-direction: column;
    align-items: stretch;
  }

  .account-history-open-btn {
    width: 100%;
  }
}

/* Mobile stability patch: keep nav collapsed by default and opened only on toggle */
@media (max-width: 760px) {
  .nav {
    position: relative !important;
  }

  #menuToggle.menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: absolute !important;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 60;
    display: none !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
    box-shadow: var(--shadow-soft);
  }

  .nav-links.open {
    display: grid !important;
  }

  .nav-links a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 10px;
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 430px) {
  .brand-wordmark {
    font-size: 0.86rem !important;
  }

  .language-control select {
    width: 98px !important;
    min-width: 98px !important;
    font-size: 0.72rem !important;
  }
}

.protocol-stat-card-alert {
  border-color: rgba(231, 76, 76, 0.38);
  background: linear-gradient(145deg, rgba(255, 236, 236, 0.96), rgba(255, 247, 247, 0.9));
  box-shadow: 0 0 0 1px rgba(231, 76, 76, 0.16), 0 10px 28px rgba(201, 35, 35, 0.13);
}

.protocol-stat-card-alert .stat-value {
  color: #a52929;
}

html[data-theme="dark"] .protocol-stat-card-alert {
  border-color: rgba(255, 122, 122, 0.46);
  background: linear-gradient(145deg, rgba(84, 35, 35, 0.9), rgba(59, 27, 27, 0.86));
  box-shadow: 0 0 0 1px rgba(255, 122, 122, 0.2), 0 14px 34px rgba(0, 0, 0, 0.44);
}

html[data-theme="dark"] .protocol-stat-card-alert .stat-value {
  color: #ffd5d5;
}

.alert-overview-card.danger {
  border-color: rgba(231, 76, 76, 0.42);
  background: linear-gradient(145deg, rgba(255, 240, 240, 0.94), rgba(255, 248, 248, 0.92));
}

html[data-theme="dark"] .alert-overview-card.danger {
  border-color: rgba(255, 122, 122, 0.46);
  background: linear-gradient(145deg, rgba(84, 35, 35, 0.88), rgba(59, 27, 27, 0.84));
}

.alert-top-summary {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 13px;
}

.alert-top-summary h4 {
  margin: 0 0 6px;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
}

.alert-top-summary p {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text);
}

.alert-top-summary.warning {
  border-color: var(--warning-border);
  background: var(--warning-bg);
}

.alert-top-summary.danger {
  border-color: var(--danger-border);
  background: var(--danger-bg);
}

.high-priority-pulse {
  animation: highPriorityPulse 1.75s ease-in-out infinite;
}

[data-stop-pulse-on-click="true"] {
  cursor: pointer;
}

[data-stop-pulse-on-click="true"].pulse-dismissed {
  cursor: default;
}

@keyframes highPriorityPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 0 rgba(220, 65, 65, 0.26), 0 10px 26px rgba(195, 44, 44, 0.12);
  }
  50% {
    transform: translateY(-1px) scale(1.013);
    box-shadow: 0 0 0 8px rgba(220, 65, 65, 0), 0 15px 36px rgba(195, 44, 44, 0.24);
  }
}
