:root{
  --forest:#1B5E20;
  --forest-dark:#113D18;
  --copper:#B56E3A;
  --sand:#FAF8F4;
  --sand-deep:#EFE5D8;
  --sage:#EEF4EB;
  --text:#2F342F;
  --muted:#687169;
  --line:#E1E6DE;
  --white:#FFFFFF;
  --shadow:0 16px 42px rgba(28,67,32,.10);
  --shell:1450px;
}

*{box-sizing:border-box}

html{
  min-height:100%;
  scroll-behavior:smooth;
  overflow-y:scroll;
}

body{
  min-height:100vh;
  margin:0;
  display:flex;
  flex-direction:column;
  overflow-x:hidden;
  color:var(--text);
  background:var(--sand);
  font-family:"Source Sans 3",sans-serif;
  line-height:1.55;
}

input,
select,
textarea,
button{
  font:inherit;
}

img,
svg{
  max-width:100%;
}

a{color:inherit}

[hidden]{
  display:none !important;
}

.shell{
  width:min(var(--shell),calc(100% - 64px));
  margin-inline:auto;
}

/* =========================================================
   Shared header
   ========================================================= */

.site-header{
  position:relative;
  z-index:20;
  flex:0 0 auto;
  color:var(--sand);
  background:var(--forest-dark);
  border-bottom:4px solid var(--copper);
  box-shadow:0 10px 28px rgba(17,61,24,.16);
}

.nav{
  min-height:104px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:40px;
}

.brand{
  min-width:0;
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--sand);
  text-decoration:none;
}

.home-badge{
  width:58px;
  height:58px;
  flex:0 0 58px;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:var(--forest-dark);
  background:var(--sand);
  box-shadow:0 0 0 1px rgba(255,255,255,.24),0 8px 22px rgba(0,0,0,.18);
  transition:transform .18s ease,background .18s ease;
}

.home-badge svg{
  width:29px;
  height:29px;
  display:block;
  fill:currentColor;
}

.brand:hover .home-badge,
.brand:focus-visible .home-badge{
  transform:translateY(-2px);
  background:var(--sage);
}

.brand-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  line-height:1;
}

.brand-title{
  color:var(--sand);
  font-family:"Cormorant Garamond",serif;
  font-size:clamp(1.65rem,2vw,2.25rem);
  font-weight:700;
  line-height:.96;
  letter-spacing:-.025em;
  white-space:nowrap;
}

.brand-district{
  margin-top:4px;
  color:#D4E0D1;
  font-size:.64rem;
  font-weight:800;
  line-height:1.1;
  letter-spacing:.16em;
  text-transform:uppercase;
}

.brand-subtitle{
  margin-top:5px;
  color:var(--sand);
  font-size:.78rem;
  font-weight:500;
  line-height:1.1;
}

.nav-links{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
}

.nav-links a{
  position:relative;
  padding:12px 18px;
  color:var(--sand);
  font-size:.92rem;
  font-weight:800;
  line-height:1;
  text-decoration:none;
  white-space:nowrap;
  transition:color .18s ease;
}

.nav-links a:last-child{padding-right:0}

