/* The Skiathos Guide — stylesheet */

:root {
  --aegean: #0b4f6c;
  --aegean-deep: #073b52;
  --aegean-light: #1f7fa5;
  --sea: #12a4c4;
  --sand: #f3ede2;
  --terracotta: #c25e3a;
  --olive: #7a8450;
  --gold: #d9a441;

  --bg: #fbf9f5;
  --bg-alt: #ffffff;
  --bg-sunk: #f2ede4;
  --text: #1e2b32;
  --text-soft: #55676f;
  --line: #e2d9ca;
  --ok-bg: #e6f4ea;   --ok-fg: #1b5e2a;
  --warn-bg: #fdf3e0; --warn-fg: #7a5210;
  --bad-bg: #fdeaea;  --bad-fg: #8f2222;
  --shadow: 0 1px 2px rgba(11, 79, 108, .06), 0 8px 24px rgba(11, 79, 108, .07);
  --shadow-lg: 0 2px 4px rgba(11, 79, 108, .08), 0 20px 48px rgba(11, 79, 108, .14);
  --radius: 14px;
  --maxw: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1519;
    --bg-alt: #151f25;
    --bg-sunk: #0a1014;
    --text: #e8eef1;
    --text-soft: #9fb2bc;
    --line: #24333c;
    --sand: #1a252b;
    --aegean: #4bb3d6;
    --aegean-deep: #0a1014;
    --ok-bg: #14301d;   --ok-fg: #7fd699;
    --warn-bg: #33280f; --warn-fg: #e5bb63;
    --bad-bg: #3a1a1a;  --bad-fg: #f0928c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .34);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .5), 0 20px 48px rgba(0, 0, 0, .5);
  }
}

:root[data-theme="dark"] {
  --bg: #0e1519;
  --bg-alt: #151f25;
  --bg-sunk: #0a1014;
  --text: #e8eef1;
  --text-soft: #9fb2bc;
  --line: #24333c;
  --sand: #1a252b;
  --aegean: #4bb3d6;
  --aegean-deep: #0a1014;
  --ok-bg: #14301d;   --ok-fg: #7fd699;
  --warn-bg: #33280f; --warn-fg: #e5bb63;
  --bad-bg: #3a1a1a;  --bad-fg: #f0928c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .34);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .5), 0 20px 48px rgba(0, 0, 0, .5);
}

/* Charts here are single-series magnitude comparisons: bar LENGTH encodes the
   value, so colour carries no data and does not vary between bars. One accent
   per theme, each verified above 3:1 against its own surface
   (#1f7fa5 = 4.3:1 on light; #5cb3d1 = 7.0:1 on dark). The track is a
   deliberately recessive step — it is the unfilled remainder, not data. */
:root {
  --bar: #1f7fa5;
  --track: #e8eef1;
  --grid: #dfe6ea;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bar: #5cb3d1;
    --track: #1d2a32;
    --grid: #24333c;
  }
}
:root[data-theme="dark"] {
  --bar: #5cb3d1;
  --track: #1d2a32;
  --grid: #24333c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .ui {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

a { color: var(--aegean); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------------------------------------------------------- HEADER */
.masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.masthead .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 62px;
}
.brand {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -.01em;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}
.brand .dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: linear-gradient(140deg, var(--sea), var(--aegean));
  flex: none;
}
.masthead nav {
  margin-left: auto;
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
.masthead nav a {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .84rem;
  font-weight: 600;
  color: var(--text-soft);
  text-decoration: none;
  padding: 7px 11px;
  border-radius: 8px;
}
.masthead nav a:hover { color: var(--text); background: var(--bg-sunk); }

.themebtn {
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--text-soft);
  border-radius: 8px;
  width: 34px; height: 34px;
  cursor: pointer;
  font-size: .95rem;
  line-height: 1;
}
.themebtn:hover { color: var(--text); }

