/* Meridian Mail v2 — neon glass layered on the Organic tokens.
   Ten palettes (html[data-palette]) set hue and chroma parameters; the light and dark blocks turn them into the full token
   set in oklch on one lightness scale, so a palette swap keeps every contrast. palettes.json is the canonical list of palettes
   (id, name, tag, description); the parameters follow theme-colors.css, whose :root is Dune (see the dune block). The house
   default is Pulse, the redesign pack's palette: the pre-paint script in index.html sets data-palette="pulse" on a fresh profile
   before the first paint, so the pulse block below is what a visitor who never chose a palette sees; :root's Dune parameters
   are the sheet's own fallback and never paint on their own. */
:root {
  --hue-accent: 45;
  --hue-accent-2: 135;
  --sat: 1; --sat-2: 1;                 /* accent chroma multipliers */
  --hue-ground: 60; --chroma-ground: 1; /* tint of the neutral ground */
  --blob-scale: 1;                      /* per-palette strength of the ambient glow: the sheet declares it per palette and never
                                           consumes it; folding it into --blob-alpha is our extension, so Emirati's glow runs at 0.4
                                           of the sheet's fixed 0.55 / 0.9 and Pulse's at 1.15 */
  --blob-alpha: calc(0.55 * var(--blob-scale, 1));
  --deco-alpha: 1;                      /* opacity of the palette decoration (the Emirati flag) */
}
/* the dark soft glow is capped at 0.28: at the sheet's 0.55 the blob core lifts the row ground until muted text measures under
   4.5:1 at the brightest point of the drift (Dune neutral-600 3.44, Pulse 3.07 at its 1.15 scale); at 0.28 every palette clears it
   there (Pulse 4.70, Dune 4.97, the rest >= 5.2). Light holds at 0.55 (neutral-600 >= 6 under the core); vivid is the user's
   explicit choice. Off and vivid still win: same specificity, later */
html[data-theme="dark"] { --blob-alpha: calc(0.28 * var(--blob-scale, 1)); }
html[data-blobs="off"] { --blob-alpha: 0; }
html[data-blobs="vivid"] { --blob-alpha: calc(0.9 * var(--blob-scale, 1)); }

/* ---- palettes: hand-tuned glass identities from theme-colors.css (Pulse is the house default, the redesign pack's palette;
   palettes.json carries the same parameters except Dune's, see below) ---- */
/* Dune follows the sheet's :root (sat-2 1, chroma-ground 1: the 0.014 ground chroma the house look had before the palettes), not
   palettes.json's 0.8 / 0.8, where the design contradicts itself; PALETTES in index.html and the head style carry the same values */
html[data-palette="dune"] { --blob-scale: 1;
  --hue-accent: 45; --hue-accent-2: 135; --sat: 1; --sat-2: 1; --hue-ground: 60; --chroma-ground: 1; }
html[data-palette="emirati"] { --blob-scale: 0.4;
  --hue-accent: 27; --hue-accent-2: 150; --sat: 1.05; --sat-2: 0.9; --hue-ground: 80; --chroma-ground: 0.15; }
html[data-palette="oasis"] { --blob-scale: 0.7;
  --hue-accent: 190; --hue-accent-2: 70; --sat: 0.62; --sat-2: 0.55; --hue-ground: 195; --chroma-ground: 0.9; }
html[data-palette="sage"] { --blob-scale: 0.6;
  --hue-accent: 152; --hue-accent-2: 50; --sat: 0.55; --sat-2: 0.5; --hue-ground: 145; --chroma-ground: 0.7; }
html[data-palette="dusk"] { --blob-scale: 0.8;
  --hue-accent: 68; --hue-accent-2: 28; --sat: 0.8; --sat-2: 0.65; --hue-ground: 55; --chroma-ground: 1.5; }
html[data-palette="rosewater"] { --blob-scale: 0.7;
  --hue-accent: 8; --hue-accent-2: 330; --sat: 0.7; --sat-2: 0.55; --hue-ground: 20; --chroma-ground: 0.9; }
html[data-palette="azure"] { --blob-scale: 0.7;
  --hue-accent: 250; --hue-accent-2: 195; --sat: 0.85; --sat-2: 0.7; --hue-ground: 255; --chroma-ground: 1.4; }
html[data-palette="pulse"] { --blob-scale: 1.15;
  --hue-accent: 295; --hue-accent-2: 200; --sat: 1.05; --sat-2: 0.95; --hue-ground: 285; --chroma-ground: 1.4; }
html[data-palette="champagne"] { --blob-scale: 0.5;
  --hue-accent: 85; --hue-accent-2: 345; --sat: 0.6; --sat-2: 0.45; --hue-ground: 78; --chroma-ground: 1.1; }
html[data-palette="obsidian"] { --blob-scale: 0.45;
  --hue-accent: 240; --hue-accent-2: 48; --sat: 0.4; --sat-2: 0.7; --hue-ground: 250; --chroma-ground: 0.7; }

/* ---- light glass ---- */
:root {
  --color-bg: oklch(0.965 calc(0.012 * var(--chroma-ground)) var(--hue-ground));
  --color-text: oklch(0.22 calc(0.02 * var(--chroma-ground)) var(--hue-ground));
  --color-surface: rgba(255, 255, 255, 0.62);
  --color-divider: oklch(0.22 calc(0.02 * var(--chroma-ground)) var(--hue-ground) / 0.11);
  --color-accent: oklch(0.62 calc(0.2 * var(--sat)) var(--hue-accent));
  --color-accent-2: oklch(0.6 calc(0.15 * var(--sat-2)) var(--hue-accent-2));

  --color-neutral-100: oklch(0.985 calc(0.006 * var(--chroma-ground)) var(--hue-ground));
  --color-neutral-200: oklch(0.95 calc(0.01 * var(--chroma-ground)) var(--hue-ground));
  --color-neutral-300: oklch(0.9 calc(0.012 * var(--chroma-ground)) var(--hue-ground));
  --color-neutral-400: oklch(0.8 calc(0.014 * var(--chroma-ground)) var(--hue-ground));
  --color-neutral-500: oklch(0.6 calc(0.016 * var(--chroma-ground)) var(--hue-ground));
  --color-neutral-600: oklch(0.47 calc(0.018 * var(--chroma-ground)) var(--hue-ground)); /* muted text: >= 4.5:1 on the light glass */
  --color-neutral-700: oklch(0.42 calc(0.018 * var(--chroma-ground)) var(--hue-ground));
  --color-neutral-800: oklch(0.32 calc(0.016 * var(--chroma-ground)) var(--hue-ground));
  --color-neutral-900: oklch(0.2 calc(0.014 * var(--chroma-ground)) var(--hue-ground));

  --color-accent-100: oklch(0.97 calc(0.03 * var(--sat)) var(--hue-accent));
  --color-accent-200: oklch(0.93 calc(0.07 * var(--sat)) var(--hue-accent));
  --color-accent-300: oklch(0.87 calc(0.12 * var(--sat)) var(--hue-accent));
  --color-accent-400: oklch(0.79 calc(0.17 * var(--sat)) var(--hue-accent));
  --color-accent-500: oklch(0.7 calc(0.2 * var(--sat)) var(--hue-accent));
  --color-accent-600: oklch(0.6 calc(0.2 * var(--sat)) var(--hue-accent));
  --color-accent-700: oklch(0.5 calc(0.17 * var(--sat)) var(--hue-accent));
  --color-accent-800: oklch(0.4 calc(0.13 * var(--sat)) var(--hue-accent));
  --color-accent-900: oklch(0.3 calc(0.09 * var(--sat)) var(--hue-accent));

  --color-accent-2-100: oklch(0.97 calc(0.03 * var(--sat-2)) var(--hue-accent-2));
  --color-accent-2-200: oklch(0.93 calc(0.06 * var(--sat-2)) var(--hue-accent-2));
  --color-accent-2-300: oklch(0.87 calc(0.1 * var(--sat-2)) var(--hue-accent-2));
  --color-accent-2-400: oklch(0.79 calc(0.14 * var(--sat-2)) var(--hue-accent-2));
  --color-accent-2-500: oklch(0.7 calc(0.16 * var(--sat-2)) var(--hue-accent-2));
  --color-accent-2-600: oklch(0.6 calc(0.16 * var(--sat-2)) var(--hue-accent-2));
  --color-accent-2-700: oklch(0.5 calc(0.13 * var(--sat-2)) var(--hue-accent-2));
  --color-accent-2-800: oklch(0.4 calc(0.1 * var(--sat-2)) var(--hue-accent-2));
  --color-accent-2-900: oklch(0.3 calc(0.07 * var(--sat-2)) var(--hue-accent-2));

  --glass: rgba(255, 255, 255, 0.5);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(255, 255, 255, 0.8);
  --glass-hover: oklch(0.22 calc(0.02 * var(--chroma-ground)) var(--hue-ground) / 0.06);
  --glass-active: oklch(0.22 calc(0.02 * var(--chroma-ground)) var(--hue-ground) / 0.1);
  --neon-glow: oklch(0.7 calc(0.2 * var(--sat)) var(--hue-accent) / 0.45);
  --neon-glow-2: oklch(0.7 calc(0.16 * var(--sat-2)) var(--hue-accent-2) / 0.4);

  --shadow-sm: 0 1px 2px oklch(0.2 calc(0.02 * var(--chroma-ground)) var(--hue-ground) / 0.08);
  --shadow-md: 0 10px 28px -10px oklch(0.2 calc(0.02 * var(--chroma-ground)) var(--hue-ground) / 0.2);
  --shadow-lg: 0 28px 70px -18px oklch(0.2 calc(0.02 * var(--chroma-ground)) var(--hue-ground) / 0.32);
}

/* ---- dark glass (charcoal) ---- */
html[data-theme="dark"] {
  --color-bg: oklch(0.15 calc(0.014 * var(--chroma-ground)) var(--hue-ground));
  --color-text: oklch(0.95 calc(0.01 * var(--chroma-ground)) var(--hue-ground));
  --color-surface: rgba(255, 255, 255, 0.06);
  --color-divider: rgba(255, 255, 255, 0.11);
  --color-accent: oklch(0.78 calc(0.19 * var(--sat)) var(--hue-accent));
  --color-accent-2: oklch(0.8 calc(0.15 * var(--sat-2)) var(--hue-accent-2));

  --color-neutral-100: oklch(0.2 calc(0.014 * var(--chroma-ground)) var(--hue-ground));
  --color-neutral-200: oklch(0.27 calc(0.015 * var(--chroma-ground)) var(--hue-ground));
  --color-neutral-300: oklch(0.35 calc(0.016 * var(--chroma-ground)) var(--hue-ground));
  --color-neutral-400: oklch(0.46 calc(0.017 * var(--chroma-ground)) var(--hue-ground));
  --color-neutral-500: oklch(0.72 calc(0.016 * var(--chroma-ground)) var(--hue-ground));
  --color-neutral-600: oklch(0.85 calc(0.012 * var(--chroma-ground)) var(--hue-ground)); /* muted text: >= 4.5:1 on the brightest glass panel */
  --color-neutral-700: oklch(0.8 calc(0.012 * var(--chroma-ground)) var(--hue-ground));
  --color-neutral-800: oklch(0.9 calc(0.01 * var(--chroma-ground)) var(--hue-ground));
  --color-neutral-900: oklch(0.97 calc(0.006 * var(--chroma-ground)) var(--hue-ground));

  --color-accent-100: oklch(0.28 calc(0.08 * var(--sat)) var(--hue-accent));
  --color-accent-200: oklch(0.36 calc(0.11 * var(--sat)) var(--hue-accent));
  --color-accent-300: oklch(0.46 calc(0.15 * var(--sat)) var(--hue-accent));
  --color-accent-400: oklch(0.58 calc(0.18 * var(--sat)) var(--hue-accent));
  --color-accent-500: oklch(0.7 calc(0.2 * var(--sat)) var(--hue-accent));
  --color-accent-600: oklch(0.78 calc(0.19 * var(--sat)) var(--hue-accent));
  --color-accent-700: oklch(0.85 calc(0.14 * var(--sat)) var(--hue-accent));
  --color-accent-800: oklch(0.91 calc(0.09 * var(--sat)) var(--hue-accent));
  --color-accent-900: oklch(0.96 calc(0.04 * var(--sat)) var(--hue-accent));

  --color-accent-2-100: oklch(0.28 calc(0.06 * var(--sat-2)) var(--hue-accent-2));
  --color-accent-2-200: oklch(0.36 calc(0.09 * var(--sat-2)) var(--hue-accent-2));
  --color-accent-2-300: oklch(0.46 calc(0.12 * var(--sat-2)) var(--hue-accent-2));
  --color-accent-2-400: oklch(0.58 calc(0.14 * var(--sat-2)) var(--hue-accent-2));
  --color-accent-2-500: oklch(0.7 calc(0.16 * var(--sat-2)) var(--hue-accent-2));
  --color-accent-2-600: oklch(0.8 calc(0.15 * var(--sat-2)) var(--hue-accent-2));
  --color-accent-2-700: oklch(0.86 calc(0.11 * var(--sat-2)) var(--hue-accent-2));
  --color-accent-2-800: oklch(0.92 calc(0.07 * var(--sat-2)) var(--hue-accent-2));
  --color-accent-2-900: oklch(0.96 calc(0.03 * var(--sat-2)) var(--hue-accent-2));

  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: oklch(0.2 calc(0.014 * var(--chroma-ground)) var(--hue-ground) / 0.78);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-hover: rgba(255, 255, 255, 0.07);
  --glass-active: rgba(255, 255, 255, 0.12);
  --neon-glow: oklch(0.78 calc(0.19 * var(--sat)) var(--hue-accent) / 0.55);
  --neon-glow-2: oklch(0.8 calc(0.15 * var(--sat-2)) var(--hue-accent-2) / 0.5);

  --shadow-sm: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 14px 34px -12px rgba(0, 0, 0, 0.65);
  --shadow-lg: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 34px 80px -22px rgba(0, 0, 0, 0.8);
}

/* theme cross-fade — only while html.theming is set, so hovers stay instant */
html.theming body, html.theming body * {
  transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease,
    box-shadow 0.45s ease, fill 0.45s ease, stroke 0.45s ease, opacity 0.45s ease !important;
}
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after {
  animation: none !important; transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  html.theming body, html.theming body * { transition: none !important; }
}

html, body { height: 100%; margin: 0; overflow: hidden; background: var(--color-bg); }
a { color: var(--color-accent-700); }
a:hover { color: var(--color-accent-600); }
* { scrollbar-width: thin; scrollbar-color: var(--color-neutral-400) transparent; }
::placeholder { color: color-mix(in srgb, var(--color-text) 42%, transparent); }
.btn, .input, .seg-opt { transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease; }
.seg-opt { white-space: nowrap; }
.seg { flex-wrap: wrap; }
.btn-primary { box-shadow: 0 8px 26px -10px var(--neon-glow); }
/* the ground-coloured label on the accent: the light theme needs a deeper accent to reach 4.5:1 (Compose / Send measured 3.57:1 at
   the token's L 0.62). The pack's sheet deepens it to L 0.53 (hover 0.48), where nine palettes read >= 4.55 (Pulse 5.22); Oasis, the
   lowest-chroma accent, misses there (4.36) and alone keeps L 0.50 / 0.45 (4.92) */
:root:not([data-theme="dark"]) .btn-primary { background: oklch(0.53 calc(0.19 * var(--sat)) var(--hue-accent)); border-color: oklch(0.53 calc(0.19 * var(--sat)) var(--hue-accent)); }
:root:not([data-theme="dark"]) .btn-primary:hover { background: oklch(0.48 calc(0.19 * var(--sat)) var(--hue-accent)); border-color: oklch(0.48 calc(0.19 * var(--sat)) var(--hue-accent)); }
html[data-palette="oasis"]:not([data-theme="dark"]) .btn-primary { background: oklch(0.5 calc(0.19 * var(--sat)) var(--hue-accent)); border-color: oklch(0.5 calc(0.19 * var(--sat)) var(--hue-accent)); }
html[data-palette="oasis"]:not([data-theme="dark"]) .btn-primary:hover { background: oklch(0.45 calc(0.19 * var(--sat)) var(--hue-accent)); border-color: oklch(0.45 calc(0.19 * var(--sat)) var(--hue-accent)); }
.btn-primary:hover { box-shadow: 0 10px 30px -8px var(--neon-glow); }
.input:focus-visible { box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-accent) 22%, transparent); }
.seg { background: var(--glass); }
.seg-opt:has(input:checked) { box-shadow: 0 0 18px -4px var(--neon-glow); }
/* the checked option's label: the sheet's ground ink on the L 0.62 accent reads 3.3-3.6:1 in the light theme (Azure 3.29), so the
   light theme paints it as the app's ink-on-accent pair (the deepened accent, white ink: >= 5.39 in every palette); the dark theme
   keeps the sheet's pair, the pack's, >= 8.68 */
:root:not([data-theme="dark"]) .seg-opt:has(input:checked) { background: var(--mm-accent-strong); color: var(--mm-on-accent); }
/* rich-text content inside the editor and message bodies */
.mm-rich blockquote { margin: 6px 0 6px 4px; padding: 2px 0 2px 12px; border-left: 3px solid var(--color-accent-400); opacity: 0.85; }
.mm-rich p { margin: 0 0 10px; }
.mm-rich ul, .mm-rich ol { margin: 6px 0 10px; padding-left: 26px; }
.mm-rich a { color: var(--color-accent-700); }
.mm-rich:empty::before { content: attr(data-placeholder); color: color-mix(in srgb, var(--color-text) 42%, transparent); pointer-events: none; }

/* mobile browsers: no auto-zoom on focus (iOS zooms inputs under 16px), no double-tap zoom on controls */
html { -webkit-text-size-adjust: 100%; }
button, a, [role="button"] { touch-action: manipulation; }
@media (max-width: 760px), (pointer: coarse) {
  input, textarea, select, [contenteditable] { font-size: 16px !important; }
}

/* mobile app shell: fixed non-bouncing page, never a horizontal scrollbar, no tap flash */
html, body { position: fixed; inset: 0; width: 100%; overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: rgba(255, 255, 255, 0.86); --glass-strong: rgba(255, 255, 255, 0.94); }
  html[data-theme="dark"] { --glass: oklch(0.2 calc(0.014 * var(--chroma-ground)) var(--hue-ground) / 0.9); --glass-strong: oklch(0.2 calc(0.014 * var(--chroma-ground)) var(--hue-ground) / 0.96); }
}
@media (max-width: 760px) { .dialog { border-radius: 0; } }
/* Respect the user's reduced-motion setting for the decorative animations (sign-in card float, title typing caret, toasts, star pop).
   The sky renderer already checks the same media query for scene motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; scroll-behavior: auto !important; }
}
/* Search options on phones: the panel is a sheet under the header (position, top and max-height are the advPos / advTop / advMaxH
   vals) that ends above the bottom bar. It never scrolls sideways, its selects share the sheet's width instead of growing to their
   longest option (the forwarding address made the content 565 px wide and pushed Create filter off the screen), the label column
   folds over the fields, every control is a 40 px target, and the action row is pinned to the sheet's bottom edge so Search /
   Create filter are always reachable. The scrim is the real backdrop element: a ::before inside the sheet was painted over the
   sheet's own content, because backdrop-filter makes the sheet the containing block of its fixed descendants. */
:root { --mm-scrim: oklch(0.2 calc(0.02 * var(--chroma-ground)) var(--hue-ground) / 0.3); }
html[data-theme="dark"] { --mm-scrim: rgba(0, 0, 0, 0.55); }
@media (max-width: 759px) {
  [data-mm-adv-backdrop] { background: var(--mm-scrim) !important; }
  #adv-search { overflow-x: hidden !important; overscroll-behavior: contain; }
  #adv-search select, #adv-search input { min-width: 0 !important; max-width: 100%; width: 100%; box-sizing: border-box; }
  #adv-search select { text-overflow: ellipsis; }
  /* step 1 (the pack's 2d panel on a phone): the header wraps its chips under the title, every row folds the label over its control, the size / date rows wrap their pills, the action row is pinned to the sheet's bottom edge; every control is a 40 px target */
  #adv-search .mm-as-h { flex-wrap: wrap; padding: 2px 2px 10px; }
  #adv-search .mm-as-tw { flex-basis: 160px; min-width: 160px; }
  #adv-search .mm-as-acts { flex-wrap: wrap; justify-content: flex-end; align-items: center; }
  #adv-search .mm-opchip { min-height: 40px; padding: 0 0 0 10px; }
  #adv-search .mm-opchip-x, #adv-search .mm-as-close, #adv-search .mm-as-pick { width: 40px; height: 40px; }
  #adv-search .mm-as-dw > .input { padding-right: 48px; }
  #adv-search .mm-as-r { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 6px; }
  #adv-search .mm-as-row { flex-wrap: wrap; }
  #adv-search .mm-as-sel { width: auto; flex: 1 1 120px; }
  #adv-search .mm-as-row > .input { flex: 1 1 100px; }
  #adv-search input.mm-as-native { width: 1px !important; }
  #adv-search .mm-tog { min-height: 40px; }
  #adv-search .mm-as-a { position: sticky; bottom: 0; z-index: 2; margin: 8px -16px -14px; padding: 8px 16px 14px; background: var(--mm-panel-deep); }
  /* step 2: a checkbox column and a select column; the add-address link takes its own line; the title wraps beside the back arrow */
  #adv-search [data-screen-label="Create filter"] > div[style*="gap: 12px"]:not(:first-child):not(:last-child) { display: grid !important; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; align-items: center; }
  #adv-search [data-screen-label="Create filter"] > div[style*="gap: 12px"]:not(:first-child):not(:last-child) > a { grid-column: 1 / -1; justify-self: start; }
  #adv-search [data-screen-label="Create filter"] > div:first-child > span { min-width: 0; flex: 1 1 auto; }
  #adv-search [role="checkbox"] { min-height: 40px; }
  #adv-search a { display: inline-flex !important; align-items: center; min-height: 40px; }
  #adv-search .btn { min-height: 40px; }
  #adv-search [data-screen-label="Create filter"] > div:first-child > button[aria-label="Back to search options"] { flex: none; width: 40px !important; height: 40px !important; }
  /* step 2 pins its Learn more / Create filter row to the sheet's bottom edge */
  #adv-search [data-screen-label="Create filter"] > div:last-child { position: sticky; bottom: 0; z-index: 2; margin: 8px -16px -14px; padding: 8px 16px 14px; background: var(--mm-panel-deep); border-top: 1px solid var(--color-divider); }
  /* Settings > Filters and Blocked Addresses: 40 px links, check boxes and buttons without changing the rows' rhythm */
  [data-screen-label="Filters and Blocked Addresses"] a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 8px; margin: -9px -8px; }
  [data-screen-label="Filters and Blocked Addresses"] [role="checkbox"] { padding: 11px !important; margin: -9px -11px; box-sizing: content-box; }
  [data-screen-label="Filters and Blocked Addresses"] .btn { min-height: 40px; }
  [data-screen-label="Filters and Blocked Addresses"] { overflow-wrap: anywhere; }
  /* the settings footer's Program Policies / Details links: 40 px boxes around the 12 px text (the margin takes the padding back, so the footer keeps its height) */
  [data-screen-label="Settings footer"] a { display: inline-block; padding: 13px 6px; margin: -13px -6px; }
}
/* Settings on phones: each row is `minmax(0,1fr) auto` and the control column won, squeezing titles to one word per line
   (and the Labels tab past the screen edge). Stack the control under its text, let nothing force the card wider than the screen,
   and fold the filter form's fixed two-column grid. */
@media (max-width: 720px) {
  [data-screen-label="Settings"] div[style*="grid-template-columns: minmax(0, 1fr) auto"],
  [data-screen-label="Settings"] div[style*="grid-template-columns: minmax(0px, 1fr) auto"] { grid-template-columns: minmax(0, 1fr) !important; gap: 8px !important; } /* React serialises 0 as 0px */
  [data-screen-label="Settings"] div[style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: minmax(0, 1fr) !important; }
  [data-screen-label="Settings"] .card { overflow-x: hidden; }
  [data-screen-label="Settings"] .card * { min-width: 0; overflow-wrap: anywhere; }
}
/* Tasks rail: one long unbroken title widened the whole panel and pushed Add / Remove off the edge. */
div:has(> button[aria-label="Toggle done"]) { min-width: 0; }
button[aria-label="Toggle done"] ~ * { min-width: 0; overflow-wrap: anywhere; }
/* Keyboard-shortcuts dialog was 420px on a 390px phone. */
@media (max-width: 720px) { .dialog[aria-label="Keyboard shortcuts"] { max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); overflow-y: auto; min-width: 0; box-sizing: border-box; } .dialog[aria-label="Keyboard shortcuts"] kbd { white-space: normal; } }
/* Keyboard focus must be visible in Compose (To / Subject / body had no indicator when reached with Tab). */
.dialog[aria-label="Compose"] input:focus-visible, .dialog[aria-label="Compose"] [contenteditable]:focus-visible, [data-mm-row]:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 6px; }
/* The suggested-subject chips and their × under the compose subject get the same ring with their pill radius kept; a pressed chip darkens like the other glass buttons. */
[data-mm-subject-sugg] button:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
[data-mm-subject-chip]:active { background: var(--glass-active) !important; }

