/* Plain copy blocks. Every block follows the theme, exactly like the hero: light in light mode, dark in dark mode. */
.copy-block { padding: clamp(64px, 10vw, 120px) 0; background: var(--bg); color: var(--ink); }
html[data-theme="dark"] .copy-block {
  color-scheme: dark;
  --bg: #171c21; --bg-alt: #202830; --surface: #252e36; --ink: #f5f3ef; --muted: #c0c8cd;
  --line: rgba(219, 229, 232, .19); --rose: #8bc27b;
}
html:not([data-theme="dark"]) .copy-block {
  color-scheme: light;
  --bg: #f0efeb; --bg-alt: #e6e9e8; --surface: #fffefa; --ink: #283038; --muted: #5e666b;
  --line: rgba(48, 60, 66, .2); --rose: #973f53;
}
.copy-block { --gutter: clamp(14px, 5vw, 32px); } /* side margins shrink with the screen */
.copy-block .copy { width: min(calc(100% - var(--gutter) * 2), 720px); margin-inline: auto; }
.copy-block h1, .copy-block h2 { font-family: "Iowan Old Style", Baskerville, Georgia, serif; font-weight: 500; letter-spacing: -.035em; line-height: 1.08; }
.copy-block h1 { font-size: clamp(2.8rem, 8vw, 5.2rem); }
.copy-block h2 { font-size: clamp(2rem, 5vw, 3.2rem); }
.copy-block .eyebrow { margin-bottom: 14px; color: var(--rose); font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.copy-block h1 + p { margin-top: 20px; }
.copy-block h2 + p { margin-top: 22px; }
.copy-block p { max-width: 62ch; font-size: 1.12rem; color: var(--muted); }
.copy-block p + p { margin-top: 16px; }
.copy-block ul { margin: 22px 0 0; padding-left: 1.2em; }
.copy-block li { margin: 10px 0; color: var(--muted); font-size: 1.08rem; line-height: 1.55; }
.copy-block li strong, .copy-block dt, .copy-block .q { color: var(--ink); }
.copy-block .qa + .qa { margin-top: 26px; }
.copy-block .q { display: block; margin-bottom: 6px; font-size: 1.12rem; font-weight: 650; }
.copy-block .qa p { margin: 0; }
.copy-block .store-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.copy-block .fine { margin-top: 18px; font-size: .98rem; }
.copy-block h2 + .qa { margin-top: 30px; }

.copy-block { scroll-margin-top: 84px; }

/* Dock floats over the first block instead of reserving its own band. */
.site-header { margin-bottom: -72px; }
@media (max-width: 860px) { .site-header { margin-bottom: -68px; } }
main > .copy-block:first-child { padding-top: calc(clamp(64px, 10vw, 120px) + 56px); }

.copy-block h1 { margin-bottom: 0; }


/* Official store badges: the black one on light backgrounds, the white one on dark backgrounds */
.copy-block .store-link { display: block; flex: none; min-height: 0; padding: 0; border: 0; border-radius: 8px; background: none; box-shadow: none; line-height: 0; transition: transform .18s ease, filter .18s ease; }
.copy-block .store-link .sb { display: block; height: 52px; width: auto; }
.copy-block .store-link .sb-ondark { display: none; }
html[data-theme="dark"] .copy-block .store-link .sb-onlight { display: none; }
html[data-theme="dark"] .copy-block .store-link .sb-ondark { display: block; }
.copy-block .store-link:hover, .copy-block .store-link:focus-visible { transform: translateY(-3px); filter: drop-shadow(0 10px 14px rgb(0 0 0 / .28)); }
.copy-block .store-link:active { transform: translateY(0) scale(.97); }
.copy-block .store-link:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .copy-block .store-link:hover, .copy-block .store-link:focus-visible { transform: none; } }

/* Header anchor-link labels: regular weight */
.nav-links a, .nav-links a[aria-current] { font-weight: 400; }

/* Phones: the two badges share the full width */
@media (max-width: 500px) {
  .copy-block .store-links { flex-direction: row; flex-wrap: nowrap; align-items: stretch; width: 100%; justify-self: stretch; }
  .copy-block .store-links .store-link { flex: 1 1 0; min-width: 0; }
  .copy-block .store-links .store-link .sb { width: 100%; height: auto; aspect-ratio: 3 / 1; }
}

/* ---- Header: no border; hover and the current page show a primary-colour semicircle sitting on the very bottom edge ---- */
.site-header .nav-shell { border: 0; }
.nav-stores { display: none; }
@media (min-width: 761px) {
  .site-header .nav-links a::after, .site-header .nav-links a:hover::after {
    inset: auto; left: 50%; bottom: -8px; z-index: 0; width: 30px; height: 15px; border-radius: 15px 15px 0 0; background: var(--rose);
    opacity: 0; transform: translateX(-50%) scaleY(.2); transform-origin: 50% 100%;
    transition: opacity .2s ease, transform .38s cubic-bezier(.3, 1.4, .5, 1);
  }
  .site-header .nav-links a:hover::after, .site-header .nav-links a[aria-current]::after { opacity: 1; transform: translateX(-50%) scaleY(1); }
  .site-header .nav-links a[aria-current], .site-header .nav-links a[aria-current="true"] { background: transparent; box-shadow: none; }
}

