/* 10 Seva — earthy + saffron palette, movement + portfolio hybrid */
:root {
  --cream: #faf4e6;
  --cream-warm: #f1e7d1;
  --cream-deep: #e7d9bb;
  --saffron: #c8852a;
  --saffron-light: #d89a3a;
  --saffron-deep: #8c5a18;
  --terracotta: #a4543a;
  --sage: #6b7a5c;
  --sage-deep: #455039;
  --charcoal: #1f1b16;
  --ink: #2a241d;
  --brown: #5a4c3e;
  --muted: #7d7062;
  --line: rgba(31, 27, 22, 0.08);

  --shadow: 0 24px 70px -22px rgba(31, 27, 22, 0.22);
  --shadow-sm: 0 10px 28px -10px rgba(31, 27, 22, 0.14);

  --radius-xl: 40px;
  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --max: 1280px;

  --font-display: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ambient blobs removed for cleaner data pages */
body::before, body::after { content: none; display: none; }

a { color: var(--saffron-deep); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--saffron); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.022em;
  color: var(--charcoal);
}
h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
h3 { font-size: clamp(1.3rem, 2.1vw, 1.75rem); }

p { color: var(--brown); }
em { font-style: italic; color: var(--saffron-deep); }

/* ──────── NAV ──────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(250, 244, 230, 0.82);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--charcoal);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--saffron-light), var(--saffron-deep));
  display: flex; align-items: center; justify-content: center;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  letter-spacing: -0.04em;
}
.brand-name { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name small { font-family: var(--font-body); font-size: 0.7rem; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  color: var(--brown);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}
.nav-links a.active { color: var(--saffron-deep); }
.nav-links a.active::after {
  content: ""; position: absolute;
  bottom: -8px; left: 0; right: 0; height: 2px;
  background: var(--saffron);
  border-radius: 2px;
}
.nav-cta {
  background: var(--charcoal);
  color: var(--cream) !important;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 0.92rem;
}
.nav-cta:hover { background: var(--saffron-deep); color: var(--cream) !important; }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; font-size: 1.6rem; color: var(--charcoal); }

/* ──────── HERO (Home) ──────── */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 32px 48px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--cream-warm);
  color: var(--saffron-deep);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  margin-bottom: 28px;
}
.hero-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--saffron); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.25); } }

.hero h1 { margin-bottom: 22px; }
.hero-lead { font-size: 1.18rem; color: var(--brown); max-width: 560px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 17px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  font-family: var(--font-body);
  border: none; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
  text-decoration: none;
}
.btn-primary { background: var(--charcoal); color: var(--cream); }
.btn-primary:hover { background: var(--saffron-deep); transform: translateY(-2px); box-shadow: var(--shadow-sm); color: var(--cream); }
.btn-secondary { background: transparent; color: var(--charcoal); border: 1.5px solid var(--brown); }
.btn-secondary:hover { background: var(--cream-warm); border-color: var(--saffron-deep); color: var(--saffron-deep); }
.btn-saffron { background: var(--saffron); color: var(--cream); }
.btn-saffron:hover { background: var(--saffron-deep); color: var(--cream); transform: translateY(-2px); }

/* HERO numeral display */
.numeral-stack {
  position: relative;
  aspect-ratio: 1 / 1.05;
  max-width: 400px;
  margin: 0 auto;
}
.numeral-blob {
  position: absolute; inset: 0;
  background: linear-gradient(140deg, var(--saffron-light) 0%, var(--saffron-deep) 100%);
  border-radius: 60% 40% 65% 35% / 50% 60% 40% 50%;
  animation: morph 16s ease-in-out infinite;
  box-shadow: var(--shadow);
}
.numeral-blob-2 {
  position: absolute;
  width: 55%; height: 55%;
  background: var(--sage-deep);
  border-radius: 50% 50% 40% 60% / 60% 40% 60% 40%;
  top: -5%; right: -8%;
  animation: morph 12s ease-in-out infinite reverse;
  opacity: 0.9;
}
.numeral-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: clamp(6rem, 13vw, 10rem);
  font-weight: 500;
  z-index: 2;
  letter-spacing: -0.06em;
  line-height: 1;
}
.numeral-caption {
  position: absolute; bottom: 6%; left: 0; right: 0;
  text-align: center;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  z-index: 2;
}
@keyframes morph {
  0%, 100% { border-radius: 60% 40% 65% 35% / 50% 60% 40% 50%; }
  33% { border-radius: 40% 60% 50% 50% / 65% 35% 55% 45%; }
  66% { border-radius: 55% 45% 35% 65% / 45% 65% 35% 55%; }
}

/* ──────── SECTIONS ──────── */
section { padding: 64px 32px; position: relative; }
.section-inner { max-width: var(--max); margin: 0 auto; }
.section-eyebrow {
  display: block;
  color: var(--saffron-deep);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 16px;
}
.section-title { margin-bottom: 22px; max-width: 800px; }
.section-lead { font-size: 1.15rem; max-width: 720px; margin-bottom: 38px; color: var(--brown); }

/* Three meanings (Das) */
.meanings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 32px;
}
.meaning {
  background: var(--cream-warm);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s, box-shadow 0.35s;
}
.meaning:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.meaning::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 100% 0%, var(--saffron-light) 0%, transparent 60%);
  opacity: 0.18;
  pointer-events: none;
}
.meaning-num {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 500;
  color: var(--saffron-deep);
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -0.04em;
}
.meaning-gurmukhi { font-family: var(--font-display); font-size: 1.4rem; color: var(--charcoal); margin-bottom: 6px; }
.meaning-label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em; color: var(--saffron-deep); margin-bottom: 16px; }
.meaning h3 { margin-bottom: 12px; font-size: 1.5rem; }
.meaning p { font-size: 1rem; color: var(--brown); }

/* Pillars / how it works */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.pillar {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: all 0.3s;
}
.pillar:hover { border-color: var(--saffron); transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.pillar-num {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--saffron);
  margin-bottom: 14px;
  line-height: 1;
}
.pillar h3 { margin-bottom: 10px; font-size: 1.25rem; }
.pillar p { font-size: 0.98rem; color: var(--muted); }

/* Panels */
.panel-warm { background: var(--cream-warm); }
.panel-sage { background: var(--sage-deep); color: var(--cream); }
.panel-sage h2, .panel-sage h3, .panel-sage h4 { color: var(--cream); }
.panel-sage p { color: rgba(250, 244, 230, 0.85); }
.panel-sage .section-eyebrow { color: var(--cream-deep); }
.panel-charcoal { background: var(--charcoal); color: var(--cream); }
.panel-charcoal h2, .panel-charcoal h3 { color: var(--cream); }
.panel-charcoal p { color: rgba(250, 244, 230, 0.85); }
.panel-charcoal .section-eyebrow { color: var(--saffron-light); }
.panel-saffron { background: linear-gradient(135deg, var(--saffron) 0%, var(--saffron-deep) 100%); color: var(--cream); }
.panel-saffron h2, .panel-saffron h3 { color: var(--cream); }
.panel-saffron p { color: rgba(250, 244, 230, 0.92); }
.panel-saffron .section-eyebrow { color: var(--cream-deep); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.two-col-wide { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 60px; align-items: center; }

/* Featured project card */
.featured-project {
  background: var(--cream);
  border-radius: var(--radius-xl);
  padding: 48px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  margin-top: 40px;
}
.featured-project::before {
  content: "FEATURED";
  position: absolute; top: 32px; right: 32px;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--saffron-deep);
  background: var(--cream-warm);
  padding: 6px 14px;
  border-radius: 999px;
}
.featured-meta { display: flex; gap: 28px; flex-wrap: wrap; margin: 24px 0 32px; }
.meta-item { display: flex; flex-direction: column; }
.meta-item .label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; }
.meta-item .value { font-family: var(--font-display); font-size: 1.15rem; color: var(--charcoal); }
.featured-visual {
  background: linear-gradient(135deg, var(--terracotta), var(--saffron-deep));
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 5;
  display: flex; align-items: center; justify-content: center;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 5rem;
  position: relative;
  overflow: hidden;
}
.featured-visual::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(250, 244, 230, 0.18) 0%, transparent 50%);
}

/* Stats / numbers */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  margin-top: 50px;
}
.stat { text-align: left; }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 4.5rem);
  color: var(--saffron-deep);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}
.panel-charcoal .stat-num, .panel-sage .stat-num, .panel-saffron .stat-num { color: var(--cream); }
.stat-label { font-size: 0.95rem; color: var(--muted); }
.panel-charcoal .stat-label, .panel-sage .stat-label, .panel-saffron .stat-label { color: rgba(250, 244, 230, 0.8); }

/* Manifesto pull-quote */
.manifesto {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-style: italic;
  line-height: 1.25;
  color: var(--charcoal);
  letter-spacing: -0.015em;
  max-width: 880px;
  padding-left: 24px;
  border-left: 4px solid var(--saffron);
}

/* Timeline (Story) */
.timeline { display: grid; gap: 0; margin-top: 50px; position: relative; }
.timeline::before {
  content: ""; position: absolute;
  left: 30px; top: 16px; bottom: 16px;
  width: 2px; background: var(--cream-deep);
}
.tl-item {
  position: relative;
  padding-left: 80px;
  padding-bottom: 50px;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute;
  left: 22px; top: 4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--saffron);
  border: 4px solid var(--cream);
  z-index: 1;
}
.tl-year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--saffron-deep);
  font-weight: 600;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}
.tl-item h3 { margin-bottom: 8px; font-size: 1.35rem; }