/* Touch: 14px importance marker and 18px chip / attachment removers get a 24px hit area without moving anything. */
@media (hover: none) {
  button[aria-label="Toggle importance"], button[aria-label^="Remove "], button[aria-label="Toggle done"] { padding: 5px !important; margin: -5px !important; box-sizing: content-box !important; }
}

/* Sign-in: the tick is only drawn once the box is checked. */
[data-screen-label="Sign in"] [role="checkbox"][aria-checked="false"] svg { visibility: hidden; }
/* Phones: the passkey and linked-account sign-in buttons (the bridge places them after the Continue button) reach the 40 px tap size. */
/* Phones: scrolling surfaces get room past the Compose FAB; settings tabs are one scrollable row. */
@media (max-width: 759px) {
  [data-screen-label="Mail"] section[aria-label="Reading pane"] div[style*="overflow: auto"], [data-screen-label="Mail"] section[aria-label="Conversation list"] div[style*="overflow: auto"], [data-screen-label="Mail"] section[aria-label="Conversation list"] div[style*="overflow: hidden auto"], [data-screen-label="Mail"] section[aria-label="Conversation list"] div[style*="overflow-y: auto"] { padding-bottom: 96px !important; }
  [data-screen-label="Settings"] [role="tablist"] { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  [data-screen-label="Settings"] [role="tablist"]::-webkit-scrollbar { display: none; }
  [data-screen-label="Settings"] [role="tab"] { flex: 0 0 auto; white-space: nowrap; }
}
/* The inbox category row (every width): the phone's row scrolls sideways at all times (its vals set overflow-x), the desktop's only while its tabs outgrow a split list
   (syncCatTabs sets data-mm-scroll on it; QA-11-1) - then the same hidden scrollbar, scroll-padding and edge fade (data-mm-more, catFadeSync) serve both. The tab's
   hover fill is a stylesheet rule under (hover: hover), so a phone's tap leaves no fill under the tab it selected (QA-11-6). */
[data-screen-label="Mail"] section[aria-label="Conversation list"] > [role="tablist"] { --mm-tabs-fade: 36px; -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-padding: 0 calc(var(--mm-tabs-fade) + 4px); } /* the category row scrolls sideways (its phone vals set overflow-x); momentum on older WebKit, no scrollbar; the scroll-padding is wider than the edge fade below, so the chosen tab (revealCatTab reads this padding as its margin; the browser's own focus scrolling honours it) lands past the fade, never half erased by it; the first and last tabs stop at the row's 10 px end padding */
[data-screen-label="Mail"] section[aria-label="Conversation list"] > [role="tablist"]::-webkit-scrollbar { display: none; }
[data-screen-label="Mail"] section[aria-label="Conversation list"] > [role="tablist"][data-mm-more="right"] { -webkit-mask: linear-gradient(to right, #000 calc(100% - var(--mm-tabs-fade)), transparent) 0 0 / 100% calc(100% - 1px) no-repeat, linear-gradient(#000, #000) 0 100% / 100% 1px no-repeat; mask: linear-gradient(to right, #000 calc(100% - var(--mm-tabs-fade)), transparent) 0 0 / 100% calc(100% - 1px) no-repeat, linear-gradient(#000, #000) 0 100% / 100% 1px no-repeat; } /* the row's edge fades where a tab is cut by it (catFadeSync sets data-mm-more only for a genuinely cut tab, not for the end padding scrolled away); the divider's 1 px under the tabs stays whole */
[data-screen-label="Mail"] section[aria-label="Conversation list"] > [role="tablist"][data-mm-more="left"] { -webkit-mask: linear-gradient(to left, #000 calc(100% - var(--mm-tabs-fade)), transparent) 0 0 / 100% calc(100% - 1px) no-repeat, linear-gradient(#000, #000) 0 100% / 100% 1px no-repeat; mask: linear-gradient(to left, #000 calc(100% - var(--mm-tabs-fade)), transparent) 0 0 / 100% calc(100% - 1px) no-repeat, linear-gradient(#000, #000) 0 100% / 100% 1px no-repeat; }
[data-screen-label="Mail"] section[aria-label="Conversation list"] > [role="tablist"][data-mm-more="both"] { -webkit-mask: linear-gradient(to right, transparent, #000 var(--mm-tabs-fade), #000 calc(100% - var(--mm-tabs-fade)), transparent) 0 0 / 100% calc(100% - 1px) no-repeat, linear-gradient(#000, #000) 0 100% / 100% 1px no-repeat; mask: linear-gradient(to right, transparent, #000 var(--mm-tabs-fade), #000 calc(100% - var(--mm-tabs-fade)), transparent) 0 0 / 100% calc(100% - 1px) no-repeat, linear-gradient(#000, #000) 0 100% / 100% 1px no-repeat; }
[data-screen-label="Mail"] section[aria-label="Conversation list"] > [role="tablist"][data-mm-scroll] { overflow-x: auto !important; }
@media (hover: hover) { [data-screen-label="Mail"] section[aria-label="Conversation list"] > [role="tablist"] > [role="tab"]:hover { background: var(--glass-hover) !important; } }
/* Phones up to 480px: the brand bubble gives its room to the search box (it was 150px wide, clipping its own placeholder). */
@media (max-width: 480px) {
  [data-screen-label="Mail"] > header { gap: 4px !important; }
  [data-screen-label="Mail"] > header > div[style*="flex: none"] { display: none !important; }
  [data-screen-label="Mail"] > header button[aria-label="Toggle theme"] { padding: 8px !important; }
}
/* 320px phones: the header keeps every control on screen. */
@media (max-width: 360px) {
  [data-screen-label="Mail"] > header { gap: 2px !important; padding: 0 4px !important; }
  [data-screen-label="Mail"] > header > div[style*="flex: none"] { display: none !important; }
  [data-screen-label="Mail"] > header button[aria-label="Toggle theme"] { padding: 8px !important; }
  [data-screen-label="Mail"] > header button[title$="Sign out"] { margin-left: 2px !important; }
  [data-screen-label="Mail"] > header input[aria-label="Search mail"] { padding-right: 40px !important; }
}
/* Short viewports (phone landscape, keyboard up): the compose sheet scrolls instead of losing its Send row. */
@media (max-height: 460px) {
  [data-screen-label="Compose"] { overflow-y: auto !important; }
  [data-screen-label="Compose"] .mm-rich { min-height: 56px !important; }
}

/* Custom check boxes (sign-in, search options, filters) draw their tick only when checked; unchecked ones paint a transparent box. */
span[style*="border-radius: 6px"][style*="background: transparent"] > svg { visibility: hidden; }
/* Segmented controls, tabs and the palette swatches: a visible focus ring for keyboard users. */
[role="radiogroup"] input:focus-visible + *, [role="radio"]:focus-visible, [role="tab"]:focus-visible, [data-mm-palette]:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
/* the Emirati swatch in Settings > Themes carries its own identity: the red hoist bar and the three bands, in miniature */
[data-mm-palette="emirati"][data-mm-swatch="card"]::before { content: ''; position: absolute; inset: 0; pointer-events: none; background:
    linear-gradient(90deg, oklch(0.58 0.23 28 / 0.92), oklch(0.58 0.23 28 / 0.6)) 0 0 / 6px 100% no-repeat,
    linear-gradient(90deg, oklch(0.5 0.15 152 / 0.3), transparent 58%) 6px 0 / 100% 10px no-repeat,
    linear-gradient(90deg, rgba(255, 255, 255, 0.16), transparent 58%) 6px 10px / 100% 10px no-repeat,
    linear-gradient(90deg, rgba(0, 0, 0, 0.38), transparent 58%) 6px 20px / 100% 10px no-repeat; }
html:not([data-theme="dark"]) [data-mm-palette="emirati"][data-mm-swatch="card"]::before { background:
    linear-gradient(90deg, oklch(0.56 0.23 28 / 0.95), oklch(0.56 0.23 28 / 0.65)) 0 0 / 6px 100% no-repeat,
    linear-gradient(90deg, oklch(0.5 0.15 152 / 0.26), transparent 58%) 6px 0 / 100% 10px no-repeat,
    linear-gradient(90deg, rgba(255, 255, 255, 0.8), transparent 58%) 6px 10px / 100% 10px no-repeat,
    linear-gradient(90deg, rgba(0, 0, 0, 0.16), transparent 58%) 6px 20px / 100% 10px no-repeat; }

/* Native UI follows the theme. */
html[data-theme="dark"] { color-scheme: dark; }
html:not([data-theme="dark"]) { color-scheme: light; }
/* Android edge-to-edge: the bottom bar, the Compose button and the upload tray clear the gesture navigation bar. */
@media (max-width: 759px) {
  nav[aria-label="Mobile navigation"] { margin-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important; }
  [data-screen-label="Mail"] button[aria-label="Compose"][style*="fixed"] { bottom: calc(92px + env(safe-area-inset-bottom, 0px)) !important; }
  #mmup:not(.sheet) { bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important; } /* not the pill under the compose sheet: that sits above the sheet's send bar, which clears the bar itself */
}
/* Tablets: the settings tab strip scrolls instead of wrapping an orphan onto a second row. */
@media (max-width: 1024px) {
  [data-screen-label="Settings"] [role="tablist"] { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; }
  [data-screen-label="Settings"] [role="tablist"]::-webkit-scrollbar { display: none; }
  [data-screen-label="Settings"] [role="tab"] { flex: 0 0 auto; white-space: nowrap; }
}

/* Importance marker: a 24px round hit area on every pointer, centred on the same 14px glyph. */
button[aria-label="Toggle importance"] { padding: 5px !important; margin: -5px !important; box-sizing: content-box !important; border-radius: 999px; }
button[aria-label="Toggle importance"]:hover { background: var(--glass-hover); opacity: 1 !important; }

/* Compose popovers (schedule, emoji, link, more, signature) are opaque enough to read over body text. */
:root { --glass-menu: rgba(255, 255, 255, 0.96); }
html[data-theme="dark"] { --glass-menu: oklch(0.2 calc(0.014 * var(--chroma-ground)) var(--hue-ground) / 0.96); }
[data-screen-label="Compose"] .card[style*="position: absolute"] { background: var(--glass-menu) !important; }
/* Touch: text buttons in a message header (sender name, 'to me' toggle) reach 24px without growing the header;
   the menus inside the message (More, Translate to, the contact card) are not headers: their rows get a 40px touch height instead. */
@media (hover: none) {
  section[aria-label="Reading pane"] article button:not(.btn-icon):not(.card button) { min-height: 24px; padding-top: 3px !important; padding-bottom: 3px !important; }
  section[aria-label="Reading pane"] article .mm-actions button.btn:not(.btn-icon) { min-height: 0; padding-top: 9px !important; padding-bottom: 9px !important; position: relative; } /* the action row inside the last card keeps its 36.8 px pills (a higher specificity than the header rule above, and than the head sheet's 36 / 40 px header text buttons, which must keep winning that one); a pseudo-element below lifts each pill's pointer target to 40 px */
  section[aria-label="Reading pane"] article .mm-actions button.btn:not(.btn-icon)::before { content: ''; position: absolute; inset: -2px 0; }
  section[aria-label="Reading pane"] article .mm-actions .mm-react { position: relative; }
  section[aria-label="Reading pane"] article .mm-actions .mm-react::before { content: ''; position: absolute; inset: -1px; } /* the 38 px React disc: a 40 x 40 pointer target */
  section[aria-label="Reading pane"] article div.mm-smart > button:not(.btn-icon) { min-height: 0; padding-top: 7px !important; padding-bottom: 7px !important; }
  section[aria-label="Reading pane"] article .card:not([role="dialog"]) button:not(.btn-icon) { min-height: 40px; }
}

/* Phones: the header's Assistant / Drive launchers live in the Apps grid (the assistant also opens from the message's Summarize chip);
   in the header they would push the layout past the viewport, and even the sparkle alone squeezes the search box below its text room. */
@media (max-width: 759px) {
  [data-screen-label="Mail"] > header #mm-header-tools { display: none !important; }
}

/* Touch: Cc / Bcc and other text buttons in the compose sheet reach 28px. */
@media (hover: none) {
  [data-screen-label="Compose"] button:not(.btn-icon):not([aria-label^="Remove "]) { min-height: 28px; }
}

/* Phones: while the search box is focused, the header gives it the row (brand and tools step aside). */
@media (max-width: 759px) {
  [data-screen-label="Mail"] > header[data-searching="true"] > div[style*="flex: none"], [data-screen-label="Mail"] > header[data-searching="true"] > div:last-child, [data-screen-label="Mail"] > header[data-searching="true"] > button[aria-label="Main menu"] { display: none !important; }
}

/* ---- Phones: the compose sheet (v0.20.2 mobile sweep). The sheet is a scrollable column whose send bar is pinned at the bottom,
   the editor fills the free space (editorMax is 'none' on phones), the attachment strip grows instead of scrolling inside 108px,
   the formatting bar folds what does not fit into its More menu (the fold math counts 40 px buttons on phones), the inline image
   toolbar wraps across the sheet, and every control reaches the 40 px tap size without changing the row heights. ---- */
@media (max-width: 759px) {
  [data-screen-label="Compose"] { overflow-y: auto !important; overflow-x: hidden !important; overscroll-behavior: contain; scroll-padding-bottom: 116px; }
  [data-screen-label="Compose"] > div:last-child { position: sticky; bottom: 0; z-index: 4; background: var(--color-bg); margin: 0 -14px 0; padding: 8px 14px calc(12px + env(safe-area-inset-bottom, 0px)) !important; }
  [data-screen-label="Compose"] > div:last-child .btn-primary, [data-screen-label="Compose"] > div:last-child .btn-secondary { height: 40px !important; }
  [data-screen-label="Compose"] .btn-icon { width: 40px !important; height: 40px !important; }
  [data-screen-label="Compose"] button[aria-label="Font"], [data-screen-label="Compose"] button[aria-label="Text size"] { height: 40px !important; min-width: 40px; }
  [data-screen-label="Compose"] button[aria-label="Remove formatting"] { padding: 0 !important; margin: 0 !important; box-sizing: border-box !important; }
  [data-screen-label="Compose"] > div:first-of-type { margin-bottom: 0 !important; }
  /* the To / Cc / Bcc rows: a short input so Cc, Bcc and the picker stay on the chip's line; 40 px targets that keep the row's height */
  [data-screen-label="Compose"] input[aria-label="To"], [data-screen-label="Compose"] input[aria-label="Cc"], [data-screen-label="Compose"] input[aria-label="Bcc"] { min-width: 32px !important; }
  [data-screen-label="Compose"] input[aria-label="To"] ~ div:not(.card) { margin-left: auto; }
  [data-screen-label="Compose"] input[aria-label="To"] ~ div:not(.card) > button { min-height: 40px !important; min-width: 40px; box-sizing: border-box; margin: -6px -4px; padding: 2px 12px !important; }
  [data-screen-label="Compose"] button[aria-label="Select contacts"] { width: 40px !important; height: 40px !important; margin: -7px -2px; }
  [data-screen-label="Compose"] button[data-mm-recipients-collapsed] { min-height: 40px !important; } /* the folded recipients line is a tap target too (the 28 px compose-button rule would win otherwise) */
  /* the From box holds the sender chip (index.html), a recipient chip like the To chips: 36 px here (its label line is 28 px on touch screens) in a row of the To row's height, so it takes no 40 px rule of its own */
  [data-screen-label="Compose"] button[aria-label="Remove recipient"] { padding: 11px !important; margin: -11px !important; box-sizing: content-box !important; }
  /* attachments: the strip wraps and grows; the chip's controls are 40 px hit boxes around 32 px glyph boxes */
  [data-screen-label="Compose"] div[style*="max-height: 108px"] { max-height: none !important; overflow: visible !important; }
  [data-screen-label="Compose"] button[aria-label="Rename or add a caption"], [data-screen-label="Compose"] button[aria-label="Show in message"], [data-screen-label="Compose"] button[aria-label="Make attachment"], [data-screen-label="Compose"] button[aria-label="Remove attachment"] { flex: none !important; width: 32px !important; height: 32px !important; padding: 4px !important; margin: -4px !important; box-sizing: content-box !important; }
  [data-screen-label="Compose"] button[title^="Preview "] { min-height: 40px !important; margin: -6px 0; justify-content: center; }
  /* the confidential-mode banner's Turn off button is a 40 px target inside the 12 px banner (the margin keeps the banner's height) */
  [data-screen-label="Compose"] div[style*="accent-2-100"] > button.btn-ghost { flex: none; min-height: 40px !important; padding: 8px 12px !important; margin: -6px -4px -6px 0; }
  [data-screen-label="Compose"] [role="group"][aria-label="Attachment details"] { scroll-margin-bottom: 8px; }
  [data-screen-label="Compose"] [role="group"][aria-label="Attachment details"] .input { min-height: 40px !important; }
  [data-screen-label="Compose"] [role="group"][aria-label="Attachment details"] .btn { height: 40px !important; }
  /* the formatting bar keeps its own layout (it folds its tail into a More menu and anchors its menus itself); its icon buttons are 40 px here, which the fold math knows */
  [data-screen-label="Compose"] [role="toolbar"][aria-label="Formatting"] { flex: none; }
  [data-screen-label="Compose"] [role="toolbar"][aria-label="Formatting"] > button { flex: none; } /* a button that could shrink is measured shrunk as the bar's head, and the fold then keeps one tool too many */
  /* the inline image toolbar fits the sheet width; the drag hint is a mouse affordance */
  [data-screen-label="Compose"] [role="toolbar"][aria-label="Image options"] { white-space: normal !important; flex-wrap: wrap; left: 8px !important; right: 8px; max-width: none !important; }
  [data-screen-label="Compose"] [role="toolbar"][aria-label="Image options"] > button { min-height: 40px; }
  [data-screen-label="Compose"] [role="toolbar"][aria-label="Image options"] > span:last-child { display: none; }
  /* menus, the help bar, the picker */
  [data-screen-label="Compose"] .card button[style*="text-align: left"] { min-height: 40px; }
  [data-screen-label="Compose"] .card[style*="repeat(4"] { grid-template-columns: repeat(4, 36px) !important; }
  [data-screen-label="Compose"] .card[style*="repeat(4"] > button { width: 36px !important; height: 36px !important; }
  [data-screen-label="Help me write"] .btn { height: 40px !important; }
  [data-screen-label="Select contacts"] { overflow: hidden; overscroll-behavior: contain; }
  [data-screen-label="Select contacts"] select { min-height: 40px; }
  [data-screen-label="Select contacts"] .btn { height: 40px !important; }
  [data-screen-label="Select contacts"] input { height: 44px !important; }
  /* quoted HTML in a reply or forward stays inside the column */
  [data-screen-label="Compose"] .mm-rich { overflow-wrap: anywhere; }
  [data-screen-label="Compose"] .mm-rich img { max-width: 100%; height: auto; }
  /* the minimised compose bar's title is a 40 px target */
  div:has(> button[aria-label="Restore"]) > button:first-child { min-height: 40px; }
}

/* ---- Emirati: the flag flying from a glass hoist — a red bar down the left, green / white / black bands across the top fading
   right — painted by a ::before on the Mail root (position: relative; isolation: isolate, so z-index -1 sits above its ground and
   under the blobs and every pane) and on the loading overlay (#mm-splash, whose column is z-index 1). The sheet's all-palette
   glass sheen (the same ::before carrying a lone diagonal light sweep) is left out on purpose: colours only; Emirati keeps the
   sweep as the flag's last layer. ---- */
html[data-palette="emirati"] [data-screen-label="Mail"]::before, html[data-palette="emirati"] #mm-splash::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: var(--deco-alpha);
  background:
    linear-gradient(90deg, oklch(0.58 0.23 28 / 0.92), oklch(0.58 0.23 28 / 0.6)) 0 0 / 10px 100% no-repeat,
    linear-gradient(90deg, oklch(0.5 0.15 152 / 0.3), transparent 58%) 10px 0 / 100% 64px no-repeat,
    linear-gradient(90deg, rgba(255, 255, 255, 0.16), transparent 58%) 10px 64px / 100% 64px no-repeat,
    linear-gradient(90deg, rgba(0, 0, 0, 0.38), transparent 58%) 10px 128px / 100% 64px no-repeat,
    linear-gradient(112deg, transparent 30%, rgba(255, 255, 255, 0.035) 44%, rgba(255, 255, 255, 0.07) 50%, rgba(255, 255, 255, 0.035) 56%, transparent 70%);
  box-shadow: inset 10px 0 30px -12px oklch(0.58 0.23 28 / 0.55);
}
html:not([data-theme="dark"])[data-palette="emirati"] [data-screen-label="Mail"]::before, html:not([data-theme="dark"])[data-palette="emirati"] #mm-splash::before {
  background:
    linear-gradient(90deg, oklch(0.56 0.23 28 / 0.95), oklch(0.56 0.23 28 / 0.65)) 0 0 / 10px 100% no-repeat,
    linear-gradient(90deg, oklch(0.5 0.15 152 / 0.26), transparent 58%) 10px 0 / 100% 64px no-repeat,
    linear-gradient(90deg, rgba(255, 255, 255, 0.8), transparent 58%) 10px 64px / 100% 64px no-repeat,
    linear-gradient(90deg, rgba(0, 0, 0, 0.16), transparent 58%) 10px 128px / 100% 64px no-repeat,
    linear-gradient(112deg, transparent 30%, rgba(255, 255, 255, 0.22) 44%, rgba(255, 255, 255, 0.45) 50%, rgba(255, 255, 255, 0.22) 56%, transparent 70%);
}

/* ==== redesign pack (six screens): tokens and recipes, additive. Everything the pack hard-coded for Pulse-dark is a formula on the
   palette parameters here, so the ten palettes and both themes follow; the state colours (red, gold, green, orange) are hue-fixed
   by design (the README's literals in dark; light counterparts that clear 4.5:1 on their own grounds, design6/contrast_check.py).
   Nothing above this line changes. ==== */
:root {
  /* grounds and fills */
  --mm-ground-deep: oklch(0.945 calc(0.014 * var(--chroma-ground)) var(--hue-ground));   /* the reading pane / list / assistant scene base */
  --mm-panel: oklch(0.985 calc(0.006 * var(--chroma-ground)) var(--hue-ground));         /* opaque fill under a gradient border */
  --mm-inset: rgba(255, 255, 255, 0.55);                                                   /* a row sunk into a card, a time pill */
  --mm-inset-body: rgba(255, 255, 255, 0.7);                                               /* the open message's body inset */
  --mm-glow-a: oklch(0.85 calc(0.09 * var(--sat)) var(--hue-accent) / 0.55);              /* accent corner glow of a scene */
  --mm-glow-b: oklch(0.87 calc(0.08 * var(--sat-2)) var(--hue-accent-2) / 0.5);           /* accent-2 corner glow */
  --mm-glow-list-a: var(--mm-glow-a); --mm-glow-list-b: var(--mm-glow-b);                 /* the inbox list's own pair (the dark block paints the pack's 1b values) */
  --mm-toast-act: var(--color-accent-400);                                                 /* the toast's Undo: the accent that reads on the inverted toast */
  --mm-ai-glow: oklch(0.87 calc(0.08 * var(--sat-2)) var(--hue-accent-2) / 0.55);         /* the assistant scene's centre glow (accent-2) */
  --mm-ai-glow-2: oklch(0.85 calc(0.09 * var(--sat)) var(--hue-accent) / 0.5);            /* its corner glow (accent) */
  --mm-ai-panel: var(--mm-panel);                                                          /* the composer's opaque fill */
  --mm-glow-rail-a: oklch(0.85 calc(0.09 * var(--sat)) var(--hue-accent) / 0.5);          /* the quick settings panel's corner glows (pack 2, 2h: the scene glows at 0.5 / 0.45) */
  --mm-glow-rail-b: oklch(0.87 calc(0.08 * var(--sat-2)) var(--hue-accent-2) / 0.45);
  /* ink on the accent: the light theme deepens the accents to L 0.5 (the same reason .btn-primary is deepened above) */
  --mm-accent-strong: oklch(0.5 calc(0.19 * var(--sat)) var(--hue-accent));
  --mm-accent-2-strong: oklch(0.48 calc(0.15 * var(--sat-2)) var(--hue-accent-2));
  --mm-on-accent: #fff;                                                                    /* text / glyph on a flat accent or on the gradient where the pack used dark ink */
  --mm-on-grad: #fff;                                                                      /* glyph on the gradient where the pack used white (orb, send, header tiles, the assistant app tile) in both themes */
  --mm-on-grad-tile: #fff;                                                                 /* the Security header tile's glyph (1e) and the Assistant app tile's sparkles (the launcher's square, the rail's launcher; rd6x 1f): the pack's white on the gradient in both themes */
  --mm-glow-b-panel: var(--mm-glow-b);                                                     /* the Security panel's corner glow (1e) and the Apps launcher's lower-left glow (1f): the pack's own stop, a shade under the scenes' --mm-glow-b */
  --mm-gold-bg-tile: var(--mm-gold-bg);                                                    /* the gold icon tile (Linked accounts): the pack's tint is two points stronger than the External chip's */
  --mm-white-ink: #fff;                                                                    /* white in both themes: the 2h header tile's glyph on its gradient and the conversation-view switch's knob on the accent, as pack 2 draws them */
  --mm-gradient: linear-gradient(135deg, var(--mm-accent-strong), var(--mm-accent-2-strong));
  --mm-gradient-2: linear-gradient(135deg, var(--mm-accent-2-strong), var(--mm-accent-strong));
  --mm-gradient-border: linear-gradient(120deg, var(--color-accent), var(--color-accent-2));
  --mm-gradient-border-soft: linear-gradient(120deg, color-mix(in srgb, var(--color-accent) 70%, transparent), color-mix(in srgb, var(--color-accent-2) 70%, transparent));
  --mm-accent-ring: color-mix(in srgb, var(--color-accent) 45%, transparent);              /* hovered / active borders */
  --mm-accent-ring-40: color-mix(in srgb, var(--color-accent) 40%, transparent);           /* the Inbox chip, the BETA tag */
  --mm-accent-ring-60: color-mix(in srgb, var(--color-accent) 60%, transparent);           /* the selected tile */
  --mm-accent-ring-55: color-mix(in srgb, var(--color-accent) 55%, transparent);           /* the selected swatch / reading-pane tile (pack 2) */
  --mm-track: oklch(0.9 calc(0.012 * var(--chroma-ground)) var(--hue-ground) / 0.5);      /* a segment track, an option list, an inset row on the quick settings panel (pack 2, 2h) */
  --mm-glow-rail: 0 0 70px -28px var(--neon-glow);                                         /* the quick settings panel's halo */
  --mm-accent-tint: color-mix(in srgb, var(--color-accent) 16%, transparent);              /* the selected row */
  --mm-glow-soft: 0 0 28px -8px var(--neon-glow);
  --mm-glow-soft-2: 0 0 28px -8px var(--neon-glow-2);
  --mm-glow-panel: 0 0 80px -30px var(--neon-glow);                                        /* a whole dialog's halo */
  --mm-glow-panel-2: 0 0 80px -30px var(--neon-glow-2);
  --mm-gold-app-bg: var(--mm-gold-bg); --mm-danger-app-bg: var(--mm-danger-bg);           /* the launcher's Drive and Labels squares (dark: the pack's 0.16 / 0.18 alphas) */
  /* state colours, hue-fixed (README) */
  --mm-danger: oklch(0.58 0.22 27); --mm-danger-fg: oklch(0.48 0.2 27); --mm-danger-bg: oklch(0.62 0.21 25 / 0.14); --mm-danger-bg-soft: oklch(0.62 0.21 25 / 0.1);
  --mm-gold: oklch(0.76 0.17 70); --mm-gold-fg: oklch(0.5 0.14 70); --mm-gold-bg: oklch(0.82 0.16 80 / 0.22); --mm-gold-border: oklch(0.76 0.17 70 / 0.55); --mm-gold-hot: oklch(0.72 0.17 78);
  --mm-ok: oklch(0.62 0.17 150); --mm-ok-fg: oklch(0.42 0.12 150); --mm-ok-bg: oklch(0.7 0.17 150 / 0.16); --mm-ok-border: oklch(0.62 0.17 150 / 0.45);
  --mm-warn: oklch(0.66 0.17 55); --mm-warn-fg: oklch(0.46 0.13 55); --mm-warn-bg: oklch(0.78 0.17 55 / 0.18); --mm-warn-border: oklch(0.66 0.17 55 / 0.45);
  --mm-badge-muted-fg: var(--color-neutral-700);
  /* rd6x 1b: the page ground behind the scenes (the pack's canvas is darker than its frames; light keeps the app's ground), the deeper panel fill the Advanced search chip carries, the unread date's ink (the accent in dark, accent-700 in light for 4.5:1) */
  --mm-ground-page: var(--color-bg);
  --mm-chip-deep: var(--mm-panel);                                                     /* the Advanced search chip's fill (its own token: --mm-panel-deep is the 2d search panel's, a shade deeper in dark) */
  --mm-date-unread: var(--color-accent-700);
  --mm-tab-on: oklch(0.47 calc(0.17 * var(--sat)) var(--hue-accent));                     /* the selected / hovered category tab's ink: accent-700 deepened by L 0.03 so it clears 4.5:1 over the list scene's glow (azure measured 4.46 at L 0.5) */
  /* rd9 2b, the side rail */
  --mm-info-fg: oklch(0.45 0.12 220); --mm-info-bg: oklch(0.75 0.12 220 / 0.2);   /* the README info blue (the Contacts square); the light pair clears 4.5:1 on the light rail ground */
  --mm-accent-ring-55: color-mix(in srgb, var(--color-accent) 55%, transparent);   /* the active rail tile's ring (between --mm-accent-ring 45 % and -60) */
  --mm-badge-ink: oklch(0.15 0.03 var(--hue-ground));                               /* the pack's count-badge ink on the flat accent, unscaled (the accent is L 0.62 light / 0.78 dark: >= 5:1 on both) */
  --mm-gold-bg-tile: var(--mm-gold-bg);                                              /* the Drive square's tint (the pack's 0.16 on dark; --mm-gold-bg is the pack-1 chip's 0.14) */
}
html[data-theme="dark"] {
  /* the chroma factors are the pack's Pulse-dark literals divided by Pulse's --chroma-ground (1.4): ground 0.02, inset body 0.025, the ink 0.03 land exactly there; the other palettes scale with their own ground chroma */
  --mm-ground-deep: oklch(0.13 calc(0.0143 * var(--chroma-ground)) var(--hue-ground));
  --mm-ground-page: oklch(0.11 calc(0.015 * var(--chroma-ground)) var(--hue-ground));
  --mm-chip-deep: oklch(0.15 calc(0.018 * var(--chroma-ground)) var(--hue-ground));
  --mm-date-unread: var(--color-accent);
  --mm-panel: oklch(0.165 calc(0.02 * var(--chroma-ground)) var(--hue-ground));
  --mm-inset: oklch(0.13 calc(0.0143 * var(--chroma-ground)) var(--hue-ground) / 0.6);
  --mm-track: oklch(0.12 calc(0.013 * var(--chroma-ground)) var(--hue-ground) / 0.7); /* the pack's oklch(0.12 0.018 290 / 0.7) at Pulse's chroma-ground 1.4 */
  --mm-inset-body: oklch(0.17 calc(0.0179 * var(--chroma-ground)) var(--hue-ground) / 0.85);
  --mm-glow-a: oklch(0.32 calc(0.1 * var(--sat)) var(--hue-accent) / 0.55);
  --mm-glow-b: oklch(0.38 calc(0.1 * var(--sat-2)) var(--hue-accent-2) / 0.5);
  --mm-glow-list-a: oklch(0.32 calc(0.095 * var(--sat)) var(--hue-accent) / 0.5);        /* the 1b frame: oklch(0.32 0.1 295 / 0.5) and oklch(0.4 0.1 200 / 0.45) in the pack (1a shares --mm-glow-a/-b at 0.55 / 0.5 and L 0.38); Pulse's --sat 1.05 and --sat-2 0.95 land on the pack's chroma 0.1 */
  --mm-glow-list-b: oklch(0.4 calc(0.105 * var(--sat-2)) var(--hue-accent-2) / 0.45);
  --mm-glow-b-panel: oklch(0.36 calc(0.095 * var(--sat-2)) var(--hue-accent-2) / 0.45);  /* the Security panel's corner glow (1e), the Apps launcher's lower-left glow (1f): the pack's oklch(0.36 0.09 200 / 0.45) at Pulse's --sat-2 0.95 */
  --mm-toast-act: var(--color-accent-300);                                                 /* accent-400 (L 0.58) on the light toast (neutral-900, L 0.97) measures 4.2:1; one step deeper reads at 4.5:1 */
  --mm-ai-glow: oklch(0.36 calc(0.0947 * var(--sat-2)) var(--hue-accent-2) / 0.55);     /* the assistant frame's centre glow: the pack's oklch(0.36 0.09 200 / 0.55) at Pulse's sat-2 0.95 */
  --mm-ai-glow-2: oklch(0.32 calc(0.0952 * var(--sat)) var(--hue-accent) / 0.5);        /* its corner glow: oklch(0.32 0.1 295 / 0.5) at sat 1.05 */
  --mm-ai-panel: oklch(0.16 calc(0.0179 * var(--chroma-ground)) var(--hue-ground));     /* the composer's fill: the pack's oklch(0.16 0.025 290) */
  --mm-glow-rail-a: oklch(0.32 calc(0.1 * var(--sat)) var(--hue-accent) / 0.5); /* the pack's 2h card: oklch(0.32 0.1 295 / 0.5) and oklch(0.38 0.1 200 / 0.45) */
  --mm-glow-rail-b: oklch(0.38 calc(0.1 * var(--sat-2)) var(--hue-accent-2) / 0.45);
  --mm-accent-strong: var(--color-accent);
  --mm-accent-2-strong: var(--color-accent-2);
  --mm-on-accent: oklch(0.15 calc(0.0214 * var(--chroma-ground)) var(--hue-ground)); /* the pack's oklch(0.15 0.03 290) is Pulse's (ground chroma 1.4): 0.03 / 1.4 per unit of chroma (rd9 2c; 2h's quick settings rail reads the same ink at 0.021, the earlier 0.03 factor gave 0.042, dE 3.1 from the pack) */
  --mm-on-grad: #fff; /* the pack draws white on the gradient in dark too (the orb, Send, the header tiles, the Assistant app tile: rd6x 1c, D5); the dark ink on a flat accent stays --mm-on-accent (my avatar, the Account tile, the ribbon) */
  --mm-danger: oklch(0.7 0.18 25); --mm-danger-fg: oklch(0.85 0.12 25); --mm-danger-bg: oklch(0.7 0.18 25 / 0.2); --mm-danger-bg-soft: oklch(0.7 0.18 25 / 0.15);
  --mm-gold: oklch(0.82 0.16 80); --mm-gold-fg: oklch(0.86 0.14 80); --mm-gold-bg: oklch(0.82 0.16 80 / 0.14); --mm-gold-bg-tile: oklch(0.82 0.16 80 / 0.16); --mm-gold-border: oklch(0.82 0.16 80 / 0.45); --mm-gold-hot: oklch(0.86 0.16 85);
  --mm-gold-app-bg: oklch(0.82 0.16 80 / 0.16); --mm-danger-app-bg: oklch(0.7 0.18 25 / 0.18); /* the launcher's Drive and Labels squares: the pack's own alphas (its README's gold / red sit behind --mm-gold-bg / --mm-danger-bg) */
  --mm-ok: oklch(0.8 0.17 150); --mm-ok-fg: oklch(0.9 0.1 150); --mm-ok-bg: oklch(0.8 0.17 150 / 0.16); --mm-ok-border: oklch(0.8 0.17 150 / 0.45);
  --mm-warn: oklch(0.78 0.17 55); --mm-warn-fg: oklch(0.9 0.1 55); --mm-warn-bg: oklch(0.78 0.17 55 / 0.16); --mm-warn-border: oklch(0.78 0.17 55 / 0.45);
  --mm-badge-muted-fg: var(--color-neutral-700); /* the pack's ink; over the badge's composited ground (glass-active on the card on the panel) it measures 6.3:1 in Pulse dark and clears 4.5 in every dark palette (probe9_rd6x_1e) */
  --mm-tab-on: var(--color-accent-700);
  --mm-info-fg: oklch(0.88 0.08 220); --mm-info-bg: oklch(0.75 0.12 220 / 0.2);
  --mm-gold-bg-tile: oklch(0.82 0.16 80 / 0.16);
}
/* motion: html[data-motion="off"] and prefers-reduced-motion above already stop this */
@keyframes mm-orb { 0%, 100% { box-shadow: 0 0 40px -6px var(--neon-glow), 0 0 0 0 color-mix(in srgb, var(--color-accent) 40%, transparent); } 50% { box-shadow: 0 0 70px -4px var(--neon-glow), 0 0 0 14px transparent; } }

/* ---- scenes: the pack's screen grounds (radial corner glows over a deep base), framed on desktop, never clipped (the split grip and the popovers stay) ---- */
.mm-scene { background: radial-gradient(60% 50% at 0% 0%, var(--mm-glow-a), transparent 60%), radial-gradient(55% 55% at 100% 100%, var(--mm-glow-b), transparent 60%), var(--mm-ground-deep); border-radius: 28px; border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg); }
[data-mm-mailgrid] { gap: 8px; } /* the list and the pane are two framed scenes with the pack's 8 px between them; the grip sits in the gap */
.mm-scene-panel, .mm-surface.mm-scene-panel { background: radial-gradient(60% 40% at 100% 0%, var(--mm-glow-a), transparent 60%), var(--color-bg); border-radius: 28px; border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg), var(--mm-glow-panel); }          /* Import */
.mm-scene-panel-2, .mm-surface.mm-scene-panel-2 { background: radial-gradient(60% 40% at 0% 0%, var(--mm-glow-b-panel), transparent 60%), var(--color-bg); border-radius: 28px; border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg), var(--mm-glow-panel-2); }      /* Security */
.mm-scene-panel-both, .card.mm-scene-panel-both { background: radial-gradient(60% 40% at 100% 0%, var(--mm-glow-a), transparent 60%), radial-gradient(50% 40% at 0% 100%, var(--mm-glow-b-panel), transparent 60%), var(--color-bg); border-radius: 28px; border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg), var(--mm-glow-panel); } /* Apps */

/* ---- glass surfaces (README: blur(22px) saturate(1.3)) ---- */
.mm-glass { background: var(--glass); border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3); }
.mm-glass-strong { background: var(--glass-strong); border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3); }
.mm-card { padding: 12px 14px; border-radius: 18px; background: var(--glass); border: 1px solid var(--glass-border); display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; box-sizing: border-box; } /* a Security setting card */
.mm-card-row { grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; }
.mm-inset { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 12px; border-radius: 12px; background: var(--mm-inset); border: 1px solid var(--glass-border); font-size: 12.5px; min-width: 0; } /* an app-password / passkey row */
.mm-inset > .mm-nm { font-weight: 600; overflow-wrap: anywhere; }         /* the pack's spans: content-sized, wrapping (no ellipsis); an unbroken name breaks inside the row instead of pushing Revoke out of it */
.mm-inset > .mm-meta { color: var(--color-neutral-600); flex-shrink: 0; }  /* the date keeps its line; the name yields */
@media (max-width: 760px) { .mm-inset > .mm-meta { flex-shrink: 1; } }      /* the narrow row: a long name keeps most of the width and the date may fall to two words */

