/* ==========================================================================
   WATTELLERS × NỐI MẠCH (P2.1) — "THÀNH PHỐ LÚC LÊN ĐÈN" DESIGN SYSTEM
   Locked Brand Palette:
     - Dusk Navy:    #172B42 (Twilight sky, Website stage & map sea)
     - Harbor Teal:  #285D63 (Primary structure & App interactive chrome)
     - Seafoam Mint: #80B9AE (Flexible grid pulse, calm accents)
     - Window Gold:  #F2C46D (City lights, sparks, primary CTA highlights)
     - Warm Paper:   #F5EDDC (Crisp daylight surface for App & reading)
   STRICT LAYOUT GUARANTEES:
     - ZERO `overflow-x: hidden` hacks on html/body/main wrappers.
     - Genuine one-handed mobile bottom bar on App view + compact progressive disclosure.
   ========================================================================== */

/* ---------- 1. SELF-HOSTED SIL OFL FONTS ---------- */
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 600 700;
  font-display: swap;
  src: url('../assets/fonts/fraunces_italic_vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 600 700;
  font-display: swap;
  src: url('../assets/fonts/fraunces_italic_latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url('../assets/fonts/fraunces_normal_vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url('../assets/fonts/fraunces_normal_latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/font_07.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/font_09.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/font_13.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/font_15.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/font_16.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/font_18.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- 2. LOCKED BRAND TOKENS ---------- */
:root {
  --font-display: 'Fraunces', Georgia, serif;
  --font-sans: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Official Brand Lock Palette */
  --dusk: #172B42;
  --dusk-deep: #102033;
  --dusk-mid: #203A57;
  --teal: #285D63;
  --teal-dark: #1E484D;
  --mint: #80B9AE;
  --mint-soft: #E3F0ED;
  --gold: #F2C46D;
  --gold-deep: #C48B23;
  --gold-soft: #FCF2DC;
  --cream: #F5EDDC;
  --paper: #FCF9F2;
  --white: #FFFFFF;

  --ink: #172B42;
  --ink-body: #2A3F54;
  --ink-muted: #52687C;
  --line: rgba(23, 43, 66, 0.12);
  --line-strong: rgba(23, 43, 66, 0.24);
  --line-light: rgba(245, 237, 220, 0.22);

  --heat-hot: #B8422A;
  --heat-warm: #B87B16;
  --heat-cool: #285D63;
  --danger: #A62B22;
  --danger-bg: #FDECEB;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-soft: 0 2px 8px rgba(23, 43, 66, 0.05), 0 12px 28px -16px rgba(23, 43, 66, 0.14);
}

/* ---------- 3. BASE & ACCESSIBILITY ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg, canvas {
  max-width: 100%;
  height: auto;
}

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

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--dusk);
  padding: 10px 14px;
  font-weight: 700;
  z-index: 999;
  text-decoration: none;
}
.skip-link:focus {
  left: 10px;
  top: 10px;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  line-height: 1.24;
  overflow-wrap: anywhere;
}
h1 { font-size: clamp(1.5rem, 3.6vw, 2.35rem); }
h2 { font-size: clamp(1.2rem, 2.5vw, 1.65rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 10px; overflow-wrap: anywhere; }

.muted {
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 14px;
}

/* ---------- 4. HEADER (CLEAN DUSK NAVIGATION) ---------- */
.site-header {
  background: var(--dusk);
  color: var(--cream);
  border-bottom: 1px solid var(--line-light);
  position: relative;
  z-index: 50;
}
@media (min-width: 860px) {
  .site-header {
    position: sticky;
    top: 0;
  }
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.brand-logo-img {
  height: 34px;
  width: auto;
  border-radius: 6px;
  display: block;
}

.brand-divider {
  width: 1px;
  height: 24px;
  background: var(--line-light);
}

.brand-title-wrap {
  min-width: 0;
}
.brand-site-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--gold);
  margin: 0;
  line-height: 1.15;
}
.brand-slogan-mini {
  font-size: 0.72rem;
  color: var(--mint);
  margin: 0;
}

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.nav-tab {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--cream);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}
.nav-tab:hover {
  background: rgba(128, 185, 174, 0.14);
}
.nav-tab[aria-selected="true"] {
  background: var(--gold);
  color: var(--dusk);
  font-weight: 700;
}

.header-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.env-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(242, 196, 109, 0.16);
  color: var(--gold);
  border: 1px solid rgba(242, 196, 109, 0.4);
}
.env-pill.is-offline {
  background: rgba(184, 66, 42, 0.28);
  color: #FFDCD5;
  border-color: #E38B78;
}

.icon-pill-btn {
  min-height: 44px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-light);
  background: rgba(255, 255, 255, 0.06);
  color: var(--cream);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}
.icon-pill-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ---------- 5. BUTTONS & MINIMAL LABELS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--teal);
  background: var(--teal);
  color: var(--white);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn:hover { background: var(--teal-dark); }
.btn:disabled { opacity: 0.52; cursor: not-allowed; }

.btn-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--dusk);
}
.btn-gold:hover { filter: brightness(0.95); }

