/* =========================================================================
   ASKY public UI — single light theme, from the brand board.
   Palette: Deep Blue #0F3B82 · Soft Coral #FF8B6B · Mint #4FD1C5 · Off White #F8FAFC
   Type:    Baloo Bhaijaan 2 (display: wordmark, headings, questions)
            Readex Pro (UI + body), both self-hosted woff2 (OFL), Arabic + Latin subsets.
   Colour:  components use semantic tokens only (--bg, --surface, --fg…); the palette is
            referenced from the token block alone. A second theme is a values-only change
            to that block, so the HTML stays the same and the CDN cache never splits.
   Rules we hold ourselves to (frontend-design / Impeccable / UI-UX Pro Max):
   - one memorable thing per screen (the chunky question type + hand-drawn doodles),
     everything else quiet;
   - no side-stripe borders, no gradient washes, no icon tiles above headings,
     no accent on a single headline word, SVG icons only (Lucide geometry);
   - text ≥ 4.5:1 on its surface (check-contrast.mjs); coral/mint never carry small
     text on white (the *-text tokens do); touch targets ≥ 40px; logical properties for RTL.
   ========================================================================= */

/* ---------- Fonts: self-hosted, swap, Arabic + Latin subsets ---------- */
@font-face { font-family: "Baloo Bhaijaan 2"; font-weight: 600; font-display: swap; src: url(fonts/baloo-bhaijaan-2-arabic-600-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Baloo Bhaijaan 2"; font-weight: 700; font-display: swap; src: url(fonts/baloo-bhaijaan-2-arabic-700-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Baloo Bhaijaan 2"; font-weight: 800; font-display: swap; src: url(fonts/baloo-bhaijaan-2-arabic-800-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Baloo Bhaijaan 2"; font-weight: 600; font-display: swap; src: url(fonts/baloo-bhaijaan-2-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Baloo Bhaijaan 2"; font-weight: 700; font-display: swap; src: url(fonts/baloo-bhaijaan-2-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Baloo Bhaijaan 2"; font-weight: 800; font-display: swap; src: url(fonts/baloo-bhaijaan-2-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Readex Pro"; font-weight: 400; font-display: swap; src: url(fonts/readex-pro-arabic-400-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Readex Pro"; font-weight: 500; font-display: swap; src: url(fonts/readex-pro-arabic-500-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Readex Pro"; font-weight: 600; font-display: swap; src: url(fonts/readex-pro-arabic-600-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Readex Pro"; font-weight: 700; font-display: swap; src: url(fonts/readex-pro-arabic-700-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Readex Pro"; font-weight: 400; font-display: swap; src: url(fonts/readex-pro-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Readex Pro"; font-weight: 500; font-display: swap; src: url(fonts/readex-pro-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Readex Pro"; font-weight: 600; font-display: swap; src: url(fonts/readex-pro-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Readex Pro"; font-weight: 700; font-display: swap; src: url(fonts/readex-pro-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* M3-T: Readex Pro draws "t" as a plain cross. These one-letter files redraw it with a curved foot
   (design/public-ui/tools/build-t-glyph.mjs); they come after the Latin faces, so they win for U+74 alone. */
@font-face { font-family: "Readex Pro"; font-weight: 400; font-display: swap; src: url(fonts/readex-pro-t-400.otf) format("opentype"); unicode-range: U+74; }
@font-face { font-family: "Readex Pro"; font-weight: 500; font-display: swap; src: url(fonts/readex-pro-t-500.otf) format("opentype"); unicode-range: U+74; }
@font-face { font-family: "Readex Pro"; font-weight: 600; font-display: swap; src: url(fonts/readex-pro-t-600.otf) format("opentype"); unicode-range: U+74; }
@font-face { font-family: "Readex Pro"; font-weight: 700; font-display: swap; src: url(fonts/readex-pro-t-700.otf) format("opentype"); unicode-range: U+74; }
/* Metric-matched local fallbacks shown during the swap, so the late web font shifts nothing.
   Values from the fonts' own metrics (capsize): size-adjust = (avg width / em) ÷ Arial's,
   and the ascent/descent overrides are divided by it. */
@font-face { font-family: "Baloo Fallback"; font-weight: 600 800; src: local("Arial Bold"), local("Arial-BoldMT"); size-adjust: 95.21%; ascent-override: 113.43%; descent-override: 66.38%; line-gap-override: 0%; }
@font-face { font-family: "Readex Fallback"; font-weight: 400 500; src: local("Arial"), local("ArialMT"); size-adjust: 108.35%; ascent-override: 92.29%; descent-override: 23.07%; line-gap-override: 0%; }
@font-face { font-family: "Readex Fallback"; font-weight: 600 700; src: local("Arial Bold"), local("Arial-BoldMT"); size-adjust: 108.35%; ascent-override: 92.29%; descent-override: 23.07%; line-gap-override: 0%; }

/* ---------- Tokens ---------- */
:root {
  /* Palette (brand board). Referenced only from the semantic tokens below. */
  --navy: #0F3B82;
  --navy-700: #0B2D66;
  --navy-100: #DCE6F6;
  --navy-50: #EAF0FA;
  --coral: #FF8B6B;
  /* -600/-650/-ink/mint-ink/facebook darkened just enough for WCAG AA with white text (2026-10-27). */
  --coral-600: #C94C2D;
  --coral-650: #BB4326;
  --coral-display: #DD6F52;
  --coral-ink: #B6401D;
  --coral-100: #FFE3D8;
  --coral-50: #FFF1EC;
  --mint: #4FD1C5;
  --mint-ink: #117B73;
  --mint-50: #E5F8F6;
  --red: #D92D3F; /* the like heart only, about 4.8:1 on white */
  /* M3-P: counts. -600 is the pill on light surfaces (white digits 5.1:1); -300 the digits alone on the navy bar (4.7:1). */
  --red-600: #D3263A;
  --off-white: #F8FAFC;
  --white: #FFFFFF;
  --ink-900: #22304D;
  --ink-700: #4A587A;
  --ink-500: #66728F;
  --ink-300: #98A3BA;
  --ink-200: #D5DCE8;
  --ink-100: #E4E9F2;
  --ink-50: #F1F4F9;

  /* Surfaces */
  --bg: var(--off-white);
  --bg-glass: rgba(248, 250, 252, .88);
  --surface: var(--white);
  --surface-muted: var(--ink-50);
  --surface-inverse: var(--navy);
  /* Text */
  --fg: var(--ink-900);
  --fg-2: var(--ink-700);
  --fg-muted: var(--ink-500);
  --fg-disabled: var(--ink-300);
  --fg-brand: var(--navy);
  --fg-brand-hover: var(--navy-700);
  --fg-on-fill: var(--white);
  --fg-on-fill-2: #C9D6EE;
  /* Borders */
  --line: var(--ink-100);
  --line-soft: var(--ink-50);
  /* Accent (Deep Blue fills) */
  --accent: var(--navy);
  --accent-hover: var(--navy-700);
  --accent-soft: var(--navy-50);
  --accent-soft-hover: var(--navy-100);
  /* Primary action (Coral) */
  --primary: var(--coral-600);
  --primary-hover: var(--coral-650);
  --primary-text: var(--coral-ink);
  --primary-soft: var(--coral-50);
  --primary-soft-hover: var(--coral-100);
  /* Positive / live (Mint) */
  --positive: var(--mint);
  --positive-text: var(--mint-ink);
  --positive-soft: var(--mint-50);
  /* States */
  --success: var(--mint-ink);
  --success-soft: var(--mint-50);
  --warning: #8A5A00;
  --warning-soft: #FFF3D6;
  --danger: var(--coral-ink);
  --danger-soft: var(--coral-50);
  --heart: var(--red);
  --count: var(--red-600);
  --danger-icon: var(--red-600);
  --unread-soft: var(--accent-soft);
  --unread-soft-hover: var(--accent-soft-hover);
  --info: var(--navy);
  --info-soft: var(--navy-50);
  --focus-ring: var(--mint);
  /* Decoration (doodles, blobs, illustrations) */
  --deco-navy: var(--navy);
  --deco-coral: var(--coral);
  /* Coral used as large display text (54px step numbers) must still reach 3:1. */
  --fg-coral-display: var(--coral-display);
  --deco-mint: var(--mint);
  --blob-coral: #FFE6DC;
  --blob-mint: #DDF5F2;
  --sun-soft: var(--warning-soft);
  --sun-text: var(--warning);
  --device-frame: #16233D;
  /* M3-G: a person's avatar: the silhouette on the soft tint, and the soft coral to navy ring */
  --avatar-face: #B4C3DE;
  --avatar-ring: linear-gradient(160deg, rgba(255, 139, 107, .8), rgba(15, 59, 130, .5));
  /* Controls */
  --switch-off: var(--ink-200);
  --switch-on: var(--mint);
  --knob: var(--white);
  --facebook: #0D6FEE;
  --facebook-hover: #0F66D9;

  /* Elevation */
  --lift: 0 1px 4px rgba(15, 59, 130, .07);
  --pop: 0 18px 50px -12px rgba(15, 37, 74, .28);
  --shadow-nav: 0 -10px 30px -18px rgba(15, 37, 74, .35);
  --shadow-knob: 0 2px 4px rgba(15, 37, 74, .25);
  --shadow-seg: 0 2px 8px -2px rgba(15, 37, 74, .18);
  --shadow-device: 0 40px 80px -30px rgba(15, 37, 74, .55);
  --shadow-primary: 0 10px 22px -10px rgba(240, 98, 63, .8);
  --shadow-fab: 0 12px 24px -8px rgba(240, 98, 63, .7);
  --scrim: rgba(15, 37, 74, .45);

  /* Space, shape, type */
  --gutter: 16px;
  --r-card: 22px;
  --r-field: 16px;
  --r-pill: 999px;
  --display: "Baloo Bhaijaan 2", "Baloo Fallback", "Readex Pro", system-ui, sans-serif;
  --body: "Readex Pro", "Readex Fallback", "Segoe UI", Tahoma, system-ui, sans-serif;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
/* A column at least the height of the screen, so the footer (margin-top: auto) sits at the bottom of short pages. */
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--fg);
  font: 400 16px/1.8 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button, [role="tab"], label[for], .chip { cursor: pointer; }
h1, h2, h3 { margin: 0; font-family: var(--display); color: var(--fg-brand); line-height: 1.25; font-weight: 800; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; border-radius: 10px; }
::selection { background: var(--positive-soft); color: var(--fg-brand); }

.icon {
  width: 22px; height: 22px; flex: none;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon--sm { width: 18px; height: 18px; }
.icon--xs { width: 15px; height: 15px; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ltr { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .ltr { text-align: right; }
.muted { color: var(--fg-muted); }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.link { color: var(--primary-text); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ---------- Wordmark ---------- */
.wordmark {
  position: relative; display: inline-flex; align-items: flex-start; direction: ltr;
  font: 800 30px/1 var(--display); color: var(--fg-brand); letter-spacing: -.5px;
  padding-top: 4px;
}
.wordmark__spark { width: 18px; height: 18px; margin-inline-start: 1px; margin-top: -6px; color: var(--deco-mint); }
.wordmark--xl { font-size: clamp(56px, 9vw, 92px); }
.wordmark--xl .wordmark__spark { width: 34px; height: 34px; margin-top: -10px; }

/* The paper plane is the end of the y's smile. The same mark works on light and dark surfaces. */
.wordmark { padding: 0; }
.wordmark__logo { display: block; width: 122px; height: auto; }
/* A navy badge with "asky" in white and ".fm" in the brand orange (coral, about 4.6:1 on navy): the same on dark and light surfaces. */
.wordmark__badge { fill: var(--navy); }
.wordmark__ask { font: 800 40px var(--display); letter-spacing: -1px; fill: var(--white); }
.wordmark__a { fill: none; stroke: var(--white); stroke-width: 6.8; stroke-linecap: round; }
.wordmark__fm { font: 700 21px var(--body); fill: var(--coral); }
.wordmark--xl .wordmark__logo { width: clamp(220px, 35vw, 360px); }
/* The name in running text, as the logo draws it (BrandName): the round "a" (i-asky-a, 28 units = .7em) sits on the
   baseline over a transparent typed a, so copy and screen readers keep "asky"; then "sky" in the display face. */
.brand { font-family: var(--display); font-weight: 800; letter-spacing: -.025em; white-space: nowrap; }
.brand__a, .brand__a::selection { color: transparent; }
.brand svg { display: inline; width: .7em; height: .7em; margin: 0 -.08em 0 -.62em; vertical-align: -.1em; }

/* ---------- Doodles (hand-drawn accents from the board) ---------- */
.doodle { position: absolute; pointer-events: none; }
.doodle path { fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- App frame ---------- */
.appbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--navy); color: var(--white);
}
.appbar__inner { height: 62px; max-width: 1240px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 6px; }
.appbar .wordmark { color: var(--white); }
.appbar .wordmark__logo { width: 112px; }
.appbar .wordmark__fm { fill: var(--coral); }
.appbar .icon-btn { color: var(--white); }
.appbar__notification { position: relative; }
/* The count is a red dot with white digits and a navy ring, so it reads on the navy bar. It pops in, and the bell rings now and then while something is unread. */
.appbar__notification .badge {
  position: absolute; top: 1px; inset-inline-end: -2px; min-width: 18px; height: 18px; padding: 0 5px;
  box-shadow: 0 0 0 2px var(--navy); font-size: 11px;
  animation: badge-pop .5s cubic-bezier(.3, 1.6, .5, 1);
}
.appbar__notification:has(.badge:not([hidden])) svg { transform-origin: 50% 12%; animation: bell-ring 5s ease-in-out 1s infinite; }
@keyframes badge-pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bell-ring { 0%, 86%, 100% { transform: none; } 89% { transform: rotate(14deg); } 92% { transform: rotate(-12deg); } 95% { transform: rotate(7deg); } 98% { transform: rotate(-3deg); } }
/* A ring around the bell while its list is open (asky.js sets aria-expanded) and on the notifications page. */
.appbar__notification:is([aria-expanded="true"], [aria-current="page"]) { background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .8); }
.appbar__end { margin-inline-start: auto; display: flex; gap: 2px; }
/* Phones have the profile in the bottom bar, so the app bar keeps only the bell there. */
@media (max-width: 759px) { .appbar .appbar__me { display: none; } }

.app {
  width: 100%; max-width: 1240px; margin: 0 auto;
  padding: 16px 16px 24px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start;
}
.main { min-width: 0; width: 100%; max-width: 600px; margin-inline: auto; display: flex; flex-direction: column; gap: 16px; }
/* An app page seen by a guest keeps the signed-in frame's space under the bar and above the footer. */
.container--app { padding-block: 16px 24px; }
.sidebar, .aside { display: none; }

/* Bottom nav (mobile) — center coral "+" is the ask action */
.bottomnav {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line); border-radius: 0;
  box-shadow: 0 -4px 20px rgba(15, 59, 130, .04);
}
.bottomnav a {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-height: 48px; justify-content: flex-end; font-size: 11.5px; font-weight: 500; color: var(--fg-muted);
}
.bottomnav a[aria-current="page"] { color: var(--fg-brand); font-weight: 600; }
.bottomnav a[aria-current="page"] .icon { stroke-width: 2.3; }
.bottomnav .badge { position: absolute; top: -2px; inset-inline-start: calc(50% + 2px); }
.bottomnav .fab {
  /* Inside the bar, centred with the other items: a round coral button, no overlap with the bar's edge. */
  /* place-content too: the bar's links use justify-content: flex-end, which would push the icon to one side. */
  justify-self: center; align-self: center; min-height: 0; gap: 0; display: grid; place-items: center; place-content: center;
  width: 46px; height: 46px; margin: 0; border-radius: 50%;
  background: var(--primary); color: var(--fg-on-fill);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 32%, transparent);
  transition: transform .15s ease;
}
.bottomnav .fab:active { transform: scale(.94); }
/* The middle button is always the coral one; on its own page it keeps its white icon (not the brand colour of the other current items). */
.bottomnav .fab[aria-current="page"] { color: var(--fg-on-fill); }
.bottomnav .fab .icon { width: 24px; height: 24px; stroke-width: 2.4; }

@media (min-width: 760px) {
  .bottomnav { display: none; }
  .app { grid-template-columns: 88px minmax(0, 1fr); padding-top: 24px; padding-bottom: 48px; }
  .container--app { padding-block: 24px 48px; }
  .sidebar { display: flex; }
}
@media (min-width: 1140px) {
  .app { grid-template-columns: 240px minmax(0, 1fr) 310px; }
  .aside { display: flex; }
  .hide-wide { display: none !important; }
}

/* Sidebar (tablet = icon rail, desktop = labels) */
/* One calm panel: the links, the ask button, then who is signed in, close together rather than spread down the screen. */
.sidebar { position: sticky; top: 86px; flex-direction: column; gap: 2px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--lift); }
.sidebar .wordmark { font-size: 0; margin: 0 auto 18px; }
.sidebar .wordmark::before { content: "A"; font-size: 34px; }
.sidebar .wordmark span { display: none; }
.navlink {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 14px;
  height: 44px; padding: 0 14px; border-radius: 12px;
  color: var(--fg-2); font-weight: 500; font-size: 15.5px; transition: color .15s;
}
.navlink:hover, .navlink[aria-current="page"] { color: var(--fg-brand); }
.navlink[aria-current="page"] { font-weight: 700; }
/* M3-P: nothing is drawn behind the app bar's and the sidebar's icons. Hover lifts the icon and draws it bolder; the
   current page keeps it bold with a coral dot under it. Focus keeps its ring; reduced motion stops the lift (below). */
.appbar .icon-btn:hover { background: none; }
.appbar .icon-btn .icon, .navlink .icon { transition: scale .2s, translate .2s, stroke-width .2s; }
.appbar .icon-btn:hover .icon, .navlink:hover .icon { scale: 1.1; translate: 0 -1px; stroke-width: 2.5; }
:is(.appbar .icon-btn, .navlink)[aria-current="page"] .icon { stroke-width: 2.5; }
:is(.appbar .icon-btn, .navlink)[aria-current="page"]::after { content: ""; position: absolute; bottom: 3px; inset-inline-start: calc(50% - 2.5px); width: 5px; height: 5px; border-radius: 50%; background: var(--primary); }
.appbar .icon-btn[aria-current="page"]::after { background: var(--coral); }
.navlink__label { display: none; }
.navlink .badge { position: absolute; top: 8px; inset-inline-end: 12px; }
/* Sign out: under settings, quieter than the pages above it. */
.navlink--quiet { color: var(--fg-muted); font-weight: 400; }
.sidebar__ask { margin-top: 10px; width: 48px; height: 48px; padding: 0; align-self: center; }
.sidebar__ask span { display: none; }
.sidebar__me { margin-top: 10px; padding: 12px 6px 2px; border-top: 1.5px solid var(--line-soft); display: none; }
@media (min-width: 1140px) {
  .sidebar .wordmark { font-size: 32px; margin: 0 14px 22px; }
  .sidebar .wordmark::before { content: none; }
  .sidebar .wordmark span { display: inline; }
  .navlink { justify-content: flex-start; }
  /* Under the icon once labels show; .sidebar matches the specificity of the shared dot rule above. */
  .sidebar .navlink[aria-current="page"]::after { inset-inline-start: 22.5px; }
  .navlink__label { display: inline; }
  .navlink .badge { position: static; margin-inline-start: auto; }
  .sidebar__ask { width: 100%; height: 48px; align-self: stretch; }
  .sidebar__ask span { display: inline; }
  .sidebar__me { display: flex; }
}

.aside { position: sticky; top: 86px; flex-direction: column; gap: 16px; }

/* ---------- Primitives ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--lift); }
.card--pad { padding: 22px; }
.section-title { font-size: 19px; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.section-title a { font: 600 13.5px var(--body); color: var(--primary-text); }
.page-head { display: flex; align-items: center; gap: 10px; padding: 6px 2px 2px; }
.page-head h1 { font-size: 28px; }
.settings-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.settings-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg-brand); font-size: 14px; font-weight: 600; }
.settings-nav a:hover { background: var(--accent-soft); }
/* Phones: the settings sections stay on one line; anything wider scrolls sideways, it never wraps. */
@media (max-width: 599px) {
  .settings-nav::-webkit-scrollbar { display: none; }
  .settings-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .settings-nav a { flex: none; white-space: nowrap; }
}
.filter-empty { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-field); background: var(--surface); color: var(--fg-2); }
body[data-page="settings"] [id] { scroll-margin-top: calc(78px + env(safe-area-inset-top, 0px)); }

.badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--r-pill); background: var(--count); color: var(--fg-on-fill);
  font: 700 11.5px/1 var(--body); box-shadow: 0 0 0 2px var(--surface);
}
.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px;
  border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600;
  background: var(--positive-soft); color: var(--positive-text);
}
.tag--coral { background: var(--primary-soft); color: var(--primary-text); }
.tag--navy { background: var(--accent-soft); color: var(--fg-brand); }
.hashtag { color: var(--fg-brand); font-weight: 600; }
.hashtag:hover { text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border: 0; border-radius: 12px;
  font: 600 15px/1 var(--body); white-space: nowrap;
  transition: transform .12s ease, background-color .15s, box-shadow .15s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { background: var(--surface-muted) !important; color: var(--fg-disabled) !important; box-shadow: none !important; cursor: not-allowed; transform: none; }
.btn--coral { background: var(--primary); color: var(--fg-on-fill); font-weight: 700; }
.btn--coral:hover:not(:disabled) { background: var(--primary-hover); }
.btn--navy { background: var(--accent); color: var(--fg-on-fill); }
.btn--navy:hover { background: var(--accent-hover); }
.btn--soft { background: var(--accent-soft); color: var(--fg-brand); }
.btn--soft:hover { background: var(--accent-soft-hover); }
.btn--line { background: var(--surface); color: var(--fg-brand); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--line:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.btn--ghost { background: transparent; color: var(--fg-2); }
.btn--ghost:hover { background: var(--surface-muted); color: var(--fg-brand); }
.btn--soft-coral { background: var(--primary-soft); color: var(--primary-text); }
.btn--soft-coral:hover { background: var(--primary-soft-hover); }
.btn--danger { background: var(--danger-soft); color: var(--danger); }
.btn--sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn--lg { height: 56px; padding: 0 28px; font-size: 17px; }
.btn--block { width: 100%; }

.icon-btn {
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; color: var(--fg-brand);
  transition: background-color .15s;
}
.icon-btn:hover { background: var(--surface-muted); }
.icon-btn--sm { width: 40px; height: 40px; color: var(--fg-muted); }
.icon-btn .badge { position: absolute; top: 3px; inset-inline-end: 2px; }

/* Avatars — soft tint + strong letter; photos drop in as <img> */
.avatar {
  --s: 44px;
  width: var(--s); height: var(--s); flex: none; border-radius: 50%; overflow: hidden;
  display: inline-grid; place-items: center; user-select: none; position: relative;
  font: 700 calc(var(--s) * .42)/1 var(--display); padding-top: calc(var(--s) * .06);
  background: var(--accent-soft); color: var(--fg-brand);
}
/* A photo covers the letter, which stays underneath as the fallback (M2-T6b). */
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.avatar--coral { background: var(--primary-soft); color: var(--primary-text); }
.avatar--mint { background: var(--positive-soft); color: var(--positive-text); }
.avatar--sun { background: var(--sun-soft); color: var(--sun-text); }
.avatar--anon { background: var(--surface-muted); color: var(--fg-brand); padding-top: 0; }
.avatar--anon .icon { width: 55%; height: 55%; }
/* A question from Asky: the wordmark's drawn round "a" on its navy badge, never a person's letter. */
.avatar--asky { background: var(--navy); color: var(--white); padding-top: 0; }
.avatar--asky svg { width: 58%; height: 58%; }
/* M3-G: every person (photo or silhouette) gets a thin ring and a surface gap, drawn inside --s: no layout shift. */
.avatar--user {
  --rw: max(1.5px, var(--s) * .026); --gap: max(1.5px, var(--s) * .02);
  padding: var(--gap); border: var(--rw) solid transparent; color: var(--avatar-face);
  background: linear-gradient(var(--accent-soft) 0 0) content-box, linear-gradient(var(--surface) 0 0) padding-box, var(--avatar-ring) border-box;
}
.avatar--user img { inset: var(--gap); width: calc(100% - 2 * var(--gap)); height: calc(100% - 2 * var(--gap)); }
.avatar__face { width: 100%; height: 100%; }
.avatar--xs { --s: 28px; }
.avatar--sm { --s: 36px; }
.avatar--lg { --s: 64px; }
.avatar--xl { --s: 116px; }
.avatars { display: flex; }
.avatars .avatar { box-shadow: 0 0 0 2.5px var(--surface); margin-inline-start: -9px; }
.avatars .avatar:first-child { margin-inline-start: 0; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label, .label { font-size: 14px; font-weight: 600; color: var(--fg-brand); }
.hint { font-size: 12.5px; color: var(--fg-muted); }
.hint .icon { display: inline; vertical-align: -3px; }
.hint--error { color: var(--danger); font-weight: 500; }
/* Same single line under both inbox folders, so switching folders never moves the list. */
.folder-hint { min-height: 1.6em; margin: -4px 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.input, .textarea, .select {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--r-field);
  background: var(--surface); color: var(--fg); transition: border-color .15s, box-shadow .15s;
}
.input, .select { height: 50px; padding: 0 16px; }
.textarea { min-height: 110px; padding: 14px 16px; line-height: 1.75; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--fg-muted); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input-wrap { position: relative; }
.input-wrap__affix { position: absolute; left: 16px; top: 0; height: 50px; display: grid; place-items: center; color: var(--fg-muted); font-weight: 600; pointer-events: none; }
.input-wrap .input { padding-left: 38px; } /* the handle is always LTR, so "@" sits on its left in both directions */
.search { position: relative; }
.search .input { height: 52px; border-radius: var(--r-pill); padding-inline-start: 50px; border-color: transparent; box-shadow: var(--lift); }
.search .icon { position: absolute; inset-inline-start: 18px; top: 15px; color: var(--fg-muted); }
/* People search: result rows (the page) and the suggestion list under the ask page's username field. */
.search-results { padding: 6px; }
.search-results__row { padding: 8px 10px; border-radius: 12px; }
.search-results__row:hover, .search-results__row[aria-selected="true"] { background: var(--surface-muted); }
.search-results__empty { padding: 14px 10px; text-align: center; color: var(--fg-muted); font-size: 14px; }
.search-hint { padding: 0 6px; }
.suggest { position: absolute; top: calc(100% + 6px); inset-inline: 0; z-index: 30; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--lift); }
.suggest .search-results__row { cursor: pointer; }
.form-grid { display: grid; gap: 18px; }
@media (min-width: 620px) { .form-grid { grid-template-columns: 1fr 1fr; } .field--full { grid-column: 1 / -1; } }

.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 500; color: var(--fg); user-select: none; cursor: pointer; }
.switch input {
  appearance: none; -webkit-appearance: none; position: relative; flex: none; margin: 0; cursor: pointer;
  width: 50px; height: 30px; border-radius: var(--r-pill); background: var(--switch-off); transition: background-color .2s;
}
.switch input::after {
  content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: var(--knob); box-shadow: var(--shadow-knob);
  transition: inset-inline-start .2s ease;
}
.switch input:checked { background: var(--switch-on); }
.switch input:checked::after { inset-inline-start: 23px; }
.counter { font-size: 12.5px; color: var(--fg-muted); font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .2s; }
.counter.is-shown { opacity: 1; }
.counter.is-near { color: var(--primary-text); font-weight: 600; }

/* Tabs — equal width, navy underline (as on the board) */
.tabs { display: flex; border-bottom: 1.5px solid var(--line); }
.tab {
  position: relative; flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 48px; border: 0; background: none;
  font: 500 15px var(--body); color: var(--fg-muted); white-space: nowrap;
}
.tab:hover { color: var(--fg-brand); }
.tab[aria-selected="true"], .tab[aria-current="page"] { color: var(--fg-brand); font-weight: 700; }
.tab[aria-selected="true"]::after, .tab[aria-current="page"]::after {
  content: ""; position: absolute; inset-inline: 22%; bottom: -1.5px; height: 3px; border-radius: 3px; background: var(--accent);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter); }
.chips--scroll::-webkit-scrollbar { display: none; }
/* Three filters, the row split into equal columns so a longer count never widens one of them. */
.chips--fit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chips--fit .chip { height: auto; min-width: 0; justify-content: center; padding: 8px 6px; white-space: nowrap; overflow: hidden; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px; flex: none;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg-2);
  font: 500 14px var(--body); transition: border-color .15s, box-shadow .15s, color .15s;
}
.chip:hover { color: var(--fg-brand); border-color: var(--accent); }
.chip[aria-pressed="true"] { color: var(--fg-brand); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 700; }
.chip small { font-size: 12px; color: var(--fg-muted); }

/* ---------- Post (an answered question) ---------- */
.post { padding: 20px 20px 8px; }
.post__head { display: flex; align-items: center; gap: 11px; }
.post__who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.post__name { font-weight: 600; color: var(--fg); }
.post__name:hover { color: var(--fg-brand); }
.post__time { font-size: 12.5px; color: var(--fg-muted); }
.post__q { margin-top: 14px; padding: 14px 16px 15px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-muted); }
.post__asker { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--fg-2); }
.post__asker .icon { color: var(--fg-brand); }
.post__asker a { color: var(--fg-brand); font-weight: 600; }
.post__qtext { display: block; margin-top: 4px; font: 600 17px/1.65 var(--body); color: var(--fg-brand); overflow-wrap: anywhere; }
a.post__qtext:hover { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px; }
.post__answer { margin: 14px 4px 0; font-size: 16px; white-space: pre-line; overflow-wrap: anywhere; }
.post__bar { display: flex; align-items: center; gap: 2px; margin-top: 10px; }
.post__pin { margin-bottom: 12px; }
.react {
  display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 12px;
  border: 0; border-radius: var(--r-pill); background: transparent; color: var(--fg-2);
  font: 500 14px var(--body); transition: background-color .15s, color .15s;
}
.react:hover { background: var(--surface-muted); color: var(--fg-brand); }
/* The like has no fill of its own: on hover the heart turns red and beats with a soft glow around it. */
.like:hover { background: transparent; color: var(--heart); }
.like:hover .icon { animation: beat 1s ease-in-out infinite; }
@keyframes beat {
  0%, 60%, 100% { transform: scale(1); filter: none; }
  20% { transform: scale(1.2); filter: drop-shadow(0 0 5px rgba(217, 45, 63, .45)); }
  40% { transform: scale(1.06); }
}
.like[aria-pressed="true"] { color: var(--heart); }
.like:disabled { background: transparent; color: var(--fg-2); }
/* Like and follow buttons sit in a form (they post without JS); the form adds no box of its own. */
.inline-form { display: contents; }
.like[aria-pressed="true"] .icon { fill: currentColor; animation: pop .32s ease-out; }
.save[aria-pressed="true"] { color: var(--fg-brand); }
.save[aria-pressed="true"] .icon { fill: currentColor; }
.post--hero { padding: 22px 22px 10px; }
/* The answer in focus gets a navy edge: on hover (mouse), from the keyboard, on its own page, and on touch
   screens while it passes the middle of the screen (CSS scroll timeline, no JS; older browsers simply skip it). */
