/**
 * Components layer
 * Every component is a piece of printed stationery: index plates, ticket
 * stubs, letterpress labels, drawer tabs. Square corners, hairline rules,
 * offset paper shadows. No pills, no glass, no neon.
 *
 * Naming: .mc-<block>__<element>--<variant>, all states included.
 */

/* ==================================================================
   1 · Buttons — "stub" geometry with a clipped corner
   ================================================================== */
.mc-btn {
    --mc-btn-bg: transparent;
    --mc-btn-ink: var(--mc-ink-pine);
    --mc-btn-edge: var(--mc-rule-ink);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 46px;
    padding: 0.7rem 1.35rem;
    font-family: var(--mc-font-body);
    font-size: var(--mc-text-sm);
    font-weight: 600;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    color: var(--mc-btn-ink);
    background: var(--mc-btn-bg);
    border: 1.5px solid var(--mc-btn-edge);
    border-radius: var(--mc-radius-sm);
    transition: transform var(--mc-dur) var(--mc-ease-out),
        box-shadow var(--mc-dur) var(--mc-ease-out),
        background-color var(--mc-dur) var(--mc-ease-out),
        color var(--mc-dur) var(--mc-ease-out),
        border-color var(--mc-dur) var(--mc-ease-out);
}

/* Clipped corner: a 10px diagonal notch, like a torn ticket */
.mc-btn::after {
    content: "";
    position: absolute;
    right: -1.5px;
    bottom: -1.5px;
    width: 13px;
    height: 13px;
    background: var(--mc-paper);
    clip-path: polygon(100% 0, 0 100%, 100% 100%);
    pointer-events: none;
}

.mc-btn__arrow {
    font-size: 1.05em;
    line-height: 1;
    transition: transform var(--mc-dur) var(--mc-ease-out);
}

.mc-btn:hover .mc-btn__arrow {
    transform: translateX(3px);
}

/* Primary — pine ink on paper, offset shadow grows on hover */
.mc-btn--ink {
    --mc-btn-bg: var(--mc-ink-pine);
    --mc-btn-ink: var(--mc-paper);
    --mc-btn-edge: var(--mc-ink-pine);
    box-shadow: 4px 4px 0 rgba(18, 54, 42, 0.22);
}

.mc-btn--ink::after {
    background: var(--mc-paper);
}

.mc-btn--ink:hover {
    background: var(--mc-ink-pine-deep);
    transform: translate(-1px, -1px);
    box-shadow: 6px 6px 0 rgba(18, 54, 42, 0.26);
}

.mc-btn--ink:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 rgba(18, 54, 42, 0.22);
}

/* Marigold — the loudest button on the page, used once per screen */
.mc-btn--marigold {
    --mc-btn-bg: var(--mc-marigold);
    --mc-btn-ink: var(--mc-ink-on-marigold);
    --mc-btn-edge: var(--mc-marigold-deep);
    box-shadow: 4px 4px 0 rgba(147, 43, 30, 0.2);
}

.mc-btn--marigold:hover {
    background: var(--mc-marigold-hover);
    transform: translate(-1px, -1px);
    box-shadow: 6px 6px 0 rgba(147, 43, 30, 0.24);
}

.mc-btn--marigold:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 rgba(147, 43, 30, 0.2);
}

/* Outline — quiet secondary */
.mc-btn--outline {
    --mc-btn-bg: transparent;
    --mc-btn-ink: var(--mc-ink-pine);
    --mc-btn-edge: var(--mc-rule-ink);
}

.mc-btn--outline:hover {
    background: rgba(18, 54, 42, 0.06);
    border-color: var(--mc-ink-pine);
}

.mc-btn--outline:active {
    background: rgba(18, 54, 42, 0.12);
}

/* On dark pine surfaces */
.mc-btn--paper {
    --mc-btn-bg: transparent;
    --mc-btn-ink: var(--mc-paper);
    --mc-btn-edge: rgba(251, 242, 223, 0.55);
}

.mc-btn--paper::after {
    background: var(--mc-ink-pine);
}

.mc-btn--paper:hover {
    background: rgba(251, 242, 223, 0.1);
    border-color: var(--mc-paper);
}

