/* Жизнь в Дании — сайт вики.
   Направление: туманная акварель, пыльно-голубой и чернильно-синий, бумага.
   По макету Лизы из Variant («Независимая вики»), ноябрь 2026.
   Шрифты подключены отдельным файлом fonts.css. */

:root {
  --bg: #f9fbfc;          /* бумага с холодным оттенком */
  --card: #ffffff;
  --ink: #1a3a5f;         /* чернильно-синий: заголовки, ссылки */
  --text: #2c3e50;        /* основной текст */
  --muted: #5f7286;
  --accent: #9ac8e2;      /* пыльно-голубой: метки, линии */
  --accent-strong: #4f8db3;
  --mist: #d0e6f2;        /* туман: подсветка, фон аватарки */
  --line: rgba(154, 200, 226, 0.35);
  --shadow: rgba(26, 58, 95, 0.06);
  --mark: #dcedf6;

  --display: "Playfair Display", "Times New Roman", Georgia, serif;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1822;
    --card: #152230;
    --ink: #d8e6f1;
    --text: #c3d1dc;
    --muted: #8ea2b4;
    --accent: #7fb3d3;
    --accent-strong: #9ccbe6;
    --mist: #1f3448;
    --line: rgba(127, 179, 211, 0.22);
    --shadow: rgba(0, 0, 0, 0.35);
    --mark: #23415a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }
img { max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* метка вида «— НАРОДНАЯ ВИКИ —» */
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

/* ---------- туман на главной ---------- */
.mist { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.mist i {
  position: absolute;
  background: linear-gradient(135deg, var(--mist), transparent 75%);
  clip-path: polygon(10% 0%, 100% 20%, 85% 90%, 5% 70%);
  filter: blur(36px);
  opacity: 0.75;
}
.mist i:nth-child(1) { width: 520px; height: 420px; left: -120px; top: -60px; transform: rotate(-8deg); }
.mist i:nth-child(2) { width: 380px; height: 320px; left: 8%; top: 300px; transform: rotate(6deg); opacity: 0.5; }
.mist i:nth-child(3) { width: 560px; height: 460px; right: -160px; top: 520px; transform: rotate(14deg); }

/* ---------- шапка внутренних страниц ---------- */
.bar { border-bottom: 1px solid var(--line); background: var(--bg); }
.bar-in {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding-block: 14px;
}
.brand {
  font-family: var(--display); font-size: 22px; color: var(--ink); text-decoration: none;
  white-space: nowrap;
}
.bar .search { flex: 0 1 380px; }

/* ---------- поиск ---------- */
.search { position: relative; }
.search input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  padding: 9px 40px 9px 14px;
  border-radius: 2px;
  -webkit-appearance: none;
  appearance: none;
}
.search input::placeholder { color: var(--muted); opacity: 0.85; }
.search .icon {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--accent-strong); pointer-events: none;
}
.hero .search { max-width: 700px; margin: 0 auto; }
.hero .search input {
  border: 0; font-size: 20px; padding: 24px 60px 24px 28px;
  box-shadow: 0 20px 40px var(--shadow);
}
.hero .search .icon { right: 24px; width: 22px; height: 22px; }

.results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20;
  background: var(--card); box-shadow: 0 24px 48px var(--shadow);
  border: 1px solid var(--line);
  max-height: min(70vh, 560px); overflow-y: auto;
  text-align: left;
}
.results a {
  display: block; padding: 14px 18px; text-decoration: none; color: var(--text);
  border-bottom: 1px solid var(--line);
}
.results a:last-child { border-bottom: 0; }
.results a[aria-selected="true"], .results a:hover { background: var(--mark); }
.results .r-sec { font-family: var(--sans); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-strong); }
.results .r-title { display: block; font-family: var(--display); font-size: 18px; color: var(--ink); line-height: 1.3; margin: 2px 0 4px; }
.results .r-snip { display: block; font-size: 15px; line-height: 1.5; color: var(--muted); }
.results mark { background: var(--mark); color: var(--ink); padding: 0 1px; }
.results .r-empty { padding: 16px 18px; font-size: 16px; color: var(--muted); }

