/* ============================================================
   Copland HMI — Pacific Islands theme
   ------------------------------------------------------------
   Palette: Pacific ocean blues, sand neutrals, coral accents.
   Inspired by the 2050 Strategy's "Blue Pacific Continent" framing.
   ============================================================ */

:root {
  /* Pacific Islands palette */
  --pif-deep-ocean:    #0F3D5C;   /* primary: ocean depths */
  --pif-deep-ocean-2:  #143C5C;
  --pif-lagoon:         #2A7FA8;   /* secondary: lagoon / reef */
  --pif-shallows:       #6FB5D1;   /* tertiary: shallows */
  --pif-coral:          #E07856;   /* accent / CTA */
  --pif-coral-deep:     #C25A3A;   /* hover */
  --pif-palm:           #4A7C59;   /* success / organic */
  --pif-palm-deep:      #345C40;
  --pif-sand:           #FBF5EC;   /* page background */
  --pif-paper:          #FFFFFF;   /* card surface */
  --pif-sunset:         #E8A33D;   /* warning / sunset */
  --pif-reef:           #C84031;   /* danger */
  --pif-text:           #1F2937;
  --pif-text-muted:     #5C6B7D;
  --pif-text-faint:     #94A3B8;
  --pif-border:         #E5E7EB;
  --pif-border-strong:  #CBD5E1;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 61, 92, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 61, 92, 0.07), 0 1px 2px rgba(15, 61, 92, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 61, 92, 0.09), 0 2px 4px -2px rgba(15, 61, 92, 0.05);
  --shadow-lg: 0 10px 25px -3px rgba(15, 61, 92, 0.1), 0 4px 6px -4px rgba(15, 61, 92, 0.04);

  /* Radii */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-pill: 999px;

  /* Spacing scale (4px base) */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI",
               system-ui, "Segoe UI Emoji", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco,
               "Cascadia Code", monospace;

  /* Layout */
  --container: 1200px;
  --header-h:  60px;
}

/* ----------  Reset / base  ---------- */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--pif-sand);
  color: var(--pif-text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { color: var(--pif-text); margin: 0; line-height: 1.25; }
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; font-weight: 600; margin-top: var(--space-6); }
h3 { font-size: 1.05rem; font-weight: 600; margin-top: var(--space-5); }

a {
  color: var(--pif-deep-ocean);
  text-decoration: none;
  transition: color 120ms ease;
}
a:hover { color: var(--pif-coral); text-decoration: underline; }

code {
  font-family: var(--font-mono);
  background: rgba(15, 61, 92, 0.07);
  color: var(--pif-deep-ocean);
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
}

/* ----------  Header  ---------- */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  /* Doubled to fit the 80px logo + inline main-nav buttons
     (2026-09-28); reduced 96 -> 67 (2026-09-29) with the -30%
     logo slim-down. Sizes naturally from the logo and the
     nav-bucket-trigger buttons; no fixed height. */
  min-height: 67px;
  background: linear-gradient(135deg,
              var(--pif-deep-ocean) 0%,
              var(--pif-deep-ocean-2) 60%,
              var(--pif-lagoon) 100%);
  color: white;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 0 var(--space-6);
  box-shadow: var(--shadow-md);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: white;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.site-brand:hover { color: white; text-decoration: none; }

.site-brand .brand-mark {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.2);
}
.site-brand .brand-mark svg { width: 22px; height: 22px; }
.site-brand .brand-text { line-height: 1.1; }
.site-brand .brand-text small {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

header.site-header nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-wrap: wrap;
}

header.site-header nav a.nav-btn,
header.site-header nav button.nav-btn {
  display: inline-flex;
  align-items: center;
  color: rgba(255,255,255,0.9);
  background: transparent;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease,
              color 120ms ease, transform 80ms ease;
}
header.site-header nav a.nav-btn:hover,
header.site-header nav button.nav-btn:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.25);
  color: white;
  text-decoration: none;
}
header.site-header nav a.nav-btn:active,
header.site-header nav button.nav-btn:active {
  transform: translateY(1px);
}

header.site-header nav a.nav-active,
header.site-header nav button.nav-active {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.45);
  color: white;
  font-weight: 600;
  box-shadow: inset 0 -2px 0 rgba(255,255,255,0.5);
}