.nav-links a + a::before{
  content:"";
  position:absolute;
  left:0;
  top:50%;
  width:1px;
  height:28px;
  background:rgba(239,229,216,.38);
  transform:translateY(-50%);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a[aria-current="page"]{
  color:#E0A77F;
}

.nav-links a:focus-visible,
.brand:focus-visible{
  outline:3px solid rgba(250,248,244,.8);
  outline-offset:4px;
  border-radius:6px;
}

/* =========================================================
   Shared internal-page structure
   ========================================================= */

.internal-main{
  flex:1;
  padding:30px 0 48px;
  background:
    radial-gradient(circle at 8% 15%,rgba(181,110,58,.06),transparent 26rem),
    radial-gradient(circle at 92% 45%,rgba(27,94,32,.06),transparent 30rem),
    var(--sand);
}

.page-eyebrow{
  margin:0;
  color:var(--copper);
  font-size:.76rem;
  font-weight:800;
  letter-spacing:.16em;
  text-transform:uppercase;
}

.page-heading{
  display:flex;
  flex-direction:column;
  gap:16px;
  margin-bottom:26px;
  padding-bottom:16px;
  border-bottom:1px solid var(--line);
}
.page-heading-subtext{
  max-width:820px;
  margin:14px 0 0;
  color:#59635A;
  font-size:1.08rem;
  line-height:1.55;
}

.page-heading .page-eyebrow{margin:0}

.page-heading h1,
.page-heading h2{
  margin:0;
  line-height:1.15;
}

.page-heading p{
  max-width:760px;
  margin:0;
  line-height:1.55;
}

/* Compact internal-page variants */

/* =========================================================
   Information Popovers
   ========================================================= */

.info-button{
  appearance:none;
  -webkit-appearance:none;
  width:16px;
  height:16px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 16px;
  border:1.5px solid #667268;
  border-radius:50%;
  background:transparent;
  color:#36533B;
  font-size:10px;
  font-weight:700;
  line-height:1;
  cursor:pointer;
  position:relative;
  z-index:2;
}

.info-button:hover{
  border-color:#113D18;
  background:#EEF4EB;
  color:#113D18;
}

.info-button:focus-visible{
  outline:3px solid rgba(181,110,58,.28);
  outline-offset:2px;
}

.info-button[aria-expanded="true"]{
  border-color:#113D18;
  background:#113D18;
  color:#fff;
}

.info-popover{
  position:fixed;
  z-index:9999;
  width:min(340px,calc(100vw - 32px));
  padding:18px 20px;
  border:1px solid #D8DDD5;
  border-radius:12px;
  background:#fff;
  color:#243028;
  box-shadow:
    0 16px 40px rgba(17,61,24,.16),
    0 4px 10px rgba(17,61,24,.08);
  font-size:.92rem;
  line-height:1.5;
}

.info-popover strong{
  display:block;
  margin-bottom:7px;
  padding-right:28px;
  color:#113D18;
  font-size:1rem;
}

.info-popover p{margin:0}

/* Hidden text a screen reader reads with each info button (added by ui.js). */
.info-sr-text{
  position:absolute;
  width:1px;
  height:1px;
  margin:-1px;
  padding:0;
  overflow:hidden;
  clip:rect(0 0 0 0);
  clip-path:inset(50%);
  white-space:nowrap;
  border:0;
}

.info-popover-close{
  position:absolute;
  top:8px;
  right:10px;
  width:28px;
  height:28px;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  color:#526056;
  font-size:22px;
  line-height:1;
  cursor:pointer;
}

.info-popover-close:hover{
  background:#EEF4EB;
  color:#113D18;
}

.info-popover-close:focus-visible{
  outline:3px solid rgba(181,110,58,.28);
  outline-offset:1px;
}

/* =========================================================
   Shared footer
   ========================================================= */

.site-footer{
  flex:0 0 auto;
  margin-top:auto;
  color:var(--sand);
  background:var(--forest-dark);
  border-top:1px solid rgba(250,248,244,.08);
}

/* Four columns: site identity (widest), Explore, Learn More, Questions? */
.footer-main{
  display:grid;
  grid-template-columns:minmax(0,1.7fr) repeat(3,minmax(0,1fr));
  gap:32px 40px;
  padding-top:40px;
  padding-bottom:30px;
}

.footer-note{
  display:flex;
  align-items:flex-start;
  gap:10px;
  max-width:360px;
  margin:4px 0 0;
  color:rgba(250,248,244,.86);
  font-size:.88rem;
  line-height:1.45;
}

/* Same width for both icons so the disclaimer and candidate text line up. */
.footer-icon,
.candidate-icon{
  flex:0 0 20px;
  width:20px;
  display:grid;
  place-items:center;
}

.footer-icon svg,
.candidate-icon svg{
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.6;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.footer-icon{color:rgba(250,248,244,.8)}
.candidate-icon{color:#E0A77F}
.candidate-icon svg{width:17px;height:17px}

.footer-heading{
  margin:4px 0 14px;
  color:#E0A77F;
  font-family:"Source Sans 3",sans-serif;
  font-size:.74rem;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.footer-links{
  display:grid;
  gap:9px;
  margin:0;
  padding:0;
  list-style:none;
}

.footer-links a,
.footer-email{
  color:rgba(250,248,244,.9);
  font-size:.92rem;
  line-height:1.35;
  text-decoration:none;
  transition:color .18s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible,
.footer-links a[aria-current="page"],
.footer-email:hover,
.footer-email:focus-visible{color:#E0A77F}

.footer-links a:hover,
.footer-email:hover{
  text-decoration:underline;
  text-underline-offset:3px;
}

.footer-question{
  margin:0 0 10px;
  color:rgba(250,248,244,.86);
  font-size:.88rem;
  line-height:1.45;
}

.footer-email{
  display:inline-block;
  font-size:.88rem;
  overflow-wrap:anywhere;
}

.site-footer a:focus-visible{
  outline:3px solid rgba(250,248,244,.8);
  outline-offset:3px;
  border-radius:4px;
}

/* Candidate identification, below the disclaimer: quieter than the links. */
.footer-candidate{
  display:inline-flex;
  align-items:flex-start;
  gap:10px;
  margin-top:16px;
  color:rgba(250,248,244,.72);
  font-size:.82rem;
  line-height:1.4;
  text-decoration:none;
  transition:color .18s ease;
}

.footer-candidate strong{
  display:block;
  color:rgba(250,248,244,.9);
  font-weight:700;
}

.footer-candidate-line{display:block}

.footer-candidate:hover,
.footer-candidate:hover strong{color:#E0A77F}

/* Tablet: two columns, site identity across the top. */
@media(max-width:980px){
  .footer-main{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:30px 32px;
    padding-top:34px;
  }

  .footer-identity{grid-column:1 / -1}
  .footer-note{max-width:520px}
}

/* Phone: one column with comfortable spacing. */
@media(max-width:560px){
  .footer-main{
    grid-template-columns:minmax(0,1fr);
    gap:26px;
    padding-top:30px;
    padding-bottom:24px;
  }

  .footer-heading{margin-bottom:10px}
}

@media(prefers-reduced-motion:reduce){
  .footer-links a,
  .footer-email,
  .footer-candidate{transition:none}
}

/* =========================================================
   Notice pop-up shown when entering a tool page (Tax Estimate,
   District Funding). The page's script opens and closes it.
   ========================================================= */

.estimate-notice{
  position:fixed;
  inset:0;
  z-index:10000;
  display:grid;
  place-items:center;
  padding:24px;
}

.estimate-notice[hidden]{
  display:none;
}

.estimate-notice-backdrop{
  position:absolute;
  inset:0;
  background:rgba(17,35,21,.72);
  backdrop-filter:blur(3px);
}

.estimate-notice-dialog{
  position:relative;
  z-index:1;
  width:min(560px,100%);
  padding:30px;
  border:1px solid rgba(255,255,255,.45);
  border-radius:20px;
  background:#fff;
  box-shadow:0 28px 80px rgba(0,0,0,.32);
}

.estimate-notice-icon{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  margin-bottom:16px;
  border-radius:50%;
  color:#fff;
  background:var(--copper);
  font-size:1.6rem;
  font-weight:800;
  line-height:1;
}

.estimate-notice-eyebrow{
  margin:0 0 5px;
  color:var(--copper);
  font-size:.76rem;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.estimate-notice-dialog h2{
  margin:0;
  color:var(--forest-dark);
  font-family:"Cormorant Garamond",serif;
  font-size:clamp(2rem,5vw,2.65rem);
  line-height:1.05;
}

.estimate-notice-dialog p:not(.estimate-notice-eyebrow){
  margin:14px 0 0;
  color:#566159;
  line-height:1.6;
}

.estimate-notice-dialog p a{
  color:var(--forest-dark);
  font-weight:700;
  text-underline-offset:3px;
}

.estimate-notice-assessor{
  display:inline-block;
  margin-top:18px;
  color:var(--forest-dark);
  font-weight:700;
  text-underline-offset:3px;
}

.estimate-notice-continue{
  width:100%;
  min-height:48px;
  margin-top:22px;
  padding:11px 18px;
  border:0;
  border-radius:10px;
  background:var(--forest-dark);
  color:#fff;
  font-weight:800;
  cursor:pointer;
  transition:background .18s ease,transform .18s ease;
}

.estimate-notice-continue:hover,
.estimate-notice-continue:focus-visible{
  background:var(--forest);
  transform:translateY(-1px);
}

.estimate-notice-continue:focus-visible{
  outline:3px solid rgba(181,110,58,.35);
  outline-offset:3px;
}

body.estimate-notice-open{
  overflow:hidden;
}

/* Two-choice version (District Funding): a short label, then a button for
   each tool side by side. */
.estimate-notice-dialog .estimate-notice-choice-label{
  margin:22px 0 0;
  color:var(--forest-dark);
  font-weight:700;
}

.estimate-notice-choices{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:10px;
}

.estimate-notice-choices .estimate-notice-continue{margin-top:0}

@media(max-width:480px){
  .estimate-notice-choices{grid-template-columns:minmax(0,1fr)}
}

/* Phones: the notice scrolls as a page so long text is never cut off. */
@media(max-width:760px){
  .estimate-notice{
    display:block;
    height:100dvh;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    padding:16px 16px calc(24px + env(safe-area-inset-bottom));
  }

  .estimate-notice-dialog{
    width:100%;
    max-height:none;
    margin:0 auto;
    padding:24px 20px;
    overflow:visible;
    border-radius:16px;
  }
}

/* =========================================================
   Shared responsive rules
   ========================================================= */

@media(max-width:980px){
  .nav{
    min-height:auto;
    align-items:flex-start;
    flex-direction:column;
    gap:18px;
    padding-top:20px;
    padding-bottom:20px;
  }

  .nav-links{
    width:100%;
    justify-content:flex-start;
    gap:10px 22px;
  }

  .nav-links a{padding:0}
  .nav-links a + a::before{display:none}
}

@media(max-width:760px){
  .shell{width:calc(100% - 36px)}

  .brand{gap:12px}

  .home-badge{
    width:50px;
    height:50px;
    flex-basis:50px;
  }

  .home-badge svg{
    width:25px;
    height:25px;
  }

  .nav-links{gap:9px 18px}
  .nav-links a{font-size:.82rem}

  .internal-main{padding:24px 0 42px}

  .page-heading{margin-bottom:8px}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}

  .home-badge{
    transition:none;
  }
}

/* =========================================================
   Skip link (keyboard accessibility)
   ========================================================= */

.skip-link{
  position:absolute;
  left:-9999px;
  top:0;
  z-index:1000;
  padding:12px 18px;
  background:var(--sand,#EFE5D8);
  color:#173D20;
  font-weight:800;
  text-decoration:none;
  border-radius:0 0 8px 0;
}
.skip-link:focus{
  left:0;
  outline:3px solid rgba(23,61,32,.8);
  outline-offset:2px;
}
