/*
 * Pakistan Live Train Tracker — Design System
 */

:root {
    --brand-primary: #c00e2d;
    --brand-primary-hover: #a00c25;
    --brand-gradient-end: #e31e24;
    --surface: #ffffff;
    --surface-muted: #f1f5f9;
    --surface-page: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --status-on-time: #16a34a;
    --status-delayed: #d97706;
    --status-offline: #94a3b8;
    --status-freight: #3b82f6;
    --radius-card: 1rem;
    --radius-lg: 1.25rem;
    --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-card-hover: 0 8px 24px rgba(15, 23, 42, 0.06);
    --header-height: 4rem;
    --bottom-nav-height: 3.75rem;
    --touch-min: 2.75rem;

    /* Breakpoints (Tailwind-aligned: sm/md/lg/xl) */
    --bp-sm: 36rem;
    --bp-md: 48rem;
    --bp-lg: 62rem;
    --bp-xl: 75rem;

    /* Fluid type */
    --text-fluid-hero: clamp(1.5rem, 1.15rem + 1.75vw, 2.25rem);
    --text-fluid-title: clamp(1.375rem, 1.2rem + 0.9vw, 1.875rem);

    /* Legacy aliases */
    --metro-red: var(--brand-primary);
    --metro-green: var(--status-on-time);
    --metro-blue: var(--status-freight);
    --metro-orange: #f97316;
    --metro-dark: #1e293b;
    --metro-light: var(--surface-page);
}

/* Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--surface-page);
    min-height: 100vh;
}

@media (prefers-reduced-motion: no-preference) {
    body {
        animation: pageFadeIn 0.35s ease forwards;
        opacity: 0;
    }
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    body {
        animation: none;
        opacity: 1;
    }

    .live-pulse-dot::after,
    .animate-ping,
    .animate-pulse {
        animation: none !important;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--surface-muted);
}

::-webkit-scrollbar-thumb {
    background: var(--brand-primary);
    border-radius: 4px;
}

/* Layout */
.app-main {
    flex: 1;
    width: 100%;
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
    padding: 1.5rem 1rem 5.5rem;
}

@media (min-width: 640px) {
    .app-main {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        padding-bottom: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .app-main {
        padding: 2.5rem 2rem 3rem;
    }
}

.app-main--flush-bottom {
    padding-bottom: 5.5rem;
}

@media (min-width: 1024px) {
    .app-main--flush-bottom {
        padding-bottom: 3rem;
    }
}

/* Safe areas (notched phones, bottom nav) */
.safe-area-pb {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Page sections */
.page-section-header h1,
.page-section-header .page-title {
    font-size: var(--text-fluid-title);
}

.page-hero h1 {
    font-size: var(--text-fluid-hero);
}

/* Horizontal scroll filter tabs (home) */
.filter-tabs-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    padding-bottom: 0.25rem;
    margin-inline: -0.25rem;
    padding-inline: 0.25rem;
    scrollbar-width: none;
}

.filter-tabs-scroll::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Schedule cards */
.schedule-card__layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.schedule-card__times {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    width: 100%;
    padding: 0.875rem 1rem;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 0.75rem;
}

@media (min-width: 768px) {
    .schedule-card__times {
        flex: 1;
        max-width: 28rem;
    }
}

.schedule-card__time-block {
    min-width: 0;
    flex: 1;
}

.schedule-card__time-block--end {
    text-align: right;
}

.schedule-card__cta {
    width: 100%;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .schedule-card__cta {
        width: auto;
    }
}

/* Responsive data tables */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.data-table {
    min-width: 16rem;
}

.data-table th,
.data-table td {
    white-space: nowrap;
}

.data-table td:first-child {
    white-space: normal;
    min-width: 5rem;
    max-width: 12rem;
}

@media (max-width: 479px) {
    .data-table--stack-sm tbody tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.25rem 0.75rem;
        padding: 0.75rem 0;
    }

    .data-table--stack-sm thead {
        display: none;
    }

    .data-table--stack-sm td {
        display: block;
        padding: 0.125rem 0.75rem;
        text-align: left !important;
        white-space: normal;
        max-width: none;
    }

    .data-table--stack-sm td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.625rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #64748b;
        margin-bottom: 0.125rem;
    }

    .data-table--stack-sm td:first-child {
        grid-column: 1 / -1;
        font-weight: 600;
        padding-top: 0.5rem;
    }
}

