/* ==========================================================================
   MUNARISH Academy — public website
   --------------------------------------------------------------------------
   Deliberately separate from app.css. The portal's stylesheet carries a large
   component library that a visitor reading the home page has no use for, and
   the two have different jobs: the portal optimises for density, the website
   for a first impression on a phone.
   ========================================================================== */

/* Navy and gold, on ivory: the palette of an established academy rather than
   a flyer. Gold is a fill and an accent, never small text on a light ground -
   it does not have the contrast for that; --accent-ink is the gold for text. */
:root {
  --ink:        #1f2430;
  --ink-soft:   #4b5263;
  --ink-faint:  #6b7282;
  --line:       #e4dfd3;
  --page:       #faf7f0;
  --bg:         #ffffff;
  --bg-tint:    #eef1f6;
  --brand:      #1b2a4a;
  --brand-dark: #111c33;
  --brand-soft: #e7ebf3;
  --accent:     #c8962e;
  --accent-dark: #b3842a;
  --accent-ink: #8a6414;
  --accent-light: #e6c67e;
  --ok:         #1d7a4c;
  --danger:     #b3261e;
  --radius:     14px;
  --shadow:     0 1px 2px rgba(18, 32, 58, .06), 0 8px 28px rgba(18, 32, 58, .07);
  --wrap:       1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

img { max-width: 100%; display: block; }
a { color: var(--brand); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.15rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Header --------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(27, 42, 74, .97);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 3px solid var(--accent);
  color: #fff;
}
.site-header .wrap { display: flex; align-items: center; gap: 1.25rem; min-height: 84px; }

/* The logo sits at the left and is deliberately large — it is the Academy's
   identity and the primary way a parent recognises they are in the right
   place. */
.brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: inherit; margin-right: auto; }
.brand img { height: 62px; width: auto; border-radius: 10px; background: #fff; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-weight: 700; font-size: 1.16rem; letter-spacing: -.01em; white-space: nowrap; }
.brand-tag { font-size: .78rem; color: var(--accent-light); letter-spacing: .12em; text-transform: uppercase; }

.site-nav { display: flex; align-items: center; gap: .35rem; }
.site-nav a {
  padding: .55rem .85rem; border-radius: 9px; text-decoration: none;
  color: rgba(255, 255, 255, .84); font-weight: 550; font-size: .95rem;
  white-space: nowrap;
}
.site-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.site-nav a[aria-current="page"] { color: var(--accent-light); background: rgba(255, 255, 255, .08); }
/* A button in the menu ("Sign in", "Open the portal") keeps its own colours:
   `.site-nav a` is more specific than `.btn-primary`, and turned its white
   text grey on blue. */
.site-nav a.btn-primary, .site-nav a.btn-primary:hover { color: var(--brand-dark); }
.site-nav a.btn-primary { background: var(--accent); }
.site-nav a.btn-primary:hover { background: var(--accent-light); }

.nav-toggle {
  display: none; background: none; border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 9px; padding: .5rem .7rem; cursor: pointer; color: #fff;
}

@media (max-width: 1100px) {
  .brand img { height: 48px; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--brand); border-bottom: 3px solid var(--accent);
    padding: .6rem; gap: .15rem; box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .8rem 1rem; }
  .site-nav .btn { text-align: center; margin-top: .35rem; }
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.3rem; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .96rem; text-decoration: none;
  cursor: pointer; transition: background .15s, border-color .15s, transform .06s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--brand-dark); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-tint); }
.btn-light { background: #fff; color: var(--brand); }
.btn-light:hover { background: var(--brand-soft); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.btn-lg { padding: .9rem 1.7rem; font-size: 1.02rem; }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(1100px 420px at 78% -8%, rgba(200, 153, 43, .16), transparent 62%),
    linear-gradient(168deg, var(--brand-dark) 0%, var(--brand) 62%, #1b5fa4 100%);
  color: #fff; padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}
.hero h1 { color: #fff; max-width: 15ch; }
.hero p { font-size: clamp(1.02rem, 2vw, 1.2rem); color: rgba(255, 255, 255, .9); max-width: 58ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 2rem; } }

.hero-card {
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2);
  border-radius: var(--radius); padding: 1.5rem; backdrop-filter: blur(8px);
}
.hero-card h2 { font-size: 1.1rem; color: #fff; }
.hero-card ul { margin: 0; padding-left: 1.1rem; color: rgba(255, 255, 255, .88); font-size: .95rem; }
.hero-card li { margin-bottom: .4rem; }

/* --- Sections ------------------------------------------------------------- */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-tint { background: var(--bg-tint); }
.section-head { max-width: 62ch; margin-bottom: 2.5rem; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }
.eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: .6rem;
}

.grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }

.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--ink-soft); font-size: .96rem; margin: 0; }
.card-icon {
  width: 44px; height: 44px; border-radius: 11px; background: var(--brand-soft);
  display: grid; place-items: center; margin-bottom: 1rem; color: var(--brand);
}
.card-icon svg { width: 22px; height: 22px; }

