/* Endpaper: a papercraft storybook. Light paper theme only (the art is cream, like the app). */
@font-face {
  font-family: "Fraunces";
  src: url(/fonts/fraunces-latin-full-normal.woff2) format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url(/fonts/fraunces-latin-full-italic.woff2) format("woff2");
  font-weight: 100 900; font-style: italic; font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f8f1e4;
  --paper-2: #f1e5d0;
  --card: #fffaf1;
  --ink: #2b211b;
  --ink-soft: #6e6155;
  --oxblood: #8e2f2c;
  --accent: #b03a37;
  --forest: #2f5a4f;
  --gilt: #c8963e;
  --midnight: #23324a;
  --kraft: #d9b98c;
  --line: #e6d8bf;
  --display: "Fraunces", ui-serif, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow: 0 2px 0 rgba(80, 50, 25, 0.08), 0 18px 40px -18px rgba(80, 50, 25, 0.35);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  background-color: var(--paper);
  /* paper grain */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45 0 0 0 0 .32 0 0 0 0 .2 0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 72;
  font-weight: 650;
  line-height: 1.04;
  margin: 0;
  letter-spacing: -0.01em;
}
h1 em, h2 em { font-style: italic; color: var(--accent); font-weight: 600; }
.squiggle { position: relative; white-space: nowrap; }
.squiggle svg { position: absolute; left: -2%; bottom: -0.16em; width: 104%; height: 0.32em; overflow: visible; }
.squiggle path { fill: none; stroke: var(--gilt); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 1.2s 0.6s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Header ---------- */
.top { position: sticky; top: 12px; z-index: 50; padding: 0 12px; }
.top-inner {
  max-width: 1140px; margin: 12px auto 0; display: flex; align-items: center; justify-content: space-between;
  padding: 8px 8px 8px 14px; border-radius: 999px;
  background: rgba(255, 250, 241, 0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); box-shadow: 0 8px 24px -16px rgba(80, 50, 25, 0.4);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-weight: 650; font-size: 22px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; transition: transform 0.4s cubic-bezier(.3,1.6,.5,1); }
.brand:hover img { transform: rotate(-10deg) scale(1.08); }
.top nav { display: flex; align-items: center; gap: 6px; }
.top nav a { color: var(--ink-soft); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 999px; }
.top nav a:hover { color: var(--ink); background: var(--paper-2); }
.top nav a.get {
  background: var(--accent); color: #fff; font-weight: 650; padding: 9px 18px;
  box-shadow: 0 3px 0 var(--oxblood); transition: transform 0.15s, box-shadow 0.15s;
}
.top nav a.get:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--oxblood); background: var(--accent); }

/* ---------- Hero ---------- */
.hero { position: relative; text-align: center; padding: 56px 0 0; }
.hero h1 { font-size: clamp(44px, 7.4vw, 92px); max-width: 11.5em; margin: 0 auto; }
.hero .lede { font-size: clamp(18px, 2vw, 21px); color: var(--ink-soft); max-width: 31em; margin: 22px auto 26px; }
.cta { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.appstore { display: inline-block; line-height: 0; border-radius: 12px; transition: transform 0.2s cubic-bezier(.3,1.6,.5,1); }
.appstore img { height: 56px; width: auto; }
.appstore:hover { transform: translateY(-3px) rotate(-1.5deg); }
.chips { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.chip {
  font-size: 14px; font-weight: 600; color: var(--ink); background: var(--card); border: 1.5px dashed var(--kraft);
  padding: 5px 12px; border-radius: 999px;
}
.chip:nth-child(2) { transform: rotate(-2deg); }
.chip:nth-child(3) { transform: rotate(1.5deg); }

/* The live scene: Margo on her shelf */
.scene {
  position: relative; margin: 44px auto 0; max-width: 980px; aspect-ratio: 1200 / 509;
  border-radius: 32px; overflow: hidden; box-shadow: var(--shadow);
  background: url(/img/ledge.webp) center / cover;
  border: 6px solid var(--card); outline: 1px solid var(--line);
  cursor: pointer;
}
.scene canvas { position: absolute; height: 92%; aspect-ratio: 1; left: 20%; top: 10.5%; }
.scene .bunting { position: absolute; left: 4%; right: 4%; top: -6px; height: 70px; pointer-events: none; }
.bubble {
  position: absolute; left: 45%; top: 16%; max-width: 15em; text-align: left;
  background: var(--card); border: 2px solid var(--ink); border-radius: 20px; padding: 10px 16px;
  font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-size: clamp(15px, 2vw, 21px); font-weight: 600;
  box-shadow: 4px 4px 0 var(--ink); transform-origin: 0% 100%;
  animation: bob 4s ease-in-out infinite;
}
.bubble::after {
  content: ""; position: absolute; left: -12px; bottom: 14px; width: 18px; height: 18px; background: var(--card);
  border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg) skew(10deg, 10deg);
}
.bubble.pop { animation: pop 0.45s cubic-bezier(.3,1.7,.5,1); }
@keyframes pop { 0% { transform: scale(0.6) rotate(-6deg); } 100% { transform: scale(1); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-6px) rotate(1deg); } }
.tap-hint { position: absolute; right: 18px; bottom: 14px; font-size: 13px; font-weight: 600; color: var(--ink-soft); background: rgba(255,250,241,.85); padding: 4px 10px; border-radius: 999px; }

