/*
 * pasianskosinka.ru — site styles.
 *
 * The visual language is taken from the original Klondike window: teal desktop, silver windows with 9x bevels,
 * navy→blue title bars, green felt. Colors are CSS custom properties so every component stays in sync.
 * No nesting and no very recent syntax on purpose: nostalgic visitors often run older browsers.
 */

/* ----------------------------------------------------------------------------------------------- */
/* 1. Tokens and base                                                                               */
/* ----------------------------------------------------------------------------------------------- */

:root {
    --c-desktop: #008080;
    --c-desktop-dark: #006a6a;
    --c-silver: #c0c0c0;
    --c-silver-light: #dfdfdf;
    --c-white: #fff;
    --c-gray: #808080;
    --c-black: #000;
    --c-navy: #000080;
    --c-blue: #1084d0;
    --c-felt: #008000;
    --c-card-back: #02027f;
    --c-link: #0000a8;
    --c-link-visited: #5a1a7a;
    --c-muted: #3c3c3c;
    --c-danger: #b00000;

    --font-ui: Tahoma, "Segoe UI", Verdana, "Noto Sans", "DejaVu Sans", Geneva, sans-serif;

    --content-width: 52rem;
    --wide-width: 64rem;
    --game-width: 78rem;
    --gap: 14px;

    --win-shadow: 2px 2px 0 rgba(0, 0, 0, 0.32);

    /* 9x bevels: [top right bottom left] */
    --bevel-out-border: var(--c-silver-light) var(--c-black) var(--c-black) var(--c-silver-light);
    --bevel-out-inner: inset 1px 1px 0 var(--c-white), inset -1px -1px 0 var(--c-gray);
    --bevel-in-border: var(--c-gray) var(--c-white) var(--c-white) var(--c-gray);
    --bevel-in-inner: inset 1px 1px 0 var(--c-black), inset -1px -1px 0 var(--c-silver-light);
}

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

html {
    background: var(--c-desktop);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    color-scheme: light;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-ui);
    font-size: 16px;
    line-height: 1.6;
    color: var(--c-black);
}

h1,
h2,
h3,
h4 {
    margin: 0 0 0.5em;
    line-height: 1.25;
    font-weight: 700;
}

p {
    margin: 0 0 1em;
}

ul,
ol {
    margin: 0 0 1em;
    padding-inline-start: 1.5em;
}

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

img {
    height: auto;
}

button {
    font: inherit;
    color: inherit;
}

a {
    color: var(--c-link);
}

a:visited {
    color: var(--c-link-visited);
}

:focus-visible {
    outline: 2px solid var(--c-black);
    outline-offset: 2px;
}

.site-header :focus-visible,
.crumbs :focus-visible {
    outline-color: var(--c-white);
}

.icon {
    inline-size: 16px;
    block-size: 16px;
    flex: none;
}

/* Every icon once, as <symbol>s; the page copies them with <use href="#i-…">. */
.icon-sprite {
    position: absolute;
    inline-size: 0;
    block-size: 0;
    overflow: hidden;
}

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

.skip-link {
    position: absolute;
    z-index: 100;
    inset-block-start: -100px;
    inset-inline-start: 8px;
    padding: 8px 12px;
    background: var(--c-navy);
    color: var(--c-white);
    font: 700 13px var(--font-ui);
    text-decoration: none;
}

.skip-link:focus {
    inset-block-start: 8px;
}

/* ----------------------------------------------------------------------------------------------- */
/* 2. Bevels, buttons, fields                                                                       */
/* ----------------------------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-block-size: 26px;
    padding: 3px 11px;
    background: var(--c-silver);
    color: var(--c-black);
    text-decoration: none;
    font: 13px/1.2 var(--font-ui);
    border: 1px solid;
    border-color: var(--bevel-out-border);
    box-shadow: var(--bevel-out-inner);
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.btn:hover {
    background: var(--c-silver-light);
}

/* Pressed: bevels flip and the label moves one pixel down-right, as in Windows. */
.btn:active,
.btn.is-pressed,
.btn[aria-pressed="true"],
.btn[aria-current="page"] {
    padding: 4px 10px 2px 12px;
    background: var(--c-silver);
    border-color: var(--c-black) var(--c-silver-light) var(--c-silver-light) var(--c-black);
    box-shadow: inset 1px 1px 0 var(--c-gray), inset -1px -1px 0 var(--c-white);
}

