/*
 * TaxiFeed
 * Homepage: lead story, then a card grid. About, advertise, got-a-story,
 * privacy and terms share the same masthead. Header, in-feed and footer ads
 * use the classes written by render_advert().
 *
 * Breakpoints:
 *   under 420px   search field takes its own row
 *   under 540px   pagination stacks
 *   700px         story grid becomes two columns
 *   720px         tagline and updated line share a row
 *   800px         lead story sits beside its picture
 *   1100px        story grid becomes three columns
 *   900px wide and 700px tall   masthead sticks to the top
 * Primary nav collapses to a hamburger when the four links
 * no longer fit on one line (fit-checked in footer.brk).
 */

:root {
    --taxi-yellow: #f5b700;
    --taxi-yellow-deep: #e0a800;
    --taxi-dark: #1a1a1a;
    --taxi-darker: #111111;
    --taxi-grey: #f4f6f8;
    --taxi-border: #e2e8f0;
    --text-main: #22252a;
    --text-muted: #5c6b7a;
    --link: #9a3412;
    --white: #ffffff;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.05);
    --shadow-hover: 0 12px 28px rgba(16, 24, 40, 0.1);
    --ease: 160ms ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--taxi-grey);
    color: var(--text-main);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body.cookie-open {
    padding-bottom: calc(14rem + env(safe-area-inset-bottom));
}

img,
video,
iframe,
svg {
    max-width: 100%;
}

a,
button {
    -webkit-tap-highlight-color: rgba(245, 183, 0, 0.35);
}

::selection {
    background: var(--taxi-yellow);
    color: var(--taxi-dark);
}

:focus-visible {
    outline: 2px solid var(--taxi-dark);
    outline-offset: 3px;
    box-shadow: 0 0 0 5px var(--taxi-yellow);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 0.75rem;
    top: -3.5rem;
    z-index: 2000;
    background: var(--taxi-yellow);
    color: var(--taxi-dark);
    font-weight: 800;
    padding: 0.55rem 0.85rem;
    border-radius: 6px;
    text-decoration: none;
}