.post { --edge: var(--accent); transition: border-color .2s, box-shadow .2s; }
.post:focus-within, .post--hero { border-color: var(--edge); box-shadow: 0 0 0 1px var(--edge), var(--glow, var(--lift)); }
@media (hover: hover) { .post:hover { border-color: var(--edge); box-shadow: 0 0 0 1px var(--edge), var(--glow, var(--lift)); } }
@supports (animation-timeline: view()) {
  @media (hover: none) { .post:not(.post--hero) { animation: in-focus linear both; animation-timeline: view(); } }
}
@keyframes in-focus {
  0%, 30%, 70%, 100% { border-color: var(--line); box-shadow: var(--lift); }
  40%, 60% { border-color: var(--edge); box-shadow: 0 0 0 1px var(--edge), var(--glow, var(--lift)); }
}
/* M3-T: an answer to one of asky's dare questions. The card keeps its shape: the label is an ember chip with a gold
   flame, and the edge in focus is ember with a warm glow instead of navy. */
.post--dare { --edge: #F5873A; --glow: 0 8px 22px -8px rgba(245, 135, 58, .5); }
.post--dare .post__asker { width: fit-content; white-space: nowrap; padding: 2px 10px 2px 8px; border-radius: var(--r-pill); background: var(--primary-soft); color: var(--primary-text); font-weight: 700; }
.post--dare .post__asker .icon { color: var(--coral-600); fill: #F6C343; }
.post--hero .post__qtext { font-size: 20px; }
.post--hero .post__answer { font-size: 17px; }
@keyframes pop { 40% { transform: scale(1.3); } }

/* ---------- Question card (inbox) ---------- */
.qcard { padding: 18px 20px; }
.qcard__head { display: flex; align-items: center; gap: 10px; }
.qcard__meta { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.qcard__from { font-size: 14px; font-weight: 600; color: var(--fg); }
.qcard__from a { color: var(--fg-brand); }
.qcard__time { font-size: 12.5px; color: var(--fg-muted); }
.qcard__text { margin: 10px 0 0; font: 600 17px/1.65 var(--body); color: var(--fg-brand); overflow-wrap: anywhere; cursor: pointer; border-radius: 8px; }
.qcard__text:hover { color: var(--fg-brand-hover); }
.qcard__actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 12px; }
.qcard__form { display: none; margin-top: 12px; }
.qcard.is-open .qcard__form { display: block; animation: reveal .22s ease-out; }
.qcard.is-open .qcard__actions { display: none; }
.qcard__formbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.qcard__formbar .counter { margin-inline-start: auto; }
.qcard__new { width: 8px; height: 8px; border-radius: 50%; background: var(--positive); flex: none; align-self: center; }
/* M3-N: caught by the member's own word filter: blurred, no actions, until the "show" checkbox is ticked */
.qcard__veil { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--fg-muted); }
.qcard__veil label { margin-inline-start: auto; }
.qcard__reveal:not(:checked) ~ .qcard__text { filter: blur(6px); user-select: none; pointer-events: none; }
.qcard__reveal:not(:checked) ~ :is(.qcard__actions, .qcard__form), .qcard__reveal:checked ~ * .qcard__show, .qcard__reveal:not(:checked) ~ * .qcard__hide { display: none; }
.qcard__reveal:focus-visible ~ * label { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

.is-leaving { animation: leave .26s ease-in forwards; }
@keyframes leave { to { opacity: 0; transform: scale(.96); } }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } }

