/* MCP Workout Tracker website. One stylesheet, no build step.
   Colours: accent #2557F5, AI/coach #7A3FE4 (AI-related highlights only). */

:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-sunken: #eef0f5;
  --border: #dde1ea;
  --text: #14171f;
  --text-secondary: #4a5162;
  --text-muted: #6b7285;
  --accent: #2557f5;
  --accent-text: #1f4ad6;
  --on-accent: #ffffff;
  --coach: #7a3fe4;
  --coach-text: #6a2fd4;
  --coach-soft: #f1eafd;
  --warn-bg: #fff6e0;
  --warn-border: #e8c46a;
  --warn-text: #5c4300;
  --radius: 14px;
  --radius-sm: 8px;
  --max: 46rem;
  --max-wide: 64rem;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1016;
    --surface: #171a22;
    --surface-sunken: #1f232d;
    --border: #2c313d;
    --text: #eceef3;
    --text-secondary: #b6bccb;
    --text-muted: #8d94a6;
    --accent: #2557f5;
    --accent-text: #8ea8ff;
    --on-accent: #ffffff;
    --coach: #9d6cf2;
    --coach-text: #c3a3fb;
    --coach-soft: #261c3a;
    --warn-bg: #2e2510;
    --warn-border: #7a6223;
    --warn-text: #f3dc9c;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent-text); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--surface);
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 10;
}
.skip-link:focus { top: 1rem; }

/* Header and footer */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-header .inner,
.site-footer .inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0.875rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
}
.brand {
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 9px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}
.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.35rem 0;
  display: inline-block;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.site-footer a { color: var(--text-secondary); }
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

/* Layout */

main { display: block; }

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1rem 0;
}
.wide {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1rem;
}

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); margin: 0 0 0.75rem; }
h2 { font-size: 1.45rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.125rem; margin: 1.75rem 0 0.5rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: 0.35rem; }

.lede { font-size: 1.2rem; color: var(--text-secondary); }
.muted { color: var(--text-muted); }
.small { font-size: 0.9rem; }

/* Hero */

.hero {
  padding: 3.5rem 0 2.5rem;
}
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.2rem); max-width: 18ch; }
.hero .lede { max-width: 40rem; }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}
.button.primary { background: var(--accent); color: var(--on-accent); }
.button.primary:hover { filter: brightness(1.08); }
.button.secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.button.coach { background: var(--coach); color: #ffffff; }

/* Cards and grids */

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 0.5rem;
}
.card h3 { margin-top: 0; }
.card.ai { border-color: color-mix(in srgb, var(--coach) 45%, var(--border)); }

.section { padding: 2rem 0; }
.section h2 { margin-top: 0; }

/* Numbered steps */

ol.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 1.25rem 0 1.5rem;
}
ol.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.25rem 3rem;
  margin: 0;
}
ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--surface-sunken);
  color: var(--text);
}
ol.steps.ai > li::before { background: var(--coach-soft); color: var(--coach-text); }

/* AI marker: only for things the AI does */

.ai-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--coach-text);
  background: var(--coach-soft);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  vertical-align: middle;
}

/* Callouts */

.note, .draft-banner {
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  margin: 1.25rem 0;
  border: 1px solid var(--border);
  background: var(--surface);
}
.note p:last-child, .draft-banner p:last-child { margin-bottom: 0; }
.draft-banner {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--warn-text);
}

/* Unfilled values. Every [[PLACEHOLDER]] on the site uses this. */
.ph {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--warn-bg);
  color: var(--warn-text);
  border: 1px dashed var(--warn-border);
  border-radius: 4px;
  padding: 0 0.3em;
  word-break: break-all;
}

/* Server address box */

.copy-box {
  display: block;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
  margin: 0.5rem 0 1.25rem;
}

/* Screenshot slots: plain boxes until real screenshots are added */

.shot {
  margin: 0.75rem 0 0.5rem;
}
.shot .slot {
  display: grid;
  place-items: center;
  min-height: 11rem;
  max-width: 26rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-sunken);
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 1rem;
  text-align: center;
}
.shot figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Tables */

.table-wrap { overflow-x: auto; margin: 0 0 1.25rem; }
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
th { font-weight: 600; background: var(--surface-sunken); }

/* FAQ */

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 1rem;
  margin-bottom: 0.6rem;
}
summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.6rem 0;
  min-height: 44px;
}
details[open] summary { margin-bottom: 0.25rem; }

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem 0.4rem;
  margin: 1.5rem 0;
}
.toc ol { margin: 0.25rem 0 0.5rem; padding-left: 1.25rem; }

@media (max-width: 30rem) {
  body { font-size: 1rem; }
  .hero { padding-top: 2.25rem; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Until real screenshots are added, hide the empty screenshot boxes. */
.shot:has(.slot) { display: none; }
