/* KindScroll — support microsite
 *
 * Palette taken from the app's own theme, not re-picked by eye:
 *   cream ground   #F7F1E8   (FlutterFlowTheme primaryBackground)
 *   surface        #FFFDF8
 *   ink            #2F2925
 *   ink-muted      #6F625A
 *   sage tint      #ECF1EA   (the Sage card ground)
 *   lavender tint  #F0EDF5   (the Lavender card ground)
 *   emergency      #8D3030
 *
 * Interactive elements use #4A6350 rather than the app's #5F7A5F. The lighter
 * sage measures 4.22:1 on cream — large text only. #4A6350 measures 5.86:1,
 * and white on it measures 6.47:1. Every pair below was computed, not guessed.
 *
 * Fonts are system stacks. The app's Fraunces and DM Sans are OFL, and the OFL
 * requires the licence text to travel with the fonts; that text is not in this
 * repository, so they are deliberately not redistributed here. See
 * CLOUDFLARE_UPLOAD_README.txt if you want to add them later.
 */

:root {
  --ground: #f7f1e8;
  --surface: #fffdf8;
  --ink: #2f2925;
  --ink-muted: #6f625a;
  --sage: #4a6350;
  --sage-tint: #ecf1ea;
  --sage-line: #c4ccbd;
  --lavender-tint: #f0edf5;
  --apricot-tint: #faf0e6;
  --emergency: #8d3030;
  --line: #e3d9cb;

  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino,
    "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --measure: 34rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;

  /* Reserve the scrollbar every page, whether that page scrolls or not.

     `.wrap` centres with `margin: 0 auto`, so it centres inside whatever width
     the viewport currently has. On a page long enough to scroll, a 15px
     scrollbar takes that width away; on a page short enough not to, it does
     not. The shell then sits 7px further right on the short page — logo,
     wordmark, nav, content and footer all together — and switching between
     pages visibly jumps.

     The support chooser is the only page in the site short enough to show
     this, which is why it looked like a support-page defect. It was not: the
     markup was already identical. Home, Privacy and Terms simply always
     scroll, so they always agree with each other.

     overflow-y carries every browser; scrollbar-gutter lets modern ones
     reserve the space without painting a permanently visible track. */
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- skip link */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--sage);
  color: var(--surface);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 12px 0;
  z-index: 10;
}

.skip:focus {
  left: 0;
}

/* ------------------------------------------------------------------- layout */

.wrap {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

main {
  padding-bottom: 4rem;
  /* Home and Terms print the stores' subscription pages as link text
     (play.google.com/store/account/subscriptions). On a 320px phone a string
     that long may not fit on one line, and an unbreakable word pushes the
     page sideways. This breaks only a word that would overflow; everything
     else wraps exactly as before. */
  overflow-wrap: break-word;
}

/* ------------------------------------------------------------------ masthead */

.masthead {
  /* Vertical only, as longhand. The shorthand `padding: 2rem 0 1.5rem` also set
     the horizontal padding to 0, and because `.masthead` is declared after
     `.wrap` at equal specificity it won — so the header lost `.wrap`'s
     `0 1.25rem` on every page.

     On desktop that is invisible: `.wrap` hits its max-width and centres, so
     the lost padding sits inside the centred column. On a phone `.wrap` spans
     the viewport, and the logo and nav end up flush against the screen edge
     while the page body, which keeps its padding, sits 20px in.

     Physical review reported this as a Home defect. It was not — Home, Support,
     Privacy and Terms all measured headerPadL 0px with logo and nav at x=0.
     Home simply shows it most, because its hero headline sits directly beneath
     the header and the misalignment between the two is obvious. */
  padding-top: 2rem;
  padding-bottom: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: block;
  /* The mark's own background is the same cream as the page, so without a
     tile the apricot wave at its foot reads as a smudge floating next to the
     wordmark rather than as part of an app icon. */
  background: var(--surface);
  border: 1px solid var(--line);
}

.brand span {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------- nav */

nav.site {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 1.25rem;
}

nav.site ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

nav.site a {
  display: inline-block;
  padding: 0.85rem 0;
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.97rem;
}

nav.site a:hover,
nav.site a:focus-visible {
  color: var(--sage);
  text-decoration: underline;
  text-underline-offset: 3px;
}

nav.site a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

/* ---------------------------------------------------------------- typography */

h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.85rem, 5.5vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 2.25rem 0 0.75rem;
  max-width: var(--measure);
}

h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.25rem, 3.6vw, 1.5rem);
  line-height: 1.3;
  margin: 2.5rem 0 0.6rem;
  max-width: var(--measure);
}

