/* The buy page (/buy): stone background, white cards, violet accent, the
   same look as the public website and the round 2 app. Self-contained: the
   page loads only this file and the fonts, not the app's style.css. */
:root {
  --bg: #f3f2ee;
  --panel: #ffffff;
  --text: #15151a;
  --muted: #6b6b76;
  --line: #e6e4de;
  --line-2: #efede8;
  --accent: #5847f0;
  --accent-ink: #3b2dc4;
  --accent-soft: #eceafe;
  --ok: #15803d;
  --bad-bg: #fee2e2; --bad-text: #7f1d1d;
  --warn-bg: #fff7e0; --warn-text: #6b4e00; --warn-line: #f0d48a;
  --shadow-1: 0 1px 2px rgba(20, 20, 30, .05), 0 0 0 1px rgba(20, 20, 30, .05);
  --shadow-2: 0 14px 34px -14px rgba(20, 20, 30, .22), 0 0 0 1px rgba(20, 20, 30, .06);
  --sel-shadow: 0 10px 26px -12px rgba(88, 71, 240, .55);
  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0d11; --panel: #16161c; --text: #eeeef3; --muted: #a0a0ab; --line: #2a2a33; --line-2: #22222a;
    --accent: #8f83ff; --accent-ink: #c4bdff; --accent-soft: #25223f; --ok: #4ade80;
    --bad-bg: #3b1515; --bad-text: #fecaca; --warn-bg: #2a2410; --warn-text: #ffe28a; --warn-line: #5c4a14;
    --shadow-1: 0 0 0 1px rgba(255, 255, 255, .07); --shadow-2: 0 14px 34px -14px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .08);
    --sel-shadow: 0 10px 26px -12px rgba(106, 92, 245, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0d11; --panel: #16161c; --text: #eeeef3; --muted: #a0a0ab; --line: #2a2a33; --line-2: #22222a;
  --accent: #8f83ff; --accent-ink: #c4bdff; --accent-soft: #25223f; --ok: #4ade80;
  --bad-bg: #3b1515; --bad-text: #fecaca; --warn-bg: #2a2410; --warn-text: #ffe28a; --warn-line: #5c4a14;
  --shadow-1: 0 0 0 1px rgba(255, 255, 255, .07); --shadow-2: 0 14px 34px -14px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .08);
  --sel-shadow: 0 10px 26px -12px rgba(106, 92, 245, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body.buy { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
.buy a { color: var(--accent); text-underline-offset: 2px; }
.buy a:hover { color: var(--accent-ink); }
.hidden { display: none !important; }
.buy-wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* top bar */
.buy-top { background: var(--bg); border-bottom: 1px solid var(--line); }
.buy-top .buy-wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.buy-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text) !important; text-decoration: none; }
.buy-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 17px; }
.buy-secure { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; margin-left: auto; }
.buy-secure svg { width: 16px; height: 16px; fill: var(--ok); }
.buy-link { font-weight: 600; font-size: 14px; text-decoration: none; padding: 7px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); color: var(--text) !important; }
.buy-link:hover { box-shadow: var(--shadow-1); }

/* heading */
.buy-head { padding: 36px 0 20px; animation: buy-rise .4s ease both; }
.buy-head h1 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -.02em; line-height: 1.1; margin: 0 0 6px; }
.buy-sub { margin: 0; color: var(--muted); font-size: 16px; }

.buy-notice { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 14.5px; background: var(--accent-soft); color: var(--accent-ink); }
.buy-notice.warn { background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-line); }

/* layout */
.buy-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; padding-bottom: 56px; }
.buy-steps { display: grid; gap: 16px; min-width: 0; }
.buy-summary { position: sticky; top: 20px; }
@media (max-width: 900px) {
  .buy-grid { grid-template-columns: minmax(0, 1fr); }
  .buy-summary { position: static; }
}

.buy-card { background: var(--panel); border-radius: 18px; padding: 22px; box-shadow: var(--shadow-1); animation: buy-rise .45s ease both; }
.buy-steps .buy-card:nth-child(2) { animation-delay: .05s; }
.buy-steps .buy-card:nth-child(3) { animation-delay: .1s; }
.buy-step-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.buy-step-head h2 { margin: 2px 0 2px; font-size: 18px; letter-spacing: -.01em; }
.buy-step-head p { margin: 0; color: var(--muted); font-size: 14px; }
.buy-num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 14px; }

/* plan picker */
.buy-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 560px) { .buy-plans { grid-template-columns: minmax(0, 1fr); } }
.buy-skel { height: 168px; border-radius: 14px; background: linear-gradient(90deg, var(--line-2), var(--bg), var(--line-2)); background-size: 200% 100%; animation: buy-shimmer 1.2s linear infinite; }
.buy-plan { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--panel); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.buy-plan:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-1px); }
.buy-plan input { position: absolute; opacity: 0; pointer-events: none; }
.buy-plan:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--sel-shadow); background: color-mix(in srgb, var(--accent-soft) 45%, var(--panel)); }
.buy-plan:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.buy-plan-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.buy-plan-name { font-weight: 700; font-size: 16px; }
.buy-radio { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; transition: all .15s; }
.buy-plan:has(input:checked) .buy-radio { border-color: var(--accent); background: var(--accent); }
.buy-plan:has(input:checked) .buy-radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.buy-plan-desc { color: var(--muted); font-size: 13px; min-height: 2.6em; }
.buy-plan-price { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; }
.buy-plan-price span { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.buy-plan ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 3px; font-size: 13px; color: var(--muted); }
.buy-plan li { display: flex; gap: 7px; align-items: baseline; }
.buy-plan li::before { content: ""; flex: none; width: 10px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg) translateY(-2px); }
.buy-tag { position: absolute; top: -10px; right: 14px; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--accent); color: #fff; }
.buy-tag.soft { background: var(--accent-soft); color: var(--accent-ink); box-shadow: 0 0 0 1px var(--panel); }