/* Text link with a printed underline that thickens on hover */
.mc-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    font-size: var(--mc-text-sm);
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--mc-ink-pine);
    padding-block: 0.35rem;
    border-bottom: 2px solid var(--mc-marigold);
    transition: color var(--mc-dur-fast) var(--mc-ease-out),
        border-color var(--mc-dur-fast) var(--mc-ease-out),
        gap var(--mc-dur-fast) var(--mc-ease-out);
}

.mc-link:hover {
    color: var(--mc-brick);
    border-color: var(--mc-brick);
    gap: 0.6rem;
}

.mc-link--quiet {
    border-bottom-color: var(--mc-rule);
    color: var(--mc-ink-soft);
}

.mc-link--quiet:hover {
    color: var(--mc-ink-pine);
    border-bottom-color: var(--mc-marigold);
}

/* ==================================================================
   2 · Masthead — a narrow printed nameplate that scrolls with the page

   Deliberately NOT sticky: the cabinet reads like a printed catalogue, and a
   pinned bar would fight that. The nameplate is narrower than the content
   column so it reads as a masthead sitting on the page rather than a full-width
   application chrome bar.
   ================================================================== */
.mc-masthead {
    /* Normal flow: scrolls away with the document. */
    position: relative;
    z-index: 20;
    /* Flush to the top of the viewport — no top padding, so the nameplate's
       own border sits directly against the screen edge. Only a bottom gap is
       kept, separating it from the hero. */
    padding-block: 0 0.6rem;
}

/* Narrower than .mc-wrap at every breakpoint so the nameplate always reads as
   a masthead inset from the content edges, not as a full-width chrome bar.
   The extra inset grows with the viewport, where there is room to spare. */
.mc-masthead__plate {
    width: min(100% - (var(--mc-gutter) * 2), 1040px);
    margin-inline: auto;
}

@media (min-width: 700px) {
    .mc-masthead__plate {
        width: min(100% - (var(--mc-gutter) * 3.5), 1000px);
    }
}

@media (min-width: 1100px) {
    .mc-masthead__plate {
        width: min(100% - (var(--mc-gutter) * 5), 940px);
    }
}

.mc-masthead__card {
    position: relative;
    display: flex;
    align-items: stretch;
    background: var(--mc-paper-panel);
    border: 1.5px solid var(--mc-ink-pine);
    /* Square top corners, rounded bottom: the plate reads as attached to the
       top edge of the sheet rather than floating below it. */
    border-radius: 0 0 var(--mc-radius-sm) var(--mc-radius-sm);
    box-shadow: 3px 3px 0 rgba(18, 54, 42, 0.12);
    min-height: var(--mc-header-h);
    overflow: hidden;
    transition: box-shadow var(--mc-dur) var(--mc-ease-out);
}

/* Printed accent: a marigold rule across the top edge of the nameplate. */
.mc-masthead__card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--mc-marigold);
    pointer-events: none;
}

.mc-masthead__card:hover {
    box-shadow: 4px 4px 0 rgba(18, 54, 42, 0.16);
}

/* Brand block — marigold mark + wordmark, separated by a printed rule */
.mc-brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.85rem 0.35rem 0.55rem;
    min-width: 0;
    border-right: 1.5px solid var(--mc-ink-pine);
}

