/* ═══════════════════════════════════════════════════════════════
   LightTurtles — main.css
   Aesthetic: Technical Journal / Warm Light
   Fonts: IBM Plex Mono (headings) + IBM Plex Sans (body) + IBM Plex Serif (post text)
   ═══════════════════════════════════════════════════════════════ */

/* ── Custom Properties ────────────────────────────────────────── */
:root {
  --bg:         #f8f7f3;
  --bg-raised:  #efede5;
  --bg-card:    #e6e3d8;
  --border:     #c9c9c4;
  --border-hi:  #a8a5a0;

  --text:       #1e1e1e;
  --text-muted: #6b4f3f;
  --text-dim:   #9c7a5b;

  --primary:     #046307;
  --primary-dim: #024504;
  --teal:        #2f7f73;
  --teal-dim:    #1e5249;
  --orange:      #c4622d;

  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
  --font-sans: 'IBM Plex Sans', 'Helvetica Neue', sans-serif;
  --font-serif: 'IBM Plex Serif', Georgia, serif;

  --radius: 3px;
  --max-w: 1140px;
  --nav-h: 60px;
}

/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-mono);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }
time { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }

/* ── Navigation ───────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(248, 247, 243, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 2rem;
}

.nav-brand {
  display: flex;
  align-items: center;
}
.nav-brand:hover { text-decoration: none; opacity: 0.85; }
.nav-logo { height: 36px; width: auto; display: block; }

.footer-logo { height: 52px; width: auto; display: block; align-self: flex-start; object-fit: contain; }

.nav-links {
  display: flex;
  gap: 2rem;
  margin-left: auto;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--primary); text-decoration: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1.25rem;
  }
  .nav-links.open { display: flex; }
}

/* ── Sections ─────────────────────────────────────────────────── */
.section { padding: 6rem 2rem; }
.section-inner { max-width: var(--max-w); margin: 0 auto; }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-primary {
  background: var(--primary);
  color: #f8f7f3;
  border-color: var(--primary);
}
.btn-primary:hover { background: #0a7a0e; border-color: #0a7a0e; text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-hi);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

/* ── Tags ─────────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2em 0.6em;
  border-radius: 2px;
  border: 1px solid;
}
.tag-type        { color: var(--primary);    border-color: var(--primary-dim); }
.tag-talk        { color: var(--teal);    border-color: var(--teal-dim); }
.tag-tutorial    { color: #0e7490;         border-color: #155e75; }
.tag-subject     { color: var(--text-muted); border-color: var(--border); }

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 4rem) 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 70% 50%, rgba(4,99,7,0.06), transparent),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(47,127,115,0.04), transparent);
  pointer-events: none;
  z-index: 1;
}

#turtle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.hero-inner {
  margin: 0 auto;
  width: 100%;
  max-width: 680px;
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.hero-headline {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  margin-bottom: 1.5rem;
}
.hero-headline em {
  font-style: italic;
  color: var(--primary);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 2.5rem;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }


/* ── About ────────────────────────────────────────────────────── */
.section-about { background: var(--bg-raised); }

.about-hero {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 3.5rem;
  margin-bottom: 2.5rem;
  align-items: start;
}
@media (max-width: 800px) { .about-hero { grid-template-columns: 1fr; gap: 2rem; } }

.about-photo img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
}

.about-photo-caption {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: 0.6rem;
  letter-spacing: 0.06em;
}

.about-text h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 1.25rem;
}
.about-text h2 em { font-style: italic; color: var(--primary); }
.about-text p { color: var(--text-muted); margin-bottom: 1rem; }

.about-pillars-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 900px) { .about-pillars-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .about-pillars-row { grid-template-columns: 1fr; } }

.pillar {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.pillar-icon { font-size: 1.2rem; color: var(--primary); display: block; margin-bottom: 0.5rem; }
.pillar h3 { font-size: 0.9rem; margin-bottom: 0.4rem; }
.pillar p { font-size: 0.88rem; color: var(--text-muted); }

.mission-block {
  border-left: 3px solid var(--primary);
  padding: 1.5rem 1.75rem;
  background: var(--bg-card);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.mission-block p {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Credential strip ─────────────────────────────────────────── */
.credential-strip {
  padding: 2rem 2rem;
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
}

.credential-strip-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.credential-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

.credential-items {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.credential-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.25em 0.75em;
  transition: color 0.15s, border-color 0.15s;
}
a.credential-chip:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ── Services ─────────────────────────────────────────────────── */
.section-services h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 2.5rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5px;
  background: var(--border);
  border: 1px solid var(--border);
}
@media (min-width: 1080px) {
  .services-grid { grid-template-columns: repeat(4, 1fr); }
}

.service-card {
  background: var(--bg-card);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: background 0.2s;
}
.service-card:hover { background: var(--bg-raised); }

.service-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--primary);
  letter-spacing: 0.1em;
}

.service-card h3 { font-size: 1rem; }

.service-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  flex: 1;
}

.service-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--teal);
  letter-spacing: 0.04em;
  margin-top: 0.5rem;
}
.service-link:hover { color: var(--primary); text-decoration: none; }

