/* ToyReviews — editorial / magazine design.
   Light theme, system fonts only (no external fetches), one warm accent.
   Goals: refined typography, asymmetric layouts, no bordered cards, confident whitespace. */

:root {
    --bg:           #fafaf7;            /* off-white, slight warmth */
    --bg-elevated:  #ffffff;
    --fg:           #14130f;
    --fg-muted:     #5b5b55;
    --fg-faint:     #8a8a82;
    --line:         #e7e4dc;
    --line-strong:  #c8c4b8;

    --accent:       #d6432b;            /* tomato — used very sparingly */
    --accent-hover: #b9351e;

    --radius-sm:    0.25rem;
    --radius:       0.4rem;
    --radius-lg:    0.75rem;

    --serif:        'Iowan Old Style', 'Charter', 'Bitstream Charter', 'Sitka Text', Cambria, 'Source Serif Pro', Georgia, ui-serif, serif;
    --sans:         ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --mono:         ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: inherit; text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

::selection { background: var(--fg); color: var(--bg); }

/* Type — editorial */
h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 600;
    margin: 0 0 0.4em;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--fg);
}
h1 { font-size: clamp(2.25rem, 4.5vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1em; }
.muted    { color: var(--fg-muted); }
.faint    { color: var(--fg-faint); }
.lede     { font-family: var(--serif); font-size: 1.18rem; line-height: 1.5; color: var(--fg-muted); }

/* Layout */
.site { flex: 1; display: flex; flex-direction: column; }

.container        { width: 100%; max-width: 80rem; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { width: 100%; max-width: 44rem; margin: 0 auto; padding: 0 1.5rem; }

main { flex: 1; }

/* Header — minimal, editorial */
.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.site-header__row {
    display: flex;
    align-items: center;
    height: 4rem;
    gap: 2rem;
}

/* Wordmark + brand mark (SVG icon + text) */
.site-header__brand { display: inline-flex; }
.site-header__brand:hover { text-decoration: none; }

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--fg);
}
.brand__mark {
    color: var(--accent);
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    transition: transform .2s ease;
    transform-origin: 50% 60%;
}
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.04); }
.brand__word {
    font-family: var(--sans);
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: 1.15rem;
    color: var(--fg);
    line-height: 1;
}

.brand--lg .brand__mark { width: 40px; height: 40px; }
.brand--lg .brand__word { font-size: 1.5rem; }

.site-nav {
    display: flex;
    gap: 1.4rem;
    margin-left: auto;
    align-items: center;
    font-size: 0.9rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
@media (max-width: 540px) {
    .site-header__row { height: auto; padding: 0.6rem 0; flex-wrap: wrap; gap: 0.85rem; }
    .site-nav { gap: 1rem; font-size: 0.85rem; margin-left: 0; flex-basis: 100%; justify-content: flex-start; }
}
.site-nav a {
    position: relative;
    padding: 0.4rem 0;
    color: var(--fg-muted);
    font-weight: 500;
    letter-spacing: 0.005em;
}
.site-nav a:hover { color: var(--fg); }
.site-nav a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s;
}
.site-nav a.is-active::after,
.site-nav a:hover::after { transform: scaleX(1); }

/* Sections + rhythm */
.section          { padding: 4rem 0; }
.section--tight   { padding: 2.5rem 0; }
.section + .section { padding-top: 0; }

.eyebrow {
    display: inline-block;
    font-family: var(--sans);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.section-rule {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 0 2rem;
}
.section-rule h2 { margin: 0; font-size: 1.05rem; font-family: var(--sans); font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--fg); }
.section-rule::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Home hero pitch */
.home-hero {
    padding: 5rem 0 3rem;
    border-bottom: 1px solid var(--line);
}
.home-hero h1   { max-width: 22ch; margin-bottom: 1rem; }
.home-hero p    { max-width: 56ch; }

