/* kojak.ru — shared tokens and base styles (landing, catalog, review) */
:root {
  --paper: #f3f5f9;
  --surface: #ffffff;
  --ink: #0f1b2d;
  --ink-2: #3b4a60;
  --muted: #66748a;
  --line: #dde3ec;
  --pen: #2447b3;          /* ballpoint blue: links, primary actions */
  --pen-ink: #ffffff;
  --pen-soft: #e6ecfb;
  --marker: #ffd84d;       /* highlighter */
  --marker-ink: #0f1b2d;
  --red: #d2402f;          /* teacher's red pen */
  --red-soft: #fbe7e4;
  --ok: #1f7a4d;
  --ok-soft: #dff2e8;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(15, 27, 45, .04), 0 12px 32px -18px rgba(15, 27, 45, .28);
  --f-display: "Unbounded", "Golos Text", system-ui, sans-serif;
  --f-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1422;
    --surface: #152033;
    --ink: #e9eef6;
    --ink-2: #c3cddb;
    --muted: #8f9db2;
    --line: #25324a;
    --pen: #8aa8ff;
    --pen-ink: #0d1422;
    --pen-soft: #1c2b4d;
    --marker: #7d6212;
    --marker-ink: #fff6d6;
    --red: #ff7a68;
    --red-soft: #3a1f1d;
    --ok: #62c795;
    --ok-soft: #173427;
    --shadow: 0 0 0 1px rgba(255, 255, 255, .03);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0d1422; --surface: #152033; --ink: #e9eef6; --ink-2: #c3cddb; --muted: #8f9db2; --line: #25324a;
  --pen: #8aa8ff; --pen-ink: #0d1422; --pen-soft: #1c2b4d; --marker: #7d6212; --marker-ink: #fff6d6;
  --red: #ff7a68; --red-soft: #3a1f1d; --ok: #62c795; --ok-soft: #173427; --shadow: 0 0 0 1px rgba(255,255,255,.03);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--f-body); }
a { color: var(--pen); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 20px; }
h1, h2, h3 { margin: 0; line-height: 1.12; text-wrap: balance; }
h1, h2 { font-family: var(--f-display); font-weight: 600; letter-spacing: -.02em; }
h1 { font-size: clamp(34px, 5.6vw, 64px); }
h2 { font-size: clamp(26px, 3.6vw, 40px); }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.mark { background: linear-gradient(transparent 55%, var(--marker) 55%, var(--marker) 92%, transparent 92%); color: inherit; padding: 0 .08em; }

/* top bar */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { font-family: var(--f-display); font-weight: 700; font-size: 19px; color: var(--ink); text-decoration: none; letter-spacing: -.02em; display: inline-flex; align-items: baseline; gap: 2px; }
.brand b { color: var(--red); font-weight: 700; }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
@media (max-width: 640px) { .nav a:not(.btn) { display: none; } .nav a.show-sm { display: inline; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 22px; border-radius: 999px; border: 0; background: var(--ink); color: var(--paper); font: 700 16px/1 var(--f-body); text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.pen { background: var(--pen); color: var(--pen-ink); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.small { padding: 10px 16px; font-size: 14px; }

/* surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.chip { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--pen-soft); color: var(--pen); }
.chip.warm { background: var(--red-soft); color: var(--red); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button { font: 600 14px/1 var(--f-body); padding: 9px 14px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

input[type="search"], input[type="text"], textarea { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
textarea { min-height: 70px; resize: vertical; }

footer.site { border-top: 1px solid var(--line); margin-top: 80px; padding-block: 28px; color: var(--muted); font-size: 14px; }
footer.site .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