/* ---- Mobile menu: no expanding group or expanding panel, a left-edge semicircle marks the current item, store badges at the bottom ---- */
@media (max-width: 760px) {
  .site-header .nav-links .nav-feature-pages { display: none; }
  .site-header .nav-links.is-open { animation: nav-fade .18s ease-out; }
  @keyframes nav-fade { from { opacity: 0; } }
  .site-header .nav-links a[aria-current], .site-header .nav-links a[aria-current="true"] { background: transparent; box-shadow: none; }
  .site-header .nav-links a::after, .site-header .nav-links a:hover::after {
    inset: auto; left: -10px; top: 50%; bottom: auto; z-index: 0; width: 9px; height: 26px; border-radius: 0 26px 26px 0; background: var(--rose);
    opacity: 0; transform: translateY(-50%) scaleX(.2); transform-origin: 0 50%; transition: opacity .2s ease, transform .3s cubic-bezier(.3, 1.4, .5, 1);
  }
  .site-header .nav-links a:hover::after, .site-header .nav-links a[aria-current]::after { opacity: 1; transform: translateY(-50%); }
  .site-header .nav-links .nav-stores { display: flex; gap: 10px; margin: 10px 3px 4px; padding-top: 14px; }
  .site-header .nav-links .nav-stores a { flex: 1 1 0; min-width: 0; min-height: 0; padding: 0; border-radius: 8px; background: none; box-shadow: none; line-height: 0; }
  .site-header .nav-links .nav-stores a::after { display: none; }
  .nav-stores .sb { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; }
  .nav-stores .sb-ondark { display: none; }
  html[data-theme="dark"] .nav-stores .sb-onlight { display: none; }
  html[data-theme="dark"] .nav-stores .sb-ondark { display: block; }
  .nav-stores a:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
}
@media (prefers-reduced-motion: reduce) { .site-header .nav-links.is-open { animation: none; } .site-header .nav-links a::after { transition: none; } }

/* Spacing rhythm: headline to text 16px, text to what follows 32px (all sections). */
.copy-block h1 + p, .copy-block h2 + p, .slide .copy h2 + p, .chaos .chaos-copy { margin-top: 16px; }
.copy-block p + ul, .copy-block p + .store-links, .copy-block h2 + .qa, .copy-block .duo-cards,
.slide .copy ul, .copy-block .store-links { margin-top: 32px; }
.copy-block .copy > p + ul, .slide .copy p + ul { margin-top: 32px; }
.copy-block .duo-cards { margin-top: 32px; }
.copy-block .duo-card .duo-body ul.duo-trial { margin-top: 12px; }
.duo-mark { margin-bottom: 24px; }

/* FAQ accordion: collapsed = outline only, open = softly filled card */
.copy-block details.qa { margin: 0; border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent); border-radius: 16px; background: transparent; transition: background-color .25s, border-color .25s; }
.copy-block details.qa + details.qa { margin-top: 10px; }
.copy-block details.qa[open] { background: color-mix(in srgb, var(--ink) 5%, var(--bg)); border-color: color-mix(in srgb, var(--ink) 5%, var(--bg)); }
.copy-block details.qa > summary.q { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; padding: 18px 20px; cursor: pointer; list-style: none; }
.copy-block details.qa > summary.q::-webkit-details-marker { display: none; }
.copy-block details.qa > summary.q:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; border-radius: 16px; }
.copy-block details.qa > p { margin: 0; padding: 0 20px 20px; }
.qa-ic { position: relative; flex: none; width: 16px; height: 16px; }
.qa-ic::before, .qa-ic::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; border-radius: 2px; background: var(--rose); transition: transform .25s; }
.qa-ic::after { transform: rotate(90deg); }
details.qa[open] .qa-ic::after { transform: rotate(0); }
@media (prefers-reduced-motion: reduce) { .copy-block details.qa, .qa-ic::before, .qa-ic::after { transition: none; } }
.copy-block h2 + details.qa { margin-top: 32px; }

