/* UltraTrailPlan static guides — one stylesheet, no JavaScript. */

@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #171a22;
  --panel: #1e222c;
  --border: #2a2f3a;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #4ade80;
  --accent-text: #86efac;
  --max: 760px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 24px;
  height: 24px;
}

.crumbs {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--text);
}

.header-cta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  white-space: nowrap;
}

.header-cta:hover {
  border-color: var(--accent);
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 20px 48px;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 36px 0 12px;
}

h3 {
  font-size: 1rem;
  line-height: 1.4;
  margin: 24px 0 8px;
}

p {
  margin: 0 0 16px;
}

ul,
ol {
  margin: 0 0 16px;
  padding-left: 1.25rem;
}

li {
  margin: 0.35rem 0;
}

.answer {
  font-size: 1.1rem;
  border-left: 3px solid var(--accent);
  padding: 2px 0 2px 16px;
  margin: 0 0 20px;
}

.table-wrap {
  overflow-x: auto;
  margin: 16px 0 24px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.note {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.note strong {
  color: var(--text);
}

.cta {
  margin: 36px 0 24px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
}

.cta p {
  flex: 1 1 auto;
  margin: 0;
}

.cta .button {
  flex: 0 0 auto;
  margin-left: auto;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: #0b1a10;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.button:hover {
  background: var(--accent-text);
  color: #0b1a10;
}

.related {
  margin-top: 32px;
}

.related h2 {
  margin-top: 0;
}

.cite {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 20px 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-note {
  margin: 6px 0 0;
}

kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.85em;
}

@media (max-width: 600px) {
  .site-header {
    padding: 20px 16px 0;
  }

  main {
    padding: 24px 16px 40px;
  }

  h1 {
    font-size: 1.6rem;
  }

  .site-footer {
    padding: 20px 16px 32px;
  }
}

@media print {
  html,
  body {
    background: #fff;
    color: #000;
  }

  .site-header nav,
  .header-cta,
  .cta,
  .site-footer nav {
    display: none;
  }

  a {
    color: #000;
  }
}
