:root {
  --bg-deep: #041a2e;
  --bg-mid: #0a3352;
  --ink: #0c2438;
  --ink-soft: #1a3a52;
  --ink-muted: #5a758a;
  --line: rgba(12, 90, 140, 0.14);
  --line-strong: rgba(12, 90, 140, 0.22);
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --surface-soft: rgba(240, 249, 255, 0.9);
  --primary: #0c8bc9;
  --primary-bright: #1aa3e0;
  --primary-dark: #06689a;
  --primary-soft: #d6f0fc;
  --accent: #f0a202;
  --accent-soft: #fff3d6;
  --cool: #1f9b8a;
  --warm: #e06a4a;
  --gold: #e8b84a;
  --shadow: 0 20px 50px rgba(4, 40, 70, 0.12);
  --shadow-soft: 0 8px 28px rgba(4, 50, 90, 0.08);
  --radius: 22px;
  --radius-sm: 14px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
  --max: 1140px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 900px 500px at 85% -5%, rgba(255, 200, 90, 0.35), transparent 55%),
    radial-gradient(ellipse 1000px 700px at 10% 0%, rgba(80, 190, 255, 0.28), transparent 50%),
    linear-gradient(165deg, #9fd4f5 0%, #c8e9fb 28%, #e8f6fd 55%, #f4fbff 100%);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* --- Atmospheric background --- */
.atmosphere {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.sun-glow {
  position: absolute;
  top: -80px;
  right: 8%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 220, 120, 0.55) 0%, rgba(255, 180, 60, 0.15) 40%, transparent 70%);
  filter: blur(2px);
  animation: sun-pulse 8s ease-in-out infinite;
}

@keyframes sun-pulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.06); opacity: 1; }
}

.caustic {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.35;
}

.caustic-a {
  width: 420px;
  height: 220px;
  bottom: 8%;
  left: -5%;
  background: radial-gradient(ellipse, rgba(60, 180, 220, 0.45), transparent 70%);
  animation: drift 14s ease-in-out infinite alternate;
}

.caustic-b {
  width: 380px;
  height: 200px;
  bottom: 0;
  right: -3%;
  background: radial-gradient(ellipse, rgba(30, 140, 200, 0.4), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  from { transform: translate(0, 0); }
  to { transform: translate(30px, -12px); }
}

.horizon-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 160px;
  background:
    linear-gradient(180deg, transparent, rgba(6, 60, 100, 0.06)),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 40px,
      rgba(255, 255, 255, 0.04) 40px,
      rgba(255, 255, 255, 0.04) 80px
    );
  mask-image: linear-gradient(180deg, transparent, #000 40%);
}

.site-header,
.hero-strip,
.layout,
.site-footer {
  position: relative;
  z-index: 1;
}

/* --- Header --- */
.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1.35rem 0.75rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.7));
  box-shadow:
    0 10px 30px rgba(8, 70, 120, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}

.brand-kicker {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-dark);
  opacity: 0.85;
}

.brand h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.65rem, 3.2vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}

.tagline {
  margin: 0.3rem 0 0;
  color: var(--ink-muted);
  font-size: 1rem;
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-top: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.35rem 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.account-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 0.15rem 0.35rem;
}

.account-badge.is-pro {
  color: #8a5a00;
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
}

.btn-upgrade {
  border: none;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #f0b429, #d49200);
  box-shadow: 0 4px 12px rgba(200, 140, 0, 0.28);
}

.btn-upgrade:hover {
  filter: brightness(1.05);
}

.btn-text {
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-dark);
  cursor: pointer;
  padding: 0.35rem 0.45rem;
}

.btn-text:hover {
  text-decoration: underline;
}

