* { box-sizing: border-box; }
:root {
  color-scheme: dark;
  --page: #08090a;
  --surface: #111315;
  --surface-raised: #17191b;
  --line: #303336;
  --line-strong: #54585c;
  --text: #f0f1ef;
  --muted: #a3a6a8;
  --quiet: #777b7e;
  --focus: #f5f6f4;
  --danger: #d8b5b5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
html { min-width: 320px; background: var(--page); }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--page); font-size: 15px; line-height: 1.5; }
button, select { color: inherit; font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible + .button { outline: 2px solid var(--focus); outline-offset: 3px; }
.topbar { min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(18px, 4vw, 56px); border-bottom: 1px solid #202224; }
.wordmark { color: var(--text); text-decoration: none; font-size: 15px; font-weight: 650; letter-spacing: -.035em; }
.wordmark span { color: var(--quiet); font-weight: 400; }
.top-note, .eyebrow { color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .13em; }
.app-shell { width: min(100% - 36px, 960px); margin: 44px auto 56px; }
.intro { margin: 0 0 24px; }
.eyebrow { margin: 0 0 6px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(28px, 4vw, 38px); line-height: 1.12; letter-spacing: -.045em; font-weight: 620; }
.subtitle { margin: 8px 0 0; color: var(--muted); font-size: 16px; }
.workspace { padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.upload-well { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 14px; align-items: center; min-height: 134px; padding: 20px; border: 1px dashed #55595c; border-radius: 7px; background: #0d0f10; transition: border-color 140ms ease, background-color 140ms ease; }
.upload-well.is-dragging { border-color: #d8dadd; background: #17191b; }
.upload-well:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.upload-icon { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--text); font-size: 20px; }
.upload-copy h2 { margin: 0 0 3px; font-size: 16px; font-weight: 590; }
.supporting, .source-name { margin: 0; color: var(--muted); font-size: 13px; }
.source-name { color: var(--text); overflow-wrap: anywhere; }
.upload-actions { display: flex; align-items: center; gap: 9px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 0 15px; border: 1px solid var(--line-strong); border-radius: 5px; background: #16181a; color: var(--text); font-size: 13px; font-weight: 560; text-decoration: none; cursor: pointer; transition: background-color 120ms ease, border-color 120ms ease; }
.button:hover:not(:disabled) { background: #242729; border-color: #777c80; }
.button:active:not(:disabled) { background: #303437; }
.button:disabled { color: #777b7e; background: #151617; cursor: not-allowed; opacity: .72; }
.button-primary { color: #101112; border-color: #f0f1ef; background: #f0f1ef; }
.button-primary:hover:not(:disabled) { color: #08090a; background: #d9dbd9; border-color: #d9dbd9; }
.button-quiet, .text-button { padding-left: 9px; padding-right: 9px; color: var(--muted); border-color: transparent; background: transparent; }
.button-quiet:hover:not(:disabled), .text-button:hover { color: var(--text); background: #1b1d1f; border-color: #343739; }
.button-danger { color: var(--danger); border-color: #625252; background: #191516; }
.selection-meta { display: flex; justify-content: space-between; align-items: center; min-height: 44px; gap: 12px; padding: 4px 2px 0; color: var(--muted); font-size: 12px; }
.text-button { min-height: 40px; border-radius: 4px; font: inherit; cursor: pointer; }
.settings-row { display: flex; gap: 12px; align-items: end; padding-top: 18px; }
.field { display: grid; flex: 1; gap: 5px; color: var(--muted); font-size: 11px; }
.field select { width: 100%; min-height: 44px; padding: 0 34px 0 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-raised); color: var(--text); font-size: 13px; }
#convert-button { min-width: 126px; }
.settings-row .field { flex: 0 0 min(180px, 28%); }
.conversion-note { flex: 1; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.status-row { display: flex; align-items: center; gap: 14px; min-height: 48px; padding-top: 7px; }
#status { flex: 1; margin: 0; color: var(--muted); font-size: 12px; }
#status[data-state="error"] { color: #efbaba; }
#status[data-state="ready"] { color: #d7d9d8; }
progress { width: min(180px, 35%); height: 5px; appearance: none; border: 0; border-radius: 5px; overflow: hidden; background: #292c2e; }
progress::-webkit-progress-bar { background: #292c2e; }
progress::-webkit-progress-value { background: #c8cbca; }
progress::-moz-progress-bar { background: #c8cbca; }
.privacy-note { margin: 4px 0 0; color: #d0d2d0; font-size: 12px; }
.limits-note { max-width: 740px; margin: 5px 0 0; color: var(--quiet); font-size: 11px; }
.result { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.result-heading, .export-topline { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 14px; }
.result-heading h2, .export-topline h2 { margin: 0; font-size: 17px; font-weight: 580; letter-spacing: -.02em; }
.backdrop-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.backdrop-button { display: flex; gap: 6px; align-items: center; min-height: 44px; padding: 0 7px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.backdrop-button:hover, .backdrop-button[aria-pressed="true"] { border-color: var(--line-strong); color: var(--text); background: #191b1d; }
.swatch { display: block; width: 14px; height: 14px; border: 1px solid #777; border-radius: 2px; }
.swatch-light { background: #e9e9e5; }
.swatch-dark { background: #252729; }
.swatch-light-checker { background: conic-gradient(#ddd 25%, #fafafa 0 50%, #ddd 0 75%, #fafafa 0); background-size: 8px 8px; }
.swatch-dark-checker { background: conic-gradient(#36393b 25%, #191b1c 0 50%, #36393b 0 75%, #191b1c 0); background-size: 8px 8px; }
.swatch-neutral-grid { background: conic-gradient(#aaa 25%, #d7d7d1 0 50%, #aaa 0 75%, #d7d7d1 0); background-size: 8px 8px; }
.preview-stage { position: relative; display: grid; place-items: center; width: min(100%, calc(68vh * var(--preview-ratio, 1.77777778))); margin-inline: auto; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid #343638; border-radius: 5px; background-color: #e9e9e5; }
.preview-stage.backdrop-light { background: #e9e9e5; }
.preview-stage.backdrop-dark { background: #252729; }
.preview-stage.backdrop-light-checker { background-color: #fff; background-image: conic-gradient(#dededb 25%, transparent 0 50%, #dededb 0 75%, transparent 0); background-size: 24px 24px; }
.preview-stage.backdrop-dark-checker { background-color: #1b1d1f; background-image: conic-gradient(#36393b 25%, transparent 0 50%, #36393b 0 75%, transparent 0); background-size: 24px 24px; }
.preview-stage.backdrop-neutral-grid { background-color: #c9c9c4; background-image: conic-gradient(#ededeb 25%, transparent 0 50%, #ededeb 0 75%, transparent 0); background-size: 24px 24px; }
.preview-stage video, .preview-stage canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }
.preview-stage canvas { position: absolute; inset: 0; }
.preview-feedback { position: absolute; inset: auto 12px 10px; padding: 7px 10px; margin: 0; border-radius: 4px; background: rgb(0 0 0 / 78%); color: #fff; font-size: 12px; text-align: center; }
.preview-controls { display: flex; justify-content: space-between; align-items: center; min-height: 46px; gap: 12px; }
.source-info { margin: 0; color: var(--muted); font-size: 11px; }
.exports { padding-top: 16px; border-top: 1px solid var(--line); }
.export-topline { margin-bottom: 8px; }
.download-zip { min-width: 130px; }
.file-list { display: grid; gap: 0; margin: 0 0 14px; padding: 0; list-style: none; }
.file-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 2px; border-bottom: 1px solid #26292b; color: var(--muted); font-size: 12px; }
.file-list a { color: var(--text); text-decoration-color: #6d7174; text-underline-offset: 3px; }
.file-size { white-space: nowrap; color: var(--quiet); font-size: 11px; }
.snippet-details { border-top: 1px solid #26292b; padding-top: 10px; }
.snippet-details summary { color: var(--muted); font-size: 12px; cursor: pointer; }
.snippet-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; }
.snippet-row pre { flex: 1; min-width: 0; max-height: 140px; overflow: auto; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 4px; background: #0c0d0e; color: #dbdddc; white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.copy-feedback { min-height: 18px; margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.preview-switch { display: flex; gap: 7px; margin: 0 0 10px; }
.preview-choice { min-height: 44px; padding: 0 15px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.preview-choice:hover, .preview-choice[aria-pressed="true"] { border-color: var(--line-strong); background: #1a1c1e; color: var(--text); }
.preview-choice:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.all-files-note { margin: 0 0 12px; color: var(--quiet); font-size: 11px; }
.download-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.download-group { min-width: 0; padding: 14px; border: 1px solid #2c2f31; border-radius: 6px; background: #0d0f10; }
.group-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 8px; }
.group-heading h3 { margin: 0; font-size: 15px; line-height: 1.3; font-weight: 580; }
.group-kind { margin: 0 0 3px; color: var(--muted); font-size: 9px; font-weight: 650; letter-spacing: .12em; }
.group-download { min-height: 44px; padding: 0 11px; white-space: nowrap; font-size: 11px; }
.group-summary { min-height: 36px; margin: 0 0 8px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.file-list { margin-bottom: 10px; }
.file-list li { align-items: flex-start; padding: 9px 1px; }
.file-content { min-width: 0; display: grid; gap: 3px; }
.file-content > a { overflow-wrap: anywhere; }
.file-guidance { display: grid; gap: 1px; }
.file-kind { color: #c1c4c3; font-size: 9px; font-weight: 650; letter-spacing: .07em; }
.file-description { color: var(--muted); font-size: 10px; line-height: 1.4; }
.browser-marks { display: flex; align-items: center; gap: 5px; min-height: 22px; margin-top: 2px; }
.browser-mark { display: block; width: 20px; height: 20px; object-fit: contain; }
.implementation-info { margin-top: 18px; border-top: 1px solid #26292b; }
.implementation-info summary { min-height: 44px; display: flex; align-items: center; color: var(--muted); font-size: 12px; cursor: pointer; }
.implementation-copy { max-width: 780px; padding: 0 2px 4px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.implementation-copy p { margin: 0 0 8px; }
.implementation-copy ul { margin: 0 0 9px; padding-left: 18px; }
.implementation-copy li { margin: 0 0 5px; }
.implementation-copy strong { color: var(--text); font-weight: 580; }
.implementation-copy code { color: var(--text); font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.page-footer { margin-top: 18px; color: var(--quiet); font-size: 11px; text-align: center; }
[hidden] { display: none !important; }
@media (max-width: 640px) {
  .topbar { min-height: 54px; }
  .app-shell { width: min(100% - 24px, 960px); margin: 30px auto 36px; }
  .workspace { padding: 12px; }
  .upload-well { grid-template-columns: 32px minmax(0, 1fr); min-height: 158px; gap: 10px; padding: 15px; }
  .upload-icon { width: 32px; height: 32px; }
  .upload-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .settings-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .settings-row .field { flex: initial; }
  .conversion-note { grid-column: 1 / -1; grid-row: 2; }
  #convert-button { grid-column: 1 / -1; width: 100%; }
  .status-row { flex-wrap: wrap; }
  progress { flex: 1; }
  .result-heading { display: block; }
  .backdrop-controls { justify-content: flex-start; gap: 1px; margin-top: 11px; }
  .backdrop-button { padding: 0 5px; }
  .backdrop-label { font-size: 9px; }

  .snippet-row { flex-direction: column; }
  .snippet-row pre, .snippet-row button { width: 100%; }
  .download-groups { grid-template-columns: minmax(0, 1fr); }
  .group-heading { align-items: flex-start; }
  .group-summary { min-height: 0; }
  .download-group { padding: 12px; }
}
@media (max-width: 390px) {
  .backdrop-button { gap: 4px; padding: 0 3px; }
  .backdrop-label { font-size: 8px; }
  .swatch { width: 12px; height: 12px; }
  .button { padding-left: 12px; padding-right: 12px; }
}
@font-face{font-family:NeueBit;src:url('/fonts/PPNeueBit-Regular.ttf') format('truetype');font-weight:400;font-display:block}
@font-face{font-family:NeueBit;src:url('/fonts/PPNeueBit-Bold.ttf') format('truetype');font-weight:700;font-display:block}
:root{color-scheme:dark;--page:#000000;--surface:#080808;--surface-raised:#111111;--line:#2a2a2a;--line-strong:#555555;--text:#f0f0ed;--muted:#a4a4a4;--quiet:#777777;--focus:#ffffff;--danger:#ffb8b8;font-family:NeueBit,sans-serif;font-synthesis:none}
html,body{min-width:0;background:var(--page)}
body{font-family:NeueBit,sans-serif;font-size:20px;line-height:1.15;-webkit-font-smoothing:antialiased}
button,select,input,.snippet-row pre,.implementation-copy code{font-family:NeueBit,sans-serif;font-synthesis:none}
h1,h2,h3{font-weight:400;letter-spacing:0}
.topbar,.page-footer{display:none}
.app-shell{width:min(100% - 40px,1120px);margin:0 auto;padding:16px 0 22px}
.intro{margin:0 0 18px}
.intro .eyebrow,.top-note{font-size:18px;letter-spacing:.04em}
.intro h1{font-size:48px;line-height:1}
.intro .subtitle{font-size:24px;margin-top:6px}
.workspace{padding:0;border:0;border-radius:0;background:transparent}
.upload-well{min-height:112px;padding:17px 20px;border-radius:2px;background:#050505}
.upload-copy h2{font-size:24px}
.supporting,.source-name{font-size:18px}
.button{font-size:20px}
.field{font-size:18px}
.field select{font-size:20px}
.conversion-note,#status{font-size:18px}
.privacy-note{font-size:18px}
.limits-note{font-size:16px;line-height:1.2}
.selection-meta{font-size:18px}
.download-group{border-radius:2px;background:#050505}
@media(max-width:640px){.app-shell{width:calc(100% - 28px);padding-top:12px}.intro h1{font-size:40px}.intro .subtitle{font-size:21px}.upload-well{min-height:118px;padding:14px}.upload-copy h2{font-size:21px}.supporting,.source-name,.conversion-note,#status,.privacy-note{font-size:17px}.limits-note{font-size:15px}.settings-row{grid-template-columns:1fr 1fr}.button{font-size:18px}}
/* NeueBit's glyph metrics need a genuine utility-text scale in every output,
   not only the upload view. Let controls wrap rather than shrinking labels. */
.limits-note,.source-info,.file-size,.file-kind,.file-description,.group-kind,.all-files-note,.copy-feedback,.backdrop-button,.backdrop-label,.snippet-details summary,.implementation-info summary{font-size:18px}
.group-summary,.implementation-copy,.implementation-copy code,.snippet-row pre,.file-list li,.group-download,.preview-choice{font-size:20px}
.snippet-row pre{line-height:1.25}
.result-heading h2,.export-topline h2{font-size:30px}
.group-heading h3{font-size:26px}
.preview-switch,.group-heading,.export-topline{flex-wrap:wrap}
:root[data-theme=light]{--quiet:#626766;--line-strong:#9da3a0;--danger:#8c3939}
:root[data-theme=light] .upload-well,:root[data-theme=light] .download-group,:root[data-theme=light] .snippet-row pre{background:var(--surface);color:var(--text);border-color:var(--line)}
:root[data-theme=light] .button:not(.button-primary),:root[data-theme=light] .preview-choice,:root[data-theme=light] .backdrop-button{color:var(--text);background:var(--surface);border-color:var(--line)}
:root[data-theme=light] .button-primary{color:var(--page);background:var(--text);border-color:var(--text)}
:root[data-theme=light] .privacy-note,:root[data-theme=light] .file-kind{color:var(--muted)}
:root[data-theme=light] .file-list li,:root[data-theme=light] .snippet-details,:root[data-theme=light] .implementation-info{border-color:var(--line)}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