.mc-brand__mark {
    width: 1.75rem;
    height: 1.75rem;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    background: var(--mc-marigold);
    color: var(--mc-ink-on-marigold);
    border: 1.25px solid var(--mc-ink-pine);
    border-radius: var(--mc-radius-xs);
    font-family: var(--mc-font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 1.5px 1.5px 0 rgba(18, 54, 42, 0.26);
    /* The slot is intentionally empty in markup: only js/brand.js may write
       into it, and it writes a two-letter monogram. overflow guards the case
       where a longer value ever gets in. */
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

/* No script: show a neutral mark instead of an empty coloured square. */
.mc-brand__mark:empty::before,
.mc-colophon__mark:empty::before {
    content: "·";
    opacity: 0.55;
}


.mc-brand__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.mc-brand__title {
    font-family: var(--mc-font-display);
    font-size: 1.04rem;
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.012em;
    color: var(--mc-ink-pine);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mc-brand__sub {
    font-size: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.17em;
    text-transform: uppercase;
    color: var(--mc-ink-muted);
    margin-top: 0.1rem;
    white-space: nowrap;
}

/* Inline nav — numbered editorial links */
.mc-nav {
    display: none;
    align-items: center;
    gap: 0.05rem;
    padding-inline: 0.7rem;
    flex: 1;
}

.mc-nav__link {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    gap: 0.3rem;
    min-height: 38px;
    padding: 0.35rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--mc-ink-soft);
    border-radius: var(--mc-radius-xs);
    transition: color var(--mc-dur-fast) var(--mc-ease-out),
        background-color var(--mc-dur-fast) var(--mc-ease-out);
}

.mc-nav__no {
    font-family: var(--mc-font-display);
    font-size: 0.56rem;
    font-weight: 600;
    color: var(--mc-marigold-deep);
    letter-spacing: 0;
}

.mc-nav__link::after {
    content: "";
    position: absolute;
    left: 0.55rem;
    right: 0.55rem;
    bottom: 0.3rem;
    height: 2px;
    background: var(--mc-marigold);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--mc-dur) var(--mc-ease-out);
}

.mc-nav__link:hover {
    color: var(--mc-ink-pine);
    background: rgba(18, 54, 42, 0.05);
}

.mc-nav__link:hover::after,
.mc-nav__link[aria-current="page"]::after {
    transform: scaleX(1);
}

.mc-nav__link[aria-current="page"] {
    color: var(--mc-ink-pine);
}

/* Right cluster */
.mc-masthead__aside {
    display: none;
    align-items: center;
    padding-inline: 0.7rem;
    border-left: 1px dashed var(--mc-rule);
}

.mc-masthead__issue {
    font-family: var(--mc-font-body);
    font-size: 0.54rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--mc-ink-muted);
    line-height: 1.45;
    text-align: right;
}

.mc-masthead__issue strong {
    display: block;
    color: var(--mc-ink-pine);
    font-weight: 700;
}

/* Index toggle (mobile) */
.mc-indexbtn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
    padding-inline: 0.8rem;
    border-left: 1.5px solid var(--mc-ink-pine);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--mc-ink-pine);
    background: var(--mc-marigold-pale);
    transition: background-color var(--mc-dur-fast) var(--mc-ease-out);
}

.mc-indexbtn:hover {
    background: var(--mc-marigold);
}

.mc-indexbtn__bars {
    display: grid;
    gap: 3px;
    width: 14px;
}

.mc-indexbtn__bars span {
    display: block;
    height: 2px;
    background: var(--mc-ink-pine);
    transition: transform var(--mc-dur) var(--mc-ease-out),
        opacity var(--mc-dur) var(--mc-ease-out);
}

.mc-indexbtn[aria-expanded="true"] .mc-indexbtn__bars span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

.mc-indexbtn[aria-expanded="true"] .mc-indexbtn__bars span:nth-child(2) {
    opacity: 0;
}

.mc-indexbtn[aria-expanded="true"] .mc-indexbtn__bars span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

@media (min-width: 960px) {
    .mc-nav {
        display: flex;
    }

    .mc-masthead__aside {
        display: flex;
    }

    .mc-indexbtn {
        display: none;
    }
}

/* ==================================================================
   3 · Index overlay — full-page card catalogue (mobile primary nav)
   ================================================================== */
.mc-index {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    flex-direction: column;
    background: var(--mc-paper);
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0 43px,
        rgba(18, 54, 42, 0.06) 43px 44px
    );
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform var(--mc-dur-slow) var(--mc-ease-out),
        visibility 0s linear var(--mc-dur-slow);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.mc-index.is-open {
    transform: translateY(0);
    visibility: visible;
    transition: transform var(--mc-dur-slow) var(--mc-ease-out),
        visibility 0s;
}

.mc-index__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem var(--mc-gutter);
    border-bottom: 1.5px solid var(--mc-ink-pine);
    background: var(--mc-paper-panel);
    position: sticky;
    top: 0;
}

.mc-index__close {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    font-family: var(--mc-font-display);
    font-size: 1.4rem;
    line-height: 1;
    color: var(--mc-ink-pine);
    background: var(--mc-marigold-pale);
    border: 1.5px solid var(--mc-ink-pine);
    border-radius: var(--mc-radius-xs);
    transition: background-color var(--mc-dur-fast) var(--mc-ease-out);
}

