/* PortCrowds — premium travel-tool design system. Mobile-first, no frameworks. */
:root {
  --navy: #0a2233;
  --navy-2: #0e2f45;
  --ink: #16283a;
  --muted: #5d7186;
  --line: #e3eaf1;
  --bg: #f4f7fa;
  --card: #ffffff;
  --teal: #0d8a9e;
  --teal-dark: #0a6b7c;
  --teal-bright: #12b5cc;
  --quiet: #0d9d6c;
  --quiet-bg: #e3f6ee;
  --quiet-ink: #0b6b4a;
  --moderate: #cf9416;
  --moderate-bg: #fdf3d8;
  --moderate-ink: #8a6205;
  --busy: #e06a12;
  --busy-bg: #fdeee0;
  --busy-ink: #a04c0c;
  --packed: #d23434;
  --packed-bg: #fce7e7;
  --packed-ink: #962222;
  --unknown: #6b7a8d;
  --unknown-bg: #edf1f5;
  --none-bg: #eef2f6;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(10, 34, 51, 0.08);
  --shadow-md: 0 8px 24px rgba(10, 34, 51, 0.1);
  --shadow-lg: 0 16px 44px rgba(10, 34, 51, 0.18);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
}
.wrap { --gutter: 18px; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { .wrap { --gutter: 28px; } }
.bleed { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); }
a { color: var(--teal-dark); }
a:hover { color: var(--teal); }
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.25; color: var(--navy); }

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(180deg, var(--navy) 0%, #0d2a3f 100%);
  position: sticky; top: 0; z-index: 20;
  box-shadow: 0 2px 14px rgba(7, 24, 37, 0.35);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; }
