/* Shared by home and every trip page. Per-trip accent is set on <html> from trip.yaml; ink and tint are derived here (I2a). */
:root {
  --sand-50:#fdfbf7; --sand-100:#f6f1e7; --slate-900:#0f172a; --slate-200:#e2e8f0;
  --bg:var(--sand-50); --surface:#fff; --text:var(--slate-900); --muted:#5b6678; --border:var(--slate-200); --tile:var(--sand-100);
  --accent:#12897f;
  --accent-ink:light-dark(color-mix(in srgb,var(--accent) 70%,#000),color-mix(in srgb,var(--accent) 45%,#fff));
  --accent-tint:color-mix(in srgb,var(--accent) 14%,var(--surface));
  --font-body:'Plus Jakarta Sans',-apple-system,BlinkMacSystemFont,sans-serif; --font-display:'Playfair Display',Georgia,serif;
  --late:light-dark(#b4441c,#f08a5d); --late-tint:light-dark(#fbe6dc,#3a2318); /* overdue (booking) */
  --r-md:14px; --r-lg:22px; --gutter:16px;
  color-scheme:light;
}
:root[data-theme="dark"] { color-scheme:dark; --bg:#17140f; --surface:#241f18; --text:#fdfbf7; --muted:#b8ac9a; --border:#3a3226; --tile:#2a2419; }
@media (prefers-color-scheme:dark) { :root:not([data-theme]) { color-scheme:dark; --bg:#17140f; --surface:#241f18; --text:#fdfbf7; --muted:#b8ac9a; --border:#3a3226; --tile:#2a2419; } }
* { box-sizing:border-box; }
html { overflow-x:clip; }
body { margin:0; font:16px/1.55 var(--font-body); background:var(--bg); color:var(--text); overflow-x:clip; -webkit-font-smoothing:antialiased; }
h1,h2,h3,.brand { font-family:var(--font-display); font-weight:600; letter-spacing:-.01em; margin:0; }
a { color:inherit; text-decoration:none; }
button { font:inherit; color:inherit; }
:focus-visible { outline:3px solid var(--accent-ink); outline-offset:2px; }
.wrap { width:100%; max-width:1180px; margin:0 auto; padding:0 var(--gutter); }
.site { position:sticky; top:0; z-index:1000; background:var(--bg); border-bottom:1px solid var(--border); }
.site .wrap { display:flex; align-items:center; justify-content:space-between; height:56px; }
.brand { font-size:20px; display:inline-flex; align-items:center; min-height:44px; }
.hbar { display:flex; align-items:center; gap:8px; }
.themebtn { border:1px solid var(--border); background:var(--surface); border-radius:999px; min-height:44px; min-width:44px; padding:0 14px; cursor:pointer; display:inline-flex; align-items:center; gap:8px; font-size:14px; }
.chip { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; padding:4px 10px; border-radius:999px; background:var(--surface); color:var(--text); border:1px solid var(--border); }
.chip::before { content:""; width:8px; height:8px; border-radius:50%; background:var(--muted); }
.chip[data-s="travelling"]::before { background:#16a34a; }
.chip[data-s="locked"]::before { background:var(--accent); }
.chip[data-s="planning"]::before { background:#d97706; }
.chip[data-s="past"]::before { background:#94a3b8; }
.hatch { background:repeating-linear-gradient(135deg, color-mix(in srgb,var(--accent) 22%,var(--tile)) 0 12px, var(--tile) 12px 24px); }
.meta { color:var(--muted); font-size:14px; }
.hubs { margin:0; padding:0; list-style:none; display:flex; flex-wrap:wrap; gap:4px 14px; font-size:14px; color:var(--muted); }
@media (min-width:700px) { .hubs { column-gap:0; } .hubs li:not(:last-child)::after { content:"\00B7"; margin-left:8px; } }
/* home */
.home { padding-block:28px 64px; }
.home h1 { font-size:clamp(28px,5vw,44px); margin-bottom:6px; }
.home .lead { margin:0 0 22px; color:var(--muted); max-width:56ch; }
.grid { display:grid; gap:20px; grid-template-columns:1fr; }
@media (min-width:900px) { .grid { grid-template-columns:1fr 1fr; } .grid .pin { grid-column:1/-1; } }
.card { display:block; background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg); overflow:hidden; transition:transform .18s ease, box-shadow .18s ease; }
.card:hover { transform:translateY(-2px); box-shadow:0 18px 36px -16px rgba(0,0,0,.3); }
.card .hero { position:relative; aspect-ratio:16/10; display:flex; align-items:flex-end; }
.pin .hero { aspect-ratio:21/9; }
@media (max-width:640px) { .pin .hero { aspect-ratio:16/10; } }
.scrim { position:absolute; inset:0; background:linear-gradient(to top, rgba(8,12,20,.78), rgba(8,12,20,.05) 62%); }
.bg { position:absolute; inset:0; background-size:cover; background-position:center; }
.card .hero .chip { position:absolute; top:14px; left:14px; z-index:1; }
.card .hero h2 { position:relative; z-index:1; color:#fff; font-size:clamp(24px,4vw,34px); padding:0 18px 16px; text-shadow:0 1px 12px rgba(0,0,0,.4); }
.card .body { padding:14px 18px 18px; display:grid; gap:8px; }
.row { display:flex; justify-content:space-between; gap:12px; align-items:baseline; flex-wrap:wrap; }
.count { font-family:var(--font-display); font-size:22px; color:var(--accent-ink); }
.go { font-weight:700; font-size:14px; color:var(--accent-ink); border-bottom:2px solid var(--accent); padding-bottom:1px; }
.today { background:var(--accent-tint); border-radius:var(--r-md); padding:10px 14px; font-size:14px; }
/* trip page */
.thero { position:relative; min-height:200px; display:flex; align-items:flex-end; color:#fff; }
.thero .scrim { background:linear-gradient(to top, rgba(8,12,20,.85), rgba(8,12,20,.4) 75%); }
.thero .wrap { position:relative; padding-block:22px; display:grid; gap:8px; }
.thero h1 { font-size:clamp(28px,6vw,46px); }
.thero .meta, .crumb { color:#e5e7eb; font-size:14px; }
.crumb { justify-self:start; padding-block:12px; margin-block:-12px; }
.thero .meta { font-size:14px; }
.tbody { padding:22px 0 100px; display:grid; gap:16px; grid-template-columns:minmax(0,1fr); align-content:start; }
@media (min-width:900px) { .tbody.two { grid-template-columns:1.4fr 1fr; } }
.panel { background:var(--surface); border:1px solid var(--border); border-radius:var(--r-md); padding:18px; display:grid; gap:10px; align-content:start; }
.panel.full { grid-column:1/-1; }
.panel h3 { font-size:20px; }
.stub { border:1px dashed var(--border); border-radius:12px; padding:12px; color:var(--muted); font-size:14px; }
.kv { display:grid; grid-template-columns:auto 1fr; gap:6px 16px; font-size:14px; margin:0; }
.kv dt { color:var(--muted); } .kv dd { margin:0; }
.days { list-style:none; margin:0; padding:0; display:grid; gap:6px; font-size:14px; }
.days li { display:grid; grid-template-columns:3.2em 1fr; gap:8px; }
.days b { color:var(--accent-ink); }
.days .go { display:inline-block; padding-block:10px; }
.photos { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:14px; }
.photos figure { margin:0; border:1px solid var(--border); border-radius:12px; overflow:hidden; background:var(--bg); min-width:0; }
.photos figure.has-broken-img::before { content:"Photo unavailable"; display:flex; align-items:center; justify-content:center; aspect-ratio:4/3; background:var(--tile); color:var(--muted); font-size:13px; font-weight:500; }
.photos img { display:block; width:100%; aspect-ratio:4/3; object-fit:cover; background:var(--border); }
.photos figcaption { display:grid; gap:2px; padding:10px 12px 12px; font-size:14px; }
.photos figcaption span { color:var(--muted); font-size:13px; overflow-wrap:anywhere; }
.photos figcaption a { color:inherit; text-decoration:underline; padding-block:4px; }
.nav { position:fixed; left:0; right:0; bottom:0; z-index:40; background:var(--surface); border-top:1px solid var(--border); display:grid; grid-template-columns:repeat(5,1fr); padding-bottom:env(safe-area-inset-bottom); }
.nav a { display:grid; justify-items:center; gap:2px; padding:8px 2px; min-height:54px; font-size:12px; font-weight:600; color:var(--muted); }
.nav a svg { width:22px; height:22px; stroke:currentColor; fill:none; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.nav a[aria-current="page"] { color:var(--accent-ink); }
.nav .extra, .nav .mobile-hide { display:none; }
.shell > .nav ~ .tbody { min-width:0; }
@media (min-width:1000px) {
  .shell { display:grid; grid-template-columns:200px 1fr; gap:28px; }
  .nav { position:sticky; top:calc(var(--header-h,56px) + 16px); align-self:start; grid-template-columns:1fr; border:1px solid var(--border); border-radius:var(--r-md); padding:6px; bottom:auto; margin-top:22px; }
  .nav a { grid-auto-flow:column; justify-content:start; gap:10px; font-size:15px; min-height:44px; padding:8px 12px; border-radius:10px; }
  .nav a[aria-current="page"] { background:var(--accent-tint); }
  .nav .extra, .nav .mobile-hide { display:grid; } .nav .more { display:none; }
  .tbody { padding-bottom:48px; }
}
@media (max-width:640px) {
  .site .wrap { padding-inline:12px; }
  .brand { font-size:18px; }
  #theme-tx, #signout-tx { display:none; }
  .hbar { gap:6px; }
  .themebtn { padding:0; min-width:38px; width:38px; height:38px; justify-content:center; }
  .feedback-toggle-btn { min-width:38px; width:38px; height:38px; }
  .header-user-btn { padding:4px 8px; font-size:12px; }
  .htools { gap:6px; }
}
/* archive (I5) */
.amap { width:100%; height:auto; background:var(--tile); border-radius:var(--r-md); }
.days.wide li { grid-template-columns:5.5em 1fr; }
/* trip pages use the full width: sidebar at the left edge, content runs to the right edge (home keeps the 1180px column) */
body[data-slug] .wrap { max-width:none; padding-inline:clamp(16px,2vw,32px); }
@media (min-width:1000px) { body[data-slug] .shell { grid-template-columns:200px minmax(0,1fr); gap:clamp(20px,2vw,32px); } }