.mc-index__close:hover {
    background: var(--mc-marigold);
}

.mc-index__body {
    padding: var(--mc-space-md) var(--mc-gutter) var(--mc-space-xl);
    display: grid;
    gap: var(--mc-space-lg);
    /* The sheet is full-bleed, so there is no visible backdrop to click. The
       close control lives in the sticky head; this keeps the head reachable
       while the body scrolls. */
    overscroll-behavior: contain;
}

.mc-index__group-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.mc-index__group-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--mc-rule);
}

.mc-index__row {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    min-height: 46px;
    padding: 0.35rem 0;
    border-bottom: 1px dotted var(--mc-rule);
    transition: color var(--mc-dur-fast) var(--mc-ease-out),
        padding-left var(--mc-dur) var(--mc-ease-out);
}

.mc-index__row:hover {
    color: var(--mc-brick);
    padding-left: 0.35rem;
}

.mc-index__no {
    font-family: var(--mc-font-display);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--mc-marigold-deep);
    min-width: 1.6rem;
    font-variant-numeric: tabular-nums;
}

.mc-index__name {
    font-family: var(--mc-font-display);
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--mc-ink-pine);
    flex: 1;
    min-width: 0;
}

.mc-index__count {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--mc-ink-muted);
    font-variant-numeric: tabular-nums;
}

.mc-index__foot {
    border-top: 1.5px solid var(--mc-ink-pine);
    padding-top: var(--mc-space-sm);
    display: grid;
    gap: 0.4rem;
}

/* ==================================================================
   4 · Section heads — hanging number, rule to the right
   ================================================================== */
.mc-head {
    display: grid;
    gap: 0.55rem;
    margin-bottom: var(--mc-space-md);
}

.mc-head__top {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.mc-head__no {
    font-family: var(--mc-font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--mc-marigold-deep);
    font-variant-numeric: tabular-nums;
}

.mc-head__rule {
    flex: 1;
    height: 1px;
    background: var(--mc-rule);
}

.mc-head__title {
    font-family: var(--mc-font-display);
    font-size: var(--mc-text-h2);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.015em;
    color: var(--mc-ink);
}

.mc-head__title em {
    font-style: italic;
}

.mc-head__desc {
    font-size: var(--mc-text-sm);
    color: var(--mc-ink-muted);
    max-width: 54ch;
    line-height: 1.6;
}

.mc-head--paper .mc-head__title {
    color: var(--mc-paper);
}

.mc-head--paper .mc-head__desc {
    color: rgba(251, 242, 223, 0.7);
}

.mc-head--paper .mc-head__rule {
    background: rgba(251, 242, 223, 0.28);
}

.mc-head--paper .mc-head__no {
    color: var(--mc-marigold);
}

/* ==================================================================
   5 · Game plate — the index card for one title
   ================================================================== */
.mc-plate {
    position: relative;
    min-width: 0;
    background: var(--mc-paper-panel);
    border: 1.5px solid var(--mc-ink-pine);
    border-radius: var(--mc-radius-sm);
    box-shadow: var(--mc-shadow-card);
    transition: transform var(--mc-dur) var(--mc-ease-out),
        box-shadow var(--mc-dur) var(--mc-ease-out);
}

/* Double rule inset — the printed frame around a catalogue plate */
.mc-plate::before {
    content: "";
    position: absolute;
    inset: 5px;
    border: 1px solid var(--mc-rule-soft);
    border-radius: 1px;
    pointer-events: none;
    z-index: 1;
}

.mc-plate:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--mc-shadow-lift);
}

.mc-plate:active {
    transform: translate(0, 0);
    box-shadow: var(--mc-shadow-card);
}

.mc-plate__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 5px;
    color: inherit;
}

.mc-plate__frame {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--mc-paper-deep);
    border-radius: 1px;
}

.mc-plate__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.92) contrast(1.02);
    transition: transform var(--mc-dur-slow) var(--mc-ease-out),
        filter var(--mc-dur) var(--mc-ease-out);
}

.mc-plate:hover .mc-plate__img {
    transform: scale(1.035);
    filter: saturate(1) contrast(1.04);
}