/* Scopes (projects) */
.scopes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 40px;
}
.scope {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px;
  transition: all 0.25s;
}
.scope:hover { border-color: var(--saffron); transform: translateY(-3px); background: var(--cream-warm); }
.scope-num { display: inline-block; font-family: var(--font-display); font-style: italic; color: var(--saffron); font-size: 1.3rem; margin-bottom: 6px; }
.scope h3 { font-size: 1.1rem; margin-bottom: 8px; }
.scope p { font-size: 0.92rem; color: var(--muted); }

/* Transparency commitments */
.transparency {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
  margin-top: 50px;
}
.transparency-item { display: flex; gap: 18px; align-items: flex-start; }
.check {
  flex: none; width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--saffron);
  color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.panel-sage .check { background: var(--cream); color: var(--sage-deep); }
.panel-charcoal .check { background: var(--saffron); color: var(--cream); }
.transparency-item h4 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; margin-bottom: 4px; color: inherit; }
.transparency-item p { font-size: 0.95rem; }

/* Form */
.form {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 20px;
  border: 1px solid var(--line);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 0.78rem; font-weight: 600; color: var(--charcoal); text-transform: uppercase; letter-spacing: 0.08em; }
.field input, .field select, .field textarea {
  padding: 14px 18px;
  border: 1.5px solid rgba(31, 27, 22, 0.14);
  background: var(--cream);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--charcoal);
  transition: border 0.2s, background 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--saffron); background: #fff; }
.field textarea { resize: vertical; min-height: 130px; }
.form-success { display:none; padding: 18px; background: var(--sage); color: var(--cream); border-radius: 12px; font-weight: 600; }
.form-error { display:none; padding: 14px 18px; background: #c0392b; color: var(--cream); border-radius: 12px; font-weight: 500; font-size: 0.92rem; }
.field input:invalid:not(:placeholder-shown), .field select:invalid:not(:placeholder-shown), .field textarea:invalid:not(:placeholder-shown) { border-color: #c0392b; }
.field input:required:focus:invalid { box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15); }
/* Required field indicator */
.field label[for]::after { content: ""; }
.field input[required] + label, .field label.required::after, .field:has(input[required]) label::after, .field:has(select[required]) label::after, .field:has(textarea[required]) label::after { content: " *"; color: #c0392b; font-weight: 700; }

/* CTA strip */
.cta-strip {
  margin: 0 auto;
  max-width: var(--max);
  background: linear-gradient(135deg, var(--saffron) 0%, var(--saffron-deep) 100%);
  border-radius: var(--radius-xl);
  padding: 64px 52px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  align-items: center;
  gap: 32px;
  color: var(--cream);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.cta-strip::after {
  content: "੧੦"; position: absolute;
  right: -30px; bottom: -50px;
  font-family: var(--font-display);
  font-size: 18rem;
  color: rgba(250, 244, 230, 0.08);
  font-weight: 500;
  line-height: 1;
}
.cta-strip h2 { color: var(--cream); margin-bottom: 14px; position: relative; z-index: 1; }
.cta-strip p { color: rgba(250, 244, 230, 0.92); position: relative; z-index: 1; }
.cta-strip .btn-primary { background: var(--cream); color: var(--saffron-deep); justify-self: end; position: relative; z-index: 1; }
.cta-strip .btn-primary:hover { background: var(--charcoal); color: var(--cream); }

/* Footer */
.footer {
  background: var(--charcoal);
  color: var(--cream-warm);
  padding: 60px 32px 28px;
  margin-top: 60px;
}
.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(250, 244, 230, 0.1);
}
.footer h4 { color: var(--cream); font-family: var(--font-body); font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 18px; }
.footer p { color: rgba(250, 244, 230, 0.65); font-size: 0.95rem; margin-bottom: 8px; }
.footer a { color: rgba(250, 244, 230, 0.85); display: block; padding: 4px 0; font-size: 0.95rem; }
.footer a:hover { color: var(--saffron-light); }
.footer-bottom {
  max-width: var(--max);
  margin: 32px auto 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.85rem;
  color: rgba(250, 244, 230, 0.45);
  flex-wrap: wrap; gap: 12px;
}
.footer .brand-mark { background: linear-gradient(140deg, var(--saffron-light), var(--saffron)); }

/* ──────── DASHBOARD COMPONENTS ──────── */
/* Status badge */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.badge-active { background: var(--sage); color: var(--cream); }
.badge-active::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cream); box-shadow: 0 0 0 0 rgba(250, 244, 230, 0.7); animation: pulse 2s infinite; }
.badge-planning { background: var(--cream-deep); color: var(--charcoal); }
.badge-soon { background: rgba(31, 27, 22, 0.06); color: var(--muted); }
.badge-complete { background: var(--saffron); color: var(--cream); }

/* Dashboard summary bar */
.dash-bar {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  margin: 24px 0 8px;
  box-shadow: var(--shadow-sm);
}
.dash-cell { display: flex; flex-direction: column; gap: 4px; }
.dash-cell .lab { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; }
.dash-cell .val { font-family: var(--font-display); font-size: 1.55rem; color: var(--charcoal); line-height: 1.1; }
.dash-cell .sub { font-size: 0.82rem; color: var(--muted); }

/* Phase tracker */
.phases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 28px;
}
.phase {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  position: relative;
  transition: all 0.2s;
}
.phase-done { border-color: var(--saffron); background: var(--cream-warm); }
.phase-current { border-color: var(--sage); background: var(--cream); box-shadow: 0 0 0 4px rgba(107, 122, 92, 0.12); }
.phase-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
  background: var(--cream-warm); color: var(--muted);
  margin-bottom: 10px;
}
.phase-done .phase-icon { background: var(--saffron); color: var(--cream); }
.phase-current .phase-icon { background: var(--sage); color: var(--cream); }
.phase-label { font-family: var(--font-display); font-size: 1rem; color: var(--charcoal); margin-bottom: 2px; line-height: 1.2; }
.phase-state { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.phase-done .phase-state { color: var(--saffron-deep); }
.phase-current .phase-state { color: var(--sage-deep); }

/* Photo grid (placeholder) */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 24px;
}
.photo-tile {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--cream-warm), var(--cream-deep));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  font-size: 0.88rem;
  font-style: italic;
  position: relative;
  overflow: hidden;
}
.photo-tile::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(31, 27, 22, 0.03) 12px, rgba(31, 27, 22, 0.03) 24px);
}

/* Transactions table */
.table-wrap {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 24px;
  box-shadow: var(--shadow-sm);
}
.dash-table { width: 100%; border-collapse: collapse; }
.dash-table th, .dash-table td { padding: 14px 18px; text-align: left; font-size: 0.94rem; }
.dash-table th { background: var(--cream-warm); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--charcoal); font-weight: 600; }
.dash-table td { border-top: 1px solid var(--line); color: var(--brown); }
.dash-empty {
  padding: 60px 24px;
  text-align: center;
  color: var(--muted);
  font-style: italic;
  background: var(--cream);
}
.dash-empty .badge { margin-bottom: 14px; }

/* Project cards (projects.html index) */
.project-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: flex-start;
  transition: all 0.25s;
  margin-bottom: 18px;
  text-decoration: none;
}
.project-card:hover { border-color: var(--saffron); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.project-card-soon { opacity: 0.55; cursor: default; }
.project-card-soon:hover { transform: none; border-color: var(--line); box-shadow: none; }
.project-card h3 { font-size: 1.6rem; margin: 8px 0 6px; color: var(--charcoal); }
.project-card p { color: var(--muted); font-size: 0.98rem; max-width: 600px; }
.project-card-arrow { font-size: 1.4rem; color: var(--saffron-deep); align-self: center; }

/* ─── FINANCIAL OVERVIEW ─── */
.financial-overview { margin-top: 16px; }
.fin-cell-material  { border-left: 4px solid var(--saffron); }
.fin-cell-labor     { border-left: 4px solid var(--terracotta); }
.fin-cell-committed { border-left: 4px solid var(--saffron-deep); }
.fin-sub { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.fin-cell-budget   { background: var(--cream-warm); }
.fin-cell-budget .fin-val { color: var(--muted); font-style: italic; }
.fin-ml-bar { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px 20px; }
.fin-ml-lab { display: block; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 10px; }
.fin-ml-track { display: flex; height: 16px; background: var(--cream-deep); border-radius: 999px; overflow: hidden; }
.fin-ml-material { background: var(--saffron); transition: width 0.6s ease; }
.fin-ml-labor    { background: var(--terracotta); transition: width 0.6s ease; }
.fin-ml-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 0.84rem; color: var(--brown); }
.fin-ml-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.fin-dot-material { background: var(--saffron); }
.fin-dot-labor    { background: var(--terracotta); }

.fin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.fin-cell {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fin-cell-in  { border-left: 4px solid var(--sage); }
.fin-cell-out { border-left: 4px solid var(--terracotta); }
.fin-lab {
  font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted);
}
.fin-val {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--charcoal);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.fin-cell-in .fin-val  { color: var(--sage-deep); }
.fin-cell-out .fin-val { color: var(--terracotta); }
.fin-bar {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}
.fin-bar-track {
  position: relative;
  height: 18px;
  background: var(--cream-deep);
  border-radius: 999px;
  overflow: hidden;
}
.fin-bar-committed {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--saffron);
  border-radius: 999px;
  transition: width 0.6s ease;
}
.fin-bar-spent {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--terracotta);
  border-radius: 999px;
  transition: width 0.6s ease;
}
.fin-bar-legend {
  display: flex; gap: 18px; flex-wrap: wrap;
  margin-top: 12px;
  font-size: 0.82rem; color: var(--brown);
}
.fin-bar-legend .dot {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; margin-right: 6px;
  vertical-align: middle;
}
.fin-dot-spent     { background: var(--terracotta); }
.fin-dot-committed { background: var(--saffron); }
.fin-dot-remaining { background: var(--cream-deep); }