h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin: 1.75rem 0 0.4rem;
  max-width: var(--measure);
}

p,
ul,
ol {
  max-width: var(--measure);
}

p {
  margin: 0 0 1rem;
}

.lede {
  font-size: 1.1rem;
  color: var(--ink-muted);
  max-width: var(--measure);
}

ul,
ol {
  padding-left: 1.15rem;
  margin: 0 0 1rem;
}

li {
  margin-bottom: 0.45rem;
}

a {
  color: var(--sage);
  text-underline-offset: 3px;
}

a:hover,
a:focus-visible {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
  border-radius: 3px;
}

strong {
  font-weight: 600;
}

.meta {
  color: var(--ink-muted);
  font-size: 0.92rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

/* ------------------------------------------------------------------- cards */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.4rem 1.5rem;
  margin: 1.5rem 0;
  max-width: var(--measure);
}

.card :first-child {
  margin-top: 0;
}

.card :last-child {
  margin-bottom: 0;
}

.card.sage {
  background: var(--sage-tint);
  border-color: var(--sage-line);
}

.card.lavender {
  background: var(--lavender-tint);
  border-color: #ded6e6;
}

.card.notice {
  background: var(--apricot-tint);
  border-color: #ecdcc6;
}

.card.notice h2,
.card.notice h3 {
  color: var(--emergency);
  margin-top: 0;
}

/* --------------------------------------------------------------- contact box */

.contact {
  display: block;
  background: var(--surface);
  border: 1px solid var(--sage-line);
  border-radius: 18px;
  padding: 1.15rem 1.4rem;
  margin: 1.5rem 0;
  max-width: var(--measure);
  text-decoration: none;
  color: inherit;
}

.contact:hover,
.contact:focus-visible {
  border-color: var(--sage);
}

.contact .label {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.2rem;
}

.contact .value {
  font-size: 1.06rem;
  color: var(--sage);
  font-weight: 600;
  word-break: break-word;
}

/* -------------------------------------------------------------- home tiles */

.tiles {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 0.85rem;
  max-width: var(--measure);
}

.tiles a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.05rem 1.25rem;
  text-decoration: none;
  color: var(--ink);
}

.tiles a:hover,
.tiles a:focus-visible {
  border-color: var(--sage);
}

.tiles .t {
  display: block;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.tiles .d {
  display: block;
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ------------------------------------------------------------------- footer */

footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0 3rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.35rem;
}

footer a {
  color: var(--ink-muted);
}

/* The four footer destinations are real navigation, so they need a target you
   can hit with a thumb. As bare inline anchors they were about 20px tall
   against the header nav's 53px — legible, but a poor tap target on a phone.
   Scoped to the list so the meta line and any prose links are untouched. */
footer ul a {
  display: inline-block;
  padding: 0.7rem 0;
}

footer a:hover,
footer a:focus-visible {
  color: var(--sage);
}

/* -------------------------------------------------------------------- 320px */

@media (max-width: 22.5rem) {
  body {
    font-size: 16px;
  }

  .wrap {
    padding: 0 1rem;
  }

  .card,
  .contact {
    padding: 1.1rem 1.15rem;
    border-radius: 16px;
  }

  nav.site ul {
    gap: 0 1.1rem;
  }
}

/* ------------------------------------------------------- reduced motion / print */

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  nav.site,
  footer ul {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .card,
  .contact {
    border-color: #999;
  }
}
