/*
 * WayMark sample stylesheet
 *
 * Drop this file into your content directory as "style.css". WayMark links it
 * AFTER the built-in styles, so:
 *   - rules for selectors that already exist replace the defaults
 *   - rules for selectors that don't exist yet add new styling
 *
 * Save as UTF-8 (this file is plain ASCII, so it is safe as-is).
 */

/* ------------------------------------------------------------------
 * 1. OVERRIDE: the default theme is driven by these variables.
 *    Change them and the whole page follows.
 * ------------------------------------------------------------------ */
:root {
  --bg: #faf9f5;        /* warm ivory page background */
  --fg: #141413;        /* near-black text */
  --muted: #73726c;     /* secondary text, footer */
  --link: #c6613f;      /* terracotta links */
  --border: #e8e6dc;    /* rules, table borders */
  --code-bg: #f0eee6;   /* code blocks and inline code */

  /* New variables of our own, used by the rules below */
  --accent: #d97757;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
}

/* The built-in dark theme also sets the variables above, and this file loads
   later, so dark mode needs its own block here or the light values win. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #262624;
    --fg: #faf9f5;
    --muted: #a3a29a;
    --link: #e08a6a;
    --border: #3d3d3a;
    --code-bg: #1f1e1d;
    --accent: #d97757;
  }
}

/* ------------------------------------------------------------------
 * 2. OVERRIDE: existing elements with new looks
 * ------------------------------------------------------------------ */
body {
  font-family: var(--font-body);
  line-height: 1.7;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
}

h1 { font-size: 2.4rem; }

h2 {
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--border);
}

a {
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--accent); }

blockquote {
  border-left: 4px solid var(--accent);
  font-family: var(--font-display);
  font-style: italic;
}

pre, code {
  border: 1px solid var(--border);
}
pre code { border: 0; }

th {
  background: var(--code-bg);
  text-align: left;
}

.waymark-footer {
  text-align: center;
  border-top: 0;
}

/* ------------------------------------------------------------------
 * 3. NEW: rules the defaults don't have
 * ------------------------------------------------------------------ */
::selection {
  background: var(--accent);
  color: #fff;
}

img {
  border-radius: 10px;
}

/* A reusable callout. Use it from markdown with raw HTML:
 *
 *   <div class="callout">Pack extra layers for the summit.</div>
 */
.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--code-bg);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
}

/* Task list checkboxes from GFM ("- [x] done") */
input[type="checkbox"] {
  accent-color: var(--accent);
}