/* ==========================================================================
   Snow Days Calculator (snowdayscalculator.ca) - Modern Winter Theme
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-dark: #070d1e;
  --bg-midnight: #0b152d;
  --bg-card: rgba(16, 29, 58, 0.75);
  --bg-card-inner: rgba(11, 22, 47, 0.85);
  --bg-card-hover: rgba(23, 40, 77, 0.85);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-glass-bright: rgba(147, 197, 253, 0.3);
  
  /* Primary & Accent Accents */
  --ice-50: #f0f9ff;
  --ice-100: #e0f2fe;
  --ice-200: #bae6fd;
  --ice-300: #7dd3fc;
  --ice-400: #38bdf8;
  --ice-500: #0ea5e9;
  --ice-600: #0284c7;
  
  --canadian-red: #e11d48;
  --canadian-red-hover: #be123c;
  --amber-warning: #f59e0b;
  --emerald-safe: #10b981;
  
  /* Text */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Typography & Sizing */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.18);
  --shadow-card: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--border-glass);
  
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base & Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background: radial-gradient(circle at 50% -10%, #172a54 0%, #081024 45%, #050914 100%);
  display: flex;
  flex-direction: column;
}

/* Winter Canvas (Snowflakes) */
#snowCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0.85;
}

/* Alert Ticker Bar */
.alert-bar {
  position: relative;
  z-index: 50;
  background: linear-gradient(90deg, #1e293b 0%, #0f172a 100%);
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 0.85rem;
  padding: 8px 16px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.alert-bar.hidden {
  display: none;
}

.alert-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.pulsing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.alert-ticker {
  flex: 1;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alert-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: var(--transition);
}

.alert-close:hover {
  color: #fff;
}

/* Site Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 13, 30, 0.82);
  border-bottom: 1px solid var(--border-glass);
  padding: 12px 20px;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.brand-icon {
  position: relative;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #1e3a8a, #0369a1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.snowflake-icon {
  font-size: 1.35rem;
  color: #bae6fd;
}

.maple-leaf {
  position: absolute;
  bottom: -4px;
  right: -6px;
  font-size: 0.85rem;
  transform: rotate(15deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-title .highlight {
  color: var(--ice-400);
}

.brand-tagline {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

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

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: var(--ice-300);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

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

.theme-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--ice-400);
}

.theme-toggle.inactive {
  opacity: 0.6;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: space-around;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #fff;
  border-radius: 2px;
  transition: var(--transition);
}

/* Main Hero Section */
.hero-section {
  position: relative;
  z-index: 10;
  padding: 40px 20px 70px;
}

.hero-container {
  max-width: 1140px;
  margin: 0 auto;
}

.hero-content {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 36px;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--ice-300);
  margin-bottom: 18px;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.gradient-text {
  background: linear-gradient(135deg, #7dd3fc 15%, #38bdf8 50%, #f43f5e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.18rem);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Preset Chips */
.quick-presets-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.preset-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.chip-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--ice-100);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 13px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.chip-btn:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: var(--ice-400);
  transform: translateY(-1px);
  color: #fff;
}

/* Glass Panels */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.glass-panel-inner {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* Calculator Card */
.calculator-card {
  padding: 32px;
  transition: border-color 0.3s ease;
}

.calc-header {
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 18px;
}

.calc-header-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 6px;
}

.calc-header-title h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: #fff;
}

.model-badge {
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.35);
  color: var(--ice-300);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.calc-header-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Form Layout */
.form-row {
  margin-bottom: 20px;
}

.form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

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

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ice-100);
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-select {
  width: 100%;
  background: rgba(7, 13, 30, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237dd3fc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}

.form-select:focus {
  border-color: var(--ice-400);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.form-select option {
  background-color: #0b152d;
  color: #fff;
}

/* Postal Input */
.postal-search-bar {
  display: flex;
  gap: 8px;
}

.postal-search-bar input {
  flex: 1;
  background: rgba(7, 13, 30, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 11px 16px;
  color: #fff;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.postal-search-bar input:focus {
  border-color: var(--ice-400);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.postal-search-bar input::placeholder {
  color: var(--text-dim);
}

.postal-btn {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--ice-300);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.postal-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #fff;
}

.postal-feedback {
  font-size: 0.8rem;
  margin-top: 6px;
  min-height: 18px;
}

.postal-feedback.success {
  color: #34d399;
}

.postal-feedback.error {
  color: #f87171;
}

.section-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 28px 0 22px;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-glass);
}

.section-divider span {
  padding: 0 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

/* Forecast Sliders Grid */
.forecast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.slider-card {
  background: rgba(7, 14, 32, 0.55);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  transition: var(--transition);
}

.slider-card:hover {
  border-color: rgba(125, 211, 252, 0.35);
  background: rgba(11, 22, 48, 0.7);
}

.slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.slider-header label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.val-pill {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--ice-300);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.val-pill .unit {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.val-pill.warning-pill {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.val-pill.info-pill {
  background: rgba(14, 165, 233, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
  color: #bae6fd;
}

/* Range Inputs */
.custom-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 4px;
  background: #1e293b;
  outline: none;
  margin: 8px 0;
  cursor: pointer;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #38bdf8;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
  border: 2px solid #ffffff;
  transition: transform 0.15s ease;
}

.custom-range::-webkit-slider-thumb:hover {
  transform: scale(1.18);
}

.custom-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #38bdf8;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
  border: 2px solid #ffffff;
}

.range-marks {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* Modifiers Panel */
.modifiers-panel {
  background: rgba(7, 13, 30, 0.45);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.modifier-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.radio-toggle-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.toggle-option {
  position: relative;
  cursor: pointer;
}

.toggle-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-option span {
  display: block;
  text-align: center;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}

.toggle-option input:checked + span {
  background: rgba(56, 189, 248, 0.18);
  border-color: var(--ice-400);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.checkbox-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--ice-100);
}

.custom-checkbox input {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.custom-checkbox input:checked + .checkmark {
  background: var(--ice-500);
  border-color: var(--ice-400);
}

.custom-checkbox input:checked + .checkmark::after {
  content: '✓';
  color: #fff;
  font-size: 0.75rem;
  font-weight: bold;
}

/* Action Buttons */
.calc-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  flex: 2;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(2, 132, 199, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.45);
  transform: translateY(-2px);
}

.btn-secondary {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Results Display Area */
.results-container {
  margin-top: 8px;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.status-indicator {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-indicator.high {
  background: rgba(225, 29, 72, 0.18);
  border: 1px solid rgba(225, 29, 72, 0.5);
  color: #fda4af;
}

.status-indicator.medium {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fde68a;
}

.status-indicator.low {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #a7f3d0;
}

.result-timestamp {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Gauges Grid */
.gauges-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.gauge-card {
  background: rgba(5, 10, 24, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.gauge-card.highlight-gauge {
  border-color: rgba(56, 189, 248, 0.35);
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.12) 0%, rgba(5, 10, 24, 0.7) 100%);
}

.gauge-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.gauge-title-wrap h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.tooltip {
  cursor: help;
  font-size: 0.9rem;
  opacity: 0.7;
}

.gauge-circle-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring {
  transform: rotate(-90deg);
  position: absolute;
  top: 0;
  left: 0;
}

.progress-ring__background {
  stroke: rgba(255, 255, 255, 0.08);
}

.progress-ring__circle {
  stroke: var(--ice-400);
  stroke-dasharray: 402.12; /* 2 * PI * 64 */
  stroke-dashoffset: 60.3;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.4s ease;
}

.gauge-value {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.gauge-value span:first-child {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}

.percent-sign {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ice-400);
  margin-top: -20px;
  margin-left: 2px;
}

.gauge-verdict {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
  color: var(--ice-200);
}

.gauge-footer-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: auto;
}

/* Factor Breakdown */
.factor-breakdown {
  margin-bottom: 24px;
}

.breakdown-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ice-200);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.factor-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.factor-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
}

.factor-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.factor-icon {
  font-size: 1.15rem;
}

.factor-name {
  color: var(--text-main);
  font-weight: 500;
}

.factor-weight {
  font-weight: 700;
  font-family: var(--font-display);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
}

.factor-weight.critical {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.15);
}

.factor-weight.moderate {
  color: #fde047;
  background: rgba(234, 179, 8, 0.15);
}

.factor-weight.low {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.15);
}

/* Verdict Card */
.verdict-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px solid rgba(125, 211, 252, 0.3);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 24px;
}

.verdict-icon {
  font-size: 2.2rem;
  line-height: 1;
  flex-shrink: 0;
}

.verdict-text h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.verdict-text p {
  font-size: 0.88rem;
  color: var(--ice-100);
  line-height: 1.5;
}

/* Share Action Bar */
.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.action-btn {
  flex: 1;
  min-width: 140px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--ice-200);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.action-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--ice-400);
  color: #fff;
}

