/* ============================================================
   Growniti Travel — core stylesheet
   Mobile-first. Tokens -> base -> components -> sections.
   Breakpoint-specific layout lives in responsive.css.
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  /* Surfaces (carried over from the Growniti Labs identity) */
  --ink-900: #060b14;
  --ink-850: #08111d;
  --ink-800: #0b1524;
  --ink-750: #0f1c2e;
  --ink-700: #142438;

  /* Accents */
  --mint: #4ade80;
  --cyan: #38bdf8;
  --sky: #7dd3fc;
  --grad: linear-gradient(100deg, var(--mint) 0%, #34d5c0 48%, var(--cyan) 100%);

  /* Text */
  --text: #e9eff7;
  --text-soft: #b6c4d6;
  --text-muted: #8093ab;

  /* Feedback */
  --warn: #fbbf24;
  --danger: #fb7185;
  --ok: var(--mint);

  /* Lines & effects */
  --line: rgba(148, 178, 214, 0.16);
  --line-strong: rgba(148, 178, 214, 0.32);
  --glass: rgba(255, 255, 255, 0.035);
  --glass-hi: rgba(255, 255, 255, 0.06);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 26px 60px rgba(0, 0, 0, 0.5);
  --glow: 0 0 26px rgba(74, 222, 128, 0.28);

  /* Type */
  --font-display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Radii */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Rhythm */
  --gap-xs: 6px;
  --gap-sm: 10px;
  --gap: 16px;
  --gap-md: 22px;
  --gap-lg: 32px;
  --gap-xl: 48px;

  --shell: 1180px;
  --pad-x: clamp(16px, 5vw, 28px);
  --section-y: clamp(48px, 9vw, 96px);

  --ease: cubic-bezier(0.22, 0.68, 0.35, 1);
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* The HTML `hidden` attribute is only display:none at normal specificity, so
   any component rule that sets a display value silently defeats it. This makes
   hidden actually mean hidden. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.62;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 8.4vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 5.4vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 3.4vw, 1.35rem); }
p  { margin: 0 0 1em; }
a  { color: var(--sky); text-decoration-thickness: 1px; text-underline-offset: 3px; }

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--mint); color: #04240f; font-weight: 600;
  padding: 12px 18px; border-radius: var(--r-sm); text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

