:root {
  --ap-paper: #f3e8cf;
  --ap-ink: #181814;
  --ap-green: #0b5137;
  --ap-coral: #ed5a40;
  --ap-white: #fffaf0;
  --ap-line: 2px solid var(--ap-ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.ap-public {
  margin: 0;
  overflow-x: hidden;
  color: var(--ap-ink);
  background: var(--ap-paper);
  font-family: "Golos Text", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.ap-public a { color: inherit; text-decoration: none; }
.ap-public button,
.ap-public input { font: inherit; }
.ap-wrap { width: min(100% - 56px, 1420px); margin-inline: auto; }

.ap-header {
  min-height: 78px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: var(--ap-line);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.ap-brand { display: inline-flex; align-items: center; gap: 10px; width: fit-content; font-family: "IBM Plex Mono", monospace; font-weight: 600; }
.ap-brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: var(--ap-line);
  background: var(--ap-coral);
  font-size: 12px;
}
.ap-brand small { opacity: .58; font-size: 10px; }
.ap-header nav { display: flex; align-items: center; gap: 28px; }
.ap-header nav a,
.ap-login { padding: 8px 0 5px; border-bottom: 2px solid transparent; }
.ap-header nav a:hover,
.ap-login:hover { border-bottom-color: var(--ap-ink); }
.ap-login { justify-self: end; }

.ap-hero { overflow: hidden; padding-top: 30px; }
.ap-hero-meta {
  display: flex;
  justify-content: space-between;
  padding-bottom: 16px;
  font: 600 11px/1 "IBM Plex Mono", monospace;
  letter-spacing: .08em;
}
.ap-hero h1 {
  position: relative;
  z-index: 2;
  margin: 0 0 -4.4vw;
  display: flex;
  flex-direction: column;
  font: 800 clamp(88px, 17vw, 272px)/.67 "Unbounded", sans-serif;
  letter-spacing: -.09em;
  text-transform: uppercase;
}
.ap-hero h1 span:last-child { color: var(--ap-green); align-self: flex-end; transform: translateX(.025em); }
.ap-lead {
  position: absolute;
  z-index: 3;
  width: min(360px, 27vw);
  margin: 2vw 0 0 2.2vw;
  padding: 15px 18px;
  color: var(--ap-white);
  background: var(--ap-ink);
  font: 600 clamp(16px, 1.5vw, 23px)/1.22 "Golos Text", sans-serif;
  transform: rotate(-2deg);
}
.ap-machine { position: relative; margin: 0; background: var(--ap-coral); border-block: var(--ap-line); }
.ap-machine::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}
.ap-machine img { display: block; width: 100%; max-height: 690px; object-fit: cover; object-position: center; mix-blend-mode: multiply; }
.ap-machine figcaption {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: var(--ap-line);
  font: 600 11px/1 "IBM Plex Mono", monospace;
  letter-spacing: .06em;
}
.ap-machine figcaption i { height: 2px; flex: 1; background: var(--ap-ink); position: relative; }
.ap-machine figcaption i::after { content: ""; position: absolute; right: 0; top: -4px; border: 5px solid transparent; border-left-color: var(--ap-ink); }
.ap-hero-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 70px;
  padding-block: 42px 52px;
}
.ap-hero-action p { max-width: 690px; margin: 0; font-size: clamp(20px, 2.2vw, 34px); line-height: 1.18; letter-spacing: -.035em; }
.ap-button {
  min-height: 58px;
  min-width: 275px;
  padding: 16px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: var(--ap-line);
  color: var(--ap-white) !important;
  background: var(--ap-green);
  font: 600 13px/1.1 "IBM Plex Mono", monospace;
  text-transform: uppercase;
  transition: transform .15s ease, background .15s ease;
}
.ap-button:hover { transform: translate(-4px, -4px); box-shadow: 4px 4px 0 var(--ap-ink); }
.ap-button span { font-size: 23px; }

.ap-line { padding: 94px 0 72px; color: var(--ap-white); background: var(--ap-ink); }
.ap-section-head { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .45fr); gap: 80px; align-items: end; }
.ap-kicker { display: block; margin-bottom: 22px; font: 600 11px/1 "IBM Plex Mono", monospace; letter-spacing: .08em; }
.ap-section-head h2,
.ap-control h2,
.ap-access h2 {
  margin: 0;
  font: 700 clamp(44px, 6.3vw, 96px)/.95 "Unbounded", sans-serif;
  letter-spacing: -.075em;
  text-transform: uppercase;
}
.ap-section-head p { margin: 0; font-size: 18px; line-height: 1.45; }
.ap-infographic { margin-top: 72px; border: 2px solid var(--ap-white); }
.ap-stations { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 2px solid var(--ap-white); }
.ap-station {
  position: relative;
  min-height: 188px;
  padding: 22px;
  display: grid;
  grid-template: auto 1fr auto / 1fr auto;
  align-items: start;
  text-align: left;
  color: var(--ap-white);
  background: transparent;
  border: 0;
  border-right: 2px solid var(--ap-white);
  cursor: pointer;
}
.ap-station:last-child { border-right: 0; }
.ap-station::after { content: "→"; position: absolute; right: -15px; top: calc(50% - 15px); z-index: 2; width: 28px; height: 28px; display: grid; place-items: center; color: var(--ap-ink); background: var(--ap-white); border: 2px solid var(--ap-ink); font-weight: 700; }
.ap-station:last-child::after { display: none; }
.ap-station small { justify-self: end; font: 600 11px/1 "IBM Plex Mono", monospace; }
.ap-station b { grid-column: 1 / -1; align-self: end; font: 700 clamp(22px, 2.3vw, 36px)/1 "Unbounded", sans-serif; letter-spacing: -.05em; text-transform: uppercase; }
.ap-station em { grid-column: 1 / -1; margin-top: 10px; font: normal 11px/1.2 "IBM Plex Mono", monospace; text-transform: uppercase; }
.ap-icon { width: 46px; height: 46px; display: grid; place-items: center; border: 2px solid currentColor; border-radius: 50%; font: 600 24px/1 "IBM Plex Mono", monospace; }
.ap-station:hover,
.ap-station.is-active { color: var(--ap-ink); background: var(--ap-coral); }
.ap-station.is-active .ap-icon { background: var(--ap-paper); }
.ap-stage-detail { min-height: 320px; display: grid; grid-template-columns: .42fr 1.2fr .75fr; gap: 56px; padding: 38px; color: var(--ap-ink); background: var(--ap-paper); }
.ap-stage-number { font: 800 clamp(90px, 12vw, 174px)/.8 "Unbounded", sans-serif; letter-spacing: -.1em; color: var(--ap-coral); }
.ap-stage-detail span { font: 600 11px/1 "IBM Plex Mono", monospace; letter-spacing: .08em; }
.ap-stage-detail h3 { max-width: 650px; margin: 24px 0 15px; font: 700 clamp(27px, 3.4vw, 48px)/1 "Unbounded", sans-serif; letter-spacing: -.055em; text-transform: uppercase; }
.ap-stage-detail p { max-width: 640px; margin: 0; font-size: 17px; line-height: 1.5; }
.ap-stage-detail ul { margin: 34px 0 0; padding: 0; list-style: none; font: 500 12px/1.35 "IBM Plex Mono", monospace; text-transform: uppercase; }
.ap-stage-detail li { padding: 13px 0; border-top: 1px solid var(--ap-ink); }
.ap-stage-detail li::before { content: "↳ "; }
.ap-numbers { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 54px; border-block: 2px solid var(--ap-white); }
.ap-numbers div { min-height: 200px; padding: 24px; display: flex; align-items: flex-end; gap: 22px; border-right: 2px solid var(--ap-white); }
.ap-numbers div:last-child { border-right: 0; }
.ap-numbers strong { font: 800 clamp(92px, 11vw, 170px)/.68 "Unbounded", sans-serif; letter-spacing: -.1em; color: var(--ap-coral); }
.ap-numbers span { max-width: 140px; padding-bottom: 5px; font: 600 11px/1.25 "IBM Plex Mono", monospace; text-transform: uppercase; }

