/* ============================================================
   Parent Empowerment Project — Global Stylesheet
   Locked brand palette (do not change):
   Ink Navy #17212B · Civic Teal #177E89 · Persimmon #E65A3A · Paper Cream #F7F1E8
   ============================================================ */

:root {
  --navy: #17212B;
  --teal: #177E89;
  --teal-deep: #0E5E68;      /* darkened teal for accessible link text on cream */
  --persimmon: #E65A3A;
  --cream: #F7F1E8;
  --cream-dark: #EFE5D6;
  --white: #FFFFFF;
  --shadow: 0 2px 10px rgba(23, 33, 43, .08);
  --radius: 14px;
  --font-body: Aptos, "Segoe UI", Arial, Helvetica, system-ui, sans-serif;
  --font-head: "Arial Narrow", "Helvetica Neue", Aptos, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; }

/* ---------- Type ---------- */
h1, h2, h3, .display {
  font-family: var(--font-head);
  font-stretch: semi-condensed;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: .01em;
  text-transform: uppercase;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 5.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); margin-top: 1.6em; }
h3 { font-size: 1.22rem; margin-top: 1.4em; }
h4 { font-size: 1.05rem; margin: 1.2em 0 .4em; text-transform: uppercase; letter-spacing: .04em; }
p, ul, ol { margin: 0 0 1em; }
.lead { font-size: 1.28rem; line-height: 1.55; }
.small { font-size: .92rem; }
.center { text-align: center; }

.accent-bar {
  display: block; width: 88px; height: 7px; border-radius: 99px;
  background: linear-gradient(90deg, var(--persimmon) 0 55%, var(--teal) 55% 100%);
  margin: .35em 0 1em;
}
.center > .accent-bar { margin-left: auto; margin-right: auto; }

a { color: var(--teal-deep); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Layout ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.content { max-width: 760px; }
main { padding: 2.2rem 0 3.5rem; }
section { margin-bottom: 2.5rem; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--navy); color: var(--cream); padding: .7rem 1.1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--cream);
  border-bottom: 5px solid;
  border-image: linear-gradient(90deg, var(--navy) 0 34%, var(--persimmon) 34% 67%, var(--teal) 67% 100%) 1;
}
.header-inner { display: flex; align-items: center; gap: 1rem; padding: .55rem 20px; max-width: 1220px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand img.lockup { width: 236px; }
.brand img.emblem-sm { width: 48px; display: none; }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a {
  display: block; padding: .5rem .72rem; border-radius: 9px;
  color: var(--navy); text-decoration: none; font-weight: 600; font-size: 1rem;
}
.site-nav a:hover { background: var(--cream-dark); }
.site-nav a[aria-current="page"] { background: var(--navy); color: var(--cream); }

.header-actions { display: flex; align-items: center; gap: .5rem; }
.lang-switch, .icon-link {
  font-weight: 700; font-size: .95rem; text-decoration: none;
  border: 2px solid var(--navy); color: var(--navy);
  padding: .35rem .7rem; border-radius: 99px; white-space: nowrap;
}
.lang-switch:hover, .icon-link:hover { background: var(--navy); color: var(--cream); }
.icon-link { padding: .35rem .55rem; }

.quick-exit {
  background: var(--persimmon); color: var(--navy);
  border: none; border-radius: 99px; cursor: pointer;
  font-weight: 800; font-size: .95rem; padding: .5rem .85rem; white-space: nowrap;
  box-shadow: var(--shadow);
}
.quick-exit:hover { filter: brightness(1.06); }

.nav-toggle {
  display: none; background: none; border: 2px solid var(--navy); border-radius: 9px;
  padding: .4rem .6rem; font-size: 1.15rem; line-height: 1; cursor: pointer; color: var(--navy);
}

@media (max-width: 980px) {
  .brand img.lockup { width: 220px; } /* brand minimum */
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--cream); border-bottom: 4px solid var(--navy);
    padding: .6rem 16px 1rem; margin: 0;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: .15rem; }
  .site-nav a { font-size: 1.1rem; padding: .7rem .8rem; }
  .nav-toggle { display: inline-block; }
}
@media (max-width: 540px) {
  .brand img.lockup { display: none; }
  .brand img.emblem-sm { display: block; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 3rem 0 2.6rem; overflow: hidden; }
.hero .halfcircles {
  position: absolute; right: -70px; top: 50%; transform: translateY(-50%);
  width: 300px; opacity: .13; pointer-events: none;
}
.hero h1 { max-width: 15ch; }
.hero .lead { max-width: 56ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: 1.02rem;
  padding: .72rem 1.25rem; border-radius: 11px; border: 2px solid transparent;
  text-align: center;
}
.btn-primary { background: var(--navy); color: var(--cream); }
.btn-primary:hover { background: #0e1620; color: var(--white); }
.btn-teal { background: var(--teal); color: var(--white); }
.btn-teal:hover { background: var(--teal-deep); color: var(--white); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--cream); }
.btn-danger { background: var(--persimmon); color: var(--navy); }
.btn-sm { font-size: .9rem; padding: .45rem .8rem; border-radius: 9px; }
button.btn { line-height: 1.4; }

/* ---------- Trust strip / chips ---------- */
.trust-strip { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1.6rem 0 0; padding: 0; list-style: none; }
.trust-strip li {
  background: var(--white); border: 1.5px solid var(--cream-dark);
  border-left: 5px solid var(--teal);
  padding: .42rem .8rem; border-radius: 99px; font-weight: 600; font-size: .95rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; border-radius: 6px; padding: .15rem .5rem; vertical-align: middle;
}
.tag-new { background: var(--teal); color: var(--white); }
.tag-soon { background: var(--cream-dark); color: var(--navy); }
.tag-es { background: var(--navy); color: var(--cream); }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); margin: 1.2rem 0; }
.card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  border-top: 6px solid var(--teal); padding: 1.25rem 1.25rem 1.1rem; display: flex; flex-direction: column;
}
.card.alt { border-top-color: var(--persimmon); }
.card.dark { border-top-color: var(--navy); }
.card h3 { margin-top: 0; }
.card p { flex: 1 1 auto; }
.card .btn { align-self: flex-start; }

