@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;
  --frame: #2c3e60;
  --frame-fg: #ffffff;
  --frame-fg-muted: #c8d0dd;
  --frame-tile: #ffffff1c;
  --frame-tile-hover: #ffffff2e;
  --frame-focus: #9db8ec;
  --canvas: #e6ebf3;
  --paper: #ffffff;
  --card: #ffffff;
  --line: #cdd6e3;
  --line-soft: #e4e9f1;
  --text: #16203a;
  --text-muted: #4f5567;
  --primary: #34496f;
  --primary-deep: #2c3e60;
  --primary-text: #2c3e60;
  --focus: #34496f;
  --route-dot: #34496f;
  --chip: #eef2f8;
  --ring: #cdd6e3;
  --new-bg: #e6f0ff;
  --new-fg: #1a5fc2;
  --pending-bg: #fff4e0;
  --pending-fg: #a3480a;
  --done-bg: #e7f7ee;
  --done-fg: #12733a;
  --on-light: #22324f;
  --lift: 0 2px 4px #17233d14, 0 28px 56px -28px #17233d66;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1160px;
  --overhang: clamp(64px, 8vw, 112px);
  --hero-pad: clamp(40px, 5vw, 72px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --frame: #1c2330;
    --frame-fg-muted: #b4b9c2;
    --canvas: #131820;
    --paper: #1c2330;
    --card: #272e3a;
    --line: #2e3541;
    --line-soft: #333a47;
    --text: #e9edf3;
    --text-muted: #acb0b8;
    --primary: #3a5079;
    --primary-deep: #31446a;
    --primary-text: #a9bde0;
    --focus: #7f9bd0;
    --route-dot: #7f9bd0;
    --chip: #323a47;
    --ring: #4a5364;
    --new-bg: #3b8eff26;
    --new-fg: #8dbcff;
    --pending-bg: #f0a33b26;
    --pending-fg: #f2b45f;
    --done-bg: #3dc17d26;
    --done-fg: #6fd6a0;
    --lift: 0 2px 4px #0000004d, 0 28px 56px -28px #000000cc;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: #ffffff40 var(--frame);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--frame);
  color: var(--text);
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: #2f6fd64d;
}

img,
svg {
  display: block;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

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

.site-header :focus-visible,
.hero :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--frame-focus);
}

.nowrap {
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: 10px;
  background: #ffffff;
  color: var(--on-light);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.link {
  color: var(--primary-text);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.link:hover {
  text-decoration-thickness: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 150ms var(--ease-out),
    color 150ms var(--ease-out);
}

.btn-sm {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.875rem;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-deep);
}

.btn-secondary {
  background: var(--paper);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}

.btn-secondary:hover {
  background: var(--canvas);
}

.btn-light {
  background: #ffffff;
  color: var(--on-light);
}

.btn-light:hover {
  background: #e6ebf3;
}

.btn-tile {
  background: var(--frame-tile);
  color: var(--frame-fg);
}

.btn-tile:hover {
  background: var(--frame-tile-hover);
}

.site-header {
  color: var(--frame-fg);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--frame-fg);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 379px) {
  .brand-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 40px;
  padding-top: clamp(24px, 5vw, 64px);
  padding-bottom: var(--hero-pad);
  color: var(--frame-fg);
}