.skip-link:focus {
    top: 0.75rem;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ------------------------------------------------------------------
 * Masthead
 * On a phone the block scrolls away so the feed can use the screen.
 * It sticks only on a desktop-sized window that is also tall enough
 * for a landscape phone to keep its content.
 * ------------------------------------------------------------------ */
.site-header {
    background-color: var(--taxi-dark);
    border-bottom: 4px solid var(--taxi-yellow);
    color: var(--white);
    padding: calc(0.9rem + env(safe-area-inset-top)) 0 1rem;
    z-index: 1000;
}

@media (min-width: 900px) and (min-height: 700px) {
    .site-header {
        position: sticky;
        top: 0;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
    }
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.header-top {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
    width: 100%;
    position: relative;
}

.logo {
    color: var(--white);
    font-weight: 800;
    font-size: 1.85rem;
    letter-spacing: -0.03em;
    line-height: 1;
    text-decoration: none;
    display: inline-flex;
    align-items: baseline;
    flex-shrink: 0;
}

.logo span,
.footer-wordmark span {
    color: var(--taxi-yellow);
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(245, 183, 0, 0.45);
    border-radius: 10px;
    background: transparent;
    color: var(--taxi-yellow);
    cursor: pointer;
    order: 2;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
    background: rgba(245, 183, 0, 0.12);
    outline: none;
}

.nav-toggle-bars {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 1.15rem;
    height: 0.85rem;
}

.nav-toggle-bars span {
    display: block;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
}

.header-top.is-nav-collapsed .nav-toggle {
    display: inline-flex;
}

.header-top.is-nav-open .nav-toggle {
    background: var(--taxi-yellow);
    border-color: var(--taxi-yellow);
    color: var(--taxi-dark);
}

.site-nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.15rem 0.25rem;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.site-nav a {
    color: #e8edf2;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    min-height: 44px;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.site-nav a:hover {
    color: var(--taxi-yellow);
}

.site-nav a[aria-current="page"] {
    background: var(--taxi-yellow);
    color: var(--taxi-dark);
}

.site-nav a[aria-current="page"]:hover {
    background: #ffd24a;
    color: var(--taxi-dark);
}

.header-top.is-nav-collapsed .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    left: auto;
    flex: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.2rem;
    min-width: 13.5rem;
    max-width: min(18rem, calc(100vw - 2rem));
    padding: 0.5rem;
    overflow: visible;
    background: var(--taxi-dark);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
    z-index: 1200;
}

.header-top.is-nav-collapsed.is-nav-open .site-nav {
    display: flex;
}

.header-top.is-nav-collapsed .site-nav a {
    border-radius: 8px;
    width: 100%;
}

.header-top.is-measuring .nav-toggle {
    display: none !important;
}

.header-top.is-measuring .site-nav {
    display: flex !important;
    position: static !important;
    flex: 1 !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    visibility: hidden;
    pointer-events: none;
}

.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-dropdown-label {
    color: #e8edf2;
    font-size: 0.92rem;
    font-weight: 700;
    min-height: 44px;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    cursor: default;
    user-select: none;
}

.nav-dropdown:hover .nav-dropdown-label,
.nav-dropdown:focus-within .nav-dropdown-label {
    color: var(--taxi-yellow);
}

.nav-dropdown.is-current .nav-dropdown-label,
.nav-dropdown-label.is-current {
    background: var(--taxi-yellow);
    color: var(--taxi-dark);
}

.nav-dropdown.is-current:hover .nav-dropdown-label,
.nav-dropdown.is-current:focus-within .nav-dropdown-label {
    background: #ffd24a;
    color: var(--taxi-dark);
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 11rem;
    padding: 0.45rem;
    background: var(--taxi-dark);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
    z-index: 1200;
    flex-direction: column;
    gap: 0.15rem;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    display: flex;
}

.nav-dropdown-menu a {
    border-radius: 8px;
    font-size: 0.88rem;
    min-height: 40px;
    white-space: nowrap;
}

.header-titles {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.tagline {
    font-size: 0.9rem;
    color: var(--taxi-yellow);
    overflow-wrap: break-word;
}

.header-updated {
    margin: 0;
    font-size: 0.82rem;
    color: #f7f1dc;
    font-variant-numeric: tabular-nums;
    overflow-wrap: break-word;
}

@media (min-width: 720px) {
    .container {
        padding: 0 1.25rem;
    }

    .header-top {
        gap: 1rem;
    }

    .header-titles {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 0.35rem 0.85rem;
    }
}

/* ------------------------------------------------------------------
 * Search
 * The field must be allowed to shrink. Under 420px it takes a full
 * row so Search and Clear keep a 44px target.
 * ------------------------------------------------------------------ */
.search-form {
    display: flex;
    gap: 0.5rem;
    min-width: 0;
}

.search-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    min-height: 44px;
    padding: 0.6rem 0.85rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    outline: none;
    color: var(--white);
    background-color: #2a2a2a;
    caret-color: var(--taxi-yellow);
}

.search-input::placeholder {
    color: #c5cdd6;
}

.search-input:focus {
    border-color: var(--taxi-yellow);
    background-color: var(--taxi-darker);
}

.search-input:-webkit-autofill {
    -webkit-text-fill-color: #fff;
    box-shadow: 0 0 0 1000px #2a2a2a inset;
}

.search-btn,
.search-reset,
.page-link,
.cookie-btn {
    font-family: inherit;
    min-height: 44px;
}

.search-btn {
    background-color: var(--taxi-yellow);
    color: var(--taxi-dark);
    border: none;
    padding: 0.6rem 1.15rem;
    font-size: 0.95rem;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

.search-btn:hover {
    background-color: #fff;
}

.search-reset {
    background-color: transparent;
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.9rem;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 8px;
    border: 1px solid #5c6570;
    text-decoration: none;
    flex-shrink: 0;
}

.search-reset:hover {
    border-color: var(--taxi-yellow);
    color: var(--taxi-yellow);
}

@media (max-width: 420px) {
    .search-form {
        flex-wrap: wrap;
    }

    .search-input {
        flex: 1 1 100%;
    }

    .search-btn,
    .search-reset {
        flex: 1 1 0;
    }
}

/* ------------------------------------------------------------------
 * Feed
 * The newest story is a lead. Everything after it is a grid:
 * one column on a phone, two from 700px, three from 1100px.
 * ------------------------------------------------------------------ */
.main-content {
    flex: 1;
    padding: 1.35rem 1rem 2.5rem;
}

.feed-heading {
    margin-bottom: 1rem;
}

.feed-heading h1 {
    margin: 0 0 0.85rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--taxi-darker);
}

.feed-heading h1::before {
    content: "";
    display: inline-block;
    width: 0.65rem;
    height: 0.65rem;
    margin-right: 0.45rem;
    background: var(--taxi-yellow);
    vertical-align: -1px;
    border-radius: 2px;
}

.search-feedback {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    box-sizing: border-box;
    min-height: 3.55rem;
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    background: var(--white);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--taxi-border);
    border-left: 3px solid var(--taxi-yellow);
    overflow-wrap: break-word;
}

