/* ---------------------------------------------------------------------------
   /ferry — departures by island

   Read standing up, often at a dock, often on a bad connection. So the next
   departure time is the largest thing on each card, and every state is carried
   by a word as well as a colour: "gone" has to survive being glanced at in
   sunlight, and colour alone fails that and anyone colour-blind.
   --------------------------------------------------------------------------- */

.ferry-page { padding-bottom: 2rem; }

.ferry-head h1 { margin-bottom: .25rem; }

.ferry-summary {
    margin: 0 0 1.5rem;
    font-size: 1.0625rem;
    line-height: 1.5;
}

.ferry-eyebrow {
    margin: 0 0 .6rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted, #64748b);
}

/* ── Next departure cards ─────────────────────────────────────────────────── */

.ferry-next { margin-bottom: 1.5rem; }

.ferry-next-cards {
    margin: 0;
    padding: 0 0 .25rem;
    list-style: none;
    display: flex;
    gap: .75rem;
    /* Scrolls inside its own box; the page body never scrolls sideways. */
    overflow-x: auto;
    scroll-snap-type: x proximity;
}

.ferry-next-card {
    flex: 0 0 13rem;
    scroll-snap-align: start;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: .625rem;
    background: var(--surface, #fff);
}

.ferry-next-card--done { opacity: .62; }

.ferry-next-link {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: .8rem .9rem;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.ferry-next-link:hover,
.ferry-next-link:focus-visible { background: var(--surface-2, #f8fafc); }

.ferry-next-island {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted, #64748b);
}

.ferry-next-time {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.ferry-next-time--none { color: var(--muted, #94a3b8); }

.ferry-next-meta {
    font-size: .8125rem;
    line-height: 1.35;
    color: var(--muted, #475569);
}

.ferry-next-countdown {
    margin-top: .1rem;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--accent, #0f766e);
}

/* ── Filters ──────────────────────────────────────────────────────────────── */

.ferry-filters { margin: 0 0 1.5rem; }

.ferry-chips {
    margin: 0 0 .5rem;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.ferry-chip {
    display: inline-block;
    padding: .35rem .75rem;
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 999px;
    background: var(--surface, #fff);
    color: inherit;
    font-size: .875rem;
    text-decoration: none;
}

.ferry-chip:hover { border-color: var(--accent, #0f766e); }

.ferry-chip.is-on {
    background: var(--accent, #0f766e);
    border-color: var(--accent, #0f766e);
    color: #fff;
}

/* ── Timetable ────────────────────────────────────────────────────────────── */

.ferry-port { margin-bottom: 1.5rem; }

.ferry-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9375rem;
    display: block;
    overflow-x: auto;
}

.ferry-table th,
.ferry-table td {
    padding: .5rem .6rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border, #e2e8f0);
    white-space: nowrap;
}

.ferry-table thead th {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted, #64748b);
}

.ferry-table tbody th { font-variant-numeric: tabular-nums; font-weight: 700; }

/* Departed sailings stay on the page — proof of the schedule for somebody who
   just missed one — but recede so the eye lands on what is still to come. */
.ferry-row--gone { opacity: .45; }

.ferry-duration,
.ferry-vessel,
.ferry-status-note {
    display: block;
    font-size: .8125rem;
    font-weight: 400;
    color: var(--muted, #64748b);
    white-space: normal;
}

.ferry-badge {
    display: inline-block;
    padding: .1rem .45rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
}

.ferry-badge--soon  { background: #e8f5e0; color: #3d6b1e; }
.ferry-badge--gone  { background: var(--surface-2, #f1f5f9); color: var(--muted, #64748b); }
.ferry-badge--alert { background: #fbe3ea; color: #7d1c39; text-transform: capitalize; }

.ferry-note,
.ferry-empty-day,
.ferry-more {
    font-size: .8125rem;
    line-height: 1.55;
    color: var(--muted, #64748b);
}

.ferry-more a { color: var(--link, #0369a1); }

@media (max-width: 480px) {
    .ferry-next-card { flex-basis: 11rem; }
    .ferry-next-time { font-size: 1.4rem; }
}

/* ── Sea state ────────────────────────────────────────────────────────────── */

.ferry-sea {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .6rem;
    align-items: baseline;
    margin: 0 0 1.25rem;
    padding: .6rem .8rem;
    border-left: 4px solid #609D31;
    border-radius: .375rem;
    background: #f0fdf4;
    font-size: .875rem;
}

.ferry-sea--amber { border-left-color: #F07A35; background: #fffbeb; }
.ferry-sea--red   { border-left-color: #B32952; background: #fbe3ea; }

.ferry-sea span { color: var(--muted, #475569); }
