/* Corlan Foundation Platform — front-end styles.
   Same palette/typography as the concept mockup, re-scoped with a `.corlan`
   root and `c-` prefixed classes so it doesn't collide with the active
   WordPress theme's own CSS. */

.corlan{
  --bg: #F4EFE3;
  --surface: #FCFAF3;
  --surface-2: #FFFFFF;
  --ink: #17232B;
  --text: #3E4A46;
  --text-muted: #71786F;
  --line: #DED6C0;
  --line-soft: #E9E2CE;
  --accent: #2E6E62;
  --accent-ink: #EFF5F1;
  --accent-soft: #DCE9E2;
  --warm: #9E7418;
  --warm-soft: #EFE3C4;
  --p-crisis: #B8402F;
  --p-veteran: #A17A18;
  --p-research: #7A4FA0;
  --p-wellness: #2F8558;
  --crisis-bg: #17232B;
  --crisis-text: #FCFAF3;
  --crisis-accent: #F0DCA8;
  --radius: 12px;
  font-family:"Public Sans", -apple-system, "Segoe UI", sans-serif;
  color:var(--text);
  background:var(--bg);
  line-height:1.55;
  padding:20px;
  border-radius:16px;
}
/* Text color is inherited from `.corlan`'s own `color` above, but headings
   are set explicitly too so they don't pick up a WordPress theme's own
   h1/h2/h3 color rules (which are usually more specific than ours). */
.corlan h1, .corlan h2, .corlan h3{color:var(--ink);}
@media (prefers-color-scheme: dark){
  .corlan:not([data-theme="light"]){
    --bg: #10171C; --surface: #172029; --surface-2: #1C2730; --ink: #F3EFE4;
    --text: #C4CBC3; --text-muted: #8B948C; --line: #2B3640; --line-soft: #232E37;
    --accent: #58AB98; --accent-ink: #0F1B17; --accent-soft: #1E3730;
    --warm: #D3AC53; --warm-soft: #2E2718;
    --p-crisis: #D9705F; --p-veteran: #C7A24C; --p-research: #A985C9; --p-wellness: #56AC81;
    --crisis-bg: #060A0D; --crisis-text: #F3EFE4; --crisis-accent: #E8C87A;
  }
}
.corlan[data-theme="dark"]{
  --bg: #10171C; --surface: #172029; --surface-2: #1C2730; --ink: #F3EFE4;
  --text: #C4CBC3; --text-muted: #8B948C; --line: #2B3640; --line-soft: #232E37;
  --accent: #58AB98; --accent-ink: #0F1B17; --accent-soft: #1E3730;
  --warm: #D3AC53; --warm-soft: #2E2718;
  --p-crisis: #D9705F; --p-veteran: #C7A24C; --p-research: #A985C9; --p-wellness: #56AC81;
  --crisis-bg: #060A0D; --crisis-text: #F3EFE4; --crisis-accent: #E8C87A;
}

.corlan *{box-sizing:border-box;}
.corlan h4{font-family:"Fraunces", Georgia, serif; color:var(--ink); margin:9px 0 4px; font-weight:600;}
.corlan a{color:inherit;}
.corlan .c-num, .corlan .c-val, .corlan .c-v, .corlan .c-amt{font-family:"IBM Plex Mono", monospace; font-variant-numeric:tabular-nums;}

/* filters */
.c-filter-row{margin-bottom:18px;}
.c-filters{display:flex; gap:8px; flex-wrap:wrap;}
.c-filter{font-size:12.5px; font-weight:600; padding:6px 12px; border-radius:8px; border:1px solid var(--line); color:var(--text-muted); background:var(--surface); cursor:pointer;}
.c-filter.on{color:var(--ink); border-color:var(--ink); background:var(--surface-2);}
.c-empty{color:var(--text-muted); font-size:14px;}

