/*
 * Sudoku Classic: Legacy Puzzle — the whole site's stylesheet.
 *
 * The look is meant to read as "legacy": paper rather than screen, ink rather
 * than colour, and a single blue that only ever means "this is interactive".
 * The board is the loudest thing on any page it appears on; nothing else may
 * out-shout it. One gradient exists (the hero wash) and it is barely there.
 *
 * Fonts are the app's own — Titan One for the wordmark, Fredoka for everything
 * else — so the site and the game are visibly one product. Both are SIL Open
 * Font License; the licence files ship beside them in /fonts.
 */

/* ------------------------------------------------------------------ fonts */

@font-face {
    font-family: 'Fredoka';
    src: url('/fonts/Fredoka.ttf') format('truetype-variations');
    font-weight: 300 700;
    font-display: swap;
}

@font-face {
    font-family: 'Titan One';
    src: url('/fonts/TitanOne-Regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

/* ------------------------------------------------------------------ tokens */

:root {
    color-scheme: light dark;

    /* Surfaces: warm off-white, so long stretches of text do not glare. */
    --paper: #FCFBF8;
    --paper-sunk: #F3F0E9;
    --panel: #FFFFFF;

    /* Ink */
    --ink: #171A21;
    --ink-soft: #4E5666;
    --ink-faint: #767E8E;

    /* Lines */
    --rule: #E2DDD2;
    --rule-strong: #C6BFB1;

    /* Brand — the app icon's navy, and the one interactive blue. */
    --navy: #143C70;
    --navy-deep: #0A2A55;
    --accent: #1A639F;
    --accent-hover: #12507F;
    --accent-wash: #EAF1F8;

    /* Board */
    --cell: #FFFFFF;
    --cell-unit: #EDF2F8;
    --cell-same: #D7E5F4;
    --cell-sel: #B8D3EE;
    --grid-thin: #CFD6DF;
    --grid-thick: #3B4459;
    --digit-given: #171A21;
    --digit-user: #12507F;
    --note: #7A8496;

    /* Feedback */
    --good: #2E7D4F;
    --warn: #B07219;
    --bad: #B5453C;

    --shadow-sm: 0 1px 2px rgba(23, 26, 33, .06), 0 2px 6px rgba(23, 26, 33, .05);
    --shadow-md: 0 2px 4px rgba(23, 26, 33, .06), 0 10px 24px rgba(23, 26, 33, .07);
    --shadow-lg: 0 4px 8px rgba(23, 26, 33, .06), 0 20px 44px rgba(23, 26, 33, .10);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;

    --measure: 68ch;
    --shell: 1140px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: #12151B;
        --paper-sunk: #0D1015;
        --panel: #191D25;

        --ink: #ECEFF4;
        --ink-soft: #B4BCCA;
        --ink-faint: #8A93A3;

        --rule: #2A303B;
        --rule-strong: #3B434F;

        --accent: #74B4E8;
        --accent-hover: #9BCBF2;
        --accent-wash: #16202C;

        --cell: #1B2029;
        --cell-unit: #232A36;
        --cell-same: #2C3A4C;
        --cell-sel: #3A5170;
        --grid-thin: #333B48;
        --grid-thick: #5A657A;
        --digit-given: #ECEFF4;
        --digit-user: #8FC6F2;
        --note: #7E889A;

        --good: #6BBF8C;
        --warn: #D9A34E;
        --bad: #E38A82;

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
        --shadow-md: 0 2px 4px rgba(0, 0, 0, .4), 0 10px 24px rgba(0, 0, 0, .35);
        --shadow-lg: 0 4px 8px rgba(0, 0, 0, .4), 0 20px 44px rgba(0, 0, 0, .45);
    }
}

/* ------------------------------------------------------------------- base */

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

html {
    scroll-behavior: smooth;
    /* No max on the user's own zoom, anywhere. */
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Fredoka', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    /* Nothing on this site may scroll sideways; wide things scroll inside
       their own container instead (see .scroll-x). */
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

img,
svg {
    max-width: 100%;
    height: auto;
}

/* --------------------------------------------------------------- headings */

h1, h2, h3, h4 {
    margin: 0 0 .5em;
    line-height: 1.25;
    font-weight: 600;
    color: var(--ink);
    text-wrap: balance;
}

h1 {
    font-size: clamp(1.85rem, 1.2rem + 2.2vw, 2.7rem);
    letter-spacing: -.01em;
}

h2 {
    font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.8rem);
    margin-top: 2.25em;
}

h3 {
    font-size: 1.12rem;
    margin-top: 1.75em;
}

p, ul, ol {
    margin: 0 0 1.1em;
}

ul, ol {
    padding-left: 1.35em;
}

li {
    margin-bottom: .45em;
}

li::marker {
    color: var(--accent);
}

strong {
    font-weight: 600;
}

a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: .18em;
}

