/* goodrealty.com.ua — dark editorial theme: deep slate + muted sage-teal, brass secondary */

:root {
  color-scheme: dark;

  /* palette */
  --bg: #101317;
  --surface: #161a1f;
  --raised: #1c2127;
  --raised-2: #232931;
  --line: #2a3139;
  --line-strong: #37404a;

  --text: #dce0e5;
  --heading: #eef0f3;
  --muted: #a1a9b3;
  --faint: #8a939e;

  --accent: #7fc3b1;
  --accent-strong: #9fd6c7;
  --accent-soft: rgba(127, 195, 177, 0.12);
  --accent-line: rgba(127, 195, 177, 0.38);
  --visited: #b5a8d6;

  --brass: #d2ab6c;
  --brass-soft: rgba(210, 171, 108, 0.12);
  --threat: #e39a94;

  --selection-bg: rgba(127, 195, 177, 0.3);
  --focus: #b8e6d9;

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

  --fs-base: 1rem;
  --fs-sm: 0.875rem;
  --fs-xs: 0.8125rem;
  --lh-body: 1.72;
  --lh-head: 1.3;

  /* 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: 8px;
  --r-lg: 12px;
  --bw: 1px;
  --border: var(--bw) solid var(--line);

  /* layout */
  --wrap: 1160px;
  --measure: 70ch;
  --gutter: 16px;
  --header-h: 64px;

  --ease: 160ms ease;
}

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

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

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

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

/* ---------- 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: calc(var(--header-h) + var(--s-5));
  background: var(--bg);
  scrollbar-color: var(--line-strong) var(--bg);
  scrollbar-width: thin;
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  background-image: radial-gradient(1200px 500px at 85% -10%, rgba(127, 195, 177, 0.045), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--f-body);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: var(--lh-body);
  overflow-x: hidden;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--selection-bg); color: var(--heading); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #4a5460; }

img, picture, video, canvas, svg, iframe {
  display: block;
  max-width: 100%;
}

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

svg { height: auto; }

/* ---------- typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-head);
  color: var(--heading);
  line-height: var(--lh-head);
  overflow-wrap: break-word;
  hyphens: auto;
  text-wrap: balance;
}

h1 { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.005em; }
h3 { font-size: 1.0625rem; font-weight: 650; }
h4, h5, h6 { font-size: 1rem; font-weight: 600; }

@media (min-width: 768px) {
  h1 { font-size: 1.625rem; }
  h2 { font-size: 1.375rem; }
  h3 { font-size: 1.125rem; }
}

@media (min-width: 1024px) {
  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.4375rem; }
  h3 { font-size: 1.1875rem; }
}

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

strong, b { font-weight: 700; color: var(--heading); }

small { font-size: var(--fs-sm); color: var(--muted); }

mark {
  background: var(--brass-soft);
  color: var(--heading);
  padding: 0 0.2em;
  border-radius: var(--r-sm);
  box-shadow: inset 0 -1px 0 rgba(210, 171, 108, 0.5);
}

abbr[title] { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }

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); text-decoration-color: rgba(181, 168, 214, 0.4); }

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);
}

/* lists */
ul, ol { margin: 0 0 var(--s-5); padding-left: var(--s-5); }
li { margin-bottom: var(--s-2); padding-left: var(--s-1); }
li::marker { color: var(--accent); }
ol li::marker { font-family: var(--f-head); font-weight: 600; font-size: 0.92em; }
li > ul, li > ol { margin: var(--s-2) 0 var(--s-2); padding-left: var(--s-5); }
ul ul li::marker { color: var(--brass); }

dl { margin: 0 0 var(--s-5); }
dt { font-family: var(--f-head); font-weight: 600; color: var(--heading); }
dd { margin: 0 0 var(--s-3); color: var(--muted); }

/* hr */
hr {
  border: 0;
  height: 1px;
  margin: var(--s-7) auto;
  background: linear-gradient(90deg, transparent, var(--line-strong) 20%, var(--line-strong) 80%, transparent);
}

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

code {
  background: var(--raised-2);
  color: #e6d6b8;
  padding: 0.12em 0.4em;
  border: var(--border);
  border-radius: var(--r-sm);
  overflow-wrap: anywhere;
  word-break: break-word;
}

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

pre code {
  background: none;
  border: 0;
  padding: 0;
  color: var(--text);
  font-size: inherit;
  overflow-wrap: normal;
  word-break: normal;
  white-space: pre;
}

