/* Peak Inspire — same warm field-guide palette as the land checklist */

:root {
  --bg: #faf7f0;
  --bg-alt: #f2ecdd;
  --card: #ffffff;
  --text: #2a2f27;
  --muted: #5b6156;
  --forest: #2f4a3c;
  --forest-dark: #223a2e;
  --clay: #b8763f;
  --clay-dark: #9c5f2e;
  --border: #e2dbc8;
  --focus: #1f6fb2;
  --radius: 14px;
  --footer-bg: #223a2e;
  --flag-bg: #fff3cd;
  --flag-border: #e0c46c;
  --flag-text: #6b5200;
}

/* Dark mode: set on <html> by the head script (saved choice, else the computer's setting) */
[data-theme="dark"] {
  --bg: #161a17;
  --bg-alt: #1c211d;
  --card: #212823;
  --text: #e4e2da;
  --muted: #a9aea4;
  --forest: #8cc3a2;
  --forest-dark: #d7e6db;
  --clay: #d39a62;
  --clay-dark: #e3ad78;
  --border: #343c36;
  --focus: #7fb6e6;
  --footer-bg: #0f1412;
  --flag-bg: #3a3218;
  --flag-border: #8a7430;
  --flag-text: #f1d98a;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1.0625rem;
}

a { color: var(--forest); }
a:hover { color: var(--clay-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--card); padding: .5rem 1rem; z-index: 10; }

/* Home */
.home-hero { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 3rem 0 2.5rem; }
.home-hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); line-height: 1.15; margin: .2rem 0 1rem; color: var(--forest-dark); max-width: 22ch; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; margin: 0; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--clay-dark); margin: 0; }

.section-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: 2rem 0; }
.section-card { display: block; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.35rem; text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.section-card:hover { border-color: var(--clay); transform: translateY(-2px); color: var(--text); }
.section-card h2 { margin: 0 0 .4rem; color: var(--forest); font-size: 1.25rem; }
.section-card p { margin: 0; color: var(--muted); font-size: .98rem; }

.latest h2 { color: var(--forest-dark); }
.land-note { margin: 2.5rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--clay); background: var(--card); border-radius: 0 var(--radius) var(--radius) 0; }
.land-note p { margin: 0; }

/* Lists of posts */
.post-list { list-style: none; padding: 0; margin: 1rem 0; }
.post-list li { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.post-list a { font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.post-list p { margin: .3rem 0 0; color: var(--muted); }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--clay-dark); margin-right: .5rem; }
.empty { color: var(--muted); font-style: italic; }

/* Post + sidebar layout */
.with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 3rem; padding-top: 2.25rem; padding-bottom: 3rem; }
@media (max-width: 900px) { .with-sidebar { grid-template-columns: 1fr; gap: 2rem; } }

.post { max-width: 70ch; }
.post h1, .hub h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.2; color: var(--forest-dark); margin: .25rem 0 .5rem; }
.crumbs { margin: 0; font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.crumbs a { text-decoration: none; color: var(--clay-dark); }
.meta { color: var(--muted); font-size: .92rem; margin: 0 0 1.75rem; }
.draft-flag { background: var(--flag-bg); border: 1px solid var(--flag-border); color: var(--flag-text); padding: .4rem .75rem; border-radius: 8px; font-weight: 700; font-size: .9rem; display: inline-block; }

.post-body h2 { color: var(--forest-dark); margin-top: 2.25rem; line-height: 1.3; }
.post-body h3 { color: var(--forest); margin-top: 1.6rem; }
.post-body blockquote { margin: 1.5rem 0; padding: .75rem 1.25rem; border-left: 4px solid var(--clay); background: var(--card); border-radius: 0 var(--radius) var(--radius) 0; }
.post-body img { max-width: 100%; height: auto; border-radius: var(--radius); }
.post-body li { margin: .3rem 0; }
.post-body .callout { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.tool-link { font-weight: 600; }

.related { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.related h2 { font-size: 1.1rem; color: var(--forest-dark); }
.back-to-hub { margin-top: 1.5rem; font-weight: 600; }

.hub-intro { color: var(--muted); font-size: 1.1rem; max-width: 65ch; }

/* Sidebar: the tasteful money spot */
.sidebar { display: flex; flex-direction: column; gap: 1rem; align-self: start; position: sticky; top: 1.25rem; }
@media (max-width: 900px) { .sidebar { position: static; } }
.side-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.15rem; font-size: .95rem; }
.side-card h2 { font-size: 1rem; margin: 0 0 .5rem; color: var(--forest-dark); }
.side-card p { margin: 0 0 .5rem; color: var(--muted); }
.side-card .small { font-size: .8rem; }
.side-card.sponsor { border-color: var(--clay); }
.tool-list, .plain-list { list-style: none; margin: 0; padding: 0; }
.tool-list li, .plain-list li { padding: .35rem 0; border-bottom: 1px dashed var(--border); }
.tool-list li:last-child, .plain-list li:last-child { border-bottom: 0; }
.tool-list span { display: block; color: var(--muted); font-size: .85rem; }

/* Footer */
.site-footer { background: var(--footer-bg); color: #d9e2da; padding: 1.75rem 0; font-size: .92rem; }
.site-footer a { color: #fff; }
.site-footer p { margin: .3rem 0; }