a:hover {
    color: var(--accent-hover);
}

/* One focus ring, everywhere, and never removed. */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --------------------------------------------------------------- skip link */

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--panel);
    color: var(--ink);
    padding: .65rem 1.1rem;
    border-radius: 0 0 var(--radius) 0;
    box-shadow: var(--shadow-md);
}

.skip-link:focus {
    left: 0;
}

/* ------------------------------------------------------------------ shell */

.shell {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
}

.prose {
    max-width: var(--measure);
}

.prose h2 + p,
.prose h3 + p {
    margin-top: 0;
}

section {
    padding-block: clamp(2.5rem, 6vw, 4.25rem);
}

section + section {
    border-top: 1px solid var(--rule);
}

.lede {
    font-size: 1.08rem;
    color: var(--ink-soft);
    max-width: 60ch;
}

.eyebrow {
    display: inline-block;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-wash);
    border: 1px solid var(--rule);
    border-radius: 999px;
    padding: .25rem .8rem;
    margin-bottom: 1rem;
}

.muted {
    color: var(--ink-soft);
}

/* ----------------------------------------------------------------- header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rule);
}

.site-header .shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 62px;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
    color: var(--ink);
    font-family: 'Titan One', 'Fredoka', sans-serif;
    font-size: 1.05rem;
    letter-spacing: .01em;
    white-space: nowrap;
}

.wordmark img {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    flex-shrink: 0;
}

.wordmark .mark-sub {
    color: var(--ink-faint);
    font-family: 'Fredoka', sans-serif;
    font-size: .78rem;
    letter-spacing: 0;
}

.site-nav ul {
    display: flex;
    align-items: center;
    gap: .35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav a {
    display: inline-block;
    padding: .45rem .7rem;
    border-radius: var(--radius-sm);
    color: var(--ink-soft);
    text-decoration: none;
    font-size: .93rem;
    font-weight: 500;
    transition: background-color .15s, color .15s;
}

.site-nav a:hover {
    background: var(--accent-wash);
    color: var(--accent);
}

.site-nav a[aria-current="page"] {
    color: var(--ink);
    font-weight: 600;
    background: var(--paper-sunk);
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: .5rem;
    background: none;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius-sm);
    color: var(--ink);
    font: inherit;
    font-size: .9rem;
    padding: .4rem .7rem;
    cursor: pointer;
}

/* Below this the nav collapses behind a button. `hidden` on the list is the
   real state; CSS only decides where it sits. */
@media (max-width: 860px) {
    .nav-toggle {
        display: inline-flex;
    }

    .site-header .shell {
        flex-wrap: wrap;
        padding-bottom: .5rem;
    }

    .site-nav {
        order: 3;
        width: 100%;
    }

    .site-nav[hidden] {
        display: none;
    }

    .site-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding-bottom: .4rem;
    }

    .site-nav a {
        padding: .7rem .6rem;
        border-radius: var(--radius-sm);
    }
}

/* A device without JavaScript never gets the toggle, and never loses the nav. */
.no-js .nav-toggle {
    display: none;
}

