/* podpiska-happ.top — светлая «бумажная» тема: тёплый фон, тёмные чернила, жжёный оранжевый акцент.
   Системные шрифты, без внешних CDN. Сначала телефон, потом широкие экраны. */
:root {
  color-scheme: light;
  --paper: #fbf8f3;
  --paper-2: #f4eee5;
  --card: #ffffff;
  --ink: #1f1a14;
  --ink-2: #5b5248;
  --line: #e5dccf;
  --accent: #b8430f;
  --accent-dark: #93340a;
  --accent-soft: #fbe7d8;
  --leaf: #1f6f5c;
  --leaf-soft: #e3f1ec;
  --warn-soft: #fff4d6;
  --r: 10px;
  --r-lg: 18px;
  --wrap: 68rem;
  --text-w: 44rem;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.62 var(--sans);
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
a { color: var(--accent-dark); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: clamp(30px, 7.4vw, 46px); margin: 6px 0 14px; }
h2 { font-size: clamp(23px, 5vw, 30px); margin: 40px 0 12px; }
h3 { font-size: 20px; margin: 22px 0 8px; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px; padding-left: 1.3em; }
li { margin: 0 0 7px; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--paper-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
table { width: 100%; border-collapse: collapse; margin: 6px 0 18px; font-size: 16px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-2); }
.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.wrap, .container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 12px; top: 10px; z-index: 50; background: var(--card); padding: 8px 12px; border: 2px solid var(--ink); }
.muted { color: var(--ink-2); }

/* ---- шапка ---------------------------------------------------------------- */
.strip { background: var(--ink); color: #efe6d9; font-size: 13px; line-height: 1.45; }
.strip p { margin: 0; padding: 7px 0; }
.bar { background: var(--paper); border-bottom: 1px solid var(--line); }
.bar__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 10px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo__txt { font-family: var(--serif); font-size: 20px; letter-spacing: -0.01em; }
.logo__txt i { font-style: normal; color: var(--accent); }
.buy-pill { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; }
.buy-pill:hover { background: var(--accent-dark); }
.rail { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.rail a { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 999px; color: var(--ink); font-size: 15px; text-decoration: none; }
.rail a:hover { background: var(--paper-2); }
.rail a[aria-current="page"] { background: var(--ink); color: #fff; }

/* ---- общие блоки ---------------------------------------------------------- */
.trail { font-size: 14px; color: var(--ink-2); padding-top: 14px; }
.trail ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.trail li { margin: 0; }
.trail li + li::before { content: "›"; margin: 0 6px 0 2px; color: var(--line); }
.intro { padding-top: 12px; padding-bottom: 8px; }
.kicker { display: inline-block; margin: 8px 0 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--leaf); }
.lead { font-size: 18px; color: var(--ink-2); max-width: var(--text-w); }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 6px; }
.doc { max-width: calc(var(--text-w) + 32px); padding-bottom: 32px; }
.doc > section:first-child h2:first-child { margin-top: 8px; }
.answer { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--leaf); border-radius: var(--r); padding: 16px 18px; font-size: 17px; }
.note { background: var(--warn-soft); border-radius: var(--r); padding: 14px 16px; font-size: 16px; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps > li { counter-increment: s; position: relative; padding-left: 44px; margin-bottom: 14px; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; font: 700 15px/30px var(--sans); text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; padding: 0; list-style: none; }
.chips li { margin: 0; }
.chips a { display: inline-flex; min-height: 40px; align-items: center; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; font-size: 15px; }
.chips a:hover { border-color: var(--ink); }
.tiles { display: grid; gap: 12px; margin: 14px 0 8px; padding: 0; list-style: none; }
.tiles > li { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; }
.tiles h3 { margin: 0 0 6px; font-size: 19px; }
.tiles p { margin: 0 0 8px; font-size: 16px; color: var(--ink-2); }
.places { display: grid; gap: 10px; margin: 14px 0; }
.places dt { font-family: var(--serif); font-weight: 700; font-size: 19px; }
.places dd { margin: 2px 0 0; color: var(--ink-2); font-size: 16px; }
.places > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; }