.empty { padding: 44px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty svg.art { width: 120px; height: 90px; }
.empty h3 { font-size: 21px; }
.empty p { color: var(--fg-2); max-width: 34ch; }

/* ---------- Profile ---------- */
.profile { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 14px 4px 4px; }
.profile__avatar { position: relative; overflow: visible; box-shadow: 0 0 0 5px var(--surface), var(--lift); }
.profile__online { position: absolute; bottom: 8px; inset-inline-end: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--positive); box-shadow: 0 0 0 4px var(--surface); }
.profile__avatar-wrap { position: relative; }
.profile__hearts { width: 46px; height: 46px; top: -8px; inset-inline-start: calc(100% + 2px); color: var(--deco-coral); }
.profile__name { margin-top: 14px; font-size: 30px; }
.profile__handle { font-size: 14.5px; color: var(--fg-muted); text-align: center !important; }
.profile__bio { margin-top: 8px; max-width: 42ch; color: var(--fg-2); unicode-bidi: plaintext; }
.profile__bio .icon { display: inline; vertical-align: -3px; color: var(--primary); }
.profile__stats { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; max-width: 420px; margin-top: 18px; }
.profile__stats > div { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.3; }
.profile__stats > div + div { border-inline-start: 1.5px solid var(--line); }
.profile__stats b { font: 800 22px/1.3 var(--display); color: var(--fg-brand); }
.profile__stats span { font-size: 13px; color: var(--fg-muted); }
.profile__actions { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; max-width: 420px; margin-top: 18px; }
.profile__actions .btn { flex: 1; }
.profile__tools { position: absolute; top: 0; inset-inline-end: 0; }

