:root {
  color-scheme: light;
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #003049;
  background: #fff;
  --navy: #003049;
  --blue: #003049;
  --orange: #ffb000;
  --ink: #003049;
  --muted: #315b6c;
  --line: #9ebbc7;
  --line-strong: #35677d;
  --canvas: #fff;
  --paper: #fff;
  --paper-deep: #e8f2f5;
  --yellow-pale: #fff4ce;
  --link: #003049;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; }
a { color: var(--link); text-underline-offset: .16em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid #ffb000; outline-offset: 3px; }
img { display: block; max-width: 100%; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 97%);
}

.header-inner, .container { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.header-inner { display: flex; align-items: center; min-height: 64px; gap: var(--space-3); }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-family: var(--display); font-size: 1.2rem; font-weight: 700; letter-spacing: .015em; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.site-nav { display: flex; gap: var(--space-3); margin-left: auto; }
.site-nav a { color: var(--ink); text-decoration: none; }
.language-switch { display: flex; gap: 8px; align-items: center; }
.language-switch a, .language-switch span { padding: 4px 7px; border-radius: 3px; }
.language-switch [aria-current="page"] { background: var(--paper-deep); color: var(--ink); font-weight: 700; }

.hero { padding: 80px 0 56px; border-bottom: 1px solid var(--line); background: #fff; }
.hero-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); align-items: center; }
h1 { max-width: 760px; margin: 0 0 var(--space-3); color: var(--ink); font-family: var(--display); font-size: clamp(2.35rem, 5vw, 4.6rem); font-weight: 650; line-height: 1.09; letter-spacing: -.025em; text-wrap: balance; }
.lead { max-width: 680px; margin: 0 0 var(--space-4); color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.3rem); }
.requirements { margin: 18px 0 0; color: var(--muted); font-size: .92rem; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.hero .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: calc(100% + var(--space-4)); }
.final .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
.hero .actions .button { min-height: 48px; padding-inline: 12px; font-size: .875rem; white-space: nowrap; }
.final .actions .button { min-height: 48px; padding-inline: 12px; font-size: .875rem; white-space: nowrap; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; border: 1px solid var(--ink); border-radius: 3px; background: var(--ink); color: #fff; font-weight: 750; text-decoration: none; transition: background-color 140ms ease-out, color 140ms ease-out; }
.button:hover { background: #164b60; }
.button.secondary { border-color: var(--orange); background: var(--orange); color: var(--ink); }
.button.secondary:hover { border-color: #ffc640; background: #ffc640; }
.button.pending { border-color: var(--line); background: var(--paper-deep); color: var(--muted); cursor: not-allowed; }

.flow-card { padding: var(--space-4); border: 1px solid var(--line-strong); border-radius: 2px; background: var(--yellow-pale); }
.flow { display: grid; gap: 14px; }
.flow-step { display: grid; grid-template-columns: 42px 1fr; gap: 14px; align-items: center; }
.flow-number { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--orange); border-radius: 50%; background: var(--orange); color: var(--ink); font-family: var(--display); font-size: 1.1rem; font-weight: 700; }
.flow-step strong { display: block; }
.flow-step span { color: var(--muted); font-size: .9rem; }

section { padding: var(--space-6) 0; }
.surface-paper { background: #fff; }

.hero, section { position: relative; isolation: isolate; overflow: hidden; }
.hero .container, section .container { position: relative; z-index: 1; }
html[lang="ru"] .hero::after,
html[lang="ru"] #benefits::after,
html[lang="ru"] #how::before,
html[lang="ru"] #privacy::after,
html[lang="en"] .hero::after,
html[lang="en"] #benefits::after,
html[lang="en"] #how::before,
html[lang="en"] #privacy::after {
  position: absolute;
  z-index: 0;
  display: block;
  pointer-events: none;
  content: "";
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
html[lang="ru"] .hero::after {
  top: 2px;
  right: 2%;
  width: 315px;
  height: 182px;
  background-image: url("postal-grandfather.svg");
  opacity: .16;
  transform: rotate(-9deg);
}
html[lang="ru"] #benefits::after {
  right: 5%;
  bottom: 18px;
  width: 195px;
  height: 135px;
  background-image: url("postal-postmark.svg");
  opacity: .125;
  transform: rotate(8deg);
}
html[lang="ru"] #how::before {
  left: 4%;
  bottom: 32px;
  width: 230px;
  height: 140px;
  background-image: url("postal-vologda.svg");
  opacity: .11;
  transform: rotate(-4deg);
}
html[lang="ru"] #privacy::after {
  top: 22px;
  right: 4%;
  width: 230px;
  height: 140px;
  background-image: url("postal-airmail.svg");
  opacity: .10;
  transform: rotate(5deg);
}
html[lang="en"] .hero::after {
  top: 2px;
  right: 2%;
  width: 315px;
  height: 182px;
  background-image: url("postal-blank-blue.svg");
  opacity: .16;
  transform: rotate(-9deg);
}
html[lang="en"] #benefits::after {
  right: 5%;
  bottom: 18px;
  width: 195px;
  height: 135px;
  background-image: url("postal-blank-yellow.svg");
  opacity: .125;
  transform: rotate(8deg);
}
html[lang="en"] #how::before {
  left: 4%;
  bottom: 32px;
  width: 230px;
  height: 140px;
  background-image: url("postal-airmail.svg");
  opacity: .11;
  transform: rotate(-4deg);
}
html[lang="en"] #privacy::after {
  top: 22px;
  right: 4%;
  width: 230px;
  height: 140px;
  background-image: url("postal-blank-blue.svg");
  opacity: .10;
  transform: rotate(5deg);
}
h2 { max-width: 850px; margin: 0 0 var(--space-2); color: var(--ink); font-family: var(--display); font-size: clamp(1.8rem, 3vw, 2.65rem); font-weight: 650; line-height: 1.12; letter-spacing: -.015em; text-wrap: balance; }
h3 { margin: 0 0 var(--space-1); color: var(--ink); font-family: var(--display); font-size: 1.25rem; }
.section-intro { max-width: 720px; margin: 0 0 var(--space-4); color: var(--muted); }