/* ─── SPENDING BY CATEGORY ─── */
.spending-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.spending-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.spending-card-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.spending-cat-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex: none;
}
.spending-cat-name { flex: 1; font-weight: 600; color: var(--charcoal); font-size: 0.94rem; }
.spending-cat-amt {
  font-family: var(--font-display);
  font-size: 1.15rem; color: var(--saffron-deep);
  font-variant-numeric: tabular-nums;
}
.spending-bar { height: 8px; background: var(--cream-deep); border-radius: 999px; overflow: hidden; display: flex; }
.spending-bar-fill { height: 100%; border-radius: 999px; transition: width 0.6s ease; }
.spending-bar-material { background: var(--saffron); transition: width 0.6s ease; }
.spending-bar-labor    { background: var(--terracotta); transition: width 0.6s ease; }
.spending-cat-text { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.spending-cat-sub { font-family: var(--font-mono); font-size: 0.66rem; color: var(--muted); letter-spacing: 0.06em; }
.spending-ml-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ml-chip { font-size: 0.7rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.ml-chip-material { background: rgba(200, 133, 42, 0.15); color: var(--saffron-deep); }
.ml-chip-labor    { background: rgba(164, 84, 58, 0.15); color: var(--terracotta); }

.spending-breakdown {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: grid;
  gap: 12px;
}
.spending-line {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "info vals" "bar bar";
  gap: 4px 12px;
  align-items: baseline;
  font-size: 0.86rem;
}
.spending-line-info { grid-area: info; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.spending-line-name { color: var(--charcoal); font-weight: 500; }
.spending-line-sub  { color: var(--muted); font-size: 0.76rem; }
.spending-line-vals { grid-area: vals; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.spending-line-amt {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-variant-numeric: tabular-nums;
  color: var(--charcoal);
}
.spending-line-of {
  font-size: 0.72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.spending-line-bar {
  grid-area: bar;
  height: 3px;
  background: var(--cream-deep);
  border-radius: 999px;
  overflow: hidden;
}
.spending-line-bar-fill { height: 100%; border-radius: 999px; transition: width 0.6s ease; }
.spending-line-other .spending-line-name { font-style: italic; color: var(--muted); }
.spending-line-other .spending-line-amt { color: var(--muted); }

/* ─── TRANSACTION LOG ─── */
.txn-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px;
  margin: 20px 0 12px;
}
.txn-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.txn-filters .chip { padding: 6px 12px; font-size: 0.78rem; }
.txn-summary {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 0.86rem; color: var(--brown);
}
.txn-sum-in strong  { color: var(--sage-deep); font-family: var(--font-display); font-size: 1rem; }
.txn-sum-out strong { color: var(--terracotta); font-family: var(--font-display); font-size: 1rem; }

.txn-table-wrap {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-sm);
}
.txn-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 720px;
}
.txn-table th, .txn-table td {
  padding: 11px 14px;
  text-align: left;
  border-top: 1px solid var(--line);
}
.txn-table th {
  background: var(--cream-warm);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--charcoal);
  font-weight: 600;
  border-top: none;
}
.txn-table td.num, .txn-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.txn-table tr.txn-in td:nth-child(5)  { color: var(--sage-deep); font-weight: 600; }
.txn-table tr.txn-out td:nth-child(5) { color: var(--terracotta); font-weight: 600; }
.txn-date { font-family: var(--font-mono); font-size: 0.84rem; color: var(--brown); }
.txn-cat-pill {
  display: inline-block;
  font-size: 0.66rem; font-weight: 700;
  color: var(--cream);
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: 4px;
  white-space: nowrap;
}
.txn-receipt {
  color: var(--saffron-deep);
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
}
.txn-receipt:hover { color: var(--saffron); text-decoration: underline; }
.txn-no-receipt { color: var(--muted); }

/* ─── WORK & RECORDS ─── */
.work-list { display: grid; gap: 12px; margin-top: 14px; }
.work-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.work-card.expanded { border-color: var(--saffron); box-shadow: var(--shadow-sm); }
.work-awarded   .work-cat-strip { opacity: 1; }
.work-active    .work-cat-strip { opacity: 1; }
.work-complete  .work-cat-strip { opacity: 0.7; }
.work-cancelled { opacity: 0.5; }
.work-open      .work-cat-strip { opacity: 0.5; }

.work-summary {
  display: flex; width: 100%;
  background: transparent; border: none;
  padding: 0;
  text-align: left; cursor: pointer;
  font-family: var(--font-body); color: inherit;
  align-items: stretch; gap: 0;
  transition: background 0.15s;
}
.work-summary:hover { background: var(--cream-warm); }
.work-cat-strip { width: 6px; flex: none; }
.work-summary-main {
  flex: 1; min-width: 0;
  padding: 16px 18px 16px 16px;
}
.work-meta {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-bottom: 6px;
}
.work-cat-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.work-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--charcoal);
  margin: 0 0 4px;
  line-height: 1.2;
}
.work-stats {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 0.82rem; color: var(--muted);
}
.work-contractor { color: var(--brown); font-weight: 500; }
.work-amount { font-family: var(--font-display); color: var(--saffron-deep); font-weight: 500; }
.work-amount-sub { font-size: 0.72rem; color: var(--muted); font-weight: 400; font-family: var(--font-body); margin-left: 4px; }
.work-tm-badge {
  font-size: 0.6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 2px 7px; border-radius: 4px;
  background: var(--saffron); color: var(--cream);
}
.work-summary .trade-toggle-icon { align-self: center; padding-right: 18px; }

/* Clickable party / vendor link */
.party-link {
  background: transparent;
  border: none;
  padding: 2px 4px;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  color: var(--saffron-deep);
  cursor: pointer;
  border-bottom: 1px dashed rgba(140, 90, 24, 0.4);
  text-align: inherit;
  font-weight: inherit;
}
.party-link:hover {
  color: var(--saffron);
  background: rgba(200, 133, 42, 0.08);
  border-bottom-color: var(--saffron);
}

/* Line items (payments tracked per work item) */
.line-items-list { display: grid; gap: 8px; }
.line-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 11px 14px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}
.line-item-date {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
  white-space: nowrap;
}
.line-item-body { min-width: 0; }
.line-item-desc { color: var(--charcoal); font-weight: 500; margin-bottom: 3px; }
.line-item-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 0.78rem; color: var(--muted);
}
.line-item-receipt {
  color: var(--saffron-deep);
  text-decoration: none;
}
.line-item-receipt:hover { color: var(--saffron); text-decoration: underline; }
.line-item-no-receipt { color: var(--muted); font-style: italic; }
.line-item-amount {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--terracotta);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ─── VENDOR PROFILE MODAL ─── */
.vendor-overlay {
  position: fixed; inset: 0;
  background: rgba(31, 27, 22, 0.85);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.2s ease;
  overflow-y: auto;
}
.vendor-overlay.show { opacity: 1; }
.vendor-modal {
  background: var(--cream);
  border-radius: var(--radius-xl);
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 36px 36px 32px;
  position: relative;
  box-shadow: var(--shadow);
  transform: translateY(16px);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.vendor-overlay.show .vendor-modal { transform: translateY(0); }
.vendor-close {
  position: absolute; top: 18px; right: 18px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--cream-warm);
  border: none;
  font-size: 1.3rem;
  color: var(--brown);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.vendor-close:hover { background: var(--charcoal); color: var(--cream); }

.vendor-header {
  display: flex; gap: 18px; align-items: center;
  margin-bottom: 24px;
}
.vendor-avatar {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--saffron-light), var(--saffron-deep));
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
  font-weight: 500;
  flex: none;
}
.vendor-title { min-width: 0; }
.vendor-eyebrow {
  display: block;
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--saffron-deep);
  margin-bottom: 4px;
}
.vendor-title h3 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--charcoal);
  line-height: 1.1;
  margin: 0;
}

.vendor-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.vendor-stat {
  background: var(--cream-warm);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.vendor-stat-out { border-left: 3px solid var(--terracotta); }
.vendor-stat-in  { border-left: 3px solid var(--sage); }
.vendor-stat-lab {
  font-size: 0.68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted);
}
.vendor-stat-val {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--charcoal);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.vendor-stat-out .vendor-stat-val { color: var(--terracotta); }
.vendor-stat-in  .vendor-stat-val { color: var(--sage-deep); }

.vendor-section { margin-top: 22px; }
.vendor-section h4 {
  font-family: var(--font-body);
  font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--saffron-deep);
  margin: 0 0 12px;
}
.vendor-work-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 6px;
}
.vendor-work-list li {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 12px;
  background: var(--cream-warm);
  border-radius: var(--radius-sm);
}
.vendor-work-cat {
  width: 26px; height: 26px;
  border-radius: 6px;
  color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  flex: none;
}
.vendor-work-title { font-weight: 600; color: var(--charcoal); flex: 1; min-width: 0; }
.vendor-work-cat-name { font-size: 0.78rem; color: var(--muted); }
.vendor-work-status {
  font-size: 0.66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--cream-deep);
  color: var(--brown);
}

