:root {
  --bg: #0e0f11;
  --panel: #16181b;
  --panel-2: #1c1f23;
  --line: #2a2e34;
  --text: #e8e6e1;
  --muted: #9a9890;
  --accent: #ffb547;      /* timeline-marker amber */
  --ok: #7fd18b;
  --warn: #ffb547;
  --bad: #ff6b5b;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f2ec; --panel: #ffffff; --panel-2: #f8f6f1; --line: #dedad0;
    --text: #1d1c1a; --muted: #6b685f; --accent: #b86e00; --ok: #227a33; --warn: #a35f00; --bad: #c0392b;
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text); font: 16px/1.55 var(--sans);
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--accent); }
.wrap { width: min(860px, 100% - 40px); margin: 0 auto; }

/* header */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { font-family: var(--mono); font-size: 14px; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.brand b { color: var(--accent); font-weight: 600; }
.top nav a { font-size: 14px; color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--text); }

main { flex: 1; padding: 48px 0 64px; }
h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 12px; }
h2 { font-size: 18px; margin: 0 0 12px; letter-spacing: -0.01em; }
.lede { color: var(--muted); font-size: 18px; max-width: 60ch; margin: 0 0 32px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }

/* home tool list */
.tools { display: grid; gap: 12px; }
.tool {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center;
  padding: 20px 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  color: inherit; text-decoration: none; transition: border-color .15s;
}
.tool:hover { border-color: var(--accent); }
.tool h2 { margin: 0; }
.tool p { margin: 0; color: var(--muted); grid-column: 1; }
.tool .go { grid-row: 1 / span 2; grid-column: 2; font-family: var(--mono); color: var(--accent); }
.tool.soon { opacity: .55; pointer-events: none; }

/* drop zone */
.drop {
  display: block; border: 1.5px dashed var(--line); border-radius: 12px; background: var(--panel);
  padding: 48px 24px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--panel-2); }
.drop strong { display: block; font-size: 18px; margin-bottom: 6px; }
.drop input { display: none; }
.privacy { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; margin-top: 14px; }
.privacy::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }

/* result panel */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 24px; margin-top: 20px; }
.filehead { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; flex-wrap: wrap; }
.filehead .name { font-family: var(--mono); font-size: 15px; word-break: break-all; }
.versions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 20px 0 4px; }
.vbox { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; min-width: 150px; }
.vbox .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.vbox .v { font-size: 18px; font-weight: 600; }
.vbox .v small { font-family: var(--mono); font-weight: 400; color: var(--muted); font-size: 13px; }
.arrow { color: var(--muted); font-size: 20px; }
select, input[type=number] {
  font: inherit; font-size: 16px; font-weight: 600; color: var(--text); background: transparent;
  border: none; padding: 0; outline: none; cursor: pointer;
}
input[type=number] { width: 5ch; font-family: var(--mono); border-bottom: 1px solid var(--line); }
select option { background: var(--panel); color: var(--text); }

.section { margin-top: 24px; }
.section h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.items li { position: relative; padding-left: 28px; }
.items li::before { position: absolute; left: 0; top: 0; width: 18px; text-align: center; font-family: var(--mono); font-weight: 700; }
.items .sub { margin-top: 2px; }
.items li.ok::before { content: "✓"; color: var(--ok); }
.items li.warn::before { content: "!"; color: var(--warn); text-align: center; }
.items li.bad::before { content: "×"; color: var(--bad); text-align: center; }
.items .sub { color: var(--muted); font-size: 14px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 10px; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 6px 8px; border-bottom: 1px solid var(--line); }
td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.tc { font-family: var(--mono); white-space: nowrap; }
td.clip { word-break: break-all; }
details { margin-top: 6px; }
summary { cursor: pointer; color: var(--accent); font-size: 14px; }
.tablewrap { overflow-x: auto; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; align-items: center; }
button {
  font: inherit; font-weight: 600; border-radius: 8px; padding: 12px 20px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
}
button.primary { background: var(--accent); border-color: var(--accent); color: #1a1205; }
button.primary:hover { filter: brightness(1.07); }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, .drop:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.error { color: var(--bad); margin-top: 14px; }
.busy { color: var(--muted); margin-top: 14px; font-family: var(--mono); font-size: 14px; }

/* how-it-works */
.notes { margin-top: 48px; color: var(--muted); font-size: 15px; }
.notes h2 { color: var(--text); }
.notes ul { padding-left: 20px; }
.notes li { margin: 6px 0; }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 20px 0 28px; }
footer p { margin: 4px 0; }
[hidden] { display: none !important; }
