/* Self-hosted webfonts — no CDN requests at runtime per Stoa doctrine */
@font-face {
  font-family: 'Lora';
  src: url('fonts/lora-600.subset.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('fonts/lora-700.subset.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  src: url('fonts/be-vietnam-pro-400.subset.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  src: url('fonts/be-vietnam-pro-500.subset.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  src: url('fonts/be-vietnam-pro-700.subset.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/jetbrains-mono-400.subset.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-primary: #0D6E6E;    /* Teal */
  --color-secondary: #E8A838;  /* Amber/Gold */
  --color-tertiary: #004C87;   /* Navy */
  --color-surface-light: #F7FAFA;
  --color-surface-dark: #0A1628;
  --color-deep-900: #051221;
  --color-deep-700: #07192D;
  --color-text: #222222;
  --color-text-dark: #222222;
  --color-text-light: #F7FAFA;
  
  --font-heading: 'Lora', serif;
  --font-body: 'Be Vietnam Pro', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;

  --focus-ring: 2px solid var(--color-secondary);
}

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-surface-light);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  color: var(--color-surface-dark);
}

h1 { font-size: clamp(2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.p-lg { padding: var(--spacing-lg); }

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 4px;
}

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem 1.75rem;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.btn-primary {
  background: linear-gradient(135deg, #0D6E6E 0%, #095454 100%);
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(13, 110, 110, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #0f7d7d 0%, #0b6161 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 110, 110, 0.45);
  text-decoration: none;
}
.btn-secondary {
  background: linear-gradient(135deg, #E8A838 0%, #D89624 100%);
  color: #0A1628 !important;
  box-shadow: 0 4px 14px rgba(232, 168, 56, 0.35);
}
.btn-secondary:hover {
  background: linear-gradient(135deg, #f0b243 0%, #e09f2d 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 168, 56, 0.5);
  text-decoration: none;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-secondary);
  color: var(--color-surface-dark);
  padding: 8px;
  z-index: 1000;
  transition: top 0.2s;
  text-decoration: none;
  font-weight: bold;
}

.skip-link:focus {
  top: 0;
}

.prototype-banner {
  background-color: var(--color-surface-dark);
  color: var(--color-text-light);
  text-align: center;
  padding: var(--spacing-xs);
  font-size: 0.875rem;
}
.prototype-banner a {
  color: var(--color-secondary);
}

/* Header & Nav — masthead omnibox contract */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  background-color: #ffffff;
  border-bottom: 4px solid var(--color-primary);
  position: relative;
  z-index: 40;
}

.masthead {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--spacing-sm);
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  max-width: 1200px;
  margin: 0 auto;
}

.brand-lockup,
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--color-tertiary);
  min-width: 0;
}

.brand-mark {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .brand-mark {
    width: 56px;
    height: 56px;
  }
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand-text strong {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
}

.brand-text span {
  font-size: 0.75rem;
  color: #4a5560;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-lockup:hover,
.logo:hover {
  text-decoration: none;
}

.menu-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 0.9rem;
  border: 2px solid var(--color-primary);
  background: #fff;
  color: var(--color-primary);
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.omnibox {
  position: relative;
  width: 100%;
}

.omnibox--desktop {
  display: none;
}

.omni-field {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: stretch;
}

.omni-field input[type="search"] {
  flex: 1 1 12rem;
  min-width: 0;
  min-height: 44px;
  border: 2px solid #c9d4d4;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font: inherit;
  background: #fff;
  color: var(--color-text);
}

.omni-field button {
  min-height: 44px;
  min-width: 44px;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: none;
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.omni-field button:hover {
  background: #0a5858;
}

.omni-suggestions {
  display: none;
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0.35rem;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border: 1px solid #d5e0e0;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(10, 22, 40, 0.16);
  max-height: min(70vh, 28rem);
  overflow: auto;
  z-index: 50;
}

.omni-suggestions:not([hidden]) {
  display: block;
}

.omni-suggestions[hidden] {
  display: none !important;
}

.omni-group {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5b6b6b;
  padding: 0.55rem 0.75rem 0.2rem;
  font-weight: 700;
}

.omni-suggestions [role="option"] {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  color: var(--color-surface-dark);
}

.omni-suggestions [role="option"] strong {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
}

.omni-snip,
.omni-meta {
  display: block;
  font-size: 0.85rem;
  color: #4a5560;
  margin-top: 0.15rem;
}

.omni-suggestions [role="option"].is-active,
.omni-suggestions [role="option"]:hover {
  background: var(--color-surface-light);
}

.omni-ask strong {
  color: var(--color-primary);
}

.omni-empty {
  padding: 0.75rem;
  color: #4a5560;
  font-size: 0.95rem;
}

.main-nav {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0 var(--spacing-md) var(--spacing-md);
  background: #fff;
  border-top: 1px solid #e6eded;
}

.main-nav.is-open {
  display: flex;
}

.main-nav > a {
  color: var(--color-surface-dark);
  text-decoration: none;
  font-weight: 500;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid #eef3f3;
  min-height: 44px;
}

.main-nav > a[aria-current="page"] {
  color: var(--color-primary);
  font-weight: 700;
}

.desktop-nav {
  display: none;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.4rem;
}

.footer-links a {
  color: var(--color-text-light);
}

@media (min-width: 960px) {
  .masthead {
    grid-template-columns: minmax(12rem, 18rem) minmax(16rem, 1fr) auto;
  }
  .omnibox--desktop {
    display: block;
  }
  .omnibox--drawer {
    display: none;
  }
  .menu-btn {
    display: none;
  }
  .main-nav {
    display: none !important;
  }
  .desktop-nav {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 var(--spacing-md) var(--spacing-sm);
    max-width: 1200px;
    margin: 0 auto;
  }
  .desktop-nav a {
    color: #1a1408;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    background: #FFF1D0;
    border: 1px solid #E0A63A;
  }
  .desktop-nav a:hover,
  .desktop-nav a[aria-current="page"] {
    background: #E8A838;
    color: #0A1628;
    border-color: #B87A12;
  }
}

/* Photo story figures */
.photo-frame {
  margin: 0 0 var(--spacing-md);
  border-radius: 12px;
  overflow: hidden;
  background: #d9e4e4;
}
.photo-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 28rem;
  object-fit: cover;
}
.photo-frame figcaption {
  font-size: 0.875rem;
  color: #4a5560;
  padding: 0.65rem 0.85rem;
  background: #fff;
  border-top: 1px solid #e6eded;
}

/* Tide-mark motif — three receding wavelets, drawn once and reused as
 * list marker, section divider, empty state, and 404 illustration. */
.tide-list {
  list-style: none;
  padding-left: 0;
}
.tide-list li {
  position: relative;
  padding-left: 2.1rem;
  margin-bottom: 0.65rem;
}
.tide-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 1.4rem;
  height: 0.9rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 18'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M2 4 Q7 1 12 4 T22 4' stroke='%230D6E6E' stroke-width='2.4'/%3E%3Cpath d='M4 9.5 Q9 6.5 14 9.5 T24 9.5' stroke='%230D6E6E' stroke-width='2.4' opacity='.65'/%3E%3Cpath d='M6 15 Q11 12 16 15 T26 15' stroke='%23E8A838' stroke-width='2.4'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}
.section-deep .tide-list li::before,
.section-marsh .tide-list li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 18'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M2 4 Q7 1 12 4 T22 4' stroke='%23F7FAFA' stroke-width='2.4'/%3E%3Cpath d='M4 9.5 Q9 6.5 14 9.5 T24 9.5' stroke='%23F7FAFA' stroke-width='2.4' opacity='.6'/%3E%3Cpath d='M6 15 Q11 12 16 15 T26 15' stroke='%23E8A838' stroke-width='2.4'/%3E%3C/g%3E%3C/svg%3E");
}
.tide-divider {
  border: 0;
  height: 18px;
  margin: var(--spacing-lg) auto;
  width: 84px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 84 18'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M2 4 Q12 0 22 4 T42 4 T62 4 T82 4' stroke='%230D6E6E' stroke-width='2.4'/%3E%3Cpath d='M6 10 Q16 6 26 10 T46 10 T66 10' stroke='%230D6E6E' stroke-width='2.4' opacity='.55'/%3E%3Cpath d='M12 16 Q22 12 32 16 T52 16' stroke='%23E8A838' stroke-width='2.4'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
.omni-empty::before,
.tide-empty::before {
  content: "";
  display: block;
  width: 56px;
  height: 14px;
  margin-bottom: 0.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 14'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M2 3 Q9 0 16 3 T30 3 T44 3' stroke='%230D6E6E' stroke-width='2.2'/%3E%3Cpath d='M6 8 Q13 5 20 8 T34 8' stroke='%230D6E6E' stroke-width='2.2' opacity='.55'/%3E%3Cpath d='M10 13 Q17 10 24 13 T38 13' stroke='%23E8A838' stroke-width='2.2'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
}
.tide-404 {
  width: 180px;
  height: 48px;
  margin: 0 auto var(--spacing-md);
  /* Light strokes for navy/deep rooms — padded viewBox so round caps are not clipped. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 48'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M8 14 Q28 6 48 14 T88 14 T128 14 T168 14' stroke='%23F7FAFA' stroke-width='3.2'/%3E%3Cpath d='M16 26 Q36 18 56 26 T96 26 T136 26' stroke='%23F7FAFA' stroke-width='3.2' opacity='.55'/%3E%3Cpath d='M28 38 Q48 30 68 38 T108 38' stroke='%23E8A838' stroke-width='3.2'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.footer-tide-mark {
  width: 64px;
  height: 18px;
  margin: 0 0 0.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 18'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M6 5 Q13 2 20 5 T34 5 T48 5' stroke='%23F7FAFA' stroke-width='2.2'/%3E%3Cpath d='M10 10 Q17 7 24 10 T38 10' stroke='%23F7FAFA' stroke-width='2.2' opacity='.55'/%3E%3Cpath d='M14 15 Q21 12 28 15 T42 15' stroke='%23E8A838' stroke-width='2.2'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Grant category rows — heading beside a real funded-work photo chip. */
.cat-row {
  margin-top: var(--spacing-lg);
}
.cat-row--split {
  display: grid;
  grid-template-columns: 1fr minmax(14rem, 22rem);
  gap: var(--spacing-sm) var(--spacing-md);
  align-items: start;
}
.cat-row.cat-row--split .photo-frame img {
  aspect-ratio: 1 / 1;
  width: 100%;
  height: auto;
  max-height: none;
}
.cat-row h3 {
  margin-bottom: 0.25rem;
}
.cat-row .photo-frame {
  margin: 0.5rem 0 0;
}
.cat-row .photo-frame img {
  aspect-ratio: 5 / 2;
  width: 100%;
  height: auto;
  object-fit: cover;
}
.cat-row .photo-frame figcaption {
  font-size: 0.78rem;
  padding: 0.4rem 0.6rem;
}
@media (max-width: 640px) {
  .cat-row {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

/* Home grant spotlight — ruled list, not a card grid. */
.spotlight-list {
  list-style: none;
  padding: 0;
  margin: var(--spacing-sm) 0 0;
  border-top: 2px solid var(--color-surface-dark);
}
.spotlight-list li {
  display: grid;
  grid-template-columns: minmax(9rem, 14rem) 1fr auto;
  gap: 0.35rem 1.25rem;
  align-items: baseline;
  padding: 1rem 0.25rem 1rem 0.85rem;
  border-bottom: 1px solid #dfe9e9;
  border-left: 3px solid var(--color-secondary);
}
.spotlight-list h3 {
  margin: 0;
  font-size: 1.2rem;
}
.spotlight-list p {
  margin: 0;
  color: #4a5560;
  font-size: 0.95rem;
}
.spotlight-list .spot-link {
  white-space: nowrap;
  font-weight: 600;
}
@media (max-width: 760px) {
  .spotlight-list li {
    grid-template-columns: 1fr;
  }
}

/* Grant tide table — mono deadline ledger, deliberately not a card. */
.grant-ledger {
  list-style: none;
  padding: 0;
  margin: var(--spacing-sm) 0 var(--spacing-md);
  border-top: 2px solid var(--color-surface-dark);
}
.grant-ledger li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1.25rem;
  align-items: baseline;
  padding: 0.9rem 0.25rem 0.9rem 0.85rem;
  border-bottom: 1px solid #dfe9e9;
  border-left: 3px solid transparent;
}
.grant-ledger li:hover {
  border-left-color: var(--color-secondary);
  background: #fdfaf2;
}
.grant-ledger .ledger-name {
  font-weight: 600;
}
.grant-ledger .ledger-name a {
  color: var(--color-surface-dark);
  text-decoration: none;
}
.grant-ledger .ledger-name a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}
.grant-ledger .ledger-deadline {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #084d4d;
  white-space: nowrap;
  background: #eef5f5;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
}
.grant-ledger .ledger-deadline.is-dated {
  background: #fbf1dc;
  color: #6b4a08;
}
.grant-ledger .ledger-meta {
  grid-column: 1 / -1;
  font-size: 0.92rem;
  color: #4a5560;
  margin: 0;
}
@media (max-width: 640px) {
  .grant-ledger li {
    grid-template-columns: 1fr;
  }
}

/* News — photo-led editorial cards, distinct from the generic card. */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: var(--spacing-md);
}
.news-item {
  background: #fff;
  border: 1px solid #e2ebeb;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.news-item > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.news-item .news-body {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}
.news-item .news-kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: #084d4d;
}
.news-item .news-kicker .news-type {
  background: #eef5f5;
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  margin-right: 0.5rem;
}
.news-item h3 {
  font-size: 1.15rem;
  line-height: 1.3;
  margin: 0;
}
.news-item p {
  margin: 0;
  color: #4a5560;
  font-size: 0.95rem;
}
.news-item .news-more {
  margin-top: auto;
  padding-top: 0.35rem;
}
.news-filter {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: var(--spacing-md);
}
.news-filter button[aria-pressed="true"] {
  background: linear-gradient(135deg, #E8A838 0%, #D89624 100%);
  color: #0A1628;
}
.news-filter button[aria-pressed="false"] {
  background: rgba(247, 250, 250, 0.92);
  color: #0A1628;
}

/* Impact stat wall — sourced Year in Review numbers. */
.stat-wall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: var(--spacing-sm);
  margin: var(--spacing-md) 0;
}
.stat-wall .stat-cell {
  border-left: 3px solid var(--color-secondary);
  padding: 0.6rem 0.9rem;
}
.stat-wall .stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-primary);
}
.section-deep .stat-wall .stat-num {
  color: #F7FAFA;
}
.stat-wall .stat-label {
  font-size: 0.92rem;
  color: #4a5560;
}
.section-deep .stat-wall .stat-label {
  color: rgba(247, 250, 250, 0.85);
}

