* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--shell-bg);
  color: var(--shell-ink);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.55;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* Skip link — first focusable element. Hidden until focused. */
.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  background: var(--shell-accent);
  color: var(--shell-on-accent);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  z-index: 100;
  transition: top .15s ease;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
  outline: 3px solid var(--shell-accent-warn);
  outline-offset: 2px;
}

/* The HTML `hidden` attribute must always win over per-element `display`
   rules — otherwise inline-flex etc would override it. */
[hidden] { display: none !important; }

h1 { font-weight: 600; margin: 0 0 8px; font-size: 28px; }
/* One true <h1> per page (the wizard's opening screen). The progress
   screen's heading is semantically a section heading (h2), same level as
   the results screen's #result-heading — this rule keeps its size
   unchanged (previously inherited from the bare h1 / .app-main h1 rules). */
#progressHeading { font-weight: 600; margin: 0 0 8px; font-size: 26px; }
.lede { margin: 0 0 24px; color: var(--shell-muted); font-size: 15px; }

.advisory-note {
  margin: 12px 0 0 !important;
  padding: 10px 14px;
  background: var(--shell-advisory-bg);
  border-left: 3px solid var(--shell-accent);
  border-radius: 4px;
  color: var(--shell-muted);
  font-size: 13.5px;
}
.advisory-note strong { color: var(--shell-ink); }
.filename { margin-top: 12px; color: var(--shell-accent); font-size: 14px; }
.drop-help {
  margin: 10px 2px 0;
  font-size: 13px;
  color: var(--shell-muted);
  line-height: 1.5;
}
.drop-help strong { color: var(--shell-muted); }
.controls { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }

button,
.browse-file-control {
  background: var(--shell-accent);
  color: var(--shell-on-accent);
  border: none;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
}
button:focus-visible,
.browse-file-control:focus-within {
  outline: 3px solid var(--shell-accent-warn);
  outline-offset: 2px;
}
button.secondary,
.browse-file-control.secondary { background: var(--shell-button-secondary-bg); color: var(--shell-ink); }
button:disabled { opacity: .5; cursor: not-allowed; }
.feedback-reminder-dialog {
  width: min(520px, calc(100% - 32px));
  border: 1px solid var(--shell-line-strong);
  border-radius: 12px;
  padding: 24px;
  background: var(--shell-surface);
  color: var(--shell-ink);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
}
.feedback-reminder-dialog::backdrop { background: rgba(0, 0, 0, .55); }
.feedback-reminder-dialog h2 { margin: 0 0 10px; font-size: 21px; }
.feedback-reminder-dialog p { margin: 0; color: var(--shell-muted); }
.feedback-reminder-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

.status {
  margin-top: 14px;
  color: var(--shell-muted);
  font-size: 14px;
  min-height: 24px;
}
.status[data-state="error"] { color: var(--shell-status-error-ink); }
.status[data-state="success"] { color: var(--shell-status-success-ink); }
.cancel-actions {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cancel-actions button {
  background: var(--shell-button-secondary-bg);
  color: var(--shell-status-error-ink);
  border: 1px solid var(--shell-status-error-border);
  padding: 9px 14px;
  font-size: 14px;
}
.cancel-actions button:hover:not(:disabled) { background: var(--shell-status-error-bg); }
.cancel-status {
  color: var(--shell-muted);
  font-size: 13px;
}

.progress-block {
  margin-top: 22px;
  background: var(--shell-surface);
  border: 1px solid var(--shell-line);
  border-radius: 10px;
  padding: 16px 18px;
}
.progress-title { margin: 0 0 10px; font-size: 16px; }
.progress-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 10px;
}
.phase-label { font-weight: 600; color: var(--shell-ink); font-size: 16px; }
.phase-num { color: var(--shell-muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.elapsed-time { color: var(--shell-muted); font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