/* tags / pills */
.c-tag{display:inline-flex; align-items:center; gap:6px; font-size:11px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; padding:4px 9px 4px 7px; border-radius:999px; white-space:nowrap;}
.c-tag .c-dot{width:7px; height:7px; border-radius:50%; flex:none;}
.c-crisis{color:var(--p-crisis); background:color-mix(in srgb, var(--p-crisis) 14%, transparent);} .c-crisis .c-dot{background:var(--p-crisis);}
.c-veteran{color:var(--p-veteran); background:color-mix(in srgb, var(--p-veteran) 16%, transparent);} .c-veteran .c-dot{background:var(--p-veteran);}
.c-research{color:var(--p-research); background:color-mix(in srgb, var(--p-research) 14%, transparent);} .c-research .c-dot{background:var(--p-research);}
.c-wellness{color:var(--p-wellness); background:color-mix(in srgb, var(--p-wellness) 14%, transparent);} .c-wellness .c-dot{background:var(--p-wellness);}
.c-pill{display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; padding:5px 10px; border-radius:999px; border:1px solid var(--line);}
.c-pill.c-pending{color:var(--warm); border-color:color-mix(in srgb, var(--warm) 45%, var(--line)); background:var(--warm-soft);}

/* grants marketplace */
.c-grant-grid{display:grid; grid-template-columns:repeat(auto-fit, minmax(280px,1fr)); gap:14px;}
.c-grant-card{border:1px solid var(--line); border-radius:var(--radius); padding:16px 18px; background:var(--surface);}
.c-grant-card.is-hidden{display:none;}
.c-desc{font-size:13.5px; color:var(--text-muted); margin:0 0 12px;}
.c-grant-stats{display:flex; gap:18px; margin:12px 0;}
.c-grant-stats div{font-size:11.5px; color:var(--text-muted);}
.c-grant-stats .c-v{display:block; font-size:16px; font-weight:600; color:var(--ink); margin-top:2px;}
.c-badge{font-size:11.5px; color:var(--text-muted); border-top:1px dashed var(--line); padding-top:10px; margin-top:2px;}
.c-vote-row{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:12px;}
.c-vote-count{font-size:12px; color:var(--text-muted);}
.c-vote-btn{font-size:12.5px; font-weight:700; color:var(--accent-ink); background:var(--accent); border:none; border-radius:8px; padding:8px 13px; cursor:pointer;}
.c-vote-btn[disabled]{opacity:.6; cursor:default;}

/* stat tiles */
.c-stat-row{display:grid; grid-template-columns:repeat(auto-fit, minmax(180px,1fr)); gap:12px; margin-bottom:14px;}
.c-stat-tile{border:1px solid var(--line); border-radius:var(--radius); padding:15px 16px; background:var(--surface);}
.c-lbl{font-size:11.5px; color:var(--text-muted); font-weight:600;}
.c-val{font-size:23px; font-weight:600; color:var(--ink); margin-top:5px;}
.c-val.c-accent{color:var(--accent);}
.c-asof{font-size:12px; color:var(--text-muted); margin:0 0 20px;}
.c-split-lbl{margin-bottom:10px;}

/* ledger */
.c-split-bar{display:flex; height:32px; border-radius:8px; overflow:hidden; border:1px solid var(--line); margin-bottom:10px;}
.c-split-bar span{display:flex; align-items:center; justify-content:center; font-size:11.5px; font-weight:700; color:#fff;}
.c-split-legend{display:flex; gap:18px; flex-wrap:wrap; margin-bottom:24px;}
.c-item{display:flex; align-items:center; gap:7px; font-size:12.5px; color:var(--text-muted);}
.c-sw{width:10px; height:10px; border-radius:3px;}
.c-ledger-table{width:100%; border-collapse:collapse; font-size:13px;}
.c-ledger-table th{text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--text-muted); font-weight:600; padding:0 10px 8px; border-bottom:1px solid var(--line);}
.c-ledger-table td{padding:11px 10px; border-bottom:1px solid var(--line-soft); color:var(--ink);}
.c-ledger-table td.c-amt{text-align:right;}

