/* SafeKopy
 *
 * Calm, credible, unfussy. Deliberately not the pink-and-floral palette of
 * stereotypical domestic-violence design: yellow and orange accents on white
 * and near-black, with a blue used only for links and focus.
 *
 * The document picker is the dominant element on the page. Everything else is
 * quieter than it is.
 */

:root {
  --ink:        #16181d;
  --ink-soft:   #4a5058;
  --ink-faint:  #6c737c;
  --paper:      #ffffff;
  --wash:       #f7f7f5;
  --line:       #e2e2dd;

  --amber:      #f2a20c;
  --amber-deep: #c97f00;
  --amber-wash: #fdf6e6;
  --blue:       #1f5fbf;
  --blue-wash:  #eef3fc;

  --radius: 10px;
  --measure: 62ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2f3f4; --ink-soft: #b9bfc7; --ink-faint: #8b929b;
    --paper: #15171b; --wash: #1c1f24; --line: #2c3037;
    --amber-wash: #2a2313; --blue: #7aa8f0; --blue-wash: #182333;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wrap { max-width: 780px; margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--paper); padding: 12px 18px; z-index: 10;
}
.skip:focus { left: 12px; top: 12px; }

/* ── Header / footer ───────────────────────────────────────────────────── */

header.site { border-bottom: 1px solid var(--line); background: var(--wash); }
header.site .bar {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  padding-top: 14px; padding-bottom: 14px;
}
.logo { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.logo .k { color: var(--amber-deep); }
.by { font-size: 13.5px; color: var(--ink-faint); }

footer.site {
  margin-top: 72px; padding: 28px 0 48px;
  border-top: 1px solid var(--line);
  font-size: 14.5px; color: var(--ink-faint);
}
footer.site p { margin: 4px 0; }

/* ── Type ──────────────────────────────────────────────────────────────── */

h1 {
  font-size: clamp(26px, 3.4vw, 33px); line-height: 1.25;
  letter-spacing: -0.02em; margin: 40px 0 14px; max-width: var(--measure);
}
h2 { font-size: 20px; margin: 0 0 10px; letter-spacing: -0.01em; }
p  { max-width: var(--measure); }
.lead { font-size: 18.5px; color: var(--ink-soft); margin: 0 0 8px; }
.muted { color: var(--ink-faint); font-size: 15px; }
.strong { font-weight: 600; }

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

/* ── The picker ────────────────────────────────────────────────────────── */

.dropzone {
  margin: 30px 0 22px; padding: 40px 28px;
  border: 2px dashed var(--line); border-radius: var(--radius);
  background: var(--wash); text-align: center;
  transition: border-color .15s, background .15s;
}
.dropzone.over { border-color: var(--amber); background: var(--amber-wash); }
.dropzone:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

#file {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.choose {
  display: inline-block; cursor: pointer;
  background: var(--amber); color: #1a1400;
  font-size: 17px; font-weight: 650;
  padding: 15px 30px; border-radius: 8px;
  border: 1px solid var(--amber-deep);
}
.choose:hover { background: var(--amber-deep); color: #fff; }
#file:focus-visible + .hint,
#file:focus-visible ~ .formats { outline: none; }
#file:focus-visible + * { }
.dropzone:has(#file:focus-visible) .choose { outline: 3px solid var(--blue); outline-offset: 3px; }

.hint { margin: 14px auto 6px; color: var(--ink-faint); font-size: 15px; }
.formats { margin: 0 auto; font-size: 14.5px; color: var(--ink-soft); }

/* ── Privacy strip ─────────────────────────────────────────────────────── */

.privacy-strip {
  list-style: none; margin: 0 0 46px; padding: 18px 20px;
  background: var(--blue-wash); border-radius: var(--radius);
  font-size: 15.5px;
}
.privacy-strip li { margin: 5px 0; padding-left: 24px; position: relative; }
.privacy-strip li::before {
  content: ""; position: absolute; left: 6px; top: .62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--blue);
}

/* ── Content blocks ────────────────────────────────────────────────────── */

.block { margin: 0 0 42px; }

.steps { margin: 0; padding-left: 22px; }
.steps li { margin: 0 0 14px; }
.steps .t { display: block; font-weight: 620; }
.steps .b { color: var(--ink-soft); }

.limits ul { margin: 0 0 16px; padding-left: 22px; }
.limits li { margin: 0 0 8px; max-width: var(--measure); }

/* ── Working ───────────────────────────────────────────────────────────── */

.status { font-size: 19px; margin: 26px 0 16px; min-height: 1.6em; }

.progress {
  height: 8px; background: var(--line); border-radius: 999px;
  overflow: hidden; max-width: var(--measure);
}
.progress .bar {
  height: 100%; width: 0; background: var(--amber);
  transition: width .3s ease;
}
@media (prefers-reduced-motion: reduce) {
  .progress .bar { transition: none; }
}

/* ── Done ──────────────────────────────────────────────────────────────── */

.count { font-size: 19px; margin: 0 0 20px; }

.callout {
  border-left: 4px solid var(--amber);
  background: var(--amber-wash);
  padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0;
  margin: 0 0 26px;
}
.callout p { margin: 0 0 6px; }
.callout p:last-child { margin: 0; color: var(--ink-soft); font-size: 15.5px; }

.breakdown { margin-top: 30px; font-size: 15px; color: var(--ink-soft); }
.breakdown summary { cursor: pointer; color: var(--blue); }
.breakdown ul { margin: 12px 0 0; padding-left: 22px; }

/* ── Buttons ───────────────────────────────────────────────────────────── */

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 0; }

