:root {
  color-scheme: dark;
  font-family: "Avenir Next", Avenir, system-ui, sans-serif;
  color: #eff4fb;
  background: #0b0f17;
  --muted: #a3afc3;
  --accent: #71f2de;
  --line: #293747;
  --screen: #c8d0ae;
  --mono: "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button:disabled { cursor: default; }
.shell { width: min(100% - 48px, 1040px); margin-inline: auto; }

.site-header {
  border-bottom: 1px solid #1e2735;
  background: #0a0d15;
}

.nav {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 750; font-size: 19px; }
.brand img { border-radius: 8px; }
.shop-link { color: var(--muted); font-weight: 650; font-size: 14px; }
.shop-link:hover { color: var(--accent); }

.intro { padding-block: 37px 25px; }
.eyebrow { margin: 0 0 13px; color: var(--accent); font: 600 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.intro h1 { font-size: clamp(36px, 5.8vw, 72px); line-height: .99; letter-spacing: -.058em; margin: 0; }
.intro h1 em { color: var(--accent); font-style: normal; }
.title-break { display: none; }
.intro > p:last-child { max-width: 58ch; margin: 16px 0 0; color: var(--muted); font-size: 16px; line-height: 1.55; }

.lab { border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: #101823; }
.stage {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  align-items: center;
  gap: clamp(22px, 4.5vw, 62px);
  padding: 22px clamp(26px, 6vw, 77px);
  background:
    radial-gradient(ellipse at 22% 52%, #1a4048 0, transparent 53%),
    linear-gradient(135deg, #0d1720, #101723 68%);
}

.device-stage { min-width: 0; }
.device {
  position: relative;
  margin-inline: auto;
  width: min(100%, 220px);
  isolation: isolate;
  filter: drop-shadow(0 18px 24px #02050a9c);
}

.device img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: radial-gradient(ellipse 60% 62% at 51% 51%, #000 62%, transparent 96%);
  mask-image: radial-gradient(ellipse 60% 62% at 51% 51%, #000 62%, transparent 96%);
}

.device-lcd {
  position: absolute;
  left: 35.85%;
  top: 13.62%;
  width: 36.5%;
  height: 18.5%;
  border-radius: 1.5%;
  transform: skewY(9.8deg);
  transform-origin: left top;
}

.display-panel { min-width: 0; width: min(100%, 420px); }
.display-heading, .page-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.display-heading { margin-bottom: 12px; }
.display-heading h2 { margin: 0; font-size: 15px; font-weight: 700; }
.page-controls output { color: var(--muted); font: 12px var(--mono); white-space: nowrap; }
.screen-bezel {
  padding: 12px;
  border: 1px solid #344252;
  border-radius: 15px;
  background: #070a0e;
  box-shadow: 0 14px 26px #06091085, inset 0 1px 2px #ffffff16;
}
canvas { display: block; background: var(--screen); image-rendering: pixelated; }
#lcd { width: 100%; height: auto; border-radius: 3px; }
.page-controls { justify-content: center; margin-top: 14px; gap: 15px; }
.page-controls output { min-width: 100px; text-align: center; }
.page-controls button {
  width: 44px;
  height: 40px;
  border: 1px solid #3b4f5c;
  border-radius: 9px;
  color: var(--accent);
  background: #152632;
  font-size: 19px;
}
.page-controls button:disabled { color: #8090a1; border-color: #263541; background: #121d27; }
.page-controls button:hover:enabled, .examples button:hover:enabled { border-color: var(--accent); }

.desk { padding: 24px clamp(22px, 5vw, 48px) 26px; border-top: 1px solid var(--line); }
label, legend { font-size: 15px; font-weight: 700; }
.question-row { display: flex; gap: 10px; margin-top: 9px; }
.question-row input {
  min-width: 0;
  flex: 1;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid #425164;
  border-radius: 10px;
  background: #0a101a;
  color: #eff4fb;
  font-size: 16px;
}
input::placeholder { color: #8999af; }
.render {
  min-height: 48px;
  padding-inline: 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent);
  color: #071c1d;
  font-weight: 750;
  white-space: nowrap;
}
.render:hover:enabled { background: #a3ffec; }
.render:disabled { opacity: .65; }
.render span { margin-left: 7px; }
#question-help, .allowance, .feedback, .footnote { font-size: 13px; line-height: 1.55; color: var(--muted); }
#question-help, .allowance, .feedback { margin: 8px 0 0; }
.allowance:empty, .feedback:empty { display: none; }
.feedback[data-error="true"] { color: #ffb2a6; }
.solution-details { margin-top: 14px; color: var(--muted); font-size: 14px; }
.solution-details summary { cursor: pointer; color: var(--accent); }
#solution-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
fieldset { border: 0; min-width: 0; padding: 0; margin: 20px 0 0; }
legend { padding: 0; }
.examples { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.examples button {
  min-height: 38px;
  padding: 6px 11px;
  color: #cad6e8;
  background: #14212f;
  border: 1px solid #354758;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 650;
}
.examples button[aria-pressed="true"] { color: var(--accent); border-color: #489b92; background: #142d36; }
.footnote { margin: 14px 0 30px; }

@media (max-width: 650px) {
  .shell { width: calc(100% - 32px); }
  .nav { min-height: 58px; }
  .intro { padding-block: 28px 23px; }
  .intro > p:last-child { margin-top: 12px; }
  .title-break { display: initial; }
  .lab { border-radius: 16px; }
  .stage { grid-template-columns: .47fr 1fr; gap: 8px; padding: 17px 11px 14px 6px; }
  .device { width: 100%; }
  .display-heading { margin-bottom: 8px; }
  .display-heading h2 { font-size: 13px; }
  .page-controls output { font-size: 11px; }
  .screen-bezel { padding: 6px; border-radius: 8px; }
  .page-controls { margin-top: 8px; gap: 5px; }
  .page-controls output { min-width: 72px; }
  .page-controls button { height: 38px; }
  .desk { padding: 17px 14px 20px; }
  .question-row { flex-direction: column; }
}

@media (max-width: 350px) {
  .stage { grid-template-columns: .39fr 1fr; }
}