.ap-control { padding: 90px 0; color: var(--ap-paper); background: var(--ap-green); border-top: var(--ap-line); }
.ap-control-grid { display: grid; grid-template-columns: minmax(340px, .75fr) minmax(0, 1.25fr); gap: 90px; align-items: center; }
.ap-proof { width: min(38vw, 470px); aspect-ratio: 1; display: grid; place-items: center; border: 8px double var(--ap-coral); border-radius: 50%; color: var(--ap-coral); transform: rotate(-9deg); position: relative; }
.ap-proof::after { content: ""; position: absolute; inset: 24px; border: 2px dashed currentColor; border-radius: 50%; }
.ap-proof-mark { font: 800 clamp(120px, 17vw, 230px)/1 "Unbounded", sans-serif; transform: translateY(-9%); }
.ap-proof-ring { position: absolute; bottom: 16%; text-align: center; font: 700 clamp(16px, 2vw, 26px)/1.05 "IBM Plex Mono", monospace; letter-spacing: .08em; }
.ap-control h2 { max-width: 900px; }
.ap-control p { max-width: 690px; margin: 34px 0; font-size: 20px; line-height: 1.48; }
.ap-checks { border-top: 2px solid var(--ap-paper); }
.ap-checks span { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(243,232,207,.55); font: 500 12px/1.2 "IBM Plex Mono", monospace; text-transform: uppercase; }
.ap-checks b { color: var(--ap-coral); }

