/* Progressive Recommendations for Los Angeles and California
   Plain CSS, system fonts, no external requests. */

:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-2: #f2efe8;
  --text: #1f2933;
  --muted: #5b6672;
  --accent: #1c4f94;
  --accent-strong: #123768;
  --accent-soft: #e6eef9;
  --navy: #14305f;
  --red: #b4232c;
  --line: #ddd7ca;
  --focus: #b45309;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(31, 41, 51, .06), 0 4px 14px rgba(31, 41, 51, .05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14191f;
    --surface: #1c232b;
    --surface-2: #232c36;
    --text: #e8ecf0;
    --muted: #a3afbb;
    --accent: #92b9ee;
    --accent-strong: #bcd5f6;
    --accent-soft: #1f3150;
    --navy: #14305f;
    --red: #e0626a;
    --line: #34404c;
    --focus: #fbbf24;
    --shadow: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 100%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap { width: min(100% - 2rem, 72rem); margin-inline: auto; }

main { flex: 1 0 auto; padding-block: 1.5rem 3rem; }

h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem); margin: .5rem 0 1rem; }
main > h1 { padding-top: .6rem; border-top: 6px solid var(--red); display: inline-block; padding-right: 2rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 .75rem; }

a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

.skip {
  position: absolute; left: .75rem; top: -4rem;
  background: var(--accent-strong); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 10;
}
.skip:focus { top: .75rem; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* header / footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.stripe { height: 8px; background: linear-gradient(to bottom, var(--navy) 0 4px, var(--red) 4px 8px); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-block: .85rem; }
.brand { margin: 0; font-weight: 700; font-size: 1.05rem; }
.brand a { color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: .65rem; }
.brand img { display: block; border-radius: 50%; flex: none; }
.brand a:hover { color: var(--accent); }
.site-header nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.site-header nav a {
  display: inline-block; padding: .4rem .8rem; border-radius: 999px;
  color: var(--text); text-decoration: none; font-size: .98rem;
}
.site-header nav a:hover { background: var(--surface-2); }
.site-header nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }

.site-footer { border-top: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: .92rem; padding-block: 1.25rem; }
.site-footer p { margin: 0; max-width: 60rem; }

