[hidden] { display: none !important; }  /* the hidden attribute always wins over component display rules */
:root {
  --ink: #141414;
  --ink-2: #2b2b2b;
  --muted: #5f6266;
  --line: #e3e3de;
  --line-strong: #cfcfc8;
  --page: #f7f5f2;              /* store background */
  --band: #e6e2df;              /* store top bar / footer */
  --band-2: #c6beb5;            /* store navigation band */
  --card: #ffffff;
  --green: #2f6b45;
  --green-soft: #edf5ef;
  --red: #a33a2c;
  --red-soft: #fbeeec;
  --amber: #7a5200;
  --amber-soft: #fff6df;
  --amber-bg: var(--amber-soft);
  --soft: #f7f7f4;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(20, 20, 20, .04), 0 8px 24px rgba(20, 20, 20, .06);
  --font: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--ink); }
button { font-family: var(--font); }

/* ---------- top bar ---------- */
.site-header { position: relative; }
.topbar { background: var(--band); }
.topbar-in { max-width: 1100px; margin: 0 auto; padding: 10px 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.tb-right { justify-self: end; }
.brand-logo { display: block; line-height: 0; }
.brand-logo img { height: 48px; width: auto; }
.navband { background: var(--band-2); }
.navband-in { max-width: 1100px; margin: 0 auto; padding: 10px 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; color: #1f1f1f; }
.nb-title { letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
.nb-phone { display: inline-flex; align-items: center; gap: 8px; color: #1f1f1f; text-decoration: none; font-weight: 600; }
.nb-phone svg { width: 16px; height: 16px; }
@media (max-width: 520px) { .secure-txt { display: none; } .brand-logo img { height: 40px; } .nb-title { font-size: 11px; } }
.site-footer { background: var(--band); margin-top: 24px; }
.site-footer-in { max-width: 1100px; margin: 0 auto; padding: 18px 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 12px; color: #444; }
.merchant { font-weight: 700; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; }
.secure { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--green); white-space: nowrap; }
.secure svg { width: 15px; height: 15px; }
.env-badge { display: inline-block; margin-left: 10px; font-size: 10px; font-weight: 700; background: var(--amber-soft); color: var(--amber); padding: 3px 8px; letter-spacing: .08em; border-radius: 4px; vertical-align: middle; }

/* ---------- layout ---------- */
.shell { flex: 1; width: 100%; max-width: 880px; margin: 0 auto; padding: 32px 24px 56px; }
@media (max-width: 640px) { .shell { padding: 20px 16px 40px; } .topbar-in { padding: 14px 16px; } }

/* ---------- summary ---------- */
.summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 28px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 36px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.rec-num { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.rec-cust { margin-top: 6px; font-size: 15px; color: var(--muted); }
.due { text-align: right; }
.due-amt { font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .summary { padding: 20px; } .due { text-align: left; } }

h1 { font-family: var(--font-display); font-size: 34px; font-weight: 500; text-transform: uppercase; letter-spacing: .02em; line-height: 1.1; margin: 0 0 8px; }
.lead { color: var(--muted); font-size: 16px; margin: 0 0 22px; line-height: 1.55; }

/* ---------- payment options ---------- */
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch; }
@media (max-width: 760px) { .options { grid-template-columns: 1fr; } }
.option { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px 24px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.option.recommended { border: 2px solid var(--ink); padding: 27px 25px 23px; }
.badge { position: absolute; top: -12px; left: 22px; background: var(--green); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .1em; padding: 5px 10px; border-radius: 999px; }
.opt-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.opt-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--page); display: grid; place-items: center; flex: none; }
.opt-icon svg { width: 22px; height: 22px; }
.option h2 { font-size: 18px; font-weight: 700; margin: 0; }
.opt-desc { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0 0 20px; flex: 1; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 18px; }
.price .now { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price .was { color: var(--muted); text-decoration: line-through; font-size: 15px; }
.save { display: inline-block; background: var(--green-soft); color: var(--green); font-weight: 700; font-size: 12px; padding: 4px 9px; border-radius: 999px; }

/* ---------- buttons ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; padding: 14px 18px; font: 700 15px var(--font); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; border: 2px solid var(--ink); border-radius: 0; transition: background .15s, color .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--ink); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-sm { min-height: 48px; font-size: 14px; }
.btn:focus-visible { outline: 3px solid #8fb39b; outline-offset: 2px; }

/* ---------- notes ---------- */
.trust { display: flex; gap: 12px; align-items: flex-start; margin-top: 28px; padding: 16px 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.6; }
.trust svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--green); }
.reminder { color: var(--muted); font-size: 13px; line-height: 1.6; margin-top: 14px; }
.notice { padding: 14px 18px; margin-bottom: 22px; line-height: 1.55; border-radius: 10px; background: var(--amber-soft); border: 1px solid #f0dfae; font-size: 14px; }
.notice.ok { background: var(--green-soft); border-color: #cfe3d5; }
.notice.err { background: var(--red-soft); border-color: #efcdc7; color: #5c1f17; }
.center { text-align: center; padding: 40px 0; }
.spinner { width: 32px; height: 32px; border: 3px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 0 16px 28px; }

/* ---------- result ---------- */
.result { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 44px 28px 36px; text-align: center; max-width: 560px; margin: 8px auto 0; }
.big-check { width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; margin: 0 auto 18px; }
.big-check svg { width: 30px; height: 30px; }
.result h1 { margin-bottom: 10px; }
.result .lead { margin-bottom: 0; }
.kv { margin: 26px auto 0; text-align: left; border-top: 1px solid var(--line); }
.kv div { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); gap: 12px; font-size: 14px; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-weight: 700; word-break: break-all; text-align: right; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(15, 15, 15, .55); display: none; align-items: flex-start; justify-content: center; padding: 24px 12px; overflow-y: auto; z-index: 50; }
.modal.open { display: flex; }
.modal-card { background: #fff; width: 100%; max-width: 560px; position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.modal-card.wide { max-width: 760px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 700; }
.modal-close { background: none; border: 0; font-size: 26px; cursor: pointer; line-height: 1; color: var(--ink); padding: 0 4px; }
.modal-body { padding: 22px; }
#anetFrame { width: 100%; height: 760px; border: 0; display: block; }
.consent { font-size: 13px; line-height: 1.6; color: var(--muted); background: var(--page); border-radius: 8px; padding: 14px 16px; margin: 14px 0; max-height: 220px; overflow-y: auto; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 600; margin-bottom: 18px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 0; flex: none; accent-color: var(--ink); }

/* ---------- shared with admin ---------- */
.wrap { width: 100%; max-width: 760px; margin: 0 auto; background: #fff; min-height: 100vh; padding: 40px 56px 64px; }
.brand { font-weight: 700; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.env-badge:empty { display: none; }
