:root {
  --ink: #171a18;
  --muted: #6f736e;
  --paper: #f6f3ec;
  --card: #fffdf8;
  --line: #d9d5ca;
  --green: #1f5b45;
  --green-dark: #143d2f;
  --lime: #dceac7;
  --blue: #126ce5;
  --shadow: 0 20px 55px rgba(29, 33, 28, .09);
}

* { box-sizing: border-box; }

html { color-scheme: light; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Noto Sans SC", system-ui, sans-serif;
  line-height: 1.55;
}

button, input { font: inherit; }
a { color: inherit; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 760;
  letter-spacing: .18em;
}

.site-header nav { display: flex; gap: 24px; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.site-header nav a:hover { color: var(--ink); }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.hero { padding: 94px 0 80px; max-width: 880px; }
.eyebrow, .order-kicker { color: var(--green); font-size: .73rem; font-weight: 750; letter-spacing: .16em; }
.hero h1 { margin: 12px 0 22px; max-width: 760px; font-size: clamp(2.8rem, 7vw, 5.8rem); line-height: .98; letter-spacing: -.055em; }
.lede { max-width: 650px; color: var(--muted); font-size: 1.08rem; }

.membership-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 25px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, .65);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .88rem;
}

.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #a9aca7; }
.membership-card.is-pro .status-dot { background: #25a36f; box-shadow: 0 0 0 5px rgba(37, 163, 111, .12); }

.plans-section, .checkout-section, .history-section { padding: 68px 0; border-top: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: 70px 1fr; margin-bottom: 34px; }
.section-number { margin: 4px 0 0; color: var(--green); font-size: .74rem; font-weight: 750; letter-spacing: .12em; }
.section-heading h2 { margin: 0 0 5px; font-size: clamp(1.55rem, 3vw, 2.35rem); letter-spacing: -.035em; }
.section-heading p { margin: 0; color: var(--muted); }

.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.plan-card {
  min-height: 245px;
  padding: 24px;
  text-align: left;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.plan-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.plan-card.is-selected { color: #fff; background: var(--green); border-color: var(--green); box-shadow: var(--shadow); }
.plan-badge { display: inline-block; min-height: 24px; padding: 4px 9px; color: var(--green-dark); background: var(--lime); border-radius: 999px; font-size: .7rem; font-weight: 700; }
.plan-name { display: block; margin-top: 30px; font-size: 1.05rem; font-weight: 700; }
.plan-price { display: block; margin-top: 7px; font-size: 2.5rem; font-weight: 770; letter-spacing: -.05em; }
.plan-price small { font-size: .8rem; font-weight: 500; letter-spacing: 0; opacity: .7; }
.plan-detail { display: block; margin-top: 20px; font-size: .8rem; opacity: .7; }

.checkout-card { width: min(760px, 100%); margin: 0 auto; padding: clamp(20px, 4vw, 38px); background: var(--card); border: 1px solid var(--line); border-radius: 20px; }
.checkout-method { display: flex; align-items: center; gap: 14px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.checkout-method-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; color: #fff; background: #1677ff; border-radius: 10px; font-weight: 750; }
.checkout-method strong, .checkout-method small { display: block; }
.checkout-method small { margin-top: 3px; color: var(--muted); font-size: .78rem; }
.order-panel { padding-top: 28px; }

.order-kicker { margin: 0 0 18px; }
.order-line, .order-total { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.order-line span, .order-total span { color: var(--muted); font-size: .87rem; }
.order-line strong { font-size: .93rem; }
.order-total { padding: 20px 0; border-bottom: 0; }
.order-total strong { font-size: 2rem; letter-spacing: -.04em; }
.primary-button { width: 100%; padding: 14px 18px; border: 1px solid var(--green); border-radius: 10px; cursor: pointer; font-weight: 700; }
.primary-button { color: #fff; background: var(--green); }
.primary-button:hover { background: var(--green-dark); }
.primary-button:disabled { cursor: not-allowed; opacity: .55; }

.checkout-status { min-height: 22px; margin: 16px 0 0; color: var(--green); font-size: .84rem; }
.checkout-status.is-error { color: #a63c2e; }
.security-note { margin: 18px 0 0; padding-top: 17px; color: var(--muted); border-top: 1px solid var(--line); font-size: .75rem; }

.history-section { padding-bottom: 92px; }
.order-history { display: grid; gap: 9px; }
.history-row { display: grid; grid-template-columns: 1.1fr 1fr .7fr .7fr; gap: 18px; align-items: center; padding: 16px 18px; background: rgba(255,255,255,.62); border: 1px solid var(--line); border-radius: 11px; font-size: .84rem; }
.history-id { overflow-wrap: anywhere; font-family: ui-monospace, monospace; }
.history-status { justify-self: end; padding: 4px 9px; background: #ece9e1; border-radius: 999px; font-size: .72rem; }
.history-status.paid { color: #fff; background: var(--green); }
.empty-state { color: var(--muted); }
.support-section { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-bottom: 70px; padding: 28px 32px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.support-section h2 { margin: 0 0 6px; font-size: 1.1rem; }
.support-section p { margin: 0; color: var(--muted); font-size: .88rem; }
.support-section a { flex: none; color: var(--green); font-weight: 700; text-underline-offset: 4px; }

footer { padding: 25px 20px 45px; color: var(--muted); border-top: 1px solid var(--line); text-align: center; font-size: .75rem; }

@media (max-width: 850px) {
  .plans { grid-template-columns: repeat(2, 1fr); }
  .support-section { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 540px) {
  .site-header, main { width: min(100% - 26px, 1180px); }
  .site-header { height: 65px; }
  .site-header nav { gap: 14px; }
  .hero { padding: 64px 0 58px; }
  .plans-section, .checkout-section, .history-section { padding: 50px 0; }
  .section-heading { grid-template-columns: 42px 1fr; }
  .plans { grid-template-columns: 1fr; }
  .plan-card { min-height: 190px; }
  .history-row { grid-template-columns: 1fr auto; }
  .history-row > :nth-child(2), .history-row > :nth-child(3) { display: none; }
  .checkout-card { padding: 18px; }
  .support-section { padding: 22px; }
}