/* ---------- Callouts ---------- */
.callout {
  border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1.3rem 0;
  background: var(--white); border-left: 7px solid var(--teal); box-shadow: var(--shadow);
}
.callout.warn { border-left-color: var(--persimmon); }
.callout.plain { background: var(--cream-dark); border-left-color: var(--navy); box-shadow: none; }
.callout :last-child { margin-bottom: 0; }
.callout .mini-label {
  display: block; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: .82rem; margin-bottom: .25rem;
}

/* Not-legal-advice banner used at top of publications */
.notice-legal {
  background: var(--cream-dark); border: 1.5px solid #E0D4C0; border-radius: 10px;
  font-size: .95rem; padding: .7rem 1rem; margin: 0 0 1.6rem;
}

/* ---------- Page header band ---------- */
.page-head { padding: 2.4rem 0 1.4rem; }
.page-head .kicker {
  font-weight: 800; text-transform: uppercase; letter-spacing: .09em; font-size: .9rem; color: var(--teal-deep);
}

/* ---------- Steps / timeline ---------- */
.steps { list-style: none; margin: 1.5rem 0; padding: 0; counter-reset: step; }
.steps > li {
  position: relative; padding: 0 0 1.5rem 3.4rem; counter-increment: step;
  border-left: 3px solid var(--teal); margin-left: 1.05rem;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: .2rem; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: -1.35rem; top: -.15rem;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--navy); color: var(--cream);
  font-family: var(--font-head); font-weight: 700; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
}
.steps h3 { margin: 0 0 .3em; }

/* ---------- Details / accordions ---------- */
details.faq {
  background: var(--white); border-radius: 10px; box-shadow: var(--shadow);
  padding: .85rem 1.1rem; margin: .6rem 0;
}
details.faq summary { font-weight: 700; cursor: pointer; }
details.faq[open] { border-left: 6px solid var(--teal); }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; }
table.pep { border-collapse: collapse; width: 100%; background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); font-size: 1rem; }
table.pep th { background: var(--navy); color: var(--cream); text-align: left; padding: .6rem .8rem; }
table.pep td { padding: .6rem .8rem; border-top: 1px solid var(--cream-dark); vertical-align: top; }

