/* porago.app — цвета и настроение приложения (app/css/app.css): тёплый светлый фон, зелёный акцент; тёмная тема — по системе. */
:root {
  --bg: #f6f5f2; --surface: #ffffff; --surface2: #efede8; --text: #1c1d1f; --muted: #62656b; --line: #dcd9d2;
  --accent: #1f6f5c; --accent-fg: #ffffff; --chip: #e7e4dd; --chip-on: #1f6f5c; --chip-on-fg: #ffffff;
  --mark: #fdf1cf; --mark-text: #7a5600;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 6px 20px rgba(0,0,0,.05);
  --contour: rgba(31,111,92,.10);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121417; --surface: #1b1e22; --surface2: #23272c; --text: #eceae6; --muted: #a2a6ad; --line: #30353b;
    --accent: #5fc2a6; --accent-fg: #0d1513; --chip: #2a2f35; --chip-on: #5fc2a6; --chip-on-fg: #0d1513;
    --mark: #362c12; --mark-text: #f4cf6b;
    --shadow: 0 1px 3px rgba(0,0,0,.5), 0 6px 20px rgba(0,0,0,.35);
    --contour: rgba(95,194,166,.10);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: .06em; }
a:hover { text-decoration-thickness: .12em; }
a:focus-visible, .skip:focus { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: .25rem; }
img { max-width: 100%; }
.muted { color: var(--muted); }

.wrap { width: 100%; max-width: 46rem; margin: 0 auto; padding: 0 1rem; }

.skip { position: absolute; left: -999px; top: .5rem; background: var(--surface); padding: .5rem .75rem; z-index: 10; }
.skip:focus { left: .5rem; }

/* шапка */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 3.5rem; flex-wrap: wrap; padding-top: .25rem; padding-bottom: .25rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; min-height: 2.75rem; }
.brand img { width: 2rem; height: 2rem; border-radius: .5rem; }

.langs ul, .menu ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .35rem; }
.langs a, .langs span { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 .7rem; border-radius: 1.4rem; font-size: .875rem; text-decoration: none; color: var(--muted); }
.langs a:hover { color: var(--text); background: var(--chip); }
.langs span[aria-current] { background: var(--chip); color: var(--text); font-weight: 600; }

.menu { padding-bottom: .6rem; }
.menu ul { flex-wrap: wrap; }
.menu a { display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 .85rem; border-radius: 1.4rem; background: var(--chip); color: var(--text);
  text-decoration: none; font-size: .9375rem; white-space: nowrap; }
.menu a[aria-current="page"] { background: var(--chip-on); color: var(--chip-on-fg); font-weight: 600; }

/* текст */
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: 2rem; margin: 2rem 0 .75rem; }
h2 { font-size: 1.375rem; margin: 2.25rem 0 .6rem; padding-top: 1.25rem; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
h3 { font-size: 1.125rem; margin: 1.6rem 0 .4rem; scroll-margin-top: 1rem; }
p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.35rem; }
li { margin: .3rem 0; }
li::marker { color: var(--muted); }
strong { font-weight: 650; }
article { padding-bottom: 2.5rem; overflow-wrap: anywhere; }
.doc-body > h1 + p { color: var(--muted); font-size: .9375rem; }

/* оглавление политики */
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: .9rem 1.1rem .4rem; margin: 1.25rem 0 1.5rem; box-shadow: var(--shadow); }
.toc-t { font-weight: 650; margin: 0 0 .35rem; font-size: .9375rem; }
.toc ol { font-size: .9375rem; margin-bottom: .6rem; }
.toc li { margin: .15rem 0; }

/* «Коротко» в политике — первый список после первого h2 */
.page-privacy .doc-body h2:first-of-type + ul { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: .75rem; padding: .8rem 1rem .8rem 2.2rem; box-shadow: var(--shadow); }

/* главная */
.home .top { border-bottom-color: transparent; }
.home-body { position: relative; }
.home-body > h1 { font-size: 2.4rem; margin-top: 1.5rem; padding-top: 6.5rem; position: relative; }
.home-body > h1::before { content: ""; position: absolute; left: 0; top: 0; width: 5.25rem; height: 5.25rem; border-radius: 1.3rem;
  background: url("/assets/icon.svg") center / cover no-repeat; box-shadow: var(--shadow); }
body.home { background: var(--bg) url("/assets/contours.svg") right -9rem top 1rem / 36rem auto no-repeat; }
.home-body > h1 + p { font-size: 1.1875rem; line-height: 1.55; }
.home-body > h2:first-of-type + ul { list-style: none; padding: 0; display: grid; gap: .6rem; background: none; border: 0; box-shadow: none; }
.home-body > h2:first-of-type + ul li { background: var(--surface); border: 1px solid var(--line); border-radius: .9rem; padding: .7rem .9rem; margin: 0; box-shadow: var(--shadow); }
.home-body h2 { border-top: 0; padding-top: 0; }
.home-body > h2:last-of-type + ul { list-style: none; padding: 0; display: grid; gap: .5rem; }
.home-body > h2:last-of-type + ul li { margin: 0; }
.home-body > h2:last-of-type + ul a { font-weight: 650; }

/* подвал */
.foot { border-top: 1px solid var(--line); background: var(--surface); font-size: .875rem; padding: 1.1rem 0 1.4rem; }
.foot p { margin: .2rem 0; }

/* 404 */
.nf section + section { border-top: 1px solid var(--line); margin-top: 1.5rem; }
.nf h1 { font-size: 1.5rem; }

@media (min-width: 48rem) {
  body { font-size: 1.0625rem; }
  h1 { font-size: 2.4rem; margin-top: 2.75rem; }
  .home-body > h1 { font-size: 3rem; padding-top: 7.25rem; margin-top: 2.5rem; }
  .home-body > h1::before { width: 6rem; height: 6rem; border-radius: 1.5rem; }
  .home-body > h2:first-of-type + ul { grid-template-columns: 1fr 1fr; }
  body.home { background-size: 48rem auto; background-position: right max(-12rem, calc(50% - 38rem)) top 0; }
  .menu { padding-bottom: .65rem; }
}
@media print {
  .top, .foot, .toc, .skip { display: none; }
  body { background: #fff; color: #000; }
}