.search-feedback-text {
    margin: 0;
    min-width: 0;
}

.search-feedback strong {
    color: var(--taxi-darker);
}

.hot-topic-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    box-sizing: border-box;
    min-height: 3.55rem;
    margin: 0 0 0.75rem;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--taxi-border);
    border-left: 3px solid var(--taxi-yellow);
    text-decoration: none;
    overflow-wrap: break-word;
}

.hot-topic-banner-text {
    min-width: 0;
}

a.hot-topic-banner:hover {
    color: var(--taxi-darker);
    border-color: var(--taxi-yellow-deep);
    border-left-color: var(--taxi-yellow);
}

.hot-topic-banner strong {
    color: var(--taxi-darker);
    font-weight: 700;
}

.diesel-banner {
    flex-wrap: wrap;
    gap: 0.65rem 0.75rem;
}

.diesel-banner-link {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1 1 12rem;
    color: inherit;
    text-decoration: none;
}

.diesel-banner-link:hover .hot-topic-banner-text,
.diesel-banner-link:hover strong {
    color: var(--taxi-darker);
}

.diesel-banner-actions {
    display: flex;
    align-items: stretch;
    gap: 0.45rem;
    flex: 1 1 100%;
}

.diesel-banner-actions .search-reset {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    text-align: center;
    white-space: nowrap;
}

@media (min-width: 700px) {
    .diesel-banner-actions {
        flex: 0 0 auto;
        width: auto;
    }

    .diesel-banner-actions .search-reset {
        flex: 0 0 auto;
        width: auto;
        min-width: 7.5rem;
    }
}

.diesel-banner-status {
    width: 100%;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--taxi-darker);
}

.diesel-banner-status[hidden] {
    display: none !important;
}

.diesel-banner-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    margin: 0;
}

.diesel-banner-form[hidden] {
    display: none !important;
}

.diesel-banner-input {
    flex: 1 1 8rem;
    min-height: 36px;
    min-width: 7rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--taxi-border);
    border-radius: 6px;
    font: inherit;
    font-size: 0.9rem;
    color: var(--text-main);
    background: var(--white);
    box-sizing: border-box;
}

.diesel-banner-input:focus {
    outline: 2px solid var(--taxi-yellow);
    outline-offset: 1px;
    border-color: var(--taxi-yellow-deep);
}

.diesel-banner .search-reset {
    cursor: pointer;
    background: var(--white);
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
}

.diesel-banner--editing .diesel-banner-link,
.diesel-banner--editing .diesel-banner-actions {
    display: none;
}

