:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #16181d;
  --ink-2: #5b606b;
  --ink-3: #8b909c;
  --line: #e7e9ee;
  --primary: #4f46e5;      /* primary accent */
  --primary-soft: #eef0fe;
  --emphasis: #f0a020;     /* emphasis (Camelot / key) */
  --emphasis-soft: #fdf3e1;
  --ok: #1f9d6b;
  --warn: #c2643b;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20,24,29,.04), 0 8px 30px rgba(20,24,29,.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--bg); }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 56px 24px 80px; }

/* ---- header ---- */
.top { margin-bottom: 28px; }
h1 {
  font-size: 30px; font-weight: 700; letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.lede { color: var(--ink-2); font-size: 16px; margin: 0; max-width: 52ch; }

/* ---- dropzone (first screen) ---- */
.dropzone {
  background: var(--panel); border: 1.5px dashed var(--line);
  border-radius: var(--radius); padding: 46px 24px; text-align: center;
  cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease;
  box-shadow: var(--shadow);
}
.dropzone:hover { border-color: var(--primary); }
.dropzone.drag { border-color: var(--primary); background: var(--primary-soft); }
.dropzone:focus-visible { outline: 3px solid var(--primary-soft); outline-offset: 2px; }
.dz-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dz-icon { color: var(--primary); opacity: .9; margin-bottom: 4px; }
.dz-main { font-size: 17px; font-weight: 600; margin: 0; }
.dz-main .link { color: var(--primary); text-decoration: underline; }
.dz-sub { font-size: 13px; color: var(--ink-3); margin: 0; }

.status { color: var(--ink-2); font-size: 14px; margin: 14px 2px 0; }
.err {
  margin: 14px 0 0; padding: 12px 14px; border-radius: 12px;
  background: #fdecea; color: var(--warn); font-size: 14px; font-weight: 500;
}

/* ---- results ---- */
.result { margin-top: 22px; background: var(--panel); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px; border: 1px solid var(--line); }
.result.show { animation: pop .32s cubic-bezier(.2,.7,.3,1); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.res-label {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px;
}
.res-key { display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.res-key-big {
  font-size: 56px; font-weight: 700; letter-spacing: -0.02em; line-height: 1;
  color: var(--ink);
}
.res-alt {
  flex-basis: 100%; margin-top: 12px; font-size: 14px; color: var(--ink-2);
}
.conf {
  margin-left: auto; align-self: center; font-size: 12px; font-weight: 700;
  letter-spacing: .04em; padding: 5px 11px; border-radius: 999px; text-transform: uppercase;
}
.conf.clear { background: #e7f6ef; color: var(--ok); }
.conf.uncertain { background: var(--emphasis-soft); color: var(--warn); }
.conf.likely { background: var(--emphasis-soft); color: var(--warn); }

.res-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 22px 0; }
.res-cell { display: flex; flex-direction: column; }
.res-big { font-size: 34px; font-weight: 700; letter-spacing: -0.01em; color: var(--emphasis); line-height: 1.05; }
.res-mid { font-size: 26px; font-weight: 600; color: var(--ink); line-height: 1.1; }
.res-sub { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.bpm-flag { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--warn, #b45309); background: var(--emphasis-soft, #fdf3e3); border: 1px solid #f0d9ae; border-radius: 999px; padding: 2px 9px; vertical-align: middle; }

.res-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding-top: 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.mixes-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.mixes-label { font-size: 12px; color: var(--ink-3); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.mixes { display: flex; gap: 7px; }
.chip {
  font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 8px;
  background: var(--primary-soft); color: var(--primary);
}
.copy {
  border: 0; background: var(--primary); color: #fff; font-weight: 600; font-size: 14px;
  padding: 11px 18px; border-radius: 11px; cursor: pointer; transition: background .15s ease, transform .1s ease;
}
.copy:hover { background: #4338ca; }
.copy:active { transform: translateY(1px); }

/* ---- docs ---- */
.docs { margin-top: 46px; }
.docs h2 { font-size: 19px; font-weight: 700; margin: 34px 0 8px; letter-spacing: -0.01em; }
.docs p { color: var(--ink-2); margin: 0 0 12px; }
.docs ul { color: var(--ink-2); margin: 0 0 12px; padding-left: 20px; }
.docs li { margin: 4px 0; }

.faq { margin-top: 10px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary {
  cursor: pointer; font-weight: 600; font-size: 15px; padding: 14px 2px; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-3); font-weight: 400; font-size: 20px; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 2px 14px; margin: 0; }

.foot { margin-top: 50px; padding-top: 20px; border-top: 1px solid var(--line); }
.foot p { color: var(--ink-3); font-size: 13px; margin: 0; }

/* ---- responsive ---- */
@media (max-width: 560px) {
  .wrap { padding: 36px 16px 60px; }
  h1 { font-size: 25px; }
  .res-key { flex-wrap: wrap; gap: 8px; }
  .res-key-big { font-size: 44px; }
  .conf { margin-left: 0; }
  .res-grid { grid-template-columns: 1fr; gap: 16px; }
  .res-big { font-size: 30px; }
  .res-foot { flex-direction: column; align-items: stretch; }
  .copy { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}


/* --- mobile tap targets, 2026-11-17 ---
   measured at 390px: tool nav pills were 29px tall, the ad click anchor collapsed to
   22px while the creative loaded, and the standalone "back" link was 22px.
   WCAG 2.5.8 asks for 24x24 CSS px minimum; we target 32px for standalone controls. */
@media (max-width: 760px) {
  .toolnav .toolnav-in a { padding: .62rem .62rem; }
  .ad-slot .ad-narrow a { display: inline-block; min-height: 50px; }
  .ad-slot .ad-wide a { display: inline-block; }
  p.home a { display: inline-block; padding: .4rem 0; }
}