/* Document ledger for resources — file row, not a card. */
.doc-ledger {
  list-style: none;
  padding: 0;
  border-top: 2px solid var(--color-surface-dark);
}
.doc-ledger li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.4rem 1rem;
  align-items: center;
  padding: 0.95rem 0.25rem;
  border-bottom: 1px solid #dfe9e9;
}
.doc-ledger .doc-type {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: #eef5f5;
  color: #084d4d;
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
}
.doc-ledger .doc-name {
  font-weight: 600;
}
.doc-ledger .doc-note {
  grid-column: 2 / -1;
  margin: 0;
  font-size: 0.92rem;
  color: #4a5560;
}
@media (max-width: 640px) {
  .doc-ledger li {
    grid-template-columns: auto 1fr;
  }
  .doc-ledger .doc-open {
    grid-column: 1 / -1;
  }
}

/* Impact story rows — photo beside sourced result, not a card grid. */
.story-row {
  display: grid;
  grid-template-columns: minmax(15rem, 2fr) 3fr;
  gap: var(--spacing-md);
  align-items: center;
  margin-bottom: var(--spacing-md);
}
.story-row:nth-child(even) {
  grid-template-columns: 3fr minmax(15rem, 2fr);
}
.story-row:nth-child(even) .photo-frame {
  order: 2;
}
.story-row .photo-frame {
  margin: 0;
}
@media (max-width: 760px) {
  .story-row,
  .story-row:nth-child(even) {
    grid-template-columns: 1fr;
  }
  .story-row:nth-child(even) .photo-frame {
    order: 0;
  }
}