button {
  font: inherit; font-size: 16px; font-weight: 600;
  padding: 12px 22px; border-radius: 8px; cursor: pointer;
  background: var(--amber); color: #1a1400; border: 1px solid var(--amber-deep);
}
button:hover { background: var(--amber-deep); color: #fff; }
button.ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
button.ghost:hover { background: var(--wash); color: var(--ink); }
button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ── Error ─────────────────────────────────────────────────────────────── */

#screen-error h1 { margin-top: 40px; }
#error-next { color: var(--ink-soft); }

/* ── Screens ───────────────────────────────────────────────────────────── */

.screen[hidden] { display: none; }

/* ── Long-form document pages (privacy.html) ───────────────────────────── */

.doc h1 { margin-top: 44px; }
.doc h2 {
  margin: 42px 0 12px; padding-top: 18px;
  border-top: 1px solid var(--line); font-size: 21px;
}
.doc h3 { margin: 26px 0 8px; font-size: 17.5px; }
.doc ul, .doc ol { max-width: var(--measure); padding-left: 22px; }
.doc li { margin: 0 0 7px; }
.doc .steps { list-style: decimal; }

.doc table {
  border-collapse: collapse; width: 100%; margin: 14px 0 8px;
  font-size: 15.5px; display: block; overflow-x: auto;
}
.doc th, .doc td {
  text-align: left; padding: 9px 14px 9px 0;
  border-bottom: 1px solid var(--line); vertical-align: top;
}
.doc th { font-weight: 620; color: var(--ink-soft); }

.doc ul.cols { columns: 2; column-gap: 34px; max-width: none; }
.doc ul.cols li { break-inside: avoid; }
@media (max-width: 620px) { .doc ul.cols { columns: 1; } }

/* Headings receive focus programmatically on screen change so screen readers
 * announce the new context. The user did not navigate there by keyboard, so
 * the focus ring would be noise. Real keyboard focus is unaffected. */
[tabindex="-1"]:focus { outline: none; }

/* Explanatory note on the completion screen (e.g. pages that were hard to
 * read). Informational, not a warning — deliberately not styled as an alert. */
.note {
  margin: -8px 0 22px; padding: 12px 16px;
  background: var(--wash); border-radius: var(--radius);
  color: var(--ink-soft); font-size: 15.5px; max-width: var(--measure);
}
