/* ================================================
   KALKULATOR SNU — Sleep Night Theme
   OKLCH "Midnight Sleep" Design System
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600;700;800;900&display=swap');

/* ── FALLBACK HEX VALUES (for old browsers) ─────── */
:root {
  --background: #1a1b2e;
  --card: #1e2038;
  --muted: #252642;
  --input: #1f213c;
  --sidebar: #1c1d30;
  --foreground: #f0f0f8;
  --muted-foreground: #9090b8;
  --card-foreground: #f0f0f8;
  --primary: #7b6ef0;
  --primary-foreground: #ffffff;
  --accent: #e8c84a;
  --secondary: #3a2e6a;
  --border: #383860;
  --ring: #7b6ef0;
  --chart-wake: #e8c84a;
  --chart-light: #7b6ef0;
  --chart-deep: #4a30a0;
  --chart-rem: #4db0c8;
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1.125rem;
  --radius-full: 9999px;
  --transition: all 300ms ease-in-out;
  --glow-primary: 0 0 24px rgba(123, 110, 240, 0.35);
  --glow-accent: 0 0 24px rgba(232, 200, 74, 0.35);
  --shadow-card: 0 4px 32px rgba(0, 0, 0, 0.45);
}

/* ── OKLCH OVERRIDE (modern browsers) ──────────── */
@supports (color: oklch(0 0 0)) {
  :root {
    --background: oklch(0.18 0.03 260);
    --card: oklch(0.22 0.04 265);
    --muted: oklch(0.28 0.04 265);
    --input: oklch(0.25 0.05 265);
    --sidebar: oklch(0.20 0.03 260);
    --foreground: oklch(0.95 0.01 250);
    --muted-foreground: oklch(0.70 0.04 260);
    --card-foreground: oklch(0.95 0.01 250);
    --primary: oklch(0.65 0.16 265);
    --primary-foreground: oklch(0.98 0 0);
    --accent: oklch(0.82 0.14 85);
    --secondary: oklch(0.35 0.10 270);
    --border: oklch(0.32 0.05 265);
    --ring: oklch(0.65 0.16 265);
    --chart-wake: oklch(0.82 0.14 85);
    --chart-light: oklch(0.65 0.16 265);
    --chart-deep: oklch(0.45 0.18 275);
    --chart-rem: oklch(0.75 0.12 210);
    --glow-primary: 0 0 24px oklch(0.65 0.16 265 / 0.35);
    --glow-accent: 0 0 24px oklch(0.82 0.14 85 / 0.35);
  }
}

/* ── RESET & BASE ────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── TYPOGRAPHY ─────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--foreground);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }

p {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

p:last-child { margin-bottom: 0; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover { color: var(--accent); }

strong { color: var(--foreground); font-weight: 700; }

ul, ol { padding-left: 1.5rem; color: var(--muted-foreground); }

li { margin-bottom: 0.375rem; }

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

/* ── SKIP LINK (Accessibility) ──────────────────── */
.skip-link {
  position: absolute;
  top: -60px;
  left: 1rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 700;
  z-index: 9999;
  transition: top 200ms ease;
}

.skip-link:focus { top: 0; }

/* ── CONTAINER ──────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── HEADER / NAV ───────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--sidebar);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--foreground);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-text span { color: var(--primary); }

.nav-links {
  display: none;
  list-style: none;
  gap: 0.2rem;
  padding: 0;
}

@media (min-width: 768px) { .nav-links { display: flex; } }

.nav-links a {
  display: block;
  padding: 0.5rem 0.875rem;
  color: var(--muted-foreground);
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--foreground);
  background-color: var(--muted);
}

.nav-mobile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--foreground);
  cursor: pointer;
  transition: var(--transition);
}

.nav-mobile-btn:hover { background-color: var(--muted); }

@media (min-width: 768px) { .nav-mobile-btn { display: none; } }

.nav-mobile-menu {
  display: none;
  flex-direction: column;
  padding: 0.625rem 1.25rem 1rem;
  border-top: 1px solid var(--border);
  background-color: var(--sidebar);
  gap: 0.25rem;
}

.nav-mobile-menu.open { display: flex; }

.nav-mobile-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--muted-foreground);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-mobile-menu a:hover,
.nav-mobile-menu a.active {
  color: var(--foreground);
  background-color: var(--muted);
}

/* ── BREADCRUMBS ─────────────────────────────────── */
.breadcrumbs-bar {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  background-color: var(--sidebar);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--muted-foreground);
  flex-wrap: wrap;
}

