:root {
  color-scheme: light dark;
  --bg: #fbf6ec; --surface: #ffffff; --ink: #1d2433; --muted: #5d6576; --line: #e8dfcd;
  --sun: #f2a516; --sun-deep: #c97a00; --accent-ink: #1d2433; --error: #b42318; --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1420; --surface: #171e2d; --ink: #eef0f5; --muted: #a4abbb; --line: #273047;
          --sun: #f7b437; --sun-deep: #ffc95c; --accent-ink: #0f1420; --error: #ff8a80; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 17px; line-height: 1.55;
       font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: inherit; text-decoration-color: var(--sun); text-underline-offset: 3px; }
.top { max-width: 760px; margin: 0 auto; padding: 22px 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 750; font-size: 20px; }
.brand svg { color: var(--sun); }
.wrap { max-width: 760px; margin: 0 auto; padding: 8px 16px 40px; }
h1 { font-size: clamp(30px, 6vw, 42px); line-height: 1.1; margin: 10px 0 12px; letter-spacing: -.02em; }
.lead { color: var(--muted); margin: 0 0 24px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
           padding: 20px 18px; margin: 0 0 18px; min-width: 0; }
legend { font-weight: 700; padding: 0 6px; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input:not([type]), input[type=email] {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; }
input:focus { outline: 2px solid var(--sun); outline-offset: 1px; }
.help { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.error { color: var(--error); font-size: 15px; margin: 6px 0 0; font-weight: 600; }
.error.box { border: 1px solid var(--error); border-radius: 10px; padding: 10px 14px; margin-bottom: 18px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.plans { display: grid; gap: 10px; margin: 6px 0 4px; }
.plan { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 12px; align-items: center; margin: 0;
        border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; font-weight: 500; }
.plan:has(input:checked) { border-color: var(--sun); box-shadow: 0 0 0 1px var(--sun); }
.plan input { grid-row: span 2; accent-color: var(--sun-deep); width: 18px; height: 18px; }
.plan-name { font-weight: 700; }
.plan-price { font-weight: 700; text-align: right; }
.plan-price small { font-weight: 400; color: var(--muted); }
.plan-year { grid-column: 2 / 4; color: var(--muted); font-size: 14px; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 10px; font-weight: 400; align-items: start; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--sun-deep); }
.check small { color: var(--muted); }
.btn { display: inline-block; background: var(--sun); color: var(--accent-ink); border: 0; border-radius: 999px;
       padding: 14px 26px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.banner { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 14px; font-size: 15px; }
.banner.test { border-color: var(--sun); }
.banner a { float: right; text-decoration: none; font-weight: 700; }
.card { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 22px 20px; }
.card .big { font-size: 20px; font-weight: 650; margin: 0 0 10px; }
.state-active { border-color: var(--sun); }
.foot { max-width: 760px; margin: 0 auto; padding: 0 16px 40px; color: var(--muted); font-size: 13px; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } .plan { grid-template-columns: auto 1fr; }
  .plan-price { grid-column: 2; text-align: left; } .plan-year { grid-column: 2; } }
.steps { list-style: none; padding: 0; margin: 14px 0 12px; display: grid; gap: 8px; }
.steps li { position: relative; padding-left: 30px; color: var(--muted); }
.steps li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--line); }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--sun); border-color: var(--sun); }
.steps li.done::after { content: ""; position: absolute; left: 7px; top: 8px; width: 5px; height: 8px;
  border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.steps li.now { color: var(--ink); font-weight: 650; }
.steps li.now::before { border-color: var(--sun); border-top-color: transparent; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .steps li.now::before { animation: none; } }
.preview { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.preview-label { margin-top: 22px; }
.progress { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 16px 0 8px; }
.progress .bar { display: block; height: 100%; background: var(--sun); border-radius: 999px; transition: width .6s ease; }
.bar.w0 { width: 0%; }
.bar.w5 { width: 5%; }
.bar.w10 { width: 10%; }
.bar.w15 { width: 15%; }
.bar.w20 { width: 20%; }
.bar.w25 { width: 25%; }
.bar.w30 { width: 30%; }
.bar.w35 { width: 35%; }
.bar.w40 { width: 40%; }
.bar.w45 { width: 45%; }
.bar.w50 { width: 50%; }
.bar.w55 { width: 55%; }
.bar.w60 { width: 60%; }
.bar.w65 { width: 65%; }
.bar.w70 { width: 70%; }
.bar.w75 { width: 75%; }
.bar.w80 { width: 80%; }
.bar.w85 { width: 85%; }
.bar.w90 { width: 90%; }
.bar.w95 { width: 95%; }
.bar.w100 { width: 100%; }
.progress-meta { margin: 0 0 6px; font-size: 15px; color: var(--muted); }
.progress-meta b { color: var(--ink); }
.terminal { background: #0b0f17; color: #d6dde8; border-radius: 12px; padding: 14px 16px; margin: 14px 0 6px;
  font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-x: auto; white-space: pre; }
.terminal .ts { color: #f7b437; }
.terminal .cursor { animation: blink 1s steps(1) infinite; color: #f7b437; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .terminal .cursor { animation: none; } }
.modes { display: grid; gap: 10px; border: 0; padding: 0; margin: 0 0 18px; }
/* Trial or pay: without JavaScript (CSP), the chosen mode hides the other one's parts. */
.trial-only { display: none; }
form.mode-trial .trial-only,
form:has(input[name="mode"][value="trial"]:checked) .trial-only { display: revert; }
form:has(input[name="mode"][value="trial"]:checked) .pay-only { display: none; }
.plan .plan-price.trial-only { color: var(--sun-deep); }
.card > pre.terminal { white-space: pre-wrap; word-break: break-word; }