/* Tidewater Flow Sections */
.section-deep {
  background: linear-gradient(145deg, var(--color-deep-700) 0%, #0A324C 50%, #0D4765 100%);
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
}
.section-deep h1, .section-deep h2, .section-deep h3, .section-deep p { 
  color: #FFFFFF !important; 
}

.section-marsh {
  background: linear-gradient(135deg, #095454 0%, #0D6E6E 100%);
  color: #FFFFFF;
}
.section-marsh h1, .section-marsh h2, .section-marsh h3, .section-marsh p { 
  color: #FFFFFF !important; 
}

.section-land {
  background: linear-gradient(135deg, #E8A838 0%, #F5B041 100%);
  color: #0A1628;
}
.section-land h1, .section-land h2, .section-land h3 { 
  color: #0A1628 !important; 
}

.bay-plate-wade-band {
  padding: var(--spacing-lg) var(--spacing-md);
}
.bay-plate-wade-split {
  display: grid;
  gap: var(--spacing-md);
  align-items: center;
  text-align: left;
  max-width: 56rem;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .bay-plate-wade-split {
    grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr);
  }
}
.bay-plate-product {
  margin: 0;
  justify-self: center;
}
.bay-plate-product img {
  display: block;
  width: min(100%, 16rem);
  height: auto;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(10, 22, 40, 0.18);
}

.section-light {
  background-color: var(--color-surface-light);
  color: var(--color-text);
}

.hero {
  padding: calc(var(--spacing-xl) * 0.9) var(--spacing-md);
  text-align: center;
  box-shadow: inset 0 -10px 30px rgba(0,0,0,0.15);
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
  color: #FFFFFF !important;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  max-width: 900px;
  margin: 0 auto 1.25rem;
}
h2, h3 {
  text-wrap: balance;
}
.section-pad {
  padding: clamp(1.75rem, 3.5vw, 3.25rem) var(--spacing-md);
}
@media print {
  .site-header, .main-nav, .desktop-nav, .site-footer, .prototype-banner, .skip-link, .menu-btn {
    display: none !important;
  }
  body { background: #fff; }
}

.hero p {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  color: rgba(255, 255, 255, 0.92) !important;
  max-width: 720px;
  margin: 0 auto var(--spacing-md);
  line-height: 1.5;
  font-weight: 400;
}

.hero-search {
  max-width: 640px;
  margin: var(--spacing-md) auto;
  display: flex;
  gap: var(--spacing-xs);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}
.hero-search input {
  flex: 1;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: 6px;
  font-size: 1.05rem;
  background: #FFFFFF;
  color: #111;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
.hero-search input::placeholder {
  color: #666;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-md);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.card {
  background: #fff;
  border-radius: 10px;
  padding: calc(var(--spacing-md) * 1.1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(13, 110, 110, 0.12);
  border-color: rgba(13, 110, 110, 0.2);
}
.card h3 {
  margin-top: 0;
  color: var(--color-tertiary);
  font-size: 1.35rem;
}
.card p {
  flex: 1;
  margin-bottom: var(--spacing-sm);
  color: #444;
  line-height: 1.55;
}

/* Impact Strip */
.impact-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  background: var(--color-deep-900);
  color: var(--color-text-light);
  padding: var(--spacing-md) var(--spacing-sm);
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.impact-stat {
  margin: var(--spacing-sm);
}
.impact-number {
  font-family: var(--font-mono);
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--color-secondary);
  display: block;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(232, 168, 56, 0.25);
}

/* Footer */
.site-footer {
  background-color: var(--color-surface-dark);
  color: var(--color-text-light);
  padding: var(--spacing-lg) var(--spacing-md) var(--spacing-md);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  max-width: 1200px;
  margin: 0 auto;
}
.site-footer h2,
.site-footer h3 {
  color: var(--color-secondary);
  font-size: 1.25rem;
}
.site-footer a {
  color: var(--color-text-light);
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}
.footer-bottom {
  text-align: center;
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.875rem;
}

/* Forms */
.form-group {
  margin-bottom: var(--spacing-sm);
}
label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.25rem;
}
input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: var(--font-body);
}

/* Pathway Finder */
.pathway-step {
  background: #fff;
  padding: var(--spacing-md);
  border-radius: 8px;
  margin-bottom: var(--spacing-sm);
  border-left: 4px solid var(--color-secondary);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--spacing-md);
}
th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #ccc;
}
th {
  background-color: var(--color-surface-light);
  font-weight: 700;
}

