/* Design tokens
 * paper: pale reed grey-green, ink: spruce, lake: deep lake blue,
 * keep: reed olive, release: float red, check: amber. One family: Commissioner (OFL).
 */
@font-face { font-family: "Commissioner"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/assets/fonts/commissioner-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Commissioner"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/assets/fonts/commissioner-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Commissioner"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/assets/fonts/commissioner-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  color-scheme: light;
  --paper: #EEF1EC;
  --panel: #F8FAF6;
  --ink: #16251F;
  --muted: #4C5D55;
  --line: #C9D3CB;
  --lake: #1D5870;
  --keep: #4F6419;
  --keep-bg: #E3EBCB;
  --release: #B92D25;
  --release-bg: #F6DEDA;
  --check: #8A5A0E;
  --check-bg: #F4E6C8;
  --band90: #CFE0E6;
  --band50: #9CC1CF;
  --font: "Commissioner", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --step-0: 1.0625rem;  /* 17px body */
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: 1.953rem;
  --step-4: 2.441rem;
  --measure: 68ch;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #101A16; --panel: #16231E; --ink: #E2EAE4; --muted: #A3B3AA; --line: #2E3F37;
    --lake: #86BDD0; --keep: #B7CC6E; --keep-bg: #26301A; --release: #F08A80; --release-bg: #3A1F1C;
    --check: #E3B460; --check-bg: #362A14; --band90: #1E3640; --band50: #2F5868;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: var(--step-0); line-height: 1.55;
  font-variant-numeric: tabular-nums;
}
img, svg { max-width: 100%; }
a { color: var(--lake); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--lake); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--panel); padding: .5rem 1rem; z-index: 10; }

h1, h2, h3 { line-height: 1.15; font-weight: 640; letter-spacing: -0.012em; margin: 0 0 .5em; }
h1 { font-size: var(--step-4); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: var(--step-2); margin-top: 2.2rem; }
h3 { font-size: var(--step-1); margin-top: 1.6rem; }
p, ul, ol { margin: 0 0 1em; }
.lead { font-size: var(--step-1); color: var(--muted); max-width: 46ch; }
.prose { max-width: var(--measure); }
.prose li { margin-bottom: .4em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* header */
.top { border-bottom: 1px solid var(--line); }
.top-in { max-width: 72rem; margin: 0 auto; padding: .9rem 1.25rem; display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; align-items: baseline; }
.brand { font-weight: 720; font-size: var(--step-1); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; margin-right: auto; }
.nav { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--ink); text-decoration: none; padding: .2rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--line); }
.nav a[aria-current="page"] { border-bottom-color: var(--lake); }
.lang { font-size: .9375rem; }

main { max-width: 72rem; margin: 0 auto; padding: 2rem 1.25rem 3rem; }
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.foot-in { max-width: 72rem; margin: 0 auto; padding: 1.5rem 1.25rem 2.5rem; display: grid; gap: .6rem; }
.foot a { color: var(--muted); }

/* tool: the form on the left, the verdict on the right */
.tool { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); margin-top: 1.5rem; }
@media (min-width: 52rem) { .tool { grid-template-columns: minmax(0, 23rem) minmax(0, 1fr); align-items: start; } }
.form { display: grid; gap: 1rem; }
.field label { display: block; font-weight: 560; margin-bottom: .3rem; }
.field .hint { display: block; font-size: .8125rem; color: var(--muted); margin-top: .25rem; }
select, input[type="number"], input[type="date"] {
  width: 100%; font: inherit; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: 6px; padding: .6rem .7rem; min-height: 2.9rem;
}
input[type="number"] { font-size: var(--step-1); }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .9375rem; }
.check input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; accent-color: var(--lake); }