/* Featured grid (1 hero + 2 secondary) */
.feature-grid {
    display: grid;
    gap: 2.5rem 2rem;
    grid-template-columns: 1fr;
}
@media (min-width: 900px) {
    .feature-grid {
        grid-template-columns: 1.5fr 1fr;
        grid-template-rows: auto auto;
        gap: 3rem 2.5rem;
    }
    .feature-grid__lead {
        grid-row: span 2;
    }
}

.story {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.story__media {
    background: var(--line);
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 16/10;
}
.story__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.story:hover .story__media img { transform: scale(1.03); }

.story__eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--accent);
}
.story__title {
    font-family: var(--serif);
    font-weight: 600;
    line-height: 1.15;
    font-size: 1.4rem;
    margin: 0;
    color: var(--fg);
}
.story__title a {
    background-image: linear-gradient(to bottom, transparent calc(100% - 1px), var(--fg) calc(100% - 1px));
    background-size: 0% 100%;
    background-repeat: no-repeat;
    transition: background-size .25s ease, color .15s;
}
.story__title a:hover {
    color: var(--fg);
    background-size: 100% 100%;
}
.story__desc { color: var(--fg-muted); font-size: 0.95rem; margin: 0; max-width: 52ch; }

/* Lead story is bigger */
.feature-grid__lead .story__title { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.feature-grid__lead .story__desc  { font-size: 1.05rem; max-width: 64ch; }
.feature-grid__lead .story__media { aspect-ratio: 16/10; }

/* Article list (category page, author page) */
.article-list {
    display: grid;
    gap: 3rem 2.5rem;
    grid-template-columns: 1fr;
}
@media (min-width: 700px)  { .article-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .article-list { grid-template-columns: repeat(3, 1fr); } }

/* Category strip — pill-less, just two columns of links */
.tag-strip {
    columns: 2;
    column-gap: 2rem;
    margin: 1.5rem 0 0;
}
@media (min-width: 720px)  { .tag-strip { columns: 3; } }
@media (min-width: 1100px) { .tag-strip { columns: 4; } }

.tag-strip a {
    display: block;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
    break-inside: avoid;
    color: var(--fg);
    font-weight: 500;
}
.tag-strip a:hover { color: var(--accent); }
.tag-strip a small { display: block; color: var(--fg-faint); font-weight: 400; font-size: 0.78rem; margin-top: 0.15rem; line-height: 1.4; }

/* Breadcrumbs — minimal */
.breadcrumbs {
    list-style: none;
    padding: 1.25rem 0 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--fg-faint);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}
