:root {
  color-scheme: light;
  --ink: #17211b;
  --muted: #5a685f;
  --paper: #f7f6f1;
  --card: #ffffff;
  --line: #d8ded9;
  --accent: #1d6c49;
  --accent-dark: #155038;
  --danger: #a6342b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, #e3eee6, transparent 36rem), var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 42px; }
.checkout-shell { padding-top: 16px; }
.checkout-label { margin: 0 0 10px; color: var(--muted); font-size: .92rem; font-weight: 750; }
.hero { margin-bottom: 18px; }
.eyebrow { margin: 0 0 5px; color: var(--accent); font-size: .82rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
h1 { max-width: 680px; margin: 0; font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.05; letter-spacing: -.035em; }
.lead { max-width: 620px; margin: 7px 0 0; color: var(--muted); font-size: .98rem; line-height: 1.45; }

.panel {
  padding: clamp(20px, 4vw, 28px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--card) 94%, transparent);
  box-shadow: 0 24px 70px rgba(23, 33, 27, .09);
}

fieldset { margin: 0 0 20px; padding: 0; border: 0; }
legend, label[for="telegram-id"] { display: block; margin-bottom: 12px; font-size: 1.04rem; font-weight: 750; }
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.plan { position: relative; display: block; cursor: pointer; }
.plan input { position: absolute; opacity: 0; }
.plan-card { display: block; min-height: 106px; padding: 13px; border: 2px solid var(--line); border-radius: 17px; transition: border-color .18s, transform .18s, background .18s; }
.plan input:checked + .plan-card { border-color: var(--accent); background: #edf7f0; transform: translateY(-2px); }
.plan input:focus-visible + .plan-card { outline: 3px solid rgba(29, 108, 73, .25); outline-offset: 3px; }
.plan-title { display: block; font-size: 1.25rem; font-weight: 800; }
.plan-levels { display: block; margin: 3px 0 9px; color: var(--muted); }
.plan-price { display: block; font-size: 1.12rem; font-weight: 750; }

input[type="text"] { width: 100%; padding: 15px 16px; border: 2px solid var(--line); border-radius: 12px; font: inherit; }
input[type="text"]:focus { border-color: var(--accent); outline: 3px solid rgba(29, 108, 73, .14); }
.hint { margin: 8px 0 24px; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; color: var(--muted); line-height: 1.4; }
.consent input { margin-top: 4px; }
button { width: 100%; padding: 15px 20px; border: 0; border-radius: 12px; background: var(--accent); color: white; font: inherit; font-weight: 800; cursor: pointer; }
button:hover:not(:disabled) { background: var(--accent-dark); }
button:disabled { opacity: .48; cursor: not-allowed; }
.message { min-height: 1.5em; margin: 14px 0 0; color: var(--danger); }
.notes { padding: 20px 8px; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.notes p { margin: 8px 0; }
a { color: var(--accent-dark); font-weight: 700; }
.legal-shell { max-width: 620px; padding-top: 44px; }
.legal-heading { display: flex; align-items: center; gap: 16px; }
.legal-heading .eyebrow { margin-bottom: 6px; }
.legal-shell h1 { font-size: clamp(2rem, 5vw, 2.65rem); }
.legal-icon { display: grid; flex: 0 0 54px; width: 54px; height: 54px; place-items: center; border-radius: 17px; background: #dcefe3; color: var(--accent); box-shadow: inset 0 0 0 1px rgba(29, 108, 73, .1); }
.legal-icon svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.legal-card { margin-top: 24px; padding: 22px 26px 10px; border-color: #d2ddd5; }
.legal-card-title { margin: 0 0 7px; color: var(--muted); font-size: .84rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.legal-card dl { margin: 0; }
.legal-card dl > div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.legal-card dl > div:last-child { border-bottom: 0; }
.legal-card dt { color: var(--muted); font-size: .94rem; }
.legal-card dd { margin: 0; font-weight: 750; }
.legal-mono { letter-spacing: .035em; }
.legal-back { display: inline-flex; gap: 8px; align-items: center; margin-top: 19px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; transition: border-color .18s, background .18s, transform .18s; }
.legal-back:hover { border-color: #b7c9bc; background: #eef6f0; transform: translateX(-2px); }

@media (max-width: 560px) {
  .shell { padding: 20px 0 32px; }
  .legal-shell { padding-top: 28px; }
  .plans { grid-template-columns: 1fr; }
  .legal-card { padding-right: 20px; padding-left: 20px; }
  .legal-card dl > div { grid-template-columns: 1fr; gap: 4px; }
}
