:root {
  --bg: #f6f5f0;
  --ink: #12221b;
  --muted: #56635c;
  --line: #dcded6;
  --leaf: #0f3d2e;
  --leaf-soft: #e3efe8;
  --accent: #1f7a52;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1511;
    --ink: #e7efe9;
    --muted: #9db0a5;
    --line: #20302a;
    --leaf: #a7e3c4;
    --leaf-soft: #13241d;
    --accent: #7fd3a8;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 ui-sans-serif, -apple-system, "Segoe UI", Inter, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  overflow-wrap: break-word;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

/* Site Header */
.site-header {
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vh, 2.5rem) 1.25rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--accent);
}

.brand svg {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  display: block;
}

.brand svg rect {
  fill: var(--leaf);
}

.brand svg path {
  fill: var(--bg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 0.95rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Main Content */
main {
  flex: 1;
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  padding: clamp(2rem, 5vh, 3.5rem) 1.25rem 3.5rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.85rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 1.5rem 0 1.25rem;
  font-weight: 650;
}

h2 {
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 2.75rem 0 0.85rem;
  font-weight: 650;
}

h3 {
  font-size: 1.15rem;
  line-height: 1.35;
  margin: 1.5rem 0 0.45rem;
  font-weight: 600;
}

p {
  margin: 0 0 1.25rem;
}

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 42rem;
  margin: 0 0 2rem;
  line-height: 1.6;
}

blockquote {
  margin: 1.75rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: var(--leaf-soft);
  border-radius: 0 8px 8px 0;
  color: var(--ink);
}

blockquote p {
  margin: 0;
  font-style: italic;
}

blockquote cite {
  display: block;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin: 2.25rem 0;
}

.card {
  background: var(--bg);
  padding: 1.35rem 1.25rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background 0.15s ease;
}

.card:hover,
.card:focus {
  background: var(--leaf-soft);
}

.card-tag {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 650;
  color: var(--ink);
}

.card p {
  font-size: 0.94rem;
  color: var(--muted);
  margin: 0 0 1rem;
  line-height: 1.5;
  flex-grow: 1;
}

.card-action {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Timeline */
.timeline {
  list-style: none;
  padding: 0 0 0 1.5rem;
  margin: 2rem 0 2rem 0.5rem;
  position: relative;
  border-left: 2px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1.5rem - 6px);
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.timeline-date {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 650;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.timeline-title {
  font-size: 1.08rem;
  font-weight: 650;
  margin: 0 0 0.35rem;
  color: var(--ink);
}

.timeline-desc {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

/* Station Grid */
.station-grid {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.6rem;
}

.station-item {
  background: var(--leaf-soft);
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.92rem;
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 500;
}

/* Feature & Architecture Blocks */
.feature-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
  margin: 1.5rem 0;
}

.feature-box h3 {
  margin-top: 0;
}

.feature-box p:last-child {
  margin-bottom: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.feature-grid .feature-box {
  margin: 0;
}

/* Installation List */
.install-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem;
}

.install-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.15rem;
}

.install-item b {
  display: block;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.install-item span {
  font-size: 0.88rem;
  color: var(--muted);
}

/* Note Callouts */
.note {
  margin: 2.5rem 0 0;
  padding: 1.15rem 1.35rem;
  border-radius: 12px;
  background: var(--leaf-soft);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.6;
}

.note p:last-child {
  margin-bottom: 0;
}

/* Site Footer */
.site-footer {
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}
