/* arashkevich.com — The Printed Timetable
   Two inks (black + one green) on cool paper. One variable grotesk (Archivo). */

@font-face {
    font-family: "Archivo";
    src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Archivo";
    src: url("../fonts/archivo-latin.woff2") format("woff2");
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --paper: #f4f5f2;
    --paper-2: #e6e9e4;
    --ink: #101311;
    --ink-2: #39423d;
    --ink-3: #56615b;
    --line: #c6cbc6;
    --spot: #0a5f3f;
    --cover: var(--paper);
    --on-cover: var(--ink);

    /* read by js/game.js on the Play page only */
    --bg: var(--paper);
    --surface: var(--paper-2);
    --accent: #b3261e;
    --ok: var(--spot);

    --font: "Archivo", "Arial Narrow", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --ease-out: cubic-bezier(.23, 1, .32, 1);
    --ease-enter: cubic-bezier(.22, 1, .36, 1);

    --head: 60px;
    --wrap: 1360px;
    --gutter: clamp(20px, 4.5vw, 64px);
    --sheet: clamp(72px, 9.5vw, 136px);

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --paper: #0f1211;
        --paper-2: #171c1a;
        --ink: #e8efe9;
        --ink-2: #bcc8c0;
        --ink-3: #94a199;
        --line: #2c3431;
        --spot: #5fcf9c;
        --accent: #ff8a7a;
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --paper: #0f1211;
    --paper-2: #171c1a;
    --ink: #e8efe9;
    --ink-2: #bcc8c0;
    --ink-3: #94a199;
    --line: #2c3431;
    --spot: #5fcf9c;
    --accent: #ff8a7a;
    color-scheme: dark;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--head) + 16px);
    scrollbar-color: var(--ink-3) var(--paper);
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: var(--spot);
    color: var(--paper);
}

h1, h2, h3, p, ul, ol, dl, dd, figure {
    margin: 0;
}

ul, ol {
    padding: 0;
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: .2em;
    text-decoration-color: currentColor;
    transition: color 150ms ease, text-decoration-color 150ms ease;
}

button {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

.wrap {
    width: min(100% - 2 * var(--gutter), var(--wrap));
    margin-inline: auto;
}

.label,
.mono {
    font-size: .8125rem;
    font-weight: 600;
    font-stretch: 88%;
    line-height: 1.3;
    color: var(--ink-3);
}

.skip {
    position: absolute;
    left: 16px;
    top: 8px;
    z-index: 40;
    padding: 10px 14px;
    background: var(--on-cover);
    color: var(--cover);
    font-weight: 700;
    transform: translateY(-200%);
}

.skip:focus {
    transform: none;
}

/* Running head */

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--cover);
    color: var(--on-cover);
    border-bottom: 2px solid var(--on-cover);
}

.topbar .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: calc(var(--head) - 2px);
}

.brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 800;
    font-stretch: 82%;
    font-size: 1.1875rem;
    letter-spacing: -.01em;
    text-decoration: none;
    white-space: nowrap;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav {
    display: flex;
    gap: 4px;
}

.nav a {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 12px;
    font-size: .9375rem;
    font-weight: 600;
    font-stretch: 92%;
    text-decoration-color: transparent;
    text-underline-offset: .45em;
    text-decoration-thickness: 2px;
}

.nav a[aria-current="page"] {
    text-decoration-color: currentColor;
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: transform 160ms var(--ease-out), background-color 150ms ease;
}

