/* Practical Wins - dark theme, no build step. */
:root {
  --bg: #0b1020;
  --surface: #131a2e;
  --surface-2: #1b2442;
  --text: #e8ecf6;
  --muted: #aab5d1;
  --accent: #5eead4;
  --accent-ink: #04201c;
  --border: #2b3660;
  --focus: #fde047;
  --danger: #fca5a5;
  --fitness: #86efac;
  --money: #fcd34d;
  --home: #fdba74;
  --life: #c4b5fd;
  --radius: 14px;
  --max: 1080px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #99f6e4; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.skip-link {
  position: absolute; left: 0.75rem; top: -4rem; z-index: 100;
  background: var(--focus); color: #111; padding: 0.6rem 1rem; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 0.75rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* header / nav */
.site-header { border-bottom: 1px solid var(--border); background: rgba(11,16,32,.92); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(6px); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .7rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); font-weight: 800; font-size: 1.15rem; text-decoration: none; letter-spacing: -.01em; }
.brand svg { width: 28px; height: 28px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; flex-wrap: wrap; }
.nav a { display: inline-block; padding: .45rem .8rem; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--surface-2); color: var(--accent); }

/* hero */
.hero { padding: 3.2rem 0 1.6rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; margin: 0 0 .8rem; letter-spacing: -.02em; max-width: 18ch; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; margin: 0 0 1.4rem; }
.hero .eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; margin: 0 0 .6rem; }

