:root {
  --navy: #06224b;
  --navy-2: #0c356f;
  --green: #287a23;
  --green-2: #5ca947;
  --yellow: #f3c500;
  --red: #d71920;
  --paper: #f6f8f5;
  --paper-2: #ffffff;
  --ink: #071d3f;
  --muted: #5c6878;
  --line: rgba(6, 34, 75, 0.13);
  --soft-green: rgba(40, 122, 35, 0.09);
  --soft-navy: rgba(6, 34, 75, 0.08);
  --shadow: 0 20px 60px rgba(6, 34, 75, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  background: var(--paper);
}

body {
  min-height: 100%;
  overflow-x: hidden;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(246, 248, 245, 0.96)),
    radial-gradient(circle at 92% 8%, rgba(243, 197, 0, 0.22), transparent 28%),
    var(--paper);
  font-family: Aptos, Inter, "Segoe UI", Arial, sans-serif;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

::selection {
  color: #ffffff;
  background: var(--green);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.brand img {
  display: block;
  width: min(255px, 58vw);
  height: auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.header-copy {
  display: grid;
  gap: 4px;
  text-align: right;
}

.header-copy span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-copy strong {
  color: var(--navy);
  font-size: 24px;
}

.main-site-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  color: #ffffff;
  background: var(--navy);
  border: 2px solid var(--navy);
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.main-site-link:hover,
.main-site-link:focus-visible {
  color: var(--navy);
  background: var(--green-2);
  border-color: var(--green-2);
}

.app-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 70px;
}

.loading-view,
.error-panel,
.empty-card {
  padding: 34px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--navy);
}

h1 {
  max-width: 940px;
  margin-bottom: 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.98;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
}

h3 {
  margin-bottom: 10px;
  font-size: 24px;
}

.lead {
  max-width: 860px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.34;
}

.home-intro {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  margin-bottom: 34px;
}

.home-intro .intro-main h1 {
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.intro-main,
.intro-side {
  min-width: 0;
  padding: 34px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.intro-main {
  max-width: 850px;
}

.intro-side {
  display: grid;
  align-content: center;
  gap: 20px;
  background:
    linear-gradient(135deg, rgba(6, 34, 75, 0.95), rgba(12, 53, 111, 0.92)),
    var(--navy);
  color: #ffffff;
}

.intro-side h2,
.intro-side p {
  color: #ffffff;
}

.intro-side p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.5;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mini-metric {
  padding: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.mini-metric strong {
  display: block;
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
}

.mini-metric span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-block {
  margin-top: 34px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-heading p {
  max-width: 420px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  display: grid;
  gap: 22px;
  min-width: 0;
  padding: 28px;
  color: var(--ink);
  text-decoration: none;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.compact-project-card {
  gap: 18px;
  min-height: 178px;
  padding: 22px;
}

.compact-card-copy {
  display: grid;
  gap: 7px;
}

.compact-card-progress {
  display: grid;
  gap: 8px;
  align-self: end;
}

.compact-card-progress strong {
  color: var(--navy);
  font-size: 32px;
  line-height: 1;
}

.compact-card-progress span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(40, 122, 35, 0.42);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  padding: 8px 12px;
  color: #ffffff;
  background: var(--navy);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-pill.is-done {
  background: var(--green);
}

.status-pill.is-current {
  background: var(--navy);
}

.status-pill.is-pending {
  color: var(--navy);
  background: rgba(6, 34, 75, 0.1);
}

.project-card h3 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.02;
}

.project-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.compact-project-card h3 {
  font-size: clamp(20px, 1.8vw, 25px);
  line-height: 1.08;
}

.compact-project-card p {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
}

.progress-block {
  display: grid;
  gap: 9px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  background: rgba(6, 34, 75, 0.11);
  border-radius: 999px;
}

.progress-fill {
  width: var(--progress);
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--green-2));
  border-radius: inherit;
}

.phase-strip {
  display: grid;
  grid-template-columns: repeat(var(--phase-count), minmax(0, 1fr));
  gap: 8px;
}

.phase-dot {
  height: 8px;
  border-radius: 999px;
  background: rgba(6, 34, 75, 0.13);
}

.phase-dot.is-done {
  background: var(--green);
}

.phase-dot.is-current {
  background: var(--navy);
}

.card-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.card-meta-grid div,
.stat-card {
  padding: 16px;
  background: var(--soft-navy);
  border-radius: 8px;
}

.card-meta-grid span,
.stat-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-meta-grid strong,
.stat-card strong {
  color: var(--navy);
  font-size: 18px;
  line-height: 1.24;
}

.cost-list {
  display: grid;
  gap: 10px;
}

.cost-list div {
  display: grid;
  gap: 2px;
}

.cost-list em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.empty-card {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.back-link,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  color: var(--navy);
  text-decoration: none;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
}

.back-link:hover,
.secondary-button:hover {
  border-color: rgba(40, 122, 35, 0.45);
}

.primary-button {
  color: #ffffff;
  background: var(--green);
  border-color: var(--green);
}

.primary-button:hover {
  background: #1f681b;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 28px;
}

.detail-main,
.detail-status {
  min-width: 0;
  padding: 34px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.detail-main h1 {
  margin-bottom: 22px;
  max-width: 100%;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.02;
  overflow-wrap: anywhere;
  hyphens: auto;
  text-wrap: balance;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.detail-status {
  display: grid;
  gap: 18px;
}

.current-phase {
  padding: 22px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(6, 34, 75, 0.96), rgba(40, 122, 35, 0.9)),
    var(--navy);
  border-radius: 8px;
}

.current-phase span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.current-phase strong {
  display: block;
  color: #ffffff;
  font-size: 28px;
  line-height: 1.06;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stat-card.full {
  grid-column: 1 / -1;
}

.stat-card p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.progress-stat > strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(38px, 4vw, 54px);
  line-height: 1;
}

.timeline-panel,
.info-panel,
.map-panel,
.documents-panel,
.steps-panel {
  margin-top: 24px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.timeline {
  display: flex;
  gap: 14px;
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 6px;
}

.timeline-phase {
  position: relative;
  display: grid;
  gap: 12px;
  flex: 0 0 188px;
  min-height: 170px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.phase-effort-line {
  display: block;
  width: 100%;
  height: 6px;
  background: rgba(6, 34, 75, 0.12);
  border-radius: 999px;
}

.timeline-phase.is-done {
  background: var(--soft-green);
  border-color: rgba(40, 122, 35, 0.34);
}

.timeline-phase.is-done .phase-effort-line {
  background: var(--green);
}

.timeline-phase.is-current {
  border-color: rgba(6, 34, 75, 0.44);
  box-shadow: inset 0 0 0 2px rgba(6, 34, 75, 0.08);
}

.timeline-phase.is-current .phase-effort-line {
  background: var(--navy);
}

.timeline-phase.is-followup .phase-effort-line {
  background: rgba(6, 34, 75, 0.12);
}

.phase-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: var(--navy);
  background: rgba(6, 34, 75, 0.09);
  border-radius: 50%;
  font-weight: 900;
}

.timeline-phase.is-done .phase-number {
  color: #ffffff;
  background: var(--green);
}

.timeline-phase.is-current .phase-number {
  color: #ffffff;
  background: var(--navy);
}

.timeline-phase h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.timeline-phase p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.phase-followup {
  color: var(--navy) !important;
  font-size: 12px !important;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.future-link {
  color: var(--green);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.info-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 22px;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(40, 122, 35, 0.08), rgba(255, 255, 255, 0.94)),
    #ffffff;
}

.info-panel h2 {
  margin-bottom: 0;
}

.info-updated {
  display: block;
  margin-top: 10px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.info-panel p {
  margin-bottom: 0;
  color: var(--navy);
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 750;
  line-height: 1.45;
}

.documents-panel {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.28fr);
  gap: 22px;
  align-items: start;
}

.documents-panel h2 {
  margin-bottom: 0;
}

.document-list {
  display: grid;
  gap: 10px;
}

.document-link {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 14px 16px;
  color: var(--navy);
  text-decoration: none;
  background: var(--soft-green);
  border: 1px solid rgba(40, 122, 35, 0.28);
  border-radius: 8px;
}

.document-link:hover {
  border-color: var(--green);
}

.document-link > span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.document-link strong {
  overflow-wrap: anywhere;
}

.document-link small {
  color: var(--muted);
  font-weight: 800;
}

.document-icon {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #ffffff;
  background: var(--green);
  border-radius: 50%;
  font-size: 22px;
  font-weight: 900;
}

.map-panel {
  display: grid;
  gap: 18px;
}

.map-panel-heading h2 {
  margin-bottom: 0;
}

.project-map {
  height: 420px;
  max-width: 100%;
  contain: layout paint;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-navy);
}

.project-map .leaflet-control-attribution {
  color: var(--navy);
  font-size: 11px;
}

.project-map .leaflet-control-attribution a {
  color: var(--green);
}

.phase-details {
  display: grid;
  gap: 12px;
}

details.phase-detail {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.phase-detail[open] {
  border-color: rgba(40, 122, 35, 0.35);
}

.phase-detail summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 900;
}

.summary-meta {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.step-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0 20px 20px;
  list-style: none;
}

.step-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  background: var(--soft-navy);
  border-radius: 8px;
}

.step-date {
  color: var(--navy);
  font-weight: 900;
}

.step-title {
  display: grid;
  gap: 4px;
}

.step-title strong {
  color: var(--ink);
}

.step-title span {
  color: var(--muted);
  line-height: 1.4;
}

.step-state {
  min-width: 86px;
  padding: 7px 9px;
  color: var(--navy);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.step-state.is-done {
  color: #ffffff;
  background: var(--green);
  border-color: var(--green);
}

.step-state.is-current {
  color: #ffffff;
  background: var(--navy);
  border-color: var(--navy);
}

.error-panel p {
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 880px) {
  .site-header,
  .detail-topbar,
  .section-heading {
    align-items: flex-start;
  }

  .site-header,
  .detail-topbar {
    flex-direction: column;
  }

  .header-copy {
    text-align: left;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .home-intro,
  .detail-hero,
  .info-panel,
  .documents-panel {
    grid-template-columns: 1fr;
  }

  .intro-main,
  .intro-side,
  .detail-main,
  .detail-status,
  .timeline-panel,
  .info-panel,
  .map-panel,
  .documents-panel,
  .steps-panel {
    padding: 24px;
  }

  .section-heading {
    flex-direction: column;
  }
}

@media (max-width: 980px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .site-header,
  .app-shell {
    width: min(100% - 24px, 1180px);
  }

  .app-shell {
    padding-bottom: 42px;
  }

  .header-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .main-site-link {
    width: 100%;
  }

  .intro-main,
  .intro-side,
  .project-card,
  .detail-main,
  .detail-status,
  .timeline-panel,
  .info-panel,
  .map-panel,
  .documents-panel,
  .steps-panel {
    padding: 20px;
  }

  h1 {
    font-size: clamp(38px, 14vw, 52px);
  }

  .home-intro .intro-main h1 {
    font-size: clamp(32px, 9.5vw, 42px);
  }

  .metric-row,
  .card-meta-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .phase-strip {
    gap: 5px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .timeline {
    display: grid;
    grid-template-columns: 1fr;
  }

  .step-item {
    grid-template-columns: 1fr;
  }

  .step-state {
    width: max-content;
  }

  .project-map {
    height: 310px;
  }
}