kbd {
  display: inline-block;
  padding: 0.1em 0.45em;
  background: var(--raised);
  color: var(--heading);
  border: var(--border);
  border-bottom-width: 2px;
  border-radius: var(--r-sm);
  font-size: 0.8em;
  line-height: 1.4;
}

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

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

th {
  background: var(--raised);
  color: var(--heading);
  font-weight: 600;
  white-space: nowrap;
}

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

caption {
  caption-side: bottom;
  padding: var(--s-2) var(--s-4);
  color: var(--muted);
  font-size: var(--fs-xs);
  text-align: left;
}

/* figure */
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: var(--fs-sm);
  color: var(--muted);
  line-height: 1.5;
}

/* forms */
input, textarea, select, button {
  font: inherit;
  color: inherit;
}

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

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

textarea { min-height: 120px; resize: vertical; line-height: 1.6; }

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

input:hover, textarea:hover, select:hover { border-color: #4a5460; }

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

button, [type="button"], [type="submit"], [type="reset"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: var(--s-2) var(--s-5);
  background: var(--raised);
  color: var(--heading);
  border: var(--bw) solid var(--line-strong);
  border-radius: var(--r);
  font-family: var(--f-head);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}

button:hover, [type="submit"]:hover { background: var(--raised-2); border-color: var(--accent-line); }
button:active, [type="submit"]:active { background: var(--accent); color: #0d1614; border-color: var(--accent); }
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: 0;
  z-index: 300;
}

.skip:focus,
.skip:focus-visible {
  left: var(--s-3);
  top: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: var(--accent);
  color: #0d1614;
  font-family: var(--f-head);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--r);
}

/* ---------- header ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(16, 19, 23, 0.94);
  border-bottom: var(--border);
  box-shadow: inset 0 2px 0 var(--accent);
}

@supports ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
  .topbar {
    background: rgba(16, 19, 23, 0.82);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}

.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(--heading);
  font-family: var(--f-head);
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand:visited { color: var(--heading); }
.brand:hover { color: var(--heading); }
.brand:hover .brand-mark { color: var(--accent-strong); }

.brand-mark {
  color: var(--accent);
  transition: color var(--ease);
}

.menu {
  order: 3;
  display: flex;
  flex-wrap: nowrap;
  gap: var(--s-1);
  width: 100%;
  margin: 0 calc(var(--gutter) * -1);
  padding: 0 var(--gutter);
  border-top: var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  font-family: var(--f-head);
  font-size: 0.9375rem;
  font-weight: 500;
  width: calc(100% + var(--gutter) * 2);
}

.menu::-webkit-scrollbar { display: none; }

.menu a {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 var(--s-3);
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 -2px 0 transparent;
  transition: color var(--ease), box-shadow var(--ease);
}

.menu a:first-child { padding-left: 0; }

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

.menu a:hover,
.menu a[aria-current="page"] {
  color: var(--heading);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.lang {
  display: flex;
  gap: var(--s-1);
  padding: 2px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--r);
  font-family: var(--f-head);
  font-size: var(--fs-sm);
}

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

.lang a:visited { color: var(--muted); }
.lang a:hover { color: var(--heading); background: var(--raised); }

.lang a[aria-current="true"] {
  color: #0d1614;
  background: var(--accent);
  font-weight: 700;
}

@media (min-width: 768px) {
  .topbar-row { flex-wrap: nowrap; padding-top: 0; gap: var(--s-5); }
  .brand { margin-right: 0; font-size: 1.25rem; }
  .menu {
    order: 0;
    width: auto;
    margin: 0 auto 0 var(--s-4);
    padding: 0;
    border-top: 0;
    gap: var(--s-2);
  }
  .menu a:first-child { padding-left: var(--s-3); }
}

/* ---------- 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: var(--fs-sm);
  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; text-underline-offset: 3px; }

.post-head { max-width: 860px; }

.post-head h1 {
  max-width: 34ch;
  font-size: 1.375rem;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
}

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

@media (min-width: 1024px) {
  .post-head h1 { font-size: 1.9375rem; line-height: 1.27; }
}

.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(--border);
  font-family: var(--f-head);
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.5;
}

.post-info > * { display: inline-flex; align-items: center; gap: var(--s-2); }
.post-info > * + *::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

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

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

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

.toc {
  padding: var(--s-4) var(--s-5);
  background: var(--surface);
  border: var(--border);
  border-radius: var(--r);
  font-family: var(--f-head);
  font-size: var(--fs-sm);
  line-height: 1.45;
}

.toc-title {
  margin-bottom: var(--s-3);
  color: var(--faint);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  counter-reset: toc;
}

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

.toc a {
  display: flex;
  gap: var(--s-2);
  min-height: 44px;
  align-items: center;
  padding: var(--s-1) 0;
  color: var(--muted);
  text-decoration: none;
  border-top: var(--bw) solid transparent;
}

.toc li + li a { border-top-color: var(--line); }

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  flex: 0 0 auto;
  color: var(--accent);
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  opacity: 0.85;
}

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

@media (min-width: 1024px) {
  .post-layout {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: var(--s-7);
    align-items: start;
  }

  .toc {
    position: sticky;
    top: calc(var(--header-h) + var(--s-5));
    align-self: start;
    max-height: calc(100vh - var(--header-h) - var(--s-7));
    overflow-y: auto;
    padding: 0 0 0 var(--s-4);
    background: transparent;
    border: 0;
    border-left: 2px solid var(--line);
    border-radius: 0;
  }

  .toc a { min-height: 0; padding: var(--s-2) 0; }
  .toc li + li a { border-top-color: transparent; }
}

@media (min-width: 1280px) {
  .post-layout { grid-template-columns: 250px minmax(0, 1fr); gap: var(--s-8); }
}

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

@media (min-width: 480px) {
  .post { padding: var(--s-6) var(--s-5); }
}

@media (min-width: 768px) {
  .post { padding: var(--s-7); }
}

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

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

.post .intro {
  font-size: 1.0625em;
  line-height: 1.7;
  color: var(--heading);
  padding-bottom: var(--s-5);
  margin-bottom: var(--s-6);
  border-bottom: var(--border);
}

.post h2 {
  position: relative;
  margin: var(--s-7) 0 var(--s-4);
  padding-top: var(--s-5);
  border-top: var(--border);
}

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

.post h3 { margin: var(--s-6) 0 var(--s-3); }

.post h2 + p, .post h3 + p { margin-top: 0; }

.post > :first-child { margin-top: 0; }
.post > :last-child { margin-bottom: 0; }

.post a { overflow-wrap: anywhere; }

.post img { margin: var(--s-6) 0; border: var(--border); }

/* summary */
.summary {
  margin: var(--s-2) 0 var(--s-6);
  padding: var(--s-4) var(--s-5);
  background: var(--raised);
  border: var(--border);
  border-left: 3px solid var(--brass);
  border-radius: var(--r);
}

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

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

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