/* кнопки сайта */
.act, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--r);
  font: 700 16px/1.2 var(--sans); text-decoration: none; cursor: pointer;
  border: 2px solid var(--ink); background: transparent; color: var(--ink);
}
.act:hover, .btn:hover { background: var(--paper-2); }
.act--main, .btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.act--main:hover, .btn--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.act--wide, .btn--block { display: flex; width: 100%; }
.btn--ghost { background: var(--card); }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn--lg { min-height: 54px; font-size: 17px; }
.btn:disabled { opacity: 0.6; cursor: wait; }

/* билет с ценами — встроенный блок покупки */
.tkt { position: relative; margin: 24px 0; background: var(--card); border: 2px dashed var(--accent); border-radius: var(--r-lg); padding: 18px 16px 16px; }
.tkt::before, .tkt::after { content: ""; position: absolute; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: var(--paper); border: 2px dashed var(--accent); }
.tkt::before { left: -11px; border-left-color: transparent; border-bottom-color: transparent; transform: rotate(45deg); }
.tkt::after { right: -11px; border-right-color: transparent; border-top-color: transparent; transform: rotate(45deg); }
.tkt__title { font-family: var(--serif); font-size: 21px; font-weight: 700; margin: 0 0 4px; }
.tkt__sub { margin: 0 0 12px; color: var(--ink-2); font-size: 15px; }
.tkt__rows { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tkt__rows li { margin: 0; }
.tkt__rows a { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.tkt__rows a:hover { border-color: var(--accent); }
.tkt__rows span { font-size: 14px; color: var(--ink-2); }
.tkt__rows b { font-size: 20px; }
.tkt__rows small { font-size: 13px; color: var(--leaf); font-weight: 700; }
.tkt__fine { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); text-align: center; }

/* вопросы и ответы */
.qa { border-top: 1px solid var(--line); }
.qa:last-child { border-bottom: 1px solid var(--line); }
.qa summary { cursor: pointer; list-style: none; padding: 14px 32px 14px 0; position: relative; font-weight: 700; font-size: 17px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font: 400 26px/1 var(--sans); color: var(--accent); }
.qa[open] summary::after { content: "−"; }
.qa p { margin: 0 0 14px; color: var(--ink-2); }

/* подвал */
.foot { margin-top: 32px; background: var(--ink); color: #e9e0d3; font-size: 15px; }
.foot a { color: #fff; }
.foot__grid { display: grid; gap: 22px; padding-top: 28px; padding-bottom: 20px; }
.foot .logo { color: #fff; }
.foot__note { margin: 12px 0 0; color: #d8cdbd; max-width: 26rem; }
.foot__col p { margin: 0 0 8px; font-weight: 700; color: #fff; }
.foot__col ul { list-style: none; padding: 0; margin: 0; }
.foot__col li { margin: 0 0 6px; }
.foot__base { border-top: 1px solid #3a3229; padding-top: 14px; padding-bottom: 22px; color: #bfb3a2; font-size: 14px; }

/* ---- /access: тарифы и форма (классы читают checkout.js и сервер) --------- */
.hero-lead { font-size: 18px; color: var(--ink-2); max-width: var(--text-w); }
.plans-grid { display: grid; gap: 14px; margin-top: 8px; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 18px 18px; }
.plan--recommended { border: 2px solid var(--accent); box-shadow: 0 10px 28px rgba(184, 67, 15, 0.14); }
.plan__badge { position: absolute; top: -12px; left: 16px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.plan__badge--saving { background: var(--leaf); }
.plan__name { font-family: var(--serif); font-size: 21px; font-weight: 700; }
.plan__old { min-height: 20px; color: var(--ink-2); text-decoration: line-through; font-size: 15px; }
html[data-reference-price="hide"] .plan__old { visibility: hidden; }
.plan__price { font-size: 34px; font-weight: 800; line-height: 1.1; }
.plan__sub { color: var(--leaf); font-weight: 700; font-size: 15px; margin: 4px 0 10px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 16px; font-size: 15px; color: var(--ink-2); }
.plan li { margin: 0 0 5px; padding-left: 20px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 10px; height: 6px; border-left: 2px solid var(--leaf); border-bottom: 2px solid var(--leaf); transform: rotate(-45deg); }
.plan .btn { margin-top: auto; }
.plans-note { font-size: 15px; color: var(--ink-2); margin-top: 16px; }
.pending-order { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; padding: 14px 16px; border: 2px solid var(--accent); border-radius: var(--r); background: var(--accent-soft); }

#checkout-inline:empty { display: none; }
.modal-backdrop { display: none; position: fixed; inset: 0; z-index: 30; background: rgba(31, 26, 20, 0.55); padding: 16px; overflow-y: auto; }
.modal-backdrop.open { display: flex; align-items: flex-start; justify-content: center; }
.modal { position: relative; width: 100%; max-width: 520px; margin: 6vh auto 0; background: var(--card); border-radius: var(--r-lg); padding: 22px 18px; border: 1px solid var(--line); }
.modal h3 { margin: 0 0 6px; }
.modal__close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; background: none; font-size: 28px; cursor: pointer; color: var(--ink); }
.modal__desc { color: var(--ink-2); font-size: 16px; }
.modal__summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; margin: 0 0 14px; background: var(--paper); border-radius: var(--r); }
.modal__amount { text-align: right; }
.modal__amount b { display: block; font-size: 22px; }
.modal__amount small { color: var(--ink-2); font-size: 12px; }
.modal label { display: block; font-weight: 700; font-size: 15px; margin: 0 0 6px; }
.modal input { width: 100%; min-height: 50px; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--r); font-size: 17px; font-family: inherit; color: var(--ink); background: #fff; margin-bottom: 14px; }
.modal input:focus { border-color: var(--leaf); outline: none; }
.modal__error { color: #a3200f; font-weight: 700; font-size: 15px; min-height: 1em; margin: 0 0 8px; }
.modal__note { font-size: 13px; color: var(--ink-2); text-align: center; margin: 10px 0 0; }
.co-rails-cap { font-size: 14px; color: var(--ink-2); margin: 0 0 6px; }
.co-rails { display: flex; gap: 8px; margin: 0 0 14px; }
.co-rail { flex: 1; min-height: 46px; padding: 8px 6px; border: 2px solid var(--line); border-radius: var(--r); background: #fff; color: var(--ink); font: 600 15px/1.2 var(--sans); cursor: pointer; }
.co-rail.is-on { border-color: var(--ink); background: var(--ink); color: #fff; }
html[data-form="inline"] .modal-backdrop { position: static; inset: auto; z-index: auto; background: none; padding: 0; overflow: visible; }
html[data-form="inline"] .modal-backdrop.open { display: block; }
html[data-form="inline"] .modal { margin: 18px auto 0; box-shadow: 0 8px 24px rgba(31, 26, 20, 0.08); }
html[data-form="inline"] .modal__close { display: none; }

/* ---- /success ------------------------------------------------------------- */
.order-box { max-width: 680px; margin-top: 20px; padding: 18px; border: 2px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.order-box select, .order-box input { font: inherit; }
.tg-box { margin: 0 0 16px; padding: 16px; border: 2px solid var(--leaf); border-radius: var(--r); }

/* ---- шире телефона ---------------------------------------------------------- */
@media (min-width: 640px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tkt { padding: 22px 26px 20px; }
  .tkt__rows { grid-template-columns: repeat(4, 1fr); }
  .places { grid-template-columns: repeat(2, 1fr); }
  .modal { padding: 26px 28px; }
}
@media (min-width: 900px) {
  body { font-size: 18px; }
  .wrap, .container { padding: 0 24px; }
  .tiles--3 { grid-template-columns: repeat(3, 1fr); }
  .plans-grid { grid-template-columns: repeat(4, 1fr); }
  .foot__grid { grid-template-columns: 1.4fr repeat(4, 1fr); }
  .rail { overflow: visible; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