/* ---- text buttons: every pack text button is Figtree 700 (the base .btn is Caprasimo) ---- */
.btn.mm-txt { font-family: var(--font-body); font-weight: 700; }
.btn.mm-glassy { font-family: var(--font-body); font-weight: 700; background: var(--glass); border-color: var(--glass-border); color: var(--color-text); }
.btn.mm-glassy:hover { background: var(--glass-active); }
.btn.mm-quiet:hover { background: var(--glass-hover); }
.btn.mm-danger:hover, .mm-pill .btn-icon.mm-danger:hover { background: var(--mm-danger-bg); color: var(--mm-danger-fg); }
.btn.mm-danger-text { color: var(--mm-danger-fg); font-size: 12px; padding: 3px 10px; } /* Revoke / Remove keep the base .btn face (the pack's Revoke is a bare .btn-ghost: Caprasimo 400) */
.btn.mm-danger-text:hover { background: var(--mm-danger-bg-soft); }

/* ---- pills of grouped icon buttons (toolbars), the pager pill, the select-all pill ---- */
.mm-pill { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-border); flex: none; }
.mm-pill > .btn-icon, .mm-pill > div > .btn-icon { width: 34px; height: 34px; color: var(--color-neutral-700); }
.mm-pill-sm { padding: 3px; }
.mm-pill-sm > .btn-icon, .mm-pill-sm > div > .btn-icon { width: 32px; height: 32px; }
.mm-pill .btn-icon:hover { background: var(--color-accent-100); color: var(--color-accent-800); }
.mm-pill .btn-icon.mm-quiet:hover { background: var(--glass-hover); color: var(--color-neutral-700); }
.mm-bare { display: inline-flex; align-items: center; gap: 2px; flex: none; } /* the phone bar keeps its 40 px controls in a row, no pill */
.mm-pager { display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-border); font-size: 12.5px; color: var(--color-neutral-600); flex: none; }
.mm-pager > .mm-pos { font-variant-numeric: tabular-nums; margin-right: 6px; }
.mm-pager > .mm-pos > strong { color: var(--color-text); font-weight: 700; }
.mm-pager > .btn-icon { width: 28px; height: 28px; color: var(--color-neutral-700); }
.mm-pager > .btn-icon:hover { background: var(--glass-hover); }
.mm-selall { display: inline-flex; align-items: center; gap: 4px; padding: 6px 6px 6px 8px; border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass); color: var(--color-neutral-700); flex: none; } /* the select-all box + caret */
.mm-selall:hover { background: var(--glass-active); }

/* ---- gradient border (Summarize, Advanced search, the composer) ---- */
.mm-gb { border: 1.5px solid transparent; background: linear-gradient(var(--mm-panel), var(--mm-panel)) padding-box, var(--mm-gradient-border) border-box; color: var(--color-text); }
.mm-gb-soft { border: 1.5px solid transparent; background: linear-gradient(var(--mm-panel), var(--mm-panel)) padding-box, var(--mm-gradient-border-soft) border-box; color: var(--color-text); }
.mm-summarize { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 14px; border-radius: 999px; font-family: var(--font-body); font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: var(--mm-glow-soft); }
.mm-summarize > .mm-spark { display: inline-flex; color: var(--color-accent); }
.mm-summarize:hover { box-shadow: 0 0 36px -4px var(--neon-glow), 0 0 20px -6px var(--neon-glow-2); }
.mm-adv { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; padding: 7px 14px 7px 11px; border-radius: 999px; font-family: var(--font-body); font-size: 13px; font-weight: 700; cursor: pointer; }
.mm-adv > .mm-spark { display: inline-flex; color: var(--color-accent); }
.mm-adv:hover { box-shadow: 0 0 24px -8px var(--neon-glow); }
.mm-tag-ai { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--color-accent-2-100); color: var(--color-accent-2-800); }

/* ---- gradient fills, the orb, the send button, the online dot ---- */
.mm-grad { background: var(--mm-gradient); color: var(--mm-on-grad); }
.mm-grad-2 { background: var(--mm-gradient-2); color: var(--mm-on-grad); }
.mm-grad-ink { background: var(--mm-gradient); color: var(--mm-on-accent); } /* the pack's dark ink on the gradient: my avatar, the Account tile */
.mm-orb { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--mm-gradient); color: var(--mm-on-grad); animation: mm-orb 3.2s ease-in-out infinite; flex: none; }
.mm-send { width: 38px; height: 38px; border-radius: 50%; border: 0; padding: 1px 6px; gap: normal; cursor: pointer; display: grid; place-items: center; background: var(--mm-gradient); color: var(--mm-on-grad); box-shadow: 0 0 22px -4px var(--neon-glow); transition: transform 0.15s ease; }
.mm-send:hover:not(:disabled) { transform: scale(1.06); }
.mm-send:disabled { opacity: 0.45; cursor: not-allowed; }
.mm-online { position: absolute; right: -1px; top: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--mm-ok); border: 2px solid var(--mm-panel); box-sizing: border-box; }

/* ---- icon tiles ---- */
.mm-tile { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; background: var(--color-accent-100); color: var(--color-accent); }   /* a Security card's tile */
.mm-tile-p { width: 34px; height: 34px; border-radius: 11px; }      /* a provider tile's icon square */
.mm-tile-s { width: 32px; height: 32px; border-radius: 10px; }      /* a suggestion card's icon square */
.mm-tile-hd { width: 42px; height: 42px; border-radius: 14px; }     /* a dialog header's tile (gradient + glow) */
.mm-tile-lg { width: 46px; height: 46px; border-radius: 15px; font-weight: 800; font-size: 15px; } /* an app tile's square (the pack's 800; Figtree 800 is not loaded, so the 700 face draws it) */
.mm-tile-2 { background: var(--color-accent-2-100); color: var(--color-accent-2); }
.mm-tile-2-deep { background: var(--color-accent-2-100); color: var(--color-accent-2-800); }
.mm-tile-muted { background: var(--glass-active); color: var(--color-neutral-800); }
.mm-tile-gold { background: var(--mm-gold-bg); color: var(--mm-gold-fg); }
#mmsec .mm-tile-gold { background: var(--mm-gold-bg-tile); }
.mm-tile-danger { background: var(--mm-danger-bg); color: var(--mm-danger-fg); }
.mm-tile-accent { background: var(--mm-accent-strong); color: var(--mm-on-accent); box-shadow: 0 0 22px -4px var(--neon-glow); } /* the Mail tile */
.mm-tile-hd.mm-grad { box-shadow: 0 0 22px -6px var(--neon-glow); }
.mm-tile-hd.mm-grad-2 { box-shadow: 0 0 22px -6px var(--neon-glow-2); }

/* ---- rd9 2e: the status menu (redesign pack 2, screen 2e). The presence menu under the top bar's status pill is a 360 px opaque panel
   (the deep ground with the pack's accent-2 corner glow and halo, radius 26, padding 12) holding an account header (the gradient-ringed
   avatar with the online dot in the presence colour, the name, a sub line with a glowing 8 px dot, the mode badge AUTO / DND / AWAY)
   and two inset groups of 36 px-tile rows: Automatic (green dot), Do not disturb (ban, the "1h" chip), Set as away (clock), Add a status
   (pen, chevron); Vacation responder (calendar, the ON / OFF badge) and Notification settings (bell, external link). The checked row is
   the README active recipe, every hover the glass-active fill with the glass border. The pack's literals map to tokens: the inset
   oklch(0.12 0.018 290 / 0.7) is --mm-inset-deep (the 2d groups' token), the avatar's disc oklch(0.15 0.03 290) is --mm-avatar-core
   (the 2a avatar's), the corner glow oklch(0.36 0.09 200 / 0.45) is --mm-glow-menu; the light theme keeps the app's light inset. ---- */
:root {
  --mm-inset-deep: oklch(0.94 calc(0.012 * var(--chroma-ground)) var(--hue-ground) / 0.55); /* the field groups sunk into the panel (light: a shade under the near-white fill, so the two groups read) */
  --mm-avatar-core: #fff;                                                                 /* the disc under my initials inside the gradient ring (the pack's oklch(0.15 0.03 290): the ground's lightness at a touch more chroma than --color-bg) */
  --mm-glow-menu: var(--mm-glow-b);                                                       /* the menu's accent-2 corner glow */
  --mm-glow-panel-menu: 0 0 70px -28px var(--neon-glow-2);                                /* the menu's halo (the dialogs' --mm-glow-panel-2 is 80 px) */
  --mm-gold-bg-tile: var(--mm-gold-bg);                                                   /* the Set as away tile's tint (the pack's 0.16 on dark; --mm-gold-bg is the pack-1 chip's 0.14) */
}
html[data-theme="dark"] {
  --mm-inset-deep: oklch(0.12 calc(0.013 * var(--chroma-ground)) var(--hue-ground) / 0.7);
  --mm-avatar-core: oklch(0.15 calc(0.021 * var(--chroma-ground)) var(--hue-ground));
  --mm-glow-menu: oklch(0.36 calc(0.09 * var(--sat-2)) var(--hue-accent-2) / 0.45);
  --mm-gold-bg-tile: oklch(0.82 0.16 80 / 0.16);
}
.mm-smenu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 80; width: min(360px, calc(100vw - 16px)); box-sizing: border-box; padding: 12px; display: flex; flex-direction: column; gap: 2px; border-radius: 26px; border: 1px solid var(--glass-border); background: radial-gradient(70% 40% at 0% 0%, var(--mm-glow-menu), transparent 60%), var(--color-bg); box-shadow: var(--shadow-lg), var(--mm-glow-panel-menu); color: var(--color-text); animation: mm-menu 0.16s ease-out; }
/* the account header: the 42 px gradient ring (2 px) around the 38 px disc, the 13 px online dot at the corner in the presence colour, the name, the sub line, the mode badge */
.mm-shead { display: flex; align-items: center; gap: 12px; padding: 6px 8px 12px; }
.mm-savatar { position: relative; display: block; width: 42px; height: 42px; border-radius: 50%; padding: 2px; box-sizing: border-box; flex: none; background: var(--mm-gradient); box-shadow: 0 0 18px -4px var(--neon-glow); }
.mm-savatar > .mm-savatar-core { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--mm-avatar-core); font-weight: 800; font-size: 13px; color: var(--color-text); }
.mm-savatar > .mm-savatar-core > img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.mm-savatar > .mm-sonline { position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; border-radius: 50%; background: var(--mm-pdot, var(--mm-ok)); border: 2px solid var(--color-bg); box-sizing: border-box; }
.mm-shead-text { flex: 1; min-width: 0; }
.mm-shead-name { display: block; font-weight: 700; font-size: 14.5px; }
.mm-shead-sub { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--color-neutral-600); }
.mm-shead-sub > .mm-sdot8 { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--mm-pdot, var(--mm-ok)); box-shadow: 0 0 8px var(--mm-pdot, var(--mm-ok)); }
.mm-sbadge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; color: var(--color-accent-2-800); background: var(--color-accent-2-100); flex: none; }
/* the two inset groups and their rows */
.mm-sgroup { display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 20px; background: var(--mm-inset-deep); border: 1px solid var(--glass-border); }
.mm-sgroup + .mm-sgroup { margin-top: 6px; }
.mm-srow { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 9px 10px 9px 8px; border-radius: 16px; border: 1px solid transparent; background: transparent; color: var(--color-text); font-family: var(--font-body); text-align: left; cursor: pointer; box-sizing: border-box; }
.mm-srow[aria-checked="true"] { background: var(--color-accent-100); border-color: var(--mm-accent-ring); }
.mm-srow:hover, .mm-srow-wrap:hover > .mm-srow { background: var(--glass-active); border-color: var(--glass-border); }
.mm-srow-wrap { position: relative; }
.mm-tile.mm-stile { width: 36px; height: 36px; border-radius: 12px; }
.mm-tile-ok { background: var(--mm-ok-bg); color: var(--mm-ok); }
.mm-tile.mm-stile.mm-tile-gold { background: var(--mm-gold-bg-tile); }
.mm-stile > .mm-sdot { width: 12px; height: 12px; border-radius: 50%; background: var(--mm-ok); box-shadow: 0 0 12px var(--mm-ok); } /* the status menu's presence glyph only: the footer's live dot and the import dialog's status dot are .mm-status > .mm-sdot below, idle without a glow */
.mm-sname { display: block; font-size: 14px; font-weight: 700; }
.mm-ssub { display: block; font-size: 12.5px; color: var(--color-neutral-600); margin-top: 1px; text-wrap: pretty; }
.mm-scheck { display: inline-flex; color: var(--color-accent); }
.mm-strail { display: inline-flex; color: var(--color-neutral-600); }
.mm-schip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--color-neutral-600); background: var(--glass); border: 1px solid var(--glass-border); }
.mm-sb { font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; padding: 2px 7px; border-radius: 999px; color: var(--color-neutral-700); background: var(--glass-active); }
/* the "1h" control: a button cannot nest a button, so the real control (a menuitem, the row's Tab stop after Do not disturb) sits over the
   chip as an invisible twin of the same content and metrics; hovering it lights the row (as the pack's chip inside the row does) and the chip */
