/* Mobility Tips Guide.
   Dark card layout. No external fonts, no scripts, no trackers. */
:root {
  --page: #0B1416;
  --surface: #161D1F;
  --surface-hover: #1C2528;
  --border: #2A3236;
  --text: #D7DADC;
  --heading: #F2F4F5;
  --muted: #9BA3A6;
  --accent: #3A4A52;
  --input-bg: #000000;
  --input-fg: #ffffff;
  --input-line: #ffffff;
  --radius: 14px;
  --topbar-h: 3rem;
}

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
}

a {
  color: var(--heading);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:hover, a:focus { text-decoration-thickness: 2px; }
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* Slim top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--topbar-h);
  background: var(--page);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 68rem;
  margin: 0 auto;
  height: 100%;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
}
.brand {
  color: var(--heading);
  text-decoration: none;
  font-weight: 650;
  font-size: 1rem;
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; }

/* Shell: left sidebar + main */
.shell {
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  max-width: 68rem;
  margin: 0 auto;
  padding: 1rem 1.25rem 2.5rem;
}

.sidebar {
  position: sticky;
  top: calc(var(--topbar-h) + 1rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.45rem;
}
.sidebar-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.4rem 0.7rem 0.25rem;
}
.sidebar a {
  display: block;
  color: var(--text);
  text-decoration: none;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  border: 1px solid transparent;
}
.sidebar a:hover {
  background: var(--surface-hover);
  text-decoration: none;
}
.sidebar a[aria-current="page"] {
  background: var(--surface-hover);
  border-color: var(--border);
  color: var(--heading);
  font-weight: 600;
}

/* Cards */
.cards { display: flex; flex-direction: column; gap: 0.9rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem 1.25rem;
}

.article-card :first-child { margin-top: 0; }
.article-card a:first-child,
.article-card strong a {
  font-size: 1.15rem;
  font-weight: 650;
  color: var(--heading);
  text-decoration: none;
}
.article-card a:hover { text-decoration: underline; }

.after-list { margin: 0; color: var(--muted); font-size: 0.95rem; }
.after-list p { margin: 0.2rem 0 0.3rem; }
.section-kicker {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}

/* Product photo */
.product-photo {
  margin: 0 0 1rem;
  max-width: 16.5rem;
}
.product-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--page);
}
.product-photo figcaption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Type */
h1, h2, h3, h4 {
  color: var(--heading);
  font-weight: 650;
  line-height: 1.25;
}
h1 { font-size: 1.75rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.375rem; margin: 1.6rem 0 0.5rem; }
h3 { font-size: 1.125rem; margin: 1.3rem 0 0.4rem; }
.card > h1:first-child,
.card > h2:first-child,
.card > .product-photo:first-child + h1 { margin-top: 0; }
p { margin: 0.7rem 0; }
ul, ol { padding-left: 1.35rem; margin: 0.6rem 0; }
li { margin: 0.35rem 0; }
hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.4rem 0;
}
blockquote {
  margin: 1rem 0;
  padding: 0.65rem 0.9rem;
  background: var(--page);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
}
blockquote p { margin: 0.25rem 0; }
em { font-style: italic; }
strong { font-weight: 650; color: var(--heading); }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.8rem 0;
  font-size: 0.95rem;
}
th, td {
  border: 1px solid var(--border);
  padding: 0.4rem 0.55rem;
  text-align: left;
}
th { color: var(--heading); }

/* Inputs stay square with a thin white outline, white on black */
input, textarea, select, button {
  border-radius: 0;
  border: 1px solid var(--input-line);
  outline: 1px solid var(--input-line);
  outline-offset: 0;
  background: var(--input-bg);
  color: var(--input-fg);
  font: inherit;
  padding: 0.4rem 0.5rem;
}
button { cursor: pointer; }

/* Evidence tags (only when built with --show-tags) */
.tag {
  font-size: 0.72rem;
  line-height: 1.4;
  padding: 0.05rem 0.35rem;
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: normal;
  background: var(--page);
}
.tag a { font-size: inherit; color: var(--text); }
.tag.unknown { border-style: dashed; color: var(--heading); }
.tag.author-note { border-style: dotted; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem 1.6rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.site-footer .inner { max-width: 68rem; margin: 0 auto; }
.site-footer p { margin: 0.3rem 0; }
.site-footer a { color: var(--text); }

/* Mobile: sidebar becomes a top menu / stack. CSS only, no JS. */
@media (max-width: 52rem) {
  .shell {
    grid-template-columns: 1fr;
    padding: 0.75rem 0.85rem 2rem;
  }
  .sidebar {
    position: static;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem;
    padding: 0.35rem;
  }
  .sidebar-label { width: 100%; padding: 0.25rem 0.55rem 0.1rem; }
  .sidebar a { padding: 0.4rem 0.7rem; }
  .product-photo { max-width: 14rem; }
  h1 { font-size: 1.5rem; }
}
