/* ==========================================================================
   Platers.uk design system
   ========================================================================== */

:root {
  /* brand */
  --brand: #ff4d2d;
  --brand-dark: #d93a1c;
  --brand-tint: #fff1ed;
  --brand-ring: rgba(255, 77, 45, 0.22);

  /* ink & surface */
  --ink: #0a0c11;
  --ink-2: #151a23;
  --ink-3: #232b38;
  --text: #10151d;
  --muted: #5c6675;
  --faint: #8a94a4;
  --line: #e3e7ed;
  --line-strong: #ccd3dd;
  --surface: #ffffff;
  --canvas: #f5f7fa;
  --raised: #fbfcfe;

  /* semantic */
  --success: #0f9d63;
  --success-tint: #e7f7f0;
  --info: #2e6bff;
  --info-tint: #ecf1ff;
  --warn: #b7791f;
  --warn-tint: #fdf5e6;
  --danger: #d92d20;
  --danger-tint: #fdecea;

  /* form */
  --radius: 12px;
  --radius-lg: 18px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(12, 18, 28, 0.06), 0 1px 3px rgba(12, 18, 28, 0.04);
  --shadow: 0 4px 14px rgba(12, 18, 28, 0.07), 0 1px 3px rgba(12, 18, 28, 0.05);
  --shadow-lg: 0 18px 44px rgba(12, 18, 28, 0.13), 0 4px 12px rgba(12, 18, 28, 0.06);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --header-h: 68px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv02", "cv03", "cv04";
}

h1, h2, h3, h4 { margin: 0; line-height: 1.18; letter-spacing: -0.021em; font-weight: 650; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); letter-spacing: -0.032em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.1rem); letter-spacing: -0.026em; }
h3 { font-size: 1.18rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1rem; }
a { color: inherit; text-decoration: none; }

img, svg { max-width: 100%; }

.num { font-variant-numeric: tabular-nums; }

/* ---------- layout ---------- */