/* ---------- главная ---------- */
.hero { text-align: center; padding-block: 80px 70px; }
.hero .eyebrow { display: flex; align-items: center; justify-content: center; gap: 16px; }
.hero .eyebrow::before, .hero .eyebrow::after { content: ""; width: 32px; height: 1px; background: var(--accent); }
.hero h1 {
  font-family: var(--display); font-weight: 400; color: var(--ink);
  font-size: clamp(2.6rem, 7vw, 4.2rem); line-height: 1.1; letter-spacing: -0.02em;
  margin: 14px 0 18px; text-wrap: balance;
}
.hero .lead { max-width: 560px; margin: 0 auto 44px; color: var(--muted); font-size: 18px; text-wrap: balance; }
.hero label.ask-label {
  display: block; font-family: var(--sans); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}

.bot {
  display: flex; align-items: center; gap: 32px;
  background: linear-gradient(to right, var(--card), var(--bg));
  border-left: 3px solid var(--accent);
  padding: 32px 40px; margin-bottom: 64px;
  clip-path: polygon(0.6% 0%, 100% 4%, 99.4% 100%, 0% 96%);
}
.bot img { width: 84px; height: 84px; border-radius: 50%; flex: none; background: var(--mist); box-shadow: 0 10px 24px var(--shadow); }
.bot h2 { font-family: var(--display); font-weight: 400; font-size: 24px; color: var(--ink); margin: 0 0 6px; }
.bot p { margin: 0 0 10px; max-width: 560px; font-size: 16px; line-height: 1.6; }
.bot a.go { font-family: var(--sans); font-size: 14px; font-weight: 500; text-decoration-color: var(--ink); }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-bottom: 72px; }
.card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  min-height: 190px; padding: 28px 30px;
  background: var(--card); border: 1px solid var(--line);
  color: inherit; text-decoration: none;
  clip-path: polygon(2% 0%, 100% 0%, 98% 100%, 0% 98%);
  transition: transform .35s cubic-bezier(.165,.84,.44,1), box-shadow .35s;
}
.card:nth-child(even) { clip-path: polygon(0% 2%, 98% 0%, 100% 98%, 2% 100%); }
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px var(--shadow); }
.card .eyebrow { font-size: 9.5px; letter-spacing: 0.2em; display: flex; align-items: center; gap: 8px; }
.card .eyebrow::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.card h2 { font-family: var(--display); font-weight: 400; font-size: 23px; line-height: 1.25; color: var(--ink); margin: 0; text-wrap: balance; }
.card .eyebrow + h2 { margin-top: 10px; }
.card .teaser { display: block; margin-top: 12px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.card .count {
  font-family: var(--sans); font-size: 12px; font-weight: 500; color: var(--muted);
  display: flex; justify-content: space-between; align-items: center;
}
.card .count::after { content: "→"; font-size: 17px; color: var(--ink); transition: transform .3s; }
.card:hover .count::after { transform: translateX(5px); }

.note { max-width: 760px; margin: 0 auto 80px; text-align: center; font-size: 15px; font-style: italic; color: var(--muted); }

/* ---------- раздел ---------- */
.page-head { padding-block: 48px 8px; }
.crumbs { font-family: var(--sans); font-size: 12px; letter-spacing: 0.08em; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { margin: 0 8px; color: var(--accent); }
.page-head h1, .article h1 {
  font-family: var(--display); font-weight: 400; color: var(--ink);
  font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.15; letter-spacing: -0.01em;
  margin: 14px 0 10px; text-wrap: balance;
}
.list { list-style: none; padding: 0; margin: 28px 0 80px; max-width: 760px; border-top: 1px solid var(--line); }
.list li { border-bottom: 1px solid var(--line); }
.list a { display: flex; gap: 18px; padding: 16px 4px; text-decoration: none; font-size: 20px; line-height: 1.4; }
.list a:hover { background: var(--card); }
.list .n { font-family: var(--sans); font-size: 12px; color: var(--accent-strong); padding-top: 6px; min-width: 22px; font-variant-numeric: tabular-nums; }

/* ---------- статья ---------- */
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px; padding-block: 44px 24px; }
.article-grid.has-side { grid-template-columns: minmax(0, 680px) 240px; justify-content: space-between; }
.article { min-width: 0; }
.checked { margin: 0 0 30px; }
.prose { color: var(--text); }
.prose p { margin: 0 0 1.05em; }
.prose h2 {
  font-family: var(--display); font-weight: 400; color: var(--ink);
  font-size: 28px; line-height: 1.25; margin: 2em 0 0.6em; text-wrap: balance; scroll-margin-top: 20px;
}
.prose h3 {
  font-family: var(--sans); font-weight: 500; color: var(--ink);
  font-size: 17px; line-height: 1.4; margin: 1.7em 0 0.5em; scroll-margin-top: 20px;
}
.prose .hash { margin-left: 10px; font-family: var(--sans); font-size: 0.7em; color: var(--accent); text-decoration: none; opacity: 0; }
.prose h2:hover .hash, .prose h3:hover .hash, .prose .hash:focus { opacity: 1; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--accent-strong); }
.prose blockquote {
  margin: 1.4em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent);
  font-style: italic; color: var(--ink);
}
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.prose code { font-family: ui-monospace, Menlo, monospace; font-size: 0.85em; background: var(--mark); padding: 1px 5px; }
.prose sup.fn { font-family: var(--sans); font-size: 0.62em; line-height: 0; margin-left: 1px; }
.prose sup.fn a {
  text-decoration: none; color: var(--accent-strong); padding: 1px 3px;
  border-radius: 2px; background: var(--mark);
}
.prose sup.fn a:hover { color: var(--ink); }
.prose .sources + ol, .prose .sources ~ ol { font-size: 15px; line-height: 1.55; }

