/* Aesthetic Resolution ADR Limited — site styles
   Conservative, regulatory tone. WCAG 2.2 AA contrast.
*/

:root {
  /* Brand royal blue, matching the logo wordmark */
  --navy: #1f3aa8;
  --navy-dark: #152a82;
  --navy-light: #3a52c0;
  --slate: #475569;
  --slate-light: #64748b;
  --grey-50: #f8fafc;
  --grey-100: #f1f5f9;
  --grey-200: #e2e8f0;
  --grey-300: #cbd5e1;
  --white: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --link: #152a82;
  --link-visited: #5b3a8a;
  --focus: #ffbf00;
  --warn-bg: #fff7e6;
  --warn-border: #b45309;
  --max-width: 72rem;
  --reading-width: 44rem;
  --radius: 4px;
}

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 0;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  text-decoration: underline;
  transform: translateY(-100%);
  z-index: 100;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

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

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:visited {
  color: var(--link-visited);
}

/* Header */
.site-header {
  background: var(--white);
  color: var(--text);
  border-bottom: 1px solid var(--grey-200);
}

.site-header a {
  color: var(--text);
}

.site-header a:visited {
  color: var(--text);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-img {
  display: block;
  height: 2.25rem;
  width: auto;
  max-width: 100%;
}

@media (min-width: 48rem) {
  .brand-img {
    height: 2.5rem;
  }
}

.brand:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

/* Nav */
.site-nav {
  background: var(--navy-light);
  border-bottom: 1px solid var(--grey-200);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: var(--radius);
}

.nav-list {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.nav-list a {
  display: block;
  padding: 0.875rem 1rem;
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 3px solid transparent;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  background: var(--navy-dark);
  text-decoration: underline;
}

.nav-list a[aria-current="page"] {
  border-bottom-color: var(--focus);
  background: var(--navy-dark);
}

@media (max-width: 48rem) {
  .nav-toggle {
    display: inline-block;
    margin: 0.75rem 1.25rem;
  }
  .nav-list {
    display: none;
    flex-direction: column;
    padding: 0;
  }
  .nav-list.is-open {
    display: flex;
  }
  .nav-list a {
    border-bottom: 1px solid var(--navy-dark);
  }
}

/* Status banner */
.status-banner {
  background: var(--warn-bg);
  border-bottom: 2px solid var(--warn-border);
  padding: 0.875rem 1.25rem;
  color: var(--text);
}

.status-banner .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 0.9375rem;
}

.status-banner strong {
  color: var(--warn-border);
}

/* Main */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.prose {
  max-width: var(--reading-width);
}

.prose-wide {
  max-width: var(--max-width);
}

h1, h2, h3, h4 {
  color: var(--navy);
  line-height: 1.25;
  margin: 1.75rem 0 0.75rem;
  font-weight: 700;
}

h1 {
  font-size: 2rem;
  margin-top: 0.5rem;
}

h2 {
  font-size: 1.5rem;
  border-bottom: 2px solid var(--grey-200);
  padding-bottom: 0.5rem;
}

h3 {
  font-size: 1.1875rem;
}

p, ul, ol {
  margin: 0 0 1rem;
}

ul, ol {
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.375rem;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.breadcrumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.breadcrumbs li:not(:last-child)::after {
  content: " / ";
  margin-left: 0.5rem;
  color: var(--grey-300);
}

/* Last updated */
.last-updated {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0.25rem 0 1.5rem;
  font-style: italic;
}

/* Buttons / CTAs */
.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  line-height: 1.4;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.btn-primary:visited {
  color: var(--white);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  text-decoration: underline;
}

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border-color: var(--navy);
}

.btn-secondary:visited {
  color: var(--navy);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--grey-100);
  text-decoration: underline;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--grey-50) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--grey-200);
  padding: 2.5rem 1.25rem;
  margin: -2rem -1.25rem 2rem;
}

.hero-inner {
  max-width: var(--reading-width);
  margin: 0 auto;
}

.hero h1 {
  margin-top: 0;
}

.lede {
  font-size: 1.1875rem;
  color: var(--slate);
  margin-bottom: 1.5rem;
}

/* Cards / link grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}

.card {
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--white);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
}

.card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.card a {
  display: block;
  text-decoration: none;
  color: var(--navy);
}

.card a:hover h3,
.card a:focus-visible h3 {
  text-decoration: underline;
}

/* Notice / callout */
.notice {
  border-left: 4px solid var(--navy);
  background: var(--grey-50);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.notice.notice-warn {
  border-left-color: var(--warn-border);
  background: var(--warn-bg);
}

.notice p:last-child {
  margin-bottom: 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--grey-200);
  vertical-align: top;
}

th {
  background: var(--grey-100);
  font-weight: 600;
}

/* Forms */
form {
  max-width: var(--reading-width);
}

fieldset {
  border: 1px solid var(--grey-300);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

legend {
  font-weight: 700;
  color: var(--navy);
  padding: 0 0.5rem;
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.field .hint {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="number"],
.field input[type="url"],
.field textarea,
.field select {
  width: 100%;
  font: inherit;
  padding: 0.625rem 0.75rem;
  border: 2px solid var(--grey-300);
  border-radius: var(--radius);
  background: var(--white);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--navy);
  outline: 3px solid var(--focus);
  outline-offset: 0;
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
}

.required {
  color: var(--warn-border);
  font-weight: 700;
}

.checkbox-group,
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkbox-group label,
.radio-group label {
  font-weight: 400;
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  line-height: 1.5;
}

.checkbox-group input,
.radio-group input {
  margin-top: 0.25rem;
  width: 1.125rem;
  height: 1.125rem;
  flex: 0 0 auto;
}

/* Honeypot — accessibly hidden */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Footer */
.site-footer {
  background: var(--navy-dark);
  color: var(--grey-100);
  padding: 2.5rem 1.25rem 1.5rem;
  margin-top: 3rem;
  font-size: 0.9375rem;
}

.site-footer a {
  color: var(--grey-100);
}

.site-footer a:visited {
  color: var(--grey-100);
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem;
}

.footer-grid h2 {
  font-size: 1rem;
  color: var(--white);
  border: 0;
  margin: 0 0 0.75rem;
  padding: 0;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-grid li {
  margin-bottom: 0.375rem;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--navy-light);
  font-size: 0.8125rem;
  color: var(--grey-300);
}

.footer-bottom address {
  font-style: normal;
  margin-bottom: 0.5rem;
}

/* Visually hidden */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Print */
@media print {
  .site-header,
  .site-nav,
  .status-banner,
  .site-footer,
  .skip-link,
  .cta-row {
    display: none;
  }
  main {
    max-width: none;
    padding: 0;
  }
  a {
    color: var(--text);
  }
}