.mm-s1h { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 4px; margin: 0; padding: 3px 8px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: transparent; font-family: var(--font-body); font-size: 11px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.mm-srow-wrap:has(> .mm-s1h:hover) .mm-schip { background: var(--glass-active); color: var(--color-text); }
/* the pill that opens the menu shows the README active recipe while it is open (the top bar's own recipe restates the same values on .mm-hopen) */
[data-screen-label="Status pill"][aria-expanded="true"] { background: var(--color-accent-100) !important; border-color: var(--mm-accent-ring) !important; box-shadow: 0 0 24px -8px var(--neon-glow); color: var(--color-accent-800); }

/* ---- status badges (OFF · NONE YET · 1 ACTIVE · CHANGED …), the BETA tag, the RECOMMENDED ribbon, kickers, headings ---- */
.mm-badge { display: inline; font-size: 10.5px; font-weight: 800; line-height: 1.55; letter-spacing: 0.06em; padding: 2px 7px; border-radius: 999px; color: var(--mm-badge-muted-fg); background: var(--glass-active); font-family: var(--font-body); } /* the pack's badge: an inline span with its text written in capitals, declared 800 (the 700 face renders it; no heavier face is loaded) */
.mm-badge-ok { color: var(--color-accent-2-800); background: var(--color-accent-2-100); }
.mm-badge-accent { color: var(--color-accent-800); background: var(--color-accent-100); }
.mm-beta { display: inline-flex; font-family: var(--font-body); font-size: 10px; font-weight: 800; letter-spacing: 0.1em; padding: 3px 8px; border-radius: 999px; color: var(--color-accent-800); background: var(--color-accent-100); border: 1px solid var(--mm-accent-ring-40); } /* the markup writes BETA; Figtree 800 renders the 700 face, as in the pack */
.mm-ribbon { position: absolute; right: 12px; top: -9px; font-family: var(--font-body); font-size: 10px; font-weight: 800; letter-spacing: 0.08em; padding: 2px 8px; border-radius: 999px; background: var(--mm-accent-2-strong); color: var(--mm-on-accent-2); text-transform: uppercase; } /* the pack's RECOMMENDED: weight 800 (the 700 cut renders it: no heavier one is served) in the accent-2-tinted ink */
.mm-kicker { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-neutral-600); font-family: var(--font-body); }
.mm-kicker-brand { text-transform: none; }   /* the product's name reads exactly as written (T-93: "UAE.com Email"), never in the kicker's capitals */
.mm-h2 { margin: 0; font-family: var(--font-heading); font-weight: var(--font-heading-weight); font-size: 26px; line-height: 1.1; letter-spacing: -0.015em; color: var(--color-text); text-wrap: pretty; min-width: 0; overflow-wrap: anywhere; }
.mm-h3 { margin: 0; font-family: var(--font-heading); font-weight: var(--font-heading-weight); font-size: 22px; line-height: 1.1; letter-spacing: -0.015em; color: var(--color-text); }

/* ---- chips: External (gold), the removable folder / label chip, the message-count pill, labels in a row, the marker, the neon dot, the tick ---- */
.mm-chip-gold { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--mm-gold-fg); background: var(--mm-gold-bg); border: 1px solid var(--mm-gold-border); position: relative; }
.mm-label-x { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; position: relative; }
.mm-label-x.mm-nox { padding: 4px 11px; }
.mm-lx { width: 18px; height: 18px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; display: grid; place-items: center; padding: 1px 6px; box-sizing: border-box; flex: none; } /* the pack's bare <button> keeps the UA padding (1px 6px), so its 12 px glyph sits at +6 in the 18 px disc: the same box here */
.mm-lx:hover { background: color-mix(in srgb, currentColor 18%, transparent); }
.mm-count { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; color: var(--color-neutral-600); background: var(--glass); border: 1px solid var(--glass-border); }
.mm-label { display: inline-flex; align-items: center; flex: none; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; line-height: 1.3; max-width: 170px; box-sizing: border-box; }
.mm-label .mm-chip-go { padding: 0; max-width: 150px; }
.mm-imp { display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; padding: 0; cursor: pointer; flex: none; color: var(--color-neutral-400); font: inherit; line-height: 1.55; }
.mm-imp[aria-pressed="true"] { color: var(--mm-gold-hot); }
.mm-neon { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--color-accent); box-shadow: 0 0 8px var(--neon-glow); }
.mm-tick { width: 16px; height: 16px; border-radius: 5px; display: grid; place-items: center; box-sizing: border-box; border: 2px solid var(--color-neutral-500); background: transparent; color: var(--mm-on-accent); font-size: 10px; font-weight: 700; line-height: 1; overflow: hidden; transition: background 0.15s; }

/* ---- filter chips (the list header): base, hover = the active look ---- */
.mm-fchip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px 7px 11px; border-radius: 999px; font-family: var(--font-body); font-size: 13px; font-weight: 600; cursor: pointer; color: var(--color-text); background: var(--glass); border: 1px solid var(--glass-border); } /* no nowrap: the pack's chips wrap their text before they overflow the row */
.mm-fchip:hover, .mm-fchip[aria-pressed="true"], .mm-fchip[aria-expanded="true"] { background: var(--color-accent-100); color: var(--color-accent-800); border-color: var(--mm-accent-ring); }

/* ---- list rows: 44 px, radius 14, 2 px apart; colours stay bound inline (row.bg / row.ring / hoverBg), the shape lives here ---- */
.mm-line { border-radius: 14px; margin: 0; font-size: 13.5px; }
.mm-line .mm-star { color: var(--color-neutral-500); }
.mm-line [data-mm-time] { font-size: 12px; min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---- avatars, time pill, recipients toggle, message cards, body inset, footer bits ---- */
.mm-avatar { width: 44px; height: 44px; padding: 0; overflow: hidden; display: grid; place-items: center; border-radius: 50%; border: 0; cursor: pointer; font-family: var(--font-body); font-weight: 700; font-size: 15px; line-height: 1.55; flex: none; } /* a button resets the line-height; the pack's disc inherits the body's 1.55 */
.mm-ring { box-shadow: 0 0 0 2px var(--mm-ground-deep), 0 0 0 3px color-mix(in srgb, var(--color-accent-2) 45%, transparent); } /* the avatars are buttons (Contact details) but draw no hover, as the pack's discs: the focus ring is the keyboard's cue */
.mm-avatar-me { background: var(--mm-gradient); color: var(--mm-on-accent); box-shadow: 0 0 20px -4px var(--neon-glow); }
.mm-time { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; font-size: 12px; color: var(--color-neutral-600); background: var(--mm-inset); border: 1px solid var(--glass-border); white-space: nowrap; }
.mm-time > svg { color: var(--color-accent); }
.mm-to { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; padding: 3px 9px 3px 10px; border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass); color: var(--color-neutral-600); font-family: var(--font-body); font-size: 12px; cursor: pointer; max-width: 100%; }
.mm-to:hover { background: var(--glass-active); color: var(--color-text); }
.mm-msgs { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; } /* the pack's column of cards */
.mm-msg { position: relative; padding: 12px 14px; border-radius: 20px; background: var(--glass); border: 1px solid var(--glass-border); box-sizing: border-box; }
.mm-msg-fold { cursor: pointer; }
.mm-msg-fold:hover { background: var(--glass-active); }
.mm-msg-open { padding: 14px 14px 16px; border-radius: 22px; background: var(--glass-strong); box-shadow: var(--shadow-md), 0 0 60px -30px var(--neon-glow); }
.mm-body { margin: 14px 0 0 58px; padding: 16px 18px; border-radius: 18px; background: var(--mm-inset-body); border: 1px solid var(--glass-border); font-size: 14.5px; line-height: 1.6; max-width: 66ch; text-wrap: pretty; box-sizing: border-box; }
.mm-body > p { margin: 0 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; } /* a plain-text mail keeps its own line breaks (the pack's paragraphs carry none) */
.mm-body > p:last-of-type { margin-bottom: 0; }
.mm-body > p.mm-sig { color: var(--color-neutral-600); } /* the sign-off (the last paragraph when it opens with the sender's name) is dimmed, as the pack dims its "Hasan" line */
.mm-kbd-hint { margin-left: auto; font-size: 12px; color: var(--color-neutral-600); }
.mm-kbd-hint > kbd { font-family: inherit; display: inline-block; line-height: 14px; padding: 1px 7px; border-radius: 7px; background: var(--glass-active); border: 1px solid var(--glass-border); } /* the pack's 20 x 18 box: a 14 px line box, 1 px padding, 1 px border */
.mm-react { width: 38px; height: 38px; color: var(--color-neutral-700); background: var(--glass); border: 1px solid var(--glass-border); }
.mm-react:hover { background: var(--glass-active); color: var(--color-text); }
/* the bridge's attachment cards in the reading pane (painted by paintAttachments, br:2241): the pack's typed tile in the card header; the preview, the overlay buttons, the menu and the viewer stay */
section[aria-label="Reading pane"] .mm-att { border-radius: 16px; }
section[aria-label="Reading pane"] .mm-att:hover { background: var(--glass-active); } /* the pack's chip hover: the fill alone */
section[aria-label="Reading pane"] .mm-att .hd .ic { width: 26px; height: 26px; border-radius: 8px; background: var(--glass-active); color: var(--color-neutral-800); }
section[aria-label="Reading pane"] .mm-att .hd .ic svg { width: 14px; height: 14px; }
section[aria-label="Reading pane"] .mm-att .hd .ic.k-pdf { background: var(--mm-danger-bg); color: var(--mm-danger-fg); }
section[aria-label="Reading pane"] .mm-att .hd .ic.k-image, section[aria-label="Reading pane"] .mm-att .hd .ic.k-video { background: var(--color-accent-2-100); color: var(--color-accent-2-800); }
section[aria-label="Reading pane"] .mm-att .hd .ic.k-document, section[aria-label="Reading pane"] .mm-att .hd .ic.k-spreadsheet, section[aria-label="Reading pane"] .mm-att .hd .ic.k-slides { background: var(--color-accent-100); color: var(--color-accent-800); }

/* ---- the two-factor switch (44 × 26, the knob a span 18 at 3 / 3 as the pack draws it); the state is aria-checked, the click opens the real flow ---- */
.mm-switch { width: 44px; height: 26px; border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass-active); cursor: pointer; position: relative; padding: 1px 6px; flex: none; box-sizing: border-box; }
.mm-switch > .mm-knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--color-neutral-600); transition: transform 0.15s ease, background-color 0.15s ease; }
.mm-switch:hover { border-color: color-mix(in srgb, var(--color-accent) 50%, transparent); }
.mm-switch[aria-checked="true"] { background: var(--mm-accent-strong); border-color: var(--mm-accent-strong); box-shadow: 0 0 18px -6px var(--neon-glow); }
.mm-switch[aria-checked="true"] > .mm-knob { transform: translateX(18px); background: var(--mm-on-accent); }
.mm-switch:disabled { opacity: 0.45; cursor: not-allowed; }
@media (max-width: 760px) { /* phones: the hit box grows to 44 × 40 (the 40 px target); the 44 × 26 track is drawn by ::before in the same place and the knob follows it (the pack is desktop-only) */
  .mm-switch, .mm-switch:hover, .mm-switch[aria-checked="true"] { height: 40px; border-color: transparent; background: transparent; box-shadow: none; }
  .mm-switch::before { content: ''; position: absolute; inset: 6px -1px; border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass-active); box-sizing: border-box; }
  .mm-switch:hover::before { border-color: color-mix(in srgb, var(--color-accent) 50%, transparent); }
  .mm-switch[aria-checked="true"]::before { background: var(--mm-accent-strong); border-color: var(--mm-accent-strong); box-shadow: 0 0 18px -6px var(--neon-glow); }
  .mm-switch > .mm-knob { top: 10px; }
}
/* ---- password strength meter: four segments, the lit ones in accent-2 with the pack's glow ---- */
.mm-meter { display: flex; gap: 4px; flex: 1; } /* the pack's roles: the meter fills the row beside the content-sized caption (137.9 px beside 'Fair - add a symbol' in its picture) */
.mm-meter > span { flex: 1; height: 4px; border-radius: 2px; background: var(--glass-active); }
.mm-meter[data-strength="1"] > span:nth-child(-n+1), .mm-meter[data-strength="2"] > span:nth-child(-n+2), .mm-meter[data-strength="3"] > span:nth-child(-n+3), .mm-meter[data-strength="4"] > span { background: var(--color-accent-2); box-shadow: 0 0 8px var(--neon-glow-2); }

/* ---- provider tiles (Import) and app tiles (Apps) ---- */
.mm-ptile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 4px 10px; border-radius: 16px; cursor: pointer; font-family: var(--font-body); font-size: 11.5px; font-weight: 700; color: var(--color-text); background: var(--glass); border: 1px solid var(--glass-border); box-sizing: border-box; min-width: 0; text-align: center; }
.mm-ptile:hover { background: var(--glass-active); border-color: var(--mm-accent-ring); }
.mm-ptile[aria-checked="true"] { background: var(--color-accent-100); border-color: var(--mm-accent-ring-60); box-shadow: 0 0 24px -8px var(--neon-glow); }
.mm-ptile .mm-check { position: absolute; right: 6px; top: 6px; width: 16px; height: 16px; border-radius: 50%; display: none; place-items: center; background: var(--mm-accent-strong); color: var(--mm-on-accent); }
.mm-ptile[aria-checked="true"] .mm-check { display: grid; }
.mm-ptile:disabled, .mm-atile:disabled { opacity: 0.45; cursor: not-allowed; }
.mm-atile { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 14px 6px 12px; border-radius: 20px; cursor: pointer; font-family: var(--font-body); font-size: 12.5px; font-weight: 700; color: var(--color-text); background: var(--glass); border: 1px solid var(--glass-border); transition: transform 0.15s; box-sizing: border-box; min-width: 0; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; } /* the pack transitions the lift alone: its hover colours snap; no selection callout under a phone's long press (the Move menu) */
.mm-atile[aria-current="page"] { background: var(--color-accent-100); border-color: var(--mm-accent-ring-60); box-shadow: 0 0 30px -8px var(--neon-glow); }
.mm-atile:hover { transform: translateY(-2px); background: var(--glass-active); border-color: var(--mm-accent-ring); box-shadow: var(--mm-glow-soft); } /* after the current look: under the pointer the current tile takes the plain hover, as the pack's */
.mm-domain { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 999px; font-size: 12px; color: var(--color-neutral-600); background: var(--glass); border: 1px solid var(--glass-border); }

/* ---- the tip callout (accent-2), fields with a leading icon, the composer, the context indicator, the status pill, the divider with words ---- */
.mm-callout { display: flex; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--color-accent-2-100); border: 1px solid color-mix(in srgb, var(--color-accent-2) 35%, transparent); color: var(--color-accent-2-900); font-size: 12.5px; line-height: 1.5; }
.mm-callout > svg, .mm-callout > .mm-ico { flex: none; color: var(--color-accent-2); }
.mm-field { display: grid; gap: 6px; }
.mm-field > .mm-fw { position: relative; display: block; }
.mm-field .mm-ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--color-neutral-600); display: inline-flex; pointer-events: none; }
.mm-field .input, .mm-field .mm-input { width: 100%; box-sizing: border-box; min-height: 42px; padding: 6px 14px 6px 40px; font: inherit; font-size: 14px; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 999px; color: var(--color-text); caret-color: var(--color-accent); } /* the pack's .input: font inherited from the label (the kicker's 700 on the body's 1.55 line height), padding 6 14, the accent caret */
.mm-field .input:focus-visible, .mm-field .mm-input:focus-visible { outline-offset: 0; } /* the pack's .input ring sits on the border */
html:not([data-theme="dark"]) .mm-field .input::placeholder, html:not([data-theme="dark"]) .mm-field .mm-input::placeholder { color: var(--color-neutral-600); opacity: 1; } /* the light theme keeps 4.5:1 for the field hints (the DS's 42 % text measures 2.6:1 there); dark keeps the pack's placeholder */
.mm-field .mm-has-eye { padding-right: 44px; }
.mm-eye { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; color: var(--color-neutral-600); }
.mm-eye:hover { background: var(--glass-hover); color: var(--color-text); }
.mm-composer { border-radius: 20px; padding: 12px 12px 10px; box-shadow: 0 0 40px -16px var(--neon-glow); display: block; }
.mm-composer.mm-gb-soft { background: linear-gradient(var(--mm-ai-panel), var(--mm-ai-panel)) padding-box, var(--mm-gradient-border-soft) border-box; }
.mm-composer .mm-online { border-color: var(--mm-ai-panel); }
.btn.mm-ctx { gap: 7px; padding: 6px 12px 6px 10px; font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--color-text); background: var(--glass); border-color: var(--glass-border); white-space: nowrap; }
.btn.mm-ctx:hover { background: var(--glass-active); }
.btn.mm-ctx[data-mm-deep="true"] { background: var(--color-accent-100); } /* Tools while Deep research is on */
.mm-status { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 10px; border-radius: 999px; font-size: 12.5px; color: var(--color-neutral-600); background: var(--glass); border: 1px solid var(--glass-border); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-status > .mm-sdot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-neutral-500); flex: none; }
.mm-status[data-state="ok"] > .mm-sdot { background: var(--mm-ok); box-shadow: 0 0 8px var(--mm-ok); }
.mm-status[data-state="busy"] > .mm-sdot { background: var(--color-accent); box-shadow: 0 0 8px var(--neon-glow); }
.mm-status[data-state="error"] > .mm-sdot { background: var(--mm-danger); box-shadow: 0 0 8px var(--mm-danger); }
.mm-divider-text { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--color-neutral-600); }
.mm-divider-text::before, .mm-divider-text::after { content: ''; flex: 1; height: 1px; background: var(--color-divider); }

/* ---- keyboard: every new control shows the ring the rest of the app shows ---- */
.mm-ptile:focus-visible, .mm-atile:focus-visible, .mm-fchip:focus-visible, .mm-summarize:focus-visible, .mm-adv:focus-visible, .mm-switch:focus-visible, .mm-send:focus-visible, .mm-lx:focus-visible, .mm-eye:focus-visible, .mm-selall > button:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* ---- phones: the scenes run edge to edge, the pills give way to the 40 px bar, the panels keep their insets ---- */
@media (max-width: 759px) {
  .mm-scene { border-radius: 0; border: 0; box-shadow: none; }
  [data-mm-mailgrid] { gap: 0; }
  .mm-pill, .mm-pill-sm { padding: 0; gap: 2px; background: transparent; border: 0; }
  .mm-pill > .btn-icon, .mm-pill > div > .btn-icon, .mm-pill-sm > .btn-icon, .mm-pill-sm > div > .btn-icon { width: 40px; height: 40px; }
  .mm-body { margin-left: 0; max-width: none; }
  .mm-kbd-hint { display: none; }
  .mm-h2 { font-size: 22px; }
  .mm-eye, .mm-lx { min-width: 32px; }
  /* the assistant's hero on a phone: a 56 px orb and tighter gaps (the vars the host and the headline group read); a phone's host is shorter than the four-card hero, so it scrolls from the top (safe center) with the orb in view */
  .mm-orb { width: 56px; height: 56px; }
  .mm-orb > svg { width: 24px; height: 24px; }
  [data-screen-label="Assistant conversation"]:has(> .mm-orb) { --mm-conv-gap: 8px; --mm-hero-pad: 12px 16px 6px; --mm-hero-text-gap: 2px; --mm-sugg-gap: 6px; } /* only while the hero shows: the host's gap (the rhythm of a conversation's messages) is 8 and the headline / subline group closes to 2, so orb / text / cards sit 8 / 2 / 8 apart */
  [data-screen-label="Assistant header"] .btn-icon, [data-screen-label="Assistant input"] .btn-icon, [data-screen-label="Assistant input"] .mm-send { width: 40px; height: 40px; } /* the panel's icon buttons and Send are 40 px targets on a phone */
  [data-screen-label="Assistant input"] .btn.mm-ctx { min-height: 40px; }
  [data-screen-label="Side panel"] [role="menu"] .mm-menu-item { min-height: 40px; } /* the panel's menu rows (history, Sources, Search settings, Tools) are 40 px targets on a phone; the Sources menu's About button reads rail.ai.aboutSize */
}

/* ---- rd6 1a ---- */
.mm-to { line-height: 1.55; } /* the pack inherited the body line-height into the recipients toggle (26.6 px high); a button resets it to normal */
.mm-summarize[role="status"] { line-height: normal; } /* the busy pill is a div in the button's shell: the button's own line-height keeps it 40 px high */
.mm-name { font-family: var(--font-body); font-weight: 700; font-size: 14.5px; line-height: 1.55; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; white-space: nowrap; overflow: hidden; max-width: 100%; min-width: 0; flex: none; } /* the sender's name is a button (Contact details) with the pack's span metrics: a 22.5 px first line, no hover of its own */
.mm-hdr-right { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px; min-width: 0; } /* the time pill and the header buttons, centred on the header row as the pack draws them */
.mm-tbright { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; } /* the toolbar's right cluster: Print, Open in new window, the pager pill */
.mm-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 16px 0 0 58px; } /* the action row inside the last card, after the body inset, with no rule above it */
.mm-smart { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 0 58px; }
@media (max-width: 759px) { .mm-time { padding: 0; border: 0; background: transparent; } .mm-hdr-right { align-self: start; } .mm-actions, .mm-smart { margin-left: 0; } } /* phones keep the app's bare header time (the pack designs the desktop only): a line of its own under the sender, flush with the name (the stacked phone header is index.html's phone rule); the header's right cluster sits at the top of the stacked header, and the action and smart-reply rows drop the desktop's 58 px inset */
/* the attachment area sits inside the body inset. On desktop the bridge's cards wear the pack's pill chips (a typed 26 px tile, the name, the size, 44 px) and keep every control: the hover
   Download / Add to Drive and the ⋮ menu float above the chip while it is hovered or focused (right-click, Shift+F10 and a long press open the menu as before), the header line's
   About scanning / Download all / Save all buttons stand at the row's end while the area is hovered or focused; phones keep the cards with their previews */