/* ------------------------------------------------------------ HERO */
.hero {
  background:
    radial-gradient(900px 420px at 78% -10%, rgba(18, 164, 196, .30), transparent 62%),
    linear-gradient(165deg, var(--aegean-deep), var(--aegean) 62%, var(--aegean-light));
  color: #fff;
  padding: 74px 0 62px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 46px;
  background: var(--bg);
  clip-path: polygon(0 100%, 0 62%, 8% 44%, 19% 62%, 31% 38%, 44% 60%, 57% 34%, 69% 58%, 82% 40%, 92% 60%, 100% 46%, 100% 100%);
}
.hero .kicker {
  font-family: ui-sans-serif, system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .7rem;
  font-weight: 700;
  opacity: .78;
  margin: 0 0 14px;
}
.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.2rem, 6vw, 3.7rem);
  line-height: 1.03;
  letter-spacing: -.028em;
  font-weight: 800;
  max-width: 16ch;
}
.hero p {
  margin: 0;
  max-width: 62ch;
  font-size: 1.09rem;
  opacity: .93;
}
.herostats {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 34px;
  position: relative;
  z-index: 2;
}
.herostats div strong {
  display: block;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
}
.herostats div span {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  opacity: .8;
}

/* --------------------------------------------------------- SECTIONS */
section { padding: 56px 0; scroll-margin-top: 72px; }
.section-head { margin-bottom: 26px; }
.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  letter-spacing: -.022em;
  font-weight: 800;
}
.section-head p { margin: 0; color: var(--text-soft); max-width: 72ch; }

.eyebrow {
  font-family: ui-sans-serif, system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .7rem;
  font-weight: 700;
  color: var(--terracotta);
  margin: 0 0 9px;
}

/* --------------------------------------------------------- CONTROLS */
.controls {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 70px;
  z-index: 40;
}
.controls .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.controls .row + .row { margin-top: 12px; }

#search {
  flex: 1 1 260px;
  min-width: 0;
  font: inherit;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .93rem;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text);
}
#search:focus { outline: 2px solid var(--sea); outline-offset: 1px; }

select {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .88rem;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

.chip {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .8rem;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text-soft);
  cursor: pointer;
  transition: .13s;
}
.chip:hover { color: var(--text); border-color: var(--aegean); }
.chip[aria-pressed="true"] {
  background: var(--aegean);
  border-color: var(--aegean);
  color: #fff;
}
.resultcount {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .82rem;
  color: var(--text-soft);
  margin: 18px 0 14px;
}

/* ------------------------------------------------------------ GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .16s, box-shadow .16s, border-color .16s;
  display: flex;
  flex-direction: column;
  text-align: left;
  font: inherit;
  color: inherit;
  width: 100%;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--aegean);
}
.card:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}
.card h3 {
  margin: 0;
  font-size: 1.13rem;
  letter-spacing: -.015em;
  font-weight: 700;
  line-height: 1.28;
}
.card .greek {
  font-size: .84rem;
  color: var(--text-soft);
  font-style: italic;
}
.card .meta {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .76rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin: 9px 0 11px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.card .meta .sep { opacity: .4; }
.card p.sum {
  margin: 0 0 16px;
  font-size: .95rem;
  color: var(--text-soft);
  flex: 1;
}

.overall {
  flex: none;
  text-align: center;
  background: linear-gradient(150deg, var(--aegean), var(--aegean-light));
  color: #fff;
  border-radius: 11px;
  padding: 7px 10px 6px;
  min-width: 58px;
}
.overall b {
  display: block;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
}
.overall span {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .58rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  opacity: .88;
}

.stars { color: var(--gold); letter-spacing: .06em; font-size: .9rem; }

.ratingrow {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}
.pill {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .72rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--bg-sunk);
  color: var(--text-soft);
  border: 1px solid var(--line);
}
.pill b { color: var(--text); }

.tag {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 3px 8px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--olive) 16%, transparent);
  color: var(--olive);
}
:root[data-theme="dark"] .tag { color: #b3c07d; }

/* ----------------------------------------------------------- MODAL */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  overflow-y: auto;
  background: rgba(7, 30, 42, .62);
  backdrop-filter: blur(4px);
  padding: 34px 18px;
}
.modal[open] { display: block; }

