/* SpeedRunIT design tokens + primitives ("Укус" concept).
   Light values on :root, dark values on [data-theme="dark"].
   Legacy pages are pinned to light by base.html until they are redesigned.
   Rules: flat fills only (no gradient fills), depth = layered shadows,
   glass only for floating layers, carved look only for search fields. */

:root {
    --sr-font: "Onest", "Segoe UI", system-ui, -apple-system, sans-serif;
    --sr-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

    --sr-bg: #F3F0EA;
    --sr-surface: #FCFBF8;
    --sr-raise: #ECE7DE;
    --sr-well: #E7E2D9;
    --sr-line: #DFD9CE;
    --sr-line-strong: #CDC6BA;
    --sr-text: #17181A;
    --sr-read: #25262A;
    --sr-muted: #645F58;
    --sr-faint: #8A847B;

    --sr-accent: #E2562A;
    --sr-accent-hover: #D24C21;
    --sr-accent-ink: #FFF7F2;
    --sr-accent-text: #B33C12;
    --sr-accent-soft: rgb(226 86 42 / .1);

    --sr-feature: #1B1C1F;
    --sr-feature-ink: #F3F0EA;
    --sr-feature-muted: #A9A49B;

    /* colour roles (see docs/typography.md, «Цвет»):
       accent (orange) = "you are here / do this": the logo's dot, one main action per screen, the title sticker;
       done (cream)    = what the person has already covered: progress fills, studied marks, activity;
       stage colours   = categories; everything else is neutral */
    --sr-done: #2B2A27;
    --sr-done-soft: rgb(43 42 39 / .14);

    --sr-error: #C23A33;
    --sr-success: #12694A;

    --sr-stage-hr: #5240C2;      --sr-stage-hr-bg: #ECE7FF;
    --sr-stage-tech: #0E6E7A;    --sr-stage-tech-bg: #D8F3F6;
    --sr-stage-sd: #A3346C;      --sr-stage-sd-bg: #F8E1EC;
    --sr-stage-final: #1F6B49;   --sr-stage-final-bg: #DDF1E6;

    --sr-glass: rgb(252 251 248 / .72);
    --sr-glass-line: rgb(23 24 26 / .07);
    --sr-field-1: rgb(242 107 63 / .32);
    --sr-field-2: rgb(245 190 90 / .36);
    --sr-grain: .07;
    --sr-grid-o: .9;
    --sr-grain-blend: multiply;

    --sr-shadow-color: 70 45 20;
    --sr-e1: 0 1px 2px rgb(var(--sr-shadow-color) / .08), 0 6px 16px -10px rgb(var(--sr-shadow-color) / .22);
    --sr-e2: 0 2px 6px rgb(var(--sr-shadow-color) / .08), 0 18px 36px -18px rgb(var(--sr-shadow-color) / .3);
    --sr-e3: 0 4px 10px rgb(var(--sr-shadow-color) / .1), 0 30px 60px -28px rgb(var(--sr-shadow-color) / .38);

    --sr-r-xs: 6px;
    --sr-r-sm: 10px;
    --sr-r-md: 14px;
    --sr-r-lg: 22px;
    --sr-r-pill: 999px;

    --sr-ease: cubic-bezier(.2, .7, .2, 1);
    --sr-header-h: 76px;
    /* one size for every page title: sections, lists and documents alike */
    --sr-h1: clamp(34px, 4.4vw, 56px);
    --sr-page-max: 1440px;
    --sr-gutter: clamp(16px, 3.2vw, 40px);
    /* one composition for every page: a side column of the same width on section pages (the hero card)
       and on reading pages (cover, «next», related list), text column of a readable measure */
    --sr-side-col: 400px;
    --sr-read-col: 760px;
    --sr-col-gap: 72px;

    color-scheme: light;
}
/* small desktops and tablets in landscape: a narrower side column, so the main one keeps its room */
@media (max-width: 1240px) { :root { --sr-side-col: 340px; --sr-col-gap: 40px } }

