:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: rgba(255,255,255,.96);
  --panel-solid: #ffffff;
  --panel-soft: #f7f9fa;
  --border: rgba(15,23,42,.11);
  --border-strong: rgba(15,23,42,.18);
  --text: #111318;
  --muted: #5f6b76;
  --muted-2: #7b8792;
  --accent: #206e95;
  --accent-strong: #195a79;
  --accent-dim: rgba(32,110,149,.10);
  --warn: #9a6a00;
  --danger: #c33d3d;
  --shadow: 0 20px 55px rgba(15,23,42,.06);
  --radius: 20px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); line-height: 1.5; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, .dropzone:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ambient-grid { position: fixed; inset: 0; pointer-events: none; opacity: .65; background-image: linear-gradient(rgba(15,23,42,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(15,23,42,.025) 1px, transparent 1px), radial-gradient(circle at 50% -10%, rgba(32,110,149,.08), transparent 38%); background-size: 44px 44px, 44px 44px, 100% 100%; mask-image: linear-gradient(to bottom, #000 0, rgba(0,0,0,.75) 60%, transparent 100%); }
.topbar { position: relative; z-index: 2; width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 22px 0; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.brand { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 22px; }
.brand-logo { display: block; width: 245px; height: auto; object-fit: contain; flex: 0 0 auto; }
.brand-app { display: grid; gap: 5px; line-height: 1.15; }
.brand-app strong { display: block; font-size: 20px; letter-spacing: -.015em; color: var(--text); font-weight: 750; }
.brand-app small { display: block; font-size: 13px; color: var(--muted); }
.header-actions { display: flex; gap: 8px; }
.text-button, .reset-button, .icon-button { border: 0; background: transparent; cursor: pointer; }
.text-button { padding: 8px 10px; color: var(--muted); font-size: 13px; border-radius: 9px; }
.text-button:hover { background: rgba(32,110,149,.06); color: var(--accent-strong); }
.shell { position: relative; z-index: 1; width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.hero { padding: 78px 0 52px; max-width: 890px; }
.eyebrow, .local-note { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-strong); font-size: 12px; letter-spacing: .055em; text-transform: uppercase; font-weight: 700; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(32,110,149,.10); flex: 0 0 auto; }
.hero h1 { margin: 18px 0 16px; font-size: clamp(40px, 6vw, 74px); letter-spacing: -.055em; line-height: .98; max-width: 920px; font-weight: 720; }
.hero-copy { max-width: 780px; color: var(--muted); font-size: clamp(16px, 2vw, 19px); margin: 0; }
.privacy-pill { display: inline-flex; align-items: center; gap: 9px; margin-top: 25px; padding: 9px 13px; background: var(--accent-dim); border: 1px solid rgba(32,110,149,.20); border-radius: 999px; color: var(--accent-strong); font-size: 13px; }
.privacy-pill svg { width: 16px; fill: currentColor; }
.workspace { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; }
.workspace-main { min-width: 0; display: grid; gap: 14px; }
.dropzone, .file-card, .analysis-card, .result-card, .options-card, .simple-actions { border: 1px solid var(--border); background: var(--panel); backdrop-filter: blur(18px); box-shadow: var(--shadow); border-radius: var(--radius); }
.dropzone { min-height: 340px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 38px; cursor: pointer; border-style: dashed; transition: .18s ease; }
.dropzone:hover, .dropzone.dragover { border-color: rgba(32,110,149,.42); background: #f8fbfd; transform: translateY(-1px); }
.upload-icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; background: var(--accent-dim); color: var(--accent-strong); margin-bottom: 16px; }
.upload-icon svg { width: 34px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dropzone h2 { margin: 0 0 5px; font-size: 22px; letter-spacing: -.02em; }
.dropzone p { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.secondary-button, .primary-button { border-radius: 11px; cursor: pointer; font-weight: 700; font-size: 13px; transition: .15s ease; }
.secondary-button { border: 1px solid var(--border-strong); background: #f7f9fa; padding: 10px 14px; }
.secondary-button:hover { background: #edf4f8; border-color: rgba(32,110,149,.28); color: var(--accent-strong); }
.primary-button { border: 1px solid rgba(32,110,149,.42); background: var(--accent); color: #ffffff; padding: 11px 15px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; }
.primary-button:hover:not(:disabled) { background: #80e9c8; transform: translateY(-1px); }
.primary-button:disabled { cursor: not-allowed; opacity: .38; }
.primary-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.file-card { min-height: 76px; padding: 13px 16px; display: flex; align-items: center; gap: 13px; }
.file-icon { width: 45px; height: 45px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-dim); color: var(--accent-strong); font-weight: 800; font-size: 11px; letter-spacing: .08em; }
.file-meta { min-width: 0; flex: 1; display: grid; gap: 3px; }
.file-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.file-meta span { color: var(--muted); font-size: 12px; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; color: var(--muted); }
.icon-button:hover { background: rgba(15,23,42,.055); color: var(--text); }
.icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.analysis-card, .result-card { padding: 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.section-heading.compact { margin-bottom: 8px; }
.section-kicker { display: block; text-transform: uppercase; letter-spacing: .09em; color: var(--accent-strong); font-size: 10px; font-weight: 800; margin-bottom: 4px; }
.section-heading h2, .result-card h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.version-badge { border: 1px solid var(--border); border-radius: 999px; padding: 6px 9px; color: var(--muted); font-size: 11px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stat { background: #f7f9fa; border: 1px solid rgba(15,23,42,.07); border-radius: 12px; padding: 13px; min-width: 0; }
.stat strong { display: block; font-size: 22px; line-height: 1; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.stat span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .055em; overflow-wrap: anywhere; }
.warnings { display: grid; gap: 8px; margin-top: 14px; }
.warning-item, .ok-item { display: flex; gap: 10px; padding: 11px 12px; border-radius: 11px; font-size: 12px; }
.warning-item { background: #fff8e8; color: #7b5500; border: 1px solid rgba(154,106,0,.18); }
.ok-item { background: #eefbf6; color: #176f56; border: 1px solid rgba(40,185,140,.18); }
.warning-symbol { font-weight: 900; flex: 0 0 auto; }
.options-card { padding: 22px; position: sticky; top: 18px; }
.reset-button { color: var(--muted-2); font-size: 11px; padding: 4px; }
.reset-button:hover { color: var(--text); }
.option-group { border-top: 1px solid var(--border); }
.toggle-row { display: grid; grid-template-columns: 1fr 38px; gap: 12px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.toggle-row > span:first-child { min-width: 0; }
.toggle-row strong { display: block; font-size: 12.5px; font-weight: 670; }
.toggle-row small { display: block; color: var(--muted-2); font-size: 10.5px; line-height: 1.35; margin-top: 3px; }
.toggle-row input { position: absolute; opacity: 0; pointer-events: none; }
.toggle { width: 36px; height: 21px; border-radius: 999px; background: #d9e0e4; position: relative; transition: .16s ease; }
.toggle::after { content: ""; width: 15px; height: 15px; position: absolute; top: 3px; left: 3px; border-radius: 50%; background: #8d98a2; transition: .16s ease; }
.toggle-row input:checked + .toggle { background: rgba(40,185,140,.24); }
.toggle-row input:checked + .toggle::after { left: 18px; background: var(--accent); }
.toggle-row input:focus-visible + .toggle { outline: 2px solid var(--accent); outline-offset: 3px; }
.option-subgroup { padding: 14px 0 16px; border-bottom: 1px solid var(--border); transition: opacity .2s; }
.option-subgroup.disabled { opacity: .35; pointer-events: none; }
.option-subgroup label { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-bottom: 9px; }
.option-subgroup output { color: var(--text); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--accent-strong); }
.secondary-options { border-top: 0; }
.protect-button { width: 100%; margin-top: 18px; padding: 13px 15px; }
.local-note { margin: 13px 0 0; width: 100%; justify-content: center; font-size: 9px; color: var(--muted-2); letter-spacing: .025em; }
.local-note .status-dot { width: 5px; height: 5px; }
.simple-actions { padding: 22px; display: grid; gap: 12px; }
.simple-actions .protect-button { width: 100%; margin-top: 0; padding: 13px 15px; }
.simple-actions .local-note { margin: 0; width: 100%; justify-content: center; font-size: 9px; color: var(--muted-2); letter-spacing: .025em; }
.result-card { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 15px; border-color: rgba(40,185,140,.24); }
.result-icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-dim); color: var(--accent-strong); }
.result-icon svg { width: 25px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.result-copy p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.result-actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.explain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 70px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--border); }
.explain-grid article { background: var(--bg); padding: 30px; min-height: 185px; }
.step { color: var(--accent-strong); font: 700 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.explain-grid h3 { margin: 26px 0 7px; font-size: 17px; }
.explain-grid p, .disclaimer p { color: var(--muted); font-size: 13px; margin: 0; }
.disclaimer { max-width: 760px; margin: 64px 0 100px; padding-left: 19px; border-left: 2px solid var(--accent-strong); }
.disclaimer h2 { font-size: 14px; margin: 0 0 7px; }
footer { position: relative; z-index: 1; width: min(1180px, calc(100% - 36px)); margin: 0 auto; border-top: 1px solid var(--border); padding: 24px 0 34px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted-2); font-size: 10px; }
.hidden { display: none !important; }
dialog { width: min(560px, calc(100% - 30px)); border: 1px solid var(--border-strong); border-radius: 18px; background: #ffffff; color: var(--text); padding: 24px; box-shadow: 0 35px 100px rgba(0,0,0,.58); }
dialog::backdrop { background: rgba(15,23,42,.22); backdrop-filter: blur(4px); }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 18px; }
.dialog h2 { margin: 0; font-size: 22px; }
dialog p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.toast { position: fixed; right: 20px; bottom: 20px; max-width: min(380px, calc(100% - 40px)); background: #ffffff; border: 1px solid var(--border-strong); border-radius: 11px; padding: 11px 14px; color: var(--text); font-size: 12px; box-shadow: var(--shadow); transform: translateY(18px); opacity: 0; pointer-events: none; transition: .2s ease; z-index: 20; }
.toast.show { transform: translateY(0); opacity: 1; }
@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .dropzone { min-height: 270px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .result-card { grid-template-columns: 46px 1fr; }
  .result-actions { grid-column: 1 / -1; justify-content: stretch; }
  .result-actions > * { flex: 1; }
}
@media (max-width: 620px) {
  .topbar, .shell, footer { width: min(100% - 24px, 1180px); }
  .brand-logo { width: 175px; height: auto; }
  .hero { padding: 52px 0 36px; }
  .hero h1 { font-size: 43px; }
  .dropzone { min-height: 245px; padding: 25px 16px; }
  .analysis-card, .result-card, .options-card, .simple-actions { padding: 18px; }
  .explain-grid { grid-template-columns: 1fr; }
  .explain-grid article { min-height: 0; }
  footer { flex-direction: column; }
}