/* verdict: the memorable element. A thick band on the left like the tip of a float. */
.verdict { position: relative; padding: 1.4rem 1.5rem 1.4rem 2rem; background: var(--panel); border-radius: 4px 10px 10px 4px; min-height: 9rem; }
.verdict::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: .55rem; border-radius: 4px 0 0 4px; background: var(--line); }
.verdict[data-v="keep"], .verdict[data-v="keep_if_length"] { background: var(--keep-bg); }
.verdict[data-v="keep"]::before, .verdict[data-v="keep_if_length"]::before { background: var(--keep); }
.verdict[data-v="release"] { background: var(--release-bg); }
.verdict[data-v="release"]::before { background: var(--release); }
.verdict[data-v="check"] { background: var(--check-bg); }
.verdict[data-v="check"]::before { background: var(--check); }
.verdict-word { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 760; letter-spacing: -0.025em; line-height: 1.05; margin: 0 0 .8rem; }
.verdict[data-v="keep"] .verdict-word, .verdict[data-v="keep_if_length"] .verdict-word { color: var(--keep); }
.verdict[data-v="release"] .verdict-word { color: var(--release); }
.verdict[data-v="check"] .verdict-word { color: var(--check); }
.verdict ul { list-style: none; padding: 0; margin: 0 0 1rem; }
.verdict li { padding: .35rem 0; border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
.verdict li:first-child { border-top: 0; }
.ref { color: var(--muted); white-space: nowrap; }
.limits { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; margin: 0; font-size: .9375rem; }
.limits dt { color: var(--muted); }
.limits dd { margin: 0; }
.verdict.flash { animation: flash .35s ease-out; }
@keyframes flash { from { transform: translateX(-4px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .verdict.flash { animation: none; } }

/* today block */
.today { margin-top: 3rem; display: grid; gap: 2rem; }
@media (min-width: 52rem) { .today { grid-template-columns: 1fr 1fr; } }
.banlist { list-style: none; padding: 0; margin: 0; }
.banlist li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.banlist .until { color: var(--muted); text-align: right; }
.today > section { min-width: 0; }

/* tables */
.tw { overflow-x: auto; margin: 1rem 0 1.5rem; }
table { border-collapse: collapse; width: 100%; font-size: .9375rem; }
th, td { text-align: left; padding: .5rem .75rem .5rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); }
td.num, th.num { text-align: right; padding-right: 1rem; }
tr.on td:first-child { box-shadow: inset 3px 0 0 var(--release); padding-left: .6rem; }
.up { color: var(--release); } .down { color: var(--lake); }

/* year strip: 12 months, one bar per ban */
.year { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr; gap: .35rem 1rem; align-items: center; margin: 1rem 0 2rem; }
.year .months { display: grid; grid-template-columns: repeat(12, 1fr); font-size: .75rem; color: var(--muted); }
.year .track { position: relative; height: 1.1rem; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / 12 - 1px), var(--line) calc(100% / 12 - 1px), var(--line) calc(100% / 12)); border-radius: 2px; }
.year .bar { position: absolute; top: 0; bottom: 0; background: var(--release); border-radius: 2px; opacity: .85; }
.year .bar.scoped { background: repeating-linear-gradient(45deg, var(--release) 0 4px, transparent 4px 7px); }
.year .today-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); }
.year a { color: var(--ink); }

/* species list */
.cols { columns: 15rem auto; column-gap: 2rem; padding: 0; list-style: none; }
.cols li { break-inside: avoid; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.cols .ru { color: var(--muted); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; margin: 1rem 0 2rem; max-width: var(--measure); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.big { font-size: var(--step-3); font-weight: 700; letter-spacing: -0.02em; }

.chart { width: 100%; height: auto; display: block; margin: .5rem 0 1rem; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--muted); font: 12px var(--font); }
.chart .line { fill: none; stroke: var(--lake); stroke-width: 2; }
.chart .b90 { fill: var(--band90); } .chart .b50 { fill: var(--band50); }

.filters { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; margin: 1rem 0; }
.filters select { width: auto; min-height: 2.4rem; padding: .3rem .6rem; }
.note { border-left: 3px solid var(--check); padding: .2rem 0 .2rem 1rem; max-width: var(--measure); }
.ad { margin: 2rem 0; min-height: 90px; }

/* species photos (Wikimedia Commons) */
.photo { margin: 0 0 1.5rem; max-width: 640px; }
.photo img { display: block; width: 100%; height: auto; border-radius: 4px; background: var(--panel); }
.photo figcaption { font-size: .8125rem; color: var(--muted); margin-top: .35rem; }
.photo figcaption a { color: var(--muted); }
.photos { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); margin: 1rem 0 2rem; }
.photo.small { margin: 0; }

/* mobile fixes: facts list and year strip must not overflow narrow screens */
.facts { grid-template-columns: minmax(0, max-content) minmax(0, 1fr); }
.facts dd { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 40rem) {
  .facts { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .facts dd { margin-bottom: .6rem; }
}
.year { grid-template-columns: minmax(5.5rem, 11rem) minmax(0, 1fr); }
.year > div { min-width: 0; }
.year .months { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.year .months span { overflow: hidden; white-space: nowrap; }
@media (max-width: 40rem) { .year .months { font-size: .625rem; } .year { gap: .35rem .6rem; } }