/* search + filters */
.finder { padding-bottom: 1rem; }
.search-row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: end; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label { font-weight: 700; font-size: .9rem; color: var(--muted); }
.search-field { flex: 1 1 320px; }
input[type="search"], input[type="text"], input[type="email"], input[type="url"], select, textarea {
  width: 100%; background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: .75rem .9rem; font: inherit; min-height: 48px;
}
textarea { min-height: 120px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #8f9bbd; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--focus); }
.sort-field { flex: 0 0 200px; }
.pills { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 .4rem; padding: 0; list-style: none; }
.pill {
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 999px; padding: .5rem .95rem; font: inherit; font-weight: 600; min-height: 44px;
}
.pill .count { background: var(--surface-2); border-radius: 999px; padding: 0 .55rem; font-size: .85rem; color: var(--muted); min-width: 1.7rem; text-align: center; }
.pill:hover { border-color: var(--accent); }
.pill[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pill[aria-pressed="true"] .count { background: rgba(4,32,28,.15); color: var(--accent-ink); }
.pill.foryou { border-style: dashed; }
.pill.foryou[aria-pressed="true"] { border-style: solid; background: #fde68a; border-color: #fde68a; }
.status-row { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; margin: .6rem 0 1rem; color: var(--muted); }
.link-btn { background: none; border: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; padding: .3rem; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1rem; list-style: none; margin: 0; padding: 0; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.15rem 1.15rem 1rem; display: flex; flex-direction: column; gap: .7rem; height: 100%;
}
.card h3, .card h2 { font-size: 1.15rem; line-height: 1.3; margin: 0; }
.card h3 a, .card h2 a { color: var(--text); text-decoration: none; }
.card h3 a:hover, .card h2 a:hover { text-decoration: underline; }
.card p { margin: 0; }
.card .desc { color: #ced6ea; font-size: .97rem; }
.result { background: var(--surface-2); border-left: 4px solid var(--accent); border-radius: 8px; padding: .65rem .8rem; font-size: .95rem; }
.result strong { color: var(--accent); }
.badge { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; padding: .2rem .65rem; border-radius: 999px; border: 1px solid currentColor; width: fit-content; }
.badge::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; }
.cat-fitness { color: var(--fitness); } .cat-money { color: var(--money); } .cat-home { color: var(--home); } .cat-life { color: var(--life); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.tag { background: transparent; border: 1px solid var(--border); color: var(--muted); border-radius: 6px; padding: .12rem .5rem; font: inherit; font-size: .85rem; cursor: pointer; }
.tag:hover { color: var(--text); border-color: var(--accent); }
.tag.foryou-tag { border-color: #fde68a; color: #fde68a; }
span.tag { cursor: default; }
.meta { color: var(--muted); font-size: .88rem; display: flex; flex-direction: column; gap: .25rem; margin-top: auto; }
.disclaimer { font-size: .82rem; color: var(--muted); border-top: 1px dashed var(--border); padding-top: .55rem; }
.card-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; cursor: pointer; text-decoration: none;
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: .7rem 1.1rem; font: inherit; font-weight: 700; min-height: 46px;
}
.btn:hover { background: #99f6e4; color: var(--accent-ink); }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); padding: .35rem .75rem; min-height: 38px; font-size: .88rem; font-weight: 600; }
.btn.secondary:hover { border-color: var(--accent); background: var(--surface-2); color: var(--text); }
.empty { text-align: center; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 2.5rem 1rem; }
.empty h3 { margin-top: 0; }

/* sections */
section { padding-block: 1.4rem; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; }
.sponsor-slot { border: 2px dashed #6b7aa8; border-radius: var(--radius); padding: 1.4rem; background: repeating-linear-gradient(135deg, #111833, #111833 14px, #141c3a 14px, #141c3a 28px); }
.sponsor-slot .label { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; background: #fde68a; color: #1b1500; border-radius: 6px; padding: .15rem .55rem; margin-bottom: .6rem; }
.sponsor-slot h3 { margin: 0 0 .4rem; font-size: 1.3rem; }
.fineprint { font-size: .88rem; color: var(--muted); }
.two-col { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 820px) { .two-col { grid-template-columns: 1.1fr 1fr; } }
.newsletter form { display: flex; gap: .6rem; flex-wrap: wrap; align-items: end; }
.newsletter .field { flex: 1 1 240px; }
.form-msg { margin: .8rem 0 0; padding: .8rem 1rem; border-radius: 10px; }
.form-msg.ok { background: #0f3a2f; border: 1px solid #1f7a63; }
.form-msg.err { background: #3a1517; border: 1px solid #8f3a3f; color: #ffe1e1; }
.field-error { color: var(--danger); font-size: .88rem; margin: 0; min-height: 1.2em; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-grid { display: grid; gap: 1.1rem; max-width: 720px; }
.req { color: var(--danger); }

/* article pages */
.article { padding-block: 2rem; max-width: 760px; }
.article h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.2; margin: .6rem 0 1rem; letter-spacing: -.01em; }
.article h2 { font-size: 1.3rem; margin-top: 2rem; }
.breadcrumb { font-size: .9rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.prose p, .prose li { max-width: 68ch; }
.prose ul { padding-left: 1.2rem; }
.prose ul.tags, .prose ul.related { padding-left: 0; }
.related { list-style: none; padding: 0; display: grid; gap: .5rem; }
.related a { display: block; padding: .6rem .9rem; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--text); background: var(--surface); }
.related a:hover { border-color: var(--accent); }

/* trail finder + home callout */
.callout { display: flex; gap: 1rem 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--surface-2); border: 1px solid var(--accent); border-radius: var(--radius); padding: 1.2rem 1.4rem; }
.callout h2 { margin: 0 0 .3rem; font-size: 1.35rem; }
.callout p { margin: 0; color: var(--muted); max-width: 60ch; }
.trail-callout-wrap { padding-block: .4rem; }
.lead-text { font-size: 1.1rem; color: var(--muted); }
.trail-form { display: flex; gap: 1rem; flex-wrap: wrap; align-items: start; margin: 1.4rem 0 .6rem; }
.trail-form .field { flex: 0 1 260px; }
.trail-form .field label { font-size: 1.05rem; color: var(--text); }
.trail-form input[type="text"] { font-size: 1.4rem; letter-spacing: .08em; min-height: 56px; }
.trail-form .btn { min-height: 56px; font-size: 1.05rem; margin-top: 1.9rem; }
@media (max-width: 520px) { .trail-form .btn { margin-top: 0; width: 100%; } }
.btn:disabled { opacity: .6; cursor: progress; }
.trail-results { margin-top: 1.4rem; }
.trail-links { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 1rem; }
.prose .trail-links li { max-width: none; }
.trail-links .btn { font-size: 1.05rem; text-align: left; }
.trail-links p { margin: .35rem 0 0; }
.plain-links { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; list-style: none; padding: 0; font-size: 1.1rem; }
.prose ul.plain-links, .prose ul.trail-links { padding-left: 0; }

/* footer */
.site-footer { margin-top: 3rem; border-top: 1px solid var(--border); padding: 2rem 0 3rem; color: var(--muted); font-size: .92rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; gap: .4rem 1.2rem; flex-wrap: wrap; }
.site-footer a { color: var(--text); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
@media print { .site-header, .site-footer, .finder, .sponsor-slot, .newsletter, .callout { display: none; } body { background: #fff; color: #000; } }