.sheet {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}
.sheet-head {
  background: linear-gradient(150deg, var(--aegean-deep), var(--aegean));
  color: #fff;
  padding: 30px 32px 26px;
  position: relative;
}
.sheet-head h2 {
  margin: 0 0 6px;
  font-size: clamp(1.5rem, 4vw, 2.05rem);
  letter-spacing: -.024em;
  font-weight: 800;
  line-height: 1.12;
  padding-right: 44px;
}
.sheet-head .sub {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  opacity: .84;
}
.closebtn {
  position: absolute;
  top: 20px; right: 20px;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
.closebtn:hover { background: rgba(255,255,255,.26); }

.sheet-body { padding: 28px 32px 36px; }
.sheet-body h4 {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--terracotta);
  margin: 32px 0 12px;
  font-weight: 700;
}
.sheet-body h4:first-child { margin-top: 0; }
.sheet-body p { margin: 0 0 15px; }
.sheet-body p:last-child { margin-bottom: 0; }

.scoregrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
}
.scorebox {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 13px 14px;
}
.scorebox .lbl {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-soft);
  font-weight: 700;
}
.scorebox .val {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.scorebox .val small { font-size: .72rem; color: var(--text-soft); font-weight: 600; }
.bar { height: 5px; border-radius: 3px; background: var(--bg-sunk); overflow: hidden; margin-top: 7px; }
.bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--sea), var(--aegean)); }

table.ratings {
  width: 100%;
  border-collapse: collapse;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .88rem;
}
table.ratings th, table.ratings td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
table.ratings th {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-soft);
}
table.ratings td b { font-size: 1.02rem; }
.tablewrap { overflow-x: auto; }

ul.ticks { margin: 0; padding: 0; list-style: none; }
ul.ticks li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  font-size: .95rem;
}
ul.ticks li::before {
  content: "◆";
  position: absolute;
  left: 0;
  color: var(--olive);
  font-size: .74rem;
  top: .28em;
}
ul.ticks.warn li::before { content: "▲"; color: var(--terracotta); }

.factbox {
  background: var(--bg-sunk);
  border-left: 3px solid var(--aegean);
  border-radius: 0 10px 10px 0;
  padding: 15px 18px;
  font-size: .93rem;
}
.factbox div + div { margin-top: 7px; }
/* A .herostats block nested inside a factbox must keep its own typography —
   .factbox strong would otherwise uppercase live values like "13h 39m". */
.factbox .herostats strong { text-transform: none; letter-spacing: -.02em; font-size: 1.5rem; color: var(--text); }
.factbox .herostats { gap: 26px; }
.factbox strong {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-soft);
  display: block;
}

/* ---------------------------------------------------------- AREAS */
.areagrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.areacard {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.areacard h3 { margin: 0 0 10px; font-size: 1.08rem; letter-spacing: -.015em; }
.areacard p { margin: 0 0 14px; font-size: .94rem; color: var(--text-soft); }
.areacard .count {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--aegean);
  font-weight: 700;
}

/* ------------------------------------------------------ LEAGUE TABLE */
.tablecard {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
table.league {
  width: 100%;
  border-collapse: collapse;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .88rem;
  min-width: 640px;
}
table.league th {
  text-align: left;
  padding: 13px 14px;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-soft);
  background: var(--bg-sunk);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.league td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.league tr:last-child td { border-bottom: 0; }
table.league tbody tr { cursor: pointer; }
table.league tbody tr:hover { background: var(--bg-sunk); }
table.league .rank {
  font-weight: 800;
  color: var(--text-soft);
  width: 44px;
}
table.league .nm { font-weight: 700; }
table.league .nm small { display: block; font-weight: 500; color: var(--text-soft); font-size: .78rem; }
.num { font-variant-numeric: tabular-nums; font-weight: 700; }

/* --------------------------------------------------------- METHOD */
.method {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow);
}
.method h3 { margin: 22px 0 12px; font-size: 1.05rem; }
.method h3:first-child { margin-top: 0; }
.method p { color: var(--text); font-size: .97rem; }
.note {
  border-left: 3px solid var(--terracotta);
  background: color-mix(in srgb, var(--terracotta) 8%, transparent);
  padding: 15px 18px;
  border-radius: 0 10px 10px 0;
  font-size: .94rem;
  margin: 20px 0;
}