.vendor-txn-wrap {
  background: var(--cream-warm);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.vendor-txn-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 540px;
}
.vendor-txn-table th {
  background: var(--cream-deep);
  font-size: 0.66rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--charcoal);
  padding: 9px 12px; text-align: left;
}
.vendor-txn-table td {
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  color: var(--brown);
}
.vendor-txn-table td.num, .vendor-txn-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.vendor-txn-table tr.txn-in  td:nth-child(4) { color: var(--sage-deep); }
.vendor-txn-table tr.txn-out td:nth-child(4) { color: var(--terracotta); }

@media (max-width: 640px) {
  .vendor-modal { padding: 28px 22px 24px; max-height: 95vh; }
  .vendor-avatar { width: 52px; height: 52px; font-size: 1.6rem; border-radius: 12px; }
  .vendor-title h3 { font-size: 1.35rem; }
  .line-item { grid-template-columns: 1fr auto; gap: 8px; }
  .line-item-date { grid-column: 1 / -1; }
}

/* Labor log table (inside expanded T&M work item) */
.labor-section h4 { color: var(--saffron-deep); }
.labor-table-wrap {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  overflow-x: auto;
}
.labor-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  min-width: 540px;
}
.labor-table th {
  background: var(--cream-deep);
  font-size: 0.66rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 9px 12px; text-align: left;
  color: var(--charcoal);
}
.labor-table td {
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  color: var(--brown);
}
.labor-table th.num, .labor-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.labor-table tfoot td { background: var(--cream-warm); color: var(--charcoal); border-top: 2px solid var(--saffron); }
.labor-table .labor-notes { color: var(--muted); font-style: italic; font-size: 0.82rem; }

.work-detail {
  padding: 8px 22px 22px;
  background: var(--cream-warm);
  display: grid;
  gap: 18px;
}

@media (max-width: 640px) {
  .fin-val { font-size: 1.35rem; }
  .work-name { font-size: 1.05rem; }
  .work-summary-main { padding: 14px 14px 14px 12px; }
  .work-summary .trade-toggle-icon { padding-right: 14px; }
  .txn-toolbar { flex-direction: column; align-items: flex-start; }
  .spending-cards { grid-template-columns: 1fr; }
}

/* ─── TRADES & RECORDS (Airtable-powered) ─── */
.trades-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}
.trade-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.trade-card.expanded { border-color: var(--saffron); box-shadow: var(--shadow-sm); }
.trade-awarded     { border-left: 4px solid var(--sage); }
.trade-active      { border-left: 4px solid var(--saffron); }
.trade-complete    { border-left: 4px solid var(--saffron-deep); }
.trade-review      { border-left: 4px solid var(--terracotta); }
.trade-open        { border-left: 4px solid var(--cream-deep); }
.trade-cancelled   { border-left: 4px solid rgba(31, 27, 22, 0.2); opacity: 0.6; }

.trade-summary {
  display: flex; width: 100%;
  background: transparent; border: none;
  padding: 16px 20px; text-align: left; cursor: pointer;
  font-family: var(--font-body); color: inherit;
  align-items: center; gap: 14px;
  transition: background 0.15s;
}
.trade-summary:hover { background: var(--cream-warm); }
.trade-summary-main { flex: 1; min-width: 0; }
.trade-meta {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-bottom: 6px;
}
.trade-contractor {
  font-size: 0.88rem;
  color: var(--brown);
  font-weight: 500;
}
.trade-amount {
  font-family: var(--font-display);
  font-size: 0.96rem;
  color: var(--saffron-deep);
}
.trade-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--charcoal);
  margin: 0 0 4px;
  line-height: 1.2;
}
.trade-stats {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 0.82rem; color: var(--muted);
}
.trade-toggle-icon {
  font-size: 1.4rem;
  color: var(--saffron-deep);
  transition: transform 0.25s;
  flex: none;
}
.trade-card.expanded .trade-toggle-icon { transform: rotate(180deg); }

.trade-detail {
  padding: 8px 22px 22px;
  background: var(--cream-warm);
  display: grid;
  gap: 20px;
}
.trade-section h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--saffron-deep);
  margin: 0 0 10px;
}
.trade-notes {
  font-size: 0.95rem; color: var(--brown);
  padding: 12px 14px;
  background: rgba(107, 122, 92, 0.08);
  border-radius: var(--radius-sm);
}
.trade-notes strong { color: var(--sage-deep); }
.trade-empty { color: var(--muted); font-style: italic; }

/* Bids mini list (inside a trade card) */
.bids-mini-list { display: grid; gap: 8px; }
.bid-mini {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--cream);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-size: 0.9rem;
}
.bid-mini.bid-selected { background: linear-gradient(to right, rgba(107, 122, 92, 0.08), var(--cream) 40%); border-color: var(--sage); }
.bid-mini.bid-declined { opacity: 0.6; }
.bid-mini-badge {
  font-size: 0.66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 3px 8px; border-radius: 4px;
  color: var(--cream); flex: none;
}
.bid-mini-selected { background: var(--sage-deep); }
.bid-mini-declined { background: var(--muted); }
.bid-mini-pending  { background: var(--saffron-deep); }
.bid-mini-company  { font-weight: 600; color: var(--charcoal); flex: 1; min-width: 120px; }
.bid-mini-amount   { font-family: var(--font-display); color: var(--saffron-deep); }
.bid-mini-notes    { color: var(--muted); font-size: 0.85rem; font-style: italic; flex-basis: 100%; }

/* Attachment grid (photos) */
.attachment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.attachment-photo {
  display: block;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--cream-deep);
  transition: transform 0.2s, box-shadow 0.2s;
}
.attachment-photo:hover { transform: scale(1.04); box-shadow: var(--shadow-sm); }
.attachment-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Documents list */
.docs-list { display: grid; gap: 6px; }
.doc-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--brown);
  transition: border-color 0.15s, background 0.15s;
  font-size: 0.92rem;
}
.doc-item:hover { background: var(--cream-warm); border-color: var(--saffron); }
.doc-icon { font-size: 1.3rem; flex: none; }
.doc-name { flex: 1; color: var(--charcoal); font-weight: 500; }
.doc-action {
  color: var(--saffron-deep); font-weight: 700; font-size: 1.1rem;
  flex: none;
}

@media (max-width: 640px) {
  .trade-summary { padding: 14px 16px; gap: 10px; }
  .trade-name { font-size: 1.1rem; }
  .trade-detail { padding: 6px 16px 18px; gap: 16px; }
  .attachment-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 6px; }
}

/* Bid transparency cards */
.bids-list { display: grid; gap: 14px; margin-top: 24px; }
.bid-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  border-left: 4px solid var(--cream-deep);
}
.bid-selected { border-left-color: var(--sage); background: linear-gradient(to right, rgba(107, 122, 92, 0.06), var(--cream) 40%); }
.bid-declined { border-left-color: rgba(31, 27, 22, 0.2); opacity: 0.7; }
.bid-pending  { border-left-color: var(--saffron); }
.bid-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.bid-scope { font-family: var(--font-display); font-size: 1.1rem; color: var(--charcoal); flex: 1; min-width: 140px; }
.bid-date { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.1em; }
.bid-body { display: grid; gap: 4px; }
.bid-row { font-size: 0.94rem; color: var(--brown); }
.bid-row strong { color: var(--charcoal); font-weight: 600; }
.bid-notes { margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--line); font-style: italic; }

/* Update log */
.updates {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}
.update {
  background: var(--cream);
  border-left: 4px solid var(--saffron);
  border-radius: var(--radius-md);
  padding: 18px 22px;
}
.update-date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--saffron-deep); font-weight: 600; letter-spacing: 0.08em; margin-bottom: 4px; }
.update p { color: var(--brown); }

/* ──────── REVEAL + SCROLL-DRIVEN MORPHING ──────── */
/* Base reveal — JS-driven fallback for browsers without scroll-timeline */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); will-change: opacity, transform; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Smooth-scroll polish */
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1 !important; transform: none !important; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Scroll-driven section morph — modern browsers (Chrome, Edge, recent Safari) */
@supports (animation-timeline: view()) {
  section {
    animation: section-morph linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 35%;
    will-change: opacity, transform;
  }
  @keyframes section-morph {
    from { opacity: 0; transform: translateY(48px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
  }

  /* Hero text drifts up + fades as you scroll past it */
  .hero-text {
    animation: hero-drift linear both;
    animation-timeline: view();
    animation-range: exit 0% exit 100%;
  }
  @keyframes hero-drift {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-80px); }
  }

  /* Background blobs drift on scroll for parallax */
  body::before {
    animation: blob-drift-1 linear both;
    animation-timeline: scroll();
  }
  body::after {
    animation: blob-drift-2 linear both;
    animation-timeline: scroll();
  }
  @keyframes blob-drift-1 {
    to { transform: translate(40px, 220px) rotate(40deg); }
  }
  @keyframes blob-drift-2 {
    to { transform: translate(-30px, -180px) rotate(-30deg); }
  }

  /* Hero numeral slowly scales + rotates */
  .numeral-stack {
    animation: numeral-flow linear both;
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
  }
  @keyframes numeral-flow {
    from { transform: scale(0.92) rotate(-3deg); }
    50%  { transform: scale(1) rotate(0deg); }
    to   { transform: scale(0.94) rotate(2deg); }
  }

  /* Cards morph in with slight stagger via animation-range */
  .meaning, .pillar, .scope, .project-card, .featured-project, .tier {
    animation: card-morph linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 25%;
  }
  @keyframes card-morph {
    from { opacity: 0; transform: translateY(32px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }
}

/* Section bleed — soft fade at top of each colored panel for "morph into next" feel */
.panel-warm, .panel-sage, .panel-charcoal, .panel-saffron {
  position: relative;
}
.panel-warm::before, .panel-sage::before, .panel-charcoal::before, .panel-saffron::before {
  content: ""; position: absolute; top: -40px; left: 0; right: 0; height: 80px;
  background: inherit; -webkit-mask: linear-gradient(to bottom, transparent, black);
  mask: linear-gradient(to bottom, transparent, black);
  pointer-events: none; z-index: 1;
}

/* ──────── INTERACTIVE SCROLL CHOREOGRAPHY ──────── */

/* 1. Scroll progress bar at very top */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(to right, var(--saffron), var(--terracotta));
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 1000;
  pointer-events: none;
  will-change: transform;
}
@supports (animation-timeline: scroll()) {
  .scroll-progress {
    animation: scroll-fill linear both;
    animation-timeline: scroll(root);
  }
  @keyframes scroll-fill { to { transform: scaleX(1); } }
}

/* 2. Word-by-word hero reveal — fires on load with stagger */
.word-reveal { display: block; }
.word-reveal .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(50px) rotateX(-40deg);
  transform-origin: 50% 100%;
  animation: word-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i, 0) * 0.07s + 0.15s);
  will-change: transform, opacity;
}
.word-reveal .word em { display: inline-block; font-style: italic; color: var(--saffron-deep); }
@keyframes word-rise {
  to { opacity: 1; transform: translateY(0) rotateX(0); }
}