@media (min-width: 760px) {
  section[aria-label="Reading pane"] .mm-body > .mm-atts { margin: 14px 0 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font: 13px var(--font-body); line-height: 1.6; }
  section[aria-label="Reading pane"] .mm-atts > .cards { display: contents; }
  section[aria-label="Reading pane"] .mm-atts > .ah { order: 9; margin: 0 0 0 auto; padding: 0; border: 0; min-height: 0; gap: 2px; opacity: 0; transition: opacity 0.15s; }
  section[aria-label="Reading pane"] .mm-atts:hover > .ah, section[aria-label="Reading pane"] .mm-atts:focus-within > .ah { opacity: 1; }
  section[aria-label="Reading pane"] .mm-atts > .ah .cnt, section[aria-label="Reading pane"] .mm-atts > .ah .dot, section[aria-label="Reading pane"] .mm-atts > .ah .sc .w, section[aria-label="Reading pane"] .mm-atts > .ah .sp { display: none; }
  section[aria-label="Reading pane"] .mm-atts > .ah .acts { margin: 0; }
  section[aria-label="Reading pane"] .mm-atts .ib, section[aria-label="Reading pane"] .mm-atts .ib.i { width: 30px; height: 30px; margin: 0; }
  section[aria-label="Reading pane"] .mm-atts .ib.i svg { width: 16px; height: 16px; }
  section[aria-label="Reading pane"] .mm-att { display: inline-flex; align-items: center; gap: 10px; width: auto; max-width: 100%; padding: 8px 14px 8px 10px; border-radius: 999px; overflow: visible; font-size: 13px; line-height: 1.6; }
  section[aria-label="Reading pane"] .mm-att .pv { display: none; }
  section[aria-label="Reading pane"] .mm-att .hd, section[aria-label="Reading pane"] .mm-att .hd .tx { display: contents; }
  section[aria-label="Reading pane"] .mm-att .hd .nm { font-weight: 600; white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.6; }
  section[aria-label="Reading pane"] .mm-att .hd .sz { font-size: 12px; color: var(--color-neutral-600); white-space: normal; line-height: 1.6; }
  section[aria-label="Reading pane"] .mm-att .ov { left: auto; right: 34px; top: auto; bottom: calc(100% + 4px); height: auto; padding: 0; background: none; gap: 4px; align-items: center; }
  section[aria-label="Reading pane"] .mm-att .rb, section[aria-label="Reading pane"] .mm-att .dots { width: 30px; height: 30px; border-radius: 50%; background: var(--mm-panel); border: 1px solid var(--glass-border); color: var(--color-neutral-700); box-shadow: var(--shadow-sm); font: 16px/1 var(--font-body); }
  section[aria-label="Reading pane"] .mm-att .rb svg { width: 16px; height: 16px; }
  section[aria-label="Reading pane"] .mm-att .rb:hover, section[aria-label="Reading pane"] .mm-att .rb:focus-visible, section[aria-label="Reading pane"] .mm-att .dots:hover, section[aria-label="Reading pane"] .mm-att .dots:focus-visible { background: var(--glass-active); color: var(--color-text); box-shadow: var(--shadow-sm); }
  section[aria-label="Reading pane"] .mm-att .rb.done { background: var(--mm-accent-strong); color: var(--mm-on-accent); border-color: transparent; }
  section[aria-label="Reading pane"] .mm-att .dots { position: absolute; right: 0; bottom: calc(100% + 4px); opacity: 0; pointer-events: none; transition: opacity 0.15s; }
  section[aria-label="Reading pane"] .mm-att:hover .dots, section[aria-label="Reading pane"] .mm-att:focus-within .dots, section[aria-label="Reading pane"] .mm-att.wait .dots { opacity: 1; pointer-events: auto; }
  section[aria-label="Reading pane"] .mm-att .sv { display: none; }
  section[aria-label="Reading pane"] .mm-att:hover::before, section[aria-label="Reading pane"] .mm-att:focus-within::before, section[aria-label="Reading pane"] .mm-att.wait::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 4px; } /* the 4 px between the chip and its floating controls stays the chip's while they show, so the pointer reaches Download / Add to Drive / ⋮ without the hover dropping in the gap (a ::before sits under the controls in tree order) */
  section[aria-label="Reading pane"] .mm-att .dots::before { content: ''; position: absolute; inset: 0 0 0 -4px; } /* ⋮ is a disc: its square (the corners outside the disc) and the 4 px to Add to Drive belong to it, so a pointer crossing them keeps the chip hovered (the two overlay discs sit in the overlay's own box) */
}

/* ---- rd6x chrome: the page around the two scenes wears the pack's recipes so nothing reads foreign beside them ---- */
@media (min-width: 760px) { [data-mm-mailgrid] { margin-bottom: 8px; } } /* the scenes end 8 px above the footer strip: the 28 px corners and the shadow read */
[data-mm-splitgrip] { width: 4px; height: 28px; border-radius: 999px; background: var(--glass-border); transition: background-color 0.14s ease; } /* the split grip is a bar in the gap between the scenes */
[role="separator"][aria-label="Resize the reading pane"]:hover [data-mm-splitgrip] { background: var(--mm-accent-ring); }
[data-mm-mailgrid][data-mm-splitting="true"] [data-mm-splitgrip] { background: var(--color-accent); }
.mm-pill > .mm-theme { height: 34px; padding: 0 12px 0 9px; border: 0; border-radius: 999px; gap: 7px; font-family: var(--font-body); font-weight: 600; font-size: 13px; color: var(--color-neutral-700); background: transparent; } /* the theme toggle inside the header pill, beside help, settings and apps */
.mm-pill > .mm-theme:hover { background: var(--glass-hover); color: var(--color-text); }
.mm-status-sm { padding: 3px 10px 3px 8px; font-size: 11.5px; } /* a small status pill */
.mm-foot-status { display: inline-flex; align-items: center; gap: 6px; } /* the footer strip's one status line: the live dot, the state word, the last account activity, Details (v0.51) */
.mm-foot-status > .mm-sdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
nav[aria-label="Apps"] > .mm-rail-app > span, nav[aria-label="Apps"] .mm-launch.in-rail > .mm-launch-label { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* the rail's caption is one line (1a); the button and its tile are the rd6 1c block's .btn.mm-rail-app recipe (a 32 px tinted square over the caption), the lit state its inline background / ink / glow */

/* ---- rd6 review: pointer targets (2.5.8) ---- */
/* the pane's importance marker (18 px), the select-all box (20 px) and its caret (16 x 20) keep their glyphs and boxes; a pseudo-element around each is the pointer target (28 x 28, 30 x 30, 24 x 30), inside the pill's border and without overlap (the box's 2 px and the caret's 2 px meet in the 4 px gap) */
[data-mm-chiprow] > .mm-imp, .mm-selall > button { position: relative; }
[data-mm-chiprow] > .mm-imp::before, .mm-selall > button::before { content: ''; position: absolute; inset: -5px; }
.mm-selall > button:first-child::before { inset: -7px -1px -7px -9px; } /* the 16 px box button: a 26 x 30 target reaching the pill's left edge */
.mm-selall > button + button::before { inset: -8px -7px -8px -3px; } /* the 14 px caret button: 24 x 30 to the pill's right edge */
/* phones (no hover): the marker's target is 40 x 40 (a 1 px reach over the Inbox chip's border, not its button), the label chip's link and its remover, the recipients toggle reach 40 px tall through the same device; the boxes stay as they are */
@media (hover: none) {
  section[aria-label="Reading pane"] [data-mm-chiprow] > .mm-imp::before { inset: -11px; }
  section[aria-label="Reading pane"] .mm-label-x > button, section[aria-label="Reading pane"] .mm-to { position: relative; }
  section[aria-label="Reading pane"] .mm-label-x > button:not(.mm-lx)::before { content: ''; position: absolute; inset: -11px 0; }
  section[aria-label="Reading pane"] .mm-label-x > .mm-lx::before { content: ''; position: absolute; inset: -1px 0; }
  section[aria-label="Reading pane"] .mm-to::before { content: ''; position: absolute; inset: -2px 0; }
}

/* ---- rd6 1b ---- */
/* the head sheet's .mm-chip (line-height 1) comes after glass.css, so the pack's label pill states its line height at a higher specificity: the pack inherits the body's 1.55 (a 23 px chip) */
.mm-chip.mm-label { line-height: 1.55; }
/* the list's pill buttons draw their 16 px glyphs (18 on phones) through the bound style on the svg; the select-all pill holds the pack's 16 px box and 14 px caret as two live buttons (their pointer targets are the ::before areas above) */
/* the phone bar's buttons wear no pill (.mm-bare) and keep the muted glyph the pill gives on desktop */
.mm-bare > .btn-icon, .mm-bare > div > .btn-icon { color: var(--color-neutral-700); }
/* the Advanced search chip is .mm-fchip and .mm-gb: the chip recipe comes later in the sheet than the gradient border, so the pair restates the border here; its hover is the glow alone */
.mm-fchip.mm-gb, .mm-fchip.mm-gb:hover { border: 1.5px solid transparent; background: linear-gradient(var(--mm-chip-deep), var(--mm-chip-deep)) padding-box, var(--mm-gradient-border) border-box; color: var(--color-text); } /* the pack fills this chip with the deeper panel (oklch 0.15) */
.mm-fchip.mm-adv { padding: 7px 14px 7px 11px; font-weight: 700; }
/* a split list narrower than 640 px: the three pills pull their padding in (the buttons keep 32 px), and the wrappers around Snooze / Move / Labels / More lay their button out as a flex item so no line box lifts the pill */
.mm-pill-xs { padding: 0; gap: 0; } /* the narrow split list's tight pills: no inner padding, so the open conversation's bar (select-all, three pills, the pager) still holds one line at a 40 % split beside the pack-2 side rail */
.mm-pill > div, .mm-bare > div { display: flex; }

/* ---- rd6 1c ---- */
[data-screen-label="Assistant input"] textarea::placeholder { color: var(--color-neutral-600); opacity: 1; }
/* the right rail's six launchers: the pack's app-tile recipe (a 32 px tinted square, a 16 px radius button, the open app lit like the nav's current item); the bridge's four launchers share it through .mm-launch.in-rail */
.btn.mm-rail-app { width: 64px; height: 58px; flex-direction: column; gap: 4px; border-radius: 16px; font-family: var(--font-body); font-size: 10.5px; font-weight: 600; line-height: 1; letter-spacing: 0.01em; }
.mm-rail-app .mm-tile.mm-grad-2, .mm-launch .mm-tile.mm-grad-2 { background: var(--mm-gradient-2); color: var(--mm-on-grad-tile); } /* .mm-tile comes later than .mm-grad-2: the Assistant's square restates the gradient */
[data-screen-label="Assistant conversation"]:has(> .mm-orb) { align-items: center; } /* the hero's orb and text group centred on every device (the pack's align-items center); the host's overflow is the app's own: visible while the hero fits (the pack's static frame), auto once it does not (a short window, the Deep research pill, a file chip) or in a conversation (rail.ai.convOverflow, measured after every render) */
@media (min-width: 760px) {
  [data-screen-label="Assistant conversation"]:has(> .mm-orb) { --mm-conv-gap: 18px; --mm-hero-pad: 20px; } /* the pack's hero: padding 20, the orb / text group / cards 18 apart, the text group shrink-wrapped; a conversation keeps the messages' 12 px rhythm and 16 px inset */
}
[data-screen-label="Assistant input"] .mm-send:disabled { box-shadow: none; } /* a disabled Send keeps no glow: the out-of-gamut glow inside the 45 % opacity layer rasterises as yellow speckles on a light ground (Chromium) */

/* ---- rd6 1f ---- */
/* the launcher's two gradient squares (Account, Assistant): .mm-tile comes later in this sheet than .mm-grad-ink / .mm-grad-2 and would repaint them with the accent tint, so the pair restates the gradient and its ink at a higher specificity */
[data-screen-label="Apps"] .mm-tile.mm-grad-ink { background: var(--mm-gradient); color: var(--mm-on-accent); }
[data-screen-label="Apps"] .mm-tile.mm-grad-2 { background: var(--mm-gradient-2); color: var(--mm-on-grad-tile); }

/* ---- rd6x 1b: the inbox list measured element by element against the pack (rd6exact/1b) ---- */
.mm-list { display: flex; flex-direction: column; gap: 2px; } /* the pack's row container: rows 2 px apart (its padding 6 8 10 is bound inline; phones keep the block list) */
.mm-list > * { flex: none; }
.mm-scene-list { background: radial-gradient(60% 50% at 0% 0%, var(--mm-glow-list-a), transparent 60%), radial-gradient(55% 55% at 100% 100%, var(--mm-glow-list-b), transparent 60%), var(--mm-ground-deep); } /* the pack's 1b frame: the same recipe as .mm-scene with the list's own glow pair */
.mm-line .mm-star { gap: normal; justify-content: normal; } /* the pack's star is a plain 30 px grid button: no button gap, its one track the 18 px content box */
.mm-line .mm-imp { justify-content: flex-start; position: relative; } /* the pack's marker is a 26 x 13 span with the glyph at the column's left; the pointer target is the ::before around the live button (32 x 29) */
.mm-line .mm-imp::before { content: ''; position: absolute; inset: -8px -3px; }
.mm-line .mm-chip.mm-label { display: inline; } /* the pack's label is an inline span among the subject cell's flex items: its live button sits on the line box's baseline and the 1.55 line height gives the 23 px chip */
.mm-line .mm-chip[data-mm-chip="label"]:hover .mm-chip-x, .mm-line .mm-chip[data-mm-chip="label"]:focus-within .mm-chip-x { display: inline-grid; } /* the remove button appears inside the inline chip without lifting its line */
/* the page chrome around the list follows the pack's recipes: the header's text buttons are the filter chips' glass, its icon buttons one pill, the rail's glyphs sit in 32 px squares, the split grip shows under the pointer */
.btn.mm-fchip { background: var(--glass); border-color: var(--glass-border); color: var(--color-text); }
.btn.mm-fchip:hover { background: var(--color-accent-100); color: var(--color-accent-800); border-color: var(--mm-accent-ring); }
nav[aria-label="Apps"] .btn-icon > svg { width: 32px; height: 32px; padding: 7px; box-sizing: border-box; border-radius: 10px; background: var(--glass-active); color: var(--color-neutral-800); }
nav[aria-label="Apps"] .btn-icon[aria-pressed="true"] > svg, nav[aria-label="Apps"] .btn-icon[aria-current="page"] > svg { background: var(--color-accent-100); color: var(--color-accent); }
[role="separator"][aria-label="Resize the reading pane"]:hover { --mm-grip-o: 1; }
@media (max-width: 759px) { /* the phone drawer's rows are 40 px targets (QA-09-7, QA-09-8): every folder, category, More and label row grows from the desktop's 34 px to 40 (the padding stays, the row's box grows), and the label's options glyph from the 28 px inline square to a 40 px one, its left edge still on the label button's right; the desktop keeps its 34 px rows and 28 px glyph */
  [data-screen-label="Mail"] aside[aria-label="Folders"] button { min-height: 40px; }
  [data-screen-label="Mail"] aside[aria-label="Folders"] .mm-lrow > .mm-lopt { width: 40px !important; height: 40px !important; }
}
@media (max-width: 759px) { /* a phone with a conversation open keeps its 40 px pointer targets in the pane as well (the pack sizes the desktop pane's marker 18, label x 18, recipients toggle 36, Reply / Forward 37, emoji 38): the marker's pseudo-element target grows to 40, the rest take a 40 px minimum */
  [data-mm-chiprow] > .mm-imp::before { inset: -11px; }
  section[aria-label="Reading pane"] .btn.mm-txt, section[aria-label="Reading pane"] .btn.mm-glassy, section[aria-label="Reading pane"] .mm-react, section[aria-label="Reading pane"] article [role="button"][aria-expanded] > div > button.mm-to { min-height: 40px; }
  section[aria-label="Reading pane"] .mm-react { min-width: 40px; box-sizing: border-box; }
  section[aria-label="Reading pane"] .mm-lx { min-width: 30px; min-height: 30px; } /* the touch rule above pads every 'Remove …' button 5 px (content-box): 30 + 10 = the 40 px target, drawn as one circle */
}
/* ---- rd6x 1d: the Import panel measured element by element against the pack (rd6exact/1d) ---- */
:root {
  --mm-on-grad-deco: #fff;                                                                 /* a decorative glyph on the gradient (the Import header tile, aria-hidden): the pack draws it white in both themes */
  --mm-on-accent-2: #fff;                                                                  /* ink on a flat accent-2 (the RECOMMENDED ribbon): white on the deepened light accent-2 */
  --mm-glow-a-panel: var(--mm-glow-a);                                                     /* the Import dialog's corner glow */
  /* the provider tiles' hue-fixed tints (theme-port §0.2: theme-independent literals in dark; light counterparts that clear 4.5:1 on the light glass, design6/contrast_check.py) */
  --mm-tile-blue-bg: oklch(0.6 0.15 240 / 0.16); --mm-tile-blue-fg: oklch(0.45 0.16 240);
  --mm-tile-sky-bg: oklch(0.65 0.12 220 / 0.16); --mm-tile-sky-fg: oklch(0.42 0.12 220);
  --mm-tile-violet-bg: oklch(0.55 0.2 300 / 0.16); --mm-tile-violet-fg: oklch(0.45 0.18 300);
}
html[data-theme="dark"] {
  --mm-on-accent-2: oklch(0.15 calc(0.0316 * var(--sat-2)) var(--hue-accent-2));         /* the pack's oklch(0.15 0.03 200) at Pulse's --sat-2 0.95 */
  --mm-glow-a-panel: oklch(0.32 calc(0.0952 * var(--sat)) var(--hue-accent) / 0.5);      /* the pack's oklch(0.32 0.1 295 / 0.5) at Pulse's --sat 1.05 (the scenes' --mm-glow-a is the 0.55 variant) */
  --mm-tile-blue-bg: oklch(0.7 0.15 240 / 0.22); --mm-tile-blue-fg: oklch(0.82 0.12 240);
  --mm-tile-sky-bg: oklch(0.75 0.12 220 / 0.2); --mm-tile-sky-fg: oklch(0.88 0.08 220);
  --mm-tile-violet-bg: oklch(0.6 0.2 300 / 0.24); --mm-tile-violet-fg: oklch(0.85 0.12 300);
}
.mm-tile-blue { background: var(--mm-tile-blue-bg); color: var(--mm-tile-blue-fg); }
.mm-tile-sky { background: var(--mm-tile-sky-bg); color: var(--mm-tile-sky-fg); }
.mm-tile-violet { background: var(--mm-tile-violet-bg); color: var(--mm-tile-violet-fg); }
/* the dialog panels are opaque grounds: no backdrop blur behind them (the pack's frames have none); the Import panel's glow is the pack's 0.5 stop */
.mm-scene-panel, .mm-surface.mm-scene-panel { background: radial-gradient(60% 40% at 100% 0%, var(--mm-glow-a-panel), transparent 60%), var(--color-bg); }
.mm-scene-panel, .mm-surface.mm-scene-panel, .mm-scene-panel-2, .mm-surface.mm-scene-panel-2, .mm-scene-panel-both, .card.mm-scene-panel-both { -webkit-backdrop-filter: none; backdrop-filter: none; }
/* the pack's hover on the checked provider tile: the hover look wins over the selection (glass-active, the 45 % ring); the glow and the check stay */
.mm-ptile[aria-checked="true"]:hover { background: var(--glass-active); border-color: var(--mm-accent-ring); }
/* the divider with words draws its two lines as spans when the panel adds them (the pack's structure); the pseudo-elements stand in elsewhere */
.mm-divider-text.mm-lines::before, .mm-divider-text.mm-lines::after { content: none; }
.mm-divider-text.mm-lines > span { flex: 1; height: 1px; background: var(--color-divider); }
/* ---- rd6x 1f: the Apps launcher measured element by element against the pack (rd6exact/1f); the rail's app-tile recipe (.btn.mm-rail-app, the Assistant square) is the rd6 1c block's above ---- */
[data-screen-label="Apps"] .mm-tile.mm-tile-gold { background: var(--mm-gold-app-bg); }
[data-screen-label="Apps"] .mm-tile.mm-tile-danger { background: var(--mm-danger-app-bg); }
[data-screen-label="Apps"] .btn-ghost:not(:disabled):hover { background: var(--color-accent-100); } /* Manage apps: the pack's accent-100 hover (its style-hover, written here since the template's pseudo sheet marks its rules !important and a disabled control must take no fill) */
[data-screen-label="Apps"] .btn-ghost:disabled:hover { background: transparent; } /* honest-disabled: no hover fill until the platform backs it */
[data-screen-label="Apps"] [data-mm-appmove] { position: absolute; z-index: 2; width: 176px; display: grid; gap: 0; } /* the tile's Move menu (right click, Shift+F10, a long press on a phone): the drag's single-pointer and keyboard path */

/* ---- rd9 2a: the top bar (redesign pack 2, screen 2a). The bar is its own glass card with the pack's side glows; the brand sits in a
   glass pill; the search field is framed by the spinning neon ring (the sign-in card's ring, the pack's stops) with the '/ to focus'
   chip; the status pill carries its dot in a tinted halo; Help / Settings / Apps share one glass pill; the avatar is gradient-ringed
   with an online dot. Phones keep the app's transparent 56 px row and 40 px targets. ---- */
:root { --mm-field: oklch(0.99 calc(0.006 * var(--chroma-ground)) var(--hue-ground) / 0.92); --mm-ring-hi: #fff; --mm-avatar-core: #fff; } /* the search field's fill (the pack: a 92 % deep ground); the ring's white highlight; the disc under my initials inside the gradient ring (the pack's oklch(0.15 0.03 290): the ground's lightness at a touch more chroma than --color-bg) */
html[data-theme="dark"] { --mm-field: oklch(0.14 calc(0.02 * var(--chroma-ground)) var(--hue-ground) / 0.92); --mm-avatar-core: oklch(0.15 calc(0.021 * var(--chroma-ground)) var(--hue-ground)); }
.mm-topbar { box-sizing: border-box; border-radius: 22px; border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg); background: radial-gradient(40% 200% at 0% 50%, var(--mm-glow-a), transparent 70%), radial-gradient(40% 200% at 100% 50%, var(--mm-glow-b), transparent 70%), var(--mm-ground-deep); }
/* TS-07-1: the account card and the apps menu hang inside the header, which is its own stacking context (position: relative; z-index: 3), so an open compose window's root backdrop (position: fixed; z-index: 70) painted over the whole card and four to six of its ten controls took no click - document.elementFromPoint at their centre was the draft's editor. While a header-anchored menu is open, lift the header above the compose layer so the card (its own z-index: 80) and every control sit on top; the header falls back to z-index 3 the moment the menu closes. !important overrides the inline z-index: 3 the template sets. */
[data-screen-label="Mail"] > header:has([data-mm-menu]) { z-index: 82 !important; }
.btn.btn-icon.mm-hb { background: var(--glass); border-color: var(--glass-border); color: var(--color-neutral-700); }
.btn.btn-icon.mm-hb:hover { background: var(--glass-active); color: var(--color-text); }
/* the search frame: 2 px of ring around a 44 px field; the glow layer sits behind the field inside the frame's own stacking context */
.mm-sframe { position: relative; width: min(680px, 100%); min-width: 0; padding: 2px; border-radius: 18px; isolation: isolate; box-sizing: border-box; }
.mm-sring, .mm-sring-glow { position: absolute; inset: 0; border-radius: 18px; background: conic-gradient(from var(--ring-angle), transparent 0deg, transparent 150deg, var(--color-accent-2) 220deg, var(--mm-ring-hi) 262deg, var(--color-accent) 300deg, transparent 360deg); animation: ring-spin 3s linear infinite; pointer-events: none; }
.mm-sring { opacity: 0.9; }
.mm-sring-glow { inset: -6px; border-radius: 24px; filter: blur(14px); opacity: 0.55; z-index: -1; }
.mm-sfield { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 6px 0 16px; border-radius: 16px; background: var(--mm-field); color: var(--color-neutral-600); box-sizing: border-box; min-width: 0; }
.mm-sfield > .mm-sico { display: inline-flex; color: var(--color-accent); pointer-events: none; flex: none; }
.mm-sfield > .input, .mm-sfield > .input:hover, .mm-sfield > .input:focus-visible { flex: 1; width: auto; min-width: 0; min-height: 0; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: none; font-size: 15px; color: var(--color-text); }
.mm-sfield > .input::placeholder { color: var(--color-neutral-600); opacity: 1; }
.mm-sframe:has(> .mm-sfield > .input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: 2px; } /* the keyboard ring on the frame (the field itself has no border to recolour) */
.mm-sfield .btn-icon { width: 34px; height: 34px; color: var(--color-neutral-700); flex: none; }
.mm-sfield .btn-icon:hover { background: var(--color-accent-100); color: var(--color-accent-800); }
.mm-slash { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; font-size: 11.5px; color: var(--color-neutral-600); background: var(--glass); border: 1px solid var(--glass-border); flex: none; }
.mm-slash > kbd { font-family: inherit; font-weight: 700; }
/* the status pill and the Dark toggle: Figtree 13.5 / 700 on glass */
.btn.mm-hpill { display: flex; align-items: center; justify-content: normal; gap: 8px; height: 36px; box-sizing: border-box; border-radius: 999px; font-family: var(--font-body); font-size: 13.5px; font-weight: 700; line-height: normal; color: var(--color-text); background: var(--glass); border: 1px solid var(--glass-border); } /* one recipe, one height: the bar's 36 px (the header pill's buttons), whatever sits inside - the status pill's 22 px halo, the theme toggle's 18 px glyph (QA-08-6) */
.btn.mm-hpill:hover { background: var(--glass-active); }
.mm-halo { position: relative; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--mm-pdot, var(--mm-ok)) 18%, transparent); }
.mm-pdot { width: 10px; height: 10px; border-radius: 50%; background: var(--mm-pdot, var(--mm-ok)); box-shadow: 0 0 10px var(--mm-pdot, var(--mm-ok)); }
/* Help / Settings / Apps: three 36 px buttons in a 3 px glass pill */
.mm-pill-hd { padding: 3px; align-items: normal; }
.mm-pill-hd > .btn-icon, .mm-pill-hd > div > .btn-icon { width: 36px; height: 36px; }
/* the open look of a control whose popover is showing (the README's active recipe; the gear used to paint accent-100 alone) */
.mm-hopen[aria-expanded="true"], .mm-pill .btn-icon.mm-hopen[aria-expanded="true"], .btn.mm-hpill.mm-hopen[aria-expanded="true"] { background: var(--color-accent-100); border-color: var(--mm-accent-ring); box-shadow: 0 0 24px -8px var(--neon-glow); color: var(--color-accent-800); }
/* the avatar: a 40 px gradient ring (2 px) around the 36 px core, the online dot at the corner in the presence colour */
.mm-avatar-hd { position: relative; display: block; width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 2px; cursor: pointer; box-sizing: border-box; background: var(--mm-gradient); box-shadow: 0 0 18px -4px var(--neon-glow); font-family: var(--font-body); text-decoration: none; }
.mm-avatar-hd:hover { transform: scale(1.06); }
.mm-avatar-hd[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--mm-accent-ring), 0 0 24px -8px var(--neon-glow); }
.mm-avatar-hd > .mm-avatar-core { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--mm-avatar-core); font-weight: 800; font-size: 13px; color: var(--color-text); } /* a photo clips itself (its own 50 % radius) so the core keeps the pack's overflow */
.mm-avatar-hd > .mm-avatar-on { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--mm-ok); border: 2px solid var(--mm-ground-deep); box-sizing: border-box; }
@media (max-width: 759px) {
  .mm-topbar { border-radius: 0; border: 0; box-shadow: none; background: transparent; }
  .mm-sfield { padding: 0 2px 0 12px; }
  .mm-sfield .btn-icon, .mm-pill-hd > .btn-icon, .mm-pill-hd > div > .btn-icon { width: 40px; height: 40px; }
  .mm-pill-hd { padding: 0; }
  .mm-sring-glow { inset: -4px; border-radius: 22px; } /* the 48 px frame sits 4 px under the 56 px row's top edge: a 4 px halo stays whole all round where the desktop's 6 px was cut by the viewport (QA-08-8) */
}

