/* CivicBallot green / ivory / gold portal theme v0.13.3.
 * Tokens are configurable via CivicBallot > Settings, scoped to the .cbv root.
 * No page-builder dependency; all existing forms and data attributes remain intact.
 */
.cbv {
  --cbv-blue:#135640;--cbv-ivory:#f8f5e9;--cbv-gold:#ae8534;--cbv-on-primary:#fff;
  --cbv-dark:#15392e;--cbv-muted:#5e6e64;--cbv-border:#e0e5d7;
  --cbv-surface:#fffefa;--cbv-soft:#eff4e9;--cbv-shadow:0 16px 40px rgba(19,57,40,.065);
  --cbv-focus:#b58935;
  max-width:1380px;width:100%;color:#25382d;line-height:1.55;
  background:var(--cbv-ivory);border-radius:22px;padding:22px 30px 30px;
  margin:16px auto 55px;box-sizing:border-box;
  font-family:ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;
}
.cbv *, .cbv *::before,.cbv *::after {box-sizing:border-box}
.cbv h2,.cbv h3,.cbv h4,.cbv h5 {color:var(--cbv-dark);letter-spacing:-.035em;line-height:1.24}
.cbv h2{font-size:clamp(1.7rem,2.8vw,2.45rem);font-weight:800}
.cbv h3{font-size:clamp(1.08rem,1.8vw,1.27rem);font-weight:760}
.cbv h4{font-weight:750}
.cbv p,.cbv .cbv-muted {color:var(--cbv-muted)}
.cbv a:not(.cbv-btn){color:var(--cbv-blue);text-decoration:none}
.cbv a:not(.cbv-btn):hover{text-decoration:underline;text-underline-offset:4px}
.cbv :is(a,button,input,select,textarea):focus-visible{outline:3px solid var(--cbv-focus);outline-offset:3px}
.cbv .cbv-eyebrow{color:#987020;font-size:.72rem;letter-spacing:.14em;font-weight:850}
.cbv .cbv-brand-logo{width:41px;height:41px;max-width:100%;object-fit:contain;border-radius:11px;background:#fff;padding:3px;flex-shrink:0}
.cbv .cbv-wordmark{display:inline-flex;gap:10px;align-items:center;color:inherit;letter-spacing:-.045em;font-weight:800;font-size:clamp(1rem,1.7vw,1.2rem);max-width:100%;overflow-wrap:anywhere}
.cbv .cbv-mark{display:inline-grid;place-items:center;width:40px;height:40px;background:var(--cbv-gold);color:#fff;border-radius:11px;box-shadow:none;font-weight:900;font-size:20px;flex-shrink:0}
.cbv .cbv-brand-accent{color:var(--cbv-gold)}
/* Shared navigation is usable independently of themes, Gutenberg and Elementor. */
.cbv .cbv-nav{background:var(--cbv-blue);border:1px solid rgba(255,255,255,.18);color:var(--cbv-on-primary);border-radius:16px;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:12px 19px;margin:0 0 22px;box-shadow:0 12px 28px rgba(9,44,29,.15);flex-wrap:nowrap}
.cbv .cbv-nav .cbv-wordmark{color:var(--cbv-on-primary);white-space:nowrap;flex-shrink:0}
.cbv .cbv-nav .cbv-mark{background:var(--cbv-gold);color:#fff}
.cbv .cbv-nav-links{display:flex;flex-wrap:wrap;gap:3px;align-items:center;justify-content:flex-end;min-width:0}
.cbv .cbv-nav a:not(.cbv-btn){color:var(--cbv-on-primary);opacity:.9;font-weight:650;font-size:.88rem;text-decoration:none;white-space:nowrap;border-radius:8px;padding:10px 12px}
.cbv .cbv-nav a:not(.cbv-btn):hover,.cbv .cbv-nav a[aria-current="page"]{opacity:1;background:rgba(255,255,255,.18);color:var(--cbv-on-primary);text-decoration:none}
.cbv .cbv-nav .cbv-signout{border-left:1px solid rgba(255,255,255,.20);margin-left:3px}
.cbv .cbv-nav a.cbv-nav-login{background:var(--cbv-gold);color:#fff}
.cbv .cbv-nav-toggle{display:none;background:transparent!important;border:1px solid rgba(255,255,255,.40)!important;box-shadow:none!important;min-height:40px;padding:6px 11px;color:var(--cbv-on-primary)!important;font-size:.88rem}
/* Shared action controls. Never restyle links that are not real actions. */
.cbv button:not(.cbv-nav-toggle),.cbv .cbv-btn {
  background:var(--cbv-blue);border:1px solid var(--cbv-blue);border-radius:10px;
  color:var(--cbv-on-primary)!important;box-shadow:none;padding:.72rem 1.17rem;
  min-height:43px;display:inline-flex;align-items:center;justify-content:center;gap:6px;
  font-weight:750;font-size:.92rem;text-decoration:none!important;cursor:pointer;
  transition:filter .15s ease,transform .15s ease,box-shadow .15s ease;
}
.cbv button:not(.cbv-nav-toggle):hover,.cbv .cbv-btn:hover{filter:brightness(.90);box-shadow:0 8px 18px rgba(19,70,47,.16);transform:translateY(-1px)}
.cbv button:disabled{opacity:.55;cursor:not-allowed;box-shadow:none!important;transform:none!important}
.cbv button.cbv-secondary{background:#fbfcf6;color:var(--cbv-blue)!important;border:1px solid #cfdccd;box-shadow:none}
.cbv button.cbv-secondary:hover{background:#ecf4e8}
.cbv .cbv-linkbtn{padding:.52rem 1.03rem;min-height:38px;white-space:nowrap}
/* Shared cards, forms and state treatments, including nested management content. */
.cbv .cbv-panel{background:var(--cbv-surface);border:1px solid #e2e6db;border-radius:17px;padding:1.65rem;margin:1.05rem 0;box-shadow:var(--cbv-shadow);color:#273c31;max-width:none}
.cbv .cbv-panel h2,.cbv .cbv-panel h3{margin-top:.15rem}
.cbv form label,.cbv label{color:#294638;font-weight:690;font-size:.91rem;gap:6px}
.cbv .cbv-check{display:flex;flex-direction:row;align-items:flex-start;gap:.65rem;font-weight:500}.cbv .cbv-check span{display:inline;flex:1;min-width:0}
.cbv input:not([type=checkbox]):not([type=radio]):not([type=color]),.cbv select,.cbv textarea{
  background:#fff;color:#1c382b;border:1px solid #c9d6c9;border-radius:9px;
  padding:.7rem .8rem;min-height:44px;box-shadow:0 2px 4px rgba(18,42,25,.015);
  font-size:.94rem;max-width:100%;width:100%;
}
.cbv input[type=color]{width:70px;height:42px;border:1px solid #c9d6c9;border-radius:7px;padding:3px;background:#fff}
.cbv input[type=file]{padding:8px;border-radius:9px;max-width:100%}
.cbv :is(input,select,textarea):focus{border-color:var(--cbv-blue);background:#fff}
.cbv :is(input[type=checkbox],input[type=radio]){accent-color:var(--cbv-blue)}
.cbv fieldset{border:1px solid #d8e1d7;border-radius:14px}
.cbv legend{color:var(--cbv-dark);font-weight:750}
.cbv .cbv-alert{border-radius:11px;border:1px solid #e9d39e;background:#fffbeb;padding:.95rem 1.1rem;color:#675020}
.cbv .cbv-alert.cbv-error{border-color:#e5b7b4;background:#fff0ec;color:#8d3028}
.cbv .cbv-alert.cbv-success{border-color:#b6d5b7;background:#ecf7ea;color:#236040}
.cbv .cbv-pill{font-weight:750;background:#f8f0dc;border:1px solid #e9d7b1;color:#775618;padding:.27rem .72rem;border-radius:25px}
.cbv .cbv-pill-open{background:#e3f4e9;border-color:#c2e1cb;color:#1e6d47}
.cbv .cbv-state-open{color:#197c4c}.cbv .cbv-state-closed,.cbv .cbv-state-certified{color:#765a26}
.cbv .cbv-pageheader{background:linear-gradient(120deg,#e9f0e3 0%,var(--cbv-ivory) 100%);border:1px solid #dce4d5;border-left:5px solid var(--cbv-gold);border-radius:17px;margin:0 0 18px;padding:2.2rem 2.1rem}
.cbv .cbv-pageheader h2{margin:.35rem 0}.cbv .cbv-pageheader p{margin:0;font-size:.95rem}
.cbv .cbv-hero{position:relative;overflow:hidden;background:linear-gradient(112deg,#103b2b 0%,#1b5c42 64%,var(--cbv-blue));border:1px solid rgba(255,255,255,.15);color:#fff;border-radius:19px;padding:2.5rem 2.55rem;margin:0 0 22px;display:flex;justify-content:space-between;align-items:center;gap:25px;box-shadow:0 18px 36px rgba(11,50,31,.15)}
.cbv .cbv-hero::before{content:"";position:absolute;inset:0;background:linear-gradient(95deg,rgba(7,43,30,.88),rgba(9,57,37,.6));pointer-events:none;z-index:1}
.cbv .cbv-hero .cbv-hero-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.58;z-index:0;border:0;max-width:none;border-radius:0}
.cbv .cbv-hero>*:not(.cbv-hero-photo){position:relative;z-index:2}
.cbv .cbv-hero h2,.cbv .cbv-admin-hero h2{color:#fff;margin:.35rem 0 .5rem}
.cbv .cbv-hero p{color:#ebf7ee}.cbv .cbv-hero .cbv-eyebrow{color:#ebcb85}
.cbv .cbv-member-badge{background:rgba(255,255,255,.11);border:1px solid rgba(247,241,216,.42);border-radius:13px;min-width:210px;backdrop-filter:blur(3px)}
.cbv .cbv-member-badge span,.cbv .cbv-member-badge small{color:#e2f1e6}.cbv .cbv-member-badge strong{color:#fff}
.cbv .cbv-admin-seal{color:#e7c77e}
.cbv .cbv-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin:1.2rem 0 2rem}
.cbv .cbv-metric{background:#fffefa;border:1px solid #e4e6d9;border-radius:15px;padding:1.35rem;box-shadow:0 5px 16px rgba(22,52,34,.04);min-width:0}
.cbv .cbv-metric:before{content:"";display:block;background:linear-gradient(90deg,var(--cbv-gold),#e5ca83);width:33px;height:5px;border-radius:9px;margin-bottom:.85rem}
.cbv .cbv-metric strong{color:var(--cbv-dark);font-size:clamp(1.6rem,3vw,2.1rem);font-weight:800;letter-spacing:-.035em}
.cbv .cbv-metric span{color:#577061;font-weight:650;font-size:.87rem}
.cbv .cbv-section-title{margin:1.65rem 0 .8rem}
.cbv .cbv-section-title h3{margin:.3rem 0}
.cbv .cbv-grid,.cbv .cbv-grid-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.cbv .cbv-ballot-card{margin:0;min-height:220px;padding:1.45rem}
.cbv .cbv-ballot-card h3{margin:.95rem 0 .35rem}.cbv .cbv-ballot-card p{margin:.45rem 0}
.cbv .cbv-card-icon,.cbv .cbv-list-icon{background:#e9f3e9;color:#277249;border:1px solid #d5e6d5;border-radius:10px}
.cbv .cbv-empty{background:#fffef7;border:1px dashed #b9cdb8;border-radius:15px;color:#4b6053;padding:2.5rem 1.2rem}
.cbv .cbv-empty>span{color:var(--cbv-gold)}
.cbv .cbv-empty p{color:#607669}
.cbv .cbv-listitem{display:flex;align-items:center;justify-content:space-between;gap:14px;background:#fffefa;border:1px solid #e1e6d9;padding:1.1rem 1.2rem;border-radius:13px;box-shadow:0 3px 12px rgba(28,50,35,.025)}
.cbv .cbv-list-main{flex:1;min-width:0}.cbv .cbv-list-main strong{color:var(--cbv-dark)}
.cbv .cbv-ballot-list-card{margin:.65rem 0}
.cbv .cbv-choice{border:1px solid #d1ddcf;background:#fffefa;border-radius:13px;padding:1.05rem;min-width:0}
.cbv .cbv-choice:hover{border-color:var(--cbv-gold);box-shadow:0 6px 18px rgba(26,66,40,.07)}
.cbv .cbv-choice:has(input:checked){background:#edf6ec;border:2px solid var(--cbv-blue);box-shadow:0 0 0 3px rgba(25,93,57,.07)}
.cbv .cbv-choice-img{border-radius:9px;max-height:220px;object-fit:cover}
.cbv .cbv-ballot-detail,.cbv .cbv-results-panel{max-width:950px;margin:12px auto;padding:2rem}
.cbv .cbv-bar{height:13px;background:#e6ede3;border-radius:20px;overflow:hidden}
.cbv .cbv-bar span{background:linear-gradient(90deg,var(--cbv-blue),var(--cbv-gold));border-radius:20px}
.cbv .cbv-bar-row{margin:1.5rem 0}.cbv .cbv-bar-label{color:var(--cbv-dark)}
.cbv .cbv-tabs{background:#ebf1e8;border:1px solid #dce6d6;border-radius:13px;padding:.52rem;display:flex;flex-wrap:wrap;gap:5px;margin:14px 0}
.cbv .cbv-tabs a:not(.cbv-btn){color:#3d6050;font-weight:690;padding:.58rem .95rem;text-decoration:none;border-radius:9px}
.cbv .cbv-tabs a[aria-current=page]{background:#fff;border:1px solid #e6e7d7;color:var(--cbv-dark);box-shadow:0 2px 7px rgba(22,55,30,.07)}
.cbv .cbv-tablewrap{border:1px solid #dfe6db;border-radius:13px;box-shadow:0 5px 16px rgba(18,47,29,.025)}
.cbv table{background:#fffefa}.cbv th{background:#eff4ec;color:var(--cbv-dark);font-weight:750}.cbv th,.cbv td{border-color:#e4e9dd;padding:.85rem}
.cbv .cbv-option-editor{background:#f5f8f0;border-color:#d9e5d4;border-radius:12px}
.cbv .cbv-profile-card{max-width:720px;margin:1rem auto}
.cbv .cbv-brand-settings{border:1px solid #dfe5d4;background:#f8fbf3;padding:1.2rem;margin:1rem 0 1.3rem;border-radius:12px}
.cbv .cbv-brand-settings>div>div{min-width:0}
.cbv .cbv-brand-settings .cbv-hero-photo{display:block;max-width:170px;height:92px;object-fit:cover;border:1px solid #dde4d8;border-radius:10px;position:static;opacity:1}
.cbv .cbv-brand-settings .cbv-brand-logo{margin:.25rem 0}
/* Auth pages follow the 10 supplied page mockups, preserving the existing forms and input names. */
.cbv.cbv-page-login,.cbv.cbv-page-otp,.cbv.cbv-page-register,.cbv.cbv-page-reset{background:transparent;padding:12px 8px 24px}
.cbv .cbv-auth-layout{display:grid;grid-template-columns:1fr .95fr;max-width:1090px;margin:2.15rem auto;border-radius:22px;min-height:545px;box-shadow:0 26px 75px rgba(19,54,37,.14);overflow:hidden;border:1px solid #e4e8d7;background:#fffefa}
.cbv .cbv-auth-story{position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:center;align-items:stretch;background:linear-gradient(130deg,#0f3a2c 0%,#1b6248 82%,#2b7354);padding:2.4rem 2.7rem;color:#fff}
.cbv .cbv-auth-story::after{content:"";position:absolute;width:340px;height:340px;right:-160px;bottom:-135px;border:55px solid rgba(199,163,82,.18);border-radius:50%;pointer-events:none}
.cbv .cbv-auth-story>.cbv-hero-photo{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:cover;opacity:.2;border-radius:0;z-index:0}
.cbv .cbv-auth-story-inner{position:relative;z-index:1;display:flex;flex-direction:column;align-items:flex-start}
.cbv .cbv-auth-brand{display:flex;gap:.55rem;align-items:center;justify-content:space-between;width:100%;margin-bottom:1.7rem}
.cbv .cbv-auth-brand .cbv-wordmark{color:#fff}.cbv .cbv-auth-brand small{font-size:.72rem;color:#e4eadf}
.cbv .cbv-auth-illustration{position:relative;width:122px;height:112px;margin:4px 0 12px;align-self:center}
.cbv .cbv-illustration-box{position:absolute;bottom:0;left:15px;width:90px;height:56px;background:linear-gradient(#e2c27b,#b58539);border-radius:9px;color:#fff;display:grid;place-items:center;font-size:32px;box-shadow:0 15px 20px rgba(0,0,0,.15)}
.cbv .cbv-illustration-card{position:absolute;top:0;left:42px;width:54px;height:69px;border:4px solid #fff;border-radius:7px;transform:rotate(-13deg);background:#f9f7ec;color:var(--cbv-blue);font-size:34px;display:grid;place-items:center;box-shadow:0 8px 24px rgba(0,0,0,.13)}
.cbv .cbv-auth-story .cbv-eyebrow{color:#edcd88}
.cbv .cbv-auth-story h2{font-size:clamp(2.1rem,3.2vw,3.35rem);color:#fff;line-height:1.07;letter-spacing:-.06em;margin:.48rem 0 .85rem;max-width:440px}
.cbv .cbv-auth-story p{max-width:410px;color:#ecf6eb;font-size:1rem;margin:0}
.cbv .cbv-trustline{color:#e8d5a2;border-top:1px solid rgba(255,255,255,.2);width:100%;padding-top:1.1rem;margin-top:1.55rem;font-size:.76rem}
.cbv .cbv-auth-card{border:0;border-radius:0;box-shadow:none;background:#fffefa;margin:0;max-width:none;min-width:0;padding:3rem 3.1rem;display:flex;flex-direction:column;justify-content:center;width:100%}
.cbv .cbv-auth-card h2{font-size:2rem;margin:.4rem 0}.cbv .cbv-auth-card p{font-size:.91rem}
.cbv .cbv-auth-card form{margin-top:1.1rem;gap:.92rem}
.cbv .cbv-auth-card form button{width:100%;margin-top:.3rem}
.cbv .cbv-auth-links{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin:1.1rem 0 0;font-size:.86rem}
.cbv .cbv-auth-links a:not(.cbv-btn){color:var(--cbv-blue);font-weight:700}
.cbv .cbv-footer{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;border-top:1px solid #dce6d9;padding:16px 2px 0;margin:1.6rem 0 0;color:#617064;font-size:.76rem}
.cbv .cbv-footer span:first-child{font-weight:750;color:#2b5b40}
/* Medium screens: maintain main content without horizontal scrolling. */
@media(max-width:1060px){
  .cbv{padding:16px 19px 24px}
  .cbv .cbv-nav{gap:12px;padding:11px 13px}
  .cbv .cbv-nav a:not(.cbv-btn){padding:9px 8px;font-size:.81rem}
  .cbv .cbv-auth-card{padding:2.1rem}
  .cbv .cbv-auth-story{padding:2rem}
}
@media(max-width:850px){
  .cbv .cbv-nav{flex-wrap:wrap;align-items:center}
  .cbv .cbv-nav-toggle{display:inline-flex;margin-left:auto}
  .cbv .cbv-nav-links{order:3;width:100%;display:flex;justify-content:flex-start;flex-wrap:wrap}
  .cbv-has-js .cbv .cbv-nav-links:not([data-open="true"]){display:none}
  .cbv .cbv-nav-links[data-open="true"]{display:flex;flex-direction:column;align-items:stretch;gap:2px;border-top:1px solid rgba(255,255,255,.24);padding-top:10px}
  .cbv .cbv-nav a:not(.cbv-btn){white-space:normal}
  .cbv .cbv-hero{padding:2rem;align-items:flex-start}
  .cbv .cbv-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cbv .cbv-auth-layout{max-width:680px;grid-template-columns:1fr;min-height:0}
  .cbv .cbv-auth-story{padding:1.6rem 2rem}
  .cbv .cbv-auth-story h2{font-size:2rem}
  .cbv .cbv-auth-illustration{display:none}
  .cbv .cbv-trustline{margin:.7rem 0 0;padding:.7rem 0 0}
  .cbv .cbv-auth-brand{margin:0 0 1.1rem}
  .cbv .cbv-wp-admin .cbv-wp-columns{grid-template-columns:1fr}
}
@media(max-width:600px){
  .cbv{padding:11px 12px 24px;border-radius:14px;margin:0 auto 25px}
  .cbv .cbv-pageheader{padding:1.3rem}
  .cbv .cbv-hero{padding:1.5rem;flex-direction:column;align-items:stretch}
  .cbv .cbv-member-badge{min-width:0;width:100%}
  .cbv .cbv-grid,.cbv .cbv-grid-two,.cbv .cbv-option-grid,.cbv .cbv-option-editor{grid-template-columns:1fr;min-width:0}
  .cbv .cbv-metrics{gap:8px}
  .cbv .cbv-metric{padding:1rem}
  .cbv .cbv-panel,.cbv .cbv-results-panel,.cbv .cbv-ballot-detail{padding:1.15rem}
  .cbv .cbv-listitem{align-items:flex-start;flex-direction:column}
  .cbv .cbv-listitem .cbv-btn{width:100%}
  .cbv .cbv-auth-layout{margin:.6rem auto;border-radius:14px}
  .cbv .cbv-auth-story{padding:1.45rem}
  .cbv .cbv-auth-story h2{font-size:1.9rem}
  .cbv .cbv-auth-card{padding:1.45rem}
  .cbv .cbv-auth-brand{align-items:flex-start;flex-direction:column;gap:6px}
  .cbv .cbv-footer{align-items:flex-start;flex-direction:column}
  .cbv .cbv-bar-label{flex-direction:column;align-items:flex-start}
  .cbv .cbv-actions{gap:.3rem}
}
@media(prefers-reduced-motion:reduce){.cbv button:not(.cbv-nav-toggle),.cbv .cbv-btn{transition:none!important;transform:none!important}}