/* annual pool policy */
.c-pool-intro{margin-top:-4px; margin-bottom:14px; max-width:640px;}
.c-pool-grid{display:grid; grid-template-columns:repeat(auto-fit, minmax(200px,1fr)); gap:12px; margin-bottom:26px;}
.c-pool-card{border:1px solid var(--line); border-radius:var(--radius); padding:14px 16px; background:var(--surface);}
.c-pool-line{font-size:12.5px; color:var(--text-muted); margin:10px 0 6px;}
.c-pill.c-board-override{color:var(--warm); border-color:color-mix(in srgb, var(--warm) 45%, var(--line)); background:var(--warm-soft); font-size:11px; padding:3px 9px;}

/* provider portal */
.c-portal-grid{display:grid; grid-template-columns:1.05fr 1fr; gap:22px;}
.c-form-card, .c-tranche-card{border:1px solid var(--line); border-radius:var(--radius); padding:20px; background:var(--surface);}
.c-field{margin-bottom:12px;}
.c-field label{display:block; font-size:11.5px; font-weight:600; color:var(--text-muted); margin-bottom:5px; text-transform:uppercase; letter-spacing:.02em;}
.c-field label em{text-transform:none; font-style:normal; font-weight:400; letter-spacing:0;}
.c-field input, .c-field select, .c-field textarea{width:100%; border:1px solid var(--line); border-radius:8px; padding:9px 11px; font-size:13px; background:var(--surface-2); color:var(--ink); font-family:inherit;}
.c-submit-btn{margin-top:6px; width:100%; padding:11px; border-radius:8px; border:none; background:var(--ink); color:var(--surface-2); font-weight:700; font-size:13.5px; cursor:pointer;}
.c-notice-ok{background:var(--accent-soft); color:var(--accent); border-radius:8px; padding:10px 14px; font-size:13px;}
.c-tranche-sub{font-size:12.5px; color:var(--text-muted); margin-bottom:16px;}
.c-tranche{display:flex; gap:12px; padding:12px 0; border-top:1px solid var(--line-soft);}
.c-tranche:first-of-type{border-top:none;}
.c-tstep{width:26px; height:26px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; flex:none;}
.c-tstep.c-done{background:var(--accent); color:var(--accent-ink);}
.c-tstep.c-active{background:var(--warm-soft); color:var(--warm); border:2px solid var(--warm);}
.c-tstep.c-locked{background:var(--surface-2); color:var(--text-muted); border:1px solid var(--line);}
.c-tbody b{display:block; font-size:13.5px; color:var(--ink);}
.c-tbody span{font-size:12px; color:var(--text-muted);}
.c-hint{font-size:12.5px; color:var(--text-muted);}

/* impact */
.c-bars{display:flex; align-items:flex-end; gap:18px; height:130px; padding:0 6px 22px; border-bottom:1px solid var(--line); margin-bottom:12px;}
.c-bar-col{flex:1; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%;}
.c-bar{width:100%; max-width:44px; border-radius:5px 5px 0 0;}
.c-bar-lb{font-size:11px; color:var(--text-muted); margin-top:8px; font-family:"IBM Plex Mono",monospace;}

/* education hub */
.c-crisis-banner{display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; background:var(--crisis-bg); color:var(--crisis-text); border-radius:10px; padding:13px 18px; margin-bottom:16px; font-size:13.5px;}
.c-crisis-banner b{color:var(--crisis-accent);}
.c-crisis-banner .c-pill{color:var(--crisis-text); border-color:rgba(255,255,255,.28); background:rgba(255,255,255,.12);}
.c-hub-intro{font-size:13.5px; color:var(--text-muted); max-width:640px; margin:0 0 18px;}
.c-hub-grid{display:grid; grid-template-columns:repeat(auto-fit, minmax(280px,1fr)); gap:14px; margin-bottom:18px;}
.c-hub-card{border:1px solid var(--line); border-radius:var(--radius); padding:16px 18px; background:var(--surface);}
.c-hub-provider{border-style:dashed;}
.c-hub-top{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px;}
.c-hub-org{font-family:"Fraunces",serif; font-weight:600; font-size:15.5px; color:var(--ink);}
.c-hub-cost{font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; padding:3px 8px; border-radius:999px; white-space:nowrap;}
.c-hub-cost.c-free{color:var(--accent); background:var(--accent-soft);}
.c-hub-cost.c-paid{color:var(--warm); background:var(--warm-soft);}
.c-hub-cost.c-provider{color:var(--accent); background:var(--accent-soft);}
.c-hub-audience{font-size:11.5px; color:var(--text-muted); border-top:1px dashed var(--line); padding-top:9px; margin-bottom:9px;}
.c-hub-link{font-size:12.5px; font-weight:700; color:var(--accent); text-decoration:none;}
.c-hub-footnote{font-size:12.5px; color:var(--text-muted); border-top:1px solid var(--line); padding-top:14px;}