header.site-header nav .user-chip {
  color: rgba(255,255,255,0.75);
  font-size: 0.78rem;
  padding: 0 var(--space-2);
  margin-left: var(--space-2);
  border-left: 1px solid rgba(255,255,255,0.18);
  font-family: var(--font-mono);
}

header.site-header nav button.nav-btn-logout {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.3);
  margin-left: var(--space-2);
  color: rgba(255,255,255,0.95);
}
header.site-header nav button.nav-btn-logout:hover {
  background: rgba(224, 120, 86, 0.25);
  border-color: rgba(224, 120, 86, 0.5);
  color: white;
}

/* Primary nav button (sign-in CTA) — coral background, prominent. */
header.site-header nav a.nav-btn-primary,
header.site-header nav button.nav-btn-primary {
  background: var(--pif-coral);
  border-color: var(--pif-coral);
  color: white;
  font-weight: 600;
  margin-left: var(--space-2);
}
header.site-header nav a.nav-btn-primary:hover,
header.site-header nav button.nav-btn-primary:hover {
  background: var(--pif-coral-deep);
  border-color: var(--pif-coral-deep);
  color: white;
}
header.site-header nav a.nav-btn-primary:active,
header.site-header nav button.nav-btn-primary:active {
  transform: translateY(1px);
}

/* Landing / info section (anon index page). */
section.landing {
  background: var(--pif-paper);
  border: 1px solid var(--pif-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  max-width: 640px;
  margin: var(--space-6) auto;
}
section.landing h1 {
  margin: 0 0 var(--space-2) 0;
  font-size: 1.85rem;
  letter-spacing: -0.015em;
}
section.landing .lead {
  font-size: 1.05rem;
  color: var(--pif-text-muted);
  margin: 0 0 var(--space-5) 0;
}
section.landing h2 {
  margin-top: var(--space-6);
  font-size: 1.1rem;
  color: var(--pif-deep-ocean);
}
section.landing p { margin: var(--space-3) 0; }

/* ----------  Layout / main  ---------- */

main.site-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
}

footer.site-footer {
  margin-top: var(--space-12);
  padding: var(--space-6);
  text-align: center;
  color: var(--pif-text-faint);
  font-size: 0.85rem;
  border-top: 1px solid var(--pif-border);
}

/* ----------  Headings + page header  ---------- */

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}
.page-header h1 {
  font-size: 1.85rem;
  letter-spacing: -0.015em;
}
.page-header p.muted {
  margin: var(--space-2) 0 0 0;
  color: var(--pif-text-muted);
  font-size: 0.92rem;
}

/* ----------  Flash messages  ---------- */

.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin: 0 0 var(--space-3) 0;
  border: 1px solid transparent;
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.flash::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
}
.flash-error    { background: #FEF2F0; color: #B23B2A; border-color: #F5C8C0; }
.flash-error::before    { background: #B23B2A; }
.flash-success  { background: #E8F7EE; color: #1F6B40; border-color: #B8E0C8; }
.flash-success::before  { background: #1F6B40; }
.flash-info     { background: #E5F1F9; color: #1A5276; border-color: #B5D5EA; }
.flash-info::before     { background: #2A7FA8; }

/* ----------  Buttons  ---------- */

.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--pif-deep-ocean);
  color: white;
  padding: 0.55rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 150ms ease, transform 80ms ease,
              box-shadow 150ms ease;
  box-shadow: var(--shadow-xs);
}
.btn:hover, button.btn:hover {
  background: var(--pif-deep-ocean-2);
  color: white;
  text-decoration: none;
}
.btn:active, button.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--pif-coral);
  color: white;
}
.btn-primary:hover, button.btn-primary:hover {
  background: var(--pif-coral-deep);
  color: white;
}

/* Inverted 2026-09-28: the docs-row Examine button had near-zero
   contrast on the cream page (transparent background, deep-ocean
   text against sand). Swapped to a strong-fill primary look —
   deep-ocean background with white text — so secondary buttons
   stay readable. Hover deepens the shade. */
.btn-ghost {
  background: var(--pif-deep-ocean);
  color: #ffffff;
  border: 1px solid var(--pif-deep-ocean);
  box-shadow: none;
}
.btn-ghost:hover {
  background: var(--pif-deep-ocean-2);
  color: #ffffff;
  border-color: var(--pif-deep-ocean-2);
}

a.btn { color: white; }
a.btn:hover { color: white; }

/* ----------  Forms  ---------- */

.entity-form, form.search, form.search-form {
  background: var(--pif-paper);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--pif-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 640px;
  margin: 0 0 var(--space-6) 0;
}

form.search, form.search-form {
  flex-direction: row;
  align-items: center;
  max-width: none;
  flex-wrap: wrap;
}

.entity-form label {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--pif-text);
}

.entity-form input,
.entity-form select,
.entity-form textarea,
form.search input[type=search],
form.search input[type=text] {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--pif-border-strong);
  border-radius: var(--radius-md);
  background: white;
  transition: border-color 120ms ease, box-shadow 120ms ease;
  box-sizing: border-box;
}
.entity-form input:focus,
.entity-form select:focus,
.entity-form textarea:focus,
form.search input:focus {
  outline: none;
  border-color: var(--pif-deep-ocean);
  box-shadow: 0 0 0 3px rgba(15, 61, 92, 0.12);
}

