
:root {
  --ink: #13201c;
  --muted: #55635f;
  --line: #d9e4df;
  --surface: #f6faf8;
  --accent: #1d6957;
  --accent-2: #e4f2ed;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(19, 32, 28, 0.08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
}
a { color: var(--accent); }
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem max(1.25rem, 6vw);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.95);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: .7rem;
  background: var(--accent);
  color: white;
  font-size: .85rem;
}
nav { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; }
nav a {
  text-decoration: none;
  color: var(--muted);
  padding: .45rem .65rem;
  border-radius: .65rem;
  font-size: .95rem;
}
nav a:hover, nav a.active { background: var(--accent-2); color: var(--accent); }
main { padding: 3rem max(1.25rem, 6vw); }
/* Breadcrumb-only site navigation */
.breadcrumbs {
  max-width: 1180px;
  margin: 0 auto 1rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: .45rem;
  color: var(--muted);
  font-size: .95rem;
}
.breadcrumbs a {
  padding: 0;
  border-radius: 0;
  color: var(--accent);
  text-decoration: underline;
  font-weight: 700;
}
.breadcrumbs a:hover {
  background: transparent;
  color: var(--accent);
}
.site-directory a {
  border-left: .25rem solid var(--accent-2);
}

.hero, .page-title {
  max-width: 980px;
  margin: 0 auto 2.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #edf7f3 100%);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  padding: clamp(2rem, 5vw, 4rem);
  box-shadow: var(--shadow);
}
.eyebrow {
  margin: 0 0 .75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  font-size: .8rem;
}
h1 {
  font-size: clamp(2rem, 5vw, 4.25rem);
  line-height: 1.05;
  margin: 0 0 1rem;
  letter-spacing: -.04em;
}
h2 {
  margin-top: 0;
  line-height: 1.2;
}
.lead {
  max-width: 760px;
  font-size: 1.18rem;
  color: var(--muted);
  margin-bottom: 0;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.button {
  display: inline-block;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-weight: 700;
  padding: .85rem 1.05rem;
  border-radius: .8rem;
}
.button.secondary { background: var(--white); color: var(--accent); border: 1px solid var(--line); }
.grid {
  display: grid;
  gap: 1rem;
  max-width: 1180px;
  margin: 0 auto 2rem;
}
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card, .panel, .callout {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  padding: 1.4rem;
  box-shadow: 0 10px 25px rgba(19,32,28,.04);
}
.card p:last-child, .panel p:last-child, .callout p:last-child { margin-bottom: 0; }
.panel, .callout { max-width: 1180px; margin: 0 auto 2rem; }
.callout { background: #fffdf5; }
.link-list { display: grid; gap: .75rem; }
.link-list a {
  display: block;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .9rem;
  text-decoration: none;
  font-weight: 700;
}
.checklist { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 2rem; }
.checklist li { break-inside: avoid; padding: .35rem 0 .35rem 1.75rem; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
code { background: var(--accent-2); padding: .15rem .3rem; border-radius: .35rem; }
.site-footer {
  padding: 2rem max(1.25rem, 6vw);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--white);
}
.site-footer p { max-width: 950px; margin: .35rem 0; }
@media (max-width: 860px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  nav { justify-content: flex-start; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .checklist { columns: 1; }
}

.spec-clause {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  padding: 1.25rem;
  margin: 0 0 1rem;
}
.spec-clause h3 {
  margin: 0 0 .4rem;
  line-height: 1.25;
}
.spec-meta {
  display: grid;
  gap: .6rem;
  margin-top: .8rem;
}
.spec-meta div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .8rem;
  padding: .75rem;
}
.kicker {
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .78rem;
  margin: 0 0 .35rem;
}
.badge-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; }
.badge {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: .35rem .55rem;
  font-size: .88rem;
  color: var(--muted);
}
.table-wrap { overflow-x: auto; }
table.spec-table { width: 100%; border-collapse: collapse; background: var(--white); }
table.spec-table th, table.spec-table td { border: 1px solid var(--line); padding: .75rem; text-align: left; vertical-align: top; }
table.spec-table th { background: var(--accent-2); color: var(--ink); }
@media (max-width: 860px) { .spec-meta { grid-template-columns: 1fr; } }
@media (min-width: 861px) { .spec-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* Smart-city guide additions */
.tight-list { padding-left: 1.25rem; }
.tight-list li { margin: .7rem 0; }
.guide-notes .spec-clause { margin: 0; }
.small-note, small { color: var(--muted); }
.references { padding-left: 1.25rem; }
.references li { margin: .55rem 0; }
.matrix-controls {
  display: grid;
  gap: .8rem;
  margin: 1rem 0 1.25rem;
}
.weight-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 3rem minmax(180px, 34%);
  gap: 1rem;
  align-items: center;
  padding: .8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .9rem;
}
.weight-row small {
  display: block;
  margin-top: .25rem;
  line-height: 1.35;
}
.weight-row output {
  text-align: center;
  font-weight: 700;
  color: var(--accent);
}
.weight-row input { width: 100%; }
.score-pill {
  display: inline-block;
  min-width: 4rem;
  text-align: center;
  padding: .35rem .55rem;
  border-radius: 999px;
  background: var(--accent-2);
  color: var(--accent);
  font-weight: 700;
}
.compact-grid { max-width: none; margin-bottom: 0; }
@media (max-width: 860px) {
  .weight-row { grid-template-columns: 1fr; }
  .weight-row output { text-align: left; }
}

/* v6 smart-city guide layout fixes: cache-busted stylesheet, reliable matrix controls, badges, and wide tables */
.smart-guide .panel,
.smart-guide .grid {
  width: min(1180px, 100%);
}
.smart-guide .badge-row,
.smart-guide .toc-badges {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .55rem !important;
  align-items: flex-start;
}
.smart-guide a.badge,
.smart-guide .badge {
  display: inline-flex !important;
  align-items: center;
  max-width: 100%;
  border: 1px solid var(--line) !important;
  background: var(--surface) !important;
  border-radius: 999px !important;
  padding: .38rem .65rem !important;
  font-size: .9rem !important;
  line-height: 1.25 !important;
  color: var(--accent) !important;
  text-decoration: none !important;
  white-space: normal !important;
}
.smart-guide a.badge:hover,
.smart-guide .badge:hover {
  background: var(--accent-2) !important;
  border-color: var(--accent) !important;
}
.smart-guide .matrix-controls {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: .85rem !important;
  margin: 1rem 0 1.25rem !important;
}
.smart-guide label.weight-row,
.smart-guide .weight-row {
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) 4rem minmax(220px, 28%);
  gap: 1rem !important;
  align-items: center !important;
  width: 100% !important;
  margin: 0 !important;
  padding: .9rem 1rem !important;
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: .95rem !important;
}
.smart-guide .weight-row strong {
  display: block;
  line-height: 1.25;
}
.smart-guide .weight-row small {
  display: block !important;
  margin-top: .25rem !important;
  line-height: 1.35 !important;
  color: var(--muted) !important;
}
.smart-guide .weight-row output {
  display: inline-block;
  min-width: 3rem;
  text-align: center !important;
  font-weight: 700 !important;
  color: var(--accent) !important;
}
.smart-guide .weight-row input[type="range"] {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  accent-color: var(--accent);
}
.smart-guide .table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}
.smart-guide table.spec-table {
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: auto;
}
.smart-guide .matrix-output table.spec-table {
  min-width: 860px;
}
.smart-guide table.spec-table th,
.smart-guide table.spec-table td {
  border: 1px solid var(--line) !important;
  padding: .8rem .9rem !important;
  text-align: left !important;
  vertical-align: top !important;
}
.smart-guide table.spec-table th {
  background: var(--accent-2) !important;
  color: var(--ink) !important;
  font-weight: 700 !important;
}
.smart-guide .score-pill {
  display: inline-block !important;
  min-width: 4.25rem;
  text-align: center;
  padding: .35rem .6rem;
  border-radius: 999px;
  background: var(--accent-2);
  color: var(--accent);
  font-weight: 700;
}
.smart-guide .compact-grid {
  max-width: none !important;
  margin-bottom: 0 !important;
}
@media (max-width: 860px) {
  .smart-guide label.weight-row,
  .smart-guide .weight-row {
    grid-template-columns: 1fr;
  }
  .smart-guide .weight-row output {
    text-align: left !important;
  }
  .smart-guide .matrix-output table.spec-table {
    min-width: 760px;
  }
}