.icon-btn:active {
    transform: scale(.94);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

.theme-toggle .icon-sun {
    display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-sun {
        display: block;
    }

    :root:not([data-theme="light"]) .theme-toggle .icon-moon {
        display: none;
    }
}

.menu-toggle {
    display: none;
}

.menu-toggle .icon-close,
.menu-toggle[aria-expanded="true"] .icon-open {
    display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
    display: block;
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px;
    border: 2px solid var(--ink);
    border-radius: 0;
    background: var(--ink);
    color: var(--paper);
    font-size: 1rem;
    font-weight: 700;
    font-stretch: 90%;
    line-height: 1.1;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms var(--ease-out), background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.btn--line {
    background: transparent;
    color: var(--ink);
}

.btn:active {
    transform: scale(.97);
}

.cover .btn {
    border-color: var(--on-cover);
    background: var(--on-cover);
    color: var(--cover);
}

.cover .btn--line {
    background: transparent;
    color: var(--on-cover);
}

/* Cover (hero and close) */

.cover {
    background: var(--cover);
    color: var(--on-cover);
}

.cover :focus-visible,
.topbar :focus-visible {
    outline-color: var(--on-cover);
}

.hero {
    display: grid;
    grid-template-rows: 1fr auto;
    min-height: calc(100svh - var(--head));
}

.hero-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(220px, 24vw, 340px);
    gap: clamp(28px, 4vw, 56px);
    align-items: stretch;
    padding-block: clamp(28px, 5svh, 52px) clamp(28px, 5svh, 48px);
}

.hero-text {
    container-type: inline-size;
    display: flex;
    flex-direction: column;
}

.hero-foot {
    margin-top: auto;
}

.hero h1 {
    font-size: clamp(3.25rem, min(19.5cqw, 21svh), 11.5rem);
    font-weight: 800;
    font-stretch: 75%;
    line-height: .86;
    letter-spacing: -.03em;
    margin-left: -.02em;
}

.hero h1 .line {
    display: block;
    overflow: hidden;
    padding-block: .06em .04em;
    margin-block: -.06em -.04em;
}

.hero h1 .line > span {
    display: block;
}

.hero-lede {
    margin-top: clamp(20px, 3.4svh, 32px);
    max-width: 34em;
    font-size: clamp(1.1875rem, 1.75vw, 1.5625rem);
    font-weight: 500;
    font-stretch: 94%;
    line-height: 1.3;
    text-wrap: pretty;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: clamp(20px, 3.4svh, 32px);
}

.plate {
    min-height: 320px;
    width: 100%;
    overflow: hidden;
    background: var(--ink);
}

.plate img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 12%;
    filter: url(#duotone) contrast(1.06);
}

.summary-band {
    background: var(--paper);
    color: var(--ink);
    border-top: 6px solid var(--ink);
}

.summary {
    display: grid;
    grid-template-columns: .6fr 1.3fr 1.1fr 1.5fr;
}

.summary > div {
    padding: 14px 20px 18px;
    border-left: 1px solid var(--ink);
}

.summary > div:first-child {
    padding-left: 0;
    border-left: 0;
}

.summary dd {
    margin-top: 2px;
    font-size: clamp(1.125rem, 1.6vw, 1.4375rem);
    font-weight: 700;
    font-stretch: 85%;
    line-height: 1.15;
    letter-spacing: -.01em;
}

/* Sheets */

.sheet {
    padding-block: var(--sheet);
}

.sheet--tint {
    background: var(--paper-2);
}

.sheet-head {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
    align-items: end;
    margin-bottom: clamp(32px, 4vw, 56px);
}

.sheet-head h2 {
    grid-column: 1 / span 6;
}

.sheet-head p {
    grid-column: 8 / -1;
    padding-bottom: .35em;
    font-size: 1.1875rem;
    line-height: 1.4;
    color: var(--ink-2);
    text-wrap: pretty;
}

h2 {
    font-size: clamp(2.5rem, 5.6vw, 5.25rem);
    font-weight: 800;
    font-stretch: 75%;
    line-height: .92;
    letter-spacing: -.025em;
    text-wrap: balance;
}

/* Stack filter */

.filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.filter-label {
    margin-right: 8px;
    font-weight: 700;
    font-stretch: 90%;
}

.chip {
    min-height: 40px;
    padding: 0 14px;
    border: 2px solid var(--ink);
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    font-size: .9375rem;
    font-weight: 700;
    font-stretch: 88%;
    cursor: pointer;
    transition: transform 160ms var(--ease-out), background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.chip:active {
    transform: scale(.96);
}

.chip[aria-pressed="true"] {
    background: var(--spot);
    border-color: var(--spot);
    color: var(--paper);
}

.filter-status {
    margin-left: auto;
    font-size: .9375rem;
    font-weight: 600;
    font-stretch: 90%;
    color: var(--ink-2);
}

/* Timetable: selected work */

.tt-head,
.tt-row {
    display: grid;
    grid-template-columns: 8.5rem 11.5rem minmax(0, 1fr) minmax(0, 17rem);
    column-gap: 24px;
}

.tt-head {
    padding: 10px 0;
    border-top: 4px solid var(--ink);
    border-bottom: 1px solid var(--ink);
}

.tt-head span {
    font-size: .8125rem;
    font-weight: 700;
    font-stretch: 88%;
}

.tt-row {
    padding: 26px 0 28px;
    border-bottom: 1px solid var(--line);
    transition: color 200ms ease;
}

.tt-row:last-child {
    border-bottom: 2px solid var(--ink);
}

.tt[data-filter] .tt-row:not(.is-match) {
    padding-block: 12px;
    align-items: baseline;
    color: var(--ink-3);
}

.tt[data-filter] .tt-row:not(.is-match) .tt-main p,
.tt[data-filter] .tt-row:not(.is-match) .tags,
.tt[data-filter] .tt-row:not(.is-match) .now {
    display: none;
}

.tt[data-filter] .tt-row:not(.is-match) h3 {
    font-size: 1.0625rem;
    font-weight: 600;
}

.tt[data-filter] .tt-row:not(.is-match) .tt-org {
    font-weight: 600;
}

.tt-period {
    font-weight: 600;
    font-stretch: 85%;
    white-space: nowrap;
}

.tt-org {
    font-weight: 800;
    font-stretch: 85%;
    font-size: 1.125rem;
    line-height: 1.25;
}

.tt-row h3 {
    font-size: clamp(1.25rem, 1.9vw, 1.5625rem);
    font-weight: 700;
    font-stretch: 88%;
    line-height: 1.15;
    letter-spacing: -.012em;
    text-wrap: balance;
}

.tt-row p {
    margin-top: 10px;
    max-width: 62ch;
    color: var(--ink-2);
    text-wrap: pretty;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-content: start;
}

.tags li {
    padding: 3px 8px;
    border: 1px solid var(--line);
    font-size: .875rem;
    font-weight: 600;
    font-stretch: 88%;
    line-height: 1.3;
    color: var(--ink-2);
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.tags li.is-hit {
    background: var(--spot);
    border-color: var(--spot);
    color: var(--paper);
}

.now {
    display: inline-block;
    width: .62em;
    height: .62em;
    margin-right: .4em;
    border-radius: 50%;
    background: var(--spot);
    vertical-align: .04em;
}

/* Mark for contract or independent work: an open diamond, drawn in ink */

.indie {
    display: inline-block;
    width: .5em;
    height: .5em;
    margin-left: .5em;
    border: .12em solid currentColor;
    transform: rotate(45deg);
    vertical-align: .1em;
}

.indie--lead {
    margin: 0 .6em 0 .1em;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 28px;
    margin-top: 16px;
    font-size: .875rem;
    font-weight: 500;
    font-stretch: 92%;
    color: var(--ink-2);
}

.legend .stop {
    position: static;
    display: inline-block;
    margin: 0 .5em 0 0;
    vertical-align: -.08em;
}

/* Timetable: experience, with its route line */

.route {
    border-top: 4px solid var(--ink);
    border-bottom: 2px solid var(--ink);
}

.route > li {
    display: grid;
    grid-template-columns: 10.5rem 28px 13rem minmax(0, 1fr);
    column-gap: 20px;
}

.route > li > * {
    padding-block: 18px;
}

.route-line {
    position: relative;
    grid-column: 2;
    padding: 0;
}

.route-line::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(50% - 1px);
    width: 2px;
    background: var(--ink);
}

.route > li:nth-child(2) .route-line::before {
    top: 26px;
}

.route > li:last-child .route-line::before {
    bottom: calc(100% - 30px);
}

.stop {
    position: absolute;
    top: 22px;
    left: calc(50% - 7px);
    width: 14px;
    height: 14px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--paper-2);
}

.stop--now {
    background: var(--spot);
}

.route-period {
    font-weight: 600;
    font-stretch: 85%;
    white-space: nowrap;
}

.route-org {
    font-weight: 700;
    font-stretch: 85%;
    font-size: 1.125rem;
    line-height: 1.3;
}

.route-what h3 {
    font-size: 1.125rem;
    font-weight: 600;
    font-stretch: 90%;
    line-height: 1.3;
}

.route-what p {
    margin-top: 4px;
    max-width: 66ch;
    color: var(--ink-2);
    text-wrap: pretty;
}

.is-now .route-period,
.is-now .route-org,
.is-now .route-what h3 {
    font-weight: 800;
}

.route > .route-group > * {
    padding-block: 26px 4px;
}

.route > .route-group:first-child > * {
    padding-top: 16px;
}

.route-group h3 {
    grid-column: 3 / -1;
    font-size: .8125rem;
    font-weight: 700;
    font-stretch: 88%;
    color: var(--ink-3);
}

.route > .route-group:first-child .route-line::before {
    top: 100%;
}

/* Stack and credentials */

.cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 40px;
}