/* ------------------------------------------------------------------ hero */

.hero {
    position: relative;
    padding-block: clamp(2.25rem, 5vw, 3.75rem) clamp(2.5rem, 6vw, 4rem);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 60% 50% at 50% -10%,
            color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: clamp(1.75rem, 4vw, 3.25rem);
    align-items: center;
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-board {
        order: -1;
    }
}

.hero h1 {
    margin-bottom: .35em;
}

.hero h1 .wordmark-line {
    display: block;
    font-family: 'Titan One', sans-serif;
    font-weight: 400;
    color: var(--navy);
    letter-spacing: .01em;
}

@media (prefers-color-scheme: dark) {
    .hero h1 .wordmark-line {
        color: var(--accent);
    }
}

.hero h1 .sub-line {
    display: block;
    font-size: .48em;
    color: var(--ink-soft);
    font-weight: 500;
    letter-spacing: .01em;
    margin-top: .25em;
}

/* ---------------------------------------------------------------- buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .78rem 1.6rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font: inherit;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s, transform .1s;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--accent);
    color: #FFFFFF;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #FFFFFF;
}

@media (prefers-color-scheme: dark) {
    .btn-primary {
        background: var(--accent);
        color: #0B1017;
    }

    .btn-primary:hover {
        background: var(--accent-hover);
        color: #0B1017;
    }
}

.btn-secondary {
    background: var(--panel);
    color: var(--ink);
    border-color: var(--rule-strong);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn[aria-disabled="true"],
.btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    margin-top: 1.5rem;
}

.btn-note {
    color: var(--ink-faint);
    font-size: .9rem;
}

/* ------------------------------------------------------------------ board */

.board {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 1px;
    width: min(100%, 440px);
    aspect-ratio: 1;
    margin-inline: auto;
    background: var(--grid-thin);
    border: 10px solid var(--panel);
    border-radius: var(--radius-lg);
    outline: 1px solid var(--rule);
    box-shadow: var(--shadow-lg);
}

.board .c {
    background: var(--cell);
    display: grid;
    place-items: center;
    position: relative;
    font-size: clamp(.85rem, .5rem + 1.6vw, 1.3rem);
    font-weight: 500;
    color: var(--digit-given);
}

.board .c.user {
    color: var(--digit-user);
    font-weight: 600;
}

.board .c.unit { background: var(--cell-unit); }
.board .c.same { background: var(--cell-same); }
.board .c.sel  { background: var(--cell-sel); }

.board .c:nth-child(3n+1) { border-left: 2px solid var(--grid-thick); }
.board .c:nth-child(9n)   { border-right: 2px solid var(--grid-thick); }
.board .c:nth-child(-n+9) { border-top: 2px solid var(--grid-thick); }
.board .c:nth-child(n+19):nth-child(-n+27),
.board .c:nth-child(n+46):nth-child(-n+54),
.board .c:nth-child(n+73):nth-child(-n+81) { border-bottom: 2px solid var(--grid-thick); }

.board .notes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    height: 100%;
    place-items: center;
    font-size: .5em;
    font-weight: 400;
    line-height: 1;
    color: var(--note);
}

.board-caption {
    margin: .9rem auto 0;
    max-width: 44ch;
    text-align: center;
    font-size: .88rem;
    color: var(--ink-faint);
}

/* Small illustrative grids on the rules page. */
.mini-grids {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: flex-start;
    margin-bottom: 1.5rem;
}

.mini {
    text-align: center;
}

.mini .g {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 1px;
    width: 132px;
    aspect-ratio: 1;
    background: var(--grid-thin);
    border: 2px solid var(--grid-thick);
    border-radius: 4px;
    overflow: hidden;
}

.mini .g i {
    background: var(--cell);
}

.mini .g i.on {
    background: var(--cell-sel);
}

.mini figcaption {
    margin-top: .5rem;
    font-size: .85rem;
    color: var(--ink-soft);
}

/* ------------------------------------------------------------------ cards */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
    gap: 1.1rem;
}

