:root {
  --bg: #f8f7f4;
  --surface: #fff;
  --ink: #242022;
  --muted: #625956;
  --line: #e8e1db;
  --soft: #f5f1ed;
  --accent: #a43d23;
  --accent-hover: #873019;
  --accent-soft: #fae8df;
  --ok: #246248;
  --ok-bg: #e6f4ea;
  --danger: #8c293b;
  --danger-bg: #faebed;
  --shadow: 0 1px 2px rgb(54 35 26 / 4%), 0 12px 32px rgb(54 35 26 / 7%);
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --radius: 20px;
  --max: 1080px;
  --gutter: clamp(16px, 3.2vw, 34px);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
}
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button, input { font: inherit; color: inherit; }
a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--accent-hover); }
img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  margin: 0;
  line-height: 1.14;
  font-weight: 720;
  letter-spacing: -0.035em;
}
h1 { font-size: clamp(2.15rem, 4vw, 3.3rem); }
h2 { font-size: clamp(1.38rem, 2.5vw, 1.75rem); }
p { margin: 0; }

.skip {
  position: absolute;
  inset: 10px auto auto 10px;
  z-index: 5;
  translate: 0 -150%;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
}
.skip:focus { translate: none; color: white; }

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

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

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 70px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 760;
  letter-spacing: -0.035em;
  text-decoration: none;
}
.brand__name { font-size: 1.12rem; }
.brand__mark, .icon-box, .timer-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
}
.brand__mark { width: 36px; height: 36px; border-radius: 11px; color: #fff; background: var(--accent); }
.brand__mark svg, .icon-box svg { width: 21px; height: 21px; }
.nav { display: flex; gap: 4px; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
  text-decoration: none;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--soft); color: var(--ink); }

.home { padding-bottom: 34px; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(30px, 6vw, 72px);
  padding: 38px 0 26px;
}
.intro h1 {
  margin-bottom: 13px;
  font-size: clamp(2.55rem, 4.4vw, 3.55rem);
  line-height: 1.02;
  letter-spacing: -0.062em;
}
.eyebrow {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.intro__eyebrow { margin: 0 0 10px; }
.lede { max-width: 62ch; color: var(--muted); font-size: 1.04rem; }
.intro .lede { max-width: 46ch; }
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 630;
}
.facts li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 4px;
  margin-right: 6px;
  vertical-align: 0.19em;
  border: solid var(--accent);
  border-width: 0 0 1.5px 1.5px;
  rotate: -45deg;
}