.cols h3 {
    padding: 10px 0;
    border-top: 4px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    font-size: 1.125rem;
    font-weight: 800;
    font-stretch: 85%;
}

.cols li {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.cols li span {
    display: block;
    font-size: .9375rem;
    color: var(--ink-3);
}

.cols--creds {
    margin-top: 56px;
}

.cols--creds h3 {
    border-top-width: 2px;
}

/* Close */

.close {
    padding-block: var(--sheet) 0;
    border-top: 6px solid var(--ink);
}

.close h2 {
    max-width: 16em;
    font-size: clamp(1.375rem, 3.4vw, 3.25rem);
    line-height: 1;
}

.mail {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin-top: clamp(24px, 4vw, 48px);
    font-size: clamp(1.625rem, 8.2vw, 6rem);
    font-weight: 800;
    font-stretch: 75%;
    line-height: 1;
    letter-spacing: -.02em;
    text-decoration-thickness: .06em;
    text-underline-offset: .14em;
    text-decoration-skip-ink: none;
    overflow-wrap: anywhere;
}

.close-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: clamp(28px, 4vw, 44px);
}

.copy .copy-label {
    display: inline-block;
    transition: opacity 180ms ease, filter 180ms ease;
}

.copy.is-swapping .copy-label {
    opacity: 0;
    filter: blur(2px);
}

