/* happvpn.ink — «Маяк»: ночное море в шапке и подвале, светлая страница, янтарный луч как акцент.
   Шрифты: Unbounded (заголовки) и Golos Text (текст). Сначала телефон, потом широкие экраны. */
:root {
  color-scheme: light;
  --night: #0d1b2e;
  --night-2: #142a46;
  --night-3: #1e3a5f;
  --beam: #f5b83d;
  --beam-2: #e19c16;
  --beam-soft: #fff4da;
  --sea: #17767f;
  --sea-2: #0f5a61;
  --sea-soft: #e3f2f3;
  --page: #f3f6f9;
  --card: #ffffff;
  --ink: #122033;
  --ink-2: #4a5c71;
  --rule: #d8e0ea;
  --alert: #b3261e;
  /* имена, которые читают встроенные стили /success и checkout.js */
  --accent: var(--sea);
  --line: var(--rule);
  --paper: var(--page);
  --rad: 12px;
  --rad-lg: 20px;
  --max: 70rem;
  --read: 46rem;
  --f-head: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --f-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --f-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(--page);
  color: var(--ink);
  font: 17px/1.65 var(--f-body);
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
a { color: var(--sea-2); text-decoration: underline; text-decoration-color: rgba(23, 118, 127, 0.45); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--beam-2); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--f-head); font-weight: 600; line-height: 1.22; color: var(--ink); letter-spacing: -0.015em; }
h1 { font-size: clamp(26px, 6.4vw, 40px); margin: 10px 0 18px; }
h2 { font-size: clamp(20px, 4.4vw, 26px); margin: 44px 0 14px; }
h3 { font-size: 17px; margin: 0 0 6px; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px; padding-left: 1.3em; }
li { margin: 0 0 7px; }
code { font-family: var(--f-mono); font-size: 0.86em; background: var(--sea-soft); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
.muted { color: var(--ink-2); }

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

/* ---- шапка: ночь и луч ---------------------------------------------------- */
.mk-top {
  background:
    radial-gradient(120% 140% at 12% -40%, rgba(245, 184, 61, 0.22), rgba(245, 184, 61, 0) 55%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
  color: #e8eef6;
}
.mk-top__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 10px; }
.mk-logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.mk-logo svg { width: 40px; height: 40px; flex: none; border-radius: 11px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14); }
.mk-logo__words { display: grid; line-height: 1.1; }
.mk-logo__words b { font: 700 20px/1.1 var(--f-head); letter-spacing: 0.01em; }
.mk-logo__words small { font-size: 12px; color: #a9bad0; letter-spacing: 0.04em; }
.mk-top__buy {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 10px;
  background: var(--beam); color: var(--night); font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
}
.mk-top__buy:hover { background: #ffc756; }
.mk-nav { display: flex; gap: 2px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.mk-nav::-webkit-scrollbar { display: none; }
.mk-nav a { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 8px; color: #d3deeb; font-size: 15px; text-decoration: none; }
.mk-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.mk-nav a[aria-current="page"] { color: var(--night); background: var(--beam); font-weight: 600; }

/* ---- начало страницы ------------------------------------------------------ */
.mk-crumbs { font-size: 14px; color: var(--ink-2); padding-top: 16px; }
.mk-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.mk-crumbs li { margin: 0; }
.mk-crumbs li + li::before { content: "/"; margin: 0 6px 0 2px; color: #9fb0c4; }
.mk-hero { padding-top: 10px; padding-bottom: 4px; }
.mk-lead { font-size: 18px; color: var(--ink-2); max-width: var(--read); }
.mk-upd { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); }
.mk-upd::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--beam-2); vertical-align: 1px; }

/* карточка оффера под H1 */
.mk-offer {
  position: relative; overflow: hidden; display: grid; gap: 14px; align-items: center;
  margin: 0 0 16px; padding: 16px 16px 16px 20px; max-width: 52rem;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--rad-lg);
  box-shadow: 0 10px 30px rgba(13, 27, 46, 0.07);
}
.mk-offer::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(180deg, var(--beam), var(--beam-2)); }
.mk-offer::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 184, 61, 0.18), rgba(245, 184, 61, 0) 70%); pointer-events: none;
}
.mk-offer__tag { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--sea); }
.mk-offer__price { margin: 2px 0 6px; font-size: 16px; color: var(--ink-2); }
.mk-offer__price b { font: 700 30px/1.1 var(--f-head); color: var(--ink); }
.mk-offer__facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 15px; color: var(--ink-2); }
.mk-offer__facts li { margin: 0; }
.mk-offer__facts li::before { content: "◆"; margin-right: 6px; font-size: 9px; color: var(--beam-2); vertical-align: 2px; }