.breadcrumbs li:not(:last-child)::after { content: "·"; margin-left: 0.4rem; }
.breadcrumbs a { color: inherit; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs li[aria-current] { color: var(--fg); }

/* Article page */
.article-page { padding: 2rem 0 4rem; }

.article-layout {
    display: grid;
    gap: 3rem;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}
@media (min-width: 1024px) {
    .article-layout {
        grid-template-columns: minmax(0, 44rem) 18rem;
        gap: 4rem;
        justify-content: space-between;
    }
}

.article-main { min-width: 0; max-width: 44rem; }

.article-aside {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    font-family: var(--sans);
    font-size: 0.92rem;
}
@media (min-width: 1024px) {
    .article-aside {
        position: sticky;
        top: 5rem;
        max-height: calc(100vh - 6rem);
        overflow-y: auto;
        padding-right: 0.4rem;
    }
}

.aside-block { padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.aside-block:last-of-type { border-bottom: 0; }
.aside-block__title {
    font-family: var(--sans);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 600;
    color: var(--fg-muted);
    margin: 0 0 0.85rem;
}

.aside-toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.aside-toc li {
    counter-increment: toc;
    padding-left: 1.4rem;
    position: relative;
    line-height: 1.4;
}
.aside-toc li::before {
    content: counter(toc, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0.05rem;
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--fg-faint);
    font-weight: 500;
}
.aside-toc a { color: var(--fg-muted); }
.aside-toc a:hover { color: var(--accent); }

.aside-related ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.aside-related a {
    color: var(--fg);
    line-height: 1.35;
    border-bottom: 1px dashed transparent;
    transition: border-color .15s, color .15s;
    font-weight: 500;
}
.aside-related a:hover { color: var(--accent); border-bottom-color: var(--accent); text-decoration: none; }

.aside-slot:empty,
.aside-slot[data-monetization-slot] > :empty,
[data-monetization-slot]:empty { display: none; }
.aside-slot {
    /* Reserved for future ad / affiliate components. The partial is empty today. */
    min-height: 0;
}

.aside-back {
    margin: 0;
    font-size: 0.82rem;
    color: var(--fg-muted);
}
.aside-back a { color: var(--fg-muted); }
.aside-back a:hover { color: var(--accent); }

/* Sidebar shop card */
.shop-card { padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.shop-card__list { list-style: none; padding: 0; margin: 0 0 0.85rem; display: flex; flex-direction: column; gap: 0.4rem; }
.shop-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    color: var(--fg);
    font-size: 0.9rem;
    font-weight: 500;
    transition: border-color .15s, color .15s, background .15s;
}
.shop-link:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.shop-link__arrow { color: var(--fg-faint); }
.shop-link:hover .shop-link__arrow { color: var(--accent); }
.shop-card__disclosure {
    margin: 0;
    font-size: 0.72rem;
    color: var(--fg-faint);
    line-height: 1.4;
}

/* Body shop block */
.shop-block {
    margin: 3rem 0 2rem;
    padding: 1.75rem 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
}
.shop-block h2 {
    font-size: 1.5rem;
    font-family: var(--serif);
    margin: 0 0 0.5rem;
}
.shop-block__disclosure {
    margin: 0 0 1.25rem;
    font-size: 0.78rem;
    color: var(--fg-faint);
    line-height: 1.4;
}
.shop-block__grid {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: 1fr;
}
@media (min-width: 540px) { .shop-block__grid { grid-template-columns: 1fr 1fr; } }

.shop-button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--fg);
    transition: border-color .15s, transform .15s, background .15s;
}
.shop-button:hover {
    border-color: var(--accent);
    background: var(--bg-elevated);
    transform: translateY(-1px);
    text-decoration: none;
}
.shop-button__label { font-weight: 600; line-height: 1.3; }
.shop-button__cta { font-size: 0.78rem; color: var(--accent); font-weight: 500; letter-spacing: 0.01em; }

/* Smooth-scroll heading anchors */
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

.article-header {
    padding: 1.5rem 0 2rem;
}
.article-header h1 { font-size: clamp(2rem, 4vw, 3.25rem); margin-bottom: 1.25rem; max-width: 22ch; }
.article-header__lede {
    font-family: var(--serif);
    font-size: 1.25rem;
    line-height: 1.5;
    color: var(--fg-muted);
    max-width: 56ch;
    margin: 0 0 1.5rem;
}
.article-meta {
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fg-muted);
    font-weight: 500;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}
.article-meta .dot::before { content: "·"; margin: 0 0.4rem; opacity: 0.6; }
.article-meta a { color: var(--fg); }
.article-meta a:hover { color: var(--accent); }

.article-hero {
    margin: 0 0 3rem;
    overflow: hidden;
    border-radius: var(--radius-lg);
    aspect-ratio: 16/9;
    background: var(--line);
    max-width: 60rem;
}
.article-hero img { width: 100%; height: 100%; object-fit: cover; }

/* Prose (article body) — bigger, generous, drop-cap on first para */
.prose {
    font-family: var(--serif);
    color: var(--fg);
    font-size: 1.18rem;
    line-height: 1.65;
    max-width: 100%;
}
.prose > p:first-of-type::first-letter {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 4em;
    float: left;
    line-height: 0.85;
    padding: 0.32rem 0.6rem 0 0;
    color: var(--fg);
}
.prose h2 {
    font-family: var(--serif);
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-size: 1.75rem;
}
.prose h3 {
    font-family: var(--serif);
    margin-top: 2.25rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}