.reader-value { border-bottom: 1px solid var(--line); }
.value-intro { max-width: 760px; font-size: 1.08rem; }
.value-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); margin-top: var(--space-4); }
.value-grid[data-layout="three"] { grid-template-columns: repeat(3, 1fr); }
.value-item { padding-top: 18px; border-top: 1px solid var(--line-strong); }
.value-item p { margin: 0; color: var(--muted); }
.screenshot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.screenshot { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 2px; background: #fff; }
.screenshot img { aspect-ratio: 1.6 / 1; object-fit: cover; }
.screenshot figcaption { padding: 12px 14px; color: var(--muted); font-size: .9rem; }
.screenshot.wide { grid-column: 1 / -1; }

.boundary { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.boundary article { padding: var(--space-3); border: 1px solid var(--line); border-radius: 2px; }
.boundary .local { background: var(--paper-deep); }
.boundary .external { background: var(--yellow-pale); }
.boundary ul, .feature-list { margin: 12px 0 0; padding-left: 1.2rem; }
.feature-list { columns: 2; column-gap: 48px; }
.feature-list li { break-inside: avoid; margin-bottom: 10px; }

.notice { padding: 18px 20px; border: 1px solid var(--line-strong); background: var(--yellow-pale); }
.install-list { display: grid; gap: 14px; max-width: 830px; padding-left: 1.4rem; }
.install-list li { padding-left: 8px; }
.final { text-align: center; background: var(--ink) !important; color: var(--paper); }
.final h2 { margin: 0 auto var(--space-2); color: var(--paper); }
.final p { max-width: 720px; margin: 0 auto; color: #e8f2f5; }
.final p a { color: #fff; }
.final .actions { max-width: 680px; margin: var(--space-4) auto var(--space-5); }
.final .button { border-color: var(--orange); background: var(--orange); color: var(--ink); }
.final .button:hover { border-color: #ffc640; background: #ffc640; }
.final .button.secondary { border-color: #fff; background: #fff; color: var(--ink); }
.final .button.secondary:hover { background: var(--paper-deep); }

.prose { width: min(820px, calc(100% - 40px)); margin: 0 auto; padding: 64px 0 90px; }
.prose h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
.prose h2 { margin-top: 42px; font-size: 1.55rem; }
.prose h3 { margin-top: 28px; }
.prose li { margin-bottom: 8px; }
.prose code { padding: 2px 5px; border-radius: 2px; background: var(--paper-deep); }
.back { display: inline-block; margin-bottom: 28px; }
.site-footer { padding: 28px 20px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: .88rem; }

@media (max-width: 1160px) {
  .hero .actions { grid-template-columns: 1fr; width: 100%; }
}

@media (max-width: 820px) {
  .site-nav { display: none; }
  .language-switch { margin-left: auto; }
  .hero { padding-top: 52px; }
  .hero-grid, .boundary, .screenshot-grid { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: 1fr 1fr; }
  .value-grid[data-layout="three"] { grid-template-columns: 1fr 1fr; }
  .screenshot.wide { grid-column: auto; }
  .feature-list { columns: 1; }
  html[lang="ru"] .hero::after { top: 10px; right: -42px; width: 220px; height: 128px; opacity: .12; }
  html[lang="ru"] #benefits::after { right: -30px; width: 155px; height: 108px; opacity: .09; }
  html[lang="ru"] #how::before { left: -35px; width: 175px; height: 108px; opacity: .085; }
  html[lang="ru"] #privacy::after { display: none; }
  html[lang="en"] .hero::after { top: 10px; right: -42px; width: 220px; height: 128px; opacity: .12; }
  html[lang="en"] #benefits::after { right: -30px; width: 155px; height: 108px; opacity: .09; }
  html[lang="en"] #how::before { left: -35px; width: 175px; height: 108px; opacity: .085; }
  html[lang="en"] #privacy::after { display: none; }
}

@media (max-width: 520px) {
  .header-inner, .container { width: min(100% - 28px, 1120px); }
  .hero { padding-top: 42px; }
  section { padding: 50px 0; }
  .actions { align-items: stretch; flex-direction: column; }
  .final .actions { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: 1fr; }
  .value-grid[data-layout="three"] { grid-template-columns: 1fr; }
}

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