/* Extracted verbatim from scrollcraft/originals/home.html (the live page's own CSS).
   Only the page chrome is kept: tokens, banners, nav + mobile drawer, sticky bar,
   phone frame, footer, subscribe modal. The page body is restyled in page.css. */

/* ---------- Tokens ---------- */
  :root{
    /* === Apple page-width tokens (2026-08-12) =============================
       Apple's content well is 980px with 22px gutters stepping to 16px at
       833px. We are border-box, so the TOKEN is the CONTENT measure and each
       max-width is derived: outer = content + 2 x gutter. Frames carry the
       gutter; unpadded MEASURES take the content token directly.
       Plan + 5-round Codex/Grok review:
       CareHaven-blog/docs/PLAN-site-width-apple-standard.md */
    --page-content:980px;
    --prose-content:840px;
    --gutter:22px;

    --bg:#FAF6F0;
    --bg-raised:#FFFFFF;
    --bg-subtle:#F4EFE7;
    --text:#2C2621;
    --text-2:#534A42;
    --text-3:#6B5F55;
    --bd:#EDE8E3;
    --bd-2:#D9D1C4;
    --hv:#7A8B5C;
    --hv-d:#5E6E45;
    --hv-l:#EEF2E5;
    --hv-l2:#E4EBD6;
    --amber:#C08B5C;
    --amber-l:#FBF0E6;
    --coral:#C25B4D;
    --coral-l:#FBEAE6;
    --coral-t:#9E3F33; /* coral for small text: 5.61:1 on --coral-l, 6.54:1 on white */
    --sky:#6B8CAE;
    --sky-l:#E7EEF6;
    --blossom:#D88BA1;
    --blossom-l:#FBEAEF;
    --shadow-sm:0 1px 2px rgba(44,38,33,.04), 0 4px 12px rgba(44,38,33,.05);
    --shadow-md:0 4px 12px rgba(44,38,33,.06), 0 16px 40px rgba(44,38,33,.08);
    --shadow-lg:0 8px 24px rgba(44,38,33,.08), 0 24px 64px rgba(44,38,33,.12);
    --nav-bg:rgba(250,246,240,.92);
    --radius:14px;
    --radius-lg:22px;
    --font-display:'Brygada 1918',Georgia,'Times New Roman',serif;
    --font-body:'Lexend',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  }
  @media (max-width:833px){ :root{ --gutter:16px } }
  html[data-theme="dark"]{
    --bg:#1C1B18;
    --bg-raised:#262420;
    --bg-subtle:#2D2B27;
    --text:#F2EDE6;
    --text-2:#C0B8AE;
    --text-3:#A9A198;
    --bd:#36332F;
    --bd-2:#48433D;
    --hv:#9DAE7A;
    --hv-d:#B8C68F;
    --hv-l:#2B3520;
    --hv-l2:#36402A;
    --amber-l:#3A2D20;
    --coral-l:#3A201D;
    --coral-t:#F0A99F; /* 7.75:1 on --coral-l, 8.03:1 on --bg-raised */
    --sky-l:#1F2A37;
    --blossom-l:#3A2027;
    --shadow-sm:0 1px 2px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.4);
    --shadow-md:0 4px 12px rgba(0,0,0,.4), 0 16px 40px rgba(0,0,0,.5);
    --shadow-lg:0 8px 24px rgba(0,0,0,.5), 0 24px 64px rgba(0,0,0,.6);
    --nav-bg:rgba(28,27,24,.92);
  }

  
/* ---------- Reset (the original's, minus its page-level type rules) ---------- */
*{box-sizing:border-box;margin:0;padding:0}
img{max-width:100%;display:block}
button{font-family:var(--font-body);border:none;background:none;cursor:pointer;color:inherit}
a{font-family:var(--font-body);color:var(--hv-d);text-decoration:none;font-weight:600}
a:hover{color:var(--hv)}

  .container{max-width:calc(var(--page-content) + 2 * var(--gutter));margin:0 auto;padding-inline:max(var(--gutter),env(safe-area-inset-left)) max(var(--gutter),env(safe-area-inset-right))}