.search-feedback .search-reset,
.hot-topic-banner .search-reset {
    color: var(--taxi-darker);
    border-color: #5c6570;
    min-height: 36px;
    min-width: 4.75rem;
    padding: 0.35rem 0.85rem;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.search-feedback .search-reset:hover,
.hot-topic-banner .search-reset:hover {
    border-color: var(--taxi-yellow-deep, #c49200);
    color: var(--taxi-yellow-dark, #c49200);
}

/* Invisible twin keeps banner height/width stable when Clear is absent. */
.search-reset-spacer {
    visibility: hidden;
    pointer-events: none;
    min-height: 36px;
    min-width: 4.75rem;
    padding: 0.35rem 0.85rem;
    border: 1px solid transparent;
    box-sizing: border-box;
    flex-shrink: 0;
}

.story-lead {
    position: relative;
    display: grid;
    background: var(--white);
    border: 1px solid var(--taxi-border);
    border-top: 3px solid var(--taxi-yellow);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 1.15rem;
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.15rem;
    min-width: 0;
}

.story-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    background: var(--white);
    border: 1px solid var(--taxi-border);
    border-top: 3px solid transparent;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.story-media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #e7ebf0;
    overflow: hidden;
}

.story-thumb {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.story-lead-body,
.story-card-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.story-lead-body {
    justify-content: center;
    padding: 1.2rem 1.15rem 1.35rem;
    gap: 0.55rem;
}

.story-card-body {
    flex: 1;
    padding: 0.9rem 1rem 1.1rem;
    gap: 0.45rem;
}

.story-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.6rem;
}

.story-kicker {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-hot, #e85d04);
}

.story-flag-link {
    position: relative;
    z-index: 2;
    display: inline-flex;
    line-height: 0;
    text-decoration: none;
    flex: 0 0 auto;
    border-radius: 2px;
}

.story-flag-link:hover .story-flag,
.story-flag-link:focus-visible .story-flag {
    box-shadow: 0 0 0 2px var(--taxi-yellow);
}

.story-flag {
    height: calc(0.75rem + 0.24rem);
    width: auto;
    display: block;
    flex: 0 0 auto;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.story-time {
    margin-left: auto;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.story-title {
    font-family: var(--font-serif);
    font-weight: 700;
    overflow-wrap: break-word;
}

.story-lead .story-title {
    font-size: clamp(1.55rem, 2.4vw, 2.15rem);
    line-height: 1.18;
    letter-spacing: -0.02em;
}

.story-card .story-title {
    font-size: 1.2rem;
    line-height: 1.32;
    letter-spacing: -0.015em;
}

.story-title a {
    color: var(--taxi-darker);
    text-decoration: none;
}

.story-title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.story-title a:focus-visible {
    outline: none;
    box-shadow: none;
}

.story-card:focus-within,
.story-lead:focus-within {
    outline: 2px solid var(--taxi-dark);
    outline-offset: 3px;
    box-shadow: 0 0 0 5px var(--taxi-yellow);
}

.story-dek {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: break-word;
}

.story-card .story-dek {
    -webkit-line-clamp: 3;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.story-lead .story-dek {
    -webkit-line-clamp: 4;
    font-size: 1.02rem;
    line-height: 1.5;
    color: var(--text-main);
}

.no-articles {
    text-align: center;
    padding: 2.5rem 1.25rem;
    color: var(--text-muted);
    font-size: 1rem;
    background: var(--white);
    border: 1px solid var(--taxi-border);
    border-radius: 12px;
    overflow-wrap: break-word;
}

.no-articles a {
    color: var(--link);
    font-weight: 700;
}

@media (min-width: 700px) {
    .story-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 800px) {
    .story-lead {
        grid-template-columns: 1.45fr 1fr;
        align-items: stretch;
    }

    .story-lead .story-media {
        aspect-ratio: auto;
        height: 100%;
        min-height: 300px;
    }

    .story-lead-body {
        padding: 1.5rem 1.6rem 1.7rem;
    }

    .story-lead--text {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1100px) {
    .story-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (hover: hover) and (pointer: fine) {
    .story-card:hover {
        transform: translateY(-2px);
        border-top-color: var(--taxi-yellow);
        box-shadow: var(--shadow-hover);
    }

    .story-lead:hover .story-thumb,
    .story-card:hover .story-thumb {
        transform: scale(1.04);
    }
}

/* ------------------------------------------------------------------
 * Advertisements
 * Slots are header, infeed and footer. An empty band is removed.
 * The in-feed unit spans the full grid width. Placement is after a
 * complete story-grid row for the current viewport (see infeed-ad.brk).
 * ------------------------------------------------------------------ */
.ad-band:not(:has(.ad-container)) {
    display: none;
}

.ad-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 1.15rem 0;
    text-align: center;
}

.ad-container::before {
    content: "Advertisement";
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.story-grid > .ad-container {
    grid-column: 1 / -1;
    margin: 0.25rem 0;
}

.advert-direct,
.advert-adsense {
    background: var(--white);
    border: 1px solid var(--taxi-border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.advert-direct {
    padding: 1rem;
}

.advert-adsense {
    padding: 0.75rem;
    min-height: 90px;
    overflow: hidden;
}

.ad-direct-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-main);
    min-width: 0;
    text-align: center;
}

.ad-direct-img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 140px;
    object-fit: contain;
    border-radius: 6px;
}

.ad-direct-title {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--taxi-darker);
    overflow-wrap: break-word;
}

.ad-direct-link:hover .ad-direct-title {
    color: var(--link);
}

.adsense-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
    overflow: hidden;
}

.adsense-wrapper ins,
.adsense-wrapper iframe {
    max-width: 100% !important;
}

@media (min-width: 640px) {
    .ad-direct-link {
        flex-direction: row;
        text-align: left;
    }
}

@media (min-width: 768px) {
    body.cookie-open {
        padding-bottom: calc(8rem + env(safe-area-inset-bottom));
    }
}

/* ------------------------------------------------------------------
 * Pagination
 * One row from 540px. Below that the page count sits above two
 * full-width controls.
 * ------------------------------------------------------------------ */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
}

.pagination-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 auto;
}

.pagination-group:last-child {
    justify-content: flex-end;
}

.page-link {
    background-color: var(--taxi-dark);
    color: var(--white);
    padding: 0.55rem 0.9rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.page-link:hover:not(.disabled) {
    background-color: var(--taxi-yellow);
    color: var(--taxi-dark);
}

.page-link.disabled {
    background-color: #cbd5e0;
    color: #64748b;
}

.page-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
    font-variant-numeric: tabular-nums;
    flex: 0 0 auto;
}

@media (max-width: 540px) {
    .pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .page-info {
        order: -1;
    }

    .pagination-group {
        justify-content: stretch;
    }

    .pagination-group:last-child {
        justify-content: stretch;
    }

    .pagination-group .page-link {
        flex: 1 1 0;
    }
}

/* ------------------------------------------------------------------
 * Content pages
 * The card fills the same column as the homepage feed.
 * ------------------------------------------------------------------ */
.content-page {
    background: var(--white);
    border-radius: 14px;
    border: 1px solid var(--taxi-border);
    border-top: 3px solid var(--taxi-yellow);
    box-shadow: var(--shadow);
    padding: 1.5rem 1.15rem 1.75rem;
    overflow-wrap: break-word;
}

.content-page h1 {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--taxi-darker);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--taxi-yellow);
}

