/* dropsite: neutral palette, one accent, system fonts. No external fonts or assets. */
:root {
  --bg: #f6f7f8;
  --surface: #ffffff;
  --text: #1c1f23;
  --muted: #5b636d;
  --border: #d5d9de;
  --accent: #1f5fae;
  --accent-hover: #184c8c;
  --accent-text: #ffffff;
  --warn-bg: #fff6e0;
  --warn-border: #c99a2e;
  --danger: #a82424;
  --ok: #276738;
  --focus: #1f5fae;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --surface: #1e2125;
    --text: #e7e9ec;
    --muted: #a3abb5;
    --border: #3a3f46;
    --accent: #6ea8ff;
    --accent-hover: #8fbcff;
    --accent-text: #0d1a2c;
    --warn-bg: #3a2f14;
    --warn-border: #b38a2e;
    --danger: #ff8a8a;
    --ok: #7fd18f;
    --focus: #8fbcff;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
[hidden] { display: none !important; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 640px; }
main.wrap { padding-top: 24px; padding-bottom: 48px; }

.bar { background: var(--surface); border-bottom: 1px solid var(--border); }
.bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.brand { margin: 0; font-weight: 600; }
.brand-mark {
  display: inline-block; padding: 1px 6px; margin-right: 6px; border-radius: 3px;
  background: var(--text); color: var(--surface); font-size: 0.85em; letter-spacing: 0.04em;
}
.who { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.95em; }

h1 { font-size: 1.4rem; margin: 0 0 12px; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
h1:focus { outline: none; }
p { margin: 0 0 12px; }

.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  padding: 20px; margin-bottom: 20px;
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

.form-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.field-wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.hint { color: var(--muted); font-size: 0.9em; font-weight: 400; margin: 4px 0 0; }
.field-error { color: var(--danger); margin: 8px 0; }

input[type="text"], select, input[type="file"] {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 4px; padding: 8px 10px;
}
input[aria-invalid="true"] { border-color: var(--danger); }
input[type="file"] { padding: 8px; }

.btn {
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 8px 16px; border-radius: 4px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.btn:hover { border-color: var(--muted); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--accent); padding: 6px 10px; }
.btn-quiet:hover { border-color: var(--border); }
.btn-danger { color: var(--danger); }

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

.notice, .warn {
  background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: 4px; padding: 10px 12px;
}
.notice { margin-bottom: 20px; }

.created { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.95em; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; }
td.file, .file { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
td.note { color: var(--muted); }
.empty { color: var(--muted); margin: 12px 0 0; }

.status { font-size: 0.85em; font-weight: 600; text-transform: capitalize; }
.status-issued { color: var(--accent); }
.status-uploading { color: var(--warn-border); }
.status-used { color: var(--ok); }
.status-revoked, .status-expired { color: var(--muted); }

progress {
  width: 100%; height: 14px; appearance: none; -webkit-appearance: none;
  border: 1px solid var(--border); border-radius: 7px; background: var(--bg); overflow: hidden;
}
progress::-webkit-progress-bar { background: var(--bg); }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
.progress-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.progress-meta #up-pct { color: var(--text); font-weight: 600; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