/* ---------- Banner ---------- */
  .pre-release-banner{
    font-family:var(--font-body);
    background:linear-gradient(180deg, var(--amber-l), var(--bg-subtle));
    color:var(--text-2);
    text-align:center;
    padding:10px 20px;
    font-size:13.5px;
    font-weight:600;
    border-bottom:1px solid var(--bd);
  }
  .pre-release-banner a{margin-left:6px}

  /* ---------- Unsupported-iPhone banner ----------
     Hidden by default; revealed via JS when the user-agent looks
     like iOS < 17 (the deployment-target floor). Coral tint signals
     "important read" without being alarmist; the dismiss × is a
     localStorage flag so the message doesn't repeat after first
     acknowledgment. */
  .unsupported-banner{
    font-family:var(--font-body);
    display:none;
    position:relative;
    background:linear-gradient(180deg, var(--coral-l), var(--bg-subtle));
    color:var(--text);
    padding:14px 56px 14px 20px;
    font-size:14px;
    line-height:1.5;
    text-align:center;
    border-bottom:1px solid var(--bd);
  }
  .unsupported-banner.is-visible{ display:block; }
  .unsupported-banner strong{ font-family:var(--font-body); color:var(--coral); font-weight:800 }
  .unsupported-banner .ub-row{
    max-width:780px;
    margin:0 auto;
  }
  .unsupported-banner a{
    font-family:var(--font-body);
    color:var(--hv);
    font-weight:700;
    text-decoration:underline;
    margin-left:4px;
  }
  .unsupported-banner .ub-close{
    position:absolute;
    top:50%; right:12px;
    transform:translateY(-50%);
    width:32px; height:32px;
    border:0; background:transparent;
    color:var(--text-2);
    font-size:18px; line-height:1;
    cursor:pointer; border-radius:8px;
  }
  .unsupported-banner .ub-close:hover{
    background:var(--bd);
  }

  /* ---------- Nav ---------- */
  .nav{
    position:sticky;
    top:0;
    z-index:50;
    backdrop-filter:saturate(160%) blur(16px);
    -webkit-backdrop-filter:saturate(160%) blur(16px);
    background:var(--nav-bg);
    border-bottom:1px solid var(--bd);
  }
  .nav-inner{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding-block:14px;
    padding-inline:max(var(--gutter),env(safe-area-inset-left)) max(var(--gutter),env(safe-area-inset-right));
    max-width:calc(var(--page-content) + 2 * var(--gutter));
    margin:0 auto;
  }
  .brand{
    display:flex;
    align-items:center;
    gap:10px;
    font-family:var(--font-display);
    font-weight:600;
    font-size:20px;
    letter-spacing:-.01em;
  }
  .brand-mark{
    width:32px;
    height:32px;
    background:transparent;
    display:inline-block;
    flex:none;
  }
  .brand-mark img{
    width:100%;
    height:100%;
    display:block;
  }
  .brand-tag{
    font-family:var(--font-body);
    font-size:10px;
    font-weight:700;
    letter-spacing:1px;
    text-transform:uppercase;
    color:var(--amber);
    background:var(--amber-l);
    border-radius:999px;
    padding:3px 9px;
    margin-left:6px;
  }
  .nav-links{display:flex;gap:22px;align-items:center}
  .nav-menu-links{display:contents}
  @media (min-width:1024px){
    .nav-links{flex:1}
    .nav-menu-links{display:flex;align-items:center;flex:1;justify-content:space-evenly}
  }
  .nav-links a{
    font-family:var(--font-body);
    color:var(--text-2);
    font-weight:500;
    font-size:14.5px;
    transition:color .15s;
    white-space:nowrap; /* the suite nav gained an item; a two-word label must not wrap mid-item */
  }
  .nav-links a:hover{color:var(--hv-d)}
  .mobile-menu-toggle,
  .mobile-menu-backdrop,
  .mobile-menu-header{display:none}
  .nav-cta{
    font-family:var(--font-body);
    background:var(--hv-d);
    color:#FAF6F0 !important;
    padding:8px 16px;
    border-radius:999px;
    font-weight:600;
    font-size:13.5px;
    transition:transform .15s, background .15s;
  }
  .nav-cta:hover{background:#4A5738;transform:translateY(-1px)}
  .theme-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:34px;
    height:34px;
    border-radius:50%;
    color:var(--text-2);
    transition:background .15s, color .15s;
  }
  .theme-toggle:hover{background:var(--bg-subtle);color:var(--hv-d)}
  .theme-toggle .moon{display:none}
  .theme-toggle .sun{display:none}
  html[data-theme="dark"] .theme-toggle .sun{display:block;width:16px;height:16px}
  html[data-theme="light"] .theme-toggle .moon{display:block;width:16px;height:16px}
  .theme-toggle-label{display:none}

  @media (max-width:1023px){
    .nav-inner{padding-block:12px}
    .brand{font-size:19px}
    .brand-tag{display:none}
    .mobile-menu-toggle{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      width:56px;
      height:42px;
      border:1px solid rgba(122,139,92,.18);
      border-radius:999px;
      color:var(--text);
      background:rgba(255,255,255,.58);
      box-shadow:var(--shadow-sm);
      cursor:pointer;
      -webkit-tap-highlight-color:transparent;
    }
    html[data-theme="dark"] .mobile-menu-toggle{
      background:rgba(38,36,32,.72);
      border-color:rgba(255,255,255,.08);
    }
    .mobile-menu-toggle span,
    .mobile-menu-toggle::before,
    .mobile-menu-toggle::after{
      content:"";
      display:block;
      width:18px;
      height:2px;
      border-radius:999px;
      background:currentColor;
      transition:transform .18s ease, opacity .18s ease;
    }
    .mobile-menu-toggle{
      flex-direction:column;
      gap:4px;
    }
    body.mobile-menu-open .mobile-menu-toggle::before{transform:translateY(6px) rotate(45deg)}
    body.mobile-menu-open .mobile-menu-toggle span{opacity:0}
    body.mobile-menu-open .mobile-menu-toggle::after{transform:translateY(-6px) rotate(-45deg)}
    .mobile-menu-backdrop{
      display:block;
      position:fixed;
      inset:0;
      /* Must sit BELOW .nav (z-index:50), which is its own stacking context
         (it sets both z-index and backdrop-filter). The drawer (.nav-links)
         lives inside .nav, so its z-index:60 is scoped to that context and
         cannot beat a root-level backdrop at 58 -- that let the backdrop
         paint over the menu links and swallow every tap, so tapping an item
         only closed the menu instead of navigating. Keeping the backdrop
         under .nav lets the drawer receive taps while still dimming the page. */
      z-index:49;
      background:rgba(28,27,24,.22);
      opacity:0;
      pointer-events:none;
      transition:opacity .2s ease;
    }
    body.mobile-menu-open .mobile-menu-backdrop{
      opacity:1;
      pointer-events:auto;
    }
    body.mobile-menu-open{overflow:hidden}
    .nav-links{
      position:fixed;
      top:calc(52px + env(safe-area-inset-top));
      left:14px;
      z-index:60;
      display:flex;
      flex-direction:column;
      align-items:stretch;
      gap:0;
      width:min(344px,calc(100vw - 28px));
      max-height:calc(100vh - 76px - env(safe-area-inset-top));
      overflow:auto;
      padding:14px 12px;
      border:1px solid rgba(255,255,255,.42);
      border-radius:28px;
      background:rgba(255,255,255,.96);
      backdrop-filter:saturate(160%) blur(22px);
      -webkit-backdrop-filter:saturate(160%) blur(22px);
      box-shadow:0 22px 54px rgba(44,38,33,.18);
      transform:translateX(calc(-100% - 28px));
      opacity:0;
      pointer-events:none;
      transition:transform .24s cubic-bezier(.2,.8,.2,1), opacity .18s ease;
    }
    html[data-theme="dark"] .nav-links{
      background:rgba(38,36,32,.96);
      border-color:rgba(255,255,255,.08);
      box-shadow:0 22px 54px rgba(0,0,0,.42);
    }
    body.mobile-menu-open .nav-links{
      transform:translateX(0);
      opacity:1;
      pointer-events:auto;
    }
    .mobile-menu-header{
      display:flex;
      align-items:center;
      gap:12px;
      padding:6px 4px 12px;
      order:-2;
    }
    .mobile-menu-header .menu-avatar{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      width:40px;
      height:40px;
      border-radius:999px;
      background:var(--hv-l);
      color:var(--hv-d);
      font-family:var(--font-display);
      font-weight:600;
    }
    .mobile-menu-header strong{
      font-family:var(--font-body);
      display:block;
      color:var(--text);
      font-size:15px;
      line-height:1.15;
    }
    .mobile-menu-header span:last-child{
      font-family:var(--font-body);
      display:block;
      color:var(--text-3);
      font-size:12px;
      line-height:1.2;
      margin-top:2px;
    }
    .nav-links a,
    .nav-links .theme-toggle{
      font-family:var(--font-body);
      width:100%;
      min-height:52px;
      display:flex;
      align-items:center;
      justify-content:flex-start;
      gap:12px;
      padding:0 6px;
      border-radius:12px;
      color:var(--text);
      font-size:15px;
      font-weight:700;
      text-align:left;
    }
    .nav-links a + a,
    .nav-links a + .theme-toggle,
    .nav-links .theme-toggle + a{
      border-top:1px solid rgba(217,209,196,.55);
    }
    html[data-theme="dark"] .nav-links a + a,
    html[data-theme="dark"] .nav-links a + .theme-toggle,
    html[data-theme="dark"] .nav-links .theme-toggle + a{
      border-top-color:rgba(255,255,255,.08);
    }
    .nav-links a:hover,
    .nav-links .theme-toggle:hover{
      background:var(--bg-subtle);
      color:var(--hv-d);
      text-decoration:none;
    }
    .nav-links a::before,
    .nav-links .theme-toggle::before{
      content:attr(data-menu-icon);
      display:inline-flex;
      align-items:center;
      justify-content:center;
      width:30px;
      height:30px;
      flex:none;
      border-radius:8px;
      background:var(--hv-l);
      color:var(--hv-d);
      font-size:13px;
      font-weight:800;
    }
    .nav-links .theme-toggle::before{content:"☾"}
    html[data-theme="dark"] .nav-links .theme-toggle::before{content:"☀"}
    .nav-links .theme-toggle{
      height:auto;
      border-radius:12px;
      transition:none;
    }
    .nav-links .theme-toggle .moon,
    .nav-links .theme-toggle .sun{display:none !important}
    .theme-toggle-label{display:inline}
    .nav-cta{
      order:-1;
      min-height:44px !important;
      margin:0 0 8px;
      padding:0 14px !important;
      border-radius:10px;
      background:var(--hv-l);
      color:var(--hv-d) !important;
    }
    .nav-cta::before{
      content:"→" !important;
      background:rgba(122,139,92,.15) !important;
    }
  }

  
