:root {
  color-scheme: light;
  --ink: #282437;
  --muted: #554e5b;
  --navy: #374264;
  --cream: #faf6ed;
  --sheet: #fffdf8;
  --rule: #cfc2bd;
  --pink: #f0c8d9;
  --sky: #c2e3ed;
  --display: Spectral, Georgia, "Times New Roman", serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(ellipse at 86% 17rem, #def0f040, transparent 28rem), var(--cream);
  font: 400 1.08rem/1.52 var(--body);
}
[hidden] { display: none !important; }
.site-width { width: min(69rem, calc(100% - clamp(2.5rem, 9vw, 8.5rem))); margin-inline: auto; }
h1, h2, h3, legend { font-family: var(--display); }
h1, h2, h3, p, fieldset { margin: 0; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.07; letter-spacing: -.045em; }
h3 { font-size: clamp(1.55rem, 2.6vw, 2rem); line-height: 1.15; letter-spacing: -.035em; }
a { color: var(--navy); text-decoration-thickness: .075em; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .13em; }
a, button, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 4px; }
:where(section, details, h2) { scroll-margin-top: 1.6rem; }
.skip-link { position: absolute; left: 1rem; top: .5rem; padding: .6rem .9rem; background: white; transform: translateY(-170%); z-index: 3; }
.skip-link:focus { transform: none; }

footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-size: .95rem; font-weight: 600; text-decoration: none; }
footer a:hover { text-decoration: underline; }