/* Plate number tab — top-left, sits over the image */
.mc-plate__no {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    padding: 0.2rem 0.5rem 0.22rem;
    background: var(--mc-paper-panel);
    border-right: 1.5px solid var(--mc-ink-pine);
    border-bottom: 1.5px solid var(--mc-ink-pine);
    font-family: var(--mc-font-body);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--mc-ink-pine);
    font-variant-numeric: tabular-nums;
}

/* Category flag — bottom-right, marigold */
.mc-plate__cat {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 2;
    max-width: 88%;
    padding: 0.18rem 0.5rem;
    background: var(--mc-marigold);
    border-top: 1.5px solid var(--mc-ink-pine);
    border-left: 1.5px solid var(--mc-ink-pine);
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--mc-ink-on-marigold);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mc-plate__caption {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.7rem 0.6rem 0.6rem;
    flex: 1;
}

.mc-plate__title {
    font-family: var(--mc-font-display);
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.24;
    letter-spacing: -0.012em;
    color: var(--mc-ink);
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mc-plate__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.45rem;
    border-top: 1px dotted var(--mc-rule);
}

.mc-plate__code {
    font-size: 0.56rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    /* ink-muted, not ink-faint: at 9px the faint tone measured 2.98:1. */
    color: var(--mc-ink-muted);
    font-variant-numeric: tabular-nums;
}

.mc-plate__play {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mc-brick);
}

.mc-plate__play::after {
    content: "→";
    transition: transform var(--mc-dur) var(--mc-ease-out);
}

.mc-plate:hover .mc-plate__play::after {
    transform: translateX(2px);
}

/* Compact variant used in the featured spread */
.mc-plate--compact .mc-plate__frame {
    aspect-ratio: 4 / 3;
}

.mc-plate--compact .mc-plate__title {
    font-size: 0.94rem;
    -webkit-line-clamp: 1;
}

.mc-plate--compact .mc-plate__caption {
    padding: 0.55rem 0.5rem 0.5rem;
    gap: 0.2rem;
}

/* ==================================================================
   6 · Score seal — an editorial stamp, never a star rating
   ================================================================== */
.mc-score {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-variant-numeric: tabular-nums;
}

.mc-score__seal {
    display: inline-grid;
    place-items: center;
    min-width: 2rem;
    height: 2rem;
    padding-inline: 0.3rem;
    font-family: var(--mc-font-display);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    color: var(--mc-ink-pine);
    border: 1px dashed var(--mc-ink-pine);
    border-radius: var(--mc-radius-pill);
    transform: rotate(-4deg);
    background: rgba(232, 163, 23, 0.12);
}

.mc-score__meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.mc-score__label {
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--mc-ink-muted);
    line-height: 1;
}

.mc-score__bar {
    display: block;
    width: 42px;
    height: 3px;
    background: var(--mc-paper-shade);
    overflow: hidden;
}

.mc-score__bar > i {
    display: block;
    height: 100%;
    width: 80%;
    background: var(--mc-marigold-deep);
}

/* Quantised fill widths, 5% per step. Keeps score markup inline-style free. */
.mc-score__fill--70 { width: 70%; }
.mc-score__fill--75 { width: 75%; }
.mc-score__fill--80 { width: 80%; }
.mc-score__fill--85 { width: 85%; }
.mc-score__fill--90 { width: 90%; }
.mc-score__fill--95 { width: 95%; }
.mc-score__fill--100 { width: 100%; }

/* ==================================================================
   7 · Chips & drawer tabs
   ================================================================== */
.mc-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0.35rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mc-ink-soft);
    background: var(--mc-paper-panel);
    border: 1.25px solid var(--mc-rule-ink);
    border-radius: var(--mc-radius-xs);
    transition: background-color var(--mc-dur-fast) var(--mc-ease-out),
        color var(--mc-dur-fast) var(--mc-ease-out),
        border-color var(--mc-dur-fast) var(--mc-ease-out);
}

.mc-chip:hover {
    background: var(--mc-marigold-pale);
    color: var(--mc-ink-pine);
    border-color: var(--mc-ink-pine);
}

.mc-chip[aria-pressed="true"],
.mc-chip.is-active {
    background: var(--mc-ink-pine);
    border-color: var(--mc-ink-pine);
    color: var(--mc-paper);
}