/* ---------------------------------------------------------- FOOTER */
footer {
  background: var(--aegean-deep);
  color: #cfe3ec;
  padding: 46px 0 40px;
  margin-top: 30px;
  font-size: .9rem;
}
:root:not([data-theme="dark"]) footer { color: #cfe3ec; }
footer a { color: #8fd3ea; }
footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 28px; }
footer h4 {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin: 0 0 12px;
  color: #fff;
}
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 6px; }
footer .fine {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.16);
  font-size: .82rem;
  opacity: .74;
}

/* ------------------------------------------------------------- CHARTS */
.chart { margin: 0; }
.chart figcaption {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .8rem;
  color: var(--text-soft);
  margin-bottom: 18px;
}
.chart .row {
  display: grid;
  grid-template-columns: minmax(96px, 152px) 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 5px 0;
}
.chart .rl {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .82rem;
  color: var(--text);
  text-align: right;
  line-height: 1.25;
}
.chart .rt {
  background: var(--track);
  border-radius: 0 4px 4px 0;
  height: 18px;
  position: relative;
  overflow: visible;
}
.chart .rf {
  height: 100%;
  border-radius: 0 4px 4px 0;
  min-width: 2px;
  transition: width .4s ease;
}
.chart .rv {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.chart .rv small { font-weight: 500; color: var(--text-soft); }
.chart .axis {
  grid-column: 2 / 3;
  border-top: 1px solid var(--grid);
  margin-top: 6px;
  padding-top: 5px;
  display: flex;
  justify-content: space-between;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .7rem;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-soft);
}

@media (max-width: 760px) {
  .masthead .wrap { gap: 10px; }
  .masthead nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .masthead nav::-webkit-scrollbar { display: none; }
  .masthead nav a { padding: 6px 8px; font-size: .8rem; white-space: nowrap; }
  .themebtn { flex: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .sheet-head, .sheet-body { padding-left: 22px; padding-right: 22px; }
  .modal { padding: 0; }
  .sheet { border-radius: 0; min-height: 100%; }
  .controls { position: static; }
  .herostats { gap: 22px; }
  .hero { padding: 52px 0 46px; }
  .wrap { padding: 0 18px; }
}

@media (max-width: 460px) {
  /* Keep the nav reachable on small phones — scroll it rather than hide it. */
  .masthead nav a { padding: 6px 7px; font-size: .76rem; }
}

@media print {
  .masthead, .controls, .modal, .themebtn { display: none !important; }
}


/* ------------------------------------------------ destination guide layer */

.toc {
  margin: 30px 0 0;
  padding: 18px 22px;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: 12px;
  max-width: 60ch;
}
.toc .eyebrow { margin: 0 0 10px; }
.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 28px;
}
.toc li { margin: 0 0 6px; break-inside: avoid; font-size: .9rem; }
.toc li::marker { color: var(--text-soft); font-weight: 600; }

/* linkCards() renders whole cards as anchors, so the default underline would
   run through every heading and paragraph inside them. */
a.card { text-decoration: none; color: inherit; display: block; }
a.card h3 { color: var(--text); }
a.card:hover h3 { color: var(--aegean); }
.toc a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); }
.toc a:hover { color: var(--sea); border-bottom-color: var(--sea); }

@media (max-width: 640px) {
  .toc ol { columns: 1; }
}

/* Confidence markers. Travel logistics change every season and we say so
   rather than presenting everything with equal certainty. */