/* Cards */
.train-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    color: inherit;
}

a.train-card:hover {
    border-color: #86efac;
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-1px);
}

.train-card--delayed:hover {
    border-color: #fcd34d;
}

.train-card--offline {
    opacity: 0.75;
    background: #f8fafc;
    cursor: default;
}

@media (max-width: 479px) {
    a.train-card:not(.train-card--board),
    .train-card[data-status] {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 0.875rem 1rem;
    }

    a.train-card > :last-child,
    .train-card:has([data-status]) > :last-child {
        align-self: flex-end;
    }
}

.interactive-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.interactive-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    white-space: nowrap;
}

.status-badge--on-time {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.status-badge--delayed {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.status-badge--offline {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.status-badge--arrived {
    background: #e0e7ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    flex-shrink: 0;
}

.live-pulse-dot {
    position: relative;
}

.live-pulse-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 9999px;
    background: inherit;
    opacity: 0.5;
    animation: ping-expand 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping-expand {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Stat pills */
.stat-pill {
    cursor: pointer;
    background: var(--surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 1rem;
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    user-select: none;
    min-height: var(--touch-min);
}

.stat-pill:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-1px);
}

.stat-pill--active-running {
    border-color: var(--status-on-time);
    background: #f0fdf4;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15);
}

.stat-pill--active-stopped {
    border-color: var(--status-offline);
    background: #f8fafc;
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.2);
}

.stat-pill--active-online {
    border-color: var(--status-on-time);
    background: #f0fdf4;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15);
}

.stat-pill--active-offline {
    border-color: var(--status-offline);
    background: #f8fafc;
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.2);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: var(--touch-min);
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    background: var(--brand-primary);
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--brand-primary-hover);
}

.btn-primary:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* Contact form */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

.form-field,
.contact-form input.form-field,
.contact-form select.form-field,
.contact-form textarea.form-field {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    min-height: var(--touch-min);
    padding: 0.625rem 0.875rem;
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #0f172a;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field:focus,
.contact-form .form-field:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(192, 14, 45, 0.12);
}

.contact-form input.form-field:-webkit-autofill,
.contact-form input.form-field:-webkit-autofill:hover,
.contact-form input.form-field:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: #0f172a;
    border: 1px solid #e2e8f0;
    caret-color: #0f172a;
    transition: background-color 9999s ease-out 0s;
}

.contact-form input.form-field:-webkit-autofill:focus {
    border-color: var(--brand-primary);
    -webkit-box-shadow: 0 0 0 1000px #fff inset, 0 0 0 3px rgba(192, 14, 45, 0.12);
}

.form-field--textarea,
.contact-form textarea.form-field {
    min-height: 8rem;
    resize: vertical;
}

.form-error {
    font-size: 0.75rem;
    color: #b91c1c;
    margin: 0;
}

select.form-field,
.contact-form select.form-field {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.125rem;
    padding-right: 2.5rem;
}

.contact-form .form-field:invalid:not(:placeholder-shown) {
    border-color: #fca5a5;
}

.form-field[aria-invalid="true"],
.form-group--error .form-field,
.contact-form .form-group--error .form-field {
    border-color: #f87171;
    background-color: #fef2f2;
}

.form-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.form-label__icon {
    font-size: 1.125rem;
    color: #94a3b8;
}

.form-hint {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0.5rem 0 0;
}

/* Contact page */
.contact-page {
    width: 100%;
    max-width: 56rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .contact-page {
        gap: 2rem;
    }
}

.contact-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 55%, #1a1f2e 100%);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    position: relative;
}

.contact-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: radial-gradient(ellipse at top right, rgba(192, 14, 45, 0.15), transparent 70%);
    pointer-events: none;
}

.contact-hero__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 1.75rem 1.25rem;
}

@media (min-width: 640px) {
    .contact-hero__inner {
        flex-direction: row;
        text-align: left;
        align-items: center;
        gap: 1.25rem;
        padding: 2rem 1.75rem;
    }
}

