:root {
  --ink: #050505;
  --brown: #514332;
  --cream: #f4d8a4;
  --paper: #fff9f0;
  --blue: #bfe4f2;
  --blue-strong: #78c9e8;
  --teal: #2f7777;
  --teal-soft: #d6eeee;
  --orange: #e79032;
  --coral: #d95b3e;
  --pink: #e98aa8;
  --navy: #102f46;
  --white: #fff;
  --line: #ded7cc;
  --shadow: 0 18px 50px rgba(64, 46, 28, .1);
  --radius: 24px;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: var(--paper); color: var(--ink); line-height: 1.55; overflow-x: hidden; }
body.drawer-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
[hidden], .route-marker { display: none !important; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 1000; top: 1rem; left: 1rem; padding: .75rem 1rem; border-radius: 12px; background: var(--ink); color: white; font-weight: 800; transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.prototype-strip { min-height: 34px; display: flex; align-items: center; justify-content: center; gap: .65rem; padding: .3rem 1rem; background: var(--ink); color: white; text-align: center; font-size: .72rem; }
.prototype-strip strong { color: var(--cream); letter-spacing: .06em; text-transform: uppercase; }
.public-header { min-height: 92px; position: sticky; top: 0; z-index: 100; display: flex; align-items: center; gap: 1.2rem; padding: .75rem clamp(1rem, 3vw, 3.5rem); background: rgba(255,249,240,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.public-brand, .portal-brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.public-brand img { width: 66px; height: 60px; object-fit: contain; }
.public-brand span, .portal-brand span { display: grid; line-height: 1.15; }
.public-brand strong { font-size: 1rem; }
.public-brand small { margin-top: .25rem; color: var(--brown); font-size: .68rem; letter-spacing: .05em; }
.public-nav { margin-left: auto; display: flex; align-items: center; justify-content: flex-end; gap: .15rem; }
.public-nav a { min-height: 44px; display: inline-flex; align-items: center; padding: .55rem .7rem; border-radius: 999px; text-decoration: none; font-size: .78rem; font-weight: 750; white-space: nowrap; }
.public-nav a:hover, .public-nav a[aria-current="page"] { background: var(--teal-soft); color: #174d4d; }
.public-nav .nav-donate { background: var(--coral); color: white; }
.public-nav .nav-portal { margin-left: .2rem; border: 1px solid var(--teal); color: var(--teal); }
.menu-toggle { display: none; min-height: 44px; align-items: center; gap: .45rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 12px; background: white; font-weight: 800; }
.menu-icon { width: 20px; height: 14px; position: relative; border-block: 2px solid; }
.menu-icon::after { content: ""; position: absolute; inset: 5px 0 auto; border-top: 2px solid; }
.drawer-overlay { position: fixed; inset: 126px 0 0; z-index: 108; background: rgba(5,5,5,.42); }
.public-main { min-height: calc(100vh - 126px); }
.page { display: none; }
.page.is-active { display: block; animation: enter .35s ease both; }
.public-page { max-width: 1480px; margin: 0 auto; padding: clamp(1rem, 3vw, 3rem); }
.public-page > * + * { margin-top: clamp(1.2rem, 3vw, 2.5rem); }
.eyebrow { margin: 0 0 .5rem; color: var(--teal); font-size: .72rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; padding: .72rem 1rem; border: 1px solid transparent; border-radius: 13px; text-decoration: none; font-weight: 850; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(36, 29, 22, .14); }
.button.primary { background: var(--coral); border-color: #bc4933; color: white; }
.button.secondary { background: white; border-color: var(--line); }
.button.light { background: var(--paper); color: var(--ink); }
.button.outline-light { border-color: rgba(255,255,255,.7); color: white; }
.button.compact { min-height: 42px; padding: .55rem .8rem; font-size: .78rem; }
.button-row { display: flex; flex-wrap: wrap; gap: .7rem; }
.public-hero { min-height: 610px; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: clamp(1rem, 4vw, 4rem); overflow: hidden; padding: clamp(1.4rem, 5vw, 5.5rem); border-radius: 36px; background: linear-gradient(130deg, #fff 5%, #fdf1d9 50%, #dff4f5 100%); box-shadow: var(--shadow); }
.hero-copy h1, .page-hero h1 { margin: .55rem 0 .85rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.8rem, 6vw, 6.2rem); line-height: .94; letter-spacing: -.045em; }
.hero-lead { max-width: 720px; color: var(--brown); font-size: clamp(1rem, 1.6vw, 1.25rem); font-weight: 600; }
.hero-copy .button-row { margin-top: 1.5rem; }
.governing-principle { max-width: 680px; margin: 1.5rem 0 0; padding-left: 1rem; border-left: 4px solid var(--orange); color: var(--brown); font-size: .88rem; font-weight: 700; }
.hero-art { min-width: 0; position: relative; }
.hero-art::before { content: ""; position: absolute; inset: -8% 3% 8% -5%; border-radius: 48% 52% 45% 55%; background: var(--blue-strong); opacity: .45; transform: rotate(-5deg); }
.hero-art img { position: relative; z-index: 1; width: 100%; border-radius: 44% 56% 46% 54%; filter: drop-shadow(0 24px 28px rgba(47,119,119,.2)); }
.section-shell, .page-hero, .donation-preview, .inventory-toolbar, .field-disclosure, .privacy-panel { padding: clamp(1.25rem, 3vw, 2.6rem); border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.intro-section { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: 2rem; background: var(--teal); color: white; }
.intro-section .eyebrow { color: var(--cream); }
.intro-section h2, .section-heading h2, .split-feature h2, .contact-invitation h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.8rem, 3.5vw, 3.3rem); line-height: 1.05; }
.intro-section > p { font-size: 1.05rem; }
.section-heading { max-width: 850px; margin-bottom: 1.3rem; }
.section-heading p:last-child { color: var(--brown); }
.pathway-grid, .program-grid, .help-grid, .story-grid, .supporter-grid, .role-card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
.pathway-grid a, .program-grid article, .help-grid article, .story-grid article, .supporter-grid article, .role-card-grid article { min-width: 0; padding: 1.2rem; border: 1px solid var(--line); border-radius: 18px; background: white; text-decoration: none; box-shadow: 0 8px 24px rgba(64,46,28,.06); }
.pathway-grid a { min-height: 190px; display: flex; flex-direction: column; gap: .55rem; }
.pathway-grid a > span, .program-grid article > span { color: var(--coral); font-size: 1.55rem; }
.pathway-grid strong { margin-top: auto; font-size: 1.05rem; }
.pathway-grid small, .program-grid p, .help-grid p, .story-grid p { color: var(--brown); }
.public-governance { display: none; background: #eefafa; }
.public-stage-path, .inventory-flow { display: grid; grid-template-columns: repeat(10, minmax(96px, 1fr)); gap: .45rem; margin: 0; padding: 0; list-style: none; overflow-x: auto; }
.public-stage-path li, .inventory-flow li { min-height: 88px; display: grid; align-content: center; gap: .2rem; position: relative; padding: .65rem; border-radius: 14px; background: white; border: 1px solid #cfe4e4; font-size: .7rem; font-weight: 800; }
.public-stage-path li span { color: var(--teal); font-size: .62rem; }
.public-stage-path li:not(:last-child)::after { content: "→"; position: absolute; right: -.38rem; top: 36%; z-index: 2; color: var(--teal); }
.split-feature { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.split-feature > div { min-height: 300px; padding: clamp(1.3rem, 3vw, 2.5rem); border-radius: var(--radius); }
.split-feature > div:first-child { background: var(--cream); }
.split-feature > div:last-child { background: var(--blue); }
.text-link { font-weight: 900; text-underline-offset: 4px; }
.contact-invitation { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: clamp(1.5rem, 4vw, 3.5rem); border-radius: var(--radius); background: var(--coral); color: white; }
.contact-invitation .eyebrow { color: var(--cream); }
.page-hero { padding-block: clamp(2rem, 6vw, 5rem); background: linear-gradient(130deg, white, #f9ead0); }
.page-hero h1 { max-width: 1050px; font-size: clamp(2.5rem, 5.2vw, 5.3rem); }
.page-hero > p:last-child { max-width: 820px; color: var(--brown); font-size: 1.05rem; }
.story-grid { grid-template-columns: repeat(3,1fr); }
.story-grid article > span, .supporter-grid article > span, .role-card-grid article > span { color: var(--teal); font-size: .7rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.story-grid h2, .program-grid h2, .help-grid h2 { margin: .6rem 0; }
blockquote { margin: 0; padding: clamp(1.5rem, 5vw, 4rem); border-radius: var(--radius); background: var(--teal); color: white; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.4rem, 3vw, 2.7rem); text-align: center; }
.program-grid { grid-template-columns: repeat(3,1fr); }
.program-grid article strong { color: var(--teal); font-size: .7rem; text-transform: uppercase; }
.help-grid { grid-template-columns: repeat(4,1fr); }
.help-grid article { display: flex; flex-direction: column; }
.help-grid a { margin-top: auto; font-weight: 850; }
.truth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.truth-grid article { padding: 1.5rem; border-radius: var(--radius); background: var(--teal); color: white; }
.truth-grid article:last-child { background: var(--navy); }
.truth-grid > article > span { color: var(--cream); font-size: .72rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.truth-grid ol { padding-left: 1.2rem; }
.truth-grid li { padding: .32rem; }
.privacy-panel { background: var(--blue); }
.donation-options { display: grid; grid-template-columns: repeat(4,1fr); gap: .6rem; }
.donation-options button { min-height: 54px; padding: .7rem; border: 1px solid var(--line); border-radius: 14px; background: white; font-weight: 850; cursor: pointer; }
.donation-options button:hover, .donation-options button.is-selected { border-color: var(--teal); background: var(--teal); color: white; }
.donation-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.prototype-form, .donation-preview form { display: grid; gap: .9rem; }
.prototype-form label, .donation-preview label { display: grid; gap: .35rem; font-size: .82rem; font-weight: 800; }
.prototype-form input, .prototype-form select, .prototype-form textarea, .donation-preview select, .inventory-toolbar input { width: 100%; min-height: 46px; padding: .7rem; border: 1px solid #a9aaa8; border-radius: 10px; background: white; }
.consent { grid-template-columns: auto 1fr !important; align-items: start; }
.consent input { width: 22px; min-height: 22px; accent-color: var(--teal); }
.form-status { min-height: 1.4rem; margin: 0; font-size: .8rem; font-weight: 800; }
.form-status.success { color: var(--teal); }
.form-status.error { color: #a43525; }
.inventory-flow { grid-template-columns: repeat(9, minmax(125px,1fr)); }
.inventory-toolbar { display: grid; grid-template-columns: .7fr 1fr; gap: 1rem; align-items: end; }
.inventory-toolbar h2 { margin: 0; }
.inventory-toolbar label { display: grid; gap: .35rem; font-size: .78rem; font-weight: 800; }
.inventory-toolbar fieldset, #inventory-result-status { grid-column: 1 / -1; }
fieldset { margin: 0; padding: 0; border: 0; }
legend { margin-bottom: .45rem; font-weight: 850; }
.filter-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.filter-chips button { min-height: 44px; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: white; font-weight: 800; cursor: pointer; }
.filter-chips button.is-active { background: var(--navy); border-color: var(--navy); color: white; }
#inventory-result-status { margin: 0; color: var(--brown); font-size: .78rem; }
.inventory-records { display: grid; grid-template-columns: repeat(3,1fr); gap: .9rem; }
.inventory-record { padding: 1.15rem; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: var(--shadow); }
.inventory-record[hidden] { display: none; }
.record-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.record-head > strong { color: var(--brown); font-size: .68rem; }
.inventory-record h2 { font-size: 1.15rem; }
.inventory-record dl, .supporter-grid dl { margin: 0; }
.inventory-record dl div, .supporter-grid dl div { display: grid; grid-template-columns: .8fr 1.2fr; gap: .5rem; padding: .45rem 0; border-top: 1px solid var(--line); }
dt { color: var(--brown); font-size: .65rem; font-weight: 900; text-transform: uppercase; }
dd { margin: 0; font-size: .76rem; font-weight: 700; }
.empty-state { padding: 2rem; border: 1px dashed var(--brown); border-radius: var(--radius); background: white; text-align: center; }
.field-disclosure summary { cursor: pointer; font-weight: 850; }
.supporter-grid { grid-template-columns: repeat(3,1fr); }
.supporter-mark { width: 62px; height: 62px; display: grid; place-items: center; margin: 1rem 0; border-radius: 20px; background: var(--teal-soft); color: var(--teal); font-size: 1.8rem; }
.recognition-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.recognition-rules > div { padding: 1.4rem; border-radius: var(--radius); background: var(--cream); }
.recognition-rules > div:last-child { background: #f7dfe6; }
.contact-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 1rem; }
.connection-card, .prototype-form { padding: 1.3rem; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.connection-card > a { min-height: 44px; display: flex; align-items: center; border-bottom: 1px solid var(--line); font-weight: 800; }
.social-states { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1.2rem; }
.social-states button { min-height: 62px; display: grid; place-items: center; border: 1px dashed #aaa39a; border-radius: 12px; background: #f4f1ed; color: #5d5a55; font-weight: 800; opacity: 1; }
.social-states small { font-size: .62rem; font-weight: 600; }
.status { width: fit-content; display: inline-flex; padding: .3rem .55rem; border-radius: 999px; font-size: .6rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.status.future { background: #e5eefc; color: #28578f; }
.status.decision { background: #f9dfe8; color: #7c2944; }
.status.illustrative { background: #fff0d9; color: #704615; }
.public-footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem; padding: 2.5rem clamp(1rem, 3vw, 3.5rem); background: #f5e4c8; border-top: 1px solid var(--line); font-size: .76rem; }
.public-footer > div { display: flex; align-items: center; gap: .7rem; }
.public-footer img { width: 62px; }
.public-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; }
.public-footer nav a { font-weight: 800; }
.public-footer > p { text-align: right; }

.portal-page { min-height: calc(100vh - 34px); background: #f3f7fa; }
.portal-header { min-height: 92px; position: sticky; top: 34px; z-index: 100; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 1rem; padding: .7rem 1.2rem; background: white; border-bottom: 1px solid #d9e2e9; }
.portal-brand img { width: 56px; height: 52px; object-fit: contain; }
.portal-brand small { color: #687985; }
.portal-context { text-align: center; }
.portal-context p, .portal-context h1 { margin: 0; }
.portal-context p { color: var(--teal); font-size: .66rem; font-weight: 900; text-transform: uppercase; }
.portal-context h1 { font-size: 1.3rem; }
.portal-shell { min-height: calc(100vh - 126px); display: grid; grid-template-columns: 280px minmax(0,1fr); }
.portal-sidebar { position: sticky; top: 126px; height: calc(100vh - 126px); display: flex; flex-direction: column; overflow-y: auto; background: var(--blue-strong); color: var(--navy); }
.portal-role-summary { display: grid; gap: .3rem; padding: 1.2rem; border-bottom: 1px solid rgba(16,47,70,.18); }
.portal-role-summary span { color: var(--navy); font-size: .65rem; font-weight: 900; text-transform: uppercase; }
.portal-role-summary small { color: var(--navy); overflow-wrap: anywhere; }
.portal-module-nav { padding: .7rem; }
.portal-module-nav p { margin: .7rem; color: var(--navy); font-size: .62rem; font-weight: 900; text-transform: uppercase; }
.portal-module-nav a, .portal-module-nav button { width: 100%; min-height: 44px; display: flex; align-items: center; padding: .65rem .75rem; border: 0; border-radius: 10px; background: transparent; color: var(--navy); text-decoration: none; text-align: left; font-size: .82rem; font-weight: 750; cursor: pointer; }
.portal-module-nav a:hover, .portal-module-nav button:hover, .portal-module-nav [aria-current="page"] { background: rgba(255,255,255,.78); color: var(--navy); box-shadow: inset 3px 0 var(--orange); }
.portal-boundary { margin: auto .8rem .8rem; padding: .8rem; border: 1px solid rgba(16,47,70,.18); border-radius: 12px; background: rgba(255,255,255,.38); }
.portal-boundary p { margin: .35rem 0 0; color: var(--navy); font-size: .7rem; }
.portal-workspace { min-width: 0; padding: 1.2rem clamp(.8rem, 2.4vw, 2.3rem) 2rem; }
.portal-disclosure { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; padding: .65rem .85rem; border: 1px solid #e2c38d; border-radius: 12px; background: #fff4df; color: #5d472b; font-size: .78rem; }
.governance-workspace, .portal-content, .module-panel { min-width: 0; padding: 1rem; border: 1px solid #d9e2e9; border-radius: 18px; background: white; box-shadow: 0 12px 34px rgba(16,47,70,.08); }
.management-path { display: grid; grid-template-columns: repeat(10,minmax(96px,1fr)); gap: .35rem; overflow-x: auto; }
.management-step { min-height: 76px; display: grid; align-content: center; gap: .05rem; border: 1px solid #d9e2e9; border-radius: 10px; background: #f4f7fb; padding: .4rem; text-align: left; cursor: pointer; }
.management-step span { color: var(--teal); font-size: .58rem; font-weight: 900; }
.management-step strong { font-size: .68rem; }
.management-step small { color: #657786; font-size: .58rem; }
.management-step:hover, .management-step.is-active { background: var(--navy); border-color: var(--navy); color: white; }
.management-step.is-active small, .management-step.is-active span { color: var(--cream); }
.stage-panel { display: grid; grid-template-columns: auto minmax(180px,.6fr) minmax(250px,1fr); align-items: center; gap: 1rem; margin-top: .7rem; padding: .75rem; border-radius: 12px; background: var(--teal-soft); }
.stage-panel h3, .stage-panel p { margin: 0; }
.stage-panel p { color: #3e6161; font-size: .75rem; }
#stage-number { color: var(--teal); font-size: .65rem; font-weight: 900; text-transform: uppercase; }
.portal-content { margin-top: 1rem; }
.portal-page-heading h2 { max-width: 850px; margin: .5rem 0; font-size: clamp(1.8rem,3.5vw,3.2rem); line-height: 1.05; }
.portal-page-heading > p:last-child { max-width: 800px; color: #647381; }
.role-card-grid { margin-top: 1rem; }
.role-card-grid article { display: flex; flex-direction: column; }
.role-card-grid .button { margin-top: auto; }
.role-overview { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 1rem; }
.role-overview h2 { margin: .35rem 0; }
.role-overview p { color: #647381; }
.role-selector { display: flex; flex-wrap: wrap; gap: .4rem; }
.role-selector a { min-height: 44px; display: inline-flex; align-items: center; padding: .55rem .7rem; border: 1px solid #d9e2e9; border-radius: 10px; background: white; text-decoration: none; font-size: .74rem; font-weight: 800; }
.metric-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: .7rem; margin-top: 1rem; }
.metric-grid article { padding: .9rem; border-radius: 12px; background: #f4f7fb; }
.metric-grid strong { display: block; color: var(--teal); font-size: 1.25rem; }
.metric-grid span { color: #647381; font-size: .68rem; font-weight: 750; }
.module-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: .8rem; margin-top: 1rem; }
.module-panel h3 { margin-top: 0; }
.module-panel p, .module-panel li { color: #526979; font-size: .8rem; }
.module-panel.wide { grid-column: 1 / -1; }
.workflow-compact { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.workflow-compact li { padding: .45rem .6rem; border-radius: 999px; background: var(--teal-soft); color: #245d5d; font-weight: 800; }
.data-table-wrap { width: 100%; min-width: 0; overflow-x: auto; }
.data-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: .72rem; }
.data-table th, .data-table td { padding: .65rem; border-bottom: 1px solid #d9e2e9; text-align: left; }
.data-table th { color: #526979; font-size: .62rem; text-transform: uppercase; }
.owner-reference { padding: .8rem; border-radius: 10px; background: #fff4df; }
.owner-reference summary { cursor: pointer; font-weight: 850; }
.owner-reference p { margin-bottom: 0; }
.evidence-bar { position: sticky; bottom: 0; z-index: 90; background: #0c202f; color: white; box-shadow: 0 -8px 24px rgba(16,47,70,.16); }
#evidence-toggle { display: none; width: 100%; min-height: 52px; align-items: center; justify-content: space-between; border: 0; background: transparent; color: white; padding: .65rem 1rem; text-align: left; }
#evidence-toggle span:first-child { display: grid; }
#evidence-toggle small { color: rgba(255,255,255,.6); }
#evidence-content dl { min-height: 70px; margin: 0; display: grid; grid-template-columns: repeat(8,1fr); align-items: center; }
#evidence-content dl div { padding: .5rem .7rem; border-right: 1px solid rgba(255,255,255,.12); }
#evidence-content dt { color: var(--cream); font-size: .54rem; }
#evidence-content dd { margin-top: .2rem; font-size: .66rem; overflow-wrap: anywhere; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 1280px) {
  .public-nav a { padding-inline: .48rem; font-size: .72rem; }
  .public-stage-path { grid-template-columns: repeat(10, 112px); }
  .management-path { grid-template-columns: repeat(10,112px); }
  .help-grid, .pathway-grid { grid-template-columns: repeat(2,1fr); }
  .metric-grid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 1024px) {
  .public-header { justify-content: space-between; }
  .public-header .menu-toggle, .portal-menu-toggle { display: inline-flex; }
  .public-nav { position: fixed; z-index: 110; top: 126px; right: 0; bottom: 0; width: min(88vw,360px); display: none; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: .25rem; padding: 1rem; overflow-y: auto; background: var(--paper); box-shadow: -18px 0 40px rgba(5,5,5,.2); }
  .public-nav[data-open="true"] { display: flex; }
  .public-nav a { justify-content: flex-start; padding: .7rem; }
  .portal-shell { display: block; }
  .portal-sidebar { position: fixed; z-index: 110; top: 126px; left: 0; bottom: 0; width: min(86vw,300px); height: auto; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 18px 0 40px rgba(5,20,32,.22); }
  .portal-sidebar[data-open="true"] { transform: none; }
  .portal-overlay { inset: 126px 0 0; }
  .portal-workspace { padding: 1rem; }
  #evidence-toggle { display: flex; }
  #evidence-content { display: none; }
  .evidence-bar.is-expanded #evidence-content { display: block; }
  #evidence-content dl { grid-template-columns: repeat(4,1fr); }
  .public-footer { grid-template-columns: 1fr; text-align: center; }
  .public-footer > div, .public-footer nav { justify-content: center; }
  .public-footer > p { text-align: center; }
}
@media (max-width: 768px) {
  .prototype-strip { min-height: 42px; flex-direction: column; gap: 0; }
  .public-header, .portal-header { top: 42px; min-height: 84px; }
  .public-brand img { width: 56px; height: 52px; }
  .public-nav, .portal-sidebar { top: 126px; }
  .drawer-overlay { inset: 126px 0 0; }
  .public-hero { min-height: auto; grid-template-columns: 1fr; padding: 1.4rem; }
  .hero-copy h1 { font-size: clamp(2.6rem, 12vw, 4.2rem); }
  .hero-art { max-width: 500px; margin: 0 auto; }
  .intro-section, .split-feature, .truth-grid, .donation-preview, .recognition-rules, .contact-layout { grid-template-columns: 1fr; }
  .contact-invitation { align-items: flex-start; flex-direction: column; }
  .program-grid, .story-grid, .supporter-grid, .inventory-records { grid-template-columns: 1fr; }
  .inventory-toolbar { grid-template-columns: 1fr; }
  .inventory-toolbar fieldset, #inventory-result-status { grid-column: 1; }
  .portal-header { grid-template-columns: auto 1fr auto; padding: .6rem .7rem; }
  .portal-context { display: none; }
  .portal-header > .button { font-size: 0; }
  .portal-header > .button::after { content: "Public site"; font-size: .72rem; }
  .stage-panel { grid-template-columns: 1fr 1fr; }
  .stage-panel > p { grid-column: 1 / -1; }
  .role-card-grid, .module-grid { grid-template-columns: 1fr; }
  .module-panel.wide { grid-column: auto; }
  .role-overview { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 520px) {
  .public-brand small { display: none; }
  .public-page { padding: .7rem; }
  .public-hero, .section-shell, .page-hero, .donation-preview, .inventory-toolbar, .field-disclosure { border-radius: 18px; }
  .pathway-grid, .help-grid, .donation-options { grid-template-columns: 1fr; }
  .social-states { grid-template-columns: 1fr; }
  .record-head { align-items: flex-start; flex-direction: column; }
  .inventory-record dl div { grid-template-columns: 1fr; gap: .1rem; }
  .portal-brand strong { font-size: .8rem; }
  .portal-brand small { font-size: .62rem; }
  .stage-panel { grid-template-columns: 1fr; }
  .stage-panel > p { grid-column: auto; }
  #evidence-content dl { grid-template-columns: repeat(2,1fr); }
}

/* P004 governed Marketplace and private CRM */
.p004-surface { min-height: calc(100vh - 126px); background: #f3f7fa; }
.p004-surface:not(.is-private) { padding: clamp(1rem,3vw,3rem); background: var(--paper); }
.marketplace-page, .privacy-page { width: min(1240px,100%); margin: 0 auto; }
.marketplace-hero { display: flex; align-items: end; justify-content: space-between; gap: 2rem; padding: clamp(1.4rem,4vw,3.4rem); border-radius: var(--radius); background: var(--blue); color: var(--navy); }
.marketplace-hero h1, .privacy-page h1 { max-width: 760px; margin: .3rem 0; font-family: Georgia,"Times New Roman",serif; font-size: clamp(2.2rem,5vw,4.5rem); line-height: .98; }
.marketplace-disclosure { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem 1.5rem; margin: 1rem 0; padding: .75rem 1rem; border: 1px solid #d3a65f; border-radius: 12px; background: #fff4df; color: #5d472b; font-size: .7rem; font-weight: 850; text-align: center; }
.marketplace-toolbar, .crm-toolbar { display: grid; grid-template-columns: 1.5fr repeat(5,minmax(120px,1fr)) auto; align-items: end; gap: .6rem; margin: 1rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: 16px; background: white; }
.marketplace-toolbar label, .crm-toolbar label, .crm-form label { display: grid; gap: .3rem; color: var(--navy); font-size: .68rem; font-weight: 850; }
.marketplace-toolbar input, .marketplace-toolbar select, .crm-toolbar input, .crm-toolbar select, .crm-form input, .crm-form select, .crm-form textarea { width: 100%; min-height: 42px; padding: .55rem .65rem; border: 1px solid #9cabb5; border-radius: 9px; background: white; color: var(--navy); }
.listing-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin-top: 1rem; }
.listing-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 12px 30px rgba(16,47,70,.08); }
.listing-card > div:last-child { padding: 1rem; }
.listing-card h2 { margin: .25rem 0; font-size: 1.25rem; }
.listing-card p { color: #526979; }
.listing-image-placeholder { min-height: 190px; display: grid; place-items: center; background: var(--blue); color: var(--navy); font-size: 1.5rem; font-weight: 900; letter-spacing: .15em; }
.listing-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.listing-card-footer > strong, .listing-price { color: var(--navy); font-size: 1.35rem; }
.listing-facts { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; }
.listing-facts div { display: grid; }
.listing-facts dt { color: #647381; font-size: .62rem; font-weight: 850; text-transform: uppercase; }
.listing-facts dd { color: var(--navy); }
.status.available { background: #dff4df; color: #245829; }
.listing-detail { display: grid; grid-template-columns: minmax(300px,.85fr) minmax(0,1.15fr); gap: clamp(1.2rem,4vw,4rem); margin-top: 1rem; padding: clamp(1.2rem,4vw,3rem); border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.listing-detail .listing-image-placeholder { min-height: 420px; border-radius: 18px; }
.listing-detail h1 { margin: .5rem 0; font-size: clamp(2rem,4vw,3.7rem); line-height: 1; }
.request-page { max-width: 720px; }
.request-page > h1 { margin-bottom: .25rem; }
.login-page { min-height: calc(100vh - 126px); display: grid; place-items: center; padding: 1rem; background: linear-gradient(135deg,var(--navy),#0b2639); }
.login-card { width: min(520px,100%); padding: clamp(1.3rem,4vw,2.6rem); border-radius: 22px; background: white; box-shadow: 0 24px 70px rgba(0,0,0,.3); }
.login-card > a { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.5rem; color: var(--navy); text-decoration: none; font-size: .75rem; font-weight: 800; }
.login-card > a img { width: 48px; }
.login-card h1 { margin: .25rem 0; font-size: 2.2rem; }
.auth-boundary { display: grid; gap: .2rem; margin: 1rem 0; padding: .8rem; border-left: 3px solid var(--orange); background: var(--blue); color: var(--navy); font-size: .72rem; }
.login-help { color: #647381; font-size: .72rem; }
.privacy-page { max-width: 840px; }
.p004-loading, .not-authorized { min-height: 65vh; display: grid; place-items: center; align-content: center; gap: 1rem; padding: 2rem; text-align: center; }
.loading-spinner { width: 42px; height: 42px; border: 4px solid var(--blue); border-top-color: var(--navy); border-radius: 50%; animation: ymno-spin .8s linear infinite; }
@keyframes ymno-spin { to { transform: rotate(360deg); } }

.crm-shell { min-height: 100vh; display: grid; grid-template-columns: 86px 250px minmax(0,1fr); background: #f4f7f9; color: var(--navy); }
.crm-rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: stretch; gap: .6rem; padding: .7rem; overflow-y: auto; background: var(--navy); color: white; }
.crm-brand { display: grid; justify-items: center; gap: .25rem; padding: .4rem; color: white; text-decoration: none; font-size: .62rem; font-weight: 850; }
.crm-brand img { width: 54px; height: 48px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.18)); }
.crm-rail nav { display: grid; gap: .35rem; }
.crm-rail nav a, .crm-rail > a:last-child { min-height: 64px; display: grid; place-items: center; align-content: center; gap: .15rem; padding: .45rem .2rem; border-radius: 10px; color: rgba(255,255,255,.82); text-decoration: none; text-align: center; font-size: .6rem; font-weight: 750; }
.crm-rail nav a > span:first-child { font-size: 1.1rem; }
.crm-rail nav a:hover, .crm-rail nav a:focus-visible, .crm-rail nav a[aria-current="page"] { background: rgba(255,255,255,.14); color: white; box-shadow: inset 3px 0 var(--orange); }
.crm-rail > a:last-child { margin-top: auto; }
.crm-secondary { position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid #b8d3df; background: var(--blue); }
.crm-secondary > div { display: grid; gap: .25rem; padding: 1.2rem 1rem; border-bottom: 1px solid rgba(16,47,70,.15); }
.crm-secondary > div p { margin: 0; font-size: .58rem; font-weight: 900; }
.crm-secondary > div h2 { margin: 0; font-size: 1.2rem; }
.crm-secondary > div span { font-size: .7rem; }
.crm-secondary nav { display: grid; padding: .6rem; }
.crm-secondary nav a { min-height: 42px; display: flex; align-items: center; padding: .55rem .7rem; border-radius: 9px; color: var(--navy); text-decoration: none; font-size: .75rem; font-weight: 750; }
.crm-secondary nav a:hover, .crm-secondary nav a:focus-visible, .crm-secondary nav a[aria-current="page"] { background: rgba(255,255,255,.8); box-shadow: inset 3px 0 var(--orange); }
.crm-main { min-width: 0; }
.crm-topbar { min-height: 70px; position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1rem; padding: .65rem 1rem; border-bottom: 1px solid #d8e1e6; background: rgba(255,255,255,.96); }
.crm-topbar > div { display: grid; margin-right: auto; }
.crm-topbar span { color: #647381; font-size: .66rem; }
#crm-menu-toggle { display: none; min-width: 44px; min-height: 44px; border: 1px solid #b8c6cf; border-radius: 9px; background: white; }
#crm-workspace { min-width: 0; padding: clamp(1rem,2.5vw,2rem); }
.crm-page-header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.crm-page-header h1 { margin: .15rem 0; font-size: clamp(1.6rem,3vw,2.4rem); }
.crm-page-header p { margin: 0; color: #647381; }
.crm-metrics { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: .7rem; margin-bottom: 1rem; }
.crm-metric { min-width: 0; display: grid; gap: .25rem; padding: .9rem; border: 1px solid #d8e1e6; border-radius: 12px; background: white; color: var(--navy); text-decoration: none; box-shadow: 0 8px 22px rgba(16,47,70,.05); }
.crm-metric:hover, .crm-metric:focus-visible { border-color: var(--teal); transform: translateY(-1px); }
.crm-metric strong { font-size: 1.45rem; }
.crm-metric span { color: #647381; font-size: .68rem; font-weight: 750; }
.crm-panel { min-width: 0; margin-bottom: 1rem; padding: 1rem; border: 1px solid #d8e1e6; border-radius: 15px; background: white; box-shadow: 0 9px 26px rgba(16,47,70,.05); }
.crm-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.crm-panel h2 { margin-top: 0; font-size: 1.05rem; }
.activity-list { margin: 0; padding: 0; list-style: none; }
.activity-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid #e6ecef; font-size: .75rem; }
.activity-list time { color: #647381; }
.crm-toolbar { grid-template-columns: minmax(220px,1fr) minmax(160px,.5fr) auto; }
.crm-table-wrap { width: 100%; overflow-x: auto; }
.crm-table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: .7rem; }
.crm-table th, .crm-table td { padding: .65rem .55rem; border-bottom: 1px solid #e2e8eb; text-align: left; vertical-align: middle; }
.crm-table th { color: #647381; font-size: .58rem; text-transform: uppercase; }
.crm-link-button { border: 0; background: transparent; color: var(--teal); font-weight: 850; cursor: pointer; text-decoration: underline; }
.crm-status { display: inline-flex; align-items: center; min-height: 25px; padding: .2rem .5rem; border: 1px solid #bfd0d8; border-radius: 999px; background: #edf4f7; color: var(--navy); font-size: .6rem; font-weight: 850; white-space: nowrap; }
.crm-status[data-status="PUBLISHED"], .crm-status[data-status="AVAILABLE"], .crm-status[data-status="COMPLETED"] { background: #e0f3e5; color: #245829; }
.crm-status[data-status="READY_FOR_REVIEW"], .crm-status[data-status="REQUESTED"] { background: #fff0d9; color: #704615; }
.crm-status[data-status="DAMAGED"], .crm-status[data-status="REJECTED"] { background: #f9dfe0; color: #782b32; }
.approval-list { display: grid; gap: .7rem; }
.approval-list article { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 1rem; padding: .9rem; border: 1px solid #d8e1e6; border-radius: 12px; }
.approval-list h2 { margin: .15rem 0; font-size: 1rem; }
.approval-list p { margin: 0; color: #647381; font-size: .72rem; }
.approval-list dl { display: flex; gap: 1rem; }
.approval-list dl div { display: grid; }
.approval-list dt { color: #647381; font-size: .55rem; text-transform: uppercase; }
.crm-empty { padding: 2rem; border: 1px dashed #aebdc5; border-radius: 12px; background: #fafcfd; text-align: center; }
.provider-state { margin-bottom: 1rem; padding: .8rem 1rem; border-left: 3px solid var(--orange); background: #fff4df; }
.provider-state p { margin: .2rem 0 0; font-size: .72rem; }
.governance-list { display: grid; grid-template-columns: repeat(5,1fr); gap: .6rem; padding: 0; list-style: none; counter-reset: stage; }
.governance-list li { padding: .8rem; border: 1px solid #c8d7df; border-radius: 10px; background: var(--blue); font-size: .72rem; font-weight: 800; counter-increment: stage; }
.governance-list li::before { content: counter(stage,decimal-leading-zero); display: block; color: var(--teal); font-size: .58rem; }
.crm-drawer-layer { position: fixed; inset: 0; z-index: 300; }
.crm-drawer-overlay { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(5,20,32,.44); }
.crm-drawer { position: absolute; top: 0; right: 0; width: min(520px,100%); height: 100%; display: grid; grid-template-rows: auto 1fr auto; background: white; box-shadow: -20px 0 50px rgba(5,20,32,.22); }
.crm-drawer > header, .crm-drawer > footer { display: flex; align-items: center; gap: .6rem; padding: 1rem; border-bottom: 1px solid #d8e1e6; }
.crm-drawer > footer { border-top: 1px solid #d8e1e6; border-bottom: 0; }
.crm-drawer > header h2 { margin: 0 auto 0 0; font-size: 1.15rem; }
.crm-drawer-close { width: 44px; height: 44px; border: 1px solid #bac8cf; border-radius: 9px; background: white; color: var(--navy); font-size: 1.4rem; }
.crm-drawer-body { overflow-y: auto; padding: 1rem; }
.drawer-facts { display: grid; gap: .7rem; }
.drawer-facts div { display: grid; padding-bottom: .6rem; border-bottom: 1px solid #e2e8eb; }
.drawer-facts dt { color: #647381; font-size: .6rem; font-weight: 850; text-transform: uppercase; }
.crm-form { display: grid; gap: .75rem; }
.listing-public-preview { margin-top: 1rem; padding: 1rem; border-radius: 12px; background: var(--blue); }

@media (max-width: 1180px) {
  .marketplace-toolbar { grid-template-columns: repeat(3,1fr); }
  .listing-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .crm-shell { grid-template-columns: 76px 220px minmax(0,1fr); }
  .crm-metrics { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 900px) {
  .crm-shell { display: block; }
  .crm-rail, .crm-secondary { position: fixed; z-index: 210; top: 0; bottom: 0; height: auto; transform: translateX(-105%); transition: transform .2s ease; }
  .crm-rail { left: 0; width: 86px; }
  .crm-secondary { left: 86px; width: min(250px,calc(100vw - 86px)); }
  .crm-shell.nav-open .crm-rail, .crm-shell.nav-open .crm-secondary { transform: none; }
  #crm-menu-toggle { display: inline-grid; place-items: center; }
  .listing-detail { grid-template-columns: 1fr; }
  .approval-list article { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .p004-surface:not(.is-private) { padding: .75rem; }
  .marketplace-hero { align-items: flex-start; flex-direction: column; }
  .marketplace-toolbar, .crm-toolbar { grid-template-columns: 1fr; }
  .listing-grid { grid-template-columns: 1fr; }
  .crm-metrics { grid-template-columns: repeat(2,1fr); }
  .crm-page-header { align-items: flex-start; flex-direction: column; }
  .governance-list { grid-template-columns: repeat(2,1fr); }
  .crm-drawer { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .page { animation: none; }
  .button:hover { transform: none; }
}