.shell {
  width: 100%;
  min-width: 0;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.section { padding-block: var(--section-y); }
.section-head { max-width: 62ch; margin-bottom: var(--gap-lg); }
.section-lede { color: var(--text-soft); font-size: 1.02rem; margin: 0; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 0.85em;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.help {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 6px 0 0;
}

/* ---------- 3. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 11, 20, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--gap); min-height: 66px;
}

.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }

/* The lock-up is a single image, so mark, name and tagline can never fall out
   of alignment. Height-driven with width:auto keeps the ratio at every size. */
.brand-lockup {
  height: 46px; width: auto; display: block;
  transition: transform 0.28s var(--ease), filter 0.28s var(--ease);
}
.brand:hover .brand-lockup {
  transform: translateY(-1px);
  filter: drop-shadow(0 6px 16px rgba(56, 189, 248, 0.28));
}
.brand-fallback { display: flex; align-items: center; gap: 14px; }

.footer-lockup { height: 58px; width: auto; display: block; margin-bottom: 14px; }
.footer-fallback { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.brand-mark {
  display: grid; place-items: center;
  width: 42px; height: 42px; flex: none;
  border-radius: 12px;
  background: var(--grad);
  color: #04240f;
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
  letter-spacing: -0.02em;
  box-shadow: var(--glow);
}
.brand-mark--sm { width: 34px; height: 34px; font-size: 0.8rem; border-radius: 10px; }

/* Logo lock-up. The double ring — a hairline of white over a wider cyan
   halo — is what gives the mark its lifted, framed look on a dark header.
   Sized to match the GN tile it replaces so the header never shifts. */
.brand-logo {
  width: 46px; height: 46px; flex: none;
  border-radius: 14px; object-fit: cover;
  background: var(--ink-800);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 0 4px rgba(56, 189, 248, 0.10),
    0 6px 18px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.28s var(--ease), transform 0.28s var(--ease);
}
.brand:hover .brand-logo {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.26),
    0 0 0 5px rgba(56, 189, 248, 0.18),
    0 10px 24px rgba(0, 0, 0, 0.5);
}

.footer-logo {
  width: 52px; height: 52px;
  border-radius: 15px; object-fit: cover;
  margin-bottom: 12px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 0 4px rgba(56, 189, 248, 0.09),
    0 6px 18px rgba(0, 0, 0, 0.4);
}
.brand-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.15; }
.brand-name {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.12rem; letter-spacing: -0.025em;
}
.brand-tag {
  font-size: 0.715rem; font-weight: 500;
  color: var(--sky); letter-spacing: 0.055em;
  white-space: nowrap;
}
/* The separator picks up the mint end of the brand gradient */
.brand-tag i, .footer-tag i {
  font-style: normal; color: var(--mint);
  margin: 0 3px; opacity: 0.9;
}

.nav-toggle {
  width: 46px; height: 46px; flex: none;
  display: grid; place-items: center;
  background: var(--glass); border: 1px solid var(--line);
  border-radius: var(--r-sm); cursor: pointer;
}
.nav-toggle-bars { display: grid; gap: 5px; }
.nav-toggle-bars i {
  display: block; width: 20px; height: 2px; border-radius: 2px;
  background: var(--text); transition: transform 0.25s var(--ease), opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: absolute; left: 0; right: 0; top: 100%;
  display: grid; gap: 2px;
  padding: var(--gap) var(--pad-x) var(--gap-md);
  background: var(--ink-850);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  transform: translateY(-8px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
}
.site-nav.is-open { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.site-nav a {
  color: var(--text-soft); text-decoration: none;
  padding: 13px 12px; border-radius: var(--r-sm); font-weight: 500;
}
.site-nav a:hover { color: var(--text); background: var(--glass); }
.nav-cta {
  margin-top: 6px; text-align: center;
  background: var(--grad) !important; color: #04240f !important; font-weight: 600 !important;
}

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 20px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  text-decoration: none; cursor: pointer;
  transition: transform 0.16s var(--ease), box-shadow 0.2s var(--ease),
              background-color 0.2s, border-color 0.2s, opacity 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-lg { min-height: 54px; padding: 14px 28px; font-size: 1rem; }

.btn-primary { background: var(--grad); color: #04240f; box-shadow: var(--glow); }
.btn-primary:hover { box-shadow: 0 0 34px rgba(74, 222, 128, 0.42); }

.btn-outline { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); }

.btn-ghost { background: var(--glass); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--glass-hi); }

.btn-quiet {
  background: none; border-color: transparent; color: var(--text-muted);
  font-weight: 500; min-height: 44px; padding: 10px 14px;
}
.btn-quiet:hover { color: var(--text); background: var(--glass); }
.btn-danger:hover { color: var(--danger); background: rgba(251, 113, 133, 0.08); }

.icon-btn {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  background: var(--glass); border: 1px solid var(--line);
  border-radius: 10px; cursor: pointer; font-size: 0.95rem;
  color: var(--text-soft);
  transition: background-color 0.18s, color 0.18s, border-color 0.18s, transform 0.18s var(--ease);
}
.icon-btn:hover { background: var(--glass-hi); color: var(--text); transform: translateY(-2px); }
.icon-btn:disabled { opacity: 0.32; cursor: not-allowed; transform: none; }
.icon-btn.is-fav { color: var(--warn); border-color: rgba(251, 191, 36, 0.5); background: rgba(251, 191, 36, 0.1); }
.icon-btn.is-danger:hover { color: var(--danger); border-color: rgba(251, 113, 133, 0.5); }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(44px, 11vw, 108px) clamp(30px, 6vw, 56px);
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 12% 0%, rgba(56, 189, 248, 0.14), transparent 62%),
    radial-gradient(100% 70% at 88% 8%, rgba(74, 222, 128, 0.12), transparent 60%),
    linear-gradient(180deg, var(--ink-850), var(--ink-900) 78%);
}
.hero-glow {
  position: absolute; inset: auto -20% -55% -20%; height: 62%;
  background: radial-gradient(60% 100% at 50% 100%, rgba(52, 213, 192, 0.14), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero h1 { margin-bottom: 0.42em; max-width: 15ch; }
.hero-lede {
  max-width: 56ch; color: var(--text-soft);
  font-size: clamp(0.98rem, 2.6vw, 1.1rem);
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin: var(--gap-md) 0 var(--gap-md);
}
.hero-actions .btn { flex: 1 1 210px; }

.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-chips li {
  font-size: 0.82rem; color: var(--text-soft);
  padding: 8px 14px; border-radius: var(--r-pill);
  background: var(--glass); border: 1px solid var(--line);
}

/* Signature: the route line */
.routeline { position: relative; margin-top: var(--gap-lg); height: 92px; }
.routeline svg { width: 100%; height: 100%; overflow: visible; }
.routeline-path {
  fill: none; stroke: var(--cyan); stroke-width: 2; stroke-dasharray: 6 9; stroke-linecap: round;
  opacity: 0.5;
  animation: routeflow 22s linear infinite;
}
@keyframes routeflow { to { stroke-dashoffset: -300; } }

.routeline-dot {
  position: absolute; width: 12px; height: 12px; border-radius: 50%;
  background: var(--mint); box-shadow: 0 0 0 5px rgba(74, 222, 128, 0.14);
}
.routeline-dot::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 1px solid rgba(74, 222, 128, 0.5);
  animation: ping 2.8s var(--ease) infinite;
}
.routeline-dot--a { left: 1%;  top: 76%; }
.routeline-dot--b { left: 36%; top: 21%; animation-delay: 0.6s; }
.routeline-dot--c { left: 71%; top: 70%; background: var(--cyan); box-shadow: 0 0 0 5px rgba(56, 189, 248, 0.14); }
.routeline-dot--c::after { border-color: rgba(56, 189, 248, 0.5); }
@keyframes ping {
  0%   { transform: scale(0.7); opacity: 0.9; }
  70%  { transform: scale(2.1); opacity: 0; }
  100% { transform: scale(2.1); opacity: 0; }
}

/* ---------- 6. Planner form ---------- */
.planner-card {
  background: linear-gradient(180deg, var(--ink-800), var(--ink-850));
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(18px, 5vw, 36px);
  box-shadow: var(--shadow-lg);
  display: grid; gap: var(--gap-md);
}

.field { display: block; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label,
.field > legend,
.stepper-label {
  display: block;
  font-family: var(--font-display); font-weight: 600;
  font-size: 0.94rem; color: var(--text);
  margin-bottom: 8px; padding: 0;
}

input[type="text"], input[type="number"], input[type="date"], select {
  width: 100%; min-height: 52px;
  padding: 13px 15px;
  background: var(--ink-750);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--text);
  transition: border-color 0.18s, box-shadow 0.18s, background-color 0.18s;
}
input::placeholder { color: #64788f; }
input:hover, select:hover { border-color: var(--line-strong); }
input:focus, select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22);
  background: var(--ink-700);
}
input[aria-invalid="true"] { border-color: var(--danger); }

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
                    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 23px, calc(100% - 14px) 23px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 42px;
}
select option { background: var(--ink-800); color: var(--text); }