.ap-access { padding: 84px 0 72px; background: var(--ap-coral); border-block: var(--ap-line); }
.ap-access .ap-wrap { display: grid; grid-template-columns: 1.4fr .55fr auto; align-items: end; gap: 56px; }
.ap-access h2 { font-size: clamp(46px, 6.8vw, 108px); }
.ap-access p { margin: 0; font-size: 17px; line-height: 1.45; }
.ap-button-dark { color: var(--ap-paper) !important; background: var(--ap-ink); }
.ap-footer { background: var(--ap-paper); }
.ap-footer .ap-wrap { min-height: 106px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; font: 600 11px/1 "IBM Plex Mono", monospace; text-transform: uppercase; }
.ap-footer > div > span { opacity: .58; }
.ap-footer > div > a:last-child { justify-self: end; border-bottom: 1px solid; }

/* Авторизация продолжает ту же печатную историю, а не становится отдельным шаблоном. */
.ap-auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(430px, .62fr); }
.ap-auth-scene { position: relative; min-height: 100vh; padding: 28px; overflow: hidden; background: var(--ap-coral); border-right: var(--ap-line); }
.ap-auth-scene > .ap-brand { position: relative; z-index: 3; }
.ap-auth-word { position: relative; z-index: 2; margin: 8vh 0 -3vw; display: flex; flex-direction: column; font: 800 clamp(120px, 19vw, 300px)/.62 "Unbounded", sans-serif; letter-spacing: -.12em; }
.ap-auth-word span:last-child { align-self: flex-end; color: var(--ap-green); }
.ap-auth-scene figure { position: absolute; inset: auto 0 0; margin: 0; height: 47vh; border-top: var(--ap-line); background: var(--ap-coral); }
.ap-auth-scene figure img { width: 100%; height: calc(100% - 48px); display: block; object-fit: cover; mix-blend-mode: multiply; }
.ap-auth-scene figcaption { height: 48px; padding: 0 28px; display: flex; align-items: center; gap: 16px; border-top: var(--ap-line); font: 600 10px/1 "IBM Plex Mono", monospace; }
.ap-auth-scene figcaption i { height: 2px; flex: 1; background: var(--ap-ink); }
.ap-auth-note { position: absolute; z-index: 4; left: 5vw; bottom: 8vh; width: min(350px, 38vw); padding: 18px; color: var(--ap-paper); background: var(--ap-ink); transform: rotate(-2deg); }
.ap-auth-note b { font: 700 16px/1.1 "IBM Plex Mono", monospace; text-transform: uppercase; }
.ap-auth-note p { margin: 10px 0 0; line-height: 1.42; }
.ap-auth-form-panel { padding: 38px clamp(28px, 4vw, 72px); display: flex; align-items: center; background: var(--ap-paper); }
.ap-auth-form { width: 100%; max-width: 520px; margin-inline: auto; }
.ap-auth-back { display: inline-block; margin-bottom: clamp(52px, 9vh, 110px); border-bottom: 1px solid; font: 600 11px/1.3 "IBM Plex Mono", monospace; text-transform: uppercase; }
.ap-auth-head > span { font: 600 11px/1 "IBM Plex Mono", monospace; letter-spacing: .08em; }
.ap-auth-head h1 { margin: 18px 0; font: 700 clamp(42px, 4.2vw, 66px)/.93 "Unbounded", sans-serif; letter-spacing: -.07em; text-transform: uppercase; }
.ap-auth-head p { margin: 0 0 38px; font-size: 17px; }
.ap-auth-form label { display: block; margin-bottom: 24px; }
.ap-auth-form label > span { display: block; margin-bottom: 9px; font: 600 11px/1 "IBM Plex Mono", monospace; text-transform: uppercase; }
.ap-auth-form input { width: 100%; height: 58px; padding: 0 14px; border: var(--ap-line); border-radius: 0; outline: none; color: var(--ap-ink); background: var(--ap-white); }
.ap-auth-form input:focus { border-color: var(--ap-coral); box-shadow: inset 7px 0 0 var(--ap-coral); }
.ap-auth-error { margin-bottom: 24px; padding: 14px; border: var(--ap-line); background: var(--ap-coral); font-size: 14px; }
.ap-auth-submit { width: 100%; cursor: pointer; }
.ap-auth-footnote { margin-top: 34px; padding-top: 16px; display: grid; grid-template-columns: auto 1fr; gap: 20px; border-top: 1px solid var(--ap-ink); font: 11px/1.35 "IBM Plex Mono", monospace; }
.ap-auth-footnote span { font-weight: 600; text-transform: uppercase; }
.ap-auth-footnote p { margin: 0; }