/* ── Works preview (homepage) ─────────────────────────────────── */
.section-works { background: var(--bg-raised); }
.section-works h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 2rem; }

.works-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.work-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: var(--text);
  transition: border-color 0.2s, transform 0.15s;
}
.work-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  text-decoration: none;
}

.work-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.work-card-title { font-size: 1rem; }

.work-card-excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex: 1;
}

.work-card-subjects { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.25rem; }

.works-cta { text-align: center; margin-top: 1rem; }

/* ── Works Archive Page ───────────────────────────────────────── */
.works-page { padding: 2rem; padding-top: calc(var(--nav-h) + 3rem); }

.works-header { margin-bottom: 3rem; }
.works-header h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 0.75rem; }
.works-intro { color: var(--text-muted); max-width: 580px; }

/* Filters */
.filters {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.filter-group { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }

.filter-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  min-width: 50px;
}

.filter-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.3em 0.8em;
  cursor: pointer;
  transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active {
  background: var(--primary);
  color: #f8f7f3;
  border-color: var(--primary);
}

.filter-sort { margin-left: auto; }

.filter-status {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  min-height: 1em;
}

/* Works grid */
.works-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.work-card-full {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg-card);
  padding: 1.75rem 2rem;
  transition: background 0.15s;
}
.work-card-full:hover { background: var(--bg-raised); }

.work-card-full .work-card-title { font-size: 1.15rem; }
.work-card-full .work-card-title a {
  color: var(--text);
}
.work-card-full .work-card-title a:hover { color: var(--primary); text-decoration: none; }

.work-card-full .work-card-excerpt { font-size: 0.9rem; }

.work-card-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.work-has-docs {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.read-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--teal);
  margin-left: auto;
}
.read-link:hover { color: var(--primary); text-decoration: none; }

.no-results {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.88rem;
}
.no-results button {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
}

/* ── Post Page ────────────────────────────────────────────────── */
.post-page {
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 3rem) 2rem 5rem;
}

.post-header { margin-bottom: 3rem; }

.post-meta-top {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.post-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 1rem;
  color: var(--primary);
}

.post-excerpt {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1rem;
  border-left: 3px solid var(--border-hi);
  padding-left: 1rem;
}

.post-meta-bottom {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Documents sidebar/block */
.post-documents {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.documents-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.75rem;
}

.documents-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }

.document-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text);
  padding: 0.4rem 0;
}
.document-link:hover { color: var(--primary); text-decoration: none; }
.doc-icon { color: var(--teal); }
.doc-type {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-left: auto;
}

/* Post content typography */
.post-content {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.8;
}

.post-content h1, .post-content h2, .post-content h3 { color: var(--primary); }
.post-content h1, .post-content h2 {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.post-content h1 { font-size: 1.6rem; margin: 3rem 0 1rem; }
.post-content h2 { font-size: 1.4rem; margin: 2.5rem 0 1rem; }
.post-content h3 { font-size: 1.1rem; margin: 2rem 0 0.75rem; }
.post-content h4 { font-size: 0.95rem; margin: 1.5rem 0 0.5rem; color: var(--text-muted); }

.post-content p { margin-bottom: 1.25rem; }

.post-content a:hover { color: var(--orange); }

.post-content ul, .post-content ol {
  margin: 0 0 1.25rem 1.5rem;
}
.post-content li { margin-bottom: 0.35rem; }

.post-content blockquote {
  border-left: 3px solid var(--primary);
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  color: var(--text-muted);
  font-style: italic;
}

.post-content code {
  font-family: var(--font-mono);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.15em 0.4em;
  font-size: 0.85em;
  color: var(--primary);
}

.post-content pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-hi);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: var(--text);
}

/* ```ascii fences: tight lines so box-drawing characters connect */
.post-content pre:has(> code.language-ascii) { font-size: 0.875rem; line-height: 1.1; }

/* > blockquote + {: .aside} — active-learning questions / asides */
.post-content blockquote.aside {
  font-style: normal;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
}
.post-content blockquote.aside p:last-child { margin-bottom: 0; }

/* Table of contents generated by kramdown's {:toc} */
.post-content #markdown-toc {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1rem 1rem 2.5rem;
  margin: 0 0 2rem;
}
.post-content #markdown-toc ul { margin: 0.25rem 0 0.25rem 1.25rem; }

