@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/geist.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/geist-mono.woff2") format("woff2");
}

:root {
  --bg: #000;
  --card: rgba(9, 9, 11, 0.6);
  --ink: #fafafa;
  --muted: #a1a1aa;
  --faint: #71717a;
  --line: #27272a;
  --line-strong: #3f3f46;
  --code: rgba(9, 9, 11, 0.72);
  --prompt: #6ee7b7;
  --danger: #ffa3a3;
  --run-bg: #f4f4f5;
  --run-ink: #09090b;
  --human-bg: rgba(237, 178, 0, 0.08);
  --human-line: #edb200;
  --check-bg: rgba(110, 231, 183, 0.08);
  --check-line: #6ee7b7;
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 25px 80px rgba(0, 0, 0, 0.75);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --wide: 72rem;
  color-scheme: dark;
  background: var(--bg);
  color: var(--ink);
}

:root[data-theme="light"] {
  --bg: #fafafa;
  --card: #fff;
  --ink: #18181b;
  --muted: #52525b;
  --faint: #71717a;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --code: #fafafa;
  --prompt: #047857;
  --danger: #b91c1c;
  --run-bg: #18181b;
  --run-ink: #fafafa;
  --human-bg: #fffbeb;
  --human-line: #d97706;
  --check-bg: #ecfdf5;
  --check-line: #047857;
  --shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 25px 50px rgba(0, 0, 0, 0.08);
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fafafa;
    --card: #fff;
    --ink: #18181b;
    --muted: #52525b;
    --faint: #71717a;
    --line: #e4e4e7;
    --line-strong: #d4d4d8;
    --code: #fafafa;
    --prompt: #047857;
    --danger: #b91c1c;
    --run-bg: #18181b;
    --run-ink: #fafafa;
    --human-bg: #fffbeb;
    --human-line: #d97706;
    --check-bg: #ecfdf5;
    --check-line: #047857;
    --shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 25px 50px rgba(0, 0, 0, 0.08);
    color-scheme: light;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  background: var(--bg);
  color: var(--ink);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

::selection { background: rgba(110, 231, 183, 0.28); color: var(--ink); }

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}

a { color: inherit; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--bg);
  color: var(--ink);
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  z-index: 5;
}
.skip:focus { top: 0.6rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dots {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
}
.dots i {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  display: block;
}
.dots i:nth-child(1) { background: rgba(251, 44, 54, 0.9); }
.dots i:nth-child(2) { background: rgba(237, 178, 0, 0.9); }
.dots i:nth-child(3) { background: rgba(0, 199, 88, 0.9); }

.frame {
  max-width: var(--wide);
  margin: 1.25rem auto 0;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--card);
  box-shadow: var(--shadow);
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.win-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.mark {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  line-height: 1;
}
.mark:hover { color: var(--ink); }

.topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}
.topnav a {
  color: var(--muted);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.75rem;
}
.topnav a:hover { color: var(--ink); }

.theme,
.chip,
.copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2rem;
  padding: 0 0.75rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  cursor: pointer;
}
.theme:hover,
.chip:hover,
.copy:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }

.code {
  position: relative;
  margin: 1rem 0;
  background: var(--code);
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  max-width: 100%;
}
.code .lang {
  position: absolute;
  top: 0.7rem;
  left: 0.85rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--faint);
}
.code .copy {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  min-height: 1.75rem;
  box-shadow: none;
}
.code pre {
  margin: 0;
  padding: 2.15rem 0.9rem 0.9rem;
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.code code {
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.55;
  background: none;
  padding: 0;
  border: 0;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--code);
  border: 1px solid var(--line);
  padding: 0.05em 0.32em;
  border-radius: 0.25rem;
}

.missing {
  max-width: 40rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}
.missing h1 {
  margin: 0 0 0.6rem;
  font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.missing a {
  color: var(--muted);
  text-underline-offset: 0.25em;
}
.missing a:hover { color: var(--ink); }

.site-footer {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1rem 1rem 2.5rem;
  color: var(--faint);
  font-size: 0.75rem;
  text-align: center;
}
.site-footer p { margin: 0; }
.foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.75rem;
  margin-top: 0.35rem;
}
.site-footer a {
  color: var(--muted);
  text-underline-offset: 4px;
}
.site-footer a:hover { color: var(--ink); }

@media (max-width: 640px) {
  .frame { margin: 0.75rem 0.75rem 0; }
}

.stage {
  display: flex;
  align-items: center;
  min-height: 100vh;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 2.5rem 1rem;
}

.stage-inner { width: 100%; }