/* home */
.home { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 1.75rem; padding-block: 2rem; }
.bird { width: clamp(104px, 22vw, 168px); height: auto; }
.hero { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center; gap: 1.25rem 1.5rem; max-width: 56rem; }
.badge { background: var(--navy); color: #fff; border-radius: 6px; padding: .6rem .8rem; width: 8.5rem; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: .35rem; box-shadow: var(--shadow); }
.badge .stars { display: flex; gap: .3rem; color: #fff; }
.badge .check { width: 4.6rem; height: auto; color: #fff; }
.hero-title { display: flex; flex-direction: column; justify-content: center; gap: .6rem; flex: 1 1 18rem; text-align: left; }
.hero-title .rule { display: block; height: 10px; background: var(--red); border-radius: 2px; }
.home h1 { font-size: clamp(1.9rem, 1.2rem + 2.8vw, 3rem); margin: 0; line-height: 1.12; text-transform: none; }
.big-links { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.big-links a {
  display: block; min-width: 14rem; padding: 1rem 1.75rem; border-radius: var(--radius);
  background: var(--navy); color: #fff; text-decoration: none; font-weight: 600; font-size: 1.15rem;
  box-shadow: var(--shadow); border-bottom: 4px solid var(--red);
}
.big-links a:hover { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) {
  .big-links a { background: #264a85; color: #fff; }
  .big-links a:hover { background: #3059a0; color: #fff; }
}
@media (max-width: 40rem) { .hero-title { text-align: center; } .badge { width: 100%; flex-direction: row; justify-content: center; gap: 1rem; } .badge .stars { flex-direction: column; } }

/* content */
.lead { font-size: 1.15rem; color: var(--muted); max-width: 52rem; }
.crumb { margin: 0; color: var(--muted); font-size: .95rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.4rem; margin-block: 1.25rem; }
.card h2 { margin-top: 0; font-size: 1.15rem; }
.card ul { margin: .5rem 0; padding-left: 1.25rem; }
.card li { margin-block: .35rem; }
.card p:first-child { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.cards { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.cards .card { margin: 0; }
.cards h2 { margin: 0 0 .4rem; }
.cards h2 a { text-decoration: none; }
.cards p { margin: 0; color: var(--muted); }

.downloads { font-size: .98rem; color: var(--muted); }

.jump ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.jump a { display: inline-block; padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; font-size: .95rem; }
.jump a:hover { background: var(--accent-soft); }

.filter { margin: 1.25rem 0 .75rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.filter label { font-weight: 600; }
.filter input { font: inherit; padding: .55rem .8rem; border: 1px solid var(--muted); border-radius: 8px; background: var(--surface); color: var(--text); min-width: min(100%, 20rem); }
.filter .count { color: var(--muted); font-size: .95rem; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); margin-block: 1rem; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .98rem; }
th, td { padding: .6rem .85rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); font-size: .9rem; text-transform: none; border-bottom: 2px solid var(--line); }
tbody th[scope="row"] { font-weight: 600; background: var(--surface); }
tbody tr:nth-child(even) td, tbody tr:nth-child(even) th[scope="row"] { background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
tr:target th, tr:target td { background: var(--accent-soft) !important; }
tr.group th.src-head { font-size: .9rem; font-weight: 700; }
tr.group th.group-name { border-left: 6px solid var(--red); }
tr.group th { background: var(--accent-soft) !important; color: var(--accent-strong); font-size: 1rem; padding-block: .7rem; scroll-margin-top: 3.5rem; }

table.grid .item-col { min-width: 15rem; max-width: 22rem; }
table.grid thead .item-col, table.grid tbody th[scope="row"] { position: sticky; left: 0; z-index: 1; }
table.grid thead .item-col { z-index: 3; }
table.grid tr.group th.group-name { position: sticky; left: 0; z-index: 1; }
table.grid td { min-width: 11rem; }
td.norec a, td.muted, .muted-text { color: var(--muted); font-style: italic; }
td.none { background-image: none; }

table.reason th[scope="row"] { min-width: 12rem; max-width: 16rem; }
table.reason td:nth-child(2) { min-width: 9rem; font-weight: 600; }
table.reason td:nth-child(2).muted { font-weight: 400; }
table.reason td:nth-child(3) { min-width: 22rem; }

tr[hidden] { display: none; }

/* narrow screens: stack rows as cards */
@media (max-width: 46rem) {
  .table-wrap { overflow: visible; border: 0; box-shadow: none; background: transparent; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tbody tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .85rem; padding: .25rem 0; box-shadow: var(--shadow); }
  tbody tr.group { background: transparent; border: 0; box-shadow: none; margin: 1.25rem 0 .5rem; padding: 0; }
  tr.group th { border-radius: 8px; }
  tr.group th.src-head { display: none; }
  th, td { border: 0 !important; padding: .35rem 1rem; background: transparent !important; }
  tbody th[scope="row"] { position: static !important; font-size: 1.05rem; padding-top: .7rem; max-width: none; }
  td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--muted); font-size: .9rem; display: block; }
  td.none { display: none; }
  table.grid .item-col, table.grid td, table.reason td:nth-child(3), table.reason th[scope="row"] { min-width: 0; max-width: none; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
html { scroll-behavior: smooth; }

@media print {
  .site-header nav, .jump, .skip, .filter, .big-links { display: none; }
  body { background: #fff; color: #000; font-size: 10.5pt; }
  .table-wrap { overflow: visible; box-shadow: none; }
  thead th { position: static; }
  a { color: inherit; }
}

.site-footer .mb { margin-top: .6rem; font-weight: 700; letter-spacing: .04em; font-size: .85rem; }
