/* kinoved.com.ua — dark editorial theme: warm charcoal + muted coral, sage as secondary */

:root {
  color-scheme: dark;

  /* palette */
  --bg: #121115;
  --surface: #19181d;
  --surface-2: #211f26;
  --surface-3: #2a2830;
  --line: #34313b;
  --line-soft: #28262e;

  --text: #dedbe2;
  --text-strong: #f0edf2;
  --muted: #a7a2ad;
  --faint: #8c8793;

  --accent: #e28e74;
  --accent-strong: #eea78f;
  --accent-soft: rgba(226, 142, 116, 0.14);
  --accent-line: rgba(226, 142, 116, 0.45);
  --visited: #c9a3b8;

  --sage: #8fbcab;
  --sage-soft: rgba(143, 188, 171, 0.12);
  --threat: #ec8a8a;

  --selection: rgba(226, 142, 116, 0.32);
  --focus: #f3b8a5;

  /* typography */
  --f-head: "Onest", "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --f-body: "Literata", Georgia, "Times New Roman", serif;
  --f-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --fs-base: 1rem;
  --lh-base: 1.72;
  --measure: 70ch;

  /* spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;

  /* radii & borders */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --bw: 1px;
  --border: var(--bw) solid var(--line);

  --wrap: 1160px;
  --gutter: var(--s-4);
  --header-h: 64px;

  --ease: 160ms ease;
}

/* ---------- reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--s-5);
  background: var(--bg);
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 500px at 85% -10%, rgba(226, 142, 116, 0.05), transparent 70%),
    radial-gradient(900px 400px at -10% 30%, rgba(143, 188, 171, 0.035), transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--f-body);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: var(--lh-base);
  overflow-x: hidden;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--selection);
  color: var(--text-strong);
}

/* scrollbar */
html {
  scrollbar-color: var(--surface-3) var(--bg);
  scrollbar-width: thin;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border: 2px solid var(--bg);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: #3a3741; }

/* media */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img,
video {
  border-radius: var(--r-md);
  filter: brightness(0.92);
}

iframe {
  max-width: 100%;
  border: 0;
  border-radius: var(--r-md);
}

/* ---------- links ---------- */
a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--ease), text-decoration-color var(--ease), background-color var(--ease);
}

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

a:hover {
  color: var(--accent-strong);
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
}

:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ---------- forms ---------- */
input,
textarea,
select,
button {
  font: inherit;
  color: var(--text);
}

input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  padding: var(--s-2) var(--s-3);
  background: var(--surface-2);
  border: var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--ease), background-color var(--ease);
}

input::placeholder,
textarea::placeholder { color: var(--faint); opacity: 1; }

input:hover,
textarea:hover,
select:hover { border-color: #45414d; }

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  border-color: var(--accent);
  outline: 2px solid var(--accent-line);
  outline-offset: 1px;
}

textarea { min-height: 140px; resize: vertical; }

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  min-height: 0;
  accent-color: var(--accent);
}

button,
.button,
input[type="submit"],
input[type="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  width: auto;
  min-height: 44px;
  padding: var(--s-2) var(--s-5);
  background: var(--surface-3);
  color: var(--text-strong);
  border: var(--bw) solid #45414d;
  border-radius: var(--r-md);
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}

button:hover,
.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}

button:active { background: rgba(226, 142, 116, 0.22); }

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: var(--s-3);
  z-index: 300;
}

.skip:focus,
.skip:focus-visible {
  left: var(--s-3);
  padding: var(--s-2) var(--s-4);
  background: var(--surface-3);
  color: var(--text-strong);
  border: var(--bw) solid var(--accent);
  border-radius: var(--r-md);
  font-family: var(--f-head);
  text-decoration: none;
}

/* ---------- header ---------- */
.topbar {
  position: relative;
  z-index: 100;
  background: rgba(22, 21, 26, 0.94);
  border-bottom: var(--border);
}

.topbar::before {
  content: "";
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0 32%, var(--line) 32% 100%);
}

.topbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-4);
  min-height: var(--header-h);
  padding-top: var(--s-2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  margin-right: auto;
  color: var(--text-strong);
  text-decoration: none;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.015em;
}

.brand:visited { color: var(--text-strong); }
.brand:hover { color: var(--text-strong); text-decoration: none; }

.brand-mark {
  color: var(--accent);
  display: inline-flex;
}

.menu {
  order: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--s-1);
  width: 100%;
  margin: 0 calc(var(--s-2) * -1);
  padding-bottom: var(--s-2);
  font-family: var(--f-head);
  font-weight: 500;
  font-size: 0.95rem;
}

.menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s-2);
  color: var(--muted);
  text-decoration: none;
  border-radius: var(--r-sm);
  position: relative;
}

