:root {
  color-scheme: light;
  --ink: #1a1a1a;
  --muted: #63636b;
  --line: #dcdcd8;
  --paper: #fbfbf9;
  --card: #ffffff;
  --accent: #1c3f5e;
  --warn-bg: #fdf6e7;
  --warn-line: #e3cf9a;
  --error: #8a2b20;
}

* { box-sizing: border-box; }

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

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  background: var(--card);
  border-bottom: 2px solid var(--ink);
}
.bar-title { font-weight: 650; letter-spacing: 0.01em; }
.bar-right { display: flex; align-items: center; gap: 16px; }
.region, .who { color: var(--muted); font-size: 13px; }

main { max-width: 940px; margin: 0 auto; padding: 40px 28px 80px; }

h1 { font-size: 24px; font-weight: 650; margin: 0 0 10px; letter-spacing: -0.01em; }
h2 { font-size: 15px; font-weight: 650; margin: 36px 0 10px; }
.lede { color: var(--muted); margin: 0 0 26px; max-width: 62ch; }
.muted { color: var(--muted); font-size: 13px; }
.rule37 { margin-top: 14px; max-width: 62ch; }
.error { color: var(--error); font-size: 14px; }

button, .primary { font: inherit; }

.primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 9px 18px;
  cursor: pointer;
  text-decoration: none;
}
.primary:disabled { background: #9aa6b0; border-color: #9aa6b0; cursor: not-allowed; }

.secondary {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 9px 18px;
  cursor: pointer;
}

.link {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  font-size: 13px;
}

.actions { display: flex; gap: 12px; align-items: center; margin-top: 22px; }

.drop {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  background: var(--card);
  cursor: pointer;
  margin-bottom: 20px;
}
.drop.over { border-color: var(--accent); background: #f4f8fb; }
.drop-main { font-weight: 550; }
.drop-sub { color: var(--muted); font-size: 13px; }

.progress {
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  max-width: 420px;
}
.progress-bar {
  height: 100%;
  width: 35%;
  background: var(--accent);
  animation: slide 1.6s ease-in-out infinite;
}
@keyframes slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(320%); }
}

table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; }

.col-pages { width: 96px; }
.col-class { width: 190px; }
.col-conf { width: 96px; }
.col-actions { width: 150px; }

tr.uncertain { background: var(--warn-bg); }
tr.uncertain .conf { font-weight: 650; }

.documents input {
  width: 100%;
  font: inherit;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  padding: 3px 5px;
}
.documents input:hover { border-color: var(--line); }
.documents input:focus { border-color: var(--accent); background: #fff; outline: none; }

.pages { font-variant-numeric: tabular-nums; white-space: nowrap; }
.conf { font-variant-numeric: tabular-nums; }
.row-action { font-size: 12px; margin-right: 10px; }

.notice {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: 3px;
  padding: 11px 14px;
  margin-bottom: 18px;
  font-size: 14px;
}

.recent td { font-size: 14px; }
.status { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
