:root {
  --text: #1a1a1a;
  --bg: #ffffff;
  --muted: #4a4a4a;
  --brand: #12355b;
  --brand-text: #ffffff;
  --link: #0b4f9c;
  --border: #6b6b6b;
  --soft: #f1f4f8;
  --ok-bg: #e6f4ea;
  --ok-border: #1e6b34;
  --err-bg: #fdecea;
  --err-border: #b3261e;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}
header { background: var(--brand); color: var(--brand-text); padding: 1rem 1.25rem; }
header a { color: var(--brand-text); }
.site-title { margin: 0; font-size: 1.35rem; font-weight: 700; }
.login-state { margin: 0.25rem 0 0; font-size: 0.95rem; }
.site-area { margin: 0.25rem 0 0; font-size: 0.95rem; }
nav ul { list-style: none; margin: 0.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
nav a { display: inline-block; padding: 0.25rem 0; font-weight: 600; }
nav a[aria-current="page"] { text-decoration-thickness: 3px; }
main { max-width: 60rem; margin: 0 auto; padding: 1.5rem 1.25rem 2rem; }
main:focus { outline: none; }
footer { border-top: 1px solid var(--border); padding: 1rem 1.25rem; text-align: center; color: var(--muted); }
h1 { font-size: 1.75rem; margin: 0 0 1rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 0.75rem; }
h3 { font-size: 1.1rem; margin: 0 0 0.35rem; }
a { color: var(--link); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
.table-wrap:focus-visible, .error-summary:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #1a1a1a;
}
.skip-link { position: absolute; left: -999px; top: 0; background: #ffffff; color: #000000; padding: 0.75rem 1rem; z-index: 10; }
.skip-link:focus { left: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
form { max-width: 38rem; }
.field { margin: 0 0 1.25rem; }
label { display: block; font-weight: 700; margin-bottom: 0.25rem; }
.hint { color: var(--muted); margin: 0 0 0.35rem; font-size: 0.95rem; }
input[type="text"], input[type="password"], input[type="date"], select, textarea {
  width: 100%; font: inherit; padding: 0.55rem 0.65rem; border: 2px solid var(--border);
  border-radius: 4px; background: #ffffff; color: var(--text);
}
textarea { min-height: 7rem; }
fieldset { border: 1px solid var(--border); border-radius: 4px; margin: 0 0 1.5rem; padding: 1rem; }
legend { font-weight: 700; padding: 0 0.4rem; }
.button, button {
  display: inline-block; font: inherit; font-weight: 700; padding: 0.6rem 1.1rem; border-radius: 4px;
  border: 2px solid var(--brand); background: var(--brand); color: var(--brand-text);
  cursor: pointer; text-decoration: none;
}
.button-secondary { background: #ffffff; color: var(--brand); }
.button-danger { background: var(--err-border); border-color: var(--err-border); }
input[type="file"] { width: 100%; font: inherit; padding: 0.5rem; border: 2px solid var(--border); border-radius: 4px; background: #ffffff; color: var(--text); }
.date-fieldset { max-width: 38rem; }
.date-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; }
.date-part { flex: 0 0 auto; }
.date-range { font-weight: 400; color: var(--muted); }
.date-part input[type="text"].date-box { width: 6rem; text-align: center; }
.date-part input[type="text"].date-box-4 { width: 8rem; }
.pagination ul { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pagination p { margin: 0 0 0.4rem; }
.pagination a, .pagination .current { display: inline-block; min-width: 2.5rem; padding: 0.3rem 0.7rem; border: 2px solid var(--brand); border-radius: 4px; text-align: center; }
.pagination .current { background: var(--brand); color: var(--brand-text); font-weight: 700; }
.inline-label { display: inline; font-weight: 700; margin-left: 0.4rem; }
input[type="radio"] { width: 1.1rem; height: 1.1rem; }
.inline-form { display: inline; max-width: none; margin-left: 0.75rem; }
.clipboard-btn { padding: 0.3rem 0.8rem; margin-top: 0.4rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.message, .error-summary { border: 2px solid; border-radius: 4px; padding: 0.5rem 1rem; margin: 0 0 1.25rem; }
.message p { margin: 0.25rem 0; }
.message-success { background: var(--ok-bg); border-color: var(--ok-border); }
.message-error, .error-summary { background: var(--err-bg); border-color: var(--err-border); }
.error-summary p { margin: 0.4rem 0; font-weight: 700; }
.error-summary h2 { margin: 0.5rem 0; font-size: 1.15rem; }
.field-error { color: #8c1d18; font-weight: 700; margin: 0.25rem 0 0.35rem; }
.code-box { background: var(--soft); border: 2px solid var(--brand); border-radius: 4px; padding: 0.75rem 1rem; margin: 0 0 1.25rem; }
.code-box code { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.05em; }
dl.details { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.25rem; margin: 0; }
dl.details dt { font-weight: 700; }
dl.details dd { margin: 0; }
.progress { list-style: none; margin: 0; padding: 0; max-width: 38rem; }
.progress li { border: 2px solid var(--border); border-radius: 4px; padding: 0.5rem 0.75rem; margin: 0 0 0.5rem; }
.progress li.done { background: var(--ok-bg); border-color: var(--ok-border); }
.progress li.current { background: var(--soft); border: 3px solid var(--brand); font-weight: 700; }
.progress .state { color: var(--muted); font-weight: 400; }
.updates { list-style: none; margin: 0; padding: 0; }
.updates li { border-left: 4px solid var(--brand); background: var(--soft); padding: 0.6rem 0.9rem; margin: 0 0 0.75rem; }
.updates p { margin: 0.2rem 0; }
.table-wrap { overflow-x: auto; margin: 0 0 1.5rem; }
table { border-collapse: collapse; width: 100%; min-width: 44rem; }
caption { text-align: left; font-weight: 700; padding: 0 0 0.5rem; }
th, td { border: 1px solid var(--border); padding: 0.5rem 0.6rem; text-align: left; vertical-align: top; }
thead th { background: var(--soft); }
@media (max-width: 40rem) {
  dl.details { grid-template-columns: 1fr; }
  dl.details dd { margin-bottom: 0.5rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