@media (max-width: 980px) {
  .ap-wrap { width: min(100% - 36px, 1420px); }
  .ap-header { grid-template-columns: 1fr auto; }
  .ap-header nav { display: none; }
  .ap-hero h1 { margin-bottom: -2vw; }
  .ap-lead { position: relative; width: 52vw; margin: 0 0 -34px 5vw; }
  .ap-section-head,
  .ap-control-grid { grid-template-columns: 1fr; gap: 42px; }
  .ap-section-head p { max-width: 620px; }
  .ap-stations { grid-template-columns: repeat(2, 1fr); }
  .ap-station:nth-child(2) { border-right: 0; }
  .ap-station:nth-child(-n+2) { border-bottom: 2px solid var(--ap-white); }
  .ap-station:nth-child(2)::after { display: none; }
  .ap-stage-detail { grid-template-columns: .4fr 1fr; }
  .ap-stage-detail ul { grid-column: 2; margin-top: 0; }
  .ap-proof { width: min(68vw, 450px); }
  .ap-access .ap-wrap { grid-template-columns: 1fr 1fr; }
  .ap-access .ap-button { grid-column: 2; }
  .ap-auth-layout { grid-template-columns: 1fr; }
  .ap-auth-scene { min-height: 70vh; border-right: 0; border-bottom: var(--ap-line); }
  .ap-auth-form-panel { min-height: 75vh; padding-block: 70px; }
}

@media (max-width: 640px) {
  .ap-wrap { width: min(100% - 24px, 1420px); }
  .ap-header { min-height: 64px; }
  .ap-brand small { display: none; }
  .ap-hero { padding-top: 22px; }
  .ap-hero-meta span:last-child { display: none; }
  .ap-hero h1 { margin: 12px 0 -1vw; font-size: 23vw; line-height: .69; }
  .ap-lead { width: 82vw; margin: 0 0 -18px 2vw; font-size: 16px; }
  .ap-machine img { min-height: 310px; object-fit: cover; }
  .ap-machine figcaption { gap: 8px; font-size: 8px; }
  .ap-hero-action { grid-template-columns: 1fr; gap: 26px; padding-block: 32px 42px; }
  .ap-hero-action p { font-size: 22px; }
  .ap-button { width: 100%; min-width: 0; }
  .ap-line { padding: 62px 0 48px; }
  .ap-section-head h2,
  .ap-control h2,
  .ap-access h2 { font-size: 11vw; }
  .ap-infographic { margin-top: 42px; }
  .ap-station { min-height: 148px; padding: 15px; }
  .ap-station b { font-size: 19px; }
  .ap-station em { font-size: 8px; }
  .ap-icon { width: 36px; height: 36px; font-size: 18px; }
  .ap-stage-detail { min-height: 0; grid-template-columns: 1fr; gap: 25px; padding: 24px 18px; }
  .ap-stage-number { font-size: 100px; }
  .ap-stage-detail ul { grid-column: auto; }
  .ap-numbers { grid-template-columns: 1fr; }
  .ap-numbers div { min-height: 138px; border-right: 0; border-bottom: 2px solid var(--ap-white); }
  .ap-numbers div:last-child { border-bottom: 0; }
  .ap-control { padding: 62px 0; }
  .ap-proof { width: 82vw; }
  .ap-access { padding: 62px 0; }
  .ap-access .ap-wrap { grid-template-columns: 1fr; gap: 32px; }
  .ap-access .ap-button { grid-column: auto; }
  .ap-footer .ap-wrap { grid-template-columns: 1fr auto; }
  .ap-footer > div > span { display: none; }
  .ap-auth-scene { min-height: 600px; padding: 20px; }
  .ap-auth-word { margin-top: 60px; font-size: 31vw; }
  .ap-auth-note { left: 24px; bottom: 58px; width: calc(100% - 48px); }
  .ap-auth-form-panel { padding: 54px 22px; }
  .ap-auth-back { margin-bottom: 60px; }
  .ap-auth-footnote { grid-template-columns: 1fr; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ap-button { transition: none; }
}