.btn-ghost-light {
  background: rgba(245, 237, 220, 0.08);
  border-color: rgba(245, 237, 220, 0.35);
  color: var(--cream);
}
.btn-ghost-light:hover { background: rgba(245, 237, 220, 0.16); }

.btn-outline {
  background: var(--white);
  color: var(--dusk);
  border-color: var(--line-strong);
}
.btn-outline:hover { background: var(--paper); }

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--white);
}

.btn-sm {
  min-height: 44px;
  padding: 7px 12px;
  font-size: 0.82rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 6px;
}
.kicker-light {
  color: var(--gold);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--mint-soft);
  color: var(--teal-dark);
}
.tag-demo {
  background: var(--gold-soft);
  color: #6B4705;
}
.tag-hot { background: #FBE4DF; color: var(--heat-hot); }
.tag-warm { background: #FDF0D5; color: #7C4F06; }
.tag-cool { background: var(--mint-soft); color: var(--teal-dark); }

.callout {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border-left: 4px solid var(--teal);
  font-size: 0.86rem;
  margin-bottom: 12px;
}
.callout-gold {
  background: var(--gold-soft);
  border-left-color: var(--gold-deep);
  color: #4E3405;
}
.callout-danger {
  background: var(--danger-bg);
  border-left-color: var(--danger);
  color: var(--danger);
}

/* ---------- 6. WEBSITE NỐI MẠCH: DUSK HERO + 2D STREETSCAPE ---------- */
.dusk-hero {
  background: linear-gradient(180deg, var(--dusk) 0%, var(--dusk-mid) 100%);
  color: var(--cream);
  padding: 28px 0 32px;
  border-bottom: 3px solid var(--gold);
}

.hero-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: end;
  margin-bottom: 20px;
}
@media (min-width: 860px) {
  .hero-top {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  }
}

.hero-lead {
  font-size: 1rem;
  color: rgba(245, 237, 220, 0.88);
  max-width: 58ch;
  margin-bottom: 16px;
}

/* Compact 320x568 first-screen ergonomics: keep BOTH main CTA & direct App Wattellers entry visible above the fold */
@media (max-width: 420px) {
  .header-inner {
    padding: 8px 12px;
    gap: 6px;
  }
  .brand-logo-img {
    height: 28px;
  }
  .brand-slogan-mini {
    display: none;
  }
  .primary-nav {
    width: 100%;
    gap: 4px;
  }
  .nav-tab {
    min-height: 44px;
    padding: 6px 10px;
    font-size: 0.78rem;
  }
  .icon-pill-btn {
    min-height: 44px;
    padding: 6px 10px;
    font-size: 0.78rem;
  }
  .dusk-hero {
    padding: 14px 0 22px;
  }
  .hero-top {
    gap: 12px;
    margin-bottom: 14px;
  }
  .dusk-hero h1 {
    font-size: 1.38rem;
    margin-bottom: 6px;
  }
  .hero-lead {
    font-size: 0.86rem;
    line-height: 1.42;
    margin-bottom: 10px;
  }
  .dusk-hero .btn-row {
    gap: 6px;
  }
  .dusk-hero .btn {
    padding: 8px 12px;
    font-size: 0.82rem;
    width: 100%;
  }
}

.hero-progress-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  background: rgba(16, 32, 51, 0.65);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  padding: 12px;
}
.hero-stat {
  min-width: 0;
}
.hero-stat-val {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
}
.hero-stat-lbl {
  display: block;
  font-size: 0.74rem;
  color: var(--mint);
}

/* 2D Interactive Dusk City Stage */
.street-stage-shell {
  background: var(--dusk-deep);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.55);
}

.street-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  cursor: pointer;
  touch-action: manipulation;
}

.street-landmark {
  cursor: pointer;
}
.street-landmark:hover .landmark-glow,
.street-landmark:focus .landmark-glow {
  opacity: 0.95;
}