/* Shared-space cards settle in the centre; the download block is centred with 80px between sections */
.copy-block .duo-card:nth-child(odd), .copy-block .duo-card:nth-child(even) { margin-inline: auto; }
.duo { padding-bottom: 40px; }
#download { padding-top: 40px; text-align: center; }
#download h2 { margin-inline: auto; text-wrap: balance; }
#download .store-links { justify-content: center; }
html.js #download .rv { transition-delay: var(--d, 0s); }
.copy-block details.qa > summary.q { -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
.copy-block details.qa > summary.q:focus:not(:focus-visible) { outline: none; }
.copy-block details.qa > summary.q::selection, .copy-block details.qa > summary.q *::selection { background: transparent; }
#download .dl-note { margin: 16px auto 0; max-width: 34rem; font-size: .98rem; line-height: 1.5; text-wrap: balance; }
html.js #download .dl-note { transition-delay: var(--d, 0s); }
#download .dl-note strong { font-weight: 700; color: var(--ink); }

/* FAQs: 124px below the download caption; the title and each question rise in one after another */
#download { padding-bottom: 0; }
#questions { padding-top: 124px; }
html.js #questions h2.rv { transition-delay: 0s; }
html.js #questions details.qa.rv { transition: opacity .9s cubic-bezier(.2, .7, .2, 1) var(--d, 0s), transform 1s cubic-bezier(.2, .7, .2, 1) var(--d, 0s), background-color .25s, border-color .25s; }
html.js #questions details.qa.rv.in { transition-delay: var(--d, 0s), var(--d, 0s), 0s, 0s; }

/* Download title: same entrance as the hero headline, a slide in, then a warm shimmer runs through the words with sparkles. */
html.js #download h2.dl-title.rv { opacity: 0; transform: none; transition: none; }
html.js #download h2.dl-title.rv.in { animation: dl-slide 1.2s cubic-bezier(.22, .7, .2, 1) both; }
@keyframes dl-slide { 0% { opacity: 0; transform: translateX(-.9em); } 55% { opacity: 1; } 100% { opacity: 1; transform: none; } }
#download .hl { position: relative; display: inline-block; }
#download .hl .w { --shine: #f0b323; --wd: calc(.9s + var(--i) * .3s); display: inline-block; transform-origin: 50% 80%; }
html[data-theme="dark"] #download .hl .w { --shine: #ffd54a; }
html.js #download .dl-title.in .hl .w {
  background: linear-gradient(105deg, var(--ink) 0 30%, var(--shine) 50%, var(--ink) 70% 100%) 0 0 / 300% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
  animation: hn-shimmer 1.4s cubic-bezier(.4, 0, .3, 1) var(--wd) both, hn-pop 1.1s ease-in-out var(--wd) both;
}
#download .hl-a { --sd0: 1.1s; }
#download .hl-b { --sd0: 1.8s; }
#download .hl .sp { display: none; }
html.js #download .dl-title.in .hl .sp {
  display: block; position: absolute; width: .3em; height: .3em; margin: -.15em 0 0 -.15em; pointer-events: none; opacity: 0;
  left: var(--px); top: var(--py);
  filter: drop-shadow(0 0 .12em #ffd54a) drop-shadow(0 0 .3em rgb(255 200 60 / .7));
  animation: hn-spark 1s ease-out calc(var(--sd0) + var(--pd)) both;
}
#download .hl .sp::before { content: ""; position: absolute; inset: 0; background: #fff7d1; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); }
@media (max-width: 520px) { .dl-br { display: none; } #download .hl { display: block; text-wrap: balance; } html.js #download .dl-title.in .hl .sp { display: none; } }
@media (prefers-reduced-motion: reduce) {
  html.js #download h2.dl-title.rv { opacity: 1; }
  html.js #download h2.dl-title.rv.in, html.js #download .dl-title.in .hl .w { animation: none; background: none; -webkit-text-fill-color: currentColor; color: inherit; }
  html.js #download .dl-title.in .hl .sp { display: none; }
}

/* Footer: store badges under the tagline */
.footer-stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.footer-stores .store-link { display: block; flex: none; line-height: 0; border-radius: 8px; transition: transform .18s ease; }
.footer-stores .store-link:hover { transform: translateY(-2px); }
.footer-stores .sb { display: block; height: 40px; width: auto; }
.footer-stores .sb-ondark { display: none; }
html[data-theme="dark"] .footer-stores .sb-onlight { display: none; }
html[data-theme="dark"] .footer-stores .sb-ondark { display: block; }
.site-footer .footer-stores .store-link { min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; }
/* background-clip:text only paints inside the word's box, so give the box room for descenders (g, p, y) */
#download .hl .w { padding-bottom: .22em; margin-bottom: -.22em; }
/* Phones: the title and caption run the full width of the buttons row. */
@media (max-width: 520px) {
  #download .copy { container-type: inline-size; }
  #download h2.dl-title { font-size: calc(100cqw / var(--dl-fit, 9.75)); line-height: 1.12; } /* refined by the script below with the real font */
  #download .hl { white-space: nowrap; }
  #download .dl-note { max-width: none; text-wrap: pretty; }
}

/* Dark mode uses the app's primary green, never pink */
html[data-theme="dark"] { --rose: #8bc27b; --rose-face: #8bc27b; }
html[data-theme="dark"] .button-primary, html[data-theme="dark"] .metrics-allow {
  background: linear-gradient(164deg, #99c98b, #8bc27b 65%, #80b371); color: #10200c;
  box-shadow: 0 5px 14px rgba(14, 30, 10, .28), inset 0 1px rgba(255, 255, 255, .24);
}
html[data-theme="dark"] .button-primary:hover { box-shadow: 0 9px 20px rgba(14, 30, 10, .34), inset 0 1px rgba(255, 255, 255, .24); }
html[data-theme="dark"] .feature-tab-marker, html[data-theme="dark"] .plan-count { background: #8bc27b; color: #10200c; }
html[data-theme="dark"] .calendar-tear span, html[data-theme="dark"] .kept-poll strong, html[data-theme="dark"] .download-card em { color: #8bc27b; }