.menu a:visited { color: var(--muted); }

.menu a:hover {
  color: var(--text-strong);
  background: var(--surface-2);
}

.menu a[aria-current="page"] {
  color: var(--text-strong);
}

.menu a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: var(--s-2);
  right: var(--s-2);
  bottom: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.lang {
  display: flex;
  gap: var(--s-1);
  padding: 3px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--r-md);
  font-family: var(--f-head);
  font-size: 0.85rem;
}

.lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 38px;
  padding: 0 var(--s-2);
  color: var(--muted);
  text-decoration: none;
  border-radius: var(--r-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lang a:visited { color: var(--muted); }
.lang a:hover { color: var(--text-strong); background: var(--surface-2); }

.lang a[aria-current="true"] {
  color: var(--text-strong);
  background: var(--surface-3);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* ---------- article head ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-1) var(--s-2);
  margin: var(--s-6) 0 var(--s-4);
  font-family: var(--f-head);
  font-size: 0.85rem;
  color: var(--faint);
  line-height: 1.5;
}

.crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--muted);
  text-decoration: none;
}

.crumbs a:visited { color: var(--muted); }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }

.post-head h1 {
  max-width: 34ch;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: clamp(1.3rem, 1.05rem + 1.2vw, 1.5rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--text-strong);
  overflow-wrap: anywhere;
  hyphens: auto;
}

.post-info {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  margin: var(--s-4) 0 var(--s-6);
  padding-top: var(--s-4);
  border-top: var(--bw) dashed var(--line);
  font-family: var(--f-head);
  font-size: 0.875rem;
  color: var(--muted);
}

.post-info > * {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}

.post-info > *::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.8;
  flex: none;
}

/* ---------- cover ---------- */
.cover {
  max-width: calc(var(--wrap) + 160px);
  margin: 0 auto var(--s-6);
  padding: 0 var(--gutter);
}

.cover img {
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  background: var(--surface-2);
  border: var(--border);
  border-radius: var(--r-lg);
}

/* ---------- article grid ---------- */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-6);
  align-items: start;
}

/* TOC */
.toc {
  padding: var(--s-4) var(--s-4) var(--s-4) var(--s-5);
  background: var(--surface);
  border: var(--border);
  border-radius: var(--r-lg);
  font-family: var(--f-head);
  font-size: 0.9rem;
  position: relative;
}

.toc::before {
  content: "";
  position: absolute;
  left: 0;
  top: var(--s-4);
  bottom: var(--s-4);
  width: 2px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.toc-title {
  margin-bottom: var(--s-3);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc ol,
.toc ul {
  list-style: none;
  display: grid;
  gap: 2px;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
  margin: 0;
  padding: 0;
}

.toc li::before { content: none; }

.toc a {
  display: flex;
  gap: var(--s-2);
  align-items: baseline;
  min-height: 40px;
  padding: var(--s-2) var(--s-2);
  margin-left: calc(var(--s-2) * -1);
  color: var(--muted);
  text-decoration: none;
  line-height: 1.4;
  border-radius: var(--r-sm);
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--f-mono);
  font-size: 0.75rem;
  color: var(--faint);
  flex: none;
}

.toc a:visited { color: var(--muted); }

.toc a:hover {
  color: var(--text-strong);
  background: var(--surface-2);
}

.toc a:hover::before { color: var(--accent); }

/* ---------- post body ---------- */
.post {
  min-width: 0;
  max-width: calc(var(--measure) + 2 * var(--s-7));
  padding: var(--s-5) var(--s-4);
  background: var(--surface);
  border: var(--border);
  border-radius: var(--r-lg);
}

.post > * { max-width: var(--measure); }

.post p { margin: 0 0 var(--s-5); }

.post .intro {
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--text-strong);
  padding-bottom: var(--s-5);
  border-bottom: var(--border);
}

.post h2,
.post h3,
.post h4 {
  font-family: var(--f-head);
  color: var(--text-strong);
  overflow-wrap: anywhere;
  scroll-margin-top: var(--s-5);
}

.post h2 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: var(--s-7) 0 var(--s-4);
  padding-top: var(--s-5);
  border-top: var(--bw) solid var(--line-soft);
  position: relative;
}

.post h2::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}

.post h3 {
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.35;
  margin: var(--s-6) 0 var(--s-3);
}

.post h4 {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  margin: var(--s-5) 0 var(--s-2);
  color: var(--text);
}

.post > h2:first-child,
.post > h3:first-child { margin-top: 0; }

.post strong,
.post b { font-weight: 700; color: var(--text-strong); }

.post em { font-style: italic; }

/* lists */
.post ul,
.post ol {
  margin: 0 0 var(--s-5);
  padding-left: var(--s-5);
}