/* floating paper bits */
.float { position: absolute; pointer-events: none; z-index: 0; animation: drift 9s ease-in-out infinite; }
.float.f2 { animation-duration: 11s; animation-delay: -3s; }
.float.f3 { animation-duration: 13s; animation-delay: -6s; }
.float.f4 { animation-duration: 10s; animation-delay: -2s; }
@keyframes drift { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(8px, -16px) rotate(12deg); } }
.hero > .wrap { position: relative; z-index: 1; }

/* Fanned phones */
.fan { position: relative; z-index: 2; display: flex; justify-content: center; align-items: flex-end; gap: 0; margin: 56px auto -150px; padding: 0 10px; }
.phone {
  position: relative; width: 210px; flex: none; aspect-ratio: 560 / 1217; border-radius: 34px; padding: 7px;
  background: #1b1714; box-shadow: 0 30px 50px -24px rgba(40, 20, 10, 0.55);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 28px; }
.fan .phone { margin: 0 -14px; transition: transform 0.35s cubic-bezier(.3,1.5,.5,1); }
.fan .phone:nth-child(1) { transform: rotate(-12deg) translateY(56px); }
.fan .phone:nth-child(2) { transform: rotate(-6deg) translateY(16px); z-index: 1; }
.fan .phone:nth-child(3) { transform: translateY(-10px) scale(1.06); z-index: 3; }
.fan .phone:nth-child(4) { transform: rotate(6deg) translateY(16px); z-index: 1; }
.fan .phone:nth-child(5) { transform: rotate(12deg) translateY(56px); }
.fan .phone:hover { transform: translateY(-28px) rotate(0) scale(1.08); z-index: 5; }

/* ---------- Marbled section ---------- */
.marbled { position: relative; color: #fff7ea; padding: 210px 0 110px; background: var(--oxblood) url(/img/endpaper-oxblood.webp) center / 380px; }
.marbled::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(60, 18, 16, 0.55), rgba(60, 18, 16, 0.78)); }
.marbled > * { position: relative; }
.marbled h2 { font-size: clamp(36px, 5.6vw, 64px); text-align: center; }
.marbled h2 em { color: #ffd38a; }
.marbled .sub { text-align: center; color: #f2dcc4; max-width: 32em; margin: 14px auto 50px; font-size: 18px; }
.tear { position: absolute; left: 0; width: 100%; height: 34px; z-index: 1; }
.tear.top { top: -1px; }
.tear.bottom { bottom: -1px; transform: scaleY(-1); }
.tear path { fill: var(--paper); }
.callouts { display: grid; grid-template-columns: 1fr auto 1fr; gap: 36px; align-items: center; }
.callouts .col { display: flex; flex-direction: column; gap: 20px; }
.callout {
  background: var(--card); color: var(--ink); border-radius: 18px; padding: 16px 18px 16px 16px;
  display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: start;
  box-shadow: 0 4px 0 rgba(0,0,0,.18); transition: transform 0.25s cubic-bezier(.3,1.6,.5,1);
}
.callout:nth-child(odd) { transform: rotate(-1.2deg); }
.callout:nth-child(even) { transform: rotate(1deg); }
.callout:hover { transform: rotate(0) translateY(-4px) scale(1.02); }
.callout .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--paper-2); }
.callout h3 { font-size: 20px; margin: 2px 0 2px; }
.callout p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.45; }
.callouts .phone { width: 270px; }
.callouts .phone.wobble { animation: wobble 6s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(-2deg) translateY(0); } 50% { transform: rotate(2deg) translateY(-10px); } }