.terms div {
  padding: var(--s-3) var(--s-4);
  background: var(--raised);
  border: var(--border);
  border-left: 2px solid var(--accent);
  border-radius: var(--r);
}

.terms dt {
  margin-bottom: var(--s-1);
  color: var(--heading);
  font-family: var(--f-head);
  font-weight: 700;
  line-height: 1.4;
}

.terms dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

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

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

.post blockquote p {
  margin: 0;
  color: #c9ced5;
  font-size: 1.0625em;
  line-height: 1.65;
  font-style: italic;
  font-weight: 400;
}

.post blockquote p + p { margin-top: var(--s-3); }

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

@media (min-width: 768px) {
  .post blockquote { padding: var(--s-5) var(--s-6); }
}

/* ---------- 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-size: 1.25rem;
}

.more-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: var(--border);
}

.more-list li {
  margin: 0;
  padding: 0;
  border-bottom: var(--border);
}

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

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

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

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

.more-name {
  color: var(--heading);
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.4;
  transition: color var(--ease);
}

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

@media (min-width: 768px) {
  .more { padding: var(--s-8) 0; }
  .more h2 { font-size: 1.375rem; }
  .more-list a {
    grid-template-columns: 120px 220px minmax(0, 1fr);
    align-items: baseline;
    padding: var(--s-5) var(--s-3);
    margin: 0 calc(var(--s-3) * -1);
  }
}

@media (min-width: 1024px) {
  .more-list a { grid-template-columns: 140px 260px minmax(0, 1fr); }
}

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

.foot-row {
  display: flex;
  flex-direction: column;
  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-underline-offset: 3px;
}

.dmca,
.foot a.dmca {
  min-height: 32px;
  padding: 0 var(--s-3);
  border: var(--bw) solid var(--line-strong);
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  color: var(--muted);
  letter-spacing: 0.04em;
}

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

@media (min-width: 768px) {
  .foot-row {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- print ---------- */
@media print {
  .topbar, .toc, .more, .foot, .skip { display: none; }
  body { background: #fff; color: #111; }
  .post { border: 0; padding: 0; background: none; }
}