.prose p { margin: 0 0 1.2rem; }
.prose ul, .prose ol { margin: 0 0 1.5rem; padding-left: 1.4rem; }
.prose li { margin-bottom: 0.4rem; }
.prose a {
    color: var(--fg);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    text-decoration-color: var(--accent);
}
.prose a:hover { color: var(--accent); text-decoration-thickness: 2px; }
.prose figure { margin: 2rem 0; }
.prose figcaption { font-family: var(--sans); font-size: 0.85rem; color: var(--fg-faint); margin-top: 0.5rem; }

.callout {
    margin: 2rem 0;
    padding: 1rem 0 1rem 1.25rem;
    border-left: 3px solid var(--accent);
    color: var(--fg);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.5;
}
.callout strong {
    display: block;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    color: var(--accent);
}

/* Tags / chips — only used at end of article */
.tag-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 2.5rem 0 0; max-width: 38rem; }
.tag {
    display: inline-flex;
    align-items: center;
    height: 1.6rem;
    padding: 0 0.7rem;
    font-family: var(--sans);
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    border: 1px solid var(--line-strong);
    color: var(--fg-muted);
    border-radius: 9999px;
    transition: color .15s, border-color .15s;
}
.tag:hover { color: var(--fg); border-color: var(--fg); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 2.5rem;
    padding: 0 1.1rem;
    border-radius: 9999px;
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
    color: inherit;
}
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--bg); }
.btn-outline { border-color: var(--line-strong); color: var(--fg); }
.btn-outline:hover { border-color: var(--fg); color: var(--fg); }
.btn-ghost { color: var(--fg); }
.btn-ghost:hover { background: var(--line); }
.btn-sm { height: 2.1rem; padding: 0 0.9rem; font-size: 0.78rem; }
.btn-link { background: transparent; border: 0; padding: 0; height: auto; color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; cursor: pointer; }

/* Form */
.input, .textarea {
    width: 100%;
    height: 2.6rem;
    padding: 0 0.85rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    color: var(--fg);
    font: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; padding: 0.6rem 0.85rem; min-height: 6rem; }
.input:focus, .textarea:focus {
    outline: none;
    border-color: var(--fg);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.label { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; display: block; }

.alert {
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    background: var(--bg-elevated);
    margin: 1rem 0;
    font-size: 0.95rem;
}

/* Tables (admin) */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.table th, .table td {
    text-align: left;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--line);
}
.table th {
    background: var(--bg-elevated);
    font-weight: 600;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fg-muted);
}
.table tr:last-child td { border-bottom: 0; }