/* 3. Sliding headings (scroll-driven) */
@supports (animation-timeline: view()) {
  .slide-left {
    opacity: 0; transform: translateX(-70px);
    animation: slide-in-from-left linear both;
    animation-timeline: view();
    animation-range: entry 5% cover 30%;
  }
  .slide-right {
    opacity: 0; transform: translateX(70px);
    animation: slide-in-from-right linear both;
    animation-timeline: view();
    animation-range: entry 5% cover 30%;
  }
  @keyframes slide-in-from-left { to { opacity: 1; transform: translateX(0); } }
  @keyframes slide-in-from-right { to { opacity: 1; transform: translateX(0); } }

  /* 4. Cards stagger in from alternating sides */
  .stagger-grid > *:nth-child(odd) {
    opacity: 0; transform: translateX(-50px) translateY(20px);
    animation: stagger-left linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
  }
  .stagger-grid > *:nth-child(even) {
    opacity: 0; transform: translateX(50px) translateY(20px);
    animation: stagger-right linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
  }
  @keyframes stagger-left { to { opacity: 1; transform: translateX(0) translateY(0); } }
  @keyframes stagger-right { to { opacity: 1; transform: translateX(0) translateY(0); } }
}

/* 5. Marquee strip */
.marquee {
  overflow: hidden;
  background: var(--charcoal);
  color: var(--cream);
  padding: 22px 0;
  border-top: 1px solid rgba(250, 244, 230, 0.08);
  border-bottom: 1px solid rgba(250, 244, 230, 0.08);
  position: relative;
  margin-top: 64px;
}
.marquee::before, .marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 90px; z-index: 2;
  pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(to right, var(--charcoal), transparent); }
.marquee::after { right: 0; background: linear-gradient(to left, var(--charcoal), transparent); }
.marquee-track {
  display: inline-flex; align-items: center; gap: 52px;
  animation: marquee-scroll 48s linear infinite;
  white-space: nowrap;
  padding-left: 0;
  will-change: transform;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  white-space: nowrap;
}
.marquee-item .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--saffron);
  display: inline-block;
  align-self: center;
  flex-shrink: 0;
}
.marquee-word {
  font-family: var(--font-display), "Noto Sans", "Noto Naskh Arabic", "Noto Sans CJK SC", "Noto Sans Hebrew", "Noto Sans Tamil", "Noto Sans Bengali", system-ui, sans-serif;
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--cream);
  line-height: 1;
}
.marquee-lang {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--saffron-light);
  opacity: 0.75;
  align-self: center;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* 6. Magnetic button — subtle */
.btn { transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s, box-shadow 0.2s, color 0.2s; }
.btn[data-magnetic] { transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s, box-shadow 0.2s, color 0.2s; }

/* 7. Counter — tabular nums for stable layout while counting */
.counter, .stat-num, .dash-cell .val { font-variant-numeric: tabular-nums; }

/* 8. Card icon hover lift */
.card-icon, .pillar-num, .scope-num, .meaning-num {
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.pillar:hover .pillar-num,
.scope:hover .scope-num,
.meaning:hover .meaning-num,
.card:hover .card-icon {
  transform: translateY(-6px) scale(1.08) rotate(-3deg);
}

/* 9. Sticky-feeling section number badges on Langar Hall phases (subtle) */
.phase-done { transition: background 0.3s, border-color 0.3s; }
.phase-current .phase-icon { animation: pulse-current 2s ease-in-out infinite; }
@keyframes pulse-current {
  0%, 100% { box-shadow: 0 0 0 0 rgba(107, 122, 92, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(107, 122, 92, 0); }
}

/* 10. Animated brand mark gentle float */
.brand-mark { transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.brand:hover .brand-mark { transform: rotate(8deg) scale(1.08); }

/* 11. Reveal-on-hover detail underline for nav links */
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--saffron); border-radius: 2px;
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-links a:not(.nav-cta):hover::after { transform: scaleX(1); }
.nav-links a.active::after { transform: scaleX(1) !important; }

/* Mobile: simplify some interactions */
@media (max-width: 640px) {
  .marquee { padding: 14px 0; margin-top: 32px; }
  .marquee-word { font-size: 1.15rem; }
  .marquee-lang { font-size: 0.55rem; letter-spacing: 0.18em; }
  .marquee-item { gap: 10px; }
  .marquee-track { gap: 32px; animation-duration: 36s; }
  .marquee::before, .marquee::after { width: 50px; }
  .word-reveal .word { transform: translateY(28px) rotateX(-20deg); }
  .scroll-progress { height: 2px; }
}

/* ──────── RESPONSIVE / MOBILE OPTIMIZATIONS ──────── */

/* iOS input zoom prevention + touch-friendly defaults */
.field input, .field select, .field textarea { font-size: 16px; }

/* Tablet & smaller (≤980px) */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding: 24px 22px 22px; gap: 24px; }
  .hero-visual { order: -1; }
  .numeral-stack { max-width: 200px; }
  section { padding: 36px 22px; }
  .two-col, .two-col-wide { grid-template-columns: 1fr; gap: 28px; }
  .featured-project { grid-template-columns: 1fr; padding: 22px; gap: 20px; }
  .featured-project::before { position: static; display: inline-block; margin-bottom: 12px; }
  .featured-visual { aspect-ratio: 16 / 9; font-size: 3.4rem; }
  .meanings { grid-template-columns: 1fr; gap: 14px; }
  .form-row { grid-template-columns: 1fr; }
  .form { padding: 22px; gap: 16px; }
  .cta-strip { grid-template-columns: 1fr; padding: 28px 22px; text-align: center; gap: 18px; }
  .cta-strip .btn-primary { justify-self: center; width: 100%; max-width: 300px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; padding-bottom: 26px; }
  .footer { padding: 44px 22px 22px; margin-top: 32px; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--cream); flex-direction: column; padding: 16px; gap: 2px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
  .nav-links a { padding: 11px 8px; width: 100%; font-size: 0.94rem; }
  .nav-links a.nav-cta { margin-top: 6px; text-align: center; }
  .nav-links.open { display: flex; }
  .menu-toggle { display: block; padding: 6px; }
  .nav-inner { position: relative; padding: 12px 20px; }

  /* Tables become horizontally scrollable */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dash-table { min-width: 560px; }
  .dash-table th, .dash-table td { padding: 11px 14px; font-size: 0.88rem; }

  /* Dashboard bar */
  .dash-bar { grid-template-columns: 1fr 1fr; gap: 14px; padding: 16px 18px; }
  .dash-cell .lab { font-size: 0.65rem; }
  .dash-cell .val { font-size: 1.15rem; }
  .dash-cell .sub { font-size: 0.74rem; }

  /* Phase tracker */
  .phases { grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 20px; }
  .phase { padding: 11px 8px; }
  .phase-icon { width: 22px; height: 22px; margin-bottom: 6px; font-size: 0.66rem; }
  .phase-label { font-size: 0.78rem; }
  .phase-state { font-size: 0.6rem; }

  /* Buttons — tighter on mobile */
  .btn { padding: 11px 18px; font-size: 0.88rem; min-height: 44px; gap: 6px; }
  .nav-cta { padding: 9px 16px; font-size: 0.86rem; }
  .hero-actions { gap: 8px; width: 100%; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; min-width: 130px; }

  /* Photo grid */
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 18px; }

  /* Section spacing tweaks */
  .section-lead { font-size: 0.98rem; margin-bottom: 22px; }
  .section-title { margin-bottom: 14px; }
  .section-eyebrow { font-size: 0.74rem; letter-spacing: 0.11em; margin-bottom: 10px; }

  /* Project cards */
  .project-card { padding: 20px; grid-template-columns: 1fr; gap: 10px; margin-bottom: 14px; }
  .project-card-arrow { display: none; }
  .project-card h3 { font-size: 1.2rem; }
  .project-card p { font-size: 0.92rem; }

  /* Form submit buttons full width */
  .form button[type="submit"] { width: 100%; justify-content: center; justify-self: stretch !important; }
  .field input, .field select, .field textarea { padding: 11px 14px; }
  .field label { font-size: 0.74rem; }

  /* CTA strip background numeral hide */
  .cta-strip::after { display: none; }

  /* Section bleed reduced on mobile */
  .panel-warm::before, .panel-sage::before, .panel-charcoal::before, .panel-saffron::before {
    top: -24px; height: 48px;
  }
}