/* MathJax display equations ($$ on their own lines): scroll instead of overflowing */
.post-content mjx-container[display="true"] {
  overflow-x: auto;
  overflow-y: hidden;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
}
.post-content th, .post-content td {
  border: 1px solid var(--border);
  padding: 0.6rem 1rem;
  text-align: left;
}
.post-content th {
  background: var(--bg-card);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* Post footer */
.post-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.back-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.back-link:hover { color: var(--primary); text-decoration: none; }

.post-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Play: skill trees (skill pages and the map's list view) ──── */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
[hidden] { display: none !important; }

.section-label a { color: inherit; }

.skilltree-intro { max-width: 720px; margin-bottom: 2rem; }

.skilltree-toolbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.skilltree-reset {
  background: none; border: none; padding: 0;
  font: inherit; color: var(--primary);
  text-decoration: underline; cursor: pointer;
}

.skilltree-tier {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 2rem 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.skilltree-tier::before {
  content: "";
  width: 1.4rem; height: 0.35rem;
  border-radius: 3px;
  background: var(--tier);
}
.skilltree-list {
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.skilltree-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  padding: 0.75rem 1rem;
}
.skilltree-list a { color: var(--text); flex: 1; }
.skilltree-list a:hover { color: var(--primary); }
.skill-time,
.skill-needs {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}
.skill-check input,
.skill-done input { width: 1.1rem; height: 1.1rem; accent-color: var(--primary); }

.skill-tier { color: var(--text); border-color: var(--text); background: var(--tier); }
.skill-needs { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: baseline; margin-top: 1rem; }
.skill-needs .filter-label { min-width: 0; }
.skill-done.skill-done-compact {
  margin: 0;
  padding: 0.1em 0.6em;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  gap: 0.4rem;
}
.skill-done.skill-done-compact input { width: 0.85rem; height: 0.85rem; }
.skill-done {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  cursor: pointer;
}

/* ── Play: metro-map skill trees ───────────────────────────────── */
.metro-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.metro-svg { display: block; max-width: none; }
.metro-casing { fill: none; stroke: var(--bg); stroke-width: 13; stroke-linecap: round; stroke-linejoin: round; }
.metro-line { fill: none; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.metro-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}
.metro-legend li { display: flex; align-items: center; gap: 0.45rem; }
.metro-swatch { width: 1.4rem; height: 0.35rem; border-radius: 3px; }
.metro-ring { width: 0.8rem; height: 0.8rem; border-radius: 50%; border: 2.5px solid #c8102e; }
.metro-legend .metro-hint { flex-basis: 100%; font-style: italic; }
.metro-needs { pointer-events: none; }
.metro-need-halo { fill: none; stroke: var(--bg); stroke-width: 7; }
.metro-need-link { fill: none; stroke: var(--text); stroke-width: 2.2; stroke-dasharray: 7 4; }
.metro-arrow { fill: var(--text); }
.metro-focus .metro-toggle circle,
.metro-need .metro-toggle circle { stroke: var(--text); stroke-width: 4.5; }
.metro-focus .metro-label,
.metro-need .metro-label { font-weight: 600; }
.metro-label { font-family: var(--font-sans); font-size: 11.5px; fill: var(--text); }
.metro-stop a:hover .metro-label,
.metro-stop a:focus .metro-label { fill: var(--primary); text-decoration: underline; }
.metro-pending .metro-label { fill: var(--text-muted); }
.metro-start .metro-label { font-weight: 600; font-size: 12.5px; }
.metro-start-tag { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; fill: #c8102e; }
.metro-ws { fill: none; stroke: #c8102e; stroke-width: 2.5; }
.metro-toggle { cursor: pointer; }
.metro-toggle circle { fill: var(--bg); stroke: var(--line); stroke-width: 3.5; }
.metro-toggle text { display: none; font-family: var(--font-sans); font-size: 11px; font-weight: 600; fill: var(--bg); }
.metro-toggle:hover circle { stroke-width: 5; }
.metro-toggle:focus { outline: none; }
.metro-toggle:focus-visible circle { stroke: var(--text); stroke-width: 4; }
.metro-stop.done .metro-toggle circle { fill: var(--line); }
.metro-stop.done .metro-toggle text { display: inline; }
.metro-start.done .metro-toggle text { font-size: 14px; }
.metro-pending { color: var(--text-muted); flex: 1; }
.metro-workshop {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #c8102e;
  border: 1.5px solid #c8102e;
  border-radius: 999px;
  padding: 0 0.5rem;
}

/* ── Contact ───────────────────────────────────────────────────── */
.section-contact { background: var(--bg-raised); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; } }

.contact-text h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 1rem; }
.contact-text h2 em { font-style: italic; color: var(--primary); }
.contact-text p { color: var(--text-muted); margin-bottom: 1.5rem; }

.contact-details { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.contact-details li { display: flex; gap: 1rem; align-items: baseline; }
.contact-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  min-width: 50px;
}

.contact-social { display: flex; gap: 1rem; flex-wrap: wrap; }
.social-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.3em 0.8em;
  transition: all 0.15s;
}
.social-link:hover { color: var(--primary); border-color: var(--primary); text-decoration: none; }

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.contact-form label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-form input,
.contact-form textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 0.65rem 0.85rem;
  transition: border-color 0.15s;
  width: 100%;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.contact-form textarea { resize: vertical; }

.form-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
}

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem 1.5rem;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.footer-col { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-col a { font-size: 0.88rem; color: var(--text-muted); }
.footer-col a:hover { color: var(--primary); text-decoration: none; }
.footer-hours { font-size: 0.8rem; color: var(--text-dim); }

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* ── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dim); }