.street-avatar {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.street-bar {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: var(--cream);
}
.street-bar > div {
  min-width: 210px;
}

.street-stops {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}
@media (min-width: 640px) {
  .street-stops {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.stop-btn {
  min-height: 48px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-light);
  background: rgba(255, 255, 255, 0.05);
  color: var(--cream);
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stop-btn:hover {
  background: rgba(128, 185, 174, 0.16);
}
.stop-btn.is-active {
  background: rgba(242, 196, 109, 0.16);
  border-color: var(--gold);
}
.stop-btn strong { font-size: 0.88rem; color: var(--gold); }
.stop-btn span { font-size: 0.76rem; color: rgba(245, 237, 220, 0.8); }

/* ---------- 7. WEBSITE LOWER SECTIONS (MAP + TOP MISSED) ---------- */
.page-section {
  padding: 28px 0;
}

.section-surface {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
  min-width: 0;
}

.grid-map-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}
@media (min-width: 900px) {
  .grid-map-split {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  }
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 760px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 760px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Map Box */
.map-canvas-wrap {
  background: var(--dusk);
  border-radius: var(--radius-md);
  padding: 10px;
  position: relative;
}

.map-svg {
  width: 100%;
  height: auto;
  display: block;
}

.map-province {
  fill: #24455E;
  stroke: rgba(245, 237, 220, 0.26);
  stroke-width: 0.65;
  cursor: pointer;
  transition: fill 0.2s ease, stroke-width 0.15s ease;
}
.map-province:hover,
.map-province:focus {
  stroke: var(--gold);
  stroke-width: 1.4;
  outline: none;
}
.map-province.is-selected {
  stroke: #FFFFFF;
  stroke-width: 1.8;
}
.map-island {
  fill: var(--mint);
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 0.45;
  cursor: pointer;
}
.map-label {
  fill: rgba(245, 237, 220, 0.85);
  font-size: 11px;
  font-family: var(--font-sans);
  pointer-events: none;
}

/* ---------- 8. APP WATTELLERS — MOBILE-FIRST BRIGHT WORKSPACE ---------- */
.app-shell {
  padding: 16px 0 88px; /* leaves clean room for mobile bottom tab bar */
}
@media (min-width: 860px) {
  .app-shell {
    padding: 22px 0 36px;
  }
}

.app-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.living-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--white);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.seg-btn {
  min-height: 38px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
}
.seg-btn[aria-pressed="true"] {
  background: var(--dusk);
  color: var(--gold);
}

/* Desktop App Sub-Nav + Mobile One-Handed Bottom Tab Bar */
.app-nav-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  background: var(--dusk);
  border-top: 1px solid var(--line-light);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 4px 4px max(4px, env(safe-area-inset-bottom));
}
@media (min-width: 860px) {
  .app-nav-bar {
    position: static;
    border-top: 0;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    padding: 6px;
    gap: 6px;
  }
}

.app-nav-btn {
  min-height: 48px;
  padding: 6px 4px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: rgba(245, 237, 220, 0.78);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
}
@media (min-width: 860px) {
  .app-nav-btn {
    flex-direction: row;
    font-size: 0.86rem;
    gap: 6px;
    padding: 10px 12px;
  }
}
.app-nav-btn[aria-selected="true"] {
  background: var(--gold);
  color: var(--dusk);
  font-weight: 700;
}

/* Interactive Visual Room Canvas */
.room-stage-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.room-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

.room-hotspot {
  cursor: pointer;
}
.room-hotspot:hover rect,
.room-hotspot:focus rect {
  stroke-width: 3;
}
.room-hotspot.is-selected rect {
  stroke: var(--gold-deep);
  stroke-width: 3;
}

.appliance-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chip-btn {
  min-height: 40px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.chip-btn[aria-pressed="true"] {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

/* Compact Cost Bars */
.heat-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.heat-row:last-child { border-bottom: 0; }
.heat-row-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.86rem;
  margin-bottom: 5px;
}
.bar-track {
  width: 100%;
  height: 8px;
  background: var(--cream);
  border-radius: 999px;
}
.bar-fill {
  height: 100%;
  border-radius: 999px;
}
.bar-fill.hot { background: var(--heat-hot); }
.bar-fill.warm { background: var(--heat-warm); }
.bar-fill.cool { background: var(--heat-cool); }

/* Clean Form Controls */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 560px) {
  .form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-body);
}
.field input[type="text"],
.field input[type="number"],
.field input[type="password"],
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong);
  background: var(--white);
  color: var(--ink);
}
.field input[type="range"] {
  width: 100%;
  min-height: 36px;
  accent-color: var(--teal);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  cursor: pointer;
  font-size: 0.86rem;
}
.check-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--teal);
}

details.clean-fold {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--paper);
  margin-top: 10px;
}
details.clean-fold summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--teal-dark);
  min-height: 32px;
  display: flex;
  align-items: center;
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
th, td {
  padding: 9px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
th {
  background: var(--paper);
  font-weight: 700;
}

/* ---------- 9. MEDIA EDITORIAL & COMMUNITY ---------- */
.editorial-lead {
  background: var(--dusk);
  color: var(--cream);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 18px;
}
.editorial-lead p { color: rgba(245, 237, 220, 0.86); }

.media-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

/* ---------- 10. MODALS & TOAST ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 32, 51, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  z-index: 100;
}
.modal-card {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.qa-option-btn {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.qa-option-btn:hover:not(:disabled) {
  border-color: var(--teal);
  background: var(--mint-soft);
}
.qa-option-btn.is-correct {
  background: var(--mint-soft);
  border-color: var(--teal);
  color: var(--teal-dark);
}
.qa-option-btn.is-wrong {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
}

.toast {
  position: fixed;
  right: 14px;
  bottom: 72px;
  max-width: calc(100vw - 28px);
  background: var(--dusk);
  color: var(--gold);
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 120;
}
@media (min-width: 860px) {
  .toast { bottom: 18px; }
}

/* ---------- 11. FOOTER ---------- */
.site-footer {
  background: var(--dusk);
  color: rgba(245, 237, 220, 0.82);
  padding: 24px 0 92px;
  font-size: 0.8rem;
}
@media (min-width: 860px) {
  .site-footer { padding: 28px 0 36px; }
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 1.7fr 1fr;
  }
}