.imprint {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: clamp(56px, 8vw, 104px);
    border-top: 2px solid var(--on-cover);
    font-size: .9375rem;
    font-weight: 500;
    font-stretch: 92%;
}

.imprint > * {
    padding: 16px 20px 28px;
    border-left: 1px solid var(--on-cover);
}

.imprint > *:first-child {
    padding-left: 0;
    border-left: 0;
}

/* Hover, for a fine pointer only */

@media (hover: hover) and (pointer: fine) {
    a:hover {
        text-decoration-thickness: 2px;
    }

    main .sheet a:hover {
        color: var(--spot);
    }

    .nav a:hover {
        text-decoration-color: currentColor;
    }

    .icon-btn:hover {
        background: color-mix(in srgb, var(--on-cover) 16%, transparent);
    }

    .btn:hover {
        transform: translateY(-1px);
        background: var(--spot);
        border-color: var(--spot);
        color: var(--paper);
    }

    .btn--line:hover {
        background: var(--ink);
        border-color: var(--ink);
        color: var(--paper);
    }

    .btn:active {
        transform: scale(.97);
    }

    .chip:hover {
        background: var(--ink);
        color: var(--paper);
    }

    .chip[aria-pressed="true"]:hover {
        background: var(--spot);
        color: var(--paper);
    }

    .mail:hover {
        text-decoration-thickness: .1em;
    }
}

/* Cover entrance, once on load */

