/* ===================================================================
   RecapCompute — shared styles
   Linked by index.html and every activities/*.html sub-page.
   Edit theme tokens in :root once and the whole site follows.
   =================================================================== */

:root {
  --bg: #0f1117;
  --surface: #171a23;
  --surface-hover: #1f2330;
  --border: #272b38;
  --text: #e6e8ee;
  --muted: #9aa0b0;
  --accent: #6c8cff;
  --accent-soft: rgba(108, 140, 255, 0.12);
  --radius: 14px;
  --maxw: 720px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f8fb;
    --surface: #ffffff;
    --surface-hover: #f0f2f8;
    --border: #e4e7ef;
    --text: #1a1d27;
    --muted: #5c6373;
    --accent: #3a5cf0;
    --accent-soft: rgba(58, 92, 240, 0.08);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(1.5rem, 5vw, 4rem) 1.25rem;
}

.wrap { width: 100%; max-width: var(--maxw); }

a { color: var(--accent); }

/* ---- Site header (home page) ------------------------------------- */

.site-header {
  text-align: center;
  margin-bottom: clamp(2rem, 6vw, 3.5rem);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  color: var(--text);
  text-decoration: none;
}

.logo .mark {
  display: grid;
  place-items: center;
  width: 1.5em;
  height: 1.5em;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #9d7bff);
  color: #fff;
  font-size: 0.7em;
  box-shadow: 0 6px 20px var(--accent-soft);
}

.tagline {
  margin: 1rem auto 0;
  max-width: 48ch;
  color: var(--muted);
  font-size: clamp(1rem, 2.5vw, 1.12rem);
}

/* ---- Section label ----------------------------------------------- */

.eyebrow {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 1rem;
}

/* ---- Activity list (home page) ----------------------------------- */

.activities {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.activity {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.activity:hover,
.activity:focus-visible {
  transform: translateY(-2px);
  background: var(--surface-hover);
  border-color: var(--accent);
  outline: none;
}

.activity .emoji {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 10px;
  background: var(--accent-soft);
  font-size: 1.3rem;
}

.activity .body { flex: 1; min-width: 0; }

.activity .title {
  font-weight: 600;
  font-size: 1.05rem;
}

.activity .desc {
  color: var(--muted);
  font-size: 0.92rem;
}

.activity .arrow {
  color: var(--muted);
  transition: transform 0.15s ease, color 0.15s ease;
}

.activity:hover .arrow,
.activity:focus-visible .arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* ---- Sub-page ("recap activity") --------------------------------- */

.back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
  transition: color 0.15s ease, transform 0.15s ease;
}

.back:hover,
.back:focus-visible { color: var(--accent); outline: none; }

.back:hover .chev { transform: translateX(-3px); }

.back .chev { transition: transform 0.15s ease; }

.page-header { margin-bottom: 2rem; }

.page-title {
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.page-sub {
  color: var(--muted);
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  margin: 0;
}

/* Prose / content area for sub-pages */
.content { color: var(--text); }
.content > * + * { margin-top: 1rem; }

.content h2 {
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin: 2rem 0 0.5rem;
}

.content h3 {
  font-size: 1.08rem;
  margin: 1.5rem 0 0.5rem;
}

.content ul,
.content ol { padding-left: 1.25rem; }

.content li + li { margin-top: 0.35rem; }

.content code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  font-size: 0.9em;
}

.content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  overflow-x: auto;
}

.content pre code { background: none; border: none; padding: 0; }

.content blockquote {
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

/* A simple card you can reuse inside a sub-page */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
}

/* ---- Footer ------------------------------------------------------ */

.site-footer {
  margin-top: clamp(2.5rem, 7vw, 4rem);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}
