/* SortedTrips design system v1 — light default, dark via prefers-color-scheme. */
:root {
  --bg: #fafbfc;
  --surface: #ffffff;
  --text: #16242e;
  --muted: #5a6b76;
  --brand: #0e7490;       /* teal-700 */
  --brand-strong: #155e75;
  --accent: #f59e0b;      /* amber for highlights */
  --border: #dde4e9;
  --radius: 12px;
  --maxw: 64rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1a21;
    --surface: #14242e;
    --text: #e8eef2;
    --muted: #9fb1bb;
    --brand: #22b8d4;
    --brand-strong: #67d4e8;
    --border: #243a47;
  }
}

* { box-sizing: border-box; }
html { font-size: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
a { color: var(--brand-strong); }
a:hover { color: var(--brand); }
[hidden] { display: none !important; } /* defeats display:flex utility overrides */

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem 1rem; z-index: 10; }

/* Header */
.site-head { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-head nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; flex-wrap: wrap; padding-top: .4rem; padding-bottom: .4rem; }
.brand { font-weight: 800; font-size: 1.25rem; text-decoration: none; color: var(--text); }
.brand span { color: var(--brand); }
.nav { display: flex; gap: 1.1rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a { text-decoration: none; font-weight: 600; font-size: .95rem; }

/* Hero + tiles */
.hero { padding: 3rem 0 1.5rem; }
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin: 0 0 .6rem; line-height: 1.15; }
.hero h1 em { color: var(--brand); font-style: normal; }
.hero p { font-size: 1.1rem; color: var(--muted); max-width: 44rem; }
.tiles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); padding: 1rem 0 3rem; }
.tile {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1.25rem; text-decoration: none; color: var(--text);
  transition: transform .12s ease, border-color .12s ease;
}
.tile:hover { transform: translateY(-2px); border-color: var(--brand); color: var(--text); }
.tile h2 { margin: 0 0 .35rem; font-size: 1.08rem; color: var(--brand-strong); }
.tile p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Prose pages */
.prose { max-width: 46rem; padding: 2rem 0 3rem; }
.prose h1 { font-size: 1.8rem; }
.prose h2 { font-size: 1.2rem; margin-top: 1.6rem; }

/* Footer */
.site-foot { border-top: 1px solid var(--border); background: var(--surface); margin-top: 2rem; }
.site-foot .wrap { padding: 1.4rem 1.25rem; font-size: .88rem; color: var(--muted); }
.site-foot a { color: var(--muted); }

/* Consent banner */
#consent {
  position: fixed; inset-inline: 1rem; bottom: 1rem; z-index: 50;
  max-width: 30rem; margin-inline: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.25rem; box-shadow: 0 8px 30px rgba(0,0,0,.18); font-size: .92rem;
}
#consent p { margin: 0 0 .7rem; }
#consent button {
  font: inherit; font-weight: 600; margin-right: .5rem; cursor: pointer;
  border-radius: 8px; border: 1px solid var(--border); padding: .45rem .9rem;
  background: var(--bg); color: var(--text);
}
#consent button[data-consent="yes"] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Forms/tools shared (P1 modules build on these) */
.tool { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin: 1.25rem 0; }
.tool label { display: block; font-weight: 600; margin: .6rem 0 .2rem; }
.tool select, .tool input { font: inherit; padding: .45rem .6rem; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); max-width: 100%; }
.btn { display: inline-block; font-weight: 700; background: var(--brand); color: #fff; border: 0; border-radius: 8px; padding: .55rem 1.1rem; cursor: pointer; font-size: 1rem; }
.btn:hover { background: var(--brand-strong); }

@media print {
  .site-head, .site-foot, #consent, .skip { display: none !important; }
  body { background: #fff; color: #000; }
}