/* ---- rd9 2b: the side rail (redesign pack 2, screen 2b) - the rail is its own glass card (104 px, the pack's vertical glows over the deep ground), every app a tile with a 40 px tinted icon square, a 700 label, a count badge (Calendar: today's remaining events, Tasks: the open tasks), the active app on the README active recipe, a divider and the dashed "Add app" tile that opens the apps launcher; its tokens (--mm-info-*, --mm-accent-ring-55, --mm-badge-ink, --mm-gold-bg-tile) sit in the --mm-* block above ---- */
.mm-rail { width: 104px; box-sizing: border-box; flex-direction: column; gap: 6px; padding: 12px 8px; margin: 0 var(--space-2) 0 0; align-self: start; border-radius: 26px; border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg); background: radial-gradient(120% 40% at 50% 0%, var(--mm-glow-a), transparent 70%), radial-gradient(120% 40% at 50% 100%, var(--mm-glow-b), transparent 70%), var(--mm-ground-deep); }
@media (max-height: 829px) { .mm-rail { max-height: 100%; overflow: hidden auto; scrollbar-width: none; } } /* a short window scrolls the rail instead of losing "Add app" under the fold (the card hugs its tiles otherwise); the tiles and the divider are flex: none so the column never squashes them into the scroll */
/* a tile: .btn + .btn-icon give the pill, the 36 px box and the heading face, so the recipe restates every one of them at two classes */
.btn.mm-rtile { position: relative; display: flex; flex: none; flex-direction: column; align-items: center; gap: 6px; width: 100%; height: auto; min-height: 0; padding: 10px 4px 9px; box-sizing: border-box; border-radius: 18px; border: 1px solid transparent; background: transparent; color: var(--color-neutral-700); box-shadow: none; font: 700 11.5px/1.15 var(--font-body); letter-spacing: normal; text-align: center; cursor: pointer; transition: transform 0.15s; }
.btn.mm-rtile > span:not(.mm-tile):not(.mm-rtile-badge) { display: block; } /* the label (the bridge hides its label span in the header) */
.btn.mm-rtile.on { background: var(--color-accent-100); border-color: var(--mm-accent-ring-55); box-shadow: var(--mm-glow-soft); color: var(--color-text); }
.btn.mm-rtile:hover { transform: translateY(-2px); background: var(--glass-active); border-color: var(--mm-accent-ring); color: var(--color-text); }
.btn.mm-rtile.on:hover { background: var(--color-accent-100); border-color: var(--mm-accent-ring-55); } /* the open app keeps its active recipe (the tint, the 55 % ring, the glow) under the pointer; the hover adds its lift alone (QA-09-9) */
.mm-tile.mm-rtile-sq { display: grid; width: 40px; height: 40px; border-radius: 13px; }
.mm-tile.mm-rtile-sq.mm-grad-2 { background: var(--mm-gradient-2); color: var(--mm-on-grad); box-shadow: 0 0 18px -4px var(--neon-glow); } /* the Assistant square: the gradient and its ink restated past .mm-tile (as the launcher grid does), plus the pack's glow */
.mm-tile-info { background: var(--mm-info-bg); color: var(--mm-info-fg); }
.mm-tile.mm-rtile-sq.mm-tile-gold { background: var(--mm-gold-bg-tile); } /* the Drive square: the pack's 0.16 tint (the shared --mm-gold-bg keeps the External chip's 0.14) */
.mm-tile-glass { background: var(--glass); color: var(--color-neutral-700); }
.mm-rtile-badge { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 999px; display: grid; place-items: center; font: 800 10.5px/1.15 var(--font-body); color: var(--mm-badge-ink); background: var(--color-accent); box-shadow: 0 0 10px var(--neon-glow); }
.mm-rtile-div { display: block; flex: none; align-self: stretch; height: 1px; margin: 4px 10px; background: var(--color-divider); }
.btn.mm-rtile.mm-rtile-add { position: static; line-height: normal; color: var(--color-neutral-600); border-style: dashed; border-color: var(--glass-border); transition: all 0s; }
.btn.mm-rtile.mm-rtile-add:hover { transform: none; border-color: var(--glass-border); color: var(--color-text); }

/* ---- rd9 2c: the sign-in card at its password step (pack 2 screen 2c) ---- */
:root {
  --mm-card-glass: color-mix(in srgb, var(--glass-strong) 82%, transparent);      /* the sign-in card's fill over a scene that contrasts with the theme */
  --mm-card-border: var(--glass-border);                                           /* its edge */
  --mm-card-sheen: rgba(255, 255, 255, 0.45);                                       /* its inset top highlight */
  --mm-field-fill: color-mix(in srgb, var(--color-bg) 78%, transparent);           /* the ringed field's fill */
  --mm-accent-ring-55: color-mix(in srgb, var(--color-accent) 55%, transparent);   /* the hovered alternative's edge (accent) */
  --mm-accent-2-ring-55: color-mix(in srgb, var(--color-accent-2) 55%, transparent); /* the hovered passkey pill's edge (accent-2) */
  --mm-accent-2-ring-40: color-mix(in srgb, var(--color-accent-2) 40%, transparent); /* the STRONG badge's edge */
  --mm-danger-border: oklch(0.58 0.22 27 / 0.45);                                  /* the WEAK badge's edge (the state hue, fixed) */
}
html[data-theme="dark"] {
  --mm-card-glass: oklch(0.16 calc(0.02 * var(--chroma-ground)) var(--hue-ground) / 0.78);   /* the pack's oklch(0.16 0.025 290 / 0.78) on the palette's ground */
  --mm-card-border: rgba(255, 255, 255, 0.16);
  --mm-card-sheen: rgba(255, 255, 255, 0.22);
  --mm-field-fill: oklch(0.14 calc(0.02 * var(--chroma-ground)) var(--hue-ground) / 0.92);   /* the pack's oklch(0.14 0.02 290 / 0.92) */
  --mm-danger-border: oklch(0.7 0.18 25 / 0.45);
}
/* the alternatives under Continue: a two-column grid of glass pills, each with a 28 px icon tile - the page's Forgot password? pill (T-97, the owner's ask: it stands where the linked-account pill stood) after the bridge's passkey pill, when the browser supports one */
.mm-alt { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mm-alt-btn { min-height: 46px; padding: 0 14px; gap: 9px; border-radius: 999px; font-size: 13.5px; line-height: normal; justify-content: center; text-align: center; white-space: normal; min-width: 0; box-sizing: border-box; }
.mm-alt-btn > .mm-lbl { min-width: 0; }
.mm-alt > :only-child { grid-column: 1 / -1; }   /* a browser without passkeys leaves the Forgot password? pill alone under "or": it spans the row (T-97) - the row is never empty, the divider never stands over nothing */
.mm-alt-btn.mm-alt-1:hover { border-color: var(--mm-accent-ring-55); box-shadow: 0 0 24px -10px var(--neon-glow); }
.mm-alt-btn.mm-alt-2:hover { border-color: var(--mm-accent-2-ring-55); box-shadow: 0 0 24px -10px var(--neon-glow-2); }
.mm-tile-xs { width: 28px; height: 28px; border-radius: 9px; }

/* ---- rd9 2d: Advanced search (redesign pack 2, screen 2d). The panel is an opaque deep ground under the pack's 65 % gradient border with
   its 90 px halo; the header is the gradient sliders tile, the Caprasimo title with its one-line note, the operator chips (one per operator
   the form stands for, each with a Remove) and a glass Close; the fields sit in two inset groups of 52 px rows (a 30 px glass tile with the
   accent glyph beside a 700 label, a 40 px glass pill input / select with an accent chevron, the date pill with its Pick a date button);
   the action row carries the three toggle chips (Has attachment · Unread only · Starred), Reset, Create filter and the glowing Search.
   Every colour is a token: the pack's oklch(0.14 0.02 290) fill, oklch(0.12 0.018 290 / 0.7) inset and oklch(0.15 0.03 290) tick ink
   are the three --mm-*-deep / tick tokens below (dE 0.4 on Pulse dark), the light theme keeps the app's light panel and inset. ---- */
:root {
  --mm-panel-deep: oklch(0.985 calc(0.006 * var(--chroma-ground)) var(--hue-ground));   /* the 2d panel's opaque fill (light: the same as --mm-panel) */
  --mm-inset-deep: oklch(0.94 calc(0.012 * var(--chroma-ground)) var(--hue-ground) / 0.55); /* the field groups sunk into the panel (light: a shade under the near-white fill, so the two groups read) */
  --mm-tick-ink: #fff;                                                                    /* the tick on a checked toggle chip's accent box */
  --mm-gradient-border-mid: linear-gradient(120deg, color-mix(in srgb, var(--color-accent) 65%, transparent), color-mix(in srgb, var(--color-accent-2) 65%, transparent)); /* the pack's 65 % gradient border (between -soft at 70 % and the full one) */
  --mm-glow-panel-lg: 0 0 90px -30px var(--neon-glow);                                   /* the 2d panel's halo (the dialogs' --mm-glow-panel is 80 px) */
  --mm-chip-x-hover: color-mix(in srgb, currentColor 18%, transparent);                   /* the Remove disc inside an operator chip */
}
html[data-theme="dark"] {
  --mm-panel-deep: oklch(0.14 calc(0.014 * var(--chroma-ground)) var(--hue-ground));
  --mm-inset-deep: oklch(0.12 calc(0.013 * var(--chroma-ground)) var(--hue-ground) / 0.7);
  --mm-tick-ink: oklch(0.15 calc(0.021 * var(--chroma-ground)) var(--hue-ground));
}
.mm-as-panel { display: flex; flex-direction: column; gap: 4px; border-radius: 28px; border: 1.5px solid transparent; background: linear-gradient(var(--mm-panel-deep), var(--mm-panel-deep)) padding-box, var(--mm-gradient-border-mid) border-box; box-shadow: var(--shadow-lg), var(--mm-glow-panel-lg); color: var(--color-text); }
/* the header */
.mm-as-h { display: flex; align-items: center; gap: 12px; padding: 2px 6px 12px; }
.mm-as-tile { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none; color: var(--mm-on-grad); background: var(--mm-gradient); box-shadow: 0 0 22px -6px var(--neon-glow); }
.mm-as-title { margin: 0; font-size: 20px; line-height: 1.1; }
.mm-as-sub { font-size: 12.5px; color: var(--color-neutral-600); margin-top: 2px; }
.mm-as-acts { display: flex; gap: 6px; flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; } /* one chip beside the Close as the pack's; a query with many operators wraps them into rows before the title (min-width 240) gives way */
.mm-as-tw { flex: 1 1 0; min-width: 240px; }
.mm-opchip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; } /* the bound label (a long subject:"...") */
.mm-opchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--color-accent-800); background: var(--color-accent-100); border: 1px solid var(--mm-accent-ring); white-space: nowrap; }
.mm-opchip-x { width: 16px; height: 16px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; display: grid; place-items: center; }
.mm-opchip-x:hover { background: var(--mm-chip-x-hover); }
.btn.btn-icon.mm-as-close { width: 34px; height: 34px; color: var(--color-neutral-700); border: 1px solid var(--glass-border); background: var(--glass); }
.btn.btn-icon.mm-as-close:hover { background: var(--glass-active); color: var(--color-text); }
/* the two inset groups and their rows */
.mm-as-g { display: grid; gap: 2px; padding: 6px; border-radius: 20px; background: var(--mm-inset-deep); border: 1px solid var(--glass-border); }
.mm-as-r { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 14px; padding: 6px 6px 6px 8px; border-radius: 16px; }
.mm-as-r:hover { background: var(--glass-hover); }
.mm-as-l { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 700; color: var(--color-neutral-700); }
.mm-as-t { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--glass); border: 1px solid var(--glass-border); color: var(--color-accent); }
.input.mm-as-i { min-height: 40px; font-size: 14px; background: var(--glass); border-color: var(--glass-border); }
.input.mm-as-s { appearance: none; -webkit-appearance: none; min-height: 40px; padding-right: 36px; font-size: 14px; font-weight: 600; cursor: pointer; background: var(--glass); border-color: var(--glass-border); }
#adv-search select.input option { color: var(--color-text); background: var(--mm-panel-deep); } /* the native list: the panel's own ink and ground, whatever the OS paints */
.mm-as-row { display: flex; gap: 8px; min-width: 0; }
.mm-as-sel { position: relative; display: inline-flex; align-items: center; min-width: 0; }
.mm-as-sel-op { width: 170px; }
.mm-as-sel-unit { width: 96px; }
.mm-as-sel-in { flex: 1; }
.mm-as-chev { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; display: inline-flex; color: var(--color-accent); }
.mm-as-dw { position: relative; flex: 1; display: flex; min-width: 0; }
.btn.btn-icon.mm-as-pick { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; color: var(--color-accent); }
.btn.btn-icon.mm-as-pick:hover { background: var(--color-accent-100); }
.mm-as-native { position: absolute; right: 4px; top: 50%; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; } /* the real date input behind the pill: Pick a date opens its picker, its value fills the pill */
/* the action row: toggle chips, Reset, Create filter, Search (Figtree 700 / 800 as the pack's; the base .btn is Caprasimo) */
.mm-as-a { display: flex; align-items: center; gap: 10px; padding: 12px 8px 2px; flex-wrap: wrap; }
.mm-tog { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; border-radius: 999px; font-family: var(--font-body); font-size: 13.5px; font-weight: 700; color: var(--color-text); cursor: pointer; background: var(--glass); border: 1px solid var(--glass-border); }
.mm-tog:hover { background: var(--glass-active); }
.mm-tog[aria-checked="true"] { color: var(--color-accent-800); background: var(--color-accent-100); border-color: var(--mm-accent-ring); }
.mm-tog[aria-checked="true"]:hover { background: var(--color-accent-100); box-shadow: 0 0 20px -8px var(--neon-glow); }
.mm-tog-box { display: block; width: 20px; height: 20px; border-radius: 7px; border: 2px solid var(--color-neutral-500); box-sizing: border-box; }
.mm-tog[aria-checked="true"] > .mm-tog-box { display: grid; place-items: center; border: 0; color: var(--mm-tick-ink); background: var(--mm-accent-strong); }
.btn.btn-ghost.mm-as-reset { gap: 6px; padding: 8px 12px; font-family: var(--font-body); font-weight: 700; font-size: 13.5px; color: var(--color-neutral-700); }
.btn.btn-ghost.mm-as-reset:hover { background: var(--glass-hover); color: var(--color-text); }
.btn.btn-secondary.mm-as-cf { gap: 8px; padding: 9px 16px 9px 13px; font-family: var(--font-body); font-weight: 700; font-size: 13.5px; background: var(--glass); border-color: var(--glass-border); }
.btn.btn-secondary.mm-as-cf:hover { background: var(--glass-active); }
.btn.btn-primary.mm-as-go { gap: 8px; padding: 9px 20px 9px 15px; font-family: var(--font-body); font-weight: 800; font-size: 14px; box-shadow: 0 8px 26px -10px var(--neon-glow); }
/* the two openers agree with the open panel: the search field's options button and the chip row's gradient chip take the pack's pressed tint while it is showing */
.btn.btn-icon.mm-as-opener[aria-expanded="true"] { background: var(--color-accent-100); color: var(--color-accent-800) !important; } /* the open state beats the button's inline resting colour */
.mm-fchip.mm-gb[aria-expanded="true"] { background: linear-gradient(var(--color-accent-100), var(--color-accent-100)) padding-box, var(--mm-gradient-border) border-box; color: var(--color-accent-800); }

/* ---- rd9 2f: the attach menu (redesign pack 2, screen 2f). A 360 px opaque panel (the pack's ground with its corner glow, the neon halo,
   radius 26) holding a header (the accent paperclip, "Attach", the shortcut hint as two kbd), an inset group of three 56 px tile rows
   (From your computer / Upload a folder / From Drive: a 36 px tinted tile, the name over a sub line, a chevron), a dashed drop zone (the
   gradient upload tile, the title, the Drive-link rule with the session's real upload limit) and two chips (Inline images, a real toggle
   bound to settings.inlineImages; Scanned on upload, a status). Every glyph 16 / 14 / 12 px at stroke 2.5. Phones: the shortcut hint
   hides, the toggle chip is a 40 px target. New tokens: --mm-inset-deep (the pack's inset-group fill, 0.7 on the dark ground),
   --mm-glow-menu (the menu's corner glow at the pack's 0.5), --mm-accent-ring-55 / --mm-accent-tint-7 (the dashed zone),
   --mm-on-grad-hi (white on a decorative gradient tile, the pack's upload tile - a glyph, not text, so no contrast rule). ---- */
:root { --mm-accent-ring-55: color-mix(in srgb, var(--color-accent) 55%, transparent); --mm-accent-tint-7: color-mix(in srgb, var(--color-accent) 7%, transparent); --mm-on-grad-hi: #fff; }
/* --mm-inset-deep and --mm-glow-menu are declared on the menu itself, not at :root: screen 2d (the advanced search panel) and screen 2e (the status menu) declare the same two names at :root with their own values, so each surface keeps its own fill and corner glow */
.mm-am { --mm-inset-deep: rgba(255, 255, 255, 0.6); --mm-glow-menu: oklch(0.85 calc(0.09 * var(--sat)) var(--hue-accent) / 0.5); }
html[data-theme="dark"] .mm-am { --mm-inset-deep: oklch(0.12 calc(0.013 * var(--chroma-ground)) var(--hue-ground) / 0.7); --mm-glow-menu: oklch(0.32 calc(0.1 * var(--sat)) var(--hue-accent) / 0.5); }
.mm-am { box-sizing: border-box; width: min(360px, calc(100vw - 16px)); padding: 12px; display: flex; flex-direction: column; gap: 8px; border-radius: 26px; border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg), 0 0 70px -28px var(--neon-glow); background: radial-gradient(70% 40% at 100% 0%, var(--mm-glow-menu), transparent 60%), var(--color-bg); color: var(--color-text); font-family: var(--font-body); font-size: 15px; font-weight: 400; line-height: 1.55; animation: mm-menu 0.16s ease-out; }
.mm-am-head { display: flex; align-items: center; gap: 10px; padding: 4px 8px 2px; }
.mm-am-ico { display: inline-flex; color: var(--color-accent); }
.mm-am-title { font-weight: 700; font-size: 14.5px; }
.mm-am-kbd { margin-left: auto; font-size: 11.5px; color: var(--color-neutral-600); display: inline-flex; align-items: center; gap: 4px; }
.mm-am-kbd > kbd { font-family: inherit; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--glass-active); border: 1px solid var(--glass-border); }
.mm-am-group { display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 20px; background: var(--mm-inset-deep); border: 1px solid var(--glass-border); }
.mm-am-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 9px 10px 9px 8px; border-radius: 16px; border: 1px solid transparent; background: transparent; color: var(--color-text); font-family: var(--font-body); text-align: left; cursor: pointer; }
.mm-am-row:hover { background: var(--glass-active); border-color: var(--glass-border); }
.mm-am-tile { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--color-accent-100); color: var(--color-accent); }
.mm-am-tile-gold { background: var(--mm-gold-bg); color: var(--mm-gold-fg); }
.mm-am-tile-2 { background: var(--color-accent-2-100); color: var(--color-accent-2); }
.mm-am-tile-up { background: var(--mm-gradient); color: var(--mm-on-grad-hi); box-shadow: 0 0 18px -6px var(--neon-glow); }
.mm-am-text { min-width: 0; }
.mm-am-name { display: block; font-size: 14px; font-weight: 700; }
.mm-am-sub { display: block; font-size: 12.5px; color: var(--color-neutral-600); margin-top: 1px; text-wrap: pretty; }
.mm-am-chev { display: inline-flex; color: var(--color-neutral-600); }
.mm-am-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 14px; border-radius: 18px; border: 1.5px dashed var(--mm-accent-ring-55); background: var(--mm-accent-tint-7); text-align: center; }
.mm-am-drop[data-over="true"] { background: var(--color-accent-100); border-color: var(--mm-accent-ring-60); box-shadow: var(--mm-glow-soft); } /* a drag over the compose lights the zone (the whole window is the drop target; the zone says so) */
.mm-am-drop-title { font-size: 13.5px; font-weight: 700; }
.mm-am-rule { font-size: 12px; color: var(--color-neutral-600); text-wrap: pretty; line-height: 1.45; }
.mm-am-rule > strong { color: var(--color-text); }
.mm-am-chips { display: flex; align-items: center; gap: 8px; padding: 2px 6px; }
.mm-am-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 8px; border-radius: 999px; font-family: var(--font-body); font-size: 12px; font-weight: 400; line-height: 1.55; color: var(--color-neutral-600); background: var(--glass); border: 1px solid var(--glass-border); }
button.mm-am-chip { cursor: pointer; }
button.mm-am-chip:hover { background: var(--glass-active); color: var(--color-text); }
.mm-am-chip[aria-pressed="true"], button.mm-am-chip[aria-pressed="true"]:hover { background: var(--color-accent-100); color: var(--color-accent-800); border-color: var(--mm-accent-ring); }
@media (max-width: 759px) {
  .mm-am-kbd { display: none; }
  [data-screen-label="Compose"] .mm-am-chips > button.mm-am-chip { min-height: 40px; } /* the compose's touch rule (28 px text buttons) is outranked: the toggle chip is a 40 px target */
}
/* the chrome next to the menu: the compose window carries the pack's panel halo on desktop (the phone sheet has no edge to glow) */
@media (min-width: 760px) { .dialog[data-screen-label="Compose"] { box-shadow: var(--shadow-lg), var(--mm-glow-panel); } }

/* ---- rd9 2g: the compose toolbar (redesign pack 2, screen 2g). The send row is its own framed glass bar (the pack's side glows over the
   deep ground, radius 24, the neon halo); the split Send glows (52 px, Figtree 800) with the schedule chevron; the "Undo · Ns" chip counts
   the latest send's undo window down beside it (the same chip sits in the toast); a 1 x 36 rule; the tools are 62 px tiles with a 30 px
   tinted icon square and a 700 caption (Assistant on the gradient, Format / Attach accent, Write violet, Link info blue, Emoji gold,
   Drive accent-2, Photo green, Confidential red, Signature / Spelling / More glass), the open or pressed tool on the README active recipe,
   Attach carrying a count badge; the autosave status is a glass pill with a glowing dot (green saved, gold saving, red not saved); Discard
   is a 40 px glass disc that turns red on hover. The pack's tile literals map to the tokens below (dE < 1 on Pulse dark); the light theme
   deepens every icon hue so it clears 3:1 on its tint. Phones keep the flat pinned bar with 40 px round tools. ---- */