.btn:focus-visible {
    outline: 1px dotted var(--c-black);
    outline-offset: -4px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
    color: var(--c-gray);
    text-shadow: 1px 1px 0 var(--c-white);
    cursor: default;
}

.btn:disabled .icon {
    opacity: 0.4;
}

.btn--primary {
    box-shadow: 0 0 0 1px var(--c-black), var(--bevel-out-inner);
}

.btn--primary:active,
.btn--primary.is-pressed,
.btn--primary[aria-current="page"] {
    box-shadow: 0 0 0 1px var(--c-black), inset 1px 1px 0 var(--c-gray), inset -1px -1px 0 var(--c-white);
}

.btn--lg {
    min-block-size: 34px;
    padding: 5px 16px;
    font-size: 14px;
}

.btn--lg:active,
.btn--lg.is-pressed,
.btn--lg[aria-current="page"] {
    padding: 6px 15px 4px 17px;
}

/* Touch screens get larger targets without changing the look on desktop. */
@media (pointer: coarse) {
    .btn {
        min-block-size: 38px;
        padding: 8px 14px;
        font-size: 14px;
    }

    .btn:active,
    .btn.is-pressed,
    .btn[aria-pressed="true"],
    .btn[aria-current="page"] {
        padding: 9px 13px 7px 15px;
    }

    .btn--lg {
        min-block-size: 44px;
        padding: 10px 18px;
    }

    .btn--lg:active,
    .btn--lg.is-pressed,
    .btn--lg[aria-current="page"] {
        padding: 11px 17px 9px 19px;
    }
}

.block-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-block: 14px;
}

.block-actions:last-child {
    margin-block-end: 0;
}

/* ----------------------------------------------------------------------------------------------- */
/* 3. Window                                                                                        */
/* ----------------------------------------------------------------------------------------------- */

.win {
    padding: 3px;
    background: var(--c-silver);
    border: 1px solid;
    border-color: var(--bevel-out-border);
    box-shadow: var(--bevel-out-inner), var(--win-shadow);
}

.win__title {
    display: flex;
    align-items: center;
    gap: 5px;
    min-block-size: 18px;
    padding: 1px 2px;
    color: var(--c-white);
    background: linear-gradient(90deg, var(--c-navy), var(--c-blue));
    font: 700 12px/16px var(--font-ui);
}

.win__caption {
    flex: 1;
    min-inline-size: 0;
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font: inherit;
    color: inherit;
}

.win__buttons {
    display: flex;
    gap: 2px;
    flex: none;
}

.win__btn {
    display: grid;
    place-items: center;
    inline-size: 14px;
    block-size: 13px;
    background: var(--c-silver);
    border: 1px solid;
    border-color: var(--c-white) var(--c-black) var(--c-black) var(--c-white);
}

.win__btn svg {
    inline-size: 8px;
    block-size: 8px;
    fill: var(--c-black);
}

.win__btn--close {
    inline-size: 18px;
}

.win__body {
    margin-block-start: 3px;
}

/* A "document" window: white paper inside a sunken frame. */
.win--document {
    padding: 3px 3px 2px;
}

.win--document > .win__body {
    padding: 18px 18px 20px;
    background: var(--c-white);
    border: 1px solid;
    border-color: var(--bevel-in-border);
    box-shadow: inset 1px 1px 0 var(--c-black);
}

@media (min-width: 640px) {
    .win--document > .win__body {
        padding: 24px 28px 26px;
    }
}

/* Skip rendering work for windows that are far below the fold. Never on the game or on windows with dialogs. */
@supports (content-visibility: auto) {
    .cv {
        content-visibility: auto;
        contain-intrinsic-size: auto 420px;
    }
}

