:root {
  color-scheme: light;
  --ink: #102344;
  --muted: #536782;
  --soft: #53647a;
  --line: #d9e3f0;
  --paper: #f6f9ff;
  --white: #fff;
  --blue: #2563eb;
  --blue-dark: #1949bb;
  --blue-soft: #e8f0ff;
  --green: #117858;
  --red: #b84343;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); }
button, textarea, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.topbar { min-height: 68px; padding: env(safe-area-inset-top) max(18px, 5vw, env(safe-area-inset-right)) 0 max(18px, 5vw, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 19px; font-weight: 760; letter-spacing: -.035em; }
.brand svg { width: 31px; height: 31px; fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.brand-light { font-weight: 480; color: var(--blue); }
.topbar-right { display: flex; align-items: center; gap: clamp(10px, 2vw, 24px); }
.source-chip, .computed-chip { display: inline-flex; align-items: center; gap: 8px; color: #275b48; background: #e7f5ef; border-radius: 99px; padding: 7px 11px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #17936b; }
.repo-link { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 650; }
.repo-link:hover { color: var(--blue); }
main { width: min(1220px, calc(100% - 36px)); margin: 0 auto; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 32px; padding: 48px 0 32px; }
.intro-copy { max-width: 700px; }
.eyebrow, .panel-kicker { margin: 0 0 9px; color: var(--blue); font-size: 11px; font-weight: 760; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(36px, 5vw, 58px); line-height: 1.02; letter-spacing: -.04em; font-weight: 760; }
h1 span { color: var(--blue); }
.lede { max-width: 62ch; margin: 16px 0 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.primary-button, .button { border: 1px solid transparent; border-radius: 10px; min-height: 42px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 680; text-decoration: none; cursor: pointer; transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease; }
.primary-button { background: var(--blue); color: #fff; white-space: nowrap; }
.primary-button:hover, .button-primary:hover { background: var(--blue-dark); transform: translateY(-1px); }
.workbench { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; gap: 16px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 15px; padding: clamp(18px, 2.2vw, 26px); min-width: 0; }
.panel-heading { display: flex; justify-content: space-between; align-items: start; gap: 14px; }
.panel-kicker { margin-bottom: 4px; font-size: 10px; letter-spacing: .12em; }
h2 { margin: 0; font-size: 21px; line-height: 1.2; letter-spacing: -.025em; }
.format-pill { padding: 6px 9px; background: #f0f4f9; color: var(--muted); border-radius: 99px; font-size: 11px; white-space: nowrap; }
.panel-description { min-height: 42px; max-width: 62ch; margin: 12px 0 16px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.input-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; }
.button { min-height: 35px; padding: 0 11px; border-radius: 8px; font-size: 12px; }
.button-secondary { border-color: var(--line); background: #fff; color: #29415f; }
.button-secondary:hover { border-color: #9fb7d8; background: #f5f8fd; }
.button-quiet { background: transparent; color: var(--muted); }
.button-quiet:hover { background: #f0f4f9; color: var(--ink); }
.button-primary { background: var(--blue); color: #fff; }
textarea { display: block; width: 100%; min-height: 365px; resize: vertical; border: 1px solid #c9d6e6; border-radius: 10px; background: #f8faff; color: #18345d; padding: 14px; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 2; }
textarea:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #7facff; outline-offset: 2px; }
.editor-footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 9px; color: var(--soft); font-size: 11px; line-height: 1.4; }
.editor-footer span:last-child { white-space: nowrap; }
.error-message { margin: 11px 0 0; color: var(--red); font-size: 13px; line-height: 1.4; }
.computed-chip { color: #275b48; }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.metric { border: 1px solid #e0e8f2; border-radius: 11px; padding: 14px; min-height: 112px; }
.metric-label { margin: 0; color: var(--muted); font-size: 12px; font-weight: 620; }
.metric-value { margin: 10px 0 4px; font-size: clamp(23px, 3vw, 32px); line-height: 1; letter-spacing: -.04em; font-weight: 750; color: var(--ink); overflow-wrap: anywhere; }
.metric-value.unavailable { font-size: 16px; letter-spacing: -.01em; color: var(--soft); font-weight: 620; }
.metric-source { color: var(--soft); font-size: 10px; line-height: 1.4; }
.result-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 15px; padding-top: 14px; border-top: 1px solid #e5ebf2; color: var(--muted); font-size: 11px; }
.result-actions { display: flex; gap: 7px; }
.toast { min-height: 18px; margin: 9px 0 0; color: var(--green); font-size: 11px; }
.method { padding: 30px 0 36px; }
.method-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.method-head h2 { font-size: 19px; }
.method-head span { color: var(--soft); font-size: 11px; }
.definitions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.definitions p { margin: 0; padding: 14px; background: #fff; color: var(--muted); font-size: 11px; line-height: 1.5; }
.definitions strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 12px; }
.limit-note { margin: 12px 0 0; color: var(--soft); font-size: 11px; line-height: 1.5; }
.footer { display: flex; justify-content: space-between; gap: 18px; padding: 18px max(18px, 5vw, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, 5vw, env(safe-area-inset-left)); border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 11px; }
.footer-mark { margin: 0 5px; color: #a6b5c9; }
.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; }
[hidden] { display: none !important; }
@media (max-width: 850px) {
  .workbench { grid-template-columns: 1fr; }
  textarea { min-height: 300px; }
  .definitions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intro { align-items: start; flex-direction: column; padding-top: 38px; }
  .intro .primary-button { align-self: flex-start; }
}
@media (max-width: 520px) {
  .topbar { min-height: 60px; padding-inline: 16px; }
  .brand { font-size: 17px; }
  .brand svg { width: 27px; height: 27px; }
  .source-chip { max-width: 138px; overflow: hidden; text-overflow: ellipsis; font-size: 10px; }
  .repo-link { font-size: 11px; white-space: nowrap; }
  main { width: min(100% - 24px, 1220px); }
  .intro { gap: 20px; padding: 32px 0 24px; }
  h1 { font-size: clamp(34px, 10vw, 47px); }
  .lede { font-size: 14px; }
  .panel { padding: 16px; border-radius: 12px; }
  .panel-description { min-height: 0; font-size: 12px; }
  .format-pill { font-size: 10px; }
  .input-actions .button { flex: 1 1 auto; }
  textarea { min-height: 275px; padding: 11px; font-size: 11px; }
  .metric { min-height: 98px; padding: 11px; }
  .metric-value { font-size: 25px; }
  .result-footer, .method-head { align-items: flex-start; flex-direction: column; }
  .definitions { grid-template-columns: 1fr; }
  .definitions p { padding: 12px; }
  .footer { flex-direction: column; padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