@media (prefers-reduced-motion: no-preference) {
    .hero h1 .line > span {
        animation: rise 700ms var(--ease-enter) backwards;
    }

    .hero h1 .line:nth-child(2) > span {
        animation-delay: 80ms;
    }

    .hero-lede,
    .hero-actions > * {
        animation: fade-up 520ms var(--ease-enter) backwards;
    }

    .hero-lede {
        animation-delay: 300ms;
    }

    .hero-actions > :nth-child(1) {
        animation-delay: 360ms;
    }

    .hero-actions > :nth-child(2) {
        animation-delay: 410ms;
    }

    .hero-actions > :nth-child(3) {
        animation-delay: 450ms;
    }

    .plate img {
        animation: settle 1100ms var(--ease-enter) backwards;
    }

    .menu-open .nav {
        animation: drop 200ms var(--ease-out) backwards;
    }
}

@keyframes rise {
    from {
        transform: translateY(105%);
    }
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}

@keyframes settle {
    from {
        transform: scale(1.05);
    }
}

@keyframes drop {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn,
    .chip,
    .icon-btn,
    .tt-row {
        transition-property: background-color, color, border-color, opacity;
    }

    .btn:hover,
    .btn:active,
    .chip:active,
    .icon-btn:active {
        transform: none;
    }
}

/* Play page */

.play {
    padding: clamp(40px, 7vw, 88px) 0 clamp(64px, 9vw, 112px);
}

.play-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
    gap: clamp(32px, 6vw, 80px);
    align-items: start;
}

.play-intro h1 {
    font-size: clamp(3.5rem, 10vw, 8rem);
    font-weight: 800;
    font-stretch: 75%;
    line-height: .88;
    letter-spacing: -.03em;
}

.play-intro h1 em {
    font-style: normal;
    color: var(--spot);
}

.play-lede {
    margin-top: 24px;
    max-width: 52ch;
    font-size: 1.125rem;
    color: var(--ink-2);
}

.play .legend {
    display: block;
    margin-top: 32px;
    border-top: 4px solid var(--ink);
    font-size: 1rem;
    color: var(--ink);
}

.play .legend div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.play .legend dt {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.play .legend dd {
    color: var(--ink-2);
}

.swatch {
    position: relative;
    width: 14px;
    height: 14px;
}

.swatch-req {
    background: var(--ink);
}

.swatch-bug::before,
.swatch-bug::after,
.swatch-patch::before,
.swatch-patch::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 3px;
    height: 14px;
    margin-left: -1.5px;
}

.swatch-bug::before,
.swatch-bug::after {
    background: var(--accent);
    transform: rotate(45deg);
}

.swatch-bug::after {
    transform: rotate(-45deg);
}

.swatch-patch::before,
.swatch-patch::after {
    background: var(--ok);
}

.swatch-patch::after {
    transform: rotate(90deg);
}

.keys {
    margin-top: 24px;
}

.hud {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.hud strong {
    color: var(--ink);
    font-weight: 800;
}

.stage {
    position: relative;
}

#board {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    border: 2px solid var(--ink);
    touch-action: none;
    cursor: grab;
}

.overlay {
    position: absolute;
    inset: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    background: color-mix(in srgb, var(--paper-2) 88%, transparent);
    text-align: center;
}

.overlay[hidden] {
    display: none;
}

.overlay-title {
    font-size: 2rem;
    font-weight: 800;
    font-stretch: 78%;
    line-height: 1;
    letter-spacing: -.02em;
}

.overlay .btn {
    margin-top: 12px;
}