/* ----------------------------------------------------------------------------------------------- */
/* 4. Header and menu                                                                               */
/* ----------------------------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    z-index: 40;
    inset-block-start: 0;
    background: linear-gradient(90deg, var(--c-navy) 0%, var(--c-blue) 100%);
    box-shadow: 0 1px 0 var(--c-black);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 8px;
    min-block-size: 30px;
    padding: 3px 6px;
}

.site-header__inner > * {
    flex-shrink: 0;
    white-space: nowrap;
}

.site-header.is-measuring * {
    transition: none !important;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 4px;
    color: var(--c-white);
    text-decoration: none;
    font: 700 12px/16px var(--font-ui);
}

.site-logo:hover span {
    text-decoration: underline;
}

.site-logo[aria-current="page"] {
    color: #d8d8ff;
}

.site-nav {
    display: flex;
    align-items: center;
}

.site-header .menu-button {
    anchor-name: --menu-button;
    min-block-size: 22px;
    padding: 1px 9px;
    font-weight: 700;
}

.site-menu {
    position: fixed;
    inset: auto;
    /* Fallback first: browsers without anchor() keep the menu just below the header. */
    inset-block-start: 36px;
    inset-block-start: anchor(--menu-button bottom);
    inset-inline-start: 6px;
    inline-size: min(84vw, 17rem);
    inline-size: min(84dvw, 17rem);
    max-inline-size: calc(100vw - 12px);
    max-block-size: calc(100vh - 5rem);
    max-block-size: calc(100dvh - 5rem);
    margin: 0;
    padding: 4px 4px 4px 30px;
    overflow: auto;
    list-style: none;
    color: var(--c-black);
    background: var(--c-silver);
    border: 1px solid;
    border-color: var(--bevel-out-border);
    box-shadow: var(--bevel-out-inner), 3px 3px 0 rgba(0, 0, 0, 0.35);
}

.site-menu:is(:popover-open, .\:popover-open) {
    display: block;
}

@supports not selector(:popover-open) {
    .site-menu[popover]:not(.\:popover-open) {
        display: none;
    }
}

/* The navy sidebar of the Start menu. */
.site-menu::before {
    content: "";
    position: absolute;
    inset-block: 4px;
    inset-inline-start: 4px;
    inline-size: 22px;
    background: linear-gradient(180deg, var(--c-navy), var(--c-blue));
}

.site-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    color: var(--c-black);
    text-decoration: none;
    font: 700 12px/16px var(--font-ui);
}

.site-menu a:visited {
    color: var(--c-black);
}

.site-menu a:hover,
.site-menu a:focus-visible {
    color: var(--c-white);
    background: var(--c-navy);
    outline: 1px dotted var(--c-white);
    outline-offset: -4px;
}

.site-menu a[aria-current="page"] {
    background: var(--c-silver-light);
    border: 1px solid;
    border-color: var(--c-gray) var(--c-white) var(--c-white) var(--c-gray);
    box-shadow: inset 1px 1px 0 var(--c-black);
}

.site-clock {
    margin-inline-start: auto;
    padding: 2px 7px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--c-white);
    font: 700 12px/16px var(--font-ui);
    font-variant-numeric: tabular-nums;
}

.site-clock:empty {
    display: none;
}

/* Wide layout: the same list becomes inline navigation (site.js adds is-wide when the row fits). */
.site-header.is-wide .menu-button {
    display: none;
}

.site-header.is-wide .site-menu {
    position: static;
    display: flex;
    align-items: center;
    gap: 2px;
    inline-size: auto;
    max-inline-size: none;
    max-block-size: none;
    margin: 0 0 0 auto;
    padding: 0;
    overflow: visible;
    color: var(--c-white);
    background: transparent;
    border: 0;
    box-shadow: none;
}

.site-header.is-wide .site-menu::before {
    display: none;
}

.site-header.is-wide .site-menu a,
.site-header.is-wide .site-menu a:visited {
    gap: 6px;
    padding: 3px 9px;
    color: var(--c-white);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid transparent;
}

.site-header.is-wide .site-menu a:hover,
.site-header.is-wide .site-menu a:focus-visible {
    color: var(--c-white);
    background: rgba(0, 0, 0, 0.42);
    border-color: var(--c-silver-light) var(--c-black) var(--c-black) var(--c-silver-light);
    box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.35);
    outline-color: var(--c-white);
}