/* Generic Section Styles */
.section {
  position: relative;
  z-index: 10;
  padding: 70px 20px;
}

.section-container {
  max-width: 1140px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}

.section-badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--ice-300);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Regional Boards Section */
.region-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.tab-btn.active {
  background: var(--ice-500);
  border-color: var(--ice-400);
  color: #fff;
  box-shadow: 0 0 15px rgba(14, 165, 233, 0.4);
}

.boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.board-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.board-card:hover {
  border-color: var(--border-glass-bright);
  transform: translateY(-2px);
}

.board-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.board-name {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.board-prov {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  color: var(--ice-300);
}

.board-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.board-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-glass);
  padding-top: 12px;
  font-size: 0.78rem;
}

.metric-item span:first-child {
  color: var(--text-dim);
  display: block;
}

.metric-item span:last-child {
  font-weight: 700;
  color: var(--ice-200);
}

.test-board-btn {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--ice-300);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.test-board-btn:hover {
  background: var(--ice-500);
  color: #fff;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.feature-card {
  padding: 26px 22px;
  transition: var(--transition);
}

.feature-card:hover {
  border-color: var(--border-glass-bright);
  transform: translateY(-3px);
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Tips Grid */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.tip-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.tip-number {
  position: absolute;
  top: 12px;
  right: 18px;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.04);
}

