@font-face {
  font-family: Inter;
  src: url("./fonts/inter.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: dark;
  font: 15px/1.6 Inter, system-ui, sans-serif;
  color: #edf1fb;
  background: #101319;
  --rail: #151922;
  --surface: #191f2a;
  --line: #303a4a;
  --muted: #a6b2c5;
  --accent: #a1b2ff;
  --blue: #253fcc;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
::selection { background: #354a97; color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button, a { touch-action: manipulation; }
a { color: var(--accent); text-underline-offset: .22em; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 1; transform: translateY(-150%); padding: 8px 14px; background: var(--surface); }
.skip:focus { transform: none; }
.workspace { min-height: 100vh; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.rail { padding: 36px 18px; background: var(--rail); border-right: 1px solid var(--line); }
.source { display: flex; align-items: center; gap: 10px; margin: 0 10px 30px; font-weight: 730; }
.source span { width: 13px; height: 13px; border: 2px solid var(--accent); transform: rotate(45deg); }
.rail nav { display: grid; gap: 6px; }
.rail nav a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 11px; border: 1px solid transparent; border-radius: 7px; text-decoration: none; color: var(--muted); font-size: .91rem; }
.rail nav a:hover { background: #202837; color: #edf1fb; }
.rail nav [aria-current] { color: #dce4ff; border-color: #3b4b78; background: #202b48; }
.rail nav span { font-variant-numeric: tabular-nums; font-size: .76rem; }
.rail small { margin-left: auto; }
.origin { margin: 28px 10px 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: .79rem; color: var(--muted); }
.work { width: min(100%, 1050px); padding: 36px clamp(22px, 5vw, 66px); min-width: 0; }
.comparison { display: grid; grid-template-columns: 1fr 1fr; border-block: 1px solid var(--line); }
.comparison div { min-width: 0; padding: 13px 16px; overflow-wrap: anywhere; }
.comparison div + div { border-left: 1px solid var(--line); }
.comparison strong { display: block; margin-top: 3px; }
.label { color: var(--muted); font-size: .82rem; font-weight: 640; }
.actions, .edit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.actions { margin: 12px 0 32px; }
.badge { display: inline-flex; align-items: center; gap: 8px; color: #efcf93; font-size: .84rem; margin-right: auto; }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
h1 { font-size: 2.15rem; font-weight: 720; line-height: 1.15; letter-spacing: -.036em; text-wrap: balance; margin: 0 0 8px; }
h2, p { margin: 0; }
.lead, .hint { color: var(--muted); max-width: 65ch; }
.view { animation: show .17s ease-out; }
@keyframes show { from { opacity: .68; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.hypothesis { margin: 24px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 20px; }
#hypothesis-text { font-size: 1.2rem; font-weight: 570; margin: 8px 0 16px; overflow-wrap: anywhere; }
#editor { margin-top: 10px; }
#editor label { font-size: .92rem; font-weight: 650; }
textarea { display: block; width: 100%; min-height: 116px; resize: vertical; margin: 7px 0; border: 1px solid #63718b; border-radius: 7px; padding: 10px; font: inherit; background: #111722; color: inherit; }
.edit-actions { margin-top: 12px; }
button { cursor: pointer; min-height: 44px; border: 1px solid #536178; border-radius: 7px; padding: 8px 13px; font: inherit; font-size: .85rem; font-weight: 650; color: inherit; background: #1b2330; }
button:hover { background: #283449; }
button.primary { border-color: #4960e1; background: var(--blue); color: #fff; }
button.primary:hover { background: #304bd9; }
.metric { padding: 14px 0; border-top: 1px solid var(--line); }
.metric strong { display: block; margin: 3px 0; }
.metric p, dd { color: var(--muted); }
.metric a { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; }
.records { margin: 22px 0 0; border-top: 1px solid var(--line); }
.records > * { padding: 14px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.evidence code { display: block; margin-top: 6px; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
dt { font-weight: 700; }
dd { margin: 3px 0 0; }
ul { margin: 5px 0 0; padding-left: 20px; }
#status { margin-top: 14px; }
.error { color: #ffb8c0; }
.error:not(:empty) { padding: 10px 20px; background: #301f2a; }
@media (max-width: 690px) {
  .workspace { grid-template-columns: 1fr; }
  .rail { padding: 16px 16px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .source { margin: 0 0 12px; }
  .rail nav { display: flex; flex-wrap: wrap; }
  .rail nav a { padding-inline: 7px; gap: 5px; }
  .origin { margin: 8px 0 0; padding: 0; border: 0; }
  .work { padding: 20px 16px 32px; }
  .comparison div { padding: 9px; }
  h1 { font-size: 1.75rem; }
}
@media (prefers-reduced-motion: reduce) { .view { animation: none; } }

#loading, #open-example { margin: 24px; }
#open-example { display: inline-block; }