.btn-text-light {
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-text-light:hover {
  background: rgba(255, 255, 255, 0.32);
}

/* Pro locks */
.pro-pill,
.pro-pill-inline {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a5a00;
  background: var(--accent-soft);
  border: 1px solid rgba(240, 162, 2, 0.35);
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
}

.pro-pill-inline {
  margin-left: 0.35rem;
  vertical-align: middle;
}

.pro-lock-banner {
  display: none;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.65rem;
  border-radius: 12px;
  background: linear-gradient(120deg, #0c7bb8, #06689a);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.8rem;
  font-weight: 600;
}

.pro-lock-banner .pro-pill {
  background: rgba(255, 255, 255, 0.95);
}

body.is-free [data-pro-only].pro-locked .pro-lock-banner {
  display: flex;
}

body.is-free [data-pro-only].pro-locked {
  position: relative;
}

body.is-free [data-pro-only].pro-locked > :not(.pro-lock-banner):not(.heater-legend) {
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
}

body.is-pro .pro-lock-banner {
  display: none !important;
}

body.is-pro .pro-pill-inline {
  display: none;
}

.unit-toggle {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem;
  padding: 0.28rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.unit-toggle-sm {
  border-radius: 10px;
}

.unit-btn {
  border: none;
  background: transparent;
  padding: 0.48rem 0.85rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s, box-shadow 0.15s;
}

.unit-toggle-sm .unit-btn {
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  font-size: 0.72rem;
}

.unit-btn:hover {
  color: var(--primary-dark);
}

.unit-btn.active {
  background: linear-gradient(180deg, #fff, #f3faff);
  color: var(--primary-dark);
  box-shadow: 0 2px 10px rgba(12, 90, 140, 0.12);
}

/* --- Hero strip --- */
.hero-strip {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.35rem 1.35rem 1.25rem;
}

.hero-inner {
  padding: 1.15rem 1.35rem 1.25rem;
  border-radius: var(--radius);
  background:
    linear-gradient(125deg, rgba(6, 80, 120, 0.92) 0%, rgba(12, 120, 170, 0.88) 48%, rgba(20, 150, 180, 0.85) 100%);
  color: #fff;
  box-shadow:
    0 18px 40px rgba(6, 60, 100, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.hero-inner::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -8%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 100, 0.35), transparent 65%);
  pointer-events: none;
}

.hero-lead {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 52ch;
  font-size: clamp(1rem, 2vw, 1.12rem);
  font-weight: 500;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.95);
}

.hero-lead em {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  color: #ffe7a8;
}

.hero-pills {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0.95rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.hero-pills li {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
}

/* --- Layout --- */
.layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.35rem 3rem;
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  gap: 1.35rem;
  align-items: start;
}

/* Right column: results or empty state — never stacks under the form */
.forecast-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  position: relative;
  z-index: 0;
}

.card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.45rem 1.5rem 1.6rem;
}

.glass {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.8) 100%);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.form-card {
  position: relative;
  z-index: 2;
  /* Stick only after a forecast is shown (class toggled in JS) */
  max-height: none;
  overflow: visible;
  scrollbar-width: thin;
  scrollbar-color: rgba(12, 120, 180, 0.35) transparent;
}

.form-card.is-sticky {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
  z-index: 3;
}

.section-badge {
  display: inline-block;
  margin-bottom: 0.55rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border: 1px solid rgba(12, 140, 200, 0.15);
}

.section-badge.accent {
  color: #8a5a00;
  background: var(--accent-soft);
  border-color: rgba(240, 162, 2, 0.25);
}

.card h2,
.card h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.card h2 {
  font-size: 1.45rem;
}

.card h3 {
  font-size: 1.15rem;
}

.card-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.card-title-row h3 {
  margin: 0;
}