.hero h1 {
  max-width: 13em;
  font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-lede {
  max-width: 34em;
  margin-top: 20px;
  color: var(--frame-fg-muted);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 32px;
}

.hero-note {
  color: var(--frame-fg-muted);
  font-size: 0.9375rem;
}

.hero-note a {
  color: var(--frame-fg);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.hero-note a:hover {
  text-decoration-thickness: 2px;
}

.plan {
  margin: 0 0 calc(-1 * (var(--overhang) + var(--hero-pad)));
}

.plan-card {
  overflow: hidden;
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  box-shadow: var(--lift);
}

@media (prefers-reduced-motion: no-preference) {
  .plan-card {
    animation: plan-lift 700ms var(--ease-out) 120ms both;
  }
}

@keyframes plan-lift {
  from {
    transform: translateY(18px);
  }
}

.plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
}

.plan-title {
  font-size: 0.9375rem;
  font-weight: 600;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.pill-new {
  background: var(--new-bg);
  color: var(--new-fg);
}

.pill-pending {
  background: var(--pending-bg);
  color: var(--pending-fg);
}

.pill-done {
  background: var(--done-bg);
  color: var(--done-fg);
}

.plan-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0;
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.plan-stats dt {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.plan-stats dd {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.plan-stops {
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan-stops li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 2px;
  padding: 12px 20px;
}

.plan-stops li + li {
  border-top: 1px solid var(--line-soft);
}

.stop-number {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--ring);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.stop-place {
  font-size: 0.875rem;
  font-weight: 500;
}

.stop-meta {
  grid-column: 2;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.stop-side {
  grid-column: 3;
  grid-row: 1 / span 2;
  justify-self: end;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.plan-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line-soft);
}

.plan-button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--chip);
  font-size: 0.8125rem;
  font-weight: 500;
}

.plan-button-primary {
  background: var(--primary);
  color: #ffffff;
}

.plan figcaption {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    align-items: start;
    gap: 64px;
  }

  .hero-copy {
    padding-top: 24px;
  }

  .plan {
    align-self: end;
  }
}

.sheet {
  position: relative;
  border-radius: 20px;
  background: var(--canvas);
  color: var(--text);
}

@media (min-width: 768px) {
  .sheet {
    margin-inline: 8px;
    border-radius: 28px;
  }
}

.section {
  padding-block: clamp(56px, 7vw, 96px);
}

.section + .section {
  padding-top: 0;
}

.sheet > .section:first-child {
  padding-top: calc(var(--overhang) + clamp(48px, 6vw, 80px));
}

.section-head {
  max-width: 40em;
}

.section-head h2,
.closing h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.section-head p {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.route {
  display: grid;
  gap: 32px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.route li {
  position: relative;
  padding-left: 40px;
}

.route li::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--canvas);
  box-shadow: inset 0 0 0 3px var(--route-dot);
}

.route li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 26px;
  bottom: -26px;
  left: 6px;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
}

.route h3 {
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
}

.route p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

@media (min-width: 1024px) {
  .route {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 32px;
  }

  .route li {
    padding-top: 40px;
    padding-left: 0;
  }

  .route li::before {
    top: 0;
  }

  .route li:not(:last-child)::after {
    top: 6px;
    right: -26px;
    bottom: auto;
    left: 26px;
    width: auto;
    height: 2px;
  }
}

.duo {
  display: grid;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}

.duo > section {
  padding: clamp(24px, 4vw, 44px);
}

.duo > section + section {
  border-top: 1px solid var(--line);
}

