/* Road Width Principles — article styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.7;
  color: #2c2c2c;
  background: #fafaf7;
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #ddd;
}

h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.1rem;
  color: #666;
  font-style: italic;
}

.intro {
  margin-bottom: 3rem;
}

.intro p {
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

/* Diagram sections */

.diagram {
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #e8e8e4;
}

.diagram-img {
  background: #f0efeb;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.2rem;
  text-align: center;
}

.diagram-img img {
  width: 100%;
  max-width: 600px;
  height: auto;
}

/* Collapsible threshold sections: the summary carries the heading and the dimension
   line, the diagram and explainer text sit inside and fold away with the section. */
details.fold > summary {
  cursor: pointer;
  list-style: none;
}

details.fold > summary::-webkit-details-marker {
  display: none;
}

details.fold > summary h2 {
  display: inline-block;
  font-size: 1.4rem;
  color: #1a1a1a;
  margin-bottom: 0.4rem;
}

details.fold > summary h2::before {
  content: '▸';
  display: inline-block;
  margin-right: 0.5rem;
  color: #888;
  transition: transform 140ms ease;
}

details.fold[open] > summary h2::before {
  transform: rotate(90deg);
}

.dimensions {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.88rem;
  color: #888;
  margin-bottom: 0.8rem;
}

.diagram-img {
  margin-top: 0.4rem;
}

details.diagram > p {
  font-size: 1rem;
}

/* Takeaway section */

/* Same visual level as the threshold sections: flat, full-width, rule-separated —
   no inset box, which read as a subsection of the last threshold. */
.takeaway,
details.real-world {
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #e8e8e4;
}

.takeaway h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.takeaway p {
  margin-bottom: 1.5rem;
  font-size: 1.02rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.92rem;
}

thead th {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 2px solid #bbb;
  color: #555;
  font-weight: 600;
}

tbody td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid #e0e0dc;
}

tr.highlight {
  background: rgba(102, 187, 106, 0.1);
}

td.green {
  color: #2e7d32;
  font-weight: 600;
}

/* GUP corridor-width section: the wide table scrolls inside its own container on
   narrow screens, and the methodology note reads as small print. */
.gup-widths {
  overflow-x: auto;
}

.gup-widths table {
  min-width: 640px;
}

.table-note {
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: #666;
  line-height: 1.5;
}

/* Footer */

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ddd;
  font-size: 0.85rem;
  color: #999;
  text-align: center;
}

/* Mobile */

@media (max-width: 500px) {
  body {
    padding: 1.2rem 1rem 3rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  details.fold > summary h2 {
    font-size: 1.2rem;
  }

  .diagram-img {
    padding: 0.5rem;
  }

  table {
    font-size: 0.82rem;
  }

  thead th,
  tbody td {
    padding: 0.4rem 0.5rem;
  }
}

/* Hub navigation for the published page: backlink above the title, sibling links in the footer. */
.hub-link {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hub-link a,
footer .siblings a {
  color: #1565c0;
  text-decoration: none;
}

.hub-link a:hover,
footer .siblings a:hover {
  text-decoration: underline;
}

footer .siblings {
  margin-top: 0.8rem;
}