.content-page h2 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    color: var(--taxi-darker);
    margin-top: 1.85rem;
    margin-bottom: 0.7rem;
}

.content-page h3 {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--taxi-darker);
    margin-top: 1.4rem;
    margin-bottom: 0.55rem;
}

.content-page p {
    margin-bottom: 1rem;
    color: var(--text-main);
    line-height: 1.65;
}

.content-page .lead-text {
    font-size: 1.08rem;
    line-height: 1.6;
    color: var(--taxi-darker);
}

.content-page ul {
    list-style: none;
    display: grid;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.content-page li {
    padding: 0.75rem 0.95rem;
    background: var(--taxi-grey);
    border-left: 3px solid var(--taxi-yellow);
    border-radius: 0 8px 8px 0;
    line-height: 1.5;
}

.content-page a {
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.feature-inline-figure {
    margin: 1.1rem auto;
    width: 75%;
    max-width: 75%;
}

.feature-inline-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--taxi-border);
}

.story-video {
    margin: 1.25rem auto 1.5rem;
    width: 75%;
    max-width: 75%;
}

.story-video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--taxi-border);
}

.story-video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.content-page a:hover {
    color: var(--taxi-darker);
}

/* ------------------------------------------------------------------
 * Got a story tip form
 * Light inputs inside the content card; pairs sit side by side from 720px.
 * ------------------------------------------------------------------ */