.duo h2 {
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.duo p {
  max-width: 34em;
  margin-top: 12px;
  color: var(--text-muted);
}

@media (min-width: 900px) {
  .duo {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .duo > section + section {
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

.address {
  display: inline-flex;
  flex-wrap: wrap;
  margin: 24px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--canvas);
  font-size: 0.9375rem;
  font-weight: 500;
}

.address span {
  color: var(--text-muted);
  font-weight: 400;
}

.ticks {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  padding-left: 26px;
  font-size: 0.9375rem;
}

.ticks li::before {
  content: "";
  position: absolute;
  top: 0.4em;
  left: 2px;
  width: 12px;
  height: 7px;
  border-bottom: 2px solid var(--route-dot);
  border-left: 2px solid var(--route-dot);
  transform: rotate(-45deg);
}

.roles {
  margin: 20px 0 0;
}

.roles div {
  display: grid;
  gap: 2px 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}

.roles div:first-child {
  border-top: 0;
  padding-top: 4px;
}

.roles dt {
  font-weight: 500;
}

.roles dd {
  margin: 0;
  color: var(--text-muted);
}

@media (min-width: 560px) {
  .roles div {
    grid-template-columns: minmax(0, 12em) minmax(0, 1fr);
  }
}

.facts {
  display: grid;
  margin: 36px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.facts li {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.facts strong {
  display: block;
  font-size: 1.0625rem;
  font-weight: 600;
}

.facts span {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

@media (min-width: 720px) {
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 32px;
  }
}

@media (min-width: 1080px) {
  .facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .facts li {
    padding: 24px 0 0;
    border-bottom: 0;
  }
}

.facts-more {
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.closing {
  text-align: center;
}

.closing p {
  max-width: 32em;
  margin: 14px auto 0;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.closing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.site-footer {
  padding-block: 40px 48px;
  color: var(--frame-fg-muted);
  font-size: 0.9375rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--frame-fg);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.copyright {
  flex-basis: 100%;
}

@media (max-width: 519px) {
  .footer-links {
    flex-direction: column;
    gap: 12px;
  }
}

.sheet-doc {
  margin-top: clamp(4px, 1.5vw, 16px);
}

.doc {
  display: grid;
  grid-template-areas:
    "head"
    "toc"
    "body";
  padding-block: clamp(16px, 4vw, 48px) clamp(40px, 6vw, 80px);
}

.doc-head,
.doc-toc,
.doc-body {
  background: var(--paper);
  padding-inline: clamp(20px, 5vw, 64px);
}

.doc-head {
  grid-area: head;
  padding-top: clamp(28px, 5vw, 56px);
  border-radius: 16px 16px 0 0;
}

.doc-head h1 {
  font-size: clamp(1.875rem, 1.35rem + 2.2vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.doc-date {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.doc-toc {
  grid-area: toc;
  padding-top: 28px;
  padding-bottom: 4px;
}

.toc-title {
  font-size: 0.9375rem;
  letter-spacing: -0.005em;
}

.toc-list {
  margin: 10px 0 0;
  padding-left: 2em;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.toc-list li + li {
  margin-top: 6px;
}

.toc-list li::marker {
  font-variant-numeric: tabular-nums;
}

.toc-list a {
  color: var(--text);
  text-decoration: none;
}

.toc-list a:hover {
  color: var(--primary-text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.doc-body {
  grid-area: body;
  padding-top: 8px;
  padding-bottom: clamp(32px, 5vw, 64px);
  border-radius: 0 0 16px 16px;
}

@media (min-width: 1100px) {
  .doc {
    grid-template-columns: 224px minmax(0, 1fr);
    grid-template-areas:
      ". head"
      "toc body";
    column-gap: 48px;
  }

  .doc-head,
  .doc-body {
    max-width: 840px;
  }

  .doc-toc {
    position: sticky;
    top: 24px;
    align-self: start;
    padding: 32px 0 0;
    background: transparent;
  }
}

.prose {
  font-size: 1.0625rem;
  line-height: 1.7;
}

.prose > * {
  max-width: 68ch;
}

.prose > :first-child {
  margin-top: 28px;
}

.prose p,
.prose ul,
.prose dl,
.prose .note {
  margin: 0 0 1em;
}

.prose h2 {
  margin: 2.1em 0 0.6em;
  font-size: 1.375rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
  scroll-margin-top: 24px;
}

.prose h3 {
  margin: 1.6em 0 0.4em;
  font-size: 1.0625rem;
  line-height: 1.4;
}

.prose ul {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose li::marker {
  color: var(--text-muted);
}

.prose strong {
  font-weight: 600;
}

.prose a {
  color: var(--primary-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}

.prose a:hover {
  text-decoration-thickness: 2px;
}

.prose code {
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: var(--canvas);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

.note {
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--canvas);
}

.note p {
  margin: 0;
}

.recipients div {
  display: grid;
  gap: 2px 20px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}

.recipients div:last-child {
  border-bottom: 1px solid var(--line-soft);
}

.recipients dt {
  font-weight: 600;
}

.recipients dd {
  margin: 0;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .recipients div {
    grid-template-columns: minmax(0, 11em) minmax(0, 1fr);
  }
}