.mc-chip__count {
    font-variant-numeric: tabular-nums;
    opacity: 0.62;
    font-size: 0.66rem;
}

.mc-chip-row {
    display: flex;
    gap: 0.45rem;
    /* Wrap instead of scrolling: a horizontally scrolling row inside a
       centred container is the classic source of sub-pixel page overflow. */
    flex-wrap: wrap;
    align-items: center;
    min-width: 0;
    padding-bottom: 0.35rem;
}

/* ==================================================================
   8 · Related plate — vertical card for the detail page grid
   ================================================================== */
.mc-relcard {
    min-width: 0;
    background: var(--mc-paper-panel);
    border: 1.25px solid var(--mc-ink-pine);
    border-radius: var(--mc-radius-xs);
    overflow: hidden;
    transition: transform var(--mc-dur) var(--mc-ease-out),
        box-shadow var(--mc-dur) var(--mc-ease-out);
}

.mc-relcard:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 rgba(18, 54, 42, 0.16);
}

.mc-relcard:active {
    transform: none;
    box-shadow: none;
}

.mc-relcard__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
}

.mc-relcard__frame {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    /* A related plate is a suggestion, not a feature: at 1440px a 3-column
       grid would otherwise render 417x313 artwork. */
    max-height: 190px;
    overflow: hidden;
    background: var(--mc-paper-deep);
}

.mc-relcard__frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.94) contrast(1.02);
    transition: transform var(--mc-dur-slow) var(--mc-ease-out),
        filter var(--mc-dur) var(--mc-ease-out);
}

.mc-relcard:hover .mc-relcard__frame img {
    transform: scale(1.04);
    filter: saturate(1) contrast(1.04);
}

/* Desk score stamp, matching the one used in the drawer ledger */
.mc-relcard__score {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    min-width: 1.9rem;
    padding: 0.14rem 0.4rem;
    background: var(--mc-marigold);
    border-left: 1.25px solid var(--mc-ink-pine);
    border-bottom: 1.25px solid var(--mc-ink-pine);
    font-family: var(--mc-font-body);
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--mc-ink-on-marigold);
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.mc-relcard__body {
    display: grid;
    gap: 0.12rem;
    padding: 0.5rem 0.55rem 0.6rem;
    min-width: 0;
}

.mc-relcard__name {
    font-family: var(--mc-font-display);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.22;
    color: var(--mc-ink);
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* Always occupy two lines' worth of height. Without this a one-line name
       makes its card ~15px shorter than its neighbours, so the grid rows look
       ragged on every viewport. */
    min-height: calc(1.22em * 2);
}

.mc-relcard__meta {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--mc-ink-muted);
}

/* ==================================================================
   9 · Small print / compliance note
   ================================================================== */
.mc-note {
    position: relative;
    display: grid;
    gap: 0.45rem;
    padding: var(--mc-space-sm) var(--mc-space-sm) var(--mc-space-sm) 1.1rem;
    background: rgba(232, 163, 23, 0.09);
    border: 1px solid rgba(201, 134, 8, 0.34);
    border-left: 4px solid var(--mc-marigold);
    border-radius: 0 var(--mc-radius-xs) var(--mc-radius-xs) 0;
    font-size: var(--mc-text-xs);
    line-height: 1.62;
    /* Slightly deeper than ink-soft: on the marigold wash, ink-soft measures
       4.11:1 at this size and misses the 4.5:1 floor for body text. */
    color: var(--mc-ink);
}

.mc-note strong {
    color: var(--mc-ink);
}