.stat { text-align: center; }
.stat-n { font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 700; color: var(--brand); line-height: 1; }
.stat-l { font-size: .9rem; color: var(--ink-soft); margin-top: .4rem; }

/* --- Gallery -------------------------------------------------------------- */
.album-grid { display: grid; gap: 1.3rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.album {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--bg); box-shadow: var(--shadow); text-align: left;
  padding: 0; cursor: pointer; font: inherit; color: inherit;
  transition: transform .16s, box-shadow .16s;
}
.album:hover { transform: translateY(-3px); box-shadow: 0 10px 34px rgba(18, 32, 58, .13); }
.album-cover { aspect-ratio: 4 / 3; background: var(--brand-soft); position: relative; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-cover .placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--brand); opacity: .35; }
.album-body { padding: 1rem 1.1rem 1.2rem; }
.album-body h3 { font-size: 1.03rem; margin-bottom: .25rem; }
.album-meta { font-size: .84rem; color: var(--ink-faint); }
.album-body p { font-size: .9rem; color: var(--ink-soft); margin: .4rem 0 0; }

.photo-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.photo { border-radius: 10px; overflow: hidden; background: var(--bg-tint); border: 0; padding: 0; cursor: pointer; }
.photo img { aspect-ratio: 1; width: 100%; object-fit: cover; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(9, 16, 30, .94);
  display: none; place-items: center; padding: 1.5rem;
}
.lightbox[open], .lightbox.open { display: grid; }
.lightbox img { max-width: min(1100px, 94vw); max-height: 82vh; object-fit: contain; border-radius: 8px; }
.lightbox figcaption { color: rgba(255, 255, 255, .82); text-align: center; margin-top: .9rem; font-size: .93rem; }
.lightbox-close {
  position: absolute; top: 1.1rem; right: 1.3rem; background: rgba(255, 255, 255, .12);
  color: #fff; border: 0; border-radius: 50%; width: 44px; height: 44px; font-size: 1.5rem;
  cursor: pointer; line-height: 1;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255, 255, 255, .12); color: #fff; border: 0;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; line-height: 1;
}
.lightbox-nav.prev { left: 1rem; }
.lightbox-nav.next { right: 1rem; }

/* --- Forms ---------------------------------------------------------------- */
.form-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.4rem); box-shadow: var(--shadow);
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .4rem; }
.field .hint { font-weight: 400; color: var(--ink-faint); font-size: .85rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: .72rem .9rem; font: inherit; font-size: .97rem;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--brand); outline: 2px solid var(--brand-soft); outline-offset: 0;
}
.field textarea { resize: vertical; min-height: 120px; }
.field-row { display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }

.check { display: flex; gap: .65rem; align-items: flex-start; font-size: .92rem; color: var(--ink-soft); }
.check input { width: auto; margin-top: .25rem; flex: none; }

/* The honeypot. Hidden from people, left in the DOM for bots to find.
   `display:none` is avoided because the better bots skip those. */
.hp {
  position: absolute !important; left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}