.entity-form input.invalid,
.entity-form select.invalid {
  border-color: var(--pif-reef);
  background: #FFF8F6;
}
.entity-form input.invalid:focus,
.entity-form select.invalid:focus {
  box-shadow: 0 0 0 3px rgba(200, 64, 49, 0.15);
}

.entity-form textarea { resize: vertical; min-height: 80px; }
.entity-form small.error {
  color: var(--pif-reef);
  font-size: 0.82rem;
  font-weight: 500;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--pif-border);
}
.form-actions a { color: var(--pif-text-muted); }

/* ----------  Stats cards (dashboard)  ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--space-4);
  margin: 0 0 var(--space-6) 0;
}
.stat {
  background: var(--pif-paper);
  border: 1px solid var(--pif-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-4);
  text-align: left;
  color: inherit;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 150ms ease, border-color 150ms ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.stat::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--pif-shallows);
  transition: background 150ms ease;
}
.stat:hover {
  border-color: var(--pif-shallows);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.stat:hover::before { background: var(--pif-coral); }

.stat .stat-num {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--pif-deep-ocean);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.stat .stat-label {
  font-size: 0.82rem;
  color: var(--pif-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: var(--space-2);
  font-weight: 500;
}

.amounts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
  margin: 0 0 var(--space-6) 0;
}
.amount {
  background: var(--pif-paper);
  border: 1px solid var(--pif-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.amount::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--pif-deep-ocean), var(--pif-shallows));
}
.amount-label {
  font-size: 0.82rem;
  color: var(--pif-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.amount-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--pif-deep-ocean);
  margin-top: var(--space-1);
  letter-spacing: -0.01em;
}

/* ----------  Two-column hero (dashboard)  ---------- */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: var(--space-6);
  margin: var(--space-2) 0;
}

.grid-2 > section,
section.section {
  background: var(--pif-paper);
  border: 1px solid var(--pif-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin: 0 0 var(--space-3) 0;
  flex-wrap: wrap;
}
.section-head h1, .section-head h2 { margin: 0; }

/* ----------  Data tables  ---------- */

table.data {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--pif-paper);
  border: 1px solid var(--pif-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  margin: var(--space-3) 0;
}
table.data thead th {
  background: linear-gradient(180deg, #FAFCFE 0%, #F0F4F8 100%);
  color: var(--pif-text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--pif-border);
}
table.data tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--pif-border);
  vertical-align: top;
  font-size: 0.92rem;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: var(--pif-sand); }

/* ----------  Definition list  ---------- */

dl.kv {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-2) var(--space-5);
  margin: var(--space-4) 0;
  background: var(--pif-paper);
  border: 1px solid var(--pif-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  box-shadow: var(--shadow-xs);
}
dl.kv dt {
  color: var(--pif-text-muted);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: var(--space-1);
}
dl.kv dd { margin: 0; }

/* ----------  Pagination / chips / empty  ---------- */

.pagination {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-4) 0;
  font-size: 0.92rem;
  color: var(--pif-text-muted);
}
.pagination a { font-weight: 500; }