/* Footer — magazine-style */
.site-footer {
    margin-top: 6rem;
    border-top: 1px solid var(--line);
    padding: 3rem 0 2.5rem;
    color: var(--fg-muted);
    font-size: 0.88rem;
}
.site-footer__grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
    margin-bottom: 2.5rem;
}
@media (min-width: 700px) {
    .site-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.site-footer__brand-link { display: inline-block; color: var(--fg); }
.site-footer__brand-link:hover { text-decoration: none; }
.site-footer__col h3 {
    font-family: var(--sans);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 600;
    color: var(--fg);
    margin: 0 0 0.85rem;
}
.site-footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.site-footer__col a { color: var(--fg-muted); }
.site-footer__col a:hover { color: var(--accent); }
.site-footer__bottom {
    border-top: 1px solid var(--line);
    padding-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.78rem;
    color: var(--fg-faint);
    letter-spacing: 0.04em;
}

/* Cookie banner — refined */
.cookie-banner {
    position: fixed;
    inset: auto 1rem 1rem 1rem;
    z-index: 60;
    background: var(--bg-elevated);
    color: var(--fg);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 40px -16px rgb(20 19 15 / 0.25);
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
    padding: 1.25rem 1.4rem;
}
.cookie-banner h2 { font-family: var(--sans); font-size: 0.95rem; margin: 0 0 0.5rem; }
.cookie-banner p  { font-size: 0.88rem; margin: 0 0 1rem; color: var(--fg-muted); line-height: 1.5; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cookie-banner[hidden] { display: none !important; }

.cookie-modal {
    position: fixed; inset: 0; z-index: 70;
    background: rgb(20 19 15 / 0.45);
    display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.cookie-modal[hidden] { display: none !important; }
.cookie-modal__panel {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 40px -16px rgb(20 19 15 / 0.25);
    width: 100%;
    max-width: 32rem;
    padding: 1.5rem;
}
.cookie-modal__panel h2 { font-family: var(--sans); font-size: 1.1rem; }
.cookie-row { display: flex; align-items: flex-start; gap: 0.85rem; padding: 0.85rem 0; border-top: 1px solid var(--line); }
.cookie-row:first-of-type { border-top: 0; }
.cookie-row label { font-weight: 600; font-size: 0.92rem; }
.cookie-row p { font-size: 0.85rem; color: var(--fg-muted); margin: 0.2rem 0 0; line-height: 1.5; }
.cookie-row input[type=checkbox] { margin-top: 0.35rem; accent-color: var(--accent); }

/* Admin */
.admin-shell { padding: 2rem 0 4rem; }
.admin-shell h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.4rem; }
.admin-shell .lede { margin-bottom: 1.5rem; }

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.4rem;
    margin: 0 0 2rem;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: 9999px;
    width: fit-content;
}
.admin-nav a {
    padding: 0.45rem 0.9rem;
    border-radius: 9999px;
    font-family: var(--sans);
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--fg-muted);
    transition: color .15s, background .15s;
}
.admin-nav a:hover { color: var(--fg); background: var(--bg); }
.admin-nav a.is-active { background: var(--fg); color: var(--bg); }
.admin-nav a.is-active:hover { background: var(--fg); color: var(--bg); }

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}
@media (min-width: 700px)  { .stats { grid-template-columns: repeat(4, 1fr); } }

.stat {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
}
.stat__label { font-family: var(--sans); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--fg-muted); margin-bottom: 0.4rem; }
.stat__value { font-family: var(--serif); font-size: 2rem; font-weight: 600; line-height: 1; color: var(--fg); }
.stat__delta { font-family: var(--sans); font-size: 0.8rem; color: var(--fg-faint); margin-top: 0.4rem; }

.admin-card {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem 1.4rem;
    margin-bottom: 1.5rem;
}
.admin-card h2 { font-family: var(--sans); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--fg-muted); margin: 0 0 1rem; font-weight: 600; }

.admin-form { display: grid; gap: 1rem; max-width: 44rem; }
.admin-form .row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .admin-form .row { grid-template-columns: 1fr 1fr; } }
.admin-form .actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.admin-form select { width: 100%; height: 2.6rem; padding: 0 0.85rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-elevated); color: var(--fg); font: inherit; }
.admin-form textarea { font-family: var(--mono); font-size: 0.85rem; }

.admin-table-row-actions { display: flex; gap: 0.4rem; align-items: center; }
.admin-table-row-actions form { display: inline-flex; margin: 0; }

