:root {
  color-scheme: light;
  --ink: #08111f;
  --ink-2: #132238;
  --muted: #617086;
  --paper: #f7f9fc;
  --panel: #ffffff;
  --line: #dbe2ea;
  --graphite: #070b12;
  --graphite-2: #111824;
  --display: #c9d5c2;
  --cyan: #35c9ff;
  --orange: #ff8a00;
  --violet: #7a35e8;
  --magenta: #cf247c;
  --radius: 8px;
  --shadow: 0 24px 70px rgba(8, 17, 31, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
}

body,
button,
input {
  font: inherit;
}

h1,
h2,
h3,
button,
input,
.button,
.brand-lockup {
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
.button {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 750;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 52px);
  color: #f8fbff;
  background: rgba(7, 11, 18, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-lockup img {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup strong {
  line-height: 1.05;
}

.brand-lockup small {
  color: #9fb0c7;
  font-size: 0.78rem;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 8px;
  padding: 2px 7px;
  color: #17100a;
  background: var(--orange);
  border-radius: 999px;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  vertical-align: middle;
}

.site-header nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 28px);
  color: #ced8e7;
  font-size: 0.94rem;
}

.site-header a:hover,
.site-footer a:hover {
  color: var(--cyan);
}

.hero {
  position: relative;
  min-height: 92vh;
  overflow: hidden;
  padding: 124px clamp(18px, 5vw, 76px) 28px;
  color: #f8fbff;
  background:
    radial-gradient(circle at 74% 16%, rgba(53, 201, 255, 0.2), transparent 28%),
    linear-gradient(145deg, #070b12 0%, #0e1420 52%, #18121c 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, transparent 78%);
  pointer-events: none;
}

.hero-mark {
  position: absolute;
  right: clamp(-180px, -8vw, -60px);
  top: clamp(84px, 9vw, 120px);
  width: min(760px, 58vw);
  opacity: 0.43;
  filter: drop-shadow(0 42px 80px rgba(0, 0, 0, 0.45));
}

.hero-content,
.preview-workbench,
.section-band,
.site-footer {
  position: relative;
  z-index: 1;
}

.hero-content {
  width: min(760px, 100%);
  padding-top: clamp(18px, 6vh, 70px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  max-width: 820px;
  font-size: clamp(3rem, 8.4vw, 7.2rem);
  line-height: 0.94;
  letter-spacing: 0;
  font-weight: 850;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.18rem;
}

.hero-copy,
.section-heading p,
.release-copy p {
  color: #d0d9e8;
  max-width: 660px;
  font-size: clamp(1.02rem, 2vw, 1.24rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
}

.button.primary {
  color: #17100a;
  background: var(--orange);
}

.button.secondary {
  color: #f8fbff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.preview-workbench {
  display: grid;
  grid-template-columns: minmax(280px, 0.84fr) minmax(320px, 1.16fr);
  gap: 16px;
  width: min(1180px, 100%);
  margin-top: clamp(40px, 8vh, 88px);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(7, 11, 18, 0.72);
  box-shadow: var(--shadow);
}

.expression-lane,
.graph-lane,
.feature-grid article,
.token-panel {
  border-radius: var(--radius);
}

.expression-lane,
.graph-lane {
  min-width: 0;
  background: rgba(17, 24, 36, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.expression-lane {
  padding: 18px;
}

.calculator-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.calculator-title-row label,
.calculator-title-row span {
  color: #aebbd0;
  font-size: 0.82rem;
  font-weight: 700;
}

.calculator-title-row span {
  color: var(--orange);
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
}

.mode-switch button {
  min-height: 38px;
  color: #aebbd0;
  background: transparent;
  border: 1px solid transparent;
  font-size: 0.86rem;
}

.mode-switch button.active {
  color: #17100a;
  background: var(--display);
  border-color: rgba(255, 255, 255, 0.2);
}

.expression-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.expression-entry input {
  min-width: 0;
  min-height: 48px;
  padding: 0 12px;
  color: #101713;
  background: var(--display);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  outline: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 750;
}

.expression-entry button {
  padding: 0 16px;
  color: #17100a;
  background: var(--orange);
}

#resultOutput {
  display: block;
  min-height: 3.9rem;
  margin: 14px 0 10px;
  color: #f8fbff;
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  font-weight: 850;
  line-height: 1;
  overflow-wrap: anywhere;
}

.calculator-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.calculator-mode-row span {
  padding: 5px 8px;
  color: #aebbd0;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.keypad button {
  min-width: 0;
  min-height: 46px;
  padding: 0 8px;
  color: #f8fbff;
  background: linear-gradient(180deg, #3a4352, #222b39);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13), 0 6px 16px rgba(0, 0, 0, 0.18);
}

.keypad button:hover,
.sample-row button:hover {
  border-color: rgba(53, 201, 255, 0.45);
}

.keypad .equals-key {
  color: #17100a;
  background: linear-gradient(180deg, #ffad36, #ff8200);
}

.sample-row {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 154px;
  overflow: auto;
  padding-right: 2px;
}

.history-heading,
.graph-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #f8fbff;
}

.history-heading strong,
.graph-title-row strong {
  font-size: 0.95rem;
}

.history-heading span,
.graph-title-row span {
  color: #aebbd0;
  font-size: 0.78rem;
  font-weight: 800;
}

.sample-row.active {
  display: grid;
}

.sample-row button {
  min-width: 0;
  min-height: 38px;
  padding: 0 8px;
  color: #f8fbff;
  background: #263141;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.84rem;
}

.graph-lane {
  padding: 12px;
}

.graph-lane canvas {
  display: block;
  width: 100%;
  min-height: 260px;
  border-radius: var(--radius);
}

.section-band {
  padding: clamp(64px, 9vw, 112px) clamp(18px, 5vw, 76px);
}

.light-band {
  background: var(--paper);
}

.section-heading {
  max-width: 900px;
  margin-bottom: 28px;
}

.section-heading p {
  color: var(--muted);
}

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

.feature-grid article,
.token-panel {
  min-width: 0;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 16px 42px rgba(8, 17, 31, 0.08);
}

.feature-index {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--orange);
  font-weight: 900;
}

.feature-grid p,
.token-panel p,
.rule-list {
  color: var(--muted);
  line-height: 1.6;
}

.design-system {
  color: #f8fbff;
  background:
    linear-gradient(120deg, rgba(53, 201, 255, 0.12), transparent 34%),
    linear-gradient(300deg, rgba(255, 138, 0, 0.13), transparent 30%),
    var(--graphite);
}

.design-system .section-heading p {
  color: #aebbd0;
}

.system-grid {
  grid-template-columns: minmax(260px, 0.9fr) minmax(280px, 1.05fr) minmax(280px, 1.05fr);
}

.token-panel {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.swatches {
  display: grid;
  gap: 10px;
}

.swatches span {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d8e1ee;
}

.swatches span::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--swatch);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.rule-list {
  margin: 0;
  padding-left: 18px;
}

.rule-list li + li {
  margin-top: 10px;
}

.logo-panel img {
  display: block;
  width: min(260px, 100%);
  margin: 8px 0 18px;
  border-radius: var(--radius);
  background: #fff;
}

.release-band {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr);
  gap: 28px;
  background: #ffffff;
}

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

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

.release-steps li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.release-steps strong {
  color: var(--orange);
}

.release-steps span {
  color: var(--muted);
}

.history-band {
  background: var(--paper);
}

.history-list {
  display: grid;
  gap: 12px;
  width: min(900px, 100%);
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(8, 17, 31, 0.07);
}

.history-list strong {
  color: var(--orange);
}

.history-list span {
  color: var(--muted);
  line-height: 1.55;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 5vw, 76px);
  color: #d8e1ee;
  background: var(--graphite);
}

.site-footer strong,
.site-footer span {
  display: block;
}

.site-footer span {
  color: #91a0b6;
  margin-top: 4px;
}

.legal-page {
  background: #ffffff;
}

.legal-shell {
  width: min(900px, calc(100% - 36px));
  margin: 0 auto;
  padding: 110px 0 64px;
  line-height: 1.7;
}

.legal-shell h1 {
  color: var(--ink);
  font-size: clamp(2.5rem, 7vw, 5rem);
}

.legal-shell h2 {
  margin-top: 36px;
  font-size: 1.5rem;
}

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

.legal-shell a {
  color: var(--violet);
  font-weight: 750;
}

@media (max-width: 980px) {
  .preview-workbench,
  .release-band {
    grid-template-columns: 1fr;
  }

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

  .hero-mark {
    width: 78vw;
    right: -28vw;
    opacity: 0.28;
  }
}

@media (max-width: 680px) {
  .site-header {
    position: absolute;
  }

  .site-header nav {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 96px;
  }

  .hero-mark {
    width: 104vw;
    right: -48vw;
    top: 82px;
    opacity: 0.22;
  }

  .hero-content {
    padding-top: 0;
  }

  .hero-actions,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .preview-workbench {
    padding: 10px;
  }

  .expression-entry,
  .sample-row,
  .feature-grid,
  .system-grid {
    grid-template-columns: 1fr;
  }

  .release-steps li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .history-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