input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.72); cursor: pointer; }

.field-error {
  display: block; margin: 8px 0 0;
  font-size: 0.86rem; color: var(--danger); font-weight: 500;
}

.grid-2 { display: grid; gap: var(--gap); }

/* Destination combobox */
.field-destination { position: relative; }
.combo { position: relative; display: block; }
.combo-icon {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  font-size: 1rem; pointer-events: none; opacity: 0.85;
}
.combo input { padding-left: 44px; padding-right: 44px; }
.combo-spinner {
  position: absolute; right: 16px; top: 50%; margin-top: -9px;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(148, 178, 214, 0.28);
  border-top-color: var(--cyan);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.combo-list {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px);
  max-height: 292px; overflow-y: auto;
  background: var(--ink-750);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
}
.combo-list li {
  padding: 12px 14px; border-radius: var(--r-sm); cursor: pointer;
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.combo-list li:hover,
.combo-list li[aria-selected="true"] { background: rgba(56, 189, 248, 0.14); }
.combo-list .opt-name { font-weight: 600; }
.combo-list .opt-meta { font-size: 0.82rem; color: var(--text-muted); }
.combo-list .opt-empty { cursor: default; color: var(--text-muted); }
.combo-list .opt-empty:hover { background: none; }

/* Steppers */
.stepper-row { display: grid; gap: var(--gap); grid-template-columns: 1fr 1fr; }
.stepper-controls {
  display: flex; align-items: center; gap: 6px;
  background: var(--ink-750); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 5px;
}
.stepper-controls input {
  min-height: 42px; text-align: center; border: 0; background: none;
  padding: 0; font-weight: 600; -moz-appearance: textfield;
}
.stepper-controls input::-webkit-outer-spin-button,
.stepper-controls input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-controls input:focus { box-shadow: none; background: none; }
.step-btn {
  width: 42px; height: 42px; flex: none;
  border: 0; border-radius: 10px; cursor: pointer;
  background: var(--glass-hi); color: var(--text);
  font-size: 1.2rem; line-height: 1;
  transition: background-color 0.16s, color 0.16s;
}
.step-btn:hover { background: rgba(56, 189, 248, 0.2); color: var(--cyan); }

/* Switch */
.switch {
  display: flex; align-items: flex-start; gap: 14px;
  margin-top: var(--gap); padding: 14px 16px;
  background: var(--ink-750); border: 1px solid var(--line);
  border-radius: var(--r-md); cursor: pointer;
  transition: border-color 0.18s, background-color 0.18s;
}
.switch:hover { border-color: var(--line-strong); }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  position: relative; flex: none;
  width: 50px; height: 30px; border-radius: var(--r-pill);
  background: rgba(148, 178, 214, 0.2);
  transition: background-color 0.22s var(--ease);
  margin-top: 2px;
}
.switch-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; transition: transform 0.22s var(--ease);
}
.switch input:checked + .switch-track { background: var(--grad); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--cyan); outline-offset: 3px; }
.switch-text strong { display: block; font-size: 0.94rem; font-weight: 600; }
.switch-text small { color: var(--text-muted); font-size: 0.84rem; }

