/* TxDOT manuals demo UI. Colors meet WCAG 2.1 AA contrast on white (text >= 4.5:1). */
:root {
  --text: #1b1b1b;
  --muted: #4a4a4a;
  --accent: #0b4f8a;
  --accent-dark: #083a66;
  --border: #8a8a8a;
  --notice-bg: #fff8e1;
  --notice-border: #8a6d00;
  --blocked-bg: #fdecea;
  --blocked-border: #a4262c;
  --focus: #b35c00;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: #fff;
}

.wrap { max-width: 50rem; margin: 0 auto; padding: 0 1rem; }

.skip-link { position: absolute; left: -999px; top: 0; padding: 0.5rem 1rem; background: #fff; color: var(--accent); }
.skip-link:focus { left: 1rem; z-index: 10; }

.site-header { border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; padding-top: 0.75rem; padding-bottom: 0.75rem; }
h1 { font-size: 1.5rem; margin: 0; }
.badge { font-size: 0.8rem; font-weight: 600; border: 1px solid var(--accent); color: var(--accent); border-radius: 0.25rem; padding: 0 0.4rem; vertical-align: middle; }
.account { display: flex; align-items: center; gap: 0.75rem; color: var(--muted); }

.notice { background: var(--notice-bg); border-left: 4px solid var(--notice-border); padding: 0.75rem 1rem; }

label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
textarea { width: 100%; font: inherit; padding: 0.5rem; border: 1px solid var(--border); border-radius: 0.25rem; }
.help { color: var(--muted); font-size: 0.9rem; margin: 0.25rem 0 0.75rem; }

button {
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 0.5rem 1.25rem; border-radius: 0.25rem;
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
}
button:hover { background: var(--accent-dark); }
button.secondary { background: #fff; color: var(--accent); }
button.secondary:hover { background: #eef4fa; }
button[disabled] { opacity: 0.6; cursor: progress; }

a { color: var(--accent); }

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

.status { min-height: 1.5em; color: var(--muted); }
.error:not(:empty) { background: var(--blocked-bg); border-left: 4px solid var(--blocked-border); padding: 0.75rem 1rem; }

.result { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: 0.5rem; }
.answer { white-space: pre-wrap; }
.outcome { background: var(--blocked-bg); border-left: 4px solid var(--blocked-border); padding: 0.5rem 1rem; font-weight: 600; }
#citations li { margin-bottom: 0.5rem; }
.meta { color: var(--muted); }

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