.window {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.win-bar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
}
.win-id {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.win-id p {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.chip {
  min-width: 0;
  flex: 1 1 0;
  justify-content: flex-start;
}
.chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chip svg { flex: none; }

.screen {
  height: min(62vh, 540px);
  overflow: auto;
  padding: 1rem;
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.5rem;
}

.line-logo {
  display: none;
  justify-content: center;
  color: var(--muted);
}
.line-logo pre {
  display: inline-block;
  margin: 0;
  white-space: pre;
  text-align: left;
  line-height: 18px;
  font-family: inherit;
  font-size: inherit;
}

.line-intro {
  margin: 1.25rem 0;
  color: var(--muted);
  text-align: center;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.line-blurb {
  display: flex;
  justify-content: center;
  margin: 2.5rem 0 1rem;
}
.line-blurb div {
  width: 100%;
  max-width: 36rem;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 0.75rem 1rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.line-output,
.line-system,
.line-error,
.line-input {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.line-output { color: var(--ink); }
.line-system { color: var(--muted); }
.line-error { color: var(--danger); }
.line-input { color: var(--prompt); }

.prompt-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--line);
}
.prompt-sigil {
  flex: none;
  font-family: var(--mono);
  color: var(--prompt);
  user-select: none;
}
.prompt-bar input {
  flex: 1;
  min-width: 0;
  height: 2.25rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.875rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.prompt-bar input::placeholder { color: var(--faint); }
.prompt-bar input:focus { outline: none; }
.run {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.25rem;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 0.375rem;
  background: var(--run-bg);
  color: var(--run-ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.run:hover { filter: brightness(1.06); }
.run .run-label { display: none; }

.page-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 0.75rem;
  margin-top: 1rem;
  color: var(--faint);
  font-size: 0.75rem;
}
.page-foot a {
  color: var(--muted);
  text-underline-offset: 4px;
}
.page-foot a:hover { color: var(--ink); }
.page-foot .sep { color: var(--line-strong); }
.page-foot .theme {
  min-height: 1.75rem;
  padding: 0 0.6rem;
  color: var(--muted);
  box-shadow: none;
}

.explain {
  margin: 1.25rem auto 0;
  max-width: 40rem;
  text-align: center;
}
.explain p {
  margin: 0 0 0.45rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.explain ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.explain a {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  text-underline-offset: 4px;
}
.explain a:hover { color: var(--ink); }

a.chip { text-decoration: none; }

.score-screen {
  height: auto;
  max-height: none;
  overflow: visible;
}
.score-screen h1 {
  margin: 0 0 0.5rem;
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 500;
}
.score-lead,
.score-faq p,
.install-cta p {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.45rem;
}
.score-label {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--faint);
}
.score-screen textarea {
  width: 100%;
  min-height: 8.5rem;
  resize: vertical;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.45rem;
}
.score-screen textarea:focus { outline: 1px solid var(--line-strong); }
.toggles {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.85rem 0 1rem;
  padding: 0;
  border: 0;
}
.toggles label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.35rem;
  color: var(--muted);
}
.score-count,
.score-summary,
.score-weak,
.score-empty {
  margin: 0.35rem 0 0.75rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.score-total { margin: 0.25rem 0 0.35rem; }
.score-figure {
  font-family: var(--mono);
  font-size: 2rem;
  line-height: 1;
  color: var(--prompt);
}
.score-of {
  font-family: var(--mono);
  color: var(--faint);
}
.score-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 0.85rem;
  font-family: var(--mono);
  font-size: 0.75rem;
}
.score-table th,
.score-table td {
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.score-table th { color: var(--faint); font-weight: 500; }
.score-num { text-align: right; font-variant-numeric: tabular-nums; }
.score-table tr.is-weakest td { color: var(--prompt); }
.score-suggestions,
.score-notes {
  margin: 0 0 0.85rem;
  padding-left: 1.1rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.45rem;
  color: var(--ink);
}
.score-notes { color: var(--muted); }
.score-rewrite {
  margin: 0 0 0.6rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.45rem;
  white-space: pre-wrap;
  color: var(--ink);
}
.install-cta,
.score-faq {
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}
.install-cta h2,
.score-faq h2 {
  margin: 0 0 0.45rem;
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 500;
}
.score-faq h3 {
  margin: 0.85rem 0 0.25rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
}
.cta-links a { color: var(--prompt); }
.account-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
  align-items: center;
}
.account-bar .who {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}
button.chip {
  font-family: var(--mono);
  font-size: 0.75rem;
}
.saved-drafts {
  margin-top: 0.5rem;
}
.saved-drafts h2 {
  margin: 0 0 0.45rem;
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 500;
}
.saved-drafts ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.draft-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0.4rem 0;
}
.draft-open {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--prompt);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.35rem;
  text-align: left;
  cursor: pointer;
}
.score-screen h2 {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 500;
}
.score-screen code {
  font-family: var(--mono);
  font-size: 0.75rem;
}
.sync-pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0 0 0.85rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  max-height: 16rem;
  overflow: auto;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.45rem;
}
.sync-form {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
}
.sync-form input {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.875rem;
}
.sync-form input:focus { outline: 1px solid var(--line-strong); }

@media (min-width: 640px) {
  .stage { padding: 4rem 1rem; }
  .win-bar { flex-direction: row; align-items: center; }
  .chips { margin-left: auto; width: auto; }
  .chip { flex: none; }
  .line-logo { display: flex; }
  .prompt-bar { gap: 0.75rem; }
  .run { padding: 0 1rem; }
  .run .run-label { display: inline; }
  .page-foot .sep { display: inline; }
}

@media (max-width: 639px) {
  .page-foot .sep { display: none; }
  .chips .chip:first-child { flex: 1 1 auto; }
  .chips .chip:last-child { flex: 0 0 auto; }
}

.credit{font-size:12px;opacity:.6}.credit a{color:inherit;text-decoration:none}.credit a:hover{text-decoration:underline}
.credit{display:block;width:100%;flex-basis:100%;margin:0;text-align:center}