.story-tip-form {
    margin-top: 1.35rem;
    display: grid;
    gap: 1rem;
}

.story-tip-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.story-tip-row {
    display: grid;
    gap: 1rem;
}

@media (min-width: 720px) {
    .story-tip-row {
        grid-template-columns: 1fr 1fr;
        gap: 1rem 1.15rem;
    }
}

.story-tip-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.story-tip-form label {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--taxi-darker);
    line-height: 1.3;
}

.story-tip-form .req {
    color: #b45309;
}

.story-tip-form .optional {
    font-weight: 500;
    color: var(--text-muted);
}

.story-tip-form input[type="text"],
.story-tip-form input[type="email"],
.story-tip-form input[type="tel"],
.story-tip-form textarea {
    width: 100%;
    min-height: 44px;
    padding: 0.65rem 0.85rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-main);
    background: var(--white);
    border: 1px solid var(--taxi-border);
    border-radius: 8px;
    outline: none;
    transition: border-color var(--ease), box-shadow var(--ease);
}

.story-tip-form textarea {
    min-height: 11rem;
    resize: vertical;
    line-height: 1.55;
}

.story-tip-form input::placeholder,
.story-tip-form textarea::placeholder {
    color: #8a96a3;
}

.story-tip-form input:focus,
.story-tip-form textarea:focus {
    border-color: var(--taxi-yellow-deep);
    box-shadow: 0 0 0 3px rgba(245, 183, 0, 0.28);
}

.story-tip-note {
    margin: 0.15rem 0 0;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.story-tip-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.story-tip-submit {
    min-width: 9.5rem;
}

.story-tip-submit:hover {
    background-color: var(--taxi-yellow-deep);
    color: var(--taxi-dark);
}

.story-form-flash {
    margin: 1rem 0 1.25rem;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--taxi-yellow);
    background: var(--taxi-grey);
    color: var(--taxi-darker);
    line-height: 1.5;
}

.story-form-flash--ok {
    border-left-color: #15803d;
    background: #ecfdf3;
}

.story-form-flash--error {
    border-left-color: #c2410c;
    background: #fff7ed;
}

/* A written story: the large picture, then the headline and body. */
.article-page {
    padding: 0;
    overflow: hidden;
}

.article-page .article-hero {
    border-radius: 11px 11px 0 0;
}

.article-page .article-copy {
    padding: 1.25rem 1.15rem 1.75rem;
}

.article-page h1 {
    margin-top: 0.85rem;
    margin-bottom: 0.7rem;
}

.article-page .lead-text {
    font-family: var(--font-sans);
    font-size: 1.3rem;
    line-height: 1.45;
    font-weight: 500;
    color: var(--taxi-darker);
    margin-top: 0.85rem;
    margin-bottom: 0;
}

.article-page .article-divider {
    border: 0;
    border-top: 3px solid var(--taxi-yellow);
    margin: 1.25rem 0 0;
}

.article-body {
    margin-top: 1.85rem;
}

.article-body p {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    line-height: 1.75;
}

.article-sources {
    margin-top: 2rem;
}

.story-share {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.85rem;
    margin: 2rem 0 0;
    padding: 1rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-family: var(--font-sans);
}

