/* Large, calm, high-contrast — written for people who don't use
   computers much. System fonts only: the page contacts no one else. */

:root {
  --bg: #fbfaf7;
  --fg: #1d1d1f;
  --muted: #4f4f55;
  --card: #ffffff;
  --border: #d6d2c8;
  --accent: #1f5fae;
  --accent-hover: #184c8c;
  --accent-fg: #ffffff;
  --good: #1e7a3c;
  --bad: #b42318;
  --note-bg: #fff4d6;
  --note-fg: #4a3800;
  --focus: #f0a400;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121417;
    --fg: #f2f2f2;
    --muted: #bcbcc4;
    --card: #1c1f24;
    --border: #3a3f48;
    --accent: #7db0ff;
    --accent-hover: #a3c7ff;
    --accent-fg: #0b1a33;
    --good: #74d391;
    --bad: #ff8f85;
    --note-bg: #3a3218;
    --note-fg: #ffe9a8;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

/* `hidden` must win over the display rules below (progress, overlay…). */
[hidden] { display: none !important; }

html { font-size: 112.5%; }  /* 18px */

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.1rem;
  line-height: 1.6;
}

main, footer {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 16px;
}

h1 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  line-height: 1.2;
  margin: 2.5rem 0 1rem;
}

h2 { font-size: 1.5rem; margin: 3rem 0 1rem; }

a { color: var(--accent); }

:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 3px;
}

.lead { font-size: 1.2rem; }

.private {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-weight: 600;
  color: var(--good);
}
.private svg { flex: none; }

.start { margin: 2rem 0; }

.big-button {
  display: inline-block;
  min-height: 3.6rem;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 0.6rem;
  background: var(--accent);
  color: var(--accent-fg);
  font: inherit;
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.big-button:hover { background: var(--accent-hover); }

.hint { margin: 0.75rem 0 0; color: var(--muted); }

.engine {
  margin: 0.25rem 0 0;
  min-height: 1.6em;
  font-size: 0.95rem;
  color: var(--muted);
}

.warning, .keep-open {
  padding: 0.9rem 1.1rem;
  border-radius: 0.5rem;
  background: var(--note-bg);
  color: var(--note-fg);
  font-weight: 600;
}

/* ---- one card per video ---- */

.card {
  margin: 1.25rem 0;
  padding: 1.25rem;
  border: 2px solid var(--border);
  border-radius: 0.75rem;
  background: var(--card);
}
.card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
  overflow-wrap: anywhere;
}
.card-status { margin: 0.25rem 0 0.75rem; font-size: 1.15rem; }
.card[data-state="done"] { border-color: var(--good); }
.card[data-state="done"] .card-status { color: var(--good); font-weight: 700; }
.card[data-state="error"] { border-color: var(--bad); }
.card[data-state="error"] .card-status { color: var(--bad); font-weight: 600; }

progress {
  display: block;
  width: 100%;
  height: 1.5rem;
  accent-color: var(--accent);
}

.card video {
  display: block;
  width: 100%;
  max-width: 32rem;
  aspect-ratio: 11 / 9;
  background: #000;
  border-radius: 0.4rem;
}
.card-facts { color: var(--muted); margin: 0.5rem 0 1rem; }
.save-hint { color: var(--muted); font-size: 0.95rem; margin: 0.5rem 0 0; }

.card-error summary { cursor: pointer; color: var(--muted); }
.card-error pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.8rem;
  max-height: 14rem;
  overflow: auto;
}

/* ---- questions ---- */

details { border-top: 1px solid var(--border); padding: 0.6rem 0; }
.help details:last-child { border-bottom: 1px solid var(--border); }
summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.3rem 0;
}
details p { margin: 0.5rem 0; }

footer {
  margin-top: 3rem;
  padding-bottom: 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---- drag and drop ---- */

.drop-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border: 6px dashed var(--accent);
  z-index: 10;
  pointer-events: none;
}
.drop-overlay p { font-size: 2rem; font-weight: 700; color: var(--accent); }
