:root {
  --ink: #111111;
  --paper: #f5f0e6;
  --white: #fffdf6;
  --yellow: #ffd84a;
  --blue: #4c78ff;
  --red: #ff5b4d;
  --mint: #70dfb1;
  --muted: #69655f;
  --line: 3px solid var(--ink);
  --shadow: 7px 7px 0 var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(17,17,17,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17,17,17,.035) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
.wrap { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.hidden { display: none !important; }

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 72px;
  padding: 10px max(20px, calc((100vw - 1160px) / 2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: rgba(245,240,230,.94);
  border-bottom: var(--line);
  backdrop-filter: blur(10px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 19px; font-weight: 950; }
.brand-potato { display: grid; place-items: center; width: 42px; height: 42px; background: var(--yellow); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); transform: rotate(-4deg); }
.topbar nav { display: flex; align-items: center; gap: 5px; }
.topbar nav a { padding: 9px 13px; font-size: 14px; font-weight: 850; text-decoration: none; border: 2px solid transparent; }
.topbar nav a:hover { background: var(--white); border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
#userAuthSlot { flex: 0 0 auto; display: flex; justify-content: flex-end; }

.hero { min-height: 650px; display: grid; grid-template-columns: 1.25fr .75fr; gap: 50px; align-items: center; padding-top: 70px; padding-bottom: 70px; }
.hero-single { grid-template-columns: 1fr; min-height: 590px; }
.eyebrow { margin: 0 0 14px; font: 850 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; }
.hero h1 { max-width: 800px; margin: 0; font-size: clamp(50px, 5.8vw, 74px); line-height: .98; letter-spacing: -.065em; font-weight: 1000; }
.hero h1 span { position: relative; display: inline; background: linear-gradient(transparent 61%, var(--yellow) 61%); }
.lede { max-width: 680px; margin: 30px 0 0; font-size: clamp(19px, 2vw, 26px); line-height: 1.5; font-weight: 760; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 34px; }
.button {
  appearance: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 11px 20px;
  border: var(--line);
  background: var(--white);
  box-shadow: 5px 5px 0 var(--ink);
  color: var(--ink);
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.button:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink); }
.button:active { transform: translate(5px, 5px); box-shadow: none; }
.button.primary { background: var(--yellow); }
.button.ghost { background: var(--blue); color: #fff; }
.button.small { min-height: 38px; padding: 7px 12px; box-shadow: 3px 3px 0 var(--ink); }
.button.wide { width: 100%; margin-top: 4px; }

.truth-card { position: relative; padding: 46px 30px 28px; background: var(--white); border: var(--line); box-shadow: 12px 12px 0 var(--ink); transform: rotate(2deg); }
.truth-card::after { content: "100%"; position: absolute; right: -23px; bottom: -30px; display: grid; place-items: center; width: 96px; height: 96px; border: var(--line); border-radius: 50%; background: var(--red); color: white; font-size: 25px; font-weight: 1000; transform: rotate(-13deg); }
.truth-tape { position: absolute; top: -19px; left: 50%; padding: 8px 32px; transform: translateX(-50%) rotate(-3deg); background: var(--yellow); border: 2px solid var(--ink); font: 950 13px/1 ui-monospace, monospace; letter-spacing: .1em; white-space: nowrap; }
.truth-label { margin: 0 0 9px; color: var(--muted); font: 800 12px/1.2 ui-monospace, monospace; letter-spacing: .08em; }
.truth-card strong { display: block; font: 950 clamp(21px, 2vw, 31px)/1.15 ui-monospace, monospace; overflow-wrap: anywhere; }
.truth-card > p:last-child { margin: 20px 0 0; max-width: 95%; font-size: 14px; line-height: 1.7; font-weight: 650; }
.route-line { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 24px 0 0; padding: 13px; background: #ece8df; border: 2px solid var(--ink); font-size: 12px; font-weight: 900; text-align: center; }
.route-line b { font-size: 24px; }

.ticker { overflow: hidden; border-block: var(--line); background: var(--ink); color: var(--yellow); }
.ticker div { width: max-content; padding: 13px 0; font: 900 13px/1 ui-monospace, monospace; letter-spacing: .08em; animation: ticker 24s linear infinite; }
@keyframes ticker { to { transform: translateX(-50%); } }

.project-notice {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
  margin-top: 46px;
  padding: 26px 30px;
  overflow: hidden;
  border: var(--line);
  background: var(--red);
  box-shadow: 9px 9px 0 var(--ink);
  transform: rotate(-.35deg);
}
.project-notice::after {
  content: "NO NEED TO PAY";
  position: absolute;
  right: -10px;
  bottom: -9px;
  color: rgba(255,255,255,.16);
  font: 1000 clamp(30px,5vw,66px)/1 ui-monospace, monospace;
  letter-spacing: -.06em;
  white-space: nowrap;
  pointer-events: none;
}
.project-notice-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: var(--line);
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 5px 5px 0 var(--ink);
  font: 1000 47px/1 ui-monospace, monospace;
  transform: rotate(5deg);
}
.project-notice > div { position: relative; z-index: 1; }
.project-notice .eyebrow { margin-bottom: 7px; }
.project-notice h2 { margin: 0 0 7px; font-size: clamp(27px,4vw,43px); line-height: 1; letter-spacing: -.04em; }
.project-notice p:last-child { max-width: 900px; margin: 0; font-size: clamp(15px,1.8vw,19px); line-height: 1.65; font-weight: 850; }

.section { padding-top: 100px; padding-bottom: 100px; scroll-margin-top: 70px; }
.section-heading { max-width: 760px; margin-bottom: 36px; }
.section-heading h2 { margin: 0 0 13px; font-size: clamp(38px, 5vw, 64px); line-height: 1; letter-spacing: -.045em; font-weight: 1000; }
.section-heading > p:last-child, .model-heading > div > p:last-child { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.7; font-weight: 620; }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.price-card { position: relative; min-height: 220px; padding: 26px; border: var(--line); box-shadow: var(--shadow); }
.price-card.yellow { background: var(--yellow); transform: rotate(-1deg); }
.price-card.blue { background: var(--blue); color: white; transform: rotate(1deg); }
.price-card.red { background: var(--red); transform: rotate(-.5deg); }
.price-icon { display: inline-flex; padding: 6px 10px; background: var(--ink); color: white; font: 950 12px/1 ui-monospace, monospace; }
.price-card h3 { margin: 25px 0 21px; font-size: 20px; }
.price-pair { display: flex; justify-content: space-between; gap: 20px; }
.price-pair span { font-size: 13px; font-weight: 800; }
.price-pair b { display: block; margin-top: 4px; font-size: 25px; }
.peak-note { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 28px 0 0; padding: 14px 17px; border: 2px dashed var(--ink); background: rgba(255,255,255,.55); font-size: 13px; font-weight: 700; }
#periodBadge { flex: 0 0 auto; padding: 6px 10px; border: 2px solid var(--ink); background: var(--mint); font-weight: 950; }

.models-section { background: var(--yellow); border-block: var(--line); }
.model-heading { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 40px; }
.model-heading > div { max-width: 750px; }
.search-box { width: min(320px, 100%); font: 850 12px/1.3 ui-monospace, monospace; }
.search-box span { display: block; margin-bottom: 8px; }
input { width: 100%; min-height: 46px; padding: 10px 13px; border: 2px solid var(--ink); border-radius: 0; outline: none; background: var(--white); }
input:focus { box-shadow: 4px 4px 0 var(--blue); }
.family-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.family-tabs button { padding: 8px 13px; border: 2px solid var(--ink); background: var(--white); font-size: 13px; font-weight: 900; cursor: pointer; }
.family-tabs button.active { background: var(--ink); color: white; }
.model-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.model-card { min-height: 175px; padding: 18px; display: flex; flex-direction: column; background: var(--white); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.model-card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.model-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.family-pill, .status-pill { display: inline-flex; padding: 4px 7px; border: 1.5px solid var(--ink); font: 900 10px/1 ui-monospace, monospace; text-transform: uppercase; }
.family-pill { background: var(--mint); }
.status-pill { background: #e6e1d9; }
.model-card h3 { margin: 18px 0 20px; font: 900 16px/1.3 ui-monospace, monospace; overflow-wrap: anywhere; }
.model-card footer { margin-top: auto; border: 0; padding: 0; display: flex; justify-content: space-between; gap: 10px; align-items: end; background: none; }
.model-card footer span { color: var(--muted); font-size: 11px; line-height: 1.35; font-weight: 750; }
.model-card footer a { flex: 0 0 auto; font-size: 11px; font-weight: 900; }
.empty { margin: 25px 0 0; padding: 30px; border: var(--line); background: var(--white); font-size: 18px; font-weight: 900; text-align: center; }

.account-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
.panel { position: relative; padding: 30px; background: var(--white); border: var(--line); box-shadow: var(--shadow); }
.panel-number { position: absolute; top: 20px; right: 22px; color: rgba(17,17,17,.18); font: 1000 42px/1 ui-monospace, monospace; }
.panel h3 { margin: 0 0 25px; font-size: 29px; }
.auth-panel label, .create-key-row label { display: block; margin-bottom: 16px; font-size: 12px; font-weight: 900; }
.auth-panel label > input, .auth-panel label > .code-row { margin-top: 7px; }
.code-row { display: grid; grid-template-columns: 1fr auto; }
.code-row input { border-right: 0; }
.code-row button { padding: 0 18px; border: 2px solid var(--ink); background: var(--yellow); font-weight: 950; cursor: pointer; }
.code-row button:disabled { opacity: .55; cursor: wait; }
.portal-panel { min-height: 210px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 35px; background: var(--yellow); }
.portal-panel h3 { margin-bottom: 10px; }
.portal-panel p:not(.eyebrow) { max-width: 650px; margin: 0; color: #4f4b43; line-height: 1.65; font-weight: 650; }
.key-console { padding: 0; overflow: hidden; }
.console-top { padding: 22px 26px; display: flex; justify-content: space-between; align-items: center; background: var(--ink); color: white; }
.console-top > div { display: flex; align-items: center; gap: 10px; }
.console-top small { color: #c9c5bd; }
.status-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(112,223,177,.22); }
.text-button { appearance: none; border: 0; background: none; color: var(--yellow); font-weight: 900; text-decoration: underline; cursor: pointer; }
.wallet-grid { display: grid; grid-template-columns: 1.25fr .75fr .75fr; gap: 0; border-bottom: var(--line); }
.wallet-balance, .wallet-stat { min-height: 132px; padding: 24px 26px; border-right: var(--line); }
.wallet-balance { background: var(--yellow); }
.wallet-balance span, .wallet-stat span { display: block; margin-bottom: 8px; font: 900 11px/1.2 ui-monospace, monospace; letter-spacing: .08em; }
.wallet-balance strong { display: block; font-size: clamp(28px, 4vw, 44px); line-height: 1; letter-spacing: -.04em; }
.wallet-balance small { display: block; margin-top: 12px; color: var(--muted); font-weight: 700; }
.wallet-stat { display: flex; flex-direction: column; justify-content: center; background: #edf3ff; }
.wallet-stat:nth-child(3) { border-right: 0; background: #ffe0dc; }
.wallet-stat b { font-size: 21px; overflow-wrap: anywhere; }
.redeem-form { grid-column: 1 / -1; padding: 20px 26px; display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; border-top: var(--line); background: #edf9da; }
.redeem-form label { margin: 0; font-size: 12px; font-weight: 900; }
.redeem-form label span { display: block; margin-bottom: 7px; }
.create-key-row { padding: 26px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 14px; border-bottom: var(--line); }
.create-key-row label { margin: 0; }
.create-key-row label span { display: block; margin-bottom: 7px; }
.secret-reveal { margin: 22px 26px 0; padding: 18px; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; background: var(--yellow); border: 2px solid var(--ink); }
.secret-reveal > div { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 15px; font-size: 12px; }
.secret-reveal code { min-width: 0; overflow-x: auto; padding: 10px; background: var(--ink); color: var(--yellow); font-size: 12px; white-space: nowrap; }
.key-list { padding: 22px 26px 28px; }
.key-item { display: grid; grid-template-columns: minmax(160px, 1.2fr) 1fr 1.2fr auto; gap: 18px; align-items: center; padding: 17px 0; border-bottom: 2px solid var(--ink); }
.key-item:last-child { border-bottom: 0; }
.key-name strong, .key-name code { display: block; }
.key-name code { margin-top: 5px; color: var(--muted); font-size: 11px; }
.key-metric { font-size: 11px; color: var(--muted); }
.key-metric b { display: block; margin-bottom: 4px; color: var(--ink); font-size: 15px; }
.delete-key { appearance: none; padding: 7px 10px; border: 2px solid var(--ink); background: var(--red); font-size: 12px; font-weight: 900; cursor: pointer; }
.key-empty { padding: 26px 0 8px; color: var(--muted); text-align: center; font-weight: 750; }
.wallet-history { border-top: var(--line); padding: 22px 26px 28px; background: #f8f5ec; }
.wallet-history-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.wallet-history-title .text-button { color: var(--blue); }
.wallet-transactions { display: grid; gap: 0; }
.wallet-transaction { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 13px 0; border-bottom: 2px solid var(--ink); }
.wallet-transaction:last-child { border-bottom: 0; }
.wallet-transaction strong, .wallet-transaction small { display: block; }
.wallet-transaction small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.wallet-transaction > b { flex: 0 0 auto; font: 950 14px/1 ui-monospace, monospace; }
.wallet-transaction > b.income { color: #087c4c; }
.wallet-transaction > b.expense { color: #c72d22; }
.wallet-empty { padding: 18px 0; color: var(--muted); font-size: 13px; font-weight: 700; text-align: center; }

.docs-section { background: var(--blue); color: white; border-top: var(--line); }
.docs-section .section-heading > p:last-child { color: #dce4ff; }
.docs-section code { color: inherit; }
.docs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.code-card { min-width: 0; border: var(--line); background: #191919; box-shadow: 7px 7px 0 var(--ink); }
.code-title { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; background: var(--yellow); color: var(--ink); border-bottom: var(--line); font: 900 12px/1 ui-monospace, monospace; }
.code-title button { appearance: none; border: 0; background: none; font-weight: 950; text-decoration: underline; cursor: pointer; }
pre { margin: 0; min-height: 290px; overflow: auto; padding: 20px; color: #f5f0e6; font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; }
.api-facts { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.api-facts span { padding: 9px 12px; background: white; color: var(--ink); border: 2px solid var(--ink); font: 850 12px/1 ui-monospace, monospace; box-shadow: 3px 3px 0 var(--ink); }
.api-facts b { color: #264fc7; }

body > footer { padding: 34px 0 44px; background: var(--ink); color: white; }
body > footer .wrap { display: flex; justify-content: space-between; gap: 30px; align-items: start; }
body > footer p { max-width: 720px; margin: 0; color: #aaa69e; font-size: 12px; line-height: 1.6; }
.toast { position: fixed; z-index: 50; right: 22px; bottom: 22px; max-width: min(420px, calc(100vw - 44px)); padding: 14px 17px; border: 2px solid var(--ink); background: var(--mint); color: var(--ink); box-shadow: 5px 5px 0 var(--ink); font-size: 13px; font-weight: 850; opacity: 0; pointer-events: none; transform: translateY(15px); transition: .18s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--red); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 55px; }
  .truth-card { width: min(620px, 94%); margin: 0 auto; transform: rotate(1deg); }
  .model-grid { grid-template-columns: repeat(3, 1fr); }
  .docs-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .wrap { width: min(100% - 24px, 1160px); }
  .topbar { min-height: 62px; padding: 8px 12px; }
  .brand { font-size: 15px; }
  .brand-potato { width: 36px; height: 36px; }
  .topbar nav a { display: none; }
  .topbar nav a:last-child { display: block; padding: 8px 10px; border: 2px solid var(--ink); background: var(--yellow); }
  .hero { min-height: auto; padding-top: 58px; padding-bottom: 70px; }
  .hero h1 { font-size: clamp(44px, 12.5vw, 58px); }
  .lede { font-size: 18px; }
  .truth-card { width: calc(100% - 14px); padding-inline: 21px; }
  .section { padding-top: 74px; padding-bottom: 74px; }
  .price-grid, .account-grid { grid-template-columns: 1fr; }
  .price-card { min-height: 190px; }
  .peak-note { align-items: start; flex-direction: column; }
  .model-heading { align-items: stretch; flex-direction: column; gap: 24px; }
  .search-box { width: 100%; }
  .model-grid { grid-template-columns: 1fr 1fr; }
  .panel { padding: 22px; box-shadow: 5px 5px 0 var(--ink); }
  .portal-panel { min-height: 250px; grid-template-columns: 1fr; align-items: end; }
  .portal-panel .button { width: 100%; }
  .wallet-grid { grid-template-columns: 1fr 1fr; }
  .wallet-balance { grid-column: 1 / -1; border-right: 0; border-bottom: var(--line); }
  .wallet-stat:nth-child(2) { border-right: var(--line); }
  .redeem-form { grid-template-columns: 1fr; }
  .create-key-row { grid-template-columns: 1fr; }
  .secret-reveal { grid-template-columns: 1fr; }
  .secret-reveal .button { width: 100%; }
  .key-item { grid-template-columns: 1fr 1fr; }
  .delete-key { justify-self: start; }
  body > footer .wrap { flex-direction: column; }
}

@media (max-width: 460px) {
  .model-grid { grid-template-columns: 1fr; }
  .hero-actions .button { width: 100%; }
  .project-notice { grid-template-columns: 1fr; gap: 18px; margin-top: 30px; padding: 23px 21px; box-shadow: 6px 6px 0 var(--ink); transform: none; }
  .project-notice-icon { width: 60px; height: 60px; font-size: 36px; }
  .price-pair b { font-size: 22px; }
  .console-top { align-items: flex-start; }
  .console-top > div { align-items: flex-start; flex-direction: column; gap: 4px; }
  .wallet-grid { grid-template-columns: 1fr; }
  .wallet-balance, .wallet-stat, .wallet-stat:nth-child(2) { grid-column: auto; border-right: 0; border-bottom: var(--line); }
  .wallet-stat:nth-child(3) { border-bottom: 0; }
  .redeem-form { grid-column: auto; }
  .wallet-transaction { align-items: flex-start; flex-direction: column; gap: 8px; }
  .key-item { grid-template-columns: 1fr; }
  pre { min-height: 0; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker div { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