/* Segmented control */
.segmented { display: grid; gap: 8px; grid-template-columns: 1fr; }
.seg { position: relative; display: block; }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg span {
  display: block; padding: 13px 16px;
  background: var(--ink-750); border: 1px solid var(--line);
  border-radius: var(--r-md); cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 0.92rem;
  transition: border-color 0.18s, background-color 0.18s, color 0.18s, transform 0.18s var(--ease);
}
.seg span small {
  display: block; font-family: var(--font-body);
  font-weight: 400; font-size: 0.78rem; color: var(--text-muted); margin-top: 2px;
}
.seg span:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.seg input:checked + span {
  border-color: transparent;
  background: linear-gradient(140deg, rgba(74, 222, 128, 0.2), rgba(56, 189, 248, 0.2));
  box-shadow: inset 0 0 0 1.5px var(--mint);
  color: var(--text);
}
.seg input:checked + span small { color: var(--text-soft); }
.seg input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 3px; }

/* Interest chips */
.chipset { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip span {
  display: inline-block; padding: 10px 15px;
  background: var(--ink-750); border: 1px solid var(--line);
  border-radius: var(--r-pill); cursor: pointer;
  font-size: 0.88rem; white-space: nowrap;
  transition: background-color 0.18s, border-color 0.18s, color 0.18s, transform 0.16s var(--ease);
}
.chip span:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.chip input:checked + span {
  background: rgba(74, 222, 128, 0.16);
  border-color: var(--mint);
  color: #d8ffe6;
}
.chip input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 3px; }

.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.form-actions .btn-primary { flex: 1 1 240px; }
.form-note { margin: 0; font-size: 0.82rem; color: var(--text-muted); }

/* ---------- 7. Loading & skeletons ---------- */
.loading-head { display: flex; align-items: center; gap: 12px; }
.loading-title { margin: 0 0 0.3em; }
.pulse-dot {
  width: 12px; height: 12px; flex: none; border-radius: 50%;
  background: var(--mint); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: pulse 1.6s var(--ease) infinite;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 14px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}
.loading-step { color: var(--cyan); font-weight: 500; margin-bottom: var(--gap-md); }

.skeleton-grid { display: grid; gap: var(--gap); }
.sk {
  border-radius: var(--r-lg);
  background: linear-gradient(100deg, var(--ink-800) 20%, var(--ink-700) 40%, var(--ink-800) 62%);
  background-size: 260% 100%;
  animation: shimmer 1.5s linear infinite;
  border: 1px solid var(--line);
}
.sk-panel { height: 168px; }
.sk-card { height: 108px; }
@keyframes shimmer { to { background-position: -260% 0; } }