.contact-hero__icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.contact-hero__icon .material-symbols-outlined {
    font-size: 1.75rem;
}

.contact-hero__eyebrow {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 0 0 0.25rem;
}

.contact-hero__title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 0;
}

@media (min-width: 640px) {
    .contact-hero__title {
        font-size: 1.75rem;
    }
}

.contact-hero__subtitle {
    font-size: 0.875rem;
    line-height: 1.55;
    color: #cbd5e1;
    margin: 0.5rem 0 0;
    max-width: 28rem;
}

.contact-page__alerts {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: start;
}

@media (min-width: 992px) {
    .contact-layout {
        grid-template-columns: minmax(0, 17.5rem) minmax(0, 1fr);
        gap: 1.75rem;
    }
}

.contact-aside__heading {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin: 0 0 0.75rem;
}

.contact-aside__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.625rem;
}

@media (min-width: 640px) and (max-width: 991px) {
    .contact-aside__list {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .contact-aside__heading {
        grid-column: 1 / -1;
    }
}

.contact-info-card {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.contact-info-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.contact-info-card__icon-wrap {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: #fef2f2;
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-info-card__icon-wrap .material-symbols-outlined {
    font-size: 1.125rem;
}

.contact-info-card__title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 0.125rem;
    line-height: 1.3;
}

.contact-info-card__text {
    font-size: 0.75rem;
    line-height: 1.45;
    color: #64748b;
    margin: 0;
}

.contact-form-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 8px 32px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.contact-form-panel__head {
    padding: 1.25rem 1.25rem 0;
    border-bottom: none;
}

@media (min-width: 640px) {
    .contact-form-panel__head {
        padding: 1.5rem 1.75rem 0;
    }
}

.contact-form-panel__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.01em;
}

.contact-form-panel__desc {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0.375rem 0 0;
    line-height: 1.5;
}

.contact-form {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
}

@media (min-width: 640px) {
    .contact-form {
        padding: 1.5rem 1.75rem 1.75rem;
        gap: 1.25rem;
    }
}

.contact-form__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.125rem;
}

.contact-form__grid .form-group {
    min-width: 0;
}

@media (min-width: 576px) {
    .contact-form__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-form__footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 0.25rem;
    margin-top: 0.25rem;
    border-top: 1px solid #f1f5f9;
}

@media (min-width: 640px) {
    .contact-form__footer {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding-top: 1rem;
    }
}

.contact-submit {
    width: 100%;
    min-width: 10rem;
}

@media (min-width: 640px) {
    .contact-submit {
        width: auto;
    }
}

.contact-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.contact-submit__icon--spin {
    animation: contact-spin 0.9s linear infinite;
}

.recaptcha-legal {
    font-size: 0.6875rem;
    line-height: 1.5;
    color: #94a3b8;
    margin: 0;
    flex: 1;
    min-width: 12rem;
}

.recaptcha-legal a {
    color: #64748b;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.recaptcha-legal a:hover {
    color: var(--brand-primary);
}

.contact-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.125rem;
    border-radius: 0.75rem;
    border: 1px solid;
}

.contact-alert__icon {
    font-size: 1.375rem;
    flex-shrink: 0;
}

.contact-alert__title {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.125rem;
}

.contact-alert__text {
    font-size: 0.8125rem;
    line-height: 1.5;
    margin: 0;
}

.contact-alert--success {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.contact-alert--success .contact-alert__icon {
    color: #16a34a;
}

.contact-alert--success .contact-alert__title {
    color: #14532d;
}

.contact-alert--success .contact-alert__text {
    color: #166534;
}

.contact-alert--error {
    background: #fef2f2;
    border-color: #fecaca;
}

.contact-alert--error .contact-alert__icon {
    color: #dc2626;
}

.contact-alert--error .contact-alert__text {
    color: #991b1b;
    font-weight: 500;
}

.form-group--error .form-label {
    color: #b91c1c;
}

@keyframes contact-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: var(--touch-min);
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.btn-ghost:hover {
    background: var(--surface-muted);
    border-color: #cbd5e1;
}

.btn-ghost:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* Map */
.map-panel {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #0f172a;
}

#live-map {
    width: 100%;
    height: min(50vh, 280px);
    min-height: 220px;
}