/* ---- текст ---------------------------------------------------------------- */
.mk-text { padding-bottom: 36px; }
.mk-text > * { max-width: var(--read); }
.mk-hero:first-child { padding-top: 26px; }
.mk-text h2 { position: relative; padding-top: 12px; }
.mk-text h2::before { content: ""; position: absolute; left: 0; top: 0; width: 36px; height: 4px; border-radius: 2px; background: var(--beam); }
.mk-list { padding-left: 1.2em; }
.mk-list li::marker { color: var(--sea); }
.mk-steps { counter-reset: n; list-style: none; padding: 0; }
.mk-steps > li { counter-increment: n; position: relative; padding: 2px 0 0 48px; margin-bottom: 16px; min-height: 34px; }
.mk-steps > li::before {
  content: counter(n); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 10px;
  background: var(--night); color: var(--beam); font: 700 15px/34px var(--f-head); text-align: center;
}
.mk-tiles { display: grid; gap: 12px; margin: 14px 0 12px; padding: 0; list-style: none; }
.mk-tiles > li { margin: 0; background: var(--card); border: 1px solid var(--rule); border-top: 3px solid var(--sea); border-radius: var(--rad); padding: 14px 16px; }
.mk-tiles p { margin: 0; font-size: 16px; color: var(--ink-2); }
.mk-places { display: grid; gap: 10px; margin: 14px 0; }
.mk-places > div { background: var(--card); border: 1px solid var(--rule); border-radius: var(--rad); padding: 12px 16px; }
.mk-places dt { font-weight: 700; color: var(--ink); }
.mk-places dd { margin: 2px 0 0; color: var(--ink-2); font-size: 16px; }
.mk-table { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 6px 0 16px; border: 1px solid var(--rule); border-radius: var(--rad); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { background: var(--night-2); color: #e6edf6; font-weight: 600; font-size: 13px; letter-spacing: 0.03em; }
.mk-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }

/* кнопки контента */
.mk-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  border-radius: 10px; border: 2px solid var(--night); background: transparent; color: var(--night);
  font: 700 16px/1.2 var(--f-body); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.mk-btn:hover { background: var(--sea-soft); }
.mk-btn--beam { background: var(--beam); border-color: var(--beam); color: var(--night); }
.mk-btn--beam:hover { background: #ffc756; border-color: #ffc756; }

/* вопросы */
.mk-faq h2 { margin-bottom: 10px; }
.mk-qa { background: var(--card); border: 1px solid var(--rule); border-radius: var(--rad); margin-bottom: 8px; }
.mk-qa summary { cursor: pointer; list-style: none; position: relative; padding: 14px 44px 14px 16px; font-weight: 600; }
.mk-qa summary::-webkit-details-marker { display: none; }
.mk-qa summary::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--sea); border-bottom: 2px solid var(--sea); transform: rotate(45deg); transition: transform 0.15s;
}
.mk-qa[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.mk-qa__a { padding: 0 16px 4px; }
.mk-qa__a p { color: var(--ink-2); }

/* ссылки «Читайте также» */
.mk-more { margin-top: 34px; padding: 16px; border-radius: var(--rad); background: var(--sea-soft); }
.mk-more__t { margin: 0 0 8px; font: 600 15px/1.3 var(--f-head); color: var(--sea-2); }
.mk-more ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mk-more li { margin: 0; }
.mk-more a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; font-size: 15px; border: 1px solid var(--rule); }
.mk-more a:hover { border-color: var(--sea); }

/* юридические страницы */
.mk-legal h2 { font-size: 19px; margin-top: 32px; }
.mk-legal p, .mk-legal li { font-size: 16px; }