.hero {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: clamp(.8rem, 3.4vw, 3.2rem); align-items: center;
  padding-block: clamp(2.3rem, 5vw, 4.7rem) clamp(2.3rem, 4.5vw, 4rem);
}
.hero-copy { position: relative; z-index: 1; }
h1 { font-size: clamp(2.42rem, 4.55vw, 3.72rem); font-weight: 700; line-height: 1.045; letter-spacing: -.059em; }
.hero h1 { text-wrap: balance; }
.hero-copy > p { max-width: 54ch; margin-top: 1.1rem; font-size: clamp(1.08rem, 1.4vw, 1.22rem); color: #47404d; }
.lock-row { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1.4rem; }
.button {
  display: inline-flex; justify-content: center; align-items: center; gap: .6rem; min-height: 46px;
  width: fit-content; max-width: 100%; padding: .7rem 1.05rem;
  font: 700 1rem/1.32 var(--body); color: #fff; background: var(--navy);
  border: 1px solid transparent; border-radius: 5px 9px 6px 7px; box-shadow: 2px 3px #d9acc3;
  cursor: pointer; text-align: center; text-decoration: none;
}
.button:hover { background: #29334f; }
.button:disabled { opacity: .65; }

.hero-magic {
  width: min(100%, 31rem); aspect-ratio: 480 / 260; position: relative; justify-self: center;
  background: radial-gradient(ellipse at 25% 47%, #b7e6f4a8, transparent 53%), radial-gradient(ellipse at 76% 56%, #f5c7d8a6, transparent 49%);
}
.magic-sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.glint { transform-box: fill-box; transform-origin: center; }
.glint-blue { color: #5bcff5; --facet: #94e3fb; }
.glint-pink { color: #ec9eba; --facet: #f7c7da; }
.glint-white { color: #fff; --facet: #b7cbd5; }
.star-facet { fill: var(--facet); }
.magic-logo { position: absolute; height: auto; }
.magic-mermaids { left: 6%; top: 16%; width: 36%; filter: drop-shadow(0 5px 7px #32455214); }
.magic-trevor { left: 46%; top: 39%; width: 51%; }
@media (prefers-reduced-motion: no-preference) {
  .magic-logo { animation: logo-float 4.8s ease-in-out infinite; }
  .magic-trevor { animation-delay: -2.4s; }
  .glint { animation: star-shimmer 4.8s ease-in-out infinite; }
  .glint:nth-child(3n+1) { animation-delay: -1.3s; }
  .glint:nth-child(3n+2) { animation-delay: -2.6s; }
}
@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes star-shimmer {
  0%, 100% { opacity: .77; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1); }
}

#estimate { scroll-margin-top: 1rem; }
.notebook {
  margin-right: 10px; padding: clamp(1.1rem, 3.3vw, 2.6rem);
  background: repeating-linear-gradient(transparent 0 30px, #79a1b420 30px 31px), var(--sheet);
  border: 1px solid #b7aeaa; border-radius: 13px 8px 16px 8px; box-shadow: 5px 6px var(--pink), 10px 11px var(--sky);
}
#allocation-example { max-width: 91ch; margin: 0 0 1.15rem; }
fieldset { border: 0; padding: 0; min-width: 0; }
.multiplier legend { padding: 0; font-size: clamp(1.4rem, 2.7vw, 2rem); font-weight: 700; letter-spacing: -.026em; line-height: 1.15; }
.multiplier legend h2 { font: inherit; letter-spacing: inherit; }
.offset-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.55rem, 1.7vw, 1.1rem); margin-top: .85rem; }
.offset-option { display: block; position: relative; cursor: pointer; min-width: 0; }
.offset-option input { position: absolute; width: 1px; height: 1px; margin: 0; clip-path: inset(50%); overflow: hidden; }
.option-paper {
  display: flex; height: 100%; min-height: 106px; flex-direction: column; justify-content: center; gap: .45rem;
  padding: clamp(.6rem, 1.5vw, 1.05rem); background: #fffaf4; color: var(--ink);
  border: 2px solid #b6a9af; border-radius: 9px 5px 12px 6px; line-height: 1.15;
}
.offset-option input:enabled:not([hidden]) + .option-paper:hover { border-color: #766478; }
.offset-option input:checked + .option-paper { background: #fae8f0; border-color: #423657; box-shadow: inset 0 -5px #a6dbf0, 3px 3px #efb8ce; }
.offset-option input:focus-visible + .option-paper { outline: 3px solid var(--navy); outline-offset: 4px; }
.option-paper strong { display: flex; align-items: center; gap: .4rem; font-size: clamp(.86rem, 1.55vw, 1.06rem); }
.choice-mark { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 1.05em; height: 1.05em; border: 1.5px solid #817581; border-radius: 50%; background: #fff; }
.offset-option input:checked + .option-paper .choice-mark { border-color: #423657; background: #423657; color: #fff; }
.offset-option input:checked + .option-paper .choice-mark::after { content: ""; width: .27em; height: .52em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-.06em) rotate(45deg); }
.option-amount { font: 700 clamp(1.55rem, 4.2vw, 2.9rem)/1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lock-row { margin-top: 1.35rem; }
.lock-row p { color: var(--muted); font-size: 1rem; }
.notebook noscript p { margin-top: 1rem; }

#charities { margin-top: clamp(3rem, 7vw, 5.5rem); }
.charity-intro { display: flex; gap: 1rem 2rem; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.charity-intro p { margin-top: .45rem; color: var(--muted); }
.gift-ticket { flex: none; }
.gift-ticket div { display: flex; align-items: baseline; gap: .55rem; line-height: 1.15; }
.gift-ticket div span { font-weight: 600; }
.gift-ticket strong { font: 700 1.85rem/1 var(--display); white-space: nowrap; }
.gift-ticket a { display: inline-flex; align-items: center; min-height: 28px; font-size: .92rem; }
.charities, .article-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.85rem, 2.6vw, 1.65rem); }
.mermaids-card { --brand: #063e43; --accent: #42cbbb; --tint: #effaf7; --button: #063e43; --hover: #093336; }
.trevor-card { --brand: #3c2926; --accent: #f28169; --tint: #fff2eb; --button: #bf4736; --hover: #a63a2b; }
.charities article, .article-card {
  border: 1px solid #cbbfb8; border-top: 4px solid var(--accent); border-radius: 12px 6px 12px 6px;
  background: linear-gradient(122deg, var(--tint) 42%, #fffaf5); color: var(--brand);
}
.charities article { display: flex; flex-direction: column; align-items: stretch; padding: clamp(1.15rem, 2.5vw, 1.75rem); }
.charity-identity { display: flex; align-items: center; gap: .9rem; padding-bottom: .85rem; border-bottom: 1px solid #85756f45; }
.charity-identity img { width: 4.5rem; height: 3.3rem; object-fit: contain; flex: none; }
.charity-identity span { display: block; font: 700 .74rem/1.2 var(--body); letter-spacing: .09em; text-transform: uppercase; margin-bottom: .2rem; }
.charities article > p { margin: 1rem 0 1.3rem; }
.charity-action { margin-top: auto; }
.charity-action small { display: block; max-width: 52ch; margin: 0 0 .7rem; color: #514747; font-size: .93rem; line-height: 1.38; }
.charities .button { color: #fffaf7; background: var(--button); box-shadow: none; }
.charities .button:hover { background: var(--hover); }
#charities-title:focus:not(:focus-visible) { outline: none; }

#articles { margin-top: clamp(2.5rem, 5vw, 4rem); }
#articles h2 { margin-bottom: 1.15rem; font-size: clamp(1.8rem, 3.4vw, 2.55rem); }
.article-card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); align-items: center;
  gap: clamp(.85rem, 1.6vw, 1.3rem); padding: clamp(.9rem, 1.7vw, 1.35rem); text-decoration: none;
}
.article-card > img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; object-position: center 18%; border-radius: 5px; }
.article-byline { font: 600 .85rem/1.4 var(--body); }
.article-card h3 { font-size: clamp(1.25rem, 2.05vw, 1.62rem); margin: .32rem 0 .7rem; }
.article-action { font-size: .94rem; font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
.article-card:is(:hover, :focus-visible) .article-action { text-decoration-thickness: .14em; }
@media (max-width: 54rem) {
  .article-grid { grid-template-columns: 1fr; }
  .article-card { grid-template-columns: minmax(0, min(32%, 10rem)) minmax(0, 1fr); }
}

.method-note { margin-top: clamp(2rem, 4vw, 3rem); border-block: 1px solid var(--rule); }
.method-note + .method-note { margin-top: 0; border-top: 0; }
summary { cursor: pointer; }
.method-note > summary, .method-comparisons > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; list-style: none;
}
summary::-webkit-details-marker { display: none; }
.method-note > summary { padding: 1.12rem .1rem; font: 700 clamp(1.3rem, 2.4vw, 1.65rem)/1.3 var(--display); }
.method-note summary::after { content: "+" / ""; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; flex: none; border: 1px solid #b09fab; border-radius: 50%; font: 500 1.2rem/1 var(--body); }
details[open] > summary::after { content: "−" / ""; }
summary:hover { color: #634664; }
.method-body { padding: .15rem .1rem 1.4rem; }
.why-copy p + p { margin-top: .8rem; }
.method-equation { padding: 1rem 1.25rem; border-left: 4px solid #a4ccd8; background: #edf4f3; border-radius: 0 8px 8px 0; }
.method-equation strong { font: 700 clamp(1.13rem, 2.5vw, 1.5rem)/1.5 var(--display); }
.method-facts { margin: 1.4rem 0; }
.method-facts > div { padding-block: .7rem; border-bottom: 1px solid #d5c9bf; }
.method-facts dt { margin-bottom: .25rem; font-weight: 700; }
.method-facts dd { margin: 0; }
.method-comparisons > summary { font-weight: 700; min-height: 44px; }
.method-comparisons p { max-width: 78ch; margin: .75rem 0; }
.table-scroll { max-width: 100%; overflow-x: auto; margin: 1rem 0; }
.gift-thresholds { width: 100%; border-collapse: collapse; font-size: .94rem; font-variant-numeric: tabular-nums; }
.gift-thresholds caption { text-align: left; font-weight: 700; margin: 0 0 .5rem; }
.gift-thresholds th, .gift-thresholds td { text-align: right; padding: .45rem .55rem; border-bottom: 1px solid var(--rule); }
.gift-thresholds th:first-child { text-align: left; }
.gift-thresholds thead { background: #f2eae1; }
#updates { max-width: 42rem; margin: 2.5rem 0; padding: 1.35rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: .6rem; }
#updates h2 { font-size: 1.85rem; }
#updates > p { margin: .6rem 0; }
#updates label { display: block; font-weight: 600; }
#updates input[type="email"] { display: block; width: min(100%, 26rem); min-height: 44px; margin: .3rem 0 .65rem; border: 1px solid #827585; border-radius: .35rem; padding: .5rem; font: inherit; }
#updates .consent { display: flex; align-items: baseline; gap: .5rem; margin: .65rem 0 1rem; font-weight: 400; }
footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.65rem 2.3rem; color: var(--muted); font-size: .92rem; }
footer p { display: flex; align-items: center; gap: .85rem; }
footer p strong { color: var(--ink); font: 700 1.18rem var(--display); letter-spacing: -.05em; white-space: nowrap; }
footer a { gap: .35rem; white-space: nowrap; }
.footer-actions { display: flex; align-items: center; gap: 1.2rem; }
#share-campaign { border: 0; background: transparent; padding: 0; color: var(--navy); min-height: 44px; font: 600 .95rem var(--body); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
#share-fallback, #share-status { flex-basis: 100%; }
#share-url { max-width: 100%; width: 12rem; margin-inline-start: .3rem; padding: .35rem; font: inherit; color: var(--ink); background: var(--sheet); border: 1px solid var(--rule); border-radius: .25rem; }
#share-status:empty { position: absolute; }


@media (max-width: 760px) {
  .offset-options { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .charities { gap: .85rem; }
  .charity-identity { gap: .6rem; }
  .charity-identity img { width: 3.3rem; }
}
@media (max-width: 640px) {
  .site-width { width: calc(100% - 2.25rem); }

  .hero { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: .5rem; padding: 2.1rem 0 1.4rem; }
  .hero h1 { font-size: clamp(2.25rem, 7.7vw, 3.3rem); }
  .hero-copy > p { margin-top: .85rem; }
  .hero-magic { width: min(100%, 21rem); align-self: center; }
  .notebook { margin-right: 7px; box-shadow: 3px 4px var(--pink), 7px 8px var(--sky); }
  .option-paper { min-height: 78px; }
  .lock-row { gap: .65rem; }
  .charity-intro { align-items: start; flex-direction: column; gap: .9rem; }
  .gift-ticket { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; }
  .gift-ticket strong { font-size: 1.55rem; }
  .charities { grid-template-columns: 1fr; }
  .charity-identity img { width: 3.8rem; height: 2.75rem; }
  .gift-thresholds { min-width: 23rem; }
  footer p { display: block; }
  footer p strong { display: block; }
}
@media (forced-colors: active) {
  .offset-option input:checked + .option-paper { border-color: Highlight; outline: 1px solid Highlight; }
  .offset-option input:checked + .option-paper .choice-mark { background: Highlight; border-color: Highlight; color: HighlightText; forced-color-adjust: none; }
  :focus-visible, .offset-option input:focus-visible + .option-paper { outline: 3px solid Highlight; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  body { background: #fff; font-size: 11pt; }
  .site-width { width: 100%; }
  .lock-row, .gift-ticket a, .footer-actions, #share-fallback, #share-status, #updates { display: none; }
  .hero { padding-block: 1rem; }
  .notebook, .charities article { break-inside: avoid; box-shadow: none; }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.offset-option:has(input[hidden]) { cursor: default; }
.offset-option input[hidden] + .option-paper .choice-mark { display: none; }