.tip-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.tip-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* FAQ Accordion */
.faq-accordion {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item[open] {
  border-color: var(--border-glass-bright);
}

.faq-question {
  padding: 18px 20px;
  font-weight: 600;
  font-size: 0.98rem;
  color: #fff;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  font-size: 1.1rem;
  color: var(--ice-400);
  transition: transform 0.25s ease;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 20px 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 14px;
}

/* Site Footer */
.site-footer {
  position: relative;
  z-index: 10;
  background: #040813;
  border-top: 1px solid var(--border-glass);
  padding: 60px 20px 30px;
  margin-top: auto;
}

.footer-container {
  max-width: 1140px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .brand-title {
  font-size: 1.3rem;
  display: block;
  margin-top: 8px;
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 10px;
  max-width: 360px;
  line-height: 1.6;
}

.footer-links-group h5 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
}

.footer-links-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links-group a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: var(--transition);
}

.footer-links-group a:hover {
  color: var(--ice-300);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  color: var(--ice-200);
}

/* Toast Message */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  border: 1px solid var(--ice-400);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 100;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive Styles */
@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 10px 16px;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #070d1e;
    border-bottom: 1px solid var(--border-glass);
    padding: 16px 20px;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.5);
  }

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

  .menu-toggle {
    display: flex;
  }

  .form-row-split {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .calculator-card {
    padding: 20px 16px;
  }

  .gauges-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .calc-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .share-actions {
    flex-direction: column;
  }

  .action-btn {
    width: 100%;
  }
}

/* Print Stylesheet for Report Printing */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }

  #snowCanvas, .site-header, .alert-bar, .quick-presets-banner, 
  .theme-toggle, .calc-actions, .share-actions, .regional-section, 
  .formula-section, .tips-section, .faq-section, .site-footer {
    display: none !important;
  }

  .glass-panel, .glass-panel-inner {
    background: #fff !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    color: #000 !important;
  }

  .calculator-card {
    padding: 0 !important;
  }

  .progress-ring__circle {
    stroke: #0284c7 !important;
  }

  .gauge-value span:first-child {
    color: #000 !important;
  }

  .factor-item {
    background: #f8fafc !important;
    border: 1px solid #ddd !important;
    color: #000 !important;
  }

  .verdict-banner {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #000 !important;
  }

  .verdict-text h4, .verdict-text p {
    color: #000 !important;
  }
}