.pad {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.pad-btn {
    height: 56px;
    border: 2px solid var(--ink);
    border-radius: 0;
    background: var(--paper);
    color: var(--ink);
    display: grid;
    place-items: center;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

@media (pointer: coarse) {
    .pad {
        display: grid;
    }
}

/* Responsive */

@media (max-width: 1100px) {
    .tt-head,
    .tt-row {
        grid-template-columns: 8rem 10rem minmax(0, 1fr);
    }

    .tt-head span:last-child {
        display: none;
    }

    .tt-row .tags {
        grid-column: 3;
        margin-top: 14px;
    }

    .route > li {
        grid-template-columns: 9.5rem 24px 10.5rem minmax(0, 1fr);
        column-gap: 16px;
    }
}

@media (max-width: 860px) {
    .nav {
        display: none;
    }

    .menu-toggle {
        display: inline-grid;
    }

    .menu-open .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: grid;
        gap: 0;
        padding: 4px var(--gutter) 16px;
        background: var(--paper);
        color: var(--ink);
        border-bottom: 6px solid var(--ink);
    }

    .menu-open .nav a {
        height: 52px;
        padding: 0;
        border-bottom: 1px solid var(--ink);
        font-size: 1.25rem;
        font-weight: 700;
        font-stretch: 85%;
    }

    .menu-open .nav a:last-child {
        border-bottom: 0;
    }

    .menu-open .nav :focus-visible {
        outline-color: var(--ink);
    }

    .hero-main {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero h1 {
        font-size: clamp(3.25rem, 19.5cqw, 9rem);
    }

    .plate {
        aspect-ratio: 16 / 10;
        min-height: 0;
    }

    .hero-foot {
        margin-top: 0;
    }

    .summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .summary > div {
        padding: 12px 16px 14px;
    }

    .summary > div:nth-child(odd) {
        padding-left: 0;
        border-left: 0;
    }

    .summary > div:nth-child(n + 3) {
        border-top: 1px solid var(--ink);
    }

    .sheet-head {
        display: block;
    }

    .sheet-head p {
        margin-top: 16px;
        padding-bottom: 0;
        max-width: 38em;
    }

    .filter-status {
        flex-basis: 100%;
        margin-left: 0;
    }

    .chip {
        min-height: 44px;
    }

    .tt-head {
        display: block;
        padding: 0;
        border-bottom: 0;
    }

    .tt-head span {
        display: none;
    }

    .tt-row {
        grid-template-columns: auto minmax(0, 1fr);
        column-gap: 14px;
        row-gap: 0;
        padding: 22px 0 24px;
    }

    .tt-period {
        order: 2;
        align-self: baseline;
    }

    .tt-org {
        order: 1;
        align-self: baseline;
    }

    .tt-main,
    .tt-row .tags {
        order: 3;
        grid-column: 1 / -1;
        margin-top: 12px;
    }

    .route > li {
        grid-template-columns: 22px minmax(0, 1fr);
        column-gap: 14px;
    }

    .route > li > * {
        grid-column: 2;
        padding-block: 0;
    }

    .route > li > .route-line {
        grid-column: 1;
        grid-row: 1 / span 3;
    }

    .route > li > .route-period {
        padding-top: 16px;
        font-size: .9375rem;
        color: var(--ink-2);
    }

    .route > li > .route-what {
        padding-bottom: 18px;
    }

    .route > .route-group > h3 {
        grid-column: 2;
        padding-block: 22px 2px;
    }

    .route > .route-group:first-child > h3 {
        padding-top: 14px;
    }

    .cols {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 32px;
    }

    .imprint {
        grid-template-columns: minmax(0, 1fr);
    }

    .imprint > * {
        padding: 14px 0;
        border-left: 0;
        border-bottom: 1px solid color-mix(in srgb, var(--on-cover) 35%, transparent);
    }

    .imprint > *:last-child {
        border-bottom: 0;
        padding-bottom: 28px;
    }

    .play-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .game {
        max-width: 380px;
    }
}

@media (max-width: 520px) {
    .hero-actions,
    .close-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .summary > div,
    .summary > div:nth-child(odd) {
        display: grid;
        grid-template-columns: 5.5rem minmax(0, 1fr);
        align-items: baseline;
        padding: 10px 0;
        border-left: 0;
    }

    .summary > div + div {
        border-top: 1px solid var(--ink);
    }

    .summary dd {
        margin-top: 0;
    }
}

/* Word spaces: the condensed bold sets need more than the face's default */

h2,
.hero h1,
.mail,
.play-intro h1,
.overlay-title {
    word-spacing: .1em;
}

.close h2 {
    word-spacing: .14em;
}

.brand,
.btn,
.chip,
.filter-label,
.summary dd,
.tt-org,
.tt-row h3,
.route-org,
.route-what h3,
.cols h3,
.menu-open .nav a {
    word-spacing: .06em;
}

.pad-btn svg {
    width: 24px;
    height: 24px;
}
