/*
 * EV-BOY Connect minisite.
 * Palette is the app's Round 7 palette (App.v1 Theme.swift `Ev` / Theme.kt `Ev`).
 * `--blue` is only for icons, fills and text of at least 19px bold; smaller blue text uses `--blue-dark`.
 */

:root {
  --blue: #0096d6;
  --blue-dark: #006fa8;
  --yellow: #ffd400;
  --ink: #071832;
  --muted: #58708c;
  --line: #dbe7f1;
  --soft: #f4f9fd;
  --green: #16885d;
  --orange: #f07820;
  --orange-text: #b4530a;
  --white: #ffffff;
  --page: #eff5fa;
  --wheel-hub: #c9d6e2;

  --radius-card: 20px;
  --radius-button: 26px;
  --shadow-card: 0 4px 20px rgba(7, 24, 50, 0.12);
  --shadow-lift: 0 14px 40px rgba(7, 24, 50, 0.18);

  --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "PingFang HK", "PingFang TC",
    "Noto Sans HK", "Noto Sans TC", "Noto Sans CJK TC", "Microsoft JhengHei", Arial, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01" 0, "cv11" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:lang(zh) body,
body:lang(zh) {
  line-height: 1.75;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--blue-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

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

::selection {
  background: var(--yellow);
  color: var(--ink);
}

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

.on-blue :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--white);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.num {
  font-variant-numeric: tabular-nums;
}

/* Keeps a Chinese phrase on one line so headings break at punctuation. */
.nb {
  display: inline-block;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s var(--ease-out);
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Blue band (app HeroBackdrop) ---------- */

.band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--blue);
  color: var(--white);
}

.band-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

.band-art .sheen {
  fill: rgba(255, 255, 255, 0.06);
}

.band-art .stripe-yellow {
  fill: var(--yellow);
}

.band-art .stripe-white {
  fill: var(--white);
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  /* Clear space around the logo: about 20% of its height. */
  padding: 6px 0;
}

.brand img {
  width: 150px;
  height: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px clamp(12px, 1.6vw, 22px);
  max-width: 100%;
}

.site-nav .nav-text {
  white-space: nowrap;
}