.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-2) 0 var(--space-4) 0; }
.chip {
  background: var(--pif-paper);
  color: var(--pif-deep-ocean);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--pif-border-strong);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.chip:hover {
  background: var(--pif-sand);
  color: var(--pif-coral);
  text-decoration: none;
}
.chip-active {
  background: var(--pif-deep-ocean);
  color: white;
  border-color: var(--pif-deep-ocean);
}
.chip-active:hover { background: var(--pif-deep-ocean-2); color: white; }

.muted { color: var(--pif-text-muted); font-size: 0.9rem; }

.empty {
  background: var(--pif-sand);
  border: 1px dashed var(--pif-border-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
  color: var(--pif-text-muted);
}

/* ----------  Chunk / search results cards  ---------- */

ol.chunks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
li.chunk {
  background: var(--pif-paper);
  border: 1px solid var(--pif-border);
  border-left: 3px solid var(--pif-coral);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  box-shadow: var(--shadow-xs);
  transition: border-left-color 150ms ease, box-shadow 150ms ease;
}
li.chunk:hover {
  border-left-color: var(--pif-deep-ocean);
  box-shadow: var(--shadow-md);
}
li.chunk .chunk-meta {
  font-size: 0.82rem;
  color: var(--pif-text-muted);
  margin-bottom: var(--space-2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
li.chunk .chunk-meta strong { color: var(--pif-deep-ocean); font-size: 0.92rem; }
li.chunk .chip {
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
  background: var(--pif-lagoon);
  color: white;
  border-color: var(--pif-lagoon);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
li.chunk .chunk-content {
  font-family: inherit;
  font-size: 0.93rem;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--pif-sand);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  margin: 0;
  max-height: 320px;
  overflow: auto;
  line-height: 1.5;
  color: var(--pif-text);
}

/* ----------  Verified badge (donation detail)  ---------- */

.verified-banner {
  background: linear-gradient(135deg, #E5F2EB 0%, #DCEDE0 100%);
  border: 1px solid #A9D3B5;
  border-left: 4px solid var(--pif-palm);
  color: var(--pif-palm-deep);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  margin: 0 0 var(--space-4) 0;
  font-weight: 500;
  font-size: 0.92rem;
}
.pending-banner {
  background: linear-gradient(135deg, #FDF3E1 0%, #FAE5C7 100%);
  border: 1px solid #E8C988;
  border-left: 4px solid var(--pif-sunset);
  color: #6E5115;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  margin: 0 0 var(--space-4) 0;
  font-weight: 500;
  font-size: 0.92rem;
}

/* ----------  Login form  ---------- */

.login-form {
  max-width: 380px;
  margin: var(--space-12) auto;
  background: var(--pif-paper);
  border: 1px solid var(--pif-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
  position: relative;
}
.login-form::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--pif-deep-ocean), var(--pif-shallows), var(--pif-coral));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.login-form h1 {
  margin: 0 0 var(--space-5) 0;
  font-size: 1.5rem;
}
.login-form label {
  display: block;
  margin: var(--space-3) 0 var(--space-1) 0;
  font-weight: 500;
  font-size: 0.9rem;
}
.login-form input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--pif-border-strong);
  border-radius: var(--radius-md);
  font-size: 1rem;
  box-sizing: border-box;
  font-family: inherit;
}
.login-form input:focus {
  outline: none;
  border-color: var(--pif-deep-ocean);
  box-shadow: 0 0 0 3px rgba(15, 61, 92, 0.12);
}
.login-form button {
  margin-top: var(--space-5);
  width: 100%;
  justify-content: center;
}

/* ----------  Aside / footer caption  ---------- */

.aside {
  color: var(--pif-text-faint);
  font-size: 0.85rem;
}

/* ----------  Decorative wave (dashboard hero)  ---------- */

.pif-banner {
  background: linear-gradient(135deg,
              var(--pif-deep-ocean) 0%,
              var(--pif-lagoon) 50%,
              var(--pif-shallows) 100%);
  color: white;
  padding: var(--space-8) var(--space-8);
  border-radius: var(--radius-xl);
  margin: 0 0 var(--space-6) 0;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.pif-banner h1 { color: white; margin-bottom: var(--space-2); letter-spacing: -0.02em; }
.pif-banner p { color: rgba(255,255,255,0.9); margin: 0; max-width: 720px; font-size: 1.02rem; }
/* Wave scallops removed 2026-09-28: the .pif-banner::after pseudo
   drew repeated radial-gradient ellipses in the sand background
   color along the bottom edge, reading as a stylised "cloud / wave"
   border. Removed per Michael Larkins's instruction. */

/* ----------  Nav brand image (replaces inline SVG mark)  ---------- */

.site-brand .brand-logo,
.site-brand img.brand-logo {
  display: block;
  /* Doubled 40 -> 80 (2026-09-28 per Michael Larkins); reduced
     80 -> 56 (2026-09-29, -30% to slim the navbar). The intrinsic
     120x65 ratio scales width to ~104px. */
  height: 56px;
  width: auto;
}

/* ----------  Landing page (anon `/`)  ---------- */

body.landing-page {
  min-height: 100vh;
}
body.landing-page::before {
  /* Pacific background image */
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("/static/img/pif-background.jpg?v=20260929");
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  z-index: -2;
}
body.landing-page::after {
  /* 50% sand-colour fade so the image reads as a faded backdrop */
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(251, 245, 236, 0.5);
  pointer-events: none;
  z-index: -1;
}
body.landing-page main.site-main {
  background: transparent;
}
body.landing-page footer.site-footer {
  background: transparent;
  color: var(--pif-text-muted);
}

section.landing {
  background: var(--pif-paper);
  border: 1px solid var(--pif-border);
  border-radius: var(--radius-lg);
  padding: var(--space-10) var(--space-8);
  box-shadow: var(--shadow-lg);
  max-width: 480px;
  margin: var(--space-16) auto;
  text-align: center;
  position: relative;
  z-index: 1;
}
.landing-logo {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto var(--space-5) auto;
}
section.landing h1 {
  font-size: 1.6rem;
  margin: 0 0 var(--space-2) 0;
  letter-spacing: -0.01em;
}
section.landing .lead {
  color: var(--pif-text-muted);
  margin: 0 0 var(--space-6) 0;
  font-size: 1rem;
}
section.landing .landing-signin {
  font-size: 1.05rem;
  padding: 0.7rem 2rem;
  border-radius: var(--radius-md);
}

/* ----------  Misc helpers  ---------- */

ul { padding-left: 1.25rem; }
li { margin: 0.2rem 0; }

/* ----------  Mobile / phone compatibility ----------
   Added 2026-09-29 per Michael's phone screenshot: the single-row
   header (logo + 7 bucket dropdowns + auth controls) overflows a
   ~540px viewport — Nations/Donors cut off the left, Other/auth
   clipped off the right. Two-row reorganisation; buckets wrap.
   Dropdowns become tap-to-open accordions (in-flow, position:
   static) because a scroll container would clip the absolute
   dropdowns; hover/focus-within openers are disabled on touch to
   avoid sticky-hover leaving menus stuck open. */
@media (max-width: 760px) {
  header.site-header {
    flex-wrap: wrap;
    padding: 8px 14px;
    min-height: 0;
    height: auto;   /* neutralise the inline critical CSS fixed height — it clipped the wrapped nav rows */
  }
  .site-brand { order: 1; margin-right: auto; }
  .site-brand .brand-logo,
  .site-brand img.brand-logo { height: 36px; }
  header.site-header nav.auth-nav {
    order: 2;
    margin-left: 0;
    flex-wrap: nowrap;
  }
  header.site-header nav.auth-nav .user-chip { display: none; }
  header.site-header nav.top-nav {
    order: 3;
    flex-basis: 100%;
    margin-left: 0;
    align-items: flex-start;
  }
  .top-nav .nav-bucket-trigger { padding: 0.35rem 0.6rem; font-size: 0.8rem; }
  .nav-bucket:hover > .nav-submenu,
  .nav-bucket:focus-within > .nav-submenu { display: none; }
  .nav-bucket-trigger[aria-expanded="true"] + .nav-submenu {
    display: block;
    position: static;
    min-width: 0;
    border: none;
    box-shadow: none;
    background: transparent;
  }
}