.card-caption {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.card-sub {
  margin: 0.4rem 0 1.1rem;
  color: var(--ink-muted);
  font-size: 0.94rem;
}

.form-card-head .card-sub {
  margin-bottom: 1rem;
}

.profiles-bar {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.9rem;
  margin-bottom: 1.15rem;
  background: linear-gradient(180deg, rgba(240, 249, 255, 0.95), rgba(255, 255, 255, 0.7));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.profiles-select-field {
  margin-bottom: 0;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.btn-ghost {
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.btn-ghost:hover {
  color: var(--warm);
  background: rgba(224, 106, 74, 0.1);
}

/* --- Heater --- */
.heater-block {
  margin: 0.25rem 0 1.15rem;
  padding: 1rem 1rem 0.4rem;
  border: 1px solid rgba(240, 162, 2, 0.28);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(145deg, rgba(255, 248, 230, 0.95) 0%, rgba(255, 255, 255, 0.9) 55%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.heater-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0;
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a6400;
  float: none;
}

.heater-legend > span:first-child {
  flex-shrink: 0;
}

.heater-options {
  margin-top: 0.1rem;
}

.hint.muted {
  color: var(--ink-muted);
}

.heater-summary {
  margin-top: -0.45rem !important;
  font-size: 0.86rem !important;
  color: #b86e00 !important;
  font-weight: 700;
}

/* --- Fields --- */
.field {
  margin-bottom: 1rem;
}

.field > label,
.field-grid .field > label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.015em;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  font-size: 0.98rem;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

input:hover,
select:hover {
  border-color: rgba(12, 140, 200, 0.35);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(12, 140, 200, 0.14);
}

.location-row {
  display: flex;
  gap: 0.5rem;
}

.location-row input {
  flex: 1;
  min-width: 0;
}

.suggestions {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 14px 36px rgba(8, 50, 90, 0.14);
  max-height: 220px;
  overflow: auto;
}

.suggestions li button {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}

.suggestions li button:hover,
.suggestions li button:focus-visible {
  background: var(--primary-soft);
  outline: none;
}

.hint {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: var(--cool);
  font-weight: 600;
}

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

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.28rem;
  padding: 0.28rem;
  background: rgba(230, 244, 252, 0.8);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.seg {
  border: none;
  background: transparent;
  padding: 0.52rem 0.4rem;
  border-radius: 10px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.seg.active {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 2px 10px rgba(12, 70, 110, 0.1);
}

/* --- Buttons --- */
.btn-primary,
.btn-secondary {
  font: inherit;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.14s, background 0.15s, box-shadow 0.15s;
}

.btn-primary {
  width: 100%;
  margin-top: 0.4rem;
  padding: 1rem 1.1rem;
  border: none;
  background: linear-gradient(180deg, #1aa8e8 0%, var(--primary) 45%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow:
    0 12px 28px rgba(12, 120, 180, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  letter-spacing: 0.01em;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 34px rgba(12, 120, 180, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

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

.btn-primary:disabled {
  opacity: 0.72;
  cursor: wait;
  transform: none;
}

.btn-arrow {
  font-size: 1.15rem;
  line-height: 1;
  transition: transform 0.15s;
}

.btn-primary:hover .btn-arrow {
  transform: translateX(3px);
}

.btn-secondary {
  border: 1.5px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-dark);
  padding: 0.55rem 0.85rem;
  white-space: nowrap;
  font-size: 0.86rem;
}

.btn-secondary:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.profile-actions .btn-secondary {
  flex: 1;
  min-width: 4.5rem;
}

.btn-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Results --- */
.results {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  min-width: 0;
  animation: rise-in 0.45s ease-out;
}

.results[hidden],
.empty-state[hidden] {
  display: none !important;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.results-hero {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(232, 246, 255, 0.9) 100%);
  border-color: rgba(255, 255, 255, 0.9);
}

.summary-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.summary-top .card-sub {
  margin-bottom: 0.15rem;
}

.today-pill {
  flex-shrink: 0;
  text-align: right;
  background: linear-gradient(155deg, #0c8bc9 0%, #06689a 100%);
  border: none;
  border-radius: 18px;
  padding: 0.85rem 1.05rem;
  min-width: 110px;
  box-shadow: 0 12px 28px rgba(8, 100, 150, 0.28);
  color: #fff;
}

.today-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.today-temp {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0, 40, 80, 0.2);
}

.range-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.range-item {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem 0.85rem;
  transition: transform 0.15s, box-shadow 0.15s;
}

.range-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.range-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.range-item strong {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
}

.disclaimer {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.chart-wrap {
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
}

#temp-chart {
  width: 100%;
  height: auto;
  display: block;
}

.day-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.day-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  background: rgba(245, 251, 255, 0.85);
  border: 1px solid transparent;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.day-row:hover {
  border-color: var(--line);
  background: #fff;
  transform: translateX(2px);
}

.day-name {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--ink);
}

.day-date {
  display: block;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.day-meta {
  min-width: 0;
}

.day-weather {
  font-size: 0.8rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-bar-track {
  height: 7px;
  background: rgba(180, 215, 235, 0.55);
  border-radius: 99px;
  margin-top: 0.4rem;
  overflow: hidden;
}

.day-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #1f9b8a, #0c8bc9 50%, #f0a202);
  transition: width 0.45s ease;
}

.day-temp {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  min-width: 3.4rem;
  text-align: right;
}

.day-delta {
  display: block;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
}

.day-delta.up { color: var(--warm); }
.day-delta.down { color: var(--primary-dark); }
.day-delta.flat { color: var(--ink-muted); }

/* --- Pro tools (evap + party) --- */
.tools-card h4 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.tool-block {
  margin-top: 0.35rem;
  padding-top: 0.25rem;
}

.tool-block-party {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}

.tool-intro {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.tool-stats {
  margin-bottom: 0.85rem;
}

.evap-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.evap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.evap-table th,
.evap-table td {
  padding: 0.55rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.evap-table th {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  background: rgba(240, 249, 255, 0.9);
}

.evap-table tr:last-child td {
  border-bottom: none;
}

.evap-table .neg {
  color: var(--primary-dark);
  font-weight: 700;
}

.evap-table .pos {
  color: var(--cool);
  font-weight: 700;
}

.party-result {
  margin-top: 0.9rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(12, 140, 200, 0.08), rgba(255, 255, 255, 0.9));
  border: 1px solid var(--line);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.party-result h5 {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--ink);
}

.party-result ul {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
}

.party-result li {
  margin-bottom: 0.3rem;
}

.party-result .party-warn {
  margin-top: 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  background: rgba(224, 106, 74, 0.1);
  color: #a94428;
  font-weight: 600;
  font-size: 0.84rem;
}

.party-result .party-ok {
  margin-top: 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  background: rgba(31, 155, 138, 0.12);
  color: #0d6b5c;
  font-weight: 600;
  font-size: 0.84rem;
}

#party-plan-btn {
  margin-top: 0.25rem;
}

/* --- Empty state --- */
.empty-state {
  text-align: center;
  padding: 3.25rem 2.25rem;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.94) 0%, rgba(220, 242, 255, 0.75) 100%);
}

.empty-visual {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 1.4rem;
}

.empty-sun {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe8a0, #f0a202);
  box-shadow: 0 0 28px rgba(240, 162, 2, 0.55);
  z-index: 2;
}

.ripple {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(12, 140, 200, 0.35);
  border-radius: 50%;
  animation: ripple 2.8s ease-out infinite;
}

.ripple.delay { animation-delay: 0.9s; }
.ripple.delay-2 { animation-delay: 1.8s; }

@keyframes ripple {
  0% {
    transform: scale(0.3);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.15);
    opacity: 0;
  }
}

.empty-state h2 {
  margin: 0.35rem 0 0.55rem;
  max-width: 18ch;
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  line-height: 1.2;
}

.empty-state > p {
  margin: 0;
  max-width: 38ch;
  color: var(--ink-muted);
  font-size: 0.98rem;
}

.empty-points {
  list-style: none;
  margin: 1.35rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  text-align: left;
}

.empty-points li {
  position: relative;
  padding: 0.55rem 0.9rem 0.55rem 2.1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.empty-points li::before {
  content: "";
  position: absolute;
  left: 0.75rem;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-bright), var(--cool));
  box-shadow: 0 0 0 3px rgba(12, 140, 200, 0.15);
}

/* --- Footer --- */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.35rem 2.5rem;
}

.footer-inner {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(12, 90, 140, 0.12);
  color: var(--ink-muted);
  font-size: 0.84rem;
}

.footer-brand {
  margin: 0 0 0.25rem;
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink-soft);
}

.site-footer p {
  margin: 0;
}

.site-footer a,
.footer-link {
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: none;
  font: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.site-footer a:hover,
.footer-link:hover {
  text-decoration: underline;
}

/* --- Toast --- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #1a4058, #0f2a3d);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 14px 40px rgba(0, 20, 40, 0.3);
  z-index: 50;
  max-width: min(90vw, 420px);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.toast[hidden] {
  display: none;
}

/* --- Paywall modal --- */
body.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.modal[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 24, 42, 0.55);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  max-height: min(92vh, 720px);
  overflow: auto;
  padding: 1.5rem 1.45rem 1.35rem;
  border-radius: 22px;
  background: linear-gradient(165deg, #fff 0%, #f3faff 100%);
  box-shadow: 0 28px 60px rgba(4, 30, 55, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.9);
  animation: rise-in 0.28s ease-out;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  border: none;
  background: rgba(12, 40, 60, 0.06);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-muted);
}

.modal-card h2 {
  margin: 0.35rem 0 0.5rem;
  font-family: var(--display);
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.modal-lead {
  margin: 0 0 0.85rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.modal-perks {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.modal-perks li {
  position: relative;
  padding: 0.45rem 0.65rem 0.45rem 1.85rem;
  border-radius: 10px;
  background: rgba(12, 140, 200, 0.06);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.modal-perks li::before {
  content: "✓";
  position: absolute;
  left: 0.65rem;
  color: var(--primary-dark);
  font-weight: 800;
}

.paywall-email-field {
  display: block;
  margin-bottom: 0.9rem;
}

.paywall-email-field span {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: 0.35rem;
}

.plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.plan-card {
  position: relative;
  text-align: left;
  border: 1.5px solid var(--line-strong);
  background: #fff;
  border-radius: 16px;
  padding: 0.9rem 0.85rem;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

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

.plan-featured {
  border-color: rgba(240, 162, 2, 0.55);
  background: linear-gradient(180deg, #fffdf6, #fff);
  box-shadow: 0 8px 20px rgba(200, 140, 0, 0.12);
}

.plan-badge {
  position: absolute;
  top: -0.45rem;
  right: 0.55rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a5a00;
  background: var(--accent-soft);
  border: 1px solid rgba(240, 162, 2, 0.4);
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
}

.plan-name {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: 0.2rem;
}

.plan-price {
  display: block;
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}

.plan-price span {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.plan-note {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.paywall-status {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.paywall-status.is-error {
  color: var(--warm);
}

.modal-fine {
  margin: 0.9rem 0 0;
  font-size: 0.72rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

@media (max-width: 480px) {
  .plan-grid {
    grid-template-columns: 1fr;
  }

  .account-chip {
    width: 100%;
    justify-content: space-between;
  }
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .form-card,
  .form-card.is-sticky {
    position: static;
    max-height: none;
    overflow: visible;
    z-index: auto;
  }

  /* On narrow screens, show setup first; empty/results below — no overlap */
  .forecast-panel {
    order: 2;
  }

  .form-card {
    order: 1;
  }

  .range-bar {
    grid-template-columns: 1fr;
  }

  .day-row {
    grid-template-columns: 3.8rem 1fr auto;
  }

  .hero-inner {
    padding: 1.1rem 1.15rem;
  }
}

@media (max-width: 480px) {
  .field-grid {
    grid-template-columns: 1fr;
  }

  .location-row {
    flex-direction: column;
  }

  .btn-secondary {
    padding: 0.7rem;
  }

  .summary-top {
    flex-direction: column;
  }

  .today-pill {
    text-align: left;
    width: 100%;
  }

  .site-header {
    padding-top: 1.25rem;
  }

  .brand-icon {
    width: 52px;
    height: 52px;
  }
}