@media (min-width: 640px) {
    #live-map {
        height: 340px;
        min-height: 340px;
    }
}

@media (min-width: 1024px) {
    #live-map {
        height: 420px;
        min-height: 420px;
    }
}

.map-marker {
    background: var(--brand-primary);
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    box-shadow: 0 0 12px rgba(192, 14, 45, 0.5);
}

.map-marker.freight {
    background: var(--status-freight);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

.map-marker.stopped {
    background: var(--status-offline);
    animation: none;
}

.map-marker.pulse {
    animation: pulse-marker 2s infinite;
}

@keyframes pulse-marker {
    0% { box-shadow: 0 0 0 0 rgba(192, 14, 45, 0.6); }
    70% { box-shadow: 0 0 0 8px rgba(192, 14, 45, 0); }
    100% { box-shadow: 0 0 0 0 rgba(192, 14, 45, 0); }
}

/* Site footer — metro-status.com inspired */
.site-footer {
    margin-top: auto;
    position: relative;
    overflow: hidden;
    color: #e2e8f0;
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    border-top: 4px solid var(--brand-primary);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
}

.site-footer-glow {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.site-footer-glow-orb {
    position: absolute;
    border-radius: 9999px;
    filter: blur(48px);
}

.site-footer-glow-orb--brand {
    bottom: -5rem;
    left: -5rem;
    width: 16rem;
    height: 16rem;
    background: rgba(192, 14, 45, 0.08);
}

.site-footer-glow-orb--green {
    top: -2.5rem;
    right: -2.5rem;
    width: 10rem;
    height: 10rem;
    background: rgba(22, 163, 74, 0.08);
}

.site-footer-glow-orb--gold {
    top: 50%;
    left: 25%;
    width: 8rem;
    height: 8rem;
    background: rgba(250, 204, 21, 0.06);
    filter: blur(32px);
}

.site-footer-inner {
    padding: 3rem 1rem 1.5rem;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 1024px) {
    .site-footer-inner {
        padding: 4rem 2rem 2rem;
    }
}

@media (max-width: 1023px) {
    .site-footer-inner {
        padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
    }
}

.site-footer-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

@media (min-width: 768px) {
    .site-footer-main {
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
        gap: 3rem;
        align-items: start;
    }
}

.site-footer-links {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 2rem;
}

@media (min-width: 520px) {
    .site-footer-links {
        grid-template-columns: repeat(3, auto);
        gap: 2.5rem 3rem;
        justify-items: end;
        justify-content: end;
    }
}

.site-footer-nav-wrap {
    min-width: 0;
    width: 100%;
}

@media (min-width: 520px) {
    .site-footer-nav-wrap--explore,
    .site-footer-nav-wrap--legal,
    .site-footer-nav-wrap--help {
        justify-self: end;
        min-width: 8.5rem;
    }

    .site-footer-nav-wrap--explore {
        max-width: 11rem;
    }
}

.site-footer-nav-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 2rem;
    align-items: start;
}

.site-footer-tagline {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #94a3b8;
    max-width: 22rem;
    margin: 0;
}

.site-footer-nav-heading {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin: 0 0 0.75rem;
    line-height: 1.2;
}

.site-footer-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer-nav--col {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.site-footer-nav--help {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.site-footer-nav li {
    min-width: 0;
}

.site-footer-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.375rem 0;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.35;
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.15s ease;
    min-height: 2.25rem;
}

.site-footer-link:hover {
    color: #fff;
}

.site-footer-link-icon {
    width: 1.125rem;
    flex-shrink: 0;
    font-size: 1.125rem;
    color: #64748b;
    transition: color 0.15s ease;
}

.site-footer-link:hover .site-footer-link-icon {
    color: var(--brand-primary);
}

.site-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    margin-bottom: 0.75rem;
}

.site-footer-logo:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
    border-radius: 0.5rem;
}

.site-footer-logo-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
}

.site-footer-logo:hover .site-footer-logo-icon {
    transform: scale(1.04);
}

.site-footer-logo-title {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
}

.site-footer-logo-sub {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.125rem;
}

.site-footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

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