.toc-side { position: sticky; top: 24px; align-self: start; font-family: var(--sans); font-size: 13px; line-height: 1.45; padding-top: 128px; }
.toc-side p { margin: 0 0 10px; }
.toc-side ol { list-style: none; padding: 0 0 0 14px; margin: 0; border-left: 1px solid var(--line); }
.toc-side li { margin: 0 0 9px; }
.toc-side a { color: var(--muted); text-decoration: none; }
.toc-side a:hover { color: var(--ink); }
details.toc { display: none; margin: 0 0 28px; border: 1px solid var(--line); background: var(--card); }
details.toc summary { cursor: pointer; padding: 12px 16px; font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--ink); }
details.toc ol { margin: 0; padding: 0 16px 14px 34px; font-family: var(--sans); font-size: 14px; line-height: 1.5; }
details.toc li { margin-bottom: 6px; }

.also { margin: 56px 0 8px; }
.also > .eyebrow { margin-bottom: 16px; display: block; }
.also .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 0; gap: 18px; }
.also .card { min-height: 0; padding: 20px 22px; gap: 14px; }
.also .card h2 { font-size: 18px; margin: 6px 0 0; }

.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 40px 0 0; font-family: var(--sans); }
.pn a { display: block; padding: 14px 0; text-decoration: none; font-size: 15px; line-height: 1.4; border-top: 1px solid var(--line); }
.pn a.next { text-align: right; }
.pn small { display: block; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-strong); margin-bottom: 4px; }

/* ---------- подвал ---------- */
.foot { border-top: 1px solid var(--line); margin-top: 56px; padding-block: 40px 56px; }
.foot .bot { margin-bottom: 28px; }
.foot-links { font-family: var(--sans); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 14px; }
.foot-note { font-size: 14px; font-style: italic; color: var(--muted); max-width: 760px; margin: 0; }
.home .foot { border-top: 0; margin-top: 0; padding-top: 0; }

/* ---------- узкие экраны ---------- */
@media (max-width: 980px) {
  .article-grid.has-side { grid-template-columns: minmax(0, 1fr); }
  .toc-side { display: none; }
  details.toc { display: block; }
}
@media (max-width: 860px) {
  .cards, .also .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .hero { padding-block: 48px 44px; }
  .hero .search input { font-size: 17px; padding: 18px 50px 18px 18px; }
  .cards, .also .cards { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .card { min-height: 0; }
  .bot { flex-direction: column; align-items: flex-start; gap: 18px; padding: 26px 24px; }
  .bot img { width: 64px; height: 64px; }
  .bar-in { flex-wrap: wrap; gap: 10px; }
  .bar .search { flex: 1 1 100%; }
  .prose h2 { font-size: 24px; }
  .pn { grid-template-columns: 1fr; }
  .pn a.next { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* штатный крестик Safari/Chrome в поле поиска мешает иконке */
.search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
