:root {
  color-scheme: light;
  --ink: #102b24;
  --muted: #50635d;
  --line: #bcc9c4;
  --paper: #edf2ef;
  --surface: #ffffff;
  --on-green: #ffffff;
  --header-muted: #c6d6d0;
  --control-border: #869992;
  --green: #123d32;
  --green-strong: #075f4a;
  --lime: #d2f081;
  --focus: #a23b00;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
.detail-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.detail-page > main { flex: 1; }
a { color: inherit; }
button, input, select { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.site-header a:focus-visible, .skip-link:focus-visible { outline-color: var(--lime); }
.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: var(--on-green);
  background: var(--green);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
.site-header {
  min-height: 80px;
  padding: 14px clamp(20px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  color: var(--on-green);
  background: var(--green);
  border-bottom: 1px solid #41655c;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: var(--lime);
  border-radius: 50%;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.brand strong, .brand small { display: block; }
.brand small { margin-top: 1px; color: var(--header-muted); font-size: .72rem; }
.site-header nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
  text-decoration: none;
  border-bottom: 2px solid var(--lime);
}
.hero {
  padding: 58px clamp(20px, 5vw, 76px) 64px;
  color: var(--on-green);
  background: var(--green);
}
.hero > p:first-child {
  margin: 0 0 12px;
  color: var(--lime);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hero h1 { max-width: 900px; margin: 0; font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1.1; }
.hero > p:last-child { max-width: 620px; margin: 18px 0 0; color: var(--header-muted); }
.index-layout {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 44px clamp(20px, 4vw, 62px) 96px;
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  gap: 34px;
}
.filter-panel {
  position: sticky;
  top: 20px;
  align-self: start;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.filter-panel h2 { margin: 0 0 20px; font-size: 1rem; }
.filter-panel form { display: grid; gap: 8px; }
.filter-panel label { margin-top: 8px; color: var(--muted); font-size: .8rem; font-weight: 750; }
.filter-panel input, .filter-panel select, .filter-panel button {
  width: 100%;
  min-height: 44px;
  padding: 8px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--control-border);
  border-radius: 3px;
}
.filter-panel button { margin-top: 8px; cursor: pointer; background: #f2f5f3; font-weight: 700; }
.index-heading { min-height: 54px; display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.index-heading h2 { margin: 0; font-size: 1.25rem; }
.index-heading > p { margin: 0; color: var(--muted); font-weight: 700; }
[data-list-state] {
  margin: 18px 0;
  padding: 56px 22px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed #82968e;
}
[data-list-state][hidden] { display: none; }
[data-list-state] p { margin: 0; font-size: 1.05rem; font-weight: 700; }
[data-list-state] button {
  min-width: 160px;
  min-height: 44px;
  margin-top: 18px;
  color: var(--on-green);
  background: var(--green-strong);
  border: 0;
  cursor: pointer;
}
.project-list { border-top: 2px solid var(--ink); }
[data-project-row] { background: var(--surface); border-bottom: 1px solid var(--line); }
[data-project-row] [data-project-detail] {
  min-height: 190px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(180px, 230px) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  text-decoration: none;
}
[data-project-row] [data-project-detail]:hover { background: #f5f8f6; }
[data-project-row] [data-project-detail] img {
  width: 100%;
  aspect-ratio: 8 / 5;
  display: block;
  object-fit: cover;
  background: #dce7e2;
}
[data-project-status], [data-project-category] {
  min-height: 26px;
  margin: 0 6px 6px 0;
  padding: 3px 9px;
  display: inline-flex;
  align-items: center;
  color: #17493b;
  background: #e1f1e9;
  border: 1px solid #8bb3a6;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
}
[data-project-category] { color: #3e4f49; background: #f1f4f2; border-color: #aebcb7; }
[data-project-row] [data-project-title] { margin: 3px 0 4px; font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.35; }
[data-project-row] [data-project-organization] {
  margin: 0 0 4px;
  overflow: hidden;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}
[data-project-row] [data-project-period] { color: var(--muted); font-size: .82rem; }
[data-project-row] [data-project-summary] { margin: 10px 0 12px; color: var(--muted); font-size: .9rem; }
[data-project-row] [data-detail-cue] { font-weight: 800; }
[data-project-row] footer {
  min-height: 58px;
  padding: 7px 18px 7px min(272px, 27%);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  border-top: 1px dashed #d1d9d5;
}
[data-project-row] footer strong { font-size: .76rem; }
[data-project-row] footer ul {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
}
[data-homepage-link] {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: .82rem;
  font-weight: 700;
  text-underline-offset: 4px;
}
[data-homepage-empty] { color: var(--muted); font-size: .82rem; }
.detail-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 38px clamp(20px, 5vw, 76px) 96px;
}
.back-link {
  min-width: 44px;
  min-height: 44px;
  margin-bottom: 22px;
  display: inline-flex;
  align-items: center;
  color: var(--green-strong);
  font-weight: 800;
  text-underline-offset: 4px;
}
.detail-state {
  padding: 72px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed #82968e;
  font-size: 1.1rem;
  font-weight: 750;
}
.detail-state h1 { margin: 0 0 10px; font-size: 1.55rem; }
.detail-state p { margin: 0; }
.detail-state[hidden], .project-detail[hidden] { display: none; }
.project-detail {
  overflow: hidden;
  background: var(--surface);
  border-top: 3px solid var(--green);
}
.detail-hero {
  padding: clamp(22px, 4vw, 48px);
  display: grid;
  grid-template-columns: minmax(280px, 42%) minmax(0, 1fr);
  gap: clamp(26px, 5vw, 62px);
  align-items: center;
}
.detail-hero img {
  width: 100%;
  aspect-ratio: 8 / 5;
  display: block;
  object-fit: cover;
  background: #dce7e2;
}
.detail-badges { margin-bottom: 10px; }
.detail-intro [data-project-id] {
  margin: 0 0 8px;
  color: var(--green-strong);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .08em;
}
.detail-intro h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.15;
}
.detail-intro [data-project-summary] {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
}
.detail-section {
  padding: 34px clamp(22px, 4vw, 48px) 42px;
  border-top: 1px solid var(--line);
}
.detail-section h2 { margin: 0 0 22px; font-size: 1.25rem; }
[data-project-metadata] {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(140px, 210px) minmax(0, 1fr);
  border-top: 1px solid var(--line);
}
[data-project-metadata] dt, [data-project-metadata] dd {
  margin: 0;
  padding: 15px 12px;
  border-bottom: 1px solid var(--line);
}
[data-project-metadata] dt { color: var(--muted); background: #f3f6f4; font-weight: 800; }
[data-project-metadata] dd { overflow-wrap: anywhere; }
[data-project-role-detail-help] { color: var(--muted); }
.related-links { margin: 0; padding: 0; display: grid; gap: 10px; list-style: none; }
.related-links a {
  min-width: 44px;
  min-height: 54px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  color: var(--green-strong);
  background: #f3f7f5;
  border: 1px solid var(--line);
  font-weight: 750;
  text-underline-offset: 4px;
}
[data-related-links-empty] { margin: 0; color: var(--muted); }
.site-footer {
  min-height: 140px;
  padding: 42px clamp(20px, 5vw, 76px);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #d6e1dd;
  background: #0d3028;
  font-size: .82rem;
}
.fatal-message { max-width: 720px; margin: 12vh auto; padding: 36px; background: #fff; }
@media (max-width: 840px) {
  .index-layout { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
  .filter-panel form { grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .filter-panel label:first-of-type, .filter-panel input[type="search"] { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .site-header { min-height: 68px; padding: 10px 16px; gap: 12px; }
  .brand-mark { width: 42px; height: 42px; }
  .brand small { display: none; }
  .hero { padding: 44px 18px 50px; }
  .index-layout { padding: 28px 16px 72px; }
  .filter-panel form { grid-template-columns: 1fr; }
  .filter-panel label:first-of-type, .filter-panel input[type="search"] { grid-column: auto; }
  [data-project-row] [data-project-detail] { grid-template-columns: 1fr; padding: 14px; }
  [data-project-row] [data-project-organization] {
    display: -webkit-box;
    white-space: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  [data-project-row] footer, [data-project-row] footer ul {
    padding: 8px 14px;
    align-items: start;
    flex-direction: column;
  }
  [data-project-row] footer ul { padding: 0; }
  .detail-shell { padding: 24px 16px 72px; }
  .detail-hero { grid-template-columns: 1fr; padding: 18px; }
  .detail-section { padding: 28px 18px 34px; }
  [data-project-metadata] { grid-template-columns: 1fr; }
  [data-project-metadata] dt {
    padding-bottom: 4px;
    border-bottom: 0;
  }
  [data-project-metadata] dd { padding-top: 4px; }
  .site-footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