[data-theme="dark"] {
    --sr-bg: #121315;
    --sr-surface: #1A1B1E;
    --sr-raise: #25272B;
    --sr-well: #0D0E10;
    --sr-line: #2C2E32;
    --sr-line-strong: #3A3C41;
    --sr-text: #EDEBE6;
    --sr-read: #E2E0DA;
    --sr-muted: #ADAAA3;
    --sr-faint: #7D7A74;

    --sr-accent: #F26B3F;
    --sr-accent-hover: #F67D55;
    --sr-accent-ink: #1D0D06;
    --sr-accent-text: #F7906A;
    --sr-accent-soft: rgb(242 107 63 / .12);

    --sr-feature: #EAE5DA;
    --sr-feature-ink: #17181A;
    --sr-feature-muted: #5E5A53;

    --sr-done: #E4DED2;
    --sr-done-soft: rgb(234 229 218 / .1);

    --sr-error: #FF8178;
    --sr-success: #8DD8B3;

    --sr-stage-hr: #A98BFF;      --sr-stage-hr-bg: #262040;
    --sr-stage-tech: #2EC4D6;    --sr-stage-tech-bg: #12303A;
    --sr-stage-sd: #EE7FB0;      --sr-stage-sd-bg: #3A1E2B;
    --sr-stage-final: #9BCB45;   --sr-stage-final-bg: #252F15;

    --sr-glass: rgb(28 29 32 / .7);
    --sr-glass-line: rgb(255 255 255 / .07);
    --sr-field-1: rgb(242 107 63 / .3);
    --sr-field-2: rgb(245 150 60 / .26);
    --sr-grain: .04;
    --sr-grid-o: 1;
    --sr-grain-blend: normal;

    --sr-shadow-color: 0 0 0;
    --sr-e1: 0 1px 2px rgb(0 0 0 / .35), 0 8px 18px -10px rgb(0 0 0 / .6);
    --sr-e2: 0 2px 6px rgb(0 0 0 / .35), 0 20px 40px -18px rgb(0 0 0 / .7);
    --sr-e3: 0 4px 12px rgb(0 0 0 / .4), 0 34px 64px -26px rgb(0 0 0 / .8);

    color-scheme: dark;
}

/* ---------- page shell (only on redesigned pages) ---------- */
html[data-sr-page] body {
    overflow-x: clip; /* colour fields may bleed past the content edge; never a sideways scroll */
    background: var(--sr-bg);
    color: var(--sr-text);
    font-family: var(--sr-font);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
/* film grain on the page background only: it lies under the content, so cards, text and images stay clean.
   White specks with a soft alpha: overlay/soft-light multiply with the base, so on near-black they show nothing. */
html[data-sr-page] .page-wrapper::before {
    content: "";
    position: absolute; /* scrolls with the page: a fixed layer slid under the content */
    inset: 0;
    z-index: -1;
    pointer-events: none;
    /* one speck per pixel (a pre-made tile): svg turbulence clumps into a leathery pattern */
    background-image: url("../../img/speedrunit/grain.png");
    background-size: 160px 160px;
    opacity: var(--sr-grain);
    mix-blend-mode: var(--sr-grain-blend);
}
html[data-sr-page] .page-wrapper { position: relative; z-index: 1 }
html[data-sr-page] ::selection { background: color-mix(in srgb, var(--sr-accent) 32%, transparent); color: var(--sr-text) }
html[data-sr-page] { scrollbar-color: var(--sr-line-strong) transparent }

.sr-page { width: 100%; max-width: var(--sr-page-max); margin: 0 auto; padding: 0 var(--sr-gutter) 72px; box-sizing: border-box }
.sr-page *, .sr-header *, .sr-footer * { box-sizing: border-box }

/* focus ring: visible on any surface */
.sr-page :focus-visible, .sr-header :focus-visible, .sr-footer :focus-visible, .sr-layer :focus-visible {
    outline: 2px solid var(--sr-accent);
    outline-offset: 2px;
}

.sr-page [hidden], .sr-header [hidden], .sr-footer [hidden], .sr-layer [hidden], .sr-layer[hidden] { display: none !important }

.sr-visually-hidden {
    position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.sr-mono-label {
    font-family: var(--sr-mono);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--sr-muted);
}

/* ---------- glass (floating layers only) ---------- */
.sr-glass {
    background: var(--sr-glass);
    border: 1px solid var(--sr-glass-line);
    box-shadow: var(--sr-e2);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
}

/* ---------- buttons ---------- */
.sr-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 18px;
    border-radius: var(--sr-r-pill); border: 1px solid transparent;
    font: 500 14px/1 var(--sr-font); white-space: nowrap; text-decoration: none; cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--sr-ease), box-shadow .2s;
}
.sr-btn svg { width: 16px; height: 16px; flex: none }
.sr-btn:active { transform: scale(.98) }
.sr-btn[disabled], .sr-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none }
.sr-btn--sm { height: 34px; padding: 0 14px; font-size: 13.5px }
.sr-btn--primary { background: var(--sr-accent); color: var(--sr-accent-ink); box-shadow: 0 1px 2px rgb(var(--sr-shadow-color) / .3), 0 4px 10px -4px rgb(var(--sr-shadow-color) / .35) }
.sr-btn--primary:hover { background: var(--sr-accent-hover); color: var(--sr-accent-ink) }
.sr-btn--secondary { background: var(--sr-surface); color: var(--sr-text); border-color: var(--sr-line); box-shadow: var(--sr-e1) }
.sr-btn--secondary:hover { border-color: var(--sr-line-strong); color: var(--sr-text) }
.sr-btn--ghost { background: transparent; color: var(--sr-muted) }
.sr-btn--ghost:hover { background: var(--sr-raise); color: var(--sr-text) }