.story-share-label {
    margin: 0;
    flex: 0 0 auto;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.content-page .story-share-list,
.article-page .story-share-list {
    list-style: none;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    width: auto;
}

.content-page .story-share-list li,
.article-page .story-share-list li {
    display: block;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    line-height: 0;
}

.content-page .story-share-btn,
.article-page .story-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: transform 120ms ease, filter 120ms ease;
}

.content-page .story-share-btn:hover,
.content-page .story-share-btn:focus-visible,
.article-page .story-share-btn:hover,
.article-page .story-share-btn:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.06);
    color: #fff;
    text-decoration: none;
}

.content-page .story-share-whatsapp,
.article-page .story-share-whatsapp {
    background: #25d366;
}

.content-page .story-share-facebook,
.article-page .story-share-facebook {
    background: #1877f2;
}

.content-page .story-share-x,
.article-page .story-share-x {
    background: #000;
}

.related-stories {
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    font-family: var(--font-sans);
}

.related-stories.article-sources {
    margin-top: 2rem;
}

.related-stories h2 {
    margin: 0 0 0.75rem;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}

.related-stories-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.related-stories-list li {
    margin: 0 0 0.55rem;
    padding: 0.75rem 0.95rem;
    line-height: 1.45;
}

.related-stories-label {
    display: inline-block;
    margin-left: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.55);
}

.article-body strong,
.article-page h2 strong {
    font-weight: 700;
}

.article-back {
    margin-top: 2rem;
    text-align: left;
    font-family: var(--font-sans);
}

@media (min-width: 720px) {
    .content-page {
        padding: 2rem 2.1rem 2.25rem;
    }

    .article-page {
        padding: 0;
    }

    .article-page .article-copy {
        padding: 1.5rem 2.1rem 2.25rem;
    }
}

/* ------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------ */
.site-footer {
    background-color: var(--taxi-dark);
    color: var(--white);
    border-top: 4px solid var(--taxi-yellow);
    padding: 1.6rem 0 calc(1.6rem + env(safe-area-inset-bottom));
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.footer-wordmark {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.03em;
    color: var(--white);
}

.copyright-text {
    color: var(--taxi-yellow);
    font-size: 0.85rem;
    margin-top: 0.2rem;
    max-width: 100%;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 1.15rem;
    max-width: 100%;
}

.footer-links a {
    color: #d5dbe3;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.footer-links a:hover {
    color: var(--taxi-yellow);
}

.footer-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    background: #25d366;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    min-height: 44px;
    white-space: nowrap;
}

.footer-whatsapp:hover,
.footer-whatsapp:focus-visible {
    background: #1ebe57;
    color: #fff;
}

.footer-whatsapp-icon {
    flex-shrink: 0;
    display: block;
    color: #fff;
}

.footer-whatsapp-item {
    display: flex;
    justify-content: center;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        gap: 1.25rem;
    }

    .footer-brand {
        flex: 0 0 auto;
    }

    .footer-links {
        flex: 1 1 auto;
        justify-content: center;
        min-width: 0;
    }

    .footer-whatsapp-item {
        flex: 0 0 auto;
        justify-content: flex-end;
    }
}

/* ------------------------------------------------------------------
 * Cookie banner
 * ------------------------------------------------------------------ */
.cookie-banner.is-hidden {
    display: none;
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--taxi-dark);
    color: var(--white);
    border-top: 3px solid var(--taxi-yellow);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    padding: 1rem 0 calc(1rem + env(safe-area-inset-bottom));
}

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    align-items: stretch;
    min-width: 0;
}

.cookie-content p {
    font-size: 0.88rem;
    color: #d5dbe3;
    line-height: 1.5;
    margin: 0;
    overflow-wrap: break-word;
}

.cookie-content a {
    color: var(--taxi-yellow);
    font-weight: 700;
}

.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.cookie-btn {
    padding: 0.55rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    border: none;
}

