/* =====================================================================
   NEWS EXPRESS :: public site
   ===================================================================== */

:root {
    --ink:        #14181f;
    --ink-soft:   #4a5568;
    --ink-faint:  #8a94a6;
    --paper:      #ffffff;
    --paper-alt:  #f4f6fa;
    --rule:       #e2e6ee;
    --brand:      #c8102e;
    --brand-dark: #9c0c23;
    --link:       #14386b;
    --radius:     12px;
    --wrap:       1200px;
    --shadow:     0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px -12px rgba(16, 24, 40, .18);
}

.theme-dark {
    --ink:        #e8ecf3;
    --ink-soft:   #a8b3c4;
    --ink-faint:  #7b8698;
    --paper:      #12161d;
    --paper-alt:  #191f28;
    --rule:       #2a323e;
    --link:       #8fb4e8;
    --shadow:     0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper-alt);
    color: var(--ink);
    font: 16px/1.6 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.22; margin: 0 0 .4em; font-weight: 800; letter-spacing: -.015em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
    position: absolute; left: -9999px; top: 0; z-index: 60;
    background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------- ticker */
.ticker { background: var(--ink); color: #fff; }
.theme-dark .ticker { background: #05070a; }
.ticker__inner { display: flex; align-items: center; gap: 14px; height: 40px; }
.ticker__tag {
    background: var(--brand); color: #fff; font-size: 11px; font-weight: 800;
    letter-spacing: .1em; text-transform: uppercase; padding: 4px 9px; border-radius: 4px;
    flex: 0 0 auto;
}
.ticker__rail { flex: 1 1 auto; overflow: hidden; white-space: nowrap; font-size: 13.5px; }
.ticker__rail a { color: #e9edf5; margin-right: 26px; }
.ticker__rail a::before { content: "•"; color: var(--brand); margin-right: 9px; }
.ticker__date { flex: 0 0 auto; font-size: 12px; color: #97a3b6; }
@media (max-width: 780px) { .ticker__date { display: none; } }

/* ----------------------------------------------------------- masthead */
.masthead { background: var(--paper); border-bottom: 1px solid var(--rule); }
.masthead__inner { display: flex; align-items: center; gap: 20px; padding-top: 18px; padding-bottom: 18px; }

.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; color: inherit; flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.brand__mark {
    width: 46px; height: 46px; border-radius: 11px; flex: 0 0 auto;
    background: linear-gradient(140deg, var(--ink) 10%, var(--brand) 90%);
    color: #fff; font-weight: 900; font-size: 17px; letter-spacing: .04em;
    display: grid; place-items: center;
}
.brand__text strong { display: block; font-size: 25px; font-weight: 900; letter-spacing: -.03em; }
.brand__text em { display: block; font-style: normal; font-size: 12px; color: var(--ink-faint); }

.search { margin-left: auto; display: flex; gap: 0; }
.search input {
    width: 260px; padding: 10px 13px; font: inherit; font-size: 14px;
    border: 1px solid var(--rule); border-right: 0; border-radius: 9px 0 0 9px;
    background: var(--paper-alt); color: var(--ink);
}
.search button {
    padding: 10px 16px; font: inherit; font-size: 14px; font-weight: 700;
    border: 1px solid var(--brand); background: var(--brand); color: #fff;
    border-radius: 0 9px 9px 0; cursor: pointer;
}
.search button:hover { background: var(--brand-dark); }

.theme-toggle {
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; cursor: pointer;
    border: 1px solid var(--rule); background: var(--paper-alt); color: var(--ink); font-size: 17px;
}

@media (max-width: 900px) {
    .masthead__inner { flex-wrap: wrap; }
    .search { order: 3; width: 100%; margin: 0; }
    .search input { width: 100%; }
    .theme-toggle { margin-left: auto; }
    .brand__text strong { font-size: 21px; }
}

/* -------------------------------------------------------------- nav */
.mainnav { background: var(--paper); border-bottom: 3px solid var(--ink); position: sticky; top: 0; z-index: 30; }
.mainnav__inner { display: flex; gap: 4px; overflow-x: auto; }
.mainnav a {
    padding: 13px 15px; color: var(--ink); font-weight: 700; font-size: 14px;
    letter-spacing: .01em; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -3px;
}
.mainnav a:hover { color: var(--brand); text-decoration: none; }
.mainnav a.is-active { color: var(--brand); border-bottom-color: var(--brand); }

/* ------------------------------------------------------------- main */
.main { padding: 26px 20px 48px; display: block; }

.flashes { padding-top: 16px; }
.flash {
    margin: 0 0 10px; padding: 11px 14px; border-radius: 9px; font-size: 14.5px;
    background: #e7f6ee; color: #08603c; border: 1px solid #b9e3cd;
}
.flash--bad { background: #fdeaea; color: #96130f; border-color: #f3c3c0; }
.theme-dark .flash { background: #123024; color: #8fe0b6; border-color: #1d4a37; }
.theme-dark .flash--bad { background: #341618; color: #f3a9a4; border-color: #55252a; }

/* --------------------------------------------------------- headline */
.lead__grid { display: grid; grid-template-columns: 1.75fr 1fr; gap: 24px; align-items: start; }
.lead__side { display: grid; gap: 18px; align-content: start; }
@media (max-width: 980px) { .lead__grid { grid-template-columns: 1fr; } .lead__side { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .lead__side { grid-template-columns: 1fr; } }

.card {
    background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card__link { color: inherit; display: block; padding: 0 0 4px; }
.card__link:hover { text-decoration: none; }
.card__link:hover .card__title { color: var(--brand); }

.card__media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-alt); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__media--lead { aspect-ratio: 2 / 1; }
.card__media--lead img { height: 100%; }

/* The lead card must not be stretched to the height of the column
   beside it, or the standfirst floats in a pool of empty space. */
.card--lead .card__meta { margin-top: 14px; }

.media-blank {
    display: grid; place-items: center;
    background:
        radial-gradient(120% 120% at 12% 0%, color-mix(in srgb, var(--tint) 88%, #000) 0%, transparent 62%),
        linear-gradient(135deg, var(--tint), #12161d);
}
.media-blank span {
    color: rgba(255, 255, 255, .82); font-weight: 800; font-size: 13px;
    letter-spacing: .18em; text-transform: uppercase;
}

.card__cat {
    display: inline-block; margin: 13px 15px 7px; font-size: 10.5px; font-weight: 800;
    letter-spacing: .12em; text-transform: uppercase; color: var(--tint, var(--brand));
}
.card__title { margin: 0 15px 6px; font-size: 19px; }
.card--lead .card__title { font-size: 31px; margin-top: 2px; }
.card__excerpt { margin: 0 15px 12px; color: var(--ink-soft); font-size: 14.5px; }
.card--lead .card__excerpt { font-size: 16.5px; }
.card__meta {
    margin: auto 15px 14px; padding-top: 11px; border-top: 1px solid var(--rule);
    display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink-faint);
}
@media (max-width: 620px) { .card--lead .card__title { font-size: 24px; } }

/* ------------------------------------------------------------ blocks */
.block { margin-top: 40px; }
.block--tight { margin-top: 30px; }
.block__head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
    border-bottom: 2px solid var(--rule); padding-bottom: 9px; margin-bottom: 20px;
}
.block__head h2 { font-size: 20px; margin: 0; padding-left: 12px; border-left: 4px solid var(--tint, var(--brand)); }
.block__more { font-size: 13px; font-weight: 700; }

.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

/* --------------------------------------------------------- two-column */
.layout { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); gap: 30px; align-items: start; }
@media (max-width: 980px) { .layout { grid-template-columns: 1fr; } }

.rail { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }

.panel { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px; }
.panel__head {
    font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
    color: var(--ink-faint); margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--rule);
}

.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.line { display: flex; gap: 11px; align-items: flex-start; }
.line__rank {
    flex: 0 0 auto; width: 24px; height: 24px; border-radius: 7px; background: var(--brand); color: #fff;
    font-size: 12.5px; font-weight: 800; display: grid; place-items: center; margin-top: 2px;
}
.line a { color: inherit; }
.line a:hover { text-decoration: none; }
.line a:hover strong { color: var(--brand); }
.line strong { display: block; font-size: 14.5px; font-weight: 600; }
.line em { display: block; font-style: normal; font-size: 11.5px; color: var(--ink-faint); margin-top: 2px; }

.chips { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.chips a {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 9px 13px; border-radius: 9px; background: var(--paper-alt);
    border-left: 4px solid var(--tint, var(--brand)); color: var(--ink); font-weight: 600; font-size: 14px;
}
.chips a:hover { text-decoration: none; background: var(--rule); }
.chips span { font-size: 12px; color: var(--ink-faint); font-weight: 700; }

/* ------------------------------------------------------------ story */
.crumbs { font-size: 13px; color: var(--ink-faint); margin-bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.story { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 30px; }
@media (max-width: 620px) { .story { padding: 20px; } }
.story__head h1 { font-size: 38px; margin: 10px 0 12px; }
@media (max-width: 780px) { .story__head h1 { font-size: 27px; } }
.story__standfirst { font-size: 18.5px; color: var(--ink-soft); margin: 0 0 16px; }
.story__byline { font-size: 13.5px; color: var(--ink-faint); display: flex; gap: 9px; flex-wrap: wrap; margin: 0 0 20px; }
.story__media {
    border-radius: var(--radius); overflow: hidden; margin: 0 0 22px;
    aspect-ratio: 16 / 9; max-height: 460px; background: var(--paper-alt);
}
.story__media img { width: 100%; height: 100%; object-fit: cover; }
.story__body p { margin: 0 0 18px; font-size: 17.5px; }
.story__body p:first-of-type::first-letter {
    float: left; font-size: 52px; line-height: .82; font-weight: 900; padding: 4px 9px 0 0; color: var(--brand);
}
@media (max-width: 620px) { .story__body p { font-size: 16.5px; } }

.related { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.related li { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 11px; border-bottom: 1px solid var(--rule); }
.related a { font-weight: 600; }
.related em { font-style: normal; font-size: 12px; color: var(--ink-faint); white-space: nowrap; }

.comments { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 16px; }
.comments li { background: var(--paper-alt); border-radius: 10px; padding: 14px 16px; }
.comments__who { margin: 0 0 6px; display: flex; gap: 12px; align-items: baseline; font-size: 13.5px; color: var(--ink-faint); }
.comments li p:last-child { margin: 0; }

/* ------------------------------------------------------------- page */
.pagehead {
    background: var(--paper); border: 1px solid var(--rule); border-left: 5px solid var(--tint, var(--brand));
    border-radius: var(--radius); padding: 22px 26px; margin-bottom: 26px;
}
.pagehead h1 { font-size: 30px; margin: 0 0 6px; }
.pagehead p { margin: 0; color: var(--ink-soft); }
.pagehead__count { font-size: 13px; color: var(--ink-faint); margin-top: 8px; }

.prose { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 30px; max-width: 760px; }
.prose p { font-size: 17px; }

/* ------------------------------------------------------------- forms */
.form { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; }
.form--narrow { max-width: 560px; }
.form--search { display: flex; gap: 10px; margin-bottom: 26px; padding: 14px; }
.form--search input {
    flex: 1; padding: 11px 13px; font: inherit; font-size: 15px;
    border: 1px solid var(--rule); border-radius: 9px; background: var(--paper-alt); color: var(--ink);
}
.form label { display: block; margin-bottom: 16px; font-size: 13.5px; font-weight: 700; color: var(--ink-soft); }
.form input[type=text], .form input[type=email], .form input[type=search], .form textarea {
    width: 100%; margin-top: 6px; padding: 11px 13px; font: inherit; font-size: 15px; font-weight: 400;
    border: 1px solid var(--rule); border-radius: 9px; background: var(--paper-alt); color: var(--ink);
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.form__row--split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .form__row--split { grid-template-columns: 1fr; } }
.form__trap { position: absolute; left: -9999px; }
.form__note { font-size: 12.5px; color: var(--ink-faint); margin: 10px 0 0; }

.btn {
    display: inline-block; padding: 11px 20px; font: inherit; font-size: 14.5px; font-weight: 700;
    background: var(--brand); color: #fff; border: 1px solid var(--brand); border-radius: 9px;
    cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; text-decoration: none; }

/* -------------------------------------------------------- pagination */
.pager { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 28px; }
.pager a, .pager__now, .pager__gap {
    padding: 8px 13px; border-radius: 8px; font-size: 14px; font-weight: 700;
    border: 1px solid var(--rule); background: var(--paper); color: var(--ink);
}
.pager a:hover { text-decoration: none; border-color: var(--brand); color: var(--brand); }
.pager__now { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager__gap { border: 0; background: none; }
.pager__step { font-weight: 700; }

/* ------------------------------------------------------------- empty */
.empty { background: var(--paper); border: 1px dashed var(--rule); border-radius: var(--radius); padding: 40px; text-align: center; }
.empty--big { padding: 70px 30px; }
.empty__code { font-size: 62px; font-weight: 900; color: var(--brand); margin: 0; line-height: 1; }
.empty h1, .empty h2 { font-size: 24px; }
.muted { color: var(--ink-faint); }

/* ------------------------------------------------------------ footer */
.footer { background: var(--ink); color: #c9d2e0; margin-top: 30px; }
.theme-dark .footer { background: #05070a; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; padding-top: 40px; padding-bottom: 30px; }
.footer h3 { color: #fff; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.footer p { margin: 0 0 10px; font-size: 14.5px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; }
.footer a { color: #c9d2e0; font-size: 14.5px; }
.footer a:hover { color: #fff; }
.footer__base {
    border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 16px; padding-bottom: 24px;
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px;
}
@media (max-width: 780px) { .footer__grid { grid-template-columns: 1fr; gap: 22px; } }