/* Utils */
.text-center { text-align: center; }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-lg { margin-bottom: var(--spacing-lg); }
@media (max-width: 1080px) {
  .mt-lg { margin-top: 1.5rem; }
  .mb-lg { margin-bottom: 1.5rem; }
  .tide-divider { margin: 1.75rem auto; }
}

/* ── Search omnibox dropdown ── */
.omni-dropdown {
  position: relative;
  z-index: 100;
}
.omni-dropdown .search-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
  overflow: hidden;
}
.omni-dropdown .search-list li a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--color-text-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--color-surface-light);
  transition: background 0.15s;
}
.omni-dropdown .search-list li a:hover,
.omni-dropdown .search-list li a:focus {
  background: var(--color-surface-light);
}
.omni-dropdown .tag,
.search-full-list .tag {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  background: var(--color-primary);
  color: #fff;
  margin-left: 0.5rem;
  vertical-align: middle;
}
.search-empty { padding: 1rem; color: #666; }
.search-empty .dym {
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
  font-weight: 700;
  text-decoration: underline;
  font-size: inherit;
  font-family: inherit;
}

/* ── Full search page ── */
.search-hint {
  text-align: center;
  font-size: 1.25rem;
  color: #666;
  margin-top: var(--spacing-lg);
}
.search-count {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: var(--spacing-sm);
}
.search-full-list {
  list-style: none;
  padding: 0;
}
.search-full-list li {
  margin-bottom: var(--spacing-sm);
}
.search-full-list li a {
  display: block;
  padding: 1rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  color: var(--color-text-dark);
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s;
}
.search-full-list li a:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}
.search-full-list h3 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
}
.search-full-list p {
  margin: 0.25rem 0 0;
  color: #555;
  font-size: 0.9rem;
}

