@font-face { font-family: "Instrument Sans"; src: url("../fonts/InstrumentSans-var.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  color-scheme: light dark;
  --ink: #16181d; --muted: #646a76; --faint: #8b909b; --line: #e3e0da; --paper: #ffffff; --canvas: #f6f4f0; --raised: #faf8f4;
  --accent: #e8590c; --accent-hover: #d14f08; --accent-soft: #fdebe0; --accent-ink: #b8430a;
  --ok: #1b7a4f; --ok-soft: #e3f4ea; --warn: #a8670a; --warn-soft: #fbefd5; --bad: #b3261e; --bad-soft: #fde7e5;
  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(22, 24, 29, .05), 0 8px 24px rgba(22, 24, 29, .06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f1efe9; --muted: #aaa89f; --faint: #7f7d76; --line: #2f2e2b; --paper: #1b1a18; --canvas: #121110; --raised: #232220;
    --accent: #f06a1f; --accent-hover: #ff7d36; --accent-soft: #3a2316; --accent-ink: #ff9a5c;
    --ok: #55c58c; --ok-soft: #153324; --warn: #e6b24d; --warn-soft: #382b10; --bad: #ff8a80; --bad-soft: #3a1b18;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --ink: #f1efe9; --muted: #aaa89f; --faint: #7f7d76; --line: #2f2e2b; --paper: #1b1a18; --canvas: #121110; --raised: #232220;
    --accent: #f06a1f; --accent-hover: #ff7d36; --accent-soft: #3a2316; --accent-ink: #ff9a5c;
    --ok: #55c58c; --ok-soft: #153324; --warn: #e6b24d; --warn-soft: #382b10; --bad: #ff8a80; --bad-soft: #3a1b18;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header / footer */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav { display: flex; gap: 2px; margin-left: 8px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav a { padding: 7px 12px; border-radius: 9px; color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 550; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--raised); }
.nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 11px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-weight: 600; font-size: 14.5px; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn.small { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn.big { padding: 13px 22px; font-size: 16px; border-radius: 13px; }
.site-footer { margin-top: 72px; border-top: 1px solid var(--line); background: var(--paper); padding: 36px 0 44px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: grid; gap: 20px; grid-template-columns: 1.4fr 1fr 1fr; }
.site-footer h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); }
.site-footer a { display: block; color: var(--muted); text-decoration: none; padding: 2px 0; }
.site-footer a:hover { color: var(--accent-ink); }
.site-footer p { margin: 8px 0 0; max-width: 40ch; }

/* ---------- hero */
.hero { padding: 52px 0 28px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 10px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 13px; font-weight: 600; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.hero h1 { margin: 18px auto 12px; max-width: 18ch; font-size: clamp(34px, 6vw, 56px); line-height: 1.04; letter-spacing: -.03em; font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { margin: 0 auto; max-width: 60ch; color: var(--muted); font-size: 18px; }

/* ---------- dropzone */
.drop { display: grid; place-items: center; text-align: center; gap: 6px; padding: 44px 24px; border: 2px dashed #d3cec4; border-radius: 20px; background: var(--paper); cursor: pointer; transition: border-color .15s, background .15s; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .drop { border-color: #444138; } }
:root[data-theme="dark"] .drop { border-color: #444138; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .icon { width: 52px; height: 52px; border-radius: 15px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 4px; }
.drop strong { font-size: 19px; letter-spacing: -.01em; }
.drop span { color: var(--muted); font-size: 14.5px; }
.drop.compact { padding: 22px 18px; border-radius: 16px; }
.drop.compact .icon { width: 40px; height: 40px; border-radius: 12px; }
.drop.compact strong { font-size: 16px; }
.drop.filled { border-style: solid; border-color: var(--line); cursor: default; }
.drop input { display: none; }
.drop .inner { display: grid; justify-items: center; gap: 6px; width: 100%; }

/* ---------- panels */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-pad { padding: 20px; }
.panel h2, .panel h3 { margin: 0 0 4px; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.stack { display: grid; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tool { margin-top: 8px; }
.notice { padding: 11px 14px; border-radius: 11px; font-size: 14px; background: var(--accent-soft); color: var(--accent-ink); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.bad { background: var(--bad-soft); color: var(--bad); }

/* ---------- viewer */
.viewer { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 20px; margin-top: 20px; align-items: start; }
.preview { overflow: hidden; }
.preview .frame { background: var(--raised); line-height: 0; }
.preview img { width: 100%; height: auto; max-height: 560px; object-fit: cover; }
.preview .meta { padding: 14px 16px 16px; display: grid; gap: 8px; }
.preview .file { font-weight: 650; word-break: break-all; line-height: 1.3; }
.facts { display: grid; gap: 7px; margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.facts dt { color: var(--muted); flex: none; }
.facts dd { margin: 0; text-align: right; font-weight: 550; word-break: break-word; }
.flags { display: grid; gap: 8px; }
.flag { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--paper); }
.flag b { font-size: 14px; }
.flag span { grid-column: 2; color: var(--muted); font-size: 13px; }
.flag::before { content: ""; width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; background: var(--faint); grid-row: 1; }
.flag.high { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); background: var(--bad-soft); } .flag.high::before { background: var(--bad); }
.flag.medium { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); } .flag.medium::before { background: var(--warn); }
.flag.low::before { background: var(--faint); }
.results-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.search { flex: 1 1 200px; min-width: 160px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--raised); }
.search:focus { outline: 2px solid var(--accent); border-color: transparent; }
.headline { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.headline .cam { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.headline .exp { font-family: var(--mono); color: var(--accent-ink); margin-top: 6px; font-size: 15px; }
.headline .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.group { border-bottom: 1px solid var(--line); }
.group:last-child { border-bottom: 0; }
.group h3 { margin: 0; padding: 14px 20px 8px; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); display: flex; justify-content: space-between; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 7px 20px; text-align: left; font-size: 14px; vertical-align: top; }
.tbl th { width: 40%; font-weight: 500; color: var(--muted); }
.tbl td { font-family: var(--mono); font-size: 13px; word-break: break-word; }
.tbl tr:hover { background: var(--raised); }
.tbl tr[hidden] { display: none; }
.map-link { font-family: var(--font); font-weight: 600; }
.empty { padding: 36px 24px; text-align: center; color: var(--muted); }
.empty h3 { margin: 0 0 6px; color: var(--ink); font-size: 19px; }
.xmp-raw { margin: 0; padding: 14px 20px; background: var(--raised); font: 12px/1.5 var(--mono); max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-all; }

/* ---------- forms */
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.field { display: grid; gap: 4px; }
.field.wide { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea { padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--raised); width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.field small { color: var(--faint); font-size: 12px; }
.fieldset-title { grid-column: 1 / -1; margin: 10px 0 -2px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); font-weight: 650; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.check small { display: block; color: var(--muted); font-size: 13px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.slot { position: relative; }
.slot-title { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; font-weight: 650; color: var(--faint); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.slot-title i { font-style: normal; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; letter-spacing: 0; }
.thumb-row { display: flex; gap: 12px; align-items: center; }
.thumb-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); flex: none; }
.thumb-row .name { font-weight: 600; word-break: break-all; line-height: 1.3; }
.compare { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.compare .head, .compare .line { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 12px; padding: 8px 14px; font-size: 13.5px; }
.compare .head { background: var(--raised); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 650; }
.compare .line { border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; }
.compare .line span:first-child { font-family: var(--font); color: var(--muted); font-size: 13.5px; }
.compare .line .changed { color: var(--accent-ink); font-weight: 600; }

/* file list (remove / extract) */
.files { display: grid; gap: 8px; }
.file-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.file-item img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: var(--raised); }
.file-item .name { font-weight: 600; word-break: break-all; line-height: 1.25; }
.file-item .info { color: var(--muted); font-size: 13px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--raised); color: var(--muted); border: 1px solid var(--line); }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }

/* ---------- sections */
section.block { margin-top: 64px; }
.section-title { text-align: center; margin: 0 auto 28px; max-width: 640px; }
.section-title h2 { margin: 0 0 8px; font-size: clamp(26px, 4vw, 36px); letter-spacing: -.025em; line-height: 1.1; }
.section-title p { margin: 0; color: var(--muted); font-size: 17px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.card { display: block; padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: transform .15s, border-color .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); color: var(--ink); }
.card[aria-current="page"] { border-color: var(--accent); background: var(--accent-soft); }
.card .icon { width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 12px; }
.card h3 { margin: 0 0 4px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.promo { margin-top: 64px; }
.promo-box { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; padding: 40px; border-radius: 24px; background: #1d1612; color: #f6efe8; overflow: hidden; position: relative; }
.promo-box h2 { margin: 0 0 12px; font-size: clamp(26px, 4vw, 38px); letter-spacing: -.025em; line-height: 1.08; }
.promo-box p { margin: 0 0 18px; color: #cfc4b8; font-size: 17px; }
.promo-box ul { margin: 0 0 24px; padding: 0; list-style: none; display: grid; gap: 8px; color: #e9dfd4; }
.promo-box li { display: flex; gap: 10px; font-size: 15.5px; }
.promo-box li::before { content: "✓"; color: #ff8a4c; font-weight: 700; }
.promo-box .btn.primary { background: #f0640f; border-color: #f0640f; }
.promo-box .btn.ghost { background: transparent; color: #f6efe8; border-color: #5a4b3f; }
.promo-box .btn.ghost:hover { border-color: #ff8a4c; background: rgba(255, 138, 76, .12); color: #fff; }
.mock { position: relative; border-radius: 16px; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #5b7a6a, #2c4a45 55%, #1c2f33); box-shadow: 0 20px 50px rgba(0, 0, 0, .45); overflow: hidden; }
.mock::after { content: ""; position: absolute; inset: auto -10% -35% -10%; height: 70%; background: radial-gradient(ellipse at 50% 0, rgba(240, 160, 90, .55), transparent 65%); }
.mock .label { position: absolute; left: 12px; top: 12px; z-index: 2; background: rgba(0, 0, 0, .55); color: #fff; font: 11.5px/1.5 var(--mono); padding: 8px 10px; border-radius: 6px; backdrop-filter: blur(4px); }
.mock .dl { position: absolute; left: 12px; top: 112px; z-index: 2; background: rgba(120, 50, 20, .9); color: #fff; font: 11.5px var(--mono); padding: 4px 9px; border-radius: 5px; }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 13px; padding: 0 18px; }
.faq summary { padding: 15px 0; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }
.prose { color: var(--muted); }
.prose h2 { color: var(--ink); letter-spacing: -.02em; }
.steps { counter-reset: s; display: grid; gap: 12px; padding: 0; list-style: none; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 12px; }
.steps li::before { content: counter(s); width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; }
.steps b { color: var(--ink); display: block; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 12px; font-size: 14.5px; z-index: 50; box-shadow: var(--shadow); }

@media (max-width: 860px) {
  .viewer { grid-template-columns: 1fr; }
  .preview { position: static; }
  .two, .promo-box, .site-footer .wrap { grid-template-columns: 1fr; }
  .promo-box { padding: 28px 22px; }
  .fields { grid-template-columns: 1fr; }
  .site-header .wrap { gap: 10px; }
  .site-header .btn.small { display: none; }
  .tbl th { width: 46%; }
  .tbl th, .tbl td { padding: 7px 14px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

.page-drop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; text-align: center; background: color-mix(in srgb, var(--canvas) 82%, transparent); backdrop-filter: blur(6px); pointer-events: none; }
.page-drop > div { display: grid; gap: 4px; padding: 48px 56px; border: 3px dashed var(--accent); border-radius: 28px; background: var(--accent-soft); color: var(--accent-ink); margin: 16px; }
.page-drop strong { font-size: 28px; letter-spacing: -.02em; }
.page-drop span { font-size: 15px; }

/* When a photo opens, scroll so the results sit below the sticky header with some space above them. */
#out, #editor, #work, #panel { scroll-margin-top: 84px; }

.group.fold summary { padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; list-style: none; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); }
.group.fold summary::-webkit-details-marker { display: none; }
.group.fold summary span:first-child::before { content: "▸"; display: inline-block; width: 1.3em; transition: transform .15s; }
.group.fold[open] summary span:first-child::before { transform: rotate(90deg); }
.group.fold summary:hover { color: var(--accent-ink); }
.group.fold[open] summary { padding-bottom: 8px; }

.flag.ok { grid-template-columns: auto 1fr; background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.flag.ok::before { background: var(--ok); }
.flag.tip { background: var(--paper); border-style: dashed; }
.flag.tip::before { background: var(--accent); }
.signup { margin-top: 18px; display: grid; gap: 8px; }
.signup label { font-size: 14.5px; color: #e9dfd4; }
.signup input[type=email] { flex: 1 1 220px; min-width: 0; padding: 11px 14px; border-radius: 11px; border: 1px solid #5a4b3f; background: rgba(255, 255, 255, .06); color: #fff; }
.signup input[type=email]::placeholder { color: #9d9186; }
.signup-msg { margin: 0; min-height: 1.2em; font-size: 14px; color: #ffb184; }

.theme-toggle { width: 38px; height: 38px; flex: none; display: grid; place-items: center; padding: 0; border-radius: 11px; border: 1px solid var(--line); background: var(--paper); color: var(--muted); cursor: pointer; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; } :root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle .sun { display: block; } :root:not([data-theme="light"]) .theme-toggle .moon { display: none; } }
