/* Texas Court Steps: hub page styles.
   Tokens harvested from the sibling apps (court-steps-navigator /
   pro-se-federal-companion) so the hub reads as part of the family.
   Light values match the navigator's :root block; dark values match its
   [data-theme="dark"] block, applied here via prefers-color-scheme since
   the hub has no settings UI. All colors passed the navigator's WCAG AA
   contrast audit in their original pairings, which are preserved here. */

@font-face {
  font-family: 'Atkinson Hyperlegible';
  src: url('fonts/AtkinsonHyperlegible-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  src: url('fonts/AtkinsonHyperlegible-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --c-bg:        #f8f6f2;
  --c-surface:   #ffffff;
  --c-surface-2: #edf0f4;
  --c-border:    #ddd9d2;
  --c-text:      #1c1c1c;
  --c-text-muted:#5c5850;
  --c-primary:   #2e6388;
  --c-primary-h: #234d6a;
  --c-primary-bg:#2e6388;   /* white-text fill */
  --c-focus:     #005fcc;
  --c-warn-bg:   #fffbeb;
  --c-warn-bdr:  #b45309;
  --c-warn-text: #6b3c00;
  --c-danger-fill:#991b1b;  /* white-text fill */
  --c-radius:    6px;
  --c-radius-lg: 10px;
  --shadow:      0 1px 4px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.04);
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-bg:        #0e1117;
    --c-surface:   #161b27;
    --c-surface-2: #1e2433;
    --c-border:    #2c3040;
    --c-text:      #e8e5df;
    --c-text-muted:#9e9b95;
    --c-primary:   #4a90d9;
    --c-primary-h: #3a7bc8;
    --c-primary-bg:#1f5a82;
    --c-focus:     #60a5fa;
    --c-warn-bg:   #2d1a00;
    --c-warn-bdr:  #f59e0b;
    --c-warn-text: #fde68a;
    --c-danger-fill:#b91c1c;
  }
}

* { box-sizing: border-box; }

html { font-size: 100%; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.55;
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--c-primary-bg);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: 0 0 var(--c-radius) 0;
  z-index: 10;
}
.skip-link:focus { left: 0; }

/* ---------- header ---------- */
.site-header {
  background: var(--c-primary-bg);
  color: #fff;
}
.header-inner {
  max-width: 52rem;
  margin: 0 auto;
  padding: .75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.site-title {
  font-weight: 700;
  font-size: 1.1rem;
}
.quick-exit {
  background: var(--c-danger-fill);
  color: #fff;
  border: 2px solid rgba(255,255,255,.7);
  border-radius: var(--c-radius);
  font: inherit;
  font-weight: 700;
  padding: .5rem .9rem;
  min-height: 44px;
  cursor: pointer;
}
.quick-exit:hover { filter: brightness(1.15); }

/* ---------- layout ---------- */
main {
  max-width: 52rem;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}
main:focus { outline: none; }

h1 { font-size: 1.7rem; line-height: 1.25; margin: 1rem 0 .5rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 .75rem; }

.hero-sub {
  color: var(--c-text-muted);
  font-size: 1.05rem;
  max-width: 42rem;
}

/* ---------- route cards ---------- */
.card-grid {
  display: grid;
  gap: 1rem;
}
.route-card {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--c-radius-lg);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: inherit;
}
a.route-card:hover {
  border-color: var(--c-primary);
}
a.route-card:hover .route-card-title { color: var(--c-primary-h); }
.route-card-icon { font-size: 1.8rem; line-height: 1; margin-top: .15rem; }
.route-card-body { display: flex; flex-direction: column; gap: .3rem; }
.route-card-title { font-weight: 700; font-size: 1.1rem; }
.route-card-sub { color: var(--c-text-muted); }
.route-card-go {
  color: var(--c-primary);
  font-weight: 700;
  text-decoration: underline;
  margin-top: .2rem;
  /* Card is one big ≥44px link; this line is the visual affordance. */
  padding: .3rem 0;
}
.route-card-soon {
  background: var(--c-surface-2);
  box-shadow: none;
}
.route-card-badge {
  align-self: flex-start;
  margin-top: .2rem;
  background: var(--c-warn-bg);
  border: 1px solid var(--c-warn-bdr);
  color: var(--c-warn-text);
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 700;
  padding: .15rem .7rem;
}

/* ---------- not sure / help ---------- */
.not-sure {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--c-radius-lg);
  padding: .25rem 1.1rem 1rem;
  margin-top: 2rem;
}
.not-sure h2 { margin-top: 1rem; }
.not-sure li { margin: .4rem 0; }

.help-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .5rem;
}
.help-list li {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--c-radius);
  padding: .6rem .9rem;
}
.help-dv {
  margin-top: 1rem;
  background: var(--c-warn-bg);
  border: 1px solid var(--c-warn-bdr);
  color: var(--c-warn-text);
  border-radius: var(--c-radius);
  padding: .75rem 1rem;
}
.help-dv a { color: inherit; font-weight: 700; }

a { color: var(--c-primary); }
a:hover { color: var(--c-primary-h); }

/* ---------- focus ---------- */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--c-border);
  color: var(--c-text-muted);
  font-size: .9rem;
  max-width: 52rem;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

/* ---------- print ---------- */
@media print {
  .quick-exit, .skip-link { display: none; }
  .site-header { background: none; color: #000; }
  body { background: #fff; color: #000; }
  .route-card { box-shadow: none; break-inside: avoid; }
  a { color: #000; }
  .route-card-go::after,
  .help-list a::after { content: " (" attr(href) ")"; font-weight: 400; }
}

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