:root {
  --mm-info-fg: oklch(0.45 0.12 220); --mm-info-bg: oklch(0.75 0.12 220 / 0.2);   /* the README info blue (the Link tile); the light pair clears 4.5:1 on the light ground */
  --mm-violet-fg: oklch(0.45 0.16 300); --mm-violet-bg: oklch(0.6 0.2 300 / 0.16); /* the README violet (the Write tile) */
  --mm-gold-bg-tile: var(--mm-gold-bg);                                              /* the Emoji tile's tint (the pack's 0.16 on dark; --mm-gold-bg is the pack-1 chip's 0.14) */
  --mm-ok-fg-tile: var(--mm-ok-fg); --mm-ok-bg-tile: oklch(0.7 0.15 150 / 0.18);   /* the Photo tile (the pack's green at 0.18) */
  --mm-danger-bg-tile: var(--mm-danger-bg);                                          /* the Confidential tile (the pack's red at 0.18) */
  --mm-danger-ring: color-mix(in srgb, var(--mm-danger) 50%, transparent);           /* the hovered Discard's edge */
  --mm-badge-ink: oklch(0.15 0.03 var(--hue-ground));                                /* the pack's count-badge ink on the flat accent, unscaled (the accent is L 0.62 light / 0.78 dark: >= 5:1 on both) */
}
html[data-theme="dark"] {
  --mm-info-fg: oklch(0.88 0.08 220); --mm-info-bg: oklch(0.75 0.12 220 / 0.2);
  --mm-violet-fg: oklch(0.85 0.12 300); --mm-violet-bg: oklch(0.6 0.2 300 / 0.24);
  --mm-gold-bg-tile: oklch(0.82 0.16 80 / 0.16);
  --mm-ok-fg-tile: oklch(0.85 0.12 150); --mm-ok-bg-tile: oklch(0.7 0.15 150 / 0.18);
  --mm-danger-bg-tile: oklch(0.7 0.18 25 / 0.18);
}
/* the bar */
.mm-tools { display: flex; align-items: center; gap: 10px; flex: none; margin-top: 8px; padding: 8px 10px; border-radius: 24px; border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg), 0 0 70px -28px var(--neon-glow); background: radial-gradient(30% 200% at 0% 50%, var(--mm-glow-a), transparent 70%), radial-gradient(30% 200% at 100% 50%, var(--mm-glow-b), transparent 70%), var(--mm-ground-deep); box-sizing: border-box; }
.mm-tools-div { display: block; flex: none; width: 1px; height: 36px; margin: 0 2px; background: var(--color-divider); }
.mm-tools-grp { position: relative; display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; } /* the tool popovers anchor on the group (data-mm-pophost), so it never clips: the plan folds what does not fit into More instead */
.mm-tools-grp > div[data-mm-tool] { display: contents; } /* a tool with a popover sits in a wrapper for the template; the wrapper draws no box, so every tool is a flex item of the group and shrinks exactly as the pack's bare buttons do (a wrapper box shares the deficit differently) */
/* the split Send: the halo and the 40 % accent ring on the pair, Figtree 800 on the button, the chevron 46 wide */
.mm-split { position: relative; display: flex; align-items: stretch; flex: none; border-radius: 999px; box-shadow: 0 10px 30px -10px var(--neon-glow), 0 0 0 1px var(--mm-accent-ring-40); }
.btn.mm-send-btn { height: 52px; padding: 0 20px 0 18px; gap: 10px; border-radius: 999px 0 0 999px; font-family: var(--font-body); font-weight: 800; font-size: 16px; }
.btn.btn-icon.mm-send-chev { width: 46px; height: 52px; border-radius: 0 999px 999px 0; border-left: 1px solid color-mix(in srgb, var(--color-bg) 35%, transparent); }
.btn.btn-secondary.mm-send-btn { border-right: 0; } .btn.btn-secondary.mm-send-chev { border-left-color: var(--glass-border); } /* Send & Archive shown: the split goes secondary */
.btn.btn-primary.mm-send-arch { height: 52px; padding: 0 16px 0 20px; gap: 10px; margin-right: 0; border-radius: 999px; font-family: var(--font-body); font-weight: 800; font-size: 16px; flex: none; }
/* the undo chip: accent-100 on the 40 % ring, Figtree 11.5 / 700, a 12 px clock; a real button (the toolbar's counts the latest send down, the toast's the same) */
.mm-undo-chip { display: inline-flex; align-items: center; gap: 6px; flex: none; margin: 0; padding: 5px 10px 5px 8px; border-radius: 999px; font-family: var(--font-body); font-size: 11.5px; font-weight: 700; line-height: 1.55; color: var(--color-accent-800); background: var(--color-accent-100); border: 1px solid var(--mm-accent-ring-40); white-space: nowrap; cursor: pointer; box-sizing: border-box; }
.mm-undo-chip:hover { border-color: var(--mm-accent-ring); box-shadow: 0 0 24px -8px var(--neon-glow); }
.mm-undo-chip:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
/* the tools: a 62 px column tile, the caption as the button's own text */
.btn.btn-icon.mm-tool { position: relative; display: flex; flex: 0 1 auto; flex-direction: column; align-items: center; justify-content: normal; gap: 5px; min-width: 62px; width: auto; height: auto; min-height: 0; padding: 7px 8px 6px; border-radius: 16px; border: 1px solid transparent; background: transparent; box-shadow: none; font-family: var(--font-body); font-size: 11.5px; font-weight: 700; line-height: normal; letter-spacing: normal; color: var(--color-neutral-700); cursor: pointer; }
.btn.btn-icon.mm-tool .cap { font: inherit; line-height: normal; letter-spacing: inherit; color: inherit; white-space: nowrap; }
.btn.btn-icon.mm-tool:hover { background: var(--glass-active); border-color: var(--glass-border); color: var(--color-text); }
.btn.btn-icon.mm-tool[aria-pressed="true"], .btn.btn-icon.mm-tool[aria-expanded="true"], .btn.btn-icon.mm-tool.on { background: var(--color-accent-100); border-color: var(--mm-accent-ring); color: var(--color-text); } /* the README active recipe: the formatting bar open, confidential mode on, a tool whose popover is showing */
.btn.btn-icon.mm-tool[aria-pressed="true"]:hover, .btn.btn-icon.mm-tool[aria-expanded="true"]:hover, .btn.btn-icon.mm-tool.on:hover { background: var(--glass-active); border-color: var(--glass-border); }
.btn.btn-icon.mm-tool[aria-busy="true"] > .mm-ttile { color: var(--color-accent-700); animation: mm-pulse-tile 1s ease-in-out infinite; } /* Spelling at work */
@keyframes mm-pulse-tile { 50% { opacity: 0.55; } }
.mm-ttile { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 10px; box-sizing: border-box; }
.mm-ttile > svg { display: block; flex: none; }
.mm-ttile-grad { background: var(--mm-gradient); color: var(--mm-on-grad); box-shadow: 0 0 16px -4px var(--neon-glow); }
.mm-ttile-accent { background: var(--color-accent-100); color: var(--color-accent); }
.mm-ttile-violet { background: var(--mm-violet-bg); color: var(--mm-violet-fg); }
.mm-ttile-info { background: var(--mm-info-bg); color: var(--mm-info-fg); }
.mm-ttile-gold { background: var(--mm-gold-bg-tile); color: var(--mm-gold-fg); }
.mm-ttile-2 { background: var(--color-accent-2-100); color: var(--color-accent-2); }
.mm-ttile-ok { background: var(--mm-ok-bg-tile); color: var(--mm-ok-fg-tile); }
.mm-ttile-danger { background: var(--mm-danger-bg-tile); color: var(--mm-danger-fg); }
.mm-ttile-glass { background: var(--glass); color: var(--color-neutral-800); }
.mm-tool-badge { position: absolute; top: 4px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 999px; display: grid; place-items: center; font-family: var(--font-body); font-size: 10px; font-weight: 800; line-height: normal; letter-spacing: normal; color: var(--mm-badge-ink); background: var(--color-accent); box-shadow: 0 0 10px var(--neon-glow); } /* the Attach count */
.mm-tool-new { position: absolute; top: 6px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--color-accent-2); box-shadow: 0 0 8px var(--neon-glow-2); } /* the Layouts "new" dot */
/* the autosave status pill (the send row's, and the title row's when the row has no room for it) and its dot */
.mm-save-pill { display: inline-flex; align-items: center; gap: 6px; flex: none; margin: 0; padding: 5px 10px 5px 8px; border-radius: 999px; font-family: var(--font-body); font-size: 11.5px; font-weight: 400; line-height: 1.55; letter-spacing: normal; color: var(--color-neutral-600); background: var(--glass); border: 1px solid var(--glass-border); white-space: nowrap; box-sizing: border-box; }
.mm-save-dot { display: block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--mm-ok); box-shadow: 0 0 8px var(--mm-ok); }
/* Discard: a 40 px glass disc, red on hover */
.btn.btn-icon.mm-discard { width: 40px; height: 40px; flex: none; color: var(--color-neutral-700); background: var(--glass); border: 1px solid var(--glass-border); }
.btn.btn-icon.mm-discard:hover { background: var(--mm-danger-bg); border-color: var(--mm-danger-ring); color: var(--mm-danger-fg); }
/* the title row's three buttons share one glass pill; the recipients and the subject sit in one inset group */
.mm-cfields { display: flex; flex-direction: column; min-width: 0; margin: 0 0 4px; padding: 0 10px; border-radius: 14px; background: var(--mm-inset); border: 1px solid var(--glass-border); }
.mm-cfields > input[aria-label="Subject"] { border-bottom-color: transparent !important; }
.mm-cfields.mm-cfields-flat { margin: 0; padding: 0; border: 0; background: transparent; border-radius: 0; } .mm-cfields.mm-cfields-flat > input[aria-label="Subject"] { border-bottom-color: var(--color-divider) !important; } /* the inline card and the phone sheet keep the flat rows */
/* the captions folded (the inline reply card when narrow): 36 px tiles */
.mm-tools-fold .btn.btn-icon.mm-tool .cap { display: none; } .mm-tools-fold .btn.btn-icon.mm-tool { min-width: 36px; width: 36px; height: 36px; min-height: 36px; padding: 2px; gap: 0; border-radius: 12px; }
/* the plan's last move (mm-tools-wrap): the row wraps rather than paint over its own parts, as the classic's inline reply does.
   The tools take a line of their own above Send (order -1 on a full-width basis: the group's flex: 1 would otherwise shrink it to
   nothing under its 36 px tools), holding as many as that line fits with the rest in More; Send, the status pill and Discard share
   the next line, the pill and Discard keeping the right edge they have on one line. mm-tools-wrap-pill (the pill in the row): the
   pill's auto margin pushes the pair right, and its 50 px of right margin with Discard's -50 - the 40 px disc plus the row's 10 px
   gap - make the pair one unit for the line break while Discard still draws 10 px after the pill, so when even those three do not
   fit beside Send (the pane's 340 px minimum leaves the card's bar 190) the pair takes a line together, still flush right, never
   Discard alone at the left. With no pill in the row (a phone, or the status in the title row) Discard's own auto margin keeps
   the right edge. The rule between Send and the tools has no line to sit on and leaves the layout (display none), but not the
   one-line row the plan measures: toolbarRef reads its 1 px and 2 x 2 px margins from its computed style, and reads none of
   Discard's (its -50 px glue, and its auto margin - which a laid-out flex item's computed style resolves to the free length of
   the line), so fixed and fixedN are the same wrapped or not and the plan cannot flip between the two states, nor stick in one.
   No tool or control is hidden. */
.mm-tools-wrap { flex-wrap: wrap; }
.mm-tools-wrap > .mm-tools-grp { order: -1; flex-basis: 100%; }
.mm-tools-wrap > .mm-tools-div { display: none; }
.mm-tools-wrap > .mm-discard { margin-left: auto; }
.mm-tools-wrap-pill > .mm-save-pill { margin-left: auto; margin-right: 50px; }
.mm-tools-wrap-pill > .mm-discard { margin-left: -50px; }
@media (max-width: 759px) {
  [data-screen-label="Compose"] > .mm-tools { border-radius: 0; border: 0; box-shadow: none; gap: 6px; }
  .btn.btn-icon.mm-tool, .mm-tools-fold .btn.btn-icon.mm-tool { min-width: 40px; width: 40px; height: 40px; min-height: 40px; padding: 0; gap: 0; border-radius: 999px; } .btn.btn-icon.mm-tool .cap { display: none; }
  .btn.mm-send-btn, .btn.btn-primary.mm-send-arch { height: 40px; padding: 0 16px 0 14px; font-size: 15px; } .btn.btn-icon.mm-send-chev { height: 40px; }
}

/* ---- rd9x 2h: the quick settings rail (pack 2, screen 2h). The panel is the scene-panel card (var(--color-bg) under the two corner glows,
   shadow-lg + the 70 px halo), the sections are glass-tile heads over inset tracks; every colour is a token so the ten palettes and the
   light theme follow. The rail's frame itself (width, ground, shadow, blur, height) is bound inline on the shared panel div (railInnerW,
   railBg, railShadow, railBlur, railH). ---- */
.mm-qs-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px 12px 18px; border-bottom: 1px solid var(--color-divider); flex: none; }
.mm-qs-head > .mm-qs-hdtile { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--mm-gradient); color: var(--mm-white-ink); box-shadow: 0 0 18px -6px var(--neon-glow); } /* the pack's white glyph on the gradient (the tile is decoration beside the h3, so 1.4.11 does not apply to it) */
.mm-qs-head > h3 { margin: 0; font-size: 20px; flex: 1; min-width: 0; }
.btn.btn-icon.mm-qs-close { width: 34px; height: 34px; border-radius: 999px; color: var(--color-neutral-700); border: 1px solid var(--glass-border); background: var(--glass); flex: none; }
.btn.btn-icon.mm-qs-close:hover { background: var(--glass-active); color: var(--color-text); }
/* See all settings: the gradient-bordered card over the panel's own ground */
.mm-qs-see { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px 10px 10px; border-radius: 16px; cursor: pointer; text-align: left; font-family: var(--font-body); color: var(--color-text); border: 1.5px solid transparent; background: linear-gradient(var(--color-bg), var(--color-bg)) padding-box, var(--mm-gradient-border) border-box; box-sizing: border-box; transition: box-shadow 0.14s ease; }
.mm-qs-see:hover { box-shadow: 0 0 24px -8px var(--neon-glow); }
.mm-qs-see > .mm-qs-tile30 { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--color-accent-100); color: var(--color-accent); }
.mm-qs-see > .mm-qs-txt { flex: 1; }
.mm-qs-see > .mm-qs-chev { display: inline-flex; color: var(--color-neutral-600); }
.mm-qs-t1 { display: block; font-size: 13.5px; font-weight: 700; }
.mm-qs-t2 { display: block; font-size: 12px; color: var(--color-neutral-600); }
/* a section: the 26 px glass tile + the kicker, then its control */
.mm-qs-sec { display: flex; flex-direction: column; gap: 8px; }
.mm-qs-sh { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.mm-qs-sh > .mm-qs-tile26 { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--glass); border: 1px solid var(--glass-border); color: var(--color-accent); }
.mm-qs-kick { font-size: 11.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-neutral-700); }
/* the pill segments (Density, Theme): equal options on an inset track; the checked one is filled with the accent and glows */
.mm-qs-seg { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--mm-track); border: 1px solid var(--glass-border); }
.mm-qs-opt { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 0; cursor: pointer; font-family: var(--font-body); font-size: 13.5px; font-weight: 700; white-space: nowrap; color: var(--color-neutral-700); background: transparent; transition: background-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease; }
.mm-qs-opt:hover { background: var(--glass-active); color: var(--color-text); }
.mm-qs-opt[aria-checked="true"], .mm-qs-opt[aria-checked="true"]:hover { color: var(--mm-on-accent); background: var(--mm-accent-strong); box-shadow: 0 0 18px -4px var(--neon-glow); }
.mm-qs-opt > .mm-qs-ico { display: inline-flex; }
/* the ten swatches: a 5-column grid of tiles, each a 30 px disc with the palette's two accents, the name, and a check disc on the current one */
.mm-qs-pal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 8px 6px 2px; }
.mm-qs-sw { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 7px 4px 6px; border-radius: 14px; cursor: pointer; font-family: var(--font-body); font-size: 10.5px; font-weight: 700; color: var(--color-neutral-600); background: transparent; border: 1px solid transparent; min-width: 0; transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease; }
.mm-qs-sw:hover { background: var(--glass-active); border-color: var(--glass-border); color: var(--color-text); }
.mm-qs-sw[aria-pressed="true"] { color: var(--color-text); background: var(--color-accent-100); border-color: var(--mm-accent-ring-55); box-shadow: 0 0 22px -8px var(--neon-glow); }
.mm-qs-sw[aria-pressed="true"]:hover { background: var(--glass-active); border-color: var(--glass-border); }
.mm-qs-sw > .mm-qs-disc { position: relative; display: block; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--glass-border); box-sizing: border-box; }
.mm-qs-disc > span { position: absolute; top: 8px; width: 12px; height: 12px; border-radius: 50%; display: block; }
.mm-qs-disc > span:first-child { left: 5px; }
.mm-qs-disc > span + span { right: 5px; }
.mm-qs-sw > .mm-qs-check { position: absolute; top: 4px; right: 4px; width: 14px; height: 14px; border-radius: 50%; display: none; place-items: center; background: var(--mm-accent-strong); color: var(--mm-on-accent); }
.mm-qs-sw[aria-pressed="true"] > .mm-qs-check { display: grid; }
/* Inbox type: five radio rows on an inset track (ring, glass tile, title and description) */
.mm-qs-list { display: flex; flex-direction: column; gap: 2px; padding: 4px; border-radius: 18px; background: var(--mm-track); border: 1px solid var(--glass-border); }
.mm-qs-row { display: grid; grid-template-columns: 22px 32px minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; padding: 8px 10px; border-radius: 14px; cursor: pointer; text-align: left; font-family: var(--font-body); color: var(--color-text); background: transparent; border: 1px solid transparent; box-sizing: border-box; transition: background-color 0.14s ease, border-color 0.14s ease; }
.mm-qs-row:hover { background: var(--glass-active); border-color: var(--glass-border); }
.mm-qs-row[aria-checked="true"] { background: var(--color-accent-100); border-color: var(--mm-accent-ring); }
.mm-qs-row[aria-checked="true"]:hover { background: var(--glass-active); border-color: var(--glass-border); }
.mm-qs-row > .mm-qs-radio { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--color-neutral-500); box-sizing: border-box; }
.mm-qs-radio > span { width: 10px; height: 10px; border-radius: 50%; background: var(--color-accent); display: none; }
.mm-qs-row[aria-checked="true"] > .mm-qs-radio { border-color: var(--color-accent); box-shadow: 0 0 12px -2px var(--neon-glow); }
.mm-qs-row[aria-checked="true"] > .mm-qs-radio > span { display: block; }
.mm-qs-row > .mm-qs-tile32 { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--glass); color: var(--color-neutral-700); }
.mm-qs-row[aria-checked="true"] > .mm-qs-tile32 { color: var(--color-accent); }
.mm-qs-row > .mm-qs-txt { min-width: 0; }
/* Reading pane: three tiles with a 44 x 30 mini layout over the name */
.mm-qs-panes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.mm-qs-pane { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 10px 6px 9px; border-radius: 16px; cursor: pointer; font-family: var(--font-body); font-size: 11.5px; font-weight: 700; text-align: center; color: var(--color-neutral-600); background: var(--mm-track); border: 1px solid var(--glass-border); min-width: 0; transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease; }
.mm-qs-pane:hover { background: var(--glass-active); border-color: var(--glass-border); color: var(--color-text); }
.mm-qs-pane[aria-checked="true"] { color: var(--color-text); background: var(--color-accent-100); border-color: var(--mm-accent-ring-55); box-shadow: 0 0 22px -8px var(--neon-glow); }
.mm-qs-pane[aria-checked="true"]:hover { background: var(--glass-active); border-color: var(--glass-border); }
.mm-qs-pane > .mm-qs-mini { display: grid; grid-template-columns: 1fr; grid-template-rows: 1fr; gap: 3px; width: 44px; height: 30px; }
.mm-qs-pane[data-v="right"] > .mm-qs-mini { grid-template-columns: 1fr 1.4fr; }
.mm-qs-pane[data-v="below"] > .mm-qs-mini { grid-template-rows: 1fr 1.2fr; }
.mm-qs-mini > span { display: block; border-radius: 4px; background: var(--color-neutral-500); }
.mm-qs-mini > span + span { background: var(--glass-active); }
.mm-qs-pane[data-v="none"] > .mm-qs-mini > span + span { display: none; }
.mm-qs-pane[aria-checked="true"] > .mm-qs-mini > span { background: var(--color-accent); }
.mm-qs-pane[aria-checked="true"] > .mm-qs-mini > span + span { background: var(--mm-accent-ring); }
/* Email threading: an inset row with the title, the description and a 48 x 28 switch (the knob is the pack's white on the accent with the accent check) */
.mm-qs-trow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--mm-track); border: 1px solid var(--glass-border); }
.mm-qs-trow > .mm-qs-txt { flex: 1; min-width: 0; }
.mm-qs-switch { width: 48px; height: 28px; border-radius: 999px; border: 0; cursor: pointer; position: relative; background: var(--glass-active); flex: none; transition: background-color 0.14s ease, box-shadow 0.14s ease; }
.mm-qs-switch[aria-checked="true"] { background: var(--mm-accent-strong); box-shadow: 0 0 16px -4px var(--neon-glow); }
.mm-qs-switch > .mm-qs-knob { position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--color-neutral-600); display: grid; place-items: center; color: var(--color-accent); }
.mm-qs-switch[aria-checked="true"] > .mm-qs-knob { left: auto; right: 3px; background: var(--mm-white-ink); }
.mm-qs-switch:not([aria-checked="true"]) > .mm-qs-knob > svg { display: none; }
.mm-qs-switch:focus-visible, .mm-qs-see:focus-visible, .btn.btn-icon.mm-qs-close:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
/* phones: the pack designs the desktop card; the controls keep 40 px targets (the close button, the segment options; the switch grows to a 56 x 40 button whose 48 x 28 track is drawn by a pseudo-element) */
@media (max-width: 759px) {
  .btn.btn-icon.mm-qs-close { width: 40px; height: 40px; }
  .mm-qs-opt { min-height: 40px; }
  .mm-qs-switch, .mm-qs-switch[aria-checked="true"] { width: 56px; height: 40px; background: transparent; box-shadow: none; }
  .mm-qs-switch::before { content: ''; position: absolute; inset: 6px 4px; border-radius: 999px; background: var(--glass-active); }
  .mm-qs-switch[aria-checked="true"]::before { background: var(--mm-accent-strong); box-shadow: 0 0 16px -4px var(--neon-glow); }
  .mm-qs-switch > .mm-qs-knob { left: 7px; top: 9px; }
  .mm-qs-switch[aria-checked="true"] > .mm-qs-knob { left: auto; right: 7px; }
}

/* ---- rd9 2i (the Drive navigation): the rail card's corner glows at the pack's chroma, the brand mark, the row tiles' hues, the 50 % ring ---- */
:root {
  --mm-glow-corner-a: oklch(0.85 0.09 var(--hue-accent) / 0.5);   /* the pack's rail glows (90% 30% at the corners) keep a fixed chroma 0.1 in every palette */
  --mm-glow-corner-b: oklch(0.87 0.08 var(--hue-accent-2) / 0.45);
  --mm-mark-gold: oklch(0.62 0.15 70);                             /* the gold start of the Drive mark's gradient (gold → accent) */
  --mm-on-mark: #fff;                                              /* the folder glyph on the mark: decorative (aria-hidden beside the title), so it keeps the pack's white in both themes */
  --mm-info: oklch(0.45 0.12 230); --mm-tile-info-bg: oklch(0.7 0.12 220 / 0.18);      /* README info blue (Workspaces) */
  --mm-violet: oklch(0.45 0.18 300); --mm-tile-violet-bg: oklch(0.6 0.2 300 / 0.16);   /* README violet (Shared with me) */
  --mm-tile-gold-bg: oklch(0.82 0.16 80 / 0.22);                   /* My Drive's tile (the gold ink is --mm-gold-fg) */
  --mm-star-fg: oklch(0.55 0.15 80); --mm-tile-star-bg: oklch(0.8 0.16 85 / 0.22);     /* Starred */
  --mm-tile-danger-bg: oklch(0.62 0.21 25 / 0.14);                 /* Trash (the ink is --mm-danger-fg) */
  --mm-accent-ring-50: color-mix(in srgb, var(--color-accent) 50%, transparent);       /* the active row's border */
  --mm-inset-group: rgba(255, 255, 255, 0.55);                     /* the README's inset group (the storage card) */
  --mm-ink: #fff;                                                  /* the pack's ink on a filled tile / count (oklch(0.15 0.03 290) in dark, a fixed chroma: --mm-on-accent scales with the ground's) */
}
html[data-theme="dark"] {
  --mm-glow-corner-a: oklch(0.32 0.1 var(--hue-accent) / 0.5);
  --mm-glow-corner-b: oklch(0.38 0.1 var(--hue-accent-2) / 0.45);
  --mm-mark-gold: oklch(0.78 0.16 80);
  --mm-info: oklch(0.88 0.08 220); --mm-tile-info-bg: oklch(0.75 0.12 220 / 0.2);
  --mm-violet: oklch(0.85 0.12 300); --mm-tile-violet-bg: oklch(0.6 0.2 300 / 0.22);
  --mm-tile-gold-bg: oklch(0.82 0.16 80 / 0.16);
  --mm-star-fg: oklch(0.86 0.16 85); --mm-tile-star-bg: oklch(0.82 0.16 85 / 0.16);
  --mm-tile-danger-bg: oklch(0.7 0.18 25 / 0.16);
  --mm-inset-group: oklch(0.12 0.018 var(--hue-ground) / 0.7);
  --mm-ink: oklch(0.15 0.03 var(--hue-ground));
}

