/*
 * core.css: the platform shell. Tokens, the themes, font sets, block styles,
 * the top bar and the phone's tab bar, global search, the system's parts,
 * controls, panels, rows, modals, the dashboard grid, the settings launcher,
 * and last the Physare look on its two themes.
 *
 * Nothing feature-shaped lives here. A module ships its own
 * public/assets/modules/{key}/module.css carrying its .row.<feature> grid
 * lines and its screens, loaded after this file.
 *
 * Carved from GnomeWork's app.css. Comments explaining WHY a rule is the way
 * it is were kept on purpose: most of them record a measurement.
 */

  :root{
    --ink:#1F3A34; --ink-soft:#3E5850;
    --paper:#F5F1E8; --paper-raised:#FFFFFF;
    --line:#DAD3C2; --line-strong:#C3BAA4;
    --mustard:#B8792E; --mustard-soft:#EFDFC7;
    --sage:#7C9082; --sage-soft:#E4E9DF;
    --brick:#B8433C; --brick-soft:#F3DEDB;
    --blue:#3E6E8E; --blue-soft:#DDE8EE;
    --green-dot:#4C8B5C; --yellow-dot:#D4A62B;
    --text-muted:#8A8570; --subtle-bg:#FBF9F3; --radius:6px;
    /*
     * Typography. A font set swaps display and ui; --font-mono never changes,
     * because it is doing alignment work in counts, SKUs and money columns
     * rather than decoration, and a proportional face there would break the
     * columns. Sets live in the html[data-font=…] blocks further down.
     */
    --font-display:'Fraunces', serif;
    --font-ui:'IBM Plex Sans', sans-serif;
    --font-mono:'IBM Plex Mono', monospace;
    /*
     * Block style - how content panels are drawn. Every content panel reads
     * these, so a style is six declarations rather than a hunt through the
     * stylesheet. Chrome that isn't content (modals, dropdowns, the floating
     * chat panel) deliberately doesn't use them: a dropdown with no border
     * because somebody chose Flat would be unreadable over the page behind it.
     */
    --panel-bg:var(--paper-raised);
    --panel-border:1px solid var(--line);
    --panel-radius:8px;
    --panel-pad:16px 18px;
    --panel-shadow:none;
    --row-pad:13px 16px;
    /*
     * The primary button. Every theme carved from upstream paints it in the
     * ink, so the four tokens default to the ink and the paper; a theme whose
     * brand puts ONE colour on its buttons (Plasmodium's acid) restates these
     * four rather than re-declaring .btn, which would also catch .ghost and
     * .danger. Ported from shared-spirits.
     */
    --btn-bg:var(--ink);
    --btn-ink:var(--paper);
    --btn-hover:var(--ink-soft);
    --btn-radius:var(--radius);
    /* Nav category tints. Every group head is a filled band so it can't be
       mistaken for one of the tabs underneath it. Each family needs a soft
       fill AND a matching dark ink - text on a tint must come from the same
       hue, or it reads as a mistake. Plum and teal are new: the palette had
       four usable families and there are seven groups. Apps is violet rather
       than the obvious green because green sits on top of CRM's sage - two
       adjacent groups reading as the same colour defeats the point. */
    --violet:#6A6AA8; --violet-soft:#E3E2F2;
    --plum:#8A5A7A; --plum-soft:#EDE0E8;
    --teal:#3E8E85; --teal-soft:#DAEBE8;
    --sage-ink:#3A5240; --mustard-ink:#7A4E17; --blue-ink:#2A4C63;
    --violet-ink:#3F3F73; --brick-ink:#8A2F29; --plum-ink:#6B4159;
    --teal-ink:#2C6660;
  }
  /*
   * Themes. `:root` above is Garden paper, the default, so a theme block only
   * has to restate what differs - except that in practice every block restates
   * ALL of them. A theme that overrode only paper and ink would inherit Garden
   * paper's nav tints, and the sidebar headers would come out as pale mint on a
   * dark background. Copy a whole block when adding one.
   *
   * `data-theme` names the specific theme; `data-scheme` says light or dark and
   * is what the handful of scheme-specific rules below key on, so adding a
   * fourth dark theme doesn't mean editing ten selectors. applyTheme() sets
   * both.
   */

  /*
   * Block styles. Framed is :root, so it needs no block.
   *
   * Elevated is the only one that has to know about the colour scheme: a shadow
   * tuned for cream paper disappears on a near-black one. That is what
   * data-scheme is for, and why it exists separately from data-theme - one rule
   * covers all five dark themes.
   */
  html[data-blocks="flat"]{
    --panel-bg:var(--subtle-bg);
    --panel-border:1px solid transparent;
    --panel-shadow:none;
  }
  html[data-blocks="elevated"]{
    --panel-border:1px solid transparent;
    --panel-radius:12px;
    --panel-shadow:0 2px 8px rgba(31,58,52,0.10), 0 1px 2px rgba(31,58,52,0.06);
  }
  html[data-scheme="dark"][data-blocks="elevated"]{
    --panel-shadow:0 2px 10px rgba(0,0,0,0.45), 0 1px 3px rgba(0,0,0,0.35);
  }
  /* No panels at all. The section heading and its rule do the separating, the
     way a printed report does it. Rows keep their own dividers, or a list would
     become an undifferentiated block of text. */
  html[data-blocks="ruled"]{
    --panel-bg:transparent;
    --panel-border:none;
    --panel-radius:0;
    --panel-pad:0;
    --panel-shadow:none;
  }
  html[data-blocks="ruled"] .section-head{border-bottom:1px solid var(--line);padding-bottom:8px;}
  html[data-blocks="ruled"] .row{padding-left:0;padding-right:0;}
  html[data-blocks="compact"]{
    --panel-radius:4px;
    --panel-pad:10px 12px;
    --row-pad:8px 12px;
  }

  /*
   * Font sets. Garden is :root, so it needs no block. `system` deliberately
   * names no web font at all - it downloads nothing and never flashes.
   */
  html[data-font="plain"]{--font-display:'Inter', sans-serif;--font-ui:'Inter', sans-serif;}
  html[data-font="legible"]{--font-display:'Atkinson Hyperlegible', sans-serif;--font-ui:'Atkinson Hyperlegible', sans-serif;}
  html[data-font="editorial"]{--font-display:'Source Serif 4', serif;--font-ui:'Source Sans 3', sans-serif;}
  html[data-font="system"]{--font-display:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;--font-ui:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;}
  html[data-font="slab"]{--font-display:'Zilla Slab', serif;--font-ui:'IBM Plex Sans', sans-serif;}
  html[data-font="storybook"]{--font-display:'EB Garamond', serif;--font-ui:'Lato', sans-serif;}
  html[data-font="rounded"]{--font-display:'Nunito', sans-serif;--font-ui:'Nunito', sans-serif;}
  html[data-font="condensed"]{--font-display:'Archivo Narrow', sans-serif;--font-ui:'Archivo', sans-serif;}
  html[data-font="technical"]{--font-display:'Space Grotesk', sans-serif;--font-ui:'IBM Plex Sans', sans-serif;}
  html[data-font="physare"]{--font-display:'Helvetica Neue', Helvetica, Arial, sans-serif;--font-ui:'Helvetica Neue', Helvetica, Arial, sans-serif;}
  /* Inter, the Physare set: a free stand-in for the Helvetica Neue the site
     self-hosts. Light for the big type (the site sets its headings at 300
     with tight tracking), regular for reading, and 500 uppercase tracked
     at 0.12em for what the site sets as labels (group heads, buttons). */
  html[data-font="inter"]{--font-display:'Inter', sans-serif;--font-ui:'Inter', sans-serif;}
  html[data-font="inter"] .brand-mark{font-weight:400;letter-spacing:-0.03em;}
  html[data-font="inter"] .page-title{font-weight:300;letter-spacing:-0.03em;}
  html[data-font="inter"] h2,html[data-font="inter"] .section-title{font-weight:400;letter-spacing:-0.015em;}
  html[data-font="inter"] .btn{text-transform:uppercase;letter-spacing:0.12em;font-size:11.5px;font-weight:500;}
  html[data-font="inter"] .btn.small{font-size:10.5px;}
  /* The house face is light, not bold: Helvetica at 600 reads as shouting on black. */
  html[data-font="physare"] .brand-mark{font-weight:400;letter-spacing:-0.025em;}
  html[data-font="physare"] .page-title,html[data-font="physare"] h2,html[data-font="physare"] .section-title{font-weight:500;letter-spacing:-0.015em;}

  /* Ink and linen - cool light, navy ink. The plain counterpart to Garden paper. */
  html[data-theme="ink"]{
    --ink:#232A33; --ink-soft:#4A5462;
    --paper:#F4F4F1; --paper-raised:#FFFFFF;
    --line:#DCDCD6; --line-strong:#C2C2BA;
    --mustard:#A9761F; --mustard-soft:#F0E1C6;
    --sage:#5E8A6B; --sage-soft:#DEE9E1;
    --brick:#B23A3A; --brick-soft:#F3DCDC;
    --blue:#2C5F8A; --blue-soft:#D9E5EF;
    --green-dot:#3F7C4E; --yellow-dot:#B98F1E;
    --text-muted:#7D8590; --subtle-bg:#FAFAF8;
    --violet:#5B5FA6; --violet-soft:#E0E1F2;
    --plum:#8A4F77; --plum-soft:#EEDFE9;
    --teal:#2F8078; --teal-soft:#D8EAE7;
    --sage-ink:#2F4F39; --mustard-ink:#6E4A11; --blue-ink:#1E4160;
    --violet-ink:#383B75; --brick-ink:#7C2727; --plum-ink:#5E3550;
    --teal-ink:#235B55;
  }

  /* Moss - Garden paper with the colour turned up. */
  html[data-theme="moss"]{
    --ink:#16301F; --ink-soft:#375040;
    --paper:#EFF2EA; --paper-raised:#FDFEFB;
    --line:#D2DBC9; --line-strong:#B4C2A8;
    --mustard:#A9761B; --mustard-soft:#F1E2C3;
    --sage:#4E7F58; --sage-soft:#D8E7D9;
    --brick:#A83B34; --brick-soft:#F2DCD9;
    --blue:#2C6480; --blue-soft:#D7E6ED;
    --green-dot:#3B7A47; --yellow-dot:#B08B1C;
    --text-muted:#75856E; --subtle-bg:#F6F9F2;
    --violet:#5C5A9E; --violet-soft:#DFDEF0;
    --plum:#83486F; --plum-soft:#EDDDE7;
    --teal:#2A7B6B; --teal-soft:#D5E9E3;
    --sage-ink:#234A2C; --mustard-ink:#6B4A0F; --blue-ink:#1C4256;
    --violet-ink:#343267; --brick-ink:#6E241E; --plum-ink:#522B44;
    --teal-ink:#175044;
  }

  /* Newsprint - near-monochrome light. Colour appears only where it carries
     meaning, so status badges do more work. */
  html[data-theme="newsprint"]{
    --ink:#1A1A18; --ink-soft:#44443F;
    --paper:#F7F7F5; --paper-raised:#FFFFFF;
    --line:#DEDEDA; --line-strong:#BFBFB9;
    --mustard:#8F7031; --mustard-soft:#EFE6D5;
    --sage:#55705C; --sage-soft:#E2E7E2;
    --brick:#96453F; --brick-soft:#EEDFDD;
    --blue:#3C5C74; --blue-soft:#DFE6EB;
    --green-dot:#4A7355; --yellow-dot:#A8862A;
    --text-muted:#75756E; --subtle-bg:#FCFCFA;
    --violet:#55538A; --violet-soft:#E4E3EC;
    --plum:#7A5069; --plum-soft:#EBE1E7;
    --teal:#37716B; --teal-soft:#DEE9E7;
    --sage-ink:#2C3D31; --mustard-ink:#56421A; --blue-ink:#22384A;
    --violet-ink:#333155; --brick-ink:#5E2A26; --plum-ink:#4B2F40;
    --teal-ink:#1E443F;
  }

  /* Sandstone - warm neutral light. Garden paper without the green cast. */
  html[data-theme="sandstone"]{
    --ink:#332C24; --ink-soft:#574C40;
    --paper:#F4EFE6; --paper-raised:#FFFCF7;
    --line:#E2D9CB; --line-strong:#C9BCA8;
    --mustard:#A5741F; --mustard-soft:#F1E1C4;
    --sage:#6F8368; --sage-soft:#E3E8DC;
    --brick:#A9463A; --brick-soft:#F2DED9;
    --blue:#3E6479; --blue-soft:#DCE6EB;
    --green-dot:#4F7F55; --yellow-dot:#BE9425;
    --text-muted:#8B7F6E; --subtle-bg:#FAF6EF;
    --violet:#635A93; --violet-soft:#E4E1EF;
    --plum:#8B5271; --plum-soft:#EFDFE7;
    --teal:#357C71; --teal-soft:#D9E8E4;
    --sage-ink:#3B4A33; --mustard-ink:#684711; --blue-ink:#2A4453;
    --violet-ink:#3A3563; --brick-ink:#6F2A21; --plum-ink:#573044;
    --teal-ink:#1F4E46;
  }

  /* Slate - cool grey-blue dark. Replaces the old "dark" theme. */
  html[data-theme="slate"]{
    --ink:#E6EAF0; --ink-soft:#B9C2CD;
    --paper:#1B1F24; --paper-raised:#242A31;
    --line:#333B45; --line-strong:#46505C;
    --mustard:#D9A25A; --mustard-soft:#3D3320;
    --sage:#8FB09A; --sage-soft:#26332B;
    --brick:#E08078; --brick-soft:#3D2422;
    --blue:#6FA8D0; --blue-soft:#1F2E39;
    --green-dot:#6FC486; --yellow-dot:#E4BE58;
    --text-muted:#8994A1; --subtle-bg:#2C333B;
    --violet:#9B9BE0; --violet-soft:#2B2B40;
    --plum:#C08BB4; --plum-soft:#362534;
    --teal:#6BBDB4; --teal-soft:#1D3330;
    --sage-ink:#BCD4C4; --mustard-ink:#EBCB92; --blue-ink:#BBD9EC;
    --violet-ink:#C7C7EE; --brick-ink:#F0B4AC; --plum-ink:#E0BCD5;
    --teal-ink:#A8D9D2;
  }

  /* Dusk - deep indigo dark. */
  html[data-theme="dusk"]{
    --ink:#E4E3EE; --ink-soft:#B6B5C6;
    --paper:#15161F; --paper-raised:#1E2029;
    --line:#2E3040; --line-strong:#414459;
    --mustard:#DDA65E; --mustard-soft:#3B3120;
    --sage:#86B396; --sage-soft:#223026;
    --brick:#E58A83; --brick-soft:#3C2429;
    --blue:#7BAEE0; --blue-soft:#1E2C3E;
    --green-dot:#6BC384; --yellow-dot:#E5C264;
    --text-muted:#8A89A0; --subtle-bg:#262838;
    --violet:#A6A2EC; --violet-soft:#2A2846;
    --plum:#C892BC; --plum-soft:#34253A;
    --teal:#6FC3BC; --teal-soft:#1C3134;
    --sage-ink:#BDD8C6; --mustard-ink:#EFCE99; --blue-ink:#BEDBF1;
    --violet-ink:#CFCCF4; --brick-ink:#F2B8B2; --plum-ink:#E4C2DC;
    --teal-ink:#ABDDD8;
  }

  /* Ember - warm dark. The only one of the three darks without a cool cast. */
  html[data-theme="ember"]{
    --ink:#F0E7DE; --ink-soft:#CBBCAF;
    --paper:#1E1A17; --paper-raised:#292421;
    --line:#3D3530; --line-strong:#504640;
    --mustard:#E0A455; --mustard-soft:#45341D;
    --sage:#9CB08C; --sage-soft:#2C3527;
    --brick:#E5867A; --brick-soft:#432723;
    --blue:#86AEC4; --blue-soft:#263239;
    --green-dot:#83C48F; --yellow-dot:#E8C46A;
    --text-muted:#968779; --subtle-bg:#332C28;
    --violet:#B0A0D4; --violet-soft:#322C40;
    --plum:#C58FA8; --plum-soft:#3A2A32;
    --teal:#6FBDAE; --teal-soft:#21332F;
    --sage-ink:#C8D8BC; --mustard-ink:#F2CE96; --blue-ink:#BDD6E3;
    --violet-ink:#D6CCEC; --brick-ink:#F4B7AE; --plum-ink:#E5C3D2;
    --teal-ink:#ADDBD1;
  }

  /* Obsidian - near-black neutral. The highest-contrast of the darks. */
  html[data-theme="obsidian"]{
    --ink:#F2F3F5; --ink-soft:#C3C6CC;
    --paper:#0E0F11; --paper-raised:#17191C;
    --line:#282B30; --line-strong:#3A3E45;
    --mustard:#E5AE63; --mustard-soft:#3A2F1C;
    --sage:#93BCA0; --sage-soft:#1D2A21;
    --brick:#EC8B81; --brick-soft:#3A2220;
    --blue:#7DB6E2; --blue-soft:#182833;
    --green-dot:#79CE90; --yellow-dot:#EBC85E;
    --text-muted:#909499; --subtle-bg:#1D2024;
    --violet:#A9A6F0; --violet-soft:#242347;
    --plum:#D096C2; --plum-soft:#331F30;
    --teal:#71C8BE; --teal-soft:#152E2B;
    --sage-ink:#C3DDCB; --mustard-ink:#F3D3A0; --blue-ink:#C4DEF3;
    --violet-ink:#D3D1F7; --brick-ink:#F6BCB4; --plum-ink:#EAC6E0;
    --teal-ink:#AFE0D9;
  }

  /* Physare: black, charcoal and three greys, with ONE colour, the yellow of
     the Physare mark, carrying the accent (active tab, primary button, paid).
     Every other family is desaturated towards grey so a status still reads
     without breaking the monochrome. */
  html[data-theme="physare"]{
    /* Native controls (checkbox, radio, range, the date picker) take the
       yellow too; without accent-color they are browser blue, the one colour
       this theme must never show. */
    accent-color:#E9F26B; color-scheme:dark;
    --ink:#E8E8E6; --ink-soft:#A6A6A3;
    --paper:#0B0B0C; --paper-raised:#141416;
    --line:#232325; --line-strong:#3A3A3E;
    --mustard:#E9F26B; --mustard-soft:#26281A;
    --sage:#E9F26B; --sage-soft:#1F2210;
    --brick:#D08A82; --brick-soft:#2A1F1E;
    --blue:#9CA3AD; --blue-soft:#1C1E22;
    --green-dot:#E9F26B; --yellow-dot:#E9F26B;
    --text-muted:#6B6B69; --subtle-bg:#1A1A1C;
    --violet:#A9A9B5; --violet-soft:#1E1E24;
    --plum:#B3A3AE; --plum-soft:#221D21;
    --teal:#9DB0AD; --teal-soft:#1B2221;
    --sage-ink:#E9F26B; --mustard-ink:#E9F26B; --blue-ink:#D6D6D3;
    --violet-ink:#D6D6D3; --brick-ink:#E8B3AC; --plum-ink:#D6D6D3;
    --teal-ink:#D6D6D3;
  }

  /*
   * Plasmodium: the Physare look, measured from physare.com (2026-09-25, and
   * again on 2026-11-11). The site is pure black (#000) with white text at
   * 100, 62 and 55 percent, hairlines of white at 16 percent (34 for
   * emphasis), each written here as the solid it makes on black, a tile of
   * #101010, and ONE color, the acid #F0F870 of its
   * slime-mould network, on section numbers and outline buttons. Every other
   * family is pulled towards grey so a status still reads without breaking
   * the monochrome; red is kept for overdue and lost, and nothing else.
   */
  html[data-theme="plasmodium"]{
    accent-color:#F0F870; color-scheme:dark;
    --ink:#FFFFFF; --ink-soft:#9E9E9E;
    --paper:#000000; --paper-raised:#101010;
    --line:#292929; --line-strong:#575757;
    --mustard:#F0F870; --mustard-soft:#1F2110;
    --sage:#F0F870; --sage-soft:#1A1C0E;
    --brick:#FF6B5E; --brick-soft:#2A1412;
    --blue:#A3A7AD; --blue-soft:#15171A;
    --green-dot:#F0F870; --yellow-dot:#F0F870;
    --text-muted:#8C8C8C; --subtle-bg:#181818;
    --violet:#ABABB5; --violet-soft:#17171B;
    --plum:#B3A6AE; --plum-soft:#1A1619;
    --teal:#A3B3B0; --teal-soft:#141A19;
    --sage-ink:#F0F870; --mustard-ink:#F0F870; --blue-ink:#D6D6D3;
    --violet-ink:#D6D6D3; --brick-ink:#FFB1A8; --plum-ink:#D6D6D3;
    --teal-ink:#D6D6D3;
    --btn-bg:#F0F870; --btn-ink:#000000; --btn-hover:#F0F870; --btn-radius:2px;
    --radius:3px; --panel-radius:3px;
    --scrim:rgba(0,0,0,0.72);
    /* No monospace labels: codes and counts take the reading face, and line
       up through tabular figures instead. */
    --font-mono:var(--font-ui);
  }
  /*
   * Oat: the same brand on a light page, for daylight and for printing. Oat
   * flakes are what the slime mould was fed. Acid on white has no contrast,
   * so the accent darkens to olive for text and stays acid only as a fill
   * behind black. The top bar stays the site's black, so the brand reads the
   * same in both.
   */
  html[data-theme="oat"]{
    accent-color:#000000; color-scheme:light;
    --ink:#0A0A0A; --ink-soft:#55554F;
    --paper:#F7F6F0; --paper-raised:#FFFFFF;
    --line:#DDDACD; --line-strong:#B9B6A8;
    --mustard:#6B7000; --mustard-soft:#F4F6C8;
    --sage:#6B7000; --sage-soft:#F1F3D2;
    --brick:#B3372F; --brick-soft:#F8E1DF;
    --blue:#4A5563; --blue-soft:#ECEDEF;
    --green-dot:#7C8200; --yellow-dot:#A08A00;
    --text-muted:#706F67; --subtle-bg:#FBFAF6;
    --violet:#55555F; --violet-soft:#EDEDF0;
    --plum:#6A5763; --plum-soft:#F1ECEF;
    --teal:#4F6360; --teal-soft:#EAEFEE;
    --sage-ink:#3F4200; --mustard-ink:#3F4200; --blue-ink:#2A3440;
    --violet-ink:#2E2E36; --brick-ink:#7E231D; --plum-ink:#3E2F38;
    --teal-ink:#2C3B39;
    --btn-bg:#000000; --btn-ink:#F0F870; --btn-hover:#1F1F1F; --btn-radius:2px;
    --radius:3px; --panel-radius:3px;
    --scrim:rgba(10,10,10,0.5);
    --font-mono:var(--font-ui);
  }
  /* The black set: the site's header, black with white at 62 percent. On Oat
     the top bar, the phone's tab bar, the menus that drop from them and the
     sign-in card keep it, so the brand reads the same in both themes. */
  html[data-theme="oat"] :is(.topnav, .tabbar, #shell-menu, #acct-menu, #quick-add-menu, #notif-panel, .login-card){
    --ink:#FFFFFF; --ink-soft:#9E9E9E;
    --paper:#000000; --paper-raised:#101010;
    --line:#292929; --line-strong:#575757;
    --mustard:#F0F870; --mustard-soft:#1F2110;
    --sage:#F0F870; --sage-soft:#1A1C0E;
    --brick:#FF6B5E; --brick-soft:#2A1412;
    --text-muted:#8C8C8C; --subtle-bg:#181818;
    --btn-bg:#F0F870; --btn-ink:#000000; --btn-hover:#F0F870; --btn-radius:2px;
    color:var(--ink);
  }
  html[data-theme="oat"] .login-card{background:#000000;border-color:#000000;box-shadow:none;}
  html[data-theme="plasmodium"] .login-card{background:#000000;border-color:#292929;box-shadow:none;}
  html[data-theme="plasmodium"] .theme-card.selected,html[data-theme="oat"] .theme-card.selected{border-color:var(--mustard);}
  html[data-theme="plasmodium"] .theme-card-tick,html[data-theme="oat"] .theme-card-tick{color:var(--mustard);}
  /* The button, as on the site: a 1px outline in the accent, 2px corners, the
     label style, 32px tall (47px with .lg), filled on hover from the theme's
     button tokens (acid with black text; on Oat's page black with acid text).
     Ghost is the quiet one, on a hairline; danger wears the late color. */
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .btn{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:0 11.5px;
    border:1px solid var(--mustard);border-radius:2px;background:transparent;color:var(--mustard);
    font-size:11.52px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;line-height:1.2;text-decoration:none;}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .btn[hidden]{display:none;}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .btn:is(:hover, .topnav-new[aria-expanded="true"]){background:var(--btn-bg);border-color:var(--btn-bg);color:var(--btn-ink);}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .btn.lg{min-height:47px;padding:0 23px;font-size:12.8px;}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .btn.small{min-height:26px;padding:0 9px;font-size:10.56px;}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .btn.ghost{border-color:var(--line-strong);color:var(--ink);}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .btn.ghost:hover{background:transparent;border-color:var(--ink);color:var(--ink);}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .btn.danger{border-color:var(--brick);color:var(--brick);}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .btn.danger:hover{background:var(--brick-soft);border-color:var(--brick);color:var(--brick);}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .btn:is(:disabled, :disabled:hover, .ghost:disabled:hover, .danger:disabled:hover){background:transparent;border-color:var(--line-strong);color:var(--text-muted);opacity:1;cursor:default;}
  @media (max-width:820px){
    html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.btn, .btn.small){min-height:44px;}
  }
  html[data-theme="plasmodium"] .badge.pending,html[data-theme="plasmodium"] .badge.st-waiting{color:#F0F870;}
  html[data-theme="plasmodium"] .badge.fulfilled,html[data-theme="plasmodium"] .badge.st-done,html[data-theme="plasmodium"] .badge.sentiment-nurture{color:#F0F870;}
  html[data-theme="plasmodium"] .badge.consigned,html[data-theme="plasmodium"] .badge.st-progress,html[data-theme="plasmodium"] .badge.sentiment-follow{background:var(--subtle-bg);color:var(--ink);}
  html[data-theme="oat"] .badge.pending,html[data-theme="oat"] .badge.st-waiting{color:#3F4200;}
  /* A link is the ink with a 1px underline; the browser's blue would be the
     only blue on a Plasmodium or Oat page. */
  html:is([data-theme="plasmodium"],[data-theme="oat"]) a{color:inherit;text-decoration-line:underline;text-decoration-thickness:1px;text-underline-offset:3px;text-decoration-color:var(--line-strong);}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) a:hover{text-decoration-color:currentColor;}

  /* Forest - deep green dark, the green-black the retired Nightshade had. */
  html[data-theme="forest"]{
    --ink:#E7EFE4; --ink-soft:#BCCBB7;
    --paper:#101A13; --paper-raised:#19251C;
    --line:#2A3A2C; --line-strong:#3C4E3E;
    --mustard:#D6A356; --mustard-soft:#3C3320;
    --sage:#8CBE97; --sage-soft:#213022;
    --brick:#E28B7E; --brick-soft:#3B2523;
    --blue:#7FB3CC; --blue-soft:#1B2F37;
    --green-dot:#71CB86; --yellow-dot:#E1C25D;
    --text-muted:#849081; --subtle-bg:#1E2C21;
    --violet:#A29ED8; --violet-soft:#292B40;
    --plum:#C08FAF; --plum-soft:#372936;
    --teal:#6BC0B0; --teal-soft:#173330;
    --sage-ink:#BFDBC6; --mustard-ink:#EDCE97; --blue-ink:#BFDAE9;
    --violet-ink:#CBC8EE; --brick-ink:#F1B9AF; --plum-ink:#E2C1D6;
    --teal-ink:#A7DCD2;
  }
  html[data-scheme="dark"] .badge.pending{color:#E8C98A;}
  html[data-scheme="dark"] .badge.fulfilled{color:#BFE0C6;}
  html[data-scheme="dark"] .badge.paid{color:#12281A;}
  html[data-scheme="dark"] .badge.consigned{color:#BFDCEA;}
  html[data-scheme="dark"] .badge.st-waiting{color:#E8C98A;}
  html[data-scheme="dark"] .badge.st-progress{color:#BFDCEA;}
  html[data-scheme="dark"] .badge.st-done{color:#BFE0C6;}
  html[data-scheme="dark"] .badge.sentiment-not{color:#F0B7AE;}
  html[data-scheme="dark"] .badge.sentiment-follow{color:#BFDCEA;}
  html[data-scheme="dark"] .badge.sentiment-nurture{color:#BFE0C6;}
  html[data-scheme="dark"] .badge.warn{color:#F0B7AE;}
  html[data-scheme="dark"] .badge.sentiment-connected{color:#12281A;}
  /* Physare badges stay in its own greys and yellow: the dark-scheme blues
     above would be the only blue on the page. Waiting and done wear the
     yellow; progress, consigned and follow-up are quiet grey. */
  html[data-theme="physare"] .badge.pending,html[data-theme="physare"] .badge.st-waiting{color:#E9F26B;}
  html[data-theme="physare"] .badge.fulfilled,html[data-theme="physare"] .badge.st-done,html[data-theme="physare"] .badge.sentiment-nurture{color:#E9F26B;}
  html[data-theme="physare"] .badge.consigned,html[data-theme="physare"] .badge.st-progress,html[data-theme="physare"] .badge.sentiment-follow{background:var(--subtle-bg);color:var(--ink);}
  body{transition:background-color 0.15s ease, color 0.15s ease;}
  *{box-sizing:border-box;}
  body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--font-ui);-webkit-font-smoothing:antialiased;}
  .brand-mark{font-family:var(--font-display);font-weight:600;font-size:21px;letter-spacing:-0.01em;}
  /* The lockup: the name, and the vendor's byline small and spaced beneath it. */
  .brand-lockup{display:flex;flex-direction:column;line-height:1;}
  .brand-byline{display:block;font-family:var(--font-ui);font-size:9px;letter-spacing:0.22em;text-transform:uppercase;color:var(--text-muted);margin-top:5px;}


  /* Outline icons, drawn from the sprite in index.html.
     `stroke:currentColor` is the whole reason this works across every theme:
     the icon inherits its control's color, so it lightens on hover without a
     single extra rule. Never give an icon its own color here or that stops
     being true. */
  .ic{width:17px;height:17px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;}
  /* Buttons are inline rather than flex, so the icon is aligned optically
     against the text baseline instead of being centred by the layout. */
  .btn .ic{vertical-align:-3.5px;margin-right:5px;width:15px;height:15px;}
  .btn .ic.solo{margin:0;}
  .page-title .ic{width:21px;height:21px;vertical-align:-3px;margin-right:8px;}


  /*
   * Theme picker. Each swatch has to show ITS OWN colours, not the active
   * theme's - a `data-theme` attribute on an element inside the page doesn't
   * pick up the html[data-theme=…] blocks, so the four colours each swatch
   * needs are restated here. Keep them in step with the theme blocks above; a
   * swatch that lies about a theme is worse than no swatch.
   */
  /* Five across, two down. The count is fixed rather than auto-fit because
     auto-fit lands on three or four columns at some widths, and ten themes
     across three columns leaves a ragged last row - which is the thing this
     grid exists to avoid. Both 5 and 2 divide ten exactly. */
  /* The sample under the font dropdown. Always rendered in the current choice,
     because browsers vary in how faithfully they style <option> text and the
     dropdown alone can't be trusted to show the difference. */
  .font-sample{display:flex;flex-direction:column;gap:3px;margin-top:12px;padding:12px 14px;background:var(--subtle-bg);border:1px solid var(--line);border-radius:var(--radius);}
  .font-sample-display{font-family:var(--font-display);font-size:19px;font-weight:600;color:var(--ink);}
  .font-sample-ui{font-family:var(--font-ui);font-size:13px;color:var(--ink-soft);}
  .font-sample-mono{font-family:var(--font-mono);font-size:12px;color:var(--text-muted);}


  .block-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;}
  @media (max-width:900px){ .block-grid{grid-template-columns:repeat(1,1fr);} }
  /*
   * The block preview draws its own treatment rather than inheriting the
   * active one - the same reason the theme swatches restate their colours.
   * These are literal values, not the --panel-* variables, or every card would
   * show whichever style is already applied.
   */
  .block-preview{display:block;background:var(--paper);border-radius:5px;padding:7px;height:52px;}
  .block-preview-panel{display:flex;flex-direction:column;gap:4px;height:100%;background:var(--paper-raised);border:1px solid var(--line);border-radius:6px;padding:7px 8px;}
  .block-preview-title{display:block;height:6px;width:52%;border-radius:2px;background:var(--ink-soft);}
  .block-preview-line{display:block;height:4px;border-radius:2px;background:var(--line-strong);}
  .block-preview-line.short{width:60%;}
  .block-preview[data-blocks="flat"] .block-preview-panel{background:var(--subtle-bg);border-color:transparent;}
  .block-preview[data-blocks="elevated"] .block-preview-panel{border-color:transparent;border-radius:9px;box-shadow:0 2px 6px rgba(31,58,52,0.16);}
  html[data-scheme="dark"] .block-preview[data-blocks="elevated"] .block-preview-panel{box-shadow:0 2px 7px rgba(0,0,0,0.5);}
  .block-preview[data-blocks="ruled"] .block-preview-panel{background:transparent;border:none;border-radius:0;padding:0;}
  .block-preview[data-blocks="ruled"] .block-preview-title{border-bottom:1px solid var(--line);padding-bottom:4px;height:10px;width:100%;background:transparent;border-radius:0;}
  .block-preview[data-blocks="compact"] .block-preview-panel{border-radius:3px;padding:4px 5px;gap:3px;}

  .theme-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;}
  @media (max-width:900px){ .theme-grid{grid-template-columns:repeat(2,1fr);} }
  .theme-card{display:flex;flex-direction:column;gap:6px;text-align:left;background:var(--paper-raised);border:1px solid var(--line);border-radius:8px;padding:10px;cursor:pointer;font:inherit;color:inherit;}
  .theme-card:hover{border-color:var(--line-strong);}
  /* 2px so the selected card doesn't shift by a pixel when it becomes selected. */
  .theme-card.selected{border:2px solid var(--sage);padding:9px;}
  .theme-card-name{font-size:13px;font-weight:500;color:var(--ink);}
  .theme-card-tick{color:var(--green-dot);}
  .theme-card-note{font-size:11px;color:var(--text-muted);line-height:1.4;}
  .theme-swatch{display:flex;flex-direction:column;gap:4px;height:42px;border-radius:5px;border:1px solid var(--line);padding:5px;background:var(--sw-paper);}
  /* The top bar, drawn across the swatch. */
  .theme-swatch-rail{height:7px;flex:none;border-radius:2px;background:var(--sw-rail);}
  .theme-swatch-card{flex:1;border-radius:3px;background:var(--sw-card);border:1px solid var(--sw-line);}
  .theme-swatch[data-theme="garden"]{--sw-paper:#F5F1E8;--sw-rail:#E4E9DF;--sw-card:#FFFFFF;--sw-line:#DAD3C2;}
  .theme-swatch[data-theme="ink"]{--sw-paper:#F4F4F1;--sw-rail:#DEE9E1;--sw-card:#FFFFFF;--sw-line:#DCDCD6;}
  .theme-swatch[data-theme="moss"]{--sw-paper:#EFF2EA;--sw-rail:#D8E7D9;--sw-card:#FDFEFB;--sw-line:#D2DBC9;}
  .theme-swatch[data-theme="slate"]{--sw-paper:#1B1F24;--sw-rail:#26332B;--sw-card:#242A31;--sw-line:#333B45;}
  .theme-swatch[data-theme="dusk"]{--sw-paper:#15161F;--sw-rail:#223026;--sw-card:#1E2029;--sw-line:#2E3040;}
  .theme-swatch[data-theme="ember"]{--sw-paper:#1E1A17;--sw-rail:#2C3527;--sw-card:#292421;--sw-line:#3D3530;}
  .theme-swatch[data-theme="newsprint"]{--sw-paper:#F7F7F5;--sw-rail:#E2E7E2;--sw-card:#FFFFFF;--sw-line:#DEDEDA;}
  .theme-swatch[data-theme="sandstone"]{--sw-paper:#F4EFE6;--sw-rail:#E3E8DC;--sw-card:#FFFCF7;--sw-line:#E2D9CB;}
  .theme-swatch[data-theme="obsidian"]{--sw-paper:#0E0F11;--sw-rail:#1D2A21;--sw-card:#17191C;--sw-line:#282B30;}
  .theme-swatch[data-theme="forest"]{--sw-paper:#101A13;--sw-rail:#213022;--sw-card:#19251C;--sw-line:#2A3A2C;}
  .theme-swatch[data-theme="physare"]{--sw-paper:#0B0B0C;--sw-rail:#141416;--sw-card:#1A1A1C;--sw-line:#3A3A3E;}
  .theme-swatch[data-theme="plasmodium"]{--sw-paper:#000000;--sw-rail:#000000;--sw-card:#101010;--sw-line:#F0F870;}
  .theme-swatch[data-theme="oat"]{--sw-paper:#F7F6F0;--sw-rail:#000000;--sw-card:#FFFFFF;--sw-line:#CBC9BC;}


  .dropdown-widget{position:relative;}
  .dropdown-panel{display:none;position:absolute;left:100%;top:0;margin-left:6px;background:var(--paper-raised);border:1px solid var(--line);border-radius:8px;width:320px;max-height:460px;overflow-y:auto;z-index:40;box-shadow:0 4px 14px rgba(31,58,52,0.14);padding:12px;}
  .dropdown-panel.open{display:block;}
  @media (max-width:820px){ .dropdown-panel{left:auto;right:0;top:100%;margin-left:0;margin-top:6px;} }
  .dropdown-panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;gap:8px;}
  .dropdown-panel-title{font-family:var(--font-display);font-size:15px;font-weight:600;}



  /* ---------- the shell: a top bar, the page, and on a phone a tab bar ----------
   *
   * One shell for every theme. The bar is 64px with a hairline beneath and
   * stays put as the page scrolls: the wordmark, the headings centered, then
   * search, the bell, New and the account button. Under 821px it is the
   * phone's 60px top row (wordmark, search, bell, New) and the headings move
   * to five tabs at the foot. shell.js fills the headings from the manifest.
   * Everything here reads the theme's tokens; the two Physare themes restate
   * the look at the end of this file.
   */
  .app{min-height:100vh;display:flex;flex-direction:column;}
  .main{flex:1 1 auto;min-width:0;padding:40px 56px 72px;}

  /* The side columns are as wide as each other while there is room, so the
     headings sit in the middle of the bar; when there is not, each takes only
     what it holds and the headings give way toward the wordmark. */
  .topnav{position:sticky;top:0;z-index:50;flex:none;height:64px;display:grid;grid-template-columns:minmax(max-content,1fr) auto minmax(max-content,1fr);
    align-items:center;column-gap:32px;padding:0 56px;background:var(--paper);border-bottom:1px solid var(--line);}
  .wordmark{justify-self:start;display:inline-flex;align-items:center;height:44px;padding:0;border:0;background:none;color:var(--ink);font:inherit;cursor:pointer;}
  .wordmark .brand-mark{font-size:23.2px;line-height:1;}
  .wordmark .brand-logo{height:32px;}
  .topnav-links{display:flex;align-items:center;gap:34px;}
  .topnav-link{padding:4px 0;border:0;border-bottom:1px solid transparent;background:none;color:var(--ink-soft);font:inherit;font-size:14.08px;line-height:1.5;white-space:nowrap;cursor:pointer;}
  .topnav-link:hover{color:var(--ink);}
  .topnav-link.on,.topnav-link[aria-expanded="true"]{color:var(--ink);border-bottom-color:var(--ink);}
  .topnav-tools{justify-self:end;display:flex;align-items:center;gap:18px;}

  /* An icon button: the bell, and search where the field is folded away. */
  .icb{position:relative;flex:none;display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:32px;height:32px;padding:0;border:0;background:none;color:var(--ink-soft);font:inherit;cursor:pointer;}
  .icb:hover,.icb[aria-expanded="true"]{color:var(--ink);}
  .icb .ic{width:17px;height:17px;stroke-width:1.5;}
  /* Unread: the number beside the bell, in the accent. */
  .topnav-bell .n{font-size:11.52px;font-weight:500;line-height:1;color:var(--mustard);}
  .topnav-bell .n[hidden]{display:none;}
  .topnav-find{display:none;}
  .topnav-new{flex:none;}
  .topnav-new .ic{width:11px;height:11px;margin:0 0 0 9px;stroke-width:2;vertical-align:-1px;}

  /* The account button: the person's initial in a ring. Its menu is fixed to
     the screen, placed from the button. */
  .acct-btn{flex:none;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;padding:0;border-radius:50%;border:1px solid var(--line-strong);
    background:none;color:var(--ink);font:inherit;font-size:12px;font-weight:500;line-height:1;cursor:pointer;}
  .acct-btn:hover,.acct-btn[aria-expanded="true"]{border-color:var(--ink);}

  /* Search: an underlined field in the bar. The panel hangs from the bar's
     lower edge, under the field's right end. z-index above the page but below
     modals, which own the screen when they are open. */
  .gs-wrap{position:relative;width:190px;}
  .gs-box{display:flex;align-items:center;gap:9px;height:32px;border-bottom:1px solid var(--line);}
  .gs-box:focus-within{border-bottom-color:var(--ink);}
  .gs-box > .ic{width:15px;height:15px;stroke-width:1.5;color:var(--ink-soft);}
  /* .gs-box .gs-input, not .gs-input: the generic control rule is (0,1,1) and a
     bare class is (0,1,0), so it WON and the input drew a box inside the box.
     Every property the generic rule sets has to be named here, or whichever is
     missed keeps leaking through. */
  .gs-box .gs-input{flex:1;min-width:0;height:auto;min-height:0;border:0;border-radius:0;background:transparent;padding:0;
    font:inherit;font-size:14.08px;line-height:20px;color:var(--ink);outline:none;box-shadow:none;}
  .gs-box .gs-input:focus{border:0;box-shadow:none;outline:none;}
  .gs-box .gs-input::placeholder{color:var(--ink-soft);opacity:1;}
  .gs-kbd{flex:none;font-size:11px;font-weight:500;letter-spacing:0.1em;text-transform:uppercase;color:var(--text-muted);white-space:nowrap;}
  .gs-clear{flex:none;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;background:none;color:var(--ink-soft);cursor:pointer;}
  .gs-clear:hover{color:var(--ink);}
  .gs-clear .ic{width:13px;height:13px;}
  /* The box is built once, so the clear button and the shortcut label swap here. */
  .gs-input:placeholder-shown ~ .gs-clear, .gs-input:not(:placeholder-shown) ~ .gs-kbd{display:none;}
  .gs-close{display:none;}
  .gs-panel{position:absolute;right:0;top:calc(100% + 16px);width:min(520px, 92vw);z-index:60;}
  .gs-results{background:var(--paper-raised);border:1px solid var(--line);border-top:0;max-height:min(70vh, 620px);overflow-y:auto;}
  .gs-hint{margin:0;padding:14px 16px;font-size:13px;line-height:1.5;color:var(--ink-soft);}
  .gs-scope-chip{border:0;border-bottom:1px solid var(--line-strong);background:none;font:inherit;font-size:12px;color:var(--ink);padding:0 0 1px;margin:2px 6px 0 0;cursor:pointer;}
  .gs-scope-chip:hover{border-bottom-color:var(--ink);}
  /* The active scope, stated above the results so the narrowing is never
     invisible: a search that quietly looked in one place would read as a search
     that found little. */
  .gs-scopebar{display:flex;align-items:center;gap:8px;padding:10px 16px;border-bottom:1px solid var(--line);color:var(--ink-soft);font-size:12px;}
  .gs-scopebar strong{color:var(--ink);font-weight:500;}
  .gs-scope-clear{border:0;background:transparent;font:inherit;font-size:12px;color:var(--ink);cursor:pointer;text-decoration:underline;text-underline-offset:3px;padding:0;}
  .gs-group + .gs-group, .gs-group + .gs-hint{border-top:1px solid var(--line);}
  .gs-group-head{display:flex;justify-content:space-between;gap:10px;padding:14px 16px 6px;font-size:11.52px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;color:var(--text-muted);}
  /* The navigation path, which is the answer to "how do I find this again".
     Stated once per group rather than repeated on every row. */
  .gs-path{letter-spacing:0;text-transform:none;font-weight:400;font-size:12px;white-space:nowrap;}
  .gs-row{display:flex;align-items:baseline;justify-content:space-between;gap:16px;width:100%;min-height:40px;padding:9px 16px;border:0;background:transparent;font:inherit;color:inherit;text-align:left;cursor:pointer;}
  .gs-row:hover,.gs-row.active{background:var(--subtle-bg);}
  .gs-row-title{flex:0 1 auto;min-width:0;font-size:14.4px;}
  .gs-row-sub{flex:0 1 auto;min-width:0;font-size:12.5px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .gs-more{padding:2px 16px 12px;font-size:12px;color:var(--text-muted);}

  /* Small menus fixed to the screen: the account's, New's, an engagement's
     More. Chrome, so they keep a border in every block style. */
  .acct-menu{position:fixed;z-index:60;min-width:204px;padding:4px;background:var(--paper-raised);border:1px solid var(--line);
    border-radius:var(--radius);font-family:var(--font-ui);}
  .acct-menu-who{padding:8px 10px 6px;font-size:12px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .acct-menu button{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border:0;border-radius:0;
    background:transparent;color:var(--ink);font:inherit;font-size:13px;text-align:left;cursor:pointer;}
  .acct-menu button:hover,.acct-menu button:focus-visible{background:var(--subtle-bg);outline:none;}
  .acct-menu .ic{width:16px;height:16px;color:var(--ink-soft);}
  .acct-menu .acct-out,.acct-menu .acct-out .ic{color:var(--brick);}
  .acct-menu hr{border:0;border-top:1px solid var(--line);margin:4px 0;}
  /* One the bar opens hangs from its hairline. */
  .bar-menu{border-top:0;}
  /* New's menu: uppercase labels over rows. */
  .quick-add-menu{width:min(294px, calc(100vw - 16px));padding:0 0 6px;max-height:calc(100vh - 88px);overflow-y:auto;}
  .quick-add-menu .acct-menu-who{padding:14px 14px 6px;font-size:11.52px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;color:var(--text-muted);}
  .quick-add-menu button{min-height:40px;padding:0 14px;font-size:14.08px;}
  .quick-add-menu hr{margin:6px 0 0;}

  /* The More menu: groups side by side under the bar, Settings and Pin
     screens in the foot. */
  .shell-menu{position:fixed;z-index:60;max-width:calc(100vw - 32px);max-height:calc(100vh - 96px);overflow-y:auto;padding:28px 32px 0;
    background:var(--paper-raised);border:1px solid var(--line);border-top:0;font-family:var(--font-ui);}
  .shell-menu-groups{display:flex;flex-wrap:wrap;gap:28px 48px;}
  .shell-menu-group{display:flex;flex-direction:column;min-width:148px;}
  .shell-menu-group > .lb{margin-bottom:8px;}
  .shell-menu-item{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:34px;margin:0 -10px;padding:0 10px;border:0;background:none;
    color:var(--ink-soft);font:inherit;font-size:14.4px;line-height:1.4;text-align:left;white-space:nowrap;cursor:pointer;}
  .shell-menu-item:hover,.shell-menu-item:focus-visible{color:var(--ink);}
  .shell-menu-item.on{color:var(--ink);}
  .shell-menu-item.on > span:first-child{border-bottom:1px solid var(--ink);}
  .shell-menu-item .n{font-size:11.52px;font-weight:500;color:var(--text-muted);}
  .shell-menu-item .n[data-zero]{display:none;}
  .shell-menu-item.acct-out{color:var(--brick);}
  .shell-menu-foot{display:flex;justify-content:space-between;gap:28px;margin-top:22px;padding:8px 0 10px;border-top:1px solid var(--line);}

  /* Notifications, under the bell. */
  .notif-panel{position:fixed;z-index:60;width:360px;max-height:min(70vh, 560px);overflow-y:auto;background:var(--paper-raised);border:1px solid var(--line);border-top:0;font-family:var(--font-ui);}
  .notif-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;padding:0 8px 0 16px;}
  .notif-head-actions{display:flex;align-items:center;gap:14px;}
  .notif-gear{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:1px solid var(--line-strong);border-radius:2px;background:none;color:var(--ink-soft);cursor:pointer;}
  .notif-gear:hover,.notif-gear:focus-visible{color:var(--ink);border-color:var(--ink);}
  .notif-gear .ic{width:16px;height:16px;}
  /* A row: the notice (its kind's icon, the words) and a "..." for its menu. */
  .notif-row{position:relative;display:flex;align-items:flex-start;border-top:1px solid var(--line);}
  .notif-row:hover,.notif-row:focus-within{background:var(--subtle-bg);}
  .notif-open{flex:1;min-width:0;display:flex;align-items:flex-start;gap:12px;padding:12px 4px 12px 16px;border:0;background:none;color:var(--ink);font:inherit;text-align:left;cursor:pointer;}
  .notif-ic{flex:none;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:var(--sage-soft);color:var(--sage-ink, var(--ink));}
  .notif-ic .ic{width:15px;height:15px;}
  .notif-ic.sm{width:22px;height:22px;}
  .notif-ic.sm .ic{width:12px;height:12px;}
  .notif-ic.t-mustard{background:var(--mustard-soft);color:var(--mustard-ink, var(--ink));}
  .notif-ic.t-blue{background:var(--blue-soft);color:var(--blue-ink, var(--ink));}
  .notif-ic.t-violet{background:var(--violet-soft);color:var(--violet-ink, var(--ink));}
  .notif-ic.t-brick{background:var(--brick-soft);color:var(--brick-ink, var(--ink));}
  .notif-ic.t-plum{background:var(--plum-soft);color:var(--plum-ink, var(--ink));}
  .notif-ic.t-teal{background:var(--teal-soft);color:var(--teal-ink, var(--ink));}
  .notif-text{display:flex;flex-direction:column;min-width:0;}
  .notif-row.read .notif-title{color:var(--ink-soft);}
  .notif-title{display:block;font-size:14.4px;line-height:1.4;}
  /* Unread: a small square in the accent before the title (no circles in this look). */
  .notif-dot{display:inline-block;width:6px;height:6px;margin:0 7px 2px 0;vertical-align:middle;background:var(--mustard);}
  .notif-body{display:block;margin-top:2px;font-size:13px;line-height:1.45;color:var(--ink-soft);}
  .notif-when{display:block;margin-top:5px;font-size:11.52px;color:var(--text-muted);}
  .notif-more{flex:none;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;margin:10px 8px 0 0;padding:0;border:1px solid var(--line-strong);border-radius:2px;background:var(--paper-raised);color:var(--ink-soft);cursor:pointer;}
  .notif-more .ic{width:16px;height:16px;}
  .notif-more:hover,.notif-more[aria-expanded="true"]{color:var(--ink);border-color:var(--ink);}
  @media (hover:hover) and (pointer:fine){
    .notif-more{opacity:0;}
    .notif-row:hover .notif-more,.notif-row:focus-within .notif-more,.notif-more[aria-expanded="true"]{opacity:1;}
  }
  .notif-none{margin:0;padding:14px 16px 18px;border-top:1px solid var(--line);font-size:14px;color:var(--ink-soft);}
  /* The row's menu: the tile color and one hairline, no shadow; a sheet on a phone. */
  .notif-menu{position:fixed;z-index:1650;width:300px;padding:4px;background:var(--paper-raised);border:1px solid var(--line-strong);border-radius:2px;box-sizing:border-box;font-family:var(--font-ui);}
  .notif-menu-head{display:flex;align-items:center;gap:10px;padding:8px 12px 6px;font-size:11.52px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;color:var(--text-muted);}
  .notif-mi{display:flex;align-items:center;gap:12px;width:100%;min-height:36px;padding:6px 12px;border:0;background:none;color:var(--ink);font:inherit;font-size:14px;text-align:left;cursor:pointer;}
  .notif-mi:hover,.notif-mi:focus-visible{background:var(--subtle-bg);outline:none;}
  .notif-mi .ic{flex:none;width:16px;height:16px;color:var(--ink-soft);}
  .notif-mi-sep{height:1px;margin:4px 8px;background:var(--line);}
  .notif-menu-back{position:fixed;inset:0;z-index:1640;background:var(--scrim, rgba(0,0,0,0.5));}
  .notif-menu.is-sheet{left:0;right:0;bottom:0;top:auto;width:auto;padding:4px 8px calc(24px + env(safe-area-inset-bottom));border-left:0;border-right:0;border-bottom:0;}
  .notif-menu-grip{width:40px;height:4px;margin:6px auto 8px;background:var(--line-strong);}
  .notif-menu.is-sheet .notif-menu-head{padding:4px 16px 8px;}
  .notif-menu.is-sheet .notif-mi{min-height:48px;padding:0 16px;font-size:16px;}
  #app-toast .toast-action{margin-left:12px;min-height:32px;padding:4px 8px;border:0;background:none;color:inherit;font:inherit;font-weight:600;text-decoration:underline;text-underline-offset:3px;cursor:pointer;}

  /* Settings, Account, Notifications: a switch per kind, grouped by area. */
  .ns-off-strip{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px;margin-bottom:22px;padding:10px 16px;border:1px solid var(--mustard);color:var(--ink);font-size:14px;}
  .ns-group{margin-bottom:22px;}
  .ns-group-title{display:block;margin:0 0 4px;}
  .ns-row{display:flex;align-items:center;gap:14px;padding:13px 0;border-top:1px solid var(--line);}
  .ns-row:first-of-type{border-top:0;}
  .ns-text{flex:1;min-width:0;}
  .ns-name{font-size:14.4px;color:var(--ink);}
  .ns-always{white-space:nowrap;}

  /* Pin screens: every screen with Pin or Pinned at its right. */
  .pin-pick-top{display:flex;align-items:center;gap:12px;margin-bottom:4px;}
  .pin-pick-top input{flex:1;min-width:0;}
  .pin-pick-list{max-height:min(52vh, 440px);overflow-y:auto;margin:0 -4px;padding:0 4px;}
  .pin-pick-group > .lb{margin:18px 0 4px;}
  .pin-pick-row{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:42px;padding:0;border:0;border-top:1px solid var(--line);
    background:transparent;color:var(--ink);font:inherit;font-size:14.4px;text-align:left;cursor:pointer;}
  .pin-pick-row:hover .pin-pick-state{color:var(--ink);}
  .pin-pick-row .pin-pick-state{color:var(--ink-soft);}
  .pin-pick-row.pinned .pin-pick-state{color:var(--mustard);}

  /* The phone's tab bar: in the DOM at every width, shown under 821px. */
  .tabbar{display:none;}

  /* Where the bar has no room for the field, search folds behind its button;
     opened (html.search-open, shell.js) it lies over the whole bar. */
  @media (max-width:1180px){
    .topnav{padding:0 32px;column-gap:24px;}
    .topnav-links{gap:26px;}
    .topnav-tools{gap:14px;}
    .main{padding:36px 32px 64px;}
    .topnav-search{display:none;}
    .topnav-find{display:inline-flex;}
    html.search-open .topnav-search{display:flex;align-items:center;position:absolute;inset:0;z-index:2;padding:0 32px;background:var(--paper);}
    .topnav-search .gs-wrap{position:static;width:100%;}
    .topnav-search .gs-box{height:40px;}
    .topnav-search .gs-panel{left:0;right:0;top:100%;width:auto;}
    .topnav-search .gs-results{border-left:0;border-right:0;}
    .topnav-search .gs-kbd{display:none;}
    .gs-close{display:inline-flex;align-items:center;flex:none;height:32px;padding:0 0 0 12px;border:0;background:none;color:var(--ink-soft);
      font:inherit;font-size:11.52px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;cursor:pointer;}
    .gs-close:hover{color:var(--ink);}
  }
  @media (max-width:960px){
    .topnav{padding:0 24px;column-gap:16px;}
    .topnav-links{gap:20px;}
    .main{padding-left:24px;padding-right:24px;}
    html.search-open .topnav-search{padding:0 24px;}
  }

  @media (max-width:820px){
    /* The top row: wordmark, search, bell, New. It clears the status bar and
       notch in the installed app; the page clears the tab bar at the foot. */
    .topnav{display:flex;justify-content:space-between;column-gap:0;height:calc(60px + env(safe-area-inset-top));
      padding:env(safe-area-inset-top) calc(12px + env(safe-area-inset-right)) 0 calc(20px + env(safe-area-inset-left));}
    .topnav-links, .topnav .acct-btn{display:none;}
    .topnav-tools{gap:2px;}
    .topnav .icb{min-width:44px;height:44px;}
    .topnav .icb .ic{width:19px;height:19px;}
    .topnav-new{min-height:44px;padding:0 14px;margin-left:6px;}
    html.search-open .topnav-search{top:env(safe-area-inset-top);padding:0 calc(12px + env(safe-area-inset-right)) 0 calc(20px + env(safe-area-inset-left));}
    .topnav-search .gs-box{height:44px;}
    .topnav-search .gs-box .gs-input{font-size:16px;}
    .topnav-search .gs-results{max-height:calc(100vh - 124px - env(safe-area-inset-top) - env(safe-area-inset-bottom));}
    .gs-clear, .gs-close{min-width:44px;height:44px;justify-content:center;padding:0;}
    .gs-row{min-height:48px;}

    .main{padding:26px calc(20px + env(safe-area-inset-right)) calc(64px + 48px + env(safe-area-inset-bottom)) calc(20px + env(safe-area-inset-left));}

    /* Fixed above the gesture bar. Dialogs sit above it: the overlay is
       z-index 100, the bar 90. */
    .tabbar{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);position:fixed;left:0;right:0;bottom:0;z-index:90;
      height:calc(64px + env(safe-area-inset-bottom));padding:0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
      background:var(--paper);border-top:1px solid var(--line);}
    .tabbar-tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0;padding:0 2px;border:0;background:none;
      color:var(--ink-soft);font:inherit;font-size:10px;font-weight:500;letter-spacing:0.1em;text-transform:uppercase;line-height:1.2;cursor:pointer;-webkit-tap-highlight-color:transparent;}
    .tabbar-tab .ic{width:20px;height:20px;stroke-width:1.5;}
    .tabbar-tab > span{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
    .tabbar-tab.on{color:var(--ink);}
    /* The toast (an inline style, hence important) rises above the bar. */
    #app-toast{bottom:calc(80px + env(safe-area-inset-bottom)) !important;}

    /* Menu: a sheet between the top row and the tabs, one group under another,
       the account at its foot. */
    .shell-menu.sheet{left:0;right:0;top:calc(60px + env(safe-area-inset-top));bottom:calc(64px + env(safe-area-inset-bottom));z-index:80;max-width:none;max-height:none;
      padding:4px calc(20px + env(safe-area-inset-right)) 28px calc(20px + env(safe-area-inset-left));background:var(--paper);border:0;overscroll-behavior:contain;}
    .shell-menu.sheet .shell-menu-groups{display:block;}
    .shell-menu.sheet .shell-menu-group{padding:20px 0 8px;border-bottom:1px solid var(--line);}
    .shell-menu.sheet .shell-menu-item{width:calc(100% + 20px);min-height:48px;font-size:16px;}
    .shell-menu.sheet .shell-menu-foot{display:block;margin:0;padding:8px 0;border-top:0;border-bottom:1px solid var(--line);}
    .shell-menu.sheet .shell-menu-acct{border-bottom:0;}
    /* The page behind the sheet does not scroll under a finger on it. */
    html.shell-menu-open, html.shell-menu-open body{overflow:hidden;}

    .notif-panel{left:0;right:0 !important;width:auto;max-height:calc(100vh - 160px);border-left:0;border-right:0;}
    .notif-gear,.notif-more{width:44px;height:44px;}
    .notif-more{margin:4px 4px 0 0;border:0;background:none;}
    .notif-title{font-size:15.2px;}
    .notif-body{font-size:14px;}
    .ns-row{min-height:44px;}
    .acct-menu button, .quick-add-menu button{min-height:44px;}
  }

  /* A pull down at the top of the installed app would reload it and lose the
     screen somebody was on. */
  @media (display-mode:standalone), (display-mode:fullscreen){
    html, body{overscroll-behavior-y:none;}
  }

  /* ---------- the system's parts, for every screen ----------
   *
   * The building blocks later screens are made of, named as the approved
   * boards name them (docs/redesign/physare.css). They read the theme's
   * tokens, so they work in every theme and take the Physare look in its two.
   *
   *   .d1 .d2 .d3   display type: a page's title, a panel's, a figure
   *   .lede .sec .sm  the line under a title; supporting text; the smaller size
   *   .lb           a label (.w ink, .a accent, .r late)
   *   .n            tabular figures
   *   .tl           a text link
   *   .tabs > .tab  a tab row on a hairline (.on is current; .tabs.acid lights it in the accent)
   *   .rh > .rule   a section head: label, a rule that fills the row, label
   *   .step         a numbered step under a hairline (.on is the current one), with .step-top
   *   .row.sel      the picked row
   *   .cut          one line, cut with an ellipsis
   */
  .d1{margin:0;font-family:var(--font-display);font-size:48.96px;font-weight:300;letter-spacing:-0.025em;line-height:1.08;}
  .d2{margin:0;font-family:var(--font-display);font-size:30.4px;font-weight:300;letter-spacing:-0.015em;line-height:1.15;}
  .d3{margin:0;font-family:var(--font-display);font-size:24px;font-weight:300;letter-spacing:-0.015em;line-height:1.15;}
  .lede{margin:0;font-size:19.44px;line-height:1.45;color:var(--ink-soft);}
  .sec{color:var(--ink-soft);}
  .sm{font-size:14.4px;}
  .lb{font-size:11.52px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;color:var(--text-muted);line-height:1.5;white-space:nowrap;}
  .lb.w{color:var(--ink);}
  .lb.a{color:var(--mustard);}
  .lb.r{color:var(--brick);}
  .n{font-variant-numeric:tabular-nums;}
  .tl{display:inline;padding:0 0 2px;border:0;border-bottom:1px solid var(--line-strong);background:none;color:var(--ink);font:inherit;text-decoration:none;cursor:pointer;}
  .tl:hover{border-bottom-color:var(--ink);}
  .tl.lb{color:var(--ink);}

  /* The row's hairline is a shadow rather than a border, so the current tab's
     own edge draws over it without a negative margin. */
  .tabs{display:flex;gap:28px;box-shadow:inset 0 -1px 0 var(--line);}
  .tab{flex:none;display:inline-flex;align-items:baseline;gap:7px;padding:0 0 12px;border:0;border-bottom:1px solid transparent;background:none;
    color:var(--text-muted);font:inherit;font-size:11.52px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;line-height:1.5;white-space:nowrap;cursor:pointer;}
  /* Only a real pointer lights a tab under it: on a phone a tap leaves the
     hover behind, and a second tab would look current. */
  @media (hover:hover){ .tab:hover{color:var(--ink);} }
  .tab.on,.tab[aria-selected="true"]{color:var(--ink);border-bottom-color:var(--ink);}
  .tabs.acid .tab.on,.tabs.acid .tab[aria-selected="true"]{color:var(--mustard);border-bottom-color:var(--mustard);}
  .tab .n[data-zero]{display:none;}
  /* The row under a page's title (shell.js, placeHeadingTabs). */
  .heading-tabs{position:relative;margin:0 0 28px;}
  @media (max-width:820px){
    /* Sideways on a phone, never wider than the page. */
    .tabs{gap:22px;overflow-x:auto;scrollbar-width:none;}
    .tabs::-webkit-scrollbar{display:none;}
    .tab{align-items:center;height:44px;padding:0;}
    .tab:focus-visible{outline-offset:-2px;}
    .heading-tabs{margin-bottom:22px;}
  }
  /* A tab row with more past an edge fades there, so a cut word reads as
     "more this way" (platform.js, installTabRowHints, sets the classes). */
  :is(.tabs, .list-tabs, .co-tabs).more-end{-webkit-mask-image:linear-gradient(to right, #000 calc(100% - 48px), transparent);mask-image:linear-gradient(to right, #000 calc(100% - 48px), transparent);}
  :is(.tabs, .list-tabs, .co-tabs).more-start{-webkit-mask-image:linear-gradient(to right, transparent, #000 48px);mask-image:linear-gradient(to right, transparent, #000 48px);}
  :is(.tabs, .list-tabs, .co-tabs).more-start.more-end{-webkit-mask-image:linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);mask-image:linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);}

  .rh{display:flex;align-items:center;gap:14px;}
  .rh > .rule{flex:1 1 auto;height:1px;background:var(--line);}
  .step{border-top:1px solid var(--line);padding-top:14px;}
  .step.on{border-top-color:var(--mustard);}
  .step-top{display:flex;justify-content:space-between;gap:12px;margin-bottom:18px;}
  .row.sel{background:var(--paper-raised);}
  .cut{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  @media (max-width:820px){
    .d1{font-size:36px;}
    .d2{font-size:26px;}
    .lede{font-size:17px;line-height:1.4;}
  }


  /* ---------- Today: the queue (shell.js, renderToday) ----------
   *
   * The home screen, as drawn on docs/redesign/Main.dc.html: the count as a
   * sentence, the kinds as tabs, the items under their clients, and beside
   * them the picked item. The page gives up its own padding so the hairline
   * between the two columns runs from the bar to the foot, and the picked item
   * stays put while the list scrolls. Under 821px it is one column, and a row
   * opens its item as a sheet. Rows are hairlines; the picked one sits on the
   * tile color with its arrow in the accent.
   */
  .main:has(> #view-root > .today){padding:0;}
  /* Not the calendar's today cell, which also carries .today. */
  .today:not(.calendar-cell){display:grid;grid-template-columns:minmax(0,1fr) clamp(380px, 36.1vw, 520px);align-items:start;min-height:calc(100vh - 64px);line-height:1.5;}
  .today-sheet{line-height:1.5;}
  .today-tabs .tab{padding-bottom:13px;}
  .today.is-clear,.today.is-wait{grid-template-columns:minmax(0,1fr);}
  .today-main{min-width:0;min-height:calc(100vh - 64px);padding:40px 48px 72px 56px;border-right:1px solid var(--line);}
  .today.is-clear .today-main,.today.is-wait .today-main{border-right:0;}
  .today.is-clear :is(.today-tabs, #today-list, .today-pane){display:none;}
  .today-date{margin:8px 0 26px;}
  .today-note{margin:-14px 0 24px;color:var(--brick);}
  .today-note[hidden]{display:none;}
  /* The time zone offer: one quiet line under the date, a text link and a dismiss. */
  .today-tz{display:flex;align-items:center;flex-wrap:wrap;gap:4px 14px;margin:-12px 0 24px;}
  .today-tz[hidden]{display:none;}
  .today-tz .tl{font-size:14.4px;}
  .today-tz-x{width:32px;height:32px;margin-left:-6px;color:var(--text-muted);}
  .today-tz-x .ic{width:14px;height:14px;}
  @media (max-width:820px){ .today-tz-x{width:44px;height:44px;} }
  .today-retry{margin-top:4px;}
  .today-none{margin:28px 0 0;}
  /* "Meetings today" (todayDrawAgenda): above the queue, never part of it. A
     section head, then a row a meeting: the time, the title with who is
     coming, and a text link at the right. */
  .today-agenda{margin:0 0 36px;}
  .today-agenda[hidden]{display:none;}
  .today-agenda > .rh{margin-bottom:6px;}
  .today-agenda-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:24px;min-height:64px;border-bottom:1px solid var(--line);}
  .today-agenda-main{display:grid;grid-template-columns:120px minmax(0,1fr);align-items:center;column-gap:24px;min-height:64px;padding:0;border:0;background:none;color:var(--ink);font:inherit;text-align:left;cursor:pointer;}
  .today-agenda-what{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
  @media (hover:hover){ .today-agenda-main:hover .today-agenda-title{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;text-decoration-color:var(--line-strong);} }
  .today-agenda-acts{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px 22px;}
  .today-group-head{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:24px 0 9px;}
  .today-group-head h2{margin:0;min-width:0;font-family:var(--font-ui);font-size:17px;font-weight:400;letter-spacing:-0.01em;line-height:1.5;}

  /* A row runs 16px past the column on each side, so the picked one's tile
     has room around its words; its hairline runs with it. */
  .today-row{display:grid;grid-template-columns:76px minmax(0,1fr) auto 16px;align-items:center;column-gap:20px;width:calc(100% + 32px);min-height:44px;margin:0 -16px;padding:0 16px;
    border:0;border-top:1px solid var(--line);border-radius:0;background:none;color:var(--ink);font:inherit;text-align:left;cursor:pointer;scroll-margin:88px 0 40px;}
  .today-row.sel{background:var(--paper-raised);}
  .today-row-what{display:flex;align-items:baseline;min-width:0;white-space:nowrap;}
  .today-row-what > :first-child{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;}
  .today-row-what > .sec{flex:none;max-width:62%;overflow:hidden;text-overflow:ellipsis;}
  .today-row-brief{display:none;}
  .today-row-go{width:14px;height:14px;stroke-width:1.5;color:var(--line-strong);}
  /* Under the pointer only the arrow answers: the tile is the pick's alone. */
  @media (hover:hover){ .today-row:hover .today-row-go{color:var(--ink);} }
  .today-row.sel .today-row-go{color:var(--mustard);}

  /* The picked item: it keeps its place under the bar while the list scrolls,
     and the three figures stay pinned at its foot (below). */
  .today-pane{position:sticky;top:64px;display:flex;flex-direction:column;min-width:0;height:calc(100vh - 64px);padding:44px 56px 0 40px;overflow-y:auto;scrollbar-width:none;}
  .today-pane::-webkit-scrollbar{display:none;}
  .today-detail{flex:1 0 auto;min-width:0;}
  .today-top{margin-bottom:44px;}
  /* No kicker over the heading: the heading carries the lateness (late color
     only for money, systems, phases and outages), the kind leads the facts. */
  .today-say{margin:0 0 12px;overflow-wrap:anywhere;}
  .today-say-when{color:var(--ink-soft);}
  .today-say-when.late{color:var(--brick);}
  .today-facts{margin:0;overflow-wrap:anywhere;}
  .today-facts > .lb{margin-right:6px;}
  .today-actions{display:flex;align-items:center;flex-wrap:wrap;gap:14px 22px;margin-top:26px;}
  .today-actions .tl{line-height:1.5;}
  .today-do .ic{width:13px;height:13px;margin:0 0 0 9px;stroke-width:1.6;vertical-align:-2px;}
  .today-do[data-busy]{opacity:.55;pointer-events:none;}
  .today-detail .rh > .lb.cut{flex:0 1 auto;}
  .today-also,.today-beside{margin:12px 0 40px;}
  .today-also-row,.today-beside-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:20px;width:100%;min-height:60px;padding:0;
    border:0;border-top:1px solid var(--line);border-radius:0;background:none;color:var(--ink);font:inherit;text-align:left;cursor:pointer;}
  .today-beside-row{min-height:48px;}
  :is(.today-also-row, .today-beside-row):first-child{border-top:0;}
  @media (hover:hover){
    :is(.today-also-row, .today-beside-row):hover .today-lines > :first-child{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;text-decoration-color:var(--line-strong);}
  }
  .today-also-more{margin:0;padding:12px 0 0;border-top:1px solid var(--line);}
  .today-lines{display:flex;flex-direction:column;min-width:0;}
  .today-lines > *{display:block;}
  /* The figures hold the pane's foot: a long item scrolls under them, fading
     into their hairline, so they are always in sight and the cut reads as
     "more above". The fade is the page's own color, so over nothing it is
     nothing. */
  .today-figures{flex:none;position:sticky;bottom:0;z-index:1;display:grid;grid-template-columns:repeat(3,minmax(max-content,1fr));gap:20px;margin-top:8px;padding:16px 0 32px;border-top:1px solid var(--line);background:var(--paper);}
  .today-figures::before{content:"";position:absolute;left:0;right:0;bottom:calc(100% + 1px);height:36px;background:linear-gradient(to bottom, transparent, var(--paper));pointer-events:none;}
  .today-sheet .today-figures{background:var(--paper-raised);}
  .today-sheet .today-figures::before{background:linear-gradient(to bottom, transparent, var(--paper-raised));}
  .today-figures .d3{margin-top:6px;overflow-wrap:anywhere;}
  .today-figures .d3.late{color:var(--brick);}

  @media (max-width:1180px){
    .today-main{padding:36px 32px 64px;}
    .today-pane{padding:40px 32px 0 28px;}
  }
  @media (max-width:960px){
    .today-main{padding-left:24px;padding-right:24px;}
    .today-pane{padding-left:24px;padding-right:24px;}
    .today-row{grid-template-columns:64px minmax(0,1fr) auto 16px;column-gap:14px;}
  }
  @media (max-width:820px){
    /* One column: the words over their kind, the lateness at the right. */
    .today:not(.calendar-cell){display:block;min-height:0;}
    .today-main{min-height:0;border-right:0;
      padding:26px calc(20px + env(safe-area-inset-right)) calc(64px + 48px + env(safe-area-inset-bottom)) calc(20px + env(safe-area-inset-left));}
    .today-pane{display:none;}
    .today-h1 > span{display:block;}
    .today-date{margin-bottom:20px;}
    /* A meeting is two lines: the time over the title, the link under them. */
    .today-agenda{margin-bottom:28px;}
    .today-agenda-row{grid-template-columns:minmax(0,1fr);padding:10px 0;}
    .today-agenda-main{grid-template-columns:minmax(0,1fr);row-gap:2px;min-height:44px;}
    .today-agenda-what{white-space:normal;}
    .today-agenda-acts{justify-content:flex-start;}
    .today-agenda-acts .tl{display:inline-flex;align-items:center;min-height:44px;padding:0;border-bottom:0;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px;text-decoration-color:var(--line-strong);}
    .today-across{display:none;}
    .today-group-head{padding:22px 0 8px;}
    .today-group-head h2{font-size:18px;}
    .today-row{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"what when" "kind when";align-content:center;column-gap:12px;row-gap:2px;
      width:100%;min-height:60px;margin:0;padding:8px 0;scroll-margin:76px 0 88px;}
    .today-row.sel{background:none;}
    .today-tabs .tab{padding-bottom:0;}
    /* Six kinds do not fit a phone's width: they wrap to a second line rather
       than scroll, so every kind and its count is in sight at once. */
    .today-tabs{flex-wrap:wrap;column-gap:22px;row-gap:0;overflow:visible;}
    /* The short words: there is no room for the detail, and the sheet has it. */
    .today-row-what{display:none;}
    .today-row-brief{display:block;grid-area:what;font-size:15.2px;}
    .today-row-kind{grid-area:kind;}
    .today-row-when{grid-area:when;}
    .today-row-go{display:none;}
    /* The sheet a row opens: the picked item, whole. */
    /* Its heading is the item's sentence in the display style, named past the pop-up heading's own rule. */
    /* Clear of the sheet's close button. */
    #app-shell .today-sheet .today-say{margin:0 40px 12px 0;font-family:var(--font-display);font-size:26px;font-weight:300;letter-spacing:-0.015em;line-height:1.15;}
    .today-sheet .today-top{margin-bottom:36px;}
    .today-sheet :is(.today-actions, .today-also-more) .tl{display:inline-flex;align-items:center;min-height:44px;padding:0;border-bottom:0;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px;text-decoration-color:var(--line-strong);}
    .today-sheet .today-actions{gap:0 22px;margin-top:22px;}
    /* There is room down the sheet, so a second line is read whole. */
    .today-sheet .today-lines > .cut{white-space:normal;overflow-wrap:anywhere;}
    .today-sheet :is(.today-also-row, .today-beside-row){padding:10px 0;}
    .today-sheet :is(.today-also, .today-beside){margin-bottom:32px;}
    .today-sheet .today-figures{margin-top:0;padding-bottom:8px;}
  }
  /* Between a phone and a desk the sheet still rises from the foot. */
  @media (min-width:641px) and (max-width:820px){
    .overlay.today-overlay{align-items:flex-end;padding:calc(44px + env(safe-area-inset-top)) 0 0;overscroll-behavior:contain;}
    .overlay.today-overlay > .modal{width:100%;max-width:none;margin:auto 0 0;padding:32px 24px calc(20px + env(safe-area-inset-bottom));border-width:1px 0 0;border-radius:14px 14px 0 0;
      animation:sheetUp .24s cubic-bezier(.2,.8,.2,1);}
  }

  /* ---------- Projects (shell.js, renderProjects and renderProject) ----------
   *
   * As drawn on docs/redesign/Projects.dc.html, Project.dc.html and
   * Phone-project.dc.html. The list: the counts as a sentence with the four
   * figures at its right, the tab row, then one row per project on hairlines
   * in five columns (project, stage, next, runs on, monthly). A project: the
   * client's name, the proposal's headline, the status and its actions at the
   * right, the tabs, the phases as numbered steps, then Money, Hours and
   * System side by side under their section heads, then the timeline. Under
   * 821px everything is one column, the phases stacked, Accept full width in
   * the current one.
   */
  .pj, .pjp{line-height:1.5;}
  .pj-head{display:flex;align-items:flex-end;justify-content:space-between;gap:40px;}
  .pj-title{min-width:0;}
  .pj-sub{margin:8px 0 0;}
  .pj-retry{margin-top:20px;}
  .pj-figures{flex:none;display:flex;gap:40px;padding-bottom:4px;}
  .pj-figures .d3{margin-top:4px;white-space:nowrap;}
  .pj-acid{color:var(--mustard);}
  .pj-tabs{margin-top:36px;}
  .pj-tabs .tab{padding-bottom:13px;}
  .pj-cols, .pj-row{display:grid;grid-template-columns:minmax(0,2.1fr) minmax(0,1.5fr) minmax(0,2.4fr) minmax(0,2fr) minmax(0,.9fr);column-gap:20px;}
  .pj-cols{align-items:center;min-height:44px;}
  .pj-r{text-align:right;}
  .pj-row{align-items:start;width:100%;min-height:96px;padding:20px 0;border:0;border-top:1px solid var(--line);border-radius:0;background:none;color:var(--ink);font:inherit;text-align:left;cursor:pointer;}
  .pj-row:last-child{border-bottom:1px solid var(--line);}
  .pj-row > span{min-width:0;}
  .pj-row > span > span{display:block;}
  @media (hover:hover){ .pj-row:hover .pj-nm{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px;text-decoration-color:var(--line-strong);} }
  .pj-nm{font-size:19px;font-weight:300;letter-spacing:-0.012em;line-height:1.25;overflow-wrap:anywhere;}
  .pj-who .sm{margin-top:2px;}
  .pj-row .pj-marks{display:flex;gap:4px;margin:9px 0 7px;}
  .pj-marks i{width:38px;height:2px;background:var(--line);}
  .pj-marks i.accepted{background:var(--ink);}
  .pj-marks i.current{background:var(--mustard);}
  .pj-row .pj-need{display:flex;justify-content:space-between;align-items:baseline;gap:12px;}
  .pj-need + .pj-need{margin-top:6px;}
  .pj-need > :first-child{min-width:0;}
  .pj-domain{overflow-wrap:anywhere;}
  .pj-monthly{text-align:right;}
  .pj-none{margin:28px 0 0;max-width:640px;}
  .pj-foot{display:flex;flex-wrap:wrap;gap:12px 24px;margin:28px 0 0;}

  /* One project. */
  .pjp{margin-top:-10px;}
  .pj-back{display:inline-flex;align-items:center;gap:8px;min-height:32px;padding:0;border:0;background:none;color:var(--ink-soft);font:inherit;font-size:14.4px;cursor:pointer;}
  .pj-back:hover{color:var(--ink);}
  .pj-back .ic{width:13px;height:13px;stroke-width:1.6;}
  .pjp-gone{margin-top:14px;}
  .pjp-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px 40px;margin-top:14px;flex-wrap:wrap;}
  .pjp-title{min-width:0;flex:1 1 420px;}
  .pjp-title .d1{overflow-wrap:anywhere;}
  .pjp-lede{margin-top:10px;max-width:640px;}
.pjp-name{margin-top:10px;overflow-wrap:anywhere;}
  .pjp-acts{display:flex;align-items:center;flex-wrap:wrap;gap:12px 22px;padding-bottom:6px;}
  .pjp-acts .tl{line-height:1.5;}
  .pjp-accept .ic, .pj-step-accept .ic{width:13px;height:13px;margin:0 0 0 9px;stroke-width:1.6;vertical-align:-2px;}
  .pjp-accept[data-busy], .pj-step-accept[data-busy]{opacity:.55;pointer-events:none;}
  .pjp-phone-state{display:none;}
  .pjp-tabs{margin-top:32px;}
  .pjp-tabs .tab{padding-bottom:13px;}
  .pjp-body{padding-bottom:8px;}

  .pj-steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:32px;margin:40px 0 0;padding:0;list-style:none;}
  .pj-step{min-width:0;}
  .pj-step .d3{overflow-wrap:anywhere;}
  .pj-step-more p{margin:10px 0 0;}
  #view-root .pj-step-accept{display:none;}

  .pjp-sections{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:32px;margin-top:56px;}
  .pjp-section{min-width:0;}
  .pjp-section > .rh, .pjp-needs > .rh, .pjp-slot > .rh{margin-bottom:10px;}
  .pjp-needs{margin-top:40px;}
  .pj-kv{display:flex;justify-content:space-between;align-items:baseline;gap:16px;width:100%;padding:11px 0;border:0;border-top:1px solid var(--line);border-radius:0;background:none;color:var(--ink);font:inherit;font-size:14.4px;text-align:left;}
  .rh + .pj-kv{border-top:0;}
  .pj-kv > span:first-child{min-width:0;display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;}
  .pj-kv > span:last-child{text-align:right;overflow-wrap:anywhere;}
  /* A figure never breaks inside itself; its label wraps instead. */
  .pj-kv.n > span:last-child{flex:none;white-space:nowrap;}
  button.pj-kv{cursor:pointer;}
  @media (hover:hover){ button.pj-kv:hover > span:last-child{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;text-decoration-color:var(--line-strong);} }
  .pj-bar{height:2px;background:var(--line);margin:20px 0 19px;}
  .pj-bar > div{height:2px;background:var(--ink);}
  .pj-bar + .pj-kv{border-top:0;}
  .pj-chips{display:inline-flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;}
  .pj-chip{display:inline-block;padding:2px 7px;border:1px solid var(--line);font-size:11px;font-weight:500;letter-spacing:0.1em;text-transform:uppercase;color:var(--ink-soft);line-height:1.5;}
  .pj-problem{margin:0;padding:11px 0;border-top:1px solid var(--line);color:var(--brick);}
  .pj-nosys{margin:0;padding:11px 0;}
  .pj-line{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:20px;width:100%;min-height:46px;padding:8px 0;border:0;border-top:1px solid var(--line);border-radius:0;
    background:none;color:var(--ink);font:inherit;text-align:left;cursor:pointer;}
  .rh + .pj-line{border-top:0;}
  @media (hover:hover){ .pj-line:hover > :first-child{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;text-decoration-color:var(--line-strong);} }
  .pjp-timeline{margin-top:52px;}
  .pjp-timeline > .rh{margin-bottom:6px;}
  .pj-more{margin-top:14px;}
  .pj-time-row{display:grid;grid-template-columns:92px minmax(0,1fr) auto;align-items:baseline;column-gap:20px;padding:11px 0;border-top:1px solid var(--line);}
  .rh + .pj-time-row{border-top:0;}
  .pj-time-what > span{display:block;}
  .pj-empty{margin:0;padding:11px 0;}
  .pjp-slot{margin-top:40px;}

  @media (max-width:1180px){
    .pj-head{flex-wrap:wrap;gap:24px 40px;}
  }
  @media (max-width:820px){
    /* The list: one column per row, the monthly beside the name. */
    .pj-head{display:block;}
    .pj-figures{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 20px;margin-top:24px;padding:0;}
    .pj-tabs{margin-top:28px;}
    .pj-tabs .tab{padding-bottom:0;}
    .pj-cols{display:none;}
    .pj-row{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"who monthly" "stage stage" "next next" "runs runs";row-gap:12px;min-height:0;padding:18px 0;}
    .pj-who{grid-area:who;}
    .pj-stage{grid-area:stage;}
    .pj-next{grid-area:next;}
    .pj-next:empty{display:none;}
    .pj-runs{grid-area:runs;}
    .pj-monthly{grid-area:monthly;}
    .pj-row .pj-marks{margin:7px 0 6px;}

    /* One project, as Phone-project.dc.html draws it. */
    .pjp{margin-top:-4px;}
    .pjp-head{display:block;margin-top:10px;}
    .pjp-title .d1{font-size:32px;line-height:1.1;}
    .pjp-lede{margin-top:8px;font-size:17px;line-height:1.4;}
  .pjp-name{margin-top:8px;font-size:20px;}
    .pjp-acts{margin-top:14px;padding:0;gap:0 22px;}
    .pjp-acts .tl{display:inline-flex;align-items:center;min-height:44px;padding:0;border-bottom:0;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px;text-decoration-color:var(--line-strong);}
    #view-root :is(.pjp-state, .pjp-accept){display:none;}
    .pjp-phone-state{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;}
    .pjp-tabs{margin-top:22px;}
    .pjp-tabs .tab{padding-bottom:0;}
    .pj-steps{display:flex;flex-direction:column;gap:22px;margin-top:26px;}
    .pj-step .step-top{margin-bottom:8px;}
    .pj-step .d3{font-size:20px;letter-spacing:-0.015em;}
    .pj-step:not(.on) .pj-step-more{display:none;}
    .pj-step-more p{margin-top:8px;}
    #view-root .pj-step-accept{display:flex;width:100%;min-height:46px;margin-top:16px;}
    .pjp-sections{grid-template-columns:minmax(0,1fr);gap:30px;margin-top:30px;}
    .pjp-timeline{margin-top:36px;}
    .pjp-needs, .pjp-slot{margin-top:26px;}
    .pj-line{min-height:52px;}
    .pj-time-row{grid-template-columns:64px minmax(0,1fr) auto;column-gap:12px;}
  }

  /* View and Customize stand as tall as the search box beside them. */
  .dashboard-head .page-head-actions > .btn.icon-only{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;padding:0;}
  .dashboard-head .dash-view > summary{height:38px;padding:0 12px;}

  .page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:22px;flex-wrap:wrap;}
  .page-title{font-family:var(--font-display);font-size:28px;font-weight:600;margin:0;}
  .page-sub{font-size:13px;color:var(--ink-soft);margin:4px 0 0;}
  /* A record's top row: a round back button and what it is. */
  .detail-top{display:flex;align-items:center;gap:12px;min-height:42px;margin:0 0 16px;}
  .detail-top-title{display:flex;align-items:center;gap:12px;flex-wrap:wrap;min-width:0;}
  .detail-top-title .page-title{line-height:1.15;overflow-wrap:anywhere;}
  .back-btn{flex:none;width:42px;height:42px;padding:0;border-radius:50%;border:1px solid var(--line-strong);background:var(--subtle-bg);color:var(--ink);
    display:grid;place-items:center;cursor:pointer;}
  .back-btn:hover{border-color:var(--ink-soft);}
  .back-btn:focus-visible{outline:2px solid var(--mustard);outline-offset:2px;}
  .back-btn .ic{width:18px;height:18px;}
  /* The record's own line under the top row: what it is on the left, its actions on the right. */
  .detail-head{margin-top:-6px;}
  @media (max-width:820px){
    .detail-top{gap:10px;margin-bottom:12px;}
    .detail-top .page-title{font-size:24px;}
    .back-btn{width:44px;height:44px;}
  }

  /* Tabs over a record: underlined, the active edge in the accent, sideways on a phone. */
  .list-tabs{display:flex;gap:24px;border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none;}
  .list-tabs::-webkit-scrollbar{display:none;}
  .list-tab{flex:none;height:44px;padding:0 2px;margin-bottom:-1px;border:0;border-bottom:2px solid transparent;background:transparent;
    color:var(--ink-soft);font:inherit;font-size:14px;white-space:nowrap;cursor:pointer;}
  @media (hover:hover){ .list-tab:hover{color:var(--ink);} }
  .list-tab.on{color:var(--ink);border-bottom-color:var(--mustard);}
  .list-tab:focus-visible{outline:2px solid var(--mustard);outline-offset:-2px;}
  .list-tab[hidden]{display:none;}
  .list-tab-count:not(:empty){margin-left:6px;}
  @media (max-width:820px){ .list-tabs{gap:20px;} .list-tab{font-size:15px;} }

  .btn{font-family:var(--font-ui);font-size:13px;font-weight:500;padding:9px 16px;border-radius:var(--btn-radius);border:1px solid var(--btn-bg);background:var(--btn-bg);color:var(--btn-ink);cursor:pointer;}
  .btn:hover{background:var(--btn-hover);border-color:var(--btn-hover);}
  .btn.ghost{background:transparent;color:var(--ink);border-color:var(--line-strong);}
  .btn.ghost:hover{background:var(--paper-raised);}
  .btn.danger{background:transparent;color:var(--brick);border-color:var(--brick);}
  .btn.danger:hover{background:var(--brick-soft);}
  .btn.small{padding:5px 10px;font-size:12px;}
  .btn:disabled{opacity:0.4;cursor:default;}

  .collapse-toggle{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border-radius:var(--radius);border:1px solid var(--line-strong);background:transparent;color:var(--ink);cursor:pointer;}
  .collapse-toggle:hover{background:var(--paper-raised);}
  .collapse-arrow{display:inline-block;width:13px;height:13px;transition:transform .15s ease;transform:rotate(0deg);}
  .collapse-arrow.expanded{transform:rotate(90deg);}
  /* A sorted column's mark (sortMarkHtml): the sprite's arrow turned up or down. */
  .sort-mark{width:11px;height:11px;margin-left:6px;vertical-align:-1px;stroke-width:1.6;transform:rotate(-90deg);}
  .sort-mark.down{transform:rotate(90deg);}
  /* An arrow after a button's words (New plan, Start billing): small, never a text glyph. */
  .btn .ic.go{width:12px;height:12px;margin:0 0 0 9px;stroke-width:1.6;vertical-align:-1px;}
  .ic.tick{width:13px;height:13px;stroke-width:2;vertical-align:-2px;}

  .toolbar{display:flex;gap:10px;align-items:center;margin:16px 0 18px;flex-wrap:wrap;}
  input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=datetime-local], input[type=time], input[type=number], input[type=url], textarea, select{
    font-family:var(--font-ui);font-size:13px;padding:8px 10px;border:1px solid var(--line-strong);border-radius:var(--radius);background:var(--paper-raised);color:var(--ink);
  }
  textarea{font-family:var(--font-ui);resize:vertical;}
  input:focus, textarea:focus, select:focus{outline:none;border-color:var(--mustard);box-shadow:0 0 0 2px var(--mustard-soft);}
  input.search{
    flex:1;min-width:180px;padding-right:32px;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23808080' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat:no-repeat;background-position:right 10px center;background-size:16px 16px;
  }

  .price-wrap{display:flex;align-items:center;border:1px solid var(--line-strong);border-radius:var(--radius);background:var(--paper-raised);padding:0 8px;}
  .price-wrap span{color:var(--ink-soft);font-size:13px;}
  .price-wrap input{border:none;background:transparent;padding:8px 4px;width:100%;-webkit-appearance:none;appearance:none;}
  .price-wrap input:focus{outline:none;box-shadow:none;border:none;}
  .price-wrap:focus-within{border-color:var(--mustard);box-shadow:0 0 0 2px var(--mustard-soft);}
  .price-wrap input::-webkit-inner-spin-button, .price-wrap input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0;}
  .price-wrap input[type=number]{-moz-appearance:textfield;}

  .modal-header-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px;gap:12px;flex-wrap:wrap;}
  .modal-header-row h2{margin:0;}
  /* Its buttons stop short of the close button in the corner. */
  .modal > .modal-header-row{padding-right:24px;}
  .inline-checkbox{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:500;cursor:pointer;white-space:nowrap;}
  .inline-checkbox input{width:16px;height:16px;padding:0;}
  /* A bare class does NOT beat `.field label` / `.field input` (both 0,1,1),
     and those come LATER in this file, so inside any .field the label stayed
     display:block and the checkbox stretched to width:100% - rendering as a
     full-width box ABOVE its own text, which is why it appeared to land in
     the middle of a word. Broken in every .field since it shipped. The
     descendant selector is (0,2,1) and names every property the generic
     rules set, since whichever is missed keeps leaking through. Same trap
     the .gs-box .gs-input rule documents. */
  .field .inline-checkbox{display:flex;align-items:center;gap:6px;margin-bottom:0;
    font-size:13px;color:var(--ink);font-weight:500;cursor:pointer;white-space:nowrap;}
  .field .inline-checkbox input{width:16px;height:16px;padding:0;margin:0;}
  .checkbox-group{display:flex;gap:14px;flex-wrap:wrap;}


  .panel{background:var(--panel-bg);border:var(--panel-border);border-radius:var(--panel-radius);padding:var(--panel-pad);box-shadow:var(--panel-shadow);}
  .card-list{display:flex;flex-direction:column;border:var(--panel-border);border-radius:var(--panel-radius);overflow:hidden;background:var(--panel-bg);box-shadow:var(--panel-shadow);}
  .row{display:grid;gap:12px;align-items:center;padding:var(--row-pad);border-bottom:1px solid var(--line);cursor:pointer;}
  .row:last-child{border-bottom:none;}
  .row:hover{background:var(--subtle-bg);}
  .row.head{font-family:var(--font-mono);font-size:10px;text-transform:uppercase;letter-spacing:0.06em;color:var(--text-muted);cursor:default;}
  .row.head:hover{background:transparent;}
  .row.head .sortable{cursor:pointer;user-select:none;}
  .row.head .sortable:hover{color:var(--ink);}
  /* Every fraction is minmax(0,...) because each .row is its own grid
     container, so a bare fr floors at that row's min-content width and a long
     company name resolves its columns differently from its neighbours. */

  /* A toolbar button is a TAP TARGET on a phone, and .btn.small renders 25px
     high, under the 30px floor the mobile navigation had to learn the hard
     way. Scoped to .toolbar rather than every .btn.small: the ones inside
     table rows are fine as they are, and growing those would make every row
     taller. Week navigation and Day/Week toggles are what somebody actually
     presses repeatedly with a thumb. */
  @media (max-width:760px){
    /*
     * The 30px floor, and it was scoped to TOOLBARS only.
     *
     * `.btn.small` renders 25px, and the buttons inside a list row are the
     * most-pressed controls on a phone: Mark delivered, Generate invoice and
     * Mark paid all sat under the floor the toolbar buttons were raised to.
     * Extended to the action cells, which is where the thumb actually goes.
     *
     * Still NOT every .btn.small - the ones inside dense table rows stay as
     * they are, because growing those makes every row taller and the standing
     * decision there was that a mouse target is fine at that size.
     */
    .toolbar .btn.small,.toolbar .seg button,
    .row .order-actions .btn.small,.order-actions .btn.small{min-height:32px;padding-top:7px;padding-bottom:7px;}
  }


  .primary-text{font-weight:500;}
  .sub-text{color:var(--ink-soft);font-size:13px;}
  .micro-text{color:var(--text-muted);font-size:11px;}
  .empty{padding:40px 20px;text-align:center;color:var(--ink-soft);}
  .empty h3{font-family:var(--font-display);font-size:19px;margin:0 0 6px;color:var(--ink);}
  .empty p{font-size:13px;margin:0 0 16px;}

  /* nowrap because a status label broken across two lines reads as two
     words rather than one state, and it makes its row taller than its
     neighbours, which is what makes a list look broken. */
  .badge{display:inline-block;font-size:11px;font-weight:500;padding:3px 9px;border-radius:20px;white-space:nowrap;}
  .badge.pending{background:var(--mustard-soft);color:#8A5A1E;}
  .badge.fulfilled{background:var(--sage-soft);color:#3E5340;}
  .badge.paid{background:var(--green-dot);color:#12281A;}
  .badge.consigned{background:var(--blue-soft);color:#2E5570;}
  /* Where a record moves through stages, in the same tinted language as the
     badges above: soft ground, text from the SAME hue. Deliberately generic
     rather than one family per feature, because several list screens
     ask the same four questions and two copies of these tints would
     drift. Waiting shares Pending's mustard; progress takes blue, the only
     family here that reads as movement rather than warning or success; and
     muted covers every way a record stops being live. */
  .badge.st-waiting{background:var(--mustard-soft);color:#8A5A1E;}
  .badge.st-progress{background:var(--blue-soft);color:#2E5570;}
  .badge.st-done{background:var(--sage-soft);color:#3E5340;}
  .badge.st-muted{background:var(--subtle-bg);color:var(--text-muted);}
  .badge.customer-created{background:var(--mustard-soft);color:#7A4E13;}
  .badge.sentiment-not{background:var(--brick-soft);color:#8C332E;}
  .badge.sentiment-follow{background:var(--blue-soft);color:#2E5570;}
  .company-tag-pill{position:relative;padding-right:16px;}
  .company-tag-remove{display:none;position:absolute;right:4px;top:50%;transform:translateY(-50%);cursor:pointer;font-weight:600;line-height:1;}
  .company-tag-pill:hover .company-tag-remove{display:inline;}
  .company-tag-pill:hover{padding-right:20px;}
  .badge.sentiment-nurture{background:var(--sage-soft);color:#3E5340;}
  .badge.sentiment-connected{background:var(--green-dot);color:#12281A;}
  .badge.warn{background:var(--brick-soft);color:#8C332E;}
  .badge.neutral{background:var(--subtle-bg);color:var(--text-muted);box-shadow:inset 0 0 0 1px var(--line);}
  .icon-chip{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:var(--ink-soft);}

  .dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:9px;flex-shrink:0;}
  .dot.customer{background:var(--green-dot);}
  .dot.prospect{background:var(--yellow-dot);}
  .dot.lead{background:var(--blue);}
  .dot.inv-paid{background:var(--green-dot);}
  .dot.inv-unpaid{background:var(--yellow-dot);}
  .dot.inv-overdue{background:var(--brick);}
  .dot.inv-voided{background:var(--text-muted);}
  /* Paid but not yet cleared - distinct from both paid and unpaid, because it
     is genuinely neither. */
  .dot.inv-processing{background:var(--sage);}
  .name-with-dot{display:flex;align-items:center;}

  .section{margin-top:30px;}
  /*
   * The dashboard is a TWELVE COLUMN GRID, not a stack.
   *
   * Every panel was full width and most were mostly empty: Sales used about
   * 300px of a 1100px panel and Invoices about 340px. A panel is now only as
   * wide as its contents need, and Sales sits beside Invoices.
   *
   * `gap` replaces the old margin-top, so a panel carries no spacing of its
   * own and the grid owns the rhythm. A panel that kept its own margin would
   * push its whole row down and break the alignment.
   */
  .dashboard-grid{ display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:18px; align-items:stretch; }
  .dashboard-section{background:var(--paper-raised);border:1px solid var(--line);border-radius:10px;padding:20px 22px;grid-column:span 12;}

  /*
   * align-items:STRETCH, so panels sharing a row match heights.
   *
   * The first version used `start`, on the reasoning that a panel saying
   * "nothing due" should be one line tall rather than as tall as the table
   * beside it. That was wrong on a grid: ragged bottoms read as broken, where
   * an even row reads as deliberate. The cost is honest -- a short panel now
   * carries empty space -- and it is the better trade at this width.
   */

  /*
   * A column of two short panels beside a tall one.
   *
   * The last child grows, so the stack ends flush with the panel beside it
   * rather than leaving the hole at the bottom that stretching one panel was
   * meant to solve. It is a grid CHILD, so it takes the same data-span rules
   * as a panel and needs no width logic of its own.
   */
  .dashboard-stack{ display:flex; flex-direction:column; gap:18px; grid-column:span 12; min-width:0; }
  .dashboard-stack > .dashboard-section:last-child{ flex:1; }

  /*
   * Customize mode. Each panel gets a control bar (drag handle, arrows, its
   * name, size, hide) and its own contents go inert, so a click meant for a
   * control never opens a record. The handle carries touch-action:none, or
   * a finger dragging it would scroll the page instead.
   */
  .dashboard-grid.is-editing > .dashboard-section{ border:1.5px dashed var(--line-strong); }
  .dashboard-grid.is-editing .dash-panel-body{ pointer-events:none; opacity:.72; }
  /* Drag and drop: the whole panel is the grip, a lifted copy follows the
     pointer, and a dashed gap marks where it will land. */
  .dashboard-grid.is-editing > .dashboard-section{ cursor:grab; user-select:none; }
  .dashboard-section.is-placeholder{ border:2px dashed var(--ink-soft) !important; background:transparent; box-shadow:none; }
  .dashboard-section.is-placeholder > *{ visibility:hidden; }
  .dashboard-section.is-placeholder.is-new{ min-height:96px; }
  .dash-ghost{ position:fixed; left:0; top:0; z-index:1000; pointer-events:none; margin:0; overflow:hidden;
    box-shadow:0 18px 40px rgba(0,0,0,.28); opacity:.94; border-radius:10px; }
  .dash-ghost.dash-tray-chip{ background:var(--paper-raised); }
  body.dash-dragging, body.dash-dragging *{ cursor:grabbing !important; user-select:none; }
  #dashboard-tray.is-drop-target .dash-tray{ border:2px dashed var(--brick); background:var(--brick-soft); }
  .dash-tray-hint{ margin-left:8px; color:var(--text-muted); font-size:11px; }
  .dash-tray-chip{ cursor:grab; touch-action:none; }
  .dash-controls{ display:flex; align-items:center; gap:6px; margin:-8px -8px 12px; padding:6px 8px;
    border-radius:8px; background:var(--paper); font-size:12px; color:var(--ink-soft); }
  .dash-controls button{ font:inherit; font-size:12px; color:var(--ink); background:transparent; border:1px solid var(--line-strong);
    border-radius:6px; padding:3px 7px; cursor:pointer; line-height:1.2; }
  .dash-controls button:hover{ background:var(--paper-raised); }
  .dash-handle{ cursor:grab; touch-action:none; }
  .dash-handle:active{ cursor:grabbing; }
  .dash-title{ font-weight:600; color:var(--ink); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .dash-sizes{ display:inline-flex; margin-left:auto; }
  .dash-sizes button{ border-radius:0; margin-left:-1px; }
  .dash-sizes button:first-child{ border-radius:6px 0 0 6px; margin-left:0; }
  .dash-sizes button:last-child{ border-radius:0 6px 6px 0; }
  .dash-sizes button.on{ background:var(--ink); border-color:var(--ink); color:var(--paper); }
  .dash-hide{ margin-left:4px; }
  .dash-controls .dash-hide:only-of-type{ margin-left:auto; }
  .dash-arrow{ display:none; }
  .dash-tray{ margin-top:18px; padding:14px 16px; border:1px solid var(--line); border-radius:10px; background:var(--paper-raised); }
  .dash-tray-head{ font-size:12px; color:var(--ink-soft); margin-bottom:10px; }
  .dash-tray-chip{ font:inherit; font-size:13px; padding:6px 12px; margin:0 6px 6px 0; border-radius:20px;
    border:1px solid var(--line-strong); background:transparent; color:var(--ink); cursor:pointer; }
  .dash-tray-chip:hover{ background:var(--paper); }
  /* A count tile: one number, the whole panel a button to the list behind it. */
  .dash-tile{ display:flex; flex-direction:column; align-items:flex-start; gap:4px; width:100%; font:inherit; color:inherit;
    background:none; border:none; padding:0; text-align:left; cursor:pointer; }
  /* A tile keeps its own height beside a tall panel rather than stretching to match it. */
  .dashboard-section.is-tile{ padding:16px 20px; align-self:start; }
  /*
   * A customised dashboard is a grid of ROWS as well as columns: 22px tracks
   * plus the 18px gap make a 40px step, a panel spans the rows its height
   * says, and `dense` lets a short panel move up into a hole. A panel sized
   * by hand scrolls inside itself; one left to fit grows to its content.
   */
  .dashboard-grid.is-free{ grid-auto-rows:22px; grid-auto-flow:row dense; }
  .dashboard-grid.is-free > .dashboard-section{ position:relative; display:flex; flex-direction:column; min-width:0; overflow:hidden; align-self:stretch; }
  .dashboard-grid.is-free > .dashboard-section > .dash-panel-body{ flex:1 1 auto; min-height:0; overflow:auto; }
  .dashboard-grid.is-free > .dashboard-section.is-fit > .dash-panel-body{ flex:none; overflow:visible; }
  .dashboard-grid.is-free > .dashboard-section.is-tile{ align-self:stretch; }

  /* The grips: the right edge, the bottom edge and the corner, each a thin bar that darkens on hover. */
  .dash-grip{ position:absolute; z-index:3; touch-action:none; }
  .dash-grip-r{ top:0; right:0; width:12px; height:100%; cursor:ew-resize; }
  .dash-grip-b{ left:0; bottom:0; height:12px; width:100%; cursor:ns-resize; }
  .dash-grip-c{ right:0; bottom:0; width:20px; height:20px; cursor:nwse-resize; z-index:4; }
  .dash-grip-r::after{ content:''; position:absolute; top:50%; right:3px; width:4px; height:40px; margin-top:-20px; border-radius:3px; background:var(--line-strong); }
  .dash-grip-b::after{ content:''; position:absolute; left:50%; bottom:3px; height:4px; width:40px; margin-left:-20px; border-radius:3px; background:var(--line-strong); }
  .dash-grip-c::after{ content:''; position:absolute; right:4px; bottom:4px; width:9px; height:9px; border-right:2px solid var(--ink-soft); border-bottom:2px solid var(--ink-soft); border-bottom-right-radius:3px; }
  .dash-grip:hover::after, .dashboard-section.is-resizing .dash-grip::after{ background:var(--ink); }
  .dash-grip-c:hover::after{ background:none; border-color:var(--ink); }
  .dashboard-section.is-resizing{ border-color:var(--ink) !important; }
  .dash-size-tag{ position:absolute; right:14px; bottom:18px; z-index:5; pointer-events:none; background:var(--ink); color:var(--paper);
    font-size:12px; padding:4px 9px; border-radius:6px; white-space:nowrap; }
  .dash-size-readout{ margin-left:auto; font-size:11px; color:var(--ink-soft); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  body.dash-resizing, body.dash-resizing *{ user-select:none; }
  body.dash-resizing-r, body.dash-resizing-r *{ cursor:ew-resize !important; }
  body.dash-resizing-b, body.dash-resizing-b *{ cursor:ns-resize !important; }
  body.dash-resizing-c, body.dash-resizing-c *{ cursor:nwse-resize !important; }
  /* One column on a phone: width is always the whole row, so only the bottom grip remains. */
  @media (max-width:759px){
    .dashboard-grid.is-free > .dashboard-section{ grid-column:1 / -1 !important; }
    .dash-grip-r, .dash-grip-c, .dash-size-readout{ display:none; }
  }
  /* On a phone the arrows replace the handle: dragging inside a long scrolling page is fiddly. */
  @media (max-width:759px){
    .dash-handle{ display:none; }
    .dash-arrow{ display:inline-block; }
    .dash-controls button{ min-height:34px; min-width:34px; }
    .dash-sizes{ display:none; }
    .dash-controls .dash-hide{ margin-left:auto; }
  }

  /*
   * Inside the stack, metric cards are pinned to TWO columns rather than left
   * to auto-fit.
   *
   * The stack column is about 296px at 1250px wide, so auto-fit's 140px
   * minimum plus the gap does not fit two and drops to one -- which put On
   * hand above Consignment at exactly the width where the row had space for
   * them side by side. The panel always carries two cards, so the count is
   * known and worth stating rather than inferring from arithmetic that changes
   * with the viewport.
   *
   * Above the mobile breakpoint only: at 375px two columns would be about
   * 130px each, which is narrower than the figures want.
   */
  @media (min-width:760px){
    .dashboard-stack .metric-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  }

  @media (min-width:1100px){
    .dashboard-stack[data-span="4"]{ grid-column:span 4; }
    .dashboard-section[data-span="4"]{ grid-column:span 4; }
    .dashboard-section[data-span="6"]{ grid-column:span 6; }
    .dashboard-section[data-span="8"]{ grid-column:span 8; }
  }

  /*
   * The middle band, 760 to 1100: the halves pair up but the thirds do not,
   * because a third of a 900px page is about 240px and narrower than three
   * metric cards can sit in. Reading order survives either way, since the grid
   * places in source order.
   *
   * `data-mid-span` is how a panel says it needs the whole row HERE and not at
   * full width. Two do: Production needed, whose eight of twelve leaves a
   * four-wide remainder nothing else can fill, and Marketing, the odd one out
   * among five half-width panels -- five can never pair evenly, so exactly one
   * has to go wide. Without it Marketing sat alone with 306px beside it.
   */
  @media (min-width:760px) and (max-width:1099px){
    .dashboard-section[data-span="4"],
    .dashboard-stack[data-span="4"],
    .dashboard-section[data-span="6"]{ grid-column:span 6; }

    .dashboard-section[data-mid-span="12"],
    .dashboard-stack[data-mid-span="12"]{ grid-column:span 12; }
  }

  /* One line under a rule, rather than a row of filled pills.
     Two pills plus a trailing sentence read as three unrelated fragments; a
     severity dot, a count and a label scan left to right as one list. The rule
     is what separates it from the grid below without needing a card. */
  .alerts-strip{display:flex;align-items:center;gap:18px;flex-wrap:wrap;
    margin-bottom:20px;padding-bottom:12px;border-bottom:1px solid var(--line);}
  .alert-item{display:inline-flex;align-items:center;gap:7px;border:0;background:transparent;
    font:inherit;font-size:13px;color:var(--ink-soft);cursor:pointer;padding:0;}
  .alert-item:hover{color:var(--ink);}
  /* The dot carries the severity, so the label keeps the page's own text
     colour and the line reads as prose rather than as a warning banner. */
  .alert-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0;}
  .alert-item.overdue .alert-dot{background:var(--brick);}
  .alert-item.pending .alert-dot{background:var(--mustard);}
  .alert-item .alert-count{font-family:var(--font-display);font-weight:600;font-size:14px;color:var(--ink);}
  .alert-item.overdue .alert-count{color:var(--brick);}
  .alert-item.pending .alert-count{color:var(--mustard);}
  .alert-pill{display:flex;align-items:center;gap:7px;background:var(--paper-raised);border:1px solid var(--line);border-radius:20px;padding:7px 14px;font-size:12px;color:var(--ink-soft);cursor:pointer;}
  .alert-pill:hover{border-color:var(--line-strong);}
  .alert-pill .alert-count{font-family:var(--font-display);font-weight:600;font-size:14px;color:var(--ink);}
  .alert-pill.warn{border-color:var(--brick);}
  .alert-pill.warn .alert-count{color:var(--brick);}
  /* Stated rather than merely absent: an empty strip reads as a failed load.
     Pushed to the end of the line, because what is clear is the least urgent
     thing on it and should not sit between two things that are not. */
  .alerts-clear{display:flex;align-items:center;font-size:12px;color:var(--text-muted);margin-left:auto;}


  .section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;}
  .section-title{font-family:var(--font-display);font-size:18px;font-weight:600;margin:0;}

  /*
   * 140px, not 160.
   *
   * A half-width panel gives the grid about 497px, and three columns at 160
   * need 504 -- seven pixels short, so a three-card panel wrapped 2-then-1 and
   * orphaned the third card beside a hole. That only appeared once the
   * dashboard went to two columns: at full width there was always room.
   *
   * 140 was measured rather than guessed: three fit in 444, and the longest
   * label in use ("Accounts receivable") still sits on one line.
   */
  .metric-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;margin-top:16px;}
  .metric-card{background:var(--paper-raised);border:1px solid var(--line);border-radius:8px;padding:14px 16px;}
  .metric-card.clickable{cursor:pointer;}
  .metric-card.clickable:hover{border-color:var(--line-strong);}
  .metric-label{font-size:12px;color:var(--ink-soft);display:flex;justify-content:space-between;align-items:center;gap:6px;}
  .metric-value{font-family:var(--font-display);font-size:22px;font-weight:600;margin-top:2px;}
  /* Ageing bands for the Receivables report belong to a reports module; not carried. */

  .metric-value.warn{color:var(--brick);}


  table.data{width:100%;border-collapse:collapse;background:var(--paper-raised);border:1px solid var(--line);border-radius:8px;overflow:hidden;font-size:13px;}
  table.data th{text-align:left;font-family:var(--font-mono);font-size:10px;text-transform:uppercase;letter-spacing:0.05em;color:var(--text-muted);font-weight:400;padding:9px 12px;border-bottom:1px solid var(--line);}
  table.data td{padding:9px 12px;border-bottom:1px solid var(--line);}
  table.data tr:last-child td{border-bottom:none;}
  table.data tr:hover td{background:var(--subtle-bg);}

  .filter-menu{position:relative;}
  /* Capped and scrollable: the companies panel carries eleven controls, and an
     uncapped one runs off the bottom of a laptop screen with the Clear button
     on the part nobody can reach. */
  .filter-menu-panel{display:none;position:absolute;top:100%;right:0;margin-top:6px;background:var(--paper-raised);border:1px solid var(--line);border-radius:8px;box-shadow:0 4px 10px rgba(0,0,0,0.1);z-index:60;padding:12px;min-width:272px;max-width:300px;max-height:min(70vh,560px);overflow-y:auto;flex-direction:column;gap:2px;}
  /* Grouped rather than one unbroken column of fields: the headings are what
     let somebody find "how many sites" without reading every label. */
  .filter-section{display:flex;flex-direction:column;gap:7px;padding:9px 0;border-bottom:1px solid var(--line);}
  .filter-section:last-of-type{border-bottom:none;}
  .filter-section:first-of-type{padding-top:2px;}
  .filter-section-head{font-size:10px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--ink-soft);opacity:.75;}
  .filter-section .field{margin:0;gap:3px;}
  .filter-section .field label{font-size:11px;}
  .filter-section .sub-text{font-size:11px;line-height:1.35;}
  /* A min/max pair on one line. Two stacked full-width fields for what is
     obviously one range is what made the old panel need scrolling. */
  .filter-range{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:5px;}
  .filter-range-input{width:100%;min-width:0;font-size:12px;padding:5px 7px;}
  .filter-range-sep{font-size:10px;color:var(--ink-soft);opacity:.7;}
  /* Segmented control. Replaces the "Show archived instead" checkbox, which sat
     alone above a column of dropdowns and read as an afterthought. Active and
     Archived are two views of one list, and a two-state control says that where
     a lone checkbox does not. */
  .seg{display:flex;border:1px solid var(--line);border-radius:6px;overflow:hidden;background:var(--paper);}
  .seg button{flex:1 1 0;min-width:0;border:none;background:transparent;color:var(--ink-soft);
    font-size:11px;font-weight:600;padding:5px 6px;cursor:pointer;white-space:nowrap;
    border-right:1px solid var(--line);font-family:inherit;}
  .seg button:last-child{border-right:none;}
  /* `.seg button` is flex:1 1 0 with white-space:nowrap, so a label longer than
     its share of the row overflows the button rather than wrapping: "Email
     campaigns" was clipped mid-word. Where the labels are words rather than a
     two-state toggle, the buttons size to content instead. The
     `.auto-group-head .seg` precedent, and the reason that rule exists too. */
  /* The buttons hug their labels, so the CONTAINER has to as well: `.seg` is
     display:flex, which is block-level and fills its parent, leaving a long
     empty box trailing off to the right of the last button. Only bites where
     a seg is a direct child of the page; the three inside a `.section-head`
     are flex items already, and a flex item's inline-flex is blockified, so
     this leaves them exactly as they were. */
  .seg.seg-auto{display:inline-flex;}
  .seg.seg-auto button{flex:0 0 auto;}
  @media (hover:hover){ .seg button:hover{background:var(--paper-raised);color:var(--ink);} }
  .seg button.active{background:var(--sage-soft);color:var(--sage-ink);}
  .filter-menu-badge{display:inline-block;background:var(--blue);color:#fff;border-radius:10px;font-size:11px;line-height:1;padding:2px 6px;margin-left:4px;}
  .filter-menu-actions{border-top:1px solid var(--line);padding-top:8px;margin-top:2px;}

  .combo{position:relative;}
  .combo-control{position:relative;}
  /* The right padding has to clear the magnifier and chevron sitting on top
     of the input, and it must be written as a DESCENDANT selector.

     `.combo-input` alone is (0,1,0) and the generic
     `input[type=text], …` control rule is (0,1,1), so that rule's `padding`
     SHORTHAND won and the 56px was silently discarded: every combobox in
     the app had 10px of right padding, and any label long enough to fill
     the field ran underneath the icons. Reported on a quote's service line
     as "Custom Mold Fee (Unit, flat rat" with the chevron sitting in the
     text. The FOURTH time this trap has bitten, after .sp-thumb,
     .gs-box .gs-input and .field .inline-checkbox.

     The whole padding is named rather than just the right side, so the
     shorthand cannot come back and reset the other three. */
  .combo-control .combo-input{width:100%;padding:8px 56px 8px 10px;}
  .combo-icons{position:absolute;right:8px;top:50%;transform:translateY(-50%);display:flex;gap:4px;color:var(--ink-soft);cursor:pointer;}
  .combo-panel{display:none;position:absolute;top:100%;left:0;right:0;margin-top:4px;background:var(--paper-raised);border:1px solid var(--line);border-radius:8px;box-shadow:0 4px 10px rgba(0,0,0,0.1);z-index:70;max-height:160px;overflow-y:auto;}
  .combo-option{padding:8px 10px;font-size:13px;cursor:pointer;}
  .combo-option:hover{background:var(--sage-soft);}
  .combo-group-label{padding:6px 10px 2px;font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted);font-family:var(--font-mono);}
/* A team heading that is ALSO a choice, with its people indented under it.
   Weight is what separates the two, not the indent alone: a person and a team
   must never read as the same kind of thing. */
.combo-option.combo-opt-team{font-weight:600;}
.combo-option.combo-opt-member{padding-left:26px;}
/* Kept on screen only because one of its people matched the search. */
.combo-option.combo-opt-context{color:var(--text-muted);font-weight:500;}
/* Heads the people on no team. Not a thing work can be assigned to. */
.combo-option.combo-opt-label{color:var(--text-muted);cursor:default;}
.combo-option.combo-opt-label:hover{background:transparent;}
  /* Checkbox filter dropdown: several real filters are "any of several"
     (Nick's or Sara's, overdue or due soon), which a single <select> can only
     ever express one answer to. */
  /* Multi-select filter. The control itself is a real .combo (same input, same
     magnifier and chevron), so it reads as the control people already know from
     every single-select filter; only the panel differs, carrying checkboxes. */
  .fms{position:relative;}
  /* EVERY rule here is scoped under .fms - a bare .fms-option (0,1,0) LOSES to
     the global `.field label` (0,1,1), which sets display:block and a bottom
     margin. That is exactly what broke the first version: the checkbox and its
     text stacked with a gap between every row. */
  .fms .fms-panel{display:none;position:absolute;top:100%;left:0;right:0;margin-top:4px;
    background:var(--paper-raised);border:1px solid var(--line);border-radius:8px;
    box-shadow:0 4px 10px rgba(0,0,0,0.1);z-index:70;max-height:220px;overflow-y:auto;padding:4px;}
  .fms label.fms-option{display:flex;align-items:center;gap:8px;margin:0;padding:6px 8px;
    font-size:12px;font-weight:400;color:var(--ink);cursor:pointer;border-radius:5px;line-height:1.3;}
  .fms label.fms-option:hover{background:var(--sage-soft);}
  .fms label.fms-option input[type="checkbox"]{margin:0;flex:0 0 auto;width:14px;height:14px;
    accent-color:var(--sage-ink);cursor:pointer;}
  .fms .fms-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .combo-empty{padding:10px;font-size:12px;color:var(--ink-soft);}
  .combo-disabled .combo-control .combo-input{background:var(--subtle-bg);color:var(--text-muted);cursor:not-allowed;}
  .combo-disabled .combo-icons{cursor:not-allowed;opacity:0.5;}


  .overlay{position:fixed;inset:0;background:var(--scrim, rgba(31,58,52,0.35));display:flex;align-items:flex-start;justify-content:center;padding:24px 16px;overflow-y:auto;z-index:100;}
  .modal{background:var(--paper-raised);border-radius:var(--radius);padding:24px 26px;width:100%;max-width:560px;margin:auto 0;border:1px solid var(--line-strong);}
  .modal h2{font-family:var(--font-display);font-size:20px;margin:0 0 18px;font-weight:600;}
  .field{margin-bottom:14px;position:relative;}
  .field label{display:block;font-size:12px;color:var(--ink-soft);margin-bottom:5px;font-weight:500;}
  .field input, .field textarea, .field select{width:100%;}
  .field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
  .field-row.three{grid-template-columns:1fr 1fr 1fr;}


  /* ---------- wide desktop forms ---------- */
  /*
   * Editing a company meant scrolling a long single column inside a 560px box
   * on a 1920px screen. **Width alone fixes nothing**: measured, the company
   * form's 15 fields are 1197px tall at 560px AND at 900px, because a stacked
   * column is a stacked column. Pairing is what removes the scroll (1197 ->
   * 801, which fits the ~820px a 900px-tall laptop gives); width is only what
   * makes pairing possible.
   *
   * Mobile-first, the `.auto-builder` precedent: ONE column below 900px, so
   * this work is provably inert on a phone. That is deliberate rather than
   * cautious - at 375px an existing `.field-row.three` already renders 89px
   * fields, so anything pairing more on a phone would make it worse.
   */
  .modal.wide{max-width:960px;}
  .modal.medium{max-width:760px;}
  .modal.narrow{max-width:440px;}

  .form-grid{display:grid;grid-template-columns:1fr;gap:0 14px;}
  @media (min-width:900px){
    .form-grid{grid-template-columns:1fr 1fr;}
  }
  /* A field opts OUT to full width. Per the owner's choice that is text areas:
     each full-width field costs 34-68px of height, and four of them put the
     company form back over the fold. An existing `.field-row` spans too, so no
     form has to be un-paired first. */
  .form-grid > .full,
  .form-grid > .field-row{grid-column:1 / -1;}
  /* Or a long value refuses to shrink and pushes its column past its track:
     the `.auto-col` lesson, and the condition rows before it. */
  .form-grid > *{min-width:0;}
  /* Slightly tighter than a stacked form: with two columns the eye travels
     less vertically, so 14px between rows reads as loose. */
  @media (min-width:900px){
    .form-grid .field{margin-bottom:11px;}
    /* A variation is 12 fields. Stacked three-up that is five sub-rows EACH,
       which is why a three-variation product ran past two screens. At 900px
       the selling fields fit four across and the six measurements fit six
       across, taking a variation from five rows to three. Below 900px both
       stay three-up, exactly as they were. */
    /* Named with BOTH classes: `.field-row.three` is (0,2,0) and a lone class
       is (0,1,0), so the bare selector loses on specificity no matter where it
       sits in the file. The fourth time this trap has bitten here. */
    /* Three columns for a form whose fields are all short: an employee is 20
       of them, and at two columns that is ten rows however wide the modal is. */
    .form-grid.tri{grid-template-columns:repeat(3, minmax(0,1fr));}
  /* A section BLOCK is the grid child where a form is already paired inside its
     own rows: seasonal settings is seven h3-headed sections, so the sections are
     what pair rather than the fields. Start-aligned, because sections have
     genuinely different heights and stretching one leaves its heading floating
     in the middle of a tall box. */
  .form-grid > .ss-block{align-self:start;}
  .form-grid > .ss-block > h3:first-child{margin-top:0;}
    .form-grid.tri > .span-2{grid-column:span 2;}
    /* `.full` spans whatever the grid is, two columns or three. */
    .form-grid.tri > .full{grid-column:1 / -1;}


  }

  /* A quiet group heading. Mechanically reflowing fields in DOM order leaves
     orphans and organises nothing; grouping is what makes a long form
     readable. Sized to cost ~26px so three of them still leave the company
     form inside the fold. */
  .form-section{grid-column:1 / -1;margin:6px 0 8px;font-size:11px;font-weight:600;
    text-transform:uppercase;letter-spacing:0.06em;color:var(--ink-soft);
    padding-bottom:5px;border-bottom:1px solid var(--line);}
  .form-grid > .form-section:first-child{margin-top:0;}

  .field-error-msg{position:absolute;top:0;right:0;color:var(--brick);font-size:11px;font-weight:600;margin:0;white-space:nowrap;}
  .field.field-invalid input,
  .field.field-invalid select{border-color:var(--brick) !important;}
  .modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px;}

  /* Pop-ups: centred in the window when they fit (the auto margin). A taller one
     starts at the top and the overlay scrolls, its buttons held at the foot of
     the window: sticky inside the scrolling overlay rather than an inner scroll
     box, which would clip a dropdown opened near the bottom. Sticky stops at the
     scroller's PADDING, not its edge, so the overlay of a tall one has none at
     the foot and the strip sits flush with the window (is-tall, syncModalDialogs).
     The button that does the job is on the right, everything else on the left. */
  .overlay.is-tall{padding-bottom:0;}
  .modal > .modal-actions{position:sticky;bottom:0;z-index:2;margin:20px -26px -24px;padding:14px 26px 18px;}
  /* Solid only on a pop-up taller than the window, where it covers the fields
     scrolling beneath it. The foot's border goes see-through rather than away:
     losing that pixel could flip is-tall back at the exact height. A phone's
     sheet has its own strip, solid at any height. */
  @media (min-width:641px){
    .modal.is-tall{border-bottom-color:transparent;border-radius:var(--radius) var(--radius) 0 0;}
    .modal.is-tall > .modal-actions{margin-bottom:-25px;padding-bottom:14px;background:var(--paper-raised);box-shadow:0 -1px 0 var(--line);}
  }
  .modal-actions > .btn:last-child{margin-left:auto;}
  .modal:focus{outline:none;}
  .modal .app-loading{min-height:260px;}
  /* Nothing in a pop-up wider than its box. */
  .modal .field-row > *{min-width:0;}
  .modal .field input, .modal .field select{max-width:100%;}

  /* A confirm: the question as the heading, what follows it beneath, a message
     that leads up to its question as one paragraph. */
  .confirm-modal h2{margin-bottom:8px;}
  .confirm-modal p{margin:0;font-size:14px;line-height:1.45;color:var(--ink-soft);}
  .confirm-modal > p:first-child{color:var(--ink);padding-right:24px;}

  /* Number boxes: a minus and a plus inside the box around the figure
     (installNumberSteppers), in the accent. The browser's own arrows are hidden
     everywhere, on the plain money and rate boxes too. In a form's field the box
     takes the field's width; in a sentence or a table cell it stays compact. */
  input[type=number]{-moz-appearance:textfield;appearance:textfield;}
  input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0;}
  .num-step{display:inline-flex;align-items:stretch;min-width:116px;max-width:100%;vertical-align:middle;
    border:1px solid var(--line-strong);border-radius:var(--radius);background:var(--paper-raised);}
  .field .num-step{display:flex;width:100%;min-width:0;}
  .num-step:focus-within{border-color:var(--mustard);box-shadow:0 0 0 2px var(--mustard-soft);}
  .num-step > input[type=number]{flex:1 1 auto;min-width:0;width:0 !important;max-width:none !important;border:0 !important;
    background:transparent !important;box-shadow:none !important;padding:8px 2px !important;text-align:center;}
  .num-step-btn{flex:none;width:30px;padding:0;border:0;border-radius:var(--radius);background:none;color:var(--mustard);
    display:grid;place-items:center;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;}
  .num-step-btn:hover{background:var(--subtle-bg);}
  .num-step-btn:disabled{opacity:.4;cursor:default;}
  .num-step-btn .ic{width:14px;height:14px;}

  /* A priced line, a proposal's or an engagement's: the service wide, qty with
     its minus and plus, the unit, the price with its $, the subtotal on the
     right, a quiet bin. The header takes the same tracks, so each heading sits
     over its box. A phone has no header, so there each cell shows the name it
     carries in data-name, and the line stacks. */
  .line-item-row.priced-line{display:grid;grid-template-columns:minmax(0,1fr) 116px 76px 120px 104px 36px;gap:8px;align-items:center;margin-bottom:10px;}
  .line-item-row.priced-line.header{font-family:var(--font-ui);font-size:11px;font-weight:500;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-soft);margin-bottom:6px;}
  .priced-line.header .c{text-align:center;}
  .priced-line.header .r{text-align:right;}
  .line-cell{min-width:0;}
  .line-cell > input, .line-cell > select{width:100%;}
  .line-cell > select{padding-left:8px;padding-right:2px;}
  .line-cell > .price-wrap input{min-width:0;}
  .line-cell > .num-step{display:flex;width:100%;min-width:0;}
  .line-sub{min-width:0;text-align:right;font-size:14px;color:var(--ink);font-variant-numeric:tabular-nums;}
  .line-bin{width:36px;height:36px;display:grid;place-items:center;padding:0;border:0;border-radius:var(--radius);background:none;color:var(--ink-soft);cursor:pointer;}
  .line-bin:hover{color:var(--brick);}
  .line-bin:focus-visible{outline:2px solid var(--mustard);outline-offset:1px;}
  .line-bin .ic{width:16px;height:16px;}
  @media (min-width:821px){
    .line-cell > input, .line-cell > select, .line-cell > .price-wrap, .line-cell > .num-step{min-height:36px;}
  }
  @media (max-width:820px){
    .line-cell > .num-step > input[type=number]{min-height:42px;}
  }
  @media (max-width:760px){
    .line-item-row.priced-line{grid-template-columns:136px 76px minmax(0,1fr) 44px;padding-bottom:12px;border-bottom:1px solid var(--line);}
    .line-item-row.priced-line.header{display:none;}
    .line-cell::before{content:attr(data-name);display:block;margin-bottom:5px;font-size:14px;color:var(--ink-soft);}
    .line-cell.line-name{grid-column:1 / -1;}
    .line-cell.line-price{grid-column:3 / -1;}
    .line-sub{grid-column:1 / 4;display:flex;justify-content:space-between;gap:10px;}
    .line-sub::before{content:attr(data-name);color:var(--ink-soft);}
    .line-bin{width:44px;height:44px;}
  }
  .hint{font-size:12px;color:var(--text-muted);margin-top:20px;font-family:var(--font-mono);}
  .pagination{display:flex;justify-content:center;gap:12px;align-items:center;margin-top:14px;padding-bottom:16px;}

  .login-screen{min-height:100vh;display:flex;align-items:center;justify-content:center;background:var(--paper);}
  .login-card{background:var(--paper-raised);border:1px solid var(--line);border-radius:10px;padding:36px 34px;width:100%;max-width:360px;box-shadow:0 4px 20px rgba(31,58,52,0.08);}
  .login-card .brand-mark{font-family:var(--font-display);font-size:22px;font-weight:600;color:var(--ink);display:block;margin-bottom:4px;}
  .login-card .brand-byline{font-size:11px;letter-spacing:0.24em;margin:0 0 10px;}
  .login-card .login-sub{font-size:13px;color:var(--ink-soft);margin:0 0 24px;}
  /* Links on the two pieces of chrome that never had a colour: browser blue on black reads as a broken page. */
  .login-card a{color:var(--ink-soft);}
  .login-card .btn{width:100%;margin-top:6px;}
  .login-card .login-foot{margin-top:14px;}
  .login-error{background:var(--brick-soft);color:#8C332E;font-size:13px;padding:10px 12px;border-radius:var(--radius);margin-bottom:16px;display:none;}
  .login-error.visible{display:block;}


.page-head-actions{display:flex;align-items:center;gap:10px;flex-shrink:0;}
/* A two-word label must never break across two lines: "Add / lead" reads as
   two controls and makes that button taller than the two beside it. */
.page-head-actions .btn{white-space:nowrap;}
@media (max-width:760px){
  .page-head-actions{width:100%;flex-wrap:wrap;}
  /* The strip stacks here, so pushing the clear note right strands it on a
     line of its own with the whole width beside it. It reads as part of the
     list when it simply follows. */
  .alerts-clear{margin-left:0;}
}




/*
 * Money and identifiers in a tabular face. `.font-mono` is used on the
 * marketing hub's spend, revenue and ROAS columns, which are right-aligned
 * figures with decimals - the exact case a proportional face ruins, and the
 * reason a mono face is in the type stack at all.
 *
 * `--font-mono` deliberately never changes with the chosen font set, because
 * it is doing alignment work rather than expressing taste.
 */
.font-mono, .mono{ font-family:var(--font-mono); font-variant-numeric:tabular-nums; }

/* The quiet "optional" marker beside a field label. */
.optional{ font-weight:400; font-size:11px; color:var(--text-muted); text-transform:none; letter-spacing:0; }

/*
 * A neutral callout inside a modal, used by the work-order step panel to
 * explain what Begin and Finish will do. Shaped on `.postage-note` below so
 * the two read as the same kind of aside rather than two inventions.
 */
.alert{
  border:1px solid var(--line);
  border-radius:var(--radius); padding:10px 12px;
  font-size:12px; color:var(--text-muted);
}
.alert.info{ border-left-color:var(--sage); }


/* ---------- Settings card launcher ---------- */
/*
 * Settings opens on five cards rather than nine stacked sections. Each card
 * lists what is inside it: a tile saying only "Business" makes somebody open
 * all five to find the tax rates, which costs more than the scroll it replaced.
 *
 * auto-fit rather than a fixed column count, so this needs no media query of
 * its own: it lands on three columns wide, two on a tablet and one on a phone.
 */
.settings-cards{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:14px;
}
.settings-card{
  display:flex;
  flex-direction:column;
  /* A <button> does not stretch to its grid row the way a div does, so cards
     in the same row came out at different heights depending on how many items
     they list. Measured at three distinct heights before this line. */
  height:100%;
  align-items:flex-start;
  gap:6px;
  text-align:left;
  width:100%;
  font:inherit;
  color:var(--ink);
  cursor:pointer;
  background:var(--panel-bg);
  border:1px solid var(--panel-border);
  border-radius:var(--panel-radius);
  padding:var(--panel-pad);
  /* Reads the block-style tokens like .panel does, so all five block styles
     apply to these without a second set of rules to keep in step. */
  box-shadow:var(--panel-shadow);
}
.settings-card:hover{ border-color:var(--line-strong); }
.settings-card-head{ display:flex; align-items:center; gap:8px; }
.settings-card-title{ font-weight:600; font-size:15px; }
.settings-card-blurb{ display:block; }
/*
 * One item per line, not an inline run.
 *
 * Inline with middot separators was tried first and wrapped badly: a card whose
 * list runs to two lines leaves the separator dangling at the end of the first
 * one ("Theme · Font · Blocks ·"), which reads as a missing item. Stacked has
 * no separator to strand, and it is what makes the list scannable rather than
 * something to read as a sentence.
 */
.settings-card-items{
  display:flex;
  flex-direction:column;
  gap:2px;
  margin-top:4px;
}
.settings-card-items span{
  font-size:12px;
  color:var(--text-muted);
  line-height:1.5;
}

/* ---------- Modal close button ---------- */
/*
 * Every modal gets a close control in its top right, injected centrally rather
 * than written into all 136 overlays by hand.
 *
 * Escape and clicking the backdrop already closed these, and both still do.
 * Neither is discoverable: somebody who does not know them has no visible way
 * out of a dialog, which is the one place a UI must never leave a person
 * guessing.
 *
 * `.modal` needs position:relative for the button to anchor to, which the base
 * rule does not set. Declared here rather than edited into the base rule so
 * the whole feature is one block that can be removed in one piece.
 */
.modal{position:relative;}
.modal-x{
  position:absolute;
  top:10px;
  right:10px;
  /* 32px is the hit area; the glyph inside is 15px. Small enough to read as
     chrome, large enough to hit with a thumb. */
  width:32px;
  height:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  border:0;
  border-radius:var(--radius);
  background:transparent;
  color:var(--text-muted);
  cursor:pointer;
  /* Above the modal's own content, so a full-width header or a wide table
     cannot render on top of it. */
  z-index:1;
}
.modal-x:hover{ background:var(--subtle-bg); color:var(--ink); }
.modal-x:focus-visible{ outline:2px solid var(--blue); outline-offset:1px; }
.modal-x .ic{ width:15px; height:15px; }
/*
 * Keep a long title off the button. The heading is still the first child (the
 * button is APPENDED, not prepended, precisely so `h2:first-child` rules and
 * `.modal h2` margins are untouched), so this cannot shift any existing
 * layout.
 */
.modal > h2:first-child{
  padding-right:30px;
  /* Only bites an unbreakable word longer than the heading box, which a real
     title never is. Cheap insurance: without it such a word ignores the
     padding above and runs under the button. */
  overflow-wrap:anywhere;
}





/* ---------- core additions for the modular shell ---------- */

/* Below 760px every list collapses to one column. In GnomeWork each feature
   row was named here one by one; the shell states the rule once and a module
   whose row must NOT collapse opts out in its own stylesheet. */
@media (max-width:760px){
  .row:not(.head){grid-template-columns:1fr !important;gap:4px;}
  .row.head{display:none;}
}

/* The brand accent, emitted by the Blade shell from the tenant's brand JSON,
   reaches the chrome through one token. A tenant with no accent set inherits
   the theme's own. */
:root{--brand-accent:var(--mustard);}
.brand-mark{color:var(--ink);}
/* A logo image, when a tenant has one. Physare's own mark is the word set
   in the font, so this rule is idle on the house tenant. */
.brand-logo{height:46px;width:auto;max-width:190px;display:inline-block;vertical-align:middle;}
@media (max-width:820px){ .brand-logo{height:34px;} }
/* On the login card the logo stands in for the name, so it is larger and centred. */
.login-card .login-logo{display:block;height:72px;max-width:260px;margin:0 auto 14px;}
.brand-lockup .brand-logo{margin-bottom:2px;}


/* The shell reports a manifest view with no registered renderer here. */
.view-missing{padding:40px 20px;text-align:center;color:var(--ink-soft);}

/* A "?" beside a label, with the explanation behind it rather than in a
   paragraph under every field (helpTipHtml in platform.js). */
.help-tip{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;
  border-radius:50%;border:1px solid var(--line-strong);background:transparent;color:var(--ink-soft);
  font-family:var(--font-ui);font-size:11px;font-weight:600;line-height:1;cursor:pointer;padding:0;
  margin-left:6px;vertical-align:middle;flex:0 0 auto;}
.help-tip:hover,.help-tip[aria-expanded="true"]{background:var(--ink-soft);color:var(--paper);border-color:var(--ink-soft);}
.help-bubble{display:none;position:absolute;z-index:220;max-width:320px;background:var(--paper-raised);
  border:1px solid var(--line-strong);border-radius:var(--radius);box-shadow:0 6px 20px rgba(0,0,0,0.14);
  padding:10px 12px;font-size:12px;line-height:1.55;color:var(--ink);}


/* ---------------------------------------------------------------------------
 * Personal custom fields and the Columns menu
 * ------------------------------------------------------------------------- */
.cf-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 14px; }
.cf-grid .field.full{ grid-column:1 / -1; }
@media (max-width:640px){ .cf-grid{ grid-template-columns:1fr; } }
.cf-req{ color:var(--brick); }
.cf-empty{ color:var(--text-muted); }
.cf-detail{ margin-top:12px; max-width:720px; border:1px solid var(--line); border-radius:10px; padding:10px 14px; background:var(--paper-raised); }
.cf-detail-head{ display:flex; justify-content:space-between; align-items:center; font-size:12px; font-weight:600; color:var(--ink-soft); margin-bottom:6px; }
.cf-detail-list{ display:grid; grid-template-columns:minmax(120px,auto) 1fr; gap:4px 16px; margin:0; font-size:13px; }
.cf-detail-list dt{ color:var(--ink-soft); }
.cf-detail-list dd{ margin:0; min-width:0; overflow-wrap:anywhere; }
.cf-type-chips{ display:flex; flex-wrap:wrap; gap:6px; }
.cf-chip{ font:inherit; font-size:12px; padding:5px 11px; border-radius:20px; border:1px solid var(--line-strong); background:transparent; color:var(--ink); cursor:pointer; }
.cf-chip:hover:not(:disabled){ background:var(--paper-raised); }
.cf-chip.on{ background:var(--ink); border-color:var(--ink); color:var(--paper); }
.cf-chip:disabled:not(.on){ opacity:.45; cursor:default; }
.cf-manage{ display:flex; flex-direction:column; }
.cf-manage-row{ display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:10px; align-items:center; padding:8px 0; border-bottom:1px solid var(--line); }
.cf-manage-name{ font-weight:600; font-size:14px; }
.cf-manage-actions{ display:flex; gap:4px; }
.btn.cf-danger{ color:var(--brick); }
.cf-filter-choices{ display:flex; flex-direction:column; gap:4px; }

.list-columns-panel{ min-width:240px; max-width:280px; }
.list-col-rows{ display:flex; flex-direction:column; gap:1px; }
.list-col-row{ display:flex; align-items:center; gap:6px; padding:4px 4px; border-radius:6px; font-size:13px; }
.list-col-row:hover{ background:var(--paper); }
.list-col-row label{ display:flex; align-items:center; gap:8px; margin:0; font-weight:400; cursor:pointer; flex:1; min-width:0; }
.list-col-row.is-dragging{ background:var(--paper); box-shadow:0 2px 8px rgba(0,0,0,.12); }
.list-col-grip{ display:inline-flex; color:var(--text-muted); cursor:grab; touch-action:none; }
.list-col-grip[hidden]{ display:inline-flex; visibility:hidden; }
.list-col-grip .ic{ width:14px; height:14px; }
.list-col-sub{ font-size:11px; letter-spacing:.05em; text-transform:uppercase; color:var(--text-muted); margin:10px 4px 4px; padding-top:8px; border-top:1px solid var(--line); }
.list-col-none{ margin:2px 4px; font-size:12px; }
.list-col-actions{ display:flex; flex-direction:column; align-items:flex-start; gap:4px; margin-top:8px; padding-top:8px; border-top:1px solid var(--line); }
.list-col-link{ font:inherit; font-size:13px; background:none; border:none; padding:3px 4px; color:var(--blue); cursor:pointer; }
.list-col-link:hover{ text-decoration:underline; }
.list-col-link.muted{ color:var(--ink-soft); }

.list-col-hint{ margin:0 4px 6px; font-size:11px; color:var(--text-muted); }

/* Links inside list cells (email, website, a link field): the app blue, underlined on hover only. */
.row .sub-text a{ color:var(--blue); text-decoration:none; }
.row .sub-text a:hover{ text-decoration:underline; }

/* Dragging a column by its header (design audit, 2026-09-29): the header
   lifts, its column fades and leaves a dashed slot, and a slim accent line
   sits in the gap where it lands. Mouse and pen only; see startListHeaderDrag(). */
.row.head [data-col-key]:not([data-col-fixed]){ position:relative; user-select:none; }
.row.head [data-col-key]:not([data-col-fixed]):not(.sortable){ cursor:grab; }
/* A grip appears on hover, so a header says it can be moved. */
.row.head [data-col-key]:not([data-col-fixed])::before{ content:''; position:absolute; left:-14px; top:50%; width:10px; height:10px; margin-top:-5px;
  opacity:0; transition:opacity .12s ease; background:var(--ink-soft);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Ccircle cx='3' cy='2' r='1'/%3E%3Ccircle cx='7' cy='2' r='1'/%3E%3Ccircle cx='3' cy='5' r='1'/%3E%3Ccircle cx='7' cy='5' r='1'/%3E%3Ccircle cx='3' cy='8' r='1'/%3E%3Ccircle cx='7' cy='8' r='1'/%3E%3C/svg%3E") center / contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Ccircle cx='3' cy='2' r='1'/%3E%3Ccircle cx='7' cy='2' r='1'/%3E%3Ccircle cx='3' cy='5' r='1'/%3E%3Ccircle cx='7' cy='5' r='1'/%3E%3Ccircle cx='3' cy='8' r='1'/%3E%3Ccircle cx='7' cy='8' r='1'/%3E%3C/svg%3E") center / contain no-repeat; }
.row.head [data-col-key]:not([data-col-fixed]):hover::before{ opacity:1; }
body.col-dragging .row.head [data-col-key]::before{ opacity:0 !important; }
/* The column being moved: a dashed slot where its header was, its cells faded. */
.row.head [data-col-key].is-col-dragging{ color:transparent; }
.row.head [data-col-key].is-col-dragging::after{ content:''; position:absolute; inset:-8px -6px; border:1px dashed var(--line-strong); border-radius:6px; }
.is-col-dragging-cell{ opacity:.4; transition:opacity .12s ease; }
/* The lifted header. */
.col-drag-ghost{ position:fixed; z-index:1000; pointer-events:none; display:flex; align-items:center; gap:7px; padding:0 12px;
  box-sizing:border-box; background:var(--paper); border:1px solid var(--line-strong); border-radius:6px;
  box-shadow:0 6px 16px rgba(0,0,0,.14); transform:rotate(-1.5deg);
  font-family:var(--font-mono); font-size:10px; letter-spacing:.08em; text-transform:uppercase; color:var(--ink); white-space:nowrap; overflow:hidden; }
.col-drag-ghost .ic{ width:13px; height:13px; flex:none; color:var(--ink-soft); }
.col-drag-ghost span{ overflow:hidden; text-overflow:ellipsis; }
/* The landing line: slim, the accent colour, header height with a short fade and a round cap. */
.col-drop-line{ position:fixed; width:2px; background:var(--blue); z-index:1001; pointer-events:none; border-radius:1px; }
.col-drop-line::before{ content:''; position:absolute; top:-3px; left:-2px; width:6px; height:6px; border-radius:50%; background:var(--blue); }
.col-drop-line::after{ content:''; position:absolute; top:100%; left:0; width:2px; height:24px; background:linear-gradient(var(--blue), transparent); }
body.col-dragging, body.col-dragging *{ cursor:grabbing !important; user-select:none; }

/* ---------------------------------------------------------------------------
 * The touch form (design audit, 2026-09-29): Type, Date and Time on one row
 * that stacks properly on a phone, the contact's local time as a quiet line,
 * and Delete on the far left, away from Cancel.
 * ------------------------------------------------------------------------- */
.field-row.touch-when{ grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(0,0.8fr); }
@media (max-width:560px){
  .field-row.touch-when{ grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .field-row.touch-when > .field:first-child{ grid-column:1 / -1; }
}
.touch-form-sub{ margin:-6px 0 14px; }
.touch-local-time{ margin:5px 0 0; font-size:12px; color:var(--ink-soft); font-family:var(--font-ui); }
.touch-local-time:empty{ display:none; }
.touch-remove-phone{ color:var(--brick); margin:-4px 0 10px; }
.touch-remove-phone[hidden]{ display:none; }

/* Settings > Appearance: date format. */
.date-format-list{ display:flex; flex-direction:column; gap:4px; max-width:420px; }
.date-format-opt{ display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:8px; border:1px solid transparent; cursor:pointer; font-size:14px; }
.date-format-opt:hover{ background:var(--paper); }
.date-format-opt.on{ background:var(--paper); border-color:var(--line); }
.date-format-ex{ margin-left:auto; font-family:var(--font-mono); font-size:12px; color:var(--ink-soft); }

/* ---------------------------------------------------------------------------
 * Field search (2026-09-29): "payment terms: net 30" becomes a chip inside the
 * search box, with field suggestions below it and a line under the toolbar
 * saying what is being searched, or that the list has no such field.
 * ------------------------------------------------------------------------- */
.field-search{ flex:1; min-width:180px; position:relative; display:flex; align-items:center; gap:4px; padding-left:6px;
  border:1px solid var(--line-strong); border-radius:var(--radius); background:var(--paper-raised); }
.field-search:focus-within{ border-color:var(--mustard); box-shadow:0 0 0 2px var(--mustard-soft); }
.field-search input.search{ flex:1; min-width:70px; width:0; border:none; box-shadow:none; background-color:transparent; padding-left:4px; }
.field-search input.search:focus{ border:none; box-shadow:none; }
.field-search-chip{ display:inline-flex; align-items:center; gap:2px; flex:0 1 auto; min-width:0; max-width:60%; white-space:nowrap; padding:2px 2px 2px 8px;
  border-radius:6px; background:var(--mustard-soft); color:var(--ink); font-size:12px; font-weight:600; }
.field-search-chip-label{ min-width:0; overflow:hidden; text-overflow:ellipsis; }
/* On a phone the box takes its own row, with the buttons beneath it, and a
   Filters or Columns panel opens the full width of the toolbar rather than
   hanging off whichever side its button landed on. */
@media (max-width:560px){
  .field-search{ flex-basis:100%; }
  .toolbar{ position:relative; }
  .toolbar > .filter-menu{ position:static; }
  .toolbar > .filter-menu > .filter-menu-panel{ left:0; right:0; min-width:0; max-width:none; }
}
.field-search-chip[hidden]{ display:none; }
.field-search-chip-x{ border:none; background:transparent; color:inherit; cursor:pointer; font-size:15px; line-height:1;
  width:22px; height:22px; border-radius:4px; padding:0; }
.field-search-chip-x:hover{ background:rgba(0,0,0,0.08); }
.field-search-menu{ position:absolute; top:100%; left:0; margin-top:4px; min-width:260px; max-width:100%; z-index:60; padding:4px;
  background:var(--paper-raised); border:1px solid var(--line); border-radius:8px; box-shadow:0 4px 10px rgba(0,0,0,0.1); }
.field-search-menu[hidden]{ display:none; }
.field-search-item{ display:flex; align-items:center; gap:12px; padding:7px 9px; border-radius:6px; font-size:13px; cursor:pointer; }
.field-search-item.on, .field-search-item:hover{ background:var(--paper); }
.field-search-item-tail{ margin-left:auto; font-family:var(--font-mono); font-size:12px; color:var(--ink-soft); }
.field-search-hint{ margin:-10px 0 14px; font-size:12px; color:var(--ink-soft); }
.field-search-hint.warn{ color:var(--brick); }
.field-search-hint[hidden]{ display:none; }

/* ---------------------------------------------------------------------------
 * The dashboard revamp (2026-09-30, from the design audit of the same day).
 *
 * ONE frame per panel: the panel reads the block-style tokens like .panel
 * does (so Framed, Flat, Elevated, Ruled and Compact all apply) and a panel
 * built from .dp draws its own header row, flush rows and dividers with no
 * boxes inside it. Each count is said once, in the stat strip or in a panel
 * header's pill. Lists stop at five rows and say how many more.
 * ------------------------------------------------------------------------- */
.dashboard-section{ background:var(--panel-bg); border:var(--panel-border); border-radius:var(--panel-radius); box-shadow:var(--panel-shadow); }
.dashboard-section:has(> .dp), .dashboard-section:has(> .dash-panel-body > .dp){ padding:0; overflow:hidden; }
.dashboard-grid.is-editing > .dashboard-section:has(> .dash-panel-body > .dp) > .dash-controls{ margin:10px 12px 0; }

.dashboard-head{ align-items:center; margin-bottom:16px; }
.dashboard-date{ font-size:13px; color:var(--ink-soft); margin-top:2px; }
.btn.icon-only{ padding:8px 10px; line-height:0; }
.btn.icon-only .ic{ width:16px; height:16px; margin:0; }

.dp{ display:flex; flex-direction:column; min-height:100%; }
/* A header never shrinks: in a panel sized by hand the frame has a fixed height, and a
   header that wraps its controls onto a second line must grow, not let them spill over
   what is beneath it. */
.dp > .dp-head{ flex-shrink:0; }
.dp-head{ display:flex; align-items:center; gap:8px; min-height:46px; padding:8px 16px; border-bottom:1px solid var(--line); flex-wrap:wrap; }
.dp-title{ font-family:var(--font-display); font-size:16px; font-weight:600; margin:0; line-height:1.3; }
.dp-sub{ font-size:12px; color:var(--ink-soft); }
.dp-pill{ font-size:12px; font-weight:500; padding:2px 9px; border-radius:20px; background:var(--subtle-bg); color:var(--ink-soft); white-space:nowrap; }
.dp-pill.late{ background:var(--brick-soft); color:#8C332E; }
.dp-link{ margin-left:auto; font:inherit; font-size:12px; color:var(--ink-soft); background:none; border:none; cursor:pointer; padding:6px 0; white-space:nowrap; }
.dp-link:hover{ color:var(--ink); text-decoration:underline; }
.dp-seg{ display:inline-flex; margin-left:auto; border:1px solid var(--line-strong); border-radius:6px; overflow:hidden; }
.dp-seg-btn{ font:inherit; font-size:12px; padding:3px 9px; border:none; border-right:1px solid var(--line); background:transparent; color:var(--ink-soft); cursor:pointer; }
.dp-seg-btn:last-child{ border-right:none; }
.dp-seg-btn.on{ background:var(--subtle-bg); color:var(--ink); font-weight:600; }
.dp-seg + .dp-link{ margin-left:12px; }

.dp-rows{ display:flex; flex-direction:column; }
.dp-row{ display:flex; align-items:center; gap:10px; min-height:44px; padding:7px 16px; border-bottom:1px solid var(--line); font-size:13px; cursor:pointer; }
.dp-row:last-child{ border-bottom:none; }
.dp-row:hover{ background:var(--subtle-bg); }
.dp-row.is-static{ cursor:default; }
.dp-row.is-static:hover{ background:transparent; }
.dp-row-main{ flex:1; min-width:0; }
.dp-row-title{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--ink); }
.dp-row-meta{ font-size:12px; color:var(--ink-soft); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dp-row-end{ font-size:12px; color:var(--ink-soft); white-space:nowrap; font-variant-numeric:tabular-nums; }
.dp-row-end.late{ color:var(--brick); font-weight:500; }
/* Late in the text color: a to do or a step. The late color is for money, systems and builds. */
.dp-row-end.ink, .dp-pill.ink, .dp-attn-count.ink{ color:var(--ink); }
/* The To do panel's tick box: the label gives it a bigger target than it draws, 44px on a phone. */
.dp-tick{ flex:none; box-sizing:content-box; display:inline-flex; width:18px; height:18px; padding:8px; margin:-8px; }
label.dp-tick{ cursor:pointer; }
.dp-check{ appearance:none; -webkit-appearance:none; flex:none; display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; margin:0; padding:0;
  border:1.5px solid var(--line-strong); border-radius:var(--radius); background:transparent; cursor:pointer; }
.dp-check:hover{ border-color:var(--ink-soft); }
.dp-check:focus-visible{ outline:2px solid var(--mustard); outline-offset:2px; }
.dp-check:checked{ border-color:var(--mustard); }
.dp-check:checked::after{ content:''; width:9px; height:5px; border:2px solid var(--mustard); border-top:0; border-right:0; transform:translateY(-1px) rotate(-45deg); }
.dp-row.ticked .dp-row-title{ text-decoration:line-through; color:var(--ink-soft); }
@media (max-width:759px){ .dp-tick{ padding:13px; margin:-13px -5px -13px -13px; } }
.dp-dot{ width:8px; height:8px; border-radius:50%; background:var(--line-strong); flex:none; }
.dp-dot.late{ background:var(--brick); }

/* The loader: three small dots pulsing in the accent, one after another, with
   their words beside them for anybody who cannot see them. .app-loading fills a
   page or a panel (appLoadingHtml); .is-loading is a placeholder's line
   (loadingLineHtml), .is-loading.lg the same for a list or a page body. Both
   fade in after a moment, so a quick screen never flashes them. */
.loader-dots{ display:inline-flex; align-items:center; gap:5px; flex:none; }
.loader-dots i{ width:6px; height:6px; border-radius:50%; background:var(--mustard); animation:loaderPulse 1.2s ease-in-out infinite; }
.loader-dots i:nth-child(2){ animation-delay:.2s; }
.loader-dots i:nth-child(3){ animation-delay:.4s; }
.app-loading .loader-dots, .is-loading.lg .loader-dots{ gap:10px; }
.app-loading .loader-dots i, .is-loading.lg .loader-dots i{ width:10px; height:10px; }
@keyframes loaderPulse{ 0%, 100%{ opacity:.25; transform:scale(.8); } 50%{ opacity:1; transform:scale(1); } }
.app-loading{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px;
  min-height:min(60vh, 520px); padding:40px 16px; color:var(--ink-soft); text-align:center; animation:appLoadingIn .25s ease .15s both; }
.app-loading p{ margin:0; font-size:14px; }
.app-loading p:empty{ display:none; }
@keyframes appLoadingIn{ from{ opacity:0; } to{ opacity:1; } }
/* Arriving at a screen still fetching: the loader in front of the screen being left (render()). */
#view-root > .app-loading.view-wait ~ *{ display:none; }
.dashboard-grid > .app-loading{ grid-column:1 / -1; min-height:320px; }
.is-loading{ display:flex; align-items:center; gap:10px; animation:appLoadingIn .25s ease .15s both; }
span.is-loading{ display:inline-flex; }
.is-loading.lg{ flex-direction:column; justify-content:center; gap:14px; min-height:200px; text-align:center; }
.metric-value .is-loading{ font-size:13px; font-weight:400; color:var(--ink-soft); }
@media (prefers-reduced-motion:reduce){
  .loader-dots i{ animation:none; opacity:.7; }
  .app-loading, .is-loading{ animation:none; }
}
.dp-icon{ display:inline-flex; color:var(--ink-soft); flex:none; }
.dp-icon-btn{ display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; flex:none; border:1px solid var(--line-strong); border-radius:var(--radius); background:transparent; color:var(--ink); cursor:pointer; }
.dp-icon-btn:hover{ background:var(--paper); }
.dp-icon-btn .ic{ width:16px; height:16px; margin:0; }
.dp-row .btn.small{ min-height:32px; }
.dp-more{ display:block; width:100%; text-align:left; font:inherit; font-size:12px; color:var(--ink-soft); background:none; border:none; border-top:1px solid var(--line); padding:9px 16px; cursor:pointer; }
.dp-more:hover{ color:var(--ink); background:var(--subtle-bg); }
.dp-empty{ margin:0; padding:16px; font-size:13px; color:var(--ink-soft); }
.dp-subhead{ display:flex; align-items:center; gap:8px; padding:12px 16px 6px; border-top:1px solid var(--line); font-size:12px; font-weight:600; color:var(--ink-soft); }
.dp-pad{ padding:14px 16px; }
.dp-chart{ position:relative; height:210px; padding:12px 14px 8px; }

/* Horizontal bars (pipeline, reps): a label, a track, the figure. */
.dp-bars{ display:flex; flex-direction:column; gap:2px; padding:10px 8px; }
.dp-bar-row{ display:grid; grid-template-columns:minmax(0,96px) minmax(0,1fr) auto; align-items:center; gap:10px; width:100%; min-height:36px; padding:4px 8px; border:none; border-radius:6px; background:none; font:inherit; font-size:13px; color:var(--ink); text-align:left; cursor:pointer; }
.dp-bar-row:hover{ background:var(--subtle-bg); }
.dp-bar-row.is-static{ cursor:default; }
.dp-bar-row.is-static:hover{ background:none; }
.dp-bar-label{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dp-bar-track{ height:10px; border-radius:5px; background:var(--subtle-bg); overflow:hidden; }
.dp-bar-fill{ display:block; height:100%; border-radius:5px; background:var(--green-dot); }
.dp-bar-fill.stage-lead{ background:var(--blue); }
.dp-bar-fill.stage-prospect{ background:var(--yellow-dot); }
.dp-bar-fill.stage-customer{ background:var(--green-dot); }
.dp-bar-value{ font-size:12px; color:var(--ink-soft); font-variant-numeric:tabular-nums; min-width:36px; text-align:right; }

/* One bar split into parts (receivables by age), with its legend under it. */
.dp-stack{ display:flex; height:14px; border-radius:7px; overflow:hidden; background:var(--subtle-bg); gap:2px; }
.dp-stack-seg{ display:block; height:100%; min-width:3px; }
.dp-legend{ display:flex; flex-direction:column; margin-top:10px; }
.dp-legend-row{ display:flex; align-items:center; gap:8px; font-size:12px; padding:4px 0; border-bottom:1px solid var(--line); }
.dp-legend-row:last-child{ border-bottom:none; }
.dp-legend-label{ color:var(--ink-soft); }
.dp-legend-value{ margin-left:auto; font-variant-numeric:tabular-nums; color:var(--ink); }
.dp-legend-key{ display:inline-block; width:9px; height:9px; border-radius:2px; flex:none; margin-right:5px; }
.dp-legend-inline{ flex-direction:row; gap:14px; margin:0; padding:0 16px 12px; font-size:12px; color:var(--ink-soft); }

/* The stat strip: every chosen number in one row, divided, not boxed. */
.dash-strip{ display:grid; grid-template-columns:repeat(var(--n), minmax(0,1fr)); margin-bottom:18px; background:var(--panel-bg); border:var(--panel-border); border-radius:var(--panel-radius); box-shadow:var(--panel-shadow); overflow:hidden; }
.dash-stat{ position:relative; display:flex; flex-direction:column; gap:2px; min-width:0; padding:12px 16px; border-right:1px solid var(--line); }
.dash-stat:last-child{ border-right:none; }
.dash-stat.is-link{ cursor:pointer; }
.dash-stat.is-link:hover, .dash-stat.is-link:focus-visible{ background:var(--subtle-bg); outline:none; }
.dash-stat-label{ font-size:12px; color:var(--ink-soft); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dash-stat-value{ font-family:var(--font-display); font-size:26px; font-weight:600; line-height:1.15; font-variant-numeric:tabular-nums; color:var(--ink); }
.dash-stat-value.late{ color:var(--brick); }
.dash-stat-sub{ font-size:12px; color:var(--ink-soft); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dash-stat-sub .up{ color:var(--sage-ink); font-weight:600; }
.dash-stat-sub .down{ color:var(--brick); font-weight:600; }
.dash-stat-remove{ position:absolute; top:6px; right:6px; width:28px; height:28px; border:1px solid var(--line-strong); border-radius:50%; background:var(--paper-raised); color:var(--ink); font-size:16px; line-height:1; cursor:pointer; }
.dash-stat-add{ justify-content:center; background:repeating-linear-gradient(135deg, transparent 0 6px, var(--subtle-bg) 6px 12px); }
.dash-stat-add select{ margin-top:4px; max-width:100%; }
/* A stat's history (dashStatSparkHtml): a curve beside the figure with a dot on today, in the stat's own colour.
   It shares the figure's row and gives way to a long figure. Each stat is its own container, so a narrow one
   (six in a row, a phone's two) takes the small curve. */
.dash-stat{ container-type:inline-size; }
.dash-stat-figure{ display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; }
.dash-stat-figure .dash-stat-value{ flex:none; }
.dash-stat-spark{ flex:0 1 84px; min-width:0; height:40px; margin:-5px 0; overflow:visible; pointer-events:none; }
.dash-stat-spark path{ fill:none; stroke:var(--mustard); stroke-width:1.5; stroke-linecap:round; vector-effect:non-scaling-stroke; }
.dash-stat-spark circle{ fill:var(--mustard); }
.dash-stat-spark.late path{ stroke:var(--brick); }
.dash-stat-spark.late circle{ fill:var(--brick); }
/* Customising: the curve steps aside for the remove button (a phone's cell keeps that edge clear already). */
.dash-stat:has(.dash-stat-remove) .dash-stat-spark{ margin-right:26px; }
@container (max-width:230px){
  .dash-stat-spark{ flex-basis:46px; height:28px; margin-top:0; margin-bottom:0; }
  .dash-stat-spark circle{ r:4.4px; }
}
@media (max-width:759px){ .dash-stat:has(.dash-stat-remove) .dash-stat-spark{ margin-right:0; } }

/* Customize: the shortcuts, in the order they will sit in the + menu. */
.dash-editbar{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:-4px 0 14px; padding:10px 14px; border:1.5px dashed var(--line-strong); border-radius:var(--panel-radius); }
.dash-editbar-label{ font-size:12px; font-weight:600; color:var(--ink-soft); margin-right:4px; }
.dash-editbar-note{ font-size:12px; color:var(--ink-soft); }
.dash-hot-chip{ display:inline-flex; align-items:center; gap:4px; padding:3px 4px 3px 12px; border-radius:20px; background:var(--subtle-bg); font-size:13px; }
.dash-hot-chip button{ width:26px; height:26px; border:none; border-radius:50%; background:transparent; color:var(--ink); font-size:16px; line-height:1; cursor:pointer; }
.dash-hot-chip button:hover{ background:var(--line); }
.dash-tray-group{ display:flex; align-items:center; flex-wrap:wrap; gap:0 6px; margin-bottom:6px; }
.dash-tray-group-name{ font-size:11px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-soft); min-width:64px; margin:0 6px 6px 0; }

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

@media (max-width:759px){
  .dashboard-head .page-title{ font-size:24px; }
  /* The greeting and its date on the left, View and Customize as icons on the right.
     While customising, the text buttons take a line of their own beneath. */
  .dashboard-head{ flex-wrap:nowrap; align-items:flex-start; gap:8px; }
  .dashboard-head:has(#dashboard-head-actions > .btn:not(.icon-only)){ flex-wrap:wrap; }
  .dashboard-head .page-head-actions{ width:auto; display:flex; flex-wrap:nowrap; gap:8px; }
  .dashboard-head:has(#dashboard-head-actions > .btn:not(.icon-only)) .page-head-actions{ width:100%; flex-wrap:wrap; }
  .dashboard-head .page-head-actions .btn{ min-height:44px; }
  .dashboard-head .page-head-actions > .btn.icon-only{ flex:0 0 44px; width:44px; padding:0; }
  /* View is its icon alone here: the menu it opens still names every choice. */
  .dashboard-head .dash-view > summary{ width:44px; padding:0; justify-content:center; }
  .dashboard-head .dash-view > summary::after, .dash-view-word{ display:none; }
  .dash-strip{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  .dash-stat{ border-bottom:1px solid var(--line); }
  .dash-stat:nth-child(2n){ border-right:none; }
  .dash-stat-value{ font-size:22px; }
  .dp-link, .dp-more{ min-height:44px; }
  .dp-row .btn.small, .dp-icon-btn{ min-height:44px; min-width:44px; }
  .dp-seg-btn{ padding:8px 12px; }
  /* The report is one tap away under Reports; the header keeps to one line. */
  .dp-seg + .dp-link{ display:none; }
}

/* ---------------------------------------------------------------------------
 * Dashboard revamp, fixes from the re-audit (2026-09-30).
 * ------------------------------------------------------------------------- */
/* Chart series colours as their own tokens: a theme that folds green, yellow
   and mustard into one colour (Physare) still tells the series apart. */
:root{ --chart-a:var(--green-dot); --chart-b:var(--yellow-dot); --chart-c:var(--mustard); --chart-d:var(--blue); }
html[data-theme="physare"]{ --chart-a:#E9F26B; --chart-b:#6E6E6B; --chart-c:#F2F2EF; --chart-d:#9CA3AD; }
.dp-bar-fill{ background:var(--chart-a); }
.dp-bar-fill.stage-lead{ background:var(--chart-d); }
.dp-bar-fill.stage-prospect{ background:var(--chart-b); }
.dp-bar-fill.stage-customer{ background:var(--chart-a); }

/* The late pill's ink on a dark theme, as the other tinted badges do. */
html[data-scheme="dark"] .dp-pill.late{ color:#F0B7AE; }

/* Compact tightens the panels again. */
html[data-blocks="compact"] .dp-head{ min-height:38px; padding:5px 12px; }
html[data-blocks="compact"] .dp-title{ font-size:15px; }
html[data-blocks="compact"] .dp-row{ min-height:36px; padding:4px 12px; }
html[data-blocks="compact"] .dp-more{ padding:6px 12px; }
html[data-blocks="compact"] .dp-chart{ height:180px; padding:8px 10px 4px; }
html[data-blocks="compact"] .dash-stat{ padding:8px 12px; }
html[data-blocks="compact"] .dash-stat-value{ font-size:22px; }
html[data-blocks="compact"] .dash-strip{ margin-bottom:14px; }

/* A panel's header stays one line: in a narrow panel the quiet sub-text goes first. */
.dp{ container-type:inline-size; }
.dp-head{ flex-wrap:nowrap; }
.dp-title{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.dp-sub{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
@container (max-width:460px){ .dp-head .dp-sub{ display:none; } }
@container (max-width:300px){ .dp-head .dp-link{ display:none; } }

/* On a phone search is in the top row, so the first figures sit higher. */
@media (max-width:759px){
  .dashboard-head{ margin-bottom:12px; }
  .dash-stat{ padding:10px 14px; }
}

/* A short panel ends at its content (2026-09-30, Nick): in a row beside a taller
   one it no longer stretches into blank space. Customised layouts already fit
   each panel to its content unless its height was set by hand. */
.dashboard-grid:not(.is-free){ align-items:start; }

/* A chart in a panel sized by hand fills the height it was given, rather than
   keeping its own 210px and being cut off (or leaving a gap). The body stops
   scrolling for a chart: the chart shrinks instead, down to the panel's minRows. */
.dashboard-grid.is-free > .dashboard-section:not(.is-fit) > .dash-panel-body:has(.dp-chart){ display:flex; flex-direction:column; overflow:hidden; }
.dashboard-grid.is-free > .dashboard-section:not(.is-fit) > .dash-panel-body > .dp:has(.dp-chart){ flex:1 1 auto; min-height:0; }
.dashboard-grid.is-free > .dashboard-section:not(.is-fit) .dp-chart{ flex:1 1 0; height:auto; min-height:110px; }

/* Customize: how many rows a list panel shows, beside Hide. */
.dash-rows{ display:inline-flex; align-items:center; gap:5px; font-size:12px; color:var(--ink-soft); white-space:nowrap; }
.dash-rows select{ font-size:12px; padding:3px 6px; min-height:28px; }
@media (max-width:759px){ .dash-rows select{ min-height:36px; } }
/* Customize: Show, which kinds of item a panel lists. Opens as a row of ticks
   under the bar (never a popover, which the panel's overflow would clip). */
.dash-controls:has(.dash-pick[open]){ flex-wrap:wrap; }
.dash-pick{ font-size:12px; color:var(--ink-soft); }
.dash-pick > summary{ cursor:pointer; list-style:none; padding:4px 9px; border:1px solid var(--line-strong); border-radius:6px; white-space:nowrap; }
.dash-pick > summary::-webkit-details-marker{ display:none; }
.dash-pick > summary::after{ content:" \25BE"; }
.dash-pick[open]{ flex-basis:100%; order:10; }
.dash-pick[open] > summary{ display:inline-block; margin-bottom:6px; background:var(--subtle-bg); color:var(--ink); }
.dash-pick-menu{ display:flex; flex-wrap:wrap; gap:6px 14px; }
.dash-pick-menu .inline-checkbox{ display:inline-flex; align-items:center; gap:6px; min-height:28px; color:var(--ink); }
@media (max-width:759px){ .dash-pick > summary, .dash-pick-menu .inline-checkbox{ min-height:44px; display:inline-flex; align-items:center; } }
/* A quarter-width panel's bar keeps its title: the size shows while dragging anyway. */
.dashboard-section[data-w="3"] .dash-size-readout, .dashboard-section[data-w="4"] .dash-size-readout{ display:none; }
/* A narrow panel's bar wraps rather than squeezing its title to a letter:
   the title takes what is left of the first line, the controls follow. */
.dashboard-grid.is-editing .dash-controls{ flex-wrap:wrap; row-gap:6px; }
.dashboard-grid.is-editing .dash-title{ flex:1 1 90px; }

/* ---------------------------------------------------------------------------
 * Needs attention (2026-09-30): every module warning as a row, urgent first,
 * two columns; muted business-wide in Settings > Business, hidden per person
 * in Customize.
 * ------------------------------------------------------------------------- */
.dp-pill.soon{ background:var(--blue-soft); color:var(--blue-ink, var(--ink)); }
.dp-attn-note{ margin-left:auto; }
.dp-attn-grid{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); }
.dp-attn-row{ display:flex; align-items:center; gap:6px; min-width:0; border-bottom:1px solid var(--line); padding-right:10px; }
.dp-attn-row:nth-child(odd){ border-right:1px solid var(--line); }
.dp-attn-go{ flex:1; min-width:0; display:flex; align-items:center; gap:10px; min-height:44px; padding:7px 6px 7px 16px; border:none; background:none; font:inherit; font-size:13px; color:var(--ink); text-align:left; cursor:pointer; }
.dp-attn-go:hover{ background:var(--subtle-bg); }
.dp-attn-count{ min-width:26px; text-align:center; padding:2px 7px; border-radius:6px; font-weight:600; font-size:12px; font-variant-numeric:tabular-nums; }
.dp-attn-count.late{ background:var(--brick-soft); color:#8C332E; }
.dp-attn-count.soon{ background:var(--blue-soft); color:var(--blue-ink, var(--ink)); }
html[data-scheme="dark"] .dp-attn-count.late{ color:#F0B7AE; }
.dp-attn-text{ flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dp-attn-chev{ color:var(--text-muted); font-size:15px; width:13px; height:13px; stroke-width:1.6; }
.dp-attn-hide{ flex:none; font:inherit; font-size:12px; padding:4px 10px; min-height:30px; border:1px solid var(--line-strong); border-radius:var(--radius); background:var(--paper-raised); color:var(--ink); cursor:pointer; }
.dp-attn-row.is-hidden .dp-attn-go{ opacity:.45; }
/* In Customize a panel's contents go inert; these two switches are the exception. */
.dashboard-grid.is-editing .dp-attn-hide{ pointer-events:auto; }
@media (max-width:759px){
  .dp-attn-grid{ grid-template-columns:minmax(0,1fr); }
  .dp-attn-row:nth-child(odd){ border-right:none; }
  .dp-attn-note{ display:none; }
}

/* Settings > Business > Dashboard warnings. */
.dash-warn-group{ font-size:11px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-soft); margin:12px 0 4px; }
.dash-warn-row{ display:flex; align-items:center; gap:10px; min-height:40px; padding:4px 0; border-bottom:1px solid var(--line); font-size:13px; cursor:pointer; }
.dash-warn-row > span:first-child{ flex:1; }
.dash-warn-off{ font-size:12px; color:var(--ink-soft); }
.dash-warn-switch,.push-switch{ appearance:none; -webkit-appearance:none; width:36px; height:20px; border-radius:10px; background:var(--line-strong); position:relative; cursor:pointer; flex:none; transition:background .15s; padding:0; border:none; }
.dash-warn-switch::after,.push-switch::after{ content:''; position:absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background:#fff; transition:left .15s; box-shadow:0 1px 2px rgba(0,0,0,.2); }
.dash-warn-switch:checked,.push-switch:checked{ background:var(--green-dot); }
.dash-warn-switch:checked::after,.push-switch:checked::after{ left:18px; }
.dash-warn-switch:focus-visible,.push-switch:focus-visible{ outline:2px solid var(--mustard); outline-offset:2px; }
.dash-warn-switch:disabled,.push-switch:disabled{ opacity:.5; cursor:default; }

/* ---------------------------------------------------------------------------
 * Trends, targets and the sales team (2026-09-30).
 * ------------------------------------------------------------------------- */
/* A target's progress: a thin bar and a line of words, under a chart or in a row. */
.dp-trend-foot:empty{ display:none; }
.dp-target{ display:flex; align-items:center; gap:10px; padding:4px 16px 14px; font-size:12px; color:var(--ink-soft); }
.dp-target-track{ display:block; flex:0 0 180px; height:6px; border-radius:3px; background:var(--subtle-bg); overflow:hidden; }
.dp-target-fill{ display:block; height:100%; border-radius:3px; background:var(--chart-a); }
.dp-target.is-reached .dp-target-text{ color:var(--sage-ink, var(--ink)); font-weight:600; }
.dp-target-text{ min-width:0; }
/* A chart panel with a foot: the chart keeps what is left once the foot is drawn. */
.dashboard-grid.is-free > .dashboard-section:not(.is-fit) > .dash-panel-body > .dp:has(.dp-chart) > .dp-trend-foot{ flex:none; }
@media (max-width:759px){
  .dp-target{ flex-wrap:wrap; }
  .dp-target-track{ flex-basis:100%; }
}

/* Twelve weeks under a count tile. */
.dash-spark{ display:block; width:100%; height:28px; margin-top:4px; overflow:visible; }
.dash-spark polyline{ fill:none; stroke:var(--chart-a); stroke-width:1.6; vector-effect:non-scaling-stroke; }
.dash-spark-sub{ font-size:12px; color:var(--ink-soft); }

/* The target form: the shape as two radios on one line. */
.target-form .field-label{ display:block; font-size:12px; font-weight:600; color:var(--ink-soft); margin-bottom:6px; }
.target-form .seg-radio{ display:flex; gap:18px; flex-wrap:wrap; }
.target-form .seg-radio .inline-checkbox{ display:inline-flex; align-items:center; gap:6px; min-height:32px; }
.target-form [hidden]{ display:none; }
@media (max-width:759px){ .target-form .seg-radio .inline-checkbox{ min-height:44px; } }

/* Settings > Business > Targets. */
.targets-list{ display:flex; flex-direction:column; margin:10px 0 12px; border-top:1px solid var(--line); }
.targets-row{ display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(0,1.4fr) 48px auto; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid var(--line); font-size:13px; }
.targets-who{ color:var(--ink-soft); }
.targets-pct{ font-variant-numeric:tabular-nums; color:var(--ink-soft); text-align:right; }
.targets-pct.is-reached{ color:var(--sage-ink, var(--ink)); font-weight:600; }
@media (max-width:559px){
  .targets-row{ grid-template-columns:minmax(0,1fr) auto; }
  .targets-who, .targets-amount{ grid-column:1; font-size:12px; }
  .targets-pct{ grid-row:1; grid-column:2; }
  .targets-row .btn{ grid-column:2; min-height:44px; }
}

/* The rep board: a name, the numbers in columns, the target as a bar. */
.dp-reps .dp-row{ gap:12px; }
.dp-rep-head{ min-height:32px; padding-top:6px; padding-bottom:6px; font-size:11px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--ink-soft); }
.dp-rep-name{ flex:1 1 auto; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dp-rep-num{ flex:0 0 72px; text-align:right; font-variant-numeric:tabular-nums; }
.dp-rep-head .dp-rep-num{ font-variant-numeric:normal; }
.dp-rep-goal{ flex:0 0 150px; display:flex; justify-content:flex-end; }
.dp-row.is-me .dp-rep-name{ font-weight:600; }
.dp-rep-unclaimed{ color:var(--ink-soft); }
.dp-rep-target{ display:inline-flex; align-items:center; gap:8px; width:100%; }
.dp-rep-target .dp-target-track{ flex:1 1 auto; }
.dp-rep-pct{ flex:none; width:38px; text-align:right; font-size:12px; color:var(--ink-soft); font-variant-numeric:tabular-nums; }
.dp-rep-target.is-reached .dp-rep-pct{ color:var(--sage-ink, var(--ink)); font-weight:600; }
@media (max-width:759px){
  .dp-rep-num{ flex-basis:56px; }
  .dp-rep-goal{ flex-basis:88px; }
  .dp-rep-num:nth-of-type(3){ display:none; }
}
/* Claimed accounts: one bar a rep, split by stage. */
.dp-claims-track{ display:flex; gap:2px; height:12px; border-radius:6px; overflow:hidden; background:var(--subtle-bg); }
.dp-claims-track .dp-stack-seg{ min-width:3px; }
/* My book: three figures side by side, the target under them. */
.dp-book{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px; padding:14px 16px 10px; }
.dp-book-fig{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.dp-book-label{ font-size:12px; color:var(--ink-soft); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dp-book-value{ font-family:var(--font-display); font-size:22px; font-weight:600; font-variant-numeric:tabular-nums; }
.dp-book-target .dp-target-track{ flex:1 1 auto; }
.dp-book-none{ padding-top:4px; }
/* ---------------------------------------------------------------------------
 * Dashboard presets (2026-09-30): View in the header, the notice over
 * Customize, Settings > Business > Dashboard presets and its form.
 * ------------------------------------------------------------------------- */
.dash-view{ position:relative; }
.dash-view > summary{ list-style:none; cursor:pointer; display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
.dash-view > summary::-webkit-details-marker{ display:none; }
.dash-view > summary::after{ content:"\25BE"; font-size:11px; color:var(--ink-soft); }
.dash-view > summary .ic{ width:15px; height:15px; margin:0; }
/* The word on a desktop, the icon on a phone. */
@media (min-width:760px){ .dash-view > summary .ic{ display:none; } }
.dash-view-menu{ position:absolute; right:0; top:calc(100% + 6px); z-index:60; min-width:250px; max-width:min(320px, 90vw); padding:6px;
  background:var(--paper-raised); border:1px solid var(--line-strong); border-radius:10px; box-shadow:0 8px 24px rgba(0,0,0,0.14); }
.dash-view-head{ padding:6px 10px 2px; font-size:11px; font-weight:600; letter-spacing:.05em; text-transform:uppercase; color:var(--ink-soft); }
.dash-view-item{ display:flex; align-items:center; gap:8px; width:100%; min-height:36px; padding:6px 10px; font:inherit; font-size:13px; text-align:left;
  color:var(--ink); background:none; border:none; border-radius:6px; cursor:pointer; }
.dash-view-item:hover, .dash-view-item.on{ background:var(--subtle-bg); }
.dash-view-check{ width:14px; flex:none; color:var(--ink); }
.dash-view-note{ margin-left:auto; font-size:11px; color:var(--ink-soft); }
/* A closed menu takes no room at all: its hidden list still widened a phone's page. */
.dash-view:not([open]) > .dash-view-menu{ display:none; }
@media (max-width:759px){
  .dash-view > summary, .dash-view-item{ min-height:44px; }
  /* The button sits at the right of the row on a phone, so the list opens leftwards. */
  .dash-view-menu{ left:auto; right:0; }
}
.dash-edit-notice{ display:flex; align-items:center; gap:6px 12px; flex-wrap:wrap; margin:-4px 0 10px; padding:9px 14px; border-radius:var(--panel-radius);
  background:var(--subtle-bg); font-size:13px; color:var(--ink-soft); }
.dash-edit-notice strong{ color:var(--ink); }
.dash-edit-notice.is-preset{ border:1.5px dashed var(--line-strong); background:transparent; }
.presets-list{ display:flex; flex-direction:column; margin:10px 0 12px; border-top:1px solid var(--line); }
.presets-row{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.6fr) 80px auto; align-items:center; gap:10px; padding:9px 0; border-bottom:1px solid var(--line); font-size:13px; }
.presets-name{ font-weight:600; }
.presets-chip{ display:inline-block; font-size:11px; padding:1px 8px; margin:0 4px 3px 0; border-radius:10px; background:var(--subtle-bg); color:var(--ink-soft); }
.presets-chip.is-default{ background:var(--sage-soft, var(--subtle-bg)); color:var(--sage-ink, var(--ink)); font-weight:600; }
.presets-following{ font-size:12px; color:var(--ink-soft); }
.presets-actions{ display:flex; gap:6px; }
/* Where each role starts: a role and its dropdown, side by side at every width. */
.presets-row.is-start{ grid-template-columns:minmax(0,1fr) minmax(0,280px); }
.presets-row.is-start .presets-roles{ grid-column:2; }
.presets-row.is-start select{ width:100%; }
@media (max-width:559px){
  .presets-row{ grid-template-columns:minmax(0,1fr) auto; }
  .presets-roles, .presets-following{ grid-column:1; }
  .presets-actions{ grid-column:2; grid-row:1 / span 3; flex-direction:column; }
  .presets-actions .btn{ min-height:44px; }
}
.preset-role-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:6px 0; border-bottom:1px solid var(--line); }
.preset-role-row .inline-checkbox{ display:inline-flex; align-items:center; gap:6px; min-height:32px; font-size:13px; }
.preset-default{ color:var(--ink-soft); }
.form-grid .field-label{ display:block; font-size:12px; font-weight:600; color:var(--ink-soft); margin-bottom:6px; }

/* ---------------------------------------------------------------------------
 * Chart headlines and the bars or line switch (2026-09-30).
 * ------------------------------------------------------------------------- */
/* Several switches in one header sit together on the right, not spread across it. */
.dp-head .dp-seg + .dp-seg{ margin-left:6px; }
.dp-seg[hidden]{ display:none; }
.dp-chart-seg .dp-seg-btn{ display:inline-flex; align-items:center; justify-content:center; min-width:30px; }
.dp-chart-seg .ic{ width:15px; height:15px; margin:0; }
.dp-proj.on{ color:var(--ink); }
/* The big figure over a chart, and how it compares. */
.dp-headline{ padding:12px 16px 0; }
.dp-headline-row{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.dp-big{ font-family:var(--font-display); font-size:28px; font-weight:600; line-height:1.15; font-variant-numeric:tabular-nums; color:var(--ink); }
.dp-change{ display:inline-flex; align-items:center; gap:2px; font-size:12px; font-weight:600; padding:2px 8px; border-radius:20px; white-space:nowrap; background:var(--subtle-bg); color:var(--ink-soft); }
.dp-change.up{ background:var(--sage-soft); color:var(--sage-ink, var(--ink)); }
.dp-change.down{ background:var(--brick-soft); color:#8C332E; }
html[data-scheme="dark"] .dp-change.down{ color:#F0C4BE; }
.dp-caption{ margin-top:2px; font-size:12px; color:var(--ink-soft); }
/* A chart panel with a headline: the chart keeps what is left once it is drawn. */
.dashboard-grid.is-free > .dashboard-section:not(.is-fit) > .dash-panel-body > .dp:has(.dp-chart) > .dp-headline,
.dashboard-grid.is-free > .dashboard-section:not(.is-fit) > .dash-panel-body > .dp:has(.dp-chart) > #dash-sales-headline,
.dashboard-grid.is-free > .dashboard-section:not(.is-fit) > .dash-panel-body > .dp:has(.dp-chart) > .dp-trend-headline{ flex:none; }
@media (max-width:759px){
  .dp-big{ font-size:24px; }
  .dp-chart-seg .dp-seg-btn{ min-width:44px; }
}
/* Outside a panel header the switches keep their own place. */
.report-chart-tools .dp-seg, .sales-chart-type .dp-seg{ margin-left:0; }
/* A switch never shrinks to a sliver; in a narrow panel (a phone, half width) a chart's
   header gives the title its own line and the switches the next, rather than one line. */
.dp-seg{ flex:none; }
@container (max-width:600px){
  .dp-head:has(.dp-chart-seg){ flex-wrap:wrap; row-gap:8px; }
  .dp-head:has(.dp-chart-seg) .dp-title{ flex:1 0 100%; }
  .dp-head:has(.dp-chart-seg) .dp-seg:first-of-type{ margin-left:0; }
}


/* The range as a dropdown in a chart's header (2026-09-30, Nick's reference). */
.dp-range{ margin-left:auto; flex:none; font:inherit; font-size:12px; color:var(--ink); min-height:30px; padding:4px 26px 4px 10px;
  border:1px solid var(--line-strong); border-radius:8px; background-color:var(--paper-raised); cursor:pointer; }
.dp-head .dp-range + .dp-seg{ margin-left:6px; }
@container (max-width:600px){ .dp-head:has(.dp-chart-seg) .dp-range{ margin-left:0; } }
@media (max-width:759px){ .dp-range{ min-height:44px; font-size:14px; } }

/* Five line colours for a comparison chart (Sales by rep), the same in every theme
   so no two reps share a hue, lightened on a dark scheme. */
:root{ --race-1:#3F7D52; --race-2:#2F6FB3; --race-3:#C2562B; --race-4:#7A5BC4; --race-5:#A87510; }
html[data-scheme="dark"]{ --race-1:#6FB884; --race-2:#6AA4E6; --race-3:#E58A63; --race-4:#A58EE6; --race-5:#D6A63E; }
/* ---------------------------------------------------------------------------
 * Phone fixes from the dashboard audit, round 4 (2026-09-30).
 * ------------------------------------------------------------------------- */
/* 16px inputs on a phone: anything smaller and iOS zooms the page when one is tapped. */
@media (max-width:759px){
  .dp-range, .race-team, .dash-rows select, .dash-stat-add select, .gs-wrap input, .dash-pick-menu input{ font-size:16px; }
}
/* A finger's worth (44px) for every control on the dashboard. */
@media (pointer:coarse){
  .dp-seg-btn{ min-height:44px; min-width:44px; }
  .dp-link, .dp-more, .race-reset, .race-link{ min-height:44px; }
  .dash-hot-chip button{ width:44px; height:44px; }
  .dp-bar-row{ min-height:44px; }
  .cal-week-more{ min-height:44px; }
  .dash-view > summary, .dash-view-item{ min-height:44px; }
}
/* My book: a label wraps to a second line rather than losing its end ("Sales this mo..."). */
.dp-book-label{ white-space:normal; overflow:visible; text-overflow:clip; line-height:1.3; }
/* Customize on a phone: the remove button no longer sits on the stat's name, and Add a stat takes the whole row. */
@media (max-width:759px){
  .dash-strip .dash-stat:has(.dash-stat-remove){ padding-right:48px; }
  .dash-stat-remove{ width:36px; height:36px; top:4px; right:4px; }
  .dash-strip .dash-stat-add{ grid-column:1 / -1; }
}
/* A chart header that wraps: the second row starts flush, no stray indent before a switch. */
@container (max-width:600px){ .dp-head .dp-seg + .dp-seg, .dp-head .dp-range + .dp-seg{ margin-left:0; } }

/* ---------------------------------------------------------------------------
 * Dashboard audit round 4, the rest (2026-09-30).
 * ------------------------------------------------------------------------- */
/* 1. A narrow panel keeps its time period ("this month", "next 14 days") and drops the
      report link instead: the report is one click away in the menu. */
@container (max-width:460px){
  .dp-head .dp-sub{ display:inline; }
  .dp-head:has(.dp-sub) .dp-link{ display:none; }
}
/* 7. A chart header that has to wrap does so naturally (title first, controls as they fit),
      the report link goes, and Projection is its icon alone. */
@container (max-width:600px){
  .dp-head:has(.dp-chart-seg) .dp-title{ flex:0 0 auto; }
  .dp-head:has(.dp-chart-seg) .dp-link{ display:none; }
  .dp-proj-text{ display:none; }
}
.dp-proj{ display:inline-flex; align-items:center; gap:6px; }
.dp-proj .ic{ width:15px; height:15px; margin:0; }
.dp-proj:disabled{ opacity:.45; cursor:default; }
/* Customize: a panel's bar no longer names it over its own title; tiles, which have none, keep it. */
.dashboard-grid.is-editing .dashboard-section:has(.dp-title) > .dash-controls .dash-title{ display:none; }
/* The rep leaderboard's names take the spare width; Target narrows to what it shows. */
.dp-rep-goal{ flex:0 1 150px; min-width:84px; }
/* The phone's first screen: a slimmer stat strip. */
@media (max-width:759px){
  .dash-stat{ padding:8px 12px; }
  .dash-stat-value{ font-size:20px; }
  .dash-stat-sub{ display:none; }
}/* The rep leaderboard in a narrow panel: names first; "New" goes and the figures narrow. */
@container (max-width:560px){
  .dp-reps .dp-rep-num{ flex-basis:58px; }
  .dp-reps .dp-rep-num:nth-of-type(3){ display:none; }
  .dp-reps .dp-rep-goal{ flex-basis:96px; min-width:72px; }
}

/* The legend as the picker, for every comparison chart (Sales by rep, Activity): shared here so it draws with any module off. */
.race-status{ display:flex; align-items:center; gap:10px; padding:10px 16px 0; font-size:12px; color:var(--ink-soft); }
.race-reset, .race-link{ font:inherit; font-size:12px; color:var(--ink); background:none; border:none; padding:4px 0; text-decoration:underline; cursor:pointer; }
.race-chips{ display:flex; flex-wrap:wrap; gap:6px; padding:8px 16px 4px; }
.race-chip{ display:inline-flex; align-items:center; gap:6px; min-height:30px; padding:2px 4px 2px 10px; border:1px solid var(--line); border-radius:16px; font-size:12px; background:var(--paper-raised); }
.race-swatch{ display:inline-block; width:12px; height:3px; border-radius:2px; flex:none; }
.race-chip-name{ color:var(--ink); max-width:140px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.race-chip-total{ color:var(--ink-soft); font-variant-numeric:tabular-nums; }
.race-chip-x{ width:24px; height:24px; border:none; border-radius:50%; background:none; color:var(--ink-soft); font-size:15px; line-height:1; cursor:pointer; }
.race-chip-x:hover{ background:var(--subtle-bg); color:var(--ink); }
.race-add{ min-height:30px; padding:2px 12px; border:1px dashed var(--line-strong); border-radius:16px; background:none; font:inherit; font-size:12px; color:var(--ink); cursor:pointer; }
.race-add-count{ color:var(--ink-soft); }
.race-add-panel{ margin:6px 16px 4px; padding:10px 12px; border:1px solid var(--line-strong); border-radius:10px; background:var(--paper-raised); }
.race-add-head{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.race-add-head .dp-seg{ margin-left:0; }
.race-team{ font:inherit; font-size:12px; min-height:30px; padding:3px 8px; border:1px solid var(--line-strong); border-radius:8px; background:var(--paper-raised); color:var(--ink); }
.race-pick-list{ display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:2px 12px; margin:8px 0; max-height:180px; overflow:auto; }
.race-pick{ display:flex; align-items:center; gap:6px; min-height:30px; font-size:13px; }
.race-add-foot{ display:flex; align-items:center; gap:8px; justify-content:flex-end; flex-wrap:wrap; }
.race-note{ margin-right:auto; font-size:12px; color:var(--ink-soft); }
.race-unclaimed{ margin:0; padding:2px 16px 12px; font-size:12px; color:var(--ink-soft); }
@media (max-width:759px){
  .race-chip, .race-add, .race-pick, .race-team{ min-height:44px; }
  .race-chip-x{ width:36px; height:36px; }
  .race-team{ font-size:16px; }
}

/* ===========================================================================
 * Phone pass (2026-10-08): the back office as an installed Android app.
 * Phone rules only; nothing here changes the desktop.
 * ======================================================================== */


/* A pull down at the top of the installed app would reload it and lose the
   screen somebody was on. */
@media (display-mode:standalone), (display-mode:fullscreen){
  html, body{overscroll-behavior-y:none;}
}

/* No double-tap zoom wait on anything that is pressed. */
button, a, .btn, input, select, textarea, label, summary, [onclick], [role="button"]{touch-action:manipulation;}

@media (max-width:820px){
  /* 16px in every field: anything smaller and the phone zooms the page when
     one is tapped. Important, because a dozen narrower rules (search boxes,
     filters, the line detail's inline style) each set their own size. */
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]),
  select, textarea{font-size:16px !important;}
  input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date],
  input[type=datetime-local], input[type=time], input[type=number], input[type=url], input[type=search], select{min-height:44px;}
  .price-wrap input{min-height:42px;}

  /* Every button a finger's height. */
  .btn, .btn.small{min-height:44px;}
  a.btn, label.btn{display:inline-flex;align-items:center;justify-content:center;}
  .seg button{min-height:44px;padding-left:12px;padding-right:12px;}
  .inline-checkbox, .field .inline-checkbox, .check-row{min-height:44px;}
  .modal-x{width:44px;height:44px;top:6px;right:6px;}
  /* The "?" keeps its 16px look; its target reaches 44px around it. */
  .help-tip{position:relative;}
  .help-tip::after{content:'';position:absolute;inset:-14px;}
}

/* Customising on a phone: the text buttons wrap with their whole names. */
@media (max-width:759px){
  .dashboard-head .page-head-actions > .btn:not(.icon-only){flex:1 1 auto;padding:0 14px;}
}

/* Forms and dialogs on a phone. */
@media (max-width:640px){
  /* Pairs stay pairs, three across stack: three fields in 300px were 81px
     each, too narrow to read what was typed. */
  .field-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);}
  .field-row.three{grid-template-columns:minmax(0,1fr);}
  .field-row > *{min-width:0;}

  /* Every pop-up is a bottom sheet: it rises from the foot of the screen, the
     full width, round on top only, with a grab bar. One taller than the screen
     starts just below the top and scrolls under a fixed backdrop. The overlay
     has no padding at the foot, or sticky would stop the buttons above it with
     fields showing beneath them. Named .overlay > .modal to outrank a width a
     module stylesheet sets. */
  .overlay{align-items:flex-end;padding:calc(44px + env(safe-area-inset-top)) 0 0;overscroll-behavior:contain;}
  .overlay > .modal{width:100%;max-width:none;margin:auto 0 0;padding:28px 16px calc(16px + env(safe-area-inset-bottom));
    border-width:1px 0 0;border-radius:14px 14px 0 0;animation:sheetUp .24s cubic-bezier(.2,.8,.2,1);}
  .overlay > .modal.no-slide{animation:none;}
  .modal::before{content:"";position:absolute;top:9px;left:50%;width:40px;height:4px;margin-left:-20px;border-radius:2px;background:var(--line-strong);}
  /* The buttons stay in reach, held above the home bar. The one that does the
     job takes the room left on the row. */
  .modal > .modal-actions{flex-wrap:wrap;justify-content:flex-start;gap:10px;margin:16px -16px calc(-16px - env(safe-area-inset-bottom));
    padding:12px 16px calc(12px + env(safe-area-inset-bottom));
    background:var(--paper-raised);box-shadow:none;border-top:1px solid var(--line);}
  .modal-actions > .btn:last-child{flex:1 1 auto;}
  .modal-x{top:12px;}

  /* A number box a finger can work. */
  .num-step{min-width:136px;}
  .num-step > input[type=number]{min-height:42px;}
  .num-step-btn{width:44px;}
}
@keyframes sheetUp{ from{ transform:translateY(48px); opacity:.5; } to{ transform:none; opacity:1; } }
@media (prefers-reduced-motion:reduce){ .overlay > .modal{ animation:none; } }

@media (max-width:820px){
  /* The older 32px floors for toolbar and row-action buttons are more specific
     than the rule above, so they are named again at a finger's height. */
  .toolbar .btn.small, .toolbar .seg button,
  .row .order-actions .btn.small, .order-actions .btn.small{min-height:44px;}
  .dp-seg-btn, .dp-chart-seg .dp-seg-btn{min-height:44px;}
  /* A field never pushes past its column: a select at 16px sized itself to its
     longest option and took the Time screen to 405px. */
  input, select, textarea{max-width:100%;}
  /* A section heading's buttons wrap under it rather than squeezing it. */
  .section-head{flex-wrap:wrap;gap:8px;}
}

@media (max-width:820px){
  /* A month picker is a field like any other (it was the browser's 24px). */
  input[type=month], input[type=week]{min-height:44px;font-size:16px;}
  /* A one-character button ("+") is still a finger wide. */
  .btn.small{min-width:44px;}
  /* A due-date group's header opens its breakdown: a full row to press. */
  .day-group-head{min-height:44px;}
}

/* A narrow panel head with count pills (Needs attention on a 360px phone):
   the pills move under the title rather than cutting it to "Needs attenti...". */
@media (max-width:759px){
  .dp-head:has(.dp-pill){flex-wrap:wrap;row-gap:6px;}
  .dp-head:has(.dp-pill) .dp-title{flex:0 0 auto;overflow:visible;}
}

/* ===========================================================================
 * Phone pass, round 2 (2026-10-08, Nick said yes to three of the four open
 * items). Phones only, under 641px; the desktop is unchanged.
 * ======================================================================== */

/* 2. The To do and Cadence steps panels: a long title wraps to a second line
      instead of being cut (a cadence step's client and step line too).
      Still one row per item, the "+ N more" count untouched. The panels fit their content, so a taller
      row simply makes a taller panel. */
@media (max-width:640px){
  .dp-todos .dp-row-title, .dp-cadences .dp-row-title, .dp-cadences .dp-row-meta{
    white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.3;}
  .dp-todos .dp-row, .dp-cadences .dp-row{padding-top:9px;padding-bottom:9px;}
}

/* 3. Delete out of a dialog's footer. platform.js moves the button to its own
      line at the end of the form (moveModalDeleteButtons); here it reads as a
      quiet text action, still a 44px target, so Save and Cancel share one row
      at 360px. Named with the theme selectors, which otherwise paint it as an
      outlined button. */
@media (max-width:640px){
  .modal-delete-row{display:flex;justify-content:flex-start;margin:12px 0 0;}
  .modal-delete-row .btn.modal-delete-quiet,
  html[data-theme] .modal-delete-row .btn.modal-delete-quiet{background:none;border-color:transparent;color:var(--brick);
    padding:0 2px;min-height:44px;margin:0;text-decoration:underline;text-underline-offset:3px;}
  html[data-theme] .modal-delete-row .btn.modal-delete-quiet:hover{background:none;border-color:transparent;color:var(--brick);opacity:.85;}
}

/* 4. Reading size on a phone: list and form text from 13-14px to 15px, with
      everything around it moved up a step so the hierarchy holds.
        reading text             13-14px -> 15px (a to do's title 16px)
        secondary lines (meta)   12px    -> 13-14px
        micro text, badges       11px    -> 12-12.5px
        tracked uppercase labels 10-11.5px -> 11-12.5px
        headings                 section 18 -> 20, dialog 20 -> 22
      Scoped under #app-shell (the app and its dialogs) so a module stylesheet,
      which loads after this one and sets its own size on the same class,
      cannot quietly undo it. The public pages carry their own rules. */
@media (max-width:640px){
  /* reading text */
  #app-shell :is(.sub-text, .page-sub, p.empty, .empty p, .dp-empty, .dp-row, .dp-attn-text, .inline-checkbox,
    .company-link-btn, table.data, .price-wrap span, .combo-option,
    .deal-card-client, .sys-kv, .dl-late, .gs-row-title, .gs-hint, .line-sub, .qs-amount, .cadence-who .sub-text),
  #app-shell .field .inline-checkbox,
  #app-shell .row.invoices .primary-text, #app-shell .row.quotes .primary-text,
  #app-shell .calendar-cell .cal-pill{font-size:15px;}
  #app-shell .task-title{font-size:16px;}
  /* secondary lines */
  #app-shell :is(.task-meta, .dp-row-meta, .dp-row-end, .deal-card-title, .deal-card-money, .deal-when, .sys-when, .inv-stage,
    .gs-row-sub, .dp-sub, .dp-link, .dp-more, .dp-caption, .dp-subhead, .help-bubble){font-size:14px;}
  #app-shell :is(.field label, .metric-label, .dash-stat-label, .deal-card-meta, .line-item-remove, .company-lost-chip,
    .dp-pill, .dp-attn-count){font-size:13px;}
  #app-shell .field .inline-checkbox{font-size:15px;}
  /* A stat's name wraps rather than losing its end at the larger size. */
  #app-shell .dash-stat-label{white-space:normal;line-height:1.3;}
  /* micro text and badges */
  #app-shell :is(.micro-text, .pill-soft, .badge, .calendar-day-dow, .deal-col-meta, .sys-status){font-size:12.5px;}
  #app-shell :is(.form-section, .filter-section-head){font-size:12px;}
  /* tracked uppercase labels */
  html[data-font="inter"] .btn{font-size:12.5px;}
  html[data-font="inter"] .btn.small{font-size:11.5px;}
  #app-shell :is(table.data th, .day-group-head){font-size:11px;}
  #app-shell :is(.deal-chip, .sys-mod, .deal-col-label, .deal-num, .deal-eyebrow, .deal-kpi-label, .sys-num, .sys-eyebrow, .sys-kpi-label,
    .bk-num, .bk-eyebrow, .bk-kpi-label, .lg-num, .lg-eyebrow, .lg-kpi-label, .dl-num, .dl-eyebrow, .dl-kpi-label){font-size:11.5px;}
  #app-shell :is(.bk-tag, .deal-flag){font-size:11px;}
  #app-shell .seg button{font-size:13px;}
  /* A segmented row never runs past the screen: a long label ("Vendors and
     contractors") wraps inside its own button instead. */
  #app-shell .seg.seg-auto{display:flex;max-width:100%;}
  #app-shell .seg.seg-auto button{flex:1 1 auto;white-space:normal;line-height:1.2;}
  /* headings */
  #app-shell .section-title{font-size:20px;}
  #app-shell .modal h2{font-size:22px;}
  /* With larger labels a page head's button group wraps rather than running
     past the edge (Cadences reached 367px at 360). */
  #app-shell .page-head > div{flex-wrap:wrap;min-width:0;max-width:100%;}
}


/* Settings > Account > Phone notifications: a device per row (its name and
   when it was turned on, Send a test and Turn off), then the events grouped
   under small uppercase labels, each with a switch on the right. On a phone
   the device buttons drop under the name. */
.push-note{ margin:0 0 12px; }
.push-denied{ padding:12px 14px; border:1px solid var(--line-strong); border-radius:var(--radius, 6px); }
.push-denied p{ margin:6px 0 0; }
.push-devices{ margin-top:12px; border-top:1px solid var(--line); }
.push-device{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0; border-bottom:1px solid var(--line); }
.push-device-text{ min-width:0; }
.push-device-actions{ display:flex; gap:8px; flex:none; }
.push-this{ margin-left:6px; vertical-align:1px; background:var(--subtle-bg); color:var(--ink); border:1px solid var(--line-strong); }
.push-events{ margin-top:20px; }
.push-events-lead{ margin-bottom:6px; }
.push-group{ margin-top:14px; }
.push-group-label{ font-size:11px; font-weight:500; letter-spacing:0.12em; text-transform:uppercase; color:var(--ink-soft); padding-bottom:6px; border-bottom:1px solid var(--line); }
.push-event{ display:flex; align-items:center; justify-content:space-between; gap:16px; padding:11px 0; border-bottom:1px solid var(--line); cursor:pointer; min-height:24px; }
@media (max-width: 600px){
  .push-device{ flex-direction:column; align-items:flex-start; }
  .push-device-actions{ width:100%; }
  .push-device-actions .btn{ flex:1; min-height:40px; }
}
html[data-theme="plasmodium"] .push-switch:checked::after{ background:#000000; }

/* ===========================================================================
 * The Physare look (2026-11-11): physare.com's design system on the two
 * Physare themes, Plasmodium and Oat. docs/REDESIGN.md has the table these
 * values come from, measured from the live site. Scoped to those two themes;
 * every other theme keeps the shell above as its own tokens draw it.
 * ======================================================================== */

html:is([data-theme="plasmodium"],[data-theme="oat"]){scrollbar-width:thin;scrollbar-color:var(--line-strong) transparent;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) ::-webkit-scrollbar{width:10px;height:10px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) ::-webkit-scrollbar-track{background:transparent;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) ::-webkit-scrollbar-thumb{background:var(--line-strong);border:3px solid var(--paper);}
/* Body 15.2px with the site's tracking. Tabular figures only where numbers
   line up (the .n class, a table's number cells, amounts and totals), never
   the whole body: Inter's tabular set gives the hyphen a figure's width, so
   "add-on", "INV-20261009-004" and "v2.15-beta" spread apart. Identifiers in
   the reading face (.mono) keep proportional figures for the same reason. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) body{font-size:15.2px;letter-spacing:-0.005em;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.n, .num, td.num, th.num, [class$="-amount"], [class$="-total"], [class$="-value"], [class$="-money"]){font-variant-numeric:tabular-nums;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.font-mono, .mono){font-variant-numeric:normal;}
html[data-theme="plasmodium"] ::selection{background:#F0F870;color:#000000;}
html[data-theme="oat"] ::selection{background:#000000;color:#F0F870;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(input, textarea, [contenteditable]){caret-color:var(--mustard);}

/* The focus ring: 1px in the accent, 3px out. Inside a menu or a list it sits
   on the row's own edge, where the box around it would cut it off. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(a, button, summary, [role="button"], [role="tab"], [tabindex]):focus-visible{outline:1px solid var(--mustard);outline-offset:3px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.acct-menu button, .shell-menu-item, .gs-row, .notif-open, .notif-mi, .pin-pick-row, .list-tab, .today-row, .today-also-row, .today-beside-row):focus-visible{outline:1px solid var(--mustard);outline-offset:-1px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(input, textarea, select):focus{box-shadow:none;border-color:var(--mustard);}

/* Type: light display, tight tracking. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) .wordmark .brand-mark{font-weight:300;letter-spacing:-0.03em;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .page-title{font-size:48.96px;font-weight:300;letter-spacing:-0.025em;line-height:1.08;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.page-sub, .dashboard-date){font-size:15.2px;line-height:1.5;margin-top:8px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .page-head .page-title + :is(.sub-text, p){margin-top:8px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .page-head{margin-bottom:28px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .page-head:has(+ .heading-tabs){margin-bottom:32px;}
/* Never a small label above a heading, nor an icon beside one: the tab row
   under the title says where this is. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) .page-head [class$="-eyebrow"],
html:is([data-theme="plasmodium"],[data-theme="oat"]) .page-title > .ic{display:none;}
/* A list's column heads are labels. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) .row.head{font-family:var(--font-ui);font-size:11.52px;font-weight:500;letter-spacing:0.12em;}
@media (max-width:1180px){
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .page-title{font-size:40px;}
}
@media (max-width:820px){
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .page-title{font-size:36px;}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .detail-top .page-title{font-size:28px;}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .page-head{margin-bottom:22px;}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .page-head:has(+ .heading-tabs){margin-bottom:20px;}
}
@media (max-width:480px){
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .page-title{font-size:32px;}
}

/* The phone's tab bar is the site's black in both, the current tab in the acid. */
@media (max-width:820px){
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .tabbar-tab{color:var(--text-muted);}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .tabbar-tab.on{color:var(--mustard);}
}

/* Menus and panels: the tile on a hairline, square, never a shadow. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.acct-menu, .help-bubble){border-radius:2px;box-shadow:none;}

/* ===========================================================================
 * Area 5a (2026-11-12): every other screen in the system. The shared parts
 * the module screens are built from, drawn once here so a screen that uses
 * them needs nothing of its own: the section head as label, rule, label; no
 * boxes (the block style is Ruled in these two themes whatever is picked);
 * statuses and counts as label-style words, never pills; figures as a label
 * over a display number on a hairline; tab rows and segmented choices in the
 * tab style; underline fields; and one pop-up vocabulary (the title in the
 * display style, label-style field names, the job button on the right).
 * ======================================================================== */

/* No boxes: every panel reads these tokens. */
html:is([data-theme="plasmodium"],[data-theme="oat"]){--panel-bg:transparent;--panel-border:none;--panel-radius:0;--panel-pad:0;--panel-shadow:none;--row-pad:13px 0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.panel, .card-list, .settings-card, .dash-tray, .dash-strip){border:0;border-radius:0;background:none;box-shadow:none;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .card-list{overflow:visible;}

/* Nothing bold: the hierarchy is size and light type, as on the site. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) #app-shell :is(h1, h2, h3, h4, h5, .section-title, .primary-text, .dp-title, .dash-title, .settings-card-title, .empty h3, .metric-value, .dash-stat-value){font-weight:400;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) #app-shell :is(strong, b){font-weight:500;}

/* A section head: its label, a hairline that fills the row, then whatever
   stands at its right (a figure, a text link, a button). */
html:is([data-theme="plasmodium"],[data-theme="oat"]) .section-head{display:flex;align-items:center;justify-content:flex-start;gap:14px;margin-bottom:10px;padding:0;border:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .section-head > *{order:2;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .section-head > :first-child{order:0;flex:0 1 auto;min-width:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .section-head::after{content:"";order:1;flex:1 1 24px;height:1px;background:var(--line);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.section-head > .section-title, .section-head > h2, .section-head > h3, .section-head > [class$="-eyebrow"], .form-section, .dash-warn-group, .push-group-label, .dash-tray-group-name, .dash-view-head, .filter-section-head){
  margin:0;font-family:var(--font-ui);font-size:11.52px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;color:var(--text-muted);line-height:1.5;opacity:1;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .section-head :is(.micro-text, .sub-text){font-size:14.4px;color:var(--ink-soft);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .section{margin-top:44px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .form-section{padding-bottom:8px;margin:18px 0 10px;border-bottom:1px solid var(--line);}

/* Rows: hairlines, flush with the page, no tile under the pointer. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) .row{padding-left:0;padding-right:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .row:hover{background:none;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .row:not(.head):last-child{border-bottom:1px solid var(--line);}
@media (hover:hover){
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .row:not(.head):hover .primary-text{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;text-decoration-color:var(--line-strong);}
}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .row.head{color:var(--text-muted);text-transform:uppercase;padding-top:10px;padding-bottom:10px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) table.data{border:0;border-radius:0;background:none;font-size:14.4px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) table.data th{font-family:var(--font-ui);font-size:11.52px;font-weight:500;letter-spacing:0.12em;color:var(--text-muted);padding:10px 12px 10px 0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) table.data td{padding:11px 12px 11px 0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) table.data tr:last-child td{border-bottom:1px solid var(--line);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) table.data tr:hover td{background:none;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.sub-text, .micro-text){color:var(--ink-soft);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .micro-text{font-size:12.5px;}

/* Statuses are words in the label style: the accent where something waits on
   somebody, the ink where it is done, the late color where it is late or
   lost, quiet otherwise. Never a pill. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.badge, .badge.neutral, .dp-pill, .pill-soft){display:inline;padding:0;border:0;border-radius:0;background:none;box-shadow:none;
  font-size:11.52px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;line-height:1.5;color:var(--text-muted);white-space:nowrap;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.badge.pending, .badge.st-waiting, .badge.customer-created){background:none;color:var(--mustard);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.badge.fulfilled, .badge.st-done, .badge.paid, .badge.sentiment-connected, .badge.sentiment-nurture){background:none;color:var(--ink);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.badge.consigned, .badge.st-progress, .badge.sentiment-follow, .badge.st-muted){background:none;color:var(--ink-soft);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.badge.warn, .badge.sentiment-not, .dp-pill.late){background:none;color:var(--brick);}
/* "Coming up" is not a warning: the text color, never the accent. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.dp-pill.ink, .dp-pill.soon){background:none;color:var(--ink);}
/* A chip that names a thing (a tag, a module) is square and outlined. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.company-tag-pill, .dash-tray-chip, .dash-hot-chip){border-radius:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.dash-tray-chip, .dash-hot-chip){border:1px solid var(--line);background:none;font-size:11.52px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;color:var(--ink-soft);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dash-tray-chip:hover{border-color:var(--line-strong);color:var(--ink);background:none;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .filter-menu-badge{background:none;color:var(--mustard);border-radius:0;padding:0;margin-left:6px;font-size:11.52px;}

/* Figures: a label over a display number, on a hairline. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) .metric-grid{gap:20px 24px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .metric-card{padding:14px 0 0;border:0;border-top:1px solid var(--line);border-radius:0;background:none;box-shadow:none;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .metric-card.clickable:hover{border-color:var(--line-strong);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.metric-label, .dash-stat-label){font-size:11.52px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;color:var(--text-muted);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.metric-value, .dash-stat-value){margin-top:6px;font-family:var(--font-display);font-size:30.4px;font-weight:300;letter-spacing:-0.015em;line-height:1.15;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .metric-card > :is(.sub-text, .micro-text){margin-top:4px;}

/* The record's back button: the arrow alone, as Projects and Clients have it. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) .back-btn{width:32px;height:32px;margin-left:-6px;border:0;border-radius:0;background:none;color:var(--ink-soft);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .back-btn:hover{color:var(--ink);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .back-btn:focus-visible{outline:1px solid var(--mustard);outline-offset:3px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .back-btn .ic{width:15px;height:15px;stroke-width:1.6;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .detail-top .page-title{font-size:40px;}

/* Tab rows: a record's tabs and a list's status tabs read as the system's. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) .list-tabs{gap:28px;border-bottom:0;box-shadow:inset 0 -1px 0 var(--line);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .list-tab{height:auto;padding:0 0 12px;margin:0;border-bottom:1px solid transparent;color:var(--text-muted);font-size:11.52px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;line-height:1.5;}
@media (hover:hover){ html:is([data-theme="plasmodium"],[data-theme="oat"]) .list-tab:hover{color:var(--ink);} }
html:is([data-theme="plasmodium"],[data-theme="oat"]) .list-tab.on{color:var(--ink);border-bottom-color:var(--ink);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .list-tab:focus-visible{outline:1px solid var(--mustard);outline-offset:-1px;}
/* A segmented choice is a short tab row: the words, the current one underlined. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) .seg{display:inline-flex;flex-wrap:wrap;gap:4px 22px;border:0;border-radius:0;background:none;overflow:visible;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .seg button{flex:0 0 auto;min-height:32px;padding:0;border:0;border-bottom:1px solid transparent;border-radius:0;background:none;color:var(--text-muted);
  font-size:11.52px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;line-height:1.5;}
@media (hover:hover){ html:is([data-theme="plasmodium"],[data-theme="oat"]) .seg button:hover{background:none;color:var(--ink);} }
html:is([data-theme="plasmodium"],[data-theme="oat"]) .seg button.active{background:none;color:var(--ink);border-bottom-color:var(--ink);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-seg{border:0;border-radius:0;gap:2px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-seg-btn{border:0;border-bottom:1px solid transparent;color:var(--text-muted);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-seg-btn.on{background:none;color:var(--ink);border-bottom-color:var(--ink);font-weight:400;}
@media (max-width:820px){
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .list-tab{display:inline-flex;align-items:center;height:44px;padding:0;}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .seg button{min-height:44px;}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) #app-shell .seg button{font-size:11.52px;}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) #app-shell .seg.seg-auto button{flex:0 0 auto;white-space:nowrap;}
}

/* Fields: a line under what is typed, as the site's search field has it. A
   text area keeps a hairline frame, since a line under a paragraph says
   nothing about where it ends. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=datetime-local], input[type=time], input[type=number], input[type=url], input[type=search], input[type=month], input[type=week], select){
  border:0;border-bottom:1px solid var(--line-strong);border-radius:0;background-color:transparent;padding:8px 0;min-height:38px;color:var(--ink);font-size:15.2px;}
/* On a phone every box is a finger's height. The 44px floor in the phone
   rules above loses to the 38px here, which is more specific, so it is
   named again at this rule's own strength. A box inside a price or number
   wrapper keeps its 42px; the wrapper's line makes up the rest. */
@media (max-width:820px){
  html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=datetime-local], input[type=time], input[type=number], input[type=url], input[type=search], input[type=month], input[type=week], select){min-height:44px;}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.price-wrap input, .num-step > input[type=number]){min-height:42px;}
}
html:is([data-theme="plasmodium"],[data-theme="oat"]) select{padding-right:22px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) select option{background:var(--paper-raised);color:var(--ink);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) textarea{border:1px solid var(--line-strong);border-radius:0;background:transparent;padding:10px 12px;color:var(--ink);font-size:15.2px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(input, textarea, select):focus{outline:none;box-shadow:none;border-color:var(--mustard);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(input, textarea)::placeholder{color:var(--ink-soft);opacity:1;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) input.search{padding-right:26px;background-position:right 2px center;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.price-wrap, .num-step){border:0;border-bottom:1px solid var(--line-strong);border-radius:0;background:transparent;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .price-wrap{padding:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.price-wrap, .num-step):focus-within{border-color:var(--mustard);box-shadow:none;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.price-wrap input, .num-step > input[type=number]){border:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .num-step-btn{border-radius:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .combo-control .combo-input{padding:8px 52px 8px 0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .combo-icons{right:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .combo-disabled .combo-control .combo-input{background:transparent;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .field.field-invalid :is(input, select){border-color:var(--brick) !important;}
/* A field's name is a label. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) .field > label:not([class]){margin-bottom:2px;font-size:11.52px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;color:var(--text-muted);line-height:1.5;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .field > label .optional{text-transform:none;letter-spacing:0;font-size:12.5px;color:var(--text-muted);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .field{margin-bottom:18px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .field-error-msg{font-weight:500;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.field .inline-checkbox, .inline-checkbox){font-weight:400;font-size:14.4px;}

/* Menus that drop from a control: the tile, square, on a hairline, no shadow. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.filter-menu-panel, .combo-panel, .fms .fms-panel, .dropdown-panel, .dash-view-menu){border-radius:0;box-shadow:none;border:1px solid var(--line-strong);background:var(--paper-raised);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.combo-option:hover, .fms label.fms-option:hover){background:var(--subtle-bg);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .combo-group-label{font-family:var(--font-ui);font-size:11.52px;font-weight:500;letter-spacing:0.12em;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .fms label.fms-option{border-radius:0;font-size:14.4px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dash-view > summary::after{display:none;}

/* Empty: a plain sentence where the list would be. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) .empty{padding:28px 0;text-align:left;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .empty h3{font-size:24px;font-weight:300;letter-spacing:-0.015em;line-height:1.15;margin-bottom:8px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .empty p{font-size:15.2px;max-width:640px;}

/* A note inside a form or a pop-up: words on a hairline, never a box. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) .alert{border:0;border-top:1px solid var(--line);border-radius:0;padding:10px 0 0;font-size:14.4px;color:var(--ink-soft);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .alert-pill{padding:0;border:0;border-radius:0;background:none;font-size:14.4px;color:var(--ink-soft);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .alert-pill.warn{color:var(--brick);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.alert-pill, .alert-item) .alert-count{font-family:var(--font-ui);font-weight:500;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .alert-dot{border-radius:0;width:6px;height:6px;}

/* Pop-ups and bottom sheets: one vocabulary. The title in the display style,
   label-style field names, underline fields, outline buttons, the job button
   at the right of the foot (Cancel and the rest at its left). */
html:is([data-theme="plasmodium"],[data-theme="oat"]) .modal{padding:30px 32px 26px;border:1px solid var(--line-strong);border-radius:2px;background:var(--paper-raised);box-shadow:none;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) #app-shell :is(.modal > h2:first-child, .modal-header-row h2, .modal .modal-title){margin-bottom:22px;font-family:var(--font-display);font-size:30.4px;font-weight:300;letter-spacing:-0.015em;line-height:1.15;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) #app-shell .modal-header-row h2{margin-bottom:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) #app-shell .modal h3{font-family:var(--font-ui);font-size:11.52px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;color:var(--text-muted);line-height:1.5;margin:22px 0 10px;padding-bottom:8px;border-bottom:1px solid var(--line);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) #app-shell .confirm-modal h2{margin-bottom:12px;font-size:24px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .confirm-modal p{font-size:15.2px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .modal > .modal-actions{gap:12px;margin:26px -32px -26px;padding:16px 32px 20px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .modal-x{top:14px;right:14px;border-radius:0;color:var(--ink-soft);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .modal-x:hover{background:none;color:var(--ink);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .modal-x:focus-visible{outline:1px solid var(--mustard);outline-offset:-1px;}
@media (min-width:641px){
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .modal.is-tall{border-radius:2px 2px 0 0;}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .modal.is-tall > .modal-actions{margin-bottom:-27px;padding-bottom:20px;}
}
/* Today's sheet between a phone and a desk is square like every other sheet. */
@media (min-width:641px) and (max-width:820px){
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .overlay.today-overlay > .modal{border-radius:2px 2px 0 0;}
}
@media (max-width:640px){
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .overlay > .modal{padding:30px 20px calc(16px + env(safe-area-inset-bottom));border-width:1px 0 0;}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .modal > .modal-actions{margin:20px -20px calc(-16px - env(safe-area-inset-bottom));padding:12px 20px calc(12px + env(safe-area-inset-bottom));}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) #app-shell :is(.modal > h2:first-child, .modal-header-row h2, .modal .modal-title){font-size:26px;}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) #app-shell .confirm-modal h2{font-size:22px;}
}

/* The dashboard, kept whole: its panels are hairline sections. A panel's head
   is a section head (its title as a label, the rule, then its counts and
   links); its rows run to the column's edge. */
/* Wider gutters where the twelve columns have room: eleven gaps of 40px would hold a phone's grid open past the screen. */
@media (min-width:1100px){ html:is([data-theme="plasmodium"],[data-theme="oat"]) .dashboard-grid{column-gap:40px;} }
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dashboard-section{padding:0;border:0;border-radius:0;background:none;box-shadow:none;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dashboard-section.is-tile{padding:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-head{gap:14px;min-height:0;padding:0 0 8px;border-bottom:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-head > *{order:2;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-head > .dp-title{order:0;flex:0 1 auto;font-family:var(--font-ui);font-size:11.52px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;color:var(--text-muted);line-height:1.5;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-head::after{content:"";order:1;flex:1 1 24px;height:1px;background:var(--line);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-head > .dp-sub{order:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-link{margin-left:0;font-size:14.4px;color:var(--ink);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;text-decoration-color:var(--line-strong);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-link:hover{text-decoration-color:currentColor;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.dp-row, .dp-more, .dp-empty, .dp-subhead, .dp-pad, .dp-legend-inline){padding-left:0;padding-right:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-row{border-bottom:0;border-top:1px solid var(--line);font-size:14.4px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-row:hover{background:none;}
@media (hover:hover){ html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-row:not(.is-static):hover .dp-row-title{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;text-decoration-color:var(--line-strong);} }
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-rows{border-bottom:1px solid var(--line);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-row-end.late{font-weight:400;}
/* Every lateness phrase on the dashboard in the queue's style: a label, in
   dueWhen()'s one wording. Red only once a date has passed, where red is allowed. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.dp-row-end.dp-when, .sys-when, .deal-when){font-size:11.52px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;line-height:1.5;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-prio{color:var(--text-muted);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-more{border-top:0;font-size:14.4px;color:var(--ink-soft);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-more:hover{background:none;color:var(--ink);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-subhead{font-size:11.52px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;color:var(--text-muted);border-top:0;padding-top:18px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-chart{padding-left:0;padding-right:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-check{border-radius:0;border-width:1px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-dot{border-radius:0;width:6px;height:6px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-icon-btn{border-radius:2px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-bar-row{border-radius:0;padding-left:0;padding-right:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-bar-row:hover{background:none;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.dp-bar-track, .dp-bar-fill){height:2px;border-radius:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-bar-track{background:var(--line);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-bar-fill{background:var(--ink);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.dp-stack, .dp-stack-seg){border-radius:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-stack{height:4px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-legend-key{border-radius:0;}
/* Needs attention: the count as a figure in its color, the words beside it. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-attn-row{padding-right:0;border-bottom:0;border-top:1px solid var(--line);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-attn-grid{border-bottom:1px solid var(--line);column-gap:40px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-attn-row:nth-child(odd){border-right:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-attn-go{padding-left:0;font-size:14.4px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-attn-go:hover{background:none;}
@media (hover:hover){ html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-attn-go:hover .dp-attn-text{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;text-decoration-color:var(--line-strong);} }
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-attn-count{min-width:22px;padding:0;border-radius:0;background:none;font-weight:400;font-size:15.2px;text-align:left;color:var(--ink);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-attn-count.late{background:none;color:var(--brick);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-attn-count.soon{background:none;color:var(--ink);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dp-attn-hide{border-radius:2px;background:none;}
/* The stat strip: figures on a hairline, side by side. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dash-strip{gap:0 24px;overflow:visible;margin-bottom:36px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dash-stat{padding:14px 0 0;border-right:0;border-top:1px solid var(--line);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.dash-stat.is-link:hover, .dash-stat.is-link:focus-visible){background:none;border-top-color:var(--line-strong);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dash-stat-sub{font-size:14.4px;margin-top:2px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dash-stat-sub :is(.up, .down){font-weight:400;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dash-stat-remove{border-radius:0;background:var(--paper);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dash-stat-add{background:none;border-top-style:dashed;}
/* Customize: the bars and grips in the hairline language. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dashboard-grid.is-editing > .dashboard-section{border:1px dashed var(--line-strong);padding:10px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dash-controls{border-radius:0;background:none;border-bottom:1px solid var(--line);margin:0 0 12px;padding:0 0 8px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.dash-controls button, .dash-sizes button, .dash-pick > summary){border-radius:0 !important;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dash-sizes button.on{background:none;border-color:var(--mustard);color:var(--mustard);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dash-editbar{border-radius:0;border:1px dashed var(--line-strong);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dash-ghost{border-radius:0;box-shadow:none;border:1px solid var(--line-strong);background:var(--paper);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.dash-grip-r, .dash-grip-b)::after{border-radius:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dash-size-tag{border-radius:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .dash-tray{padding:16px 0 0;border-top:1px solid var(--line);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.dash-warn-switch, .push-switch){border-radius:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.dash-warn-switch, .push-switch)::after{border-radius:0;box-shadow:none;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.dash-warn-switch, .push-switch):checked{background:var(--mustard);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.dash-warn-switch, .push-switch):checked::after{background:var(--paper);}
@media (max-width:759px){
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .dash-strip{gap:0 20px;}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .dash-stat{border-bottom:0;padding-bottom:16px;}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.metric-value, .dash-stat-value){font-size:26px;}
}

/* Settings: each card is a hairline section, its title in the display style. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) .settings-cards{gap:36px 32px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .settings-card{padding:14px 0 0;border-top:1px solid var(--line);gap:8px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .settings-card:hover{border-top-color:var(--ink);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .settings-card-head .ic{display:none;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .settings-card-title{font-family:var(--font-display);font-size:24px;font-weight:300;letter-spacing:-0.015em;line-height:1.15;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .settings-card-items span{font-size:14.4px;color:var(--ink-soft);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.theme-card, .block-preview, .block-preview-panel, .theme-swatch, .theme-swatch-card, .theme-swatch-rail, .font-sample){border-radius:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .theme-card{background:none;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .theme-card.selected{border-width:1px;padding:10px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .theme-card-name{font-size:14.4px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .theme-card-note{font-size:12.5px;color:var(--ink-soft);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .font-sample{background:none;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .font-sample-display{font-weight:300;font-size:24px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .collapse-toggle{border-radius:2px;}

/* The module families' own figures and small heads (Books, Bank, Billing,
   Delivery, Systems, Pipeline): one label size and one figure size. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is([class$="-kpi-label"], .lg-month, .bl-month, .dl-day, .lg-tb-head, .lg-form-head, .bk-month){font-size:11.52px;color:var(--text-muted);letter-spacing:0.12em;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) [class$="-kpi-value"]{font-size:30.4px;letter-spacing:-0.015em;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) [class$="-kpis"]{gap:20px 24px;}
@media (max-width:640px){
  html:is([data-theme="plasmodium"],[data-theme="oat"]) #app-shell [class$="-kpi-label"]{font-size:11.52px;}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) [class$="-kpi-value"]{font-size:26px;}
}

/* Settings, one section open: each panel is a hairline section whose first
   line, its name, is the section head's label; panels stand apart. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) #view-root .panel + .panel{margin-top:44px !important;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) #view-root .panel > .primary-text:first-child{display:flex;align-items:center;gap:14px;margin-bottom:8px;
  font-size:11.52px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;color:var(--text-muted);line-height:1.5;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) #view-root .panel > .primary-text:first-child::after{content:"";flex:1 1 24px;height:1px;background:var(--line);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) #view-root .panel > .primary-text:first-child + .sub-text{font-size:14.4px;}
/* A switch: a square track on a hairline, the knob in the accent when on. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.dash-warn-switch, .push-switch, .pa-switch input){background:transparent;border:1px solid var(--line-strong);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.dash-warn-switch, .push-switch)::after{top:3px;left:3px;width:12px;height:12px;background:var(--ink-soft);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.dash-warn-switch, .push-switch):checked{background:transparent;border-color:var(--mustard);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.dash-warn-switch, .push-switch):checked::after{left:19px;background:var(--mustard);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.dash-warn-row, .push-event){font-size:14.4px;}

/* Charts: the one accent first, then the ink's greys, so two series never
   share a color (green and yellow were both the acid here). */
html:is([data-theme="plasmodium"],[data-theme="oat"]){--chart-a:var(--mustard);--chart-b:var(--ink-soft);--chart-c:var(--ink);--chart-d:var(--line-strong);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .push-denied{border-radius:0;border-width:1px 0;padding:12px 0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .push-this{border-radius:0;}

/* A page head's actions: text links spaced as words, the button last. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) .page-head-actions{gap:12px 22px;flex-wrap:wrap;}

/* The fields above are not for the bar's search, which has its own line. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) .gs-box .gs-input{min-height:0;padding:0;border:0;font-size:14.08px;}
/* The phone pass (2026-10-08) sizes labels, badges and section titles under
   #app-shell; in these two themes a label stays a label at every width. */
@media (max-width:640px){
  html:is([data-theme="plasmodium"],[data-theme="oat"]) #app-shell :is(.field > label:not([class]), .metric-label, .dash-stat-label, .badge, .dp-pill, .pill-soft, .form-section, .filter-section-head, .section-head > .section-title, .section-head > h2, .section-head > h3, .section-head > [class$="-eyebrow"], .dp-row-end.dp-when, .sys-when, .deal-when){font-size:11.52px;}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) #app-shell .seg button{font-size:11.52px;}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .gs-box .gs-input{font-size:16px;}
}

/* ===========================================================================
 * Area 5b (2026-11-12): the sign-in screens in the system. The card is the
 * site's black panel on either ground (black on Plasmodium, oat-white on Oat,
 * no shadow, square), the wordmark in light type, the screen's name in the
 * display style, label-style field names over underline fields, the outline
 * button across the card, a text link under it, and an error as a sentence
 * under a line in the late color rather than a tinted box.
 * ======================================================================== */
html:is([data-theme="plasmodium"],[data-theme="oat"]) .login-screen{padding:24px 16px;box-sizing:border-box;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .login-card{max-width:400px;padding:44px 40px 40px;border-radius:0;box-shadow:none;}
html[data-theme="plasmodium"] .login-card{border-color:rgba(255,255,255,0.16);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .login-card .brand-mark{margin:0 0 32px;font-family:var(--font-display);font-size:23.2px;font-weight:300;letter-spacing:-0.03em;line-height:1;color:var(--ink);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .login-card .brand-byline{display:block;margin:-22px 0 32px;font-size:11.52px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;color:var(--text-muted);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .login-card .login-sub{margin:0 0 26px;font-family:var(--font-display);font-size:24px;font-weight:300;letter-spacing:-0.015em;line-height:1.15;color:var(--ink);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .login-card .login-sub.login-foot{margin:22px 0 0;font-family:var(--font-ui);font-size:14.4px;letter-spacing:0;line-height:1.5;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .login-card a{color:var(--ink);text-decoration:none;border-bottom:1px solid var(--line-strong);padding-bottom:2px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .login-card a:hover{border-bottom-color:var(--ink);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .login-card .field{margin-bottom:18px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .login-card .btn{min-height:47px;margin-top:12px;font-size:12.8px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .login-card .sub-text{font-size:15.2px;line-height:1.5;color:var(--ink-soft);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .login-error{margin:0 0 20px;padding:10px 0 0;border-top:1px solid var(--brick);border-radius:0;background:none;color:var(--brick);font-size:14.4px;}
@media (max-width:640px){
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .login-screen{align-items:flex-start;padding:0;}
  html:is([data-theme="plasmodium"],[data-theme="oat"]) .login-card{max-width:none;min-height:100vh;padding:calc(40px + env(safe-area-inset-top)) 16px 40px;border:0;}
  html[data-theme="oat"] .login-screen{align-items:center;padding:16px;}
  html[data-theme="oat"] .login-card{min-height:0;padding:36px 24px 32px;}
}
/* A row that opens and shuts: the sprite's arrow, right when shut, down when open. */
.ic.tl-chev{width:11px;height:11px;margin-left:6px;vertical-align:-1px;color:var(--ink-soft);transition:transform .15s ease;}
.ic.tl-chev.open{transform:rotate(90deg);}
/* Area 5b leftovers: a list's field search is an underline field, as every
   other field in these two themes; a group of email templates has the
   section head. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) .field-search{padding-left:0;border:0;border-bottom:1px solid var(--line-strong);border-radius:0;background:none;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .field-search:focus-within{border-bottom-color:var(--ink);box-shadow:none;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .field-search input.search{border:0;border-radius:0;background:none;padding-left:0;}
.et-head{margin-top:18px;}
.et-head:first-child{margin-top:4px;}