/* Profile page: one calm surface for identity, with a compact mobile layout. */
.profile--page { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 24px; box-shadow: var(--lift); }
.profile--page .profile__hearts { display: none; }
.profile--page .profile__avatar { box-shadow: none; }
.profile--page .profile__bio { overflow-wrap: anywhere; }
.profile--page .profile__avatar { width: 84px; height: 84px; font-size: 32px; }
.profile--page .profile__name { margin-top: 10px; font-size: 25px; }
.profile--page .profile__stats { margin-top: 14px; }
.profile--page .profile__actions { margin-top: 14px; }
.profile--page .profile__actions .inline-form { flex: 1; display: flex; }
.profile--page .profile__actions .inline-form .btn { width: 100%; }
.profile__cover { align-self: stretch; margin: -24px -24px 16px; aspect-ratio: 3 / 1; overflow: hidden; border-radius: var(--r-card) var(--r-card) 0 0; background: var(--surface-muted); }
.profile__cover img, .photo-slot__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* The owner's camera buttons on their own profile (like Facebook): a pill on the cover, a round one on the avatar. */
.profile__cover { position: relative; }
.photo-edit__btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; border-radius: var(--r-pill); background: var(--surface); color: var(--fg-brand); box-shadow: var(--lift); font: 600 13px var(--body); }
.photo-edit__btn:hover { background: var(--accent-soft); }
.photo-edit__btn:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.photo-edit--cover { position: absolute; bottom: 10px; inset-inline-end: 10px; }
.photo-edit--cover .photo-edit__btn { min-height: 36px; padding: 0 14px; }
.photo-edit--avatar { position: absolute; bottom: 0; inset-inline-end: 0; }
.photo-edit--avatar .photo-edit__btn { width: 36px; height: 36px; border: 2px solid var(--surface); }
.photo-slot__row { display: flex; align-items: center; gap: 14px; }
.photo-slot__cover { flex: none; width: 120px; aspect-ratio: 3 / 1; border-radius: 10px; overflow: hidden; background: var(--surface-muted); }
.photo-slot__form { gap: 8px; flex-wrap: wrap; }
.photo-slot__form .input { flex: 1 1 200px; min-width: 0; width: auto; height: auto; padding: 8px; }
/* M3-Q: default cover colour (until cover.svg loads); share as a text button; a tab's count, hidden at 0 */
.profile__cover--default, .photo-slot__cover--default { background: var(--surface-inverse); }
.share-btn { background: none; color: var(--fg-brand); }
.react.share-btn { color: var(--fg-2); }
.share-btn:hover { background: none; color: var(--fg-brand); text-decoration: underline 1.5px; text-underline-offset: 5px; }
.tab__count { margin-inline-start: 5px; color: var(--fg-muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.tab[aria-selected="true"] .tab__count { color: var(--fg-2); }
.tab__count[data-count="0"] { display: none; }
/* Crop dialog (T6b §4a): the photo moves under a fixed frame, a circle for the avatar and 3:1 for the cover. */
.crop__stage {
  position: relative; direction: ltr; height: 300px; overflow: hidden; border-radius: var(--r-field);
  background: var(--device-frame); touch-action: none; user-select: none; cursor: grab;
}
.crop__stage:active { cursor: grabbing; }
.crop__stage:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.crop__stage canvas { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; }
.crop__frame {
  position: absolute; left: 50%; top: 50%; height: 84%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; box-shadow: 0 0 0 100vmax var(--scrim), inset 0 0 0 2px var(--white); pointer-events: none;
}
.crop--cover .crop__stage { height: 220px; }
.crop--cover .crop__frame { width: 92%; height: auto; aspect-ratio: 3; border-radius: 10px; }
.crop__zoom { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.crop__zoom input { flex: 1; accent-color: var(--accent); }
body[data-page="profile"] .tabs { background: var(--surface); border-radius: 14px; overflow: hidden; }
body[data-page="profile"] .tab { flex: 1; }
@media (min-width: 760px) {
  .profile--page { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 22px; text-align: start; align-items: center; }
  .profile--page .profile__avatar-wrap { grid-row: 1 / 4; }
  .profile--page .profile__cover { grid-column: 1 / -1; }
  .profile--page .profile__cover ~ .profile__avatar-wrap { grid-row: 2 / 5; }
  .profile--page .profile__name { margin: 0; }
  [dir="rtl"] .profile--page .profile__handle { text-align: right !important; }
  [dir="ltr"] .profile--page .profile__handle { text-align: left !important; }
  .profile--page .profile__bio { margin-top: 4px; }
  [dir="rtl"] .profile--page .profile__bio { text-align: right; }
  [dir="ltr"] .profile--page .profile__bio { text-align: left; }
  .profile--page .profile__stats, .profile--page .profile__actions { grid-column: 1 / -1; max-width: none; }
}
body[data-page="profile"] .askbox { border: 1px solid var(--line); }
.only-owner { display: none !important; }
.is-owner .only-owner { display: revert !important; }
.is-owner .profile__actions.only-owner { display: flex !important; }
.is-owner .only-visitor { display: none !important; }

/* Ask box on someone's profile */
.askbox { padding: 18px; }
.askbox h2 { font-size: 20px; display: flex; align-items: center; gap: 8px; }
.askbox .textarea { margin-top: 12px; min-height: 96px; background: var(--bg); border-color: transparent; }
.askbox .textarea:focus { background: var(--surface); }
.askbox__bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.askbox__bar .counter { margin-inline-start: auto; }
.askbox--signin { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; }
.askbox--signin > div { flex: 1 1 220px; }
@media (max-width: 599px) { .askbox--signin .btn, .askbox__bar .btn { flex: 1 1 100%; } }
.askbox--signin .anon-hint { flex-wrap: nowrap; align-items: flex-start; margin-top: 6px; }
.askbox--signin .anon-hint .icon { flex: none; margin-top: 3px; }

/* ---------- Ask screen ---------- */
.ask-screen { position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: calc(100vh - 20px); padding: 8px 2px 0; }
/* Focus screens (ask) drop the mobile chrome so the composer owns the viewport */
.is-focus .appbar, .is-focus .bottomnav { display: none; }
.is-focus .app { padding-bottom: 0; }
.ask-screen__close { align-self: flex-start; margin-inline-start: -8px; }
.ask-screen__title { position: relative; display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: clamp(30px, 8vw, 38px); }
.ask-screen__plane { width: 46px; height: 46px; color: var(--deco-navy); flex: none; }
.ask-screen__lead { margin-top: 6px; color: var(--fg-2); font-size: 16px; }
.ask-screen__to { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.ask-screen__to b { color: var(--fg-brand); }
.ask-screen__field { position: relative; margin-top: 14px; padding: 16px 18px 12px; }
.ask-screen__field textarea { width: 100%; min-height: 130px; border: 0; padding: 0; resize: none; background: none; font-size: 17px; line-height: 1.8; }
.ask-screen__field textarea:focus { outline: none; }
.ask-screen__field:focus-within { box-shadow: 0 0 0 2px var(--accent), var(--lift); }
.ask-screen__field .counter { display: block; text-align: end; }
.ask-screen__opt { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding: 12px 16px; }
.ask-screen__opt .row { color: var(--fg); font-weight: 500; }
.ask-screen__send { margin-top: 18px; font-size: 18px; }
.ask-screen form { margin-bottom: 30px; }
.ask-screen__waves { position: relative; margin: auto calc(-2px - var(--gutter)) 0; height: 200px; flex: none; }
.ask-screen__waves > svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; }
.ask-screen__tagline {
  position: absolute; inset-inline-start: 8%; bottom: 28px; transform: rotate(-7deg);
  font: 800 30px/1.05 var(--display); color: var(--fg-on-fill); text-align: start;
}
.ask-screen__tagline .icon { display: inline; width: 22px; height: 22px; color: var(--deco-coral); stroke-width: 2.4; vertical-align: -2px; }
@media (min-width: 760px) {
  .ask-screen { min-height: 0; padding: 26px 30px 0; background: var(--surface); border-radius: 30px; box-shadow: var(--lift); }
  .ask-screen__field, .ask-screen__opt { background: var(--bg); box-shadow: none; }
  .ask-screen__waves { margin: 0 -30px; }
}

/* ---------- Notifications ---------- */
.notif-day { padding: 16px 20px 4px; font: 700 16px var(--display); color: var(--fg-brand); }
.notif { position: relative; display: flex; align-items: center; gap: 12px; padding: 13px 20px; transition: background-color .15s; }
.notif:hover { background: var(--bg); }
.notif__pic { position: relative; flex: none; }
.notif__kind { position: absolute; bottom: -2px; inset-inline-end: -4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 0 0 2.5px var(--surface); }
.notif__kind .icon { width: 12px; height: 12px; stroke-width: 2.8; }
.notif__kind--like { background: var(--primary); color: var(--fg-on-fill); }
.notif__kind--like .icon { fill: currentColor; }
.notif__kind--follow, .notif__kind--friend { background: var(--positive); color: var(--fg-brand); }
.notif__kind--answer, .notif__kind--question { background: var(--accent); color: var(--fg-on-fill); }
.notif__kind--warning { background: var(--danger); color: var(--fg-on-fill); }
/* The event line is asky orange, never the app bar's white (the bell's list sits inside the bar); names stay navy. */
.notif__body { flex: 1; min-width: 0; line-height: 1.55; color: var(--primary-text); font-weight: 600; }
.notif__body b { color: var(--fg-brand); font-weight: 600; }
.notif__quote { display: block; font-size: 13.5px; font-weight: 400; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif__time { font-size: 12px; color: var(--fg-muted); flex: none; align-self: flex-start; padding-top: 2px; }
.notif.is-unread .notif__time::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-end: 6px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
/* M3-P: unread sits on a soft navy tint, full-strength text and the dot; read is plain and a step quieter. */
.notif.is-unread { background: var(--unread-soft); }
.notif.is-unread:hover { background: var(--unread-soft-hover); }
.notif.is-unread .notif__body b { font-weight: 700; }
.notif.is-unread :is(.notif__quote, .notif__time) { color: var(--fg-2); }
.notif.is-read .notif__body { font-weight: 500; }

/* ---------- Settings ---------- */
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0; }
.setting + .setting { border-top: 1.5px solid var(--line-soft); }
.setting__text { min-width: 0; line-height: 1.5; }
.setting__text b { display: block; font-weight: 600; color: var(--fg); }
.setting__text span { display: block; font-size: 13.5px; color: var(--fg-muted); }
.setting--stack { flex-direction: column; align-items: stretch; gap: 10px; border-top: 1.5px solid var(--line-soft); }

/* ---------- Support ---------- */
.ticket { display: flex; align-items: center; gap: 12px; padding: 14px 0; }
.ticket + .ticket { border-top: 1.5px solid var(--line-soft); }
.ticket__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ticket__subject { font-weight: 600; color: var(--fg-brand); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket:hover .ticket__subject { text-decoration: underline; }
.ticket__meta { font-size: 13px; color: var(--fg-muted); }
.thread { display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 88%; align-self: flex-start; padding: 12px 16px; border-radius: 6px 18px 18px 18px; background: var(--surface-muted); color: var(--fg); }
.msg--team { align-self: flex-end; border-radius: 18px 6px 18px 18px; background: var(--accent-soft); }
.msg__who { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 4px; font-size: 12.5px; color: var(--fg-2); }
.msg__who b { color: var(--fg-brand); font-weight: 600; }
.msg__text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
/* Support chat: column-reverse opens the box on the newest message with no script, and keeps the view in
   place when support.js puts older messages on top */
.chat { display: flex; flex-direction: column-reverse; max-height: min(60vh, 560px); overflow-y: auto; overscroll-behavior: contain; padding-inline-end: 4px; border-radius: 12px; }
.chat:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.chat__more, .chat__latest { align-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--fg-brand); font-size: 13px; font-weight: 600; }
.chat__latest { display: flex; width: fit-content; margin: 12px auto 0; }
.chat__more[aria-busy="true"]::before { content: ""; width: 12px; height: 12px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.composer { margin-top: 14px; padding-top: 14px; border-top: 1.5px solid var(--line-soft); }
.composer__bar { display: flex; align-items: flex-end; gap: 10px; }
.composer .textarea { flex: 1; min-height: 52px; max-height: 200px; padding: 12px 16px; resize: none; }
.composer__foot { justify-content: space-between; flex-wrap: wrap; margin-top: 8px; }
.composer__note { margin-top: 14px; }

/* ---------- Aside ---------- */
.note {
  position: relative; padding: 22px 20px 18px; border-radius: 6px 26px 26px 26px;
  background: var(--primary-soft);
}
.note__label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--primary-text); }
.note__q { margin: 8px 0 14px; font: 800 21px/1.4 var(--display); color: var(--fg-brand); }
.note__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--fg-2); }
.note .doodle { width: 54px; height: 40px; top: -16px; inset-inline-end: 14px; color: var(--deco-mint); }
.trend { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; }
.trend + .trend { border-top: 1.5px solid var(--line-soft); }
.trend__tag { font-weight: 600; color: var(--fg-brand); }
.trend__n { font-size: 12.5px; color: var(--fg-muted); }
.person { display: flex; align-items: center; gap: 11px; padding: 8px 0; }
.person__info { flex: 1; min-width: 0; line-height: 1.35; }
.person__name, .person__handle { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person__name { font-weight: 600; color: var(--fg); }
.person__handle { font-size: 12.5px; color: var(--fg-muted); }
.people { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .people { grid-template-columns: repeat(3, 1fr); } }
.people .card { padding: 20px 12px 14px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.people .person__name, .people .person__handle { max-width: 100%; text-align: center !important; }
.people .btn { margin-top: 10px; }
/* ---------- M3-C: people lists (followers, following, likers) and the links into them ----------
   Additive only: the profile's follower/following counts and the like count become links; nothing above changes. */
.profile__stat { display: flex; flex-direction: column; align-items: center; color: inherit; }
.profile__stat:hover b { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px; }
.people-head { display: flex; align-items: center; gap: 12px; padding: 6px 2px 2px; }
.people-head h1 { font-size: 22px; }
.people-head h1 a:hover { color: var(--fg-brand); }
body[data-page="follows"] .tabs { background: var(--surface); border-radius: 14px; overflow: hidden; }
.tab__n { margin-inline-start: 6px; font-size: 12.5px; font-weight: 500; color: var(--fg-muted); }
.person-list { padding: 4px 16px; }
.person-row + .person-row { border-top: 1.5px solid var(--line-soft); }
.person-row .person__info:hover .person__name { color: var(--fg-brand); }
.person-row .btn { flex: none; }
.person-list .load-more { padding-top: 10px; border-top: 1.5px solid var(--line-soft); }
.like-count { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px 0 2px; margin-inline-start: -6px; border-radius: var(--r-pill); font: 500 14px var(--body); color: var(--fg-2); }
.like-count:hover { color: var(--fg-brand); text-decoration: underline; text-underline-offset: 4px; }
.like[aria-pressed="true"] + .like-count { color: var(--heart); }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 0 6px; font-size: 12.5px; color: var(--fg-muted); }
.foot-links a:hover { color: var(--fg-brand); }

[data-follow][aria-pressed="true"] { background: var(--accent-soft); color: var(--fg-brand); box-shadow: none; }

/* ---------- Menus, dialogs, toast ---------- */
.menu-wrap { position: relative; }
.menu {
  position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 50; display: none;
  min-width: 210px; max-width: min(300px, calc(100vw - 32px)); padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--lift);
}
.menu.is-open { display: block; animation: reveal .15s ease-out; }
.menu--up { top: auto; bottom: calc(100% + 6px); }
.menu > a, .menu > button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px;
  border: 0; border-radius: 8px; background: none; font: 500 14.5px var(--body); color: var(--fg); text-align: start;
}
.menu > a:hover, .menu > button:hover { background: var(--surface-muted); }
.menu .is-danger { color: var(--danger); }
/* The bell's dropdown: the newest notifications, then "see all". */
.notify-peek { width: min(360px, calc(100vw - 24px)); max-width: none; padding: 6px 0 0; overflow: hidden; color: var(--fg); }
.notify-peek .notif { padding: 10px 14px; gap: 10px; font-size: 14px; }
.notify-peek__empty { padding: 18px 14px; text-align: center; color: var(--fg-muted); font-size: 14px; }
.notify-peek__all { display: block; padding: 12px; border-top: 1px solid var(--line-soft); text-align: center; font-weight: 600; font-size: 14px; color: var(--fg-brand); }
.notify-peek__all:hover { background: var(--surface-muted); }
.menu hr { border: 0; height: 1.5px; background: var(--line-soft); margin: 4px 6px; }