/* ---------- 8. Results: overview ---------- */
.results:focus { outline: none; }

.overview {
  display: grid; gap: var(--gap-md);
  padding: clamp(20px, 5vw, 34px);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background:
    radial-gradient(110% 90% at 100% 0%, rgba(56, 189, 248, 0.12), transparent 60%),
    linear-gradient(180deg, var(--ink-800), var(--ink-850));
  box-shadow: var(--shadow-md);
  margin-bottom: var(--gap);
}
.overview h2 { margin-bottom: 0.25em; }
.overview-sub { color: var(--text-soft); margin-bottom: var(--gap); }

.overview-main, .overview-weather { min-width: 0; }
.overview-facts { display: grid; gap: 14px; margin: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.overview-facts > div { min-width: 0; }
.overview-facts dt {
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 2px;
}
.overview-facts dd {
  margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1rem;
}

.weather-strip {
  display: flex; gap: 8px; padding-bottom: 6px;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.weather-day {
  flex: 0 0 74px; text-align: center;
  padding: 12px 6px; border-radius: var(--r-md);
  background: var(--glass); border: 1px solid var(--line);
}
.weather-day .wd-name { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.weather-day .wd-icon { font-size: 1.35rem; line-height: 1.5; }
.weather-day .wd-temp { font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; }
.weather-day .wd-rain { font-size: 0.72rem; color: var(--sky); }
.weather-day.is-wet { border-color: rgba(56, 189, 248, 0.45); background: rgba(56, 189, 248, 0.09); }
.weather-title {
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 10px;
}
.weather-none { color: var(--text-muted); font-size: 0.88rem; margin: 0; }

/* Indicators */
.indicators {
  display: grid; gap: 10px; margin-bottom: var(--gap);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.indicator { min-width: 0; }
.indicator {
  padding: 14px 16px; border-radius: var(--r-lg);
  background: var(--glass); border: 1px solid var(--line);
}
.indicator .ind-label {
  display: block; font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px;
}
.indicator .ind-value { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.ind-note { display: block; font-size: 0.78rem; color: var(--text-muted); }

.meter { height: 6px; border-radius: 4px; background: rgba(148, 178, 214, 0.18); margin-top: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 4px; background: var(--grad); }

/* Alerts */
.alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--glass);
  margin-bottom: 10px; font-size: 0.9rem;
}
.alert-icon { flex: none; font-size: 1.05rem; }
.alert p { margin: 0; }
.alert--warn { border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.08); }
.alert--info { border-color: rgba(56, 189, 248, 0.35); background: rgba(56, 189, 248, 0.07); }

/* Action bar */
.actionbar {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: space-between; align-items: center;
  margin: var(--gap-md) 0 var(--gap);
  padding: 14px; border-radius: var(--r-lg);
  background: var(--ink-850); border: 1px solid var(--line);
}
.actionbar-group { display: flex; flex-wrap: wrap; gap: 8px; }

/* Tuner */
.tuner {
  padding: clamp(16px, 4vw, 24px);
  border-radius: var(--r-lg);
  border: 1px dashed var(--line-strong);
  background: rgba(56, 189, 248, 0.04);
  margin-bottom: var(--gap-lg);
}
.tuner-head h3 { margin-bottom: 0.25em; }
.tuner-head p { color: var(--text-muted); font-size: 0.88rem; margin: 0; }
.chipset-actions { margin-top: var(--gap); }
.pill {
  min-height: 44px; padding: 10px 16px;
  background: var(--ink-750); border: 1px solid var(--line);
  border-radius: var(--r-pill); cursor: pointer;
  font-size: 0.88rem; color: var(--text);
  transition: background-color 0.18s, border-color 0.18s, transform 0.16s var(--ease), color 0.18s;
}
.pill:hover { border-color: var(--cyan); transform: translateY(-2px); }
.pill.is-active { background: rgba(74, 222, 128, 0.18); border-color: var(--mint); color: #d8ffe6; }
.pill-reset { color: var(--text-muted); }
.tuner-state { margin: 14px 0 0; font-size: 0.84rem; color: var(--cyan); min-height: 1.2em; }

/* ---------- 9. Day cards & timeline ---------- */
.days { display: grid; gap: var(--gap-md); }

.day-card {
  min-width: 0;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--ink-800), var(--ink-850));
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.day-head {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between;
  padding: 18px clamp(16px, 4vw, 24px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.day-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.day-number {
  display: grid; place-items: center; flex: none;
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--grad); color: #04240f;
  font-family: var(--font-display); font-weight: 700; line-height: 1;
}
.day-number small { display: block; font-size: 0.58rem; letter-spacing: 0.1em; opacity: 0.8; }
.day-title h3 { margin: 0; font-size: 1.05rem; }
.day-date { font-size: 0.84rem; color: var(--text-muted); }
.day-tools { display: flex; gap: 6px; flex-wrap: wrap; }

.day-meta { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px clamp(16px, 4vw, 24px) 0; }
.tag {
  font-size: 0.74rem; padding: 5px 11px; border-radius: var(--r-pill);
  background: var(--glass); border: 1px solid var(--line); color: var(--text-soft);
}
.tag--rain { border-color: rgba(56, 189, 248, 0.45); color: var(--sky); background: rgba(56, 189, 248, 0.1); }
.tag--warn { border-color: rgba(251, 191, 36, 0.4); color: var(--warn); background: rgba(251, 191, 36, 0.08); }
.tag--ok { border-color: rgba(74, 222, 128, 0.4); color: var(--mint); background: rgba(74, 222, 128, 0.08); }

/* Timeline */
.timeline { position: relative; padding: var(--gap) clamp(16px, 4vw, 24px) var(--gap-md); }
.timeline::before {
  content: ""; position: absolute;
  left: calc(clamp(16px, 4vw, 24px) + 26px); top: 34px; bottom: 34px;
  width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--mint), var(--cyan));
  opacity: 0.35;
}
.stop { position: relative; display: grid; gap: 12px; padding: 0 0 var(--gap-md) 0; }
.stop:last-child { padding-bottom: 0; }

.stop-rail { display: flex; align-items: center; gap: 14px; }
.stop-node {
  position: relative; z-index: 1; flex: none;
  width: 54px; text-align: center;
}
.stop-time {
  display: inline-block; padding: 6px 8px; min-width: 54px;
  border-radius: 9px; background: var(--ink-700); border: 1px solid var(--line-strong);
  font-family: var(--font-display); font-weight: 600; font-size: 0.8rem;
  letter-spacing: -0.01em;
}
.stop-body { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.stop-name {
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
  margin: 0 0 4px; line-height: 1.28;
}
.stop-name a { color: inherit; text-decoration: none; }
.stop-name a:hover { color: var(--cyan); text-decoration: underline; }
.stop-desc { margin: 0 0 8px; font-size: 0.9rem; color: var(--text-soft); }
.stop-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.stop-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

.stop-media {
  width: 100%; aspect-ratio: 16 / 9;
  border-radius: var(--r-md); overflow: hidden;
  background: var(--ink-700); border: 1px solid var(--line);
}
.stop-media img { width: 100%; height: 100%; object-fit: cover; }
.stop-media--empty { display: none; }

.stop--break .stop-body { opacity: 0.94; }
.stop--break .stop-name { font-size: 0.95rem; }
.break-card {
  padding: 12px 16px; border-radius: var(--r-md);
  border: 1px dashed var(--line-strong); background: rgba(255, 255, 255, 0.02);
}

.day-footer {
  padding: 14px clamp(16px, 4vw, 24px);
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px;
  align-items: center; justify-content: space-between;
  font-size: 0.85rem; color: var(--text-muted);
}

/* Free day */
.day-empty {
  padding: var(--gap-md) clamp(16px, 4vw, 24px) var(--gap-md);
  color: var(--text-soft);
}

/* Favourites */
.favourites {
  margin-top: var(--gap-lg); padding: clamp(16px, 4vw, 24px);
  border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--glass);
}
.fav-list { display: grid; gap: 8px; margin-top: 12px; }
.fav-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border-radius: var(--r-md);
  background: var(--ink-750); border: 1px solid var(--line);
  font-size: 0.9rem;
}