/* Phone (≤640px) */
@media (max-width: 640px) {
  body { font-size: 15px; }
  h1 { font-size: clamp(1.75rem, 7vw, 2.2rem); line-height: 1.1; }
  h2 { font-size: clamp(1.35rem, 5vw, 1.7rem); }
  h3 { font-size: 1.1rem; }
  section { padding: 28px 16px; }
  .hero { padding: 20px 16px 18px; gap: 18px; }
  .hero h1 { margin-bottom: 12px; }
  .hero-lead { font-size: 0.94rem; margin-bottom: 18px; line-height: 1.55; }
  .hero-eyebrow { font-size: 0.7rem; padding: 6px 12px; margin-bottom: 18px; }
  .hero-actions { flex-direction: column; gap: 8px; }
  .hero-actions .btn { width: 100%; }
  .numeral-stack { max-width: 160px; }
  .numeral-text { font-size: clamp(3.5rem, 18vw, 5.5rem); }
  .numeral-caption { font-size: 0.7rem; letter-spacing: 0.18em; }

  .featured-project { padding: 18px; }
  .featured-meta { gap: 12px; flex-wrap: wrap; margin: 14px 0 16px; }
  .meta-item .label { font-size: 0.66rem; }
  .meta-item .value { font-size: 0.92rem; }

  /* Tiers stack */
  .tiers { grid-template-columns: 1fr; gap: 12px; }
  .tier { padding: 24px 22px; }
  .tier-amount { font-size: 2.1rem; }

  /* Dashboard bar stacks single col */
  .dash-bar { grid-template-columns: 1fr; gap: 10px; padding: 14px 18px; }
  .dash-cell { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .dash-cell:last-child { padding-bottom: 0; border-bottom: none; }
  .dash-cell .val { font-size: 1.05rem; }

  /* Phases — 2 across */
  .phases { grid-template-columns: 1fr 1fr; gap: 6px; }

  /* Photo grid */
  .photo-grid { grid-template-columns: 1fr; }
  .photo-tile { aspect-ratio: 16 / 10; font-size: 0.78rem; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 22px; padding-bottom: 22px; }
  .footer { padding: 36px 18px 20px; }
  .footer p, .footer a { font-size: 0.88rem; }
  .footer h4 { font-size: 0.76rem; margin-bottom: 12px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 4px; font-size: 0.72rem; margin-top: 22px; }

  /* Meaning cards */
  .meaning { padding: 22px 20px; }
  .meaning-num { font-size: 2.4rem; }
  .meaning-gurmukhi { font-size: 1.15rem; }
  .meaning-label { font-size: 0.7rem; margin-bottom: 10px; }
  .meaning h3 { font-size: 1.2rem; margin-bottom: 8px; }
  .meaning p { font-size: 0.92rem; }

  /* Timeline (story) */
  .timeline::before { left: 16px; top: 6px; }
  .tl-item { padding-left: 44px; padding-bottom: 28px; }
  .tl-dot { left: 8px; width: 14px; height: 14px; border-width: 3px; }
  .tl-year { font-size: 0.7rem; }
  .tl-item h3 { font-size: 1.1rem; }

  /* Form */
  .form { padding: 18px; gap: 12px; }
  .form h3 { font-size: 1.15rem; }

  /* Manifesto pull-quote */
  .manifesto { font-size: 1.2rem; padding-left: 14px; border-left-width: 3px; line-height: 1.3; }

  /* Nav brand simplified */
  .brand-name small { display: none; }
  .brand { font-size: 0.98rem; gap: 9px; }
  .brand-mark { width: 34px; height: 34px; font-size: 1rem; border-radius: 10px; }

  /* Pillars */
  .pillars { gap: 12px; margin-top: 22px; }
  .pillar { padding: 20px; }
  .pillar h3 { font-size: 1.1rem; }
  .pillar p { font-size: 0.9rem; }
  .pillar-num { font-size: 1.4rem; margin-bottom: 10px; }

  /* Scopes (langar) */
  .scope { padding: 20px; }
  .scope h3 { font-size: 1rem; }

  /* Transparency items */
  .transparency { gap: 18px; margin-top: 24px; }
  .check { width: 30px; height: 30px; font-size: 0.85rem; }
  .transparency-item h4 { font-size: 0.96rem; }
  .transparency-item p { font-size: 0.88rem; }

  /* Update log */
  .update { padding: 14px 16px; }
  .update-date { font-size: 0.72rem; }
  .update p { font-size: 0.92rem; }

  /* Featured visual smaller */
  .featured-visual { font-size: 2.8rem; aspect-ratio: 16 / 9; border-radius: var(--radius-md); }

  /* Stats tighter */
  .stats { gap: 18px; margin-top: 24px; }
  .stat-num { font-size: clamp(2.2rem, 8vw, 3rem); }
  .stat-label { font-size: 0.85rem; }
}

/* Very small phones (≤400px) */
@media (max-width: 400px) {
  h1 { font-size: 1.55rem; }
  h2 { font-size: 1.25rem; }
  section { padding: 24px 14px; }
  .hero { padding: 18px 14px 16px; }
  .nav-inner { padding: 10px 14px; }
  .form { padding: 16px; }
  .featured-project { padding: 16px; }
  .meaning { padding: 18px 16px; }
  .meaning-num { font-size: 2.1rem; }
  .btn { padding: 10px 14px; font-size: 0.84rem; }
  .numeral-stack { max-width: 140px; }
  .section-lead { font-size: 0.92rem; }
  .hero-lead { font-size: 0.9rem; }
}

/* Touch device — larger hit targets */
@media (hover: none) and (pointer: coarse) {
  .btn, .nav-links a, .field input, .field select, .field textarea, button {
    min-height: 44px;
  }
  .nav-links a { padding: 14px 8px; }
  .menu-toggle { padding: 12px; font-size: 1.7rem; }
  /* Disable hover transforms that feel laggy on touch */
  .card:hover, .scope:hover, .pillar:hover, .tier:hover, .meaning:hover, .project-card:hover {
    transform: none;
  }
}

/* Landscape phones — reduce hero height */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { padding: 20px 24px; }
  .numeral-stack { max-width: 180px; }
}

/* ─── CATEGORY PROGRESS (per CSI division) ─── */
.cat-progress-list { display: grid; gap: 10px; margin-top: 16px; }
.cat-progress {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}
.cat-progress-complete    { border-left: 4px solid var(--sage); }
.cat-progress-in-progress { border-left: 4px solid var(--saffron); }
.cat-progress-not-started { border-left: 4px solid var(--cream-deep); opacity: 0.85; }
.cat-progress-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.cat-progress-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex: none;
}
.cat-progress-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cat-progress-name { font-family: var(--font-display); font-size: 1.05rem; color: var(--charcoal); line-height: 1.1; }
.cat-progress-sub  { font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); letter-spacing: 0.06em; }
.cat-progress-counts {
  font-size: 0.78rem; color: var(--brown);
  font-weight: 500; white-space: nowrap;
}
.cat-progress-paid {
  font-family: var(--font-display); font-size: 1.1rem;
  color: var(--saffron-deep); font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cat-progress-bar {
  height: 8px;
  background: var(--cream-deep);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
}
.cat-progress-bar > div { height: 100%; transition: width 0.6s ease; }
.cat-progress-legend {
  display: flex; gap: 18px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 0.78rem; color: var(--muted);
}
.cat-progress-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

/* ─── FOLDER CARDS (Work & Records grouped by CSI division) ─── */
.folder-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.folder-card.expanded { border-color: var(--saffron); box-shadow: var(--shadow-sm); }
.folder-summary {
  display: flex; width: 100%;
  background: transparent; border: none;
  padding: 16px 20px;
  align-items: center; gap: 14px;
  text-align: left; cursor: pointer;
  font-family: var(--font-body); color: inherit;
  transition: background 0.15s;
}
.folder-summary:hover { background: var(--cream-warm); }
.folder-arrow {
  font-size: 0.7rem;
  color: var(--saffron-deep);
  transition: transform 0.25s;
  flex: none; width: 16px;
}
.folder-card.expanded .folder-arrow { transform: rotate(90deg); }
.folder-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  flex: none;
}
.folder-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.folder-name-row { display: flex; align-items: baseline; gap: 12px; justify-content: space-between; }
.folder-name { font-family: var(--font-display); font-size: 1.2rem; color: var(--charcoal); }
.folder-pct { font-family: var(--font-display); font-size: 0.95rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.folder-bar {
  height: 5px;
  background: var(--cream-deep);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
}
.folder-bar > div { height: 100%; transition: width 0.6s ease; }
.folder-bar-complete { background: var(--sage); }
.folder-bar-active   { background: var(--saffron); }
.folder-bar-review   { background: var(--terracotta); opacity: 0.55; }
.folder-meta { font-size: 0.78rem; color: var(--muted); }
.folder-money {
  display: flex; flex-direction: column; gap: 4px;
  white-space: nowrap;
  text-align: right;
}
.folder-money-row {
  display: flex; align-items: baseline; gap: 8px; justify-content: flex-end;
  font-variant-numeric: tabular-nums;
}
.folder-money-row .lab {
  font-size: 0.66rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.folder-money-row strong {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--charcoal);
}
.folder-money-row .paid-val { color: var(--saffron-deep); }
.paid-val { color: var(--saffron-deep) !important; }
.folder-body {
  border-top: 1px solid var(--line);
  background: var(--cream-warm);
}
.folder-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.folder-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.9rem; min-width: 720px;
}
.folder-table th {
  background: var(--cream-deep);
  font-size: 0.68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 10px 14px; text-align: left;
  color: var(--charcoal);
}
.folder-table th.num, .folder-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.folder-row {
  cursor: pointer;
  transition: background 0.12s;
}
.folder-row:hover { background: var(--cream); }
.folder-row.expanded { background: var(--cream); }
.folder-row td {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  color: var(--brown);
}
.folder-row strong { color: var(--charcoal); }
.row-arrow {
  color: var(--saffron-deep);
  font-size: 0.7rem;
  transition: transform 0.2s;
  display: inline-block;
}
.folder-row.expanded .row-arrow { transform: rotate(90deg); }
.folder-li-count {
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: 8px;
  font-weight: 500;
}
.folder-status-badge {
  display: inline-block;
  font-size: 0.66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 3px 9px; border-radius: 4px;
  background: var(--cream-deep); color: var(--brown);
}
.folder-status-badge.st-awarded   { background: var(--sage);        color: var(--cream); }
.folder-status-badge.st-active    { background: var(--saffron);     color: var(--cream); }
.folder-status-badge.st-complete  { background: var(--sage-deep);   color: var(--cream); }
.folder-status-badge.st-review    { background: var(--terracotta);  color: var(--cream); }
.folder-status-badge.st-cancelled { background: rgba(31,27,22,0.2); color: var(--brown); }