/* ---------- chips (filters) ---------- */
.sr-chip {
    display: inline-flex; align-items: center; gap: 7px;
    height: 34px; padding: 0 14px;
    border-radius: var(--sr-r-pill); border: 1px solid var(--sr-line);
    background: transparent; color: var(--sr-text);
    font: 500 13.5px/1 var(--sr-font); white-space: nowrap; text-decoration: none; cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s;
}
.sr-chip:hover { border-color: var(--sr-line-strong); color: var(--sr-text) }
.sr-chip[aria-current="true"], .sr-chip[aria-pressed="true"] { background: var(--sr-text); border-color: var(--sr-text); color: var(--sr-bg); box-shadow: 0 4px 10px -4px rgb(var(--sr-shadow-color) / .45) }
.sr-chip small { font-size: 11.5px; color: var(--sr-muted); font-variant-numeric: tabular-nums }
.sr-chip[aria-current="true"] small, .sr-chip[aria-pressed="true"] small { color: inherit; opacity: .65 }

/* ---------- stage tags: color = meaning, same everywhere ---------- */
.sr-stage {
    display: inline-flex; align-items: center; gap: 6px;
    height: 22px; padding: 0 8px; border-radius: var(--sr-r-xs);
    font: 500 12px/1 var(--sr-font); white-space: nowrap;
}
.sr-stage--hr { background: var(--sr-stage-hr-bg); color: var(--sr-stage-hr) }
.sr-stage--tech { background: var(--sr-stage-tech-bg); color: var(--sr-stage-tech) }
.sr-stage--sd { background: var(--sr-stage-sd-bg); color: var(--sr-stage-sd) }

/* ---------- study status: full / empty circle ---------- */
.sr-status { width: 14px; height: 14px; border-radius: 50%; border: 1.6px solid var(--sr-line-strong); flex: none; display: inline-block }
/* «изучено» — green, the same as «Знаю» in the trainer (cream stays for the road, the snake and progress fills) */
.sr-status.is-done { background: var(--sr-success); border-color: var(--sr-success) }

/* ---------- carved search field ---------- */
.sr-search {
    display: flex; align-items: center; gap: 10px;
    height: 42px; padding: 0 6px 0 14px;
    border-radius: var(--sr-r-md); border: 1px solid transparent;
    background: var(--sr-well); color: var(--sr-muted);
    box-shadow: inset 0 1px 3px rgb(var(--sr-shadow-color) / .28);
    transition: box-shadow .2s, border-color .2s;
}
.sr-search:focus-within { border-color: var(--sr-accent); box-shadow: inset 0 1px 3px rgb(var(--sr-shadow-color) / .28), 0 0 0 4px var(--sr-accent-soft) }
.sr-search svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round }
.sr-search input {
    flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
    color: var(--sr-text); font: 400 15px/1 var(--sr-font);
}
.sr-search input::placeholder { color: var(--sr-faint) }
.sr-search input:focus-visible { outline: none }
.sr-search input::-webkit-search-cancel-button { display: none }
.sr-search__clear {
    width: 30px; height: 30px; border-radius: 9px; border: 0; display: grid; place-items: center;
    background: var(--sr-raise); color: var(--sr-muted); cursor: pointer;
}
.sr-search__clear svg { width: 12px; height: 12px }
.sr-search__clear:hover { color: var(--sr-text) }