/* ---------- Dress up Margo ---------- */
.dress { padding: 110px 0 90px; }
.dress-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.stage {
  position: relative; aspect-ratio: 1; max-width: 500px; width: 100%; margin: 0 auto; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #fff6e2 0 55%, #f3e0bd 56% 100%);
  border: 6px solid var(--card); outline: 2px dashed var(--kraft); outline-offset: 8px;
}
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.dress h2 { font-size: clamp(36px, 5vw, 60px); }
.dress p.sub { color: var(--ink-soft); font-size: 18px; margin: 14px 0 22px; max-width: 26em; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  font: 600 15px var(--sans); color: var(--ink); background: var(--card); border: 2px solid var(--ink);
  padding: 8px 14px 8px 12px; border-radius: 10px 999px 999px 10px; cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink); transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.tag:hover { transform: translate(-1px, -2px); box-shadow: 4px 5px 0 var(--ink); }
.tag[aria-pressed="true"] { background: #ffd38a; }
.tag.alt { border-radius: 999px; }
.tag-label { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin: 18px 0 8px; }

/* ---------- Feature cards ---------- */
.more { padding: 40px 0 100px; }
.section-head { text-align: center; max-width: 36em; margin: 0 auto 46px; }
.section-head h2 { font-size: clamp(36px, 5vw, 58px); }
.section-head p { color: var(--ink-soft); font-size: 18px; margin: 14px 0 0; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  position: relative; border-radius: 28px; overflow: hidden; padding: 26px 24px 0; color: #fff7ea;
  min-height: 470px; display: flex; flex-direction: column; box-shadow: var(--shadow);
  transition: transform 0.3s cubic-bezier(.3,1.5,.5,1);
}
.card::before { content: ""; position: absolute; inset: 0; background: inherit; filter: none; }
.card > * { position: relative; }
.card:nth-child(3n+1) { transform: rotate(-1.2deg); }
.card:nth-child(3n+3) { transform: rotate(1.2deg); }
.card:hover { transform: rotate(0) translateY(-8px); }
.card h3 { font-size: 27px; }
.card p { margin: 8px 0 22px; color: rgba(255, 247, 234, 0.85); font-size: 16px; line-height: 1.45; }
.card .phone { width: 72%; margin: auto auto -70px; transform: rotate(-4deg); transition: transform 0.35s cubic-bezier(.3,1.5,.5,1); }
.card:hover .phone { transform: rotate(0) translateY(-14px); }
.c-forest { background: var(--forest) url(/img/endpaper-forest.webp) center / 300px; }
.c-midnight { background: var(--midnight) url(/img/endpaper-midnight.webp) center / 300px; }
.c-oxblood { background: var(--oxblood) url(/img/endpaper-oxblood.webp) center / 300px; }
.c-gilt { background: #9a6a22 url(/img/endpaper-gilt.webp) center / 300px; }
.card.c-forest::after, .card.c-midnight::after, .card.c-oxblood::after, .card.c-gilt::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
}
.c-forest::after { background: linear-gradient(180deg, rgba(20, 45, 38, .82) 0 40%, rgba(20, 45, 38, .35)); }
.c-midnight::after { background: linear-gradient(180deg, rgba(16, 24, 40, .84) 0 40%, rgba(16, 24, 40, .35)); }
.c-oxblood::after { background: linear-gradient(180deg, rgba(70, 20, 18, .84) 0 40%, rgba(70, 20, 18, .35)); }
.c-gilt::after { background: linear-gradient(180deg, rgba(90, 58, 15, .86) 0 40%, rgba(90, 58, 15, .35)); }
.card > h3, .card > p, .card > .phone { z-index: 1; }

/* ---------- Stamps ---------- */
.stamps { padding: 30px 0 100px; }
.stamp-row { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; }
.stamp {
  width: 190px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; text-align: center;
  color: var(--accent); border: 3px solid var(--accent); outline: 2px solid var(--accent); outline-offset: -12px;
  font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-weight: 700; font-size: 22px; line-height: 1.05;
  padding: 26px; background: rgba(176, 58, 55, 0.04); mix-blend-mode: multiply;
}
.stamp small { display: block; font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-top: 6px; line-height: 1.3; }
.stamp:nth-child(1) { transform: rotate(-8deg); }
.stamp:nth-child(2) { transform: rotate(5deg); color: var(--forest); border-color: var(--forest); outline-color: var(--forest); }
.stamp:nth-child(3) { transform: rotate(-3deg); color: var(--midnight); border-color: var(--midnight); outline-color: var(--midnight); }
.stamp:nth-child(4) { transform: rotate(7deg); color: #9a6a22; border-color: #9a6a22; outline-color: #9a6a22; }
.reveal .stamp { opacity: 0; scale: 1.6; }
.reveal.in .stamp { animation: stampin 0.45s cubic-bezier(.2,1.4,.5,1) forwards; }
.reveal.in .stamp:nth-child(2) { animation-delay: .12s; }
.reveal.in .stamp:nth-child(3) { animation-delay: .24s; }
.reveal.in .stamp:nth-child(4) { animation-delay: .36s; }
@keyframes stampin { to { opacity: 1; scale: 1; } }

/* ---------- Final ---------- */
.final { position: relative; text-align: center; color: #fff7ea; padding: 120px 0 110px; background: var(--midnight) url(/img/endpaper-midnight.webp) center / 380px; overflow: hidden; }
.final::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 40%, rgba(30, 40, 60, .55), rgba(14, 20, 34, .9)); }
.final > * { position: relative; }
.final h2 { font-size: clamp(40px, 6vw, 72px); }
.final h2 em { color: #ffd38a; }
.final p { color: #d8dbe6; font-size: 18px; margin: 12px auto 28px; max-width: 30em; }
.sleepy { position: relative; width: 260px; margin: 0 auto 8px; }
.sleepy img { width: 100%; }
.zzz { position: absolute; right: 18%; top: 4%; font-family: var(--display); font-weight: 700; color: #ffd38a; font-size: 26px; }
.zzz span { position: absolute; opacity: 0; animation: zzz 3.6s ease-in infinite; }
.zzz span:nth-child(2) { animation-delay: 1.2s; font-size: .8em; }
.zzz span:nth-child(3) { animation-delay: 2.4s; font-size: .65em; }
@keyframes zzz { 0% { opacity: 0; transform: translate(0, 10px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(26px, -60px) rotate(15deg); } }
.final .note { font-size: 14px; color: #aeb4c6; margin-top: 18px; }
.final .tear path { fill: var(--paper); }

/* ---------- Footer ---------- */
footer { padding: 30px 0 46px; color: var(--ink-soft); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
footer a { color: var(--ink-soft); margin-right: 16px; }
footer .brand { font-size: 18px; }
footer .brand img { width: 26px; height: 26px; border-radius: 7px; }

/* ---------- Reveal on scroll ---------- */
.rise { opacity: 0; translate: 0 28px; transition: opacity .7s ease, translate .7s cubic-bezier(.2,1,.3,1); }
.rise.in { opacity: 1; translate: 0 0; }

/* ---------- Legal and support pages ---------- */
.doc { max-width: 720px; padding: 34px 20px 64px; margin: 0 auto; }
.doc h1 { font-size: clamp(38px, 5.5vw, 54px); margin: 12px 0 8px; }
.doc h2 { font-size: 26px; margin: 36px 0 8px; }
.doc .meta { color: var(--ink-soft); font-size: 15px; margin-bottom: 26px; }
.doc .short { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; }
.doc li { margin-bottom: 6px; }
.doc p, .doc li { overflow-wrap: anywhere; }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .callouts { grid-template-columns: 1fr; }
  .callouts .phone { order: -1; margin: 0 auto 10px; width: 240px; }
  .cards { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .card, .card:nth-child(3n+1), .card:nth-child(3n+3) { transform: none; }
  .dress-grid { grid-template-columns: 1fr; text-align: center; }
  .dress p.sub { margin-left: auto; margin-right: auto; }
  .tags { justify-content: center; }
  .stage { max-width: 380px; }
  .top nav a.hide-m { display: none; }
}
@media (max-width: 700px) {
  .hero { padding-top: 34px; }
  .scene { aspect-ratio: 4 / 3; background-position: 78% center; border-radius: 24px; }
  .scene canvas { left: -6%; height: 84%; top: 14%; }
  .bubble { left: auto; right: 5%; top: 9%; max-width: 11em; }
  .bubble::after { left: 18px; bottom: -11px; transform: rotate(-45deg); }
  .fan { margin-bottom: -110px; }
  .phone { width: 150px; border-radius: 26px; padding: 5px; }
  .phone img { border-radius: 22px; }
  .fan .phone { margin: 0 -26px; }
  .fan .phone:nth-child(1), .fan .phone:nth-child(5) { display: none; }
  .marbled { padding-top: 160px; }
  .stamp { width: 150px; font-size: 18px; padding: 18px; }
  .stamp small { font-size: 11px; }
  .appstore img { height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rise, .reveal .stamp { opacity: 1; translate: 0 0; scale: 1; }
  .squiggle path { stroke-dashoffset: 0; }
}

/* fixes */
.marbled > .tear, .final > .tear { position: absolute; }
.stage canvas { inset: auto; left: 9%; top: 2%; width: 92%; height: 92%; }
html, body { overflow-x: clip; }
.hero { overflow-x: clip; }
@media (max-width: 700px) {
  .tap-hint { display: none; }
  .float { display: none; }
  .scene { aspect-ratio: 1 / 1; }
  .scene canvas { left: -4%; top: 22%; height: 72%; }
  .bubble { top: 7%; }
}
.scene .margo-ph { position: absolute; height: 92%; aspect-ratio: 1; left: 20%; top: 10.5%; width: auto; }
.stage .margo-ph { position: absolute; left: 9%; top: 2%; width: 92%; height: 92%; }
.margo-ph { transition: opacity .3s; pointer-events: none; }
.margo-ph.gone { opacity: 0; }
@media (max-width: 700px) { .scene .margo-ph { left: -4%; top: 22%; height: 72%; } }

/* ---------- Header: Free tools menu (a <details>, so it works without scripts) ---------- */
.tools-menu { position: relative; }
.tools-menu summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; white-space: nowrap;
  color: var(--ink); font-size: 15px; font-weight: 650; padding: 8px 12px; border-radius: 999px;
}
.tools-menu summary::-webkit-details-marker { display: none; }
.tools-menu summary::after {
  content: ""; width: 7px; height: 7px; margin-top: -3px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .2s;
}
.tools-menu[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.tools-menu summary:hover, .tools-menu[open] summary { background: var(--paper-2); }
.tools-menu summary:focus-visible { outline: 3px solid #ffd38a; outline-offset: 2px; }
.tools-pop {
  position: absolute; right: 0; top: calc(100% + 12px); width: 290px; padding: 8px; z-index: 60;
  background: var(--card); border: 2px solid var(--ink); border-radius: 18px; box-shadow: 4px 6px 0 rgba(43, 33, 27, .25);
  animation: popin .18s cubic-bezier(.3,1.5,.5,1);
}
@keyframes popin { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.top nav .tools-pop a { display: block; padding: 10px 12px; border-radius: 12px; color: var(--ink); background: none; font-size: 15px; }
.top nav .tools-pop a:hover, .top nav .tools-pop a:focus-visible { background: var(--paper-2); }
.top nav .tools-pop a[aria-current="page"] { background: #ffd38a; }
.tools-pop b { display: block; font-weight: 650; }
.tools-pop span { display: block; font-size: 13px; font-weight: 500; color: var(--ink-soft); margin-top: 1px; }
.top nav .tools-pop a[aria-current="page"] span { color: #4f4237; }
@media (max-width: 480px) {
  .top-inner { padding-left: 10px; }
  .top nav { gap: 2px; }
  .brand { font-size: 18px; gap: 6px; flex: none; }
  .brand img { width: 28px; height: 28px; }
  .tools-menu summary { font-size: 13.5px; padding: 8px 8px; gap: 4px; }
  .tools-menu summary::after { width: 5px; height: 5px; }
  .tools-menu { position: static; }
  .tools-pop { left: 12px; right: 12px; width: auto; top: calc(100% + 8px); }
  .top nav a.get { padding: 9px 12px; font-size: 13.5px; white-space: nowrap; }
}
/* Narrow phones: "Tools" instead of "Free tools", so the logo keeps its room */
@media (max-width: 370px) { .ft-free { display: none; } .tools-menu summary { text-transform: capitalize; } }

/* ---------- Home: goal calculator band ---------- */
.goal-band { padding: 10px 0 90px; }
.goal-card {
  position: relative; display: grid; grid-template-columns: 260px 1fr; gap: 34px; align-items: center;
  max-width: 940px; margin: 0 auto; padding: 34px 40px; border-radius: 28px; color: #fff7ea; overflow: hidden;
  background: var(--forest) url(/img/endpaper-forest.webp) center / 300px; box-shadow: var(--shadow);
}
.goal-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, rgba(20, 45, 38, .9), rgba(20, 45, 38, .72)); }
.goal-card > * { position: relative; }
.goal-card img { width: 100%; transform: rotate(-3deg); }
.goal-card .kicker { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #ffd38a; }
.goal-card h2 { font-size: clamp(30px, 4vw, 46px); }
.goal-card h2 em { color: #ffd38a; }
.goal-mini { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 20px 0 12px; }
.goal-mini label { display: flex; white-space: nowrap; align-items: center; gap: 10px; font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-size: 22px; font-weight: 600; }
.goal-mini input {
  width: 3.4em; font: inherit; font-size: 30px; text-align: center; color: var(--accent); background: var(--card);
  border: 2px solid var(--ink); border-radius: 12px; padding: 0 4px; box-shadow: 3px 3px 0 rgba(0, 0, 0, .35); -moz-appearance: textfield;
}
.goal-mini input::-webkit-inner-spin-button, .goal-mini input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.goal-mini input:focus { outline: 3px solid #ffd38a; outline-offset: 2px; }
.btn-mini {
  font: 650 16px var(--sans); color: var(--ink); background: #ffd38a; border: 0; border-radius: 999px; padding: 12px 22px;
  box-shadow: 0 3px 0 #9a6a22; cursor: pointer; transition: transform .15s;
}
.btn-mini:hover { transform: translateY(-2px); }
.goal-hint { margin: 0; color: #dfe9e2; font-size: 15.5px; }
.goal-hint b { color: #fff7ea; }
.goal-hint + .goal-hint { margin-top: 6px; }
.goal-hint a { color: #ffd38a; font-weight: 650; text-underline-offset: 3px; }
@media (max-width: 760px) {
  .goal-card { grid-template-columns: 1fr; text-align: center; padding: 26px 20px 28px; gap: 10px; }
  .goal-card img { width: 180px; margin: 0 auto; }
  .goal-mini { justify-content: center; }
  .goal-mini label { font-size: 19px; gap: 8px; }
  .goal-mini input { font-size: 26px; }
}