.wrap { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.wrap-narrow { width: min(880px, 100% - 2.5rem); margin-inline: auto; }
.wrap-wide { width: min(1440px, 100% - 2.5rem); margin-inline: auto; }

.stack > * + * { margin-top: var(--gap, 1rem); }
.row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.center { text-align: center; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(10, 12, 17, 0.92);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
}
.site-header .wrap-wide { display: flex; align-items: center; gap: 1.5rem; height: var(--header-h); }

.logo { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.16rem; letter-spacing: -0.03em; color: #fff; }
.logo-mark {
  display: grid; place-items: center;
  width: 34px; height: 26px; border-radius: 5px;
  background: #fff; color: var(--ink);
  font: 800 12px/1 var(--sans); letter-spacing: 0.06em;
  border: 2px solid var(--brand);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}
.logo-dot { color: var(--brand); }

.nav { display: flex; gap: 0.3rem; align-items: center; margin-left: auto; }
.nav a {
  padding: 0.5rem 0.8rem; border-radius: 8px; font-size: 0.925rem; font-weight: 500;
  color: rgba(255, 255, 255, 0.74); transition: background 0.15s, color 0.15s;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.09); }
.nav a.active { color: #fff; background: rgba(255, 255, 255, 0.13); }

.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: 0.5rem; cursor: pointer; }

@media (max-width: 860px) {
  .nav-toggle { display: block; margin-left: auto; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0.15rem;
    background: var(--ink); padding: 0.75rem 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: none;
  }
  .nav.open { display: flex; }
  .nav .btn { width: 100%; justify-content: center; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.68rem 1.15rem;
  border-radius: 10px; border: 1px solid transparent;
  font: 600 0.94rem/1.2 var(--sans); letter-spacing: -0.005em;
  cursor: pointer; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.06s, color 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-ring); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover:not([disabled]) { background: var(--brand-dark); }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover:not([disabled]) { background: var(--ink-2); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover:not([disabled]) { background: var(--raised); border-color: var(--faint); }

.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover:not([disabled]) { background: #f0f2f6; }

.btn-quiet { background: transparent; color: var(--muted); padding: 0.4rem 0.6rem; }
.btn-quiet:hover:not([disabled]) { color: var(--text); background: var(--canvas); }

.btn-danger { background: var(--danger-tint); color: var(--danger); border-color: rgba(217,45,32,0.2); }
.btn-danger:hover:not([disabled]) { background: #fbdcd9; }

.btn-sm { padding: 0.45rem 0.8rem; font-size: 0.85rem; border-radius: 8px; }
.btn-lg { padding: 0.9rem 1.6rem; font-size: 1.02rem; border-radius: 12px; }
.btn-block { width: 100%; }

/* ---------- cards & surfaces ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: clamp(1.15rem, 2.4vw, 1.75rem); }
.card-hover { transition: box-shadow 0.18s, border-color 0.18s, transform 0.18s; }
.card-hover:hover { box-shadow: var(--shadow); border-color: var(--line-strong); transform: translateY(-2px); }

.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem 1.35rem; border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: 1.02rem; font-weight: 650; }
.card-body { padding: 1.35rem; }
.card-foot { padding: 1rem 1.35rem; border-top: 1px solid var(--line); background: var(--raised); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

.panel { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; }

/* ---------- typography helpers ---------- */

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font: 600 0.74rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--brand);
}
.lead { font-size: clamp(1.02rem, 0.96rem + 0.35vw, 1.19rem); color: var(--muted); line-height: 1.6; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 0.86rem; }
.tiny { font-size: 0.775rem; }
.strong { font-weight: 650; }
.label {
  display: block; font: 600 0.78rem/1.3 var(--sans); letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 0.3rem;
}

/* ---------- badges ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.24rem 0.6rem; border-radius: 999px;
  font: 600 0.775rem/1.35 var(--sans);
  background: var(--canvas); color: var(--muted); border: 1px solid var(--line);
  white-space: nowrap;
}
.badge-success { background: var(--success-tint); color: var(--success); border-color: rgba(15,157,99,0.2); }
.badge-info { background: var(--info-tint); color: var(--info); border-color: rgba(46,107,255,0.18); }
.badge-warn { background: var(--warn-tint); color: var(--warn); border-color: rgba(183,121,31,0.22); }
.badge-danger { background: var(--danger-tint); color: var(--danger); border-color: rgba(217,45,32,0.18); }
.badge-brand { background: var(--brand-tint); color: var(--brand-dark); border-color: rgba(255,77,45,0.22); }
.badge-active { background: var(--brand); color: #fff; border-color: transparent; }
.badge-neutral { background: var(--ink); color: #fff; border-color: transparent; }

.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.dot-pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.8); } }

.plate {
  display: inline-flex; align-items: center;
  font: 700 0.95rem/1 var(--mono); letter-spacing: 0.06em;
  background: #f8d800; color: #101010;
  padding: 0.34rem 0.6rem; border-radius: 5px;
  border: 1px solid #d9bd00;
  text-transform: uppercase;
}
.plate-sm { font-size: 0.8rem; padding: 0.24rem 0.45rem; }

/* ---------- forms ---------- */

.field { display: block; margin-bottom: 1rem; }
.field > .label { margin-bottom: 0.35rem; }

.input, .select, .textarea {
  width: 100%; padding: 0.68rem 0.85rem;
  font: 400 0.95rem/1.45 var(--sans); color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring);
}
.textarea { min-height: 92px; resize: vertical; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235c6675' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.85rem center; padding-right: 2.2rem;
}
.hint { font-size: 0.8rem; color: var(--faint); margin-top: 0.3rem; }
.field-error { border-color: var(--danger) !important; }

.check {
  display: flex; gap: 0.7rem; align-items: flex-start;
  padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; background: var(--surface); transition: border-color 0.15s, background 0.15s;
}
.check:hover { border-color: var(--line-strong); }
.check input { margin-top: 0.22rem; accent-color: var(--brand); width: 17px; height: 17px; flex: none; }
.check-on { border-color: var(--brand); background: var(--brand-tint); }

.choice-grid { display: grid; gap: 0.65rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.choice {
  position: relative; display: block; cursor: pointer;
  padding: 0.85rem 1rem; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--surface); transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.choice:hover { border-color: var(--line-strong); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-on { border-color: var(--brand); background: var(--brand-tint); box-shadow: 0 0 0 3px var(--brand-ring); }
.choice-title { font-weight: 650; font-size: 0.94rem; }
.choice-sub { font-size: 0.8rem; color: var(--muted); }

fieldset { border: 0; margin: 0; padding: 0; }

/* ---------- alerts ---------- */

.alert {
  display: flex; gap: 0.65rem; align-items: flex-start;
  padding: 0.85rem 1.05rem; border-radius: 10px; font-size: 0.9rem;
  border: 1px solid transparent;
}
.alert-error { background: var(--danger-tint); color: #8c1d16; border-color: rgba(217,45,32,0.2); }
.alert-success { background: var(--success-tint); color: #0a6b45; border-color: rgba(15,157,99,0.22); }
.alert-info { background: var(--info-tint); color: #1c46ad; border-color: rgba(46,107,255,0.18); }
.alert-warn { background: var(--warn-tint); color: #8a5a12; border-color: rgba(183,121,31,0.24); }

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th {
  text-align: left; font: 600 0.75rem/1.3 var(--sans); letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--faint);
  padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background 0.12s; }
table.data tbody tr:hover { background: var(--raised); }

/* ---------- stats ---------- */

.stat { padding: 1.1rem 1.25rem; }
.stat-label { font: 600 0.74rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.stat-value { font-size: 1.85rem; font-weight: 680; letter-spacing: -0.03em; margin-top: 0.4rem; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 0.82rem; color: var(--muted); margin-top: 0.15rem; }

/* ---------- map ---------- */

.map {
  position: relative; width: 100%; min-height: 320px;
  background: #e8edf2; border-radius: var(--radius); overflow: hidden;
}
.map-tall { min-height: 520px; }
.map-flush { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.map-note {
  position: absolute; left: 12px; bottom: 12px; z-index: 5;
  background: rgba(255,255,255,0.94); border: 1px solid var(--line);
  padding: 0.35rem 0.65rem; border-radius: 8px; font-size: 0.74rem; color: var(--muted);
  box-shadow: var(--shadow-sm);
}
.map-fallback { position: absolute; inset: 0; }
.map-fallback svg { width: 100%; height: 100%; display: block; }

/* ---------- timeline ---------- */

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 1.25rem 1.9rem; }
.timeline li::before {
  content: ""; position: absolute; left: 4px; top: 5px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-strong);
}
.timeline li::after {
  content: ""; position: absolute; left: 9px; top: 18px; bottom: -2px; width: 2px; background: var(--line);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline li.done::before { background: var(--success); border-color: var(--success); }
.timeline li.done::after { background: var(--success); opacity: 0.35; }
.timeline li.current::before { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }
.timeline-title { font-weight: 620; font-size: 0.94rem; }
.timeline-meta { font-size: 0.8rem; color: var(--faint); }

/* ---------- progress rail ---------- */

.rail { display: flex; align-items: center; gap: 0; margin: 1.25rem 0; }
.rail-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.45rem; position: relative; }
.rail-step::before {
  content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--line);
}
.rail-step:first-child::before { display: none; }
.rail-step.done::before, .rail-step.current::before { background: var(--brand); }
.rail-node {
  width: 24px; height: 24px; border-radius: 50%; background: var(--surface);
  border: 2px solid var(--line-strong); display: grid; place-items: center;
  font-size: 0.7rem; font-weight: 700; color: var(--faint); position: relative; z-index: 1;
}
.rail-step.done .rail-node { background: var(--brand); border-color: var(--brand); color: #fff; }
.rail-step.current .rail-node { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }
.rail-label { font-size: 0.74rem; color: var(--muted); text-align: center; line-height: 1.25; }
.rail-step.current .rail-label { color: var(--text); font-weight: 600; }

/* ---------- route summary ---------- */

.route-line { display: flex; gap: 0.85rem; align-items: stretch; }
.route-track { display: flex; flex-direction: column; align-items: center; padding-top: 5px; flex: none; }
.route-pin { width: 11px; height: 11px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--surface); flex: none; }
.route-pin-end { border-color: var(--brand); background: var(--brand); }
.route-bar { width: 2px; flex: 1; background: linear-gradient(var(--ink), var(--brand)); margin: 3px 0; min-height: 24px; }
.route-stops { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 0.9rem; }
.route-stop-town { font-weight: 620; font-size: 0.95rem; }
.route-stop-addr { font-size: 0.82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }

/* ---------- job board card ---------- */

.job-card { display: flex; flex-direction: column; }
.job-card-head { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; padding: 1.1rem 1.25rem 0.85rem; }
.job-card-body { padding: 0 1.25rem 1rem; }
.job-metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.job-metric { background: var(--surface); padding: 0.7rem 0.75rem; text-align: center; }
.job-metric-label { font: 600 0.66rem/1 var(--sans); letter-spacing: 0.07em; text-transform: uppercase; color: var(--faint); }
.job-metric-value { font-size: 1.02rem; font-weight: 660; margin-top: 0.25rem; font-variant-numeric: tabular-nums; }
.job-card-foot { padding: 0.9rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }

.worth { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 650; font-size: 0.84rem; }
.worth-excellent { color: var(--success); }
.worth-good { color: var(--info); }
.worth-marginal { color: var(--warn); }
.worth-poor { color: var(--danger); }

.payout { font-size: 1.55rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

/* ---------- hero ---------- */

.hero {
  background:
    radial-gradient(1100px 520px at 78% -10%, rgba(255, 77, 45, 0.20), transparent 62%),
    radial-gradient(700px 420px at 8% 108%, rgba(46, 107, 255, 0.14), transparent 60%),
    var(--ink);
  color: #fff; padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(900px 460px at 50% 0%, #000, transparent 75%);
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { color: #fff; }
.hero .lead { color: rgba(255, 255, 255, 0.72); }
.hero-grid { display: grid; gap: clamp(2rem, 4vw, 3.5rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; } }

.trust-row { display: flex; flex-wrap: wrap; gap: 1.5rem 2.25rem; align-items: center; }
.trust-item { display: flex; gap: 0.55rem; align-items: center; font-size: 0.88rem; color: rgba(255,255,255,0.7); }

/* ---------- feature blocks ---------- */

.feature-icon {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-tint); color: var(--brand-dark); margin-bottom: 0.9rem;
}
.feature-icon svg { width: 21px; height: 21px; }

.split { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.split-reverse > :first-child { order: 2; }
@media (max-width: 899px) { .split-reverse > :first-child { order: 0; } }

.tick-list { list-style: none; margin: 0; padding: 0; }
.tick-list li { position: relative; padding-left: 1.85rem; margin-bottom: 0.7rem; }
.tick-list li::before {
  content: ""; position: absolute; left: 0; top: 0.36rem;
  width: 18px; height: 18px; border-radius: 50%; background: var(--success-tint);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%230f9d63' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m2.5 6.2 2.4 2.4L9.6 3.9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}

/* ---------- app shell (dashboards) ---------- */

.app-bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.app-bar .wrap-wide { display: flex; align-items: center; gap: 1rem; min-height: 62px; flex-wrap: wrap; }
.app-title { font-size: 1.16rem; font-weight: 660; letter-spacing: -0.02em; }

.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab {
  padding: 0.7rem 0.95rem; font-size: 0.92rem; font-weight: 560; color: var(--muted);
  border-bottom: 2px solid transparent; cursor: pointer; background: none; border-top: 0; border-left: 0; border-right: 0;
  white-space: nowrap; font-family: inherit;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* booking + tracking two-column layouts */
.book-layout { grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
@media (min-width: 1000px) { .book-layout { grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.85fr); } }

.track-layout { grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
@media (min-width: 1000px) { .track-layout { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.85fr); } }

.empty { text-align: center; padding: clamp(2.5rem, 6vw, 4rem) 1.5rem; color: var(--muted); }
.empty svg { width: 46px; height: 46px; color: var(--line-strong); margin-bottom: 0.85rem; }

.skeleton {
  background: linear-gradient(90deg, var(--canvas) 25%, #eef1f5 50%, var(--canvas) 75%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- drawer / modal ---------- */

.backdrop {
  position: fixed; inset: 0; background: rgba(10, 12, 17, 0.45); z-index: 90;
  display: grid; place-items: center; padding: 1.25rem;
  animation: fade 0.15s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  width: min(620px, 100%); max-height: 88vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: rise 0.2s cubic-bezier(0.2, 0.8, 0.3, 1);
}
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
.modal-wide { width: min(920px, 100%); }

/* ---------- footer ---------- */

.site-footer { background: var(--ink); color: rgba(255,255,255,0.62); padding: 3.5rem 0 2rem; margin-top: auto; }
.site-footer h4 { color: #fff; font-size: 0.83rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.9rem; }
.site-footer a { color: rgba(255,255,255,0.62); font-size: 0.9rem; display: block; padding: 0.22rem 0; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.footer-bar {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.82rem;
}

body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }

/* ---------- utilities ---------- */

.hidden { display: none !important; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.gap-sm { gap: 0.5rem; } .gap-lg { gap: 1.5rem; }
.divider { height: 1px; background: var(--line); margin: 1.25rem 0; border: 0; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: var(--mono); }
.text-brand { color: var(--brand); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