/* ---- подвал ----------------------------------------------------------------- */
.mk-foot { margin-top: 24px; background: var(--night); color: #c6d2e1; font-size: 15px; }
.mk-foot a { color: #eaf0f7; text-decoration-color: rgba(234, 240, 247, 0.35); }
.mk-foot__grid { display: grid; gap: 24px; padding-top: 30px; padding-bottom: 22px; }
.mk-foot__note { margin: 12px 0 0; color: #a9bad0; max-width: 24rem; }
.mk-foot__head { margin: 0 0 8px; font: 600 14px/1.3 var(--f-head); color: var(--beam); }
.mk-foot__col ul { list-style: none; padding: 0; margin: 0; }
.mk-foot__col li { margin: 0 0 6px; }
.mk-foot__base { border-top: 1px solid var(--night-3); padding-top: 14px; padding-bottom: 22px; color: #93a5bb; font-size: 14px; }

/* ---- /access: тарифы и форма (классы читают checkout.js и сервер) --------- */
.hero-lead { max-width: var(--read); }
.access-plans { padding: 8px 0 4px; }
.plans-grid { display: grid; gap: 14px; margin-top: 6px; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--rule); border-radius: var(--rad-lg); padding: 22px 18px 18px; }
.plan--recommended { border: 2px solid var(--beam-2); box-shadow: 0 12px 30px rgba(225, 156, 22, 0.16); }
.plan__badge { position: absolute; top: -12px; left: 16px; background: var(--beam); color: var(--night); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 10px; border-radius: 6px; }
.plan__badge--saving { background: var(--sea); color: #fff; }
.plan__name { font: 600 18px/1.3 var(--f-head); }
.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: 700 32px/1.15 var(--f-head); color: var(--ink); margin-top: 6px; }
.plan__sub { color: var(--sea); 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: 18px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 7px; height: 7px; border-radius: 2px; background: var(--beam-2); 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(--beam-2); border-radius: var(--rad); background: var(--beam-soft); }

/* кнопки движка (форма, /success) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 10px;
  font: 700 16px/1.2 var(--f-body); text-decoration: none; cursor: pointer;
  border: 2px solid var(--night); background: var(--card); color: var(--night);
}
.btn:hover { background: var(--sea-soft); }
.btn--primary { background: var(--beam); border-color: var(--beam); color: var(--night); }
.btn--primary:hover { background: #ffc756; border-color: #ffc756; }
.btn--ghost { background: var(--card); border-color: var(--night-3); }
.btn--block { display: flex; width: 100%; }
.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; }

#checkout-inline:empty { display: none; }
.modal-backdrop { display: none; position: fixed; inset: 0; z-index: 30; background: rgba(13, 27, 46, 0.6); 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(--rad-lg); padding: 22px 18px; border-top: 5px solid var(--beam); }
.modal h3 { margin: 0 0 6px; font-size: 20px; }
.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(--sea-soft); border-radius: var(--rad); }
.modal__amount { text-align: right; }
.modal__amount b { display: block; font: 700 22px/1.2 var(--f-head); }
.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(--rule); border-radius: var(--rad); font-size: 17px; font-family: inherit; color: var(--ink); background: #fff; margin-bottom: 14px; }
.modal input:focus { border-color: var(--sea); outline: none; }
.modal__error { color: var(--alert); 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(--rule); border-radius: var(--rad); background: #fff; color: var(--ink); font: 600 15px/1.2 var(--f-body); cursor: pointer; }
.co-rail.is-on { border-color: var(--night); background: var(--night); color: var(--beam); }
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(13, 27, 46, 0.1); }
html[data-form="inline"] .modal__close { display: none; }

/* ---- /success ------------------------------------------------------------- */
.order-box { max-width: 680px; margin-top: 20px; padding: 18px; border: 1px solid var(--rule); border-top: 4px solid var(--beam); border-radius: var(--rad-lg); background: var(--card); }
.order-box select, .order-box input { font: inherit; }
.tg-box { margin: 0 0 16px; padding: 16px; border: 2px solid var(--sea); border-radius: var(--rad); background: var(--sea-soft); }
.mk-select { display: block; width: 100%; max-width: 360px; min-height: 48px; padding: 10px; margin: 8px 0; border: 2px solid var(--rule); border-radius: 10px; background: #fff; }
.mk-keylabel { display: block; font-size: 14px; font-weight: 700; margin-bottom: 7px; }
.mk-keyrow { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.mk-keyfield { min-width: 0; flex: 1; min-height: 48px; padding: 10px 12px; border: 2px solid var(--rule); border-radius: 10px; background: var(--page); font: inherit; }

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