.brand { font-weight: 800; font-size: 1.4rem; color: #fff; text-decoration: none; letter-spacing: -0.02em; }
.brand span { color: var(--teal-bright); }
.site-nav { display: flex; gap: 2px; flex-wrap: wrap; }
.site-nav a { text-decoration: none; color: #b9cfdb; font-weight: 700; font-size: 0.92rem; padding: 9px 13px; border-radius: 9px; transition: background 0.15s, color 0.15s; }
.site-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.site-nav a.active { color: #fff; background: rgba(18, 181, 204, 0.22); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 420px at 88% -10%, rgba(18, 181, 204, 0.32), transparent 60%),
    radial-gradient(720px 400px at 8% 115%, rgba(13, 157, 108, 0.22), transparent 60%),
    linear-gradient(155deg, #0d3449 0%, var(--navy) 55%, #071825 100%);
  padding: 66px 0 96px;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 90px;
  background: linear-gradient(180deg, transparent, rgba(7, 24, 37, 0.35));
  pointer-events: none;
}
.hero h1 { color: #fff; margin: 18px 0 12px; font-size: clamp(2rem, 5.2vw, 3.1rem); font-weight: 800; max-width: 16ch; }
.hero p.sub { margin: 0; font-size: 1.12rem; color: #c6d9e3; max-width: 620px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px; padding: 7px 16px; font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: #dff1f6;
}
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: #2fe0a8; box-shadow: 0 0 0 0 rgba(47, 224, 168, 0.6); animation: pulse 2.2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 224, 168, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(47, 224, 168, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 224, 168, 0); }
}
.hero-stats { display: flex; gap: 34px; margin-top: 30px; flex-wrap: wrap; }
.hs b { font-size: 1.65rem; font-weight: 800; display: block; color: #fff; letter-spacing: -0.02em; }
.hs span { color: #9fbccd; font-size: 0.85rem; font-weight: 600; }

/* ---------- Cards & sections ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 24px 0; box-shadow: var(--shadow-sm); }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.section-title { font-size: 1.35rem; margin: 36px 0 8px; position: relative; padding-bottom: 10px; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 46px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--teal), var(--teal-bright)); }
.lead { color: var(--muted); margin-top: 0; font-size: 1.05rem; }

/* ---------- Tier badges ---------- */
.tier-badge { display: inline-block; font-weight: 800; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.07em; padding: 6px 14px; border-radius: 999px; white-space: nowrap; }
.tier-quiet { background: var(--quiet-bg); color: var(--quiet-ink); border: 1px solid #b7e4cd; }
.tier-moderate { background: var(--moderate-bg); color: var(--moderate-ink); border: 1px solid #eed9a0; }
.tier-busy { background: var(--busy-bg); color: var(--busy-ink); border: 1px solid #f3c89e; }
.tier-packed { background: var(--packed-bg); color: var(--packed-ink); border: 1px solid #f0b3b3; }
.tier-unknown { background: var(--unknown-bg); color: #4c5a6d; border: 1px solid #d4dbe3; }
.tier-none { background: var(--none-bg); color: #8a97a5; border: 1px dashed #cbd4de; }

/* ---------- Verdict hero (day pages) ---------- */
.verdict-hero {
  color: #fff; border: none; position: relative; overflow: hidden;
  margin: 24px calc(-1 * var(--gutter)) 0; padding: 40px var(--gutter) 32px;
  box-shadow: var(--shadow-md);
}
.verdict-hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(640px 220px at 92% -20%, rgba(255, 255, 255, 0.16), transparent 60%); pointer-events: none; }
.verdict-hero.v-quiet { background: linear-gradient(150deg, #0e8a5e 0%, #0a5c40 100%); }
.verdict-hero.v-moderate { background: linear-gradient(150deg, #c08a12 0%, #8a5f08 100%); }
.verdict-hero.v-busy { background: linear-gradient(150deg, #d1620d 0%, #8f4207 100%); }
.verdict-hero.v-packed { background: linear-gradient(150deg, #c03333 0%, #7d1d1d 100%); }
.verdict-hero.v-unknown { background: linear-gradient(150deg, #5b6b80 0%, #3c4a5e 100%); }
.verdict-hero h1 { color: #fff; font-size: clamp(1.45rem, 3.6vw, 2.1rem); margin: 14px 0 10px; font-weight: 800; }
.verdict-sentence { font-size: 1.18rem; margin: 0; color: rgba(255, 255, 255, 0.94); max-width: 640px; }
.verdict-hero .tier-badge { background: rgba(255, 255, 255, 0.16); color: #fff; border: 1px solid rgba(255, 255, 255, 0.45); font-size: 0.95rem; padding: 9px 22px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; }
.stat-card { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.24); border-radius: 12px; padding: 14px 16px; }
.stat-card .stat-num { font-size: 1.5rem; font-weight: 800; display: block; color: #fff; letter-spacing: -0.01em; }
.stat-card .stat-label { font-size: 0.82rem; color: rgba(255, 255, 255, 0.78); font-weight: 600; }
.overlap-note { background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.32); border-radius: 10px; padding: 12px 16px; margin-top: 16px; font-size: 0.95rem; color: #fff; }
.provisional-flag { display: inline-block; background: rgba(0, 0, 0, 0.28); border: 1px dashed rgba(255, 255, 255, 0.55); color: #fff; font-size: 0.84rem; font-weight: 700; padding: 6px 14px; border-radius: 999px; margin-top: 14px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -24px; padding: 0 24px; }
table.ships { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.95rem; min-width: 620px; }
table.ships th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--line); }
table.ships td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.ships tbody tr { transition: background 0.12s; }
table.ships tbody tr:hover { background: #f2f8fa; }
table.ships tbody tr:last-child td { border-bottom: none; }
table.ships td strong { color: var(--navy); font-weight: 700; }
table.rank { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.96rem; }
table.rank th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--line); }
table.rank td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); }
table.rank tbody tr:hover { background: #f2f8fa; }
table.rank tbody tr:first-child td { font-weight: 700; }
table.rank tbody tr:first-child td:first-child { color: var(--teal-dark); }

/* ---------- Arrival timeline (pure CSS) ---------- */
.tl-card { padding-bottom: 14px; }
.tl-row { display: grid; grid-template-columns: 170px 1fr 150px; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.tl-row:last-of-type { border-bottom: none; }
.tl-head { border-bottom: 2px solid var(--line); padding-bottom: 4px; }
.tl-ship { font-weight: 700; font-size: 0.92rem; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-track { position: relative; height: 36px; background: #edf3f7; border-radius: 9px; }
.tl-scale { background: transparent; height: 24px; }
.tl-tick { position: absolute; top: 2px; transform: translateX(-50%); font-size: 0.68rem; font-weight: 700; color: var(--muted); letter-spacing: 0.03em; }
.tl-tick::before { content: ""; position: absolute; left: 50%; top: 16px; width: 1px; height: 8px; background: #c3cfda; }
.tl-bar { position: absolute; top: 50%; transform: translateY(-50%); height: 15px; border-radius: 8px; background: linear-gradient(90deg, var(--teal), var(--teal-bright)); box-shadow: 0 2px 6px rgba(13, 138, 158, 0.4); min-width: 15px; }
.tl-dot { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 15px; height: 15px; border-radius: 50%; background: var(--teal); box-shadow: 0 2px 6px rgba(13, 138, 158, 0.4); }
.tl-time { font-size: 0.85rem; color: var(--muted); font-weight: 600; text-align: right; }
@media (max-width: 620px) {
  .tl-row { grid-template-columns: 1fr; gap: 6px; }
  .tl-time { text-align: left; }
  .tl-head { display: none; }
}

/* ---------- Advice callout ---------- */
.advice-callout { border-left: 6px solid var(--unknown); }
.advice-callout.ac-quiet { border-left-color: var(--quiet); background: #f4fbf7; }
.advice-callout.ac-moderate { border-left-color: var(--moderate); background: #fefaf0; }
.advice-callout.ac-busy { border-left-color: var(--busy); background: #fef6ee; }
.advice-callout.ac-packed { border-left-color: var(--packed); background: #fdf3f3; }
.advice-callout h2 { margin-top: 0; }

/* ---------- Calendar heatmap ---------- */
.cal-month { font-size: 1.05rem; margin: 28px 0 10px; color: var(--navy); font-weight: 800; }
.cal-month:first-of-type { margin-top: 14px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; margin: 0 0 6px; }
.cal-cell { aspect-ratio: 1 / 1; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 800; text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: var(--none-bg); min-height: 46px; box-shadow: var(--shadow-sm); transition: transform 0.12s, box-shadow 0.12s; }
a.cal-cell:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cal-cell .dow { font-size: 0.6rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.cal-cell.c-quiet { background: linear-gradient(160deg, #eafaf2, var(--quiet-bg)); border-color: #aedeC6; }
.cal-cell.c-moderate { background: linear-gradient(160deg, #fdf6e0, var(--moderate-bg)); border-color: #eed9a0; }
.cal-cell.c-busy { background: linear-gradient(160deg, #fdf0e2, var(--busy-bg)); border-color: #f3c89e; }
.cal-cell.c-packed { background: linear-gradient(160deg, #fcecec, var(--packed-bg)); border-color: #f0b3b3; }
.cal-cell.c-unknown { background: var(--unknown-bg); border-color: #d4dbe3; }
.cal-cell.c-none { background: var(--none-bg); color: #9aa7b8; cursor: default; box-shadow: none; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.86rem; color: var(--muted); margin: 6px 0 4px; font-weight: 600; }
.cal-legend .swatch { display: inline-block; width: 15px; height: 15px; border-radius: 5px; margin-right: 6px; vertical-align: -2px; }

/* ---------- Port cards ---------- */
.port-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 18px 0; }
@media (min-width: 640px) { .port-grid { grid-template-columns: 1fr 1fr; } }
.port-card { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--ink); display: block; box-shadow: var(--shadow-sm); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.port-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--unknown); }
.port-card.pc-quiet::before { background: linear-gradient(90deg, var(--quiet), #2fd08f); }
.port-card.pc-moderate::before { background: linear-gradient(90deg, var(--moderate), #f0bd45); }
.port-card.pc-busy::before { background: linear-gradient(90deg, var(--busy), #f08c3c); }
.port-card.pc-packed::before { background: linear-gradient(90deg, var(--packed), #ef6b6b); }
.port-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #bcd6e0; }
.port-card h3 { margin: 4px 0 4px; color: var(--navy); font-size: 1.2rem; }
.port-card .country { color: var(--muted); font-size: 0.9rem; margin: 0 0 12px; font-weight: 600; }
.port-card .next { font-size: 0.9rem; color: var(--muted); margin: 10px 0 0; }

/* ---------- Picker ---------- */
.picker-elevated { margin-top: -64px; position: relative; z-index: 5; box-shadow: var(--shadow-lg); border: none; padding: 28px; }
.picker-elevated h2 { font-size: 1.45rem; }
.picker-form { display: grid; gap: 14px; }
.picker-form label { font-weight: 700; font-size: 0.93rem; display: block; margin-bottom: 5px; color: var(--navy); }
.picker-form input, .picker-form select { width: 100%; padding: 13px 14px; font-size: 1rem; font-family: var(--font); border: 1.5px solid #b9c6d3; border-radius: 10px; background: #fff; transition: border-color 0.15s, box-shadow 0.15s; }
.picker-form input:focus, .picker-form select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13, 138, 158, 0.16); }
.btn { display: inline-block; background: linear-gradient(180deg, #12a5bc, var(--teal)); color: #fff; border: none; border-radius: 10px; padding: 14px 28px; font-size: 1.02rem; font-weight: 800; font-family: var(--font); cursor: pointer; text-decoration: none; box-shadow: 0 5px 16px rgba(13, 138, 158, 0.35); transition: transform 0.12s, box-shadow 0.12s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(13, 138, 158, 0.42); color: #fff; }
.picker-results { margin-top: 18px; display: grid; gap: 10px; }
.pick-row { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); transition: border-color 0.12s, transform 0.12s; }
.pick-row:hover { border-color: var(--teal); transform: translateX(2px); }
.pick-row .pick-date { font-weight: 800; min-width: 96px; color: var(--navy); }
.pick-row .pick-port { flex: 1; font-weight: 600; }
.pick-row .pick-port small { display: block; color: var(--muted); font-weight: 500; }
.pick-msg { background: #fff8e6; border: 1px solid #f0dfa8; border-radius: 10px; padding: 13px 17px; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tab-btn { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 20px; font-weight: 700; font-family: var(--font); cursor: pointer; color: var(--muted); font-size: 0.92rem; transition: all 0.15s; }
.tab-btn.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { margin: 0 0 6px; font-size: 1.05rem; }
.faq-item p { margin: 0; color: #33404f; }

/* ---------- Data box ---------- */
.data-box { background: #f0f6f9; border: 1px solid #cfdfe8; border-radius: var(--radius); padding: 20px 22px; margin: 24px 0; font-size: 0.93rem; }
.data-box h2 { font-size: 1.05rem; margin: 0 0 8px; }
.data-box ul { margin: 8px 0 0; padding-left: 20px; }
.data-box li { margin-bottom: 5px; }

/* ---------- Day lists ---------- */
.day-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.day-list li a { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--unknown); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow-sm); transition: transform 0.12s, box-shadow 0.12s; }
.day-list li a:hover { transform: translateX(2px); box-shadow: var(--shadow-md); }
.day-list li.dl-quiet a { border-left-color: var(--quiet); }
.day-list li.dl-moderate a { border-left-color: var(--moderate); }
.day-list li.dl-busy a { border-left-color: var(--busy); }
.day-list li.dl-packed a { border-left-color: var(--packed); }
.day-list .dl-date { font-weight: 800; min-width: 104px; color: var(--navy); }
.day-list .dl-meta { flex: 1; font-size: 0.9rem; color: var(--muted); }

/* ---------- Steps ---------- */
.steps { display: grid; gap: 14px; margin: 14px 0; }
@media (min-width: 640px) { .steps { grid-template-columns: 1fr 1fr 1fr; } }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.step .step-num { display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--teal), var(--teal-dark)); color: #fff; font-weight: 800; width: 32px; height: 32px; border-radius: 50%; margin-bottom: 10px; box-shadow: 0 3px 8px rgba(13, 138, 158, 0.35); }
.step h3 { margin: 0 0 6px; font-size: 1.02rem; }
.step p { margin: 0; font-size: 0.93rem; color: #33404f; }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: 0.88rem; color: var(--muted); margin: 20px 0 0; font-weight: 600; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--teal-dark); }

/* ---------- Prev/next ---------- */
.day-nav { display: flex; justify-content: space-between; gap: 12px; margin: 28px 0; }
.day-nav a, .day-nav > span { flex: 1; }
.day-nav a { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: var(--ink); font-size: 0.93rem; font-weight: 700; box-shadow: var(--shadow-sm); transition: border-color 0.12s, transform 0.12s; display: block; }
.day-nav a:hover { border-color: var(--teal); transform: translateY(-1px); }
.day-nav .next { text-align: right; }
.day-nav small { display: block; color: var(--muted); font-weight: 600; }

/* ---------- Ads ---------- */
.ad-slot { margin: 28px 0; text-align: center; }
.ad-label { display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: #9aa7b8; margin-bottom: 4px; font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { background: linear-gradient(180deg, #0d2a3f 0%, var(--navy) 100%); color: #a9c2d1; margin-top: 56px; padding: 40px 0 28px; font-size: 0.9rem; }
.site-footer a { color: #d7e9ee; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 16px; font-weight: 600; }
.site-footer p { margin: 6px 0; max-width: 720px; }

/* ---------- Misc ---------- */
.badge-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
h1.page-title { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 24px 0 10px; font-weight: 800; }
.two-col { display: grid; gap: 18px; }
@media (min-width: 720px) { .two-col { grid-template-columns: 1fr 1fr; } }
.two-col .card { margin: 0; }
.note { font-size: 0.9rem; color: var(--muted); }
hr.soft { border: none; border-top: 1px solid var(--line); margin: 26px 0; }