/* Attribution */
.attribution {
  margin-top: var(--gap-lg); padding-top: var(--gap);
  border-top: 1px solid var(--line);
  font-size: 0.82rem; color: var(--text-muted);
}
.attribution p { margin: 0 0 6px; }

/* ---------- 10. States ---------- */
.state-card {
  text-align: center; padding: clamp(28px, 7vw, 52px);
  border-radius: var(--r-xl); border: 1px solid var(--line);
  background: var(--ink-800);
}
.state-card--error { border-color: rgba(251, 113, 133, 0.35); }
.state-icon { font-size: 2.4rem; display: block; margin-bottom: 12px; }
.state-card p { color: var(--text-soft); max-width: 52ch; margin-inline: auto; }
.state-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: var(--gap); }

/* ---------- 11. How it works / sources ---------- */
.steps { display: grid; gap: var(--gap); counter-reset: step; }
.steps li {
  padding: var(--gap-md); border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--glass);
  transition: border-color 0.2s, transform 0.2s var(--ease);
}
.steps li:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.step-index {
  display: inline-block; margin-bottom: 10px;
  font-family: var(--font-display); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--mint);
}
.steps h3 { margin-bottom: 0.35em; }
.steps p { margin: 0; color: var(--text-soft); font-size: 0.93rem; }

