:root {
  color-scheme: light dark;
  --bg: #141414;
  --bar: #0b1013;
  --ink: #111820;
  --paper: #f7f8fa;
  --paper-2: #ffffff;
  --muted: #5f6873;
  --line: #d8dde3;
  --line-dark: rgba(255, 255, 255, 0.14);
  --gold: #ffd447;
  --gold-dark: #221807;
  --green: #45d483;
  --blue: #2f69d9;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  min-height: 100%;
  margin: 0;
  color: #f5f7fa;
  background: var(--bg);
  letter-spacing: 0;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

#dootdooter-hands-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  pointer-events: none;
  z-index: 100;
}

#dootdooter-hands-canvas.is-active {
  display: block;
}

.demo-disabled #dootdooter-hands-canvas {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(24px, 4vw, 68px);
  min-height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line-dark);
  background: rgba(11, 16, 19, 0.94);
  backdrop-filter: blur(14px);
}

.brand,
.topbar nav,
.top-actions,
.download-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  min-width: 0;
  text-decoration: none;
  font-weight: 850;
  font-size: 18px;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.topbar nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: clamp(18px, 3vw, 36px);
}

.topbar nav a {
  min-height: 38px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #b9c2cb;
  text-decoration: none;
  font-weight: 750;
  font-size: 14px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.topbar nav a:hover,
.topbar nav a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.top-actions {
  margin-left: auto;
  justify-content: flex-end;
  min-width: max-content;
}

main {
  overflow: hidden;
}

.arena-screen,
.files,
.source-page {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  scroll-margin-top: 84px;
}

.arena-screen {
  min-height: calc(100vh - 64px);
  padding: 34px 0 44px;
}

.arena-intro,
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: clamp(28px, 5vw, 74px);
  margin-bottom: 24px;
}

.eyebrow,
.kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

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

h1 {
  font-size: clamp(36px, 5vw, 72px);
}

h2 {
  font-size: clamp(28px, 4vw, 52px);
}

h3 {
  font-size: 17px;
}

.status {
  flex: 0 0 auto;
  min-width: 116px;
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  color: #d8dee6;
  background: rgba(255, 255, 255, 0.06);
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}

.status.is-live {
  color: var(--gold-dark);
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold), var(--green));
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  color: #f7f9fb;
  background: rgba(255, 255, 255, 0.06);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.switch-track {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--green);
}

.switch-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #08200f;
}

.switch[aria-checked="false"] .switch-track {
  background: #6d7680;
}

.switch[aria-checked="false"] .switch-dot {
  right: 19px;
}

.arena-copy {
  flex: 1 1 420px;
}

.arena-copy p:last-child {
  max-width: 520px;
  margin: 14px 0 0;
  color: #c4ccd5;
  font-size: clamp(17px, 1.8vw, 22px);
  font-weight: 650;
  line-height: 1.35;
}

.hero-art {
  flex: 0 1 560px;
  margin: 0;
}

.hero-art img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 24px 62px rgba(0, 0, 0, 0.3);
}

.browser-frame {
  border: 1px solid #20262d;
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper-2);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: #edf1f4;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.red {
  background: #ed655a;
}

.yellow {
  background: #f6be4f;
}

.green {
  background: #62c554;
}

.address {
  min-width: 0;
  margin-left: 10px;
  padding: 7px 12px;
  border: 1px solid #d2d8df;
  border-radius: 7px;
  color: #6d7480;
  background: #fff;
  font-size: 13px;
  font-weight: 750;
}

.document-surface {
  min-height: min(660px, calc(100vh - 190px));
  color: var(--ink);
  background: #fff;
}

.test-article {
  padding: clamp(24px, 4vw, 56px);
}

.test-article h2 {
  margin-bottom: 18px;
}

.test-article p {
  max-width: 850px;
  margin: 0 0 18px;
  color: #202832;
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight: 650;
  line-height: 1.45;
  user-select: text;
}

.test-line {
  max-width: 960px !important;
  margin-bottom: 22px !important;
}