/* ---------- Forms & tools ---------- */
.form-grid { display: grid; gap: .9rem 1rem; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

label { font-weight: 700; display: block; margin-bottom: .25rem; font-size: 1rem; }
label .opt { font-weight: 400; color: #4c5560; font-size: .9rem; }
input[type="text"], input[type="date"], input[type="time"], input[type="email"], select, textarea {
  width: 100%; font: inherit; color: var(--navy);
  border: 2px solid #C9BCA6; border-radius: 9px; background: var(--white);
  padding: .55rem .7rem;
}
textarea { min-height: 105px; resize: vertical; }
.hint { font-size: .9rem; color: #4c5560; margin: .25rem 0 0; }

.tool-panel {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.4rem; margin: 1.3rem 0; border-top: 6px solid var(--teal);
}
.privacy-note {
  display: flex; gap: .6rem; align-items: flex-start;
  background: #E9F2F3; border: 1.5px solid var(--teal); border-radius: 10px;
  padding: .7rem 1rem; font-size: .95rem; margin: 1rem 0 1.4rem;
}
.privacy-note strong { color: var(--teal-deep); }

.toolbar { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1.1rem 0; }

.entry {
  background: var(--white); border-radius: 10px; box-shadow: var(--shadow);
  border-left: 6px solid var(--teal); padding: .9rem 1.05rem; margin: .7rem 0;
}
.entry .entry-meta { font-size: .9rem; color: #4c5560; margin-bottom: .3rem; }
.entry .entry-actions { margin-top: .5rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.entry p { margin: .25rem 0; }
.count-line { font-weight: 700; margin: .8rem 0 .2rem; }

output.letter, textarea.letter { width: 100%; font-family: Georgia, "Times New Roman", serif; font-size: 1rem; line-height: 1.6; }
textarea.letter { min-height: 380px; }

/* ---------- Growing shelf ---------- */
.shelf { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.3rem 1.3rem .6rem; }
.shelf ul { list-style: none; padding: 0; margin: 0; }
.shelf li { display: flex; gap: .7rem; align-items: baseline; padding: .55rem 0; border-top: 1px solid var(--cream-dark); flex-wrap: wrap; }
.shelf li:first-child { border-top: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--cream); margin-top: 3rem; }
.site-footer a { color: #BFE3E8; }
.site-footer a:hover { color: var(--white); }
.footer-inner { display: grid; gap: 2rem; grid-template-columns: 1.3fr 1fr 1fr; padding: 2.6rem 20px; max-width: 1080px; margin: 0 auto; }
.footer-inner img { width: 230px; margin-bottom: .8rem; }
.footer-inner h4 { color: var(--white); }
.footer-inner ul { list-style: none; padding: 0; margin: 0; }
.footer-inner li { margin: .35rem 0; }
.footer-legal { border-top: 1px solid #2C3947; font-size: .9rem; padding: 1.1rem 20px 1.5rem; }
.footer-legal .wrap { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: space-between; }
@media (max-width: 800px) { .footer-inner { grid-template-columns: 1fr; gap: 1.4rem; } }

/* ---------- Read aloud + utility ---------- */
.listen-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 0 0 1.2rem; }
.listen-btn { display: inline-flex; align-items: center; gap: .45rem; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.divider-dots { border: none; text-align: center; margin: 2.2rem 0; }
.divider-dots::before { content: "● ● ●"; letter-spacing: 1.2em; color: var(--teal); font-size: .7rem; }

/* ---------- Printables ---------- */
.print-sheet { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.7rem 1.9rem; margin: 1rem 0 2rem; }
.sheet-head { border-bottom: 4px solid var(--navy); margin-bottom: 1rem; padding-bottom: .5rem; }
.sheet-head .kicker { font-weight: 800; text-transform: uppercase; letter-spacing: .09em; font-size: .82rem; color: var(--teal-deep); margin: 0 0 .3rem; }
.sheet-title { margin-bottom: .1em; }
.sheet-sub { font-size: 1rem; text-transform: none; letter-spacing: 0; font-family: var(--font-body); font-weight: 600; }
.print-sheet h2 { font-size: 1.15rem; margin: 1.1em 0 .35em; border-left: 6px solid var(--teal); padding-left: .5rem; }
ul.tight { margin: 0 0 .6em; padding-left: 1.2em; }
ul.tight li { margin: .22em 0; }
.sheet-numbers { background: var(--cream); border-radius: 8px; padding: .7rem .9rem; font-size: .95rem; margin-top: 1rem; }
.sheet-legal { font-size: .8rem; color: #4c5560; margin: .9rem 0 0; }
.door-steps { list-style: none; counter-reset: dstep; padding: 0; margin: 0; }
.door-steps li { counter-increment: dstep; font-size: 1.08rem; padding: .55rem 0 .55rem 2.6rem; position: relative; border-top: 1px solid var(--cream-dark); }
.door-steps li:first-child { border-top: 0; }
.door-steps li::before { content: counter(dstep); position: absolute; left: .2rem; top: .55rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--navy); color: var(--cream); font-family: var(--font-head); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: .95rem; }
.wallet-row { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1rem 0; }
.wallet-card { width: 3.55in; min-height: 2.15in; border: 2px dashed #98a1ab; border-radius: 10px; padding: .16in .2in; background: var(--white); display: flex; flex-direction: column; }
.wc-title { font-family: var(--font-head); font-weight: 700; font-size: .72rem; letter-spacing: .05em; margin: 0 0 .25rem; border-bottom: 3px solid var(--persimmon); padding-bottom: .15rem; }
.wc-list { margin: 0; padding-left: 1rem; font-size: .68rem; line-height: 1.45; flex: 1 1 auto; }
.wc-foot { font-size: .58rem; margin: .3rem 0 0; color: #4c5560; }

/* ---------- Visit-prep checklist ---------- */
.checklist-box { border: 2px solid var(--cream-dark); border-radius: 10px; padding: .8rem 1rem; }
.checklist-box legend { font-weight: 700; padding: 0 .4rem; }
label.chk { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400; margin: .35rem 0; font-size: 1rem; }
label.chk input { margin-top: .3rem; width: 1.05rem; height: 1.05rem; accent-color: var(--teal); }

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .quick-exit, .listen-row, .toolbar, .cta-row, .nav-toggle, .no-print { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  main { padding: 0; }
  .card, .callout, .entry, .tool-panel, .shelf { box-shadow: none; border: 1px solid #999; }
  a { color: #000; text-decoration: none; }
  .print-sheet { box-shadow: none; padding: 0; }
  .wallet-card, .entry, details.faq { break-inside: avoid; page-break-inside: avoid; }
  .page-head { padding: 0 0 .6rem; }
}
