/* Seren Klinik — Payment. Brand: night + gold (serenklinik.com), Cormorant Garamond / Jost */
:root {
  --night: #16140f;
  --night-2: #221f18;
  --ink: #1b1a17;
  --paper: #ffffff;
  --panel: #f6f4ef;
  --line: #e6e1d6;
  --muted: #69645a;
  --gold: #c9a95f;
  --gold-deep: #86652a;
  --ok: #2f6b4f;
  --bad: #9b2c2c;
  --warn: #8a5a00;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --wrap: 1120px;
  --r: 4px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }
body { margin: 0; font: 400 16px/1.6 var(--sans); color: var(--ink); background: var(--paper); }
img { max-width: 100%; height: auto; }
a { color: var(--gold-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--night); padding: 8px 14px; z-index: 99; }
.skip:focus { left: 8px; top: 8px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* ---------- Top bar */
.topbar { background: var(--night); color: #efe8d8; position: sticky; top: 0; z-index: 20; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; color: inherit; }
.brand { align-items: center; }
.brand__logo { height: 43px; width: auto; display: block; }
.brand__name { font-family: var(--serif); font-size: 1.65rem; font-weight: 600; color: var(--gold); letter-spacing: .02em; }
.brand__sub { font-size: .8rem; color: #b9b09c; border-left: 1px solid #4a4436; padding-left: 12px; }
.nav { display: flex; align-items: center; gap: 22px; font-size: .95rem; }
.nav a { color: #efe8d8; text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--gold); color: #fff; }
.nav__cart { display: inline-flex; align-items: center; gap: 8px; }
.badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--gold); color: var(--night); font-size: .75rem; font-weight: 600; display: inline-grid; place-items: center; }
.langs { display: inline-flex; gap: 2px; border: 1px solid #4a4436; border-radius: var(--r); padding: 2px; }
.langs a { padding: 2px 8px; font-size: .78rem; border: 0; border-radius: 2px; }
.langs a[aria-current="true"] { background: #3a3428; color: var(--gold); }
.testbar { background: #fff4d6; color: var(--warn); text-align: center; font-size: .85rem; padding: 6px 12px; border-bottom: 1px solid #f0dca4; }

/* ---------- Intro */
.intro { background: var(--night-2); color: #efe8d8; padding: 56px 0 48px; }
.intro__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: end; }
.intro h1 { color: #fff; margin-bottom: .35em; }
.intro .lead { color: #cdc4b0; max-width: 56ch; font-size: 1.05rem; margin: 0; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.2rem 1fr; align-items: baseline; font-size: .95rem; color: #e3dac6; }
.steps li::before { content: counter(s); font-family: var(--serif); font-size: 1.6rem; color: var(--gold); line-height: 1; }

/* ---------- Category nav */
.cat-nav { position: sticky; top: 68px; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line); }
.cat-nav__inner { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding-top: 10px; padding-bottom: 10px; }
.cat-nav a { flex: none; text-decoration: none; color: var(--ink); font-size: .9rem; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }
.cat-nav a:hover, .cat-nav a.is-active { border-color: var(--gold-deep); color: var(--gold-deep); }

/* ---------- Tariff (price list) */
.tariff { padding-top: 40px; padding-bottom: 56px; }
.tariff__group { margin-bottom: 48px; }
.tariff__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.tariff__head h2 { margin: 0; }
.tariff__note { margin: 0; color: var(--muted); font-size: .9rem; }
.tariff__list { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: 1fr 9rem auto; align-items: center; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.item__name { font-family: var(--sans); font-size: 1rem; font-weight: 500; margin: 0; }
.item__desc, .item__unit { margin: 2px 0 0; font-size: .85rem; color: var(--muted); }
.item__price { text-align: right; font-family: var(--serif); font-variant-numeric: lining-nums tabular-nums; line-height: 1.1; }
.item__price s { display: block; color: var(--muted); font-size: 1rem; }
.price { font-size: 1.75rem; font-weight: 600; }
.item__actions { display: flex; align-items: center; gap: 8px; }
.qty input { width: 4.2rem; }
.tariff__foot { color: var(--muted); font-size: .875rem; max-width: 70ch; }

/* ---------- Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 500 .92rem/1 var(--sans); padding: 12px 18px; border-radius: var(--r); border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s, color .15s; }
.btn--gold { background: var(--gold); color: var(--night); border-color: var(--gold); }
.btn--gold:hover { background: #b8964e; border-color: #b8964e; color: var(--night); }
.btn--line { background: transparent; color: var(--ink); border-color: #c9c2b3; }
.btn--line:hover { border-color: var(--ink); color: var(--ink); }
.btn--plain { background: transparent; color: var(--muted); }
.btn--plain:hover { color: var(--ink); }
.btn--block { width: 100%; }
.btn--lg { padding: 16px 22px; font-size: 1rem; }
.linkbtn { background: none; border: 0; padding: 4px 8px; font: inherit; font-size: 1.3rem; color: var(--muted); cursor: pointer; }
.linkbtn:hover { color: var(--bad); }
.panel__actions .linkbtn { font-size: .9rem; }

input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid #cfc8b8; border-radius: var(--r); padding: 10px 12px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(201,169,95,.25); }
input[disabled] { background: var(--panel); color: var(--muted); }
.item__actions input { padding: 9px 8px; text-align: center; }
.form h2 { font-size: 1.35rem; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: 6px; }
.field.has-error input, .field.has-error select { border-color: var(--bad); }
.err { color: var(--bad); font-size: .85rem; margin: 6px 0 0; }
.hint { color: var(--muted); font-size: .82rem; margin: 6px 0 0; }
.check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: .9rem !important; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--gold-deep); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid2--top { align-items: start; gap: 24px; }
.optional-account { border-top: 1px solid var(--line); padding-top: 14px; margin: 6px 0 18px; }
.optional-account .field { margin-top: 12px; }

/* ---------- Pages */
.page { padding-top: 40px; padding-bottom: 64px; }
.page--narrow { max-width: 760px; }
.page--auth { max-width: 520px; }
.page--doc { max-width: 820px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 28px; }
.page--auth .panel h1 { font-size: 2rem; }
.split { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.summary { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; position: sticky; top: 140px; }
.summary h2 { font-size: 1.3rem; }
.summary dl, dl.summary { margin: 0 0 18px; }
.summary dl div, dl.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-variant-numeric: tabular-nums; }
.summary__total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px !important; }
.summary__total dt { color: var(--ink); font-weight: 500; }
.summary__total dd { font-family: var(--serif); font-size: 1.8rem; font-weight: 600; line-height: 1; }
.summary .btn + .btn { margin-top: 8px; }
.summary--flat { position: static; background: none; border: 0; padding: 12px 0 0; }
.summary__lines { list-style: none; margin: 0 0 12px; padding: 0; font-size: .92rem; }
.summary__lines li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }

table.lines { width: 100%; border-collapse: collapse; }
.lines th { text-align: left; font-size: .8rem; font-weight: 500; color: var(--muted); padding: 0 8px 10px; border-bottom: 1px solid var(--line); }
.lines td { padding: 14px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.lines .num { text-align: right; font-variant-numeric: tabular-nums; }
.qty-input { width: 4.5rem; text-align: center; padding: 8px; }
.panel__actions { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }

.alert { padding: 12px 16px; border-radius: var(--r); margin: 16px 0; border: 1px solid; font-size: .95rem; }
.alert--success { background: #eef6f1; border-color: #bcd9c8; color: var(--ok); }
.alert--error { background: #fbefef; border-color: #ebc4c4; color: var(--bad); }
.alert--info { background: #f4f1e8; border-color: var(--line); color: var(--ink); }
.notice { background: var(--panel); border-left: 3px solid var(--gold); padding: 12px 16px; }
.empty { text-align: center; padding: 56px 20px; border: 1px dashed var(--line); border-radius: var(--r); }

.status { display: inline-block; font-size: .8rem; padding: 3px 10px; border-radius: 999px; border: 1px solid; }
.status--paid { color: var(--ok); border-color: #bcd9c8; background: #eef6f1; }
.status--pending { color: var(--warn); border-color: #ecd7a6; background: #fdf6e6; }
.status--failed, .status--cancelled { color: var(--bad); border-color: #ebc4c4; background: #fbefef; }
.status--refunded { color: var(--muted); border-color: var(--line); background: var(--panel); }

.result { padding: 8px 0 20px; }
.result--paid h1 { color: var(--ok); }
.result--failed h1 { color: var(--bad); }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px 24px; margin: 0 0 22px; }
.meta dt { font-size: .78rem; color: var(--muted); }
.meta dd { margin: 2px 0 0; font-weight: 500; }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.amount-display { font-family: var(--serif); font-size: 3rem; font-weight: 600; margin: 0 0 24px; }

.account-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tabs a { text-decoration: none; color: var(--muted); padding: 10px 0; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--gold); }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin: 18px 0 0; font-size: .9rem; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 20px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

.doc { font-size: 1rem; line-height: 1.75; }
.doc h2 { font-size: 1.4rem; margin-top: 1.6em; }
.doc h3 { font-size: 1.15rem; margin-top: 1.3em; }
.doc ul { padding-left: 1.2em; }
.pager { display: flex; gap: 6px; margin-top: 20px; }
.pager a { padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); }
.pager a.is-current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Bank redirect */
body.redirect { min-height: 100vh; display: grid; place-items: center; background: var(--night); color: #efe8d8; padding: 20px; }
.redirect__box { text-align: center; max-width: 420px; }
.redirect__title { font-family: var(--serif); font-size: 1.8rem; color: #fff; }

/* ---------- Footer */
.footer { background: var(--night); color: #b9b09c; font-size: .9rem; margin-top: 40px; }
.footer a { color: #e3dac6; text-decoration: none; }
.footer a:hover { color: var(--gold); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-top: 44px; padding-bottom: 28px; }
.footer__grid p { margin: 0 0 6px; }
.footer__brand { margin-bottom: 14px !important; }
.footer__brand img { height: 39px; width: auto; display: block; }
.redirect__logo { height: 40px; width: auto; margin-bottom: 18px; }
.footer__head { color: #efe8d8; font-weight: 500; margin-bottom: 10px !important; }
.footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer__base { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid #2f2a20; padding-top: 18px; padding-bottom: 24px; flex-wrap: wrap; }
.footer__base p { margin: 0; }
.cards { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-mark { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; background: #fff; border-radius: 3px; font-weight: 700; font-size: .78rem; color: #1a1f71; letter-spacing: .02em; }
.card-mark--visa { font-style: italic; font-size: .95rem; letter-spacing: .04em; }
.card-mark--mc { color: #222; gap: 0; font-weight: 600; }
.card-mark--mc i { width: 14px; height: 14px; border-radius: 50%; background: #eb001b; display: inline-block; }
.card-mark--mc i + i { background: #f79e1b; margin-left: -6px; margin-right: 6px; mix-blend-mode: multiply; }
.card-mark--troy { color: #0c8a8d; font-size: .95rem; text-transform: lowercase; }
.secure-note { color: #b9b09c; font-size: .82rem; }

/* ---------- Responsive */
@media (max-width: 900px) {
  .intro__grid, .split, .footer__grid { grid-template-columns: 1fr; }
  .summary { position: static; }
  .brand__sub { display: none; }
}
@media (max-width: 720px) { .brand__logo { height: 34px; } }
@media (max-width: 720px) {
  .topbar__inner { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; gap: 8px; }
  .nav { gap: 14px; font-size: .9rem; width: 100%; justify-content: space-between; }
  .cat-nav { top: 0; position: relative; }
  .topbar { position: relative; }
  .item { grid-template-columns: 1fr auto; gap: 10px 16px; }
  .item__actions { grid-column: 1 / -1; }
  .item__actions .btn { flex: 1; padding: 11px 10px; }
  .grid2 { grid-template-columns: 1fr; }
  .panel { padding: 20px; }
  .lines thead { display: none; }
  .lines tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .lines td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 6px 0; }
  .lines td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .82rem; }
  .lines .num { text-align: right; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .topbar, .footer, .actions-row, .testbar, .cat-nav, .skip { display: none !important; }
  .panel { border: 0; padding: 0; }
}