.card {
    background: var(--panel);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: border-color .18s, box-shadow .18s, transform .18s;
}

.card h3 {
    margin-top: 0;
    font-size: 1.05rem;
}

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

a.card {
    display: block;
    text-decoration: none;
    color: inherit;
}

a.card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

a.card:hover h3 {
    color: var(--accent);
}

.card .card-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: .85rem;
    border-radius: var(--radius-sm);
    background: var(--accent-wash);
    border: 1px solid var(--rule);
    font-size: 1.15rem;
}

.card .grade-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: .5rem;
    vertical-align: middle;
}

.card .meta {
    margin: .35rem 0 0;
    font-size: .84rem;
    color: var(--ink-faint);
}

/* ------------------------------------------------------------------ table */

.scroll-x {
    overflow-x: auto;
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: .96rem;
}

caption {
    text-align: left;
    padding: 1rem 1.25rem 0;
    color: var(--ink-faint);
    font-size: .88rem;
}

th, td {
    text-align: left;
    padding: .85rem 1.25rem;
    border-bottom: 1px solid var(--rule);
}

thead th {
    background: var(--paper-sunk);
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

tbody tr:last-child td {
    border-bottom: none;
}

td.nowrap {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------- game */

.game-shell {
    padding-block: 1rem 1.5rem;
}

/*
 * The element the Flutter engine mounts into. It needs a real height before
 * the engine boots or the page would jump when the game appears, so the height
 * is set here and nowhere else.
 */
#sudoku-game-host {
    position: relative;
    width: 100%;
    height: min(78vh, 760px);
    min-height: 520px;
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    /*
      The game's own backdrop art, so the box the engine mounts into already
      looks like the game before a single frame is painted — no flash from a
      flat navy panel to the artwork a second later. The colour underneath is
      what shows if the image has not arrived yet.

      This is a half-resolution copy of the app's `assets/images/bg_game.webp`;
      it only ever sits behind a loading message.
    */
    background-color: var(--navy-deep);
    background-image: url('/images/bg_game.webp');
    background-size: cover;
    background-position: center;
}

@media (max-width: 700px) {
    #sudoku-game-host {
        height: min(88vh, 720px);
        min-height: 480px;
        border-radius: var(--radius);
    }
}

.game-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    text-align: center;
    color: #E4ECF6;
    /*
      Translucent, so the artwork behind shows through at roughly the same
      strength the game itself dims it to — and the loading text still clears
      contrast over the picture's brighter corners.
    */
    background: linear-gradient(180deg,
        rgba(20, 60, 112, .58) 0%,
        rgba(10, 42, 85, .74) 100%);
}

.game-fallback img {
    width: 84px;
    height: 84px;
    border-radius: 18px;
}

.game-fallback p {
    margin: 0;
    max-width: 40ch;
    font-size: .95rem;
    color: #C4D3E6;
}

.game-fallback .bar {
    width: 170px;
    height: 4px;
    border-radius: 999px;
    background: rgba(228, 236, 246, .22);
    overflow: hidden;
}

.game-fallback .bar i {
    display: block;
    width: 40%;
    height: 100%;
    border-radius: 999px;
    background: #8FC6F2;
    animation: legacy-slide 1.1s ease-in-out infinite;
}

@keyframes legacy-slide {
    from { transform: translateX(-110%); }
    to   { transform: translateX(260%); }
}

.grade-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.grade-chips a {
    display: inline-block;
    padding: .4rem .9rem;
    border: 1px solid var(--rule-strong);
    border-radius: 999px;
    background: var(--panel);
    color: var(--ink);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
}

.grade-chips a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* --------------------------------------------------------------- contents */