.mc-note a {
    /* Deep brick, not the standard brick: on the marigold wash the lighter
       brick measures 2.74:1, while the deeper tone clears 4.5:1. */
    color: var(--mc-brick-deep);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Two surface treatments, chosen by POSITION rather than by taste:
     .mc-note            standalone disclosure block, full content width
                         (marigold wash, reads as a call-out)
     .mc-note--inset     the same disclosure nested inside a card or column,
                         where a wash would fight the card's own surface
   Same type, same spacing, same semantic weight — only the fill differs. */
.mc-note--inset {
    background: transparent;
    border-color: var(--mc-rule);
    border-left-color: var(--mc-ink-faint);
    color: var(--mc-ink-muted);
}

/* ==================================================================
   10 · Ad slots
   ------------------------------------------------------------------
   Reservation is declarative on purpose. Real inventory is injected by the
   server template, so it is present at parse time; `:has()` then reserves the
   slot's height on the very first paint. An empty slot renders nothing at
   all, which means no layout shift in either case and no blank boxes in
   development.

   JavaScript never changes an ad slot's height — it only adds `is-empty`
   for assistive technology.
   ================================================================== */
.mc-ad {
    display: grid;
    justify-items: center;
    gap: 0.4rem;
    padding: 0.6rem;
    margin-block: var(--mc-space-lg);
    background: rgba(255, 251, 241, 0.6);
    border: 1px dotted var(--mc-rule);
    border-radius: var(--mc-radius-xs);
    overflow: hidden;
}

/* The label is now a real element in the DOM (see .mc-ad__label) so it is
   readable by review crawlers, screen readers and view-source inspection.
   This rule only styles it; it does not generate the text. */
.mc-ad__label {
    display: block;
    width: 100%;
    font-size: 0.54rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--mc-ink-faint);
    text-align: center;
}

/* Nothing to show: occupy no space and announce nothing. */
/* Empty slots collapse — except in preview mode, where the reserved box is
   drawn so its position and height can be inspected before inventory exists.
   Preview is controlled by js/config.js → adPreview. */
.mc-ad.is-empty {
    display: none;
}

.mc-ad[data-ad-state="preview"] {
    display: grid;
    border-style: dashed;
    border-color: var(--mc-marigold-deep);
    background: rgba(232, 163, 23, 0.05);
}

/* The inspection box itself. Not content: aria-hidden, never interactive. */
.mc-ad__ph {
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 0.25rem;
    /* Match the narrowest real creative (300px) rather than stretching to the
       content column. A preview that is 4x wider than the ad it stands in for
       gives a false reading of the layout. */
    width: min(100%, 300px);
    min-height: inherit;
    padding: 1.1rem 0.75rem;
    border: 1px dashed var(--mc-rule);
    border-radius: var(--mc-radius-xs);
    background-image: repeating-linear-gradient(
        45deg,
        rgba(18, 54, 42, 0.045) 0 6px,
        transparent 6px 12px
    );
    text-align: center;
    color: var(--mc-ink-muted);
}

.mc-ad__ph-slot {
    font-family: var(--mc-font-body);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--mc-brick);
}

.mc-ad__ph-size {
    font-family: var(--mc-font-display);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--mc-ink-pine);
    font-variant-numeric: tabular-nums;
}

.mc-ad__ph-kind {
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--mc-ink-faint);
}

/* Match the real creative's geometry in preview too, so the inspected box is
   an accurate stand-in rather than an arbitrary block. */
.mc-ad[data-ad-state="preview"].mc-ad--leader,
.mc-ad[data-ad-state="preview"].mc-ad--rect {
    min-height: 250px;
}

.mc-ad[data-ad-state="preview"].mc-ad--leader .mc-ad__ph {
    width: min(100%, 320px);
}

.mc-ad > * {
    max-width: 100%;
}

/* Reserve the inventory's real geometry once a creative is in the DOM.
   Heights are the tallest creative that can land in each slot (js/config.js:
   leader 320x250, rect 300x250). Reserving a shorter box let a real 250px ad
   push the page down ~180px — measured as 0.18-0.25 CLS. */
.mc-ad--leader:has(iframe, ins, img, embed, object, div[id^="div-gpt-ad"]) {
    min-height: 250px;
}

.mc-ad--rect:has(iframe, ins, img, embed, object, div[id^="div-gpt-ad"]) {
    min-height: 250px;
}

/* ==================================================================
   11 · Colophon footer — a printed ledger, not a link farm
   ================================================================== */
.mc-colophon {
    margin-top: var(--mc-space-2xl);
    background: var(--mc-ink-pine);
    color: var(--mc-paper);
    border-top: 6px solid var(--mc-marigold);
}

.mc-colophon__top {
    display: grid;
    gap: var(--mc-space-lg);
    padding-block: var(--mc-space-xl) var(--mc-space-lg);
}