.ticket, .mail {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.ticket {
  padding: clamp(16px, 2.7vw, 24px);
  box-shadow: var(--shadow);
  scroll-margin-top: 18px;
}
.ticket__top, .actions, .timer-row, .inbox__bar, .section-head {
  display: flex;
  align-items: center;
}
.ticket__top { gap: 10px; flex-wrap: wrap; }
.ticket__top h2 { font-size: 1.08rem; letter-spacing: -0.025em; }
.icon-box { width: 38px; height: 38px; border-radius: 11px; color: var(--accent); background: var(--accent-soft); }
.presence {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
}
.ticket[data-state="ready"] .presence { background: var(--ok-bg); color: var(--ok); }
.ticket .presence:is(.is-error, .is-expired) { background: var(--danger-bg); color: var(--danger); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.address {
  display: flex;
  align-items: center;
  min-height: 53px;
  margin: 15px 0 12px;
  padding: 10px 12px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.95rem;
}
.ticket:is([data-state="ready"], [data-state="expired"]) .address {
  color: var(--ink);
  font: 640 clamp(0.84rem, 1.45vw, 1.02rem)/1.45 var(--mono);
  user-select: all;
}
.ticket[data-state="expired"] .address { color: var(--muted); }
.actions { flex-wrap: wrap; gap: 7px; }
.btn {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-size: 0.91rem;
  font-weight: 680;
}
.btn:hover { background: var(--accent-hover); }
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
}
.btn--ghost { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn--ghost:hover { background: var(--soft); }
.btn--small { min-height: 44px; padding: 0 11px; font-size: 0.86rem; }
.btn:disabled { opacity: 0.58; cursor: not-allowed; }
.ticket:not([data-state="ready"]) #new-address { width: 100%; }

.timer-row {
  flex-wrap: wrap;
  column-gap: 8px;
  row-gap: 2px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.timer-icon svg { width: 17px; height: 17px; }
.timer { font: 700 1rem/1.3 var(--mono); letter-spacing: -0.04em; color: var(--ink); }
.timer-until { margin-left: auto; font-size: 0.82rem; }
.ticket__note { margin-top: 9px; color: var(--muted); font-size: 0.9rem; }
.ticket__note:empty { display: none; }

.mail { display: grid; overflow: hidden; }
.inbox { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.inbox__bar { justify-content: space-between; gap: 10px; min-height: 60px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.inbox__bar h2 { display: flex; gap: 8px; align-items: center; font-size: 1.13rem; }
.inbox__bar a { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.88rem; }
.count {
  min-width: 24px;
  padding: 3px 5px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  text-align: center;
  font: 700 0.79rem/1.2 var(--mono);
}
.empty {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 23px 16px 25px;
  color: var(--muted);
  text-align: center;
  font-size: 0.91rem;
}
.empty .icon-box { margin-bottom: 4px; background: var(--soft); color: var(--muted); }
.empty__title { color: var(--ink); font-size: 1rem; font-weight: 700; }
.list { margin: 0; padding: 0; overflow: auto; max-height: 370px; list-style: none; }
.msg {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 60px;
  padding: 12px 20px 13px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.msg:hover { background: var(--bg); }
.msg[aria-pressed="true"] { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.msg:focus-visible { outline-offset: -4px; }
.msg__from, .msg__subject, .msg__preview { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg__from { color: var(--muted); font-size: 0.8rem; }
.msg__subject { font-weight: 700; }
.msg__preview { color: var(--muted); font-size: 0.86rem; }

.reader { display: flex; flex-direction: column; min-width: 0; min-height: 340px; }
.reader__head { padding: 4px 20px 11px; border-bottom: 1px solid var(--line); }
.reader__head h2 { font-size: 1.35rem; overflow-wrap: anywhere; }
.reader__meta { margin: 4px 0 7px; color: var(--muted); overflow-wrap: anywhere; font-size: 0.88rem; }
.reader__hint { margin: 7px 0 0; color: var(--muted); font-size: 0.85rem; }
.reader__hint:empty { display: none; }
.frame { flex: 1; width: 100%; min-height: 210px; border: 0; background: white; }

.panel { margin-top: 30px; }
.section-head { justify-content: space-between; gap: 10px; }
.section-head a { flex: 0 0 auto; font-size: 0.9rem; }
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.steps li {
  position: relative;
  padding: 13px 13px 13px 52px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.steps__number {
  position: absolute;
  left: 13px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font: 720 0.85rem/1 var(--mono);
}
.steps p { margin-top: 3px; color: var(--muted); font-size: 0.9rem; }
.prose-lead { margin-top: 13px; color: var(--muted); }
.topic-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 11px; }
.topic-links span { font-weight: 680; }
.topic-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.91rem; }
.faq { margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.faq details { padding: 0 15px; }
.faq details + details { border-top: 1px solid var(--line); }
.faq summary { padding: 11px 0; min-height: 44px; cursor: pointer; font-weight: 650; }
.faq p { margin: 0 0 13px; max-width: 70ch; color: var(--muted); }

.ad-area { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); align-items: start; gap: 16px; }
.ad-slot {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  margin-top: 22px;
  min-width: 0;
  overflow: hidden;
  contain: content;
}
.ad-slot__label { color: var(--muted); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; }
.ad-slot__placeholder { color: var(--muted); font-size: 0.85rem; }
.ad-slot__code { width: 100%; display: grid; justify-items: center; }
.ad-slot__code, .ad-slot__code * { position: static !important; max-width: 100%; }
.ad-slot[data-filled="true"] .ad-slot__placeholder { display: none; }
.ad-slot--below[data-filled="true"] .ad-slot__code { min-height: 100px; }
.ad-banner { display: flex; justify-content: center; max-width: 100%; overflow: hidden; }
.ad-banner--728x90 { height: 50px; width: 320px; }
.ad-banner--300x250 { height: 250px; width: 300px; }
.ad-banner__frame { display: block; border: 0; }
[id^="container-"] { width: 100%; }
@media (min-width: 800px) {
  .ad-banner--728x90 { height: 90px; width: 728px; }
}
@media (max-width: 360px) {
  .ad-slot--header { margin-inline: calc(-1 * var(--gutter)); }
}

.foot {
  padding: 15px 0 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}
.foot strong { color: var(--ink); }
.foot a, .text-btn { color: inherit; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0 14px; margin-top: 4px; }
.foot-nav a, .foot-nav .text-btn { display: inline-flex; align-items: center; min-height: 44px; }
.foot-nav a[aria-current="page"] { color: var(--ink); }
.text-btn {
  padding: 0;
  min-height: 44px;
  border: 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.reader__back { color: var(--accent); font-size: 0.88rem; font-weight: 650; }

.prose { max-width: 760px; padding: 20px 0 32px; }
.prose h1 { margin: 8px 0 10px; }
.prose h2 { margin: 25px 0 9px; font-size: clamp(1.3rem, 2.5vw, 1.58rem); }
.prose p, .prose li { color: var(--muted); max-width: 68ch; }
.prose p + p { margin-top: 10px; }
.prose ul { padding-left: 1.25rem; }
.prose li + li { margin-top: 5px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--muted); font-size: 0.86rem; }
.crumbs a { color: inherit; }
.updated { margin-top: 8px; color: var(--muted); font-size: 0.83rem; }
.landing-cta { margin: 15px 0; }
.prose .guide-index, .guide-index, .prose .related {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.prose .guide-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-guides { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.guide-index li, .related li { margin: 0; min-width: 0; }
.prose :is(.guide-index, .related) li + li { margin-top: 0; }
.guide-index a, .related a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  height: 100%;
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.guide-index a span { color: var(--muted); font-size: 0.88rem; }
.guide-index a:hover, .related a:hover { border-color: var(--accent); }

.consent {
  position: fixed;
  z-index: 30;
  inset: auto 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--ink);
  color: white;
}
.consent p { max-width: 68ch; font-size: 0.92rem; }
.consent a { color: white; }
.consent__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.consent .btn--ghost { color: white; border-color: white; background: transparent; }
html[data-consent] .consent { display: none; }
body.consent-open { padding-bottom: 96px; }
html[data-consent] body.consent-open { padding-bottom: 0; }

.dev {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 14px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--soft);
}
.dev p { color: var(--muted); font-size: 0.88rem; }
.dev__actions { display: flex; gap: 7px; flex-wrap: wrap; }
.noscript { margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); }

@media (min-width: 760px) {
  .mail[data-reading] { grid-template-columns: minmax(230px, 31%) minmax(0, 1fr); min-height: 375px; }
  .mail[data-reading] .inbox { border-right: 1px solid var(--line); }
}
@media (max-width: 759px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 21px 0 17px; }
  .intro h1 { max-width: 20ch; font-size: clamp(2.27rem, 7.8vw, 3.2rem); }
  .intro .lede { font-size: 0.96rem; }
  .intro__eyebrow { margin-bottom: 6px; }
  .facts { margin-top: 10px; }
  .mail[data-reading] .inbox { display: none; }
  .steps, .home-guides { grid-template-columns: minmax(0, 1fr); }
  .ad-area { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .top { min-height: 60px; }
  .nav a { padding: 0 9px; }
  .inbox__bar, .reader__head { padding-inline: 14px; }
  .section-head { align-items: baseline; }
  .prose .guide-index { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 355px) {
  .ad-slot--sidebar { margin-inline: calc(-1 * var(--gutter)); }
  .timer-until { margin-left: 0; }
  .ticket__top { gap: 7px; }
  .ticket__top .icon-box { width: 31px; height: 31px; }
  .ticket__top h2 { font-size: 0.94rem; }
}