dialog.modal {
  width: min(460px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 28px;
  background: var(--surface); color: var(--fg); box-shadow: var(--pop);
}
dialog.modal[open] { animation: reveal .2s ease-out; }
dialog.modal::backdrop { background: var(--scrim); }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; }
.modal__head h2 { font-size: 22px; }
.modal__body { padding: 8px 20px 4px; display: flex; flex-direction: column; gap: 12px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 20px 20px; }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choices label {
  display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 0 16px; border-radius: 16px;
  background: var(--bg); font-weight: 500; cursor: pointer; transition: box-shadow .15s;
}
.choices input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.choices label:has(input:checked) { box-shadow: inset 0 0 0 2px var(--accent); background: var(--surface); }
.choices--row { flex-direction: row; }
.choices--row label { flex: 1; }
@media (max-width: 759px) {
  dialog.modal { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 28px 28px 0 0; padding-bottom: env(safe-area-inset-bottom); }
}

.toast {
  position: fixed; inset-inline: 0; bottom: calc(108px + env(safe-area-inset-bottom)); z-index: 100;
  width: max-content; max-width: calc(100% - 32px); margin: 0 auto; padding: 12px 20px;
  border-radius: var(--r-pill); background: var(--surface-inverse); color: var(--fg-on-fill);
  font-size: 14.5px; font-weight: 500; box-shadow: var(--pop);
  display: flex; align-items: center; gap: 14px;
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.is-show { opacity: 1; transform: none; pointer-events: auto; }
.toast button { border: 0; background: none; padding: 4px 2px; color: var(--deco-mint); font: 700 14.5px var(--body); }
@media (min-width: 760px) { .toast { bottom: 32px; } }
.load-more { display: flex; justify-content: center; padding: 4px 0 12px; }

/* ---------- Guest: landing ---------- */
/* The signed-out bar is navy like the app bar, on every screen size, with the same height. */
.guestbar { position: relative; z-index: 2; background: var(--navy); color: var(--white); }
.guestbar .container { height: 62px; max-width: 1240px; display: flex; align-items: center; gap: 10px; }
.guestbar .wordmark__logo { width: 112px; }
.guestbar .btn--ghost { color: var(--white); }
.guestbar .btn--ghost:hover { background: rgba(255, 255, 255, .12); color: var(--white); }
.guestbar .wordmark { font-size: 32px; }
.guestbar__end { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }

.hero__blob { position: absolute; border-radius: 50%; filter: blur(2px); z-index: 0; }
.hero__blob--peach { width: 520px; height: 520px; background: var(--blob-coral); top: -180px; inset-inline-end: -160px; }
.hero__blob--mint { width: 380px; height: 380px; background: var(--blob-mint); bottom: 40px; inset-inline-start: -170px; }
/* Site footer: one line the width of the page grid (wraps only on narrow screens). Under app pages it clears the mobile bottom bar. */
.site-foot { margin-top: auto; padding: 14px 0; border-top: 1px solid var(--line); background: var(--surface); }
.app + .site-foot { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
.site-foot__inner { max-width: 1240px; margin: 0 auto; padding: 0 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 20px; font-size: 13px; color: var(--fg-muted); }
.site-foot .wordmark__logo { width: 72px; }
.site-foot__links, .site-foot__social { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 16px; }
.site-foot__social a { display: inline-flex; align-items: center; gap: 5px; }
.site-foot a:hover { color: var(--fg-brand); }
.site-foot__legal { white-space: nowrap; }
/* Phones: small, without the logo and the word "language"; the type shrinks with the screen. Signed in it is always one
   line; a guest has two more links (sign in, cookies), so there the groups may sit on two lines, never wider than the screen. */
@media (max-width: 599px) {
  .site-foot { padding: 10px 0; }
  .site-foot__inner, .site-foot__links, .site-foot__social, .lang-foot { gap: 0 clamp(4px, 2vw, 12px); font-size: clamp(8.5px, 2.75vw, 11.5px); white-space: nowrap; }
  .app + .site-foot .site-foot__inner, .site-foot__links, .site-foot__social, .lang-foot { flex-wrap: nowrap; }
  .site-foot .wordmark, .lang-foot > :first-child { display: none; }
}
@media (min-width: 760px) {
  .site-foot__inner { justify-content: flex-start; }
  .site-foot__legal { margin-inline-start: auto; }
  .app + .site-foot { padding-bottom: 14px; }
}
/* The footer's language line: the language in use is plain, the other one is a link. */
.lang-foot { display: inline-flex; align-items: center; gap: 6px; }
.lang-foot a { color: var(--fg-brand); font-weight: 600; }
.lang-foot a:hover { text-decoration: underline; }
.lang-foot__now { color: var(--fg-2); }

/* ---------- Guest: auth ---------- */
.auth { position: relative; min-height: calc(100vh - 78px); display: grid; place-items: center; padding: 24px 16px 48px; overflow: hidden; }
.auth__card { position: relative; z-index: 1; width: 100%; max-width: 440px; padding: 28px 24px; }
.auth__title { font-size: 30px; text-align: center; }
.auth__sub { margin: 4px 0 22px; text-align: center; color: var(--fg-2); }
.auth__or { display: flex; align-items: center; gap: 12px; margin: 18px 0; font-size: 13px; color: var(--fg-muted); }
.auth__or::before, .auth__or::after { content: ""; flex: 1; height: 1.5px; background: var(--line); }
.btn--fb { background: var(--facebook); color: var(--fg-on-fill); }
.btn--fb:hover { background: var(--facebook-hover); }
.captcha { height: 64px; border-radius: 16px; background: var(--bg); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--fg-muted); }
.auth__legal { font-size: 11.5px; line-height: 1.6; color: var(--fg-muted); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .appbar .icon-btn:hover .icon, .navlink:hover .icon { scale: none; translate: none; }
}

/* ---------- Comfort layer ---------- */
/* Mobile chrome steps aside while reading down, returns on the first scroll up */
.appbar, .bottomnav { transition: transform .28s ease; }
.nav-hidden .appbar { transform: translateY(-100%); }
.nav-hidden .bottomnav { transform: translateY(115%); }
.tabs--sticky { position: sticky; top: 62px; z-index: 5; background: var(--bg); transition: top .28s ease; }
.nav-hidden .tabs--sticky { top: 0; }
@media (min-width: 760px) { .tabs--sticky { top: 0; } }

/* Long answers fold after 6 lines */
.post__answer.is-clamped { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.read-more { border: 0; background: none; padding: 6px 4px 0; color: var(--fg-brand); font: 600 14.5px var(--body); }
.read-more:hover { text-decoration: underline; }

/* Compact daily-question banner (mobile/tablet feed) */
.daily { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; background: var(--primary-soft); }
.daily__icon { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--primary-text); }
.daily__text { flex: 1; min-width: 0; line-height: 1.5; }
.daily__label { display: block; font-size: 12.5px; font-weight: 600; color: var(--primary-text); }
.daily__q { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; color: var(--fg-brand); }

/* Anonymity reassurance under every ask composer */
.anon-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; margin-top: 10px; font-size: 13.5px; color: var(--fg-2); }
.anon-hint .icon { color: var(--positive-text); }