.site-header.is-wide .site-menu a[aria-current="page"] {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--c-black) var(--c-silver-light) var(--c-silver-light) var(--c-black);
    box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.5);
}

/* ----------------------------------------------------------------------------------------------- */
/* 5. Footer                                                                                        */
/* ----------------------------------------------------------------------------------------------- */

.site-footer {
    margin-block-start: 28px;
    background: var(--c-silver);
    border-block-start: 1px solid;
    border-color: var(--c-silver-light) var(--c-black) var(--c-black) var(--c-silver-light);
    box-shadow: inset 0 1px 0 var(--c-white);
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    padding: 4px 8px;
    font: 12px/1.4 var(--font-ui);
}

.site-footer__cell {
    padding: 2px 8px;
    background: var(--c-white);
    border: 1px solid;
    border-color: var(--bevel-in-border);
    box-shadow: inset 1px 1px 0 var(--c-gray);
}

.site-footer__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-inline: auto;
}

.site-footer__nav a,
.site-footer__nav a:visited {
    color: var(--c-black);
    text-decoration: none;
}

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

.site-footer__note {
    margin: 0;
    padding: 5px 10px;
    background: var(--c-desktop-dark);
    color: #d4ffff;
    font-size: 11px;
    line-height: 1.5;
}

/* ----------------------------------------------------------------------------------------------- */
/* 6. Desktop layout                                                                                */
/* ----------------------------------------------------------------------------------------------- */

.desktop {
    padding: 18px 10px 28px;
}

.desktop__inner {
    display: grid;
    gap: var(--gap);
    inline-size: 100%;
    max-inline-size: var(--content-width);
    margin-inline: auto;
}

/* Windows may be narrower than their captions: the captions get an ellipsis instead of stretching the page. */
.desktop__inner > * {
    min-inline-size: 0;
}

.desktop__inner--wide {
    max-inline-size: var(--wide-width);
}

/* Game pages: the table likes room, ten columns of Spider especially. */
.desktop__inner--game {
    max-inline-size: var(--game-width);
}

@media (min-width: 640px) {
    .desktop {
        padding: 26px 20px 36px;
    }

    .desktop__inner {
        gap: 18px;
    }
}

.section-title {
    margin: 6px 0 0;
    padding-inline: 2px;
    color: var(--c-white);
    font-size: 16px;
    text-shadow: 1px 1px 0 var(--c-black);
}

/* White text on the teal desktop: page headings and intros above the windows. */
.page-head {
    padding-inline: 2px;
    color: var(--c-white);
}

.page-title {
    margin: 0 0 8px;
    font-size: clamp(24px, 5.5vw, 34px);
    line-height: 1.15;
    text-wrap: balance;
}

.page-intro {
    max-inline-size: 66ch;
}

.page-intro p:last-child {
    margin-block-end: 0;
}

.crumbs {
    padding-inline: 2px;
    color: var(--c-white);
    font: 12px/1.5 var(--font-ui);
}

