/* How it works page. Loaded after styles.css, only on how-it-works.html. */
.hiw {
  --cream: #FBF4E4; --sky-pale: #BFE3F5; --orange: #FF7A00; --green: #1FB34A; --purple: #8E44EC;
  --duck: #FBE3A0; --hettie: #A9744F; --moon: #FFF1C1; --night: #2E3566; --night-deep: #232850;
  --radius: 24px; --shadow: 6px 6px 0 var(--ink);
  line-height: 1.6;
}
.hiw .wrap { max-width: 1140px; }
.hiw h2 { font-size: clamp(1.8rem, 4.2vw, 2.9rem); font-weight: 850; max-width: 20ch; line-height: 1.12; }
.hiw h3 { font-size: 1.25rem; font-weight: 800; line-height: 1.12; margin: 0 0 .5em; }
.hiw p { margin: 0 0 1em; }
.sprites { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 20; }
.skip:focus { left: 12px; }
.eyebrow {
  display: inline-block; font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  background: var(--ink); color: #fff; padding: 4px 12px; border-radius: 999px; margin-bottom: 18px;
}
.hiw .lede { font-size: clamp(1.1rem, 2vw, 1.3rem); max-width: 44ch; color: var(--ink-soft); }
.hiw .page-hero .lede { color: var(--ink); font-weight: 600; margin: 14px 0 22px; }
.hiw .page-hero .badges { justify-content: flex-start; }
.note { margin-top: 32px; font-weight: 700; font-size: 1.1rem; text-align: center; }
.hiw .card { background: #fff; border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.badge img { height: 40px; width: auto; }

/* Sections */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section > .wrap > h2 { margin-bottom: 28px; }

.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 28px; grid-template-columns: repeat(3, 1fr); counter-reset: step; }
.steps li { position: relative; counter-increment: step; padding-top: 36px; }
.steps li::before {
  content: counter(step);
  position: absolute; top: -22px; left: 22px;
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--mustard); border: 3px solid var(--ink); border-radius: 50%;
  font-weight: 900; font-size: 1.2rem;
}
.steps svg { height: 120px; width: auto; margin: 0 auto 18px; }
.steps svg.tall { height: 130px; }