.post li { margin-bottom: var(--s-2); padding-left: var(--s-1); }

.post ul { list-style: none; padding-left: var(--s-5); }

.post ul > li { position: relative; }

.post ul > li::before {
  content: "";
  position: absolute;
  left: calc(var(--s-4) * -1);
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--accent);
  transform: rotate(45deg);
}

.post ul ul > li::before {
  background: transparent;
  border: 1.5px solid var(--sage);
  border-radius: 50%;
  transform: none;
}

.post ol li::marker {
  color: var(--accent);
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 0.92em;
}

.post li > ul,
.post li > ol {
  margin: var(--s-2) 0 0;
}

/* summary card */
.summary {
  margin: var(--s-2) 0 var(--s-5);
  padding: var(--s-4) var(--s-5);
  background: var(--surface-2);
  border: var(--border);
  border-left: 3px solid var(--sage);
  border-radius: var(--r-md);
}

.summary-title {
  margin-bottom: var(--s-2) !important;
  font-family: var(--f-head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
}

.summary p:last-child { margin-bottom: 0; }

/* definitions */
.terms {
  display: grid;
  gap: var(--s-3);
  margin: 0 0 var(--s-5);
}

.terms div {
  padding: var(--s-3) var(--s-4);
  background: var(--surface-2);
  border: var(--border);
  border-radius: var(--r-md);
}

.terms dt {
  font-family: var(--f-head);
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: var(--s-1);
}

.terms dt::before {
  content: "— ";
  color: var(--accent);
}

.terms dd { color: var(--muted); }

/* blockquote */
.post blockquote,
blockquote {
  margin: var(--s-6) 0;
  padding: var(--s-4) var(--s-5);
  background: var(--surface-2);
  border: var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--muted);
}

.post blockquote p,
blockquote p {
  margin: 0 0 var(--s-3);
  font-size: 1.05rem;
  line-height: 1.65;
  font-style: italic;
  color: #c6c1cb;
}

.post blockquote p:last-child,
blockquote p:last-child { margin-bottom: 0; }

blockquote cite,
blockquote footer {
  display: block;
  margin-top: var(--s-3);
  font-family: var(--f-head);
  font-size: 0.85rem;
  font-style: normal;
  color: var(--faint);
}

/* code */
code,
kbd,
samp,
pre {
  font-family: var(--f-mono);
  font-size: 0.88em;
}

:not(pre) > code {
  padding: 0.12em 0.4em;
  background: var(--surface-3);
  border: var(--bw) solid var(--line);
  border-radius: var(--r-sm);
  color: #f0c7b8;
  overflow-wrap: anywhere;
}

pre {
  margin: 0 0 var(--s-5);
  padding: var(--s-4);
  max-width: 100%;
  overflow-x: auto;
  background: #0d0c10;
  border: var(--border);
  border-radius: var(--r-md);
  line-height: 1.6;
  color: var(--text);
  tab-size: 2;
  -webkit-overflow-scrolling: touch;
}

pre code {
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  font-size: inherit;
  white-space: pre;
}

kbd {
  display: inline-block;
  padding: 0.1em 0.45em;
  background: var(--surface-3);
  border: var(--bw) solid #47434f;
  border-bottom-width: 2px;
  border-radius: var(--r-sm);
  color: var(--text-strong);
  font-size: 0.8em;
  line-height: 1.4;
}

/* tables */
table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 0 var(--s-5);
  overflow-x: auto;
  border-collapse: collapse;
  border: var(--border);
  border-radius: var(--r-md);
  font-family: var(--f-head);
  font-size: 0.92rem;
  line-height: 1.5;
  -webkit-overflow-scrolling: touch;
}

th,
td {
  padding: var(--s-3) var(--s-4);
  text-align: left;
  vertical-align: top;
  border-bottom: var(--bw) solid var(--line-soft);
  min-width: 120px;
}

thead th,
th {
  background: var(--surface-3);
  color: var(--text-strong);
  font-weight: 600;
  border-bottom: var(--border);
  white-space: nowrap;
}

tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.015); }
tbody tr:hover td { background: var(--accent-soft); }
tbody tr:last-child td { border-bottom: 0; }

caption {
  padding: var(--s-2) var(--s-4);
  text-align: left;
  color: var(--muted);
  font-size: 0.85rem;
}

/* misc elements */
hr {
  height: 0;
  margin: var(--s-7) 0;
  border: 0;
  border-top: var(--border);
  position: relative;
  overflow: visible;
}

hr::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  width: 7px;
  height: 7px;
  background: var(--accent);
  transform: translateX(-50%) rotate(45deg);
  outline: 6px solid var(--surface);
}

figure { margin: var(--s-6) 0; }