.breadcrumbs a { color: var(--muted-foreground); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { opacity: 0.4; margin: 0 0.2rem; }
.breadcrumbs .current { color: var(--foreground); font-weight: 600; }

/* ── HERO SECTION ───────────────────────────────── */
.hero {
  padding: 3rem 0 2rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background-color: var(--secondary);
  color: var(--accent);
  padding: 0.35rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
}

.hero h1 {
  margin-bottom: 1.125rem;
  background: linear-gradient(135deg, var(--foreground) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.05rem;
  max-width: 680px;
  margin: 0 auto 1rem;
  color: var(--muted-foreground);
}

/* ── CALCULATOR WIDGET ──────────────────────────── */
.calculator-section { padding: 0.5rem 0 3rem; }

.calculator-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  max-width: 700px;
  margin: 0 auto;
}

.calc-tabs {
  display: flex;
  gap: 0.375rem;
  background-color: var(--muted);
  border-radius: var(--radius);
  padding: 0.3rem;
  margin-bottom: 2rem;
}

.calc-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 0.875rem;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--muted-foreground);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.calc-tab.active {
  background-color: var(--card);
  color: var(--foreground);
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.calc-tab:hover:not(.active) { color: var(--foreground); }

.calc-content { display: none; }
.calc-content.active { display: block; }

.calc-label {
  display: block;
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.time-input-group {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

.time-input {
  flex: 1;
  padding: 0.875rem 1.25rem;
  background-color: var(--input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-family: inherit;
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
}

.time-input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(123, 110, 240, 0.25);
}

.time-input::-webkit-calendar-picker-indicator {
  filter: invert(0.75);
  cursor: pointer;
  width: 24px;
  height: 24px;
}

.calc-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  letter-spacing: 0.01em;
}

.calc-btn:hover {
  background-color: #8f82f5;
  box-shadow: var(--glow-primary);
  transform: translateY(-2px);
}

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

/* Results */
#results-container { margin-top: 2rem; display: none; }
#results-container.visible { display: block; }

.results-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 420px) { .results-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 580px) { .results-grid { grid-template-columns: repeat(3, 1fr); } }

.result-card {
  background-color: var(--muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.125rem;
  text-align: center;
  transition: var(--transition);
}

.result-card:hover {
  border-color: var(--primary);
  box-shadow: var(--glow-primary);
  transform: translateY(-2px);
}

.result-card.recommended {
  border-color: var(--accent);
  box-shadow: var(--glow-accent);
  background: linear-gradient(135deg, rgba(232,200,74,0.08) 0%, var(--muted) 100%);
}

.result-card.optimal {
  border-color: var(--primary);
  box-shadow: var(--glow-primary);
  background: linear-gradient(135deg, rgba(123,110,240,0.1) 0%, var(--muted) 100%);
}

.result-time {
  font-size: 1.875rem;
  font-weight: 900;
  color: var(--foreground);
  line-height: 1;
  margin-bottom: 0.375rem;
}

.result-card.recommended .result-time { color: var(--accent); }
.result-card.optimal .result-time { color: var(--primary); }

.result-cycles {
  font-size: 0.78rem;
  color: var(--muted-foreground);
  margin-bottom: 0.2rem;
}

.result-hours {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted-foreground);
}

.result-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  margin-top: 0.6rem;
}

.badge-recommended { background-color: var(--accent); color: #1a1b2e; }
.badge-optimal { background-color: var(--primary); color: var(--primary-foreground); }
.badge-ok { background-color: var(--secondary); color: var(--foreground); }
.badge-short { background-color: #5a2020; color: #ffa0a0; }
.badge-vshort { background-color: #3a1010; color: #ff8080; }

.results-note {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 1rem;
  text-align: center;
  opacity: 0.75;
  margin-bottom: 0;
}

/* ── CONTENT SECTIONS ───────────────────────────── */
.content-section { padding: 3.5rem 0; }

.content-section.bg-muted { background-color: var(--muted); }

.content-inner {
  max-width: 860px;
  margin: 0 auto;
}

.content-section h2 {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.h2-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--secondary);
  border-radius: var(--radius-sm);
  color: var(--primary);
  flex-shrink: 0;
}

.content-section h3 { margin: 1.75rem 0 0.75rem; color: var(--foreground); }

.content-section p { line-height: 1.85; }

/* Sleep Phases Visual */
.sleep-phases-visual {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.75rem 0;
}

@media (min-width: 560px) { .sleep-phases-visual { grid-template-columns: repeat(4, 1fr); } }

.phase-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.125rem;
  text-align: center;
}

.phase-color {
  width: 48px;
  height: 6px;
  border-radius: var(--radius-full);
  margin: 0 auto 0.875rem;
}

.phase-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.phase-duration {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-bottom: 0.25rem;
}

.phase-pct {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
}

/* Age Table */
.age-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.9rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.age-table th {
  background-color: var(--secondary);
  color: var(--foreground);
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.age-table td {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
}

.age-table tr:nth-child(even) td { background-color: var(--card); }
.age-table tr:hover td { background-color: var(--muted); }

/* Tips List */
.tips-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin: 1rem 0;
}

.tips-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.875rem 1rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted-foreground);
  margin-bottom: 0;
}

