/* Local, OFL-licensed display faces. Loaded only when paper uses them. */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('assets/fonts/fraunces-roman.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url('assets/fonts/fraunces-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/ibm-plex-mono-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/ibm-plex-mono-medium.woff2') format('woff2');
}

/* ==========================================================================
   NEWSPAPER ("paper") - the dashboard's printed look, a sibling of the glass.
   A quiet morning paper: warm, faintly grained newsprint; every card a
   lighter sheet laid on it under a serif headline, kicker labels and a
   thick-thin masthead rule. Colour is spent like spot ink, only where it
   means something, and nothing glows, blurs or moves.
   Light mode = the morning edition, dark mode = the night edition.

   The switch: model.glassTheme 'newspaper' -> body[data-style="paper"]
   [data-glass-theme="newspaper"] (edit-mode.js applyGlassTheme). Every rule
   in glass.css / glass-fx.css / the glass parts of mobile*.css is scoped to
   data-style="glass", so all of it (and its ~90 backdrop-filter layers) is
   off here; this file paints over the unscoped base rules in styles.css,
   writing.css and the structural mobile*.css rules.

   Every selector starts with one of these prefixes (Reference/newspaper/
   DESIGN.md 3.1), followed by the base rule's exact tail:
     canvas            html:has(> body[data-style="paper"])          (child combinator: cheap)
     desktop / shared  body[data-style="paper"][data-theme]          (0,2,1)
     night only        body[data-style="paper"][data-theme="dark"]   (same slot, later)
     phone shell       html[data-shell="mobile"] body[data-style="paper"][data-theme]   (0,3,2)
     generic fallback  body[data-style="paper"] :where(...)          (0,1,1): beats bare
                       element rules, loses to any component class rule
   The desktop prefix also beats the structural phone rules (0,1,1)+tail, so
   geometry the shell owns on reused surfaces (radius, border width) is set
   at the :where() strength here, and paint at full strength.

   House rules: never recolour, filter or overlay icon images or colour-swatch
   pills (and leave .invert-dark alone); no backdrop-filter; no endless
   animation (drag-only motion is fine); never transform / filter /
   backdrop-filter / contain / will-change on html, body, #mobile-shell or
   .mx-screens; editors are never background: transparent (the field colour,
   or the 1% trick); AA contrast everywhere (DESIGN.md 3.6). Glass must
   render exactly as before: nothing here can match without data-style="paper".

   The design (tokens, measured contrast, every surface): Reference/newspaper/DESIGN.md
   Order (cascade order, not number order): 0 this note -> 1 morning tokens ->
   2 night tokens -> 3 canvas -> 4 guards -> 5 layout parity -> 6 type ->
   12 the shared dialog recipe -> 13 forms -> 17 night specifics, then the
   surfaces, which refine those recipes and so come after them: 7-10 desktop
   dashboard -> 11 matrix + 14 feature surfaces -> 15 writing -> 16 phone
   shell -> 18 accessibility last.
   ========================================================================== */


/* === 1. Tokens: the morning edition (DESIGN.md 3.2, pasted as-is) ======== */
body[data-style="paper"][data-theme] {
  color-scheme: light;
  accent-color: var(--np-fill);

  /* --- stock --- */
  --np-canvas: #EEEAE1;        /* the newspaper (Y .825) */
  --np-sheet: #F8F5EE;         /* cards, dialogs, sheets (Y .914) */
  --np-tile: #FAF8F2;          /* raised: icon tiles, task slips, phone rows (Y .939) */
  --np-slip: #F1EDE4;          /* text slips inside a sheet (sits below the sheet) */
  --np-slip-hover: #EAE5DA;
  --np-field: #F4F1EA;         /* inputs, editors */
  --np-fold: #E0D7C6;          /* the back of the paper (dog-ear flap) */

  /* --- ink --- */
  --np-ink: #2B2722;           --np-ink-rgb: 43 39 34;
  --np-ink-soft: #574F45;      /* kickers, secondary text */
  --np-muted: #6B6257;         /* meta, placeholders, idle icons (AA on every surface, worst 4.76) */
  --np-hair: rgb(60 44 24 / 12%);      /* hairline edges (decorative) */
  --np-rule: rgb(60 44 24 / 22%);      /* firmer hairline: fields, popovers, chips */
  --np-rule-strong: #3A342D;           /* masthead + table rules (10.2:1) */
  --np-press: rgb(60 44 24 / 8%);      /* the 1px pressed bottom edge */
  --np-wash: rgb(60 44 24 / 6%);       /* hover, recessed tracks */
  --np-shadow-rgb: 64 46 24;

  /* --- the one spot colour + the press fill --- */
  --np-accent: #2C5A8C;        --np-accent-rgb: 44 90 140;   /* newsprint blue: indicator, links, focus, QA */
  --np-fill: #2B2722;          /* filled = ink by day */
  --np-on-fill: #FAF7F0;
  --np-fill-edge: transparent; /* night adds a ring */
  --np-focus: var(--np-accent);

  /* --- live (running timer, done) --- */
  --np-live: #2F7550;          --np-live-rgb: 47 117 80;     /* marks */
  --np-live-t: #2A6B49;        /* text */
  --np-live-fill: #2F7550;     --np-on-live: #FAF7F0;        /* stopwatch disc + glyph */

  /* --- spot inks (Eisenhower), retuned for CVD (DESIGN.md 3.4) --- */
  --np-red: #9C352B;     --np-red-rgb: 156 53 43;     --np-red-t: #9C352B;
  --np-orange: #A85319;  --np-orange-rgb: 168 83 25;  --np-orange-t: #8C4416;
  --np-yellow: #9C8B1F;  --np-yellow-rgb: 156 139 31; --np-yellow-t: #6B5F10;
  --np-blue: #3D6B99;    --np-blue-rgb: 61 107 153;   --np-blue-t: #2F5784;
  --np-plum-rgb: 107 76 134;   /* meetings (calendar dot, ref chips, decision callout) */
  --np-teal-rgb: 46 110 106;   /* reminders (calendar dot) */

  /* --- reminder states: wash / printed edge / state text --- */
  --np-w-green: #DCE6D2;  --np-e-green: #5E8A55;  --np-t-green: #2F6A3F;
  --np-w-yellow: #ECE4C0; --np-e-yellow: #9C8B1F; --np-t-yellow: #635811;
  --np-w-orange: #F1D9BE; --np-e-orange: #A85319; --np-t-orange: #8A4214;
  --np-w-red: #EFCEC7;    --np-e-red: #9C352B;    --np-t-red: #8E2F25;

  /* --- stamps, danger, toasts, scrim --- */
  --np-badge: #9C352B;   --np-on-badge: #FBF8F2;
  --np-danger: #9C352B;  --np-on-danger: #FBF8F2;
  --np-cancel: #EFCEC7;  --np-on-cancel: #8E2F25;     /* edit-mode × FAB */
  --np-toast: #2F2A24;   --np-on-toast: #F4EFE6;  --np-toast-edge: transparent;
  --np-scrim: rgb(46 36 22 / 30%);

  /* --- shadows (always valid lists, never `none`) --- */
  --np-lift-sheet: 0 0 0 1px var(--np-hair), 0 1px 1px rgb(var(--np-shadow-rgb) / 5%), 0 10px 22px -16px rgb(var(--np-shadow-rgb) / 32%);
  --np-lift-slip: 0 1px 0 var(--np-press);
  --np-lift-slip-hover: 0 1px 0 var(--np-press), 0 5px 10px -7px rgb(var(--np-shadow-rgb) / 34%);
  --np-lift-tile: 0 1px 0 var(--np-press), 0 6px 12px -10px rgb(var(--np-shadow-rgb) / 35%);
  --np-lift-tile-hover: 0 1px 0 var(--np-press), 0 8px 16px -10px rgb(var(--np-shadow-rgb) / 45%);
  --np-lift-control: 0 1px 1px rgb(var(--np-shadow-rgb) / 7%), 0 8px 20px -10px rgb(var(--np-shadow-rgb) / 32%);
  --np-lift-dialog: 0 1px 2px rgb(var(--np-shadow-rgb) / 8%), 0 24px 56px -22px rgb(var(--np-shadow-rgb) / 42%);

  /* --- type --- */
  --np-serif: 'Newsreader', 'Iowan Old Style', 'Sitka Text', Charter, 'Bitstream Charter', 'Noto Serif', Georgia, serif;
  --np-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* --- the app's own tokens (styles.css :root) --- */
  --bg: var(--np-canvas);
  --card: var(--np-sheet);
  --text: var(--np-ink);
  --muted: var(--np-muted);
  --brand: var(--np-accent);
  --accent: var(--np-live);
  --danger: var(--np-danger);
  --warn: var(--np-orange);
  --radius: 6px;
  --shadow: var(--np-lift-dialog);
  --task-timer-live: var(--np-live);
  --task-timer-btn: var(--np-live-fill);
  --busy-rgb: var(--np-blue-rgb);
  /* --task-cat-1..8: KEEP the styles.css values (validated on paper, DESIGN.md 3.5) */
  --task-cat-none: #8A8175;    /* warm grey (was #898781) */
  --task-cat-other: #B5AC9E;   /* warm grey (was #b3b1aa) */

  /* --- the glass vocabulary the unscoped rules read (mobile*.css 146 rules, writing.css, styles.css) --- */
  --glass-fill: var(--np-sheet);
  --glass-dialog: var(--np-sheet);
  --glass-field: var(--np-field);
  --glass-hover: var(--np-wash);
  --glass-edge: var(--np-rule);
  --glass-divider: var(--np-hair);
  --glass-light: transparent;
  --glass-shade: rgb(var(--np-shadow-rgb) / 22%);
  --glass-scrim: var(--np-scrim);
  --glass-action: var(--np-fill);            /* used as a primary FILL with #fff text (mobile-today.css:568 etc.) */
  --glass-reflection: none;                  /* always a background-image layer: none is valid */
  --glass-rim: 0 0 0 0 transparent;          /* sits inside box-shadow lists: never none */
  --glass-shadow: var(--np-lift-dialog);
  --glass-control-shadow: var(--np-lift-slip);
  --fx-ind-rgb: var(--np-accent-rgb);
  --fx-ind-fringe: var(--np-accent-rgb);
  --fx-qa-rgb: var(--np-accent-rgb);
  --fx-live-rgb: var(--np-live-rgb);
  --fx-live-deep: 42 107 73;                 /* = --np-live-t */
  --fx-ink: var(--np-ink-rgb);
  --fx-breathe: ease-in-out;
  --fx-bevel-lit: transparent; --fx-bevel-soft: transparent; --fx-bevel-shade: transparent;
  --fx-dialog-glint: transparent;
  --fx-lift-pill: var(--np-lift-slip);
  --fx-lift-pill-hover: var(--np-lift-slip-hover);
  --fx-lift-tile: var(--np-lift-tile);
  --fx-lift-tile-hover: var(--np-lift-tile-hover);
  --fx-lift-control: var(--np-lift-control);
  --fx-lift-dialog: var(--np-lift-dialog);

  /* --- writing engine (writing.css :root + [data-theme="dark"] tokens) --- */
  --wr-menu-border: var(--np-rule);
  --wr-menu-shadow: var(--np-lift-dialog);
  --wr-row-hover: var(--np-wash);            /* warm, both editions: the accent tint read as a cold glass bar on cream */
  --wr-chip-bg: rgb(60 44 24 / 7%);
  --wr-rule: var(--np-rule);
  --wr-quote-bar: rgb(60 44 24 / 55%);     /* the only cue of an upright editor quote: ~3:1 on sheet, field and tile (32% read 1.9:1) */
  --wr-hl-yellow: rgb(236 200 90 / 42%);
  --wr-hl-green: rgb(150 196 140 / 40%);
  --wr-hl-blue: rgb(140 176 220 / 40%);
  --wr-hl-pink: rgb(228 160 170 / 40%);
  --wr-hl-purple: rgb(180 160 220 / 40%);
  --wr-co-shine: 0 0 0 0 transparent;
  --wr-co-note: #2C5A8C;     --wr-co-note-bg: rgb(44 90 140 / 7%);    --wr-co-note-edge: rgb(44 90 140 / 24%);    --wr-co-note-label: #234A75;
  --wr-co-tip: #2F7550;      --wr-co-tip-bg: rgb(47 117 80 / 8%);     --wr-co-tip-edge: rgb(47 117 80 / 26%);     --wr-co-tip-label: #24603F;
  --wr-co-decision: #6B4C86; --wr-co-decision-bg: rgb(107 76 134 / 8%); --wr-co-decision-edge: rgb(107 76 134 / 24%); --wr-co-decision-label: #573A70;
  --wr-co-warning: #A85319;  --wr-co-warning-bg: rgb(168 83 25 / 9%);  --wr-co-warning-edge: rgb(168 83 25 / 28%);  --wr-co-warning-label: #8A4214;
  --wr-co-caution: #9C352B;  --wr-co-caution-bg: rgb(156 53 43 / 7%);  --wr-co-caution-edge: rgb(156 53 43 / 26%);  --wr-co-caution-label: #86291F;
  --wr-code-bg: rgb(60 44 24 / 5%);
  --wr-code-head: rgb(60 44 24 / 5%);
  --wr-code-edge: rgb(60 44 24 / 14%);
  --wr-table-edge: rgb(60 44 24 / 18%);
  --wr-table-head: rgb(60 44 24 / 5%);
  --wr-date-bg: rgb(44 90 140 / 8%);        --wr-date-ink: #2C5A8C;        --wr-date-edge: rgb(44 90 140 / 24%);
  --wr-date-today-bg: rgb(44 90 140 / 16%); --wr-date-today-ink: #1F4673;  --wr-date-today-edge: rgb(44 90 140 / 46%);
  --wr-date-past-bg: rgb(60 44 24 / 7%);    --wr-date-past-ink: #6B6257;   --wr-date-past-edge: rgb(60 44 24 / 22%);
  --wr-ref-project-bg: rgb(107 76 134 / 8%); --wr-ref-project-ink: #5E4278; --wr-ref-project-edge: rgb(107 76 134 / 24%);
  --wr-ref-meeting-bg: rgb(47 117 80 / 9%);  --wr-ref-meeting-ink: #2A6B49; --wr-ref-meeting-edge: rgb(47 117 80 / 26%);
  --wr-ref-idea-bg: rgb(168 83 25 / 9%);     --wr-ref-idea-ink: #8C4416;    --wr-ref-idea-edge: rgb(168 83 25 / 28%);

  /* --- the sheet grain (DESIGN.md 4) --- */
  --np-grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .27  0 0 0 0 .2  0 0 0 0 .12  0 0 0 .9 -.38'/></filter><rect width='180' height='180' filter='url(%23g)' opacity='.3'/></svg>");

  /* --- build additions (not in DESIGN.md 3.2): night values that would otherwise
     need a second rule per surface. The area parts read these. --- */
  --np-col-tint: 4%;                         /* spot-ink tint of a matrix column / Today group / phone pane (night 6%) */
  --np-grid: rgb(74 144 190 / 16%);          /* edit-mode graph paper in non-repro blue (night 9%) */
  --np-busy-a: 100%;                         /* busy-strip block opacity (night 75%) */
  --np-on-busy: var(--np-on-fill);           /* busy-strip block label (night: the canvas ink) */
  /* the edge that identifies a field, select or toggle track (WCAG 1.4.11):
     3.2:1 on the sheet, 3.1:1 on its own fill. --np-rule (1.6:1) stays for
     decorative hairlines and document frames (night 44%: 3.4:1) */
  --np-field-edge: rgb(60 44 24 / 54%);
}

/* the per-column hue every base and shell rule reads */
body[data-style="paper"][data-theme] .eisenhower-priority-card-red    { --priority-rgb: var(--np-red-rgb); }
body[data-style="paper"][data-theme] .eisenhower-priority-card-orange { --priority-rgb: var(--np-orange-rgb); }
body[data-style="paper"][data-theme] .eisenhower-priority-card-yellow { --priority-rgb: var(--np-yellow-rgb); }
body[data-style="paper"][data-theme] .eisenhower-priority-card-blue   { --priority-rgb: var(--np-blue-rgb); }
/* --busy-rgb is redeclared ON .busy-strip in dark (styles.css:16170), so restate it there */
body[data-style="paper"][data-theme] .busy-strip { --busy-rgb: var(--np-blue-rgb); }
/* writing tokens declared on the element itself */
body[data-style="paper"][data-theme] .wr-focus {
  --wr-focus-col: 68ch;
  --wr-focus-veil: #EEEAE1;   /* solid: the 96% veil relied on glass blurring what lay under it */
  --wr-focus-veil-solid: #EEEAE1;
}
/* the phone pickers' accent (mobile.css:883-891) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] {
  --mx-tp-accent: var(--np-fill);
  --mx-tp-on-accent: var(--np-on-fill);
}


/* === 2. Tokens: the night edition (DESIGN.md 3.3, pasted as-is) ========== */
/* Everything else (--bg, --glass-*, --fx-lift-*, --wr-menu-* ...) is written
   as var(--np-...) in 1, so it follows these redefined values. */
body[data-style="paper"][data-theme="dark"] {
  color-scheme: dark;

  --np-canvas: #1C1A18;
  --np-sheet: #252220;
  --np-tile: #2E2B27;
  --np-slip: #2B2824;
  --np-slip-hover: #34302B;
  --np-field: #211F1C;
  --np-fold: #4A453E;

  --np-ink: #E6DFD3;           --np-ink-rgb: 230 223 211;
  --np-ink-soft: #BFB6A8;
  --np-muted: #A39A8D;
  --np-hair: rgb(240 225 200 / 9%);
  --np-rule: rgb(240 225 200 / 17%);
  --np-rule-strong: #8A8276;   /* muted on purpose: cream rules at 11:1 read as glare streaks (comfort) */
  --np-press: rgb(0 0 0 / 28%);
  --np-wash: rgb(240 225 200 / 7%);
  --np-shadow-rgb: 0 0 0;

  --np-accent: #8FB2D8;        --np-accent-rgb: 143 178 216;
  --np-fill: #46689A;          /* filled = the blue plate by night */
  --np-on-fill: #F1E9DA;
  --np-fill-edge: rgb(143 178 216 / 45%);

  --np-live: #6FBF8F;          --np-live-rgb: 111 191 143;
  --np-live-t: #7FC79B;
  --np-live-fill: #41906A;     --np-on-live: #161412;      /* 4.74:1 as text ("Done" buttons; DESIGN's #3E8A61 was 4.39); disc 3.64:1 on the tile */

  --np-red: #E6907D;     --np-red-rgb: 230 144 125;   --np-red-t: #E6907D;
  --np-orange: #CF8248;  --np-orange-rgb: 207 130 72; --np-orange-t: #D99460;
  --np-yellow: #D8C670;  --np-yellow-rgb: 216 198 112; --np-yellow-t: #D8C670;
  --np-blue: #86A9D1;    --np-blue-rgb: 134 169 209;  --np-blue-t: #93B3D8;
  --np-plum-rgb: 185 162 214;
  --np-teal-rgb: 111 179 172;

  --np-w-green: #2F3A2B;  --np-e-green: #7FB27A;  --np-t-green: #9CCB98;
  --np-w-yellow: #3A3622; --np-e-yellow: #D8C670; --np-t-yellow: #DCCB7A;
  --np-w-orange: #402E20; --np-e-orange: #CF8248; --np-t-orange: #E4A26E;
  --np-w-red: #452B27;    --np-e-red: #E6907D;    --np-t-red: #EE9C88;

  --np-badge: #AE4A3F;   --np-on-badge: #F6EFE4;
  --np-danger: #8A3A30;  --np-on-danger: #F6EFE4;
  --np-cancel: #5A2E28;  --np-on-cancel: #F1D9D3;
  --np-toast: #3A352E;   --np-on-toast: #F1E9DA;  --np-toast-edge: rgb(240 225 200 / 12%);
  --np-scrim: rgb(0 0 0 / 50%);

  --np-lift-sheet: 0 0 0 1px var(--np-hair), 0 1px 1px rgb(0 0 0 / 30%), 0 12px 26px -16px rgb(0 0 0 / 70%);
  --np-lift-slip: 0 1px 0 var(--np-press);
  --np-lift-slip-hover: 0 1px 0 var(--np-press), 0 6px 12px -7px rgb(0 0 0 / 60%);
  --np-lift-tile: 0 1px 0 var(--np-press), 0 6px 12px -10px rgb(0 0 0 / 60%);
  --np-lift-tile-hover: 0 1px 0 var(--np-press), 0 8px 16px -10px rgb(0 0 0 / 70%);
  --np-lift-control: 0 1px 1px rgb(0 0 0 / 35%), 0 8px 20px -10px rgb(0 0 0 / 65%);
  --np-lift-dialog: 0 0 0 1px rgb(240 225 200 / 6%), 0 24px 56px -22px rgb(0 0 0 / 75%);

  --task-cat-none: #8F877A;
  --task-cat-other: #5E574D;
  --fx-live-deep: 127 199 155;

  --wr-chip-bg: rgb(240 225 200 / 8%);
  --wr-quote-bar: rgb(240 225 200 / 42%);  /* ~3:1 (30% read 2.4:1) */
  --wr-hl-yellow: rgb(212 182 90 / 30%);
  --wr-hl-green: rgb(127 178 122 / 28%);
  --wr-hl-blue: rgb(134 169 209 / 30%);
  --wr-hl-pink: rgb(217 128 140 / 28%);
  --wr-hl-purple: rgb(170 150 220 / 30%);
  --wr-co-note: #8FB2D8;     --wr-co-note-bg: rgb(143 178 216 / 10%);    --wr-co-note-edge: rgb(143 178 216 / 24%);    --wr-co-note-label: #A9C5E4;
  --wr-co-tip: #7FC79B;      --wr-co-tip-bg: rgb(111 191 143 / 10%);     --wr-co-tip-edge: rgb(111 191 143 / 24%);     --wr-co-tip-label: #93D2AB;
  --wr-co-decision: #B9A2D6; --wr-co-decision-bg: rgb(185 162 214 / 11%); --wr-co-decision-edge: rgb(185 162 214 / 26%); --wr-co-decision-label: #C9B6E2;
  --wr-co-warning: #D99460;  --wr-co-warning-bg: rgb(207 130 72 / 11%);  --wr-co-warning-edge: rgb(207 130 72 / 26%);  --wr-co-warning-label: #E4A26E;
  --wr-co-caution: #E6907D;  --wr-co-caution-bg: rgb(230 144 125 / 10%); --wr-co-caution-edge: rgb(230 144 125 / 26%); --wr-co-caution-label: #EE9C88;
  --wr-code-bg: rgb(240 225 200 / 5%);
  --wr-code-head: rgb(240 225 200 / 5%);
  --wr-code-edge: rgb(240 225 200 / 13%);
  --wr-table-edge: rgb(240 225 200 / 15%);
  --wr-table-head: rgb(240 225 200 / 6%);
  --wr-date-bg: rgb(143 178 216 / 13%);        --wr-date-ink: #A9C5E4;   --wr-date-edge: rgb(143 178 216 / 30%);
  --wr-date-today-bg: rgb(143 178 216 / 24%);  --wr-date-today-ink: #D7E5F4; --wr-date-today-edge: rgb(143 178 216 / 55%);
  --wr-date-past-bg: rgb(240 225 200 / 8%);    --wr-date-past-ink: #BFB6A8; --wr-date-past-edge: rgb(240 225 200 / 22%);
  --wr-ref-project-bg: rgb(185 162 214 / 13%); --wr-ref-project-ink: #C9B6E2; --wr-ref-project-edge: rgb(185 162 214 / 30%);
  --wr-ref-meeting-bg: rgb(111 191 143 / 12%); --wr-ref-meeting-ink: #93D2AB; --wr-ref-meeting-edge: rgb(111 191 143 / 30%);
  --wr-ref-idea-bg: rgb(207 130 72 / 13%);     --wr-ref-idea-ink: #E4A26E;    --wr-ref-idea-edge: rgb(207 130 72 / 30%);

  --np-grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .95  0 0 0 0 .9  0 0 0 0 .8  0 0 0 .7 -.32'/></filter><rect width='180' height='180' filter='url(%23g)' opacity='.1'/></svg>");

  /* build additions (see 1) */
  --np-col-tint: 6%;
  --np-grid: rgb(120 170 210 / 9%);
  --np-busy-a: 75%;
  --np-on-busy: #1C1A18;                     /* 4.92:1 on 75% blue over the track */
  --np-field-edge: rgb(240 225 200 / 44%);
}
body[data-style="paper"][data-theme="dark"] .busy-strip { --busy-rgb: var(--np-blue-rgb); }
body[data-style="paper"][data-theme="dark"] .wr-focus {
  --wr-focus-veil: #1C1A18;
  --wr-focus-veil-solid: #1C1A18;
}


/* === 3. Canvas, texture, body (DESIGN.md 4) =============================== */
/* The paper lives on the root, so it covers the whole scrolling canvas without
   background-attachment: fixed (iOS stretches it, Android repaints it); the
   body stays transparent. Two static SVG noise tiles, rasterised once by the
   browser: a fine grain (180px) and a slow mottle of fibres (560px). */
html:has(> body[data-style="paper"]) {
  background-color: #EEEAE1;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .27  0 0 0 0 .2  0 0 0 0 .12  0 0 0 .9 -.38'/></filter><rect width='180' height='180' filter='url(%23g)' opacity='.55'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='560' height='560'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='.006 .011' numOctaves='3' seed='7' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .35  0 0 0 0 .2  0 0 0 .5 -.2'/></filter><rect width='560' height='560' filter='url(%23m)' opacity='.26'/></svg>");
  background-size: 180px 180px, 560px 560px;
}
html:has(> body[data-style="paper"][data-theme="dark"]) {
  background-color: #1C1A18;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .95  0 0 0 0 .9  0 0 0 0 .8  0 0 0 .7 -.32'/></filter><rect width='180' height='180' filter='url(%23g)' opacity='.16'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='560' height='560'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='.006 .011' numOctaves='3' seed='7' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .7 -.25'/></filter><rect width='560' height='560' filter='url(%23m)' opacity='.32'/></svg>");
}
/* min-height / height: the glass body's own (glass.css:9-10), so the canvas
   and the grid origin are the same in both looks */
body[data-style="paper"][data-theme] {
  background: transparent;
  min-height: 100vh;
  height: auto;
  color: var(--np-ink);
  font-family: var(--np-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* The only light on a card: its base ::before (styles.css:54 / 79), overwritten
   with a static pair of gradients. Light falls from the top, the edges take a
   breath of the paper's own tone, so a sheet is never perfectly even. The
   sheet itself (fill, grain, edge) is part 8. Sheets carry the grain as
   background-color: var(--np-sheet); background-image: var(--np-grain);
   background-size: 640px 640px; tiles, slips, fields, chips, buttons, bars and
   documents never do (texture beside small text is the measured legibility cost). */
body[data-style="paper"][data-theme] .card::before {
  background:
    radial-gradient(130% 70% at 35% -10%, rgb(255 255 255 / 45%), transparent 60%),
    radial-gradient(150% 130% at 50% 45%, transparent 62%, rgb(var(--np-shadow-rgb) / 3.5%) 100%);
}
body[data-style="paper"][data-theme="dark"] .card::before {
  background:
    radial-gradient(130% 70% at 35% -10%, rgb(255 240 215 / 4%), transparent 60%),
    radial-gradient(150% 130% at 50% 45%, transparent 62%, rgb(0 0 0 / 14%) 100%);
}


/* === 4. Guards: no glass, no endless light (DESIGN.md 6.1-6.5) ============ */

/* --- 4.1 Nothing blurs in paper. One universal reset: it also beats the
   inline blur JS may still write (sections.js / today.js, gated) and the base
   blurs styles.css keeps unscoped (.tt-chart-tooltip, sticky notes, the links
   popup backdrop, .icon-indicator-expanded::before, the template-name and
   card-edit backdrops; mobile .mx-scrim, #mx-preview-switch, .mx-viewer-btn). --- */
body[data-style="paper"] *,
body[data-style="paper"] *::before,
body[data-style="paper"] *::after {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* --- 4.2 The base styles' glossy covers (styles.css): paper has no specular
   light. :where() keeps this at (0,1,2), one element above the base (0,1,1),
   so a paper rule can still reuse a pseudo (the Quick Access dog-ear on ::after,
   the card light above). .unified-reminder-item::before stays: it is the
   progress fill. Swatches lose their gloss only, never their colour. --- */
body[data-style="paper"] :where(.icon-button, .unified-subtask-item, .unified-copypaste-item, .reminder-item,
  .list-item, .copy-paste-item, .eisenhower-task, .reminder-task-bubble, .fab, .sticky-note)::before,
body[data-style="paper"] :where(.icon-button, .unified-subtask-item, .unified-reminder-item, .unified-copypaste-item,
  .reminder-item, .list-item, .copy-paste-item, .eisenhower-task, .reminder-task-bubble, .sticky-note)::after {
  content: none;
}
/* the editor's subtask rows are two classes in the base (0,2,1) */
body[data-style="paper"][data-theme] .task-subtask-row.subtask-bubble::before,
body[data-style="paper"][data-theme] .task-subtask-row.subtask-bubble::after {
  content: none;
}

/* --- 4.3 Endless animations. Only glass-fx.css 11d held these still; under
   paper they would loop again and keep the GPU busy. Drag-only motion stays
   (drop indicators, the swap pulse, separator slots, the just-added glow,
   spinners, the quick-capture shake). --- */
/* The Quick Access SVG rim (utils.js) is no longer appended in paper; items
   rendered under glass before a switch keep it, so hide and stop it */
body[data-style="paper"][data-theme] .animated-border-svg { display: none !important; }
body[data-style="paper"][data-theme] .animated-border-light { animation: none !important; }
body[data-style="paper"][data-theme] .time-tracking-toggle.is-running::after { animation: none; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-plus-halo, .mx-plus-rim, .mx-live-rim) {
  display: none;
  animation: none;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-live-orb, .mx-time-orb, .mx-chip-hot, .mx-skeleton-row, .mx-just) {
  animation: none;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-gap, .mx-today-empty-glyph)::before {
  animation: none;
}
/* the waiting dots' breathing halo: still and unlit (a glow is glass, not ink) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-sync-dot, .mx-more-status-dot)[data-state="pending"]::after {
  animation: none;
  box-shadow: none;
}

/* --- 4.4 Glass-only nodes left from a glass session (glass-glow.js and old
   sections.js builds). data-glass-glow / --copy-* / --surface-reflected-light
   may linger as inert attributes: no paper rule reads them. --- */
body[data-style="paper"][data-theme] .glass-card-highlight { display: none !important; }
body[data-style="paper"][data-theme] :is(.icon-link-indicator, .icon-task-indicator) { background: none; }

/* --- 4.5 Static glows and crystals. Nothing glows on paper, and the phone's
   emerald crystals become flat live fills (the look part 16 keeps). --- */
/* the indicator's base halo (part 9 draws the ink diamond) */
body[data-style="paper"][data-theme] .icon-indicator { box-shadow: none; filter: none; }
/* priority dots: a spot of ink, not a lamp (mobile.css:578, tasks:97, links:321, today:91, compose:188/515) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-pane-dot, .mx-actions-dot, .mx-task-dot, .mx-done-dot,
  .mx-tile-dot, .mx-chip-dot, .mx-today-pane-dot, .mx-row-dot, .mx-panel-item-dot, .mx-compose-target-dot) {
  box-shadow: none;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-coming-mark.is-dot::before { box-shadow: none; }
/* the completion rings' coloured halos (tasks:216/223, today:209, dark tasks:683) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-ring, .mx-today-ring),
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-check:active .mx-ring {
  box-shadow: none;
}
/* sync / status dots: the colour stays, the glow goes; a canvas knockout keeps the dot off the avatar */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-sync-dot:is([data-state="pending"], [data-state="error"]) {
  box-shadow: 0 0 0 2px var(--np-canvas);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-more-status-dot { box-shadow: none; }
/* crystals -> flat live fills (tasks:234, 294) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] [data-state="completing"] .mx-ring,
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-completed-icon, .mx-done-lens) {
  background: var(--np-live-fill);
  border-color: transparent;
  box-shadow: none;
  color: var(--np-on-live);
}
/* the swipe underlays' white highlights (tasks:326/357) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-under-done {
  background: var(--np-live-fill);
  color: var(--np-on-live);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-under-btn {
  background: var(--np-slip);
  color: var(--np-ink);
}

/* --- 4.6 Opaque backings. These shell surfaces took their only fill from
   glass rules, so under paper they would be see-through (rows scrolling
   behind the top bar, the + vanishing). This is the minimum so nothing is
   transparent; part 16 dresses them (rules, rings, edges) and wins by order. --- */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(#mx-topbar, .mx-tasks-sub, .mx-write-chips) {
  background-color: var(--np-canvas);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(#mx-dock, #mx-live, #mx-carry, #mx-preview-switch) {
  background-color: var(--np-sheet);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] #mx-plus {
  background: var(--np-fill);
  color: var(--np-on-fill);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-plus-glyph { stroke: var(--np-on-fill); }
/* grouped lists and cards (Today, More, Write): tiles of stock, not see-through boxes */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-more-account, .mx-more-list, .mx-offline-status,
  .mx-today-coming-list, .mx-write-list, .mx-write-card, .mx-today-meeting, .mx-today-sub, .mx-today-busy, .mx-write-search) {
  background-color: var(--np-tile);
}


/* === 5. Layout parity (DESIGN.md 5.2) ===================================== */
/* Layout-only rules that live in glass.css, restated exactly, so a layout
   designed in glass is the same layout on paper (grid origin, header height,
   clipping). Decoration never changes geometry. */
/* shells clip their content with a little paint room (glass.css:123-124) */
body[data-style="paper"][data-theme] :is(section.card, .app-header.card, .time-tracking-card, .quick-access-card, .eisenhower-card) {
  overflow: clip;
  overflow-clip-margin: 6px;
}
/* header buttons at glass's 36px (glass.css:360-363) */
body[data-style="paper"][data-theme] .header-icons-row button {
  width: 36px;
  height: 36px;
}
/* horizontal scrolling clips vertically: paint room inside the scrollport,
   negative margins keep the cards where they are (glass.css:602-605) */
body[data-style="paper"][data-theme] .eisenhower-columns-grid {
  padding: 16px;
  margin: -16px;
}
/* the phone-width header (glass.css:833-859), minus glass's --radius 22px and
   its rounded bottom: the masthead is not a card. The name / title sizes for
   this width are in 6, after the nameplate sizes they override. */
@media (max-width: 600px) {
  body[data-style="paper"][data-theme] .app-header.card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 24px;
    border-radius: 0;
  }
  /* zoom the whole image frame so saved image positioning still matches */
  body[data-style="paper"][data-theme] .company-logo-container { zoom: 0.667; }
  body[data-style="paper"][data-theme] .header-right { justify-content: flex-start; gap: 16px; }
  body[data-style="paper"][data-theme] .profile-info { min-width: 0; }
  body[data-style="paper"][data-theme] :is(.profile-name, .profile-title) { overflow-wrap: anywhere; }
  body[data-style="paper"][data-theme] .profile-photo-wrapper { zoom: 0.75; }
  body[data-style="paper"][data-theme] :is(.header-search-row, .header-icons-row) {
    position: static;
    width: 100%;
    min-width: 0;
  }
  body[data-style="paper"][data-theme] .search-container { flex: 1; width: auto; min-width: 0; }
  body[data-style="paper"][data-theme] .header-icons-row { justify-content: space-between; }
  body[data-style="paper"][data-theme] .header-icons-spacer { width: 12px; flex-shrink: 1; }
  body[data-style="paper"][data-theme] .header-icons-left { gap: 8px; }
  body[data-style="paper"][data-theme] .header-icons-row button { width: 34px; height: 34px; border-radius: 11px; flex-shrink: 0; }
}


/* === 6. Type roles: the generic ones (DESIGN.md 2.3) ====================== */
/* Newsreader for headlines and documents, Inter for the UI (the shell
   hard-codes Inter ~106 times, so the phone needs no font override).
   Newsreader's x-height is 0.44: 17px reads like Inter at 14px.

   Owned by the area parts (listed so nobody sets them twice):
     7  desktop   .search-category-header kicker; header tool colours
     8  desktop   the kicker hairline (.unified-subtitle-wrapper::after)
     11 desktop   .eisenhower-card-header serif 19px + diamond; .eisenhower-section-heading /
                  .tt-section-heading kickers; .eisenhower-task 500 / 600; .eisenhower-card-empty italic
     14 features  field labels (.task-editor-field > label, .task-editor-description > label,
                  .meeting-editor-field > label: 12px kickers); #task-editor-title,
                  .projects-title-bar h3, .meetings-view-title (serif 22px); tabular numbers
                  (.task-timer-time, .days-badge, .notification-badge, .today-count, .tt-* totals,
                  .busy-strip-*, calendar day numbers, the donut legend); Orphaned / Images /
                  Documents kickers
     15 writing   blockquote, links, the dinkus hr, tables, kbd, status line (callout and code
                  labels keep the base sans)
     16 phone     .mx-slot-title / .mx-slot-sub, sheet / pushed / actions / confirm / time titles,
                  pane and section titles, card / document titles, .mx-chip-count, .mx-live-clock
   Here: body (3), card headlines, kickers, the nameplate and byline, every
   document size (desktop, focus mode, phone frames). Dialog titles are 12. */

/* --- 6.1 Card headlines: Newsreader 600 at its display optical size --- */
body[data-style="paper"][data-theme] :is(.card > h2, .card > h3, .card .section-title, .eisenhower-header h3, .tt-header h3) {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.008em;
  color: var(--np-ink);
}

/* --- 6.2 Section subtitles are kickers: small caps-style labels in Inter --- */
body[data-style="paper"][data-theme] .unified-subtitle {
  font-family: var(--np-sans);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
  color: var(--np-ink-soft);
}
/* editing a card: the base hover was slate (#f1f5f9 / #334155) */
body[data-style="paper"][data-theme] .card.editing .unified-subtitle:hover { background: var(--np-wash); }

/* --- 6.3 The masthead: a nameplate and an italic byline --- */
body[data-style="paper"][data-theme] .profile-name {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-size: 42px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--np-ink);
}
body[data-style="paper"][data-theme] .profile-title {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-style: italic;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 4px;
  color: var(--np-ink-soft);
}
@media (max-width: 600px) {
  body[data-style="paper"][data-theme] .profile-name { font-size: 26px; }
  body[data-style="paper"][data-theme] .profile-title { font-size: 15px; }
}

/* --- 6.4 Documents: the reading face. The family is written literally, not
   as var(): Chrome copies computed families into <span style> when it moves
   text, and a concrete list leaves nothing to copy (writing.css .wr-editor).
   .wr-doc covers all ten editors and views. Headings stay under 600: at 600
   the Bold buttons light up inside every heading (writing.css:495). --- */
body[data-style="paper"][data-theme] .wr-doc {
  font-family: 'Newsreader', 'Iowan Old Style', 'Sitka Text', Charter, 'Bitstream Charter', 'Noto Serif', Georgia, serif;
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.6;
  color: var(--np-ink);
}
/* The rag and balanced heads only where nobody types: in an editor a
   text-wrap the neighbouring blocks lack is copied into <span style> when
   Backspace merges a line into a heading or quote (glass never does that) */
body[data-style="paper"][data-theme] .wr-view { text-wrap: pretty; }
body[data-style="paper"][data-theme] .wr-view :is(h1, h2, h3, h4, h5, h6) { text-wrap: balance; }
/* Projects uses the full page, with a modest gutter at either edge. */
body[data-style="paper"][data-theme] .wr-doc.project-editor {
  font-size: 18px;
  line-height: 1.65;
  padding-inline: 32px;
}
body[data-style="paper"][data-theme] .wr-doc :is(h1, h2, h3, h4, h5, h6) {
  font-weight: 580;
  letter-spacing: -0.008em;
}
/* wrapped bullets hang (the base project list rules are !important, 13135-13164) */
body[data-style="paper"][data-theme] .wr-doc :is(ul, ol):not(.checklist) { list-style-position: outside; padding-left: 1.4em; }
body[data-style="paper"][data-theme] .wr-doc.project-editor :is(ul, ol):not(.checklist) {
  list-style-position: outside !important;
  padding-left: 1.4em !important;
}
body[data-style="paper"][data-theme] .wr-doc ul:not(.checklist) > li::marker { color: var(--np-ink-soft); }
/* the checklist circle sits on the first line at any size / line height */
body[data-style="paper"][data-theme] .wr-doc ul.checklist > li::before { top: calc(0.5lh - 8px); }
/* focus mode: 20 / 1.7 in a 68ch column (the column is the --wr-focus-col token in 1) */
body[data-style="paper"][data-theme] .wr-focus .wr-focus-column > .wr-editor {
  font-size: 20px;
  line-height: 1.7;
}
/* narrow focus mode and the phone writer frames: a newspaper column of about
   38 characters at 390px */
@media (max-width: 760px) {
  body[data-style="paper"][data-theme] .wr-focus .wr-focus-column > .wr-editor { font-size: 19px; line-height: 1.6; }
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .wr-focus .wr-focus-column > .wr-editor {
  font-size: 19px;
  line-height: 1.6;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(#task-editor-modal, #subtask-desc-modal, #projects-modal, #ideas-modal,
  #meetings-modal, #notepad-popover, #note-viewer-modal) :is(#project-editor, #ideas-editor, #meetings-inline-desc-editor, #notepad-editor,
  #task-desc-editor, #subtask-desc-editor, #note-viewer-content, #ideas-view-content, .meetings-view-content, #task-desc-view-content) {
  font-size: 19px;
  line-height: 1.55;
}


/* === 12. Dialogs, popovers, menus, scrims, toasts (DESIGN.md 5.14) ======== */
/* ONE recipe for every floating surface, so the paper never changes its mind
   between windows. Paint (fill, grain, edge colour, shadow, ink) is set at
   full strength; geometry (border width, radius) at :where() strength, so the
   phone shell's own frames (full-screen writers, bottom sheets) keep theirs.
   The area parts add only what is particular to a surface. */

/* --- 12.1 Scrims: a warm dim, no blur (4.1 resets it) --- */
body[data-style="paper"][data-theme] :is(.media-backdrop, .breakdown-backdrop, .appearance-backdrop, .copy-text-backdrop,
  .image-editor-backdrop, .note-viewer-backdrop, .ideas-backdrop, .task-editor-backdrop, .subtask-template-name-backdrop,
  .subtask-desc-backdrop, .item-tasks-backdrop, .item-selector-backdrop, .item-task-picker-backdrop, .meetings-backdrop,
  .meeting-editor-backdrop, .completed-tasks-backdrop, .projects-backdrop, .auth-backdrop, .calendar-view-backdrop,
  .today-backdrop, .card-edit-backdrop, .qc-backdrop, .qc-help-backdrop, .ic-backdrop, .file-manager-backdrop,
  .wr-help-backdrop, .links-popup-backdrop.active),
/* these wrappers hold their dialog: the wrapper itself is the scrim */
body[data-style="paper"][data-theme] :is(.quick-link-modal, .reorder-subtitles-modal, .color-picker-modal,
  .reminder-links-modal, .reminder-tasks-modal) {
  background: var(--np-scrim);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-scrim, .mx-compose-scrim) {
  background: var(--np-scrim);
}

/* --- 12.2 Dialogs: a sheet of the same grained stock as the cards --- */
body[data-style="paper"][data-theme] :is(.media-dialog, .breakdown-dialog, .appearance-dialog, .copy-text-dialog,
  .image-editor-dialog, .file-manager-dialog, .note-viewer-dialog, .ideas-dialog, .task-editor-dialog,
  .subtask-template-name-dialog, .subtask-desc-dialog, .item-tasks-dialog, .item-selector-dialog, .item-task-picker-dialog,
  .meetings-dialog, .meeting-editor-dialog, .completed-tasks-dialog, .projects-dialog, .auth-dialog, .calendar-view-dialog,
  .today-dialog, .quick-link-dialog, .reorder-modal-content, .color-picker-dialog, .reminder-links-dialog,
  .reminder-tasks-dialog, .icon-links-dialog, .qc-dialog, .qc-help-dialog, .ic-dialog, .task-settings-dialog, .wr-help-dialog) {
  background-color: var(--np-sheet);
  background-image: var(--np-grain);
  background-size: 640px 640px;
  border-color: var(--np-hair);
  box-shadow: var(--np-lift-dialog);
  color: var(--np-ink);
}
body[data-style="paper"] :where(.media-dialog, .breakdown-dialog, .appearance-dialog, .copy-text-dialog,
  .image-editor-dialog, .file-manager-dialog, .note-viewer-dialog, .ideas-dialog, .task-editor-dialog,
  .subtask-template-name-dialog, .subtask-desc-dialog, .item-tasks-dialog, .item-selector-dialog, .item-task-picker-dialog,
  .meetings-dialog, .meeting-editor-dialog, .completed-tasks-dialog, .projects-dialog, .auth-dialog, .calendar-view-dialog,
  .today-dialog, .quick-link-dialog, .reorder-modal-content, .color-picker-dialog, .reminder-links-dialog,
  .reminder-tasks-dialog, .icon-links-dialog, .qc-dialog, .qc-help-dialog, .ic-dialog, .task-settings-dialog, .wr-help-dialog) {
  border: 1px solid var(--np-hair);
  border-radius: 8px;
}
/* The phone's writer frames ARE their dialog, full screen: no edge, no lift, and
   no grain behind the document text (documents keep a flat field; their 1%
   editors would show it). Part 16g dresses the frame chrome. */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.task-editor-dialog, .subtask-desc-dialog, .projects-dialog,
  .ideas-dialog, .meetings-dialog, .note-viewer-dialog) {
  background-image: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* --- 12.3 Phone sheets, pushed screens, the pickers and the composer: the
   same stock. A pushed screen is a page, so it sits on the canvas. --- */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-sheet, .mx-pushed, .mx-tp-sheet, .mx-composer) {
  background-color: var(--np-sheet);
  background-image: var(--np-grain);
  background-size: 640px 640px;
  border-color: var(--np-hair);
  box-shadow: var(--np-lift-dialog);
  color: var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-sheet:not(.mx-sheet--full) { border-radius: 16px 16px 0 0; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-pushed {
  background-color: var(--np-canvas);
  background-image: none;
  box-shadow: none;
}

/* --- 12.4 Dialog chrome: headers, footers and action rows are part of the
   sheet (transparent) with hairline rules (the base drew #e5e7eb / #475569).
   Editor toolbars are recessed strips instead (part 15). --- */
body[data-style="paper"][data-theme] :is(.task-editor-header, .meeting-editor-header, .subtask-desc-header, .ideas-header,
  .meetings-header, .projects-header, .projects-title-bar, .appearance-header, .auth-header, .note-viewer-header,
  .calendar-view-header, .today-header, .image-editor-header, .media-header, .breakdown-header, .copy-text-header,
  .item-tasks-header, .item-selector-header, .item-task-picker-header, .completed-tasks-header, .file-manager-header,
  .reorder-modal-header, .qc-help-header, .ic-header, .wr-help-header,
  .task-editor-actions, .meeting-editor-actions, .subtask-desc-actions, .image-editor-footer, .media-footer,
  .breakdown-footer, .copy-text-footer, .appearance-actions, .item-tasks-actions, .item-selector-footer,
  .meetings-view-actions, .completed-tasks-actions, .auth-footer, .reorder-modal-footer, .wr-help-footer) {
  background: transparent;
  border-color: var(--np-hair);
}

/* --- 12.5 Dialog titles: the headline serif (any h2-h4 in a dialog's header
   or title bar; never inside a document, never the matrix kickers) --- */
body[data-style="paper"][data-theme] :is(.media-dialog, .breakdown-dialog, .appearance-dialog, .copy-text-dialog,
  .image-editor-dialog, .file-manager-dialog, .note-viewer-dialog, .ideas-dialog, .task-editor-dialog,
  .subtask-template-name-dialog, .subtask-desc-dialog, .item-tasks-dialog, .item-selector-dialog, .item-task-picker-dialog,
  .meetings-dialog, .meeting-editor-dialog, .completed-tasks-dialog, .projects-dialog, .auth-dialog, .calendar-view-dialog,
  .today-dialog, .quick-link-dialog, .reorder-modal-content, .color-picker-dialog, .reminder-links-dialog,
  .reminder-tasks-dialog, .icon-links-dialog, .qc-help-dialog, .ic-dialog, .notepad-popover, .task-settings-dialog,
  .wr-help-dialog) :is([class*="header"], [class*="title-bar"], .today-title-block) :is(h2, h3, h4):not(.eisenhower-section-heading) {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-size: max(1.25em, 20px);
  font-weight: 600;
  letter-spacing: -0.006em;
  color: var(--np-ink);
}

/* --- 12.6 Popovers and menus: the same sheet without grain (they are small,
   and texture beside small text costs legibility), a firmer rule round them.
   (.wr-chip-card is not listed: refs.js always puts it inside a .wr-chip-pop
   popover, so it drew a second frame inside the first.) --- */
body[data-style="paper"][data-theme] :is(.edit-popover, .calendar-popover, .interval-popover, .confirm-popover,
  .auth-user-popover, .notepad-popover, .link-color-popover, .highlight-context-menu, .item-context-menu, .task-subtask-menu-dropdown,
  .task-mention-dropdown, .tt-range-pop, .tt-chart-tooltip, .wr-menu, .wr-popover, .search-results,
  .task-link-bubble, .task-link-picker, .highlighter-color-dropdown, .subtask-template-picker) {
  background-color: var(--np-sheet);
  background-image: none;
  border-color: var(--np-rule);
  box-shadow: var(--np-lift-dialog);
  color: var(--np-ink);
}
body[data-style="paper"] :where(.edit-popover, .calendar-popover, .interval-popover, .confirm-popover,
  .auth-user-popover, .notepad-popover, .link-color-popover, .highlight-context-menu, .item-context-menu, .task-subtask-menu-dropdown,
  .task-mention-dropdown, .tt-range-pop, .tt-chart-tooltip, .wr-menu, .wr-popover, .search-results,
  .task-link-bubble, .task-link-picker, .highlighter-color-dropdown, .subtask-template-picker) {
  border-style: solid;
  border-width: 1px;
  border-radius: 8px;
}
/* neutral menu rows hover with the paper wash (the writing menus read --wr-row-hover) */
body[data-style="paper"][data-theme] :is(.highlight-context-item, .item-context-action, .task-subtask-menu-item):hover { background: var(--np-wash); }
body[data-style="paper"][data-theme] .task-subtask-menu-item-danger { color: var(--np-red-t); }
body[data-style="paper"][data-theme] .task-subtask-menu-item-danger:hover { background: rgb(var(--np-red-rgb) / 8%); }
body[data-style="paper"][data-theme] .highlight-context-divider { background: var(--np-hair); }
body[data-style="paper"][data-theme] .wr-menu-item.is-danger .wr-menu-label { color: var(--np-red-t); }
/* the picked row in the @ task list: an accent ring round its own colour, no
   brightness shift (it read as "off" in the night edition) */
body[data-style="paper"][data-theme] .task-mention-item.selected {
  box-shadow: inset 0 0 0 1.5px rgb(var(--np-accent-rgb) / 75%);
  filter: none;
}
/* menu group headings are kickers (never below 12px) */
body[data-style="paper"][data-theme] :is(.wr-menu-title, .wr-menu-header) {
  font-family: var(--np-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--np-muted);
}
/* context-menu shortcut hints: muted ink at full strength (the base .85
   opacity took them to 3.99:1 at 11px) */
body[data-style="paper"][data-theme] .highlight-context-item .ctx-kbd {
  color: var(--np-muted);
  opacity: 1;
  font-variant-numeric: tabular-nums;
}

/* --- 12.7 Toasts: a raised charcoal slip in both editions (the night one is
   not an inverted bright slip: comfort), action links underlined --- */
body[data-style="paper"][data-theme] :is(.toast, .qc-toast, .sep-place-hint, .wr-chip-tip) {
  background: var(--np-toast);
  color: var(--np-on-toast);
  box-shadow: 0 0 0 1px var(--np-toast-edge), 0 10px 24px -10px rgb(var(--np-shadow-rgb) / 60%);
}
body[data-style="paper"] :where(.toast, .qc-toast, .sep-place-hint, .wr-chip-tip) { border-radius: 6px; }
body[data-style="paper"][data-theme] .qc-toast-btn {
  background: transparent;
  color: var(--np-on-toast);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
body[data-style="paper"][data-theme] :is(.qc-toast-btn:hover, .qc-toast-btn:focus-visible) { background: rgb(255 245 230 / 10%); }


/* === 13. Forms, buttons, chosen states, focus (DESIGN.md 5.15) =========== */

/* --- 13.0 Controls take the page's Inter. The browser gives button, input,
   select and textarea a face of its own (Arial on Windows) and a bare .btn
   the UA's 13.33px, so a dialog mixed two sans faces. Fallback strength
   (0,1,1): a component family of two parts or more still wins, a lone class
   (0,1,0) would not, so the only such controls (all monospace) are left out
   by name: the quick-capture and help syntax chips (button.qc-code,
   button.wr-help-chip) and the code block's language field. --- */
body[data-style="paper"] :where(button:not(.qc-code, .wr-help-chip), input:not(.wr-lang-input), select, textarea, optgroup) {
  font-family: inherit;
}
body[data-style="paper"] :where(.btn) { font-size: 13px; }

/* --- 13.0b Selected text: a tint of the press blue under the text's own ink
   (the OS blue with white text was the loudest thing on the page, and it
   read like the find bar's current match, which is the solid plate). By day
   the accent at 20%: on a sheet ink 10:1, links and the red / orange / blue
   inks 4.8:1 (24% took links to 4.4 on a field); yellow and green text and
   muted meta dip to 4.1-4.4 while selected. By night the blue plate at 30%,
   not the light accent: that one all but matched the blue highlighter and
   took links to 3.9:1 and red to 3.5; this keeps ink, soft ink, links and
   spot inks at 4.7+ on a sheet (muted meta 4.3, 3.9 on a tile). Literal
   colours, like the find highlights (15f): highlight pseudos don't read the
   page's custom properties everywhere yet --- */
body[data-style="paper"][data-theme] ::selection {
  background-color: rgb(44 90 140 / 20%);
  color: inherit;
}
body[data-style="paper"][data-theme="dark"] ::selection {
  background-color: rgb(70 104 154 / 30%);
  color: inherit;
}

/* --- 13.1 Fields. Any field at zero specificity (a component's own
   transparent / locked input still wins); the named ones at full strength,
   as glass did. No [data-theme] on the fallback: it must beat bare `input`
   and `[data-theme="dark"] input` (styles.css:3724) by source order only. --- */
body[data-style="paper"] :where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"]), select, textarea) {
  background-color: var(--np-field);
  border-color: var(--np-field-edge);
  color: var(--np-ink);
}
body[data-style="paper"][data-theme] :is(.edit-popover, .meeting-editor-field, .auth-field, .ic-field)
  :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"]), select, textarea),
body[data-style="paper"][data-theme] :is(.task-editor-field input[type="text"], .task-editor-field input[type="date"],
  .task-editor-field input[type="time"], .appearance-select, .tt-range-date, .task-settings-input, .wr-link-input,
  .qc-field, .wr-find-field, .wr-help-search, .task-desc-editor, .ideas-editor, .notepad-editor, .task-desc-view,
  .task-editor-item-selector) {
  background-color: var(--np-field);
  border-color: var(--np-field-border, var(--np-field-edge));
  color: var(--np-ink);
  box-shadow: inset 0 1px 1px rgb(var(--np-shadow-rgb) / 5%);
}
/* document boxes keep the decorative rule: the toolbar and label above them
   say what they are, and a 3:1 frame round a page of text is heavy */
body[data-style="paper"][data-theme] :is(.task-desc-editor, .ideas-editor, .notepad-editor, .task-desc-view) {
  --np-field-border: var(--np-rule);
}
/* small fields share the buttons' 6px corners (geometry at fallback strength:
   the shell's own field frames keep theirs) */
body[data-style="paper"] :where(.appearance-select, .tt-range-date, .task-settings-input, .wr-link-input,
  .edit-popover input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"]), .edit-popover select,
  .auth-field input, .ic-field :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"]), select, textarea)) {
  border-radius: 6px;
}
/* locked subtask titles in the editor stay part of their slip */
body[data-style="paper"][data-theme] .task-subtask-row.subtask-bubble .task-subtask-title-input.locked {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
body[data-style="paper"][data-theme] :is(input, textarea)::placeholder { color: var(--np-muted); opacity: 1; }
/* the Settings select: a 1px edge and its chevron in warm ink (was slate #6b7280) */
body[data-style="paper"][data-theme] .appearance-select {
  border-width: 1px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6257' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* --- 13.2 Field focus: an accent edge and a soft ring, no square outline.
   Fields that wrap their input show it on the wrapper. The selectors repeat
   13.1's :is() lists (their specificity is the list's most specific entry),
   so focus always outranks the resting field. --- */
body[data-style="paper"][data-theme] :is(.edit-popover, .meeting-editor-field, .auth-field, .ic-field)
  :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"]), select, textarea):focus,
body[data-style="paper"][data-theme] :is(.task-editor-field input[type="text"], .task-editor-field input[type="date"],
  .task-editor-field input[type="time"], .appearance-select, .tt-range-date, .task-settings-input, .wr-link-input,
  .qc-field, .wr-find-field, .wr-help-search, .task-desc-editor, .ideas-editor, .notepad-editor,
  .task-editor-item-selector):focus-within {
  border-color: var(--np-accent);
  box-shadow: 0 0 0 3px rgb(var(--np-accent-rgb) / 16%);
  outline: none;
}
body[data-style="paper"][data-theme] :is(.qc-field, .wr-find-field, .wr-help-search) :is(input, textarea, [contenteditable="true"]):focus-visible {
  outline: none;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-compose-field, .mx-search-field, .mx-write-search):focus-within {
  border-color: var(--np-accent);
  box-shadow: 0 0 0 3px rgb(var(--np-accent-rgb) / 16%);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-compose-field, .mx-search-field, .mx-write-search)
  :is(input, textarea, [contenteditable="true"]):focus-visible {
  outline: none;
}
/* any other document: a quiet inset outline; the full-page project editor none */
body[data-style="paper"][data-theme] .wr-doc[contenteditable="true"]:focus-visible {
  outline: 1.5px solid rgb(var(--np-accent-rgb) / 45%);
  outline-offset: -1.5px;
}
body[data-style="paper"][data-theme] .project-editor.wr-doc:focus-visible { outline: none; }
/* invalid: a red edge and ring, also while focused (the message says why) */
body[data-style="paper"][data-theme] :is(.task-editor-field input[type="text"], .task-editor-field input[type="date"],
  .task-editor-field input[type="time"], .ic-field input, input, select, textarea)[aria-invalid="true"],
body[data-style="paper"][data-theme] :is(.task-editor-field input[type="text"], .task-editor-field input[type="date"],
  .task-editor-field input[type="time"], .ic-field input, input, select, textarea)[aria-invalid="true"]:focus {
  border-color: var(--np-red);
  box-shadow: 0 0 0 3px rgb(var(--np-red-rgb) / 18%);
}

/* --- 13.3 The generic focus ring, at fallback strength: controls with a ring
   of their own (most shell controls, inset rings) keep its geometry, and it
   reads accent through --brand / --fx-ind-rgb anyway --- */
body[data-style="paper"] :where(button, a, [role="button"], [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 2px solid var(--np-focus);
  outline-offset: 2px;
}
/* a container focused by script (dialogs and sheets get tabindex -1 so focus
   can move into them, edit-mode.js / sheet.js) is not a control: no UA ring
   round the whole frame (it drew a black line round every phone writer) */
body[data-style="paper"] :where([tabindex="-1"]):focus-visible { outline: none; }

/* --- 13.4 Buttons. One rule: filled = the press colour (black ink by day,
   the blue plate by night); everything else is a sheet with a rule round it. --- */
/* secondary */
body[data-style="paper"][data-theme] :is(.btn, .btn-secondary, .appearance-btn.secondary, .appearance-backup-btn,
  .quick-link-btn.secondary, .notepad-cancel-btn, .ic-btn, .gcal-btn) {
  background: var(--np-sheet);
  color: var(--np-ink);
  border-color: var(--np-rule);
  box-shadow: var(--np-lift-slip);
  font-weight: 600;                          /* buttons 600, labels 500 (DESIGN 2.3) */
}
body[data-style="paper"][data-theme] :is(.btn, .btn-secondary, .appearance-btn.secondary, .appearance-backup-btn,
  .quick-link-btn.secondary, .notepad-cancel-btn, .ic-btn, .gcal-btn):hover {
  background: linear-gradient(var(--np-wash), var(--np-wash)), var(--np-sheet);
  color: var(--np-ink);
  border-color: var(--np-rule);
}
/* primary (Save, Add, Sign in, Connect, the dirty project save) */
body[data-style="paper"][data-theme] :is(.btn.primary, .btn-primary, .appearance-btn.primary, .quick-link-btn.primary,
  .notepad-save-btn, .auth-submit-btn, .ic-save, .gcal-btn-primary, .project-save-btn.dirty, .meetings-add-circle) {
  background: var(--np-fill);
  border-color: var(--np-fill);
  color: var(--np-on-fill);
  box-shadow: inset 0 0 0 1px var(--np-fill-edge);
  font-weight: 600;
}
/* (only an enabled one lifts; a disabled one is a recessed blank, after these) */
body[data-style="paper"][data-theme] :is(.btn.primary, .btn-primary, .appearance-btn.primary, .quick-link-btn.primary,
  .notepad-save-btn, .auth-submit-btn, .ic-save, .gcal-btn-primary, .project-save-btn.dirty, .meetings-add-circle):hover {
  background: var(--np-fill);
  border-color: var(--np-fill);
  color: var(--np-on-fill);
  transform: none;
  filter: none;
}
body[data-style="paper"][data-theme] :is(.btn.primary, .btn-primary, .appearance-btn.primary, .quick-link-btn.primary,
  .notepad-save-btn, .auth-submit-btn, .ic-save, .gcal-btn-primary, .project-save-btn.dirty, .meetings-add-circle):hover:not(:disabled, [aria-disabled="true"]) {
  box-shadow: inset 0 0 0 1px var(--np-fill-edge), var(--np-lift-control);
  opacity: 1;
}
/* a disabled primary: a recessed blank in the muted ink, not the press fill
   at half strength (a muddy slab that read as broken). Hover changes nothing */
body[data-style="paper"][data-theme] :is(.btn.primary, .btn-primary, .appearance-btn.primary, .quick-link-btn.primary,
  .notepad-save-btn, .auth-submit-btn, .ic-save, .gcal-btn-primary, .project-save-btn.dirty, .meetings-add-circle):is(:disabled, [aria-disabled="true"]),
body[data-style="paper"][data-theme] :is(.btn.primary, .btn-primary, .appearance-btn.primary, .quick-link-btn.primary,
  .notepad-save-btn, .auth-submit-btn, .ic-save, .gcal-btn-primary, .project-save-btn.dirty, .meetings-add-circle):is(:disabled, [aria-disabled="true"]):hover {
  background: var(--np-wash);
  border-color: var(--np-rule);
  color: var(--np-muted);
  box-shadow: none;
  opacity: 1;
}
/* danger (the base completed-tasks button is !important) */
body[data-style="paper"][data-theme] :is(.btn.danger, .quick-link-btn.danger, .file-manager-delete-all-btn) {
  background: var(--np-danger);
  border-color: var(--np-danger);
  color: var(--np-on-danger);
  box-shadow: none;
  font-weight: 600;
}
body[data-style="paper"][data-theme] .completed-tasks-danger-btn {
  background: var(--np-danger) !important;
  border-color: var(--np-danger) !important;
  color: var(--np-on-danger) !important;
  box-shadow: none;
  font-weight: 600;
}
body[data-style="paper"][data-theme] :is(.btn.danger, .quick-link-btn.danger, .file-manager-delete-all-btn, .completed-tasks-danger-btn):hover:not(:disabled) {
  background: var(--np-danger) !important;
  color: var(--np-on-danger) !important;
  box-shadow: var(--np-lift-control);
}
/* quiet / ghost (two classes: the secondary list above also matches .gcal-btn) */
body[data-style="paper"][data-theme] .gcal-btn.gcal-btn-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--np-ink-soft);
  box-shadow: none;
}
body[data-style="paper"][data-theme] .gcal-btn.gcal-btn-quiet:hover { background: var(--np-wash); border-color: transparent; color: var(--np-ink); }
/* button geometry: a 1px edge, 6px corners (the shell's own button rules keep theirs) */
body[data-style="paper"] :where(.btn, .btn-secondary, .btn-primary, .appearance-btn, .appearance-backup-btn, .quick-link-btn,
  .notepad-cancel-btn, .notepad-save-btn, .ic-btn, .gcal-btn, .auth-submit-btn, .file-manager-delete-all-btn) {
  border-width: 1px;
  border-style: solid;
  border-radius: 6px;
}
/* the phone's buttons: the same three kinds (mobile.css:600-625; the glass
   primary was the only thing that made .mx-btn-primary look primary) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-btn {
  background: var(--np-sheet);
  color: var(--np-ink);
  border-color: var(--np-rule);
  box-shadow: var(--np-lift-slip);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-btn:active { background: var(--np-slip-hover); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-btn-primary {
  background: var(--np-fill);
  border-color: var(--np-fill);
  color: var(--np-on-fill);
  box-shadow: inset 0 0 0 1px var(--np-fill-edge);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-btn-primary:active { background: var(--np-fill); box-shadow: inset 0 0 0 1px var(--np-fill-edge), var(--np-lift-control); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-btn-done,
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-btn-done:active {
  background: var(--np-live-fill);
  border-color: var(--np-live-fill);
  color: var(--np-on-live);
  box-shadow: none;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-btn-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--np-ink-soft);
  box-shadow: none;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-btn-danger { color: var(--np-red-t); }

/* --- 13.5 Chosen options (Settings, the device picker): a tile ringed in
   ink, never a blue wash --- */
body[data-style="paper"][data-theme] .appearance-option {
  background: var(--np-tile);
  border: 1.5px solid var(--np-hair);
  color: var(--np-ink);
  box-shadow: var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .appearance-option:hover { background: var(--np-tile); border-color: var(--np-rule); }
/* the border alone is the cue (an extra 1px ring made a 2.5px box that read as
   a focus ring by day and a cream glare box by night); each keeps its own lift */
body[data-style="paper"][data-theme] :is(.appearance-option.active, .device-mode-option.active) {
  background: var(--np-tile);
  border-color: var(--np-ink);
  color: var(--np-ink);
}
body[data-style="paper"][data-theme="dark"] :is(.appearance-option.active, .device-mode-option.active) {
  border-color: var(--np-ink-soft);
}
body[data-style="paper"][data-theme] .appearance-label {
  font-family: var(--np-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--np-ink-soft);
}
body[data-style="paper"][data-theme] .appearance-divider { background: var(--np-hair); }

/* --- 13.6 Toggle switch: off = an ink knob on blank stock inside the field
   ring, on = a paper knob on the press fill. A paper knob on a 6% wash was
   1.03:1 by day: off read as no switch at all. --- */
body[data-style="paper"][data-theme] .appearance-toggle-slider {
  background-color: var(--np-tile);
  box-shadow: inset 0 0 0 1px var(--np-field-edge);
}
body[data-style="paper"][data-theme] .appearance-toggle-slider::before {
  background-color: var(--np-muted);
  box-shadow: none;
}
body[data-style="paper"][data-theme] .appearance-toggle-switch input:checked + .appearance-toggle-slider {
  background-color: var(--np-fill);
  box-shadow: inset 0 0 0 1px var(--np-fill-edge);
}
body[data-style="paper"][data-theme] .appearance-toggle-switch input:checked + .appearance-toggle-slider::before {
  background-color: var(--np-on-fill);
}
/* night: a soft-ink knob off (brighter than the muted one; the on rule above
   still wins, a paper knob on the blue plate 4.7:1) */
body[data-style="paper"][data-theme="dark"] .appearance-toggle-slider::before { background-color: var(--np-ink-soft); }
/* checkbox, radio and range: the press colour (1 sets it on the body; two base
   rules point it at --brand, which would make them accent blue) */
body[data-style="paper"][data-theme] :is(input[type="checkbox"], input[type="radio"], input[type="range"]) {
  accent-color: var(--np-fill);
}


/* === 17. Night-edition specifics (more than a token swap) ================= */
/* Most of the night is the token block in 2. What can't be a token: the card
   light (it lives with its morning twin in 3), and the rules below, which
   restate a surface for the night with the base tail so they hold whatever
   the area part's morning rule looks like. The toast edge is the
   --np-toast-edge token (12.7). */
/* edit-mode graph paper: non-repro blue at 9% (the base dark grid is slate) */
body[data-style="paper"][data-theme="dark"] .app-main.edit-mode-tiles::before {
  background-image:
    linear-gradient(to right, var(--np-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--np-grid) 1px, transparent 1px);
}
/* busy blocks: 75% blue over the track, dark labels (4.92:1; cream on the
   plate failed) */
body[data-style="paper"][data-theme="dark"] .busy-strip-block { background: rgb(var(--busy-rgb) / var(--np-busy-a)); }
body[data-style="paper"][data-theme="dark"] .busy-strip-block-label { color: var(--np-on-busy); text-shadow: none; }
/* matrix columns take a 6% tint at night (4% by day) */
body[data-style="paper"][data-theme="dark"] .eisenhower-priority-card {
  background: color-mix(in srgb, rgb(var(--priority-rgb)) var(--np-col-tint), var(--np-sheet));
}
/* the Settings select's chevron in night ink */
body[data-style="paper"][data-theme="dark"] .appearance-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A39A8D' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}


/* === 7. Masthead, search, header tools, badge, FABs (DESIGN.md 5.3-5.5) == */

/* --- 7.1 The header is not a card: it is the masthead, printed straight on
   the newsprint, closed by a thick-thin "Oxford" rule (2px + 2px gap + 1px).
   Its grid geometry (padding, row 1) is untouched; only the paint goes. --- */
body[data-style="paper"][data-theme] .app-header.card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}
body[data-style="paper"][data-theme] .app-header.card::before { content: none; }
body[data-style="paper"][data-theme] .app-header.card::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 5px;
  background: linear-gradient(to bottom, var(--np-rule-strong) 0 2px, transparent 2px 4px, var(--np-rule-strong) 4px 5px);
  pointer-events: none;
  z-index: 0;
}
/* the portrait sits on the page with a hairline and a soft contact shadow */
body[data-style="paper"][data-theme] .profile-photo-container {
  box-shadow: 0 0 0 1px var(--np-rule), 0 6px 14px -8px rgb(var(--np-shadow-rgb) / 45%);
}

/* --- 7.2 Search: a ruled field (the base pill was #e5e7eb / slate) --- */
body[data-style="paper"][data-theme] .search-input {
  background: var(--np-field);
  border: 1px solid var(--np-rule);
  border-radius: 6px;
  box-shadow: inset 0 1px 1px rgb(var(--np-shadow-rgb) / 5%);
  color: var(--np-ink);
  font-family: var(--np-sans);
}
body[data-style="paper"][data-theme] .search-input::placeholder { color: var(--np-muted); opacity: 1; }
body[data-style="paper"][data-theme] .search-input:focus {
  border-color: var(--np-accent);
  box-shadow: 0 0 0 3px rgb(var(--np-accent-rgb) / 18%);
  outline: none;
}
body[data-style="paper"][data-theme] .search-icon { color: var(--np-muted); }
body[data-style="paper"][data-theme] .search-clear { color: var(--np-muted); }
body[data-style="paper"][data-theme] .search-clear:hover { background: var(--np-wash); color: var(--np-ink); }
/* results (the sheet itself is the popover recipe, 12.6): kickers over
   hairlines, items as tiles of stock */
body[data-style="paper"][data-theme] .search-category-header {
  font-family: var(--np-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--np-muted);
  border-bottom-color: var(--np-hair);
}
body[data-style="paper"][data-theme] .search-category-header svg { opacity: 1; }
body[data-style="paper"][data-theme] .search-count {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--np-rule);
  border-radius: 3px;
  color: var(--np-ink-soft);
  font-variant-numeric: tabular-nums;
}
body[data-style="paper"][data-theme] .search-item {
  background: var(--np-tile);
  box-shadow: 0 0 0 1px var(--np-hair), var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .search-item:hover {
  background: linear-gradient(var(--np-wash), var(--np-wash)), var(--np-tile);
  box-shadow: 0 0 0 1px var(--np-rule), var(--np-lift-slip-hover);
  transform: none;
}
body[data-style="paper"][data-theme] .search-item-title { color: var(--np-ink); }
body[data-style="paper"][data-theme] :is(.search-item-preview, .search-item-location) { color: var(--np-muted); }
body[data-style="paper"][data-theme] .search-links-toggle { color: var(--np-accent); }
body[data-style="paper"][data-theme] .search-links-toggle:hover { background: var(--np-wash); color: var(--np-ink); }
/* the match is marked with the document highlighter, not an amber glow */
body[data-style="paper"][data-theme] .search-highlight { background: var(--wr-hl-yellow); color: inherit; }
/* a card reached from search: one accent ring that fades out (a one-shot) */
body[data-style="paper"][data-theme] .search-highlight-card { animation: npSearchPulse 2s ease-out; }
@keyframes npSearchPulse {
  0%   { box-shadow: 0 0 0 4px rgb(var(--np-accent-rgb) / 45%), var(--np-lift-sheet); }
  100% { box-shadow: var(--np-lift-sheet); }
}

/* --- 7.3 Header tools: printed glyphs in secondary ink. No scale on hover:
   the ink only darkens. (The Today button is a .calendar-view-toggle.) --- */
body[data-style="paper"][data-theme] :is(.calendar-view-toggle, .time-tracking-toggle, .meetings-toggle, .tasks-summary-toggle,
  .auth-toggle, .quick-capture-toggle, .device-mode-toggle) {
  color: var(--np-ink-soft);
  background: transparent;
  border: 0;
  box-shadow: none;
  transition: color 0.12s ease;
}
body[data-style="paper"][data-theme] :is(.calendar-view-toggle, .time-tracking-toggle, .meetings-toggle, .tasks-summary-toggle,
  .auth-toggle, .quick-capture-toggle, .device-mode-toggle):hover {
  color: var(--np-ink);
  transform: none;
}
/* signed in: the account glyph in live green ink (was --accent mint) */
body[data-style="paper"][data-theme] .auth-toggle.logged-in { color: var(--np-live-t); }
body[data-style="paper"][data-theme] .auth-toggle.logged-in:hover { color: var(--np-ink); }
/* a running timer: the stopwatch in green ink and a static green dot knocked
   out of the canvas (4.3 already stopped its breathing) */
body[data-style="paper"][data-theme] .time-tracking-toggle.is-running { color: var(--np-live-t); }
body[data-style="paper"][data-theme] .time-tracking-toggle.is-running::after {
  animation: none;
  background: var(--np-live);
  box-shadow: 0 0 0 2px var(--np-canvas);
  opacity: 1;
}

/* --- 7.4 The due badge is a red stamp, upright and square; nothing due is a
   round paper lens with a calendar glyph. The shape carries the state. --- */
body[data-style="paper"][data-theme] .notification-badge {
  background: var(--np-badge);
  color: var(--np-on-badge);
  border-radius: 3px;
  box-shadow: 0 0 0 2px var(--np-canvas);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
body[data-style="paper"][data-theme] .notification-badge:hover { transform: none; }
body[data-style="paper"][data-theme] .notification-badge.is-clear {
  background: var(--np-sheet);
  color: var(--np-ink-soft);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--np-rule), 0 0 0 3px var(--np-canvas);
}

/* --- 7.5 The device picker's bubbles are styled once, in 14m (dialogs): a
   second copy here repainted the chosen ring on hover --- */

/* --- 7.6 Floating buttons: discs of the same stock as the sheets, with a
   rule round them. Confirm is the live green, Cancel a red-ink stamp colour,
   Add card the press fill. No glossy cover (4.2), no hover scale. --- */
body[data-style="paper"][data-theme] :is(.wrench-btn, .fab-left, .sticky-note-btn) {
  background: var(--np-sheet);
  color: var(--np-ink);
  border: 1px solid var(--np-rule);
  box-shadow: var(--np-lift-control);
}
body[data-style="paper"][data-theme] :is(.wrench-btn, .fab-left, .sticky-note-btn):hover {
  background: linear-gradient(var(--np-wash), var(--np-wash)), var(--np-sheet);
  transform: none;
}
body[data-style="paper"][data-theme] .wrench-btn svg { color: var(--np-ink); }
/* edit mode on: an ink ring round the pencil (was #60a5fa) */
body[data-style="paper"][data-theme] .wrench-btn.active { outline: 2px solid var(--np-ink); outline-offset: 2px; }
body[data-style="paper"][data-theme] .fab {
  box-shadow: var(--np-lift-control);
  transition: box-shadow 0.12s ease;
}
body[data-style="paper"][data-theme] .fab:hover {
  transform: none;
  box-shadow: 0 0 0 1px var(--np-rule), var(--np-lift-control);
}
body[data-style="paper"][data-theme] .fab-accept { background: var(--np-live-fill); color: var(--np-on-live); }
/* the pale red disc is barely off the canvas (1.2:1): a red-ink edge gives
   it a shape beside the solid green accept */
body[data-style="paper"][data-theme] .fab-cancel {
  background: var(--np-cancel);
  color: var(--np-on-cancel);
  box-shadow: inset 0 0 0 1px rgb(var(--np-red-rgb) / 42%), var(--np-lift-control);
}
body[data-style="paper"][data-theme] .fab-cancel:hover {
  box-shadow: inset 0 0 0 1px rgb(var(--np-red-rgb) / 60%), var(--np-lift-control);
}
body[data-style="paper"][data-theme] #add-card-fab {
  background: var(--np-fill);
  color: var(--np-on-fill);
  border: 0;
  box-shadow: inset 0 0 0 1px var(--np-fill-edge), var(--np-lift-control);
}
body[data-style="paper"][data-theme] #add-card-fab:hover {
  background: var(--np-fill);
  transform: none;
}


/* === 8. Cards, edit mode, Card Edit Modal, drag (DESIGN.md 5.6-5.7) ====== */

/* --- 8.1 A card is a sheet laid on the newsprint: lighter stock with its own
   grain, a hairline edge and a whisper of lift. Its static light is the
   ::before of 3. The radius is the --radius token (6px, 1); no border, so the
   phone's own card frames keep their geometry. transition: none because the
   base .card animates "all" (a theme switch would fade every sheet). --- */
body[data-style="paper"][data-theme] .card {
  background-color: var(--np-sheet);
  background-image: var(--np-grain);
  background-size: 640px 640px;
  box-shadow: var(--np-lift-sheet);
  transition: none;
}

/* --- 8.2 Kickers run a hairline out to the margin ("UPCOMING EVENTS ——"),
   the newspaper's section rule. Off wherever the wrapper holds edit controls
   (edit-mode tiles, the Card Edit Modal). --- */
body[data-style="paper"][data-theme] .unified-subtitle-wrapper::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  margin-left: 8px;
  background: var(--np-hair);
}
body[data-style="paper"][data-theme] .app-main.edit-mode-tiles .unified-subtitle-wrapper::after,
body[data-style="paper"][data-theme] .card-edit-body .unified-subtitle-wrapper::after,
body[data-style="paper"][data-theme] .card.editing .unified-subtitle-wrapper::after {
  content: none;
}
body[data-style="paper"][data-theme] .subtitle-collapse-btn { color: var(--np-muted); opacity: 1; }
body[data-style="paper"][data-theme] .subtitle-collapse-btn:hover { color: var(--np-ink); }

/* --- 8.3 Card tools sit on the sheet in muted ink at full strength (5.5:1);
   hover darkens them over a wash. The quick-add + keeps its show-on-hover. --- */
body[data-style="paper"][data-theme] :is(.card-notepad-btn, .card-collapse-btn) {
  color: var(--np-muted);
  opacity: 1;
}
body[data-style="paper"][data-theme] .card-notepad-btn svg { color: currentColor; }
body[data-style="paper"][data-theme] .card-add-item-btn { color: var(--np-muted); }
body[data-style="paper"][data-theme] :is(section.card:hover > .card-add-item-btn, .card-add-item-btn:focus-visible) { opacity: 1; }
body[data-style="paper"][data-theme][data-device="mobile"] .card-add-item-btn { opacity: 1; }
@media (hover: none) {
  body[data-style="paper"][data-theme] .card-add-item-btn { opacity: 1; }
}
body[data-style="paper"][data-theme] :is(.card-notepad-btn, .card-add-item-btn, .card-collapse-btn):hover {
  color: var(--np-ink);
  background: var(--np-wash);
}
/* "has notes" is an accent dot (red would mean due) */
body[data-style="paper"][data-theme] .card-notepad-btn.has-note::after { background: var(--np-accent); }

/* --- 8.4 Edit mode: the tiles keep their sheet and the base's 4px paste-up
   edge (accent through --brand) over graph paper in non-repro blue, the
   colour layout grids are printed in. Size / position / attachment stay the
   base's (styles.css 15537); night is 17. --- */
body[data-style="paper"][data-theme] .app-main.edit-mode-tiles::before {
  background-image:
    linear-gradient(to right, var(--np-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--np-grid) 1px, transparent 1px);
}
body[data-style="paper"][data-theme] .app-main.edit-mode-tiles .card:not(.app-header):not(.time-tracking-card):not(.quick-access-card):not(.eisenhower-card):hover {
  box-shadow: var(--np-lift-sheet), 0 12px 26px -14px rgb(var(--np-shadow-rgb) / 45%);
}
/* the resize edges and their span label: accent and a toast slip (were blue / slate) */
body[data-style="paper"][data-theme] :is(.card-resize-handle-right, .card-resize-handle-bottom, .card-resize-handle-left,
  .card-resize-handle-top):is(:hover, .active) {
  background: rgb(var(--np-accent-rgb) / 28%);
}
body[data-style="paper"][data-theme] .resize-span-indicator {
  background: var(--np-toast);
  color: var(--np-on-toast);
  box-shadow: 0 0 0 1px var(--np-toast-edge), 0 8px 18px -8px rgb(var(--np-shadow-rgb) / 55%);
  font-variant-numeric: tabular-nums;
}

/* --- 8.5 Drag (motion while the pointer moves is fine): the ghost is a
   dashed accent outline of the landing place; an armed swap pulses in accent
   (the base keyframes are hard-coded blue, and !important) --- */
body[data-style="paper"][data-theme] .grid-drag-ghost {
  background: rgb(var(--np-accent-rgb) / 10%);
  border: 2px dashed rgb(var(--np-accent-rgb) / 50%);
  border-radius: 6px;
}
body[data-style="paper"][data-theme] .card-swap-glow { animation: npSwapPulse 0.9s ease-in-out infinite !important; }
@keyframes npSwapPulse {
  0%, 100% {
    filter:
      drop-shadow(0 0 4px rgb(var(--np-accent-rgb) / 90%))
      drop-shadow(0 0 12px rgb(var(--np-accent-rgb) / 50%));
  }
  50% {
    filter:
      drop-shadow(0 0 10px rgb(var(--np-accent-rgb) / 100%))
      drop-shadow(0 0 26px rgb(var(--np-accent-rgb) / 75%));
  }
}
/* cross-card and section drop targets: accent rules, no blue haze */
body[data-style="paper"][data-theme] .card.drop-target { box-shadow: var(--np-lift-sheet), 0 0 0 4px rgb(var(--np-accent-rgb) / 18%); }
body[data-style="paper"][data-theme] .unified-content-group.subtitle-drop-target { background: rgb(var(--np-accent-rgb) / 7%); }
body[data-style="paper"][data-theme] .unified-subtitle-wrapper.subtitle-drop-target { background: rgb(var(--np-accent-rgb) / 12%); }
body[data-style="paper"][data-theme] .drop-indicator .drop-line { background: var(--np-accent); box-shadow: none; }
body[data-style="paper"][data-theme] .item-drop-indicator :is(.item-drop-line) { background: var(--np-accent); box-shadow: none; }

/* --- 8.6 The Card Edit Modal: the real card on the scrim (12.1), lifted as
   a dialog. "More below": the base darkens the whole viewport foot, which
   over paper read as a smudge across the last row. Here the card's own text
   fades into its stock instead: a sticky strip at the panel's foot, exactly
   the card's width (the panel carries it inline). Its 40px sit on the card's
   42px bottom padding, so at the end of the scroll nothing is faded. --- */
body[data-style="paper"][data-theme] .card-edit-body > .card { box-shadow: var(--np-lift-dialog); }
body[data-style="paper"][data-theme] .card-edit-modal::after { content: none; }
body[data-style="paper"][data-theme] .card-edit-panel::after {
  content: '';
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: block;
  height: 40px;
  margin-top: -40px;
  border-radius: 0 0 var(--radius) var(--radius);
  background: linear-gradient(to bottom, transparent, var(--np-sheet) 90%);
  pointer-events: none;
}
/* close = a small sheet disc with a hairline; delete = muted until it means it */
body[data-style="paper"][data-theme] .card-modal-close-btn {
  background: var(--np-sheet);
  color: var(--np-ink-soft);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--np-rule);
  opacity: 1;
  line-height: 1;
}
body[data-style="paper"][data-theme] .card-modal-close-btn:hover {
  color: var(--np-ink);
  background: linear-gradient(var(--np-wash), var(--np-wash)), var(--np-sheet);
  transform: none;
}
body[data-style="paper"][data-theme] .card-delete-btn { color: var(--np-muted); opacity: 1; }
body[data-style="paper"][data-theme] .card-delete-btn:hover { color: var(--np-red-t); transform: none; }
body[data-style="paper"][data-theme] :is(.card-reorder-btn, .card-swap-btn) { color: var(--np-muted); }
body[data-style="paper"][data-theme] :is(.card-reorder-btn:hover:not(:disabled), .card-swap-btn:hover) { color: var(--np-ink); transform: none; }
body[data-style="paper"][data-theme] :is(.title-color-picker-btn, .subtitle-color-picker-btn, .reorder-subtitles-btn):hover {
  background: var(--np-wash);
  transform: none;
}
/* the per-section + (legacy edit control) */
body[data-style="paper"][data-theme] .section-plus {
  background: var(--np-sheet);
  color: var(--np-ink-soft);
  box-shadow: 0 0 0 1px var(--np-rule), var(--np-lift-slip);
}
/* (the reorder-sections window and the section colour picker are 14m) */

/* --- 8.7 Item popovers (edit, calendar, interval; the sheets are 12.6, at
   z 2500 above the modal): their small controls. Confirm / cancel discs take
   the FAB inks; the slate and mint extras go. --- */
/* Their fields and buttons fell back to the UA faces (Arial, and monospace
   for the date), so one small popover mixed three faces beside the Inter
   labels. Fallback strength (0,1,1): a component's own family still wins.
   (The breakdown, links and colour windows are 14m's.) */
body[data-style="paper"] :where(.edit-popover, .calendar-popover, .unified-add-popover, .move-card-selector)
  :where(button, input, select, textarea) {
  font-family: inherit;
}
body[data-style="paper"][data-theme] :is(.btn-accept, .btn-cancel) {
  box-shadow: var(--np-lift-slip);
  transition: box-shadow 0.12s ease;
}
body[data-style="paper"][data-theme] :is(.btn-accept, .btn-cancel):hover {
  transform: none;
  box-shadow: 0 0 0 1px var(--np-rule), var(--np-lift-slip-hover);
}
body[data-style="paper"][data-theme] .btn-accept { background: var(--np-live-fill); color: var(--np-on-live); }
/* the pale disc gets a red-ink edge, as the edit-mode × does (7.6) */
body[data-style="paper"][data-theme] .btn-cancel {
  background: var(--np-cancel);
  color: var(--np-on-cancel);
  box-shadow: inset 0 0 0 1px rgb(var(--np-red-rgb) / 42%), var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .btn-cancel:hover {
  box-shadow: inset 0 0 0 1px rgb(var(--np-red-rgb) / 60%), var(--np-lift-slip-hover);
}
body[data-style="paper"][data-theme] :is(.btn-delete, .btn-move) { color: var(--np-muted); }
body[data-style="paper"][data-theme] .btn-delete:hover { color: var(--np-red-t); }
body[data-style="paper"][data-theme] .btn-move:hover { color: var(--np-ink); transform: none; }
body[data-style="paper"][data-theme] .btn-breakdown { background: rgb(var(--np-accent-rgb) / 10%); color: var(--np-accent); }
body[data-style="paper"][data-theme] .btn-breakdown:hover { background: rgb(var(--np-accent-rgb) / 16%); transform: none; }
/* (a subtask's links button was still Tailwind slate #94a3b8 by night) */
body[data-style="paper"][data-theme] :is(.links-btn, .tasks-btn, .list-item-tasks-btn, .list-item-links-btn) { color: var(--np-muted); }
body[data-style="paper"][data-theme] :is(.links-btn, .tasks-btn, .list-item-tasks-btn, .list-item-links-btn):hover { background: var(--np-wash); color: var(--np-ink); }
body[data-style="paper"][data-theme] .hashtag-btn { color: var(--np-ink-soft); }
body[data-style="paper"][data-theme] .calendar-btn svg { stroke: var(--np-ink-soft); }
body[data-style="paper"][data-theme] :is(.calendar-btn, .hashtag-btn):hover { transform: none; }
/* the counter field locked by a breakdown sum (base !important) */
body[data-style="paper"][data-theme] .edit-popover input.disabled-sum-mode {
  background: var(--np-wash) !important;
  color: var(--np-muted);
}
/* calendar popover: a hairline under its head, fields of the paper (the
   base dark select was slate at (0,2,1), above the 13.1 fallback) */
body[data-style="paper"][data-theme] .calendar-header { border-bottom-color: var(--np-hair); }
body[data-style="paper"][data-theme] .calendar-header h4 {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-size: 18px;
  font-weight: 600;
  color: var(--np-ink);
}
body[data-style="paper"][data-theme] .calendar-section :is(input, select) {
  background-color: var(--np-field);
  border-color: var(--np-rule);
  color: var(--np-ink);
}
body[data-style="paper"][data-theme] .calendar-section :is(input, select):focus {
  border-color: var(--np-accent);
  box-shadow: 0 0 0 3px rgb(var(--np-accent-rgb) / 16%);
  outline: none;
}
/* the + menu of the old blank-item flow (base hover !important slate) */
body[data-style="paper"][data-theme] .unified-add-popover button:hover {
  background: var(--np-wash) !important;
  border-color: var(--np-rule) !important;
}
/* (the icon editor's emoji picker is the writing part's, 15) */

/* --- 8.8 The Move list: rows hover with the wash, a card is an Inter 600
   heading over its sections, which hang on a rule-coloured tree rail --- */
body[data-style="paper"][data-theme] .move-card-selector {
  background: var(--np-sheet);
  border-color: var(--np-rule);
  box-shadow: var(--np-lift-control);
}
body[data-style="paper"][data-theme] .move-card-selector-title {
  background: var(--np-sheet);
  border-bottom-color: var(--np-hair);
  font-family: var(--np-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--np-muted);
}
body[data-style="paper"][data-theme] .move-card-option { color: var(--np-ink); }
body[data-style="paper"][data-theme] .move-card-option:hover { background: var(--np-wash); }
body[data-style="paper"][data-theme] :is(.move-card-row, .move-card-header) { color: var(--np-ink); font-weight: 600; }
body[data-style="paper"][data-theme] .move-card-header { border-top-color: var(--np-hair); }
/* the base card glyph (an outlined rounded box) read as an unticked checkbox,
   as if the list were multi-select: a card is the theme's small diamond here,
   cut inside the same 12×10 box so the rows don't shift */
body[data-style="paper"][data-theme] :is(.move-card-row, .move-card-header)::before {
  border-color: transparent;
  border-radius: 0;
  background: var(--np-muted);
  clip-path: polygon(6px 0.5px, 10.5px 5px, 6px 9.5px, 1.5px 5px);
  opacity: 1;
}
body[data-style="paper"][data-theme] .move-card-header-tag {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--np-rule);
  border-radius: 3px;
  color: var(--np-ink-soft);
}
body[data-style="paper"][data-theme] .move-subtitle-option { color: var(--np-ink-soft); }
body[data-style="paper"][data-theme] .move-subtitle-option:hover { color: var(--np-ink); }
body[data-style="paper"][data-theme] .move-subtitle-option::before,
body[data-style="paper"][data-theme] .move-subtitle-option::after {
  border-color: var(--np-rule);
  opacity: 1;
}
body[data-style="paper"][data-theme] :is(.move-card-empty, .move-subtitle-option.is-top) { color: var(--np-muted); }


/* === 9. Icon tiles, indicator, Quick Access (DESIGN.md 5.8) ============== */

/* --- 9.1 Icons are tiles of raised stock (10px corners): a hairline, a
   pressed bottom edge and a short shadow. Images, emoji and .invert-dark are
   never touched (the glossy covers are gone, 4.2). --- */
body[data-style="paper"][data-theme] .icon-button {
  background: var(--np-tile);
  border: 1px solid var(--np-hair);
  border-radius: 10px;
  box-shadow: var(--np-lift-tile);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
body[data-style="paper"][data-theme] .icon-button:hover {
  transform: translateY(-1px);
  border-color: var(--np-rule);
  box-shadow: var(--np-lift-tile-hover);
}

/* --- 9.2 Links / tasks: a small marker-drawn "more" annotation. Its paper
   backing separates the ink from logos; only decorative layers are masked. --- */
body[data-style="paper"][data-theme] .icon-indicator {
  top: -5px;
  right: -4px;
  width: 24px;
  height: 24px;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
  filter: none;
}
body[data-style="paper"][data-theme] .icon-indicator::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--np-accent);
  mask: url('assets/textures/marker-more.svg') center / contain no-repeat;
  transform: rotate(-7deg);
  box-shadow: none;
  z-index: 1;
  pointer-events: none;
  transition: background-color 0.12s ease;
}
body[data-style="paper"][data-theme] .icon-indicator::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: var(--np-tile);
  border-radius: 48% 53% 46% 54%;
  pointer-events: none;
}
body[data-style="paper"][data-theme] .icon-indicator:hover { transform: none; filter: none; }
body[data-style="paper"][data-theme] .icon-indicator:hover::before { background: var(--np-ink); }
/* The popup is a separate paper sheet. Its decorative surface is styled in
   18-pasteup after the shared scrap rules; remove the glass halo completely. */
body[data-style="paper"][data-theme] .icon-indicator-expanded::before { content: none; }
body[data-style="paper"][data-theme] :is(.icon-indicator-section-title, .link-section-divider) {
  font-family: var(--np-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--np-ink-soft);
}

/* --- 9.3 Quick Access: a turquoise backing sheet (part 18). Colour swatches
   retain their exact fill and outside ring. --- */
body[data-style="paper"][data-theme] .unified-copypaste-item.color-swatch.quick-access-lit {
  box-shadow: 0 0 0 1px var(--np-sheet), 0 0 0 2.5px rgb(var(--np-accent-rgb) / 70%), var(--np-lift-slip);
}

/* --- 9.4 An item's linked tasks: the spot inks as soft washes with ink text
   (item task bubbles, the @ lists, quick-capture tokens and help examples,
   item task pills, completed rows). Never on the matrix's own task slips,
   which carry task-bubble-<colour> too (tasks.js) and are 11. --- */
body[data-style="paper"][data-theme] .task-bubble-red:not(.eisenhower-task) {
  background: color-mix(in srgb, rgb(var(--np-red-rgb)) 18%, var(--np-tile));
  border-color: rgb(var(--np-red-rgb) / 40%);
}
body[data-style="paper"][data-theme] .task-bubble-orange:not(.eisenhower-task) {
  background: color-mix(in srgb, rgb(var(--np-orange-rgb)) 18%, var(--np-tile));
  border-color: rgb(var(--np-orange-rgb) / 40%);
}
body[data-style="paper"][data-theme] .task-bubble-yellow:not(.eisenhower-task) {
  background: color-mix(in srgb, rgb(var(--np-yellow-rgb)) 20%, var(--np-tile));
  border-color: rgb(var(--np-yellow-rgb) / 45%);
}
body[data-style="paper"][data-theme] .task-bubble-blue:not(.eisenhower-task) {
  background: color-mix(in srgb, rgb(var(--np-blue-rgb)) 18%, var(--np-tile));
  border-color: rgb(var(--np-blue-rgb) / 40%);
}
body[data-style="paper"][data-theme] .task-bubble-green:not(.eisenhower-task) {
  background: color-mix(in srgb, rgb(var(--np-live-rgb)) 18%, var(--np-tile));
  border-color: rgb(var(--np-live-rgb) / 40%);
}
body[data-style="paper"][data-theme] :is(.task-bubble-red, .task-bubble-orange, .task-bubble-yellow, .task-bubble-blue,
  .task-bubble-green):not(.eisenhower-task) {
  color: var(--np-ink);
}
/* the bubbles themselves (they fly out of the item over the 12.1 scrim):
   printed slips with 6px corners, not glossy capsules */
body[data-style="paper"][data-theme] :is(.reminder-task-bubble, .reminder-link-bubble) {
  border-radius: 6px;
  box-shadow: 0 0 0 1px var(--np-rule), var(--np-lift-control);
}
body[data-style="paper"][data-theme] :is(.reminder-task-bubble, .reminder-link-bubble):hover {
  filter: none;
  box-shadow: 0 0 0 1px var(--np-ink-soft), var(--np-lift-control);
}
body[data-style="paper"][data-theme] .reminder-link-bubble { color: var(--np-ink); }
/* a task bubble already has its 2px spot-ink border (styles.css 6328): the
   extra rule ring made a double frame. One 1px frame and the lift, the
   padding grown by the lost pixel so the bubble keeps its size */
body[data-style="paper"][data-theme] .reminder-task-bubble:is(.task-bubble-red, .task-bubble-orange, .task-bubble-yellow,
  .task-bubble-blue, .task-bubble-green) {
  border-width: 1px;
  padding: 9px 17px;
  box-shadow: var(--np-lift-control);
}
body[data-style="paper"][data-theme] .reminder-task-bubble:is(.task-bubble-red, .task-bubble-orange, .task-bubble-yellow,
  .task-bubble-blue, .task-bubble-green):hover {
  border-color: var(--np-ink-soft);
  box-shadow: var(--np-lift-control);
}
/* the item lifted above the scrim while its bubbles are open */
body[data-style="paper"][data-theme] .links-source-clone { box-shadow: var(--np-lift-control); }
/* --- 9.5 The links window and the link colour window are styled once, in
   14m (dialogs) --- */


/* === 10. Slips, reminders, swatches, add tiles (DESIGN.md 5.9-5.12) ===== */

/* --- 10.1 Text slips (subtasks / links, reminders, copy-paste, the legacy
   pills): slips of paper sunk just below the sheet, a hairline and a pressed
   bottom edge, 6px corners. They stay opaque: links.js reads the computed
   fill to colour the link bubbles. A user colour is inline (55% over the
   paper, sections.js) and wins; the default fill is this. --- */
body[data-style="paper"][data-theme] :is(.unified-subtask-item, .unified-reminder-item, .unified-copypaste-item:not(.color-swatch),
  .list-item, .reminder-item, .copy-paste-item) {
  background-color: var(--np-slip);
  border: 1px solid var(--np-hair);
  border-radius: 6px;
  box-shadow: var(--np-lift-slip);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}
body[data-style="paper"][data-theme] :is(.unified-subtask-item, .unified-reminder-item, .unified-copypaste-item:not(.color-swatch),
  .list-item, .reminder-item, .copy-paste-item):hover {
  transform: translateY(-1px);
  background-color: var(--np-slip-hover);
  box-shadow: var(--np-lift-slip-hover);
}
/* Night: a user colour is laid at 55% over the charcoal with cream ink, and
   the light blues stop short of AA (#3faef3: 4.1:1). A 20% shade under the
   text keeps the hue and lifts every colour past 5.5:1 (glass compensated
   its night colours too). The inline background shorthand resets the image,
   hence !important. Reminders with a wash already get a darkened solid fill
   from sections.js and are left alone. */
body[data-style="paper"][data-theme="dark"] :is(.unified-subtask-item, .unified-reminder-item:not([data-progress-state]),
  .unified-copypaste-item:not(.color-swatch))[style*="background"] {
  background-image: linear-gradient(rgb(0 0 0 / 20%), rgb(0 0 0 / 20%)) !important;
}
body[data-style="paper"][data-theme] :is(.unified-subtask-item a, .unified-reminder-left a.reminder-title,
  .unified-copypaste-item:not(.color-swatch) .unified-copypaste-text, .list-item a, .reminder-item .reminder-title, .copy-paste-text) {
  font-weight: 500;
  color: var(--np-ink);
}
/* the small glyphs inside a slip: muted ink at full strength (5.1:1 on the
   slip); a subtask's note glyph turns accent when it holds a note */
body[data-style="paper"][data-theme] :is(.reminder-links-toggle, .reminder-tasks-toggle, .list-item-links-toggle,
  .list-item-tasks-toggle, .list-item-notes-toggle) {
  color: var(--np-muted);
  opacity: 1;
}
body[data-style="paper"][data-theme] :is(.reminder-links-toggle, .reminder-tasks-toggle, .list-item-links-toggle,
  .list-item-tasks-toggle, .list-item-notes-toggle):hover {
  color: var(--np-ink);
  transform: none;
}
body[data-style="paper"][data-theme] .list-item-notes-toggle.has-note { color: var(--np-accent); }
/* on a user colour (the only slips sections.js gives an inline fill in paper)
   muted ink can drop under 3:1 at night: the glyphs follow the slip's own ink */
body[data-style="paper"][data-theme] :is(.unified-subtask-item, .unified-reminder-item, .unified-copypaste-item:not(.color-swatch))[style*="background"]
  :is(.reminder-links-toggle, .reminder-tasks-toggle, .list-item-links-toggle, .list-item-tasks-toggle,
  .list-item-notes-toggle, .copy-paste-icon) {
  color: color-mix(in srgb, var(--np-ink) 78%, transparent);
}
body[data-style="paper"][data-theme] :is(.unified-subtask-item, .unified-reminder-item, .unified-copypaste-item:not(.color-swatch))[style*="background"]
  .list-item-notes-toggle.has-note {
  color: var(--np-ink);
}
body[data-style="paper"][data-theme] .unified-copypaste-item:not(.color-swatch) .copy-paste-icon,
body[data-style="paper"][data-theme] .copy-paste-item .copy-paste-icon { color: var(--np-muted); }
body[data-style="paper"][data-theme] .copy-paste-icon:hover { background: var(--np-wash); }
body[data-style="paper"][data-theme] .priority-toggle-btn { color: var(--np-accent); }
body[data-style="paper"][data-theme] :is(.priority-toggle-btn, .priority-toggle-btn.active):hover { color: var(--np-ink); transform: none; }
/* the glyphs in ink-soft, as the calendar's stroke already is (8.7): muted on
   the wash over a red state was 3.7:1 by day, 3.9:1 by night; now 5.0 / 5.5 */
body[data-style="paper"][data-theme] .unified-reminder-edit-btns button { background: var(--np-wash); color: var(--np-ink-soft); }
body[data-style="paper"][data-theme] .unified-reminder-edit-btns button:hover { background: var(--np-slip-hover); color: var(--np-ink); }
/* on a user colour the edit controls are printed as paper stamps, like the
   days text beside them (10.3): muted ink on a 7% wash fell to 3.0-3.9:1 on
   the night colours. On known paper they hold on any colour, day or night. */
body[data-style="paper"][data-theme] :is(.unified-subtask-item, .unified-reminder-item)[style*="background"]
  :is(.unified-reminder-edit-btns button, .list-item-links-btn, .list-item-tasks-btn) {
  background: var(--np-tile);
  box-shadow: inset 0 0 0 1px var(--np-rule);
  color: var(--np-ink-soft);
}
body[data-style="paper"][data-theme] :is(.unified-subtask-item, .unified-reminder-item)[style*="background"]
  :is(.unified-reminder-edit-btns button, .list-item-links-btn, .list-item-tasks-btn):hover {
  background: linear-gradient(var(--np-wash), var(--np-wash)), var(--np-tile);
  box-shadow: inset 0 0 0 1px var(--np-ink-soft);
  color: var(--np-ink);
}

/* --- 10.2 Reminders: the elapsed time is an opaque wash of the state's ink
   across the slip, its foot printed as a 2px rule in the state's edge ink
   with a short tick rising where the time stands. Both stay in the bottom
   padding, under the line of type: any vertical edge through the slip's
   middle fell inside a word or the days stamp and read as a text cursor.
   2px past the padding box: at 100% the tick hides under the border
   (overflow: hidden). --- */
body[data-style="paper"][data-theme] .unified-reminder-item::before {
  width: calc(var(--progress-width, 100%) + 2px);
  border-radius: 0;
  box-shadow: none;
}
body[data-style="paper"][data-theme] .unified-reminder-item[data-progress-state]::before {
  background:
    linear-gradient(var(--np-edge), var(--np-edge)) right bottom / 1.5px 7px no-repeat,
    linear-gradient(var(--np-edge), var(--np-edge)) left bottom / 100% 2px no-repeat,
    var(--np-wash-c);
  box-shadow: none;
}
/* on a user colour the wash tints that colour instead of covering it (an
   opaque olive next to mint read as two papers glued together); the ink over
   it stays above 8:1, and the days text sits in its own stamp (10.3) */
body[data-style="paper"][data-theme] .unified-reminder-item[data-custom-color][data-progress-state]::before {
  background:
    linear-gradient(var(--np-edge), var(--np-edge)) right bottom / 1.5px 7px no-repeat,
    linear-gradient(var(--np-edge), var(--np-edge)) left bottom / 100% 2px no-repeat,
    color-mix(in srgb, var(--np-wash-c) 65%, transparent);
}
/* By night the tint only works on pale colours: sections.js has already
   turned the user colour into a solid as dark as the washes and often more
   saturated (teal, blue-grey), and 65% of a red wash over it printed grey
   (chroma 2.8, an overdue slip read as plain paper). The night wash stays
   opaque, as on a plain slip and in glass; its edge marks where it ends. */
body[data-style="paper"][data-theme="dark"] .unified-reminder-item[data-custom-color][data-progress-state]::before {
  background:
    linear-gradient(var(--np-edge), var(--np-edge)) right bottom / 1.5px 7px no-repeat,
    linear-gradient(var(--np-edge), var(--np-edge)) left bottom / 100% 2px no-repeat,
    var(--np-wash-c);
}
body[data-style="paper"][data-theme] .unified-reminder-item[data-progress-state="green"]::before  { --np-wash-c: var(--np-w-green);  --np-edge: var(--np-e-green); }
body[data-style="paper"][data-theme] .unified-reminder-item[data-progress-state="yellow"]::before { --np-wash-c: var(--np-w-yellow); --np-edge: var(--np-e-yellow); }
body[data-style="paper"][data-theme] .unified-reminder-item[data-progress-state="orange"]::before { --np-wash-c: var(--np-w-orange); --np-edge: var(--np-e-orange); }
body[data-style="paper"][data-theme] .unified-reminder-item[data-progress-state="red"]::before    { --np-wash-c: var(--np-w-red);    --np-edge: var(--np-e-red); }

/* --- 10.3 Badges. Legacy pills keep their meaning as washes with state
   text; the generic interval classes (.green ...) only ever sit on a badge. --- */
body[data-style="paper"][data-theme] .days-badge {
  background: var(--np-slip);
  color: var(--np-ink);
  font-variant-numeric: tabular-nums;
}
body[data-style="paper"][data-theme] .days-badge:is(.days-green, .green)   { background: var(--np-w-green);  color: var(--np-t-green); }
body[data-style="paper"][data-theme] .days-badge:is(.days-warn, .yellow)   { background: var(--np-w-yellow); color: var(--np-t-yellow); }
body[data-style="paper"][data-theme] .days-badge:is(.days-orange, .orange) { background: var(--np-w-orange); color: var(--np-t-orange); }
body[data-style="paper"][data-theme] .days-badge:is(.days-danger, .red)    { background: var(--np-w-red);    color: var(--np-t-red); }
body[data-style="paper"][data-theme] .badge-red { color: var(--np-t-red); }
/* on a unified reminder the days text is set in the state's own ink (5.0-5.6:1
   on its wash and on the bare slip); overdue is red at 700 with the words.
   Counters have no wash: their badge class gives the ink. */
body[data-style="paper"][data-theme] .unified-reminder-item .days-badge {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--np-ink-soft);
}
body[data-style="paper"][data-theme] .unified-reminder-item .days-badge:is(.days-green, .green)   { color: var(--np-t-green); }
body[data-style="paper"][data-theme] .unified-reminder-item .days-badge:is(.days-warn, .yellow)   { color: var(--np-t-yellow); }
body[data-style="paper"][data-theme] .unified-reminder-item .days-badge:is(.days-orange, .orange) { color: var(--np-t-orange); }
body[data-style="paper"][data-theme] .unified-reminder-item .days-badge:is(.days-danger, .red)    { color: var(--np-t-red); }
body[data-style="paper"][data-theme] .unified-reminder-item[data-progress-state="green"]  .days-badge { color: var(--np-t-green); }
body[data-style="paper"][data-theme] .unified-reminder-item[data-progress-state="yellow"] .days-badge { color: var(--np-t-yellow); }
body[data-style="paper"][data-theme] .unified-reminder-item[data-progress-state="orange"] .days-badge { color: var(--np-t-orange); }
body[data-style="paper"][data-theme] .unified-reminder-item[data-progress-state="red"]    .days-badge { color: var(--np-t-red); font-weight: 700; }
/* on a user colour the days text is printed in an opaque paper stamp (a ring,
   not a border: no geometry change), so AA holds on any colour. The stamp
   fits its words: the base 92px minimum and right alignment (styles.css 1737,
   7469) left "Today" floating in an empty box and took the title's room. Set
   a point smaller than the title, ring and padding included it is as wide as
   the glass text (Card Edit Modal: "Overdue by 3 days" 128px vs 126px). */
body[data-style="paper"][data-theme] .unified-reminder-item[data-custom-color] .days-badge {
  background: var(--np-tile) !important;   /* base: background: none !important (styles.css 7473) */
  box-shadow: inset 0 0 0 1px currentColor;
  border-radius: 3px;
  min-width: 0;
  padding: 1px 4px;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}

/* --- 10.4 The breakdown window (counter reminders) is styled once, in 14m
   (dialogs) --- */

/* --- 10.5 Colour swatches: never recoloured. The inline colour and its
   contrast text stay; the gloss is gone (4.2) and a hairline outside lets a
   pale colour read on paper. The base pill radius stays. --- */
body[data-style="paper"][data-theme] .unified-copypaste-item.color-swatch {
  border: 0;
  box-shadow: 0 0 0 1px var(--np-hair), var(--np-lift-slip);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
body[data-style="paper"][data-theme] .unified-copypaste-item.color-swatch:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px var(--np-rule), var(--np-lift-slip-hover);
}
/* by night the risk is the other way round: a dark colour (Black, 1.2:1)
   sinks into the charcoal, so the outside line is a firmer cream. The
   swatch's own colour is untouched. */
body[data-style="paper"][data-theme="dark"] .unified-copypaste-item.color-swatch {
  box-shadow: 0 0 0 1px rgb(240 225 200 / 28%), var(--np-lift-slip);
}
body[data-style="paper"][data-theme="dark"] .unified-copypaste-item.color-swatch:hover {
  box-shadow: 0 0 0 1px rgb(240 225 200 / 40%), var(--np-lift-slip-hover);
}

/* --- 10.5b Icon separators (a divider image, not an icon): by night the
   base dims it with brightness(.7) (styles.css 3721) and it still printed
   the brightest mark in the card. Paper prints it at half strength, by
   opacity only (no filter, no recolour); by day it is left as it is. --- */
body[data-style="paper"][data-theme="dark"] .icon-separator { opacity: 0.5; }

/* --- 10.6 Add tiles: dashed outlines, nothing until you mean it (the base
   indigo tiles are !important, light and dark) --- */
body[data-style="paper"][data-theme] :is(.unified-add-tile, .add-tile, .unified-add-subtitle, .icon-add-tile, .reminder-item.add-tile,
  .reminder-subtitle.add-tile, .copy-paste-item.add-tile, .list-item.add-tile) {
  background: transparent !important;
  border: 1px dashed var(--np-rule) !important;
  color: var(--np-ink-soft) !important;
  box-shadow: none !important;
}
body[data-style="paper"][data-theme] :is(.unified-add-tile, .add-tile, .unified-add-subtitle, .icon-add-tile, .reminder-item.add-tile,
  .reminder-subtitle.add-tile, .copy-paste-item.add-tile, .list-item.add-tile):hover {
  background: rgb(var(--np-accent-rgb) / 6%) !important;
  border-color: var(--np-accent) !important;
  color: var(--np-accent) !important;
  transform: none;
}


/* === 11. Matrix (DESIGN.md 5.13) ========================================== */
/* The Eisenhower matrix as a page of four columns: each column a breath of its
   spot ink over the sheet with a printed rule on top, its tasks plain slips of
   stock. Primary is the lead story (heavier type, the column's ink down its
   edge, a touch of tint); Secondary is a plain tile. The running timer is the
   only green on the page. The same classes paint the Today groups and pills
   (14d) and, under the shell prefix, the phone panes and rows (16d), so the
   geometry the shell owns (radius, border width) is set at :where() strength. */

/* --- 11.1 Columns: --np-col-tint is 4% by day and 6% at night (part 1), so
   the night rule in 17 is this same value and the order of the two never
   matters. A hairline of the same ink frames the column. --- */
body[data-style="paper"][data-theme] .eisenhower-priority-card {
  background: color-mix(in srgb, rgb(var(--priority-rgb)) var(--np-col-tint), var(--np-sheet));
  border: 1px solid color-mix(in srgb, rgb(var(--priority-rgb)) 14%, transparent);
  box-shadow: none;
}
body[data-style="paper"] :where(.eisenhower-priority-card) { border-radius: 6px; }
/* inside the matrix card (and the Today groups, 14d) the column is headed by a
   3px rule in its ink, like a section front */
body[data-style="paper"][data-theme] :is(.eisenhower-card .eisenhower-priority-card, .today-color-group.eisenhower-priority-card) {
  border-top: 3px solid rgb(var(--priority-rgb));
  border-radius: 3px 3px 6px 6px;
}

/* --- 11.2 Column heads: the headline serif, set left, with a diamond of the
   column's ink as its dingbat (the same mark as the phone panes and chips) --- */
body[data-style="paper"][data-theme] .eisenhower-card-header {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-size: 19px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.004em;
  text-align: left;
  color: var(--np-ink);
}
body[data-style="paper"][data-theme] .eisenhower-card-header::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 10px 0 2px;
  vertical-align: 0.12em;
  transform: rotate(45deg);
  background: rgb(var(--priority-rgb));
}
/* an empty column says so in the italic of the paper, not in a grey whisper */
body[data-style="paper"][data-theme] .eisenhower-card-empty {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-style: italic;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--np-muted);
  opacity: 1;
}
/* Primary / Secondary, Tasks / Categories, Today's column heads: kickers */
body[data-style="paper"][data-theme] :is(.eisenhower-section-heading, .tt-section-heading) {
  font-family: var(--np-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--np-muted);
}

/* --- 11.3 Task slips. Secondary is plain stock; the colour lives in the
   column, never on the slip (matrix pills also carry .task-bubble-<color>,
   whose pastel fills and tinted text this beats). The resting rule outranks
   the base hover fills, so hover only lifts. Phone rows (.mx-task,
   .mx-today-row) keep their own still hover (mobile-tasks.css:153). --- */
body[data-style="paper"][data-theme] .eisenhower-task {
  background: var(--np-tile);
  border: 1px solid var(--np-hair);
  box-shadow: var(--np-lift-slip);
  color: var(--np-ink);
  font-weight: 500;
  transition: background-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}
body[data-style="paper"] :where(.eisenhower-task) { border-radius: 6px; }
body[data-style="paper"][data-theme] :not(.mx-task, .mx-today-row).eisenhower-task:hover {
  transform: translateY(-1px);
  box-shadow: var(--np-lift-slip-hover);
}
/* Primary (pinned) is the lead story: set heavier, a 3px edge of the column's
   ink, a 5% tint (warm grey outside a column). Louder than Secondary on
   weight, edge and tint, never on fill alone. */
body[data-style="paper"][data-theme] .eisenhower-task.eisenhower-task-pinned {
  font-weight: 600;
  background: color-mix(in srgb, rgb(var(--priority-rgb, 112 104 92)) 5%, var(--np-tile));
  border-color: color-mix(in srgb, rgb(var(--priority-rgb, 112 104 92)) 26%, transparent);
  box-shadow: inset 3px 0 0 rgb(var(--priority-rgb, 112 104 92)), var(--np-lift-slip);
}
body[data-style="paper"][data-theme] :not(.mx-task, .mx-today-row).eisenhower-task.eisenhower-task-pinned:hover {
  box-shadow: inset 3px 0 0 rgb(var(--priority-rgb, 112 104 92)), var(--np-lift-slip-hover);
}
body[data-style="paper"][data-theme] .eisenhower-task.dragging { box-shadow: none; }

/* --- 11.4 Slip controls at full opacity in the muted ink (5.63:1 on the
   tile; the base 0.55 opacity was 2.7:1). Complete answers in the live ink. --- */
body[data-style="paper"][data-theme] .eisenhower-task :is(.task-timer-btn, .task-complete-btn, .eisenhower-task-link-btn, .eisenhower-task-linked) {
  color: var(--np-muted);
  opacity: 1;
}
body[data-style="paper"][data-theme] .eisenhower-task :is(.task-timer-btn, .eisenhower-task-link-btn):hover { color: var(--np-ink); }
body[data-style="paper"][data-theme] .task-complete-btn:is(:hover, :focus-visible),
body[data-style="paper"][data-theme] .eisenhower-task .task-complete-btn:is(:hover, :focus-visible) {
  color: var(--np-live-t);
  opacity: 1;
}

/* --- 11.5 The running timer: a solid disc of the live ink with a paper glyph,
   its time in the same ink. Static (the glass crystal's halo and sweep live
   in glass-fx.css and never match here). Also the Time Tracking rows' toggle
   (.task-timer-btn.is-running) and the phone rows. --- */
body[data-style="paper"][data-theme] :is(.task-timer.is-running .task-timer-btn, .task-timer-btn.is-running),
body[data-style="paper"][data-theme] :is(.task-timer.is-running .task-timer-btn, .task-timer-btn.is-running):hover {
  opacity: 1;
  background: var(--np-live-fill);
  color: var(--np-on-live);
  box-shadow: 0 0 0 2px rgb(var(--np-live-rgb) / 22%);
}
body[data-style="paper"][data-theme] .task-timer.is-running .task-timer-time {
  color: var(--np-live-t);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
/* the slip whose clock runs carries a green hairline round it; a Primary one
   keeps its ink edge inside the ring */
body[data-style="paper"][data-theme] .eisenhower-task:has(.task-timer.is-running) {
  border-color: rgb(var(--np-live-rgb) / 55%);
}
body[data-style="paper"][data-theme] .eisenhower-task.eisenhower-task-pinned:has(.task-timer.is-running) {
  box-shadow: inset 3px 0 0 rgb(var(--priority-rgb, 112 104 92)), 0 0 0 1px rgb(var(--np-live-rgb) / 30%), var(--np-lift-slip);
}

/* --- 11.6 The matrix header: the folder / idea / + buttons are quiet rings
   of rule (was 2px slate), the drop-to-complete check a live disc. Dragging a
   task onto it scales it up (the base, drag-only); the base glow pulse is
   replaced by a still ring, since nothing glows on paper. --- */
body[data-style="paper"][data-theme] :is(.btn-add-task-header, .btn-projects-header) {
  color: var(--np-ink-soft);
  background: transparent;
  border: 1px solid var(--np-rule);
}
body[data-style="paper"][data-theme] :is(.btn-add-task-header, .btn-projects-header):hover {
  color: var(--np-ink);
  border-color: var(--np-ink-soft);
  background: var(--np-wash);
  transform: none;
}
/* at rest the check is a quiet live ring like its neighbours (a solid green
   disc read as a running state); only a task held over it fills it. The ring
   is inset, so the 32px box never changes. */
body[data-style="paper"][data-theme] .btn-delete-task-drop {
  background: transparent;
  color: var(--np-live-t);
  box-shadow: inset 0 0 0 1px rgb(var(--np-live-rgb) / 55%);
}
body[data-style="paper"][data-theme] .btn-delete-task-drop.drag-hover {
  background: var(--np-live-fill);
  color: var(--np-on-live);
  box-shadow: 0 0 0 3px rgb(var(--np-live-rgb) / 30%);
  animation: none;
}
/* where a dragged task will land: an accent rule, no glow */
body[data-style="paper"][data-theme] .eisenhower-drop-indicator {
  background: var(--np-accent);
  box-shadow: none;
}
/* the Completed Tasks button under the matrix: a dashed rule, like an add tile */
body[data-style="paper"][data-theme] .eisenhower-completed-btn {
  border-color: var(--np-rule);
  color: var(--np-ink-soft);
}
body[data-style="paper"][data-theme] .eisenhower-completed-btn:hover {
  border-color: rgb(var(--np-live-rgb) / 60%);
  color: var(--np-live-t);
  background: transparent;
}

/* === 14b. Task editor (DESIGN.md 5.17) ===================================== */
/* The editor is a form on the sheet: kicker labels, paper fields (13), the
   priority picker in the four spot inks, subtasks and links as slips. The
   description editor and its toolbar belong to the writing engine (15). The
   phone writer frame restates its own geometry under #task-editor-modal (an
   ID), so only paint and type are set here, except where a :where() fallback
   keeps a shell rule in charge. */

/* --- 14b.0 Controls take the page's Inter. The browser gives button, input,
   select and textarea a face of their own (Arial on Windows), so the name
   field and the link rows read in a different type from the date beside
   them. Fallback strength: a component's own family still wins. The quick
   capture window isn't listed (its .qc-code examples are monospace at zero
   strength). --- */
body[data-style="paper"] :where(.eisenhower-card, .task-editor-modal, .item-tasks-modal, .item-task-picker-modal,
  .item-selector-modal, .reminder-tasks-modal, .subtask-template-picker, .subtask-template-name-modal,
  .calendar-view-modal, .today-modal, .time-tracking-card, .tt-range-pop, .busy-strip)
  :where(button, input, select, textarea) {
  font-family: inherit;
}

/* --- 14b.1 Title and labels --- */
/* (0,6,2): one step over the generic dialog title (12.5) without an ID, so
   the phone frame's #task-editor-modal rules can still restate it */
body[data-style="paper"][data-theme] .task-editor-modal .task-editor-dialog .task-editor-header > h4 {
  font-size: 22px;
  line-height: 1.2;
}
body[data-style="paper"][data-theme] :is(.task-editor-field > label:not(.task-editor-primary-label), .task-editor-description > label) {
  font-family: var(--np-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--np-ink-soft);
}
/* the subtasks count rides in its label: kept in sentence case, in live ink */
body[data-style="paper"][data-theme] .task-subtasks-pct {
  color: var(--np-live-t);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}
/* a close × is not a warning: the base red becomes ink (fallback strength, so
   the phone frame's back chevron keeps its own colour) */
body[data-style="paper"] :where(.task-editor-close-btn, .item-selector-close-btn, .subtask-desc-close-btn) {
  color: var(--np-muted);
  opacity: 1;
}
body[data-style="paper"] :where(.task-editor-close-btn, .item-selector-close-btn, .subtask-desc-close-btn):hover { color: var(--np-ink); }

/* --- 14b.2 Priority picker: each ink at a 24% wash over the tile inside a 2px
   border of the ink itself; the chosen one is ringed in ink with a sheet gap.
   (The buttons carry their colour name as a title.) --- */
body[data-style="paper"][data-theme] .task-color-btn {
  border-width: 2px;
  box-shadow: none;
}
body[data-style="paper"][data-theme] .task-color-btn.red    { background: color-mix(in srgb, rgb(var(--np-red-rgb)) 24%, var(--np-tile));    border-color: rgb(var(--np-red-rgb)); }
body[data-style="paper"][data-theme] .task-color-btn.orange { background: color-mix(in srgb, rgb(var(--np-orange-rgb)) 24%, var(--np-tile)); border-color: rgb(var(--np-orange-rgb)); }
body[data-style="paper"][data-theme] .task-color-btn.yellow { background: color-mix(in srgb, rgb(var(--np-yellow-rgb)) 24%, var(--np-tile)); border-color: rgb(var(--np-yellow-rgb)); }
body[data-style="paper"][data-theme] .task-color-btn.blue   { background: color-mix(in srgb, rgb(var(--np-blue-rgb)) 24%, var(--np-tile));   border-color: rgb(var(--np-blue-rgb)); }
body[data-style="paper"][data-theme] .task-color-btn.green  { background: color-mix(in srgb, rgb(var(--np-live-rgb)) 24%, var(--np-tile));   border-color: rgb(var(--np-live-rgb)); }
body[data-style="paper"][data-theme] .task-color-btn.active {
  box-shadow: 0 0 0 2px var(--np-sheet), 0 0 0 4px var(--np-ink);
}

/* --- 14b.3 The Primary and Google Calendar checkboxes (one custom box): a
   ruled square on the field, filled with the press colour when on (ink by
   day, the blue plate by night), never the accent blue the base used --- */
body[data-style="paper"][data-theme] .task-editor-primary-box {
  border-color: var(--np-muted);
  background: var(--np-field);
}
body[data-style="paper"][data-theme] .task-editor-primary-label:hover .task-editor-primary-box { border-color: var(--np-ink); }
body[data-style="paper"][data-theme] .task-editor-primary-label input:checked + .task-editor-primary-box {
  background: var(--np-fill);
  border-color: var(--np-fill);
  box-shadow: inset 0 0 0 1px var(--np-fill-edge);
}
body[data-style="paper"][data-theme] .task-editor-primary-label input:checked + .task-editor-primary-box::after {
  border-color: var(--np-on-fill);
}
body[data-style="paper"][data-theme] .task-editor-primary-label input:focus-visible + .task-editor-primary-box {
  outline: 2px solid var(--np-focus);
  outline-offset: 2px;
}
body[data-style="paper"][data-theme] .task-editor-gcal-hint { color: var(--np-muted); }

/* --- 14b.4 Date, time and the other fields the core list (13.1) doesn't
   name. The dark base gives these slate borders at (0,2,0)-(0,3,1), above
   the zero-specificity field fallback. --- */
body[data-style="paper"][data-theme] :is(.task-editor-field input[type="url"], .task-subtask-title-input:not(.locked),
  .task-editor-file-title, .task-editor-link-type-select, .subtask-template-name-input,
  .item-selector-search input, .item-task-picker-search input) {
  background-color: var(--np-field);
  border-color: var(--np-field-edge);
  color: var(--np-ink);
  box-shadow: inset 0 1px 1px rgb(var(--np-shadow-rgb) / 5%);
}
body[data-style="paper"][data-theme] :is(.task-editor-field input[type="url"], .task-subtask-title-input:not(.locked),
  .task-editor-file-title, .task-editor-link-type-select, .subtask-template-name-input,
  .item-selector-search input, .item-task-picker-search input):focus {
  border-color: var(--np-accent);
  box-shadow: 0 0 0 3px rgb(var(--np-accent-rgb) / 16%);
  outline: none;
}
/* the link-type select's chevron in warm ink (was slate) */
body[data-style="paper"][data-theme] .task-editor-link-type-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6257' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
body[data-style="paper"][data-theme="dark"] .task-editor-link-type-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A39A8D' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
/* an empty time or date reads as a placeholder (the core field rule would ink
   it). The date's .is-empty comes from tasks.js paintDue, like the time's. */
body[data-style="paper"][data-theme] .task-editor-field .task-editor-time-wrap input[type="time"].is-empty:not(:focus),
body[data-style="paper"][data-theme] .task-editor-field input[type="date"].is-empty:not(:focus) { color: var(--np-muted); }
body[data-style="paper"][data-theme] .task-editor-time-sep { color: var(--np-muted); }
/* an end time at or before the start: a red edge and ring (the base rule
   names glass only beside an unscoped twin; restated so it outranks 13.1) */
body[data-style="paper"][data-theme] .task-editor-field .task-editor-time-wrap input[type="time"][aria-invalid="true"],
body[data-style="paper"][data-theme] .task-editor-field .task-editor-time-wrap input[type="time"][aria-invalid="true"]:focus {
  border-color: var(--np-red);
  box-shadow: 0 0 0 3px rgb(var(--np-red-rgb) / 18%);
}

/* --- 14b.5 The editor's small icon buttons (link edit / remove, subtask
   check, notes, date, menu, important, clear time, description save /
   cancel): the slate hover washes become the paper wash --- */
body[data-style="paper"][data-theme] :is(.task-editor-link-inline-btn, .task-editor-link-icon-btn, .task-subtask-complete-btn,
  .task-subtask-desc-btn, .task-subtask-delete-btn, .task-subtask-menu-btn, .task-subtask-date-btn, .task-subtask-important-btn,
  .task-subtask-confirm-btn, .task-editor-time-clear, .task-desc-icon-btn):hover {
  background: var(--np-wash);
}
body[data-style="paper"][data-theme] :is(.task-subtask-complete-btn, .task-subtask-confirm-btn):hover,
body[data-style="paper"][data-theme] .task-subtask-complete-btn.is-completed { color: var(--np-live-t); }
body[data-style="paper"][data-theme] :is(.task-subtask-important-btn:hover, .task-subtask-important-btn.is-important) { color: var(--np-orange-t); }
/* + Add subtask / + Add link: a dashed rule like the add tiles; the template
   save icon at full opacity (it was 0.6 of muted, under 3:1) */
body[data-style="paper"][data-theme] .task-subtasks-add-btn { border-color: var(--np-rule); color: var(--np-ink-soft); }
body[data-style="paper"][data-theme] .task-subtasks-add-btn:hover { border-color: var(--np-accent); color: var(--np-accent); }
body[data-style="paper"][data-theme] .task-subtasks-template-btn { color: var(--np-muted); opacity: 1; }
body[data-style="paper"][data-theme] .task-subtasks-template-btn:hover { color: var(--np-accent); }

/* --- 14b.6 Subtask rows: slips. Done = the live ink (4.91:1 on its wash) with
   a 3px live edge; important = the orange ink (5.41:1) with an orange edge:
   the edge is a shape cue, not only a wash. The same rows are Today's due
   subtasks (14d). --- */
body[data-style="paper"][data-theme] .task-subtask-row.subtask-bubble {
  background: var(--np-slip);
  border: 1px solid var(--np-hair);
  border-radius: 6px;
  box-shadow: var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .task-subtask-row.subtask-bubble-completed {
  background: color-mix(in srgb, rgb(var(--np-live-rgb)) 8%, var(--np-slip));
  border-color: rgb(var(--np-live-rgb) / 30%);
  box-shadow: inset 3px 0 0 var(--np-live), var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .task-subtask-row.subtask-bubble-important {
  background: color-mix(in srgb, rgb(var(--np-orange-rgb)) 8%, var(--np-slip));
  border-color: rgb(var(--np-orange-rgb) / 32%);
  box-shadow: inset 3px 0 0 var(--np-orange), var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .task-subtask-row.subtask-bubble .task-subtask-title-input.locked { color: var(--np-ink); }
body[data-style="paper"][data-theme] .task-subtask-row.subtask-bubble-completed .task-subtask-title-input.locked,
body[data-style="paper"][data-theme] .task-subtask-title-input.subtask-completed {
  color: var(--np-live-t);
  font-weight: 600;
}
body[data-style="paper"][data-theme] .task-subtask-row.subtask-bubble-important .task-subtask-title-input.locked {
  color: var(--np-orange-t);
  font-weight: 600;
}

/* --- 14b.7 Links & Files rows: slips of stock. The URL in the accent; a file
   name too (tasks.js writes it inline in --accent, which is the live green on
   paper: green means running / done here, so the inline colour loses). --- */
body[data-style="paper"][data-theme] .task-editor-link-row .task-subtask-title-input.locked {
  background-color: var(--np-slip);
  border-color: var(--np-hair);
  box-shadow: var(--np-lift-slip);
  color: var(--np-accent);
}
body[data-style="paper"][data-theme] .task-editor-link-row .task-subtask-title-input.locked[style*="color"] { color: var(--np-accent) !important; }
/* URL / File choice and the file picker: secondary buttons */
body[data-style="paper"][data-theme] :is(.task-editor-type-btn, .task-editor-file-btn, .task-editor-item-btn, .task-desc-edit-btn) {
  background: var(--np-sheet);
  border-color: var(--np-rule);
  color: var(--np-ink);
  box-shadow: var(--np-lift-slip);
}
body[data-style="paper"][data-theme] :is(.task-editor-type-btn, .task-editor-file-btn, .task-editor-item-btn, .task-desc-edit-btn):hover {
  background: linear-gradient(var(--np-wash), var(--np-wash)), var(--np-sheet);
  border-color: var(--np-rule);
  color: var(--np-ink);
}
body[data-style="paper"][data-theme] .task-editor-file-name { color: var(--np-muted); }
/* the Linked Project row: a slip with an accent edge (was a blue wash) */
body[data-style="paper"][data-theme] .task-editor-project-link {
  background: var(--np-slip);
  border-color: var(--np-hair);
  box-shadow: inset 3px 0 0 var(--np-accent), var(--np-lift-slip);
}

/* --- 14b.8 Link to Item: the selector is a field (13.1), the linked items
   functional minis on slips of stock --- */
body[data-style="paper"][data-theme] .task-editor-item-text { color: var(--np-muted); }
body[data-style="paper"][data-theme] .task-editor-item-text.has-item { color: var(--np-ink); }
body[data-style="paper"][data-theme] .task-linked-mini {
  background: var(--np-slip);
  border-color: var(--np-hair);
  box-shadow: var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .task-linked-mini:hover {
  background: var(--np-slip-hover);
  filter: none;
}
body[data-style="paper"][data-theme] .task-linked-mini-title { color: var(--np-ink); }
body[data-style="paper"][data-theme] .task-linked-mini-link {
  color: var(--np-accent);
  text-decoration-color: rgb(var(--np-accent-rgb) / 45%);
  text-underline-offset: 0.18em;
}
body[data-style="paper"][data-theme] :is(.task-linked-mini-copy, .task-linked-mini-remove) { color: var(--np-muted); }
body[data-style="paper"][data-theme] .task-linked-mini-remove:hover { color: var(--np-red-t); }

/* --- 14b.9 Category chips: slips with the category's own dot (--chip-color,
   unchanged palette); the chosen one ringed in ink rather than washed in its
   colour. Named per place: the quick-capture token is .task-category-chip
   too, and takes its own colour (14f.2). The base 999px pills become 6px
   slips, the theme's shape for anything you pick. --- */
body[data-style="paper"][data-theme] :is(.task-editor-categories .task-category-chip, .qc-cat-option) {
  background: var(--np-slip);
  border-color: var(--np-hair);
  color: var(--np-ink);
}
body[data-style="paper"][data-theme] :is(.task-editor-categories .task-category-chip, .qc-cat-option):hover { background: var(--np-slip-hover); }
body[data-style="paper"] :where(.task-editor-categories .task-category-chip, .qc-cat-option, .qc-token-cat) { border-radius: 6px; }
body[data-style="paper"][data-theme] .task-editor-categories .task-category-chip.active {
  background: var(--np-tile);
  border-color: var(--np-ink);
  box-shadow: 0 0 0 1px var(--np-ink);
}
body[data-style="paper"][data-theme] .task-editor-categories-empty { color: var(--np-muted); }

/* --- 14b.10 Description split and footer. The rule between the two columns
   (the left one wide, the top one narrow) is a hairline, the footer's
   complete check is the live ink at full strength, delete answers in red. --- */
body[data-style="paper"][data-theme] .task-editor-description { border-color: var(--np-hair); }
body[data-style="paper"][data-theme] .task-editor-complete-btn { color: var(--np-live-t); opacity: 1; }
body[data-style="paper"][data-theme] .task-editor-complete-btn:hover { background: rgb(var(--np-live-rgb) / 10%); }
body[data-style="paper"][data-theme] .task-editor-delete-btn { color: var(--np-muted); opacity: 1; }
body[data-style="paper"][data-theme] .task-editor-delete-btn:hover { color: var(--np-red-t); background: rgb(var(--np-red-rgb) / 8%); }

/* --- 14b.11 Subtask templates: the press-and-hold picker's bubbles are
   slips that float (a control's lift), the name prompt a sheet (12.2) --- */
body[data-style="paper"][data-theme] .subtask-template-bubble {
  background: var(--np-tile);
  border: 1px solid var(--np-hair);
  box-shadow: var(--np-lift-control);
  color: var(--np-ink);
}
body[data-style="paper"] :where(.subtask-template-bubble) { border-radius: 6px; }
body[data-style="paper"][data-theme] .subtask-template-bubble:hover {
  background: var(--np-slip-hover);
  box-shadow: var(--np-lift-control);
  filter: none;
}
body[data-style="paper"][data-theme] .subtask-template-delete-btn {
  background: var(--np-wash);
  color: var(--np-ink-soft);
  opacity: 1;
}
body[data-style="paper"][data-theme] .subtask-template-delete-btn:hover {
  background: rgb(var(--np-red-rgb) / 14%);
  color: var(--np-red-t);
}
body[data-style="paper"][data-theme] .subtask-template-name-dialog h4 { color: var(--np-ink); }

/* --- 14b.12 The item tasks window (an item's tasks), the item selector and
   the item task picker. Their dialog, header and footer are 12; the bars
   under the headers and the list headings get hairlines. --- */
body[data-style="paper"][data-theme] :is(.item-selector-search, .item-task-picker-search) { border-bottom-color: var(--np-hair); }
body[data-style="paper"][data-theme] .item-selector-category-title {
  border-bottom-color: var(--np-hair);
  color: var(--np-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
body[data-style="paper"][data-theme] .item-selector-item:hover { background: var(--np-wash); }
body[data-style="paper"][data-theme] .item-selector-item-breadcrumb { color: var(--np-muted); }
body[data-style="paper"][data-theme] .item-task-pill:hover { box-shadow: var(--np-lift-slip-hover); }
/* + Add Task (link an existing task): a dashed rule like the add tiles (was
   an indigo wash), the trash on a task row reddens only on hover */
body[data-style="paper"][data-theme] .btn-add-task {
  background: transparent;
  border-color: var(--np-rule);
  color: var(--np-ink-soft);
}
/* the 1px dash of every other add tile (the base 2px read coarse); the
   padding takes the pixel back, so the button keeps its height */
body[data-style="paper"] :where(.btn-add-task) { border-width: 1px; padding: 13px; border-radius: 6px; }
body[data-style="paper"][data-theme] .btn-add-task:hover {
  background: rgb(var(--np-accent-rgb) / 6%);
  border-color: var(--np-accent);
  color: var(--np-accent);
}
body[data-style="paper"][data-theme] .btn-delete-task:hover { background: rgb(var(--np-red-rgb) / 10%); color: var(--np-red-t); }
body[data-style="paper"][data-theme] .item-task-pill-color { color: var(--np-ink-soft); opacity: 1; }

/* --- 14b.13 Task colour washes on the lists that show a task by its colour
   (an item's tasks, the item task picker, the @ lists, quick-capture tokens
   and help examples): the spot ink at 18% over the tile (yellow 20%) with an
   edge of the ink and the page's own ink for text. Matrix pills also carry
   .task-bubble-<color> and stay plain slips (11.3); this names its lists. --- */
body[data-style="paper"][data-theme] :is(.task-mention-item, .item-task-pill, .qc-token-task, .qc-code).task-bubble-red    { --np-spot-rgb: var(--np-red-rgb); }
body[data-style="paper"][data-theme] :is(.task-mention-item, .item-task-pill, .qc-token-task, .qc-code).task-bubble-orange { --np-spot-rgb: var(--np-orange-rgb); }
body[data-style="paper"][data-theme] :is(.task-mention-item, .item-task-pill, .qc-token-task, .qc-code).task-bubble-yellow { --np-spot-rgb: var(--np-yellow-rgb); --np-spot-mix: 20%; }
body[data-style="paper"][data-theme] :is(.task-mention-item, .item-task-pill, .qc-token-task, .qc-code).task-bubble-blue   { --np-spot-rgb: var(--np-blue-rgb); }
body[data-style="paper"][data-theme] :is(.task-mention-item, .item-task-pill, .qc-token-task, .qc-code).task-bubble-green  { --np-spot-rgb: var(--np-live-rgb); }
body[data-style="paper"][data-theme] :is(.task-mention-item, .item-task-pill, .qc-token-task, .qc-code):is(.task-bubble-red, .task-bubble-orange,
  .task-bubble-yellow, .task-bubble-blue, .task-bubble-green) {
  background: color-mix(in srgb, rgb(var(--np-spot-rgb)) var(--np-spot-mix, 18%), var(--np-tile));
  border-color: rgb(var(--np-spot-rgb) / 45%);
  color: var(--np-ink);
}
/* hover deepens the wash (the base brightness filter washed it out at night) */
body[data-style="paper"][data-theme] :is(.task-mention-item, .item-task-pill):is(.task-bubble-red, .task-bubble-orange,
  .task-bubble-yellow, .task-bubble-blue, .task-bubble-green):hover {
  background: color-mix(in srgb, rgb(var(--np-spot-rgb)) 28%, var(--np-tile));
  filter: none;
}
body[data-style="paper"][data-theme] button.qc-code[class*="task-bubble-"]:is(:hover, :focus-visible) {
  background: color-mix(in srgb, rgb(var(--np-spot-rgb)) 28%, var(--np-tile));
  color: var(--np-ink);
  filter: none;
}
/* a 1px edge (the base bubbles' 2px read as a cartoon outline round a wash) */
body[data-style="paper"] :where(.task-mention-item, .item-task-pill, .qc-token-task) { border-width: 1px; border-style: solid; }
body[data-style="paper"] :where(.task-mention-item, .item-task-pill) { border-radius: 6px; }
/* a Primary task in a list: the 3px edge of its ink, as on the matrix slip
   (its P badge in a ruled ink circle) */
body[data-style="paper"][data-theme] .task-mention-item:has(> .task-mention-primary-badge) {
  box-shadow: inset 3px 0 0 rgb(var(--np-spot-rgb, 112 104 92));
}
/* the keyboard pick (↑ ↓ ← →) carries weight: the hover wash and a 2px ring
   of ink, the chosen state of the category list and chips. The accent ring
   of 12.6 sat on a 45% edge of the same hue and vanished in the blue column. */
body[data-style="paper"][data-theme] .task-mention-item.selected {
  background: color-mix(in srgb, rgb(var(--np-spot-rgb, var(--np-ink-rgb))) 28%, var(--np-tile));
  border-color: var(--np-ink);
  box-shadow: inset 0 0 0 1px var(--np-ink);
}
body[data-style="paper"][data-theme] .task-mention-item.selected:has(> .task-mention-primary-badge) {
  box-shadow: inset 3px 0 0 rgb(var(--np-spot-rgb, 112 104 92)), inset 0 0 0 1px var(--np-ink);
}
body[data-style="paper"][data-theme] .task-mention-primary-badge {
  background: rgb(var(--np-ink-rgb) / 10%);
  color: var(--np-ink);
}
body[data-style="paper"][data-theme] :is(.task-mention-empty, .item-task-picker-empty, .item-tasks-empty, .item-selector-empty) { color: var(--np-muted); }


/* === 14c. Calendar (DESIGN.md 5.18) ======================================== */
/* A month on a sheet: today ringed in the accent, the picked day ringed in
   ink, the dots and Nd stamps in the spot inks. The item dots come from JS
   (calendar.js) as rgb(var(--np-<ink>-rgb, <glass value>)), so tasks show in
   their own ink, meetings plum and reminders teal, and glass is unchanged. */
body[data-style="paper"][data-theme] .calendar-view-month-label {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.006em;
  color: var(--np-ink);
}
body[data-style="paper"][data-theme] :is(.calendar-view-month-label, .calendar-view-nav-btn):hover { background: var(--np-wash); color: var(--np-ink); }
/* the kickers of the calendar, Time Tracking's popovers, the busy strip and
   the command list: one role, one size (12px / 600, the theme's floor) */
body[data-style="paper"][data-theme] :is(.calendar-view-weekdays, .calendar-view-list-heading,
  .tt-range-label, .busy-strip-title, .qc-help-section h5) {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
}
/* the TASK / REMINDER tag is a label inside a row, not a kicker: compact, so
   the title beside it keeps its width (as a 12px / .1em kicker it cut 6 of 10
   titles in the Due list; this cuts the same 4 as Classic's 10px tag) */
body[data-style="paper"][data-theme] .calendar-view-item-type {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
body[data-style="paper"][data-theme] .calendar-view-weekdays { color: var(--np-muted); }
/* the rules between the month and the lists (wide: left, narrow: top) */
body[data-style="paper"][data-theme] :is(.calendar-view-due, .calendar-view-day-items) { border-color: var(--np-hair); }

/* --- 14c.1 Day cells --- */
body[data-style="paper"][data-theme] .calendar-view-day:hover { background: var(--np-wash); }
body[data-style="paper"][data-theme] .calendar-view-day-num {
  color: var(--np-ink);
  font-variant-numeric: tabular-nums;
}
/* out of the month: muted figures, dot and count (the base 35% opacity, and
   any opacity on the indicator, faded the "+N" below AA) */
body[data-style="paper"][data-theme] .calendar-view-day.other-month { opacity: 1; }
body[data-style="paper"][data-theme] .calendar-view-day.other-month .calendar-view-day-num { color: var(--np-muted); font-weight: 400; }
/* today: a ring of the accent round the figure, not a filled blue disc */
body[data-style="paper"][data-theme] .calendar-view-day.today .calendar-view-day-num {
  background: transparent;
  color: var(--np-accent);
  font-weight: 700;
  box-shadow: inset 0 0 0 1.5px var(--np-accent);
}
/* the picked day: a tile ringed in ink */
body[data-style="paper"][data-theme] .calendar-view-day.selected {
  background: var(--np-tile);
  box-shadow: inset 0 0 0 1.5px var(--np-ink);
}
/* something on that day: a printer's spot of the soft ink and its count. Red
   means due on paper, so only today's spot is red (a future meeting is not
   overdue); the Overdue list beside the month carries the late ones. .is-past
   is a hook for a day-state class from calendar.js (not written yet). */
body[data-style="paper"][data-theme] .calendar-view-dot { background: var(--np-ink-soft); }
/* the "+N" at a readable 11px (the base 9px was below the theme's figures) */
body[data-style="paper"][data-theme] .calendar-view-dot-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--np-ink-soft);
  font-variant-numeric: tabular-nums;
}
body[data-style="paper"][data-theme] .calendar-view-day:is(.today, .is-past) .calendar-view-dot { background: var(--np-red); }
body[data-style="paper"][data-theme] .calendar-view-day:is(.today, .is-past) .calendar-view-dot-count { color: var(--np-red-t); }
body[data-style="paper"][data-theme] .calendar-view-day.other-month .calendar-view-dot { background: var(--np-muted); }
body[data-style="paper"][data-theme] .calendar-view-day.other-month .calendar-view-dot-count { color: var(--np-muted); }

/* --- 14c.2 The lists: Due today in the accent, Overdue in red; their counts
   are stamps (a neutral ring; red with a wash when overdue) --- */
body[data-style="paper"][data-theme] .calendar-view-list-heading { color: var(--np-accent); }
body[data-style="paper"][data-theme] .calendar-view-day-items > .calendar-view-list-heading { color: var(--np-muted); }
body[data-style="paper"][data-theme] .calendar-view-due-section.is-overdue .calendar-view-list-heading { color: var(--np-red-t); }
body[data-style="paper"][data-theme] .calendar-view-list-count {
  font-size: 11px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--np-rule);
  color: var(--np-ink-soft);
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
}
body[data-style="paper"][data-theme] .calendar-view-due-section.is-overdue .calendar-view-list-count {
  color: var(--np-red-t);
  background: rgb(var(--np-red-rgb) / 8%);
  box-shadow: inset 0 0 0 1px currentColor;
}
body[data-style="paper"][data-theme] .calendar-view-item.is-clickable:hover { background: var(--np-wash); }
body[data-style="paper"][data-theme] .calendar-view-item-label { color: var(--np-ink); }
body[data-style="paper"][data-theme] :is(.calendar-view-item-type, .calendar-view-item-detail, .calendar-view-no-items, .calendar-view-day-hint) { color: var(--np-muted); }
/* the Nd overdue chip: the red stamp of the Today view */
body[data-style="paper"][data-theme] .calendar-view-item-chip {
  color: var(--np-red-t);
  background: rgb(var(--np-red-rgb) / 8%);
  box-shadow: inset 0 0 0 1px currentColor;
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
}


/* === 14d. Today, desktop (DESIGN.md 5.19) ================================== */
/* Today reads like the front page's index: the due tasks in their column
   tints (11.1 / 11.3), dates as outlined stamps, due subtasks hanging off
   their task on a rail of its ink, meetings and reminders as slips. The
   reminders and Quick Access are the real card items (parts 9 / 10). */
body[data-style="paper"][data-theme] .today-icon-btn:hover { background: var(--np-wash); color: var(--np-ink); }
/* the due count: a neutral stamp (was a pale-blue pill) */
body[data-style="paper"][data-theme] .today-count {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--np-rule);
  color: var(--np-ink-soft);
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
}
body[data-style="paper"][data-theme] .today-subheading { color: var(--np-muted); letter-spacing: 0.12em; }
body[data-style="paper"][data-theme] .today-empty { border-color: var(--np-rule); color: var(--np-muted); }

/* --- 14d.1 Colour groups: the column recipe (11.1, with its 3px rule) and a
   kicker in ink-soft (the base was 11px ink at 70% opacity) --- */
body[data-style="paper"][data-theme] .today-color-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--np-ink-soft);
  opacity: 1;
}

/* --- 14d.2 Stamps: an outlined chip in the state's ink (inset ring, so the
   20px height holds), 8% of the ink behind it. Shape and words carry the
   state as well as colour. Also the phone rows' chips and the panes'
   "N overdue" (the same class). --- */
body[data-style="paper"][data-theme] .today-chip {
  background: transparent;
  box-shadow: inset 0 0 0 1px currentColor;
  border-radius: 3px;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
body[data-style="paper"][data-theme] .today-chip.is-today   { color: var(--np-blue-t); background: rgb(var(--np-blue-rgb) / 8%); }
body[data-style="paper"][data-theme] .today-chip.is-overdue { color: var(--np-red-t);  background: rgb(var(--np-red-rgb) / 8%); }
body[data-style="paper"][data-theme] .today-chip.is-context { color: var(--np-ink-soft); background: transparent; }
body[data-style="paper"][data-theme] .today-chip.is-meeting { color: rgb(var(--np-plum-rgb)); background: rgb(var(--np-plum-rgb) / 8%); }

/* --- 14d.3 A task listed only for its subtask steps back in paint, not
   opacity (the base 0.8 took its "Subtask due" stamp under 4.5:1): no stock
   and no lift, the column's tint through it, the base dashed outline
   (!important) in the paper's rule, its words in the soft ink. A Primary one
   keeps its ink edge. --- */
body[data-style="paper"][data-theme] .eisenhower-task.today-task-context {
  opacity: 1;
  background: transparent;
  border-color: var(--np-rule);
  box-shadow: none;
  color: var(--np-ink-soft);
}
body[data-style="paper"][data-theme] .eisenhower-task.eisenhower-task-pinned.today-task-context {
  box-shadow: inset 3px 0 0 rgb(var(--priority-rgb, 112 104 92));
}
/* the subtask rail in the task's ink */
body[data-style="paper"][data-theme] .today-subtasks { border-left-color: rgb(var(--priority-rgb, 112 104 92) / 60%); }
body[data-style="paper"][data-theme] .today-subtask-title { color: var(--np-ink); }
body[data-style="paper"][data-theme] .today-subtask .task-subtask-complete-btn { color: var(--np-muted); }
body[data-style="paper"][data-theme] .today-subtask .task-subtask-complete-btn:hover { color: var(--np-live-t); }

/* --- 14d.4 Meetings today: slips (was a violet wash); the plum stays on the
   icon and the Recurring stamp --- */
body[data-style="paper"][data-theme] .today-meeting {
  background: var(--np-tile);
  border-color: var(--np-hair);
  box-shadow: var(--np-lift-slip);
  color: var(--np-ink);
}
body[data-style="paper"] :where(.today-meeting) { border-radius: 6px; }
body[data-style="paper"][data-theme] .today-meeting:hover {
  background: var(--np-tile);
  box-shadow: var(--np-lift-slip-hover);
}
body[data-style="paper"][data-theme] .today-meeting-icon { color: rgb(var(--np-plum-rgb)); }

/* --- 14d.5 Due reminders, one to a row like the tasks and meetings above:
   the paper's stamp ("Overdue by 25 days" in a ruled box) is wider than the
   glass pill, and two to a row left the reminder's own name a stub ("ProS…").
   The base sets the columns with !important (styles.css .today-reminders). --- */
body[data-style="paper"][data-theme] .today-modal .today-reminders {
  grid-template-columns: minmax(0, 1fr) !important;
}
body[data-style="paper"][data-theme] :is(.today-meeting-chevron, .today-quick-link .today-quick-link-icon) { color: var(--np-muted); }


/* === 14e. Time tracking (DESIGN.md 5.20) =================================== */
/* The panel is a sheet (8); its tasks are slips, the running one with the
   live hairline of the matrix slip; the period and sort buttons secondary
   buttons that turn accent while they filter. The donut keeps the validated
   category palette (its gaps are see-through, so they are the sheet). */

/* --- 14e.1 Rows --- */
body[data-style="paper"][data-theme] .tt-task {
  background: var(--np-slip);
  border-color: var(--np-hair);
  box-shadow: var(--np-lift-slip);
}
body[data-style="paper"] :where(.tt-task) { border-radius: 6px; }
body[data-style="paper"][data-theme] .tt-task.is-running { border-color: rgb(var(--np-live-rgb) / 55%); }
/* its total ticks in the live ink, as on the matrix and phone slips (5.4:1
   by day, 7.4:1 at night) */
body[data-style="paper"][data-theme] .tt-task.is-running .tt-task-time { color: var(--np-live-t); }
body[data-style="paper"][data-theme] .tt-task-main { color: var(--np-ink); }
body[data-style="paper"][data-theme] :is(.tt-subtask-name, .tt-history-total) { color: var(--np-ink); }
body[data-style="paper"][data-theme] :is(.tt-subtasks-toggle, .tt-subtask-share, .tt-session-subtask, .tt-history-heading, .task-subtask-date-hint) { color: var(--np-muted); }
body[data-style="paper"][data-theme] .tt-subtasks { border-color: var(--np-hair); }
body[data-style="paper"][data-theme] .task-subtask-grip { color: var(--np-muted); }
body[data-style="paper"][data-theme] .task-subtask-grip:hover { color: var(--np-ink); background: var(--np-wash); }
body[data-style="paper"][data-theme] :is(.tt-subtasks-toggle, .tt-task-main):hover { background: var(--np-wash); }
body[data-style="paper"][data-theme] :is(.tt-task-main > svg, .tt-cat-chip, .tt-task.is-past .tt-task-title) { color: var(--np-muted); }
/* "Deleted" / "Done": a neutral stamp */
body[data-style="paper"][data-theme] .tt-task-tag {
  border-color: transparent;
  box-shadow: inset 0 0 0 1px var(--np-rule);
  border-radius: 3px;
  color: var(--np-ink-soft);
}
body[data-style="paper"][data-theme] :is(.tt-task-time, .tt-session-duration, .tt-past-toggle-total, .tt-legend-value, .tt-legend-pct) {
  font-variant-numeric: tabular-nums;
}
/* the row's complete + stopwatch: the slip controls of 11.4 (the running
   toggle is 11.5) */
body[data-style="paper"][data-theme] .tt-task :is(.tt-task-complete.task-complete-btn, .tt-task-toggle.task-timer-btn) {
  color: var(--np-muted);
  opacity: 1;
}
body[data-style="paper"][data-theme] .tt-task .tt-task-toggle.task-timer-btn:hover { color: var(--np-ink); }
body[data-style="paper"][data-theme] .tt-task .tt-task-complete.task-complete-btn:is(:hover, :focus-visible) { color: var(--np-live-t); }
body[data-style="paper"][data-theme] .tt-task :is(.task-timer.is-running .task-timer-btn, .task-timer-btn.is-running) {
  background: var(--np-live-fill);
  color: var(--np-on-live);
}

/* --- 14e.2 Sessions: hairline separators, tabular times --- */
body[data-style="paper"][data-theme] :is(.tt-session-list, .tt-session) { border-color: var(--np-hair); }
body[data-style="paper"][data-theme] :is(.tt-session, .tt-sessions-outside, .tt-past-toggle) { color: var(--np-muted); }
body[data-style="paper"][data-theme] .tt-session-duration { color: var(--np-ink); }
body[data-style="paper"][data-theme] .tt-session-delete:hover { color: var(--np-red-t); background: rgb(var(--np-red-rgb) / 10%); }
body[data-style="paper"][data-theme] .tt-clear-btn { color: var(--np-red-t); }
body[data-style="paper"][data-theme] .tt-past-toggle:hover { color: var(--np-ink); background: var(--np-wash); }
/* Month headings use seasonal palettes; task rows keep their own green. */
body[data-style="paper"][data-theme] .tt-past-month {
  --np-done-fill: #d7d7c9;
  --np-done-stroke: 91 91 73;
  --np-done-ink: #30312a;
  --np-done-muted: #4a4c43;
  --np-done-heading: #57594d;
}
body[data-style="paper"][data-theme] .tt-past-month[data-season="autumn"] {
  --np-done-fill: #efb376;
  --np-done-stroke: 145 64 22;
  --np-done-ink: #482817;
  --np-done-muted: #68432e;
  --np-done-heading: #9a421c;
}
body[data-style="paper"][data-theme] .tt-past-month[data-season="winter"] {
  --np-done-fill: #a7cde7;
  --np-done-stroke: 42 96 137;
  --np-done-ink: #21384a;
  --np-done-muted: #3d5265;
  --np-done-heading: #245e83;
}
body[data-style="paper"][data-theme] .tt-past-month[data-season="spring"] {
  --np-done-fill: #b6d98b;
  --np-done-stroke: 66 113 37;
  --np-done-ink: #24331d;
  --np-done-muted: #405335;
  --np-done-heading: #416b26;
}
body[data-style="paper"][data-theme] .tt-past-month[data-season="summer"] {
  --np-done-fill: #f2d27a;
  --np-done-stroke: 161 108 22;
  --np-done-ink: #463414;
  --np-done-muted: #65502b;
  --np-done-heading: #815713;
}
body[data-style="paper"][data-theme="dark"] .tt-past-month {
  --np-done-fill: #46473e;
  --np-done-stroke: 172 176 148;
  --np-done-ink: #eef0e5;
  --np-done-muted: #d9ddcc;
  --np-done-heading: #c9cdbb;
}
body[data-style="paper"][data-theme="dark"] .tt-past-month[data-season="autumn"] {
  --np-done-fill: #75482f;
  --np-done-stroke: 244 166 87;
  --np-done-ink: #fff1e2;
  --np-done-muted: #f1d6be;
  --np-done-heading: #f5b57c;
}
body[data-style="paper"][data-theme="dark"] .tt-past-month[data-season="winter"] {
  --np-done-fill: #304f69;
  --np-done-stroke: 115 180 220;
  --np-done-ink: #eef6fc;
  --np-done-muted: #cadfeb;
  --np-done-heading: #9acbeb;
}
body[data-style="paper"][data-theme="dark"] .tt-past-month[data-season="spring"] {
  --np-done-fill: #345b3c;
  --np-done-stroke: 143 198 96;
  --np-done-ink: #f0f5e7;
  --np-done-muted: #d5e4c7;
  --np-done-heading: #b6d98b;
}
body[data-style="paper"][data-theme="dark"] .tt-past-month[data-season="summer"] {
  --np-done-fill: #665126;
  --np-done-stroke: 243 199 77;
  --np-done-ink: #fff4d8;
  --np-done-muted: #f2dfb2;
  --np-done-heading: #efd47d;
}
body[data-style="paper"][data-theme] .tt-month-toggle { color: var(--np-done-heading); }
body[data-style="paper"][data-theme] .tt-month-label {
  position: relative;
  isolation: isolate;
  padding: 2px 7px 3px;
  color: var(--np-done-ink);
}
body[data-style="paper"][data-theme] .tt-month-label::before {
  content: '';
  position: absolute;
  inset: 0 -1px;
  z-index: -1;
  pointer-events: none;
  background: var(--np-grain) 0 0 / 240px 240px,
    linear-gradient(178deg, transparent 42%, rgb(var(--np-done-stroke) / 14%) 46% 60%, transparent 64%),
    var(--np-done-fill);
  clip-path: polygon(2px 1px, 24% 1px, 62% 1.5px, 99% 1px,
    100% calc(100% - 1px), 74% calc(100% - 1px), 38% calc(100% - 1.5px), 0 calc(100% - 1px));
}
body[data-style="paper"][data-theme] .tt-month-count { color: var(--np-muted); }
body[data-style="paper"][data-theme] .tt-past-month + .tt-past-month { border-color: var(--np-hair); }

/* Completed rows always use green marker, regardless of the month. Only the ink
   layer has rough edges; text, focus rings and hit areas stay square. */
body[data-style="paper"][data-theme] .tt-past-group .tt-task {
  --np-done-fill: #b6d98b;
  --np-done-stroke: 66 113 37;
  --np-done-ink: #24331d;
  --np-done-muted: #405335;
  --np-ink: var(--np-done-ink);
  --np-ink-soft: var(--np-done-muted);
  --np-muted: var(--np-done-muted);
  --np-hair: rgb(var(--np-done-stroke) / 23%);
  --np-wash: rgb(var(--np-done-stroke) / 9%);
  position: relative;
  isolation: isolate;
  background: transparent;
  border-color: transparent;
  border-radius: 0;
  box-shadow: none;
}
body[data-style="paper"][data-theme="dark"] .tt-past-group .tt-task {
  --np-done-fill: #345b3c;
  --np-done-stroke: 143 198 96;
  --np-done-ink: #f0f5e7;
  --np-done-muted: #d5e4c7;
}
body[data-style="paper"][data-theme] .tt-past-group .tt-task::before {
  content: '';
  position: absolute;
  inset: 0 -1px;
  z-index: -1;
  pointer-events: none;
  background:
    var(--np-grain) 0 0 / 240px 240px,
    repeating-linear-gradient(178deg, transparent 0 7px, rgb(var(--np-done-stroke) / 10%) 8px 11px, transparent 12px 23px),
    linear-gradient(2deg, rgb(var(--np-done-stroke) / 14%), transparent 34% 68%, rgb(var(--np-done-stroke) / 11%)),
    var(--np-done-fill);
  clip-path: polygon(4px 1px, 17% 1px, 31% 1.6px, 47% 1px, 63% 1.6px, 80% 1px,
    calc(100% - 4px) 1px, 100% 6px, calc(100% - 2px) 48%, 100% calc(100% - 4px),
    82% calc(100% - 1px), 67% calc(100% - 1.6px), 49% calc(100% - 1px), 32% calc(100% - 1.6px),
    15% calc(100% - 1px), 3px calc(100% - 1px), 0 calc(100% - 6px), 2px 54%, 0 8px);
}
body[data-style="paper"][data-theme] .tt-past-group .tt-task:nth-child(even)::before {
  background-position: 80px 40px, 0 7px, 0 0, 0 0;
  transform: scaleX(-1);
}
body[data-style="paper"][data-theme] .tt-past-group .tt-task :is(.tt-task-title, .tt-task-time) {
  color: var(--np-ink);
}

/* --- 14e.3 Donut and legend: the slices are the category colours as they
   are; the centre and the legend in ink, the swatch shows the category --- */
body[data-style="paper"][data-theme] .tt-donut-center strong { color: var(--np-ink); font-variant-numeric: tabular-nums; }
body[data-style="paper"][data-theme] .tt-donut-center-label { color: var(--np-muted); }
body[data-style="paper"][data-theme] .tt-legend-row { color: var(--np-ink); }
body[data-style="paper"][data-theme] .tt-legend-row.is-hover { background: var(--np-wash); }
body[data-style="paper"][data-theme] .tt-legend-pct { color: var(--np-muted); }
body[data-style="paper"][data-theme] .tt-tip-value { color: var(--np-ink); font-variant-numeric: tabular-nums; }
body[data-style="paper"][data-theme] .tt-tip-label { color: var(--np-muted); }

/* --- 14e.4 Period and sort buttons: secondary buttons; filtered = the accent
   with an inset accent ring --- */
body[data-style="paper"][data-theme] .tt-range-btn {
  background: var(--np-sheet);
  border-color: var(--np-rule);
  color: var(--np-ink-soft);
  box-shadow: var(--np-lift-slip);
}
body[data-style="paper"] :where(.tt-range-btn) { border-radius: 6px; }
body[data-style="paper"][data-theme] .tt-range-btn:hover {
  background: linear-gradient(var(--np-wash), var(--np-wash)), var(--np-sheet);
  color: var(--np-ink);
}
body[data-style="paper"][data-theme] .tt-range-btn.is-active,
body[data-style="paper"][data-theme] .tt-range-btn.is-active:hover {
  color: var(--np-accent);
  border-color: rgb(var(--np-accent-rgb) / 55%);
  box-shadow: inset 0 0 0 1px rgb(var(--np-accent-rgb) / 55%);
}

/* --- 14e.5 The period / sort popovers (the shell is 12.6): presets are tiles,
   the active one ringed in ink; Apply is the press colour --- */
body[data-style="paper"][data-theme] .tt-range-label { color: var(--np-muted); }
body[data-style="paper"][data-theme] .tt-range-option {
  background: var(--np-tile);
  border-color: var(--np-hair);
  color: var(--np-ink);
  box-shadow: var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .tt-range-option:hover { border-color: var(--np-rule); }
body[data-style="paper"][data-theme] .tt-range-option[aria-pressed="true"] {
  color: var(--np-ink);
  border-color: var(--np-ink);
  box-shadow: 0 0 0 1px var(--np-ink);
}
body[data-style="paper"] :where(.tt-range-option, .tt-range-date, .tt-range-clear, .tt-range-apply) { border-radius: 6px; }
body[data-style="paper"][data-theme] :is(.tt-range-option-span, .tt-range-field-label) { color: var(--np-muted); }
body[data-style="paper"][data-theme] .tt-range-clear { color: var(--np-ink-soft); }
body[data-style="paper"][data-theme] .tt-range-clear:hover:not(:disabled) { background: var(--np-wash); color: var(--np-ink); }
body[data-style="paper"][data-theme] .tt-range-apply {
  background: var(--np-fill);
  color: var(--np-on-fill);
  box-shadow: inset 0 0 0 1px var(--np-fill-edge);
}
body[data-style="paper"][data-theme] .tt-range-apply:hover:not(:disabled) {
  filter: none;
  box-shadow: inset 0 0 0 1px var(--np-fill-edge), var(--np-lift-control);
}

/* --- 14e.6 The header stopwatch while a timer runs: the glyph in live ink and
   a still green dot knocked out of the canvas (the base breathing is off, 4.3) --- */
body[data-style="paper"][data-theme] .time-tracking-toggle.is-running { color: var(--np-live-t); }
body[data-style="paper"][data-theme] .time-tracking-toggle.is-running::after {
  background: var(--np-live);
  box-shadow: 0 0 0 2px var(--np-canvas);
  opacity: 1;
  animation: none;
}


/* === 14f. Quick capture (DESIGN.md 5.21) =================================== */
/* One line on a sheet: a paper field (13), the preview as slips, the @ list
   in the spot washes of 14b.13 (columns headed by diamonds), the category list
   with the categories' own dots. Errors in red ink; the shake stays (it runs
   only on a refused Enter). */

/* --- 14f.1 The bar --- */
body[data-style="paper"] :where(.qc-field) { border-radius: 6px; }
body[data-style="paper"][data-theme] .qc-field-icon { color: var(--np-accent); }
body[data-style="paper"][data-theme] .qc-info-btn { color: var(--np-ink-soft); }
body[data-style="paper"][data-theme] :is(.qc-info-btn:hover, .qc-info-btn:focus-visible) { color: var(--np-ink); background: var(--np-wash); }
body[data-style="paper"][data-theme] :is(.qc-hint, .qc-footer, .qc-pv-hint, .qc-pv-default, .qc-pv-label) { color: var(--np-muted); }
body[data-style="paper"][data-theme] .qc-hint-link {
  color: var(--np-accent);
  text-decoration-color: rgb(var(--np-accent-rgb) / 45%);
  text-underline-offset: 0.18em;
}
/* key caps: a slip of stock pressed into the sheet */
body[data-style="paper"][data-theme] .qc-overlay kbd {
  background: var(--np-slip);
  border-color: var(--np-rule);
  box-shadow: 0 1px 0 var(--np-press);
  color: var(--np-ink);
  font-variant-numeric: tabular-nums;
}

/* --- 14f.2 Tokens in the line: a picked task in its wash (14b.13), a category
   in its own colour (the base chip-colour tint over the paper field) --- */
body[data-style="paper"] :where(.qc-token-task) { border-radius: 6px; }
/* the category token (it is .task-category-chip.active too): a breath of its
   own colour over the field with an edge of it, and no 1.5px colour ring
   (beside the field's own focus ring it read as a second focus) */
body[data-style="paper"][data-theme] .qc-token.qc-token-cat {
  background: color-mix(in srgb, var(--chip-color) 14%, var(--np-field));
  border-color: color-mix(in srgb, var(--chip-color) 45%, transparent);
  box-shadow: none;
  color: var(--np-ink);
}
body[data-style="paper"][data-theme] .qc-token-remove { background: rgb(var(--np-ink-rgb) / 12%); color: inherit; }
body[data-style="paper"][data-theme] .qc-token-remove:hover { background: rgb(var(--np-ink-rgb) / 22%); }

/* --- 14f.3 The preview: what Enter will do, as slips with a hairline. The
   colour chip's dot is a diamond of the ink (from JS, quick-capture.js
   MATRIX_DOT); the category chip (it has a label) keeps a round dot. --- */
body[data-style="paper"][data-theme] .qc-pv {
  background: var(--np-slip);
  border-color: var(--np-hair);
  color: var(--np-ink);
}
body[data-style="paper"] :where(.qc-pv) { border-radius: 6px; }
body[data-style="paper"][data-theme] button.qc-pv:hover { border-color: var(--np-accent); }
body[data-style="paper"][data-theme] .qc-pv-dot {
  width: 8px;
  height: 8px;
  margin-inline: 1px;
  border-radius: 1px;
  transform: rotate(45deg);
}
body[data-style="paper"][data-theme] .qc-pv:has(> .qc-pv-label) > .qc-pv-dot {
  width: 10px;
  height: 10px;
  margin-inline: 0;
  border-radius: 50%;
  transform: none;
}
body[data-style="paper"][data-theme] .qc-pv-error {
  color: var(--np-red-t);
  background: rgb(var(--np-red-rgb) / 8%);
  border-color: rgb(var(--np-red-rgb) / 40%);
}
body[data-style="paper"][data-theme] .qc-pv-warning {
  color: var(--np-orange-t);
  background: rgb(var(--np-orange-rgb) / 9%);
  border-color: rgb(var(--np-orange-rgb) / 40%);
}

/* --- 14f.4 The lists under the field (and the editors' @ list and the item
   task picker, which share .task-mention-col). Each colour column is headed
   by a diamond of its ink, the dingbat of the matrix heads (the column's
   colour name is its aria-label); the picked row is ringed in ink (14b.13).
   The category list rings the pick in ink (the base washed it in the
   category's colour, light blue for the first one). --- */
body[data-style="paper"][data-theme] .task-mention-col:has(> .task-bubble-red)    { --np-col-ink: var(--np-red-rgb); }
body[data-style="paper"][data-theme] .task-mention-col:has(> .task-bubble-orange) { --np-col-ink: var(--np-orange-rgb); }
body[data-style="paper"][data-theme] .task-mention-col:has(> .task-bubble-yellow) { --np-col-ink: var(--np-yellow-rgb); }
body[data-style="paper"][data-theme] .task-mention-col:has(> .task-bubble-blue)   { --np-col-ink: var(--np-blue-rgb); }
body[data-style="paper"][data-theme] .task-mention-col::before {
  content: '';
  flex: none;
  align-self: flex-start;
  width: 7px;
  height: 7px;
  margin: 4px 0 1px 10px;
  transform: rotate(45deg);
  background: rgb(var(--np-col-ink, var(--np-ink-rgb)));
}
/* a long column keeps its rows full height and the list scrolls (the base
   let the flex column squeeze every row of the longest colour, glass too) */
body[data-style="paper"][data-theme] .task-mention-col > .task-mention-item { flex-shrink: 0; }
/* the item task picker shares its width out evenly, as quick capture does
   (.qc-picker, styles.css): sized by content, a short column was crushed to
   stubs ("Pa…") beside a long one */
body[data-style="paper"][data-theme] .item-task-picker-list > .task-mention-col {
  flex: 1 1 0;
  min-width: 0;
}
/* four columns in a 520px window leave a slip ~90px: a title may take two
   lines there, so it is a name, not a stub (only in this picker; the @ lists
   under a field stay one line). Words break only between words (a long one
   ends in an ellipsis on its line: "NetSapi…", never "NetSapie / ns"), and
   the rows are set close (1.2 leading, 4px) at one height for every slip, so
   a long colour still fits the window and the columns line up in a search */
body[data-style="paper"][data-theme] .item-task-picker-list .task-mention-item {
  white-space: normal;
  padding-block: 4px;
  min-height: calc(2.4em + 10px);
}
body[data-style="paper"][data-theme] .item-task-picker-list .task-mention-item-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.2;
  overflow-wrap: normal;
  word-break: normal;
}
body[data-style="paper"][data-theme] .qc-cat-option.selected {
  background: var(--np-tile);
  border-color: var(--np-ink);
  box-shadow: inset 0 0 0 1px var(--np-ink);
}

/* --- 14f.5 The command list window (12.2): examples are slips (the task
   colour examples are washes, 14b.13); headings kickers --- */
body[data-style="paper"][data-theme] :where(.qc-code) {
  background: var(--np-slip);
  border-color: var(--np-rule);
  color: var(--np-ink);
}
body[data-style="paper"][data-theme] button.qc-code:is(:hover, :focus-visible) { border-color: var(--np-accent); color: var(--np-accent); }
body[data-style="paper"][data-theme] .qc-help-section h5 { color: var(--np-muted); }
body[data-style="paper"][data-theme] .qc-help-row { border-color: var(--np-hair); }
body[data-style="paper"][data-theme] :is(.qc-help-examples, .qc-help-foot) { color: var(--np-muted); }
body[data-style="paper"][data-theme] :is(.qc-help-close:hover, .qc-help-close:focus-visible) { color: var(--np-ink); background: var(--np-wash); }


/* === 14k. Busy strip (DESIGN.md 5.26) ====================================== */
/* One day of Google free/busy as a ruled strip: a recessed track, hour rules,
   the busy blocks in the blue spot ink with their times knocked out of them,
   the now line in red. The phone (.mx-today-busy, mobile-today.css:40-65)
   restates its own radii and sizes, so geometry here is at :where() strength;
   the phone's tile backing is part 4.6. Block paint reads --np-busy-a /
   --np-on-busy (part 1), the same values as the night rule in 17. */
body[data-style="paper"][data-theme] .busy-strip {
  background: var(--np-slip);
  border-color: var(--np-hair);
  color: var(--np-ink);
}
body[data-style="paper"] :where(.busy-strip) { border-radius: 8px; }
body[data-style="paper"][data-theme] .busy-strip-title { color: var(--np-ink-soft); }
body[data-style="paper"][data-theme] :is(.busy-strip-summary, .busy-strip-note) { color: var(--np-muted); }
body[data-style="paper"][data-theme] .busy-strip-list { color: var(--np-ink); }

/* --- 14k.1 The bar --- */
body[data-style="paper"][data-theme] .busy-strip-track { background: var(--np-wash); }
body[data-style="paper"][data-theme] .busy-strip-tick { background: var(--np-rule); }
body[data-style="paper"][data-theme] .busy-strip-tick:first-child { background: transparent; }
body[data-style="paper"][data-theme] .busy-strip-tick.is-half { background: var(--np-hair); }
body[data-style="paper"][data-theme] .busy-strip-hour { color: var(--np-muted); }
/* The night block is the blue at 75% over the track (4.92:1 for its label);
   laid over an opaque copy of the track (wash over slip) so the hour rules
   don't show through it. One step over the night rule in 17 (which it
   replaces); by day --np-busy-a is 100% and this is the plain blue. */
body[data-style="paper"][data-theme] .busy-strip-track .busy-strip-block {
  background:
    linear-gradient(rgb(var(--busy-rgb) / var(--np-busy-a)), rgb(var(--busy-rgb) / var(--np-busy-a))),
    linear-gradient(var(--np-wash), var(--np-wash)),
    var(--np-slip);
  box-shadow: none;
}
body[data-style="paper"][data-theme] .busy-strip-block-label {
  color: var(--np-on-busy);
  text-shadow: none;
}
body[data-style="paper"][data-theme] .busy-strip-now { background: var(--np-red); }
body[data-style="paper"][data-theme] .busy-strip-allday {
  background: rgb(var(--busy-rgb) / 14%);
  color: var(--np-ink);
}
/* "Busy all day" is a stamp: 3px corners, not the base pill */
body[data-style="paper"] :where(.busy-strip-allday) { border-radius: 3px; }
body[data-style="paper"][data-theme] .busy-strip-scroll:focus-visible { box-shadow: inset 0 0 0 2px var(--np-focus); }

/* --- 14k.2 Words and buttons: the next free stretch in live ink, links and
   Now in the accent; Connect / Reconnect an accent outline; the ‹ › and Hide
   / Not now quiet rules that ink on hover --- */
body[data-style="paper"][data-theme] .busy-strip-next { color: var(--np-live-t); }
body[data-style="paper"][data-theme] :is(.busy-strip-link, .busy-strip-now-btn) { color: var(--np-accent); }
body[data-style="paper"][data-theme] .busy-strip-link { text-decoration-color: rgb(var(--np-accent-rgb) / 45%); text-underline-offset: 0.18em; }
body[data-style="paper"][data-theme] .busy-strip-action {
  border-color: var(--np-accent);
  color: var(--np-accent);
  background: transparent;
}
body[data-style="paper"][data-theme] .busy-strip-action:hover { background: rgb(var(--np-accent-rgb) / 8%); }
body[data-style="paper"][data-theme] :is(.busy-strip-navbtn, .busy-strip-dismiss) {
  border-color: var(--np-rule);
  color: var(--np-muted);
  background: transparent;
}
body[data-style="paper"][data-theme] .busy-strip-dismiss { border-color: transparent; }
body[data-style="paper"][data-theme] .busy-strip-navbtn:hover:not(:disabled),
body[data-style="paper"][data-theme] .busy-strip-dismiss:hover {
  color: var(--np-ink);
  border-color: var(--np-ink-soft);
}
body[data-style="paper"][data-theme] .busy-strip-hint { color: var(--np-ink); }


/* === 14. Feature surfaces: dialogs and features (DESIGN.md 5.16-5.27) ===== */
/* 14a Settings / Task Settings · 14g item creator, separator placement, drop
   light · 14h file manager / media library / image editor · 14i auth + the
   Google panels · 14j sticky notes · 14l meetings / projects / ideas /
   completed · 14m the other reused windows (item links / tasks, breakdown,
   copy text, colour pickers, quick link, reorder, notepad and note viewer
   chrome, device picker) · 14n toasts.
   Everything here sits on the shared recipes of 12 (dialog, popover, scrim,
   toast) and 13 (fields, buttons, chosen states); these rules only add what
   is particular to a surface: list rows become slips, chosen tabs get an ink
   rule, the base's slate / indigo / blue hard-codes go to tokens.
   One night trap repeats below: the base writes var(--danger) as TEXT on
   delete / remove hovers, and the night --danger is a fill (#8A3A30, ~2.4:1
   on the sheet), so text reds here are always --np-red-t. */

/* --- 14a Settings, Task Settings (DESIGN.md 5.16) --- */
/* Settings itself is all 12 + 13 (options, select, toggle, backup buttons);
   only the Light / Dark tiles' corners come down to the paper's 8px (12px
   read as a glass lozenge beside 6px buttons). */
body[data-style="paper"][data-theme] .appearance-option { border-radius: 8px; }

/* Task Settings, categories: each category is a slip holding its swatch and
   name; the name reads as print and turns into a field when hovered or
   edited (a column of five boxed inputs read as a form, not a list) */
body[data-style="paper"][data-theme] .task-settings-cat-row {
  padding: 3px 3px 3px 12px;
  background: var(--np-slip);
  border: 1px solid var(--np-hair);
  border-radius: 6px;
  box-shadow: var(--np-lift-slip);
}
/* (input.x: 13.1's :is() list counts as its most specific entry, (0,2,1)) */
body[data-style="paper"][data-theme] .task-settings-cat-row input.task-settings-input {
  padding-block: 6px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
body[data-style="paper"][data-theme] .task-settings-cat-row:hover input.task-settings-input:not(:focus, :disabled) {
  border-color: var(--np-rule);
}
body[data-style="paper"][data-theme] .task-settings-cat-row input.task-settings-input:focus {
  background: var(--np-field);
  border-color: var(--np-accent);
  box-shadow: 0 0 0 3px rgb(var(--np-accent-rgb) / 16%);
}
/* the add row lines its field up with the names above (slip edge + padding
   + swatch + gap) */
body[data-style="paper"][data-theme] .task-settings-add-row { padding-left: 37px; }
body[data-style="paper"][data-theme] .task-settings-hint { margin-left: 37px; }
body[data-style="paper"][data-theme] .task-settings-hint.task-settings-tpl-hint { margin-left: 0; }
/* the two columns part on a hairline */
body[data-style="paper"][data-theme] :is(.task-settings-col-cats, .task-settings-col-tpl) { border-color: var(--np-hair); }
/* remove buttons: a red ink, never the night fill */
body[data-style="paper"][data-theme] :is(.task-settings-delete-btn, .task-settings-tpl-item-remove):hover {
  color: var(--np-red-t);
  background: rgb(var(--np-red-rgb) / 10%);
}
/* subtask templates: a slip per template; the open one is a raised tile
   (its own fields sit on it); the grip is a muted mark at full strength */
body[data-style="paper"][data-theme] .task-settings-tpl {
  background: var(--np-slip);
  border-color: var(--np-hair);
  border-radius: 6px;
  box-shadow: var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .task-settings-tpl.is-open {
  background: var(--np-tile);
  border-color: var(--np-rule);
  box-shadow: var(--np-lift-tile);
}
body[data-style="paper"][data-theme] .task-settings-tpl-toggle { border-radius: 5px; }
body[data-style="paper"][data-theme] .task-settings-tpl-toggle:hover { background: var(--np-wash); }
body[data-style="paper"][data-theme] .task-settings-tpl-name { color: var(--np-ink); }
body[data-style="paper"][data-theme] .task-settings-tpl-count { color: var(--np-muted); font-variant-numeric: tabular-nums; }
body[data-style="paper"][data-theme] :is(.task-settings-tpl-chevron, .task-settings-tpl-grip) { color: var(--np-muted); opacity: 1; }
body[data-style="paper"][data-theme] .task-settings-tpl-grip:hover { color: var(--np-ink); }
body[data-style="paper"][data-theme] .task-settings-tpl-add { color: var(--np-accent); }
body[data-style="paper"][data-theme] .task-settings-tpl-add:hover { background: rgb(var(--np-accent-rgb) / 9%); }
/* the open template's subtasks read as print too, like the categories (a
   column of 18 boxed inputs on the tile was the form look the categories
   dropped): a field only when hovered or edited; the template's name stays
   the one visible field */
body[data-style="paper"][data-theme] .task-settings-tpl-item input.task-settings-input {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
body[data-style="paper"][data-theme] .task-settings-tpl-item:hover input.task-settings-input:not(:focus, :disabled) {
  border-color: var(--np-rule);
}
body[data-style="paper"][data-theme] .task-settings-tpl-item input.task-settings-input:focus {
  background: var(--np-field);
  border-color: var(--np-accent);
  box-shadow: 0 0 0 3px rgb(var(--np-accent-rgb) / 16%);
}
/* the "save as template" name window (task editor). Fields restated in this
   part take 13.1's field edge (3:1: the boundary is the field's one cue), not
   the decorative rule: a 22% edge beside the 54% ones read as a second,
   fainter kind of field in the same form */
body[data-style="paper"][data-theme] .subtask-template-name-input {
  background-color: var(--np-field);
  border-color: var(--np-field-edge);
  color: var(--np-ink);
  box-shadow: inset 0 1px 1px rgb(var(--np-shadow-rgb) / 5%);
}
body[data-style="paper"][data-theme] .subtask-template-name-input:focus {
  border-color: var(--np-accent);
  box-shadow: 0 0 0 3px rgb(var(--np-accent-rgb) / 16%);
  outline: none;
}


/* --- 14g Item creator, separator placement, drop light, just added (DESIGN.md 5.22) --- */
/* The card's name in the title stays in the accent: it says where the item lands */
body[data-style="paper"][data-theme] .ic-card-name { color: var(--np-accent); }
/* the paper's corners (the glass 10 / 14px read softer than every other
   window): the × a button's 6px, the image well a tile's 8px */
body[data-style="paper"][data-theme] .ic-close { border-radius: 6px; }
body[data-style="paper"][data-theme] .ic-close:hover { background: var(--np-wash); color: var(--np-ink); }
/* The five kinds are section tabs, as in a paper's index: ink-soft labels on
   a hairline; the chosen one is ink with a printed rule under it (was an
   accent-ringed box) */
body[data-style="paper"][data-theme] .ic-tabs {
  padding-bottom: 0;
  border-bottom: 1px solid var(--np-hair);
}
body[data-style="paper"][data-theme] .ic-tab {
  background: transparent;
  border-color: transparent;
  border-radius: 4px 4px 0 0;
  box-shadow: none;
  color: var(--np-ink-soft);
}
body[data-style="paper"][data-theme] .ic-tab:hover { color: var(--np-ink); background: var(--np-wash); }
body[data-style="paper"][data-theme] .ic-tab[aria-selected="true"] {
  color: var(--np-ink);
  background: transparent;
  border-color: transparent;
  box-shadow: inset 0 -2px 0 var(--np-ink);
}
/* labels are the editors' kickers (never below 12px) */
body[data-style="paper"][data-theme] .ic-label {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--np-ink-soft);
}
body[data-style="paper"][data-theme] .ic-optional {
  font-size: 12px;
  color: var(--np-muted);
  opacity: 1;
}
/* the reminder's sub-fields (Date, Repeats, Target, Unit…) are the same
   kickers one step quieter, so the short form has one label system */
body[data-style="paper"][data-theme] .ic-sub > span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--np-muted);
}
/* Web link | File and Date | Counter: the shared segment on a recessed
   track; the chosen one is the chosen recipe of 13.5, a tile ringed in ink
   (a tile with a hairline was 1.1:1 on the track: the radio group's one cue
   rode on the text colour alone) */
body[data-style="paper"][data-theme] .ic-seg {
  background: var(--np-wash);
  box-shadow: inset 0 0 0 1px var(--np-hair);
}
body[data-style="paper"][data-theme] .ic-seg button { color: var(--np-ink-soft); }
body[data-style="paper"][data-theme] .ic-seg button[aria-checked="true"] {
  background: var(--np-tile);
  color: var(--np-ink);
  box-shadow: 0 0 0 1.5px var(--np-ink), 0 1px 2px rgb(var(--np-shadow-rgb) / 14%);
}
/* (night: the ink-soft ring of 13.5; a cream ring read as a glare box) */
body[data-style="paper"][data-theme="dark"] .ic-seg button[aria-checked="true"] {
  box-shadow: 0 0 0 1.5px var(--np-ink-soft), 0 1px 2px rgb(var(--np-shadow-rgb) / 30%);
}
body[data-style="paper"][data-theme] .ic-image-preview {
  background: var(--np-field);
  border-color: var(--np-rule);
  border-radius: 8px;
  color: var(--np-muted);
}
body[data-style="paper"][data-theme] .ic-missing.is-error { color: var(--np-red-t); }
/* the selects drop the system arrow for the paper one (the Settings select's,
   13.1), so every field in the window is the same printed box */
body[data-style="paper"][data-theme] :is(select.ic-input, .meeting-editor-field select) {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6257' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
body[data-style="paper"][data-theme="dark"] :is(select.ic-input, .meeting-editor-field select) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A39A8D' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Separator placement: the gap markers in accent (static: the breathing was
   glass-fx; only the drop light follows the pointer); the hint bar is a toast
   (12.7), its key hints and Cancel in the toast's own warm ink */
body[data-style="paper"][data-theme] .sep-slot { background: rgb(var(--np-accent-rgb) / 45%); }
body[data-style="paper"][data-theme] .sep-place-hint-key { color: color-mix(in srgb, var(--np-on-toast) 72%, transparent); }
body[data-style="paper"][data-theme] .sep-place-hint kbd { border-color: color-mix(in srgb, var(--np-on-toast) 30%, transparent); }
body[data-style="paper"][data-theme] .sep-place-cancel {
  background: color-mix(in srgb, var(--np-on-toast) 14%, transparent);
  color: var(--np-on-toast);
}
body[data-style="paper"][data-theme] :is(.sep-place-cancel:hover, .sep-place-cancel:focus-visible) {
  background: color-mix(in srgb, var(--np-on-toast) 24%, transparent);
}

/* The drop light: an accent beam with a paper knockout instead of a blue glow
   (it reads --brand; only the glow was hard-coded). Drag-only, so it moves. */
body[data-style="paper"][data-theme] .drop-light {
  background: var(--np-accent);
  box-shadow: 0 0 0 1.5px var(--np-sheet);
}

/* Just added: the one-shot glow in the accent ink (icJustAdded is
   hard-coded blue). Same timing; reduced motion still stops it (the base
   shorthand there zeroes the duration). */
body[data-style="paper"][data-theme] .ic-just-added { animation-name: npJustAdded; }
@keyframes npJustAdded {
  0% { filter: drop-shadow(0 0 0 rgb(var(--np-accent-rgb) / 0%)); }
  18% { filter: drop-shadow(0 0 10px rgb(var(--np-accent-rgb) / 70%)); }
  45% { filter: drop-shadow(0 0 5px rgb(var(--np-accent-rgb) / 42%)); }
  65% { filter: drop-shadow(0 0 9px rgb(var(--np-accent-rgb) / 56%)); }
  100% { filter: drop-shadow(0 0 0 rgb(var(--np-accent-rgb) / 0%)); }
}


/* --- 14h File manager, media library, image editor (DESIGN.md 5.23) --- */
body[data-style="paper"][data-theme] :is(.file-manager-close-btn, .file-manager-delete-btn) { color: var(--np-muted); }
body[data-style="paper"][data-theme] .file-manager-close-btn:hover { background: var(--np-wash); color: var(--np-ink); }
/* Storage: a recessed track; the used part is a gauge: a solid accent rule
   along the bottom over a faint ink wash, so the centred figures stay ink on
   paper at any fill (ink on a solid accent fill was 2.2:1, and an accent wash
   read as cool slate on the warm track). No edge at the fill's end: a
   full-height line there ran through the figures ("38.|4 MB") at 30-70%;
   the bottom rule already stops where the fill does. */
body[data-style="paper"][data-theme] .file-manager-storage-bar {
  margin-top: 14px;   /* it sat flush under the header rule */
  background: var(--np-wash);
  box-shadow: inset 0 0 0 1px var(--np-hair);
}
body[data-style="paper"][data-theme] .file-manager-storage-fill {
  background: linear-gradient(to top, var(--np-accent) 0 4px, rgb(var(--np-ink-rgb) / 5%) 4px);
  border-radius: 0;
  box-shadow: none;
}
body[data-style="paper"][data-theme] .file-manager-storage-fill.warning {
  background: linear-gradient(to top, var(--np-orange) 0 4px, rgb(var(--np-orange-rgb) / 8%) 4px);
}
body[data-style="paper"][data-theme] .file-manager-storage-text {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--np-ink);
}
/* Orphaned / Images / Documents are kickers */
body[data-style="paper"][data-theme] .file-manager-section-header {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--np-muted);
  border-color: var(--np-hair);
}
body[data-style="paper"][data-theme] .file-manager-section-header.orphan-header { color: var(--np-red-t); }
/* Delete All: the 12px floor for UI text (the base 11px sat below it) */
body[data-style="paper"][data-theme] .file-manager-delete-all-btn {
  padding: 5px 12px;
  font-size: 12px;
}
/* A disabled danger button (Clear All Links with no links, Delete All with
   nothing to delete) is the disabled primary's recessed blank (13.4) until it
   is usable: the red fill at reduced opacity was a salmon patch with 2.4:1
   text that read as broken, not as "not yet" */
body[data-style="paper"][data-theme] :is(.quick-link-btn.danger, .btn.danger, .file-manager-delete-all-btn):disabled,
body[data-style="paper"][data-theme] :is(.quick-link-btn.danger, .btn.danger, .file-manager-delete-all-btn):disabled:hover {
  background: var(--np-wash);
  border-color: var(--np-rule);
  color: var(--np-muted);
  box-shadow: none;
  opacity: 1;
}
/* each file is a tile; an orphan carries a red edge (a shape cue, not only a tint) */
body[data-style="paper"][data-theme] .file-manager-row {
  margin-bottom: 4px;
  background: var(--np-tile);
  border-radius: 6px;
  box-shadow: 0 0 0 1px var(--np-hair), var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .file-manager-row:hover {
  background: var(--np-tile);
  box-shadow: 0 0 0 1px var(--np-rule), var(--np-lift-slip-hover);
}
body[data-style="paper"][data-theme] :is(.file-manager-row.orphan, .file-manager-row.orphan:hover) {
  background: color-mix(in srgb, rgb(var(--np-red-rgb)) 5%, var(--np-tile));
}
body[data-style="paper"][data-theme] .file-manager-row.orphan { box-shadow: inset 3px 0 0 var(--np-red), 0 0 0 1px var(--np-hair), var(--np-lift-slip); }
body[data-style="paper"][data-theme] .file-manager-row.orphan:hover { box-shadow: inset 3px 0 0 var(--np-red), 0 0 0 1px var(--np-rule), var(--np-lift-slip-hover); }
body[data-style="paper"][data-theme] .file-manager-thumb {
  background: var(--np-slip);
  box-shadow: inset 0 0 0 1px var(--np-hair);
}
body[data-style="paper"][data-theme] .file-manager-thumb.file-icon svg { color: var(--np-muted); }
body[data-style="paper"][data-theme] .file-manager-name { color: var(--np-ink); }
body[data-style="paper"][data-theme] .file-manager-meta { color: var(--np-muted); font-variant-numeric: tabular-nums; }
body[data-style="paper"][data-theme] .file-manager-orphan-tag { color: var(--np-red-t); }
body[data-style="paper"][data-theme] .file-manager-delete-btn:hover {
  background: rgb(var(--np-red-rgb) / 10%);
  color: var(--np-red-t);
}
body[data-style="paper"][data-theme] :is(.file-manager-loading, .file-manager-empty) { color: var(--np-muted); }

/* Media library: kickers over a grid of tiles; each picture sits on the tile
   with its file name in a slip-coloured caption band under it (a photo and its
   caption). The pictures themselves are never touched. Chosen = an ink ring,
   the Settings option's (13.5); the 2px base border stays for its geometry. */
body[data-style="paper"][data-theme] .media-section-header {
  letter-spacing: 0.12em;
  color: var(--np-muted);
  border-bottom-color: var(--np-hair);
}
body[data-style="paper"][data-theme] .media-item {
  background: var(--np-slip);
  border-color: transparent;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--np-hair), var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .media-item:hover { box-shadow: 0 0 0 1px var(--np-rule), var(--np-lift-slip-hover); }
body[data-style="paper"][data-theme] .media-item img { background: var(--np-tile); }
/* at night the picture sits on the fold's mid tone: black logos (X, AWS,
   Midjourney) vanished on the dark tile, and this is where they are chosen */
body[data-style="paper"][data-theme="dark"] .media-item img { background: var(--np-fold); }
body[data-style="paper"][data-theme] .media-item.selected {
  border-color: var(--np-ink);
  box-shadow: 0 0 0 1px var(--np-ink), var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .media-item .name { color: var(--np-ink-soft); }
/* Add images…: a dashed slot to drop into, like the add tiles */
body[data-style="paper"][data-theme] .upload-btn {
  background: transparent;
  border-color: var(--np-rule);
  color: var(--np-ink);
  font-size: 13px;
  font-weight: 600;
}
body[data-style="paper"][data-theme] .upload-btn:hover { border-color: var(--np-accent); color: var(--np-accent); }
/* the label never breaks inside its dashed box */
body[data-style="paper"][data-theme] .upload-btn { padding-inline: 10px; white-space: nowrap; }
/* On the phone the header can't hold the title and both actions on one line
   (the title and "Add images…" each broke onto two, and the dashed box made
   the break loud): the title takes the row, the actions sit under it with
   the drop slot taking the width */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .media-header {
  flex-wrap: wrap;
  gap: 10px 8px;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .media-header > h4 {
  flex: 1 0 100%;
  white-space: nowrap;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .media-header > .media-actions { flex: 1 0 100%; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .media-actions > .upload-btn {
  flex: 1;
  justify-items: center;
}
/* Delete Selected: a quiet secondary until a removable picture is chosen,
   then the danger fill (the base grey #9ca3af was a cool slate) */
body[data-style="paper"][data-theme] #media-delete,
body[data-style="paper"][data-theme] #media-delete:disabled {
  background: var(--np-sheet);
  border-color: var(--np-rule);
  color: var(--np-muted);
  box-shadow: none;
}
body[data-style="paper"][data-theme] #media-delete.media-delete-active {
  background: var(--np-danger);
  border-color: var(--np-danger);
  color: var(--np-on-danger);
}

/* Image editor (profile photo, logo): the preview frame is a slip ringed in a
   hairline; the zoom slider is a recessed track with an ink knob (the base
   draws it itself, so accent-color can't reach it) */
body[data-style="paper"][data-theme] .image-editor-frame {
  background: var(--np-slip);
  box-shadow: 0 0 0 1px var(--np-rule), 0 10px 22px -14px rgb(var(--np-shadow-rgb) / 45%);
}
body[data-style="paper"][data-theme] .image-editor-control input[type="range"] {
  background: var(--np-wash);
  box-shadow: inset 0 0 0 1px var(--np-rule);
}
body[data-style="paper"][data-theme] .image-editor-control input[type="range"]::-webkit-slider-thumb {
  background: var(--np-fill);
  box-shadow: 0 0 0 2px var(--np-sheet), inset 0 0 0 1px var(--np-fill-edge), 0 1px 3px rgb(var(--np-shadow-rgb) / 30%);
}
body[data-style="paper"][data-theme] .image-editor-control input[type="range"]::-moz-range-thumb {
  background: var(--np-fill);
  box-shadow: 0 0 0 2px var(--np-sheet), 0 1px 3px rgb(var(--np-shadow-rgb) / 30%);
}
body[data-style="paper"][data-theme] #image-editor-scale-value { color: var(--np-muted); font-variant-numeric: tabular-nums; }
body[data-style="paper"][data-theme] #image-editor-choose {
  background: transparent;
  border: 1px dashed var(--np-rule);
  color: var(--np-accent);
  box-shadow: none;
}
body[data-style="paper"][data-theme] #image-editor-choose:hover {
  background: rgb(var(--np-accent-rgb) / 8%);
  border-color: var(--np-accent);
}
/* The footers that drop the button edge (border: none) get it back: a
   secondary on the sheet is only its rule; the dark secondary is a slate fill */
body[data-style="paper"][data-theme] :is(.image-editor-footer, .breakdown-footer, .copy-text-footer) .btn {
  border-width: 1px;
  border-style: solid;
}
body[data-style="paper"][data-theme] :is(.image-editor-footer, .breakdown-footer, .copy-text-footer) .btn.secondary {
  background: var(--np-sheet);
  border-color: var(--np-rule);
  color: var(--np-ink);
  box-shadow: var(--np-lift-slip);
}
body[data-style="paper"][data-theme] :is(.image-editor-footer, .breakdown-footer, .copy-text-footer) .btn.secondary:hover {
  background: linear-gradient(var(--np-wash), var(--np-wash)), var(--np-sheet);
}


/* --- 14i Auth and the Google panels (DESIGN.md 5.24) --- */
/* Continue with Google stays Google's own white / dark button with the
   four-colour G (brand rules, like an icon): nothing here touches it. */
body[data-style="paper"][data-theme] .auth-field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--np-ink-soft);
}
body[data-style="paper"] :where(.auth-field input) { border-width: 1px; }
body[data-style="paper"][data-theme] .auth-error {
  background: rgb(var(--np-red-rgb) / 8%);
  border-color: rgb(var(--np-red-rgb) / 30%);
  color: var(--np-red-t);
}
body[data-style="paper"][data-theme] .auth-link-btn {
  color: var(--np-accent);
  text-decoration-color: rgb(var(--np-accent-rgb) / 45%);
  text-underline-offset: 0.18em;
}
body[data-style="paper"][data-theme] .auth-link-btn:hover { opacity: 1; text-decoration-color: currentColor; }
body[data-style="paper"][data-theme] .auth-footer { color: var(--np-muted); }
body[data-style="paper"][data-theme] .auth-disclaimer { color: var(--np-muted); opacity: 1; font-size: 12px; }
body[data-style="paper"][data-theme] .auth-divider { font-size: 12px; letter-spacing: 0.12em; color: var(--np-muted); }
body[data-style="paper"][data-theme] .auth-divider::before,
body[data-style="paper"][data-theme] .auth-divider::after { background: var(--np-hair); }
/* "Your session as … ended": a slip with the accent edge, the note a sign-in
   picks up from */
body[data-style="paper"][data-theme] .auth-lapsed-note {
  padding: 9px 12px 9px 14px;
  background: var(--np-slip);
  border: 1px solid var(--np-hair);
  border-radius: 6px;
  box-shadow: inset 3px 0 0 var(--np-accent);
  color: var(--np-ink);
}
body[data-style="paper"][data-theme] .auth-google-note { color: var(--np-ink); }

/* The account popover (12.6): name, sync line, the two Google panels, Sign Out */
body[data-style="paper"][data-theme] .auth-user-info { color: var(--np-ink); }
body[data-style="paper"][data-theme] .auth-user-info svg { color: var(--np-muted); }
body[data-style="paper"][data-theme] :is(.auth-sync-status, .auth-gcal, .auth-google) { border-bottom-color: var(--np-hair); }
body[data-style="paper"][data-theme] .auth-sync-status { color: var(--np-muted); }
body[data-style="paper"][data-theme] .auth-logout-btn {
  background: var(--np-sheet);
  border-color: var(--np-rule);
  color: var(--np-ink);
  box-shadow: var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .auth-logout-btn:hover {
  border-color: rgb(var(--np-red-rgb) / 50%);
  color: var(--np-red-t);
}
/* Google Calendar / Google sign-in panels (popover on a computer, More sheets
   on the phone, same tails there): kicker title, muted notes, a live dot for
   each permission given, red ink for warnings and the inline confirmations */
body[data-style="paper"][data-theme] .gcal-panel { color: var(--np-ink); }
body[data-style="paper"][data-theme] .gcal-panel-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--np-muted);
}
body[data-style="paper"][data-theme] :is(.gcal-note, .gcal-email, .gcal-perms) { color: var(--np-muted); }
body[data-style="paper"][data-theme] .gcal-hint { color: var(--np-muted); font-size: 12px; }
body[data-style="paper"][data-theme] .gcal-note.gcal-warn { color: var(--np-red-t); }
body[data-style="paper"][data-theme] .gcal-perms li.is-on { color: var(--np-ink); }
body[data-style="paper"][data-theme] .gcal-perms li::before { background: var(--np-muted); opacity: 1; }
body[data-style="paper"][data-theme] .gcal-perms li.is-on::before { background: var(--np-live); }
body[data-style="paper"][data-theme] .gcal-cal-add input {
  background-color: var(--np-field);
  border-color: var(--np-field-edge);
  color: var(--np-ink);
  box-shadow: inset 0 1px 1px rgb(var(--np-shadow-rgb) / 5%);
}
body[data-style="paper"][data-theme] .gcal-cal-add input:focus {
  border-color: var(--np-accent);
  box-shadow: 0 0 0 3px rgb(var(--np-accent-rgb) / 16%);
  outline: none;
}
/* Disconnect / Unlink: secondary with red ink (the base hover took the
   accent); the same two classes as 13.4's list, so they win by order */
body[data-style="paper"][data-theme] .gcal-btn.gcal-btn-danger,
body[data-style="paper"][data-theme] .gcal-btn.gcal-btn-danger:hover {
  color: var(--np-red-t);
  border-color: rgb(var(--np-red-rgb) / 45%);
}
/* the Calendar confirmation's Cancel is the quiet button, as the sign-in
   one beside it is (google-calendar.js gives it no class, so it fell to the
   bordered secondary): both read [red-ink action] [quiet Cancel] */
body[data-style="paper"][data-theme] .gcal-btn[data-gcal-action="cancel"] {
  background: transparent;
  border-color: transparent;
  color: var(--np-ink-soft);
  box-shadow: none;
}
body[data-style="paper"][data-theme] .gcal-btn[data-gcal-action="cancel"]:hover {
  background: var(--np-wash);
  border-color: transparent;
  color: var(--np-ink);
}


/* --- 14j Sticky notes (desktop only; DESIGN.md 5.25) --- */
/* Loose scraps: opaque coloured stock, shallow tears, a pressed crease and
   a lifted bottom edge. Only decoration is masked; text and buttons keep
   their full hit areas and the existing note storage / font-fit behaviour. */
body[data-style="paper"][data-theme] :is(.sticky-note, .sticky-note-preview) {
  --np-note-stock: #f0dd91;
  --np-note-ink: #363026;
  --np-note-mask: url('assets/textures/paper-note-a.svg');
  --np-note-angle: -1.1deg;
  isolation: isolate;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: rotate(var(--np-note-angle));
  font-family: var(--np-serif);
}
body[data-style="paper"][data-theme] :is(.sticky-note, .sticky-note-preview).sticky-purple {
  --np-note-stock: #d9cbe9;
  --np-note-mask: url('assets/textures/paper-note-b.svg');
  --np-note-angle: 1.2deg;
}
body[data-style="paper"][data-theme] :is(.sticky-note, .sticky-note-preview).sticky-green {
  --np-note-stock: #c7dbbc;
  --np-note-mask: url('assets/textures/paper-note-b.svg');
  --np-note-angle: -.6deg;
}
body[data-style="paper"][data-theme] :is(.sticky-note, .sticky-note-preview).sticky-blue {
  --np-note-stock: #c7dfeb;
  --np-note-angle: .8deg;
}
body[data-style="paper"][data-theme] :is(.sticky-note, .sticky-note-preview)::before,
body[data-style="paper"][data-theme] :is(.sticky-note, .sticky-note-preview)::after {
  content: '';
  position: absolute;
  pointer-events: none;
  border-radius: 0;
  box-shadow: none;
  mask: var(--np-note-mask) center / 100% 100% no-repeat;
}
body[data-style="paper"][data-theme] :is(.sticky-note, .sticky-note-preview)::before {
  inset: 0;
  z-index: -1;
  background:
    var(--np-grain) 0 0 / 480px 480px,
    url('assets/textures/paper-note-fold.svg') center / 100% 100% no-repeat,
    linear-gradient(103deg, rgb(255 255 255 / 20%), transparent 36%, rgb(84 60 27 / 4%) 100%),
    var(--np-note-stock);
}
body[data-style="paper"][data-theme] :is(.sticky-note, .sticky-note-preview)::after {
  inset: 5px 4px -4px 6px;
  z-index: -2;
  mask: none;
  border-radius: 5px 6px 24% 9%;
  background: rgb(35 29 21 / 20%);
  filter: blur(5px);
  transform: rotate(.5deg);
}
body[data-style="paper"][data-theme] :is(.sticky-note, .sticky-note-preview) .sticky-note-header {
  height: 32px;
  border: 0;
}
/* Every scrap has a small translucent tape fragment above its writing area. */
body[data-style="paper"][data-theme] :is(.sticky-note, .sticky-note-preview) .sticky-note-header::before {
  content: '';
  display: block;
  position: absolute;
  width: 68px;
  height: 22px;
  left: 36%;
  top: -8px;
  pointer-events: none;
  background: var(--np-grain) 0 0 / 240px 240px, rgb(250 246 226 / 62%);
  mask: url('assets/textures/paper-task.svg') center / 100% 100% no-repeat;
  transform: rotate(-5deg);
}
body[data-style="paper"][data-theme] .sticky-note-body {
  height: calc(100% - 32px);
  padding: 4px 19px 22px;
  font-family: inherit;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -.012em;
  color: var(--np-note-ink);
}
body[data-style="paper"][data-theme] .sticky-note-body:empty::before { color: #625746; }
body[data-style="paper"][data-theme] .sticky-note-delete {
  top: 6px;
  right: 10px;
  color: #625746;
}
body[data-style="paper"][data-theme] .sticky-note-delete:hover { color: #942f2c; }
body[data-style="paper"][data-theme] .sticky-note-delete:focus-visible {
  opacity: 1 !important;
  outline: 2px solid var(--np-note-ink);
  outline-offset: 1px;
}
/* Paper stays light enough for dark ink in the night edition, with less glare. */
body[data-style="paper"][data-theme="dark"] :is(.sticky-note, .sticky-note-preview).sticky-yellow { --np-note-stock: #ccbb7b; }
body[data-style="paper"][data-theme="dark"] :is(.sticky-note, .sticky-note-preview).sticky-purple { --np-note-stock: #bcaccd; }
body[data-style="paper"][data-theme="dark"] :is(.sticky-note, .sticky-note-preview).sticky-green { --np-note-stock: #adc3a3; }
body[data-style="paper"][data-theme="dark"] :is(.sticky-note, .sticky-note-preview).sticky-blue { --np-note-stock: #aac5d3; }
body[data-style="paper"][data-theme="dark"] :is(.sticky-note, .sticky-note-preview)::after {
  background: rgb(0 0 0 / 38%);
}
/* The colour picker's swatches are the note colours themselves; a paper ring
   instead of the white glass one, the chosen one ringed in ink */
body[data-style="paper"][data-theme] .sticky-color-btn {
  border-color: var(--np-sheet);
  box-shadow: 0 0 0 1px var(--np-rule), 0 2px 6px rgb(var(--np-shadow-rgb) / 18%);
}
body[data-style="paper"][data-theme] .sticky-color-btn:hover {
  border-color: var(--np-sheet);
  box-shadow: 0 0 0 1px var(--np-ink-soft), 0 3px 8px rgb(var(--np-shadow-rgb) / 24%);
}
body[data-style="paper"][data-theme] .sticky-color-btn.selected {
  border-color: var(--np-sheet);
  box-shadow: 0 0 0 2px var(--np-ink), 0 2px 6px rgb(var(--np-shadow-rgb) / 18%);
}


/* --- 14l Meetings, projects, ideas, completed (DESIGN.md 5.27) --- */
/* The document text inside these windows is part 15; here is the list and
   column chrome round it. */

/* Meetings: loose title clippings. The selected meeting is a full teal
   scrap with paper-white ink, rather than a narrow mark along its edge. */
body[data-style="paper"][data-theme] .meetings-sidebar { border-right-color: var(--np-hair); }
body[data-style="paper"][data-theme] .meetings-column-title {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--np-muted);
  border-bottom: 1px solid var(--np-rule);
}
body[data-style="paper"][data-theme] .meetings-item {
  --np-meeting-stock: var(--np-tile);
  --np-meeting-ink: var(--np-ink);
  position: relative;
  isolation: isolate;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 10px;
  padding: 12px 16px;
}
body[data-style="paper"][data-theme] .meetings-item:hover {
  --np-meeting-stock: var(--np-slip-hover);
  background: transparent;
}
body[data-style="paper"][data-theme] .meetings-item.active {
  --np-meeting-stock: #315e5a;
  --np-meeting-ink: #fffdf7;
  background: transparent;
  box-shadow: none;
}
body[data-style="paper"][data-theme] .meetings-item::before,
body[data-style="paper"][data-theme] .meetings-item::after {
  content: '';
  position: absolute;
  pointer-events: none;
  mask: url('assets/textures/paper-task.svg') center / 100% 100% no-repeat;
}
body[data-style="paper"][data-theme] .meetings-item::before {
  inset: 0;
  z-index: -1;
  background: var(--np-meeting-stock) var(--np-grain) 0 0 / 640px 640px;
}
body[data-style="paper"][data-theme] .meetings-item::after {
  inset: 2px 0 -3px 1px;
  z-index: -2;
  background: rgb(var(--np-shadow-rgb) / 20%);
  filter: blur(1px);
}
body[data-style="paper"][data-theme] .meetings-item.active::before { rotate: -.18deg; }
body[data-style="paper"][data-theme] .meetings-item-title {
  display: block;
  font-family: var(--np-serif);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
  color: var(--np-meeting-ink);
}
body[data-style="paper"][data-theme] .meetings-item.active .meetings-item-title { font-weight: 600; }
/* "No one-time meetings": the empty columns' italic serif (11), and every
   other window's empty line with it (linked tasks, completed, files,
   projects), so an empty state reads the same wherever it shows */
body[data-style="paper"][data-theme] :is(.meetings-empty, .item-tasks-empty, .completed-tasks-empty, .file-manager-empty,
  .projects-empty-state) {
  font: italic 400 15px/1.4 var(--np-serif);
  color: var(--np-muted);
}
/* (the projects one fills the whole window: a size up) */
body[data-style="paper"][data-theme] .projects-empty-state { font-size: 17px; }
body[data-style="paper"][data-theme] .meetings-close-btn { color: var(--np-muted); }
body[data-style="paper"][data-theme] .meetings-close-btn:hover { color: var(--np-ink); }
/* the open meeting: kicker type line, serif headline, its notes on a tile */
body[data-style="paper"][data-theme] .meetings-view-type {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--np-muted);
}
/* the open item's headline outranks the window's own name (20px, 12.5): at
   22px it read as a headline under a bigger-feeling headline */
body[data-style="paper"][data-theme] :is(.meetings-view-title, .ideas-view-title) {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.008em;
  color: var(--np-ink);
}
/* (the phone frames keep 22px: their writer bar holds the window's name) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.meetings-view-title, .ideas-view-title) { font-size: 22px; }
/* While an idea is open, Ideas steps down to the kicker over its headline
   (section, then story), as a meeting's type line does; two serif titles
   stacked read as a headline under a headline. Desktop windows only: on the
   phone this h4 is the writer bar's title (16g, sentence case like every
   other bar), and a reset there lost to this rule's :has() (it printed
   "IDEAS"), so the rule never reaches the shell */
body[data-style="paper"][data-theme] .ideas-dialog:has(> .ideas-view-section:not([hidden])) .ideas-header h4:not(html[data-shell="mobile"] *) {
  font-family: var(--np-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--np-muted);
}
body[data-style="paper"][data-theme] :is(.meetings-view-content, .ideas-view-content) {
  background: var(--np-tile);
  border: 1px solid var(--np-hair);
  box-shadow: var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .meetings-view-link {
  background: var(--np-slip);
  color: var(--np-accent);
  box-shadow: 0 0 0 1px var(--np-hair), var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .meetings-view-link:hover { background: var(--np-slip-hover); }
body[data-style="paper"][data-theme] :is(.meetings-view-icon-btn, .ideas-view-icon-btn) { color: var(--np-muted); }
body[data-style="paper"][data-theme] :is(.meetings-view-icon-btn, .ideas-view-icon-btn):hover {
  background: var(--np-wash);
  color: var(--np-ink);
}
body[data-style="paper"][data-theme] :is(.meetings-view-icon-danger, .ideas-view-icon-danger):hover {
  background: rgb(var(--np-red-rgb) / 10%);
  color: var(--np-red-t);
}
/* the meeting editor (inline and the separate window): kicker labels, slip
   files, field links, a dashed "Add link" slot */
body[data-style="paper"][data-theme] :is(.meeting-editor-field label, .meeting-editor-description > label,
  .meeting-links-section > label, .meeting-files-section > label) {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--np-ink-soft);
}
body[data-style="paper"][data-theme] .meeting-file-row {
  background: var(--np-slip);
  border-color: var(--np-hair);
  box-shadow: var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .meeting-file-name { color: var(--np-ink); }
body[data-style="paper"][data-theme] .meeting-file-open:hover { background: var(--np-wash); color: var(--np-accent); }
body[data-style="paper"][data-theme] .meeting-link-row input {
  background-color: var(--np-field);
  border-color: var(--np-field-edge);
  color: var(--np-ink);
  box-shadow: inset 0 1px 1px rgb(var(--np-shadow-rgb) / 5%);
}
body[data-style="paper"][data-theme] .meeting-link-row input:focus {
  border-color: var(--np-accent);
  box-shadow: 0 0 0 3px rgb(var(--np-accent-rgb) / 16%);
}
/* one field geometry through the form: the link rows were 30px boxes in 13px
   type beside the 35-37px fields above them, and every field takes the small
   fields' 6px corners (13.1; the base meeting fields were 8px) */
body[data-style="paper"][data-theme] .meeting-link-row input {
  padding: 8px 12px;
  font-size: 14px;
}
body[data-style="paper"][data-theme] :is(.meeting-editor-field input:not([type="checkbox"], [type="radio"]),
  .meeting-editor-field select, .meeting-link-row input) {
  border-radius: 6px;
}
/* remove ×: a glyph in proportion with the row (it was the button's default
   13px), in the 28px box the base already gives it */
body[data-style="paper"][data-theme] .meeting-link-remove {
  font-size: 20px;
  line-height: 1;
  color: var(--np-muted);
}
body[data-style="paper"][data-theme] .meeting-add-link-btn {
  border-color: var(--np-rule);
  color: var(--np-ink-soft);
}
body[data-style="paper"][data-theme] .meeting-add-link-btn:hover { border-color: var(--np-accent); color: var(--np-accent); }
body[data-style="paper"][data-theme] :is(.meeting-link-remove, .meeting-editor-delete-btn):hover {
  background: rgb(var(--np-red-rgb) / 10%);
  color: var(--np-red-t);
}

/* Projects: the open projects are section tabs (ink with a printed rule, was
   accent); the save tick switches instantly (v5.4.1): clean = quiet, dirty =
   the fill (13.4), saved = the live ink */
/* the window's title is the view headline (DESIGN 2.3: 22px); the id lifts it
   over the generic dialog-title rule (12.5, (0,5,2)) */
body[data-style="paper"][data-theme] #projects-modal .projects-title-bar h3 { font-size: 22px; line-height: 1.2; }
body[data-style="paper"][data-theme] .projects-tab { color: var(--np-ink-soft); }
body[data-style="paper"][data-theme] .projects-tab:hover { color: var(--np-ink); background: var(--np-wash); }
body[data-style="paper"][data-theme] .projects-tab.active {
  color: var(--np-ink);
  border-bottom-color: var(--np-ink);
  font-weight: 600;
}
body[data-style="paper"][data-theme] .projects-tab-delete:hover { color: var(--np-red-t); }
body[data-style="paper"][data-theme] .projects-tab-add { color: var(--np-muted); }
body[data-style="paper"][data-theme] .projects-tab-add:hover { color: var(--np-ink); }
body[data-style="paper"][data-theme] .projects-tab-rename-input { border-bottom-color: var(--np-accent); color: var(--np-ink); }
body[data-style="paper"][data-theme] .projects-close-btn { color: var(--np-muted); }
body[data-style="paper"][data-theme] .projects-close-btn:hover { color: var(--np-ink); }
body[data-style="paper"][data-theme] .projects-empty-state { color: var(--np-muted); }
body[data-style="paper"][data-theme] .project-save-btn {
  background: transparent;
  border-color: var(--np-rule);
  color: var(--np-muted);
}
body[data-style="paper"][data-theme] .project-save-btn.saved {
  background: transparent;
  border-color: rgb(var(--np-live-rgb) / 60%);
  color: var(--np-live-t);
}
body[data-style="paper"][data-theme] .project-save-label { color: var(--np-live-t); }
body[data-style="paper"][data-theme] :is(.project-convert-task-btn, .project-hyperlink-btn):hover:not(:disabled) {
  background: rgb(var(--np-accent-rgb) / 9%);
  color: var(--np-accent);
}

/* Ideas: the saved ideas are an index of headlines, ruled apart like the
   meetings list (as slips they looked like the "Idea title…" field under
   them: a stack of inputs, not stories to open) */
body[data-style="paper"][data-theme] .ideas-item {
  background: transparent;
  border-color: transparent transparent var(--np-hair);
  border-radius: 0;
  color: var(--np-ink);
  box-shadow: none;
}
body[data-style="paper"][data-theme] .ideas-item:hover {
  background: var(--np-wash);
  box-shadow: none;
  transform: none;
}
body[data-style="paper"][data-theme] .ideas-item-title {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.004em;
}
body[data-style="paper"][data-theme] .ideas-title-input {
  background-color: var(--np-field);
  border-color: var(--np-field-edge);
  color: var(--np-ink);
  box-shadow: inset 0 1px 1px rgb(var(--np-shadow-rgb) / 5%);
}
body[data-style="paper"][data-theme] .ideas-title-input:focus {
  border-color: var(--np-accent);
  box-shadow: 0 0 0 3px rgb(var(--np-accent-rgb) / 16%);
}
body[data-style="paper"][data-theme] .ideas-close-btn { color: var(--np-muted); }
body[data-style="paper"][data-theme] .ideas-close-btn:hover { color: var(--np-ink); }
body[data-style="paper"][data-theme] .ideas-delete-btn { color: var(--np-red-t); }
body[data-style="paper"][data-theme] .ideas-delete-btn:hover { background: rgb(var(--np-red-rgb) / 10%); }

/* Completed: each done task is a slip with the live edge. The rows also carry
   .task-bubble-<colour> (a 2px glass-colour border, washes from part 9), so
   the list prefix outranks them */
body[data-style="paper"][data-theme] .completed-tasks-list .completed-task-row {
  background: var(--np-slip);
  border: 1px solid var(--np-hair);
  border-left: 3px solid var(--np-live);
  box-shadow: var(--np-lift-slip);
  color: var(--np-ink);
}
body[data-style="paper"][data-theme] .completed-task-title { color: var(--np-ink); }
body[data-style="paper"][data-theme] .completed-task-date { color: var(--np-muted); font-variant-numeric: tabular-nums; }
body[data-style="paper"][data-theme] :is(.completed-tasks-close-btn, .completed-tasks-empty) { color: var(--np-muted); }
body[data-style="paper"][data-theme] .completed-task-delete { color: var(--np-muted); opacity: 1; }
body[data-style="paper"][data-theme] .completed-task-delete:hover { color: var(--np-red-t); }


/* --- 14m The other reused windows (item links / tasks, breakdown, copy
   text, colour pickers, quick link, reorder, notepad and note viewer chrome,
   device picker) --- */
/* Titles that sit straight in the dialog (no header row, so 12.5 can't see
   them) take the same headline serif */
body[data-style="paper"][data-theme] :is(.quick-link-dialog, .color-picker-dialog, .reminder-links-dialog, .reminder-tasks-dialog) > h3,
body[data-style="paper"][data-theme] .subtask-template-name-dialog h4 {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-size: max(1.25em, 20px);
  font-weight: 600;
  letter-spacing: -0.006em;
  color: var(--np-ink);
}
/* Three windows close with the item popovers' round Cancel (.btn-cancel, a
   pink / red disc): in a dialog header it is the quiet × every other dialog has */
body[data-style="paper"][data-theme] :is(#breakdown-close, #copy-text-close, #image-editor-close) {
  background: transparent;
  color: var(--np-muted);
  box-shadow: none;
  transform: none;
}
body[data-style="paper"][data-theme] :is(#breakdown-close, #copy-text-close, #image-editor-close):hover {
  background: var(--np-wash);
  color: var(--np-ink);
  transform: none;
}
/* form labels in these windows are the editors' kickers */
body[data-style="paper"][data-theme] :is(.breakdown-label, .breakdown-summary-section h5, .copy-text-label, .image-editor-control label) {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--np-ink-soft);
}
/* (the textarea inside the copy-text label keeps the field's own type) */
body[data-style="paper"][data-theme] .copy-text-label textarea {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}
/* Fields the base names with a dark slate twin at (0,2,1) or more: restated so
   the generic fallback (13.1) isn't beaten in the night edition */
body[data-style="paper"][data-theme] :is(.quick-link-field input, .breakdown-current-row input[type="number"], .breakdown-row input,
  .copy-text-label textarea, .reminder-link-row input, .section-title-input, .reminder-task-row .task-title-input,
  .notepad-title-input) {
  background-color: var(--np-field);
  border-color: var(--np-field-edge);
  color: var(--np-ink);
  box-shadow: inset 0 1px 1px rgb(var(--np-shadow-rgb) / 5%);
}
body[data-style="paper"][data-theme] :is(.quick-link-field input, .breakdown-current-row input[type="number"], .breakdown-row input,
  .copy-text-label textarea, .reminder-link-row input, .section-title-input, .reminder-task-row .task-title-input,
  .notepad-title-input):focus {
  border-color: var(--np-accent);
  box-shadow: 0 0 0 3px rgb(var(--np-accent-rgb) / 16%);
  outline: none;
}
body[data-style="paper"][data-theme] .breakdown-current-row input[type="number"]:disabled { background: var(--np-wash); }
body[data-style="paper"][data-theme] .quick-link-field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--np-ink-soft);
}
/* Quick link actions: the buttons' 600 weight (13.4) was 3px too wide for the
   400px window, so "Clear All Links" and "Add Link" broke onto two lines.
   A label never breaks; a narrower window wraps the row instead */
body[data-style="paper"][data-theme] .quick-link-actions { flex-wrap: wrap; }
body[data-style="paper"][data-theme] .quick-link-btn {
  padding-inline: 16px;
  white-space: nowrap;
}

/* every field in these windows takes the small fields' 6px corners (13.1),
   so no window reads softer than the rest */
body[data-style="paper"][data-theme] :is(.quick-link-field input, .reminder-link-row input, .section-title-input,
  .reminder-task-row .task-title-input, .notepad-title-input, .subtask-template-name-input, .gcal-cal-add input,
  .ideas-title-input) {
  border-radius: 6px;
}

/* Dashed "add" slots (add link, add task, add row): the add tiles' dashed rule
   (10) instead of indigo / slate fills; one dash weight and the buttons' 6px
   corners (Add Link / Add Section were 20px capsules, Add Task a 2px dash).
   The dash is the field edge (3:1), not the hairline: a 1px --np-rule dash
   was 1.8:1 on the night sheet and the slot all but vanished */
body[data-style="paper"][data-theme] :is(.btn-add-link, .btn-add-task, .btn-add-row) {
  background: transparent;
  border-color: var(--np-field-edge);
  border-style: dashed;
  border-width: 1px;
  border-radius: 6px;
  color: var(--np-ink-soft);
  transform: none;
}
body[data-style="paper"][data-theme] :is(.btn-add-link, .btn-add-task, .btn-add-row):hover {
  background: rgb(var(--np-accent-rgb) / 7%);
  border-color: var(--np-accent);
  color: var(--np-accent);
  transform: none;
}
/* remove / delete glyph buttons: red ink on a red wash */
body[data-style="paper"][data-theme] :is(.btn-delete-link, .btn-delete-task):hover {
  background: rgb(var(--np-red-rgb) / 10%);
  color: var(--np-red-t);
}
body[data-style="paper"][data-theme] .breakdown-row .btn-delete-row {
  background: rgb(var(--np-red-rgb) / 10%);
  color: var(--np-red-t);
}
body[data-style="paper"][data-theme] .breakdown-row .btn-delete-row:hover { background: rgb(var(--np-red-rgb) / 18%); }

/* Breakdown: the lock is a recessed toggle */
body[data-style="paper"][data-theme] .breakdown-lock-label { background: var(--np-wash); box-shadow: inset 0 0 0 1px var(--np-hair); }
body[data-style="paper"][data-theme] .breakdown-lock-label:hover { background: var(--np-slip-hover); }

/* Item links window: section rows are slips, the drag states in accent */
body[data-style="paper"][data-theme] .reminder-link-row.section-row { background: var(--np-slip); }
body[data-style="paper"][data-theme] .reminder-link-row.dragging { background: rgb(var(--np-accent-rgb) / 10%); }
body[data-style="paper"][data-theme] .link-top-drop-zone.drag-over { background: rgb(var(--np-accent-rgb) / 12%); border-color: var(--np-accent); }
body[data-style="paper"][data-theme] .link-drag-handle { color: var(--np-muted); opacity: 1; }
body[data-style="paper"][data-theme] .link-drag-handle:hover { color: var(--np-ink); }
body[data-style="paper"][data-theme] .link-file-badge { background: var(--np-wash); color: var(--np-muted); }
body[data-style="paper"][data-theme] .icon-links-mode-hint { color: var(--np-muted); }
/* colour buttons and presets show the user's colours as they are: only their
   rings become paper */
body[data-style="paper"][data-theme] :is(.icon-link-color-btn, .color-preset, .color-preset-small) { border-color: var(--np-rule); }
body[data-style="paper"][data-theme] :is(.icon-link-color-btn, .color-preset, .color-preset-small):hover { border-color: var(--np-ink-soft); }
/* Night: the presets are the same light pastels as by day (they are what the
   user picks, so the fill is never touched) and eight bright squares glared
   off the night sheet. Each is mounted instead: a mat of the sheet's own
   stock eats into the tile (border-box, so nothing moves and the hit area is
   the same), and an inset dark hairline with a little top shade seats the
   colour in it like a chip pasted into the page. Only the edge pixels are
   shaded; the colour inside is exact */
body[data-style="paper"][data-theme="dark"] .color-picker-dialog .color-preset {
  border: 6px solid var(--np-sheet);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 45%), inset 0 2px 5px rgb(0 0 0 / 30%), 0 0 0 1px var(--np-rule);
}
/* (hover: the ring round the mat, as by day) */
body[data-style="paper"][data-theme="dark"] .color-picker-dialog .color-preset:hover {
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 45%), inset 0 2px 5px rgb(0 0 0 / 30%), 0 0 0 1.5px var(--np-ink-soft);
}
/* the small ones (24px, the note colour popover): no room for a mat, just the
   seat: a dark edge and the inset hairline */
body[data-style="paper"][data-theme="dark"] .color-preset-small {
  border-color: rgb(0 0 0 / 55%);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 30%), inset 0 1px 3px rgb(0 0 0 / 28%);
}
/* the colour wells: the frame round the current colour is a field (the base's
   dark-mode input rule made it a slate #334155 band at night, the browser's
   cool grey by day); the colour inside is the native swatch, untouched */
body[data-style="paper"][data-theme] :is(.color-picker-content input[type="color"], .link-color-input) {
  background-color: var(--np-field);
  border-color: var(--np-rule);
}
body[data-style="paper"][data-theme] .link-color-input:hover { border-color: var(--np-ink-soft); }
body[data-style="paper"][data-theme] .link-color-popover-header {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--np-muted);
}

/* Item tasks window: rows are slips; the drop line is a plain accent rule */
body[data-style="paper"][data-theme] .reminder-task-row { background: var(--np-slip); box-shadow: 0 0 0 1px var(--np-hair); }
body[data-style="paper"][data-theme] :is(.task-drop-indicator, .task-row-drop-indicator) {
  background: var(--np-accent);
  box-shadow: none;
}
body[data-style="paper"][data-theme] .task-row-drag-handle:hover { background: var(--np-wash); }

/* Reorder sections: slips to drag; the drop target dashed in accent */
body[data-style="paper"][data-theme] .reorder-subtitle-item {
  background: var(--np-slip);
  box-shadow: 0 0 0 1px var(--np-hair), var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .reorder-subtitle-item:hover { background: var(--np-slip-hover); }
body[data-style="paper"][data-theme] .reorder-subtitle-item.drag-over {
  background: rgb(var(--np-accent-rgb) / 10%);
  border-color: var(--np-accent);
}
body[data-style="paper"][data-theme] .reorder-subtitle-item.dragging { box-shadow: 0 0 0 1px var(--np-rule), 0 10px 20px -10px rgb(var(--np-shadow-rgb) / 50%); }
body[data-style="paper"][data-theme] :is(.reorder-drag-handle, .reorder-hint) { color: var(--np-muted); }

/* Card notes (the popover's chrome; the editor text is 15): saved notes are
   slips. A note's own colour stays inline; a note without one is written
   inline as var(--np-slip) under paper (edit-mode.js defaultNoteColor). The
   colours offered are all light pastels, so on them the text is the morning
   ink in both editions (the night cream on a pastel was unreadable). A dark
   colour the page marks data-np-tone="dark" keeps the edition's ink (the
   hook for night presets; nothing sets it yet). */
body[data-style="paper"][data-theme] .notepad-saved-list { border-bottom-color: var(--np-hair); }
body[data-style="paper"][data-theme] .notepad-saved-bubble {
  color: var(--np-ink);
  box-shadow: 0 0 0 1px var(--np-hair), var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .notepad-saved-bubble:not([style*="--np-slip"], [data-np-tone="dark"]) { color: #2B2722; }
body[data-style="paper"][data-theme] .notepad-saved-bubble:hover {
  filter: none;
  box-shadow: 0 0 0 1px var(--np-rule), var(--np-lift-slip-hover);
}
/* (the note-colour disc's ring is the writing part's, 15i: 3:1 in --np-muted) */
body[data-style="paper"][data-theme] :is(.notepad-popover-close, .note-viewer-close) { color: var(--np-muted); opacity: 1; }
body[data-style="paper"][data-theme] :is(.notepad-popover-close, .note-viewer-close):hover { color: var(--np-ink); }
body[data-style="paper"][data-theme] .note-viewer-delete:hover { color: var(--np-red-t); }
/* a note shown read-only in the popover, and the viewer's page: tiles of stock
   with a hairline (the base's var(--bg) / #1e293b boxes) */
body[data-style="paper"][data-theme] .notepad-view {
  background: var(--np-tile);
  border-color: var(--np-hair);
}
body[data-style="paper"][data-theme] .notepad-view:hover { border-color: rgb(var(--np-accent-rgb) / 55%); }
body[data-style="paper"][data-theme] .notepad-view-empty { color: var(--np-muted); }
body[data-style="paper"][data-theme] .note-viewer-content {
  background: var(--np-tile);
  box-shadow: 0 0 0 1px var(--np-hair);
}

/* Device picker bubbles (the header's layout switch): paper discs; the chosen
   one is the ink ring of 13.5. They open on the masthead's Oxford rule: a
   canvas knock-out cuts the rule cleanly round them (it ran on between and
   into them). The knock-out is two copies of the bubble pushed 4px sideways
   (6px reach beside, 2px above / below): a plain 4px ring met its neighbour
   only on the straight edges, and its rounded corners left a stub of rule
   between the bubbles where the rule crosses them; a 6px ring all round
   would have bitten into the card's top edge under them */
body[data-style="paper"][data-theme] .device-mode-option {
  background: var(--np-sheet);
  border-color: var(--np-rule);
  box-shadow: -4px 0 0 2px var(--np-canvas), 4px 0 0 2px var(--np-canvas), var(--np-lift-control);
}
/* hover is a fill, never a ring: an ink-soft ring was the night's chosen ring
   exactly, so a hovered option read as chosen (the fill is opaque, so the
   rule never shows through) */
body[data-style="paper"][data-theme] .device-mode-option:hover:not(.active) {
  background: var(--np-slip-hover);
  border-color: var(--np-rule);
}
body[data-style="paper"][data-theme] .device-mode-option svg { color: var(--np-ink); }


/* --- 14n Toasts (#toast, the quick-capture toast, the separator hint) --- */
/* The night toast steps up from the slips it floats over: #3A352E was 1.08:1
   on a phone task row (#34302B), held apart only by a 12% edge, so Open /
   Undo melted into the list. One step lighter (1.3:1 on a row, its cream
   text still 8.3:1) and a firmer edge; set on the toasts themselves, so
   12.7's recipe reads them and the other toast-like slips keep the token */
body[data-style="paper"][data-theme="dark"] :is(.toast, .qc-toast, .sep-place-hint) {
  --np-toast: #47413A;
  --np-toast-edge: rgb(240 225 200 / 22%);
}


/* === 15. Writing engine (DESIGN.md 5.28) =================================== */
/* 15.0 core follow-ups · 15a documents · 15b toolbars · 15c menus · 15d blocks
   (callouts, code, tables, divider) · 15e chips, highlights, the context menu ·
   15f find, status, outline, export, templates · 15g help · 15h focus mode ·
   15i notepad, note viewer.
   One engine for the six editors and four views (writing.css). The reading
   face, its sizes, the headings, the hanging lists and the checklist position
   are 6.4; menus, popovers, the chip tip and every field are the shared
   recipes in 12 and 13. This part gives documents their print furniture (a
   dinkus for the divider, booktabs tables, a ringed checklist, an italic quote
   where nobody types) and repaints what the engine still hard-codes cool:
   link blue, brand tints, slate dividers, #e5e7eb edges.
   Nothing here may reach saved HTML: Chrome's editing commands copy a
   computed difference between two blocks into a <span style> when they move
   text, so no rule gives part of an editor a property its neighbours lack
   unless the base already does (15a quote). */


/* --- 15.0 Writing tokens ------------------------------------------------- */
/* writing tokens the engine declares on :root / [data-theme="dark"]: the Copy
   glyph of code blocks was slate (#6b7280 / #9aa5b8) */
body[data-style="paper"][data-theme] {
  --wr-icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6257' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='12' height='12' rx='2'/%3E%3Cpath d='M5 15H4.5A1.5 1.5 0 0 1 3 13.5v-9A1.5 1.5 0 0 1 4.5 3h9A1.5 1.5 0 0 1 15 4.5V5'/%3E%3C/svg%3E");
}
body[data-style="paper"][data-theme="dark"] {
  --wr-icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A39A8D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='12' height='12' rx='2'/%3E%3Cpath d='M5 15H4.5A1.5 1.5 0 0 1 3 13.5v-9A1.5 1.5 0 0 1 4.5 3h9A1.5 1.5 0 0 1 15 4.5V5'/%3E%3C/svg%3E");
}
/* the quote rule (--wr-quote-bar, ~3:1) is core's token now (1 / 2) */


/* --- 15a Documents: the print details (the type itself is 6.4) --- */

/* links: newsprint blue with a soft underline set clear of the descenders
   (writing.css and styles.css drew #3b82f6 / #60a5fa per editor) */
body[data-style="paper"][data-theme] .wr-doc a[href] {
  color: var(--np-accent);
  text-decoration-line: underline;
  text-decoration-color: rgb(var(--np-accent-rgb) / 45%);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
body[data-style="paper"][data-theme] .wr-view a[href]:hover { text-decoration-color: currentColor; }

/* the quote: full ink beside its rule (the base dimmed it to .88), set in
   italic only where nobody types. In an editor Ctrl+I on text that is italic
   by CSS writes <span style="font-style: normal"> instead of <i> (measured):
   the emphasis would be lost and the span saved, so editors stay upright */
body[data-style="paper"][data-theme] .wr-doc blockquote {
  opacity: 1;
  border-left-color: var(--wr-quote-bar);
}
body[data-style="paper"][data-theme] .wr-view blockquote { font-style: italic; }

/* the divider is a dinkus, the section break of print. Only paint: the <hr>
   stays a void block, so caret moves, Backspace and the Markdown export
   (---) behave exactly as before */
body[data-style="paper"][data-theme] .wr-doc hr {
  height: auto;
  margin: 1.1em 0;
  border: 0;
  background: none;
  overflow: visible;
  text-align: center;
  line-height: 1;
}
body[data-style="paper"][data-theme] .wr-doc hr::after {
  content: '\25C6\2009\2009\2009\25C6\2009\2009\2009\25C6';
  font: 9px/1 var(--np-sans);
  letter-spacing: 0.4em;
  margin-right: -0.4em;   /* the last letter-space, so the ornament centres */
  color: var(--np-muted);
}

/* inline code: the mono x-height (~.53) is taller than Newsreader's (.44):
   at .84em the two match; print corners. Code blocks keep their own size (15d) */
body[data-style="paper"][data-theme] .wr-doc :not(pre) > code {
  font-size: 0.84em;
  border-radius: 3px;
}

/* checklists: a printed ring on the tile, ticked with the live green (the
   base drew slate rings and #22c55e / #16a34a) */
body[data-style="paper"][data-theme] ul.checklist > li::before {
  border: 1.5px solid var(--np-muted);
  background-color: var(--np-tile);
}
body[data-style="paper"][data-theme] ul.checklist > li:hover::before { border-color: var(--np-ink-soft); }
body[data-style="paper"][data-theme] ul.checklist > li.checked {
  color: var(--np-live-t);
  text-decoration-color: rgb(var(--np-live-rgb) / 55%);
}
body[data-style="paper"][data-theme] ul.checklist > li.checked::before {
  background-color: var(--np-live-fill);
  border-color: var(--np-live-fill);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FAF7F0' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}
/* the night tick is dark ink on the deeper green (4.39:1; cream failed) */
body[data-style="paper"][data-theme="dark"] ul.checklist > li.checked::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23161412' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}
/* the read views' rings can be ticked in place: a firmer ring (writing.css 16) */
body[data-style="paper"][data-theme] .wr-view ul.checklist > li[data-wr-check]:not(.checked)::before { border-color: var(--np-ink-soft); }
body[data-style="paper"][data-theme] .wr-view ul.checklist > li[data-wr-check]:not(.checked):hover::before { border-color: var(--np-ink); }

/* The documents' own boxes. Editors are fields (13.1). The full project page
   is the dialog's sheet itself, flat: documents never sit on grain. The
   read-only views are a printed page: a tile with a hairline (the base views
   were var(--bg) / #1e293b / translucent white). */
body[data-style="paper"][data-theme] .project-editor { background-color: var(--np-sheet); }
body[data-style="paper"][data-theme] .ideas-view-content {
  background: var(--np-tile);
  border-color: var(--np-hair);
}
body[data-style="paper"][data-theme] :is(.meetings-view-content, .note-viewer-content) {
  background: var(--np-tile);
  box-shadow: inset 0 0 0 1px var(--np-hair);
}
/* Descriptions use the available pane width in both edit and read views. */
body[data-style="paper"][data-theme] .task-desc-editor {
  padding-inline-end: 12px;
}
body[data-style="paper"][data-theme] .task-desc-view-content {
  padding-inline-end: 0;
}

/* the view's Edit button and the labelled Export beside it: secondary
   buttons (the base drew #e5e7eb edges and a brand hover) */
body[data-style="paper"][data-theme] :is(.task-desc-edit-btn, .wr-view-export.wr-view-export-labeled) {
  background: var(--np-sheet);
  border-color: var(--np-rule);
  color: var(--np-ink-soft);
  box-shadow: var(--np-lift-slip);
}
body[data-style="paper"][data-theme] :is(.task-desc-edit-btn, .wr-view-export.wr-view-export-labeled):is(:hover, [aria-expanded="true"]) {
  background: linear-gradient(var(--np-wash), var(--np-wash)), var(--np-sheet);
  border-color: var(--np-rule);
  color: var(--np-ink);
}


/* --- 15b Toolbars: a recessed strip of the same stock under each editor
   (glass made them transparent; the base drew var(--bg) with #e5e7eb, slate
   at night). Projects' toolbar is a band across its page. The phone docks
   them on the keyboard as opaque bars (16g). --- */
body[data-style="paper"][data-theme] :is(.task-desc-toolbar, .notepad-toolbar, .ideas-editor-toolbar, .projects-editor-toolbar) {
  background: var(--np-slip);
  border-color: var(--np-hair);
}
body[data-style="paper"][data-theme] :is(.wr-tb-divider, .task-desc-toolbar-divider, .notepad-toolbar-divider) {
  background: var(--np-rule);
}
/* buttons: ink-soft at rest, ink on the wash when hovered or open; a pressed
   state (Bold is on) is the same wash stamped with a hairline, never the
   brand fill with white */
body[data-style="paper"][data-theme] :is(.wr-tb-btn, .task-desc-toolbar-btn, .notepad-toolbar-btn, .ideas-toolbar-btn,
  .subtask-toolbar-btn, .highlighter-toolbar-btn, .project-hyperlink-btn, .project-convert-task-btn,
  .meeting-hyperlink-btn, .meeting-convert-task-btn) {
  color: var(--np-ink-soft);
}
body[data-style="paper"][data-theme] :is(.wr-tb-btn, .task-desc-toolbar-btn, .notepad-toolbar-btn, .ideas-toolbar-btn,
  .subtask-toolbar-btn, .highlighter-toolbar-btn, .project-hyperlink-btn, .project-convert-task-btn,
  .meeting-hyperlink-btn, .meeting-convert-task-btn):hover:not(:disabled),
body[data-style="paper"][data-theme] :is(.wr-tb-btn, .task-desc-toolbar-btn, .notepad-toolbar-btn, .ideas-toolbar-btn,
  .subtask-toolbar-btn, .highlighter-toolbar-btn, .project-hyperlink-btn, .project-convert-task-btn,
  .meeting-hyperlink-btn, .meeting-convert-task-btn)[aria-expanded="true"] {
  background: var(--np-wash);
  color: var(--np-ink);
}
body[data-style="paper"][data-theme] :is(.wr-tb-btn, .task-desc-toolbar-btn, .notepad-toolbar-btn, .ideas-toolbar-btn,
  .subtask-toolbar-btn).active {
  background: var(--np-wash);
  color: var(--np-ink);
  box-shadow: inset 0 0 0 1px var(--np-rule);
}
/* the block style pill ("Text ▾") reads as a control on the strip */
body[data-style="paper"][data-theme] .wr-tb-btn.wr-tb-block {
  background: var(--np-tile);
  border-color: var(--np-rule);
  color: var(--np-ink);
  box-shadow: var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .wr-tb-btn.wr-tb-block:hover,
body[data-style="paper"][data-theme] .wr-tb-btn.wr-tb-block[aria-expanded="true"] {
  background: linear-gradient(var(--np-wash), var(--np-wash)), var(--np-tile);
}
/* the highlighter's colour bar: JS paints the glass pastel inline (always the
   day value), which vanished on the strip (1.04:1). A muted ink edge holds it
   (5:1 on the strip in both editions) and the bar shows the paper hue that
   will be applied, at full strength so 4px still names it. The inline value
   is matched to pick the hue; an unknown one keeps its own colour */
body[data-style="paper"][data-theme] .highlighter-color-indicator {
  box-shadow: 0 0 0 1px var(--np-muted);
  border-radius: 1px;
}
body[data-style="paper"][data-theme] .highlighter-color-indicator[style*="253, 230, 138"] { background-color: rgb(236 200 90) !important; }
body[data-style="paper"][data-theme] .highlighter-color-indicator[style*="167, 243, 208"] { background-color: rgb(150 196 140) !important; }
body[data-style="paper"][data-theme] .highlighter-color-indicator[style*="191, 219, 254"] { background-color: rgb(140 176 220) !important; }
body[data-style="paper"][data-theme] .highlighter-color-indicator[style*="252, 205, 213"] { background-color: rgb(228 160 170) !important; }
body[data-style="paper"][data-theme] .highlighter-color-indicator[style*="221, 204, 255"] { background-color: rgb(180 160 220) !important; }
body[data-style="paper"][data-theme="dark"] .highlighter-color-indicator[style*="253, 230, 138"] { background-color: rgb(212 182 90) !important; }
body[data-style="paper"][data-theme="dark"] .highlighter-color-indicator[style*="167, 243, 208"] { background-color: rgb(127 178 122) !important; }
body[data-style="paper"][data-theme="dark"] .highlighter-color-indicator[style*="191, 219, 254"] { background-color: rgb(134 169 209) !important; }
body[data-style="paper"][data-theme="dark"] .highlighter-color-indicator[style*="252, 205, 213"] { background-color: rgb(217 128 140) !important; }
body[data-style="paper"][data-theme="dark"] .highlighter-color-indicator[style*="221, 204, 255"] { background-color: rgb(170 150 220) !important; }
/* the swatches preview what a pick applies: the paper marks (--wr-hl-*), not
   the glass pastels JS writes inline; the stored data-highlight-color is
   untouched. A hairline holds the pale ones on the sheet */
body[data-style="paper"][data-theme] .highlighter-swatch { box-shadow: inset 0 0 0 1px rgb(var(--np-ink-rgb) / 22%); }
body[data-style="paper"][data-theme] .highlighter-swatch[title="Yellow"] { background-color: var(--wr-hl-yellow) !important; }
body[data-style="paper"][data-theme] .highlighter-swatch[title="Green"] { background-color: var(--wr-hl-green) !important; }
body[data-style="paper"][data-theme] .highlighter-swatch[title="Blue"] { background-color: var(--wr-hl-blue) !important; }
body[data-style="paper"][data-theme] .highlighter-swatch[title="Pink"] { background-color: var(--wr-hl-pink) !important; }
body[data-style="paper"][data-theme] .highlighter-swatch[title="Purple"] { background-color: var(--wr-hl-purple) !important; }
body[data-style="paper"][data-theme] .highlighter-swatch.active { border-color: var(--np-ink); }


/* --- 15c Menus (/ @ [[ : Insert, Export, ⋯), the link editor and card, the
   chip card. Their panes are the popover recipe (12.6) and rows hover with
   the accent wash token; here the literals they still carry. --- */
/* the picked row (keyboard, or the row under the pointer: the menus move the
   pick on mousemove) is an accent ring with no fill change (5.14); the
   accent 9% fill landed as a cool grey bar on cream. The pointer row also
   takes the paper wash */
body[data-style="paper"][data-theme] .wr-menu-item.is-selected {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px rgb(var(--np-accent-rgb) / 75%);
}
body[data-style="paper"][data-theme] .wr-menu-item:not(.is-disabled):hover { background: var(--np-wash); }
/* the @ list's Date section head: a kicker (never below 12px) */
body[data-style="paper"][data-theme] .task-mention-section-title {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--np-muted);
}
/* small fields inside popovers: the code language, the date / ref card */
body[data-style="paper"][data-theme] :is(.wr-lang-input, .wr-chip-input) {
  background: var(--np-field);
  border-color: var(--np-rule);
  color: var(--np-ink);
  box-shadow: inset 0 1px 1px rgb(var(--np-shadow-rgb) / 5%);
}
body[data-style="paper"][data-theme] :is(.wr-lang-input:focus, .wr-chip-input:focus-visible) {
  border-color: var(--np-accent);
  box-shadow: 0 0 0 3px rgb(var(--np-accent-rgb) / 16%);
  outline: none;
}
/* the link editor: red ink for what is wrong, the fill for Apply (the base
   wrote #dc2626 / #f87171 and dark ink on the azure brand) */
body[data-style="paper"][data-theme] :is(.wr-link-error, .wr-link-remove, .wr-link-row.is-invalid .wr-link-row-icon,
  .wr-link-card-url.is-unsafe) {
  color: var(--np-red-t);
}
body[data-style="paper"][data-theme] .wr-link-row.is-invalid .wr-link-input,
body[data-style="paper"][data-theme] .wr-link-row.is-invalid .wr-link-input:focus {
  border-color: var(--np-red);
  box-shadow: 0 0 0 3px rgb(var(--np-red-rgb) / 18%);
}
body[data-style="paper"][data-theme] .wr-link-btn:not(.wr-link-apply, .wr-link-remove):hover {
  background: var(--np-wash);
  color: var(--np-ink);
}
body[data-style="paper"][data-theme] .wr-link-remove:hover {
  color: var(--np-red-t);
  background: rgb(var(--np-red-rgb) / 8%);
}
body[data-style="paper"][data-theme] .wr-link-apply,
body[data-style="paper"][data-theme] .wr-link-apply:hover {
  background: var(--np-fill);
  color: var(--np-on-fill);
  box-shadow: inset 0 0 0 1px var(--np-fill-edge);
  filter: none;
}
/* the link card: the popover's corners (its own 12px outranks 12's), the URL
   in link ink; Remove hovers red */
body[data-style="paper"][data-theme] .wr-link-card.wr-popover { border-radius: 8px; }
body[data-style="paper"][data-theme] .wr-link-card-url { color: var(--np-accent); }
body[data-style="paper"][data-theme] .wr-link-card-btn[data-act="remove"]:hover {
  color: var(--np-red-t);
  background: rgb(var(--np-red-rgb) / 8%);
}
/* the chip card's "Date" / "Project" kicker: 11px (base 10.5px) */
body[data-style="paper"][data-theme] .wr-chip-card-kicker {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--np-muted);
}
/* the chip card's main action: the press fill (glass-action + #fff) */
body[data-style="paper"][data-theme] .wr-chip-btn.is-primary {
  background: var(--np-fill);
  color: var(--np-on-fill);
  box-shadow: inset 0 0 0 1px var(--np-fill-edge);
}
body[data-style="paper"][data-theme] .wr-chip-btn.is-primary:hover { filter: none; box-shadow: inset 0 0 0 1px var(--np-fill-edge), var(--np-lift-control); }
/* both emoji pickers (the : list's grid, the icon picker): paper, not white /
   slate (the web component falls back to the system scheme for the rest) */
body[data-style="paper"][data-theme] :is(.wr-emoji-pop, .emoji-picker-container) emoji-picker {
  --border-color: var(--np-rule);
  --input-border-color: var(--np-rule);
  --input-font-color: var(--np-ink);
  --input-placeholder-color: var(--np-muted);
  --category-font-color: var(--np-muted);
  --button-active-background: var(--np-wash);
  --button-hover-background: var(--np-wash);
  --indicator-color: var(--np-accent);
  --outline-color: var(--np-accent);
}
body[data-style="paper"][data-theme] .emoji-picker-container emoji-picker { --background: var(--np-sheet); }


/* --- 15d Blocks. Callouts, code and tables take their inks from the tokens
   (1 / 2); here paper corners, no shine, booktabs. --- */
body[data-style="paper"][data-theme] .wr-doc .wr-callout {
  border-radius: 6px;
  box-shadow: none;
}
/* the kind label is a kicker: 11px like the other small labels (the base
   9.5px was the smallest type on the page), and the first line leaves room
   for the wider word */
body[data-style="paper"][data-theme] .wr-doc .wr-callout::after {
  font-size: 11px;
  letter-spacing: 0.1em;
}
body[data-style="paper"][data-theme] .wr-doc .wr-callout > :first-child { padding-right: 74px; }
/* the night labels were measured at full ink (5.50-7.87:1), not the base's .86 */
body[data-style="paper"][data-theme="dark"] .wr-doc .wr-callout::after { opacity: 1; }
/* toggle titles weigh what headings weigh (under 600: the Bold rule) */
body[data-style="paper"][data-theme] .wr-doc .wr-toggle-title { font-weight: 580; }
/* code: a flat panel with print corners, the mono at .9em beside the serif;
   Copy is a quiet button */
body[data-style="paper"][data-theme] .wr-doc pre.wr-code {
  border-radius: 6px;
  box-shadow: none;
  font-size: 0.9em;
}
body[data-style="paper"][data-theme] .wr-doc pre.wr-code::after { border-radius: 4px; }
/* the language label: an 11px kicker in the 27px head strip (base 10px) */
body[data-style="paper"][data-theme] .wr-doc pre.wr-code::before {
  font-size: 11px;
  letter-spacing: 0.1em;
}
/* tables are booktabs: a firm rule over and under, hairlines between, the
   head on a faint tint (the base drew a rounded hairline grid) */
body[data-style="paper"][data-theme] .wr-doc table.wr-table {
  border: 0;
  border-top: 1.5px solid var(--np-rule-strong);
  border-bottom: 1.5px solid var(--np-rule-strong);
  border-radius: 0;
  border-collapse: collapse;
}
body[data-style="paper"][data-theme] .wr-doc table.wr-table :is(td, th) {
  border: 0;
  border-bottom: 1px solid var(--np-hair);
  border-left: 1px solid var(--np-hair);
}
body[data-style="paper"][data-theme] .wr-doc table.wr-table tr > :first-child { border-left: 0; }
body[data-style="paper"][data-theme] .wr-doc table.wr-table tr:last-child > * { border-bottom: 0; }
body[data-style="paper"][data-theme] .wr-doc table.wr-table th {
  font-weight: 580;
  background: var(--wr-table-head);
  border-bottom-color: var(--np-rule);
}
/* the table tools bar is a popover (12.6); its danger hover in red ink */
body[data-style="paper"] :where(.wr-table-tools) { border-radius: 8px; }
body[data-style="paper"][data-theme] .wr-tt-btn.is-danger:hover {
  color: var(--np-red-t);
  background: rgb(var(--np-red-rgb) / 10%);
}


/* --- 15e Chips, highlights, the highlighter, the context menu. Date and
   ref chips are token-driven (refs.js writes token-only rules); highlight
   marks follow --wr-hl-*, never their stored colour. --- */
/* Task pills (.project-task-highlight) store the glass task hues inline
   (cornflower, mint, neon red / orange). Shown here in the matrix's spot
   inks, washed like the @ list's task rows (18%, yellow 20%) with an ink
   underline, so a task looks the same in a document and on the dashboard.
   Display only (!important over the inline value, like the marks): the
   stored style and data-highlight-color are untouched */
body[data-style="paper"][data-theme] .project-task-highlight[data-highlight-color="red"]       { --np-pill-rgb: var(--np-red-rgb); }
body[data-style="paper"][data-theme] .project-task-highlight[data-highlight-color="orange"]    { --np-pill-rgb: var(--np-orange-rgb); }
body[data-style="paper"][data-theme] .project-task-highlight[data-highlight-color="yellow"]    { --np-pill-rgb: var(--np-yellow-rgb); --np-pill-a: 20%; }
body[data-style="paper"][data-theme] .project-task-highlight[data-highlight-color="blue"]      { --np-pill-rgb: var(--np-blue-rgb); }
body[data-style="paper"][data-theme] .project-task-highlight[data-highlight-color="completed"] { --np-pill-rgb: var(--np-live-rgb); }
body[data-style="paper"][data-theme] .project-task-highlight:is([data-highlight-color="red"], [data-highlight-color="orange"],
  [data-highlight-color="yellow"], [data-highlight-color="blue"], [data-highlight-color="completed"]) {
  background-color: rgb(var(--np-pill-rgb) / var(--np-pill-a, 18%)) !important;
  border-bottom-color: rgb(var(--np-pill-rgb) / 70%) !important;
}
/* hover deepens the wash (the base brightness filter muddied it at night) */
body[data-style="paper"][data-theme] .project-task-highlight:not(.completed):is([data-highlight-color="red"],
  [data-highlight-color="orange"], [data-highlight-color="yellow"], [data-highlight-color="blue"]):hover {
  background-color: rgb(var(--np-pill-rgb) / 28%) !important;
  filter: none;
}
/* the context menu's "Link task" filter: a field (the base was rgba white at night) */
body[data-style="paper"][data-theme] .task-link-picker-filter {
  background: var(--np-field);
  border-color: var(--np-rule);
  color: var(--np-ink);
}
body[data-style="paper"][data-theme] .task-link-picker-filter:focus {
  border-color: var(--np-accent);
  box-shadow: 0 0 0 3px rgb(var(--np-accent-rgb) / 16%);
}


/* --- 15f Find & replace, the status line, the outline, export, templates --- */
/* the find bar is a sheet with a hairline under the toolbar (base var(--bg)
   with #e5e7eb); in Projects it is a second row of the toolbar's band */
body[data-style="paper"][data-theme] .wr-find {
  background: var(--np-sheet);
  border-color: var(--np-hair);
}
body[data-style="paper"] :where(.wr-find) { border-radius: 6px; }
body[data-style="paper"][data-theme] .projects-editor-wrap > .wr-find { background: var(--np-slip); }
body[data-style="paper"][data-theme] :is(.wr-find-btn:hover:not(:disabled), .wr-find-opt:hover) {
  background: var(--np-wash);
  color: var(--np-ink);
}
/* no matches: red ink */
body[data-style="paper"][data-theme] .wr-find-count[data-empty="true"] { color: var(--np-red-t); }
/* Match case / Whole word pressed: an accent stamp, not the brand tint */
body[data-style="paper"][data-theme] .wr-find-opt[aria-pressed="true"] {
  color: var(--np-accent);
  background: rgb(var(--np-accent-rgb) / 10%);
  border-color: rgb(var(--np-accent-rgb) / 45%);
}
/* Replace / Replace all: secondary buttons */
body[data-style="paper"][data-theme] .wr-find-action {
  background: var(--np-sheet);
  border-color: var(--np-rule);
  color: var(--np-ink);
  box-shadow: var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .wr-find-action:hover:not(:disabled) {
  background: linear-gradient(var(--np-wash), var(--np-wash)), var(--np-sheet);
  border-color: var(--np-rule);
  color: var(--np-ink);
}
/* matches (CSS Highlight API): an orange spot-ink wash no highlighter shares
   (yellow / pink are ΔE00 >= 11 away) plus a thin orange underline, so a
   match never reads as a user's mark. The current one is reverse type on
   the accent plate (cream on #2C5A8C 6.6:1; the night blue plate 4.7:1): an
   accent tint matched the blue marker (ΔE00 2.7, 1.2 at night). It paints
   over the orange match, so its underline is plate-coloured to hide the
   orange one. Literal colours: highlight pseudos don't read the page's
   custom properties everywhere yet */
body[data-style="paper"][data-theme] ::highlight(wr-find) {
  background-color: rgb(196 96 24 / 34%);
  text-decoration: underline 1px rgb(168 83 25);
}
body[data-style="paper"][data-theme] ::highlight(wr-find-current) {
  background-color: rgb(44 90 140);
  color: rgb(250 247 240);
  text-decoration: underline 2px rgb(44 90 140);
}
body[data-style="paper"][data-theme] ::highlight(wr-outline-flash) { background-color: rgb(44 90 140 / 14%); }
body[data-style="paper"][data-theme="dark"] ::highlight(wr-find) {
  background-color: rgb(214 128 52 / 40%);
  text-decoration: underline 1px rgb(207 130 72);
}
body[data-style="paper"][data-theme="dark"] ::highlight(wr-find-current) {
  background-color: rgb(70 104 154);
  color: rgb(241 233 218);
  text-decoration: underline 2px rgb(70 104 154);
}
body[data-style="paper"][data-theme="dark"] ::highlight(wr-outline-flash) { background-color: rgb(143 178 216 / 18%); }
/* the status line: muted tabular figures (base); a finished checklist in live ink */
body[data-style="paper"][data-theme] .wr-st-check[data-complete="true"] { color: var(--np-live-t); }
body[data-style="paper"][data-theme] .projects-editor-wrap > .wr-status { border-top-color: var(--np-hair); }
/* the outline: the current heading in ink with an ink rule (not the brand) */
body[data-style="paper"][data-theme] .wr-outline-menu .wr-outline-item.is-active::before { background: var(--np-ink); }
body[data-style="paper"][data-theme] .wr-outline-menu .wr-outline-item.is-active .wr-menu-label { color: var(--np-ink); }
/* the H1-H3 hints at full muted ink and 11px (the base 10px at .7 read 3:1) */
body[data-style="paper"][data-theme] .wr-outline-menu .wr-outline-item .wr-menu-hint {
  opacity: 1;
  color: var(--np-muted);
  font-size: 11px;
}
/* Export ▾ in the views */
body[data-style="paper"][data-theme] .wr-view-export:is(:hover, [aria-expanded="true"]):not(.wr-view-export-labeled) {
  background: var(--np-wash);
  color: var(--np-ink);
}
/* "Start with a template": quiet chips on the empty page, inked on hover */
body[data-style="paper"][data-theme] .wr-tpl-hint > button {
  background: var(--np-sheet);
  border-color: var(--np-rule);
  color: var(--np-ink-soft);
  box-shadow: var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .wr-tpl-hint > .wr-tpl-start { color: var(--np-ink); }
body[data-style="paper"][data-theme] :is(.wr-tpl-hint > button:hover, .wr-tpl-hint > button[aria-expanded="true"]) {
  background: linear-gradient(var(--np-wash), var(--np-wash)), var(--np-sheet);
  border-color: var(--np-ink-soft);
  color: var(--np-ink);
}


/* --- 15g The help window (#wr-help). The dialog, its title and its search
   are 12 / 13; the tabs become section tabs, the chips and Reset secondary
   buttons, keys printed keycaps. --- */
body[data-style="paper"][data-theme] .wr-help-tabs { padding-bottom: 0; column-gap: 4px; }
body[data-style="paper"][data-theme] .wr-help-tab {
  background: transparent;
  border-color: transparent;
  border-radius: 0;
  box-shadow: none;
  color: var(--np-ink-soft);
}
body[data-style="paper"][data-theme] .wr-help-tab:hover { color: var(--np-ink); box-shadow: inset 0 -1px 0 var(--np-rule); }
body[data-style="paper"][data-theme] .wr-help-tab.is-active {
  color: var(--np-ink);
  border-color: transparent;
  box-shadow: inset 0 -2px 0 var(--np-ink);
}
/* the counts: neutral stamps (the base was a brand-blue lozenge) */
body[data-style="paper"][data-theme] .wr-help-tab-count {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--np-rule);
  border-radius: 3px;
  color: var(--np-ink-soft);
}
body[data-style="paper"][data-theme] .wr-help-tab.is-active .wr-help-tab-count { color: var(--np-ink); box-shadow: inset 0 0 0 1px var(--np-ink-soft); }
/* group headings: kickers */
body[data-style="paper"][data-theme] .wr-help-group-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--np-muted);
}
/* syntax chips and Reset: secondary buttons; slash commands in link ink */
body[data-style="paper"][data-theme] :is(.wr-help-chip, .wr-help-reset) {
  background: var(--np-sheet);
  border-color: var(--np-rule);
  color: var(--np-ink);
  box-shadow: var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .wr-help-chip.is-slash { color: var(--np-accent); }
/* the ␣ that says "type a space": full muted ink (the base .7 read 3:1) */
body[data-style="paper"][data-theme] .wr-help-chip .wr-help-space { opacity: 1; color: var(--np-muted); }
body[data-style="paper"][data-theme] button.wr-help-chip:is(:hover, :focus-visible) {
  border-color: var(--np-accent);
  color: var(--np-accent);
}
body[data-style="paper"][data-theme] .wr-help-reset:hover:not(:disabled) {
  background: linear-gradient(var(--np-wash), var(--np-wash)), var(--np-sheet);
}
/* Run (on the picked row): the press fill */
body[data-style="paper"][data-theme] .wr-help-run {
  background: var(--np-fill);
  border-color: var(--np-fill);
  color: var(--np-on-fill);
  box-shadow: inset 0 0 0 1px var(--np-fill-edge);
}
/* a search hit is the yellow marker; a note a yellow-ink wash */
body[data-style="paper"][data-theme] mark.wr-help-hit { background: var(--wr-hl-yellow); }
body[data-style="paper"][data-theme] .wr-help-note { background: rgb(var(--np-yellow-rgb) / 12%); }
body[data-style="paper"][data-theme] .wr-help-body:focus-visible { box-shadow: inset 0 0 0 2px rgb(var(--np-accent-rgb) / 45%); }
/* keys: printed keycaps (also in the menus' hints, the slash footer and
   focus mode's Exit). Inter 12px with tabular figures */
body[data-style="paper"][data-theme] .wr-kbd kbd {
  border: 1px solid var(--np-rule);
  border-radius: 4px;
  background: var(--np-slip);
  box-shadow: 0 1px 0 var(--np-press);
  font: 500 12px/1 var(--np-sans);
  font-variant-numeric: tabular-nums;
  color: var(--np-ink);
}


/* --- 15h Focus mode. The veil is a token (1 / 2); the bar is a sheet that
   lifts off it, Exit a secondary button, the rail an ink-marked contents --- */
body[data-style="paper"][data-theme] .wr-focus-bar {
  background: var(--np-sheet);
  border-color: var(--np-hair);
  box-shadow: var(--np-lift-control);
}
body[data-style="paper"] :where(.wr-focus-bar) { border-radius: 10px; }
body[data-style="paper"][data-theme] .wr-focus-exit {
  background: var(--np-sheet);
  border-color: var(--np-rule);
  color: var(--np-ink);
  box-shadow: var(--np-lift-slip);
}
body[data-style="paper"] :where(.wr-focus-exit) { border-radius: 6px; }
body[data-style="paper"][data-theme] .wr-focus-exit:hover {
  background: linear-gradient(var(--np-wash), var(--np-wash)), var(--np-sheet);
  border-color: var(--np-rule);
}
/* what you're writing: a kicker and a running head in the serif */
body[data-style="paper"][data-theme] :is(.wr-focus-kind, .wr-focus-rail-head) {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--np-muted);
}
body[data-style="paper"][data-theme] .wr-focus-title {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-size: 17px;
  font-weight: 600;
  color: var(--np-ink-soft);
  opacity: 1;
}
body[data-style="paper"][data-theme] .wr-focus-rail-item:hover { background: var(--np-wash); }
body[data-style="paper"][data-theme] .wr-focus-rail-item[aria-current] {
  border-left-color: var(--np-ink);
  color: var(--np-ink);
}
/* the phone's focus page: the checklist ring follows the first line at 19px
   too (mobile-write.css pins it to the glass 17px line) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .wr-focus .wr-focus-column > .wr-editor ul.checklist > li::before {
  top: calc(0.5lh - 8px);
}


/* --- 15i The notepad and the note viewer. The popover and the viewer
   dialog are 12; the editor is a field (13.1). --- */
body[data-style="paper"][data-theme] .notepad-title-input {
  background: var(--np-field);
  border-color: var(--np-rule);
  color: var(--np-ink);
  box-shadow: inset 0 1px 1px rgb(var(--np-shadow-rgb) / 5%);
}
body[data-style="paper"][data-theme] .notepad-title-input:focus {
  border-color: var(--np-accent);
  box-shadow: 0 0 0 3px rgb(var(--np-accent-rgb) / 16%);
}
body[data-style="paper"][data-theme] .notepad-saved-list { border-color: var(--np-hair); }
/* saved notes are slips: the note's own colour stays inline (the default is
   the paper slip, edit-mode.js), a hairline holds any colour on the sheet */
body[data-style="paper"][data-theme] .notepad-saved-bubble {
  color: var(--np-ink);
  border-radius: 6px;
  box-shadow: 0 0 0 1px var(--np-hair), var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .notepad-saved-bubble:hover {
  filter: none;
  transform: none;
  box-shadow: 0 0 0 1px var(--np-rule), var(--np-lift-slip-hover);
}
body[data-style="paper"][data-theme] .notepad-bubble-pin { opacity: 1; color: var(--np-ink); }
/* checklist progress: a neutral stamp, opaque so it reads on any note colour;
   done in live ink */
body[data-style="paper"][data-theme] .notepad-bubble-progress {
  background: var(--np-tile);
  box-shadow: inset 0 0 0 1px var(--np-rule);
  border-radius: 3px;
  color: var(--np-ink-soft);
}
body[data-style="paper"][data-theme] .notepad-bubble-progress.is-done,
body[data-style="paper"][data-theme] .notepad-saved-bubble .notepad-bubble-progress.is-done {
  background: var(--np-tile);
  box-shadow: inset 0 0 0 1px rgb(var(--np-live-rgb) / 55%);
  color: var(--np-live-t);
}
body[data-style="paper"][data-theme] .note-viewer-progress.is-done { color: var(--np-live-t); }
/* the note colour button: the swatch keeps its colour, a muted ink ring
   round it (the rule ring read 1.5:1, so the default slip looked empty) */
body[data-style="paper"][data-theme] .notepad-color-btn { border-color: var(--np-muted); }
body[data-style="paper"][data-theme] .notepad-color-btn:hover { border-color: var(--np-ink-soft); box-shadow: var(--np-lift-slip-hover); }


/* === 16. Phone shell (DESIGN.md 5.29) ===================================== */
/* The mobile shell (mobile*.css) on paper. Every rule is
   html[data-shell="mobile"] body[data-style="paper"][data-theme] + the
   structural rule's exact tail, so it outranks the shell's own structural
   rules by (0,2,1) and the desktop paper rules by (0,1,1); the glass rules
   (data-style="glass") never match here. What this part repaints is what the
   glass rules used to give: fills, selected states, edges. The opaque minimum
   backings (4.6), the flat crystals (4.5), the scrims and sheet stock (12.1 /
   12.3), the buttons (13.4) and the document sizes (6.4) are the core's.
   Spot hues reach the shell two ways: the classes (.mx-tone-*, the pane
   columns) are remapped here; the inline --priority-rgb the units write
   (tasks-view / composer / search-view / card-items.js) is already
   var(--np-<c>-rgb, <glass triplet>), so it resolves to the spot ink on paper
   and to the old hue on glass.
   Geometry the shell owns stays as it is, except where a glass rule carried
   it (the carry dock's padding) or a printed edge needs it (sheet, chip,
   row corners). Nothing here animates. */

/* --- 16a Chrome: top bar, sticky bars, dock, the +, lane, carry ----------- */

/* The top bar is the masthead: opaque newsprint (rows scroll under it, so a
   translucent bar would show them through) over a thick-thin Oxford rule,
   thick (2px) over thin (1px), the desktop masthead's rule. No grain: the bar
   is chrome, not a sheet. */
html[data-shell="mobile"] body[data-style="paper"][data-theme] #mx-topbar {
  background-color: var(--np-canvas);
  background-image: linear-gradient(to top, var(--np-rule-strong) 0 1px, transparent 1px 3px,
    var(--np-rule-strong) 3px 5px, transparent 5px);
  background-size: 100% 5px;
  background-position: bottom;
  background-repeat: no-repeat;
  box-shadow: none;
}
/* the screen's name is the headline; the line under it a dateline */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-slot-title {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-slot-sub {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--np-muted);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-icon-btn { color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-icon-btn:active { background-color: var(--np-wash); }
/* the structural ring is a cool hard-coded blue */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-icon-btn, #mx-due-lens):focus-visible {
  outline: 2px solid var(--np-focus);
  outline-offset: -2px;
}
/* the avatar: a photo in a hairline frame, like the masthead's */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-avatar, .mx-more-photo) { box-shadow: 0 0 0 1px var(--np-rule); }
/* sync: static dots (4.5 gives them a canvas knockout); amber = waiting,
   red = failed, a muted ring = signed out, nothing = synced */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-sync-dot[data-state="pending"] { background: var(--np-orange); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-sync-dot[data-state="error"] { background: var(--np-red); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-sync-dot[data-state="out"] {
  border-color: var(--np-muted);
  box-shadow: 0 0 0 1.5px var(--np-canvas);
}
/* the due lens is the desktop badge: a square red stamp for a count, a round
   paper lens with a hairline when nothing is due (the shape says it too) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-due-badge.notification-badge {
  background: var(--np-badge);
  color: var(--np-on-badge);
  border-radius: 3px;
  box-shadow: 0 0 0 2px var(--np-canvas);
  font-weight: 700;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-due-badge.notification-badge.is-clear {
  background: var(--np-sheet);
  color: var(--np-ink-soft);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--np-rule), 0 0 0 3px var(--np-canvas);
}

/* Sticky chip bars: the same newsprint as the top bar, a hairline under them */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-tasks-sub, .mx-write-chips) {
  background-color: var(--np-canvas);
  background-image: none;
  box-shadow: 0 1px 0 var(--np-hair);
}
/* A landscape phone centres the column, so the flat bar would float on the
   grain as a slab with hard ends: it bleeds to both edges like the top bar
   (a canvas spread, clipped to the bar's own height plus its hairline).
   Touch screens only: the computer's preview column must not paint its desk. */
@media (orientation: landscape) and (pointer: coarse) {
  html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-tasks-sub, .mx-write-chips) {
    box-shadow: 0 1px 0 var(--np-hair), 0 0 0 100vmax var(--np-canvas);
    clip-path: inset(0 -100vmax -1px);
  }
}

/* The dock: a paper strip with a hairline, no grain beside its labels */
html[data-shell="mobile"] body[data-style="paper"][data-theme] #mx-dock {
  background-color: var(--np-sheet);
  background-image: none;
  border: 1px solid var(--np-hair);
  border-radius: 18px;
  box-shadow: var(--np-lift-control);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tab {
  color: var(--np-muted);
  border-radius: 12px;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tab[aria-selected="true"] { color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tab:active { background-color: var(--np-wash); }
/* The active tab: a short printed rule above the glyph. top: 4px in every
   orientation, so it still marks the tab in landscape, where the labels hide
   (mobile.css 9; the glass pool re-centred itself there, this never does) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 4px;
  width: 20px;
  height: 2px;
  margin-left: -10px;
  border-radius: 0;
  background: var(--np-ink);
  pointer-events: none;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tab:focus-visible {
  outline: 2px solid var(--np-focus);
  outline-offset: -3px;
}

/* The +: the press colour (an ink disc by day, the blue plate by night: 3.06:1
   on the night canvas, never a cream glare spot) set into the dock by a
   canvas ring and a hairline. 4.4 hides its halo and rim. */
html[data-shell="mobile"] body[data-style="paper"][data-theme] #mx-plus {
  background: var(--np-fill);
  color: var(--np-on-fill);
  border: 0;
  box-shadow: inset 0 0 0 1px var(--np-fill-edge), 0 0 0 4px var(--np-canvas), 0 0 0 5px var(--np-hair),
    0 10px 22px -10px rgb(var(--np-shadow-rgb) / 55%);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] #mx-plus:focus-visible {
  outline: 2px solid var(--np-focus);
  outline-offset: 6px;
}

/* Now-playing lane: a sheet with a green inked edge, a still green orb, the
   clock in green tabular figures */
html[data-shell="mobile"] body[data-style="paper"][data-theme] #mx-live {
  background-color: var(--np-sheet);
  background-image: none;
  border: 1px solid rgb(var(--np-live-rgb) / 55%);
  border-radius: 12px;
  box-shadow: inset 4px 0 0 var(--np-live), var(--np-lift-control);
  overflow: hidden;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-live-orb {
  background: var(--np-live);
  box-shadow: none;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-live-clock {
  color: var(--np-live-t);
  font-variant-numeric: tabular-nums;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-live-stop { color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-live-stop-lens {
  background: var(--np-wash);
  box-shadow: inset 0 0 0 1px var(--np-rule);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-live-stop:active .mx-live-stop-lens { background: var(--np-slip-hover); }

/* Carry dock (Lift & place): a sheet ringed in accent. Its padding and gap
   lived in the glass rule (mobile.css 5), so they are restated: the same
   geometry in both looks. */
html[data-shell="mobile"] body[data-style="paper"][data-theme] #mx-carry {
  background-color: var(--np-sheet);
  background-image: none;
  border: 1.5px solid rgb(var(--np-accent-rgb) / 60%);
  border-radius: 12px;
  box-shadow: var(--np-lift-control);
  padding: 0 6px 0 14px;
  gap: 8px;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] #mx-carry .mx-carry-grip { color: var(--np-accent); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-carry-btn {
  background: var(--np-sheet);
  border-color: var(--np-rule);
  color: var(--np-ink);
  box-shadow: var(--np-lift-slip);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-carry-btn:active { background: var(--np-slip-hover); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-carry-move,
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-carry-move:active {
  background: var(--np-fill);
  border-color: var(--np-fill);
  color: var(--np-on-fill);
  box-shadow: inset 0 0 0 1px var(--np-fill-edge);
}


/* --- 16b Sheets, pushed screens, pickers ---------------------------------- */
/* 12.1 / 12.3 paint the scrims and the stock; here: the grabber, the titles
   (a serif headline over a hairline: the sheet already has its heavy top
   edge), and the time / date pickers, whose chosen values are always solid
   (the press colour + bold), never a shade. */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-grabber {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--np-rule);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-pushed-bar { border-bottom-color: var(--np-hair); }
/* A pushed screen (Search, Completed) is a page, so it is the newsprint the
   tabs sit on, grain and mottle included (12.3 laid it flat, a plastic page
   between two papered ones): the root's two static tiles over the canvas */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-pushed {
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .27  0 0 0 0 .2  0 0 0 0 .12  0 0 0 .9 -.38'/></filter><rect width='180' height='180' filter='url(%23g)' opacity='.55'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='560' height='560'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='.006 .011' numOctaves='3' seed='7' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .35  0 0 0 0 .2  0 0 0 .5 -.2'/></filter><rect width='560' height='560' filter='url(%23m)' opacity='.26'/></svg>");
  background-size: 180px 180px, 560px 560px;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme="dark"] .mx-pushed {
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .95  0 0 0 0 .9  0 0 0 0 .8  0 0 0 .7 -.32'/></filter><rect width='180' height='180' filter='url(%23g)' opacity='.16'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='560' height='560'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='.006 .011' numOctaves='3' seed='7' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .7 -.25'/></filter><rect width='560' height='560' filter='url(%23m)' opacity='.32'/></svg>");
}
/* the pickers rise like the sheets: the same 16px top corners */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tp-sheet { border-radius: 16px 16px 0 0; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-sheet-title, .mx-pushed-title, .mx-actions-title,
  .mx-confirm-title, .mx-tp-title, .mx-time-title) {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.008em;
  color: var(--np-ink);
}
/* "Mark as complete?" is a sheet title too (a question over the task), so it
   takes the same hairline as More's and the Move sheet's that open from the
   same row; the actions sheet's head is the task itself, a headline without */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-sheet-title, .mx-confirm-title) {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--np-rule);
}
/* small caps-style kickers in sheets and lists: never under 12px (comfort) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-sec-label, .mx-tp-caption, .mx-today-head, .mx-write-label,
  .mx-more-heading, .mx-caption, .mx-sub-caption, .mx-link-divider, .mx-panel-title, .mx-compose-today-label,
  .mx-compose-help-title) {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--np-muted);
}
/* the busy strip's kicker sits right above "Due & overdue": the same size
   (the shell sets it to 11.5px; a compound selector kept out of the list
   above so it can't raise that whole list's specificity) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-busy .busy-strip-title {
  font-size: 12px;
  letter-spacing: 0.12em;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-sheet-note { color: var(--np-muted); }

/* Typed time / date fields: the paper field in the edge that identifies a
   field (--np-field-edge, 3.2:1; the decorative --np-rule was 1.5:1), an
   accent edge + soft ring on focus, a red edge + ring when unreadable */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-tf-text, .mx-df-text) {
  background: var(--np-field);
  border-color: var(--np-field-edge);
  color: var(--np-ink);
  box-shadow: inset 0 1px 1px rgb(var(--np-shadow-rgb) / 5%);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-tf-text, .mx-df-text):focus {
  outline: none;
  border-color: var(--np-accent);
  box-shadow: 0 0 0 3px rgb(var(--np-accent-rgb) / 16%);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-tf-text, .mx-df-text)[aria-invalid="true"] {
  border-color: var(--np-red);
  box-shadow: 0 0 0 3px rgb(var(--np-red-rgb) / 18%);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-tf-label, .mx-df-label, .mx-df-clear) { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-tf-hint, .mx-df-hint) { color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-df-hint.is-reading { color: var(--np-muted); }
/* the error dots: the danger fill is too dark to read on the night sheet */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-tf-hint, .mx-df-hint).is-error::before,
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tp-length.is-invalid::before { background: var(--np-red); }
/* round keys beside the fields: secondary buttons */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-tf-clock, .mx-df-cal) {
  background: var(--np-sheet);
  border-color: var(--np-rule);
  color: var(--np-ink);
  box-shadow: var(--np-lift-slip);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-tf-clock, .mx-df-cal, .mx-df-clear):active { background: var(--np-slip-hover); }
/* AM | PM tracks: recessed; a guessed side gets a dashed edge (in muted ink
   so it holds 3:1; the line under the field says "Reads as ...") */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-tf-ampm, .mx-tp-ampm) {
  background: var(--np-wash);
  box-shadow: inset 0 0 0 1px var(--np-hair);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tf-ampm.is-guessed { border-color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-tf-half, .mx-tp-half) { color: var(--np-ink); }

/* The picker sheets: slips to tap (hours, minutes, lengths, nudges, quick dates) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-tp-cell, .mx-tp-len, .mx-tp-nudge, .mx-dp-chip) {
  background: var(--np-slip);
  border-color: var(--np-hair);
  color: var(--np-ink);
  box-shadow: var(--np-lift-slip);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-tp-cell, .mx-tp-len, .mx-tp-nudge, .mx-dp-chip):disabled { box-shadow: none; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-tp-cell, .mx-tp-len, .mx-tp-nudge, .mx-tp-part, .mx-dp-chip):not(:disabled):active {
  background-color: var(--np-slip-hover);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-tp-sub, .mx-dp-chip-sub) { color: var(--np-muted); }
/* The readout: [3] : [30]; the part being set takes an accent edge and a
   light accent wash, bold (its 2px border is the ring, so no second one) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tp-part {
  background: var(--np-field);
  border-color: var(--np-rule);
  color: var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tp-part[aria-pressed="true"] {
  background: rgb(var(--np-accent-rgb) / 12%);
  border-color: var(--np-accent);
  box-shadow: none;
  font-weight: 700;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tp-colon { color: var(--np-ink); }
/* Chosen = solid press colour + bold: the AM / PM in effect, the picked hour /
   minute / length, the date in effect */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-tf-half, .mx-tp-half, .mx-tp-cell, .mx-tp-len, .mx-dp-chip)[aria-pressed="true"],
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-tf-half, .mx-tp-half, .mx-tp-cell, .mx-tp-len, .mx-dp-chip)[aria-pressed="true"]:active {
  background: var(--np-fill);
  border-color: var(--np-fill);
  color: var(--np-on-fill);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--np-fill-edge);
}
/* the chosen chip's day: full strength (the night plate holds cream at only
   4.70:1, so any fade drops it under AA); its size and weight rank it */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-dp-chip[aria-pressed="true"] .mx-dp-chip-sub {
  color: inherit;
  opacity: 1;
}


/* --- 16c Shared controls: segment, chips, buttons, tones, dots ------------ */

/* Segment (Primary | Secondary, More's Light | Dark and Style, the Move
   sheet's group, the preview switch): a recessed track, the chosen half a
   raised tile. A shade alone can't say "chosen" (by night the tile is darker
   than the track), so it carries an ink-soft ring (>= 3:1 on the track in
   both editions), an ink rule along its foot and bold type, the others 500. */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-seg {
  background: var(--np-wash);
  box-shadow: inset 0 0 0 1px var(--np-hair);
  border-radius: 10px;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-seg-opt, .mx-switch-opt) {
  color: var(--np-ink-soft);
  font-weight: 500;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-seg-opt { border-radius: 7px; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-seg-opt[aria-selected="true"], .mx-switch-opt[aria-pressed="true"]) {
  background: var(--np-tile);
  color: var(--np-ink);
  font-weight: 700;
  box-shadow: 0 0 0 1px var(--np-ink-soft), inset 0 -2px 0 var(--np-ink), 0 1px 2px rgb(var(--np-shadow-rgb) / 14%);
}
/* Night: the cream wash lifted the track above the sheet (#332F2C on
   #252220), so the chosen tile was only 1.29:1 off it and read as part of
   it. The track is pressed into the night stock instead (a black shade,
   1.10:1 under the sheet, like the day track's 1.11:1) and the chosen half
   a tile lifted by the ink: 1.71:1 off the track in More, 1.82:1 on the top
   bar. The day pair (a 6% shade, the tile) already reads. */
html[data-shell="mobile"] body[data-style="paper"][data-theme="dark"] .mx-seg { background: rgb(0 0 0 / 24%); }
html[data-shell="mobile"] body[data-style="paper"][data-theme="dark"] :is(.mx-seg-opt[aria-selected="true"], .mx-switch-opt[aria-pressed="true"]) {
  background: color-mix(in srgb, var(--np-ink) 12%, var(--np-tile));
}

/* Chips: paper tabs. Priority dots become ink diamonds (a printer's
   ornament: the same mark as the desktop column heads); the alert dot stays
   round. */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-chip {
  background: var(--np-sheet);
  border: 1px solid var(--np-rule);
  border-radius: 8px;
  box-shadow: var(--np-lift-slip);
  color: var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-chip:active { background-color: var(--np-slip-hover); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-chip-count { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-lens-chip .mx-chip-count { color: var(--np-ink); opacity: 0.8; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-chip-dot {
  width: 9px;
  height: 9px;
  border-radius: 1px;
  transform: rotate(45deg);
  box-shadow: none;
}
/* A chosen colour is a printed tab: a 12% tint of its ink, the edge in the
   ink (1.5px without changing the chip's size) and a 3px rule along its foot.
   The count stays ink (AA on every hue). */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-lens-chip[aria-pressed="true"]:not([data-lens="all"]) {
  background: color-mix(in srgb, rgb(var(--priority-rgb)) 12%, var(--np-tile));
  border-color: rgb(var(--priority-rgb));
  box-shadow: inset 0 0 0 0.5px rgb(var(--priority-rgb)), inset 0 -3px 0 rgb(var(--priority-rgb));
  color: var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-lens-chip[aria-pressed="true"]:not([data-lens="all"]) .mx-chip-count {
  color: var(--np-ink);
  opacity: 1;
}
/* All, and every neutral chip (Write's filters, Pick...), chosen = filled */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-chip[aria-pressed="true"]:is([data-lens="all"], :not(.mx-lens-chip)) {
  background: var(--np-fill);
  border-color: var(--np-fill);
  color: var(--np-on-fill);
  box-shadow: inset 0 0 0 1px var(--np-fill-edge);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-chip[aria-pressed="true"]:is([data-lens="all"], :not(.mx-lens-chip)) :is(.mx-chip-count, .mx-chip-label) {
  color: var(--np-on-fill);
  opacity: 1;
}
/* An empty colour still takes taps and drops, so it is never faded (the
   shell's 55% opacity put its count at 2.6:1): it says "empty" in ink, a
   dashed edge, no lift and a muted count; the diamond keeps its hue */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-lens-chip.is-empty {
  opacity: 1;
  border-style: dashed;
  box-shadow: none;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-lens-chip.is-empty:not([aria-pressed="true"]) .mx-chip-count {
  color: var(--np-muted);
  opacity: 1;
}
/* overdue: a still red dot knocked out of the chip */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-chip-hot {
  background: var(--np-red);
  box-shadow: 0 0 0 2px var(--np-sheet);
}
/* Drop targets while a row is carried: an accent ring, firmer under the finger */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-chip, .mx-seg-opt).is-target {
  box-shadow: 0 0 0 1.5px rgb(var(--np-accent-rgb) / 70%);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-chip, .mx-seg-opt).is-hover {
  box-shadow: 0 0 0 2.5px var(--np-accent);
  background-image: none;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-chip-quiet { color: var(--np-ink-soft); }

/* Buttons: 13.4 paints the three kinds; a little squarer than the glass
   capsule, like the rows they sit with */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-btn { border-radius: 10px; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-link-btn { color: var(--np-accent); }

/* Tones: the spot ink for a row wherever it sits (pane, Today, ghost, sheets) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tone-red    { --priority-rgb: var(--np-red-rgb); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tone-orange { --priority-rgb: var(--np-orange-rgb); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tone-yellow { --priority-rgb: var(--np-yellow-rgb); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tone-blue   { --priority-rgb: var(--np-blue-rgb); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-coming-mark[data-color="red"]    { --mx-dot-rgb: var(--np-red-rgb); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-coming-mark[data-color="orange"] { --mx-dot-rgb: var(--np-orange-rgb); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-coming-mark[data-color="yellow"] { --mx-dot-rgb: var(--np-yellow-rgb); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-coming-mark[data-color="blue"]   { --mx-dot-rgb: var(--np-blue-rgb); }

/* Priority dots (4.5 already took their glow): ink diamonds, a touch smaller
   so the turned square paints about as wide as the old disc */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-pane-dot, .mx-actions-dot, .mx-task-dot, .mx-done-dot,
  .mx-tile-dot, .mx-today-pane-dot, .mx-row-dot, .mx-panel-item-dot, .mx-compose-target-dot) {
  width: 8px;
  height: 8px;
  border-radius: 1px;
  transform: rotate(45deg);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-actions-head .mx-actions-dot { width: 10px; height: 10px; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-done-dot { width: 7px; height: 7px; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-coming-mark.is-dot::before {
  width: 7px;
  height: 7px;
  border-radius: 1px;
  transform: rotate(45deg);
}
/* category dots stay round (they are the category's own colour), unlit */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-panel-cat-dot { box-shadow: none; }

/* Due / overdue / meeting chips (rows, panes, the actions sheet): outlined
   stamps. Restated for the shell: mobile.css 9b gives the overdue chip a
   solid white / maroon backing that outranks the desktop paper rule at night. */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .today-chip {
  background: transparent;
  box-shadow: inset 0 0 0 1px currentColor;
  border-radius: 3px;
  letter-spacing: 0.02em;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .today-chip.is-today   { color: var(--np-blue-t); background: rgb(var(--np-blue-rgb) / 8%); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .today-chip.is-overdue { color: var(--np-red-t); background: rgb(var(--np-red-rgb) / 8%); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .today-chip.is-context { color: var(--np-ink-soft); background: transparent; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .today-chip.is-meeting { color: rgb(var(--np-plum-rgb)); background: rgb(var(--np-plum-rgb) / 8%); }


/* --- 16d Tasks: panes, rows, ring, gestures, sheets ----------------------- */

/* Panes are the matrix columns: a sheet tinted 4% (6% at night) with its spot
   ink, a 3px rule of that ink along the top, the sheet's own hairline and lift */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-pane.eisenhower-priority-card {
  background: color-mix(in srgb, rgb(var(--priority-rgb)) var(--np-col-tint), var(--np-sheet));
  border: 0;
  border-top: 3px solid rgb(var(--priority-rgb));
  border-radius: 4px 4px 12px 12px;
  box-shadow: var(--np-lift-sheet);
}
/* the head: a diamond, the serif name, the count in muted tabular figures */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-pane-title, .mx-today-pane-head) { color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-pane-label, .mx-today-pane-label) {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.005em;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-pane-count, .mx-today-pane-count) {
  font-family: var(--np-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--np-muted);
  font-variant-numeric: tabular-nums;
}
/* An empty pane (All lens) is a drop target, not a disabled one: full
   opacity (the shell's 60% took its name to 3.9:1), the name and count in
   muted ink, the rule over it at half strength */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-pane.eisenhower-priority-card.is-empty {
  opacity: 1;
  border-top-color: rgb(var(--priority-rgb) / 45%);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-pane.is-empty :is(.mx-pane-title, .mx-pane-count) { color: var(--np-muted); }
/* an empty colour (All lens): the editorial "no tasks" line */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-pane-empty {
  font-family: var(--np-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--np-muted);
}
/* a carried row over a pane head: the pane's ink rings it */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-pane-head.is-hover {
  box-shadow: inset 0 0 0 1.5px rgb(var(--priority-rgb) / 75%);
  background-image: none;
  background-color: rgb(var(--priority-rgb) / 10%);
}

/* Rows: the matrix slip. Secondary = a plain tile, 500; Primary (the lead
   story) = 600, a 4px spot-ink edge and a 5% tint, so it is louder on weight,
   edge and tint. The base .task-bubble-<c> pastels and their coloured text
   (rows carry the class) are overruled here. */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-task, .mx-today-row).eisenhower-task {
  background: var(--np-tile);
  border: 1px solid var(--np-hair);
  border-radius: 10px;
  box-shadow: var(--np-lift-slip);
  color: var(--np-ink);
  font-weight: 500;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-task, .mx-today-row).eisenhower-task.eisenhower-task-pinned {
  background: color-mix(in srgb, rgb(var(--priority-rgb, 112 104 92)) 5%, var(--np-tile));
  border-color: color-mix(in srgb, rgb(var(--priority-rgb, 112 104 92)) 26%, transparent);
  box-shadow: inset 4px 0 0 rgb(var(--priority-rgb, 112 104 92)), var(--np-lift-slip);
}
/* Inside a pane the segment already sorts Primary from Secondary and the pane
   is tinted and ruled in the same ink, so a Primary row keeps only its weight
   and its 4px edge: a plain tile and hairline (six red marks a row was too
   loud). Today, Search and the ghost mix the two, so they keep the tint.
   :where() keeps it level with the running-timer hairline, which follows. */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-pane:where(:not(.mx-today-pane)) .mx-task.eisenhower-task.eisenhower-task-pinned {
  background: var(--np-tile);
  border-color: var(--np-hair);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-pane:where(:not(.mx-today-pane)) .mx-task.eisenhower-task.eisenhower-task-pinned:active {
  background: var(--np-slip-hover);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-task, .mx-today-row).eisenhower-task:active {
  background: var(--np-slip-hover);
}
/* the slot, its underlay and the gestures' clip follow the row's corners */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-task-slot, .mx-swipe-under, .mx-today-slot) { border-radius: 10px; }
/* a row whose timer runs: a green hairline round it (the pinned one keeps its ink edge) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-task.eisenhower-task:has(.task-timer.is-running) {
  border-color: rgb(var(--np-live-rgb) / 55%);
}
/* Today: a parent whose subtask is due steps back in paint, not opacity, as
   on the desktop (14d.3): the shell's 0.82 took its "Subtask due" stamp to
   4.53:1. No stock and no lift (the pane's tint shows through), the
   structural dash in the firmer rule, its words in the soft ink; a Primary
   one keeps its 4px ink edge. .eisenhower-task lifts it over the pinned
   row's tint. The fallback row (.mx-today-row) carries the desktop class. */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-task.is-context, .mx-today-row.today-task-context).eisenhower-task {
  opacity: 1;
  background: transparent;
  border-color: var(--np-rule);
  box-shadow: none;
  color: var(--np-ink-soft);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-task.is-context, .mx-today-row.today-task-context).eisenhower-task.eisenhower-task-pinned {
  box-shadow: inset 4px 0 0 rgb(var(--priority-rgb, 112 104 92));
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-task.is-context, .mx-today-row.today-task-context).eisenhower-task:active {
  background: var(--np-wash);
}
/* while it slides (or waits on "Mark as complete?") Done lies under it: the
   row takes the pane's own tinted stock, so it looks the same and stays opaque */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-task-slot[data-swipe] > .mx-task.eisenhower-task.is-context,
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-slot.is-swiping > .mx-today-row.eisenhower-task.today-task-context {
  background-color: color-mix(in srgb, rgb(var(--priority-rgb, 112 104 92)) var(--np-col-tint), var(--np-sheet));
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-task-title, .mx-today-title) { color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-task.is-context, .mx-today-row.today-task-context) :is(.mx-task-title, .mx-today-title) {
  color: var(--np-ink-soft);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-task-meta { color: var(--np-ink-soft); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-task .mx-row-actions:focus-visible {
  background: var(--np-sheet);
  color: var(--np-ink);
  outline-color: var(--np-focus);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-task.eisenhower-task, .mx-today-row.eisenhower-task):focus-visible,
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-check:focus-visible {
  outline-color: var(--np-focus);
}

/* The complete ring: paper inside a 2px ring of the spot ink (yellow holds
   3.23:1 on the tile); asking = green; completing = the flat live fill (4.5) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-ring, .mx-today-ring) {
  background: var(--np-tile);
  border: 2px solid rgb(var(--priority-rgb, 107 98 87));
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-check:active .mx-ring,
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-today-check, .mx-today-sub-check):active .mx-today-ring {
  box-shadow: inset 0 0 0 4px rgb(var(--priority-rgb, 107 98 87) / 18%);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-task-slot[data-confirm] .mx-ring {
  border-color: var(--np-live);
  box-shadow: 0 0 0 3px rgb(var(--np-live-rgb) / 18%);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .is-completing .mx-today-ring {
  background: var(--np-live-fill);
  border-color: transparent;
  box-shadow: none;
  color: var(--np-on-live);
}

/* The stopwatch on a row: full-opacity muted ink at rest (5.63:1, the glass
   row's 66% was 2.7:1), the green disc while it runs */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-task, .mx-today-row) .task-timer-btn {
  color: var(--np-muted);
  opacity: 1;
  background: none;
  box-shadow: none;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-task, .mx-today-row) .task-timer-btn:active { color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-task, .mx-today-row) .task-timer.is-running .task-timer-btn {
  background: var(--np-live-fill);
  color: var(--np-on-live);
  box-shadow: 0 0 0 2px rgb(var(--np-live-rgb) / 22%);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-task, .mx-today-row) .task-timer-time {
  color: var(--np-live-t);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Swipe: the row stays opaque paper while it slides; Done underneath is the
   live fill (4.5), the reveal buttons slips. Their glass highlights go. */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-task-slot[data-swipe] > .mx-task.eisenhower-task:not(.eisenhower-task-pinned) {
  background-color: var(--np-tile);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-under-done, .mx-under-btn) { background-image: none; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-under-more { box-shadow: inset 1px 0 0 var(--np-rule); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-under-btn:active { background-color: var(--np-slip-hover); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-under,
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-slot.is-armed .mx-today-under {
  background: var(--np-live-fill);
  color: var(--np-on-live);
}

/* Lift: the ghost is the row picked up off the page (a firmer edge, a deeper
   shadow, no glow) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-ghost > .mx-task.eisenhower-task {
  background-color: var(--np-tile);
  box-shadow: 0 0 0 1px var(--np-rule), 0 16px 30px -12px rgb(var(--np-shadow-rgb) / 55%);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-ghost > .mx-task.eisenhower-task.eisenhower-task-pinned {
  background-color: color-mix(in srgb, rgb(var(--priority-rgb)) 5%, var(--np-tile));
  box-shadow: inset 4px 0 0 rgb(var(--priority-rgb)), 0 0 0 1px var(--np-rule),
    0 16px 30px -12px rgb(var(--np-shadow-rgb) / 55%);
}
/* Lift & place: every gap is a still accent rule (4.3 stopped its breathing
   pool); the tapped / focused one inks in full */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-gap::before { content: none; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-gap-beam {
  background: rgb(var(--np-accent-rgb) / 45%);
  filter: none;
  opacity: 1;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-gap:is(:focus-visible, :active) .mx-gap-beam { background: var(--np-accent); }

/* The footer: Completed is a tile; the tip a muted line */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-completed-link {
  background: var(--np-tile);
  border-color: var(--np-hair);
  border-radius: 10px;
  color: var(--np-ink);
  box-shadow: var(--np-lift-slip);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-completed-link:active { background: var(--np-slip-hover); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-tasks-hint, .mx-hint-close, .mx-completed-chev) { color: var(--np-muted); }

/* The actions sheet: the task as a headline under its diamond; Done / Timer /
   Move as tiles (Done in the live fill, a running timer the live fill too) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-actions-meta { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-big-btn {
  background: var(--np-tile);
  border-color: var(--np-hair);
  border-radius: 12px;
  color: var(--np-ink);
  box-shadow: var(--np-lift-slip);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-big-btn:active { background: var(--np-slip-hover); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-big-done, .mx-big-timer.is-running),
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-big-done, .mx-big-timer.is-running):active {
  background: var(--np-live-fill);
  border-color: var(--np-live-fill);
  color: var(--np-on-live);
  box-shadow: none;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-big-done svg { color: inherit; }
/* subtasks: a dashed slot to add one (a field, so the field edge), accent while typing */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-sub-add {
  border-color: var(--np-field-edge);
  color: var(--np-muted);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-sub-add:focus-within {
  border-style: solid;
  border-color: var(--np-accent);
  box-shadow: 0 0 0 3px rgb(var(--np-accent-rgb) / 16%);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-sub-input { color: var(--np-ink); caret-color: var(--np-accent); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-sub-input:focus-visible { outline: none; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-sub-due { color: var(--np-muted); }
/* the rest of the actions: one grouped tile of rows (as More's list), the
   destructive one in red ink */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-actions-list {
  gap: 0;
  padding: 0;
  border: 1px solid var(--np-hair);
  border-radius: 12px;
  background: var(--np-tile);
  box-shadow: var(--np-lift-slip);
  overflow: hidden;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-actions-list .mx-row-btn {
  border-radius: 0;
  padding: 0 12px;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-actions-list .mx-row-btn + .mx-row-btn { border-top: 1px solid var(--np-hair); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-row-btn { color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-row-btn:active { background-color: var(--np-wash); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-row-btn > svg, .mx-row-btn-chev) { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-row-btn.mx-danger, .mx-row-btn.mx-danger > svg) { color: var(--np-red-t); }

/* The Move sheet: the 2 x 2 matrix as four small columns (tint, 3px rule);
   the chosen one ringed in ink with a paper gap */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-move-tile {
  background: color-mix(in srgb, rgb(var(--priority-rgb)) 8%, var(--np-tile));
  border: 1px solid color-mix(in srgb, rgb(var(--priority-rgb)) 26%, transparent);
  border-top: 3px solid rgb(var(--priority-rgb));
  border-radius: 4px 4px 10px 10px;
  color: var(--np-ink);
  box-shadow: var(--np-lift-slip);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-move-tile:active {
  background: color-mix(in srgb, rgb(var(--priority-rgb)) 14%, var(--np-tile));
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-move-tile[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--np-sheet), 0 0 0 3.5px var(--np-ink);
}
/* the axis labels: 12px like every kicker, but in sentence case (the 62px
   row column can't hold IMPORTANT in tracked caps at that size; at the
   shell's 10px it was under the comfort floor) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-axis {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--np-muted);
}

/* Completed (pushed): tiles with a green done lens (4.5) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-done-row {
  background: var(--np-tile);
  border-color: var(--np-hair);
  border-radius: 10px;
  box-shadow: var(--np-lift-slip);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-done-disc:active .mx-done-lens { box-shadow: 0 0 0 3px rgb(var(--np-live-rgb) / 22%); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-done-title { color: var(--np-ink-soft); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-done-meta { color: var(--np-muted); }
/* "Mark as complete?": the task named in the UI face, its ink diamond */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-confirm-name { color: var(--np-ink); }


/* --- 16e Composer --------------------------------------------------------- */
/* The sheet's stock (12.3) at the sheets' corner; kinds and tray chips are
   slips, the line a paper field. Set by the line = an ink-ruled tile; taken
   from the lens = a dashed outline: the difference never rests on colour. */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-composer { border-radius: 16px 16px 0 0; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-composer.mx-composer--top { border-radius: 16px; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-compose-kind {
  background: var(--np-slip);
  border-color: var(--np-hair);
  border-radius: 8px;
  color: var(--np-ink-soft);
  box-shadow: var(--np-lift-slip);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-compose-kind:active { background-color: var(--np-slip-hover); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-compose-kind[aria-selected="true"] {
  background: var(--np-fill);
  border-color: var(--np-fill);
  color: var(--np-on-fill);
  box-shadow: inset 0 0 0 1px var(--np-fill-edge);
}
/* the line and a note's body: fields, so the field edge (13.2 rings the
   wrapper on focus) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-compose-field, .mx-compose-body) {
  background: var(--np-field);
  border-color: var(--np-field-edge);
  border-radius: 12px;
  box-shadow: inset 0 1px 1px rgb(var(--np-shadow-rgb) / 5%);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-compose-body:focus {
  border-color: var(--np-accent);
  box-shadow: 0 0 0 3px rgb(var(--np-accent-rgb) / 16%);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-compose-input, .mx-compose-body) {
  color: var(--np-ink);
  caret-color: var(--np-accent);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-compose-input, .mx-compose-body):focus-visible { outline: none; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-compose-input, .mx-compose-body)::placeholder { color: var(--np-muted); opacity: 1; }
/* the @ target: a paper tab with an accent edge */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-compose-target {
  background: var(--np-tile);
  border-color: rgb(var(--np-accent-rgb) / 50%);
  color: var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-compose-target-glyph { color: var(--np-accent); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-compose-target-x, .mx-compose-details, .mx-compose-info) { color: var(--np-muted); }
/* Add: the press colour (its :active was a see-through wash) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-compose-add,
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-compose-add:active {
  background: var(--np-fill);
  color: var(--np-on-fill);
  box-shadow: inset 0 0 0 1px var(--np-fill-edge);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-compose-add, .mx-compose-kind):focus-visible { outline-color: var(--np-focus); }
/* the line under the field: preview in ink, issues in their own ink, the
   inline "Added ... · Undo · Show" with a green check and ink links */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-compose-line { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-compose-line[data-level="preview"] .mx-compose-line-msg { color: var(--np-ink); opacity: 1; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-compose-line[data-level="error"] .mx-compose-line-msg { color: var(--np-red-t); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-compose-line[data-level="warning"] .mx-compose-line-msg { color: var(--np-orange-t); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-compose-line[data-level="done"] .mx-compose-line-msg { color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-compose-line[data-level="done"] .mx-compose-line-msg::first-letter { color: var(--np-live-t); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-compose-line-btn {
  color: var(--np-ink);
  border-left-color: var(--np-rule);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

/* Tray colour dots: diamonds of the spot ink. Effective colour = the big one;
   set by the line = full ink in an ink ring with a paper gap; from the lens =
   a dashed outline on a light fill */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tray-dot-core {
  border-radius: 2px;
  transform: rotate(45deg) scale(0.82);
  background: rgb(var(--priority-rgb) / 80%);
  box-shadow: none;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tray-dot:active .mx-tray-dot-core { background-color: rgb(var(--priority-rgb)); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tray-dot.is-set .mx-tray-dot-core {
  background: rgb(var(--priority-rgb));
  box-shadow: 0 0 0 2px var(--np-sheet), 0 0 0 3.5px var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tray-dot.is-default .mx-tray-dot-core {
  background: rgb(var(--priority-rgb) / 18%);
  border: 2px dashed rgb(var(--priority-rgb));
  box-shadow: none;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tray-dot:focus-visible { outline: 2px solid var(--np-focus); outline-offset: -2px; }
/* tray chips (date, time, Primary, timer, Google Calendar, category) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tray-chip {
  background: var(--np-slip);
  border-color: var(--np-hair);
  border-radius: 8px;
  color: var(--np-ink-soft);
  box-shadow: var(--np-lift-slip);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tray-chip:active { background-color: var(--np-slip-hover); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-tray-chip.is-set, .mx-tray-chip.is-off-set) {
  background: var(--np-tile);
  border-color: var(--np-ink-soft);
  color: var(--np-ink);
  box-shadow: inset 0 -2px 0 var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tray-chip.is-default {
  background: transparent;
  border: 1px dashed var(--np-muted);
  color: var(--np-ink-soft);
  box-shadow: none;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tray-chip[aria-pressed="true"]:not(.mx-tray-star):not(.mx-tray-timer) { color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-tray-label, .mx-tray-hint) { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-tray-when, .mx-tray-card .mx-tray-chip-label) { color: var(--np-ink); }
/* tray actions (Note / Idea / Project / Meeting): secondary, the primary one filled */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tray-action {
  background: var(--np-sheet);
  border-color: var(--np-rule);
  border-radius: 10px;
  color: var(--np-ink);
  box-shadow: var(--np-lift-slip);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tray-action:active { background-color: var(--np-slip-hover); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tray-action--primary,
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-tray-action--primary:active {
  background: var(--np-fill);
  border-color: var(--np-fill);
  color: var(--np-on-fill);
  box-shadow: inset 0 0 0 1px var(--np-fill-edge);
}
/* Panels (dates, categories, the @ list, the card picker): slips; the chosen
   one a wash with an ink edge (the line holds the value; this marks it) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-panel-chip, .mx-panel-back) {
  background: var(--np-slip);
  border-color: var(--np-hair);
  box-shadow: var(--np-lift-slip);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-panel-chip { border-radius: 8px; color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-panel-back { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-panel-chip, .mx-panel-item):active { background-color: var(--np-slip-hover); }
/* One-column lists (the @ task list, the card picker): the column is held to
   the list's width, so a long title ellipsizes instead of widening every row
   past the scroller (the chosen row's printed edge ran off as an open box) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-panel-list { grid-template-columns: minmax(0, 1fr); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-panel-chip[aria-selected="true"],
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-panel-item.is-active, .mx-panel-item[aria-selected="true"]) {
  background: var(--np-wash);
  border-color: var(--np-ink-soft);
  box-shadow: inset 3px 0 0 var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-panel-chip-sub, .mx-panel-chip--quiet, .mx-panel-hint, .mx-panel-item-meta) { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-panel-chip--pick { color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-panel-item { color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-panel-item-badge {
  border-color: var(--np-rule);
  color: var(--np-muted);
}
/* Meeting kind: today's recurring meetings, paper tabs with an accent edge */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-compose-today-chip {
  background: var(--np-tile);
  border-color: rgb(var(--np-accent-rgb) / 45%);
  color: var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-compose-today-icon { color: var(--np-accent); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-compose-today-sub { color: var(--np-muted); }
/* The command help: examples are slips (their mono face stays), plain codes dashed */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-compose-help-ex, .mx-compose-help-code) {
  background: var(--np-slip);
  border-color: var(--np-hair);
  color: var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-compose-help-ex:active { background-color: var(--np-slip-hover); }
/* a colour command's example keeps its colour edge (the shell's own match: only
   those examples carry an inline --priority-rgb) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-compose-help-ex[style*="--priority-rgb"] { border-color: rgb(var(--priority-rgb) / 60%); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-compose-help-code {
  background: transparent;
  border-color: var(--np-rule);
  color: var(--np-ink-soft);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-compose-help-row { border-top-color: var(--np-hair); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-compose-help-meaning { color: var(--np-muted); }


/* --- 16f Today, Time, More, Write, Links, Search -------------------------- */
/* Grouped lists and cards are tiles of stock (4.6 gave them the fill) with a
   hairline and the pressed edge; the corners stay the shell's. */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-more-account, .mx-more-list, .mx-offline-status,
  .mx-today-coming-list, .mx-write-list, .mx-write-card, .mx-today-meeting, .mx-today-sub, .mx-today-busy, .mx-write-search) {
  background-image: none;
  border: 1px solid var(--np-hair);
  box-shadow: var(--np-lift-slip);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-row {
  background: var(--np-tile);
  border-color: var(--np-hair);
  color: var(--np-ink);
  box-shadow: var(--np-lift-slip);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-row:active { background-color: var(--np-slip-hover); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-row-meta, .mx-row-glyph, .mx-row-snippet, .mx-row-kicker) { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-row-kicker { font-size: 12px; letter-spacing: 0.1em; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-placeholder, .mx-load-fail) {
  background: transparent;
  border-color: var(--np-rule);
  color: var(--np-muted);
}

/* Today. The busy strip's inside is the desktop strip (14k). */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-head-extra { letter-spacing: 0.02em; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-empty {
  background: transparent;
  border: 1px dashed var(--np-rule);
  box-shadow: none;
}
/* the empty state's glyph sat in a lit pool: paper has no lights */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-empty-glyph::before { content: none; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-empty-glyph { color: var(--np-ink-soft); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-empty-title {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.008em;
  color: var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-calendar { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-calendar span { color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-calendar:active { background-color: var(--np-wash); }
/* due subtasks hang on a rail of the task's ink */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-subs { border-left-color: rgb(var(--priority-rgb, 107 98 87) / 60%); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-sub-open { color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-subcount { color: var(--np-muted); }
/* meetings today: a tile with a plum hairline (the meeting colour of the calendar) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-meeting { border-color: rgb(var(--np-plum-rgb) / 34%); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-meeting-main { color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-today-meeting-icon, .mx-today-coming-row.is-meeting .mx-today-coming-mark) {
  color: rgb(var(--np-plum-rgb));
}
/* Coming up: one tile, hairline rows, days in muted tabular figures */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-coming-row {
  border-top-color: var(--np-hair);
  color: var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-coming-row:active { background-color: var(--np-wash); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-today-coming-day, .mx-today-coming-mark, .mx-today-coming-detail,
  .mx-today-coming-empty) { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-today-coming-mark.is-dot::before { box-shadow: none; }

/* The Time sheet: the running timer as a green-edged sheet, the clock in tabular ink */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-time-live {
  background: var(--np-sheet);
  border: 1px solid rgb(var(--np-live-rgb) / 55%);
  box-shadow: inset 4px 0 0 var(--np-live);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-time-orb {
  background: var(--np-live);
  box-shadow: none;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-time-title { font-size: 20px; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-time-clock {
  color: var(--np-ink);
  font-variant-numeric: tabular-nums;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-time-complete svg, .mx-more-row.is-live .mx-more-row-value,
  .mx-more-row.is-live .mx-more-row-icon) {
  color: var(--np-live-t);
}

/* More: the account as a byline card, grouped rows on a tile */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-more-name {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.006em;
  color: var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-more-status, .mx-more-user, .mx-more-note, .mx-more-nom dd) { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-more-status-dot { background: var(--np-live); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-more-status-dot[data-state="pending"] { background: var(--np-orange); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-more-status-dot[data-state="error"] { background: var(--np-red); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-more-status-dot[data-state="out"] {
  background: transparent;
  border-color: var(--np-muted);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-more-row {
  border-top-color: var(--np-hair);
  color: var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-more-row:active { background-color: var(--np-wash); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-more-row:focus-visible { outline-color: var(--np-focus); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-more-row-icon, .mx-more-row-value, .mx-more-row-chevron) { color: var(--np-muted); }
/* the Offline copy sheet: a hairline table, an accent bar on a recessed
   track, Remove's inline confirmation in red ink */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-offline-status :is(dt, dd) { border-top-color: var(--np-hair); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-offline-status dt { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-offline-status dd { color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-offline-progress-text, .mx-offline-limits dd) { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-offline-bar { background: var(--np-wash); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-offline-bar::-webkit-progress-bar { background: var(--np-wash); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-offline-bar::-webkit-progress-value { background: var(--np-accent); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-offline-bar::-moz-progress-bar { background: var(--np-accent); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-offline-confirm {
  border-color: rgb(var(--np-red-rgb) / 40%);
  background: rgb(var(--np-red-rgb) / 5%);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-offline-confirm-text { color: var(--np-red-t); }
/* the Google Calendar sheet's buttons: the paper buttons at the sheet's 44px */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-sheet .gcal-btn-danger { color: var(--np-red-t); }

/* Write: the search is a tile (it was see-through) in the field edge,
   filter chips on the sticky bar, document rows under serif titles */
/* the field edge is tuned on the sheet (3.2:1); on the darker canvas it
   fell to 2.84:1, so the two fields that sit on the page take it a touch
   firmer (3.3:1 by day, 4.5:1 by night) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-write-search {
  border-color: color-mix(in srgb, var(--np-field-edge) 88%, var(--np-ink));
  color: var(--np-muted);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-write-search:focus-within { color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-write-search-input { color: var(--np-ink); caret-color: var(--np-accent); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-write-search-input::placeholder { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-write-search-clear, .mx-write-more, .mx-write-card-x, .mx-write-pin) { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-write-search-clear, .mx-write-more):active { background-color: var(--np-wash); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-write-card-chip .mx-chip-label { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-write-row + .mx-write-row::before { background: var(--np-hair); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-write-row-main { color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-write-row-main:active { background-color: var(--np-wash); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-write-row-main, .mx-write-card, .mx-write-add, .mx-write-more):focus-visible {
  outline-color: var(--np-focus);
}
/* the kind glyph: a recessed paper square */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-write-glyph {
  background: var(--np-wash);
  box-shadow: none;
  color: var(--np-ink-soft);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-write-row-title, .mx-write-card-title) {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.006em;
  color: var(--np-ink);
}
/* a continue card is a fixed 160 x 112 box: its headline a size down, and the
   kicker never squeezed (a flex item with overflow: hidden may shrink to 0) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-write-card-title { font-size: 16px; line-height: 1.2; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-write-card-kicker { flex: none; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-write-row-snippet, .mx-write-row-meta, .mx-write-count,
  .mx-write-card-preview, .mx-write-card-kicker, .mx-write-group-count, .mx-write-empty-text) { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-write-card-kicker { font-size: 12px; letter-spacing: 0.08em; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-write-group-head { color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-write-card:active { background-color: var(--np-slip-hover); }
/* the + of a section: a paper lens (the glass lens was glass-only) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-write-add { color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-write-add::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--np-tile);
  box-shadow: 0 0 0 1px var(--np-rule), var(--np-lift-slip);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-write-add:active::before { background: var(--np-slip-hover); }
/* recovered drafts: a dashed accent edge, the glyph in accent */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-write-drafts .mx-write-list { border: 1px dashed rgb(var(--np-accent-rgb) / 55%); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-write-draft .mx-write-glyph { color: var(--np-accent); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-write-none, .mx-write-empty) {
  border-color: var(--np-rule);
  color: var(--np-muted);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-write-empty-title {
  font-family: var(--np-serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--np-ink);
}
/* the ⋯ / rename sheets */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-write-action-glyph { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-btn-danger .mx-write-action-glyph { color: var(--np-red-t); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-write-rename-input, .mx-rename-input) {
  background: var(--np-field);
  border-color: var(--np-field-edge);
  color: var(--np-ink);
  box-shadow: inset 0 1px 1px rgb(var(--np-shadow-rgb) / 5%);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-write-rename-input, .mx-rename-input):focus {
  border-color: var(--np-accent);
  box-shadow: 0 0 0 3px rgb(var(--np-accent-rgb) / 16%);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-rename-save,
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-rename-save:active {
  background: var(--np-fill);
  color: var(--np-on-fill);
  box-shadow: inset 0 0 0 1px var(--np-fill-edge);
}

/* Links: the cards are sheets of stock (grain, the static light of 3, a lift),
   their titles headlines, their counts muted */
html[data-shell="mobile"] body[data-style="paper"][data-theme] section.card.mx-card {
  background-color: var(--np-sheet);
  background-image: var(--np-grain);
  background-size: 640px 640px;
  border: 0;
  border-radius: 12px;
  box-shadow: var(--np-lift-sheet);
  color: var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-card-toggle::after { border-radius: 12px 12px 0 0; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-card-toggle:focus-visible { outline: none; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-card-toggle:focus-visible::after { outline-color: var(--np-focus); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-card-title {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.006em;
  color: var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-card-sum, .mx-card-chev, .mx-notes-chip svg, .mx-qa-empty,
  .mx-card-empty, .mx-links-foot, .mx-quick-link-icon, .mx-item-where) { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-card-count { font-variant-numeric: tabular-nums; }
/* the icon grid: the real tiles (9), labels in ink-soft */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-icon-label {
  font-size: 12px;
  color: var(--np-ink-soft);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-icon-sep { background: var(--np-hair); }
/* mini thumbs (the item sheet's head): a tile frame round the same pixels */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-thumb {
  background: var(--np-tile);
  box-shadow: 0 0 0 1px var(--np-hair);
}
/* Quick Access shares the marker edge from 9.3 on desktop and phone. */
/* the item sheet: its title a headline; link pills are slips (a link's own
   colour is drawn inline by card-items.js over the paper) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-item-title {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.008em;
  color: var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .reminder-link-bubble.mx-link-pill {
  background-color: var(--np-slip);
  border-color: var(--np-hair);
  border-radius: 10px;
  color: var(--np-ink);
  box-shadow: var(--np-lift-slip);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-link-pill:active { background-color: var(--np-slip-hover); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-link-pill svg { color: var(--np-muted); }
/* Move to…: card headings in ink, their sections in ink-soft on a rule rail */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-move-card, .mx-move-target) { color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-move-card { font-weight: 600; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-move-target.is-section { color: var(--np-ink-soft); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-move-target.is-top { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-move-target:active { background-color: var(--np-wash); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-move-card-tag {
  background: var(--np-wash);
  color: var(--np-muted);
}

/* Search: the field on the pushed bar (13.2 gives it the focus ring),
   grouped results under kickers, rows as tiles */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-search-field {
  background: var(--np-field);
  border-color: color-mix(in srgb, var(--np-field-edge) 88%, var(--np-ink));   /* on the canvas, as Write's */
  box-shadow: none;
  color: var(--np-muted);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-search-input { color: var(--np-ink); caret-color: var(--np-accent); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-search-input::placeholder { color: var(--np-muted); opacity: 1; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-search-clear { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-search-cancel { color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-search-message, .mx-search-zero, .mx-search-where) { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-search-zero { font-size: 12px; letter-spacing: 0.12em; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-search-more { color: var(--np-accent); }
/* a completed result: the flat green done disc */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-done-ring {
  background: var(--np-live-fill);
  background-image: none;
  color: var(--np-on-live);
  box-shadow: none;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-done-names .mx-row-title { color: var(--np-ink-soft); }
/* a document found by Search keeps the headline it has on the Write tab, so
   a project or note looks like the same object wherever it turns up */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-doc-row .mx-row-title {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.006em;
}


/* --- 16g Writer frames: the 7 reused editors full screen ------------------ */
/* 12.2 already strips the frames to a flat sheet (no edge, no lift, no grain
   behind the full-frame editors); 6.4 sets the 19 / 1.55 column. Here: the
   writer bar, the toolbar on the keyboard, the lifted Save, the title fields,
   the editors' own fill. */
/* Writer bar: the sheet with a firm rule under it */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.task-editor-header, .subtask-desc-header, .projects-title-bar,
  .ideas-header, .meetings-header, .notepad-popover-header, #note-viewer-modal .note-viewer-header) {
  background: var(--np-sheet);
  border-bottom: 1px solid var(--np-rule);
}
/* its title: a small serif headline (12.5's dialog size is for windows); the
   ids beat the desktop title rules (#task-editor-title is 22px there), the
   frame id the shell's own note-viewer title (two ids) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(#task-editor-title, #subtask-desc-title, #ideas-title,
  #meetings-title, .notepad-popover-header > h4, .mx-writer-title),
html[data-shell="mobile"] body[data-style="paper"][data-theme] #note-viewer-modal #note-viewer-title {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.008em;
  color: var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-writer-title:active { background-color: var(--np-wash); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] #notepad-popover .notepad-context { color: var(--np-muted); font-family: var(--np-sans); }
/* the back chevrons and the bar's ⋯ */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.task-editor-close-btn, .subtask-desc-close-btn, .projects-close-btn,
  .ideas-close-btn, .meetings-close-btn, #notepad-close, #note-viewer-close, .mx-writer-more) {
  color: var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.task-editor-close-btn, .subtask-desc-close-btn, .projects-close-btn,
  .ideas-close-btn, .meetings-close-btn, #notepad-close, #note-viewer-close, .mx-writer-more):active {
  background-color: var(--np-wash);
}
/* Save, lifted into the bar: the press colour (no sheen) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(#task-editor-save, #subtask-desc-save, #ideas-save-btn,
  #meetings-inline-save, #notepad-save) {
  background: var(--np-fill);
  border: 0;
  color: var(--np-on-fill);
  box-shadow: inset 0 0 0 1px var(--np-fill-edge);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(#task-editor-save, #subtask-desc-save, #ideas-save-btn,
  #meetings-inline-save, #notepad-save):active {
  box-shadow: inset 0 0 0 1px var(--np-fill-edge), var(--np-lift-control);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] #projects-modal #project-save-label { color: var(--np-muted); }
/* The toolbar on the keyboard: opaque sheet (text scrolls under it; this
   beats the shell's --tb-glass and the desktop recessed strip), a hairline */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(#projects-editor-toolbar, .ideas-editor-toolbar, #meetings-inline-toolbar,
  .notepad-toolbar, #task-desc-editor-wrap > .task-desc-toolbar, .subtask-desc-body > .task-desc-toolbar) {
  background: var(--np-sheet);
  border: 0;
  border-top: 1px solid var(--np-hair);
  border-radius: 0;
  box-shadow: none;
}
/* Full-frame editors are the frame, but never a fully transparent background
   (Chrome would save background-color: transparent spans). Glass used a 1%
   white tint; on the flat night sheet that lifts the box 2-3 levels, a
   visible panel, so paper paints them the frame's own opaque sheet colour. */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(#ideas-editor, #subtask-desc-editor, #notepad-editor, #note-viewer-content) {
  background: var(--np-sheet);
  border-color: transparent;
  box-shadow: none;
}
/* The notepad sheet is its own dialog, full screen: the sheet, no frame line */
html[data-shell="mobile"] body[data-style="paper"][data-theme] #notepad-popover.notepad-sheet {
  background: var(--np-sheet);
  border: 0;
  box-shadow: none;
}
/* Title fields: a serif headline on the frame, a rule under it that inks in
   accent while typing. Frame-qualified: the shell's "every field >= 16px"
   rule (mobile-write.css 4, an id + three attributes) would hold them at 16px */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(#ideas-modal, #notepad-popover, #task-editor-modal)
  :is(#ideas-title-input, #notepad-title, #task-editor-name) {
  background: transparent;
  border-color: transparent;
  border-bottom-color: var(--np-rule);
  box-shadow: none;
  color: var(--np-ink);
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.008em;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(#ideas-modal, #notepad-popover, #task-editor-modal)
  :is(#ideas-title-input, #notepad-title, #task-editor-name):focus {
  border-bottom-color: var(--np-accent);
  box-shadow: none;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(#ideas-modal, #notepad-popover, #task-editor-modal)
  :is(#ideas-title-input, #notepad-title, #task-editor-name)::placeholder {
  color: var(--np-muted);
  font-weight: 500;
}
/* read views in a full frame sit straight on the page: the shell took their
   padding, so the base's #e5e7eb box (and the desktop view tile) would hug
   the text. Not editable, so plain transparency is safe here. */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(#ideas-view-content, #meetings-modal .meetings-view-content) {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
/* the read views' titles: the page's headline, a step above the 19px column
   and its own headings (at the shell's 22px the body's H2 outranked it) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] #ideas-modal .ideas-view-title,
html[data-shell="mobile"] body[data-style="paper"][data-theme] #meetings-modal .meetings-view-title {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--np-ink);
}
/* ...and the frames' document headings a newspaper column's ladder (H1 25 /
   H2 22.5 / H3 20.5 on the 19px column, not 28.5 / 24 / 21), so no heading
   reaches a headline. Read view and editor alike, so Edit never jumps.
   Projects keeps its own page scale. */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(#ideas-editor, #meetings-inline-desc-editor, #notepad-editor,
  #task-desc-editor, #subtask-desc-editor, #note-viewer-content, #ideas-view-content, #meetings-modal .meetings-view-content,
  #task-desc-view-content) :is(h1, h2, h3) {
  line-height: 1.25;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(#ideas-editor, #meetings-inline-desc-editor, #notepad-editor,
  #task-desc-editor, #subtask-desc-editor, #note-viewer-content, #ideas-view-content, #meetings-modal .meetings-view-content,
  #task-desc-view-content) h1 { font-size: 1.32em; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(#ideas-editor, #meetings-inline-desc-editor, #notepad-editor,
  #task-desc-editor, #subtask-desc-editor, #note-viewer-content, #ideas-view-content, #meetings-modal .meetings-view-content,
  #task-desc-view-content) h2 { font-size: 1.18em; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(#ideas-editor, #meetings-inline-desc-editor, #notepad-editor,
  #task-desc-editor, #subtask-desc-editor, #note-viewer-content, #ideas-view-content, #meetings-modal .meetings-view-content,
  #task-desc-view-content) h3 { font-size: 1.07em; }
/* frame field labels: kickers at 12px (the shell's own are 11.5px, ID-strong) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] #task-editor-modal .task-editor-field > label:not(.task-editor-primary-label),
html[data-shell="mobile"] body[data-style="paper"][data-theme] #task-editor-modal .task-editor-description > label,
html[data-shell="mobile"] body[data-style="paper"][data-theme] #meetings-modal :is(.meeting-editor-field, .meeting-links-section,
  .meeting-files-section, .meeting-editor-description) > label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--np-ink-soft);
}
/* the Primary toggle: a paper tab */
html[data-shell="mobile"] body[data-style="paper"][data-theme] #task-editor-modal .task-editor-primary-label {
  background: var(--np-slip);
  border-color: var(--np-hair);
  color: var(--np-ink);
  box-shadow: var(--np-lift-slip);
}
/* the frame's hairlines (description, action bars, status, notepad actions) */
html[data-shell="mobile"] body[data-style="paper"][data-theme] #task-editor-modal :is(.task-editor-description, .task-editor-actions),
html[data-shell="mobile"] body[data-style="paper"][data-theme] #subtask-desc-modal .subtask-desc-actions,
html[data-shell="mobile"] body[data-style="paper"][data-theme] #notepad-popover .notepad-popover-actions {
  border-top-color: var(--np-hair);
}
/* the drafts banner: "Unsaved text from 10:42 · Restore · Discard", a slip
   with an accent edge */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-draft-banner {
  background: var(--np-slip);
  border: 1px solid rgb(var(--np-accent-rgb) / 40%);
  border-radius: 10px;
  box-shadow: inset 3px 0 0 var(--np-accent);
  color: var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-draft-text svg { color: var(--np-accent); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-draft-btn { color: var(--np-ink-soft); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-draft-btn.mx-draft-restore { color: var(--np-accent); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-draft-btn:active { background-color: var(--np-wash); }
/* the item creator rises as a bottom sheet on the phone: the sheets' 16px corners */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .ic-overlay .ic-dialog { border-radius: 16px 16px 0 0; }
/* the calendar opened full screen from the due lens: a headline in the bar */
html[data-shell="mobile"] body[data-style="paper"][data-theme] #calendar-view-modal .calendar-view-header h4 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] #calendar-view-modal .calendar-view-due { border-top-color: var(--np-hair); }


/* --- 16h Viewer, the computer's Mobile preview ---------------------------- */
/* The file viewer keeps its dark photographic surround in both editions
   (pictures want it); its buttons are charcoal discs with a cream hairline,
   the primary pill the night plate (the day ink would vanish on black). */
/* its type is the same cream as the buttons (the shell's pure #fff was the
   only pure white in the theme), the message on the surround a step softer */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-viewer, .mx-viewer-title) { color: #F1E9DA; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-viewer-msg { color: rgb(241 233 218 / 82%); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-viewer :is(.mx-viewer-btn, .mx-viewer-pill):focus-visible { outline-color: #F1E9DA; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-viewer .mx-spinner { border-top-color: #F1E9DA; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-viewer-btn {
  background-color: rgb(28 26 24 / 72%);
  background-image: none;
  color: #F1E9DA;
  box-shadow: inset 0 0 0 1px rgb(240 225 200 / 18%);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-viewer-btn:active { background-color: rgb(70 64 56 / 85%); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-viewer-pill {
  border-color: rgb(240 225 200 / 32%);
  color: #F1E9DA;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-viewer-pill.is-primary {
  border-color: transparent;
  background-image: linear-gradient(#46689A, #46689A);
  color: #F1E9DA;
}
/* the file card (a file that isn't a picture, or a blocked popup): a sheet of
   stock laid on the dark surround, its Open in the press colour */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-viewer-file {
  padding: 26px 24px 22px;
  border-radius: 12px;
  background-color: var(--np-sheet);
  background-image: var(--np-grain);
  background-size: 640px 640px;
  box-shadow: 0 0 0 1px rgb(240 225 200 / 10%), 0 24px 56px -22px rgb(0 0 0 / 75%);
  color: var(--np-ink-soft);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-viewer-file .mx-viewer-file-name {
  font-family: var(--np-serif);
  font-optical-sizing: auto;
  font-size: 19px;
  color: var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-viewer-file .mx-viewer-note { color: var(--np-muted); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-viewer-file .mx-viewer-pill.is-primary {
  background-image: linear-gradient(var(--np-fill), var(--np-fill));
  color: var(--np-on-fill);
  box-shadow: inset 0 0 0 1px var(--np-fill-edge);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-viewer .mx-viewer-file :is(.mx-viewer-pill):focus-visible { outline-color: var(--np-focus); }

/* The computer's Mobile preview: the layout switch is a paper sheet beside
   the column (4.1 took its blur); its chosen option the segment's tile. The
   column edges stay structural (a rule edge with the dialog lift, through the
   tokens); the dim is restated below. */
html[data-shell="mobile"] body[data-style="paper"][data-theme] #mx-preview-switch {
  background: var(--np-sheet);
  border: 1px solid var(--np-hair);
  box-shadow: var(--np-lift-control);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-switch-opt { color: var(--np-ink-soft); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-switch-opt:hover { background-color: var(--np-wash); color: var(--np-ink); }
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-switch-opt[aria-pressed="true"]:hover { background-color: var(--np-tile); }
html[data-shell="mobile"] body[data-style="paper"][data-theme="dark"] .mx-switch-opt[aria-pressed="true"]:hover {
  background-color: color-mix(in srgb, var(--np-ink) 12%, var(--np-tile));
}
/* the surround: the scrim token (30%) made the desk around the column a muddy
   brown; a light warm shade by day keeps it one paper, a deeper one by night */
html[data-shell="mobile"] body[data-style="paper"][data-theme] #mx-preview-dim {
  background: linear-gradient(90deg, rgb(var(--np-shadow-rgb) / 12%) 0 var(--mx-inline), transparent var(--mx-inline) calc(100% - var(--mx-inline)),
    rgb(var(--np-shadow-rgb) / 12%) calc(100% - var(--mx-inline)) 100%);
}
/* night: the same faint step (38% black left a void round the column, the
   grain gone); the bezel's rule and lift still draw the column's edge */
html[data-shell="mobile"] body[data-style="paper"][data-theme="dark"] #mx-preview-dim {
  background: linear-gradient(90deg, rgb(0 0 0 / 16%) 0 var(--mx-inline), transparent var(--mx-inline) calc(100% - var(--mx-inline)),
    rgb(0 0 0 / 16%) calc(100% - var(--mx-inline)) 100%);
}


/* --- 16i Landscape -------------------------------------------------------- */
/* The structural landscape rules stay (smaller bars, hidden tab labels, no
   dateline); the active-tab rule keeps its top: 4px above the glyph. */


/* === 18. The paste-up edition =============================================
   An independent journal, assembled from different paper stocks. Display
   type and sparse misregistration carry the Dada influence. Decoration stays
   on pointer-transparent pseudo-elements: no rotated cards, clipped text,
   transformed containing blocks, or changes to the user's saved grid.
   This art direction intentionally supersedes the original DESIGN.md paint.
   ======================================================================== */
body[data-style="paper"][data-theme] {
  --np-serif: 'Fraunces', 'Iowan Old Style', 'Sitka Display', Georgia, serif;
  --np-mono: 'IBM Plex Mono', 'Courier New', monospace;
  --np-canvas: #deded9;
  --np-sheet: #faf9f5;
  --np-tile: #fffefa;
  --np-slip: #faf9f5;
  --np-slip-hover: #f0efea;
  --np-field: #f6f5f0;
  --np-ink: #28251f;
  --np-ink-rgb: 40 37 31;
  --np-ink-soft: #514c40;
  --np-muted: #686052;
  --np-accent: #315e5a;
  --np-accent-rgb: 49 94 90;
  --np-quick-stock: #3fb7a5;
  --np-w-yellow: #f3df86;
  --np-editorial: #a13e2c;
  --np-stock-alt: #f6f5f0;
  --np-stock-cool: #f2f4f1;
  --np-backing: #dedbd2;
  --np-sheet-mask: url('assets/textures/paper-sheet.svg');
  --np-strip-mask: url('assets/textures/paper-strip-a.svg');
  --np-grain: url('assets/textures/newsprint.svg');
  --np-lift-sheet: 1px 2px 3px rgb(49 43 32 / 17%), 2px 12px 22px -13px rgb(49 43 32 / 34%);
  --np-lift-tile: 0 1px 1px rgb(59 43 23 / 12%), 2px 4px 7px -4px rgb(59 43 23 / 25%);
  --np-lift-slip: 0 1px 1px rgb(59 43 23 / 13%), 0 3px 5px -4px rgb(59 43 23 / 30%);
  --radius: 1px;
}
body[data-style="paper"][data-theme="dark"] {
  --np-canvas: #242420;
  --np-sheet: #30312e;
  --np-tile: #3b3c37;
  --np-slip: #343531;
  --np-slip-hover: #42433c;
  --np-field: #282925;
  --np-ink: #ecebe3;
  --np-ink-rgb: 236 235 227;
  --np-ink-soft: #c9c8bc;
  --np-muted: #b4b2a4;
  --np-accent: #a8c8bc;
  --np-accent-rgb: 168 200 188;
  --np-quick-stock: #37a797;
  --np-w-yellow: #655725;
  --np-t-yellow: #eedb86;
  --np-editorial: #e69b7f;
  --np-stock-alt: #33342f;
  --np-stock-cool: #303633;
  --np-backing: #21221f;
  --np-lift-sheet: 0 1px 2px rgb(0 0 0 / 32%), 0 9px 20px -10px rgb(0 0 0 / 65%);
  --np-lift-tile: 0 1px 1px rgb(0 0 0 / 30%), 2px 4px 7px -4px rgb(0 0 0 / 60%);
  --np-lift-slip: 0 1px 1px rgb(0 0 0 / 28%), 0 3px 5px -4px rgb(0 0 0 / 50%);
}
html:has(> body[data-style="paper"]) {
  background-color: #efeeea;
  /* Neutralise the photo, then compress its highlights/shadows with a grey wash. */
  background-image: linear-gradient(rgb(197 197 192 / 42%), rgb(197 197 192 / 42%)),
    url('assets/textures/folded-newsprint.jpg');
  background-blend-mode: normal, luminosity;
  background-size: auto, max(100%, 1100px) auto;
  background-position: center 180px;
  background-repeat: repeat-y;
}
html:has(> body[data-style="paper"][data-theme="dark"]) {
  background-color: #373832;
  background-image: url('assets/textures/folded-newsprint.jpg');
  background-blend-mode: multiply;
  background-size: max(100%, 1100px) auto;
}

/* The photograph is not a seamless tile. On phones paint it once behind the
   scrolling shell, with no joins. A fixed element avoids mobile browser bugs
   with background-attachment:fixed; lvh keeps folds still as browser chrome or
   the keyboard changes the visible viewport. Desktop retains its canvas. */
html[data-shell="mobile"]:has(> body[data-style="paper"]) {
  background-image: none;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme]::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100vh; height: 100lvh;
  z-index: -1;
  pointer-events: none;
  background-color: #efeeea;
  background-image: linear-gradient(rgb(197 197 192 / 42%), rgb(197 197 192 / 42%)),
    url('assets/textures/folded-newsprint.jpg');
  background-blend-mode: normal, luminosity;
  background-size: auto, cover;
  background-position: center;
  background-repeat: no-repeat;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme="dark"]::before {
  background-color: #373832;
  background-image: url('assets/textures/folded-newsprint.jpg');
  background-blend-mode: multiply;
  background-size: cover;
}

/* Masthead: ample type, a small printer's imprint, and an uneven cut edge. */
body[data-style="paper"][data-theme] .app-header.card {
  background-color: var(--np-sheet);
  background-image: var(--np-grain);
  background-size: 640px 640px;
  box-shadow: 0 2px 0 var(--np-rule-strong), 0 5px 0 var(--np-canvas), 0 6px 0 var(--np-rule);
}
body[data-style="paper"][data-theme] .app-header.card::before {
  content: 'THE PERSONAL EDITION';
  position: absolute;
  inset: 22px auto auto 40px;
  background: none;
  font: 500 10px/1.4 var(--np-mono);
  letter-spacing: .19em;
  color: var(--np-editorial);
  pointer-events: none;
}
body[data-style="paper"][data-theme] .app-header.card::after {
  left: 40px;
  right: 40px;
  bottom: 56px;
  height: 1px;
  background: var(--np-rule);
}
body[data-style="paper"][data-theme] .profile-name {
  font-size: clamp(32px, 3.5vw, 54px);
  line-height: 1.04;
  font-weight: 650;
  letter-spacing: -.04em;
  font-variation-settings: 'opsz' 80;
}
body[data-style="paper"][data-theme] .profile-title {
  font-size: 17px;
  font-weight: 450;
  letter-spacing: -.025em;
  margin-top: 9px;
}
body[data-style="paper"][data-theme] .profile-photo-container {
  border-radius: 2px;
  outline: 5px solid var(--np-tile);
  box-shadow: 1px 5px 9px rgb(var(--np-shadow-rgb) / 25%);
  rotate: -3deg;
}
body[data-style="paper"][data-theme] .search-input {
  border-radius: 0;
  background: transparent;
  border-color: transparent;
  border-bottom-color: var(--np-rule);
  box-shadow: none;
  font-family: var(--np-mono);
  font-size: 11px;
}
body[data-style="paper"][data-theme] .search-input:focus {
  border-bottom-color: var(--np-accent);
  box-shadow: 0 2px 0 var(--np-accent);
}

/* Cut sheets: only the decorative backing is clipped. The content and all
   hit targets remain level. A second stock peeks out beneath selected cards. */
body[data-style="paper"][data-theme] section.card {
  --np-card-stock: var(--np-sheet);
  isolation: isolate;
  background: transparent;
  border-radius: 1px 3px 5px 2px;
  box-shadow: var(--np-lift-sheet);
}
body[data-style="paper"][data-theme] section.card::before {
  content: '';
  inset: 0;
  border-radius: 0;
  background-color: var(--np-card-stock);
  background-image: var(--np-grain), linear-gradient(110deg, rgb(255 255 255 / 9%), transparent 40%, rgb(var(--np-shadow-rgb) / 3%));
  background-size: 640px 640px, 100% 100%;
  clip-path: none;
  mask: var(--np-sheet-mask) 0 0 / 100% 100% no-repeat;
  z-index: -1;
}
body[data-style="paper"][data-theme] section.card::after {
  content: '';
  position: absolute;
  inset: 3px 1px -2px 2px;
  background: var(--np-backing);
  clip-path: none;
  mask: var(--np-sheet-mask) 0 0 / 100% 100% no-repeat;
  z-index: -2;
  pointer-events: none;
}
body[data-style="paper"][data-theme] section.card:nth-of-type(4n + 2) {
  --np-card-stock: var(--np-stock-alt);
}
body[data-style="paper"][data-theme] section.card:nth-of-type(4n + 3) {
  --np-card-stock: var(--np-stock-cool);
}
body[data-style="paper"][data-theme] section.card:nth-of-type(3n + 2)::after {
  inset: 4px 2px -3px 1px;
  background: var(--np-backing);
  rotate: -.12deg;
}
body[data-style="paper"][data-theme] section.card > .section-title-wrapper {
  align-items: baseline;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--np-rule-strong);
  margin-bottom: 22px;
}
body[data-style="paper"][data-theme] :is(.card > h2, .card > h3, .card .section-title, .eisenhower-header h3, .tt-header h3) {
  font-size: 32px;
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -.03em;
  font-variation-settings: 'opsz' 60;
}
/* A few pasted headline clippings, never a tab attached to a card edge. */
body[data-style="paper"][data-theme] .app-main:not(.edit-mode-tiles) > section.card:nth-of-type(4n + 2) > .section-title-wrapper .section-title {
  background: var(--np-ink);
  color: var(--np-sheet);
  padding: 3px 8px 6px;
  margin: -3px 0 -6px;
  box-shadow: 3px 3px 0 rgb(var(--np-shadow-rgb) / 12%);
  rotate: -1deg;
}
body[data-style="paper"][data-theme] .app-main:not(.edit-mode-tiles) > section.card:nth-of-type(4n + 3) .section-title {
  font-style: italic;
  font-weight: 550;
}
body[data-style="paper"][data-theme] .unified-subtitle {
  font-family: var(--np-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .09em;
  line-height: 1.6;
}
body[data-style="paper"][data-theme] .unified-subtitle-wrapper::after {
  background: none;
  border-bottom: 1px dotted var(--np-rule);
}
body[data-style="paper"][data-theme] :is(.eisenhower-section-heading, .tt-section-heading, .wr-focus-kind, .wr-focus-rail-head) {
  font-family: var(--np-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .07em;
}

/* Small items read as paper scraps, with fewer repeated frames and badges. */
body[data-style="paper"][data-theme] .icon-button {
  border-radius: 1px;
  border-color: transparent;
  background-color: var(--np-tile);
  background-image: var(--np-grain);
  background-size: 640px 640px;
  box-shadow: var(--np-lift-tile);
}
body[data-style="paper"][data-theme] :is(.unified-subtask-item, .unified-reminder-item, .unified-copypaste-item:not(.color-swatch), .list-item, .reminder-item, .copy-paste-item) {
  border-radius: 1px;
  border-color: transparent;
  box-shadow: var(--np-lift-slip);
}
body[data-style="paper"][data-theme] .unified-reminder-item[data-custom-color] .days-badge {
  border-radius: 0;
  box-shadow: none;
  background: var(--np-tile) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}
body[data-style="paper"][data-theme] .eisenhower-card-header {
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -.035em;
  padding-bottom: 10px;
  border-bottom: 1px solid rgb(var(--priority-rgb) / 35%);
}
body[data-style="paper"][data-theme] .eisenhower-card-header::before { content: none; }
body[data-style="paper"][data-theme] :is(.eisenhower-card .eisenhower-priority-card, .today-color-group.eisenhower-priority-card) {
  border: 0;
  border-radius: 0;
  background-image: var(--np-grain);
  background-size: 640px 640px;
  box-shadow: var(--np-lift-slip);
}
body[data-style="paper"][data-theme] :is(.appearance-dialog, .task-editor-dialog, .ic-dialog, .note-viewer-dialog, .calendar-view-dialog, .today-dialog) {
  border-radius: 3px;
  background-image: var(--np-grain);
  background-size: 640px 640px;
}
body[data-style="paper"][data-theme] :is(.appearance-dialog h3, .task-editor-header h3, .today-header h3, .calendar-view-header h4) {
  font-family: var(--np-serif);
  font-weight: 650;
  letter-spacing: -.04em;
}

/* On a phone the journal becomes a single clean column. Keep the native
   touch sizes and swipe geometry; typography and stock carry the direction. */
/* Small scraps: a separate paint layer supplies real silhouette shadows.
   The interactive element, its focus outline, and its children stay unmasked.
   Inline user colours are copied into --np-scrap-fill by addPaperSurface(). */
body[data-style="paper"][data-theme] :is(.icon-button, .unified-subtask-item, .unified-reminder-item, .unified-copypaste-item).np-scrap {
  position: relative;
  isolation: isolate;
  background: transparent !important;
  border-color: transparent;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}
body[data-style="paper"][data-theme] .np-scrap:is(:hover, :focus-visible) { box-shadow: none; }
body[data-style="paper"][data-theme] .np-scrap > .np-paper-surface,
body[data-style="paper"][data-theme] .np-scrap > .np-progress-surface {
  display: block;
  position: absolute;
  inset: -1px;
  z-index: -2;
  overflow: visible; /* These spans are decoration, not ellipsized subtask text. */
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgb(var(--np-shadow-rgb) / 20%)) drop-shadow(1px 4px 3px rgb(var(--np-shadow-rgb) / 10%));
}
body[data-style="paper"][data-theme] .np-paper-surface::before,
body[data-style="paper"][data-theme] .np-progress-surface::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--np-tile);
  background-image: linear-gradient(var(--np-scrap-shade, transparent), var(--np-scrap-shade, transparent)),
    linear-gradient(var(--np-scrap-fill, transparent), var(--np-scrap-fill, transparent)), var(--np-grain);
  background-size: auto, auto, 640px 640px;
  mask: var(--np-strip-mask) 0 0 / 100% 100% no-repeat;
  pointer-events: none;
}
body[data-style="paper"][data-theme] .np-scrap:nth-child(3n + 2) { --np-strip-mask: url('assets/textures/paper-strip-b.svg'); }
body[data-style="paper"][data-theme="dark"] .np-scrap[style*="--np-scrap-fill"] { --np-scrap-shade: rgb(0 0 0 / 20%); }
body[data-style="paper"][data-theme] .np-scrap:nth-child(3n + 2) > .np-paper-surface { rotate: -.35deg; --np-quick-tilt: .65deg; }
body[data-style="paper"][data-theme] .np-scrap:nth-child(3n) > .np-paper-surface { rotate: .2deg; --np-quick-tilt: -.5deg; }
body[data-style="paper"][data-theme] .icon-button.np-scrap { --np-strip-mask: url('assets/textures/paper-square.svg'); }
body[data-style="paper"][data-theme] .icon-button.np-scrap > .np-paper-surface { rotate: -.7deg; --np-quick-tilt: 2deg; }
body[data-style="paper"][data-theme] .icon-button.np-scrap:nth-child(even) > .np-paper-surface { rotate: .9deg; --np-quick-tilt: -2deg; }
body[data-style="paper"][data-theme] .icon-button.np-scrap:nth-child(3n) > .np-paper-surface { rotate: -.2deg; --np-quick-tilt: 1.5deg; }
/* A second scrap is visible under occasional tiles, clear of their badges. */
body[data-style="paper"][data-theme] .icon-button.np-scrap:nth-child(3n + 2) > .np-paper-surface::after {
  content: '';
  position: absolute;
  inset: 2px -1px -2px 3px;
  z-index: -1;
  background: var(--np-stock-cool);
  mask: var(--np-strip-mask) 0 0 / 100% 100% no-repeat;
  rotate: -1.5deg;
}
/* Quick Access is a turquoise sheet peeking out at the bottom-left.
   A soft contact shadow separates the top sheet from its backing.
   Its gentle tilt counters the top sheet, including their inherited rotation. */
body[data-style="paper"][data-theme] .np-scrap:is(.icon-in-quick-access, .quick-access-lit:not(.color-swatch)) > .np-paper-surface::after {
  content: '';
  position: absolute;
  inset: 6px 3px -8px -5px;
  z-index: -2;
  background-color: var(--np-quick-stock);
  background-image: var(--np-grain), linear-gradient(135deg, rgb(255 255 255 / 12%), transparent 60%);
  background-size: 640px 640px, 100% 100%;
  mask: var(--np-strip-mask) 0 0 / 100% 100% no-repeat;
  rotate: var(--np-quick-tilt, .3deg);
  /* Turn the backing slightly counterclockwise around its existing top-left
     corner, preserving the position established by its separate rotate. */
  transform: translate(-50%, -50%) rotate(-.6deg) translate(50%, 50%);
  pointer-events: none;
}
body[data-style="paper"][data-theme] .np-paper-surface > .np-paper-contact-shadow {
  display: block;
  position: absolute;
  inset: 1px 1px -1px -1px;
  z-index: -1;
  overflow: visible;
  pointer-events: none;
  filter: blur(1.4px);
}
body[data-style="paper"][data-theme] .np-paper-contact-shadow::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgb(var(--np-shadow-rgb) / 23%);
  mask: var(--np-strip-mask) 0 0 / 100% 100% no-repeat;
  pointer-events: none;
}
/* Elapsed time is another piece pasted over the base, with its own torn
   leading edge and contact shadow. Width remains the actual countdown value. */
body[data-style="paper"][data-theme] .unified-reminder-item.np-scrap::before { content: none; }
body[data-style="paper"][data-theme] .unified-reminder-item.np-scrap > .np-progress-surface {
  inset: 0 auto 0 0;
  width: clamp(0%, var(--progress-width, 100%), 100%);
  z-index: -1;
  filter: drop-shadow(1px 1px 1px rgb(var(--np-shadow-rgb) / 24%));
}
body[data-style="paper"][data-theme] .np-progress-surface::before {
  background-color: var(--np-progress-stock);
  background-image: var(--np-grain);
  background-size: 640px 640px;
  mask-image: url('assets/textures/paper-strip-b.svg');
}
body[data-style="paper"][data-theme] .np-scrap[data-progress-state="green"] { --np-progress-stock: var(--np-w-green); }
body[data-style="paper"][data-theme] .np-scrap[data-progress-state="yellow"] { --np-progress-stock: var(--np-w-yellow); }
body[data-style="paper"][data-theme] .np-scrap[data-progress-state="orange"] { --np-progress-stock: var(--np-w-orange); }
body[data-style="paper"][data-theme] .np-scrap[data-progress-state="red"] { --np-progress-stock: var(--np-w-red); }

/* Icon links are pasted onto one lifted slip; only the stock is torn. A
   separate inner scroller keeps long lists and keyboard focus on the sheet. */
body[data-style="paper"][data-theme] .icon-indicator-expanded {
  isolation: isolate;
  box-sizing: border-box;
  width: max-content;
  min-width: min(220px, calc(100vw - 32px));
  max-width: min(340px, calc(100vw - 32px));
  padding: 20px 18px 22px;
  gap: 0;
}
body[data-style="paper"][data-theme] .icon-indicator-expanded > .np-paper-surface {
  inset: 0;
  rotate: -.4deg;
  filter: drop-shadow(0 2px 1px rgb(var(--np-shadow-rgb) / 18%)) drop-shadow(2px 7px 7px rgb(var(--np-shadow-rgb) / 22%));
}
body[data-style="paper"][data-theme] .icon-indicator-expanded > .np-paper-surface::before {
  background-color: var(--np-sheet);
  background-image: var(--np-grain);
  background-size: 640px 640px;
  mask-image: url('assets/textures/paper-popup.svg');
}
body[data-style="paper"][data-theme] .np-icon-links-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  max-height: calc(100dvh - 78px);
  padding: 3px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
body[data-style="paper"][data-theme] .icon-indicator-expanded :is(.reminder-task-bubble, .reminder-link-bubble) {
  flex-shrink: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  border-radius: 1px;
  padding: 9px 12px;
  box-shadow: 0 1px 0 var(--np-rule);
}
body[data-style="paper"][data-theme] .icon-indicator-expanded :is(.reminder-task-bubble, .reminder-link-bubble):hover {
  box-shadow: 0 2px 0 var(--np-accent);
}

/* The category palette is printed ink throughout Newspaper, so chart,
   legend, and task-category marks still agree. Glass retains its own palette. */
body[data-style="paper"][data-theme] {
  --task-cat-1: #387f9d;
  --task-cat-2: #bb7045;
  --task-cat-3: #71934e;
  --task-cat-4: #9b648b;
  --task-cat-5: #bb962e;
  --task-cat-6: #368c7f;
  --task-cat-7: #b85c53;
  --task-cat-8: #817368;
  --task-cat-none: #8a867d;
  --task-cat-other: #a59f93;
}
body[data-style="paper"][data-theme="dark"] {
  --task-cat-1: #80bdd4;
  --task-cat-2: #dfa073;
  --task-cat-3: #b1cd83;
  --task-cat-4: #cf95bc;
  --task-cat-5: #ddc165;
  --task-cat-6: #80c5b4;
  --task-cat-7: #dc968a;
  --task-cat-8: #b2aca0;
}
body[data-style="paper"][data-theme] .tt-donut > svg { filter: url('#paper-ink-print'); }
body[data-style="paper"][data-theme] .tt-donut-center strong {
  font-family: var(--np-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.04em;
}
body[data-style="paper"][data-theme] .tt-donut-center-label { font-family: var(--np-mono); font-size: 10px; }
body[data-style="paper"][data-theme] .tt-legend-swatch { border-radius: 0; filter: url('#paper-ink-print'); }

/* Mobile shell: keep the existing touch and swipe geometry. */
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(#mx-topbar, #mx-dock, .mx-sheet) {
  background-image: var(--np-grain);
  background-size: 640px 640px;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-slot-title, .mx-pane-title, .mx-today-greeting, .mx-write-title, .mx-card-title) {
  font-family: var(--np-serif);
  letter-spacing: -.035em;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-slot-sub, .mx-section-title, .mx-today-section-title) {
  font-family: var(--np-mono);
  letter-spacing: .03em;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-pane.eisenhower-priority-card {
  border-radius: 1px 1px 3px 3px;
  background-image: var(--np-grain);
  background-size: 640px 640px;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-pane-label, .mx-today-pane-label) {
  font-size: 19px;
  letter-spacing: -.025em;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-pane-dot { display: none; }
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-task, .mx-today-row).eisenhower-task,
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-task-slot, .mx-swipe-under, .mx-today-slot) {
  border-radius: 3px;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] :is(.mx-task, .mx-today-row).eisenhower-task.eisenhower-task-pinned {
  box-shadow: var(--np-lift-slip);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-pushed {
  background-image: var(--np-grain);
  background-size: 640px 640px;
}
@media (max-width: 1000px) {
  body[data-style="paper"][data-theme] .profile-name { font-size: 34px; }
  body[data-style="paper"][data-theme] .card .section-title { font-size: 27px; }
}
@media (max-width: 600px) {
  body[data-style="paper"][data-theme] .app-header.card::before { content: none; }
  body[data-style="paper"][data-theme] .app-header.card::after { bottom: 0; left: 24px; right: 24px; }
  body[data-style="paper"][data-theme] .profile-name { font-size: 30px; }
}


/* === 19. Task papers ======================================================
   Tinted column stock, saturated Primary clippings, and white Secondary
   strips. Only the two decorative paper layers are masked; task hit targets,
   link popups, focus rings, and phone swipe/drag geometry remain intact. */
body[data-style="paper"][data-theme] :is(.eisenhower-priority-card-blue, .task-bubble-blue, .mx-tone-blue) {
  --np-task-solid: #2b638e;
  --np-task-column: #dceaf1;
  --np-task-heading: #285775;
}
body[data-style="paper"][data-theme] :is(.eisenhower-priority-card-yellow, .task-bubble-yellow, .mx-tone-yellow) {
  --np-task-solid: #806415;
  --np-task-column: #f0e6b9;
  --np-task-heading: #715918;
}
body[data-style="paper"][data-theme] :is(.eisenhower-priority-card-orange, .task-bubble-orange, .mx-tone-orange) {
  --np-task-solid: #a34c25;
  --np-task-column: #f3ddc9;
  --np-task-heading: #8d482b;
}
body[data-style="paper"][data-theme] :is(.eisenhower-priority-card-red, .task-bubble-red, .mx-tone-red) {
  --np-task-solid: #a33c39;
  --np-task-column: #f0d7d2;
  --np-task-heading: #913d37;
}
body[data-style="paper"][data-theme="dark"] :is(.eisenhower-priority-card-blue, .task-bubble-blue, .mx-tone-blue) {
  --np-task-column: #293f4b;
  --np-task-heading: #b2d6ec;
}
body[data-style="paper"][data-theme="dark"] :is(.eisenhower-priority-card-yellow, .task-bubble-yellow, .mx-tone-yellow) {
  --np-task-column: #443d25;
  --np-task-heading: #e4cf82;
}
body[data-style="paper"][data-theme="dark"] :is(.eisenhower-priority-card-orange, .task-bubble-orange, .mx-tone-orange) {
  --np-task-column: #4a352a;
  --np-task-heading: #edba91;
}
body[data-style="paper"][data-theme="dark"] :is(.eisenhower-priority-card-red, .task-bubble-red, .mx-tone-red) {
  --np-task-column: #4a2e2e;
  --np-task-heading: #eab0a8;
}
body[data-style="paper"][data-theme] .eisenhower-priority-card,
html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-pane.eisenhower-priority-card {
  background-color: var(--np-task-column, var(--np-sheet));
}
body[data-style="paper"][data-theme] .eisenhower-card-header {
  color: var(--np-task-heading, var(--np-ink));
  border-bottom-color: color-mix(in srgb, var(--np-task-heading) 32%, transparent);
}
body[data-style="paper"][data-theme] .eisenhower-card-tasks { gap: 9px; }

/* Local ink tokens keep titles, meta, hover controls and live timers legible
   on their own stock, including white Secondary slips in the night edition. */
body[data-style="paper"][data-theme] .eisenhower-task {
  --np-task-stock: #fffefa;
  --np-ink: #28251f;
  --np-ink-soft: #514c40;
  --np-muted: #595246;
  --np-live-t: #23643f;
  --np-live-fill: #2f7550;
  --np-on-live: #fffdf7;
  --np-rule: rgb(40 37 31 / 25%);
  isolation: isolate;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--np-ink);
}
body[data-style="paper"][data-theme="dark"] .eisenhower-task { --np-task-stock: #e8e7df; }
body[data-style="paper"][data-theme] .eisenhower-task.eisenhower-task-pinned {
  --np-task-stock: var(--np-task-solid, #405c66);
  --np-ink: #fffdf7;
  --np-ink-soft: #f6f1e7;
  --np-muted: #f0eadd;
  --np-live-t: #d1f8dc;
  --np-live-fill: #fffdf7;
  --np-on-live: #23573d;
  --np-rule: rgb(255 253 247 / 45%);
  color: var(--np-ink);
}
body[data-style="paper"][data-theme] .eisenhower-task::before,
body[data-style="paper"][data-theme] .eisenhower-task::after {
  content: '';
  position: absolute;
  border: 0;
  border-radius: 0;
  pointer-events: none;
  mask: url('assets/textures/paper-task.svg') center / 100% 100% no-repeat;
  box-shadow: none;
}
body[data-style="paper"][data-theme] .eisenhower-task::before {
  inset: -1px -1px -2px;
  z-index: 0;
  background: var(--np-task-stock) var(--np-grain) 0 0 / 640px 640px;
}
body[data-style="paper"][data-theme] .eisenhower-task::after {
  inset: 2px 0 -4px 1px;
  z-index: -1;
  background: rgb(var(--np-shadow-rgb) / 22%);
  filter: blur(1px);
}
body[data-style="paper"][data-theme] .eisenhower-card-tasks > .eisenhower-task:nth-child(even)::before { rotate: -.14deg; }
body[data-style="paper"][data-theme] .eisenhower-card-tasks > .eisenhower-task:nth-child(3n)::before { rotate: .1deg; }
body[data-style="paper"][data-theme] .eisenhower-task.eisenhower-task-pinned :is(.task-timer-btn, .task-complete-btn, .eisenhower-task-link-btn):is(:hover, :focus-visible) {
  color: var(--np-ink);
  background: rgb(255 253 247 / 16%);
}
body[data-style="paper"][data-theme] .eisenhower-task .task-timer.is-running .task-timer-btn {
  background: var(--np-live-fill);
  color: var(--np-on-live);
}
body[data-style="paper"][data-theme] .eisenhower-task .task-timer-btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
body[data-style="paper"][data-theme] .eisenhower-task .today-chip {
  color: #2f5784;
  background: rgb(61 107 153 / 8%);
}
body[data-style="paper"][data-theme] .eisenhower-task.eisenhower-task-pinned .today-chip {
  color: var(--np-ink);
  background: rgb(255 253 247 / 12%);
  box-shadow: inset 0 0 0 1px rgb(255 253 247 / 40%);
}
body[data-style="paper"][data-theme] .eisenhower-task .today-chip.is-overdue {
  color: #8e3027;
  background: #f6e1d8;
  box-shadow: inset 0 0 0 1px rgb(142 48 39 / 25%);
}

/* Phone titles have explicit colours in the shell; use the slip's local ink.
   Its completion rings stay white, and its swipe/hold controls keep their size. */
html[data-shell="mobile"] body[data-style="paper"][data-theme] .eisenhower-task :is(.mx-task-title, .mx-today-title, .mx-task-meta, .mx-row-actions, .mx-link-btn) {
  color: var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .eisenhower-task.eisenhower-task-pinned .mx-task-dot {
  background: var(--np-ink);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .eisenhower-task.eisenhower-task-pinned .today-chip {
  color: var(--np-ink);
  background: rgb(255 253 247 / 12%);
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .eisenhower-task .today-chip.is-overdue {
  color: #8e3027;
  background: #f6e1d8;
}
html[data-shell="mobile"] body[data-style="paper"][data-theme] .eisenhower-task .task-timer.is-running .task-timer-btn {
  background: var(--np-live-fill);
  color: var(--np-on-live);
}


/* === 20. Accessibility ===================================================== */
/* Reduced motion: the glass rule (glass.css 860) restated for paper, value
   for value, so a reduced-motion reader gets the same stillness in both looks
   and every transitionend / animationend the scripts wait for still fires.
   Safe now: the grid container never transitions (styles.css .app-main
   transition-property: none), which is what once made a global rule clip
   cards after edit mode. */
@media (prefers-reduced-motion: reduce) {
  body[data-style="paper"][data-theme] *,
  body[data-style="paper"][data-theme] *::before,
  body[data-style="paper"][data-theme] *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  /* the swap pulse's own !important shorthand (part 8) outranks the line
     above; a 0.01ms beat would also drop the "swap armed" cue, so it holds
     still at the pulse's resting light instead */
  body[data-style="paper"][data-theme] .card-swap-glow {
    animation: none !important;
    filter: drop-shadow(0 0 4px rgb(var(--np-accent-rgb) / 90%)) drop-shadow(0 0 12px rgb(var(--np-accent-rgb) / 50%));
  }
  /* the 1px hover lifts go still too. (0,5,1): level with the slip hover
     rules, later, so it wins; no !important, so the phone rows' Web
     Animations (swipe, drag) still move, and those rows are left out anyway */
  body[data-style="paper"][data-theme] :not(.mx-task, .mx-today-row):is(.icon-button, .eisenhower-task, .unified-subtask-item,
    .unified-reminder-item, .unified-copypaste-item, .list-item, .reminder-item, .copy-paste-item):is(:hover, :active, :focus-visible) {
    transform: none;
  }
}

/* Forced colours: the system paints fills, rings and shadows away, so every
   paper cue drawn with a box-shadow or a fill gets a system-colour outline
   or border here (outlines: no geometry change). The structural forced-colour
   blocks in styles.css / mobile*.css stay as they are. */
@media (forced-colors: active) {
  body[data-style="paper"][data-theme] .tt-past-month[data-season] {
    --np-done-ink: CanvasText;
    --np-done-heading: CanvasText;
  }
  body[data-style="paper"][data-theme] .tt-month-label::before { content: none; }
  body[data-style="paper"][data-theme] .tt-past-group .tt-task::before { content: none; }
  body[data-style="paper"][data-theme] .tt-past-group .tt-task {
    --np-ink: CanvasText;
    --np-ink-soft: CanvasText;
    --np-muted: CanvasText;
    --np-hair: CanvasText;
    background: Canvas;
    border-color: CanvasText;
  }
  body[data-style="paper"][data-theme] :is(.sticky-note, .sticky-note-preview) {
    --np-note-ink: CanvasText;
    background: Canvas;
    outline: 1px solid CanvasText;
  }
  body[data-style="paper"][data-theme] :is(.sticky-note, .sticky-note-preview)::before,
  body[data-style="paper"][data-theme] :is(.sticky-note, .sticky-note-preview)::after,
  body[data-style="paper"][data-theme] :is(.sticky-note, .sticky-note-preview) .sticky-note-header::before { content: none; }
  body[data-style="paper"][data-theme] .sticky-note-body:empty::before,
  body[data-style="paper"][data-theme] .sticky-note-delete { color: CanvasText; }
  body[data-style="paper"][data-theme] .meetings-item {
    --np-meeting-ink: CanvasText;
    background: Canvas;
    outline: 1px solid CanvasText;
  }
  body[data-style="paper"][data-theme] .meetings-item.active {
    --np-meeting-ink: HighlightText;
    background: Highlight;
    outline: 2px solid Highlight;
  }
  body[data-style="paper"][data-theme] .meetings-item::before,
  body[data-style="paper"][data-theme] .meetings-item::after { content: none; }
  body[data-style="paper"][data-theme] .eisenhower-task {
    --np-ink: CanvasText;
    --np-ink-soft: CanvasText;
    --np-muted: CanvasText;
    --np-live-t: LinkText;
    --np-live-fill: Highlight;
    --np-on-live: HighlightText;
    background: Canvas !important;
    border: 1px solid CanvasText !important;
  }
  body[data-style="paper"][data-theme] .eisenhower-task.eisenhower-task-pinned {
    --np-ink: CanvasText;
    --np-ink-soft: CanvasText;
    --np-muted: CanvasText;
    --np-live-t: LinkText;
    --np-live-fill: Highlight;
    --np-on-live: HighlightText;
    outline: 2px solid Highlight;
  }
  body[data-style="paper"][data-theme] .eisenhower-task::before,
  body[data-style="paper"][data-theme] .eisenhower-task::after { content: none; }
  body[data-style="paper"][data-theme] :is(.icon-button, .unified-subtask-item, .unified-reminder-item, .unified-copypaste-item).np-scrap {
    background: Canvas !important;
    outline: 1px solid CanvasText;
  }
  body[data-style="paper"][data-theme] .np-scrap > :is(.np-paper-surface, .np-progress-surface) { display: none; }
  body[data-style="paper"][data-theme] .tt-donut > svg,
  body[data-style="paper"][data-theme] .tt-legend-swatch { filter: none; }
  body[data-style="paper"][data-theme] section.card {
    background: Canvas;
    outline: 1px solid CanvasText;
  }
  body[data-style="paper"][data-theme] section.card::before,
  body[data-style="paper"][data-theme] section.card::after { content: none; }
  /* Marker annotations keep their shapes in system colours. */
  body[data-style="paper"][data-theme] .icon-indicator::before {
    forced-color-adjust: none;
    background: CanvasText;
  }
  body[data-style="paper"][data-theme] .icon-indicator::after {
    forced-color-adjust: none;
    background: Canvas;
  }
  body[data-style="paper"][data-theme] :is(.icon-button.icon-in-quick-access, .quick-access-lit:not(.color-swatch)) {
    outline: 2px solid Highlight;
    outline-offset: 3px;
  }
  body[data-style="paper"][data-theme] .icon-indicator-expanded {
    background: Canvas;
    outline: 1px solid CanvasText;
  }
  /* no grain: url() images survive forced colours and would mottle Canvas.
     [data-theme] makes it (0,2,2), level with the night canvas rule (3), so
     it wins both editions by order */
  html:has(> body[data-style="paper"][data-theme]) { background-image: none; }
  body[data-style="paper"][data-theme] { --np-grain: none; }
  /* the + glyph follows the button's forced text colour (its cream stroke
     vanished on a Canvas disc) */
  html[data-shell="mobile"] body[data-style="paper"][data-theme] .mx-plus-glyph { stroke: currentColor; }
  /* chosen options: the ink border alone matches every other border here */
  body[data-style="paper"][data-theme] :is(.appearance-option.active, .device-mode-option.active) {
    outline: 3px solid Highlight;
    outline-offset: 2px;
  }
  /* #mobile-shell: the structural 1px ring (mobile.css 869) is (1,1,1) through the #mx-plus in its :is() */
  html[data-shell="mobile"] body[data-style="paper"][data-theme] #mobile-shell :is(.mx-seg-opt[aria-selected="true"], .mx-seg-opt[aria-checked="true"],
    .mx-switch-opt[aria-pressed="true"], .mx-chip[aria-pressed="true"]) {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }
  /* the column heads' diamond dingbats */
  body[data-style="paper"][data-theme] .eisenhower-card-header::before {
    forced-color-adjust: none;
    background: CanvasText;
  }
  /* stamps drawn as inset rings: Today / Overdue chips, the days stamp on a
     user-coloured reminder */
  body[data-style="paper"][data-theme] :is(.today-chip, .unified-reminder-item[data-custom-color] .days-badge) {
    outline: 1px solid CanvasText;
    outline-offset: -1px;
  }
  /* keyboard picks in the lists drawn as inset accent rings */
  body[data-style="paper"][data-theme] :is(.task-mention-item.selected, .wr-menu-item.is-selected) {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }
}