.conf {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 5px;
  vertical-align: 2px;
  margin-left: 6px;
  white-space: nowrap;
}
.conf-high { background: var(--ok-bg); color: var(--ok-fg); }
.conf-med  { background: var(--warn-bg); color: var(--warn-fg); }
.conf-low  { background: var(--bad-bg); color: var(--bad-fg); }

/* Two-column comparison list used on the where-to-stay and month pages. */
.pros { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 18px 0 0; }
.pros > div { padding: 16px 18px; border-radius: 10px; border: 1px solid var(--line); }
.pros h4 { margin: 0 0 8px; font-size: .84rem; text-transform: uppercase; letter-spacing: .05em; }
.pros ul { margin: 0; padding-left: 18px; }
.pros li { margin-bottom: 5px; }
.pros .good { background: var(--ok-bg); border-color: transparent; }
.pros .good h4 { color: var(--ok-fg); }
.pros .bad { background: var(--bad-bg); border-color: transparent; }
.pros .bad h4 { color: var(--bad-fg); }

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

/* Season strip on month pages. */
.seasonbar { display: flex; gap: 3px; margin: 20px 0 0; }
.seasonbar span {
  flex: 1;
  text-align: center;
  font-size: .7rem;
  font-weight: 700;
  padding: 7px 2px;
  border-radius: 5px;
  background: var(--bg-sunk);
  color: var(--text-soft);
  text-decoration: none;
}
.seasonbar a { flex: 1; text-decoration: none; }
.seasonbar a span { display: block; }
.seasonbar a:hover span { background: var(--line); color: var(--text); }
.seasonbar .on { background: var(--sea); color: #fff; }

/* ======================================================== MOTION AND TOOLS */

.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;
}

/* Reveals. Elements are only hidden once motion.js has confirmed it will
   animate them, so no-JS and crawler views show everything. */
[data-motion="on"] .rv {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity .62s cubic-bezier(.22,.61,.36,1), transform .62s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
[data-motion="on"] .rv.in { opacity: 1; transform: none; }

/* The hero light wash. Two very slow, offset radial gradients drifting across
   the header — the refracted light you get looking down off a boat. Composited
   on the GPU, never touches layout. */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero > .wrap { position: relative; z-index: 2; }
[data-motion="on"] .hero::after {
  content: "";
  position: absolute; inset: -30%;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(38% 44% at 22% 30%, rgba(255,255,255,.16), transparent 62%),
    radial-gradient(30% 38% at 76% 62%, rgba(120, 226, 255, .18), transparent 60%),
    radial-gradient(26% 30% at 52% 84%, rgba(255,255,255,.10), transparent 66%);
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: translate3d(-2%, -1%, 0) scale(1); }
  50%  { transform: translate3d(2%, 2%, 0) scale(1.06); }
  100% { transform: translate3d(-1%, 1%, 0) scale(1.02); }
}

/* A thin caustic line along the bottom edge of the hero, drifting the other
   way. Reads as the waterline rather than as a border. */
[data-motion="on"] .hero::before {
  content: "";
  position: absolute; left: -20%; right: -20%; bottom: 0; height: 2px;
  z-index: 2;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
  animation: caustic 11s linear infinite;
}
@keyframes caustic {
  from { transform: translate3d(-30%, 0, 0); }
  to   { transform: translate3d(30%, 0, 0); }
}

/* A live indicator for anything computed rather than stored. */
.livedot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--sea); margin-right: 7px; vertical-align: 1px;
  position: relative;
}
[data-motion="on"] .livedot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--sea); animation: ping 2.4s cubic-bezier(0,0,.2,1) infinite;
}
@keyframes ping {
  0%   { transform: scale(1); opacity: .7; }
  70%  { transform: scale(2.8); opacity: 0; }
  100% { transform: scale(2.8); opacity: 0; }
}

/* ---------------------------------------------------------- save controls */