/* Segmented control (who receives the question) */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 12px; background: var(--surface-muted); }
.seg [role="tab"] { height: 44px; border: 0; border-radius: 9px; background: none; font: 600 15px var(--body); color: var(--fg-2); transition: background-color .15s, color .15s; }
.seg [role="tab"][aria-selected="true"] { background: var(--surface); color: var(--fg-brand); box-shadow: var(--shadow-seg); }

.recipient { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--lift); }
.recipient__info { flex: 1; min-width: 0; line-height: 1.4; }
.recipient__info b { display: block; color: var(--fg-brand); }
.pick-list { display: flex; flex-direction: column; margin-top: 8px; padding: 6px; border-radius: 18px; background: var(--surface); box-shadow: var(--lift); }
.pick-list button { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 10px; border: 0; border-radius: 14px; background: none; text-align: start; }
.pick-list button:hover, .pick-list button:focus-visible { background: var(--surface-muted); }
.audience { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--positive-soft); color: var(--fg); line-height: 1.5; }
.audience .icon { color: var(--positive-text); }

/* ---------- Every phone: small screens, notches, iOS quirks ---------- */
html { -webkit-tap-highlight-color: transparent; }
/* iOS zooms into any field under 16px on focus */
.input, .textarea, .select, .ask-screen__field textarea { font-size: max(16px, 1em); }
input[type="search"] { -webkit-appearance: none; appearance: none; }
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }

/* Safe areas: notch / Dynamic Island in landscape, home indicator, standalone mode */
.appbar { padding-top: env(safe-area-inset-top, 0px); }
.appbar__inner, .app, .container, .guestbar .container, .site-foot__inner {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.bottomnav {
  padding-left: max(6px, env(safe-area-inset-left, 0px));
  padding-right: max(6px, env(safe-area-inset-right, 0px));
}
.tabs--sticky { top: calc(62px + env(safe-area-inset-top, 0px)); }
.nav-hidden .tabs--sticky { top: env(safe-area-inset-top, 0px); }
@media (min-width: 760px) { .tabs--sticky { top: calc(62px + env(safe-area-inset-top, 0px)); } .nav-hidden .tabs--sticky { top: 0; } }

/* Mobile browsers: the visible height, not the height behind the URL bar */
@supports (height: 100dvh) {
  body { min-height: 100dvh; }
  .ask-screen { min-height: calc(100dvh - 20px); }
  .auth { min-height: calc(100dvh - 78px); }
}
dialog.modal { max-height: calc(100vh - 32px); overflow-y: auto; overscroll-behavior: contain; }
@supports (height: 100dvh) { dialog.modal { max-height: calc(100dvh - 32px); } }

/* Long names never push a row wider than the screen */
.post__name, .post__time, .qcard__from, .person__name, .recipient__info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qcard__meta, .recipient__info, .notif__body { min-width: 0; }
.bottomnav a span:not(.badge) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Small phones: iPhone SE / mini, compact Androids (≤ 374px) */
@media (max-width: 374px) {
  :root { --gutter: 12px; }
  body { font-size: 15.5px; }
  .appbar__inner, .app, .container, .guestbar .container, .site-foot__inner {
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }
  .appbar .wordmark { font-size: 24px; }
  .appbar .icon-btn { width: 40px; height: 40px; }
  .page-head h1 { font-size: 24px; }
  .card--pad, .askbox { padding: 16px; }
  .post { padding: 16px 16px 6px; }
  .post__q { padding: 12px 14px 13px; }
  .post__qtext, .qcard__text { font-size: 16px; }
  .post__answer { font-size: 15.5px; }
  .react { padding: 0 9px; }
  .qcard { padding: 16px; }
  .qcard__actions .btn { padding: 0 13px; }
  .avatar--xl { --s: 96px; }
  .profile__name { font-size: 26px; }
  .profile__stats b { font-size: 19px; }
  .profile__stats span { font-size: 12px; }
  .chip { height: 36px; padding: 0 13px; font-size: 13.5px; }
  .tab { font-size: 14.5px; }
  .bottomnav a { font-size: 10.5px; }
  .bottomnav .fab { width: 54px; height: 54px; margin-top: -26px; }
  .btn--lg { height: 52px; padding: 0 22px; font-size: 16px; }
  .ask-screen__title { font-size: 30px; }
  .ask-screen__plane { width: 38px; height: 38px; }
  .ask-screen__tagline { font-size: 24px; }
  .seg [role="tab"] { font-size: 14px; }
  .guestbar .wordmark { font-size: 27px; }
  .guestbar .btn { padding: 0 14px; }
  .auth__card { padding: 22px 16px; }
}

/* Short screens (phones in landscape) */
@media (max-height: 520px) {
  .ask-screen { min-height: 0; }
  .ask-screen__waves { height: 120px; }
  .ask-screen__tagline { font-size: 20px; bottom: 14px; }
}

/* M2-T5: the cookie choice and the guest ask form (docs/m2/T5-growth.md). /start has its own start.css. */
.consent { position: fixed; inset-inline: 12px; bottom: 12px; z-index: 60; max-width: 560px; margin-inline: auto; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--lift); font-size: 14.5px; }
.consent[hidden] { display: none; }
.consent__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.consent__actions .btn { flex: 1 1 140px; }
.fb-friends .row { margin-top: 12px; }
.askbox__guest-fields { display: grid; gap: 10px; margin-top: 10px; }
.askbox__guest summary { cursor: pointer; margin-top: 12px; font-weight: 600; }
.askbox--inner { margin-top: 10px; }
.site-foot__links button.link { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }

/* M2-T6c-1: the tag page title (long tags wrap) and Discover's trending chips (docs/m2/T6c1-hashtags-trending-discover.md) */
.tag-title { overflow-wrap: anywhere; }
.tag-title__hash { color: var(--coral-ink); margin-inline-end: 2px; }
.chips--trend .chip { font-weight: 600; color: var(--fg-brand); }