.source-grid { display: grid; gap: var(--gap); }
.source-card {
  padding: var(--gap-md); border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--ink-800);
}
.source-card h3 { margin-bottom: 0.4em; font-size: 1.02rem; }
.source-card p { margin: 0 0 8px; color: var(--text-soft); font-size: 0.92rem; }
.source-note { font-size: 0.82rem !important; color: var(--text-muted) !important; margin: 0 !important; }
.disclosure {
  margin-top: var(--gap-md); padding: var(--gap-md);
  border-radius: var(--r-lg); border-left: 3px solid var(--mint);
  background: rgba(74, 222, 128, 0.05);
  color: var(--text-soft); font-size: 0.92rem;
}

/* ---------- 12. Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--ink-850);
  padding-block: var(--gap-lg);
}

.footer-top {
  display: grid; gap: var(--gap-lg);
  padding-bottom: var(--gap-md);
  border-bottom: 1px solid var(--line);
}
.footer-brand { font-family: var(--font-display); font-weight: 600; margin: 10px 0 0; font-size: 1.05rem; }
.footer-tag { color: var(--sky); font-size: 0.85rem; letter-spacing: 0.03em; margin: 0 0 12px; }
.footer-by { color: var(--text-muted); font-size: 0.85rem; margin: 0; }
.footer-by strong { color: var(--text-soft); font-weight: 600; }

.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.footer-links a {
  color: var(--text-soft); text-decoration: none;
  font-size: 0.92rem; padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.18s, border-color 0.18s;
}
.footer-links a:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

/* Legal block. Deliberately quiet but readable — small print that cannot be
   read is not a disclaimer, so it stays above 0.8rem with real line height. */
.footer-legal {
  padding-top: var(--gap-md);
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.62;
}
.footer-legal p { margin: 0 0 10px; }

/* Four balanced blocks. A real grid, so each one is read top to bottom
   instead of the eye jumping back up a column. */
.legal-grid { display: grid; gap: var(--gap-md); margin-bottom: var(--gap-md); }
.legal-item h4 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 0.88rem; color: var(--text-soft);
  margin: 0 0 6px; letter-spacing: -0.01em;
}
.legal-item p { margin: 0; max-width: 46ch; }
.footer-legal strong { color: var(--text-soft); font-weight: 600; }
.footer-legal a { color: var(--text-soft); }
.footer-legal a:hover { color: var(--cyan); }
.legal-title {
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 14px;
}
.footer-attrib { padding-top: var(--gap); border-top: 1px solid var(--line); max-width: 82ch; }
.attrib-sources { display: block; margin-top: 6px; opacity: 0.82; }
.footer-copy {
  margin: 0; padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
}

