/* ==========================================================================
   云封装 · design tokens
   ========================================================================== */
:root {
  --paper: #f6f4ef;
  --paper-2: #efece3;
  --card: #fffdf9;
  --ink: #14120f;
  --ink-2: #3b352d;
  --muted: #6f675c;
  --muted-2: #948b7d;
  --line: #e2dbcf;
  --line-strong: #cfc6b5;
  --accent: #e2451b;
  --accent-dark: #b8340f;
  --accent-soft: rgba(226, 69, 27, 0.1);
  --ok: #1f7a4d;
  --warn: #9a6400;
  --err: #c02b1a;
  --radius: 22px;
  --radius-sm: 12px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --shadow-card: 0 1px 2px rgba(20, 18, 15, 0.04), 0 24px 48px -32px rgba(20, 18, 15, 0.28);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(20, 18, 15, 0.55) 0.5px, transparent 0.5px);
  background-size: 26px 26px;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--paper-2);
  padding: 1px 5px;
  border-radius: 5px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

/* ==========================================================================
   masthead
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 244, 239, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(207, 198, 181, 0.55);
}

.nav-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  height: 66px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
}

.brand-text {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.24em;
  color: var(--muted-2);
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 26px;
  margin-left: 8px;
  flex: 1;
}

.nav-links a {
  text-decoration: none;
  font-size: 13.5px;
  color: var(--ink-2);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.nav-links a:hover { border-color: var(--ink); }

.nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.credit-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 0.18s ease;
}

.credit-chip:hover { border-color: var(--ink); }
.credit-chip b { font-family: var(--mono); font-size: 13px; }
.credit-chip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.12);
}

/* ==========================================================================
   buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  padding: 0 18px;
  height: 42px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.btn-sm { height: 34px; padding: 0 13px; font-size: 12.5px; border-radius: 9px; }
.btn-lg { height: 54px; font-size: 15.5px; border-radius: 14px; width: 100%; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 22px -12px rgba(226, 69, 27, 0.75);
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #000; }
.btn-ghost {
  background: var(--card);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); }

/* ==========================================================================
   hero
   ========================================================================== */
.hero {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 78px 0 96px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(440px, 0.98fr);
  gap: 72px;
  align-items: start;
}

.hero-copy { padding-top: 14px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin: 0 0 26px;
}

.tick { width: 22px; height: 1px; background: var(--accent); display: inline-block; }

.hero h1 {
  font-size: clamp(46px, 6.1vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 26px;
}

.hero h1 .serif {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.lede {
  font-size: 16px;
  color: var(--ink-2);
  max-width: 46ch;
  margin: 0 0 38px;
  line-height: 1.75;
}

.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  max-width: 440px;
}

.facts li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  align-items: baseline;
}

.facts b {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 600;
}

.facts span { color: var(--muted); }

.stage { min-width: 0; }

.stage-note {
  margin: 14px 2px 0;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 11.5px;
  color: var(--muted-2);
}

.stage-note .mono-label { color: var(--muted-2); }

.mono-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* ==========================================================================
   build card
   ========================================================================== */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.build-card { padding: 22px; scroll-margin-top: 90px; }

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--muted);
}

.status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.12);
}

.status.busy .dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: pulse 1.6s infinite; }
.status.bad .dot { background: var(--err); box-shadow: 0 0 0 3px rgba(192, 43, 26, 0.12); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.build-form { display: flex; flex-direction: column; gap: 18px; }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-label { font-size: 12px; font-weight: 600; color: var(--ink-2); letter-spacing: 0.01em; }
.field-hint { font-size: 11.5px; color: var(--muted-2); }
.field-hint.bad { color: var(--err); }
.field-hint.good { color: var(--ok); }

.input-wrap { position: relative; }

input[type="text"], select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 0 14px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--ink);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input[type="text"]::placeholder { color: #b3aa9b; }
input[type="text"]:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }

.input-spinner {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.swatches { display: flex; gap: 9px; align-items: center; height: 46px; }

.swatch {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease;
}

.swatch:hover { transform: scale(1.12); }
.swatch[aria-checked="true"]::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
}

.site-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.site-preview img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.site-preview-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.site-preview-text strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-preview-text span { font-size: 11.5px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(31, 122, 77, 0.1);
  color: var(--ok);
  flex: none;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  background: var(--paper-2);
  padding: 3px;
  border-radius: 11px;
}

.segmented button {
  border: 0;
  background: transparent;
  border-radius: 8px;
  height: 34px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.segmented button.active {
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
}

.advanced {
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}

.advanced summary {
  cursor: pointer;
  font-size: 12.5px;
  color: var(--muted);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::before { content: "+"; font-family: var(--mono); color: var(--accent); }
.advanced[open] summary::before { content: "−"; }

.advanced-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  padding-top: 14px;
  align-items: center;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
}

.check input { accent-color: var(--accent); width: 15px; height: 15px; }
.field.compact { grid-column: span 2; }
.field.compact select { height: 38px; font-size: 13px; }

.submit-row { display: flex; flex-direction: column; gap: 9px; }

#submitBtn { justify-content: space-between; padding: 0 20px; }
#submitBtn .cost {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.16);
  padding: 4px 9px;
  border-radius: 6px;
}