/* Evening */
.evening { background: var(--cream); border-block: 3px solid var(--ink); }
.arc.card { padding: 0; overflow: hidden; margin: 40px 0 0; }
.arc-scroll { overflow-x: auto; }
.arc svg { width: 100%; min-width: 640px; height: auto; }
.arc-labels text { font: 700 15px var(--font); }
.arc figcaption { padding: 14px 20px; font-size: .92rem; color: var(--ink-soft); border-top: 3px solid var(--ink); background: #fff; }
.chapters { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); }
.chapters li { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 3px solid var(--ink); border-radius: 18px; padding: 16px; }
.chapters h3 { font-size: 1.05rem; margin-bottom: 4px; }
.chapters p { font-size: .95rem; margin: 0; color: var(--ink-soft); }
.dot {
  flex: none; width: 38px; height: 38px; display: grid; place-items: center;
  border: 3px solid var(--ink); border-radius: 50%; font-weight: 900; color: var(--ink);
}
[data-c="pip"] { --c: var(--pip); } [data-c="sky"] { --c: var(--sky-pale); } [data-c="red"] { --c: var(--red); }
[data-c="duck"] { --c: var(--duck); } [data-c="blue"] { --c: var(--blue); } [data-c="hettie"] { --c: var(--hettie); }
[data-c="purple"] { --c: var(--purple); } [data-c="moon"] { --c: var(--moon); } [data-c="yellow"] { --c: var(--yellow); }
[data-c="green"] { --c: var(--green); } [data-c="orange"] { --c: var(--orange); }
.dot { background: var(--c); }
.dot[data-c="red"], .dot[data-c="blue"], .dot[data-c="hettie"], .dot[data-c="purple"] { color: #fff; }

/* Cast */
.cast { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 22px; grid-template-columns: repeat(5, 1fr); }
.cast li { text-align: center; padding: 22px 18px; }
.cast svg { height: 110px; width: 100%; margin: 0 auto 14px; }
.cast li:nth-child(1) { background: var(--belly); }
.cast li:nth-child(2) { background: #EAF5FB; }
.cast li:nth-child(3) { background: #FFF8E6; }
.cast li:nth-child(4) { background: #FBEBDD; }
.cast li:nth-child(5) { background: #EFF5E9; }
.cast p { font-size: .95rem; margin: 0; color: var(--ink-soft); }
.cast li:nth-child(odd) { transform: rotate(-1.2deg); }
.cast li:nth-child(even) { transform: rotate(1.2deg); }

/* Learning */
.learn { background: var(--belly); border-block: 3px solid var(--ink); }
.two-col { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.chips li {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; border: 3px solid var(--ink); border-radius: 999px;
  padding: 8px 18px 8px 10px; font-weight: 800; box-shadow: 3px 3px 0 var(--ink);
}
.chips li::before { content: ""; width: 20px; height: 20px; border-radius: 50%; background: var(--c); border: 2.5px solid var(--ink); }

/* Promises */
.promises { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); }
.promises h3 { display: flex; align-items: center; gap: 10px; }
.promises h3::before { content: ""; flex: none; width: 18px; height: 18px; background: var(--blue); border: 2.5px solid var(--ink); border-radius: 50%; }
.promises li:nth-child(2) h3::before { background: var(--red); }
.promises li:nth-child(3) h3::before { background: var(--yellow); }
.promises li:nth-child(4) h3::before { background: var(--purple); }
.promises li:nth-child(5) h3::before { background: var(--green); }
.promises li:nth-child(6) h3::before { background: var(--orange); }
.promises p { margin: 0; color: var(--ink-soft); }

/* Night / privacy */
.night { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--night) 0%, var(--night-deep) 100%); color: #F2EEFF; }
.night-sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.night .wrap { position: relative; }
.night .eyebrow { background: var(--moon); color: var(--ink); }
.night p { color: #D9D5EE; }
.night a { color: var(--moon); }
.night-ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.night-ticks li { position: relative; padding: 14px 18px 14px 56px; background: rgba(255,255,255,.07); border: 2px solid rgba(255,241,193,.35); border-radius: 18px; font-weight: 700; }
.night-ticks li::before {
  content: ""; position: absolute; left: 16px; top: 50%; translate: 0 -50%;
  width: 26px; height: 26px; border-radius: 50%; background: var(--pip); border: 2.5px solid var(--ink);
  box-shadow: inset 0 0 0 5px var(--pip), inset 0 0 0 9px var(--belly);
}

/* Needs */
.needs { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 40px; }
.needs ul { padding-left: 1.2em; margin: 0 0 16px; }
.needs li { margin-bottom: 8px; }
.needs li::marker { color: var(--berry); }

/* Safety */
.safety { background: #FFF8E6; border-block: 3px solid var(--ink); }
.safe { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: safe; }
.safe li { counter-increment: safe; border-left: 4px dashed var(--ink); padding: 4px 0 4px 18px; }
.safe li::before { content: "0" counter(safe); display: block; font-weight: 900; font-size: 1.6rem; color: var(--berry); margin-bottom: 4px; }
.safe p { margin: 0; color: var(--ink-soft); }

/* FAQ */
details { border: 3px solid var(--ink); border-radius: 18px; background: #fff; margin-bottom: 14px; }
details[open] { box-shadow: 4px 4px 0 var(--ink); }
summary { cursor: pointer; list-style: none; padding: 16px 52px 16px 20px; font-weight: 800; font-size: 1.08rem; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 18px; top: 50%; translate: 0 -50%; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--sky-pale); border: 2.5px solid var(--ink); font-weight: 900; line-height: 1; }
details[open] summary::after { content: "–"; background: var(--mustard); }
details p { padding: 0 20px 18px; margin: 0; color: var(--ink-soft); }


/* Responsive */
@media (max-width: 1000px) {
  .chapters { grid-template-columns: repeat(2, 1fr); }
  .cast { grid-template-columns: repeat(3, 1fr); }
  .promises { grid-template-columns: repeat(2, 1fr); }
  .safe { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .steps, .promises, .needs, .two-col, .chapters { grid-template-columns: 1fr; }
  .cast { grid-template-columns: repeat(2, 1fr); }
  .cast li:last-child { grid-column: 1 / -1; }
  .steps { gap: 40px; }
  .card { padding: 20px; }
}
@media (max-width: 460px) {
  .safe { grid-template-columns: 1fr; }
}
