/* Colors chosen for WCAG 2.1 AA contrast on white (all text >= 4.5:1). */
:root {
  --text: #1b1b1b;
  --muted: #4a4a4a;
  --bg: #ffffff;
  --surface: #f3f4f6;
  --border: #6b6b6b;
  --link: #1a56b0;
  --link-visited: #5b2d8e;
  --primary: #0b5e3a;
  --primary-hover: #084a2d;
  --error: #b00020;
  --success: #0b5e3a;
  --focus: #ffbf47;
  --radius: 4px;
}

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

html { font-size: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

.container { max-width: 46rem; margin: 0 auto; padding: 0 1rem; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:visited { color: var(--link-visited); }
a:hover { text-decoration-thickness: 3px; }

/* Visible focus for every interactive element */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 0;
  box-shadow: 0 0 0 6px var(--text);
}
a:focus-visible { background: var(--focus); color: var(--text); box-shadow: 0 4px 0 var(--text); outline: none; text-decoration: none; }
main:focus { outline: none; }

.skip-link {
  position: absolute; left: 1rem; top: -100px;
  padding: 0.5rem 1rem; background: var(--focus); color: var(--text); z-index: 10;
}
.skip-link:focus { top: 0.5rem; }

.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;
}

.site-header { background: #0b3d2c; color: #fff; padding: 0.75rem 0; margin-bottom: 2rem; }
.site-header .container { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.site-header a, .site-header a:visited { color: #fff; }
.site-header a:focus-visible { color: var(--text); }
.brand { font-weight: 700; font-size: 1.25rem; text-decoration: none; }
.site-header nav ul { list-style: none; display: flex; gap: 1.25rem; margin: 0; padding: 0; }
.site-header nav a[aria-current="page"] { text-decoration-thickness: 3px; font-weight: 700; }

.site-footer { margin-top: 4rem; padding: 1.5rem 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 1rem; }

h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 1rem; }
h2 { font-size: 1.5rem; margin: 2rem 0 0.75rem; }
.lead { font-size: 1.25rem; }

.cards { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.card h2 { margin-top: 0; }

/* Forms */
.field { margin: 0 0 1.75rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1.75rem; min-width: 0; }
legend { font-weight: 700; font-size: 1.125rem; margin-bottom: 0.5rem; padding: 0; }
.field-group > legend { font-size: 1.375rem; margin-bottom: 1rem; }
label { display: block; font-weight: 700; margin-bottom: 0.25rem; }
.hint { color: var(--muted); margin: 0 0 0.5rem; }

input[type="text"], input[type="email"], input[type="date"], textarea {
  display: block; width: 100%; padding: 0.5rem; font: inherit; color: var(--text);
  border: 2px solid var(--text); border-radius: 0; background: #fff;
}
.input--narrow { max-width: 16rem; }
input[type="file"] { font: inherit; }

.radios { display: grid; gap: 0.5rem; }
.radio { display: flex; align-items: center; gap: 0.6rem; }
.radio input { width: 1.5rem; height: 1.5rem; margin: 0; accent-color: var(--primary); }
.radio label { font-weight: 400; margin: 0; }

.field--error { border-left: 5px solid var(--error); padding-left: 1rem; }
.field--error input, .field--error textarea { border-color: var(--error); }
.error-message { color: var(--error); font-weight: 700; margin: 0 0 0.5rem; }

.error-summary {
  border: 4px solid var(--error); padding: 1rem 1.25rem; margin-bottom: 2rem;
}
.error-summary h2 { margin-top: 0; font-size: 1.375rem; }
.error-summary ul { margin: 0; padding-left: 1.25rem; }
.error-summary a, .error-summary a:visited { color: var(--error); font-weight: 700; }
.error-summary:focus { outline: 3px solid var(--focus); outline-offset: 0; }

.upload-status { margin: 0.5rem 0 0; min-height: 1.5em; }
.upload-status[data-state="error"] { color: var(--error); font-weight: 700; }
.upload-status[data-state="done"] { color: var(--success); font-weight: 700; }

.button {
  display: inline-block; padding: 0.6rem 1.25rem; font: inherit; font-weight: 700;
  color: #fff; background: var(--primary); border: 2px solid transparent; border-radius: var(--radius);
  box-shadow: 0 2px 0 #032015; cursor: pointer; text-decoration: none;
}
.button:visited { color: #fff; }
.button:hover { background: var(--primary-hover); }
.button:focus-visible { background: var(--focus); color: var(--text); box-shadow: 0 2px 0 var(--text); outline: 3px solid var(--focus); }
.button[disabled] { opacity: 0.6; cursor: not-allowed; }
.button--secondary { background: var(--surface); color: var(--text); border-color: var(--text); box-shadow: 0 2px 0 var(--text); }
.button--secondary:visited { color: var(--text); }
.button--secondary:hover { background: #e2e4e8; }

.panel { border: 2px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin: 2rem 0; }
.panel--success { border-color: var(--success); background: #e9f5ef; text-align: center; }
.panel--success h1 { margin-bottom: 0.5rem; }
.tracking-id { font-size: 2rem; letter-spacing: 0.08em; margin: 0.25rem 0 0; font-family: ui-monospace, Menlo, monospace; }

.summary { margin: 0; }
.summary > div { display: grid; grid-template-columns: 10rem 1fr; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid #d0d0d0; }
.summary dt { font-weight: 700; }
.summary dd { margin: 0; }

/* Status is shown with text + icon; color is supplementary only. */
.status { display: inline-flex; gap: 0.4rem; align-items: center; font-weight: 700; padding: 0.1rem 0.6rem; border: 2px solid currentColor; border-radius: 999px; }
.status--new { color: #1a56b0; }
.status--inreview { color: #8a4b00; }
.status--resolved { color: var(--success); }

.lookup { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; }
.lookup .field { margin-bottom: 0; flex: 1 1 16rem; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