/* ── Ask answer surface ── */
.ask-answer {
  background: #fff;
  padding: var(--spacing-md);
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.ask-answer:focus { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.eyebrow { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-primary); font-weight: 700; }
.ask-a-text { font-size: 1.05rem; line-height: 1.7; }
.ask-hedge { font-style: italic; color: #666; font-size: 0.9rem; }
.ask-empty { border-left: 4px solid var(--color-secondary); }
.ask-sources { margin-top: var(--spacing-md); }
.ask-source-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.source-card {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--color-surface-light);
  border-radius: 6px;
  color: var(--color-text-dark);
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.15s;
}
.source-card:hover { background: #dde8e8; }
.sc-ico { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em; background: var(--color-primary); color: #fff; padding: 0.15rem 0.4rem; border-radius: 3px; }
.ask-suggest { margin-top: var(--spacing-md); }
.ask-suggest ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ask-suggest button {
  background: var(--color-surface-light);
  border: 1px solid #ccc;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: background 0.15s, border-color 0.15s;
}
.ask-suggest button:hover { background: #dde8e8; border-color: var(--color-primary); }

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* Full-bleed photo hero.
 * Width must stay 100% — never pair aspect-ratio with max-height (that shrinks
 * width and leaves a white void). Keep the frame near the Bay Bridge source
 * aspect, and size type so the whole brand → CTA stack fits inside it. */
.hero-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 2.8 / 1;
  min-height: 22rem;
  display: flex;
  align-items: flex-end;
  padding: 0;
  overflow: hidden;
}
@media (max-width: 700px) {
  .hero-photo {
    /* Match bay-bridge-mobile.jpg (~0.8:1). */
    aspect-ratio: 4 / 5;
    min-height: 24rem;
  }
}
.hero-pathway-band {
  padding: var(--spacing-md) var(--spacing-md) var(--spacing-sm);
}
.hero-pathway-band .hero-pathway {
  margin-top: 0;
  max-width: 56rem;
}
.hero-photo picture {
  position: absolute;
  inset: 0;
  display: block;
}
.hero-photo .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-photo .hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,25,45,0.25) 0%, rgba(7,25,45,0.78) 70%, rgba(7,25,45,0.92) 100%);
}
.hero-photo .hero-copy {
  position: relative;
  z-index: 1;
  width: min(100%, 44rem);
  max-width: 44rem;
  margin: 0;
  padding: 1.25rem var(--spacing-md) 1.5rem;
  text-align: left;
}
.hero-brand {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 700;
  color: #fff !important;
  margin-bottom: 0.35rem;
}
.hero-photo h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.hero-photo .hero-copy > p {
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  max-width: 36rem;
}
.hero-ctas {
  margin-top: 0.85rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.hero-photo h1,
.hero-photo p {
  text-align: left;
}

/* Hero pathway teaser — earns the signature before /grants/ */
.hero-pathway {
  margin-top: var(--spacing-md);
  padding: 1.25rem 1.5rem;
  border-radius: 16px;
  background: rgba(5, 18, 33, 0.78);
  border: none;
  backdrop-filter: blur(8px);
  max-width: 56rem;
}
.hero-pathway fieldset {
  border: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.hero-pathway legend {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: #fff;
  padding: 0;
  margin: 0 0 1rem;
  display: block;
  width: 100%;
  float: none;
}
.hero-pathway-grid {
  display: grid;
  gap: 0.65rem;
}
@media (min-width: 700px) {
  .hero-pathway-grid {
    grid-template-columns: 1fr 1fr 1fr auto;
    align-items: end;
  }
}
.hero-pathway label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #F7FAFA;
  margin-bottom: 0.3rem;
}
.hero-pathway select {
  min-height: 44px;
  border: 1px solid #c9d4d4;
  background: #fff;
  color: #0A1628;
}
.hero-pathway .btn {
  min-height: 44px;
  white-space: nowrap;
}

/* Watershed Flow — headwater → Bay journey (scroll-snap; no scroll-timeline) */
.watershed-flow {
  background: var(--color-surface-dark);
  color: var(--color-text-light);
  padding: var(--spacing-lg) 0;
}
.watershed-flow h2,
.watershed-flow p {
  color: inherit;
}
.watershed-flow-intro {
  max-width: 40rem;
  margin: 0 auto var(--spacing-md);
  padding: 0 var(--spacing-md);
  text-align: center;
}
.watershed-track {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 0 var(--spacing-md) var(--spacing-sm);
}
@media (max-width: 559px) {
  .watershed-track {
    grid-template-columns: 1fr;
  }
}
.watershed-step {
  background: linear-gradient(160deg, #0d2a3f 0%, #0D6E6E 100%);
  border: 1px solid rgba(247, 250, 250, 0.18);
  border-radius: 16px;
  padding: 1.5rem;
  min-height: 14rem;
}
.watershed-step:nth-child(2) {
  background: linear-gradient(160deg, #0a3344 0%, #148080 100%);
}
.watershed-step:nth-child(3) {
  background: linear-gradient(160deg, #123528 0%, #2f6b4f 100%);
}
.watershed-step:nth-child(4) {
  background: linear-gradient(160deg, #0A1628 0%, #004C87 100%);
}
.watershed-step .step-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #E8A838;
  margin-bottom: 0.65rem;
}
.watershed-step h3 {
  color: #fff;
  margin-bottom: 0.5rem;
}
.watershed-step p {
  color: #d7e2ea;
  font-size: 1rem;
}
@media (min-width: 960px) {
  .watershed-track {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1200px;
    margin: 0 auto;
  }
}

/* Impact map + table twin */
.impact-map-panel {
  display: grid;
  gap: var(--spacing-md);
  text-align: left;
}
@media (min-width: 960px) {
  .impact-map-panel {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: start;
  }
}
.impact-map-root {
  background: #edf6f5;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #c5d8d5;
  min-height: 280px;
}
.impact-map-stack {
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .impact-map-stack {
    grid-template-columns: minmax(0, 1.2fr) minmax(12rem, 0.8fr);
    align-items: start;
  }
}
.impact-map-photo {
  display: block;
  width: 100%;
  height: auto;
}
.impact-marker-list {
  list-style: none;
  margin: 0;
  padding: 0.75rem;
  display: grid;
  gap: 0.35rem;
  max-height: min(70vh, 24rem);
  overflow: auto;
}
.impact-marker-btn {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.65rem;
  border: 1px solid #c5d8d5;
  border-radius: 10px;
  background: #fff;
  color: #0A1628;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.impact-marker-btn:hover,
.impact-marker-btn:focus-visible,
.impact-marker-btn.is-selected {
  border-color: #0D6E6E;
  background: #e7f4f2;
  outline: none;
}
.impact-marker-btn:focus-visible {
  outline: 2px solid #E8A838;
  outline-offset: 2px;
}
.impact-marker-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  background: #E8A838;
  color: #0A1628;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
}
.impact-marker-btn.is-selected .impact-marker-num {
  background: #0D6E6E;
  color: #fff;
}
.impact-marker-label {
  display: block;
  font-weight: 600;
  line-height: 1.25;
}
.impact-marker-meta {
  display: block;
  font-size: 0.85rem;
  color: #4a5560;
  margin-top: 0.1rem;
}
.impact-table-wrap {
  overflow-x: auto;
  background: #fff;
  border-radius: 14px;
  padding: 0.5rem 0.75rem 1rem;
  border: 1px solid #c5d8d5;
  color: #0A1628;
}
#impact-projects-table {
  margin-top: 0;
  color: #0A1628;
}
#impact-projects-table th {
  background: #edf6f5;
  color: #0A1628;
}
#impact-projects-table a {
  color: #0D6E6E;
}
#impact-projects-table tbody tr {
  cursor: pointer;
}
#impact-projects-table tbody tr.is-selected {
  background: #e7f4f2;
  outline: 2px solid #0D6E6E;
  outline-offset: -2px;
}
#impact-projects-table tbody tr:focus-visible {
  outline: 2px solid #E8A838;
  outline-offset: -2px;
}
.impact-map-note {
  font-size: 0.95rem;
  color: #d7e2ea;
  max-width: 40rem;
  margin: 0.75rem auto 0;
}
.section-deep .impact-map-note a {
  color: #E8A838;
}

.table-scroll{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}
.table-scroll table{width:100%;min-width:0;table-layout:fixed;}
.table-scroll th,.table-scroll td{word-break:break-word;overflow-wrap:anywhere;font-size:0.92rem;}