/* ---- rd10 2j: the account card (redesign pack 2, screen 2j). The avatar's card is an opaque 400 px panel (the pack's ground under two
   glows, accent at the top and accent-2 in the lower right corner, radius 28, padding 12 / 10, the neon halo) holding a header (the
   Managed-by glass pill with its briefcase, the presence badge with a glowing dot in the mode's colour, the top bar's glass close
   button), the profile block (the gradient border over the panel fill with the accent bloom, the 84 px gradient ring with its blurred
   conic halo around the 78 px disc, the neon camera button, the name in the heading face, the address with the verified check, the
   Admin chip on the platform's word alone, the Remove picture chip that turns red, the collapse chevron), the details group (four
   44 px rows on 30 px glass tiles: the address, the two mono server chips, the session pill, the glowing counter), two action groups
   of 56 px rows with 36 px tinted tiles, a title, a description and a chevron (Sign out: the red tile, the red hover, the shortcut
   chip) and the policy links with their 12 px glyphs. The pack's literals map to tokens: the ground oklch(0.14 0.02 290) is
   --mm-ac-ground, the two glows --mm-ac-glow-a / -b, the profile fill oklch(0.16 0.025 290) is --mm-ai-panel (the composer's), the
   inset groups --mm-inset-deep (2d / 2e), the counter's and the camera's ink --mm-badge-ink (2b), the red tile --mm-danger-app-bg with
   --mm-danger-fg, the badge and the close button the 2a top bar's recipes; the light theme paints the same recipes from the light
   tokens (the pack draws dark only). Phones keep the classic fixed sheet (index.html's menuPos / menuTop / menuMaxH). ---- */
:root {
  --mm-ac-ground: var(--mm-ground-deep);                                                  /* the card's ground (the scenes' deep base in light) */
  --mm-ac-glow-a: oklch(0.85 calc(0.09 * var(--sat)) var(--hue-accent) / 0.55);          /* the top glow (80% 36% at 50% 0%) */
  --mm-ac-glow-b: oklch(0.87 calc(0.08 * var(--sat-2)) var(--hue-accent-2) / 0.4);       /* the lower right glow (80% 30% at 100% 100%) */
  --mm-ac-panel: var(--mm-panel);                                                         /* the profile block's fill under its gradient border, the camera's border */
  --mm-ac-disc: oklch(0.93 0.05 75); --mm-ac-disc-ink: oklch(0.35 0.12 45);              /* the disc under my initials: the pack's warm brown / cream pair (hue 45 / 75 fixed: the person's tone, not the palette's), swapped for the light ground */
  --mm-ac-ok-fg: var(--mm-ok-fg);                                                         /* the ONLINE badge's ink (its fill and ring are the mode's dot at 14 % / 40 %) */
  --mm-ac-bloom: color-mix(in srgb, var(--color-accent) 35%, transparent);                /* the profile block's corner bloom */
  --mm-ac-danger-hover: oklch(0.62 0.21 25 / 0.1); --mm-ac-danger-ring: oklch(0.62 0.21 25 / 0.45); --mm-ac-danger-ring-50: oklch(0.62 0.21 25 / 0.5); /* Sign out's hovered row and its ring; Remove picture's ring */
}
html[data-theme="dark"] {
  --mm-ac-ground: oklch(0.14 calc(0.0143 * var(--chroma-ground)) var(--hue-ground));     /* the pack's oklch(0.14 0.02 290) at Pulse's chroma-ground 1.4 */
  --mm-ac-glow-a: oklch(0.36 calc(0.095 * var(--sat)) var(--hue-accent) / 0.55);         /* oklch(0.36 0.1 295 / 0.55) at Pulse's sat 1.05 */
  --mm-ac-glow-b: oklch(0.38 calc(0.105 * var(--sat-2)) var(--hue-accent-2) / 0.4);      /* oklch(0.38 0.1 200 / 0.4) at sat-2 0.95 */
  --mm-ac-panel: var(--mm-ai-panel);                                                      /* oklch(0.16 0.025 290) */
  --mm-ac-disc: oklch(0.35 0.12 45); --mm-ac-disc-ink: oklch(0.96 0.03 75);
  --mm-ac-ok-fg: oklch(0.86 0.14 150);
  --mm-ac-danger-hover: oklch(0.7 0.18 25 / 0.12); --mm-ac-danger-ring: oklch(0.7 0.18 25 / 0.45); --mm-ac-danger-ring-50: oklch(0.7 0.18 25 / 0.5);
}
.card.mm-acard { padding: 12px 12px 10px; gap: 8px; border-radius: 28px; border: 1px solid var(--glass-border); box-sizing: border-box; color: var(--color-text); background: radial-gradient(80% 36% at 50% 0%, var(--mm-ac-glow-a), transparent 70%), radial-gradient(80% 30% at 100% 100%, var(--mm-ac-glow-b), transparent 60%), var(--mm-ac-ground); box-shadow: var(--shadow-lg), 0 0 80px -28px var(--neon-glow); }
.card.mm-acard > * { flex: none; } /* the phone sheet scrolls (menuMaxH): no block gives up its height (the profile block clips its bloom, so it could) */
/* the header: the Managed-by pill, the presence badge (a button on desktop, where the status menu hangs from the top bar's pill; a badge on phones, where the modes live in the Apps launcher), the close button */
.mm-ac-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 2px 6px; }
.mm-ac-managed { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--color-neutral-700); background: var(--glass); border: 1px solid var(--glass-border); min-width: 0; }
.mm-ac-managed > .mm-ac-ico { display: inline-flex; color: var(--color-accent-2); }
.mm-ac-managed > .mm-ac-domain { color: var(--color-text); }
.mm-ac-online { display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 4px 9px; border-radius: 999px; font-family: var(--font-body); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; line-height: 1.55; color: var(--mm-ac-ok-fg); background: color-mix(in srgb, var(--mm-pdot, var(--mm-ok)) 14%, transparent); border: 1px solid color-mix(in srgb, var(--mm-pdot, var(--mm-ok)) 40%, transparent); flex: none; cursor: default; }
button.mm-ac-online { cursor: pointer; }
button.mm-ac-online:hover { background: color-mix(in srgb, var(--mm-pdot, var(--mm-ok)) 24%, transparent); }
.mm-ac-online > .mm-ac-online-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mm-pdot, var(--mm-ok)); box-shadow: 0 0 8px var(--mm-pdot, var(--mm-ok)); flex: none; }
.btn.btn-icon.mm-ac-close { width: 34px; height: 34px; margin-left: auto; flex: none; }
/* the profile block */
.mm-ac-profile { position: relative; overflow: hidden; padding: 18px 16px 16px; border-radius: 22px; border: 1.5px solid transparent; background: linear-gradient(var(--mm-ac-panel), var(--mm-ac-panel)) padding-box, var(--mm-gradient-border) border-box; display: flex; align-items: center; gap: 16px; }
.mm-ac-bloom { position: absolute; width: 180px; height: 180px; right: -70px; top: -90px; border-radius: 50%; background: radial-gradient(circle, var(--mm-ac-bloom), transparent 70%); pointer-events: none; }
.mm-ac-avatar { position: relative; display: block; width: 84px; height: 84px; flex: none; }
.mm-ac-halo { position: absolute; inset: -4px; border-radius: 50%; background: conic-gradient(from 0deg, var(--color-accent), var(--color-accent-2), var(--color-accent)); filter: blur(10px); opacity: 0.7; }
.mm-ac-ring { position: absolute; inset: 0; border-radius: 50%; padding: 3px; background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2)); display: block; }
.mm-ac-core { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--mm-ac-disc); color: var(--mm-ac-disc-ink); font-family: var(--font-heading); font-weight: 400; font-size: 30px; }
.mm-ac-core > img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.mm-ac-camera { position: absolute; right: -4px; bottom: -2px; width: 30px; height: 30px; margin: 0; border-radius: 50%; border: 2px solid var(--mm-ac-panel); cursor: pointer; display: grid; place-items: center; color: var(--mm-badge-ink); background: var(--color-accent); box-shadow: 0 0 14px -2px var(--neon-glow); transition: transform 0.15s ease; }
.mm-ac-camera:hover { transform: scale(1.08); }
.mm-ac-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.mm-ac-name { font-family: var(--font-heading); font-weight: 400; font-size: clamp(15px, 4.6vw, 24px); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }   /* one line on every width: the name shrinks with the viewport and ellipses rather than wrapping to three lines on a phone */
.mm-ac-addr { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--color-neutral-600); min-width: 0; }
.mm-ac-addr > .mm-ac-mail { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-ac-verified { display: inline-flex; color: var(--color-accent-2); flex: none; }
.mm-ac-status { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* the app's status line (the presence menu's "Add a status"; the pack draws none) */
.mm-ac-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.mm-ac-admin { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--color-accent-800); background: var(--color-accent-100); border: 1px solid var(--mm-accent-ring-40); }
.mm-ac-remove { display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 3px 9px 3px 7px; border-radius: 999px; font-family: var(--font-body); font-size: 11px; font-weight: 700; line-height: 1.55; cursor: pointer; color: var(--color-neutral-700); background: var(--glass); border: 1px solid var(--glass-border); } /* the sheet's line height (the pack's chip stands 25 px, level with the Admin chip; a button's own 'normal' is the face's 1.2) */
.mm-ac-remove:hover { background: var(--mm-danger-app-bg); border-color: var(--mm-ac-danger-ring-50); color: var(--mm-danger-fg); }
.btn.btn-icon.mm-ac-collapse { align-self: flex-start; width: 30px; height: 30px; color: var(--color-neutral-700); flex: none; }
.btn.btn-icon.mm-ac-collapse:hover { background: var(--glass-hover); color: var(--color-text); }
/* collapsed (the chevron, remembered for the session): the block folds to a 40 px ring, the name and the address on one line each; the bloom, the halo, the camera and the chips wait for it to open again */
.mm-ac-profile.mm-ac-folded { padding: 10px 12px 10px 14px; gap: 12px; align-items: center; }
.mm-ac-folded > .mm-ac-bloom, .mm-ac-folded .mm-ac-halo, .mm-ac-folded .mm-ac-camera, .mm-ac-folded .mm-ac-chips { display: none; }
.mm-ac-folded > .mm-ac-avatar { width: 40px; height: 40px; }
.mm-ac-folded .mm-ac-ring { padding: 2px; }
.mm-ac-folded .mm-ac-core { font-size: 15px; }
.mm-ac-folded .mm-ac-text { gap: 1px; }
.mm-ac-folded .mm-ac-name { font-size: 16px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-ac-folded > .btn.mm-ac-collapse { align-self: center; }
/* the inset groups: the details rows (a 30 px glass tile, the label, the value) and the action rows (a 36 px tinted tile, the title and its description, the chevron or the shortcut chip) */
.mm-ac-group { display: flex; flex-direction: column; gap: 1px; padding: 6px; border-radius: 20px; background: var(--mm-inset-deep); border: 1px solid var(--glass-border); }
.mm-ac-group.mm-ac-actions { gap: 2px; }
.mm-ac-tile { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--glass-border); color: var(--color-accent); }
.mm-ac-mono { font-size: 11.5px; font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; padding: 3px 8px; border-radius: 8px; background: var(--glass); border: 1px solid var(--glass-border); }
.mm-ac-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--color-accent-2-800); background: var(--color-accent-2-100); border: 1px solid color-mix(in srgb, var(--color-accent-2) 40%, transparent); }
.mm-ac-pill.mm-ac-pill-off { padding: 3px 9px; color: var(--color-neutral-700); background: var(--glass); border-color: var(--glass-border); } /* "This tab only": the glass chip without the check */
.mm-ac-act { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; margin: 0; padding: 9px 10px 9px 8px; border-radius: 16px; border: 1px solid transparent; background: transparent; color: var(--color-text); font-family: var(--font-body); text-align: left; cursor: pointer; }
.mm-ac-act:hover { background: var(--glass-active); border-color: var(--glass-border); }
.mm-ac-act.mm-ac-out:hover { background: var(--mm-ac-danger-hover); border-color: var(--mm-ac-danger-ring); }
.mm-ac-act > .mm-tile.mm-ac-tile-out { background: var(--mm-danger-app-bg); color: var(--mm-danger-fg); }
.mm-ac-act > .mm-ac-txt { min-width: 0; }
.mm-ac-title { display: block; font-size: 14px; font-weight: 700; }
.mm-ac-desc { display: block; font-size: 12.5px; color: var(--color-neutral-600); margin-top: 1px; }
.mm-ac-trail { display: inline-flex; color: var(--color-neutral-600); }
.mm-ac-kbd { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; color: var(--color-neutral-600); background: var(--glass); border: 1px solid var(--glass-border); font-family: inherit; }
/* the footer: the two policy links with their glyphs around a 3 px dot */
.mm-ac-foot { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 6px 0 2px; font-size: 12px; color: var(--color-neutral-600); }
.mm-ac-foot > a { color: var(--color-neutral-600); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.mm-ac-foot > a:hover { color: var(--color-text); text-decoration: none; }
.mm-ac-foot > .mm-ac-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--color-neutral-500); flex: none; }
.mm-ac-online:focus-visible, .mm-ac-camera:focus-visible, .mm-ac-remove:focus-visible, .mm-ac-act:focus-visible, .mm-ac-foot > a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
/* T-87: the accounts signed in on this device (screen 2j extended) - one row per account in the order they were added, the active one marked and never moved: the
   pack's action-row grid with a 36 px tile (the account's own picture or its initials, a presence-style dot at the corner: the online green glowing for a live
   account, flat neutral for a signed-out one; the active tile ringed in the accent), the name with the Inbox unread badge inline, the address or "Signed out",
   a trailing Current pill / chevron / Signed-out pill. .mm-ac-acct is its own class, distinct from the action rows' .mm-ac-act */
.mm-ac-group.mm-ac-list { gap: 2px; }
.mm-ac-acct-wrap { position: relative; }
.mm-ac-acct { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; min-height: 54px; margin: 0; padding: 9px 10px 9px 8px; border-radius: 16px; border: 1px solid transparent; background: transparent; color: var(--color-text); font-family: var(--font-body); text-align: left; cursor: pointer; }
.mm-ac-acct:hover { background: var(--glass-active); border-color: var(--glass-border); }
.mm-ac-acct.is-active { cursor: default; }
.mm-ac-acct:focus-visible, .mm-ac-x:focus-visible, .btn.mm-si-back:focus-visible, .btn.mm-si-other:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.mm-ac-acct > .mm-ac-stile { position: relative; overflow: visible; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--mm-ac-disc-ink); background: var(--mm-ac-disc); }
.mm-ac-acct > .mm-ac-stile > img { width: 100%; height: 100%; border-radius: 12px; display: block; object-fit: cover; }
.mm-ac-acct.is-active > .mm-ac-stile { box-shadow: 0 0 0 2px var(--color-accent); }
.mm-ac-acct.is-expired > .mm-ac-stile { opacity: 0.7; }
.mm-ac-acct > .mm-ac-stile > .mm-ac-pdot { position: absolute; right: -3px; bottom: -3px; width: 10px; height: 10px; border-radius: 50%; box-sizing: content-box; background: var(--mm-pdot, var(--mm-ac-ok-fg)); border: 2px solid var(--mm-inset-deep); box-shadow: 0 0 8px var(--mm-pdot, var(--mm-ac-ok-fg)); }
.mm-ac-acct.is-expired > .mm-ac-stile > .mm-ac-pdot { box-shadow: none; }
.mm-ac-acct > .mm-ac-txt { min-width: 0; }
.mm-ac-acct .mm-ac-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mm-ac-acct .mm-ac-title > .mm-ac-nm { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-ac-acct .mm-ac-desc { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mm-ac-acct .mm-ac-desc > span:first-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-ac-desc.mm-ac-dead { color: var(--mm-danger-fg); }
.mm-ac-tabchip { flex: none; }
.mm-ac-acct > .mm-ac-trail { display: inline-flex; align-items: center; gap: 6px; color: var(--color-neutral-600); }
/* the unread badge: the pack's counter idiom, inline after the name; non-zero only; a figure older than two minutes (or after a failed poll) dimmed */
.mm-ac-badge { flex: none; height: 20px; min-width: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; color: var(--mm-badge-ink); background: var(--color-accent); box-shadow: 0 0 12px -2px var(--neon-glow); }
.mm-ac-badge.is-stale { opacity: 0.6; }
/* "flashy": a non-zero badge pulses (box-shadow alone: the compositor's, no layout), a risen count ticks up once; both off under the OS setting and the app's own motion switch */
@keyframes mm-ac-badge-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-accent) 55%, transparent), 0 0 12px -2px var(--neon-glow); } 50% { box-shadow: 0 0 0 6px transparent, 0 0 20px 0 var(--neon-glow); } }
@keyframes mm-ac-badge-tick { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
.mm-ac-badge.is-live { animation: mm-ac-badge-pulse 2.2s ease-out infinite; }
.mm-ac-badge.is-up { animation: mm-ac-badge-tick 0.32s ease-out 1, mm-ac-badge-pulse 2.2s ease-out 0.32s infinite; }
@media (prefers-reduced-motion: reduce) { .mm-ac-badge { animation: none !important; } }
html[data-motion="off"] .mm-ac-badge { animation: none !important; }
/* a signed-out row's Remove: 40 px at the row's end, on hover and focus (always on a phone) */
.btn.btn-icon.mm-ac-x { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; opacity: 0; color: var(--color-neutral-600); }
.mm-ac-acct-wrap:hover > .mm-ac-x, .mm-ac-acct-wrap:focus-within > .mm-ac-x, .btn.btn-icon.mm-ac-x:focus-visible { opacity: 1; }
.mm-ac-acct-wrap.has-x > .mm-ac-acct { padding-right: 56px; }
.btn.btn-icon.mm-ac-x:hover { background: var(--mm-ac-danger-hover); color: var(--mm-danger-fg); }
/* the sign-in as a layer over the live app (an account being added, or signed in again): the app's root keeps still and blurs; no transition under the app's motion switch or the OS setting */
html.mm-adding [data-screen-label="Mail"] { filter: blur(6px) brightness(0.85); transition: filter 0.2s ease; }
html[data-motion="off"].mm-adding [data-screen-label="Mail"] { transition: none; }
@media (prefers-reduced-motion: reduce) { html.mm-adding [data-screen-label="Mail"] { transition: none; } }
.btn.mm-si-back { min-height: 44px; padding: 0 16px 0 12px; gap: 8px; border-radius: 999px; font-family: var(--font-body); font-weight: 700; font-size: 13.5px; color: var(--color-text); flex: none; }
.mm-si-keep { min-width: 0; font-size: 12px; color: var(--color-neutral-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the address step's Sign up pill in the page's header (T-97, the owner's ask, 2026-09-13: "on the first page, at the top, make a Sign up icon; when you click on it, it takes you to the main page of uae.com, where you can sign up for a new email ID"): an <a> to https://uae.com/ in the same tab, the theme toggle's glass recipe and its person-plus glyph, the word beside it, 44 px tall on a phone; rendered on the address step only, right before the theme toggle, so Tab reaches it after the address bar's domain button and before the toggle */
.btn.mm-si-signup { text-decoration: none; }
.btn.mm-si-signup:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn.mm-si-other { width: 100%; min-height: 44px; justify-content: flex-start; gap: 10px; padding: 0 14px 0 8px; border-radius: 14px; font-family: var(--font-body); font-weight: 700; font-size: 13.5px; color: var(--color-text); }
.mm-si-other-init { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--mm-gradient-2); color: var(--mm-on-accent); flex: none; }
.mm-si-other-addr { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* phones: the classic fixed sheet keeps its 40 px targets on the two icon buttons (the policy links carry theirs inline) */
@media (max-width: 759px) {
  .btn.btn-icon.mm-ac-close, .btn.btn-icon.mm-ac-collapse { width: 40px; height: 40px; }
  .btn.btn-icon.mm-ac-x { opacity: 1; } /* no hover on a phone: the Remove control is always there */
}

/* Account card: the mail-app configuration box (replaces the "Signed in as" repeat and the bare server chips) - same tiles, chips and glass as the rows around it */
.mm-ac-setup { display: grid; gap: 10px; padding: 10px 12px 12px; border-radius: var(--radius-md); background: var(--glass); border: 1px solid var(--color-divider); }
.mm-ac-setup-head { display: flex; align-items: center; gap: 10px; }
.mm-ac-setup-title { font-size: 13px; font-weight: 700; }
.mm-ac-setup-grid { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 8px 12px; align-items: center; }
.mm-ac-setup-k { font-size: 12.5px; color: var(--color-neutral-600); white-space: nowrap; }
.mm-ac-setup-v { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.mm-ac-setup-v .mm-ac-mono { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-ac-setup-note { font-size: 12px; color: var(--color-neutral-600); text-align: right; }
.mm-ac-setup-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mm-ac-setup-btn { flex: 1 1 auto; padding: 8px 10px; border-radius: 999px; font-family: var(--font-body); font-size: 12px; font-weight: 700; color: var(--color-text); background: var(--glass); border: 1px solid var(--color-divider); cursor: pointer; }
.mm-ac-setup-btn:hover { background: var(--glass-hover); }
@media (max-width: 420px) { .mm-ac-setup-grid { grid-template-columns: 1fr; gap: 4px; } .mm-ac-setup-v { justify-content: flex-start; margin-bottom: 4px; } .mm-ac-setup-note { text-align: left; } }
/* The sync button: a quiet ring around the arrows. idle - nothing. on - the arrows turn, the ring fills green around the circle with a
   soft glow while a round runs (a poll, push arrivals, an outgoing message). done - the ring completes, flashes gently and fades. */
.mm-sync { position: relative; overflow: visible; }
.mm-sync .mm-sync-ring { position: absolute; inset: 1px; width: auto; height: auto; pointer-events: none; transform: rotate(-90deg); opacity: 0; transition: opacity .25s ease; }
.mm-sync .mm-sync-track, .mm-sync .mm-sync-fill { fill: none; stroke-width: 2.6; stroke-linecap: round; }
.mm-sync .mm-sync-track { stroke: oklch(0.72 0.19 150 / 0.18); }
.mm-sync .mm-sync-fill { stroke: oklch(0.72 0.19 150); stroke-dasharray: 97.4; stroke-dashoffset: 97.4; filter: drop-shadow(0 0 3px oklch(0.75 0.2 150 / 0.7)); }
.mm-sync .mm-sync-arrows { position: relative; z-index: 1; }
.mm-sync[data-mm-sync="on"] .mm-sync-ring { opacity: 1; }
.mm-sync[data-mm-sync="on"] .mm-sync-fill { animation: mm-sync-fill 1.2s cubic-bezier(.4,0,.2,1) infinite; }
.mm-sync[data-mm-sync="on"] .mm-sync-arrows { animation: mm-spin 0.9s linear infinite; color: oklch(0.72 0.19 150); }
.mm-sync[data-mm-sync="on"] { box-shadow: 0 0 0 0 oklch(0.72 0.19 150 / 0); animation: mm-sync-glow 1.2s ease-in-out infinite; }
.mm-sync[data-mm-sync="done"] .mm-sync-ring { opacity: 1; animation: mm-sync-out 1.1s ease-out forwards; }
.mm-sync[data-mm-sync="done"] .mm-sync-fill { stroke-dashoffset: 0; }
.mm-sync[data-mm-sync="done"] .mm-sync-arrows { color: oklch(0.72 0.19 150); transition: color .9s ease .2s; animation: mm-sync-pop .5s cubic-bezier(.2,1.4,.4,1) 1; }
@keyframes mm-sync-fill { 0% { stroke-dashoffset: 97.4; } 70% { stroke-dashoffset: 6; } 100% { stroke-dashoffset: 0; } }
@keyframes mm-sync-glow { 0%, 100% { box-shadow: 0 0 0 0 oklch(0.72 0.19 150 / 0); } 50% { box-shadow: 0 0 10px 1px oklch(0.72 0.19 150 / 0.35); } }
@keyframes mm-sync-out { 0% { opacity: 1; filter: brightness(1.6); } 35% { opacity: 1; filter: brightness(1); } 100% { opacity: 0; } }
@keyframes mm-sync-pop { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .mm-sync[data-mm-sync="on"] .mm-sync-arrows, .mm-sync[data-mm-sync="on"] .mm-sync-fill, .mm-sync[data-mm-sync="on"], .mm-sync[data-mm-sync="done"] .mm-sync-arrows { animation: none; } .mm-sync[data-mm-sync="on"] .mm-sync-fill { stroke-dashoffset: 30; } }
/* Invitation card in a message: the event, the organiser, my answer, three answers */
.mm-invite:empty { display: none; }
.mm-invite-card { margin: 10px 0 6px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--glass); border: 1px solid var(--color-divider); }
.mm-invite-head { display: flex; gap: 12px; align-items: flex-start; }
.mm-invite-icon { font-size: 22px; line-height: 1; flex: none; }
.mm-invite-title { font-weight: 700; font-size: 14px; }
.mm-invite-when { font-size: 13px; margin-top: 2px; }
.mm-invite-org { font-size: 12px; color: var(--color-neutral-600); margin-top: 2px; }
.mm-invite-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.mm-invite-btn { padding: 7px 14px; border-radius: 999px; font-family: var(--font-body); font-size: 12.5px; font-weight: 700; color: var(--color-text); background: var(--glass); border: 1px solid var(--color-divider); cursor: pointer; }
.mm-invite-btn:hover { background: var(--glass-hover); }
.mm-invite-btn.mm-invite-on { background: oklch(0.72 0.19 150 / 0.18); border-color: oklch(0.72 0.19 150 / 0.6); }
.mm-invite-btn:disabled { opacity: 0.6; cursor: default; }