.mc-colophon__brand {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.mc-colophon__mark {
    /* Authored text is the brand token until js/brand.js swaps in initials. */
    overflow: hidden;
    white-space: nowrap;
    width: 2.6rem;
    height: 2.6rem;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    background: var(--mc-marigold);
    color: var(--mc-ink-on-marigold);
    border-radius: var(--mc-radius-xs);
    font-family: var(--mc-font-display);
    font-size: 1rem;
    font-weight: 700;
}

.mc-colophon__name {
    font-family: var(--mc-font-display);
    font-size: 1.7rem;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.015em;
    color: var(--mc-paper);
}

.mc-colophon__tagline {
    margin-top: 0.45rem;
    font-size: var(--mc-text-sm);
    line-height: 1.62;
    color: rgba(251, 242, 223, 0.7);
    max-width: 34ch;
}

.mc-colophon__col-title {
    padding-bottom: 0.4rem;
    margin-bottom: 0.55rem;
    border-bottom: 1px solid rgba(251, 242, 223, 0.24);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--mc-marigold);
}

.mc-colophon__list {
    display: grid;
    gap: 0.1rem;
}

.mc-colophon__list a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 0.84rem;
    color: rgba(251, 242, 223, 0.82);
    border-bottom: 1px solid transparent;
    transition: color var(--mc-dur-fast) var(--mc-ease-out),
        border-color var(--mc-dur-fast) var(--mc-ease-out);
}

.mc-colophon__list a:hover {
    color: var(--mc-marigold);
    border-bottom-color: var(--mc-marigold);
}

.mc-colophon__cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.9rem;
}

.mc-colophon__cats a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 0.78rem;
    color: rgba(251, 242, 223, 0.7);
    padding-block: 0.28rem;
    border-bottom: 1px solid transparent;
    transition: color var(--mc-dur-fast) var(--mc-ease-out);
}

.mc-colophon__cats a:hover {
    color: var(--mc-marigold);
}

.mc-colophon__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 1rem;
    padding-block: 0.55rem 1.1rem;
    border-top: 1px solid rgba(251, 242, 223, 0.2);
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    /* 0.6 alpha paper on pine measured 3.72:1; 0.76 clears 4.5:1. */
    color: rgba(251, 242, 223, 0.76);
}

/* Footer meta links stack into a 44px-tall row each on narrow screens. */
.mc-colophon__bottom a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
    justify-content: center;
    padding-inline: 0.35rem;
    border-bottom: 1px solid transparent;
    transition: color var(--mc-dur-fast) var(--mc-ease-out),
        border-color var(--mc-dur-fast) var(--mc-ease-out);
}

.mc-colophon__bottom a:hover {
    color: var(--mc-marigold);
    border-bottom-color: var(--mc-marigold);
}

@media (min-width: 760px) {
    .mc-colophon__top {
        grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr) minmax(0, 1.1fr);
        gap: var(--mc-space-md);
    }
}

/* ==================================================================
   12 · Breadcrumb — a record line, not a nav trail
   ================================================================== */
.mc-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mc-ink-muted);
}

.mc-crumb a {
    color: var(--mc-ink-soft);
    border-bottom: 1px solid transparent;
    transition: color var(--mc-dur-fast) var(--mc-ease-out),
        border-color var(--mc-dur-fast) var(--mc-ease-out);
}

.mc-crumb a:hover {
    color: var(--mc-brick);
    border-bottom-color: var(--mc-brick);
}

.mc-crumb__sep {
    color: var(--mc-marigold-deep);
}

.mc-crumb [aria-current="page"] {
    color: var(--mc-ink-pine);
}

/* Top-of-page breadcrumb: the gap it used to carry as an inline style. */
.mc-crumb--page {
    margin-bottom: var(--mc-space-sm);
}

/* ==================================================================
   13 · FAQ rows + fallback image state
   ================================================================== */

/* Produced by faqHtml(): question/answer pairs from the source data. */
.mc-faq__row {
    display: grid;
    gap: 0.2rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px dotted var(--mc-rule);
}

.mc-faq__row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.mc-faq__q--mark {
    color: var(--mc-ink);
}

/* Applied by the image error handler when a game icon 404s and the printed
   placeholder takes over. Keeps the placeholder from looking like artwork. */
img.is-fallback {
    object-fit: cover;
    background: var(--mc-paper-deep);
}