@media (min-width: 1024px) {
    .site-footer-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

.site-footer-card {
    background: rgba(255, 255, 255, 0.03);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .site-footer-card:hover {
        transform: translateY(-4px);
        background: rgba(255, 255, 255, 0.05);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    }
}

.site-footer-card-heading {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #fdba74;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(253, 186, 116, 0.25);
}

.site-footer-card-text {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #cbd5e1;
}

.site-footer-card-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.site-footer-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #e2e8f0;
    text-decoration: none;
    transition: color 0.15s ease;
}

.site-footer-card-link:hover {
    color: #fdba74;
}

.site-footer-card-arrow {
    color: #fdba74;
    font-weight: 700;
}

.site-footer-card-emoji {
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
}

.site-footer-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    background: var(--brand-primary);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
}

.site-footer-cta:hover {
    background: var(--brand-primary-hover);
}

.site-footer-cta-icon {
    font-size: 1.125rem;
}

.site-footer-disclaimer {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin: 1.5rem 0;
    padding: 1rem 1.125rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: #94a3b8;
}

.site-footer-disclaimer p {
    margin: 0;
}

.site-footer-disclaimer-icon {
    font-size: 1.125rem;
    color: #64748b;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.site-footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding-top: 0;
    border-top: none;
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
}

.site-footer-copy {
    margin: 0;
    width: 100%;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: #e2e8f0;
    letter-spacing: normal;
    line-height: 1.6;
}

.site-footer-copy-highlight {
    color: #fbbf24;
    font-weight: 700;
}

.site-footer-copy-sep {
    margin: 0 0.5rem;
    color: #94a3b8;
    font-weight: 400;
}

.site-footer-meta {
    margin: 0;
    width: 100%;
    text-align: center;
}

.site-footer-meta-link {
    color: #cbd5e1;
    font-weight: 500;
    text-decoration: none;
    margin-left: 0.25rem;
}

.site-footer-meta-link:hover {
    color: #fff;
    text-decoration: underline;
}

.site-footer-copy-heart {
    font-weight: 500;
}

.site-footer-pakistan {
    font-weight: 800;
    background: linear-gradient(90deg, #22c55e, #ffffff, #22c55e);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

@media (prefers-reduced-motion: no-preference) {
    .site-footer-pakistan {
        animation: footer-pakistan-flow 2.5s linear infinite;
    }
}

@keyframes footer-pakistan-flow {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.site-footer-meta-note {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    color: #64748b;
}

.site-footer-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.8125rem;
    color: #94a3b8;
    font-weight: 500;
}

.site-footer-status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

@media (prefers-reduced-motion: no-preference) {
    .site-footer-status-dot {
        animation: footer-status-pulse 2s ease-in-out infinite;
    }
}

@keyframes footer-status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Journey stops timeline */
#milestone-container::-webkit-scrollbar {
    height: 6px;
}

#milestone-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.journey-segment-line {
    background: #e2e8f0;
}