/* ---------- 13. Toasts ---------- */
.toast-region {
  position: fixed; z-index: 80;
  left: var(--pad-x); right: var(--pad-x); bottom: 20px;
  display: grid; gap: 8px; justify-items: center;
  pointer-events: none;
}
.toast {
  max-width: 460px; padding: 13px 18px;
  border-radius: var(--r-pill);
  background: var(--ink-700); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem; text-align: center;
  animation: toastin 0.26s var(--ease);
}
.toast--ok { border-color: rgba(74, 222, 128, 0.55); }
.toast--warn { border-color: rgba(251, 191, 36, 0.55); }
.toast--err { border-color: rgba(251, 113, 133, 0.55); }
@keyframes toastin { from { opacity: 0; transform: translateY(14px); } }

/* ---------- 14. Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .btn:hover, .pill:hover, .steps li:hover, .icon-btn:hover { transform: none; }
}

/* ---------- 15. Print-only furniture (hidden on screen) ---------- */
.print-masthead,
.print-only { display: none; }

/* ---------- 16. Legal pages (terms, privacy) ---------- */
.legal-page { padding-block: var(--section-y); }
.legal-page .shell { max-width: 780px; }
.legal-page h1 { font-size: clamp(2rem, 6vw, 2.8rem); margin-bottom: 0.2em; }
.legal-page h2 {
  font-size: clamp(1.05rem, 3vw, 1.22rem);
  margin: var(--gap-lg) 0 0.5em;
  padding-top: var(--gap);
  border-top: 1px solid var(--line);
}
.legal-page p { color: var(--text-soft); font-size: 0.96rem; line-height: 1.72; }
.legal-page strong { color: var(--text); font-weight: 600; }

.legal-updated { color: var(--text-muted); font-size: 0.85rem; margin-bottom: var(--gap-md); }
.legal-intro {
  font-size: 1.05rem !important;
  padding: var(--gap) var(--gap-md);
  border-left: 3px solid var(--mint);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: rgba(74, 222, 128, 0.05);
}
.legal-list { margin: 0 0 1em; padding-left: 1.1em; list-style: disc; color: var(--text-soft); }
.legal-list li { margin-bottom: 8px; font-size: 0.96rem; line-height: 1.7; }
.legal-attrib, .legal-footnote { font-size: 0.85rem !important; color: var(--text-muted) !important; }
.legal-footnote { margin-top: var(--gap-lg); padding-top: var(--gap); border-top: 1px solid var(--line); }

/* On the legal pages the nav is a single back-link, so it never collapses */
.legal-nav {
  position: static; display: flex; padding: 0;
  background: none; border: 0; box-shadow: none;
  opacity: 1; visibility: visible; transform: none; pointer-events: auto;
}
.legal-nav a { font-size: 0.9rem; padding: 10px 14px; }

/* Day-trip days are visibly different from city days */
.day-number--trip { background: linear-gradient(100deg, #38bdf8, #818cf8); }

/* ---------- 17. Discovery trace (?debug) ---------- */
.discovery {
  margin-top: var(--gap-lg);
  padding: clamp(16px, 4vw, 24px);
  border-radius: var(--r-lg);
  border: 1px dashed var(--line-strong);
  background: rgba(56, 189, 248, 0.04);
  font-size: 0.86rem;
}
.discovery h3 { font-size: 1rem; margin-bottom: 12px; }
.discovery h4 {
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); margin: var(--gap) 0 8px;
}
.debug-stats { display: grid; gap: 4px; }
.debug-stats li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 5px 0; border-bottom: 1px solid var(--line);
  color: var(--text-muted);
}
.debug-stats strong { color: var(--text); font-variant-numeric: tabular-nums; }
.debug-list { display: grid; gap: 3px; counter-reset: dbg; list-style: none; }
.debug-list li {
  display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline;
  padding: 6px 10px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  counter-increment: dbg;
  opacity: 0.55;
}
.debug-list li::before {
  content: counter(dbg) ".";
  color: var(--text-muted); min-width: 22px; font-variant-numeric: tabular-nums;
}
.debug-list li.is-chosen { opacity: 1; background: rgba(74, 222, 128, 0.08); }
.debug-name { font-weight: 600; }
.debug-meta { font-size: 0.78rem; color: var(--text-muted); }
.debug-rejected { color: var(--text-muted); font-size: 0.8rem; margin: 0; }

/* iOS gives date inputs an intrinsic width that ignores the container and
   centres the value, so the field spilled past the card edge on a phone. */
input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  text-align: left;
  display: block;
}
input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
input[type="date"]::-webkit-datetime-edit { padding: 0; }
