:root {
    --ink: #12141a;
    --ink-soft: #3d4450;
    --paper: #f4f1ea;
    --paper-2: #fffdf8;
    --line: #e4ddd2;
    --accent: #b42318;
    --accent-2: #1f6f64;
    --chip: #ece7dc;
    --shadow: 0 12px 40px rgba(18, 20, 26, 0.08);
    --serif: "Fraunces", "Times New Roman", serif;
    --sans: "Source Sans 3", "Segoe UI", sans-serif;
}

html, body {
    font-family: var(--sans);
    background: var(--paper);
    color: var(--ink);
}

h1, h2, .story__title, .edition__kicker {
    font-family: var(--serif);
    letter-spacing: -0.02em;
}

a, .btn-link {
    color: var(--accent-2);
}

.btn-primary {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

.btn-primary:hover {
    background: #8e1a12;
    border-color: #8e1a12;
}

.sidebar .navbar-brand,
.sidebar .navbar-brand:hover,
.sidebar .navbar-brand:focus {
    color: #e11d2e;
}

.btn-outline-secondary {
    border-color: var(--line);
    color: var(--ink);
}

.content {
    padding-top: 1.25rem;
    max-width: 1120px;
}

h1:focus {
    outline: none;
}

.muted, .text-muted {
    color: var(--ink-soft) !important;
}

.edition {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
}

.edition__kicker {
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    color: var(--accent);
    margin-bottom: 0.2rem;
}

.edition h1 {
    font-size: clamp(2rem, 4vw, 3.1rem);
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.edition__lead {
    color: var(--ink-soft);
    margin: 0;
    max-width: 40rem;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.5rem;
}

.chip-btn {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    border-radius: 999px;
    padding: 0.28rem 0.85rem;
    font-size: 0.88rem;
}

.chip-btn.is-on {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

.chip-btn:disabled {
    opacity: 0.45;
}

.chip-btn__n {
    opacity: 0.7;
    margin-left: 0.2rem;
}

.empty {
    background: var(--paper-2);
    border: 1px dashed var(--line);
    padding: 1.25rem 1.4rem;
    border-radius: 12px;
}

.section-title {
    margin-top: 2.2rem;
    margin-bottom: 0.35rem;
    font-size: 1.35rem;
}

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

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

.story {
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.story--feature {
    display: grid;
    grid-template-columns: 1fr;
    margin-bottom: 1.4rem;
}

@media (min-width: 900px) {
    .story--feature {
        grid-template-columns: 1.15fr 1fr;
        min-height: 22rem;
    }
}

.story__media {
    background: #d9d2c6;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.story--feature .story__media {
    aspect-ratio: auto;
    min-height: 16rem;
}

.story__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.story__body {
    padding: 1.05rem 1.15rem 1.2rem;
}

.story--feature .story__body {
    padding: 1.4rem 1.5rem 1.5rem;
}

.story__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    margin-bottom: 0.55rem;
}

.story__when {
    color: var(--ink-soft);
    font-size: 0.82rem;
    margin-left: auto;
}

.chip {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--chip);
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
}

.chip--official {
    background: #d8efe9;
    color: #14574e;
}

.chip--update {
    background: #fde7c7;
    color: #7a4a00;
}

.story__title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.35rem;
}

.story--feature .story__title {
    font-size: clamp(1.6rem, 2.4vw, 2.15rem);
}

.story__portals, .story__ents {
    font-size: 0.86rem;
    color: var(--ink-soft);
    margin-bottom: 0.65rem;
}

.story__ents span {
    margin-right: 0.9rem;
}

.story__copy .lead {
    font-size: 1.05rem;
}

.promo-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.15rem;
}

@media (min-width: 800px) {
    .promo-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.promo {
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 1.15rem 1.25rem 1.2rem;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.promo--expired {
    opacity: 0.72;
}

.promo__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    margin-bottom: 0.35rem;
}

.promo__provider {
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.promo__gain {
    font-family: var(--serif);
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    font-weight: 650;
    color: var(--accent-2);
    margin: 0.15rem 0 0.35rem;
    letter-spacing: -0.03em;
}

.promo__title {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.45rem;
}

.promo__audience,
.promo__summary {
    color: var(--ink-soft);
    margin-bottom: 0.65rem;
}

.promo__h {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0.4rem 0 0.35rem;
}

.promo__list {
    margin: 0 0 0.75rem;
    padding-left: 1.15rem;
}

.promo__list li {
    margin-bottom: 0.28rem;
}

.promo__how summary {
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.promo__foot {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.5rem;
}

.chip--expired {
    background: #f3d6d2;
    color: #7a1f16;
}

.chip--commute {
    background: #e4efe4;
    color: #1f4d2a;
}

.src-thumb {
    width: 3.2rem;
    height: 2.2rem;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 0.75rem;
    background: var(--chip);
    flex-shrink: 0;
}

.page-hero h1 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin-bottom: 0.35rem;
}

.cal-item, .status-card {
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: var(--accent);
    padding: 1rem 1rem 1rem 1.2rem;
    color: white;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