.tips-list li .tip-icon {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── FAQ SECTION ─────────────────────────────────── */
.faq-section { padding: 3.5rem 0; background-color: var(--muted); }

.faq-inner { max-width: 860px; margin: 0 auto; }

.section-header { margin-bottom: 2rem; }
.section-header h2 { margin-bottom: 0.5rem; }
.section-header p { color: var(--muted-foreground); margin-bottom: 0; }

.divider {
  width: 56px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: var(--radius-full);
  margin: 0.75rem 0;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-item {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 300ms ease;
}

.faq-item.open { border-color: var(--primary); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  background: none;
  border: none;
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.faq-question:hover { background-color: var(--muted); }

.faq-icon {
  flex-shrink: 0;
  color: var(--primary);
  transition: transform 300ms ease-in-out;
}

.faq-item.open .faq-icon { transform: rotate(180deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 420ms ease-in-out;
}

.faq-answer-inner {
  padding: 0 1.25rem 1.25rem;
  color: var(--muted-foreground);
  line-height: 1.85;
  font-size: 0.93rem;
}

.faq-item.open .faq-answer { max-height: 600px; }

/* ── AUTHOR / EEAT ───────────────────────────────── */
.author-section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}

.author-inner { max-width: 860px; margin: 0 auto; }

.author-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.author-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background-color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

@media (max-width: 560px) {
  .author-card { flex-direction: column; align-items: center; text-align: center; }
}

.author-avatar-wrap { position: relative; flex-shrink: 0; }

.author-avatar-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  background-color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.75rem;
  font-weight: 900;
  overflow: hidden;
}

.author-verified {
  position: absolute;
  bottom: -3px;
  right: -3px;
  background-color: var(--accent);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1b2e;
}

.author-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--foreground);
  margin-bottom: 0.2rem;
}

.author-title {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.875rem;
}

.author-credentials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}

.credential-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.625rem;
  background-color: var(--secondary);
  color: var(--foreground);
  border-radius: var(--radius-full);
}

.author-bio { font-size: 0.88rem; color: var(--muted-foreground); margin-bottom: 0; line-height: 1.8; }

/* ── RELATED CALCULATORS ─────────────────────────── */
.related-calculators { padding: 3.5rem 0; }

.calc-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}

@media (min-width: 560px) { .calc-cards-grid { grid-template-columns: repeat(3, 1fr); } }

.calc-link-card {
  display: block;
  background-color: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-decoration: none;
  transition: var(--transition);
}

.calc-link-card:hover {
  border-color: var(--primary);
  box-shadow: var(--glow-primary);
  transform: translateY(-3px);
}

.calc-link-icon {
  width: 48px;
  height: 48px;
  background-color: var(--secondary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 1rem;
}

.calc-link-title { font-size: 0.97rem; font-weight: 800; color: var(--foreground); margin-bottom: 0.5rem; }
.calc-link-desc { font-size: 0.82rem; color: var(--muted-foreground); line-height: 1.6; margin-bottom: 0; }

.calc-link-arrow {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 0.875rem;
  transition: var(--transition);
}

.calc-link-card:hover .calc-link-arrow { gap: 0.6rem; }

/* ── FOOTER ──────────────────────────────────────── */
.site-footer {
  background-color: var(--sidebar);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 600px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.footer-desc { font-size: 0.875rem; color: var(--muted-foreground); line-height: 1.75; margin-top: 1rem; }

.footer-col-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--foreground);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 1rem;
}

.footer-links { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }

.footer-links a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: var(--transition);
  display: inline-block;
}

.footer-links a:hover { color: var(--foreground); padding-left: 4px; }

.social-icons { display: flex; gap: 0.625rem; margin-top: 0.75rem; }

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background-color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted-foreground);
  transition: var(--transition);
}

.social-icon:hover {
  background-color: var(--secondary);
  color: var(--foreground);
  border-color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  text-align: center;
}

@media (min-width: 640px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}

.footer-bottom p { font-size: 0.8rem; color: var(--muted-foreground); margin: 0; }