.site-nav a {
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.on-blue .site-nav .nav-text {
  color: var(--white);
}

.site-nav a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.lang {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(7, 24, 50, 0.36);
}

.site-nav .lang a {
  min-width: 46px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}

.site-nav .lang a[aria-current="true"] {
  background: var(--white);
  color: var(--blue-dark);
}

.site-nav .lang a:not([aria-current="true"]):hover {
  background: rgba(255, 255, 255, 0.16);
}

@media (max-width: 720px) {
  .site-nav .nav-text {
    display: none;
  }

  .brand img {
    width: 128px;
  }
}

/* ---------- Store badges ---------- */

.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.badges a {
  display: block;
  border-radius: 9px;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.badges a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(7, 24, 50, 0.25);
}

.badges img {
  height: 52px;
  width: auto;
}

/* ---------- Home hero ---------- */

.hero {
  min-height: min(760px, 100svh);
  overflow: visible;
  overflow-x: clip;
}

.hero .band-art-mobile {
  display: none;
}

.nw {
  white-space: nowrap;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(32px, 5vw, 72px);
  padding-bottom: 0;
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding-top: clamp(28px, 6vh, 72px);
  padding-bottom: 300px;
}

.hero h1 {
  max-width: 11ch;
  font-size: clamp(46px, 6.6vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.hero h1:lang(zh) {
  max-width: 7.2em;
  line-height: 1.12;
  letter-spacing: 0;
}

.hero .lede {
  max-width: 34ch;
  margin-top: 22px;
  color: var(--white);
  font-size: clamp(18px, 1.5vw, 21px);
  font-weight: 500;
  line-height: 1.55;
}

.hero .lede:lang(zh) {
  max-width: 24em;
  line-height: 1.75;
}

.hero .badges {
  margin-top: 30px;
}

.hero-car {
  position: absolute;
  left: max(-20px, calc(var(--gutter) - 40px));
  bottom: 14px;
  width: min(560px, 50vw);
  z-index: 0;
}

/* ---------- Ledger card (app records screen) ---------- */

.ledger-col {
  position: relative;
  z-index: 3;
  padding-top: clamp(20px, 4vh, 48px);
}

.ledger {
  position: relative;
  border-radius: 28px;
  background: var(--page);
  color: var(--ink);
  box-shadow: var(--shadow-lift);
  padding: 22px 16px 18px;
  margin-bottom: -150px;
}

.ledger-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 8px;
}

.ledger-head h2 {
  font-size: 26px;
  letter-spacing: -0.01em;
}

.ledger-month {
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.ledger-total {
  padding: 10px 8px 2px;
}

.ledger-total .amount {
  display: block;
  font-size: clamp(36px, 3.4vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.ledger-total .meta {
  color: var(--muted);
  font-size: 15px;
}

.day {
  margin: 16px 8px 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.day b {
  color: var(--ink);
}

.entries {
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: var(--radius-card);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.entry {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.entry + .entry {
  border-top: 1px solid var(--line);
  margin-left: 72px;
  padding-left: 0;
  grid-template-columns: minmax(0, 1fr) auto;
}

.entry + .entry .entry-icon {
  display: none;
}

.entry-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--blue-dark);
}

.entry-icon .icon {
  width: 22px;
  height: 22px;
}

.entry-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.entry-sub {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.entry-amount {
  font-size: 17px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.ledger-note {
  margin: 12px 8px 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

/* Posting moment: the newest charge drops into the ledger. Visible by default; JS only replays it. */
.posting .entry-new {
  animation: post-in 0.9s var(--ease-out) both;
}

.posting .entry-new .entry-amount {
  animation: post-flash 2.2s var(--ease-out) 0.5s both;
}

@keyframes post-in {
  from {
    opacity: 0;
    transform: translateY(-14px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes post-flash {
  0% {
    background: var(--yellow);
    box-shadow: 0 0 0 6px var(--yellow);
    border-radius: 4px;
  }
  100% {
    background: transparent;
    box-shadow: 0 0 0 6px transparent;
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: 0;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .hero .band-art-desktop {
    display: none;
  }

  .hero .band-art-mobile {
    display: block;
  }

  .hero-copy {
    padding-bottom: 0;
  }

  .hero-car {
    position: relative;
    left: auto;
    bottom: auto;
    width: min(460px, 100%);
    margin: 18px auto 0;
  }

  .ledger-col {
    padding-top: 22px;
  }

  .ledger {
    margin-bottom: -210px;
  }

  .hero + .page-body .section-first {
    padding-top: 300px;
  }
}

@media (max-width: 420px) {
  .ledger {
    padding: 18px 10px 14px;
    border-radius: 24px;
  }

  .entry {
    padding: 12px;
    gap: 10px;
  }

  .entry + .entry {
    margin-left: 66px;
  }

  .entry-amount {
    font-size: 16px;
  }
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(80px, 11vw, 140px) 0 0;
}

.section-first {
  padding-top: clamp(96px, 10vw, 140px);
}

@media (max-width: 900px) {
  .section-first {
    padding-top: 100px;
  }
}

/* Compatibility: one ruled spec strip. */
.spec {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
  margin: 36px 0 0;
  border-radius: var(--radius-card);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.spec > div {
  padding: 24px 28px 26px;
}

.spec > div + div {
  border-left: 1px solid var(--line);
}

.spec dt {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.spec dd {
  margin: 6px 0 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

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

  .spec > div {
    padding: 20px 22px 22px;
  }

  .spec > div:first-child,
  .spec > div:last-child {
    grid-column: 1 / -1;
  }

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

  .spec > div:nth-child(2),
  .spec > div:last-child {
    border-left: 0;
  }
}

.section h2 {
  font-size: clamp(32px, 3.8vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section h2:lang(zh) {
  line-height: 1.25;
  letter-spacing: 0;
}

.section-intro {
  max-width: 54ch;
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
}

.section-intro:lang(zh) {
  max-width: none;
}

/* On wide screens, Chinese intro copy wraps at sentence ends, not mid-word. */
@media (min-width: 901px) {
  .section-intro .clause,
  .keyname .clause {
    display: inline-block;
  }
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.split > header {
  position: sticky;
  top: 40px;
}

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

  .split > header {
    position: static;
  }
}

/* Feature ledger: one card, ruled rows, the app's chip vocabulary. */
.rows {
  margin: 0;
  padding: 6px 0;
  list-style: none;
  border-radius: var(--radius-card);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 26px 28px;
}

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

.row .entry-icon {
  width: 48px;
  height: 48px;
}

.row h3 {
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.row p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 16.5px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border: 1.5px solid var(--blue-dark);
  border-radius: 8px;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.chip-yellow {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--ink);
}

@media (max-width: 560px) {
  .row {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 14px;
    padding: 22px 20px;
  }

  .row .entry-icon {
    width: 40px;
    height: 40px;
  }

  .row .chip {
    grid-column: 2;
    justify-self: start;
    margin-top: -4px;
  }
}

/* Read-only ledger: two ruled columns. */
.keybook {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: 44px;
  border-radius: var(--radius-card);
  background: var(--white);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.keybook section {
  padding: 30px 32px 22px;
}

.keybook section + section {
  border-left: 1px solid var(--line);
}

.keybook h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
  font-size: 22px;
}

.keybook h3 .icon {
  width: 26px;
  height: 26px;
}

.keybook .reads h3 .icon {
  color: var(--blue-dark);
}

.keybook .never h3 .icon {
  color: var(--orange-text);
}

.keybook ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.keybook li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  font-size: 18px;
  font-weight: 600;
}

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

.keybook li span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
  text-align: right;
}

.keybook .never li {
  justify-content: flex-start;
  gap: 12px;
}

.keybook .never li .icon {
  width: 20px;
  height: 20px;
  color: var(--orange-text);
  transform: translateY(3px);
}

.keyname {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  max-width: 760px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 16px;
}

.keyname:lang(zh) {
  max-width: none;
}

.keyname .icon {
  margin-top: 2px;
  color: var(--blue-dark);
}

.keyname strong {
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 760px) {
  .keybook {
    grid-template-columns: minmax(0, 1fr);
  }

  .keybook section {
    padding: 24px 22px 14px;
  }

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

/* Steps: the app's own setup art. */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step-art {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-card);
  background: var(--white);
  box-shadow: var(--shadow-card);
  padding: 22px;
}

.step-art svg {
  width: 100%;
  height: 100%;
}

.step-art.is-blue {
  background: var(--blue);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-top: 22px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.steps h3 {
  margin-top: 12px;
  font-size: 22px;
  line-height: 1.3;
}

.steps p {
  margin-top: 6px;
  color: var(--muted);
}

.tip-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  padding: 14px 20px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-card);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.25s var(--ease-out);
}

.tip-link .icon {
  color: var(--blue-dark);
}

.tip-link:hover {
  transform: translateX(3px);
  text-decoration: none;
}

.tip-link:hover span {
  text-decoration: underline;
}

@media (max-width: 860px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .step-art {
    aspect-ratio: 16 / 8;
  }
}

/* Privacy and compatibility. */
.facts {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--ink);
}

.facts li,
.facts > div {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.facts dt,
.facts .k {
  font-weight: 700;
}

.facts dd {
  margin: 0;
  color: var(--ink);
}

dl.facts {
  margin: 0;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  font-weight: 700;
}

.text-link .icon {
  width: 20px;
  height: 20px;
}

.privacy-statement {
  max-width: 60ch;
  margin-top: 18px;
  font-size: 18px;
}

.privacy-statement:lang(zh) {
  max-width: 34em;
}

/* Closing band. */
.closing {
  margin-top: clamp(90px, 12vw, 150px);
}

.closing-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 28px 32px;
  align-items: center;
  padding-top: clamp(64px, 8vw, 96px);
  padding-bottom: clamp(150px, 16vw, 210px);
}

.closing .app-icon {
  width: 104px;
  height: 104px;
  border-radius: 23px;
  box-shadow: 0 10px 26px rgba(7, 24, 50, 0.28);
}

.closing h2 {
  max-width: 18ch;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.closing h2:lang(zh) {
  max-width: 13em;
  line-height: 1.25;
  letter-spacing: 0;
}

.closing p {
  margin-top: 12px;
  color: var(--white);
  font-size: 18px;
  font-weight: 500;
}

.closing .badges {
  margin-top: 24px;
}

@media (max-width: 640px) {
  .closing-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .closing .app-icon {
    width: 84px;
    height: 84px;
    border-radius: 19px;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  padding-top: 48px;
  padding-bottom: 48px;
}

.site-footer .brand img {
  width: 140px;
}

.site-footer nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer nav li {
  max-width: 100%;
}

.site-footer a {
  color: var(--white);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

@media (max-width: 720px) {
  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Document pages (privacy, terms, support) ---------- */

.doc-band .site-header {
  padding-bottom: 8px;
}

.doc-title {
  padding-top: clamp(24px, 4vw, 48px);
  padding-bottom: clamp(88px, 10vw, 128px);
}

.doc-title h1 {
  color: var(--white);
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.doc-title h1:lang(zh) {
  letter-spacing: 0;
  line-height: 1.15;
}

.doc-title .app-name {
  margin-top: 10px;
  color: var(--white);
  font-size: 19px;
  font-weight: 600;
}

.doc-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  margin-top: -56px;
  padding-bottom: clamp(64px, 8vw, 110px);
  position: relative;
  z-index: 2;
}

.doc-layout > .doc {
  grid-column: 2;
  grid-row: 1;
}

.doc-layout > .doc-aside {
  grid-column: 1;
  grid-row: 1;
}

.doc-aside {
  position: sticky;
  top: 24px;
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--white);
  box-shadow: var(--shadow-card);
  font-size: 15px;
}

.doc-aside h2 {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

.doc-aside ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-aside li a {
  display: block;
  padding: 6px 0;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.4;
}

.doc-aside li a:hover {
  color: var(--blue-dark);
  text-decoration: underline;
}

.doc-aside .contact {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.doc-aside .contact a {
  font-weight: 700;
}

.doc {
  max-width: 760px;
  padding: clamp(28px, 4vw, 52px);
  border-radius: var(--radius-card);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 15px;
}

.date-placeholder {
  padding: 2px 10px;
  border-radius: 8px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
}

.doc-meta + p,
.doc-lead {
  margin-top: 20px;
  font-size: 18.5px;
}

.doc-lead {
  margin-top: 0;
  line-height: 1.7;
}

.doc .doc-lead + h2 {
  margin-top: 28px;
  padding-top: 0;
  border-top: 0;
}

.doc h2 {
  margin-top: 46px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  scroll-margin-top: 24px;
}

.doc h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.doc h3 {
  margin-top: 30px;
  font-size: 18.5px;
  line-height: 1.4;
  letter-spacing: 0;
}

.doc p,
.doc ul,
.doc ol {
  margin-top: 14px;
}

.doc ul,
.doc ol {
  padding-left: 1.3em;
}

.doc li + li {
  margin-top: 8px;
}

.doc li::marker {
  color: var(--blue-dark);
  font-weight: 700;
}

.doc .ui {
  font-weight: 600;
}

.doc code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

.doc .steps-list {
  counter-reset: s;
  padding-left: 0;
  list-style: none;
}

.doc .steps-list li {
  position: relative;
  padding-left: 46px;
  min-height: 32px;
}

.doc .steps-list li::before {
  counter-increment: s;
  content: counter(s);
  position: absolute;
  left: 0;
  top: -1px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.doc .steps-list li + li {
  margin-top: 16px;
}

.mail-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 13px 22px;
  border-radius: var(--radius-button);
  background: var(--blue-dark);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s var(--ease-out);
}

.mail-button:hover {
  background: #005b8a;
  text-decoration: none;
}

.faq {
  margin-top: 8px;
}

.faq h3 {
  margin-top: 28px;
}

.faq p {
  margin-top: 6px;
}

.see-also {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 920px) {
  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
    margin-top: -48px;
  }

  .doc-layout > .doc,
  .doc-layout > .doc-aside {
    grid-column: 1;
    grid-row: auto;
  }

  .doc-aside {
    position: static;
  }

  .doc {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .doc {
    padding: 24px 20px;
    border-radius: 18px;
  }

  .doc h2 {
    font-size: 23px;
  }
}

/* ---------- 404 ---------- */

.lost {
  padding-top: 40px;
  padding-bottom: 200px;
}

.lost h1 {
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.1;
}

.lost p {
  margin-top: 14px;
  color: var(--white);
  font-size: 19px;
  font-weight: 500;
}

.lost .mail-button {
  background: var(--white);
  color: var(--blue-dark);
  margin-right: 10px;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .band,
  .doc-title h1,
  .doc-title .app-name,
  .site-footer,
  .doc-aside {
    background: none !important;
    color: var(--ink) !important;
    box-shadow: none !important;
  }

  .band-art,
  .site-nav,
  .badges {
    display: none !important;
  }

  .doc {
    box-shadow: none;
    padding: 0;
  }
}