.test-article span,
.test-article mark {
  user-select: text;
}

mark {
  padding: 0 0.12em;
  border-radius: 5px;
  color: #09111a;
  background: var(--gold);
}

.variant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.variant-grid span {
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 9px 8px;
  border: 1px solid #cfd5dc;
  border-radius: 7px;
  color: #18222c;
  background: #f7f9fb;
  font-size: 18px;
  font-weight: 850;
  text-align: center;
  cursor: text;
  user-select: text;
}

.variant-grid span:hover,
.variant-grid span:focus-visible {
  border-color: transparent;
  outline: none;
  background: #fff6c9;
  box-shadow: inset 0 0 0 2px rgba(255, 212, 71, 0.52);
}

.variant-group-title {
  grid-column: 1 / -1;
  margin: 10px 0 -2px;
  color: #667382;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.files,
.source-page {
  padding: 50px 0;
}

.files .section-heading {
  display: block;
  margin-bottom: 18px;
}

.download-actions {
  flex-wrap: wrap;
}

.primary-download,
.secondary-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 900;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.primary-download {
  color: #09111a;
  background: var(--gold);
}

.secondary-download {
  border: 1px solid var(--line-dark);
  color: #f7f9fb;
  background: rgba(255, 255, 255, 0.06);
}

.primary-download:hover,
.primary-download:focus-visible,
.secondary-download:hover,
.secondary-download:focus-visible,
.origin-links a:hover,
.origin-links a:focus-visible {
  border-color: rgba(255, 212, 71, 0.7);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  outline: none;
  transform: translateY(-1px);
}

.origin-links {
  display: grid;
  grid-template-columns: auto repeat(2, minmax(170px, 230px));
  align-items: stretch;
  justify-content: start;
  gap: 10px;
  margin-top: 24px;
}

.origin-label {
  display: flex;
  align-items: center;
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.origin-links a {
  display: grid;
  gap: 2px;
  min-height: 66px;
  padding: 13px 14px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  color: #f8fafc;
  background:
    linear-gradient(135deg, rgba(255, 212, 71, 0.14), rgba(69, 212, 131, 0.08)),
    rgba(255, 255, 255, 0.055);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.origin-links span {
  font-size: 17px;
  font-weight: 900;
}

.origin-links small {
  color: #b9c4cd;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.source-panel {
  padding: 18px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.source-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
}

.source-list {
  display: grid;
  gap: 8px;
}

.source-list button {
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  color: #f5f7fa;
  background: rgba(255, 255, 255, 0.06);
  text-align: left;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.source-list button.is-active {
  color: #09111a;
  border-color: transparent;
  background: var(--gold);
}

.code-box {
  max-height: 70vh;
  margin: 0;
  padding: 18px;
  overflow: auto;
  border: 1px solid #2a3036;
  border-radius: 8px;
  color: #f1f4f8;
  background: #080b0d;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  justify-content: center;
  padding: 34px 20px 46px;
  border-top: 1px solid var(--line-dark);
  color: #b8c3cc;
  font-size: 14px;
}

footer a {
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

::selection {
  color: #09111a;
  background: var(--gold);
}

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

  .topbar {
    gap: 16px;
    padding: 10px 14px;
  }

  .top-actions {
    width: 100%;
    margin-left: 0;
  }

  .arena-copy {
    flex: none;
  }

  .hero-art {
    width: 100%;
    flex: none;
  }

  .source-layout {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 540px) {
  .arena-screen,
  .files,
  .source-page {
    width: min(100% - 24px, 1280px);
  }

  .top-actions,
  .download-actions,
  .origin-links {
    align-items: stretch;
    width: 100%;
    flex-direction: column;
  }

  .status,
  .switch,
  .primary-download,
  .secondary-download {
    width: 100%;
  }

  .test-article {
    padding: 22px;
  }

  .test-article p {
    font-size: 21px;
  }

  .variant-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .origin-links {
    display: flex;
  }

  .origin-label {
    min-height: 0;
  }
}