.fineprint { font-size: 11.5px; color: var(--muted-2); margin: 0; line-height: 1.55; }

/* ==========================================================================
   progress
   ========================================================================== */
.build-progress { display: flex; flex-direction: column; gap: 18px; }

.progress-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.progress-head h3 { margin: 4px 0 0; font-size: 19px; letter-spacing: -0.02em; }

.progress-pct { display: flex; align-items: baseline; gap: 1px; font-family: var(--mono); }
.progress-pct b { font-size: 34px; font-weight: 600; letter-spacing: -0.04em; }
.progress-pct span { font-size: 12px; color: var(--muted-2); }

.bar {
  height: 4px;
  border-radius: 999px;
  background: var(--paper-2);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }

.steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted-2);
  padding: 6px 0;
}

.steps li .light {
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  flex: none;
  transition: all 0.2s ease;
}

.steps li.done { color: var(--ink-2); }
.steps li.done .light { background: var(--ok); border-color: var(--ok); }
.steps li.active { color: var(--ink); font-weight: 600; }
.steps li.active .light { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.steps li .step-meta { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--muted-2); }

.console {
  background: #17150f;
  color: #c9c1b2;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.75;
  height: 132px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  scrollbar-width: thin;
  scrollbar-color: #3a3529 transparent;
}

.console .err { color: #ff8a70; }

.progress-actions { display: flex; gap: 10px; }
.progress-actions .btn { flex: 1; }

/* ==========================================================================
   result
   ========================================================================== */
.build-result { display: flex; flex-direction: column; gap: 18px; }

.result-head { display: flex; align-items: center; gap: 13px; }
.result-head img { width: 56px; height: 56px; border-radius: 14px; flex: none; box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.5); }
.result-title { min-width: 0; flex: 1; }
.result-title h3 { margin: 0; font-size: 18px; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-title a { display: block; font-size: 12px; color: var(--muted); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-title a:hover { color: var(--accent); }

.pill {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 6px;
  flex: none;
}
.pill.ok { background: rgba(31, 122, 77, 0.1); color: var(--ok); }
.pill.bad { background: rgba(192, 43, 26, 0.1); color: var(--err); }

.artifacts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.artifacts.single { grid-template-columns: 1fr; }

.artifact {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.artifact-head { display: flex; align-items: center; justify-content: space-between; }
.artifact-head .mono-label { font-size: 9.5px; }
.artifact-head .os { font-size: 10.5px; color: var(--muted-2); }

.artifact-body { display: flex; align-items: center; gap: 10px; }
.artifact-meta { font-size: 11px; color: var(--muted); line-height: 1.5; min-width: 0; }
.artifact-meta b { display: block; color: var(--ink); font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.qr {
  width: 74px; height: 74px;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-left: auto;
  flex: none;
  background: #fff;
}

.artifact-actions { display: flex; gap: 6px; }
.artifact-actions .btn { flex: 1; height: 36px; font-size: 12.5px; padding: 0 8px; }

.result-actions { display: flex; gap: 10px; }
.result-actions .btn { flex: 1; }

/* ==========================================================================
   sections
   ========================================================================== */
section.how, section.pricing, section.history, section.faq {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 84px 0;
  border-top: 1px solid var(--line);
}

.section-head { margin-bottom: 40px; }
.section-head.row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
  margin: 12px 0 0;
  line-height: 1.15;
}
.section-sub { margin: 12px 0 0; color: var(--muted); font-size: 14px; max-width: 52ch; }
.muted-note { font-size: 11.5px; color: var(--muted-2); }

.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }

.how-grid article { border-top: 2px solid var(--ink); padding-top: 18px; }
.how-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.how-grid h3 { font-size: 19px; margin: 14px 0 8px; letter-spacing: -0.02em; }
.how-grid p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.75; }

/* plans */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.plan {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.plan:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.plan.highlight { border-color: var(--ink); box-shadow: 0 20px 40px -30px rgba(20, 18, 15, 0.6); }
.plan .plan-badge {
  position: absolute;
  top: -9px;
  left: 20px;
  background: var(--ink);
  color: var(--paper);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  font-family: var(--mono);
  padding: 3px 8px;
  border-radius: 5px;
}

.plan h3 { margin: 4px 0 0; font-size: 16px; }
.plan .price { display: flex; align-items: baseline; gap: 3px; margin: 8px 0 2px; }
.plan .price b { font-size: 36px; letter-spacing: -0.04em; font-weight: 700; }
.plan .price span { font-size: 13px; color: var(--muted); }
.plan .plan-tag { font-size: 12.5px; color: var(--muted); min-height: 20px; }
.plan .plan-credits {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  margin-top: 10px;
}
.plan .btn { margin-top: 14px; width: 100%; }

.redeem {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
}
.redeem input { width: 190px; height: 34px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }

/* history */
.history-list { border-top: 1px solid var(--line); }

.history-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 13px 6px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}

.history-row:hover { background: rgba(255, 253, 249, 0.7); }
.history-row img { width: 40px; height: 40px; border-radius: 10px; background: var(--paper-2); }
.history-name { min-width: 0; }
.history-name strong { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-name span { display: block; font-size: 11.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-time { font-family: var(--mono); font-size: 10.5px; color: var(--muted-2); }
.history-row .btn { height: 32px; font-size: 12px; }

.status-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--muted);
  white-space: nowrap;
}
.status-tag.ok { background: rgba(31, 122, 77, 0.1); color: var(--ok); }
.status-tag.bad { background: rgba(192, 43, 26, 0.1); color: var(--err); }
.status-tag.busy { background: var(--accent-soft); color: var(--accent-dark); }

.empty {
  padding: 40px 0;
  text-align: center;
  color: var(--muted-2);
}
.empty p { margin: 0 0 4px; font-size: 14px; color: var(--muted); }
.empty span { font-size: 12.5px; }

/* faq */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }

.faq-grid details {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.faq-grid details:last-child { border-bottom: 1px solid var(--line); }

.faq-grid summary {
  list-style: none;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  letter-spacing: -0.01em;
}

.faq-grid summary::-webkit-details-marker { display: none; }
.faq-grid summary::after {
  content: "+";
  font-family: var(--mono);
  color: var(--muted-2);
  font-weight: 400;
  flex: none;
}
.faq-grid details[open] summary::after { content: "−"; }
.faq-grid details p { margin: 10px 0 2px; font-size: 13px; color: var(--muted); line-height: 1.8; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 44px 0 56px; margin-top: 20px; }
.footer-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: flex-start;
}
.footer strong { font-size: 13px; letter-spacing: 0.02em; }
.footer p { margin: 8px 0 0; font-size: 12px; color: var(--muted-2); max-width: 42ch; }
.footer-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 11px; color: var(--muted-2); font-family: var(--mono); }

/* ==========================================================================
   modal + toast
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[aria-hidden="false"] { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 15, 0.45);
  backdrop-filter: blur(3px);
}

.modal-card {
  position: relative;
  width: min(420px, 100%);
  background: var(--card);
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: rise 0.22s ease;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 0;
  background: var(--paper-2);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}

.modal-card h3 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }

.pay-plan {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--paper);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
}
.pay-plan b { font-weight: 600; }
.pay-plan span { color: var(--muted); font-size: 12px; }

.pay-amount { display: flex; align-items: baseline; justify-content: space-between; padding: 2px 2px 0; }
.pay-amount span { font-size: 12px; color: var(--muted); }
.pay-amount b { font-size: 34px; letter-spacing: -0.04em; }

.pay-provider {
  font-size: 11.5px;
  color: var(--muted);
  background: var(--paper);
  border-radius: 9px;
  padding: 9px 12px;
  line-height: 1.6;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  background: var(--ink);
  color: var(--paper);
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
  max-width: calc(100% - 40px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

[hidden] { display: none !important; }

/* ==========================================================================
   responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; gap: 44px; padding-top: 54px; }
  .hero-copy { padding-top: 0; }
  .lede { max-width: 60ch; }
  .facts { max-width: 100%; }
  .stage { max-width: 620px; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .how-grid, .plans { grid-template-columns: 1fr; gap: 18px; }
  .how-grid article { padding-top: 14px; }
  .faq-grid { grid-template-columns: 1fr; gap: 0; }
  .faq-grid details:nth-child(2) { border-top: 1px solid var(--line); }
  .section-head.row { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 620px) {
  .nav-inner, .hero, section.how, section.pricing, section.history, section.faq, .footer-inner {
    width: calc(100% - 32px);
  }
  .nav-inner { height: 60px; gap: 12px; }
  .brand-text em { display: none; }
  .credit-chip { padding: 0 10px; }
  .hero { padding: 38px 0 60px; }
  .hero h1 { font-size: clamp(40px, 12vw, 56px); }
  .lede { font-size: 14.5px; }
  .build-card { padding: 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .advanced-body { grid-template-columns: 1fr; }
  .field.compact { grid-column: span 1; }
  .artifacts { grid-template-columns: 1fr; }
  .qr { width: 64px; height: 64px; }
  .history-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .history-time { display: none; }
  .footer-inner { flex-direction: column; }
  .footer-meta { align-items: flex-start; }
  .redeem { flex-wrap: wrap; }
  .section-head h2 { font-size: 26px; }
  section.how, section.pricing, section.history, section.faq { padding: 56px 0; }
  .modal-card { padding: 22px; }
}

/* payment mode banner + manual order */
.pay-mode-note { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill.test { background: #fbf3df; color: #7a5200; border: 1px solid #ecdcb8; }
.pill.live { background: rgba(31, 122, 77, 0.1); color: var(--ok); }
.pay-order {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  padding: 10px 12px;
  word-break: break-all;
  color: var(--ink-2);
}