/* ---------- color fields (blurred, behind glass only) ---------- */
.sr-field { position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px); pointer-events: none }

/* ---------- «Укус»: the accent shape. One element per screen.
   The card's surface is a masked layer: a notch is cut from the top-right corner with rounded
   shoulders (r 14) and a rounded inner corner (r 24). The cut is truly transparent, so whatever is
   behind (colour fields, grid) shows through. The shadow follows the shape via drop-shadow.
   The logo's dot (.sr-bite__dot, the card's action) sits inside the notch. ---------- */
.sr-bite-card {
    position: relative; isolation: isolate; background: none !important; box-shadow: none !important; border: 0 !important;
    filter: drop-shadow(0 1px 1px rgb(var(--sr-shadow-color) / .22)) drop-shadow(0 10px 16px rgb(var(--sr-shadow-color) / .28));
}
.sr-bite-card::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    border-radius: var(--sr-r-lg) 0 var(--sr-r-lg) var(--sr-r-lg); /* the top-right corner is cut away anyway */
    background: var(--bite-bg, var(--sr-feature));
    /* built from gradients that add up: an svg mask is decoded late and the corner flashed square on reload */
    --bite-mask:
        linear-gradient(#000 0 0) left / calc(100% - 79px) 100%,
        linear-gradient(#000 0 0) bottom / 100% calc(100% - 71px),
        radial-gradient(circle at 0 100%, #000 13.5px, transparent 14.5px) right 66px top 0 / 14px 14px,
        linear-gradient(#000 0 0) right 66px top 13px / 14px 60px,
        linear-gradient(#000 0 0) right 13px top 58px / 54px 15px,
        radial-gradient(circle at 0 100%, #000 13.5px, transparent 14.5px) right 0 top 58px / 14px 14px,
        radial-gradient(circle at 100% 0, transparent 23.5px, #000 24.5px) right 42px top 34px / 25px 25px;
    -webkit-mask: var(--bite-mask); mask: var(--bite-mask);
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.sr-bite__dot {
    position: absolute; top: 6px; right: 9px; z-index: 2; width: 46px; height: 46px; border-radius: 50%;
    display: grid; place-items: center; background: var(--sr-accent); color: var(--sr-accent-ink);
    transition: transform .25s var(--sr-ease), background-color .2s;
}
.sr-bite__dot svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round }
a.sr-bite__dot:hover, a:hover > .sr-bite__dot { background: var(--sr-accent-hover); color: var(--sr-accent-ink); transform: translateX(2px) }

/* ---------- custom select (js/sr/site.js): same surface and motion as the header menus ---------- */
.sr-select { position: relative; display: inline-block }
.sr-select select { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none }
.sr-select__btn {
    display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px 0 14px;
    border-radius: var(--sr-r-pill); border: 1px solid var(--sr-line); background: var(--sr-surface); color: var(--sr-text);
    font: 500 13px/1 var(--sr-font); cursor: pointer; white-space: nowrap; transition: border-color .15s;
}
.sr-select__btn:hover, .sr-select.is-open .sr-select__btn { border-color: var(--sr-line-strong) }
.sr-select__btn svg { width: 14px; height: 14px; fill: none; stroke: var(--sr-muted); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--sr-ease) }
.sr-select.is-open .sr-select__btn svg { transform: rotate(180deg) }
.sr-select__menu {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; min-width: 100%; margin: 0; padding: 6px; list-style: none;
    border-radius: var(--sr-r-md); background: var(--sr-surface); border: 1px solid var(--sr-line-strong); box-shadow: var(--sr-e3);
    opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: opacity .16s, transform .16s var(--sr-ease), visibility 0s .16s;
}
.sr-select.is-open .sr-select__menu { opacity: 1; visibility: visible; transform: none; transition: opacity .16s, transform .16s var(--sr-ease) }
.sr-select__menu:focus { outline: none }
.sr-select__menu li {
    display: grid; grid-template-columns: 16px auto; gap: 8px; align-items: center;
    height: 36px; padding: 0 14px 0 10px; border-radius: var(--sr-r-sm);
    font: 500 13.5px/1 var(--sr-font); color: var(--sr-text); white-space: nowrap; cursor: pointer;
}
.sr-select__menu li.is-active { background: var(--sr-raise) }
.sr-select__menu li svg { width: 14px; height: 14px; fill: none; stroke: var(--sr-accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; visibility: hidden }
.sr-select__menu li[aria-selected="true"] svg { visibility: visible }
.sr-select__menu li[aria-selected="true"] { color: var(--sr-text); font-weight: 600 }
.sr-select__menu:focus-visible li.is-active { box-shadow: inset 0 0 0 2px var(--sr-accent) }

/* ---------- type motifs taken from the logo ---------- */
/* the "IT" chip: same shape as in the wordmark (one sharp corner) */
.sr-it {
    display: inline-block; padding: .02em .12em .06em; margin: 0 .03em; line-height: 1;
    border-radius: .16em .05em .16em .16em; background: var(--sr-accent); color: var(--sr-accent-ink);
    font-weight: 700; letter-spacing: -0.02em;
}


/* ---------- page backdrop (partials/sr_backdrop.html, rendered by base.html before the content) ----------
   Identical on every page because it is anchored to the page, not to a page's own head block:
   one warm light behind the title (top left) and the grid, both fading out at the same height.
   Section pages (catalogues, lists) get the grid; reading pages (a question, an article,
   an assignment) get only the light — a grid behind running text is noise. */
main { position: relative; isolation: isolate }
.sr-backdrop { position: absolute; z-index: -1; left: 0; right: 0; top: calc(var(--sr-header-h) * -1); height: 560px; overflow: hidden; pointer-events: none }
.sr-backdrop .sr-field--warm { width: 640px; height: 340px; left: max(-120px, calc(50% - var(--sr-page-max) / 2 - 120px)); top: 0; background: var(--sr-field-1) }
.sr-grid-lines {
    position: absolute; top: 0; bottom: 0; left: 50%; width: min(100%, var(--sr-page-max)); transform: translateX(-50%); opacity: var(--sr-grid-o);
    background-image: linear-gradient(var(--sr-line-strong) 1px, transparent 1px), linear-gradient(90deg, var(--sr-line-strong) 1px, transparent 1px);
    background-size: 40px 40px; background-position: center top;
    -webkit-mask-image: linear-gradient(#000 30%, transparent 92%), linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(#000 30%, transparent 92%), linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-composite: intersect;
}
@media (max-width: 860px) {
    .sr-backdrop { height: 460px }
    .sr-backdrop .sr-field--warm { width: 360px; height: 260px; left: -140px }
}

/* ---------- progress: the logo's dot is the head of every progress bar ---------- */
.sr-progress { position: relative; height: 8px; border-radius: 8px; background: var(--sr-progress-track, var(--sr-well)) }
.sr-progress > i {
    position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 0%); border-radius: inherit; background: var(--sr-done);
    animation: sr-progress .9s cubic-bezier(.3, 1.25, .5, 1) .15s both;
}
.sr-progress > i::after {
    content: ""; position: absolute; right: -7px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%;
    /* the head has an eye: the bar is the snake, grown as far as you have studied */
    background: radial-gradient(circle at 64% 38%, #1D0D06 0 1.4px, #FFF7F2 1.6px 3.2px, transparent 3.4px), var(--sr-accent);
    box-shadow: 0 0 0 3px var(--sr-progress-ring, var(--sr-surface));
}
@keyframes sr-progress { from { width: 0 } }
/* on a cream (featured) card the done-fill would vanish: there it is dark ink */
.sr-bite-card .sr-progress > i { background: var(--sr-feature-ink) }

/* ---------- odometer: digits roll like a mechanical counter ---------- */
.sr-odo { position: relative; display: inline-flex; height: 1em; line-height: 1; overflow: hidden; vertical-align: baseline; font-variant-numeric: proportional-nums }
.sr-odo > span { display: flex; flex-direction: column; transition: transform .9s cubic-bezier(.3, 1.15, .5, 1) }
.sr-odo > span > i { font-style: normal; height: 1em; line-height: 1; text-align: center }
.sr-odo > b { font: inherit; height: 1em }

/* ---------- skeleton: repeats the shape of what is loading; a slow pulse, no moving highlight ---------- */
.sr-skel { display: block; border-radius: 6px; background: var(--sr-raise); animation: sr-pulse 1.6s ease-in-out infinite }
@keyframes sr-pulse { 50% { opacity: .45 } }

@media (prefers-reduced-motion: reduce) {
    .sr-page *, .sr-header *, .sr-footer *, .sr-layer * { transition-duration: 0s !important; animation: none !important }
}

/* ---------- section tabs: the places inside one section (simulator, autoresponder). One component site-wide ---------- */
.sr-tabs { display: inline-flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 4px; border-radius: var(--sr-r-pill); background: var(--sr-well); box-shadow: inset 0 1px 3px rgb(var(--sr-shadow-color) / .25) }
.sr-tabs a { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: var(--sr-r-pill); color: var(--sr-muted); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; transition: color .15s, background-color .15s }
.sr-tabs a:hover { color: var(--sr-text) }
.sr-tabs a[aria-current] { background: var(--sr-surface); color: var(--sr-text); box-shadow: var(--sr-e1) }
@media (max-width: 860px) {
    .sr-tabs { display: flex; width: 100% }
    .sr-tabs a { flex: 1; justify-content: center; padding: 0 10px }
}

/* mono caps are for service data (dates, counters, fact labels); card and block headings read as normal text */
.sr-mono-label--soft { font: 600 14px/1.35 var(--sr-font); letter-spacing: -0.005em; text-transform: none }

/* less orange: in a featured card the bite's dot is the one orange point; the card's button is dark ink */
.sr-bite-card .sr-btn--primary { background: var(--sr-feature-ink); color: var(--sr-feature); box-shadow: none }
.sr-bite-card .sr-btn--primary:hover { background: color-mix(in srgb, var(--sr-feature-ink) 85%, var(--sr-feature)); color: var(--sr-feature) }

/* ---------- the snake (partials/sr_snake.html): the logo come alive. Body = the S-route in «done» cream,
   head = the logo's orange dot with one eye. It appears only where the site has to say something without words:
   nothing found / 404 (a question mark), empty lists (asleep), loading (chasing its tail) ---------- */
.sr-snake { display: block; width: 120px; height: auto; overflow: visible }
.sr-snake__body { fill: none; stroke: var(--sr-done); stroke-linecap: round }
.sr-snake__egg { fill: var(--sr-done) }
.sr-snake__head { fill: var(--sr-accent) }
.sr-snake__eye { fill: #FFF7F2 }
.sr-snake__pupil { fill: #1D0D06 }
.sr-snake__lid { fill: none; stroke: #1D0D06; stroke-width: 2; stroke-linecap: round }
.sr-snake__z { fill: var(--sr-faint); font: 600 15px/1 var(--sr-mono) }
.sr-snake__z--sm { font-size: 11px }
.sr-snake--loop { width: 40px }
.sr-snake__spin { transform-origin: 60px 60px; animation: sr-snake-chase 1.1s linear infinite }
@keyframes sr-snake-chase { to { transform: rotate(360deg) } }
.sr-snake--sleep .sr-snake__z { animation: sr-snake-z 2.8s ease-in-out infinite }
.sr-snake--sleep .sr-snake__z--sm { animation-delay: .5s }
@keyframes sr-snake-z { 0%, 100% { opacity: .25; transform: translateY(2px) } 50% { opacity: 1; transform: none } }
.sr-snake--question .sr-snake__head { transform-box: fill-box; transform-origin: center }
@media (prefers-reduced-motion: reduce) { .sr-snake__spin, .sr-snake__z { animation: none } }