.savebtn {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: .78rem; font-weight: 700;
  padding: 6px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-alt); color: var(--text-soft);
  transition: background .18s, color .18s, border-color .18s, transform .18s;
  line-height: 1; white-space: nowrap;
}
.savebtn:hover { border-color: var(--sea); color: var(--sea); }
.savebtn:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }
.savebtn.on { background: var(--ok-bg); color: var(--ok-fg); border-color: transparent; }
[data-motion="on"] .savebtn.pulse { animation: savepulse .42s ease-out; }
@keyframes savepulse {
  0% { transform: scale(1); } 40% { transform: scale(1.14); } 100% { transform: scale(1); }
}
.card .savebtn { position: absolute; top: 14px; right: 14px; z-index: 3; }
.card { position: relative; }

/* The header trip counter. */
.tripchip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 700; padding: 6px 11px;
  border-radius: 999px; border: 1px solid var(--line);
  color: var(--text-soft); text-decoration: none; white-space: nowrap;
}
.tripchip:hover { border-color: var(--sea); color: var(--sea); }
.tripchip b {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--sea); color: #fff; font-size: .7rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.tripchip.empty b { background: var(--line); color: var(--text-soft); }

.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 90;
  transform: translate(-50%, 16px);
  background: var(--text); color: var(--bg);
  padding: 11px 18px; border-radius: 10px; font-size: .86rem; font-weight: 600;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .22s; max-width: 88vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------- the heatmap */

.heat { display: grid; grid-template-columns: 46px repeat(24, 1fr); gap: 2px; min-width: 720px; }
.heat-lbl {
  font-size: .68rem; font-weight: 700; color: var(--text-soft);
  display: flex; align-items: center; text-transform: uppercase; letter-spacing: .04em;
}
.heat-hr { font-size: .6rem; color: var(--text-soft); text-align: center; }
.heat-cell {
  aspect-ratio: 1; border-radius: 3px; background: var(--heat-0);
  transition: opacity .34s ease, transform .34s ease;
}
[data-motion="on"] .heat-cell { opacity: 0; transform: scale(.72); }
[data-motion="on"] .heat-cell.in { opacity: 1; transform: none; }

/* Sequential single-hue ramp — lightness encodes magnitude, hue is constant,
   which is the correct encoding for a one-variable intensity grid. */
:root {
  --heat-0: #eef2f3; --heat-1: #cfe8ef; --heat-2: #9ed6e5;
  --heat-3: #5cbcd6; --heat-4: #1f97bd; --heat-5: #0b6d8e;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --heat-0: #16212a; --heat-1: #14384a; --heat-2: #135a76;
    --heat-3: #157fa3; --heat-4: #2aa6cb; --heat-5: #6fd0e8;
  }
}
:root[data-theme="dark"] {
  --heat-0: #16212a; --heat-1: #14384a; --heat-2: #135a76;
  --heat-3: #157fa3; --heat-4: #2aa6cb; --heat-5: #6fd0e8;
}
.h0{background:var(--heat-0)}.h1{background:var(--heat-1)}.h2{background:var(--heat-2)}
.h3{background:var(--heat-3)}.h4{background:var(--heat-4)}.h5{background:var(--heat-5)}

.heatkey { display: flex; align-items: center; gap: 7px; margin-top: 14px; font-size: .74rem; color: var(--text-soft); }
.heatkey i { width: 20px; height: 11px; border-radius: 3px; display: inline-block; }

/* --------------------------------------------------------------- bar rows */

