:root {
  --ink: #12211d;
  --muted: #5f6d67;
  --cream: #f4f0e7;
  --paper: #fbfaf6;
  --green: #0a5849;
  --green-dark: #063f35;
  --lime: #d8e671;
  --gold: #d3a34a;
  --line: rgba(18, 33, 29, 0.13);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  height: 78px; padding: 0 max(24px, calc((100vw - 1180px) / 2));
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(251, 250, 246, .92); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 12px; letter-spacing: .08em; }
.brand-mark { width: 39px; height: 39px; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--green); font: 700 22px Georgia, serif; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 13px; }
.brand small { color: var(--muted); font-size: 9px; margin-top: 3px; letter-spacing: .2em; }
nav { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.nav-login { border: 1px solid var(--green); border-radius: 999px; padding: 9px 20px; background: transparent; color: var(--green); cursor: pointer; }

.hero { min-height: 700px; display: grid; grid-template-columns: 1.08fr .92fr; background: var(--cream); overflow: hidden; }
.hero-copy { padding: 112px max(24px, calc((100vw - 1180px) / 2)); padding-right: 6vw; align-self: center; }
.eyebrow { margin: 0 0 18px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .19em; }
h1 { max-width: 650px; margin: 0; font: 500 clamp(46px, 4.8vw, 70px)/1.05 Georgia, "Songti SC", serif; letter-spacing: -.04em; }
h1 em { display: inline-block; color: var(--green); font-weight: inherit; }
.intro { max-width: 600px; margin: 28px 0; color: var(--muted); font-size: 17px; line-height: 1.75; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 0 23px; border: 1px solid transparent; border-radius: 4px; font-weight: 700; cursor: pointer; transition: .2s ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { color: white; background: var(--green); }
.button.secondary { color: var(--green); border-color: var(--green); background: transparent; }
.button.full { width: 100%; }
.trust-row { display: flex; gap: 30px; margin: 38px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); list-style: none; color: var(--muted); font-size: 12px; }
.trust-row li::before { content: "✓"; margin-right: 7px; color: var(--green); font-weight: 900; }

.product-stage { position: relative; min-height: 650px; display: grid; place-items: center; color: white; background: radial-gradient(circle at 50% 35%, #23735f, #084d42 55%, #05362e); overflow: hidden; }
.halo { position: absolute; width: 560px; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: 0 0 0 80px rgba(255,255,255,.035), 0 0 0 160px rgba(255,255,255,.025); }
.bottle { position: relative; z-index: 2; width: 230px; height: 390px; border-radius: 35px 35px 48px 48px; background: linear-gradient(100deg, #6f3c1f, #2f180e 48%, #5b2f19); box-shadow: 0 34px 55px rgba(0,0,0,.4); }
.cap { position: absolute; width: 188px; height: 74px; left: 21px; top: -47px; border-radius: 14px 14px 8px 8px; background: repeating-linear-gradient(90deg, #252724 0 5px, #111 5px 8px); }
.label { position: absolute; inset: 76px 0 58px; padding: 28px; display: flex; flex-direction: column; align-items: center; background: #f3efe4; color: var(--ink); text-align: center; }
.label span { font-size: 10px; letter-spacing: .18em; }
.label strong { margin-top: 25px; color: var(--green); font: 500 64px Georgia, serif; }
.label b { font-size: 20px; }
.label small { margin-top: auto; letter-spacing: .13em; }
.stage-note { position: absolute; z-index: 3; left: 9%; bottom: 7%; padding: 16px 20px; border-left: 2px solid var(--lime); background: rgba(3,38,32,.7); backdrop-filter: blur(9px); }
.stage-note b, .stage-note span { display: block; }
.stage-note span { margin-top: 5px; opacity: .75; font-size: 12px; }

.section { max-width: 1180px; margin: 0 auto; padding: 108px 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 48px; }
h2 { margin: 0; font: 500 clamp(34px, 4vw, 50px)/1.15 Georgia, "Songti SC", serif; }
.section-heading > p { max-width: 430px; margin: 0; color: var(--muted); line-height: 1.75; }
.plans { display: grid; grid-template-columns: minmax(0, 520px); justify-content: center; gap: 18px; }
.plan-card { position: relative; padding: 34px; border: 1px solid var(--line); background: white; transition: .2s ease; }
.plan-card.selected, .plan-card:hover { border-color: var(--green); box-shadow: 0 18px 50px rgba(7,61,51,.1); }
.plan-card.featured { color: white; background: var(--green-dark); }
.badge { position: absolute; right: 22px; top: 22px; padding: 5px 11px; border-radius: 999px; color: var(--green-dark); background: var(--lime); font-size: 11px; font-weight: 800; }
.plan-note { color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.plan-card h3 { margin: 13px 0 22px; font-size: 20px; }
.plan-price { display: flex; align-items: start; gap: 4px; }
.plan-price strong { font: 500 58px/1 Georgia, serif; }
.plan-card p { min-height: 62px; color: var(--muted); line-height: 1.65; }
.plan-card.featured p { color: rgba(255,255,255,.65); }
.plan-card.featured .secondary { color: white; border-color: white; }

.split { max-width: none; padding-left: max(24px, calc((100vw - 1180px) / 2)); padding-right: max(24px, calc((100vw - 1180px) / 2)); display: grid; grid-template-columns: 1.45fr .55fr; gap: 70px; color: white; background: var(--green-dark); }
.reward-panel > p:not(.eyebrow) { max-width: 650px; color: rgba(255,255,255,.65); line-height: 1.7; }
.split .eyebrow { color: var(--lime); }
.reward-list { margin-top: 38px; border-top: 1px solid rgba(255,255,255,.18); }
.reward-list div { display: grid; grid-template-columns: 1fr 80px 80px; gap: 15px; padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,.13); }
.reward-list small { color: var(--lime); text-align: right; }
.notice-card { align-self: center; padding: 35px; color: var(--ink); background: var(--lime); }
.notice-icon { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--ink); border-radius: 50%; font-family: Georgia, serif; }
.notice-card h3 { margin: 24px 0 15px; font: 500 28px Georgia, serif; }
.notice-card p { font-size: 13px; line-height: 1.75; }

.order-preview { display: grid; grid-template-columns: 1fr 420px; gap: 90px; }
.steps { margin: 38px 0 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 22px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.steps b { color: var(--gold); font: 500 26px Georgia, serif; }
.steps strong, .steps small { display: block; }
.steps small { margin-top: 4px; color: var(--muted); }
.summary-card { padding: 38px; color: white; background: var(--green); }
.summary-card > span { color: var(--lime); font-size: 11px; letter-spacing: .16em; }
.summary-card h3 { margin: 12px 0 24px; font-size: 24px; }
.summary-price { display: flex; align-items: end; justify-content: space-between; padding-bottom: 25px; border-bottom: 1px solid rgba(255,255,255,.18); }
.summary-price b { font: 500 52px Georgia, serif; }
.summary-price small { opacity: .68; }
.summary-card dl { margin: 18px 0 28px; }
.summary-card dl div { display: flex; justify-content: space-between; padding: 8px 0; }
.summary-card dt { opacity: .65; }
.summary-card .primary { color: var(--green); background: var(--lime); }

footer { min-height: 170px; padding: 45px max(24px, calc((100vw - 1180px) / 2)); display: grid; grid-template-columns: auto 1fr; gap: 8px 35px; color: white; background: #10211c; }
footer span { color: rgba(255,255,255,.6); }
footer small { grid-column: 1 / -1; align-self: end; color: rgba(255,255,255,.45); }
.prototype-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 20px; font-size: 12px; color: var(--lime); }

dialog { width: min(92vw, 480px); padding: 0; border: 0; border-radius: 8px; box-shadow: 0 30px 90px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(4,25,21,.72); backdrop-filter: blur(6px); }
.login-card { position: relative; padding: 42px; }
.login-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.dialog-close { position: absolute; right: 20px; top: 16px; border: 0; background: none; font-size: 28px; cursor: pointer; }
.login-card label { display: grid; gap: 7px; margin: 18px 0; font-size: 13px; font-weight: 700; }
.login-card input:not([type="checkbox"]), .login-card select { width: 100%; height: 48px; padding: 0 13px; border: 1px solid var(--line); border-radius: 4px; outline: none; background: white; }
.login-card input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(10,88,73,.1); }
.login-card .checkbox { display: flex; align-items: start; font-weight: 400; }
.text-button { width: 100%; margin: 17px 0; border: 0; color: var(--green); background: transparent; cursor: pointer; }
.prototype-note { display: block; color: var(--muted); text-align: center; }
.inline-link { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
.toast { position: fixed; z-index: 40; left: 50%; bottom: 28px; max-width: 90vw; padding: 13px 20px; border-radius: 5px; color: white; background: var(--ink); opacity: 0; transform: translate(-50%, 20px); pointer-events: none; transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #8d302b; }
.form-error { margin: 4px 0 12px; padding: 10px 12px; border-radius: 5px; color: #7a201c; background: #fde8e6; font-weight: 700; }
.payment-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0; }
#payment-qr-panel { text-align: center; }
#payment-qr-image { display: block; width: min(280px, 100%); aspect-ratio: 1; margin: 18px auto; object-fit: contain; border: 1px solid var(--line); }
#payment-qr-panel p { color: var(--muted); font-size: 13px; line-height: 1.6; }
#payment-status { display: block; margin: 14px 0 22px; color: var(--green); }
.reward-plan-form { display: grid; gap: 18px; }
.reward-plan-form select { width: 100%; padding: 13px; border: 1px solid var(--line); border-radius: 5px; background: white; }
.allocation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.pool-summary { padding: 14px 16px; border-radius: 5px; background: #edf3e8; color: var(--green-dark); font-weight: 700; }
.pool-summary.pool-over { background: #fde8e6; color: #8d302b; }

.portal-body { min-height: 100vh; display: grid; grid-template-columns: 245px 1fr; background: #f1f3ef; }
.portal-side { position: sticky; top: 0; height: 100vh; padding: 30px 25px; display: flex; flex-direction: column; color: white; background: var(--green-dark); }
.brand.inverse { color: white; }
.brand-mark.light { color: var(--green); background: var(--lime); }
.side-nav { display: grid; gap: 6px; margin-top: 70px; }
.side-nav a { display: flex; justify-content: space-between; padding: 12px 13px; border-radius: 4px; color: rgba(255,255,255,.6); }
.side-nav a.active, .side-nav a:hover { color: white; background: rgba(255,255,255,.1); }
.side-nav b { min-width: 21px; padding: 2px 6px; border-radius: 999px; color: var(--green-dark); background: var(--lime); font-size: 10px; text-align: center; }
.side-exit { margin-top: auto; padding: 0; border: 0; color: rgba(255,255,255,.5); background: transparent; font-size: 12px; text-align: left; cursor: pointer; }
.portal-main { width: 100%; max-width: 1500px; padding: 44px 50px 70px; overflow: hidden; }
.portal-header { display: flex; justify-content: space-between; align-items: end; margin-bottom: 38px; }
.portal-header h1 { font-size: 44px; }
.status-pill, .table-status { display: inline-flex; padding: 6px 10px; border-radius: 999px; color: var(--green); background: #dcebe6; font-size: 11px; font-weight: 800; }
.status-pill.amber, .table-status.amber { color: #80530a; background: #f4e5bd; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.metric-grid article { padding: 25px; border: 1px solid var(--line); background: white; }
.metric-grid span, .metric-grid small { display: block; color: var(--muted); }
.metric-grid strong { display: block; margin: 14px 0 8px; font: 500 34px Georgia, serif; }
.metric-grid small { font-size: 11px; }
.portal-card { margin-top: 20px; padding: 30px; border: 1px solid var(--line); background: white; }
.card-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 28px; }
.card-heading h2, .compact-card h2 { font-size: 30px; }
.section-subtitle { margin-top: 34px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 15px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.table-status { color: #53615b; background: #edf0ed; }
.table-status.green { color: var(--green); background: #dcebe6; }
.ledger-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.ledger-grid div { padding: 22px; background: white; }
.ledger-grid span, .ledger-grid b, .ledger-grid small { display: block; }
.ledger-grid b { margin: 10px 0 5px; color: var(--green); font-size: 20px; }
.ledger-grid small, .ledger-grid span { color: var(--muted); }
.legal-strip { margin-top: 20px; padding: 15px 20px; color: #77561a; background: #f4e5bd; font-size: 12px; }
.row-button { padding: 7px 14px; border: 1px solid var(--green); border-radius: 4px; color: var(--green); background: white; cursor: pointer; }
.role-select { min-width: 140px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 4px; background: white; }
.cell-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.access-card { max-width: 620px; margin: 80px auto; padding: 50px; }
.access-card p:not(.eyebrow) { color: var(--muted); line-height: 1.7; }
.compact-card { display: grid; grid-template-columns: 1fr 390px; gap: 50px; align-items: center; }
.compact-card p { color: var(--muted); line-height: 1.7; }
.rule-tile { padding: 22px; border-left: 3px solid var(--lime); background: var(--green-dark); color: white; }
.rule-tile span, .rule-tile strong, .rule-tile small { display: block; }
.rule-tile strong { margin: 8px 0 16px; }
.rule-tile small { color: rgba(255,255,255,.6); line-height: 1.6; }

@media (max-width: 900px) {
  nav a { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding-top: 70px; padding-bottom: 85px; }
  .product-stage { min-height: 570px; }
  .plans { grid-template-columns: 1fr; }
  .plan-card p { min-height: 0; }
  .split, .order-preview { grid-template-columns: 1fr; }
  .order-preview { gap: 45px; }
  .portal-body { grid-template-columns: 1fr; }
  .portal-side { position: static; width: 100%; height: auto; padding: 20px 24px; }
  .side-nav { margin-top: 20px; display: flex; overflow-x: auto; }
  .side-nav a { white-space: nowrap; }
  .side-exit { display: none; }
  .portal-main { padding: 35px 24px 60px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .compact-card { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .allocation-grid { grid-template-columns: 1fr; }
  .topbar { height: 68px; }
  .hero-copy { padding-top: 55px; }
  h1 { font-size: 40px; }
  .trust-row { gap: 12px; flex-wrap: wrap; }
  .section { padding-top: 75px; padding-bottom: 75px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 20px; }
  .split { gap: 42px; }
  .reward-list div { grid-template-columns: 1fr 52px 58px; font-size: 13px; }
  .summary-card { padding: 28px; }
  footer { grid-template-columns: 1fr; }
  footer small { grid-column: auto; margin-top: 25px; }
  .login-card { padding: 36px 25px; }
  .portal-header { align-items: start; }
  .portal-header h1 { font-size: 34px; }
  .metric-grid { grid-template-columns: 1fr; }
  .ledger-grid { grid-template-columns: 1fr; }
  .card-heading { align-items: start; }
}
