:root {
  color-scheme: dark;
  --bg: #111311;
  --panel: #191d1a;
  --panel-2: #20251f;
  --text: #f3f0e8;
  --muted: #b8b2a7;
  --line: #363a33;
  --red: #ee5347;
  --gold: #e4b75f;
  --green: #6dc48a;
  --blue: #73a7ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 5vw, 64px);
  background: rgba(17, 19, 17, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--red);
  color: white;
}

nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

nav a {
  text-decoration: none;
}

.hero {
  min-height: 86vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: clamp(26px, 5vw, 80px);
  padding: clamp(36px, 7vw, 88px) clamp(18px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(115deg, rgba(238, 83, 71, 0.2), transparent 34%),
    linear-gradient(25deg, transparent, rgba(115, 167, 255, 0.16)),
    var(--bg);
}

.eyebrow {
  color: var(--gold);
  font-weight: 760;
  text-transform: uppercase;
  font-size: 13px;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(44px, 8vw, 86px);
  line-height: 0.96;
  letter-spacing: 0;
}

.lead {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.55;
}

.hero-actions,
.pay-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 720;
  cursor: pointer;
  font: inherit;
}

.button.primary {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.button.secondary {
  background: var(--panel-2);
}

.button.ghost {
  background: transparent;
}

.paypal-button-wrap {
  min-width: 156px;
  min-height: 44px;
}

.hero-panel {
  justify-self: stretch;
}

.risk-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(25, 29, 26, 0.86);
  padding: 24px;
}

.tag {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 760;
}

.tag.hot {
  color: #1d1206;
  background: var(--gold);
}

.toolbar,
.dictionary,
.packs,
.faq {
  padding: 34px clamp(18px, 5vw, 64px);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: #141714;
}

.search-wrap {
  display: grid;
  gap: 8px;
  min-width: min(100%, 390px);
  color: var(--muted);
  font-size: 13px;
}

input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  background: var(--panel);
  color: var(--text);
  font-size: 16px;
}

.segments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segment {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
  padding: 0 14px;
  cursor: pointer;
}

.segment.active {
  color: var(--text);
  border-color: var(--gold);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

.section-head p,
.risk-card p,
.pack li,
.faq p,
.tiny {
  color: var(--muted);
  line-height: 1.55;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.entry {
  min-height: 270px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
}

.entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.term {
  font-size: 28px;
  font-weight: 780;
}

.term-link {
  display: inline-block;
  text-decoration: none;
}

.term-link:hover {
  color: var(--gold);
}

.pinyin {
  color: var(--blue);
  font-size: 14px;
}

.meter {
  margin: 14px 0;
  height: 8px;
  border-radius: 999px;
  background: #2a2d28;
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--red));
}

.labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.label {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
}

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

.static-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.static-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}

.static-links a:hover {
  border-color: var(--gold);
  color: var(--text);
}

.word-page {
  padding: clamp(34px, 7vw, 82px) clamp(18px, 5vw, 64px);
}

.word-article {
  max-width: 820px;
}

.word-article h1 {
  font-size: clamp(38px, 6vw, 72px);
}

.word-article h2 {
  margin-top: 34px;
}

.word-article p {
  color: var(--muted);
  line-height: 1.65;
}

.word-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 26px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.word-facts p {
  margin: 0;
}

.pack {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--panel);
}

.pack.muted {
  background: #151815;
}

.price {
  margin: 12px 0;
  font-size: 42px;
  font-weight: 800;
}

.faq {
  display: grid;
  gap: 12px;
}

.status-panel {
  max-width: 760px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 22px;
}

.status-panel pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--muted);
}

details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
}

summary {
  cursor: pointer;
  font-weight: 720;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(18px, 5vw, 64px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 860px) {
  .topbar,
  footer,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .entry-grid,
  .pack-layout,
  .word-facts {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }
}