.crumbs__list {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.crumbs__list li:not(:last-child)::after {
    content: "›";
    margin-inline: 6px;
    opacity: 0.75;
}

.crumbs a,
.crumbs a:visited {
    color: var(--c-white);
}

.crumbs a:hover {
    text-decoration: underline;
}

.crumbs [aria-current="page"] {
    color: #c8ffff;
}

/* ----------------------------------------------------------------------------------------------- */
/* 7. Hero                                                                                          */
/* ----------------------------------------------------------------------------------------------- */

.hero__body {
    display: grid;
    gap: 18px;
    padding: 16px;
}

.hero__text h1 {
    margin: 0 0 12px;
    font-size: clamp(26px, 6vw, 40px);
    line-height: 1.1;
    text-wrap: balance;
}

.hero__lead {
    max-inline-size: 46ch;
    margin: 0;
    font-size: 16px;
    line-height: 1.55;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-block-start: 18px;
}

.hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.hero__facts li {
    padding: 2px 8px;
    background: var(--c-white);
    border: 1px solid;
    border-color: var(--bevel-in-border);
    box-shadow: inset 1px 1px 0 var(--c-gray);
    font: 700 12px/1.5 var(--font-ui);
}

.hero__art {
    align-self: center;
    padding: 8px;
    background: var(--c-white);
    border: 1px solid;
    border-color: var(--bevel-in-border);
    box-shadow: inset 1px 1px 0 var(--c-black);
}

.hero__art img {
    inline-size: 100%;
    height: auto;
}

@media (min-width: 780px) {
    .hero__body {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
        align-items: center;
        gap: 24px;
        padding: 26px 24px;
    }
}

/* ----------------------------------------------------------------------------------------------- */
/* 8. Game cards and features (landing)                                                             */
/* ----------------------------------------------------------------------------------------------- */

.games__grid {
    display: grid;
    gap: var(--gap);
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 720px) {
    .games__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.game-card__body {
    display: grid;
    gap: 12px;
    padding: 10px;
}

.game-card__art {
    display: block;
    padding: 6px;
    background: var(--c-white);
    border: 1px solid;
    border-color: var(--bevel-in-border);
    box-shadow: inset 1px 1px 0 var(--c-black);
}

.game-card__art img {
    inline-size: 100%;
    height: auto;
}

.game-card__lead {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
}

.game-card__features {
    display: grid;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.game-card__features li {
    display: flex;
    align-items: center;
    gap: 6px;
    font: 700 12px/1.4 var(--font-ui);
}

.game-card__body .btn {
    justify-self: start;
}

.game-card__modes {
    margin: 0;
    font: 12px/1.6 var(--font-ui);
}

.game-card__modes span {
    color: var(--c-muted);
}

.game-card__modes a {
    margin-inline-end: 8px;
    white-space: nowrap;
}

.features {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    grid-template-columns: minmax(0, 1fr);
}

.feature {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    background: var(--c-white);
    border: 1px solid;
    border-color: var(--bevel-in-border);
    box-shadow: inset 1px 1px 0 var(--c-gray);
}

.feature .icon {
    inline-size: 32px;
    block-size: 32px;
}

.feature__title {
    margin: 0 0 3px;
    font-size: 13px;
    line-height: 1.35;
}

.feature__text {
    margin: 0;
    color: var(--c-muted);
    font-size: 13px;
    line-height: 1.5;
}

@media (min-width: 560px) {
    .features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 980px) {
    .features {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ----------------------------------------------------------------------------------------------- */
/* 9. Prose, lists, FAQ                                                                             */
/* ----------------------------------------------------------------------------------------------- */

.prose {
    max-inline-size: 68ch;
}

/* The measure is for reading, not for the frame: a window keeps the whole row. */
.win.prose {
    max-inline-size: none;
}

/* Wide screens: text flows in two columns, like a help file, and nothing is cut in half at a column break. */
@media (min-width: 960px) {
    .win.prose > .win__body {
        columns: 2;
        column-gap: 44px;
    }

    .win.prose > .win__body > *,
    .steps > li {
        break-inside: avoid;
    }

    .steps {
        columns: 2;
        column-gap: 44px;
    }
}

.prose h3,
.steps + h3,
.tips + h3 {
    margin-block-start: 1.4em;
    font-size: 17px;
}

.prose__section + .prose__section {
    margin-block-start: 1.6em;
}

.prose__section > h3:first-child {
    margin-block-start: 0;
}

.prose__section > :last-child,
.prose > :last-child {
    margin-block-end: 0;
}

.prose a {
    text-underline-offset: 2px;
}

.prose strong {
    font-weight: 700;
}

.steps,
.tips {
    max-inline-size: 72ch;
    padding-inline-start: 1.4em;
}

.steps {
    counter-reset: step;
    list-style: none;
}

.steps > li {
    position: relative;
    counter-increment: step;
    padding-inline-start: 34px;
    margin-block-end: 10px;
}

.steps > li::before {
    content: counter(step);
    position: absolute;
    inset-inline-start: 0;
    inset-block-start: 1px;
    display: grid;
    place-items: center;
    inline-size: 24px;
    block-size: 24px;
    background: var(--c-navy);
    color: var(--c-white);
    font: 700 12px/1 var(--font-ui);
    box-shadow: inset -1px -1px 0 var(--c-black), inset 1px 1px 0 var(--c-blue);
}

.steps > li:last-child,
.tips > li:last-child {
    margin-block-end: 0;
}

.faq {
    display: grid;
    gap: 6px;
}

.faq .section-title {
    margin-block-end: 4px;
}

.faq__item {
    background: var(--c-white);
    border: 1px solid;
    border-color: var(--bevel-in-border);
    box-shadow: inset 1px 1px 0 var(--c-gray);
}

.faq__item[open] {
    box-shadow: inset 1px 1px 0 var(--c-gray), var(--win-shadow);
}

.faq__q {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    list-style: none;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.faq__q::-webkit-details-marker {
    display: none;
}

/* Tree-view style [+] / [−] toggle. */
.faq__q::before {
    content: "";
    flex: none;
    inline-size: 13px;
    block-size: 13px;
    background-color: var(--c-silver);
    background-image: linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor);
    background-size: 7px 1px, 1px 7px;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid;
    border-color: var(--c-white) var(--c-black) var(--c-black) var(--c-white);
}

.faq__item[open] > .faq__q::before {
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 7px 1px;
}

.faq__q:hover {
    background: var(--c-silver-light);
}

.faq__q:focus-visible {
    outline: 1px dotted var(--c-black);
    outline-offset: -4px;
}

.faq__a {
    max-inline-size: 70ch;
    padding: 0 14px 12px 35px;
    font-size: 14px;
    line-height: 1.6;
}

.faq__a p:last-child {
    margin-block-end: 0;
}

.mode-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mode {
    padding: 8px 10px;
    background: var(--c-white);
    border: 1px solid;
    border-color: var(--bevel-in-border);
    box-shadow: inset 1px 1px 0 var(--c-gray);
    font-size: 13px;
    line-height: 1.5;
}

.mode.is-current {
    background: var(--c-navy);
    color: var(--c-white);
}

.mode__link,
.mode__link:visited {
    margin-inline-end: 8px;
    font-weight: 700;
}

.mode.is-current .mode__link,
.mode.is-current .mode__link:visited {
    color: #a8e4ff;
    text-decoration: none;
}

.cross-game__body {
    padding: 12px;
}

.cross-game__body p {
    margin-block-end: 0;
    font-size: 13px;
    line-height: 1.55;
}

/* ----------------------------------------------------------------------------------------------- */
/* 10. Blog                                                                                         */
/* ----------------------------------------------------------------------------------------------- */

.post-list {
    display: grid;
    gap: var(--gap);
    margin: 0;
    padding: 0;
    list-style: none;
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
    .post-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.post-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.post-card__link:hover .post-card__title,
.post-card__link:focus-visible .post-card__title {
    text-decoration: underline;
}

.post-card__link:focus-visible {
    outline-offset: 4px;
}

.post-card__body {
    padding: 10px;
    background: var(--c-white);
    border: 1px solid;
    border-color: var(--bevel-in-border);
    box-shadow: inset 1px 1px 0 var(--c-black);
}

.post-card__cover {
    inline-size: 100%;
    margin-block-end: 8px;
    border: 1px solid var(--c-black);
}

.post-card__meta {
    margin: 0 0 4px;
    color: var(--c-muted);
    font: 11px/1.5 var(--font-ui);
}

.post-card__title {
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.35;
}

.post-card__excerpt {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.5;
}

.post-card__more {
    color: var(--c-link);
    font: 700 12px/1.5 var(--font-ui);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pager__state {
    color: var(--c-white);
    font: 12px var(--font-ui);
    text-shadow: 1px 1px 0 var(--c-black);
}

.post__header {
    margin-block-end: 14px;
}

.post__meta {
    margin: 0 0 8px;
    color: var(--c-muted);
    font: 12px/1.6 var(--font-ui);
}

.post__title {
    max-inline-size: 24ch;
    font-size: clamp(24px, 4.6vw, 32px);
    line-height: 1.15;
    text-wrap: balance;
}

.post__cover {
    inline-size: 100%;
    margin-block-end: 22px;
    border: 1px solid var(--c-black);
}

.post__content {
    margin-inline: auto;
}

.post__content h2 {
    margin-block-start: 1.7em;
    font-size: 21px;
}

.post__content h2:first-child {
    margin-block-start: 0;
}

.post__content h3 {
    margin-block-start: 1.5em;
    font-size: 17px;
}

.post__content blockquote {
    margin: 1.2em 0;
    padding: 4px 14px;
    background: #f2f6ff;
    border-inline-start: 4px solid var(--c-navy);
}

/* The «Коротко» box: the few thoughts the reader should leave with. */
.post__content blockquote ul,
.post__content blockquote ol {
    margin: 0.5em 0 0;
    padding-inline-start: 1.2em;
}

.post__content blockquote li + li {
    margin-block-start: 0.35em;
}

.post__content blockquote > :last-child {
    margin-block-end: 0;
}

/* Sources are set smaller, so they do not compete with the text. */
.post__content .sources {
    padding-inline-start: 1.4em;
    font-size: 14px;
    line-height: 1.55;
}

.post__content .sources li {
    margin-block-end: 0.5em;
    overflow-wrap: anywhere;
}

.post__content .sources li:last-child {
    margin-block-end: 0;
}

.post__content table {
    inline-size: 100%;
    margin: 1.2em 0;
    border-collapse: collapse;
    font-size: 14px;
}

.post__content th,
.post__content td {
    padding: 6px 10px;
    border: 1px solid var(--c-gray);
    text-align: start;
    vertical-align: top;
}

.post__content th {
    background: var(--c-silver);
}

.post__content img {
    inline-size: 100%;
    margin: 1.2em 0;
    border: 1px solid var(--c-black);
}

.post__footer {
    margin-block-start: 26px;
    padding-block-start: 14px;
    border-block-start: 1px solid var(--c-silver);
}

.post__tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 0 6px;
}

.post__tags-label {
    color: var(--c-muted);
    font-size: 12px;
}

.tag {
    padding: 1px 8px;
    background: var(--c-silver);
    border: 1px solid;
    border-color: var(--bevel-out-border);
    box-shadow: var(--bevel-out-inner);
    font: 700 11px/1.6 var(--font-ui);
}

.post__author {
    margin: 0;
    color: var(--c-muted);
    font-size: 12px;
}

.post-nav {
    display: grid;
    gap: var(--gap);
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
    .post-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.post-nav__link {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    color: var(--c-black);
    text-decoration: none;
    background: var(--c-silver);
    border: 1px solid;
    border-color: var(--bevel-out-border);
    box-shadow: var(--bevel-out-inner);
    font-size: 13px;
    line-height: 1.45;
}

.post-nav__link:visited {
    color: var(--c-black);
}

.post-nav__link--next {
    text-align: end;
}

.post-nav__link:hover .post-nav__title {
    text-decoration: underline;
}

.post-nav__dir {
    font: 700 12px/1.4 var(--font-ui);
}

.post-nav__title {
    font-weight: 700;
}

.play-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 4px;
}

/* ----------------------------------------------------------------------------------------------- */
/* 11. Error page                                                                                   */
/* ----------------------------------------------------------------------------------------------- */

.error-page {
    max-inline-size: 38rem;
    margin-inline: auto;
}

.error-page__icon {
    display: grid;
    place-items: center;
    flex: none;
    inline-size: 14px;
    block-size: 14px;
    background: var(--c-danger);
    color: var(--c-white);
    font: 900 12px/1 var(--font-ui);
}

.error-page__body h1 {
    font-size: clamp(22px, 4.5vw, 30px);
}

.error-page__code {
    margin: 0 0 4px;
    color: var(--c-danger);
    font: 700 12px/1.5 var(--font-ui);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ----------------------------------------------------------------------------------------------- */
/* 12. Motion preferences and print                                                                 */
/* ----------------------------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
    }
}

@media print {
    .site-header,
    .site-footer,
    .crumbs,
    .skip-link,
    .block-actions,
    .post-nav {
        display: none !important;
    }

    html,
    body {
        background: #fff;
    }

    .win {
        box-shadow: none;
        border: 0;
        padding: 0;
        background: #fff;
    }

    .win__title {
        color: #000;
        background: none;
    }

    .win__buttons {
        display: none;
    }

    .cv {
        content-visibility: visible;
    }
}
