:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e7eced;
  background: #0c1115;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --muted: #929da3;
  --border: #293238;
  --gold: #e4c794;
  --mint: #97c4b1;
  --panel: #111a21;
  --panel-raised: #151f27;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; min-height: 100vh; background: radial-gradient(circle at 8% 20%, #9d792019, transparent 27%), radial-gradient(circle at 94% 66%, #22465b19, transparent 31%), #091016; }
button, input { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .42; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
input:focus-visible + * { outline: 2px solid var(--gold); }
h1, h2, h3, p { margin: 0; }
.site-header { min-height: 82px; border-bottom: 1px solid #2a353d; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px max(32px, calc((100vw - 1440px) / 2)); background: #0b1218cc; }
.brand { display: inline-flex; align-items: center; gap: 13px; font-size: 15px; font-weight: 650; letter-spacing: .015em; }
.brand-mark { width: 39px; height: 39px; border: 1px solid #897859; border-radius: 11px; display: grid; place-items: center; color: var(--gold); background: linear-gradient(145deg, #27251f, #101820); box-shadow: inset 0 0 0 4px #0d141a; font: 20px Georgia, serif; }
.brand-subtitle { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; letter-spacing: .1em; font-weight: 450; }
.header-note { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); }
.workspace { max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: minmax(330px, .78fr) minmax(450px, 1.22fr); gap: 56px; padding: 52px 32px 72px; }
.source-column { min-width: 0; }
.eyebrow { color: var(--gold); font-size: 10px; letter-spacing: .16em; font-weight: 650; }
h1 { font: 43px/1.12 Georgia, "Times New Roman", serif; letter-spacing: -.035em; margin-top: 13px; color: #f0eee8; }
.section-heading > p { margin-top: 14px; max-width: 390px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.reference-frame { position: relative; margin-top: 29px; min-height: 330px; height: clamp(300px, 34vw, 458px); display: grid; place-items: center; background: linear-gradient(145deg, #111b22, #0d151b); border: 1px solid #34414a; border-radius: 16px; overflow: hidden; box-shadow: inset 0 0 60px #00000028, 0 18px 40px #0000001c; }
.reference-frame::before { content: ""; position: absolute; inset: 16px; border: 1px solid #56646d25; border-radius: 10px; pointer-events: none; }
.frame-corner { position: absolute; z-index: 2; width: 35px; height: 35px; pointer-events: none; }
.frame-corner-top { top: 15px; left: 15px; border-top: 1px solid #c9aa6b99; border-left: 1px solid #c9aa6b99; }
.frame-corner-bottom { right: 15px; bottom: 15px; border-right: 1px solid #c9aa6b99; border-bottom: 1px solid #c9aa6b99; }
.reference-frame img { width: 100%; height: 100%; max-height: 458px; display: block; object-fit: contain; }
.reference-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 28px; }
.reference-empty svg { color: #9b895f; margin-bottom: 11px; filter: drop-shadow(0 8px 16px #0006); }
.reference-empty strong { font-size: 14px; font-weight: 500; color: #c1cbce; }
.reference-empty span { max-width: 220px; font-size: 12px; line-height: 1.5; color: #7e8a91; }
.file-row { display: flex; align-items: center; gap: 14px; margin-top: 16px; min-width: 0; }
.file-button { border: 1px solid #4b5962; background: linear-gradient(#202b33, #172129); border-radius: 8px; color: #e2e8ea; font-size: 12px; font-weight: 550; padding: 11px 15px; cursor: pointer; white-space: nowrap; }
.file-button:hover { border-color: #74818a; }
.file-row:has(input:disabled) .file-button { opacity: .45; cursor: not-allowed; }
.file-row:has(input:focus-visible) .file-button { outline: 2px solid var(--gold); outline-offset: 4px; }
.file-details { color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; min-width: 0; }
.file-help { margin-top: 10px; font-size: 11px; }
.muted { color: var(--muted); }
.primary-button { width: 100%; display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 23px; border: 1px solid #f1d6a5; border-radius: 9px; padding: 15px 20px; background: linear-gradient(135deg, #edd39f, #d9b976); color: #25231e; box-shadow: 0 10px 24px #00000024; font-size: 13px; font-weight: 700; }
.primary-button:hover:not(:disabled) { background: #f0d6ab; }
.primary-button:disabled { background: #3c3931; border-color: #5e5646; color: #bfb5a5; opacity: .7; }
.progress-box { position: relative; margin-top: 19px; padding: 17px 18px; background: linear-gradient(135deg, #172329, #121b21); border: 1px solid #365048; border-radius: 10px; box-shadow: inset 3px 0 0 #70a38d; }
.progress-heading { display: flex; justify-content: space-between; gap: 16px; color: #d3e2dd; font-size: 12px; }
.progress-heading strong { font-weight: 550; overflow-wrap: anywhere; }
.progress-heading > span { font-variant-numeric: tabular-nums; }
progress { display: block; width: 100%; height: 6px; appearance: none; accent-color: var(--mint); border: 0; border-radius: 8px; overflow: hidden; margin: 14px 0 12px; background: #2c383d; }
progress::-webkit-progress-bar { background: #2c383d; border-radius: 8px; }
progress::-webkit-progress-value { background: var(--mint); border-radius: 8px; }
progress::-moz-progress-bar { background: var(--mint); }
progress:not([value]) { opacity: .55; }
#progress-message { color: #98b0a8; font-size: 11px; line-height: 1.5; }
.error-message { margin-top: 16px; padding: 13px 15px; color: #f1b9b1; background: #2a1c1c; border: 1px solid #64403b; border-radius: 7px; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.scope-note { margin-top: 26px; display: flex; gap: 11px; align-items: flex-start; border: 1px solid #293840; border-radius: 10px; padding: 16px; background: #101921a8; }
.note-marker { color: var(--gold); width: 17px; height: 17px; border: 1px solid #72664f; border-radius: 50%; font: 11px/16px Georgia, serif; text-align: center; flex: 0 0 17px; }
.scope-note strong { display: block; color: #d3d7d5; font-size: 11px; font-weight: 550; margin-bottom: 6px; }
.scope-note p { color: var(--muted); font-size: 11px; line-height: 1.6; }
.privacy-note { margin: 14px 4px 0; color: #75848c; font-size: 10px; line-height: 1.7; max-width: 420px; }
.results-column { min-width: 0; border: 1px solid #2a363e; border-radius: 17px; padding: 29px 31px 31px; background: linear-gradient(160deg, #111a22e8, #0d151be8); box-shadow: 0 22px 50px #00000020; }
.results-heading-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
h2 { font-size: 24px; font-weight: 450; line-height: 1.35; letter-spacing: -.035em; margin-top: 12px; }
.state-badge { flex-shrink: 0; font-size: 10px; color: #a8b3b7; border: 1px solid #3b464c; border-radius: 20px; padding: 7px 10px; margin-bottom: 4px; background: #11191f; }
.state-badge[data-state="ready"] { color: var(--mint); border-color: #3d5c50; background: #14251e; }
.result-description { margin-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.setup-info { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 20px; margin-top: 24px; padding: 19px; background: #141e25; border: 1px solid #303c44; border-radius: 11px; }
.setup-info > div { min-width: 0; }
.setup-info span { display: block; font-size: 10px; color: var(--muted); margin-bottom: 7px; }
.setup-info strong { font-size: 13px; font-weight: 550; color: #e6d8bf; overflow-wrap: anywhere; }
.setup-status { grid-column: 1 / -1; padding-top: 12px; border-top: 1px solid var(--border); font-size: 10px; color: #96a3ab; line-height: 1.5; overflow-wrap: anywhere; }
.parameter-panel { min-height: 390px; }
.result-empty { min-height: 390px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; margin-top: 20px; padding: 45px 32px; border: 1px dashed #2f3b43; border-radius: 12px; background: #0c141a85; }
.empty-symbol { color: #62717a; font: 37px/1 Georgia, serif; margin-bottom: 20px; }
.result-empty h3 { font-size: 15px; color: #b3bfc4; font-weight: 500; }
.result-empty p { max-width: 310px; margin-top: 12px; color: #78868e; font-size: 12px; line-height: 1.8; }
.parameter-group { margin-top: 27px; padding: 18px 19px 4px; border: 1px solid #29353d; border-radius: 11px; background: #101920; }
.group-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; padding-bottom: 10px; border-bottom: 1px solid #273239; }
.group-heading h3 { font-size: 12px; font-weight: 600; color: #e2cda7; }
.group-heading > span { color: #74858d; font-size: 10px; white-space: nowrap; }
.parameter-row { padding: 17px 0 16px; border-bottom: 1px solid #263139; }
.parameter-row:last-child { border-bottom: 0; }
.parameter-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; }
.parameter-label { font-size: 12px; color: #d4dde0; line-height: 1.5; }
.parameter-value { font-size: 17px; color: #e4c794; font-weight: 500; font-variant-numeric: tabular-nums; }
.parameter-track { height: 5px; background: #2d373d; border-radius: 4px; overflow: hidden; margin-top: 12px; }
.parameter-track > span { height: 100%; display: block; background: #bda779; border-radius: 4px; }
.parameter-metadata { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 9px; color: #73848e; font-size: 9px; }
.parameter-metadata code { font: 9px ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.parameter-metadata > span { white-space: nowrap; }
.parameter-reason { font-size: 10px; line-height: 1.6; color: #98a4ab; margin-top: 9px; }
.warnings-box { margin-top: 25px; border-left: 2px solid #8f7a53; padding: 2px 0 2px 14px; }
.warnings-box h3 { font-size: 11px; font-weight: 550; color: #c9b38d; }
.warnings-box ul { margin: 9px 0 0; padding-left: 14px; }
.warnings-box li { color: #8d9ca4; font-size: 11px; line-height: 1.7; padding-bottom: 5px; }
.results-footnote { border-top: 1px solid var(--border); padding-top: 17px; margin-top: 20px; font-size: 10px; color: #73828b; line-height: 1.7; }
.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; }

@media (max-width: 1120px) {
  .workspace { gap: 30px; padding-top: 36px; grid-template-columns: minmax(280px, .9fr) minmax(360px, 1.1fr); }
  .results-column { padding: 25px 24px 28px; }
  .setup-info { grid-template-columns: 1fr 1fr; }
  .results-heading-row { flex-wrap: wrap; gap: 10px; }
  .state-badge { margin: 0; }
}
@media (max-width: 780px) {
  .site-header { padding: 18px 22px; min-height: 75px; }
  .workspace { grid-template-columns: 1fr; gap: 38px; padding: 30px 22px 44px; max-width: 620px; }
  .results-column { padding: 25px 24px 28px; }
  .reference-frame { height: 410px; }
  .reference-frame img { max-height: 410px; }
  .section-heading > p { max-width: none; }
  .result-empty { min-height: 285px; }
  .parameter-panel { min-height: 285px; }
  .results-heading-row { flex-wrap: nowrap; }
  .privacy-note { max-width: none; }
}
@media (max-width: 420px) {
  .site-header { padding: 15px 17px; }
  .header-note { display: none; }
  .workspace { padding: 28px 17px 40px; gap: 31px; }
  h1 { font-size: 35px; }
  h2 { font-size: 21px; }
  .reference-frame { min-height: 280px; height: 340px; }
  .reference-frame img { max-height: 340px; }
  .results-heading-row { flex-wrap: wrap; }
  .setup-info { padding: 16px; grid-template-columns: 1fr; }
  .setup-status { grid-column: 1; }
  .result-empty { padding-right: 12px; padding-left: 12px; }
  .results-column { padding: 22px 16px 24px; border-radius: 14px; }
  .parameter-group { padding: 16px 14px 3px; }
  .parameter-metadata { align-items: flex-start; flex-direction: column; gap: 5px; }
  .parameter-metadata > span { white-space: normal; }
}
@media (max-width: 350px) {
  .site-header { padding-right: 14px; padding-left: 14px; }
  .workspace { padding-right: 14px; padding-left: 14px; }
  .brand { gap: 10px; font-size: 13px; }
  .file-row { align-items: flex-start; flex-direction: column; }
  .file-button { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