.toc {
    background: var(--panel);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.4rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.toc h2 {
    margin: 0 0 .5rem;
    font-size: .8rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.toc ol {
    margin: 0;
    padding-left: 1.25em;
    columns: 2;
    column-gap: 2rem;
}

.toc li {
    margin-bottom: .3em;
    break-inside: avoid;
}

@media (max-width: 620px) {
    .toc ol {
        columns: 1;
    }
}

/* --------------------------------------------------------------- callouts */

.callout {
    background: var(--accent-wash);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
}

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

.callout.warn {
    border-left-color: var(--warn);
    background: color-mix(in srgb, var(--warn) 9%, var(--paper));
}

.updated {
    color: var(--ink-faint);
    font-size: .9rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid var(--rule);
}

/* -------------------------------------------------------------------- FAQ */

.faq {
    border-top: 1px solid var(--rule);
}

.faq details {
    border-bottom: 1px solid var(--rule);
    padding: .35rem 0;
}

.faq summary {
    cursor: pointer;
    padding: .85rem .25rem;
    font-weight: 600;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
}

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

.faq summary::after {
    content: "+";
    color: var(--accent);
    font-size: 1.2rem;
    line-height: 1;
    flex-shrink: 0;
}

.faq details[open] summary::after {
    content: "\2212";
}

.faq details > p:last-child {
    margin-bottom: 1rem;
    color: var(--ink-soft);
    padding-inline: .25rem;
    max-width: var(--measure);
}

/* ----------------------------------------------------------------- footer */

.site-footer {
    flex-shrink: 0;
    margin-top: 3rem;
    border-top: 1px solid var(--rule);
    background: var(--paper-sunk);
    padding-block: 2.5rem 2rem;
    font-size: .93rem;
    color: var(--ink-soft);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

@media (max-width: 820px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.75rem;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.site-footer h2 {
    margin: 0 0 .7rem;
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

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

.site-footer li {
    margin-bottom: .4em;
}

.site-footer a {
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.footer-brand .wordmark {
    margin-bottom: .6rem;
}

.footer-brand p {
    margin: 0 0 .5rem;
    max-width: 34ch;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--rule);
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    justify-content: space-between;
    color: var(--ink-faint);
    font-size: .88rem;
}

/* ----------------------------------------------------------- region block */

/*
 * The screen shown where the game is not offered. Its own small world: the
 * game's backdrop art, one card, and nothing that leads back to the board.
 */
.region-block {
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(20, 60, 112, .72), rgba(10, 42, 85, .86)),
        url('/images/bg_game.webp') center / cover no-repeat fixed;
    background-color: var(--navy-deep);
}

.region-block-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: clamp(1rem, 5vw, 3rem);
}

.region-card {
    width: min(100%, 620px);
    background: var(--panel);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 4vw, 2.75rem);
    box-shadow: var(--shadow-lg);
}

.region-card .region-mark {
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.region-card h1 {
    font-family: 'Titan One', sans-serif;
    font-weight: 400;
    font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.4rem);
    line-height: 1.15;
    color: var(--navy-deep);
    margin-bottom: .75em;
}

@media (prefers-color-scheme: dark) {
    .region-card h1 {
        color: var(--accent);
    }
}

.region-card p {
    color: var(--ink-soft);
    max-width: 54ch;
}

.region-card hr {
    border: 0;
    border-top: 1px solid var(--rule);
    margin: 1.75rem 0 1.25rem;
}

.region-links {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
}

.region-links a {
    text-decoration: none;
    font-weight: 500;
}

.region-links a:hover {
    text-decoration: underline;
}

/* ------------------------------------------------------------------ error */

.error-page {
    text-align: center;
    padding-block: clamp(3rem, 12vw, 6rem);
}

.error-page .code {
    font-family: 'Titan One', sans-serif;
    font-size: clamp(3.5rem, 14vw, 6rem);
    line-height: 1;
    color: var(--rule-strong);
    margin: 0 0 .25em;
}

/* -------------------------------------------------------------- utilities */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.stack > * + * {
    margin-top: 1.1rem;
}

.center {
    text-align: center;
}

.center .lede {
    margin-inline: auto;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }

    .game-fallback .bar i {
        width: 100%;
        opacity: .7;
    }
}