/* fields */
.buy-field { display: grid; gap: 6px; margin-bottom: 14px; }
.buy-field > span { font-weight: 600; font-size: 13.5px; }
.buy-field input { width: 100%; font: inherit; color: var(--text); background: var(--panel); border: 1.5px solid var(--line); border-radius: 11px; padding: 11px 13px; transition: border-color .15s, box-shadow .15s; }
.buy-field input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.buy-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.buy-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .buy-row { grid-template-columns: 1fr; } }

.buy-toggle { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg); cursor: pointer; }
.buy-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.buy-toggle b { display: block; font-size: 14px; }
.buy-toggle small { color: var(--muted); font-size: 13px; }
.buy-switch { flex: none; width: 38px; height: 22px; border-radius: 99px; background: var(--line); position: relative; transition: background .15s; }
.buy-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.buy-toggle input:checked + .buy-switch { background: var(--accent); }
.buy-toggle input:checked + .buy-switch::after { transform: translateX(16px); }
.buy-toggle input:focus-visible + .buy-switch { outline: 2px solid var(--accent); outline-offset: 2px; }

/* order summary */
.buy-order { padding: 22px; box-shadow: var(--shadow-2); animation-delay: .08s; }
.buy-order-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.buy-empty { margin: 0 0 16px; color: var(--muted); }
.buy-line { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.buy-line .n { font-weight: 700; font-size: 17px; }
.buy-line .p { font-weight: 600; white-space: nowrap; }
.buy-for { color: var(--muted); font-size: 13.5px; margin: 2px 0 12px; overflow-wrap: anywhere; }
.buy-incl { list-style: none; margin: 0 0 14px; padding: 12px 0 0; border-top: 1px dashed var(--line); display: grid; gap: 4px; font-size: 13.5px; color: var(--muted); }
.buy-incl li { display: flex; justify-content: space-between; gap: 10px; }
.buy-incl li b { color: var(--text); font-weight: 600; }
.buy-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); margin-bottom: 4px; }
.buy-total span { font-weight: 600; }
.buy-total b { font-size: 28px; letter-spacing: -.02em; }
.buy-then { color: var(--muted); font-size: 13px; margin: -4px 0 14px; text-align: right; }
.buy-change { font-size: 13px; }
.buy-btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 18px; border-radius: 12px; border: 0; background: var(--accent); color: #fff; font: 600 16px var(--font); cursor: pointer; transition: background .15s, transform .1s, box-shadow .15s; box-shadow: var(--sel-shadow); }
.buy-btn:hover:not(:disabled) { background: var(--accent-ink); }
:root[data-theme="dark"] .buy-btn:hover:not(:disabled) { background: #7466f7; }
.buy-btn:active:not(:disabled) { transform: translateY(1px); }
.buy-btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.buy-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.buy-fine { margin: 12px 0 0; color: var(--muted); font-size: 12.5px; }
.buy-error { color: var(--bad-text); background: var(--bad-bg); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }
.buy-error:empty { display: none; }

@keyframes buy-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes buy-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.buy .muted { color: var(--muted); font-weight: 500; font-size: 13px; }

/* Promo code: a quiet link that opens a field, then a green line with the saving. */
.buy-promo { margin: 0 0 14px; }
.buy-promo-toggle { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; font-weight: 600; color: var(--accent-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.buy-promo-row { display: flex; gap: 8px; margin-top: 8px; }
.buy-promo-row input { flex: 1; min-width: 0; font: inherit; text-transform: uppercase; letter-spacing: .04em; color: var(--text); background: var(--panel); border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.buy-promo-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.buy-promo-btn { font: inherit; font-weight: 600; border-radius: 10px; padding: 9px 14px; border: 1.5px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.buy-promo-btn:hover { border-color: var(--accent); }
.buy-promo-msg { font-size: 13.5px; margin-top: 6px; }
.buy-promo-msg:empty { display: none; }
.buy-promo-msg.bad { color: var(--bad-text); }
.buy-promo-applied { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); font-size: 13.5px; }
.buy-promo-applied button { background: none; border: 0; font: inherit; font-size: 13px; color: inherit; text-decoration: underline; cursor: pointer; }
.buy-line.discount { color: var(--ok); font-size: 14.5px; margin: 6px 0 2px; }
.buy-line.discount .n { font-size: 14.5px; font-weight: 600; }
.buy-was { color: var(--muted); text-decoration: line-through; font-size: 15px; font-weight: 500; margin-right: 6px; }