[data-bars] .barrow { display: grid; grid-template-columns: 88px 1fr 54px; gap: 12px; align-items: center; margin-bottom: 8px; }
[data-bars] .barrow span:first-child { font-size: .8rem; color: var(--text-soft); font-weight: 600; }
[data-bars] .bartrack { background: var(--bg-sunk); border-radius: 4px; height: 15px; overflow: hidden; }
[data-bars] .barfill {
  height: 100%; background: var(--aegean-light); border-radius: 4px;
  transform-origin: left center; transition: transform .8s cubic-bezier(.22,.61,.36,1);
}
[data-bars] .barrow b { font-size: .82rem; text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ model banner */

.modelnote {
  border-left: 3px solid var(--warn-fg);
  background: var(--warn-bg); color: var(--warn-fg);
  padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 0 0 24px;
  font-size: .88rem;
}
.modelnote strong { color: inherit; }

@media (max-width: 640px) {
  .heat { min-width: 640px; grid-template-columns: 38px repeat(24, 1fr); }
  [data-bars] .barrow { grid-template-columns: 70px 1fr 46px; }
  .toast { bottom: 14px; }
}

/* Motion off: everything renders in its final state, and the hero is static. */
@media (prefers-reduced-motion: reduce) {
  .rv, .heat-cell { opacity: 1 !important; transform: none !important; }
  .hero::before, .hero::after, .livedot::after { animation: none !important; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* --------------------------------------------------------- the beach finder */

.bf { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; margin-bottom: 8px; }
.bf fieldset {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px 12px; margin: 0; background: var(--bg-alt);
}
.bf legend {
  font-size: .74rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-soft); padding: 0 6px;
}
.bf .opt { display: flex; align-items: center; gap: 9px; padding: 5px 0; cursor: pointer; font-size: .9rem; }
.bf .opt input { accent-color: var(--sea); width: 16px; height: 16px; flex: none; cursor: pointer; }
.bf .opt:hover span { color: var(--sea); }
.bf .opt input:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }

.bf-tags { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 5px; }
.bf-tags .conf { margin-left: 0; }

#bf-results .card h3 a { text-decoration: none; color: inherit; }
#bf-results .card h3 a:hover { color: var(--aegean); }

/* ------------------------------------------------------- the AI-age section */

.aiband {
  background: linear-gradient(140deg, var(--aegean-deep), var(--aegean) 58%, var(--sea));
  color: #fff; padding: 62px 0; position: relative; overflow: hidden; isolation: isolate;
}
.aiband > .wrap { position: relative; z-index: 2; }
.aiband h2 { color: #fff; }
.aiband p { color: rgba(255,255,255,.9); }
[data-motion="on"] .aiband::after {
  content: ""; position: absolute; inset: -40%; z-index: 1; pointer-events: none;
  background:
    radial-gradient(34% 40% at 18% 26%, rgba(255,255,255,.14), transparent 62%),
    radial-gradient(28% 34% at 78% 68%, rgba(120,226,255,.20), transparent 60%);
  animation: drift 30s ease-in-out infinite alternate;
}

/* The scored signal rows on the AI-readiness explainer. */
.signals { display: grid; gap: 10px; margin-top: 20px; }
.signal {
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center;
  padding: 14px 18px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg-alt);
}
.signal h4 { margin: 0 0 3px; font-size: .95rem; }
.signal p { margin: 0; font-size: .85rem; color: var(--text-soft); }
.signal .w {
  font-size: 1.4rem; font-weight: 800; color: var(--aegean);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.signal .w small { display: block; font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-soft); }

@media (max-width: 640px) {
  .bf { grid-template-columns: 1fr; }
  .aiband { padding: 44px 0; }
}

/* ----------------------------------------------------------------- maps */

.mapbox {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-sunk);
  margin: 20px 0 0;
  overflow: hidden;
}
.mapbox-inner { padding: 16px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mapbox-label {
  margin: 0; flex: 1 1 auto; min-width: 140px;
  font-size: .84rem; font-weight: 700; color: var(--text-soft);
  text-transform: uppercase; letter-spacing: .05em;
}
.mapbox a.savebtn { text-decoration: none; }
.mapbox-note {
  flex: 1 0 100%; margin: 2px 0 0;
  font-size: .76rem; color: var(--text-soft);
}
.mapbox-canvas { width: 100%; height: 380px; }
/* The escape-hatch link that sits under a loaded map. Bordered off from the
   map itself so it reads as page furniture, not part of Google's canvas. */
.mapbox-foot { border-top: 1px solid var(--line); padding: 10px 18px; }

@media (max-width: 640px) {
  .mapbox-canvas { height: 280px; }
  .mapbox-label { flex: 1 0 100%; }
}