.folder-row-detail td {
  background: var(--cream-warm);
  padding: 18px 22px;
  border-top: 1px solid var(--saffron);
}
.muted { color: var(--muted); }

@media (max-width: 640px) {
  .cat-progress-head { gap: 10px; }
  .cat-progress-name { font-size: 0.96rem; }
  .cat-progress-counts { font-size: 0.7rem; flex-basis: 100%; order: 3; margin-top: 4px; }
  .cat-progress-paid { font-size: 0.96rem; }
  .folder-summary { padding: 14px 16px; gap: 10px; }
  .folder-name { font-size: 1rem; }
  .folder-meta { font-size: 0.72rem; }
  .folder-paid { font-size: 0.98rem; }
}

/* ─── BIDS SECTION (transparency log) ─── */
.bids-section-list { display: grid; gap: 14px; margin-top: 14px; }
.bids-section-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 22px;
}
.bids-section-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px; margin-bottom: 12px; flex-wrap: wrap;
}
.bids-section-titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bids-section-cat {
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.bids-section-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--charcoal);
  margin: 0;
  line-height: 1.2;
}
.bids-section-count {
  font-size: 0.78rem; color: var(--muted);
  font-weight: 500; white-space: nowrap;
}
.bids-section-decision {
  background: rgba(107, 122, 92, 0.08);
  border-left: 3px solid var(--sage);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--brown);
  margin-bottom: 12px;
}
.bids-section-decision strong { color: var(--sage-deep); }
.bids-section-table-wrap {
  background: var(--cream-warm);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.bids-section-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.88rem; min-width: 540px;
}
.bids-section-table th {
  background: var(--cream-deep);
  font-size: 0.66rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 9px 12px; text-align: left;
  color: var(--charcoal);
}
.bids-section-table th.num, .bids-section-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.bids-section-table td { padding: 9px 12px; border-top: 1px solid var(--line); color: var(--brown); }
.bids-section-table tr.bid-selected { background: rgba(107, 122, 92, 0.06); }
.bids-section-table tr.bid-declined { opacity: 0.6; }
.bid-notes-cell { font-style: italic; color: var(--muted); }

/* ─── VENDORS GRID ─── */
.vendors-toolbar {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 14px 0 14px;
}
.vendors-toolbar .chip { padding: 7px 14px; font-size: 0.85rem; }
.chip-count {
  display: inline-block;
  margin-left: 6px;
  background: rgba(31, 27, 22, 0.1);
  color: inherit;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.chip.active .chip-count { background: rgba(250, 244, 230, 0.25); }
.vendor-card-vendor .vendor-card-avatar { background: linear-gradient(135deg, var(--saffron-light), var(--saffron-deep)); }
.vendor-card-donor  .vendor-card-avatar { background: linear-gradient(135deg, var(--sage), var(--sage-deep)); }
.vendor-card-mixed  .vendor-card-avatar { background: linear-gradient(135deg, var(--terracotta), var(--saffron-deep)); }
.vendors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.vendor-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body); color: inherit;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}
.vendor-card:hover { border-color: var(--saffron); background: var(--cream-warm); transform: translateY(-1px); }
.vendor-card-avatar {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--saffron-light), var(--saffron-deep));
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.vendor-card-info { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vendor-card-name {
  font-weight: 600; color: var(--charcoal); font-size: 0.96rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vendor-card-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.vendor-paid-tag, .vendor-in-tag, .vendor-quoted-tag {
  font-size: 0.68rem; font-weight: 600;
  padding: 2px 7px; border-radius: 4px;
  white-space: nowrap;
}
.vendor-paid-tag   { background: rgba(140, 90, 24, 0.12); color: var(--saffron-deep); }
.vendor-in-tag     { background: rgba(107, 122, 92, 0.15); color: var(--sage-deep); }
.vendor-quoted-tag { background: rgba(164, 84, 58, 0.12); color: var(--terracotta); }
.vendor-card-sub { font-size: 0.74rem; color: var(--muted); }
.vendor-card-arrow { color: var(--saffron-deep); font-size: 1.2rem; flex: none; }

@media (max-width: 640px) {
  .folder-name-row { flex-direction: column; gap: 4px; }
  .folder-money { text-align: left; margin-top: 6px; }
  .folder-money-row { justify-content: flex-start; }
}

/* ─── LINE ITEMS TABLE (per work item, material/labor split) ─── */
.li-wrap {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.li-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; min-width: 800px; }
.li-table th {
  background: var(--cream-deep);
  font-size: 0.66rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 9px 12px; text-align: left;
  color: var(--charcoal); border-bottom: 1px solid var(--line);
}
.li-table th.num, .li-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.li-table td { padding: 9px 12px; border-top: 1px solid var(--line); color: var(--brown); }
.li-table tfoot td { background: var(--cream-warm); color: var(--charcoal); border-top: 2px solid var(--saffron); }
.li-date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.li-status {
  display: inline-block; font-size: 0.62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: 4px;
  background: var(--cream-deep); color: var(--brown);
}
.li-paid    .li-status { background: var(--sage);        color: var(--cream); }
.li-donated .li-status { background: var(--sage-deep);   color: var(--cream); }
.li-logged  .li-status { background: var(--saffron);     color: var(--cream); }
.li-quoted  .li-status { background: var(--terracotta);  color: var(--cream); }
.li-pending .li-status { background: var(--cream-deep);  color: var(--brown); }
.li-receipt {
  background: transparent; border: 1px solid var(--saffron);
  color: var(--saffron-deep);
  font-size: 0.78rem; font-weight: 600;
  padding: 4px 10px; border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.li-receipt:hover { background: var(--saffron); color: var(--cream); }
.li-no-receipt { color: var(--muted); font-style: italic; }

/* ─── RECEIPT VIEWER MODAL ─── */
.receipt-overlay {
  position: fixed; inset: 0;
  background: rgba(31, 27, 22, 0.92);
  z-index: 10001;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.receipt-overlay.show { opacity: 1; }
.receipt-modal {
  background: var(--cream);
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  height: 86vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.receipt-overlay.show .receipt-modal { transform: scale(1); }
.receipt-header {
  padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--cream-warm);
  flex: none;
}
.receipt-name {
  flex: 1; font-weight: 600;
  color: var(--charcoal); font-size: 0.94rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.receipt-action {
  padding: 8px 14px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--saffron-deep);
  text-decoration: none;
  font-size: 0.84rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.receipt-action:hover { background: var(--saffron); color: var(--cream); border-color: var(--saffron); }
.receipt-close-btn {
  background: var(--charcoal); color: var(--cream);
  border: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.receipt-close-btn:hover { background: var(--terracotta); }
.receipt-body {
  flex: 1;
  overflow: hidden;
  background: var(--cream-deep);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.receipt-iframe {
  width: 100%; height: 100%;
  border: none; background: white;
}
.receipt-image-wrap {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: #2a2520;
  overflow: auto;
}
.receipt-image-wrap img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  background: white;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
.receipt-placeholder {
  padding: 40px;
  text-align: center;
  max-width: 460px;
}
.receipt-icon-big { font-size: 4.5rem; margin-bottom: 18px; opacity: 0.75; }
.receipt-placeholder-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--charcoal);
  margin-bottom: 10px;
}
.receipt-placeholder p {
  color: var(--brown);
  margin: 12px 0;
  line-height: 1.5;
}
.txn-receipt {
  background: transparent;
  border: 1px solid var(--saffron);
  color: var(--saffron-deep);
  font-family: var(--font-body);
  font-size: 0.78rem; font-weight: 600;
  padding: 4px 10px; border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.txn-receipt:hover { background: var(--saffron); color: var(--cream); }

@media (max-width: 640px) {
  .receipt-modal { height: 90vh; }
  .receipt-header { padding: 12px 14px; gap: 8px; }
  .receipt-name { font-size: 0.86rem; }
  .receipt-action { padding: 7px 11px; font-size: 0.78rem; }
}

/* ──────── DIRECTORY / MAP (embedded on story.html) ──────── */
.directory-section { padding: 60px 24px; }

.directory-toolbar {
  max-width: 1400px;
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}
.directory-toolbar .directory-search { flex: 1; max-width: 480px; }
.directory-toolbar .directory-search input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid rgba(31, 27, 22, 0.14);
  border-radius: 12px;
  background: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
}
.directory-toolbar .directory-search input:focus {
  outline: none; border-color: var(--saffron); background: #fff;
}
.cat-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

/* ──────── DIRECTORY / MAP — common ──────── */
.directory-wrap {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 16px;
  height: 76vh;
  min-height: 560px;
  align-items: stretch;
}
.directory-sidebar {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  height: 100%;
  min-height: 0;
}
.directory-search {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
}
.directory-search input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid rgba(31, 27, 22, 0.14);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--cream);
}
.directory-search input:focus {
  outline: none;
  border-color: var(--saffron);
  background: #fff;
}
.directory-filter-group {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.directory-filter-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 8px;
}
.directory-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  background: var(--cream-warm);
  color: var(--brown);
  border: 1.5px solid transparent;
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chip:hover { background: var(--cream-deep); border-color: var(--saffron); }
.chip.active { color: var(--cream); background: var(--charcoal); border-color: var(--charcoal); }
.chip-project.active { background: var(--terracotta); border-color: var(--terracotta); }
.chip-initiative.active { background: var(--sage-deep); border-color: var(--sage-deep); }
.chip-event.active { background: var(--saffron-deep); border-color: var(--saffron-deep); }
.chip-member.active { background: var(--charcoal); border-color: var(--charcoal); }
.chip-active-toggle.active { background: var(--saffron); border-color: var(--saffron); color: var(--cream); }
.chip .chip-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.chip-project .chip-dot { background: var(--terracotta); }
.chip-initiative .chip-dot { background: var(--sage-deep); }
.chip-event .chip-dot { background: var(--saffron-deep); }
.chip-member .chip-dot { background: var(--charcoal); }
.chip.active .chip-dot { background: var(--cream); }

.directory-counts {
  padding: 10px 16px;
  font-size: 0.78rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: var(--cream-warm);
}

.directory-tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 6px;
  background: var(--cream-warm);
}
.dir-tab {
  background: transparent; border: none;
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}
.dir-tab:hover { color: var(--charcoal); }
.dir-tab.active { color: var(--saffron-deep); border-bottom-color: var(--saffron); }

.dir-pane { display: none; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.dir-pane.active { display: block; }

.directory-list { display: block; }
.dir-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s;
}
.dir-item:hover { background: var(--cream-warm); }
.dir-item-soon { opacity: 0.5; }
.dir-item-soon:hover { opacity: 0.75; background: var(--cream-warm); }
.dir-item-active { border-left: 3px solid var(--saffron); padding-left: 13px; }

.dir-pin {
  flex: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  margin-top: 5px;
}
.dir-item-body { flex: 1; min-width: 0; }
.dir-item-meta {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  margin-bottom: 4px;
}
.dir-item-cat {
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--cream);
}
.dir-cat-project { background: var(--terracotta); }
.dir-cat-initiative { background: var(--sage-deep); }
.dir-cat-event { background: var(--saffron-deep); }
.dir-cat-member { background: var(--charcoal); }

.dir-item-status {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sage-deep);
}
.dir-status-soon { color: var(--muted); }

