:root {
  color-scheme: dark;
  --ink: #ffffff;
  --muted: #8888aa;
  --line: #272736;
  --soft: #15151f;
  --panel: #111118;
  --gold: #ffd700;
  --gold-2: #ffaa00;
  --green: #50fa7b;
  --red: #ff5c75;
  --violet: #8d7dff;
  --teal: #25d0d8;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.35);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #0a0a0f;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  color: var(--gold-2);
}

button,
textarea,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #1f1f2d;
  background: rgba(10, 10, 15, 0.94);
  padding: 14px clamp(18px, 5vw, 64px);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  color: #050508;
  font-size: 14px;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.topbar nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

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

.hero {
  padding: 52px 0 28px;
  background: radial-gradient(ellipse at top, #1a1a2e 0%, #0a0a0f 70%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 34px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
}

h1 {
  max-width: 780px;
  font-size: clamp(38px, 5.4vw, 68px);
  letter-spacing: 0;
}

h2 {
  font-size: clamp(28px, 3.8vw, 44px);
}

h3 {
  font-size: 21px;
}

p {
  margin: 0;
}

.subtitle {
  max-width: 660px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 19px;
}

.hero-actions,
.toolbar,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions {
  margin-top: 26px;
}

.button {
  min-height: 44px;
  border: 1px solid #2a2a38;
  border-radius: 7px;
  padding: 10px 16px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.button:hover {
  border-color: rgba(255, 215, 0, 0.45);
  background: #191925;
}

.button.primary {
  border-color: rgba(255, 215, 0, 0.65);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  color: #050508;
}

.button.primary:hover {
  background: linear-gradient(135deg, var(--gold-2) 0%, var(--gold) 100%);
  color: #050508;
}

.button.danger {
  color: #ffffff;
  background: var(--red);
}

.button.ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.tool-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.picker {
  display: grid;
  grid-template-columns: minmax(300px, 0.88fr) minmax(320px, 1.12fr);
  gap: 0;
  overflow: hidden;
}

.controls,
.wheel-zone {
  padding: clamp(18px, 3vw, 28px);
}

.controls {
  border-right: 1px solid var(--line);
  background: #101018;
}

.field {
  display: grid;
  gap: 8px;
}

.field label,
.option {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.field textarea {
  width: 100%;
  min-height: 236px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  color: var(--ink);
  background: #0c0c12;
}

.option-row {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.option {
  display: flex;
  align-items: center;
  gap: 10px;
}

.option input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: var(--soft);
}

.metric strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.wheel-zone {
  display: grid;
  gap: 18px;
  align-content: start;
  background: linear-gradient(180deg, #141421 0%, #0f0f17 100%);
}

.wheel-wrap {
  position: relative;
  display: grid;
  min-height: 390px;
  place-items: center;
}

#wheelCanvas,
#previewCanvas {
  width: min(100%, 390px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: drop-shadow(0 18px 26px rgba(23, 32, 51, 0.18));
}

.pointer {
  position: absolute;
  top: calc(50% - 198px);
  left: 50%;
  width: 0;
  height: 0;
  border-right: 16px solid transparent;
  border-left: 16px solid transparent;
  border-top: 34px solid var(--ink);
  transform: translateX(-50%);
  z-index: 3;
}

.center-result {
  position: absolute;
  display: grid;
  width: 138px;
  min-height: 88px;
  place-items: center;
  border: 4px solid #ffffff;
  border-radius: 8px;
  background: #050508;
  color: #ffffff;
  padding: 10px;
  text-align: center;
  box-shadow: 0 12px 24px rgba(23, 32, 51, 0.24);
}

.center-result strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: clamp(15px, 2vw, 20px);
  line-height: 1.16;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.status {
  min-height: 30px;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.history {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip {
  border-radius: 999px;
  background: rgba(255, 215, 0, 0.12);
  color: var(--gold);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
}

.content-band {
  padding: 70px 0;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 34px;
  align-items: start;
}

.copy {
  display: grid;
  gap: 18px;
}

.copy p,
.copy li {
  color: var(--muted);
}

.copy ul {
  margin: 0;
  padding-left: 22px;
}

.copy ol {
  margin: 0;
  padding-left: 22px;
}

.copy blockquote {
  margin: 0;
  border-left: 3px solid var(--gold);
  background: rgba(255, 215, 0, 0.08);
  padding: 16px 18px;
  color: var(--ink);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 6px;
}

.info-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  padding: 18px;
}

.info-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.info-card p {
  color: var(--muted);
}

.faq-stack {
  display: grid;
  gap: 16px;
}

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

.faq-item h3 {
  margin-bottom: 8px;
}

.side-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.side-list a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #111118;
  padding: 14px;
  color: var(--ink);
  font-weight: 800;
}

.tools-hero {
  padding: 70px 0 32px;
}

.tool-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 30px 0 80px;
}

.tool-card {
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111118;
  padding: 22px;
}

.tool-card p {
  margin: 12px 0 18px;
  color: var(--muted);
}

.footer {
  border-top: 1px solid var(--line);
  padding: 30px 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-inner,
.footer nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-inner {
  justify-content: space-between;
}

.footer nav a {
  color: var(--muted);
}

.footer nav a:hover,
.footer nav a[aria-current="page"] {
  color: var(--gold);
}

.legal-page {
  max-width: 850px;
  padding-top: 72px;
  padding-bottom: 80px;
}

.legal-page h1 {
  font-size: clamp(40px, 6vw, 64px);
}

.legal-page section {
  margin-top: 42px;
}

.legal-page section h2 {
  margin-bottom: 14px;
  font-size: clamp(24px, 3.4vw, 34px);
}

.legal-page section p + p,
.legal-page section p + ul,
.legal-page section ul + p {
  margin-top: 14px;
}

.legal-page li + li {
  margin-top: 8px;
}

@media (max-width: 920px) {
  .hero-grid,
  .picker,
  .content-grid,
  .tool-list,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .controls {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .wheel-wrap {
    min-height: 330px;
  }

  .pointer {
    top: calc(50% - 166px);
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar nav {
    gap: 14px;
  }

  h1 {
    font-size: 38px;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }
}