figure img {
  width: 100%;
  border: var(--border);
}

figcaption {
  margin-top: var(--s-2);
  font-family: var(--f-head);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}

small { font-size: 0.85em; color: var(--muted); }

mark {
  padding: 0.05em 0.25em;
  background: rgba(226, 142, 116, 0.26);
  color: var(--text-strong);
  border-radius: 2px;
}

abbr[title] {
  text-decoration: underline dotted var(--faint);
  cursor: help;
}

sub,
sup { font-size: 0.75em; line-height: 0; }

.post a { overflow-wrap: anywhere; }

/* ---------- read more ---------- */
.more {
  margin-top: var(--s-8);
  padding: var(--s-7) 0;
  background: var(--surface);
  border-top: var(--border);
  border-bottom: var(--border);
}

.more h2 {
  margin-bottom: var(--s-5);
  font-family: var(--f-head);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-strong);
}

.more-list {
  list-style: none;
  display: grid;
  gap: var(--s-3);
}

.more-list li { margin: 0; }

.more-list a {
  display: grid;
  gap: var(--s-1) var(--s-5);
  padding: var(--s-4);
  background: var(--surface-2);
  border: var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  text-decoration: none;
  transition: border-color var(--ease), background-color var(--ease);
}

.more-list a:visited { color: var(--text); }

.more-list a:hover {
  background: var(--surface-3);
  border-color: var(--accent-line);
}

.more-list a:hover .more-name { color: var(--accent-strong); }

.more-topic {
  font-family: var(--f-head);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.more-topic.is-threat { color: var(--threat); }

.more-name {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.35;
  color: var(--text-strong);
  transition: color var(--ease);
  overflow-wrap: anywhere;
}

.more-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---------- footer ---------- */
.foot {
  background: #0f0e12;
  color: var(--muted);
  font-family: var(--f-head);
  font-size: 0.875rem;
  border-top: var(--border);
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding-top: var(--s-6);
  padding-bottom: var(--s-6);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-1) var(--s-4);
}

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
}

.foot a:visited { color: var(--text); }

.foot a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
}

.dmca {
  display: inline-flex;
  align-items: center;
  padding: var(--s-1) var(--s-3);
  border: var(--border);
  border-radius: var(--r-sm);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.foot a.dmca { min-height: 36px; }

/* ---------- breakpoints ---------- */
@media (min-width: 480px) {
  :root { --gutter: 20px; }

  .post { padding: var(--s-6) var(--s-5); }

  .post-head h1 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.6rem); }
}

@media (min-width: 768px) {
  :root {
    --fs-base: 1.0625rem;
    --gutter: var(--s-6);
  }

  html { scroll-padding-top: calc(var(--header-h) + var(--s-5)); }

  .topbar {
    position: sticky;
    top: 0;
    -webkit-backdrop-filter: saturate(1.1) blur(6px);
    backdrop-filter: saturate(1.1) blur(6px);
  }

  .topbar-row {
    flex-wrap: nowrap;
    gap: var(--s-5);
    padding-top: 0;
  }

  .brand { margin-right: 0; }

  .menu {
    order: 0;
    width: auto;
    flex-wrap: wrap;
    margin: 0 auto 0 0;
    padding-bottom: 0;
  }

  .post-head h1 { font-size: 1.65rem; line-height: 1.28; }

  .cover { margin-bottom: var(--s-7); }

  .post { padding: var(--s-7) var(--s-7); }

  .post h2 { font-size: 1.3rem; }
  .post h3 { font-size: 1.1rem; }

  .post .intro { font-size: 1.15rem; }

  .terms div { padding: var(--s-4) var(--s-5); }

  .more h2 { font-size: 1.3rem; }

  .more-list a {
    grid-template-columns: 120px minmax(0, 220px) minmax(0, 1fr);
    align-items: baseline;
    padding: var(--s-4) var(--s-5);
  }

  pre { padding: var(--s-5); }
}

@media (min-width: 1024px) {
  :root { --fs-base: 1.125rem; }

  .post-head h1 { font-size: 1.85rem; }

  .post-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: var(--s-7);
  }

  .toc {
    position: sticky;
    top: calc(var(--header-h) + var(--s-5));
    max-height: calc(100vh - var(--header-h) - var(--s-7));
    overflow-y: auto;
  }

  .post h2 { font-size: 1.38rem; }
  .post h3 { font-size: 1.15rem; }
}

@media (min-width: 1280px) {
  .post-head h1 { font-size: 2rem; }

  .post-layout { gap: var(--s-8); }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ---------- print fallback ---------- */
@media print {
  .topbar,
  .toc,
  .more,
  .foot { display: none; }

  .post { border: 0; padding: 0; }
}