.flash {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 0.85rem 1.1rem;
    margin: 0 0 1.5rem;
    font-size: 0.92rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    height: 1.5rem;
    padding: 0 0.6rem;
    border-radius: 9999px;
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid var(--line-strong);
    color: var(--fg-muted);
    background: var(--bg);
}
.status-pill--published { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.status-pill--draft     { color: var(--fg); }
.status-pill--unlisted  { color: var(--fg-faint); }
.status-pill--running   { color: #b58a00; border-color: #ddc97a; }
.status-pill--success   { color: #1a7d3a; border-color: #b9deca; }
.status-pill--failed    { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.status-pill--skipped   { color: var(--fg-faint); }

/* Bootstrap-class shim — for embedded Identity Razor Pages we don't scaffold ourselves.
   The default Microsoft.AspNetCore.Identity.UI package emits Bootstrap classes;
   this keeps the embedded forms visually consistent with our editorial design. */

.row { display: grid; gap: 1.25rem; margin: 1rem 0; grid-template-columns: 1fr; }
@media (min-width: 720px) {
    .row { grid-template-columns: repeat(12, 1fr); }
    .col-md-4  { grid-column: span 4; }
    .col-md-6  { grid-column: span 6; }
    .col-md-8  { grid-column: span 8; }
    .col-md-12 { grid-column: span 12; }
}
.row > [class^="col-"] { min-width: 0; }

.form-floating {
    position: relative;
    margin-bottom: 1rem;
}
.form-floating > .form-control,
.form-floating > .form-select {
    height: 3.4rem;
    padding: 1.4rem 0.85rem 0.4rem;
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    color: var(--fg);
    font: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.form-floating > label {
    position: absolute;
    top: 0;
    left: 0.85rem;
    height: 100%;
    padding: 1rem 0;
    pointer-events: none;
    color: var(--fg-faint);
    font-size: 0.92rem;
    font-weight: 500;
    transform-origin: 0 0;
    transition: transform .15s ease, color .15s;
}
.form-floating > .form-control:focus,
.form-floating > .form-control:not(:placeholder-shown),
.form-floating > .form-select {
    outline: none;
    border-color: var(--fg);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
    transform: scale(0.74) translateY(-0.62rem);
    color: var(--fg-muted);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.form-control, .form-select {
    width: 100%;
    height: 2.6rem;
    padding: 0 0.85rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    color: var(--fg);
    font: inherit;
}
.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--fg);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.form-label { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; display: block; color: var(--fg); }

.form-check { display: flex; align-items: center; gap: 0.5rem; margin: 0.75rem 0; }
.form-check-input { accent-color: var(--accent); width: 1rem; height: 1rem; }
.form-check-label { font-size: 0.9rem; color: var(--fg); }

.text-danger { color: var(--accent); font-size: 0.85rem; display: block; margin-top: 0.25rem; }
.text-success { color: #1a7d3a; font-size: 0.9rem; }

.btn-primary { background: var(--fg); color: var(--bg); border-radius: 9999px; padding: 0 1.1rem; height: 2.5rem; font-weight: 500; font-size: 0.85rem; border: 1px solid transparent; }
.btn-primary:hover, .btn-primary:focus { background: var(--accent); color: var(--bg); }
.btn-danger { background: transparent; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line)); border-radius: 9999px; padding: 0 1.1rem; height: 2.5rem; font-weight: 500; font-size: 0.85rem; }
.btn-danger:hover { background: var(--accent); color: var(--bg); }
.btn-lg { height: 2.85rem; padding: 0 1.4rem; font-size: 0.92rem; }
.w-100 { width: 100%; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

/* Identity Manage area pane */
.manage-pane {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.75rem 1.5rem;
    margin-top: 0.5rem;
}
.manage-pane h2, .manage-pane h3 { font-family: var(--serif); margin-top: 0; }
.manage-pane h3 { font-size: 1.2rem; }
.manage-pane h4 { font-family: var(--sans); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--fg-muted); margin: 0 0 1rem; font-weight: 600; }
.manage-pane > form { max-width: 32rem; }
.manage-pane > form .row { grid-template-columns: 1fr; gap: 0; }
.manage-pane a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.manage-pane a:hover { color: var(--accent); }

/* Misc utility */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 1rem; } .mt-4 { margin-top: 1.5rem; } .mt-5 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; } .mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 1rem; } .mb-4 { margin-bottom: 1.5rem; } .mb-5 { margin-bottom: 2rem; }
.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; }
