/* RouteCrew — transit-signage inspired UI. One bold element: the amber destination sign on the home page. */
:root {
  --paper: #F4F5F2;
  --surface: #FFFFFF;
  --ink: #1C2128;
  --ink-soft: #545B64;
  --line: #D9DCD6;
  --asphalt: #262A30;
  --amber: #F0A81C;
  --amber-deep: #C98500;
  --route: #1D5C8C;
  --ok: #2D7A4B;  --ok-bg: #E3F1E8;
  --wait: #7A5100; --wait-bg: #FCEFD2;
  --bad: #B3261E; --bad-bg: #F9E2E0;
  --muted-bg: #ECEDEA;
  --radius: 6px;
  --font: "Barlow", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16191D; --surface: #1F2328; --ink: #E8EAE6; --ink-soft: #A3AAB2; --line: #353A41;
    --asphalt: #0F1114; --route: #7DB6E3;
    --ok: #7FCB9A; --ok-bg: #1E3327; --wait: #F3C566; --wait-bg: #3A2E14; --bad: #F2948C; --bad-bg: #3D201E; --muted-bg: #2A2E34;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.55 var(--font); }
img { max-width: 100%; }
a { color: var(--route); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.page { padding: 2rem 0 4rem; }
.muted { color: var(--ink-soft); }
.small { font-size: .875rem; color: var(--ink-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--amber); color: #000; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.5em; }

/* Top bar */
.topbar { background: var(--asphalt); color: #F1F2EE; border-bottom: 4px solid var(--amber); }
.topbar-inner { display: flex; align-items: center; gap: 1rem; min-height: 60px; flex-wrap: wrap; }
.brand { font: 700 1.5rem/1 var(--display); color: inherit; text-decoration: none; display: flex; align-items: center; gap: .55rem; margin-right: auto; }
.brand-mark { width: 22px; height: 14px; border-radius: 3px 3px 2px 2px; background: var(--amber); box-shadow: inset 0 -4px 0 #00000033; }
.mainnav { display: flex; align-items: center; gap: .25rem 1rem; flex-wrap: wrap; }
.mainnav a, .mainnav .linkish { color: #D7DAD4; text-decoration: none; font-weight: 500; padding: .35rem 0; border-bottom: 2px solid transparent; }
.mainnav a:hover, .mainnav .linkish:hover { color: #fff; }
.mainnav a[aria-current="page"] { color: #fff; border-bottom-color: var(--amber); }
.mainnav .btn { color: #1C1C1C; border-bottom: 0; padding: .45rem .9rem; }
.nav-toggle { display: none; background: none; border: 1px solid #555B63; color: #fff; padding: .4rem .8rem; border-radius: var(--radius); font: inherit; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .mainnav { display: none; width: 100%; flex-direction: column; align-items: flex-start; padding: 0 0 1rem; }
  .mainnav.open { display: flex; }
}
.notice-bar { background: var(--wait-bg); color: var(--wait); padding: .65rem 1rem; text-align: center; font-size: .95rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: 600 1rem/1.2 var(--font); padding: .65rem 1.15rem;
  border-radius: var(--radius); border: 1px solid transparent; background: var(--ink); color: var(--surface); text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.12); }
.btn-amber { background: var(--amber); color: #1C1C1C; }
.btn-amber:hover { background: var(--amber-deep); filter: none; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { background: var(--muted-bg); filter: none; }
.btn-ghost-light { background: transparent; color: #F1F2EE; border-color: #6B717A; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-sm { padding: .4rem .75rem; font-size: .9rem; }
.btn-block { width: 100%; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--route); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linkish.danger { color: var(--bad); }
.inline { display: inline; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.row-actions form { margin: 0; }

/* Home hero: the destination sign */
.hero { background: var(--asphalt); color: #F1F2EE; padding: 3rem 0 3.5rem; }
.hero-inner { max-width: 1120px; }
.sign { display: inline-flex; align-items: stretch; margin-bottom: 1.75rem; border: 3px solid #0B0C0E; border-radius: 4px; background: #0B0C0E;
  font: 600 clamp(1.1rem, .8rem + 1.6vw, 1.9rem)/1 var(--display); text-transform: none; position: relative; overflow: hidden;
  animation: sign-on 900ms steps(6) 1 both; }
.sign-route { background: var(--amber); color: #0B0C0E; padding: .55rem .8rem; }
.sign-dest { color: var(--amber); padding: .55rem 1rem; text-shadow: 0 0 6px rgba(240, 168, 28, .55); letter-spacing: .04em; }
.sign::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 3px, rgba(0,0,0,.35) 3px 4px), repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,.35) 3px 4px); }
@keyframes sign-on { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sign { animation: none; } }
.hero h1 { font-size: clamp(2.2rem, 1.4rem + 3.4vw, 3.6rem); max-width: 18ch; color: #fff; }
.lede { font-size: 1.2rem; max-width: 56ch; color: #C9CDC6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end; margin: 0 0 1.75rem; }
.filters .field { flex: 1 1 180px; margin: 0; }
.filters .check { flex: 0 0 auto; }
.section-title { font-size: 1.25rem; color: var(--ink-soft); font-weight: 500; }

/* Job board — rows like a departures board, not cards */
.board { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.board-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.6fr) minmax(0, 1fr) auto; gap: .35rem 1.5rem; align-items: center;
  padding: 1rem .25rem; border-bottom: 1px solid var(--line); position: relative; }
.board-row:hover { background: var(--surface); }
.board-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.board-link::after { content: ""; position: absolute; inset: 0; }
.board-title { font: 600 1.3rem/1.2 var(--display); color: var(--ink); }
.board-row:hover .board-title { color: var(--route); }
.board-org { color: var(--ink-soft); font-size: .95rem; }
.board-meta { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .95rem; color: var(--ink-soft); }
.board-pay { font-weight: 600; }
.board-fee { font-size: .9rem; color: var(--ink-soft); white-space: nowrap; }
@media (max-width: 760px) {
  .board-row { grid-template-columns: 1fr auto; }
  .board-meta { grid-column: 1 / -1; order: 3; }
  .board-fee { order: 4; grid-column: 1 / -1; }
}

/* Job detail */
.crumb { font-size: .95rem; margin-bottom: .5rem; }
.job-org { font-size: 1.15rem; color: var(--ink-soft); }
.job-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2.5rem; margin-top: 1.5rem; align-items: start; }
.job-side { position: sticky; top: 1rem; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--amber); border-radius: var(--radius); padding: 1.25rem; }
@media (max-width: 860px) { .job-layout { grid-template-columns: 1fr; } .job-side { position: static; order: -1; } }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; margin: 0 0 1rem; }
.facts dt { color: var(--ink-soft); font-size: .92rem; }
.facts dd { margin: 0; font-weight: 500; }
.facts .fee { font-size: 1.15rem; font-weight: 700; }

/* Panels, stats, lists */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; }
.panel-head, .page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1, .panel-head h2 { margin: 0; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.two-col .panel { margin: 0; }
.two-col + .panel { margin-top: 1.5rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 0 0 1.75rem; border-top: 2px solid var(--ink); }
.stat { display: flex; flex-direction: column; padding: .9rem 1rem .9rem 0; border-bottom: 1px solid var(--line); }
.stat-n { font: 600 2.1rem/1.1 var(--display); }
.stat span:last-child { color: var(--ink-soft); font-size: .95rem; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: .65rem 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .35rem .75rem; align-items: center; }
.list li:last-child { border-bottom: 0; }
.queue { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .5rem; }
.queue a { display: flex; gap: .75rem; align-items: center; padding: .65rem .8rem; border-radius: var(--radius); background: var(--muted-bg); text-decoration: none; color: var(--ink-soft); }
.queue .has a { background: var(--wait-bg); color: var(--ink); font-weight: 500; }
.queue-n { font: 700 1.5rem/1 var(--display); min-width: 1.6em; }
.callout { background: var(--wait-bg); border-left: 4px solid var(--amber); padding: .8rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 1.5rem; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1rem .5rem; }
.timeline li::before { content: ""; position: absolute; left: -1.5rem; top: .45rem; width: 10px; height: 10px; border-radius: 50%; background: var(--amber); border: 2px solid var(--surface); }
.empty { text-align: center; padding: 3rem 1rem; color: var(--ink-soft); }
.empty h1 { color: var(--ink); }

/* Badges & stars */
.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: var(--muted-bg); color: var(--ink-soft); vertical-align: middle; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-wait { background: var(--wait-bg); color: var(--wait); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.stars { color: var(--line); letter-spacing: .05em; font-size: 1.05rem; }
.stars .on { color: var(--amber-deep); }
.stars-num { font-weight: 600; }
.rating-block { display: flex; flex-direction: column; align-items: flex-end; }
.profile-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.review { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.review:last-child { border-bottom: 0; }
.review header { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .4rem; }
.panel.review { border-bottom: 1px solid var(--line); padding: 1.25rem 1.5rem; }

/* Forms */
.auth { max-width: 720px; margin: 0 auto; }
.auth-narrow { max-width: 420px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem 1.25rem; }
.field-wide { grid-column: 1 / -1; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack-sm { display: flex; flex-direction: column; gap: .4rem; }
.field { display: flex; flex-direction: column; gap: .3rem; }
label { font-weight: 500; }
.opt { font-weight: 400; color: var(--ink-soft); font-size: .88rem; }
.hint { color: var(--ink-soft); font-size: .85rem; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid #A9AEA6; border-radius: var(--radius); padding: .6rem .7rem; width: 100%; }
@media (prefers-color-scheme: dark) { input, select, textarea { border-color: #4A5059; } }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--amber); outline-offset: 0; border-color: var(--ink); }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--amber-deep); }
.check label { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400; }
.check input { margin-top: .3rem; }
.fee-box { background: var(--muted-bg); border-radius: var(--radius); padding: 1rem 1.25rem; }
.fee-box ul { margin: .25rem 0 .75rem; padding-left: 1.2rem; }
.inline-form summary { cursor: pointer; color: var(--route); }
.inline-form form { display: flex; flex-direction: column; gap: .4rem; margin-top: .5rem; min-width: 220px; }
.star-input { border: 0; padding: 0; margin: 0; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: .15rem; }
.star-input legend { font-weight: 500; margin-bottom: .3rem; float: left; width: 100%; }
.star-input input { position: absolute; opacity: 0; }
.star-input label { font-size: 2.2rem; line-height: 1; color: var(--line); cursor: pointer; padding: 0 .1rem; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--amber-deep); }
.star-input input:focus-visible + label { outline: 3px solid var(--amber); }
.tabs { display: flex; gap: .25rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.tabs a { padding: .6rem 1rem; text-decoration: none; color: var(--ink-soft); border-bottom: 3px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--amber); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.25rem; }
.chips a { padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink-soft); font-size: .92rem; }
.chips a[aria-current] { background: var(--ink); color: var(--surface); border-color: var(--ink); }

/* Flash */
.flash { padding: .8rem 1rem; border-radius: var(--radius); margin-bottom: 1.25rem; }
.flash ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.flash-success { background: var(--ok-bg); color: var(--ok); }
.flash-error { background: var(--bad-bg); color: var(--bad); }
.flash-info { background: var(--muted-bg); color: var(--ink); }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1.5rem; }
table { width: 100%; border-collapse: collapse; font-size: .97rem; }
th, td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--ink-soft); font-size: .88rem; background: var(--paper); }
tbody tr:last-child td { border-bottom: 0; }
tr.unread td:first-child { box-shadow: inset 3px 0 0 var(--amber); font-weight: 600; }
.pager { display: flex; gap: .3rem; flex-wrap: wrap; margin: 1.5rem 0; }
.pager a, .pager span { min-width: 2.2rem; text-align: center; padding: .35rem .6rem; border-radius: var(--radius); border: 1px solid var(--line); text-decoration: none; }
.pager span { background: var(--ink); color: var(--surface); border-color: var(--ink); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 1.5rem 0; color: var(--ink-soft); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 2rem; }
