:root {
  --demo-accent: #00634f;
  --demo-accent-ink: #fff;
  --demo-tint: #e8eee6;
  --demo-open: #0c5844;
  --demo-open-bg: #e4f2e9;
  --demo-closed: #4a5750;
  --demo-closed-bg: #ebede7;
  --demo-blocked: #793b24;
  --demo-blocked-bg: #f5e8dc;
  --demo-map-land: #eef0e5;
  --demo-map-edge: #c9d2c5;
  --demo-map-road: #fffdf5;
  --demo-map-water: #9dc6bf;
  --demo-map-park: #d3e2ce;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #eff3ea;
    --green: #83d8bc;
    --paper: #171f1b;
    --surface: #202b25;
    --muted: #b7c8be;
    --line: #405348;
    --demo-tint: #263a30;
    --demo-open: #a6e2ca;
    --demo-open-bg: #253e32;
    --demo-closed: #d0dad1;
    --demo-closed-bg: #344039;
    --demo-blocked: #ffcbaa;
    --demo-blocked-bg: #4a3329;
    --demo-map-land: #293930;
    --demo-map-edge: #3e5548;
    --demo-map-road: #526357;
    --demo-map-water: #416e67;
    --demo-map-park: #365646;
  }
  .pp-brand img {
    background: #e8eee6;
    border-radius: 6px;
  }
}
.demo-strip {
  background: var(--demo-tint);
  border-bottom: 1px solid var(--line);
  padding-block: 0.56rem;
  color: var(--muted);
  font-size: 0.87rem;
}
.demo-strip .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.9rem;
  align-items: baseline;
}
.demo-strip strong {
  color: var(--ink);
  font-weight: 700;
}
.demo-page {
  padding-block: clamp(2.4rem, 5vw, 4.65rem) clamp(3rem, 7vw, 6rem);
}
.demo-narrow {
  max-width: 860px;
}
.demo-lead {
  margin-bottom: clamp(1.6rem, 3vw, 2.45rem);
}
.demo-lead-row {
  display: flex;
  gap: 1rem 2rem;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
}
.demo-page h1,
.demo-page h2,
.demo-page h3 {
  letter-spacing: -0.035em;
  line-height: 1.13;
}
.demo-page h1 {
  font-size: clamp(2.55rem, 5.3vw, 4.7rem);
  margin: 0;
  max-width: 21ch;
  font-weight: 650;
}
.demo-narrow h1 {
  font-size: clamp(2.3rem, 5vw, 3.8rem);
}
.demo-page h2 {
  font-size: clamp(1.38rem, 2.8vw, 2rem);
  margin: 0 0 0.82rem;
}
.demo-page h3 {
  font-size: 1.2rem;
  margin: 0 0 0.45rem;
}
.demo-page p {
  margin: 0 0 1rem;
  overflow-wrap: anywhere;
}
.demo-lead p,
.demo-project-hero p {
  color: var(--muted);
  font-size: clamp(1rem, 1.9vw, 1.16rem);
  max-width: 58ch;
  margin: 0.95rem 0 0;
}
.demo-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem 0.65rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.demo-button {
  align-items: center;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 7px;
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
  padding: 0.61rem 0.93rem;
  font-weight: 650;
  text-decoration: none;
  text-align: center;
}
.demo-button:hover:not(:disabled) {
  background: var(--demo-tint);
  border-color: var(--green);
}
.demo-button--primary {
  color: var(--demo-accent-ink);
  background: var(--demo-accent);
  border-color: var(--demo-accent);
}
.demo-button--primary:hover:not(:disabled) {
  color: #fff;
  background: #004e3d;
  border-color: #004e3d;
}
.demo-button:disabled {
  background: var(--demo-tint);
  color: var(--muted);
  border-color: var(--line);
}
.demo-button--quiet {
  background: transparent;
  border-color: transparent;
  color: var(--green);
  text-decoration: underline;
}
.demo-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(11rem, 17rem);
  gap: 1rem;
  padding-block: 0.25rem 1.55rem;
}
.demo-filter label,
.demo-form > label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 650;
}
.demo-filter input,
.demo-filter select,
.demo-form input:not([type="radio"]),
.demo-form select,
.demo-form textarea {
  min-height: 44px;
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 0.6rem 0.7rem;
  font-weight: 450;
}
.demo-form textarea {
  resize: vertical;
}
.demo-project-list {
  display: grid;
  gap: 1.15rem;
}
.demo-project-card,
.demo-project-hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(1.25rem, 4vw, 3rem);
}
.demo-project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(0.75rem, 2.5vw, 1.4rem);
}
.demo-card-image {
  display: block;
}
.demo-photo {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  display: block;
  width: 100%;
  object-fit: cover;
  height: auto;
  background: var(--demo-tint);
}
.demo-card-copy h2 a {
  text-decoration: none;
  color: var(--ink);
}
.demo-card-copy h2 a:hover {
  text-decoration: underline;
}
.demo-card-copy p {
  color: var(--muted);
}
.demo-card-copy > a + a {
  margin-left: 0.6rem;
}
.demo-meta,
.demo-actions {
  display: flex;
  align-items: center;
  gap: 0.52rem 0.9rem;
  flex-wrap: wrap;
}
.demo-meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.7rem;
}
.demo-status {
  display: inline-block;
  max-width: 100%;
  margin: 0;
  padding: 0.2rem 0.58rem;
  border-radius: 4px;
  background: var(--demo-closed-bg);
  color: var(--demo-closed);
  font-size: 0.82rem;
  font-weight: 650;
}
.demo-status--open {
  background: var(--demo-open-bg);
  color: var(--demo-open);
}
.demo-status--blocked {
  background: var(--demo-blocked-bg);
  color: var(--demo-blocked);
}
.demo-facts,
.demo-metrics {
  margin: 0.9rem 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.3rem;
}
.demo-facts--stack {
  display: grid;
}
.demo-facts dt,
.demo-muted,
.demo-record small,
.demo-file small,
.demo-contributions small {
  color: var(--muted);
}
.demo-facts dt {
  font-size: 0.82rem;
}
.demo-facts dd,
.demo-metrics dd {
  margin: 0;
  font-weight: 650;
}
.demo-project-hero {
  margin-bottom: 1.6rem;
}
.demo-project-hero h1 {
  font-size: clamp(2.35rem, 4.9vw, 4.25rem);
}
.demo-project-hero .demo-button {
  margin-top: 1rem;
}
.demo-local-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.3rem;
  border-block: 1px solid var(--line);
  padding-block: 0.72rem;
  margin-bottom: 1.5rem;
  font-weight: 650;
}
.demo-local-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}
.demo-two-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.39fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}
.demo-aside {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.demo-aside h2 {
  font-size: 1.2rem;
}
.demo-file {
  display: grid;
  gap: 0.15rem;
  padding-block: 0.65rem;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.demo-file:hover strong {
  text-decoration: underline;
}
.demo-section {
  margin-block: 1.5rem 2.1rem;
  scroll-margin-top: 1rem;
}
.demo-section:first-child {
  margin-top: 0;
}
.demo-section .demo-section-subhead {
  margin-block: 1.35rem 0.5rem;
}
.demo-stages,
.demo-results,
.demo-map-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.demo-stages li,
.demo-results li,
.demo-map-links li {
  border-bottom: 1px solid var(--line);
  padding-block: 0.7rem;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.4rem 1rem;
}
.demo-stages p {
  color: var(--muted);
  margin: 0.25rem 0 0;
}
.demo-stage-state {
  color: var(--muted);
  flex-shrink: 0;
  font-size: 0.86rem;
  text-align: right;
}
.demo-panel {
  background: var(--surface);
  padding: clamp(1rem, 3vw, 1.55rem);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.demo-panel > :last-child {
  margin-bottom: 0;
}
.demo-hint,
.demo-empty,
.demo-account-current {
  background: var(--demo-tint);
  border-radius: 7px;
  padding: 0.7rem 0.9rem;
}
.demo-poll .demo-hint {
  margin-top: 0.85rem;
}
.demo-form {
  display: grid;
  justify-items: start;
  gap: 0.85rem;
  margin-top: 1rem;
}
.demo-form > label {
  width: 100%;
}
.demo-form fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
.demo-form legend {
  margin-bottom: 0.45rem;
  font-weight: 650;
}
.demo-radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 37px;
}
.demo-radio input {
  accent-color: var(--green);
}
.demo-message {
  color: var(--green);
  font-size: 0.92rem;
  margin: 0 !important;
}
.demo-message:empty,
.demo-updates:empty {
  display: none;
}
.demo-contributions article,
.demo-record {
  border-bottom: 1px solid var(--line);
  padding-block: 0.75rem;
}
.demo-contributions p {
  margin-bottom: 0.2rem;
}
.demo-record h3 {
  margin-top: 0.3rem;
}
.demo-record > :last-child {
  margin-bottom: 0;
}
.demo-document {
  min-height: 9rem;
}
.demo-metrics > div {
  display: flex;
  flex-direction: column-reverse;
  min-width: 7rem;
}
.demo-metrics dd {
  font-size: 2rem;
  line-height: 1;
}
.demo-metrics dt {
  margin-top: 0.3rem;
  color: var(--muted);
}
.demo-table {
  border-collapse: collapse;
  width: 100%;
  color: var(--ink);
}
.demo-table caption {
  padding: 0.7rem 0;
  text-align: left;
  color: var(--muted);
}
.demo-table th,
.demo-table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 0.65rem 0.4rem;
}
.demo-table th[scope="row"] {
  font-weight: 500;
}
.demo-map {
  width: 100%;
  min-height: 360px;
  height: min(53vh, 500px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--demo-map-land);
  color: var(--ink);
}
.demo-map-pin {
  display: grid;
  place-items: center;
  background: var(--demo-accent);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px #142e2766;
}
.demo-map-pin:focus-visible {
  outline: 3px solid #97550a;
}
.demo-map-links {
  margin-top: 0.8rem;
}
.demo-map-links span {
  color: var(--muted);
}
.demo-account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.demo-account-card {
  display: flex;
  flex-direction: column;
  align-items: start;
}
.demo-account-card .demo-button {
  margin-top: auto;
}
.demo-account-role {
  color: var(--green);
  font-weight: 650;
  margin-bottom: 0.45rem !important;
}
.demo-account-actions,
.demo-queue-row + .demo-queue-row,
.demo-prose h2 {
  margin-top: 1rem;
}
.demo-prose h1 {
  margin-bottom: 1.1rem;
}
.demo-prose p {
  max-width: 66ch;
}
@media (max-width: 850px) {
  .demo-account-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .demo-two-columns {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }
}
@media (max-width: 650px) {
  .demo-project-card,
  .demo-project-hero,
  .demo-account-grid,
  .demo-filter {
    grid-template-columns: 1fr;
  }
  .demo-project-card {
    gap: 0.85rem;
  }
  .demo-card-copy {
    padding: 0.16rem 0.1rem 0.4rem;
  }
  .demo-stages li,
  .demo-map-links li {
    flex-direction: column;
  }
  .demo-stage-state {
    text-align: left;
  }
  .demo-map {
    min-height: 320px;
  }
}