.footer-disclaimer {
  font-size: 0.72rem;
  color: var(--muted-foreground);
  text-align: center;
  margin-top: 1rem;
  padding: 0 1rem;
  opacity: 0.65;
  line-height: 1.7;
}

/* ── PAGE-SPECIFIC: SLEEP PHASES ─────────────────── */
.phases-breakdown {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
  margin-top: 1.5rem;
}

@media (min-width: 420px) { .phases-breakdown { grid-template-columns: repeat(3, 1fr); } }

.phase-stat {
  background-color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.125rem;
  text-align: center;
}

.phase-stat-value { font-size: 1.75rem; font-weight: 900; line-height: 1; margin-bottom: 0.375rem; }
.phase-stat-label { font-size: 0.75rem; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: 0.05em; }
.phase-stat-time { font-size: 0.8rem; font-weight: 700; color: var(--muted-foreground); margin-top: 0.25rem; }

/* ── PAGE-SPECIFIC: NAP CALCULATOR ───────────────── */
.nap-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 420px) { .nap-options { grid-template-columns: repeat(3, 1fr); } }

.nap-option-card {
  background-color: var(--muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  transition: var(--transition);
}

.nap-option-card:hover { border-color: var(--primary); box-shadow: var(--glow-primary); }
.nap-option-card.best { border-color: var(--accent); box-shadow: var(--glow-accent); }

.nap-duration { font-size: 2rem; font-weight: 900; color: var(--foreground); line-height: 1; margin-bottom: 0.375rem; }
.nap-option-card.best .nap-duration { color: var(--accent); }
.nap-type { font-size: 0.9rem; font-weight: 700; color: var(--foreground); margin-bottom: 0.375rem; }
.nap-desc { font-size: 0.78rem; color: var(--muted-foreground); line-height: 1.6; margin-bottom: 0; }
.nap-wake-time { font-size: 0.85rem; font-weight: 800; color: var(--primary); margin-top: 0.625rem; }

/* ── PAGE-SPECIFIC: SLEEP DEBT ───────────────────── */
.sleep-week-inputs { display: flex; flex-direction: column; gap: 0.625rem; margin-bottom: 1.5rem; }

.sleep-day-row {
  display: grid;
  grid-template-columns: 130px 1fr 80px;
  gap: 0.875rem;
  align-items: center;
}

@media (max-width: 480px) { .sleep-day-row { grid-template-columns: 100px 1fr 65px; gap: 0.5rem; } }

.sleep-day-label { font-weight: 700; font-size: 0.9rem; color: var(--foreground); }
.sleep-day-label span { font-size: 0.75rem; color: var(--muted-foreground); font-weight: 400; display: block; }

.sleep-hours-input {
  padding: 0.6rem 0.875rem;
  background-color: var(--input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  transition: var(--transition);
  width: 100%;
}

.sleep-hours-input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(123,110,240,0.25);
}

.sleep-hours-unit { font-size: 0.8rem; color: var(--muted-foreground); font-weight: 600; text-align: right; }

.debt-result-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.5rem;
  display: none;
}

.debt-result-card.visible { display: block; }

.debt-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.875rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 480px) { .debt-stats-grid { grid-template-columns: repeat(4, 1fr); } }

.debt-stat {
  background-color: var(--muted);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}

.debt-stat-value { font-size: 1.6rem; font-weight: 900; color: var(--accent); line-height: 1; margin-bottom: 0.375rem; }
.debt-stat-label { font-size: 0.72rem; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: 0.04em; }

.debt-advice {
  padding: 1rem 1.25rem;
  background-color: var(--secondary);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

/* ── RECOMMENDED AGE INPUT ───────────────────────── */
.rec-sleep-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.rec-sleep-row label { font-weight: 700; font-size: 0.9rem; color: var(--foreground); flex: 1; }

.rec-sleep-select {
  padding: 0.5rem 0.875rem;
  background-color: var(--input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.rec-sleep-select:focus { outline: none; border-color: var(--ring); }

/* ── SCROLL ANIMATION ─────────────────────────────── */
.fade-in { opacity: 0; transform: translateY(18px); transition: opacity 600ms ease-out, transform 600ms ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── UTILITY ─────────────────────────────────────── */
.text-accent { color: var(--accent) !important; }
.text-primary { color: var(--primary) !important; }
.text-muted { color: var(--muted-foreground) !important; }
.font-bold { font-weight: 700; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ── RESPONSIVE TWEAKS ───────────────────────────── */
@media (max-width: 480px) {
  .calculator-card { padding: 1.25rem; }
  .time-input { font-size: 1.5rem; padding: 0.75rem; }
  .hero { padding: 2rem 0 1.5rem; }
  .content-section { padding: 2.5rem 0; }
}