.dir-item-trade {
  font-size: 0.7rem;
  color: var(--muted);
}

.dir-item-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--charcoal);
  line-height: 1.2;
  margin-bottom: 2px;
}
.dir-item-loc {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}
.dir-empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
  font-style: italic;
  font-size: 0.92rem;
}

/* Calendar pane */
#directory-calendar { padding: 4px 0; }
.cal-event {
  display: flex;
  align-items: stretch;
  gap: 14px;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s;
}
.cal-event:hover { background: var(--cream-warm); }
.cal-soon { opacity: 0.55; }
.cal-soon:hover { opacity: 0.8; }
.cal-active { border-left: 3px solid var(--saffron); padding-left: 13px; }
.cal-date {
  flex: none;
  width: 54px;
  background: var(--cream-warm);
  border-radius: 10px;
  padding: 8px 0;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  border: 1px solid var(--line);
}
.cal-active .cal-date { background: var(--saffron-deep); border-color: var(--saffron-deep); }
.cal-active .cal-month, .cal-active .cal-day { color: var(--cream); }
.cal-date-tbd { background: var(--cream-deep); }
.cal-month {
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.cal-day {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--charcoal);
  line-height: 1;
}
.cal-body { flex: 1; min-width: 0; align-self: center; }
.cal-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--charcoal);
  line-height: 1.2;
  margin-bottom: 2px;
}
.cal-loc {
  font-size: 0.78rem;
  color: var(--muted);
}
.cal-tag {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.popup-soon {
  display: inline-block; margin-left: 6px;
  font-size: 0.62rem; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em;
}

/* Map container */
.directory-map-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  height: 100%;
  min-height: 400px;
  width: 100%;
}
#directory-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--cream-warm);
}
.leaflet-container { font-family: var(--font-body); }
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}
.map-popup { padding: 4px; max-width: 240px; }
.map-popup h4 { font-family: var(--font-display); font-size: 1.1rem; color: var(--charcoal); margin: 6px 0 4px; }
.map-popup .popup-cat {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--cream);
}
.map-popup .popup-project    { background: #a4543a; }
.map-popup .popup-initiative { background: #6b7a5c; }
.map-popup .popup-event      { background: #c8852a; }
.map-popup .popup-member     { background: #1f1b16; }
.map-popup .popup-sub { font-size: 0.85rem; color: var(--muted); margin: 0 0 6px; }
.map-popup .popup-loc { font-size: 0.85rem; color: var(--brown); margin: 4px 0; }
.map-popup p { font-size: 0.88rem; color: var(--brown); margin: 6px 0; }
.map-popup .popup-link {
  display: inline-block;
  margin-top: 8px;
  font-weight: 600;
  color: var(--saffron-deep);
  text-decoration: none;
}
.map-popup .popup-link:hover { color: var(--saffron); }

/* Custom map markers */
.map-pin-wrap { background: transparent !important; border: none !important; }
.map-pin {
  width: 18px; height: 18px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(31, 27, 22, 0.3);
  transition: transform 0.2s;
}
.map-pin-wrap:hover .map-pin { transform: scale(1.4); }

/* Map legend */
.map-legend {
  position: absolute; bottom: 12px; left: 12px;
  background: rgba(250, 244, 230, 0.95);
  backdrop-filter: blur(6px);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  display: flex; gap: 14px; flex-wrap: wrap;
  z-index: 500;
  font-size: 0.78rem; color: var(--charcoal);
  box-shadow: var(--shadow-sm);
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.legend-project    { background: #a4543a; }
.legend-initiative { background: #6b7a5c; }
.legend-event      { background: #c8852a; }
.legend-member     { background: #1f1b16; }

/* Directory mobile — map ABOVE list, both visible without deep scrolling */
@media (max-width: 1024px) {
  .directory-wrap {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    gap: 14px;
  }
  .directory-map-wrap {
    height: 62vh;
    min-height: 420px;
    order: 1; /* Map first on mobile */
  }
  .directory-sidebar {
    max-height: 70vh;
    height: auto;
    order: 2; /* Sidebar second */
  }
  .directory-list { max-height: 320px; }
}
@media (max-width: 640px) {
  .directory-map-wrap {
    height: 55vh;
    min-height: 360px;
  }
  .directory-sidebar { max-height: none; }
  .directory-list { max-height: 280px; }
  .map-legend { font-size: 0.7rem; padding: 8px 10px; gap: 10px; }
}

/* ──────── NEWSLETTER POPUP ──────── */
.newsletter-overlay {
  position: fixed; inset: 0;
  background: rgba(31, 27, 22, 0.62);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade-in 0.3s ease;
}
.newsletter-overlay.show { display: flex; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.newsletter-modal {
  background: var(--cream);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow);
  animation: pop-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes pop-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.newsletter-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--cream-warm);
  border: none;
  font-size: 1.2rem;
  color: var(--brown);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.newsletter-close:hover { background: var(--charcoal); color: var(--cream); }
.newsletter-eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--saffron-deep);
  margin-bottom: 12px;
}
.newsletter-modal h3 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--charcoal);
  margin-bottom: 10px;
  line-height: 1.15;
}
.newsletter-modal h3 em { color: var(--saffron-deep); font-style: italic; }
.newsletter-modal p {
  color: var(--brown);
  margin-bottom: 18px;
  font-size: 0.96rem;
}
.newsletter-form { display: grid; gap: 12px; }
.newsletter-form input {
  padding: 13px 16px;
  border: 1.5px solid rgba(31, 27, 22, 0.14);
  background: var(--cream);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--charcoal);
}
.newsletter-form input:focus {
  outline: none;
  border-color: var(--saffron);
  background: #fff;
}
.newsletter-form button {
  padding: 14px;
  background: var(--charcoal);
  color: var(--cream);
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.newsletter-form button:hover { background: var(--saffron-deep); }
.newsletter-form button:disabled { opacity: 0.7; cursor: not-allowed; }
.newsletter-success {
  padding: 16px;
  background: var(--sage);
  color: var(--cream);
  border-radius: 12px;
  font-weight: 600;
  text-align: center;
}
.newsletter-error {
  padding: 12px;
  background: #c0392b;
  color: var(--cream);
  border-radius: 12px;
  font-size: 0.88rem;
  text-align: center;
}
.newsletter-skip {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  margin-top: 6px;
  text-decoration: underline;
}
@media (max-width: 540px) {
  .newsletter-modal { padding: 28px 22px; }
  .newsletter-modal h3 { font-size: 1.4rem; }
}