.form-note { font-size: .88rem; color: var(--ink-faint); }
.alert { padding: .9rem 1.1rem; border-radius: 10px; margin-bottom: 1.2rem; font-size: .94rem; }
.alert-ok { background: #e8f6ee; color: #14603a; border: 1px solid #b9e0cb; }
.alert-error { background: #fdeceb; color: #8c1d18; border: 1px solid #f3c4c0; }
.alert-info { background: var(--brand-soft); color: var(--brand-dark); border: 1px solid #c6dcf0; }

/* --- Sign in -------------------------------------------------------------- */
.login-shell { min-height: calc(100vh - 84px); display: grid; place-items: center; padding: 2.5rem 0; background: var(--bg-tint); }
.login-card { width: min(100% - 2.5rem, 460px); }
.login-head { text-align: center; margin-bottom: 1.8rem; }
.login-head img { height: 76px; margin: 0 auto 1.1rem; border-radius: 12px; }
.role-note { display: grid; gap: .55rem; margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.role-note div { display: flex; gap: .6rem; font-size: .88rem; color: var(--ink-soft); }
.role-note svg { flex: none; width: 17px; height: 17px; color: var(--ok); margin-top: .18rem; }

/* --- Contact -------------------------------------------------------------- */
.contact-item { display: flex; gap: 1rem; margin-bottom: 1.6rem; }
.contact-item svg { width: 21px; height: 21px; color: var(--brand); flex: none; margin-top: .28rem; }
.contact-item strong { display: block; font-size: .95rem; }
.contact-item span, .contact-item a { color: var(--ink-soft); font-size: .95rem; }

/* --- Footer --------------------------------------------------------------- */
.site-footer { background: var(--brand-dark); border-top: 3px solid var(--accent); color: rgba(255, 255, 255, .74); padding: 3.5rem 0 2rem; margin-top: 0; }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: 1.5fr 1fr 1fr; margin-bottom: 2.5rem; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; } }
.site-footer h4 { color: var(--accent-light); font-size: .82rem; letter-spacing: .09em; text-transform: uppercase; margin: 0 0 1rem; }
.site-footer a { color: rgba(255, 255, 255, .74); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; font-size: .93rem; }
.footer-brand img { height: 54px; border-radius: 9px; margin-bottom: 1rem; }
.footer-brand p { font-size: .93rem; max-width: 40ch; margin: 0; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 1.5rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .87rem;
}

/* --- Utilities ------------------------------------------------------------ */
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.loading { padding: 3rem 1rem; text-align: center; color: var(--ink-faint); }
.empty {
  padding: 3rem 1.5rem; text-align: center; color: var(--ink-faint);
  border: 1px dashed var(--line); border-radius: var(--radius); background: var(--bg-tint);
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.badge {
  display: inline-block; padding: .28rem .7rem; border-radius: 999px;
  font-size: .76rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  background: var(--brand-soft); color: var(--brand-dark);
}
.badge-open { background: #e8f6ee; color: #14603a; }

/* --- Utilities -------------------------------------------------------------
   The portal's CSP is `style-src 'self'` with no 'unsafe-inline', which blocks
   inline style="" attributes as well as <style> blocks. That is a deliberate
   XSS defence and worth keeping, so every one-off adjustment below is a class
   rather than an inline style.
   -------------------------------------------------------------------------- */
.w-full { width: 100%; }
.mt-1 { margin-top: .6rem; }
.mt-2 { margin-top: 1.2rem; }
.mt-3 { margin-top: 1.8rem; }
.mt-4 { margin-top: 2.5rem; }
.mb-2 { margin-bottom: 1.2rem; }
.mb-3 { margin-bottom: 1.8rem; }
.m-0 { margin: 0; }
.measure { max-width: 66ch; }
.measure-wide { max-width: 76ch; }
.lead { font-size: 1.08rem; }
.small { font-size: .95rem; }
.tiny { font-size: .88rem; }

/* Ghost button on a dark background (the hero). */
.btn-on-dark { color: #fff; border-color: rgba(255, 255, 255, .38); }
.btn-on-dark:hover { background: rgba(255, 255, 255, .12); }

.hero-card p { font-size: .95rem; color: rgba(255, 255, 255, .85); }
.hero-card .btn { margin-top: 1.2rem; width: 100%; }

/* Two-column page: prose beside a form. Collapses on narrow screens. */
.split {
  display: grid; gap: 3.5rem; align-items: start;
  grid-template-columns: 1fr 1.05fr;
}
.split-narrow-first { grid-template-columns: .9fr 1.1fr; }
@media (max-width: 900px) {
  .split, .split-narrow-first { grid-template-columns: 1fr; gap: 2.5rem; }
}

.steps { padding-left: 1.2rem; font-size: .96rem; color: var(--ink-soft); }
.steps li { margin-bottom: .6rem; }

.icon-ok {
  background: #e8f6ee; color: var(--ok); margin-inline: auto;
  font-size: 1.5rem; font-weight: 700;
}

.btn-row { display: flex; gap: .8rem; flex-wrap: wrap; }
.btn-row.center { justify-content: center; }

.field-error { color: var(--danger); font-size: .86rem; margin: .35rem 0 0; }

/* The robot check (Cloudflare Turnstile, public/js/captcha.js). Cloudflare
   draws inside the slot; this only spaces it from the button below. Empty, and
   so invisible, whenever the check is switched off. */
.captcha-slot { margin: 0 0 1rem; }
.captcha-slot:empty { display: none; }
.captcha-slot.captcha-failed { color: var(--danger); font-size: .86rem; }
/* The field at fault is outlined, not only named in a message above it. */
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"], .field select[aria-invalid="true"] {
  border-color: var(--danger); outline: 2px solid rgba(179, 38, 30, .18); outline-offset: 0;
}
.hint-below { margin: .35rem 0 0; }

.login-note { margin-top: 1.5rem; }
.plain-list { color: var(--ink-soft); }
.role-note.bare { border: 0; padding: 0; margin-top: 1.5rem; }
.lightbox figure { margin: 0; }

/* ==========================================================================
   Wordmark
   --------------------------------------------------------------------------
   The Academy's name is set in Modern Love, the script face used in the logo.
   That font is commercial and cannot be committed to the repository, so the
   @font-face below points at a file the Academy supplies — see
   public/assets/fonts/README.md.

   font-display: swap means the fallback paints immediately and Modern Love
   takes over when it arrives, so the name is never invisible. The fallback
   stack keeps the same warm, rounded script feel.
   ========================================================================== */
@font-face {
  font-family: 'Modern Love';
  /* Four formats, best first. The browser takes the first it supports and
     skips any that 404, so the Academy can drop in whichever file its licence
     came with — a foundry might supply OTF or TTF rather than a webfont.
     WOFF2 is roughly half the size of the others, so prefer it if offered. */
  src: url('/assets/fonts/modern-love.woff2') format('woff2'),
       url('/assets/fonts/modern-love.woff') format('woff'),
       url('/assets/fonts/modern-love.otf') format('opentype'),
       url('/assets/fonts/modern-love.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* MunarishWordmark is registered at runtime by brand.js when the Academy has
     uploaded a licensed font file. 'Modern Love' is next, for a locally
     installed copy. The rest is the fallback. */
  --font-display: 'MunarishWordmark', 'Modern Love', 'Segoe Script', 'Bradley Hand', 'Brush Script MT', cursive;
}

/* Only the name itself. Body copy stays in the UI stack — a script face is
   hard work at paragraph length and worse on a phone. */
.wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: .01em;
  /* Script faces sit high in their em box; this pulls the baseline back. */
  line-height: 1.1;
}

.brand-name.wordmark { font-size: 1.5rem; }
.hero .wordmark { font-size: clamp(2.4rem, 6vw, 3.8rem); display: block; }
.footer-brand .wordmark { font-size: 1.35rem; color: #fff; display: block; margin-bottom: .3rem; }

/* --- Help desk ------------------------------------------------------------
   A conversation, not a form: the two sides are visually distinct so it is
   obvious at a glance who said what. */
.reference {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 1.5rem; font-weight: 800; letter-spacing: .06em;
  margin: .8rem 0 .3rem;
}
.thread { display: flex; flex-direction: column; gap: .9rem; margin: 1.6rem 0; }
.thread-msg { padding: .95rem 1.1rem; border-radius: 12px; border: 1px solid var(--line); }
.thread-customer { background: var(--bg); }
.thread-staff { background: var(--bg-tint); border-color: transparent; }
.thread-meta { margin-bottom: .35rem; font-size: .9rem; }
/* pre-wrap keeps the paragraphs somebody typed; it is inserted as text, never
   as markup, so nothing in it can render. */
.thread-body { white-space: pre-wrap; line-height: 1.55; }
.help-ticket-row { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
/* WhatsApp's own green, because a button pretending to be something else is
   worse than one that looks like what it opens. */
.btn-whatsapp { background: #25d366; color: #04301a; border-color: #25d366; }
.btn-whatsapp:hover { background: #1eb457; border-color: #1eb457; color: #04301a; }
.or-rule { display: flex; align-items: center; gap: .8rem; margin: 1.3rem 0 .2rem; color: var(--ink-2); font-size: .85rem; }
.or-rule::before, .or-rule::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* --- Development sign-in panel ------------------------------------------
   Only ever rendered when the server says this is a development instance;
   in production /api/auth/demo-accounts returns nothing and the slot stays
   empty. Styled to look like a developer tool rather than part of the
   Academy's front door, so nobody mistakes it for something a parent should
   be using. */
.demo-accounts {
  margin: 1.25rem 0 0;
  padding: .9rem 1rem 1rem;
  border: 1px dashed var(--line, #d8dee6);
  border-radius: 10px;
  background: var(--bg-alt, #f6f8fa);
}
.demo-accounts-head {
  margin: 0 0 .7rem;
  font-size: .78rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ink-soft, #667);
}
.demo-accounts-grid {
  display: grid;
  gap: .5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.demo-account {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding: .55rem .7rem;
  text-align: left;
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--line, #d8dee6);
  border-radius: 8px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.demo-account:hover { border-color: var(--brand, #0a7); box-shadow: 0 1px 4px rgb(0 0 0 / .06); }
.demo-account strong { font-size: .85rem; text-transform: capitalize; }
.demo-account-name { font-size: .8rem; color: var(--ink, #223); }
.demo-account-email {
  font-size: .72rem;
  color: var(--ink-soft, #667);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 480px) { .demo-accounts-grid { grid-template-columns: minmax(0, 1fr); } }

/* --- Companion apps ------------------------------------------------------ */
.app-grid { display: grid; gap: 1.25rem; }
@media (min-width: 900px) { .app-grid { grid-template-columns: minmax(0, 1fr); } }

.app-card {
  border: 1px solid var(--line, #e2e6ec);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.app-card-body { padding: 1.5rem 1.6rem 1.6rem; }
.app-card h2 { margin: 0 0 .25rem; }
.app-tagline { margin: 0 0 1rem; font-size: 1.05rem; color: var(--brand, #0f6b6b); font-weight: 600; }
.app-meta { margin: 1rem 0 0; font-size: .85rem; color: var(--ink-soft, #667); }

/* The sign-in requirement, said before the download button rather than after.
   Finding it out from a locked screen is how an app gets a one-star review
   that says "doesn't work". */
.app-notice {
  margin: 1.1rem 0 0;
  padding: .85rem 1rem;
  border-left: 3px solid var(--brand, #0f6b6b);
  border-radius: 0 8px 8px 0;
  background: var(--bg-alt, #f6f8fa);
  font-size: .92rem;
}

.app-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.3rem; }

/* ==========================================================================
   Policy pages: /privacy and /delete-account
   ========================================================================== */
.policy-summary {
  background: var(--brand-soft); border: 1px solid #c6dcf0; border-radius: var(--radius);
  padding: 1.1rem 1.3rem; margin: 1.6rem 0 2rem;
}
.policy-summary h2 { font-size: 1.05rem; margin: 0 0 .5rem; color: var(--brand-dark); }
.policy-summary ul { margin: 0; padding-left: 1.2rem; }
.policy-summary li { margin: .3rem 0; }
.measure-wide h2[id] { scroll-margin-top: 5rem; margin-top: 2.2rem; }
.policy-table-wrap { overflow-x: auto; margin: .8rem 0 1.2rem; border: 1px solid var(--line); border-radius: 10px; }
.policy-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.policy-table th {
  text-align: left; background: var(--bg-tint); color: var(--ink-soft); font-weight: 600;
  padding: .6rem .8rem; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.policy-table td { padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-soft); }
.policy-table tr:last-child td { border-bottom: 0; }
.policy-table td:first-child { color: var(--ink); font-weight: 600; min-width: 11rem; }
.policy-table code { font-size: .85em; overflow-wrap: anywhere; }
.policy-contact { border-left: 3px solid var(--brand); padding: .2rem 0 .2rem 1rem; margin: 1rem 0; }
.plain-list.numbered { padding-left: 1.3rem; }
.plain-list.numbered li { margin: .45rem 0; }
.deletion-card { margin: 1rem 0 1.5rem; }
.deletion-card .field textarea { min-height: 80px; }

/* ==========================================================================
   The pop-up notice (js/site/highlight.js)
   ========================================================================== */
.hl-open, .hl-open body { overflow: hidden; }
.hl-backdrop {
  position: fixed; inset: 0; z-index: 300; padding: 1rem;
  background: rgba(17, 28, 51, .72); display: grid; place-items: center;
  animation: hl-fade .18s ease-out;
}
.hl-dialog {
  position: relative; width: min(100%, 620px); max-height: calc(100vh - 2rem);
  overflow: auto; background: var(--bg); border-radius: var(--radius);
  border-top: 4px solid var(--accent); box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}
.hl-close {
  position: absolute; top: .6rem; right: .6rem; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(17, 28, 51, .75); color: #fff; font-size: 1.5rem; line-height: 1;
}
.hl-close:hover { background: var(--brand-dark); }
.hl-media { display: grid; gap: .4rem; background: var(--brand-dark); }
/* Several pictures sit side by side and scroll, rather than stacking into a
   tower the visitor has to scroll past to read the notice. */
.hl-media-row { grid-auto-flow: column; grid-auto-columns: 85%; overflow-x: auto; scroll-snap-type: x mandatory; }
.hl-media-row > * { scroll-snap-align: start; }
.hl-image, .hl-video { width: 100%; max-height: 52vh; object-fit: contain; display: block; background: var(--brand-dark); }
.hl-body { padding: 1.4rem 1.6rem 1.6rem; }
.hl-body h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin-bottom: .6rem; }
.hl-text { white-space: pre-line; color: var(--ink-soft); }
@keyframes hl-fade { from { opacity: 0; } to { opacity: 1; } }