/* Sticky email-capture bar (top-fixed, dismissable) */
  .sticky-bar{
    font-family:var(--font-body);
    position:fixed;top:0;left:0;right:0;
    background:#324D29;
    color:#FFFFFF;
    padding:10px 16px;
    z-index:90;
    font-size:14px;
    box-shadow:0 2px 8px rgba(0,0,0,.08);
  }
  .sticky-bar-inner{
    display:flex;align-items:center;gap:16px;
    max-width:calc(var(--page-content) + 2 * var(--gutter));margin:0 auto;padding-inline:max(var(--gutter),env(safe-area-inset-left)) max(var(--gutter),env(safe-area-inset-right));
  }
  .sticky-bar-text{font-family:var(--font-body);flex:1;min-width:0;line-height:1.4}
  .sticky-bar-cta{
    flex:none;text-decoration:none;
    padding:7px 16px;border-radius:6px;border:0;
    background:#FFFFFF;color:#324D29;
    font:inherit;font-family:var(--font-body);font-size:14px;font-weight:700;cursor:pointer;
    white-space:nowrap;
  }
  .sticky-bar-cta:hover{background:#EEF2E5}
  .sticky-bar-close{
    background:transparent;border:0;color:#FFFFFF;
    font-size:22px;line-height:1;cursor:pointer;
    padding:0 4px;opacity:.7;flex:none;
    min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;
    margin:-6px -8px; /* 44px hit area without making the 52px bar taller */
  }
  .sticky-bar-close:hover{opacity:1}
  body.sticky-bar-shown{padding-top:52px}
  @media (max-width:780px){
    .sticky-bar-text{display:none}
    .sticky-bar-cta{flex:1;text-align:center}
    body.sticky-bar-shown{padding-top:52px}
  }

  /* ---------- Phone frame ----------
     Concentric bezel: outer radius (52) minus the padding (14) equals
     the inner/screen radius (38), so the rim reads as one continuous
     ring around the screenshot instead of two mismatched rounded
     boxes. ::after draws a Dynamic Island cutout so this reads as an
     actual iPhone rather than a generic rounded card.
     --phone-scale (default 1, tuned to the 340px base size below) scales
     the bezel padding + both radii together whenever a context sets a
     smaller max-width (.surface, .showcase, the two 200px feature-card
     frames) — otherwise the 14px/52px/38px stay fixed while the frame
     shrinks, so the rim reads proportionally thicker and the Dynamic
     Island's top:2.6% (measured against the padded box, not the screen)
     drifts out of alignment with the screenshot underneath it. */
  .phone-frame{
    --phone-scale: 1;
    margin:0 auto;
    max-width:340px;
    border-radius:calc(var(--phone-scale) * 52px);
    padding:calc(var(--phone-scale) * 14px);
    background:linear-gradient(160deg, #2A2722, #1A1816);
    box-shadow:var(--shadow-lg);
    position:relative;
    overflow:hidden;
  }
  .phone-frame::before{
    content:'';
    position:absolute;
    top:calc(var(--phone-scale) * 14px);left:calc(var(--phone-scale) * 14px);
    right:calc(var(--phone-scale) * 14px);bottom:calc(var(--phone-scale) * 14px);
    border-radius:calc(var(--phone-scale) * 38px);
    box-shadow:inset 0 0 0 2px rgba(255,255,255,.05);
    pointer-events:none;
  }
  .phone-frame::after{
    content:'';
    position:absolute;
    top:2.6%;
    left:50%;
    transform:translateX(-50%);
    width:30%;
    aspect-ratio:3.2/1;
    min-width:34px;
    border-radius:999px;
    background:#000;
    box-shadow:inset 0 0 0 .5px rgba(255,255,255,.08);
    z-index:5;
    pointer-events:none;
  }
  .phone-frame > img{
    border-radius:calc(var(--phone-scale) * 38px);
    display:block;
    width:100%;
    height:auto;
  }
  /* u2 phone glue (PLAN 2.1): inner radius for the component; the ring stays above the in-flow screen; a frame that holds a .ph
     is as wide as the static it replaces (R1-1) */
  .phone-frame{--ph-r:calc(var(--phone-scale) * 38px)}
  .phone-frame::before{z-index:1}
  .phone-frame:has(> .ph){width:100%}
  /* Dark-mode screenshots: when the site is in dark mode, swap each app
     screenshot for the dark-rendered variant so the marketing shots match
     the app's actual dark appearance. Keyed off the same data-theme the
     rest of the site uses (not prefers-color-scheme, since the toggle is
     manual). Generated by ios/tools/export-screenshots.sh. Degrades
     gracefully: a browser without content-replacement keeps the light shot. */
  html[data-theme="dark"] img[src="/screenshots/home.c1f99162.webp"]{content:url('/screenshots/home-dark.cfc2f755.webp')}
  html[data-theme="dark"] img[src="/screenshots/schedule.ee989e96.webp"]{content:url('/screenshots/schedule-dark.1cd66dac.webp')}
  html[data-theme="dark"] img[src="/screenshots/patterns.c5869b89.webp"]{content:url('/screenshots/patterns-dark.f0a7b7ee.webp')}
  html[data-theme="dark"] img[src="/screenshots/cues.6a1a88e8.webp"]{content:url('/screenshots/cues-dark.18cbd420.webp')}
  html[data-theme="dark"] img[src="/screenshots/milestones.webp"]{content:url('/screenshots/milestones-dark.webp')}
  html[data-theme="dark"] img[src="/screenshots/goals.0bba8904.webp"]{content:url('/screenshots/goals-dark.2da6df35.webp')}
  html[data-theme="dark"] img[src="/screenshots/search.8ae28c65.webp"]{content:url('/screenshots/search-dark.5d7c0fd3.webp')}
  html[data-theme="dark"] img[src="/screenshots/profile-hub.81ae8715.webp"]{content:url('/screenshots/profile-hub-dark.f6792b87.webp')}
  html[data-theme="dark"] img[src="/screenshots/calm-tools.webp"]{content:url('/screenshots/calm-tools-dark.webp')}
  html[data-theme="dark"] img[src="/screenshots/sensory-profile.bb42ef19.webp"]{content:url('/screenshots/sensory-profile-dark.e2bd8c39.webp')}
  html[data-theme="dark"] img[src="/screenshots/lock.webp"]{content:url('/screenshots/lock-dark.webp')}
  html[data-theme="dark"] img[src="/screenshots/handoff.74bf0407.webp"]{content:url('/screenshots/handoff-dark.d0a08c70.webp')}
  html[data-theme="dark"] img[src="/screenshots/stuck.webp"]{content:url('/screenshots/stuck-dark.webp')}
  html[data-theme="dark"] img[src="/screenshots/empty-state.webp"]{content:url('/screenshots/empty-state-dark.webp')}
  .phone-frame.tilt-l{transform:rotate(-2.5deg) translateY(-6px)}
  .phone-frame.tilt-r{transform:rotate(2.5deg) translateY(-6px)}
  /* Phones: keep screenshots flat. A rotated frame in a narrow
     single-column layout reads as crooked, not dynamic. */
  @media (max-width:640px){
    .phone-frame.tilt-l,
    .phone-frame.tilt-r{ transform:none; }
  }

  
  .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

  
/* ---------- Footer ---------- */
  footer{
    background:var(--bg-subtle);
    border-top:1px solid var(--bd);
    padding:48px 0 32px;
  }
  .footer-inner{
    font-family:var(--font-body);
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:18px;
    color:var(--text-3);
    font-size:14px;
  }
  .footer-links{display:flex;gap:18px;flex-wrap:wrap}
  .footer-links a{font-family:var(--font-body);color:var(--text-2);font-weight:500}
  .footer-social{display:flex;gap:16px;flex-wrap:wrap;align-items:center}
  .footer-social a{color:var(--text-2);display:inline-flex}
  .footer-social a:hover{color:var(--hv-d)}
  .footer-social svg{width:20px;height:20px;fill:currentColor;display:block}
  .footer-disclaimer{
    font-family:var(--font-body);
    margin-top:28px;
    font-size:12.5px;
    color:var(--text-3);
    line-height:1.65;
    max-width:760px;
  }

  .signup-cta{ display:flex; flex-direction:column; gap:8px; align-items:flex-start; }
  .signup-cta .btn{ font-family:var(--font-body); font-size:16px; padding:14px 20px; }
  .signup-cta .meta{ font-family:var(--font-body); font-size:13px; color:var(--text-3); }

  /* ---------- Subscribe modal ---------- */
  .modal-backdrop{
    position:fixed; inset:0;
    background:rgba(28,27,24,0.55);
    backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
    display:none; align-items:center; justify-content:center;
    padding:20px; z-index:1000;
    opacity:0; transition:opacity .18s ease;
  }
  .modal-backdrop.is-open{ display:flex; opacity:1; }
  .modal-dialog{
    background:var(--bg-raised);
    color:var(--text);
    border-radius:var(--radius-lg);
    box-shadow:var(--shadow-lg);
    width:100%; max-width:480px;
    max-height:calc(100vh - 40px);
    max-height:calc(100dvh - 40px);
    overflow-y:auto;
    padding:32px;
    position:relative;
    transform:translateY(8px);
    transition:transform .18s ease;
    border:1px solid var(--bd);
  }
  .modal-backdrop.is-open .modal-dialog{ transform:translateY(0); }
  .modal-close{
    position:absolute; top:8px; right:8px;
    width:44px; height:44px; /* 44px hit area; glyph size and position unchanged */
    border:none; border-radius:8px;
    background:transparent; color:var(--text-3);
    cursor:pointer; font-size:20px; line-height:1;
    display:flex; align-items:center; justify-content:center;
  }
  .modal-close:hover{ background:var(--bg-subtle); color:var(--text); }
  .modal-eyebrow{
    font-family:var(--font-body);
    text-transform:uppercase; letter-spacing:.12em;
    font-size:11px; font-weight:700;
    color:var(--hv-d); margin-bottom:8px;
  }
  .modal-title{
    font-family:var(--font-display);
    font-size:26px; font-weight:600;
    margin:0 0 8px; color:var(--text); letter-spacing:-.01em;
  }
  .modal-sub{
    font-family:var(--font-body);
    font-size:14.5px; line-height:1.55;
    color:var(--text-2); margin:0 0 20px;
  }
  .modal-form .field{ margin-bottom:14px; }
  .modal-form label{
    font-family:var(--font-body);
    display:block; font-size:12px; font-weight:600;
    color:var(--text-2); margin-bottom:6px;
  }
  .modal-form label .req{ color:var(--coral-t); margin-left:2px; }
  .modal-form input[type=email],
  .modal-form input[type=text]{
    width:100%; box-sizing:border-box;
    padding:11px 13px;
    border-radius:10px;
    border:1px solid var(--bd-2);
    background:var(--bg);
    color:var(--text);
    font:inherit; font-family:var(--font-body); font-size:15px;
  }
  .modal-form input[type=email]:focus,
  .modal-form input[type=text]:focus{
    outline:none;
    border-color:var(--hv);
    box-shadow:0 0 0 3px rgba(122,139,92,.18);
  }
  .modal-form .gdpr{
    font-family:var(--font-body);
    display:flex; align-items:flex-start; gap:10px;
    padding:12px 14px; border-radius:10px;
    background:var(--bg-subtle);
    margin:6px 0 16px; cursor:pointer;
    font-size:13px; color:var(--text-2); line-height:1.5;
  }
  .modal-form .gdpr input[type=checkbox]{
    margin-top:3px; accent-color:var(--hv);
    width:16px; height:16px; flex-shrink:0;
  }
  .modal-form .submit{
    width:100%; padding:13px 18px;
    border-radius:12px;
    background:var(--hv-d); color:var(--bg); border:none;
    font:inherit; font-family:var(--font-body); font-weight:600; font-size:15px;
    cursor:pointer; transition:background .15s ease;
  }
  .modal-form .submit:hover:not(:disabled){ background:#4A5738; }
  html[data-theme="dark"] .modal-form .submit{ background:var(--hv); color:var(--bg); }
  html[data-theme="dark"] .modal-form .submit:hover:not(:disabled){ background:var(--hv-d); }
  .modal-form .submit:disabled{ opacity:.6; cursor:default; }
  .modal-msg{
    font-family:var(--font-body);
    margin-top:14px; padding:12px 14px;
    border-radius:10px; font-size:13.5px; line-height:1.55;
  }
  .modal-msg.success{
    background:var(--hv-l); color:var(--hv-d);
    border:1px solid rgba(122,139,92,.25);
  }
  .modal-msg.error{
    background:var(--coral-l); color:var(--coral-t);
    border:1px solid rgba(194,91,77,.2);
  }
  .modal-fineprint{
    font-family:var(--font-body);
    margin-top:16px; font-size:11.5px;
    color:var(--text-3); line-height:1.55;
  }
  .modal-fineprint a{ font-family:var(--font-body); color:var(--text-2); }
  /* Beta-mode "what happens next" explainer card. Calm color block
     so caregivers feel briefed rather than tricked. */
  .modal-beta-explainer{
    font-family:var(--font-body);
    background:var(--hv-l);
    border-radius:10px;
    padding:14px 16px;
    margin:0 0 18px;
    font-size:14px;
    line-height:1.55;
    color:var(--text);
  }
  .modal-beta-explainer em{
    font-family:var(--font-body);
    color:var(--text-2);
    font-style:normal;
    display:block;
    margin-top:6px;
    font-size:13px;
  }
  /* Beta-mode "what's actually expected of you" block. Sits ABOVE the
     TestFlight explainer so the reader sees the ask (use the app +
     leave honest feedback) before the install mechanics. The amber
     tint differentiates it from the sage beta-explainer below so the
     two blocks don't read as a single wall of color. */
  .modal-beta-role{
    font-family:var(--font-body);
    background:var(--amber-l);
    border-left:3px solid var(--amber);
    border-radius:10px;
    padding:14px 16px;
    margin:0 0 14px;
    font-size:13.5px;
    line-height:1.55;
    color:var(--text);
  }
  .modal-beta-role strong{
    font-family:var(--font-body);
    color:var(--text);
  }
  .modal-beta-role ul{
    margin:8px 0 6px;
    padding:0;
    list-style:none;
  }
  .modal-beta-role li{
    font-family:var(--font-body);
    padding:2px 0;
    color:var(--text-2);
    font-style:italic;
    font-size:13px;
  }
  .modal-beta-role li::before{
    content:"— ";
    color:var(--text-3);
    font-style:normal;
  }
  .modal-skip-row{
    font-family:var(--font-body);
    margin:10px 0 0;
    text-align:center;
    font-size:13px;
  }
  .modal-skip-link{
    font-family:var(--font-body);
    color:var(--text-2);
    font-weight:500;
    text-decoration:underline;
    text-underline-offset:2px;
  }
  .modal-skip-link:hover{ color:var(--text); }

  /* Sign-up done: after a successful sign-up the script adds .is-done to the
     form, which leaves only the confirmation on screen. The heading, intro
     line, message and Mailchimp privacy note stay; the fields, consent tick,
     button and beta skip link are hidden so a quick glance cannot miss the
     message. The script removes .is-done when the pop-up is opened again. */
  .modal-form.is-done .field,
  .modal-form.is-done .gdpr,
  .modal-form.is-done .submit,
  .modal-form.is-done .modal-skip-row{ display:none; }

/* Pop-up fixes (round 2). 1: the close button is sticky, so it stays reachable when the dialog
   scrolls (it sits 8px from the top and right edges, as before). 2: beta mode is compacted and a
   little wider on desktop so the button and skip link fit a 900px-tall window. 4: both skip
   links get a 44px tap area. */
.modal-dialog{ --modal-pad:32px; }
.modal-dialog.modal-is-beta{ --modal-pad:24px; padding:24px; }
.modal-close{
  position:sticky; top:var(--modal-pad); right:auto; z-index:2;
  width:44px; height:44px;
  margin:0 0 -44px auto;
  transform:translate(calc(var(--modal-pad) - 8px), calc(8px - var(--modal-pad)));
  background:var(--bg-raised);
  box-shadow:0 0 0 3px var(--bg-raised);
}
.modal-skip-link{
  display:inline-flex; align-items:center;
  min-height:44px; padding:0 8px; font-size:14px;
}
.modal-dialog.modal-is-beta{ max-height:calc(100vh - 24px); max-height:calc(100dvh - 24px); }
@media (min-width:600px){
  .modal-dialog.modal-is-beta{ max-width:560px; }
}
.modal-dialog.modal-is-beta .modal-eyebrow{ margin-bottom:4px; }
.modal-dialog.modal-is-beta .modal-title{ font-size:24px; margin-bottom:6px; }
.modal-dialog.modal-is-beta .modal-sub{ margin-bottom:12px; }
.modal-dialog.modal-is-beta .modal-beta-role{ padding:10px 14px; margin-bottom:10px; font-size:13px; line-height:1.45; }
.modal-dialog.modal-is-beta .modal-beta-role ul{ margin:4px 0; }
.modal-dialog.modal-is-beta .modal-beta-role li{ padding:1px 0; }
.modal-dialog.modal-is-beta .modal-beta-explainer{ padding:10px 14px; margin-bottom:12px; font-size:13px; line-height:1.45; }
.modal-dialog.modal-is-beta .modal-beta-explainer em{ margin-top:4px; font-size:12.5px; }
.modal-dialog.modal-is-beta .modal-form .field{ margin-bottom:10px; }
.modal-dialog.modal-is-beta .modal-form label{ margin-bottom:4px; }
.modal-dialog.modal-is-beta .modal-form input[type=email],
.modal-dialog.modal-is-beta .modal-form input[type=text]{ padding:9px 13px; }
.modal-dialog.modal-is-beta .modal-form .gdpr{ margin:4px 0 12px; padding:10px 14px; }
.modal-dialog.modal-is-beta .modal-form .submit{ padding:12px 18px; }
.modal-dialog.modal-is-beta .modal-skip-row{ margin-top:2px; }
.modal-dialog.modal-is-beta .modal-fineprint{ margin-top:6px; }
/* Keep eyebrow and heading clear of the sticky close button so the heading wraps instead of running under it. */
.modal-eyebrow, .modal-title{ padding-right:36px; }