.cookie-btn.accept {
    background-color: var(--taxi-yellow);
    color: var(--taxi-dark);
}

.cookie-btn.accept:hover {
    background-color: var(--taxi-yellow-deep);
}

.cookie-btn.reject {
    background-color: transparent;
    color: #e8edf2;
    border: 1px solid #5c6570;
}

.cookie-btn.reject:hover {
    border-color: var(--white);
    color: var(--white);
}

@media (min-width: 768px) {
    .cookie-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .cookie-content p {
        max-width: 46rem;
    }

    .cookie-actions {
        flex-shrink: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .story-card,
    .story-thumb {
        transition: none;
    }

    .story-card:hover {
        transform: none;
    }

    .story-lead:hover .story-thumb,
    .story-card:hover .story-thumb {
        transform: none;
    }
}

/* Licence fees directory */
#page-title {
    scroll-margin-top: 6.5rem;
}

.fees-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    margin: 1.15rem 0;
}

.fees-search-form .search-input {
    flex: 1 1 14rem;
    min-width: 0;
}

.fees-count {
    margin-bottom: 1rem;
    color: var(--text-muted, #555);
    font-size: 0.95rem;
}

.fees-list {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.fee-card {
    padding: 1rem 1.05rem 1.05rem;
    background: var(--taxi-grey);
    border-left: 3px solid var(--taxi-yellow);
    border-radius: 0 10px 10px 0;
}

.fees-page .fee-card h2 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin: 0 0 0.75rem;
    padding: 0;
    border: 0;
    color: var(--taxi-darker);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.45rem;
}

.airport-iata {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--taxi-darker);
    background: #fff;
    border: 1px solid var(--taxi-border);
    border-radius: 6px;
    padding: 0.15rem 0.4rem;
}

.fee-details {
    display: grid;
    gap: 0.7rem;
    margin: 0 0 0.75rem;
}

.fee-details > div {
    margin: 0;
}

.fee-details dt {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted, #666);
    margin-bottom: 0.2rem;
}

.fee-details dd {
    margin: 0;
    line-height: 1.55;
    color: var(--text-main);
    white-space: pre-wrap;
}

.fee-meta {
    margin: 0 !important;
    font-size: 0.88rem;
    color: var(--text-muted, #666);
    line-height: 1.45;
}

.fees-credit {
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--taxi-border);
    font-size: 0.92rem;
    color: var(--text-muted, #555);
}

.fuel-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1rem 0 0.25rem;
}

.fuel-stats-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted, #666);
    margin-bottom: 0.2rem;
}

.fuel-stats-value {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    color: var(--taxi-darker);
    line-height: 1.2;
}

.content-page .fuel-stats-link {
    color: inherit;
    text-decoration: none;
}

.content-page .fuel-stats-link:hover,
.content-page .fuel-stats-link.is-active {
    color: var(--link, #9a3412);
    text-decoration: none;
}

.fuel-price-details dd {
    font-size: 1.15rem;
    font-weight: 700;
}

.fuel-last-updated {
    margin-top: 0.35rem;
}

.fuel-card-place {
    padding-bottom: 0.75rem !important;
    margin-bottom: 0.85rem !important;
    border-bottom: 1px solid var(--taxi-border);
}

.fuel-maps-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.fuel-maps-link:hover {
    color: var(--taxi-darker);
}

@media (min-width: 700px) {
    .fuel-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 960px) {
    .fuel-stats {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .fee-details {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.9rem 1.1rem;
    }

    .fee-details > div:only-child,
    .fee-details > div:first-child:nth-last-child(2),
    .fee-details > div:first-child:nth-last-child(2) ~ div {
        grid-column: auto;
    }
}

@media print {
    .site-header,
    .site-footer,
    .cookie-banner,
    .ad-container,
    .pagination,
    .search-form,
    .fees-search-form,
    .skip-link {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .story-card,
    .story-lead,
    .content-page {
        box-shadow: none;
        break-inside: avoid;
    }
}