.journey-segment--done .journey-segment-line {
    background: linear-gradient(90deg, #16a34a, #22c55e);
}

.journey-segment--active .journey-segment-line {
    background: linear-gradient(90deg, var(--brand-primary), #f59e0b);
    box-shadow: 0 0 8px rgba(192, 14, 45, 0.25);
}

.journey-segment-arrow {
    animation: journey-arrow-pulse 1.2s ease-in-out infinite;
}

@keyframes journey-arrow-pulse {
    0%, 100% { transform: translateX(-50%) translateX(0); opacity: 1; }
    50% { transform: translateX(-50%) translateX(4px); opacity: 0.85; }
}

.journey-arrow-icon {
    animation: journey-arrow-pulse 1.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .journey-segment-arrow,
    .journey-arrow-icon {
        animation: none;
    }
}

.milestone-node--current .milestone-title {
    color: var(--brand-primary);
}

.milestone-node--next .milestone-title {
    color: #b45309;
}

/* Live status panel (train detail) */
.live-status-panel {
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    border-width: 2px;
    border-style: solid;
}

.live-status-panel--on-time {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #ffffff 100%);
    border-color: #86efac;
    box-shadow: 0 4px 20px rgba(22, 163, 74, 0.12);
}

.live-status-panel--in-transit {
    background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 50%, #ffffff 100%);
    border-color: #4ade80;
    box-shadow: 0 4px 20px rgba(22, 163, 74, 0.12);
}

.live-status-panel--delayed {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #ffffff 100%);
    border-color: #fcd34d;
    box-shadow: 0 4px 20px rgba(217, 119, 6, 0.15);
}

.live-status-panel--cancelled {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 50%, #ffffff 100%);
    border-color: #fca5a5;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.12);
}

.live-status-panel--arrived {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 50%, #ffffff 100%);
    border-color: #a5b4fc;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.1);
}

.live-status-panel--loading {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #ffffff 100%);
    border-color: #cbd5e1;
    box-shadow: 0 4px 16px rgba(100, 116, 139, 0.1);
}

.live-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.live-status-panel--on-time .live-status-badge,
.live-status-panel--in-transit .live-status-badge {
    background: #16a34a;
    color: #fff;
}

.live-status-panel--delayed .live-status-badge {
    background: #d97706;
    color: #fff;
}

.live-status-panel--cancelled .live-status-badge {
    background: #dc2626;
    color: #fff;
}

.live-status-panel--arrived .live-status-badge {
    background: #4f46e5;
    color: #fff;
}

.live-status-panel--loading .live-status-badge {
    background: #64748b;
    color: #fff;
}

.live-location-current {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.35;
}

.live-location-next {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.live-status-panel--on-time .live-location-current,
.live-status-panel--in-transit .live-location-current { color: #15803d; }
.live-status-panel--delayed .live-location-current { color: #b45309; }
.live-status-panel--cancelled .live-location-current { color: #b91c1c; }
.live-status-panel--arrived .live-location-current { color: #4338ca; }
.live-status-panel--loading .live-location-current { color: #475569; }

.live-status-panel--on-time .live-location-next,
.live-status-panel--in-transit .live-location-next { color: #166534; }
.live-status-panel--delayed .live-location-next { color: #92400e; }
.live-status-panel--cancelled .live-location-next { color: #991b1b; }
.live-status-panel--arrived .live-location-next { color: #3730a3; }

.metric-card--status-on-time { background: #f0fdf4; border-color: #bbf7d0; }
.metric-card--status-in-transit { background: #f0fdf4; border-color: #bbf7d0; }
.metric-card--status-delayed { background: #fffbeb; border-color: #fde68a; }
.metric-card--status-cancelled { background: #fef2f2; border-color: #fecaca; }
.metric-card--status-arrived { background: #eef2ff; border-color: #c7d2fe; }
.metric-card--status-loading { background: #f8fafc; border-color: #e2e8f0; }

.metric-status-value--on-time,
.metric-status-value--in-transit { color: #15803d; }
.metric-status-value--delayed { color: #b45309; }
.metric-status-value--cancelled { color: #dc2626; }
.metric-status-value--arrived { color: #4338ca; }
.metric-status-value--loading { color: #64748b; }

.live-panel-icon-box {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.1);
    border: 2px solid #e2e8f0;
}

.live-status-panel--on-time .live-panel-icon-box { border-color: #86efac; }
.live-status-panel--in-transit .live-panel-icon-box { border-color: #86efac; }
.live-status-panel--delayed .live-panel-icon-box { border-color: #fcd34d; }
.live-status-panel--cancelled .live-panel-icon-box { border-color: #fca5a5; }
.live-status-panel--arrived .live-panel-icon-box { border-color: #a5b4fc; }
.live-status-panel--loading .live-panel-icon-box { border-color: #cbd5e1; }

.live-status-panel--on-time .live-panel-icon { color: #16a34a; }
.live-status-panel--in-transit .live-panel-icon { color: #16a34a; }
.live-status-panel--delayed .live-panel-icon { color: #d97706; }
.live-status-panel--cancelled .live-panel-icon { color: #dc2626; }
.live-status-panel--arrived .live-panel-icon { color: #4f46e5; }
.live-status-panel--loading .live-panel-icon { color: #64748b; }

.live-status-panel--on-time .live-panel-dot { background-color: #16a34a; }
.live-status-panel--in-transit .live-panel-dot { background-color: #16a34a; }
.live-status-panel--delayed .live-panel-dot { background-color: #d97706; }
.live-status-panel--cancelled .live-panel-dot { background-color: #dc2626; }
.live-status-panel--arrived .live-panel-dot { background-color: #4f46e5; }
.live-status-panel--loading .live-panel-dot { background-color: #64748b; }

/* Focus */
:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* Page hero */
.page-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
    border-radius: 1rem;
    padding: 1.5rem 1.25rem;
    border: 1px solid #334155;
}

@media (min-width: 640px) {
    .page-hero {
        border-radius: 1.25rem;
        padding: 2rem 1.5rem;
    }
}

@media (min-width: 768px) {
    .page-hero {
        padding: 2.5rem 2rem;
    }
}

/* Live status panel — tighter on small screens */
@media (max-width: 639px) {
    .live-status-panel {
        padding: 1rem 1.125rem;
    }

    .live-location-current {
        font-size: 1rem;
    }
}

/* Milestone timeline — touch-friendly scroll hint */
#milestone-container {
    scroll-padding-inline: 1rem;
}

/* Freight / alert filter chips — wrap with touch targets */
.nav-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Utility: prevent child overflow in flex/grid */
.min-w-0 {
    min-width: 0;
}

/* FAQ page */
.faq-page {
    width: 100%;
    max-width: 48rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .faq-page {
        gap: 2rem;
    }
}

.faq-intro.card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem 1.25rem 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.faq-intro__text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #334155;
    margin: 0;
}

.faq-intro__text a {
    color: var(--brand, #c00e2d);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.faq-intro__text a:hover {
    color: #9a0b24;
}

.faq-intro__note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 1rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #64748b;
}

.faq-intro__note-icon {
    font-size: 1.125rem;
    color: #94a3b8;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.faq-section__title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.75rem;
    letter-spacing: -0.01em;
}

.faq-section__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.faq-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.faq-item[open] {
    border-color: rgba(192, 14, 45, 0.25);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.faq-item__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.125rem;
    cursor: pointer;
    list-style: none;
    min-height: 3rem;
}

.faq-item__summary::-webkit-details-marker {
    display: none;
}

.faq-item__summary::marker {
    content: '';
}

.faq-item__summary:focus-visible {
    outline: 2px solid var(--brand, #c00e2d);
    outline-offset: -2px;
}

.faq-item__question {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
    text-align: left;
}

.faq-item__chevron {
    font-size: 1.375rem;
    color: #94a3b8;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.faq-item[open] .faq-item__chevron {
    transform: rotate(180deg);
    color: var(--brand, #c00e2d);
}

.faq-item__answer {
    padding: 0 1.125rem 1.125rem;
    border-top: 1px solid #f1f5f9;
}

.faq-item__answer p {
    margin: 0.875rem 0 0;
    font-size: 0.875rem;
    line-height: 1.65;
    color: #475569;
}

.faq-cta.card {
    background: linear-gradient(135deg, #fef2f2 0%, #fff 50%);
    border: 1px solid #fecdd3;
    border-radius: 1rem;
    padding: 1.5rem 1.25rem;
}

.faq-cta__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.5rem;
}

.faq-cta__text {
    font-size: 0.875rem;
    line-height: 1.55;
    color: #64748b;
    margin: 0 0 1.25rem;
}

.faq-cta__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 480px) {
    .faq-cta__actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
}

.faq-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

@media (min-width: 480px) {
    .faq-cta__btn {
        width: auto;
    }
}

.faq-cta__link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand, #c00e2d);
    text-decoration: none;
    min-height: 44px;
    padding: 0 0.25rem;
}

.faq-cta__link:hover {
    text-decoration: underline;
}

.faq-cta__link .material-symbols-outlined {
    font-size: 1.125rem;
}

/* Legal pages (Privacy, DMCA) */
.legal-page {
    width: 100%;
    max-width: 48rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-bottom: 0.5rem;
}

.legal-page__updated {
    margin: -0.5rem 0 0;
    font-size: 0.8125rem;
    color: #64748b;
    text-align: center;
}

.legal-callout {
    border-radius: 0.5rem;
    padding: 0.875rem 1.125rem;
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.65;
}

.legal-callout p {
    margin: 0;
}

.legal-callout--highlight {
    background: #eff6ff;
    border-left: 4px solid #1a56db;
    color: #1e429f;
}

.legal-callout--warning {
    background: #fff7ed;
    border-left: 4px solid #f97316;
    color: #9a3412;
    margin-top: 0.75rem;
}

.legal-callout--step {
    background: #f0fdf4;
    border-left: 4px solid #16a34a;
    color: #14532d;
    margin-top: 0.75rem;
}

.legal-callout--step a {
    color: #15803d;
    font-weight: 600;
}

.legal-callout a {
    color: #1a56db;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-section__title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.75rem;
}

.legal-section__body.card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.legal-section__p {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #334155;
    margin: 0 0 0.875rem;
}

.legal-section__p:last-child {
    margin-bottom: 0;
}

.legal-section__list {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #334155;
}

.legal-section__list li + li {
    margin-top: 0.5rem;
}

.legal-section__olist {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #334155;
}

.legal-section__olist li + li {
    margin-top: 0.5rem;
}

.legal-section__p a,
.legal-section__list a,
.legal-section__olist a {
    color: #1a56db;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-page__footer-note {
    font-size: 0.875rem;
    color: #64748b;
    padding: 1rem 1.25rem;
}

.legal-page__footer-note-links {
    margin: 0.75rem 0 0;
}

.legal-page__footer-note a {
    color: var(--brand-primary, #c00e2d);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.site-footer-legal-links {
    margin: 0;
    width: 100%;
    text-align: center;
    font-size: 0.75rem;
}

.site-footer-legal-links a {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
}

.site-footer-legal-links a:hover {
    color: #e2e8f0;
    text-decoration: underline;
}

/* Blogs */
.blogs-page {
    width: 100%;
    max-width: 52rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.blogs-filters__scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blogs-filter-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    text-decoration: none;
    white-space: nowrap;
    min-height: 2.75rem;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.blogs-filter-tab:hover {
    border-color: #cbd5e1;
    color: #0f172a;
}

.blogs-filter-tab--active {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
    font-weight: 600;
}

.blogs-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.blog-card.card {
    padding: 1.25rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
}

.blog-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
}

.blog-card__train {
    font-weight: 600;
    color: var(--brand-primary, #c00e2d);
    text-decoration: none;
}

.blog-card__train:hover {
    text-decoration: underline;
}

.blog-card__date {
    color: #94a3b8;
}

.blog-card__title {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.35;
}

.blog-card__title a {
    color: #0f172a;
    text-decoration: none;
}

.blog-card__title a:hover {
    color: var(--brand-primary, #c00e2d);
}

.blog-card__excerpt {
    margin: 0 0 1rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #475569;
}

.blog-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

.blog-card__read {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-primary, #c00e2d);
    text-decoration: none;
}

.blog-card__read:hover {
    text-decoration: underline;
}

.blog-card__live {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
}

.blog-card__live:hover {
    color: #0f172a;
    text-decoration: underline;
}

.blogs-empty {
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.blogs-empty__icon {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 0.5rem;
}

.blogs-empty__title {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
}

.blogs-empty__text {
    margin: 0 0 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #64748b;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

.blogs-empty__text a {
    color: var(--brand-primary, #c00e2d);
    font-weight: 500;
}

.blogs-empty__cta {
    display: inline-flex;
}

.blog-detail-page {
    width: 100%;
    max-width: 48rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.blog-detail__train-link {
    color: #fde047;
    text-decoration: none;
    font-weight: 600;
}

.blog-detail__train-link:hover {
    text-decoration: underline;
}

.blog-detail__body.card {
    padding: 1.5rem;
    font-size: 1rem;
    line-height: 1.75;
    color: #334155;
}

.blog-detail__body p {
    margin: 0 0 1rem;
}

.blog-detail__body p:last-child {
    margin-bottom: 0;
}

.blog-detail__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
}

.blog-detail__back {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
}

.blog-detail__back:hover {
    color: var(--brand-primary, #c00e2d);
    text-decoration: underline;
}

.blog-detail__related-title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.blog-detail__related-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.blog-detail__related-list a {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--brand-primary, #c00e2d);
    text-decoration: none;
}

.blog-detail__related-list a:hover {
    text-decoration: underline;
}