@media (max-width:720px){
  .c-portal-grid{grid-template-columns:1fr;}
}

/* ---------- home page ---------- */
.corlan-home{max-width:920px;}
.c-eyebrow{font-family:"IBM Plex Mono", monospace; font-size:12px; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:var(--accent); display:block; margin-bottom:14px;}
.c-home-hero{display:flex; align-items:center; gap:32px; padding-bottom:8px;}
.c-home-crest{width:132px; height:auto; flex:none; border-radius:14px;}
.c-home-hero-copy{flex:1; min-width:260px;}
.c-home-hero h1{font-size:clamp(28px,4vw,42px); font-weight:600; line-height:1.12; letter-spacing:-.01em; margin:0 0 18px;}
@media (max-width:640px){
  .c-home-hero{flex-direction:column; align-items:flex-start;}
  .c-home-crest{width:96px;}
}
.c-lede{font-size:16.5px; color:var(--text); max-width:640px; margin:0 0 26px;}
.c-cta-row{display:flex; flex-wrap:wrap; gap:10px; margin-bottom:28px;}
.c-cta-btn{display:inline-flex; align-items:center; font-size:13.5px; font-weight:700; padding:11px 18px; border-radius:9px; border:1px solid var(--line); background:var(--surface); color:var(--ink); text-decoration:none;}
.c-cta-btn.c-cta-primary{background:var(--accent); color:var(--accent-ink); border-color:var(--accent);}
.c-home-h2{font-family:"Fraunces",serif; font-size:22px; font-weight:600; color:var(--ink); margin:36px 0 16px;}
.c-home-pillars{display:grid; grid-template-columns:repeat(auto-fit, minmax(220px,1fr)); gap:14px;}
.c-home-pillar-card{border:1px solid var(--line); border-radius:var(--radius); padding:16px 18px; background:var(--surface);}
.c-home-pillar-title{font-size:15px; margin:10px 0 6px;}
.c-home-pillar-pct{font-family:"IBM Plex Mono",monospace; font-size:12px; color:var(--text-muted); margin:0 0 8px;}
.c-pillar-give{display:inline-block; margin-top:10px; font-size:13px; font-weight:700; color:var(--warm); text-decoration:none;}
.c-pillar-give:hover{text-decoration:underline;}
.c-home-steps{display:grid; grid-template-columns:repeat(auto-fit, minmax(160px,1fr)); gap:20px;}
.c-home-step-num{width:32px; height:32px; border-radius:50%; background:var(--surface-2); border:1.5px solid var(--ink); color:var(--ink); font-family:"IBM Plex Mono",monospace; font-weight:600; display:flex; align-items:center; justify-content:center; font-size:13px; margin-bottom:10px;}
.c-home-step h5{font-family:"Fraunces",serif; font-size:14.5px; font-weight:600; color:var(--ink); margin:0 0 6px;}
.c-home-step p{font-size:12.5px; color:var(--text-muted); margin:0; line-height:1.5;}
.c-home-links{display:flex; flex-wrap:wrap; gap:16px; margin-top:36px; padding-top:20px; border-top:1px solid var(--line);}
.c-home-links a{font-size:13px; font-weight:600; color:var(--accent); text-decoration:none;}
