/* HyperiaMail webmail: its own look, over the sheet it shares with the
   dashboard (hyperiamail-ui/style.css).

   One layout in two sets of colours. The layout is the dark picture's in
   "design kit" ("HyperiaMail Product Launch Inbox-2.png", and the page made
   from it): a deep violet side bar with the mark, Compose, the folders and
   the mailbox's size; a top bar with the search and the account; then the
   list, which lies on the page itself with no panel behind it, and the open
   conversation in a rounded panel. The light theme is the same layout in
   light colours ("HyperiaMail Product Launch Inbox Light.html").

   The design is drawn for a 1672 px wide window, and roomy. The webmail is
   kept compact instead: its measures are multiplied by --u, which is 0.8 px
   at every width, and the heights, gaps and paddings are smaller than drawn
   (a row of the list is about 70 px, the side bar about 220 px). The text is
   no smaller than 12 px. Phones keep their own layout (the drawer and the
   tabs at the foot) in the new colours. */

/* ---- Colours ------------------------------------------------------------ */

:root {
  --font: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system,
    "Helvetica Neue", Roboto, Arial, sans-serif;

  /* The light page ("HyperiaMail Product Launch Inbox Light.html"). */
  --ink: #0d0b26;
  --ink-2: #1f1d4d;
  --ink-3: #2d2c58;
  --brand: #6a3ce9;
  --brand-strong: #5a2ef5;
  --link: #5a35e8;
  --link-hover: #3f1fd0;
  --side: #1a134b;
  --page: #f3f2fc;
  --page-foot: #e9e8fb;
  --panel: #fcfbff;
  --panel-line: #e1e1f5;
  --panel-top: #e1e1f5;
  --line: #ececfa;
  --field: #e8e7f8;
  --field-line: #dbdaf1;
  --chip: #d5d5ef;
  --tile: #f6f5fe;
  --tile-line: #e3e3f6;
  --star: #faae3c;
  --star-off: #43436f;
  --placeholder: #3b3a68;
  --check-line: #979cc1;
  --row-line: #ebebfa;
  --tools-line: #eeeffb;
  --sep: #dcdcf1;
  --pill-ink: #5a35e8;
  --main-edge: rgba(255, 255, 255, 0.9);
  --reader: linear-gradient(180deg, #fdfcff, #fbfaff 80%, #faf9fe);
  --selected: linear-gradient(90deg, #e1d9fd 0%, #e7e2fd 52%, #edeafe 100%);
  --selected-ring: inset 0 0 0 1.5px #9079f0, 0 0 14px rgba(124, 92, 255, 0.16);
  --row-hover: rgba(124, 108, 255, 0.07);
  /* A read conversation's row: its name, subject and first words, a little
     faded beside an unread one's. */
  --read-name: #2d2c58;
  --read-subject: #47466f;
  --read-preview: #5f5e88;
  --button: #fcfbfe;
  --button-line: #d3d4f1;
  --button-hover: #f4f2fe;
  --button-line-hover: #b9b6ee;
  --primary: linear-gradient(180deg, #7448ee, #6537e6);
  --primary-line: #7a52f0;
  --primary-glow: 0 0 16px rgba(104, 64, 236, 0.18);
  --account: linear-gradient(160deg, #8452f3, #6f3fea);
  /* The side bar, violet in both themes. */
  --compose:
    radial-gradient(130px 44px at 10% 112%, rgba(160, 120, 255, 0.35), transparent),
    linear-gradient(100deg, #8559f6 0%, #7c4df1 42%, #7044ea 74%, #6838e4 100%);
  --compose-glow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 18px rgba(86, 44, 214, 0.22);
  --side-active: linear-gradient(90deg, #4d3996 0%, #47358d 60%, #423287 100%);
  --side-count: #49358b;
  --side-count-strong: linear-gradient(90deg, #7a4ff0, #7146ea);
  --side-rule: #4c4490;
  --side-meter: #5540a0;
  --side-meter-fill: linear-gradient(90deg, #9b70f8, #b58cff);
  /* Senders' circles: five soft colours. */
  --avatar-1: #e4dafd;
  --avatar-1-ink: #4a2bb4;
  --avatar-2: #cdeae8;
  --avatar-2-ink: #0c5a4a;
  --avatar-3: #e2e0fd;
  --avatar-3-ink: #5b34f0;
  --avatar-4: #f3cff1;
  --avatar-4-ink: #9c1f8a;
  --avatar-5: #cfe7fe;
  --avatar-5-ink: #1a78f2;
  /* The light in the side bar's top corner, behind the main area's rounded
     corner (and the phone drawer's). */
  --glow-a: rgba(108, 46, 240, 0.95);
  --glow-b: rgba(74, 30, 176, 0.55);
  --glow-c: rgba(60, 28, 152, 0.36);
  --glow-phone: rgba(108, 46, 240, 0.6);
  /* Compose, pressed in while a message is written. */
  --press-shade: rgba(10, 6, 40, 0.35);
  /* A folder that mail is being dragged onto. */
  --drop-ring: #b79bff;
  /* What stands on the side bar: light, on its dark colour. The White and
     Paper looks give it a light side bar, and dark writing on it. */
  --side-ink: #ffffff;
  --side-ink-soft: rgba(255, 255, 255, 0.8);
  --side-muted: rgba(255, 255, 255, 0.74);
  --side-hover: rgba(255, 255, 255, 0.05);
  --side-hover-strong: rgba(255, 255, 255, 0.12);
  --side-drop: rgba(255, 255, 255, 0.16);
  --side-active-ink: #ffffff;
  --side-active-edge: rgba(255, 255, 255, 0.06);
  --side-count-ink: #ffffff;
  --side-field: rgba(255, 255, 255, 0.08);
  --side-field-line: rgba(255, 255, 255, 0.18);
  /* Settings, Look: the small pictures of the looks, in this colour (the
     same in the light and the dark list). */
  --sample-side: #1a134b;
  --sample-page: #f3f2fc;
  --sample-dark-side: #0e0f2c;
  --sample-dark-page: #0b0c24;
  --sample-dark-row: #25284e;

  /* The shared sheet's names, in these colours: every page of the webmail
     follows, whatever it is built from. */
  --bg: var(--page);
  --surface: var(--panel);
  --text: var(--ink);
  --muted: #55547f;
  --border: var(--panel-line);
  --border-strong: #cfcfee;
  --hover: #efedfb;
  --hover-strong: #e6e3f8;
  --accent: var(--brand);
  --accent-from: #7448ee;
  --accent-text: #ffffff;
  --accent-soft: #e1dafd;
  --ring: 0 0 0 3px rgba(106, 60, 233, 0.2);
  --accent-glow: rgba(104, 64, 236, 0.18);
  --unread: var(--panel);
  --danger: #c2262f;
  --danger-soft: #fde8ee;
  /* A red button's fill, under white writing: the same in every look and
     colour (--danger is the red of writing, light in dark looks). */
  --danger-fill: #c2262f;
  --ok: #1f7a45;
  --ok-soft: #e2f5ea;
  --warn: #8a5300;
  --warn-soft: #fff1d9;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(26, 19, 75, 0.05), 0 1px 3px rgba(26, 19, 75, 0.05);
  --shadow-md: 0 6px 20px rgba(26, 19, 75, 0.12);
  --shadow-lg: 0 18px 50px rgba(26, 19, 75, 0.24);
}

/* The dark page ("HyperiaMail Product Launch Inbox.html"). */
:root[data-theme="dark"] {
  --ink: #ffffff;
  --ink-2: #e4e5f4;
  --ink-3: #c3c5de;
  --brand: #7c4df0;
  --brand-strong: #8a4ffb;
  --link: #b790ff;
  --link-hover: #d3bcff;
  --side: #0e0f2c;
  --page: #0b0c24;
  --page-foot: #08091e;
  --panel: #11142e;
  --panel-line: #25284e;
  --panel-top: #2f3256;
  --line: #1b1f3e;
  --field: #1b1d3c;
  --field-line: #323458;
  --chip: #2e3055;
  --tile: #1e2143;
  --tile-line: #2f3261;
  --star: #f9b233;
  --star-off: #e6e6f5;
  --placeholder: #eeeefa;
  --check-line: #b0b3cf;
  --row-line: #2a2e52;
  --tools-line: #1f2342;
  --sep: #2b2f5a;
  --pill-ink: #dcc0ff;
  --main-edge: rgba(255, 255, 255, 0.04);
  --reader: linear-gradient(180deg, #11152f, #121632 80%, #101430);
  --selected: linear-gradient(90deg, #472d96 0%, #302768 52%, #22244b 100%);
  --selected-ring: inset 0 0 0 1.5px #9675ec, 0 0 14px rgba(124, 92, 255, 0.2);
  --read-name: #d5d6ea;
  --read-subject: #b9bbd6;
  --read-preview: #9a9dbf;
  --button: #1b1e40;
  --button-line: #2f3261;
  --button-hover: #22264e;
  --button-line-hover: #4b4f8e;
  --primary: linear-gradient(180deg, #8456f1, #6f40e4);
  --primary-line: #9b7dff;
  --primary-glow: 0 0 16px rgba(124, 84, 255, 0.27);
  --account: linear-gradient(160deg, #8a4ffb, #7741f6);
  --compose:
    radial-gradient(130px 44px at 10% 112%, rgba(196, 92, 255, 0.6), transparent),
    linear-gradient(100deg, #8a47f8 0%, #6c3ff5 42%, #5c74fa 74%, #5fa4fc 100%);
  --compose-glow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 18px rgba(104, 76, 250, 0.23);
  --side-active: linear-gradient(90deg, #4a3199 0%, #35286f 60%, #2c245e 100%);
  --side-count: #2f2a66;
  --side-count-strong: linear-gradient(90deg, #8c51fa, #7f49f6);
  --side-rule: #302a60;
  --side-meter: #3c3677;
  --side-meter-fill: linear-gradient(90deg, #8a44fa, #a05eff);
  --avatar-1: #4b388c;
  --avatar-1-ink: #ffffff;
  --avatar-2: #2d5256;
  --avatar-2-ink: #ffffff;
  --avatar-3: #3e3079;
  --avatar-3-ink: #cdbdff;
  --avatar-4: #522954;
  --avatar-4-ink: #f7bdf0;
  --avatar-5: #2b4578;
  --avatar-5-ink: #5ccaff;
  --sample-side: #1a134b;
  --sample-page: #f3f2fc;
  --sample-dark-side: #0e0f2c;
  --sample-dark-page: #0b0c24;
  --sample-dark-row: #25284e;

  --muted: #b3b5d2;
  --border-strong: #3a3d6b;
  --hover: #1b1e40;
  --hover-strong: #22264e;
  --accent-from: #8456f1;
  --accent-soft: #40327c;
  --ring: 0 0 0 3px rgba(138, 79, 251, 0.35);
  --accent-glow: rgba(124, 84, 255, 0.27);
  --danger: #ff8f96;
  --danger-soft: #3d1c33;
  --ok: #7ddc9a;
  --ok-soft: #15352f;
  --warn: #f5c36a;
  --warn-soft: #3a2e22;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.6);
}

/* ---- Other colours: made by tools/accents.py from the lists above; don't edit by hand ---- */

:root[data-accent="blue"] {
  --ink: #020e26;
  --ink-2: #02224c;
  --ink-3: #163158;
  --brand: #0a52ec;
  --brand-strong: #0059bb;
  --link: #0057be;
  --link-hover: #00498a;
  --side: #001b43;
  --page: #eff3fd;
  --page-foot: #e2eafc;
  --panel: #fbfbff;
  --panel-line: #d9e3f6;
  --panel-top: #d9e3f6;
  --line: #e6eefa;
  --field: #e1e9f8;
  --field-line: #d2dcf2;
  --chip: #cad8ef;
  --tile: #f2f6ff;
  --tile-line: #dce5f6;
  --star-off: #2e486f;
  --placeholder: #253f68;
  --check-line: #88a0c0;
  --row-line: #e5edfa;
  --tools-line: #e9f0fb;
  --sep: #d4def1;
  --pill-ink: #0057be;
  --reader: linear-gradient(180deg, #fcfcff, #f9fbff 80%, #f8fafe);
  --selected: linear-gradient(90deg, #d3ddff 0%, #dce5ff 52%, #e5ecff 100%);
  --selected-ring: inset 0 0 0 1.5px #5b86f5, 0 0 14px rgba(40, 112, 255, 0.16);
  --row-hover: rgba(39, 125, 255, 0.07);
  --read-name: #163158;
  --read-subject: #344b6f;
  --read-preview: #4c6388;
  --button: #fbfbff;
  --button-line: #c7d7f1;
  --button-hover: #eff3ff;
  --button-line-hover: #a1bcf0;
  --primary: linear-gradient(180deg, #255cf3, #0050e2);
  --primary-line: #3165f5;
  --primary-glow: 0 0 16px rgba(0, 88, 230, 0.18);
  --account: linear-gradient(160deg, #4165fb, #1d54ef);
  --compose: radial-gradient(130px 44px at 10% 112%, rgba(106, 137, 255, 0.35), transparent), linear-gradient(100deg, #416bfe 0%, #3460f8 42%, #1f58ef 74%, #0e4ee8 100%);
  --compose-glow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 18px rgba(0, 76, 184, 0.22);
  --side-active: linear-gradient(90deg, #214499 0%, #1d3f8f 60%, #173c89 100%);
  --side-count: #223f8e;
  --side-count-strong: linear-gradient(90deg, #3062f6, #215aef);
  --side-rule: #264c91;
  --side-meter: #284ba3;
  --side-meter-fill: linear-gradient(90deg, #6480ff, #899aff);
  --glow-a: rgba(11, 73, 245, 0.95);
  --glow-b: rgba(0, 55, 167, 0.55);
  --glow-c: rgba(0, 51, 133, 0.36);
  --glow-phone: rgba(11, 73, 245, 0.6);
  --press-shade: rgba(0, 10, 35, 0.35);
  --drop-ring: #8fa7ff;
  --sample-side: #001b43;
  --sample-page: #eff3fd;
  --sample-dark-side: #00122b;
  --sample-dark-page: #010f23;
  --sample-dark-row: #102c4d;
  --muted: #41597f;
  --border-strong: #c2d3ee;
  --hover: #e9effc;
  --hover-strong: #dee5f9;
  --accent-from: #255cf3;
  --accent-soft: #d3deff;
  --ring: 0 0 0 3px rgba(10, 82, 236, 0.2);
  --accent-glow: rgba(0, 88, 230, 0.18);
  --shadow-sm: 0 1px 2px rgba(0, 27, 67, 0.05), 0 1px 3px rgba(0, 27, 67, 0.05);
  --shadow-md: 0 6px 20px rgba(0, 27, 67, 0.12);
  --shadow-lg: 0 18px 50px rgba(0, 27, 67, 0.24);
}
:root[data-accent="blue"][data-theme="dark"] {
  --ink: #ffffff;
  --ink-2: #dee7f4;
  --ink-3: #b9c8dd;
  --brand: #3560f7;
  --brand-strong: #4765ff;
  --link: #8c9eff;
  --link-hover: #b9c4ff;
  --side: #00122b;
  --page: #010f23;
  --page-foot: #010b1d;
  --panel: #03172c;
  --panel-line: #102c4d;
  --panel-top: #1d3655;
  --line: #09223d;
  --field: #0a203b;
  --field-line: #213857;
  --chip: #1c3454;
  --tile: #0a2541;
  --tile-line: #153760;
  --star-off: #e0e8f5;
  --placeholder: #e9effa;
  --check-line: #a5b6cf;
  --row-line: #173251;
  --tools-line: #0e2641;
  --sep: #133458;
  --pill-ink: #c3c8ff;
  --main-edge: rgba(255, 255, 255, 0.04);
  --reader: linear-gradient(180deg, #03182d, #021931 80%, #01172f);
  --selected: linear-gradient(90deg, #143999 0%, #0d2e69 52%, #0c284a 100%);
  --selected-ring: inset 0 0 0 1.5px #6482f4, 0 0 14px rgba(40, 112, 255, 0.2);
  --read-name: #cdd8ea;
  --read-subject: #aebed6;
  --read-preview: #8ca1be;
  --button: #07223e;
  --button-line: #153760;
  --button-hover: #0a2a4c;
  --button-line-hover: #2a568c;
  --primary: linear-gradient(180deg, #4268f9, #2454ea);
  --primary-line: #658cff;
  --primary-glow: 0 0 16px rgba(41, 105, 255, 0.27);
  --account: linear-gradient(160deg, #4765ff, #2558fc);
  --compose: radial-gradient(130px 44px at 10% 112%, rgba(142, 121, 255, 0.6), transparent), linear-gradient(100deg, #495eff 0%, #0059ee 42%, #0085d9 74%, #00aee7 100%);
  --compose-glow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 18px rgba(0, 103, 224, 0.23);
  --side-active: linear-gradient(90deg, #183d9c 0%, #113071 60%, #0e2a5f 100%);
  --side-count: #0d3166;
  --side-count-strong: linear-gradient(90deg, #4b67ff, #365efe);
  --side-rule: #153061;
  --side-meter: #1b3d78;
  --side-meter-fill: linear-gradient(90deg, #485dff, #6675ff);
  --sample-side: #001b43;
  --sample-page: #eff3fd;
  --sample-dark-side: #00122b;
  --sample-dark-page: #010f23;
  --sample-dark-row: #102c4d;
  --muted: #a7b8d2;
  --border-strong: #23426a;
  --hover: #07223e;
  --hover-strong: #0a2a4c;
  --accent-from: #4268f9;
  --accent-soft: #1d3a7e;
  --ring: 0 0 0 3px rgba(71, 101, 255, 0.35);
  --accent-glow: rgba(41, 105, 255, 0.27);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.6);
}
:root[data-accent="blue"] .side-mark,
:root[data-accent="blue"] .sidebar-art {
  filter: hue-rotate(-25deg);
}

:root[data-accent="green"] {
  --ink: #001301;
  --ink-2: #002b01;
  --ink-3: #113913;
  --brand: #00722f;
  --brand-strong: #006c0d;
  --link: #006b15;
  --link-hover: #185400;
  --side: #002302;
  --page: #ecf5ef;
  --page-foot: #deeee0;
  --panel: #f8fdfa;
  --panel-line: #d6e7d8;
  --panel-top: #d6e7d8;
  --line: #e5f0e6;
  --field: #deece0;
  --field-line: #cde1d1;
  --chip: #c7ddc9;
  --tile: #f0f8f2;
  --tile-line: #d9e9da;
  --star-off: #2a502c;
  --placeholder: #1f4722;
  --check-line: #8aa586;
  --row-line: #e3f0e4;
  --tools-line: #e9f2e9;
  --sep: #d1e2d3;
  --pill-ink: #006b15;
  --reader: linear-gradient(180deg, #fafdfc, #f7fcf8 80%, #f6fbf7);
  --selected: linear-gradient(90deg, #c2e6d0 0%, #d1ecda 52%, #def1e3 100%);
  --selected-ring: inset 0 0 0 1.5px #00a051, 0 0 14px rgba(0, 140, 57, 0.16);
  --row-hover: rgba(0, 151, 44, 0.07);
  --read-name: #113913;
  --read-subject: #2f5232;
  --read-preview: #466b4a;
  --button: #f9fcfb;
  --button-line: #c5dcc6;
  --button-hover: #ebf6ef;
  --button-line-hover: #96c79e;
  --primary: linear-gradient(180deg, #007b39, #006e2a);
  --primary-line: #00833e;
  --primary-glow: 0 0 16px rgba(0, 116, 42, 0.18);
  --account: linear-gradient(160deg, #008649, #007535);
  --compose: radial-gradient(130px 44px at 10% 112%, rgba(0, 166, 99, 0.35), transparent), linear-gradient(100deg, #008a49 0%, #008041 42%, #007736 74%, #006e2f 100%);
  --compose-glow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 18px rgba(0, 97, 28, 0.22);
  --side-active: linear-gradient(90deg, #005525 0%, #005021 60%, #004b1d 100%);
  --side-count: #005025;
  --side-count-strong: linear-gradient(90deg, #00813f, #007937);
  --side-rule: #015c1e;
  --side-meter: #005e2b;
  --side-meter-fill: linear-gradient(90deg, #009e61, #00b87c);
  --glow-a: rgba(0, 110, 49, 0.95);
  --glow-b: rgba(0, 78, 29, 0.55);
  --glow-c: rgba(0, 67, 18, 0.36);
  --glow-phone: rgba(0, 110, 49, 0.6);
  --press-shade: rgba(0, 15, 1, 0.35);
  --drop-ring: #44c083;
  --sample-side: #002302;
  --sample-page: #ecf5ef;
  --sample-dark-side: #021700;
  --sample-dark-page: #021201;
  --sample-dark-row: #15320f;
  --muted: #3b613f;
  --border-strong: #bed8c1;
  --hover: #e4f2e8;
  --hover-strong: #d7eadc;
  --accent-from: #007b39;
  --accent-soft: #c3e7d0;
  --ring: 0 0 0 3px rgba(0, 114, 47, 0.2);
  --accent-glow: rgba(0, 116, 42, 0.18);
  --shadow-sm: 0 1px 2px rgba(0, 35, 2, 0.05), 0 1px 3px rgba(0, 35, 2, 0.05);
  --shadow-md: 0 6px 20px rgba(0, 35, 2, 0.12);
  --shadow-lg: 0 18px 50px rgba(0, 35, 2, 0.24);
}
:root[data-accent="green"][data-theme="dark"] {
  --ink: #ffffff;
  --ink-2: #dee9de;
  --ink-3: #b8ccb7;
  --brand: #008042;
  --brand-strong: #00874e;
  --link: #00bb7e;
  --link-hover: #88d7b1;
  --side: #021700;
  --page: #021201;
  --page-foot: #020e01;
  --panel: #081a03;
  --panel-line: #15320f;
  --panel-top: #203b1c;
  --line: #112709;
  --field: #0e2509;
  --field-line: #213e1f;
  --chip: #1c3a1a;
  --tile: #102a0a;
  --tile-line: #1a3e13;
  --star-off: #deebdf;
  --placeholder: #e7f2e8;
  --check-line: #a5bba3;
  --row-line: #1d3717;
  --tools-line: #152b0d;
  --sep: #1a3a11;
  --pill-ink: #8cdcbc;
  --main-edge: rgba(255, 255, 255, 0.04);
  --reader: linear-gradient(180deg, #0a1b03, #0a1d02 80%, #081b01);
  --selected: linear-gradient(90deg, #004d20 0%, #003a10 52%, #102e0a 100%);
  --selected-ring: inset 0 0 0 1.5px #009e5d, 0 0 14px rgba(0, 140, 57, 0.2);
  --read-name: #ccdccc;
  --read-subject: #adc3ad;
  --read-preview: #8ca68b;
  --button: #0d2706;
  --button-line: #1a3e13;
  --button-hover: #13300a;
  --button-line-hover: #2f6027;
  --primary: linear-gradient(180deg, #00874a, #007337);
  --primary-line: #00a85b;
  --primary-glow: 0 0 16px rgba(0, 136, 59, 0.27);
  --account: linear-gradient(160deg, #00874e, #007a3b);
  --compose: radial-gradient(130px 44px at 10% 112%, rgba(0, 160, 130, 0.6), transparent), linear-gradient(100deg, #00834e 0%, #00772d 42%, #4f9000 74%, #98ab2c 100%);
  --compose-glow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 18px rgba(0, 126, 28, 0.23);
  --side-active: linear-gradient(90deg, #005122 0%, #003d15 60%, #00350f 100%);
  --side-count: #003c0b;
  --side-count-strong: linear-gradient(90deg, #008950, #008044);
  --side-rule: #003b10;
  --side-meter: #004a14;
  --side-meter-fill: linear-gradient(90deg, #00824e, #009663);
  --sample-side: #002302;
  --sample-page: #ecf5ef;
  --sample-dark-side: #021700;
  --sample-dark-page: #021201;
  --sample-dark-row: #15320f;
  --muted: #a6bda6;
  --border-strong: #264921;
  --hover: #0d2706;
  --hover-strong: #13300a;
  --accent-from: #00874a;
  --accent-soft: #00491d;
  --ring: 0 0 0 3px rgba(0, 135, 78, 0.35);
  --accent-glow: rgba(0, 136, 59, 0.27);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.6);
}
:root[data-accent="green"] .side-mark,
:root[data-accent="green"] .sidebar-art {
  filter: hue-rotate(-108deg);
}

:root[data-accent="orange"] {
  --ink: #230501;
  --ink-2: #471004;
  --ink-3: #532215;
  --brand: #ad3d00;
  --brand-strong: #ad2c00;
  --link: #aa2e00;
  --link-hover: #931200;
  --side: #3d0900;
  --page: #fcf1ec;
  --page-foot: #fae6dd;
  --panel: #fffbf8;
  --panel-line: #f5ded6;
  --panel-top: #f5ded6;
  --line: #faeae4;
  --field: #f7e5dd;
  --field-line: #f0d7cd;
  --chip: #eed1c7;
  --tile: #fef4f0;
  --tile-line: #f6e0d9;
  --star-off: #6b3a2d;
  --placeholder: #633122;
  --check-line: #c0948b;
  --row-line: #f9e9e3;
  --tools-line: #fbede9;
  --sep: #f0d9d1;
  --pill-ink: #aa2e00;
  --reader: linear-gradient(180deg, #fffcfa, #fffaf7 80%, #fef9f6);
  --selected: linear-gradient(90deg, #fcd6c3 0%, #fce0d1 52%, #fee8de 100%);
  --selected-ring: inset 0 0 0 1.5px #e36626, 0 0 14px rgba(213, 75, 0, 0.16);
  --row-hover: rgba(235, 72, 0, 0.07);
  --read-name: #532215;
  --read-subject: #6c3e30;
  --read-preview: #855747;
  --button: #fefbf9;
  --button-line: #f0cfc5;
  --button-hover: #fef1eb;
  --button-line-hover: #ebad97;
  --primary: linear-gradient(180deg, #b94500, #a83900);
  --primary-line: #c24b00;
  --primary-glow: 0 0 16px rgba(179, 59, 0, 0.18);
  --account: linear-gradient(160deg, #c15200, #af4100);
  --compose: radial-gradient(130px 44px at 10% 112%, rgba(235, 107, 0, 0.35), transparent), linear-gradient(100deg, #ca5300 0%, #bd4c00 42%, #b34200 74%, #a73b00 100%);
  --compose-glow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 18px rgba(153, 45, 0, 0.22);
  --side-active: linear-gradient(90deg, #822e00 0%, #7a2a00 60%, #752600 100%);
  --side-count: #782c00;
  --side-count-strong: linear-gradient(90deg, #bf4a00, #b54300);
  --side-rule: #873416;
  --side-meter: #8d3400;
  --side-meter-fill: linear-gradient(90deg, #df6700, #f4842e);
  --glow-a: rgba(166, 61, 0, 0.95);
  --glow-b: rgba(121, 39, 0, 0.55);
  --glow-c: rgba(107, 30, 0, 0.36);
  --glow-phone: rgba(166, 61, 0, 0.6);
  --press-shade: rgba(30, 3, 0, 0.35);
  --drop-ring: #f69256;
  --sample-side: #3d0900;
  --sample-page: #fcf1ec;
  --sample-dark-side: #280703;
  --sample-dark-page: #210603;
  --sample-dark-row: #4a1e16;
  --muted: #7c4c3d;
  --border-strong: #edcabf;
  --hover: #faece5;
  --hover-strong: #f7e1d7;
  --accent-from: #b94500;
  --accent-soft: #fcd7c4;
  --ring: 0 0 0 3px rgba(173, 61, 0, 0.2);
  --accent-glow: rgba(179, 59, 0, 0.18);
  --shadow-sm: 0 1px 2px rgba(61, 9, 0, 0.05), 0 1px 3px rgba(61, 9, 0, 0.05);
  --shadow-md: 0 6px 20px rgba(61, 9, 0, 0.12);
  --shadow-lg: 0 18px 50px rgba(61, 9, 0, 0.24);
}
:root[data-accent="orange"][data-theme="dark"] {
  --ink: #ffffff;
  --ink-2: #f4e2dd;
  --ink-3: #ddc1b8;
  --brand: #bc4c00;
  --brand-strong: #c25500;
  --link: #f58839;
  --link-hover: #fab98e;
  --side: #280703;
  --page: #210603;
  --page-foot: #1b0502;
  --panel: #2b0d08;
  --panel-line: #4a1e16;
  --panel-top: #532921;
  --line: #3b1611;
  --field: #39150e;
  --field-line: #552c22;
  --chip: #51281e;
  --tile: #3f1812;
  --tile-line: #5c261c;
  --star-off: #f4e4de;
  --placeholder: #faece8;
  --check-line: #ceaea5;
  --row-line: #4e251e;
  --tools-line: #3f1b15;
  --sep: #55241b;
  --pill-ink: #fbc092;
  --main-edge: rgba(255, 255, 255, 0.04);
  --reader: linear-gradient(180deg, #2c0e0a, #2f0e0a 80%, #2c0c08);
  --selected: linear-gradient(90deg, #762900 0%, #5d1a00 52%, #471a11 100%);
  --selected-ring: inset 0 0 0 1.5px #df660e, 0 0 14px rgba(213, 75, 0, 0.2);
  --read-name: #e9d3cc;
  --read-subject: #d5b6ae;
  --read-preview: #be968c;
  --button: #3c150f;
  --button-line: #5c261c;
  --button-hover: #4a1b14;
  --button-line-hover: #874031;
  --primary: linear-gradient(180deg, #c45300, #ac4200);
  --primary-line: #f06a16;
  --primary-glow: 0 0 16px rgba(204, 75, 0, 0.27);
  --account: linear-gradient(160deg, #c25500, #b64600);
  --compose: radial-gradient(130px 44px at 10% 112%, rgba(203, 122, 0, 0.6), transparent), linear-gradient(100deg, #b95400 0%, #b63d00 42%, #e84442 74%, #f47d93 100%);
  --compose-glow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 18px rgba(199, 56, 0, 0.23);
  --side-active: linear-gradient(90deg, #7b2b00 0%, #601e00 60%, #561700 100%);
  --side-count: #5e1c06;
  --side-count-strong: linear-gradient(90deg, #c35700, #bb4d00);
  --side-rule: #591f09;
  --side-meter: #6f280f;
  --side-meter-fill: linear-gradient(90deg, #b95300, #cf6600);
  --sample-side: #3d0900;
  --sample-page: #fcf1ec;
  --sample-dark-side: #280703;
  --sample-dark-page: #210603;
  --sample-dark-row: #4a1e16;
  --muted: #d1b0a6;
  --border-strong: #673227;
  --hover: #3c150f;
  --hover-strong: #4a1b14;
  --accent-from: #c45300;
  --accent-soft: #702600;
  --ring: 0 0 0 3px rgba(194, 85, 0, 0.35);
  --accent-glow: rgba(204, 75, 0, 0.27);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.6);
}
:root[data-accent="orange"] .side-mark,
:root[data-accent="orange"] .sidebar-art {
  filter: hue-rotate(132deg);
}

:root[data-accent="pink"] {
  --ink: #210511;
  --ink-2: #440e29;
  --ink-3: #512035;
  --brand: #c00064;
  --brand-strong: #b4006a;
  --link: #b30067;
  --link-hover: #8f005b;
  --side: #400022;
  --page: #fdf0f3;
  --page-foot: #fbe4ea;
  --panel: #fffbfb;
  --panel-line: #f4dde3;
  --panel-top: #f4dde3;
  --line: #fae9ed;
  --field: #f8e4e8;
  --field-line: #f1d5dc;
  --chip: #eecfd8;
  --tile: #fef3f5;
  --tile-line: #f5dfe5;
  --star-off: #69384b;
  --placeholder: #612f43;
  --check-line: #bc93a3;
  --row-line: #f9e8ec;
  --tools-line: #faecf1;
  --sep: #f0d8de;
  --pill-ink: #b30067;
  --reader: linear-gradient(180deg, #fffcfc, #fff9fa 80%, #fff8f9);
  --selected: linear-gradient(90deg, #fed3d9 0%, #fedde2 52%, #ffe6ea 100%);
  --selected-ring: inset 0 0 0 1.5px #e45c87, 0 0 14px rgba(228, 34, 125, 0.16);
  --row-hover: rgba(229, 64, 140, 0.07);
  --read-name: #512035;
  --read-subject: #6a3c4d;
  --read-preview: #845464;
  --button: #fefbfb;
  --button-line: #efced8;
  --button-hover: #fef0f2;
  --button-line-hover: #eaaabc;
  --primary: linear-gradient(180deg, #d10069, #b90062);
  --primary-line: #d9166e;
  --primary-glow: 0 0 16px rgba(195, 0, 105, 0.18);
  --account: linear-gradient(160deg, #e01668, #c60063);
  --compose: radial-gradient(130px 44px at 10% 112%, rgba(245, 89, 129, 0.35), transparent), linear-gradient(100deg, #e22670 0%, #da0069 42%, #ca0066 74%, #bb005f 100%);
  --compose-glow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 18px rgba(164, 0, 90, 0.22);
  --side-active: linear-gradient(90deg, #891e48 0%, #801b44 60%, #7a1842 100%);
  --side-count: #801c42;
  --side-count-strong: linear-gradient(90deg, #d90a6b, #cc0067);
  --side-rule: #853052;
  --side-meter: #94254e;
  --side-meter-fill: linear-gradient(90deg, #ee5079, #fd768c);
  --glow-a: rgba(187, 0, 95, 0.95);
  --glow-b: rgba(134, 0, 69, 0.55);
  --glow-c: rgba(116, 0, 62, 0.36);
  --glow-phone: rgba(187, 0, 95, 0.6);
  --press-shade: rgba(32, 0, 15, 0.35);
  --drop-ring: #fc889d;
  --sample-side: #400022;
  --sample-page: #fdf0f3;
  --sample-dark-side: #260717;
  --sample-dark-page: #1f0612;
  --sample-dark-row: #471d32;
  --muted: #7a4a5b;
  --border-strong: #edc8d3;
  --hover: #fbebed;
  --hover-strong: #f9dfe4;
  --accent-from: #d10069;
  --accent-soft: #fed4da;
  --ring: 0 0 0 3px rgba(192, 0, 100, 0.2);
  --accent-glow: rgba(195, 0, 105, 0.18);
  --shadow-sm: 0 1px 2px rgba(64, 0, 34, 0.05), 0 1px 3px rgba(64, 0, 34, 0.05);
  --shadow-md: 0 6px 20px rgba(64, 0, 34, 0.12);
  --shadow-lg: 0 18px 50px rgba(64, 0, 34, 0.24);
}
:root[data-accent="pink"][data-theme="dark"] {
  --ink: #ffffff;
  --ink-2: #f3e2e7;
  --ink-3: #dcbfc9;
  --brand: #da0068;
  --brand-strong: #e70066;
  --link: #fe7b8f;
  --link-hover: #ffb3ba;
  --side: #260717;
  --page: #1f0612;
  --page-foot: #1a040f;
  --panel: #280d1b;
  --panel-line: #471d32;
  --panel-top: #50283a;
  --line: #381628;
  --field: #361525;
  --field-line: #522b3b;
  --chip: #4f2638;
  --tile: #3c182a;
  --tile-line: #58253e;
  --star-off: #f4e3e7;
  --placeholder: #faebef;
  --check-line: #ccacb8;
  --row-line: #4b2437;
  --tools-line: #3c1a2b;
  --sep: #52233a;
  --pill-ink: #ffbabb;
  --main-edge: rgba(255, 255, 255, 0.04);
  --reader: linear-gradient(180deg, #290d1d, #2c0e1e 80%, #290c1c);
  --selected: linear-gradient(90deg, #860041 0%, #5d1434 52%, #44192e 100%);
  --selected-ring: inset 0 0 0 1.5px #e45a7d, 0 0 14px rgba(228, 34, 125, 0.2);
  --read-name: #e9d1d9;
  --read-subject: #d3b5bf;
  --read-preview: #bb95a3;
  --button: #391427;
  --button-line: #58253e;
  --button-hover: #461a31;
  --button-line-hover: #833e5e;
  --primary: linear-gradient(180deg, #df236b, #c40061);
  --primary-line: #f35e8a;
  --primary-glow: 0 0 16px rgba(228, 4, 118, 0.27);
  --account: linear-gradient(160deg, #e70066, #d00066);
  --compose: radial-gradient(130px 44px at 10% 112%, rgba(255, 73, 76, 0.6), transparent), linear-gradient(100deg, #e0005f 0%, #c8006b 42%, #d748a3 74%, #d984d5 100%);
  --compose-glow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 18px rgba(210, 0, 121, 0.23);
  --side-active: linear-gradient(90deg, #890944 0%, #641335 60%, #55132f 100%);
  --side-count: #5b1937;
  --side-count-strong: linear-gradient(90deg, #e80b66, #da0067);
  --side-rule: #581b34;
  --side-meter: #6d2443;
  --side-meter-fill: linear-gradient(90deg, #df005e, #f63166);
  --sample-side: #400022;
  --sample-page: #fdf0f3;
  --sample-dark-side: #260717;
  --sample-dark-page: #1f0612;
  --sample-dark-row: #471d32;
  --muted: #d0aeba;
  --border-strong: #633147;
  --hover: #391427;
  --hover-strong: #461a31;
  --accent-from: #df236b;
  --accent-soft: #721d3e;
  --ring: 0 0 0 3px rgba(231, 0, 102, 0.35);
  --accent-glow: rgba(228, 4, 118, 0.27);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.6);
}
:root[data-accent="pink"] .side-mark,
:root[data-accent="pink"] .sidebar-art {
  filter: hue-rotate(71deg);
}

:root[data-accent="grey"] {
  --ink: #0b0f15;
  --ink-2: #1e242a;
  --ink-3: #2c3238;
  --brand: #5d626a;
  --brand-strong: #565d64;
  --link: #565c64;
  --link-hover: #434950;
  --side: #181d23;
  --page: #eef3fd;
  --page-foot: #e4eaf4;
  --panel: #fafcff;
  --panel-line: #dde3ec;
  --panel-top: #dde3ec;
  --line: #e7eef7;
  --field: #e3e9f3;
  --field-line: #d6dde6;
  --chip: #d1d8e0;
  --tile: #f2f6ff;
  --tile-line: #dfe5ee;
  --star-off: #42484f;
  --placeholder: #3a4046;
  --check-line: #989fa6;
  --row-line: #e6edf5;
  --tools-line: #e9f1f9;
  --sep: #d8dee7;
  --pill-ink: #565c64;
  --reader: linear-gradient(180deg, #fcfcff, #f8fbff 80%, #f7fafe);
  --selected: linear-gradient(90deg, #d9dee7 0%, #e1e5ef 52%, #e7edf6 100%);
  --selected-ring: inset 0 0 0 1.5px #868c94, 0 0 14px rgba(116, 122, 129, 0.16);
  --row-hover: rgba(124, 131, 138, 0.07);
  --read-name: #2c3238;
  --read-subject: #454b52;
  --read-preview: #5d636a;
  --button: #fbfbfe;
  --button-line: #d0d7df;
  --button-hover: #eff4fd;
  --button-line-hover: #b6bcc5;
  --primary: linear-gradient(180deg, #656b73, #595f66);
  --primary-line: #6c717a;
  --primary-glow: 0 0 16px rgba(95, 100, 108, 0.18);
  --account: linear-gradient(160deg, #70747d, #60656c);
  --compose: radial-gradient(130px 44px at 10% 112%, rgba(140, 145, 153, 0.35), transparent), linear-gradient(100deg, #747881 0%, #6b6f78 42%, #62676f 74%, #5a5f67 100%);
  --compose-glow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 18px rgba(78, 83, 91, 0.22);
  --side-active: linear-gradient(90deg, #454a51 0%, #40454c 60%, #3c4148 100%);
  --side-count: #40454c;
  --side-count-strong: linear-gradient(90deg, #6a7078, #636970);
  --side-rule: #494f56;
  --side-meter: #4c5159;
  --side-meter-fill: linear-gradient(90deg, #868a92, #9ea1ab);
  --glow-a: rgba(90, 96, 103, 0.95);
  --glow-b: rgba(62, 67, 74, 0.55);
  --glow-c: rgba(52, 57, 64, 0.36);
  --glow-phone: rgba(90, 96, 103, 0.6);
  --press-shade: rgba(7, 12, 17, 0.35);
  --drop-ring: #a7abb5;
  --sample-side: #181d23;
  --sample-page: #eef3fd;
  --sample-dark-side: #0d1318;
  --sample-dark-page: #0a0f15;
  --sample-dark-row: #262c33;
  --muted: #535960;
  --border-strong: #ccd2db;
  --hover: #e9eff8;
  --hover-strong: #e0e6ef;
  --accent-from: #656b73;
  --accent-soft: #dadfe8;
  --ring: 0 0 0 3px rgba(93, 98, 106, 0.2);
  --accent-glow: rgba(95, 100, 108, 0.18);
  --shadow-sm: 0 1px 2px rgba(24, 29, 35, 0.05), 0 1px 3px rgba(24, 29, 35, 0.05);
  --shadow-md: 0 6px 20px rgba(24, 29, 35, 0.12);
  --shadow-lg: 0 18px 50px rgba(24, 29, 35, 0.24);
}
:root[data-accent="grey"][data-theme="dark"] {
  --ink: #ffffff;
  --ink-2: #dfe7ef;
  --ink-3: #c0c7d0;
  --brand: #6b6f78;
  --brand-strong: #71767e;
  --link: #a1a4ae;
  --link-hover: #c3c7d1;
  --side: #0d1318;
  --page: #0a0f15;
  --page-foot: #070c11;
  --panel: #11171c;
  --panel-line: #262c33;
  --panel-top: #2f363c;
  --line: #1c2228;
  --field: #1b2126;
  --field-line: #32383e;
  --chip: #2e343b;
  --tile: #1f252a;
  --tile-line: #31373e;
  --star-off: #e1e8f0;
  --placeholder: #e9f0f9;
  --check-line: #aeb6be;
  --row-line: #2b3238;
  --tools-line: #20262c;
  --sep: #2d343a;
  --pill-ink: #c9cbd5;
  --main-edge: rgba(255, 255, 255, 0.04);
  --reader: linear-gradient(180deg, #11181d, #13191f 80%, #11171d);
  --selected: linear-gradient(90deg, #3e424a 0%, #2c3238 52%, #23282f 100%);
  --selected-ring: inset 0 0 0 1.5px #858a93, 0 0 14px rgba(116, 122, 129, 0.2);
  --read-name: #d2d8e1;
  --read-subject: #b7bdc6;
  --read-preview: #99a0a8;
  --button: #1c2227;
  --button-line: #31373e;
  --button-hover: #242a30;
  --button-line-hover: #4f565c;
  --primary: linear-gradient(180deg, #71767e, #5f646c);
  --primary-line: #8e939b;
  --primary-glow: 0 0 16px rgba(112, 118, 125, 0.27);
  --account: linear-gradient(160deg, #71767e, #656a72);
  --compose: radial-gradient(130px 44px at 10% 112%, rgba(140, 140, 150, 0.6), transparent), linear-gradient(100deg, #6d727a 0%, #61676e 42%, #798188 74%, #99a4a8 100%);
  --compose-glow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 18px rgba(102, 109, 116, 0.23);
  --side-active: linear-gradient(90deg, #41454d 0%, #30343b 60%, #292d34 100%);
  --side-count: #2d3339;
  --side-count-strong: linear-gradient(90deg, #73777f, #6b6f78);
  --side-rule: #2d3238;
  --side-meter: #3a3f46;
  --side-meter-fill: linear-gradient(90deg, #6d7179, #80838c);
  --sample-side: #181d23;
  --sample-page: #eef3fd;
  --sample-dark-side: #0d1318;
  --sample-dark-page: #0a0f15;
  --sample-dark-row: #262c33;
  --muted: #b1b8c0;
  --border-strong: #3b4248;
  --hover: #1c2227;
  --hover-strong: #242a30;
  --accent-from: #71767e;
  --accent-soft: #3a3e46;
  --ring: 0 0 0 3px rgba(113, 118, 126, 0.35);
  --accent-glow: rgba(112, 118, 125, 0.27);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.6);
}
:root[data-accent="grey"] .side-mark,
:root[data-accent="grey"] .sidebar-art {
  filter: grayscale(1);
}

/* The colours to choose from in Settings. */
.accent-dot.accent-violet {
  background: #6a3ce9;
}
.accent-dot.accent-blue {
  background: #0a52ec;
}
.accent-dot.accent-green {
  background: #00722f;
}
.accent-dot.accent-orange {
  background: #ad3d00;
}
.accent-dot.accent-pink {
  background: #c00064;
}
.accent-dot.accent-grey {
  background: #5d626a;
}
/* ---- End of the colours made by tools/accents.py ---- */

/* ---- The other looks: White, White with a dark side bar, Paper, Dark grey.
   Each gives the page, panels, lines and writing their own colours; the
   colour chosen (violet, blue...) still gives buttons, links, the open row
   and Compose theirs. So these come after the colours, and win over them.
   theme.js names the look in data-look. -------------------------------- */

/* White: a white page and panels, grey lines, near-black writing. */
:root[data-look="white"],
:root[data-look="white-dark"] {
  --ink: #111114;
  --ink-2: #26262b;
  --ink-3: #3c3c43;
  --page: #ffffff;
  --page-foot: #ffffff;
  --panel: #ffffff;
  --panel-line: #e4e4e8;
  --panel-top: #e4e4e8;
  --line: #efeff2;
  --field: #f3f3f5;
  --field-line: #e1e1e6;
  --chip: #e8e8ec;
  --tile: #f7f7f9;
  --tile-line: #e6e6ea;
  --star-off: #52525b;
  --placeholder: #52525b;
  --check-line: #a1a1aa;
  --row-line: #eeeef1;
  --tools-line: #efeff2;
  --sep: #e2e2e7;
  --reader: #ffffff;
  --button: #ffffff;
  --button-line: #d8d8de;
  --button-hover: #f4f4f6;
  --button-line-hover: #b5b5be;
  --muted: #5b5b66;
  --border-strong: #d3d3da;
  --hover: #f4f4f6;
  --hover-strong: #ebebef;
  --read-name: #2b2b31;
  --read-subject: #44444c;
  --read-preview: #5e5e68;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.2);
}

/* Paper: warm off-white, like paper, with brown-black writing. */
:root[data-look="paper"] {
  --ink: #2b2118;
  --ink-2: #3d3227;
  --ink-3: #54473a;
  --page: #f5efe4;
  --page-foot: #efe7d8;
  --panel: #fcf9f2;
  --panel-line: #e6dccb;
  --panel-top: #e6dccb;
  --line: #ece4d6;
  --field: #efe7d9;
  --field-line: #e0d5c2;
  --chip: #e6dbc8;
  --tile: #f8f2e7;
  --tile-line: #e5dac7;
  --star-off: #5c4f41;
  --placeholder: #5c4f41;
  --check-line: #a89a86;
  --row-line: #e9e0d0;
  --tools-line: #ede5d7;
  --sep: #e0d5c2;
  --reader: #fcf9f2;
  --button: #fdfaf4;
  --button-line: #ddd1bd;
  --button-hover: #f5eee2;
  --button-line-hover: #c2b39b;
  --muted: #66584a;
  --border-strong: #d6c9b4;
  --hover: #f1e9dc;
  --hover-strong: #ebe1d1;
  --read-name: #3a2f25;
  --read-subject: #51453a;
  --read-preview: #6a5c4e;
  --shadow-sm: 0 1px 2px rgba(60, 40, 20, 0.06), 0 1px 3px rgba(60, 40, 20, 0.06);
  --shadow-md: 0 6px 20px rgba(60, 40, 20, 0.12);
  --shadow-lg: 0 18px 50px rgba(60, 40, 20, 0.24);
}

/* White and Paper have a light side bar: dark writing on it, the colour's
   soft tint for the open folder, and no lights or artwork. */
:root[data-look="white"],
:root[data-look="paper"] {
  --side-ink: var(--ink);
  --side-active: var(--accent-soft);
  --side-active-ink: var(--ink);
  --side-active-edge: transparent;
  --side-drop: var(--accent-soft);
  --side-art: none;
  --glow-a: transparent;
  --glow-b: transparent;
  --glow-c: transparent;
  --glow-phone: transparent;
}
:root[data-look="white"] {
  --side: #f7f7f8;
  --side-ink-soft: #52525b;
  --side-muted: #5b5b66;
  --side-hover: rgba(0, 0, 0, 0.04);
  --side-hover-strong: rgba(0, 0, 0, 0.07);
  --side-count: #e4e4e8;
  --side-count-ink: #27272a;
  --side-rule: #e4e4e8;
  --side-meter: #e4e4e8;
  --side-field: #ffffff;
  --side-field-line: #d4d4d8;
  --main-edge: #e4e4e8;
}
:root[data-look="paper"] {
  --side: #ede4d3;
  --side-ink-soft: #5c4f41;
  --side-muted: #66584a;
  --side-hover: rgba(60, 40, 20, 0.05);
  --side-hover-strong: rgba(60, 40, 20, 0.09);
  --side-count: #e0d4bf;
  --side-count-ink: #3d3227;
  --side-rule: #ddd0bb;
  --side-meter: #ddd0bb;
  --side-field: #fcf9f2;
  --side-field-line: #d6c9b4;
  --main-edge: #e0d5c2;
}
/* The mark is drawn light, for a dark ground: on a light side bar it sits
   on a tile of the colour's dark, as the app's icon does. The tile is the
   violet dark: the filter that turns the mark to the colour (above) turns
   the tile with it. */
:root[data-look="white"] .app-mail .side-mark,
:root[data-look="paper"] .app-mail .side-mark {
  border-radius: 22%;
  background: #1a134b;
}
@media (min-width: 761px) {
  :root[data-look="white"] .app-mail .side-mark,
  :root[data-look="paper"] .app-mail .side-mark {
    width: calc(36 * var(--u));
    height: calc(36 * var(--u));
    padding: calc(5 * var(--u)) calc(5.5 * var(--u));
  }
}
@media (max-width: 760px) {
  :root[data-look="white"] .app-mail .side-mark,
  :root[data-look="paper"] .app-mail .side-mark {
    width: 34px;
    height: 34px;
    padding: 5px 5.5px;
  }
}

/* Dark grey: dark, in neutral greys instead of the colour's dark. */
:root[data-look="dark-grey"][data-theme="dark"] {
  --ink-2: #e4e4e7;
  --ink-3: #c4c4ca;
  --side: #18181a;
  --page: #111113;
  --page-foot: #0c0c0d;
  --panel: #1c1c1f;
  --panel-line: #2c2c31;
  --panel-top: #35353b;
  --line: #222226;
  --field: #232327;
  --field-line: #36363c;
  --chip: #313136;
  --tile: #242428;
  --tile-line: #35353b;
  --star-off: #e4e4e7;
  --placeholder: #e9e9ec;
  --check-line: #a8a8b0;
  --row-line: #2c2c31;
  --tools-line: #242428;
  --sep: #33333a;
  --main-edge: rgba(255, 255, 255, 0.04);
  --reader: #1c1c1f;
  --button: #232327;
  --button-line: #36363c;
  --button-hover: #2a2a2f;
  --button-line-hover: #50505a;
  --muted: #b0b0b8;
  --border-strong: #3f3f46;
  --hover: #232327;
  --hover-strong: #2a2a2f;
  --read-name: #d4d4d8;
  --read-subject: #b8b8bf;
  --read-preview: #9b9ba4;
  --side-rule: #2a2a2f;
  --side-meter: #3a3a40;
  --side-count: #2e2e33;
}

/* ---- Everywhere ---------------------------------------------------------- */

body {
  /* Segoe UI is narrower than Apple's system font; where the font has a
     width axis (San Francisco) this brings it to the design's proportions. */
  font-stretch: 90%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a {
  color: var(--link);
}
a:hover {
  color: var(--link-hover);
}
:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
/* The mark's definitions take no room. */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.avatar {
  font-weight: 600;
}
:root .avatar-1,
:root[data-theme="dark"] .avatar-1 {
  background: var(--avatar-1);
  color: var(--avatar-1-ink);
}
:root .avatar-2,
:root[data-theme="dark"] .avatar-2 {
  background: var(--avatar-2);
  color: var(--avatar-2-ink);
}
:root .avatar-3,
:root[data-theme="dark"] .avatar-3 {
  background: var(--avatar-3);
  color: var(--avatar-3-ink);
}
:root .avatar-4,
:root[data-theme="dark"] .avatar-4 {
  background: var(--avatar-4);
  color: var(--avatar-4-ink);
}
:root .avatar-5,
:root[data-theme="dark"] .avatar-5 {
  background: var(--avatar-5);
  color: var(--avatar-5-ink);
}

/* Buttons: a quiet tile, and the violet one for what a page is for. */
.btn {
  border-color: var(--button-line);
  background: var(--button);
  color: var(--ink);
  border-radius: 11px;
}
.btn:hover {
  border-color: var(--button-line-hover);
  background: var(--button-hover);
  color: var(--ink);
}
.btn-primary,
.btn-primary:hover {
  border-color: var(--primary-line);
  background: var(--primary);
  color: #ffffff;
}
.btn-primary:hover {
  filter: brightness(1.1);
}
.btn-danger,
.btn-danger:hover {
  border-color: transparent;
  background: var(--danger-fill);
  color: #ffffff;
}
.btn-danger:hover {
  filter: brightness(1.1);
}
.btn-tool,
.btn-quiet {
  border-color: transparent;
  background: transparent;
}
.input,
select.input,
textarea.input {
  border-color: var(--field-line);
  background: var(--field);
  color: var(--ink);
}
.input::placeholder {
  color: var(--muted);
  opacity: 1;
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--brand-strong);
}
.card,
.modal,
.menu {
  border-color: var(--panel-line);
  background: var(--panel);
}
.menu-item:hover {
  background: var(--hover);
}
.chip {
  background: var(--chip);
  color: var(--ink);
}
.notice-info {
  color: var(--ink);
}

/* ---- The side bar: violet in both themes --------------------------------- */

.app-mail .sidebar {
  /* What is built from the shared names reads on the side bar here. */
  --text: var(--side-ink);
  --muted: var(--side-muted);
  --hover: var(--side-hover);
  --hover-strong: var(--side-hover-strong);
  --border: var(--side-rule);
  --accent: var(--side-ink);
  --link: var(--side-ink);
  --link-hover: var(--side-ink);
  color: var(--side-ink);
}
.sidebar-art,
.side-brand,
.side-storage,
.top-actions,
.read-pager,
.search-keys,
.search > .icon,
.nav-rule {
  display: none;
}
.app-mail .nav-write {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 18px;
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  background: var(--compose);
  box-shadow: var(--compose-glow);
}
.app-mail .nav-write:hover {
  color: #ffffff;
  filter: brightness(1.08);
}
/* While a message is being written the button stays, pressed in: the side
   bar doesn't jump, and it says what the panel is showing. */
.app-mail .nav-write.nav-write-hidden {
  filter: saturate(0.8) brightness(0.86);
  box-shadow: inset 0 2px 6px var(--press-shade);
  pointer-events: none;
}
.app-mail .sidebar .nav-link,
.app-mail .sidebar .nav-link .icon {
  color: var(--side-ink);
}
.app-mail .sidebar .nav-link:hover {
  background: var(--side-hover);
}
.app-mail .sidebar .nav-link.active,
.app-mail .sidebar .nav-link.active .icon {
  color: var(--side-active-ink);
}
.app-mail .sidebar .nav-link.active {
  background: var(--side-active);
  box-shadow: inset 0 1px 0 var(--side-active-edge);
  font-weight: 600;
}
.app-mail .sidebar .nav-count {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 22px;
  padding: 0 7px;
  border-radius: 13px;
  background: var(--side-count);
  color: var(--side-count-ink);
  font-size: 12.5px;
  font-weight: 600;
}
.app-mail .sidebar .nav-link.active .nav-count {
  background: var(--side-count-strong);
  color: #ffffff;
}
.app-mail .sidebar .nav-count-danger {
  background: #c2262f;
  color: #ffffff;
}
/* "Folders" and "Tags": a name, and a plus that leads to where they're kept. */
.app-mail .nav-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--side-ink);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.app-mail .nav-add {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: var(--side-ink);
}
.app-mail .nav-add:hover,
.app-mail .nav-add.active {
  background: var(--side-hover-strong);
}
.app-mail .sidebar .nav-more,
.app-mail .sidebar .nav-fold {
  color: var(--side-ink-soft);
}
.app-mail .sidebar .nav-more:hover,
.app-mail .sidebar .nav-fold:hover {
  background: var(--side-hover-strong);
  color: var(--side-ink);
}
.app-mail .sidebar .nav-link.drop-target {
  background: var(--side-drop);
  box-shadow: inset 0 0 0 1.5px var(--drop-ring);
}
.app-mail .side-account .input {
  border-color: var(--side-field-line);
  background: var(--side-field);
  color: var(--side-ink);
}
.app-mail .side-account option {
  color: #0d0b26;
}

/* ---- The search ---------------------------------------------------------- */

.app-mail .search {
  flex-wrap: nowrap;
}
.app-mail .topbar .search {
  flex: 1;
  min-width: 0;
}

.app-mail .search input::-webkit-search-decoration,
.app-mail .search input::-webkit-search-cancel-button,
.app-mail .search input::-webkit-search-results-button,
.app-mail .search input::-webkit-search-results-decoration {
  display: none;
  -webkit-appearance: none;
}

/* ---- The list ------------------------------------------------------------ */

.list-unread {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  height: 24px;
  padding: 0 10px 1px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--pill-ink);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.message.open,
.message.open.unread {
  background: var(--selected);
  box-shadow: var(--selected-ring);
}
.message.picked {
  background: var(--accent-soft);
}
/* Read mail steps back: its name, subject, time and first words are a little
   faded, so what is unread stands out. */
.list-pane .message:not(.unread) .message-from {
  color: var(--read-name);
}
.list-pane .message:not(.unread) .message-subject,
.list-pane .message:not(.unread) .message-time {
  color: var(--read-subject);
}
.list-pane .message:not(.unread) .message-preview {
  color: var(--read-preview);
}
/* On the open row's coloured ground the first words keep their own colour:
   fainter, they would be hard to read there. */
.list-pane .message.open:not(.unread) .message-preview {
  color: var(--ink-3);
}
.message-star,
.mail-star {
  color: var(--star-off);
}
.message-star.on,
.mail-star.on,
.btn.btn-star.on,
.message-starred {
  color: var(--star);
}
.message-star.on .icon,
.mail-star.on .icon,
.btn.btn-star.on .icon,
.message-starred .icon {
  fill: currentColor;
}

/* ---- The open conversation ----------------------------------------------- */

.tool-sep {
  display: none;
}
/* Answering: Reply stands out, the other two beside it. */
.thread-actions .btn-answer {
  gap: 8px;
}
.thread-actions .btn-answer-first {
  border-color: var(--primary-line);
  background: var(--primary);
  box-shadow: var(--primary-glow);
  color: #ffffff;
  font-weight: 600;
}
.thread-actions .btn-answer-first:hover {
  background: var(--primary);
  color: #ffffff;
  filter: brightness(1.1);
}

/* Attachments: a line that counts them, then a tile each. A picture shows
   itself above its name. */
.files-block {
  margin-top: 18px;
  border-top: 1px solid var(--row-line);
  border-radius: 15px 15px 0 0;
}
.files-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 9px 0 15px;
  color: var(--ink);
}
.files-head .icon {
  margin-right: 5px;
}
.files-head b {
  font-weight: 600;
}
.files-head span {
  color: var(--muted);
}
.files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin-top: 6px;
}
.file {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--tile-line);
  border-radius: 13px;
  background: var(--tile);
}
.file-thumb {
  display: grid;
  place-items: center;
  height: 92px;
  border-bottom: 1px solid var(--tile-line);
  background: linear-gradient(135deg, var(--chip), var(--tile));
  color: var(--muted);
}
.file-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.file-thumb .icon {
  width: 34px;
  height: 34px;
  stroke-width: 1.3;
  opacity: 0.75;
}
/* A picture: its drawing only shows if the picture can't be. */
a.file-thumb .icon,
a.file-thumb.gone img {
  display: none;
}
a.file-thumb.gone {
  pointer-events: none;
}
a.file-thumb.gone .icon {
  display: block;
}
.file-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 53px;
  padding: 6px 12px 6px 13px;
  color: var(--ink);
  text-decoration: none;
}
a.file-foot:hover {
  background: var(--row-hover);
  color: var(--ink);
}
.file-foot > .icon {
  flex-shrink: 0;
  color: var(--link);
}
/* The kind of file: a page with a folded corner and a few letters. */
.file-type {
  flex-shrink: 0;
  display: grid;
  place-items: end center;
  width: 27px;
  height: 27px;
  padding-bottom: 5px;
  border-radius: 5px;
  background: #7b4cf2;
  clip-path: polygon(0 0, 65% 0, 100% 35%, 100% 100%, 0 100%);
  color: #ffffff;
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  line-height: 1;
}
.file-type-pdf {
  background: #e23b3a;
}
.file-type-image {
  background: #8a52f6;
}
.file-type-archive {
  background: #b7791f;
}
.file-type-sheet {
  background: #1f8a56;
}
.file-type-text {
  background: #2f6fe0;
}
.file-text {
  flex: 1;
  min-width: 0;
}
.file-text b {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-text small {
  display: block;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 19px;
}

/* Writing a message: where an open conversation would be, beside the list.
   A bar with the way back and what this is, then the form. */
.compose-title {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compose-form {
  margin: 14px 14px 24px;
}
.compose-form textarea.input {
  min-height: clamp(200px, 42vh, 560px);
}

/* A message's details: the same chips, on these panels. */
.mail-details {
  border-color: var(--tile-line);
  background: var(--tile);
}
.check {
  background: var(--chip);
}
.check-good {
  background: var(--ok-soft);
}
.check-bad {
  background: var(--danger-soft);
}
.check-unsure {
  background: var(--warn-soft);
}

/* ---- Settings: its parts in a list beside the open one -------------------
   Where there's room the list stands at the left and stays in view. Where
   there isn't (a phone, a narrow window), /settings is the list alone, each
   part with a line on what's in it, and a part has the room to itself with
   "All settings" to go back. Measures follow --u where it's set (wide
   windows) and are pixels on phones. */

.settings-room {
  container: settings / inline-size;
}
.settings-layout {
  display: grid;
  grid-template-columns: calc(236 * var(--u, 1px)) minmax(0, 1fr);
  gap: calc(28 * var(--u, 1px));
  align-items: start;
}
.settings-nav {
  position: sticky;
  top: 0;
}
.settings-group {
  display: grid;
  gap: calc(2 * var(--u, 1px));
}
.settings-group-name {
  margin: calc(18 * var(--u, 1px)) calc(10 * var(--u, 1px)) calc(6 * var(--u, 1px));
  color: var(--muted);
  font-size: calc(13.5 * var(--u, 1px));
  font-weight: 600;
}
.settings-link {
  display: flex;
  align-items: center;
  gap: calc(10 * var(--u, 1px));
  padding: calc(6 * var(--u, 1px)) calc(10 * var(--u, 1px)) calc(6 * var(--u, 1px)) calc(7 * var(--u, 1px));
  border-radius: calc(10 * var(--u, 1px));
  color: var(--ink-2);
  font-size: calc(16 * var(--u, 1px));
  text-decoration: none;
}
.settings-link:hover {
  background: var(--hover);
  color: var(--ink);
}
.settings-link.active {
  background: var(--accent-soft);
  color: var(--ink);
}
.settings-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: calc(30 * var(--u, 1px));
  height: calc(30 * var(--u, 1px));
  border-radius: calc(8 * var(--u, 1px));
  background: var(--tile);
  box-shadow: inset 0 0 0 1px var(--tile-line);
  color: var(--link);
}
.settings-icon .icon {
  width: calc(18 * var(--u, 1px));
  height: calc(18 * var(--u, 1px));
}
.settings-link.active .settings-icon {
  background: var(--panel);
  box-shadow: none;
}
.settings-name {
  display: grid;
  flex: 1;
  min-width: 0;
}
.settings-name b {
  font-weight: 500;
}
.settings-link.active .settings-name b {
  font-weight: 600;
}
.settings-name small,
.settings-go,
.settings-back {
  display: none;
}
.settings-body {
  min-width: 0;
  max-width: calc(820 * var(--u, 1px));
}
.settings-head {
  display: flex;
  align-items: center;
  gap: calc(12 * var(--u, 1px));
  margin: 0 0 calc(14 * var(--u, 1px));
}
.settings-head .settings-icon {
  width: calc(42 * var(--u, 1px));
  height: calc(42 * var(--u, 1px));
  border-radius: calc(12 * var(--u, 1px));
}
.settings-head .settings-icon .icon {
  width: calc(22 * var(--u, 1px));
  height: calc(22 * var(--u, 1px));
}
.settings-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: calc(21 * var(--u, 1px));
  font-weight: 600;
}
.app-mail .main:not(.main-split) .settings-head h2 {
  font-size: calc(21 * var(--u, 1px));
}
.settings-head p {
  margin: calc(1 * var(--u, 1px)) 0 0;
}

@container settings (max-width: 620px) {
  .settings-layout {
    display: block;
  }
  .settings-index .settings-body,
  .settings-layout:not(.settings-index) .settings-nav {
    display: none;
  }
  .settings-nav {
    position: static;
  }
  .settings-group {
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--panel-line);
    border-radius: calc(14 * var(--u, 1px));
    background: var(--panel);
  }
  .settings-group-name {
    margin-left: calc(14 * var(--u, 1px));
  }
  .settings-link,
  .settings-link.active {
    gap: calc(12 * var(--u, 1px));
    padding: calc(11 * var(--u, 1px)) calc(12 * var(--u, 1px)) calc(11 * var(--u, 1px)) calc(14 * var(--u, 1px));
    border-radius: 0;
    background: none;
  }
  .settings-link + .settings-link {
    border-top: 1px solid var(--line);
  }
  .settings-link .settings-icon,
  .settings-link.active .settings-icon {
    width: calc(34 * var(--u, 1px));
    height: calc(34 * var(--u, 1px));
    border-radius: calc(9 * var(--u, 1px));
    background: var(--accent-soft);
    box-shadow: none;
  }
  .settings-link .settings-name b {
    font-weight: 600;
  }
  .settings-name small {
    display: block;
    color: var(--muted);
    font-size: calc(14 * var(--u, 1px));
  }
  .settings-go {
    display: block;
    color: var(--muted);
  }
  .settings-back {
    display: inline-flex;
    align-items: center;
    gap: calc(6 * var(--u, 1px));
    margin: 0 0 calc(12 * var(--u, 1px));
    font-weight: 600;
    text-decoration: none;
  }
}

/* A card's state beside its name ("Set" for an out-of-office reply that
   starts later): the pill's writing, which reads on the colour's tint in
   every look. */
.badge-accent {
  color: var(--pill-ink);
}

/* Settings, Look: each look as a small picture of the window in it, and
   the colours side by side. */
.looks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(calc(150 * var(--u, 1px)), 1fr));
  gap: calc(10 * var(--u, 1px));
}
.look-tile {
  display: grid;
  gap: calc(8 * var(--u, 1px));
  margin: 0;
  padding: calc(8 * var(--u, 1px));
  border: 1px solid var(--panel-line);
  border-radius: calc(12 * var(--u, 1px));
  background: var(--tile);
  cursor: pointer;
}
.look-tile:hover {
  border-color: var(--button-line-hover);
}
.look-tile.chosen,
.accent-pick.chosen {
  border-color: var(--brand-strong);
  box-shadow: inset 0 0 0 1px var(--brand-strong);
}
.look-name {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--u, 1px));
}
.look-name input {
  margin: 0;
}
.look-sample {
  position: relative;
  display: flex;
  height: calc(72 * var(--u, 1px));
  overflow: hidden;
  border: 1px solid var(--panel-line);
  border-radius: calc(8 * var(--u, 1px));
  background: var(--lp);
}
.ls-side {
  display: block;
  flex: none;
  width: 30%;
  padding: calc(8 * var(--u, 1px)) calc(6 * var(--u, 1px));
  background: var(--ls);
}
/* Compose, at the top of the side bar. */
.ls-side::before {
  display: block;
  height: calc(9 * var(--u, 1px));
  border-radius: calc(5 * var(--u, 1px));
  background: var(--brand-strong);
  content: "";
}
.ls-page {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: calc(6 * var(--u, 1px));
  padding: 0 calc(10 * var(--u, 1px));
}
.ls-page i {
  display: block;
  height: calc(10 * var(--u, 1px));
  border-radius: calc(3 * var(--u, 1px));
  background: var(--lr);
}
/* The open conversation, in the colour. */
.ls-page i:first-child {
  background: color-mix(in srgb, var(--brand-strong) 34%, var(--lr));
}
.ls-page i:nth-child(2) {
  width: 82%;
}
.ls-page i:nth-child(3) {
  width: 92%;
}
.look-sample-light,
.look-sample-auto {
  --ls: var(--sample-side);
  --lp: var(--sample-page);
  --lr: #ffffff;
}
.look-sample-white {
  --ls: #f7f7f8;
  --lp: #ffffff;
  --lr: #ececf0;
}
.look-sample-white .ls-side {
  box-shadow: inset -1px 0 0 #e4e4e8;
}
.look-sample-white-dark {
  --ls: var(--sample-side);
  --lp: #ffffff;
  --lr: #ececf0;
}
.look-sample-paper {
  --ls: #ede4d3;
  --lp: #f5efe4;
  --lr: #fcf9f2;
}
.look-sample-dark {
  --ls: var(--sample-dark-side);
  --lp: var(--sample-dark-page);
  --lr: var(--sample-dark-row);
}
.look-sample-dark-grey {
  --ls: #18181a;
  --lp: #111113;
  --lr: #2c2c31;
}
/* The same as the device: light, and dark across the corner. */
.look-sample-auto::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--sample-dark-side) 0 30%, var(--sample-dark-page) 30%);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  content: "";
}
.look-hint {
  margin: calc(10 * var(--u, 1px)) 0 0;
}
.accents {
  display: flex;
  flex-wrap: wrap;
  gap: calc(8 * var(--u, 1px));
}
.accent-pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: calc(8 * var(--u, 1px));
  margin: 0;
  padding: calc(6 * var(--u, 1px)) calc(14 * var(--u, 1px)) calc(6 * var(--u, 1px)) calc(7 * var(--u, 1px));
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  background: var(--tile);
  cursor: pointer;
}
.accent-pick:hover {
  border-color: var(--button-line-hover);
}
/* The dot says which it is; the choice itself is still a radio button for
   the keyboard and screen readers. */
.accent-pick input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.accent-pick:has(input:focus-visible),
.look-tile:has(input:focus-visible) {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
.accent-dot {
  flex: none;
  width: calc(22 * var(--u, 1px));
  height: calc(22 * var(--u, 1px));
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.accent-pick.chosen .accent-dot {
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.12),
    inset 0 0 0 calc(4 * var(--u, 1px)) rgba(255, 255, 255, 0.85);
}
@container settings (max-width: 620px) {
  .looks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .look-sample {
    height: calc(60 * var(--u, 1px));
  }
}

/* Dragging several conversations: what the pointer carries. It's on the
   page only for the moment the browser takes its picture, out of sight. */
.drag-count {
  position: fixed;
  top: -200px;
  left: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brand-strong);
  color: #ffffff;
  font: 600 13px/1.2 var(--font);
  white-space: nowrap;
}
/* A Shift-click on rows picks a run of them: it doesn't also select their
   text. */
.list-pane .message-link {
  -webkit-user-select: none;
  user-select: none;
}

/* The account's menu, under its button at the end of the top bar. */
.menu-account {
  top: 74px;
  right: 24px;
  left: auto;
  min-width: 250px;
  max-width: min(360px, calc(100vw - 32px));
}
.menu-account .menu-item[aria-checked="true"] {
  font-weight: 600;
}

/* ---- Wide windows: the design's layout, kept compact --------------------- */

@media (min-width: 761px) {
  .app-mail {
    /* What one pixel of the design is on the screen, at every width. */
    --u: 0.8px;
    --side-w: calc(276 * var(--u));
    --top-h: calc(60 * var(--u));
    position: relative;
    display: grid;
    grid-template-columns: var(--side-w) minmax(0, 1fr);
    grid-template-rows: var(--top-h) minmax(0, 1fr);
    grid-template-areas: "side top" "side main";
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    /* The violet light in the top corner shows behind the rounded corner of
       the main area. */
    background:
      radial-gradient(
        calc(150 * var(--u)) calc(62 * var(--u)) at calc(272 * var(--u)) calc(-8 * var(--u)),
        var(--glow-a),
        var(--glow-b) 45%,
        transparent 100%
      ),
      radial-gradient(
        calc(250 * var(--u)) calc(190 * var(--u)) at var(--side-w) 0,
        var(--glow-c),
        transparent 100%
      ),
      var(--side);
  }
  /* The main area's ground, under the top bar and the panels. */
  .app-mail::before {
    content: "";
    grid-column: 2;
    grid-row: 1 / -1;
    border-top-left-radius: calc(16 * var(--u));
    background: linear-gradient(180deg, var(--page) 78%, var(--page-foot) 100%);
    box-shadow: inset 1px 0 0 var(--main-edge);
  }
  .app-mail > .rail {
    display: none;
  }
  .app-mail > .app-body {
    display: contents;
  }

  /* -- the top bar: low, and evenly spaced. What is in it stands in the
     middle of its height; the search starts where the list's rows start, and
     the account ends where the reading panel ends. -- */
  .app-mail > .topbar {
    grid-area: top;
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 0;
    height: auto;
    padding: 0;
    border: 0;
    background: none;
  }
  .app-mail .topbar-button,
  .app-mail .topbar-avatar {
    display: none;
  }
  .app-mail .topbar .search {
    flex: 0 1 calc(560 * var(--u));
    display: flex;
    align-items: center;
    gap: calc(10 * var(--u));
    height: calc(42 * var(--u));
    margin: 0 0 0 calc(8 * var(--u));
    padding: 0 calc(8 * var(--u)) 0 calc(12 * var(--u));
    border: 1.5px solid var(--field-line);
    border-radius: calc(12 * var(--u));
    background: var(--field);
    color: var(--ink);
  }
  .app-mail .topbar .search:focus-within {
    border-color: var(--brand-strong);
    box-shadow: var(--ring);
  }
  .app-mail .topbar .search > .icon {
    display: block;
    width: calc(20 * var(--u));
    height: calc(20 * var(--u));
    stroke-width: 1.8;
  }
  .app-mail .topbar .search .input {
    flex: 1;
    min-width: 0;
    width: auto;
    max-width: none;
    height: 100%;
    margin: 0;
    padding: 0 0 calc(2 * var(--u));
    border: 0;
    outline: 0;
    background: none;
    box-shadow: none;
    color: var(--ink);
    font-size: calc(17 * var(--u));
    /* The browser's own look for a search field (Safari's rounded one, its
       glass and its cross) would stand inside this one. */
    appearance: none;
    -webkit-appearance: none;
  }
  .app-mail .topbar .search .input::placeholder {
    color: var(--placeholder);
  }
  .app-mail .topbar .search-keys {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    height: calc(24 * var(--u));
    padding: 0 calc(7 * var(--u));
    border-radius: calc(6 * var(--u));
    background: var(--chip);
    color: var(--ink-2);
    font: inherit;
    font-size: calc(15 * var(--u));
    white-space: nowrap;
  }
  .app-mail .top-actions {
    display: flex;
    align-items: center;
    margin: 0 calc(10 * var(--u)) 0 auto;
  }
  .app-mail .top-action {
    display: grid;
    place-items: center;
    width: calc(36 * var(--u));
    height: calc(36 * var(--u));
    margin-left: calc(8 * var(--u));
    padding: 0;
    border: 0;
    border-radius: calc(9 * var(--u));
    background: none;
    color: var(--ink);
    cursor: pointer;
  }
  .app-mail .top-action .icon {
    width: calc(23 * var(--u));
    height: calc(23 * var(--u));
    stroke-width: 1.7;
  }
  .app-mail .top-action:hover,
  .app-mail .top-action.active {
    background: var(--row-hover);
    color: var(--link);
  }
  .app-mail .top-account {
    display: flex;
    align-items: center;
    gap: calc(6 * var(--u));
    margin-left: calc(12 * var(--u));
    padding: 0 0 0 calc(12 * var(--u));
    border: 0;
    border-left: 1px solid var(--sep);
    background: none;
    color: var(--ink);
    cursor: pointer;
  }
  .app-mail .top-account .avatar {
    width: calc(38 * var(--u));
    height: calc(38 * var(--u));
    background: var(--account);
    color: #ffffff;
    font-size: calc(15 * var(--u));
    font-weight: 600;
    letter-spacing: 0.2px;
  }
  .app-mail .top-account > .icon {
    width: calc(15 * var(--u));
    height: calc(15 * var(--u));
    stroke-width: 2.4;
  }
  .menu-account {
    top: calc(58 * var(--u));
    right: calc(10 * var(--u));
  }

  /* -- the side bar -- */
  .app-mail .sidebar {
    grid-area: side;
    position: relative;
    top: 0;
    display: flex;
    flex-direction: column;
    width: auto;
    height: 100%;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: none;
  }
  .app-mail .sidebar > :not(.sidebar-art) {
    position: relative;
  }
  .app-mail .sidebar-art {
    display: var(--side-art, block);
    position: absolute;
    left: 0;
    bottom: 0;
    /* Drawn 304 wide and 941 high: as wide as the side bar, in proportion. */
    width: var(--side-w);
    height: auto;
    aspect-ratio: 304 / 941;
    pointer-events: none;
  }
  /* The mark stands in the middle of the top bar's height. */
  .app-mail .side-brand {
    display: flex;
    align-items: center;
    flex: none;
    gap: calc(10 * var(--u));
    height: calc(40 * var(--u));
    margin: calc(10 * var(--u)) 0 0 calc(30 * var(--u));
    color: var(--side-ink);
    font-size: calc(25 * var(--u));
    font-weight: 600;
    text-decoration: none;
  }
  .app-mail .side-mark {
    flex: none;
    width: calc(33 * var(--u));
    height: calc(35 * var(--u));
  }
  .app-mail .side-account,
  .app-mail .drawer-foot,
  .app-mail .nav-link-phone,
  .app-mail .fab {
    display: none;
  }
  .app-mail .nav-write {
    flex: none;
    gap: calc(10 * var(--u));
    width: calc(240 * var(--u));
    height: calc(46 * var(--u));
    margin: calc(20 * var(--u)) 0 0 calc(18 * var(--u));
    padding: 0;
    border-radius: calc(15 * var(--u));
    font-size: calc(17.6 * var(--u));
  }
  .app-mail .nav-write .icon {
    width: calc(20 * var(--u));
    height: calc(20 * var(--u));
    stroke-width: 2;
    color: #ffffff;
  }
  .app-mail .nav {
    flex: 1;
    min-height: 0;
    gap: 0;
    margin-top: calc(16 * var(--u));
    padding: 0 calc(14 * var(--u)) calc(10 * var(--u)) calc(18 * var(--u));
    overflow-y: auto;
    scrollbar-width: none;
  }
  .app-mail .nav::-webkit-scrollbar {
    display: none;
  }
  .app-mail .sidebar .nav-link {
    flex: none;
    gap: calc(13 * var(--u));
    min-height: calc(38 * var(--u));
    padding: 0 0 0 calc(12 * var(--u));
    border-radius: calc(10 * var(--u));
    font-size: calc(17.6 * var(--u));
    font-weight: 450;
  }
  /* A folder inside another steps in by its depth. */
  .app-mail .sidebar .nav-link.nav-inner {
    padding-left: calc((12 + 18 * var(--depth, 1)) * var(--u));
  }
  .app-mail .sidebar .nav-link.active {
    min-height: calc(38 * var(--u));
    margin-bottom: calc(1 * var(--u));
    font-weight: 600;
  }
  .app-mail .sidebar .nav-link > .icon {
    width: calc(22 * var(--u));
    height: calc(22 * var(--u));
    margin: 0;
  }
  .app-mail .sidebar .nav-link .tag-dot {
    flex: none;
    width: calc(11 * var(--u));
    height: calc(11 * var(--u));
    margin: 0 calc(5.5 * var(--u));
  }
  .app-mail .sidebar .nav-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .app-mail .sidebar .nav-count {
    min-width: calc(26 * var(--u));
    height: calc(23 * var(--u));
    margin-left: auto;
    margin-right: calc(7 * var(--u));
    padding: 0 calc(7 * var(--u));
    border-radius: calc(12 * var(--u));
    font-size: calc(15 * var(--u));
  }
  .app-mail .sidebar .nav-link.active .nav-count {
    min-width: calc(30 * var(--u));
    height: calc(23 * var(--u));
    margin-right: calc(7 * var(--u));
  }
  .app-mail .nav-rule {
    display: block;
    flex: none;
    width: auto;
    height: 1px;
    margin: calc(11 * var(--u)) calc(6 * var(--u)) 0 calc(2 * var(--u));
    border: 0;
    background: var(--side-rule);
  }
  .app-mail .nav-heading {
    flex: none;
    height: calc(30 * var(--u));
    margin: calc(7 * var(--u)) 0 0;
    padding: 0 calc(5 * var(--u)) 0 calc(12 * var(--u));
    font-size: calc(16 * var(--u));
  }
  .app-mail .nav-add {
    width: calc(26 * var(--u));
    height: calc(26 * var(--u));
  }
  .app-mail .nav-add .icon {
    width: calc(19 * var(--u));
    height: calc(19 * var(--u));
  }
  .app-mail .side-storage {
    display: block;
    flex: none;
    position: relative;
    height: calc(46 * var(--u));
    margin: calc(8 * var(--u)) 0 calc(16 * var(--u));
    color: var(--side-ink);
    text-decoration: none;
  }
  .app-mail .side-storage .icon {
    position: absolute;
    left: calc(30 * var(--u));
    top: calc(8 * var(--u));
    width: calc(28 * var(--u));
    height: calc(28 * var(--u));
    stroke-width: 1.35;
  }
  .app-mail .side-storage p {
    position: absolute;
    left: calc(72 * var(--u));
    top: calc(3 * var(--u));
    margin: 0;
    font-size: calc(15.6 * var(--u));
    line-height: calc(20 * var(--u));
    white-space: nowrap;
  }
  .app-mail .side-storage b {
    font-weight: 600;
  }
  .app-mail .side-meter {
    position: absolute;
    left: calc(72 * var(--u));
    top: calc(30 * var(--u));
    width: calc(180 * var(--u));
    height: calc(10 * var(--u));
    overflow: hidden;
    border-radius: calc(5 * var(--u));
    background: var(--side-meter);
  }
  .app-mail .side-meter i {
    display: block;
    min-width: calc(10 * var(--u));
    height: 100%;
    border-radius: calc(5 * var(--u));
    background: var(--side-meter-fill);
  }
  .app-mail .side-meter.nearly i {
    background: linear-gradient(90deg, #f59e0b, #f97316);
  }

  /* -- the main area -- */
  .app-mail .main {
    grid-area: main;
    position: relative;
    max-width: none;
    height: 100%;
    min-height: 0;
    padding: calc(4 * var(--u)) calc(24 * var(--u)) calc(20 * var(--u)) calc(20 * var(--u));
    overflow-y: auto;
    background: none;
  }
  .app-mail .main-split {
    padding: 0 0 calc(12 * var(--u));
    overflow: hidden;
  }
  .app-mail .split {
    display: grid;
    grid-template-columns: minmax(calc(410 * var(--u)), calc(490 * var(--u))) minmax(0, 1fr);
    gap: 0;
    height: 100%;
  }

  /* -- the list: on the page itself, with no panel behind it -- */
  .app-mail .list-pane {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-auto-rows: min-content;
    align-content: start;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
    border: 0;
    border-radius: 0;
    background: none;
  }
  .app-mail .list-pane::-webkit-scrollbar {
    display: none;
  }
  .app-mail .list-pane > * {
    grid-column: 1 / -1;
  }
  .app-mail .list-pane > .list-head {
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    height: calc(56 * var(--u));
    padding: 0 calc(10 * var(--u)) 1px calc(20 * var(--u));
    border-bottom: 1px solid var(--row-line);
    background: var(--page);
  }
  .app-mail .list-pane:has(> .toolbar.picking) > .list-head {
    grid-column: 1 / -1;
  }
  .app-mail .list-title {
    min-width: 0;
    overflow: hidden;
    font-size: calc(24 * var(--u));
    font-weight: 600;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .app-mail .list-unread {
    height: calc(26 * var(--u));
    margin: calc(2 * var(--u)) 0 0 calc(9 * var(--u));
    padding: 0 calc(10 * var(--u)) 1px;
    border-radius: calc(13 * var(--u));
    font-size: calc(15 * var(--u));
  }
  .app-mail .list-range {
    margin: calc(3 * var(--u)) 0 0 calc(9 * var(--u));
    font-size: calc(15 * var(--u));
    white-space: nowrap;
  }
  .app-mail .list-pane > .toolbar {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 0;
    z-index: 3;
    flex-wrap: nowrap;
    gap: calc(14 * var(--u));
    height: calc(56 * var(--u));
    padding: 0 calc(18 * var(--u)) 0 0;
    border-bottom: 1px solid var(--row-line);
    background: var(--page);
  }
  /* Something is picked: what can be done with it, on a line of its own. */
  .app-mail .list-pane > .toolbar.picking {
    grid-column: 1 / -1;
    grid-row: 2;
    top: calc(56 * var(--u));
    flex-wrap: wrap;
    gap: calc(6 * var(--u));
    height: auto;
    padding: calc(7 * var(--u)) calc(18 * var(--u)) calc(7 * var(--u)) calc(20 * var(--u));
    border-radius: 0;
  }
  /* The search is in the top bar. */
  .app-mail .list-pane .toolbar .search {
    display: none;
  }
  /* What can be done with the picked ones fits on one line without it. */
  .app-mail .list-pane .toolbar.picking > .btn[title="Refresh"] {
    display: none;
  }
  .app-mail .list-pane .toolbar .btn-icon {
    display: grid;
    place-items: center;
    width: calc(30 * var(--u));
    height: calc(30 * var(--u));
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
  }
  .app-mail .list-pane .toolbar .btn-icon:hover {
    color: var(--link);
  }
  .app-mail .list-pane .toolbar .btn-icon .icon {
    width: calc(22 * var(--u));
    height: calc(22 * var(--u));
  }
  .app-mail .list-pane .toolbar .btn-star.on {
    color: var(--star);
  }
  .app-mail .pick-all,
  .app-mail .message-pick input {
    appearance: none;
    -webkit-appearance: none;
    display: block;
    flex-shrink: 0;
    width: calc(18 * var(--u));
    height: calc(18 * var(--u));
    margin: 0;
    border: 1.5px solid var(--check-line);
    border-radius: calc(4.5 * var(--u));
    background: transparent;
    cursor: pointer;
  }
  .app-mail .pick-all {
    width: calc(20 * var(--u));
    height: calc(20 * var(--u));
    border-color: var(--ink);
    border-width: 1.6px;
    border-radius: calc(5 * var(--u));
  }
  .app-mail .pick-all:checked,
  .app-mail .message-pick input:checked {
    border-color: var(--brand-strong);
    background: var(--brand-strong)
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 9.3 3 3 6-6.4'/%3E%3C/svg%3E")
      center / 100% no-repeat;
  }
  .app-mail .list-pane .list {
    margin: 0;
    padding: calc(8 * var(--u)) 0;
  }
  .app-mail .list-pane .list > li + li {
    border-top: 0;
  }
  /* A row: three lines of text beside the sender's circle, about 70 px. */
  .app-mail .list-pane .message {
    position: relative;
    display: flex;
    align-items: flex-start;
    min-height: calc(87 * var(--u));
    margin: 0 calc(8 * var(--u));
    padding: 0 calc(10 * var(--u));
    border: 0;
    border-radius: calc(12 * var(--u));
    background: none;
  }
  .app-mail .list-pane .message::after {
    content: "";
    position: absolute;
    left: calc(10 * var(--u));
    right: calc(10 * var(--u));
    bottom: 0;
    height: 1px;
    background: var(--row-line);
  }
  .app-mail .list-pane .message:not(.open):hover {
    background: var(--row-hover);
  }
  .app-mail .list-pane .message.picked {
    background: var(--accent-soft);
  }
  .app-mail .list-pane .message.open,
  .app-mail .list-pane .message.open.unread {
    background: var(--selected);
    box-shadow: var(--selected-ring);
  }
  .app-mail .list-pane .message.open::after {
    display: none;
  }
  .app-mail .list-pane .message-pick {
    position: static;
    flex: none;
    display: block;
    width: calc(18 * var(--u));
    height: calc(18 * var(--u));
    margin: calc(24 * var(--u)) 0 0;
    padding: 0;
    opacity: 1;
  }
  .app-mail .list-pane .message-link,
  .app-mail .list-pane .message-link:hover {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: calc(40 * var(--u)) minmax(0, 1fr) auto;
    /* The circle stands beside the three lines of text only: reaching into
       the chips' line too, it gave that line height when there were none. */
    grid-template-areas:
      "avatar from time"
      "avatar subject subject"
      "avatar preview preview"
      ". chips chips";
    align-items: center;
    column-gap: 0;
    row-gap: 0;
    padding: calc(10 * var(--u)) 0 calc(10 * var(--u)) calc(12 * var(--u));
    background: none;
    color: var(--ink);
  }
  .app-mail .list-pane .message-link .avatar {
    grid-area: avatar;
    align-self: start;
    width: calc(40 * var(--u));
    height: calc(40 * var(--u));
    margin: calc(3 * var(--u)) 0 0;
    font-size: calc(16.5 * var(--u));
  }
  .app-mail .list-pane .message-from {
    grid-area: from;
    min-width: 0;
    /* Room at its start for the dot of unread mail, which sits in the gap
       between the circle and the name. */
    margin-left: calc(7 * var(--u));
    padding-left: calc(14 * var(--u));
    overflow: hidden;
    color: var(--ink);
    font-size: calc(17.6 * var(--u));
    font-weight: 600;
    line-height: calc(24 * var(--u));
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .app-mail .list-pane .message.unread .message-from::before {
    content: "";
    display: inline-block;
    width: calc(10 * var(--u));
    height: calc(10 * var(--u));
    margin: 0 calc(4 * var(--u)) 0 calc(-14 * var(--u));
    border-radius: 50%;
    background: var(--brand-strong);
  }
  .app-mail .list-pane .message-count,
  .app-mail .list-pane .message-clip {
    color: var(--ink-3);
    font-weight: 500;
  }
  /* Read: lighter letters too, as well as the fainter colour. */
  .app-mail .list-pane .message:not(.unread) .message-from {
    font-weight: 600;
  }
  .app-mail .list-pane .message:not(.unread) .message-subject {
    font-weight: 500;
  }
  .app-mail .list-pane .message-time,
  .app-mail .list-pane .message.unread .message-time {
    grid-area: time;
    position: relative;
    top: calc(-1 * var(--u));
    margin-left: calc(10 * var(--u));
    color: var(--ink-2);
    font-size: calc(15 * var(--u));
    font-weight: 400;
  }
  .app-mail .list-pane .message-subject {
    grid-area: subject;
    min-width: 0;
    margin: 0 calc(28 * var(--u)) 0 calc(21 * var(--u));
    color: var(--ink);
    font-size: calc(16.9 * var(--u));
    font-weight: 600;
    line-height: calc(22 * var(--u));
  }
  .app-mail .list-pane .message-preview {
    grid-area: preview;
    display: block;
    margin: 0 0 0 calc(21 * var(--u));
    overflow: hidden;
    color: var(--ink-3);
    font-size: calc(16 * var(--u));
    line-height: calc(21 * var(--u));
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .app-mail .list-pane .message-chips {
    grid-area: chips;
    gap: calc(5 * var(--u));
    margin: calc(5 * var(--u)) 0 0 calc(21 * var(--u));
  }
  .app-mail .list-pane .chip {
    gap: calc(4 * var(--u));
    padding: 0 calc(7 * var(--u));
    border-radius: calc(6 * var(--u));
    font-size: calc(15 * var(--u));
    line-height: calc(22 * var(--u));
  }
  .app-mail .list-pane .chip .icon {
    width: calc(15 * var(--u));
    height: calc(15 * var(--u));
  }
  /* The star: at the end of the subject's line. */
  .app-mail .list-pane .message-star {
    position: absolute;
    top: calc(33 * var(--u));
    right: calc(8 * var(--u));
    display: grid;
    place-items: center;
    width: calc(24 * var(--u));
    height: calc(24 * var(--u));
    margin: 0;
    padding: 0;
    opacity: 1;
  }
  .app-mail .list-pane .message-star .icon {
    width: calc(20 * var(--u));
    height: calc(20 * var(--u));
    stroke-width: 1.5;
  }
  .app-mail .list-pane .folder-note,
  .app-mail .list-pane > .notice {
    margin: calc(10 * var(--u)) calc(18 * var(--u)) 0 calc(20 * var(--u));
  }
  .app-mail .list-pane .empty {
    padding: calc(44 * var(--u)) calc(20 * var(--u));
  }

  /* -- the open conversation: a panel -- */
  .app-mail .read-pane {
    min-width: 0;
    min-height: 0;
    margin: 0 calc(10 * var(--u)) 0 calc(6 * var(--u));
    overflow-y: auto;
    scrollbar-width: none;
    border: 1px solid var(--panel-line);
    border-top-color: var(--panel-top);
    border-radius: calc(15 * var(--u));
    background: var(--reader);
  }
  .app-mail .read-pane::-webkit-scrollbar {
    display: none;
  }
  .app-mail .read {
    padding-bottom: calc(20 * var(--u));
  }
  .app-mail .read > *:not(.read-toolbar) {
    margin-left: calc(24 * var(--u));
    margin-right: calc(22 * var(--u));
  }
  .app-mail .read-toolbar {
    flex-wrap: nowrap;
    gap: calc(12 * var(--u));
    min-height: calc(55 * var(--u));
    padding: 0 calc(16 * var(--u)) 1px calc(15 * var(--u));
    border-bottom: 1px solid var(--tools-line);
    border-radius: calc(15 * var(--u)) calc(15 * var(--u)) 0 0;
    background: var(--panel);
  }
  /* Icons alone; each says what it is when pointed at. */
  .app-mail .read-toolbar .btn-tool span,
  .app-mail .read-toolbar .spacer {
    display: none;
  }
  .app-mail .read-toolbar .btn-tool {
    display: grid;
    place-items: center;
    flex: none;
    width: calc(36 * var(--u));
    min-width: 0;
    height: calc(36 * var(--u));
    padding: 0;
    border: 0;
    border-radius: calc(9 * var(--u));
    background: none;
    color: var(--ink);
  }
  .app-mail .read-toolbar .btn-tool:hover {
    background: var(--row-hover);
    color: var(--link);
  }
  .app-mail .read-toolbar .btn-tool .icon {
    width: calc(22 * var(--u));
    height: calc(22 * var(--u));
  }
  .app-mail .read-toolbar .btn-star.on {
    color: var(--star);
  }
  /* Answering is at the foot of each message. */
  .app-mail .read-toolbar .btn-tool.tool-answer {
    display: none;
  }
  .app-mail .read-toolbar .read-back {
    margin-right: 0;
  }
  .app-mail .tool-sep {
    display: block;
    flex: none;
    width: 1.5px;
    height: calc(24 * var(--u));
    margin: 0 calc(-2 * var(--u));
    background: var(--sep);
  }
  .app-mail .read-pager {
    display: flex;
    gap: calc(8 * var(--u));
    margin-left: auto;
  }
  .app-mail .read-pager .read-step {
    display: grid;
    place-items: center;
    width: calc(36 * var(--u));
    height: calc(36 * var(--u));
    padding: 0;
    border-radius: calc(9 * var(--u));
    color: var(--ink);
  }
  .app-mail .read-pager .read-step:hover {
    background: var(--row-hover);
    color: var(--link);
  }
  .app-mail .read-pager .read-step.disabled {
    opacity: 0.35;
    pointer-events: none;
  }
  .app-mail .read-pager .read-step span {
    display: none;
  }
  .app-mail .read-pager .icon {
    width: calc(22 * var(--u));
    height: calc(22 * var(--u));
  }
  .app-mail .read-title {
    margin-top: calc(12 * var(--u));
    margin-bottom: 0;
    color: var(--ink);
    font-size: calc(25 * var(--u));
    font-weight: 600;
    line-height: calc(33 * var(--u));
  }
  .app-mail .read-tags {
    gap: calc(6 * var(--u));
    margin-top: calc(6 * var(--u));
    margin-bottom: calc(10 * var(--u));
  }
  .app-mail .read-tags .chip {
    padding: calc(1 * var(--u)) calc(4 * var(--u)) calc(1 * var(--u)) calc(9 * var(--u));
    font-size: calc(15.5 * var(--u));
  }
  /* An earlier message of the conversation, folded to one line. */
  .app-mail .read .thread-fold {
    grid-template-columns: calc(36 * var(--u)) minmax(0, calc(220 * var(--u))) minmax(0, 1fr) auto;
    gap: calc(12 * var(--u));
    padding: calc(7 * var(--u)) 0;
    font-size: calc(17 * var(--u));
  }
  .app-mail .read .thread-fold .avatar {
    width: calc(36 * var(--u));
    height: calc(36 * var(--u));
    font-size: calc(15 * var(--u));
  }
  .app-mail .read .thread {
    gap: 0;
  }
  .app-mail .read .thread-item,
  .app-mail .read .thread-item + .thread-item {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
  }
  .app-mail .read .thread-item + .thread-item {
    margin-top: calc(16 * var(--u));
    border-top: 1px solid var(--row-line);
  }
  .app-mail .read .thread-item:has(> .thread-fold) {
    margin-top: calc(8 * var(--u));
    padding: 0 calc(10 * var(--u));
    border: 1px solid var(--tile-line);
    border-radius: calc(12 * var(--u));
    background: var(--tile);
  }
  .app-mail .read .thread-item:has(> .thread-fold):hover {
    border-color: var(--button-line-hover);
    background: var(--tile);
  }
  .app-mail .read .mail-head {
    gap: calc(14 * var(--u));
    margin: calc(15 * var(--u)) 0 0;
  }
  .app-mail .read .mail-head > .avatar {
    width: calc(46 * var(--u));
    height: calc(46 * var(--u));
    font-size: calc(17.5 * var(--u));
  }
  .app-mail .read .mail-who {
    padding-top: 0;
    font-size: calc(17.6 * var(--u));
    line-height: calc(24 * var(--u));
  }
  .app-mail .read .mail-who strong {
    font-weight: 600;
  }
  .app-mail .read .mail-who .small {
    color: var(--ink-3);
    font-size: calc(15.5 * var(--u));
    line-height: calc(21 * var(--u));
  }
  .app-mail .read .mail-who strong + .small {
    font-size: calc(16.5 * var(--u));
  }
  .app-mail .read .mail-when {
    margin-top: calc(3 * var(--u));
    color: var(--ink-3);
    font-size: calc(15 * var(--u));
    white-space: nowrap;
  }
  .app-mail .read .mail-star .icon {
    width: calc(22 * var(--u));
    height: calc(22 * var(--u));
    stroke-width: 1.6;
  }
  .app-mail .read .details-toggle {
    font-size: calc(15.5 * var(--u));
  }
  .app-mail .read .mail-details {
    margin-top: calc(10 * var(--u));
    font-size: calc(15.5 * var(--u));
  }
  .app-mail .read .details-title,
  .app-mail .read .check {
    font-size: calc(15.5 * var(--u));
  }
  .app-mail .read .mail-frame {
    margin-top: calc(14 * var(--u));
    border-color: var(--tile-line);
    border-radius: calc(13 * var(--u));
  }
  .app-mail .read .mail-text {
    margin: calc(12 * var(--u)) calc(6 * var(--u)) 0 calc(4 * var(--u));
    color: var(--ink);
    font-size: calc(18.4 * var(--u));
    line-height: 1.45;
  }
  .app-mail .read .files-block {
    margin-top: calc(12 * var(--u));
    border-radius: calc(12 * var(--u)) calc(12 * var(--u)) 0 0;
  }
  .app-mail .read .files-head {
    min-height: calc(42 * var(--u));
    padding: 0 calc(8 * var(--u)) 0 calc(10 * var(--u));
    font-size: calc(16.5 * var(--u));
  }
  .app-mail .read .files-head .icon {
    width: calc(20 * var(--u));
    height: calc(20 * var(--u));
    stroke-width: 1.7;
  }
  .app-mail .read .files {
    grid-template-columns: repeat(auto-fill, minmax(calc(200 * var(--u)), 1fr));
    gap: calc(12 * var(--u));
    margin-top: calc(2 * var(--u));
  }
  .app-mail .read .file {
    border-radius: calc(12 * var(--u));
  }
  .app-mail .read .file-foot {
    gap: calc(10 * var(--u));
    min-height: calc(50 * var(--u));
    padding: calc(5 * var(--u)) calc(11 * var(--u));
  }
  .app-mail .read .file-text b {
    font-size: calc(16.5 * var(--u));
    line-height: calc(21 * var(--u));
  }
  .app-mail .read .file-text small {
    font-size: calc(15 * var(--u));
    line-height: calc(19 * var(--u));
  }
  .app-mail .read .thread-actions {
    gap: calc(10 * var(--u));
    margin-top: calc(14 * var(--u));
    padding-top: calc(14 * var(--u));
    border-top: 1px solid var(--tools-line);
  }
  .app-mail .read .thread-actions .btn {
    height: calc(40 * var(--u));
    padding: 0 calc(14 * var(--u)) calc(2 * var(--u));
    border-radius: calc(11 * var(--u));
    font-size: calc(17 * var(--u));
    font-weight: 500;
  }
  .app-mail .read .thread-actions .btn-answer {
    gap: calc(9 * var(--u));
    min-width: calc(112 * var(--u));
    padding-left: calc(14 * var(--u));
  }
  .app-mail .read .thread-actions .btn-answer .icon {
    width: calc(21 * var(--u));
    height: calc(21 * var(--u));
  }
  .app-mail .read .thread-actions .btn-answer-first {
    min-width: calc(100 * var(--u));
    font-weight: 600;
  }
  /* What is done less often: quieter, at the end of the row. */
  .app-mail .read .thread-actions .btn:not(.btn-answer) {
    border-color: transparent;
    background: none;
    color: var(--ink-3);
    font-size: calc(16 * var(--u));
  }
  .app-mail .read .thread-actions .btn-answer + .btn:not(.btn-answer) {
    margin-left: auto;
  }
  .app-mail .read .thread-actions .btn:not(.btn-answer):hover {
    background: var(--row-hover);
    color: var(--ink);
  }
  .app-mail .read .thread-actions .btn.btn-danger {
    background: var(--danger-fill);
    color: #ffffff;
  }
  .app-mail .read .quick-reply {
    margin-top: calc(16 * var(--u));
    padding: calc(10 * var(--u)) calc(12 * var(--u));
    border-color: var(--tile-line);
    border-radius: calc(13 * var(--u));
    background: var(--tile);
    box-shadow: none;
  }
  .app-mail .read-empty {
    color: var(--ink-3);
    font-size: calc(17 * var(--u));
  }

  /* -- fields and buttons, on every page: lower than the shared sheet's -- */
  .app-mail input.input,
  .app-mail select.input {
    min-height: calc(40 * var(--u));
  }
  .app-mail .btn {
    min-height: calc(38 * var(--u));
  }
  .app-mail .btn-small {
    min-height: calc(32 * var(--u));
  }
  .app-mail .field > span {
    margin-bottom: calc(3 * var(--u));
  }

  /* -- writing a message, in the panel -- */
  .app-mail .compose-bar {
    gap: calc(12 * var(--u));
  }
  .app-mail .compose-title {
    font-size: calc(20 * var(--u));
  }
  .app-mail .compose-form {
    margin: calc(14 * var(--u)) calc(22 * var(--u)) calc(20 * var(--u)) calc(24 * var(--u));
    font-size: calc(17 * var(--u));
  }
  .app-mail .compose-form .field {
    margin-bottom: calc(10 * var(--u));
  }
  .app-mail .compose-form .field > span,
  .app-mail .compose-form label {
    font-size: calc(15.5 * var(--u));
  }
  .app-mail .compose-form .input,
  .app-mail .compose-form .btn {
    font-size: calc(17 * var(--u));
  }
  .app-mail .compose-form .input {
    padding: calc(7 * var(--u)) calc(11 * var(--u));
    border-radius: calc(10 * var(--u));
  }
  .app-mail .compose-form .btn {
    padding: calc(6 * var(--u)) calc(14 * var(--u));
    border-radius: calc(10 * var(--u));
  }
  .app-mail .compose-form .btn-small {
    padding: calc(4 * var(--u)) calc(10 * var(--u));
    font-size: calc(15 * var(--u));
  }
  .app-mail .compose-form .small,
  .app-mail .compose-form .hint {
    font-size: calc(15 * var(--u));
  }
  .app-mail .read .file-thumb {
    height: calc(80 * var(--u));
  }

  /* -- the other pages (writing, settings, rules, folders, tags): the same
     scale, on the same ground -- */
  .app-mail .main:not(.main-split) {
    font-size: calc(17 * var(--u));
  }
  .app-mail .main:not(.main-split) > * {
    max-width: calc(1100 * var(--u));
  }
  .app-mail .main:not(.main-split) .page-head {
    margin: calc(6 * var(--u)) 0 calc(12 * var(--u));
  }
  .app-mail .main:not(.main-split) .page-title {
    margin: 0;
    color: var(--ink);
    font-size: calc(24 * var(--u));
    font-weight: 600;
    line-height: calc(33 * var(--u));
  }
  .app-mail .main:not(.main-split) .card {
    padding: calc(16 * var(--u)) calc(20 * var(--u));
    border-color: var(--panel-line);
    border-top-color: var(--panel-top);
    border-radius: calc(14 * var(--u));
    box-shadow: none;
  }
  .app-mail .main:not(.main-split) .card + .card {
    margin-top: calc(12 * var(--u));
  }
  .app-mail .main:not(.main-split) h2 {
    font-size: calc(20 * var(--u));
  }
  .app-mail .main:not(.main-split) h3 {
    font-size: calc(18 * var(--u));
  }
  .app-mail .main:not(.main-split) .input,
  .app-mail .main:not(.main-split) .btn,
  .app-mail .main:not(.main-split) label,
  .app-mail .main:not(.main-split) th,
  .app-mail .main:not(.main-split) td {
    font-size: calc(16.5 * var(--u));
  }
  .app-mail .main:not(.main-split) .input {
    padding: calc(7 * var(--u)) calc(11 * var(--u));
    border-radius: calc(10 * var(--u));
  }
  .app-mail .main:not(.main-split) .btn {
    padding: calc(6 * var(--u)) calc(14 * var(--u));
    border-radius: calc(10 * var(--u));
  }
  .app-mail .main:not(.main-split) .btn-small {
    padding: calc(4 * var(--u)) calc(10 * var(--u));
    font-size: calc(15 * var(--u));
  }
  .app-mail .main:not(.main-split) .small,
  .app-mail .main:not(.main-split) .muted.small {
    font-size: calc(15 * var(--u));
  }
  .app-mail .main:not(.main-split) .message-link {
    font-size: calc(16.5 * var(--u));
  }

  /* -- menus and questions: the same scale -- */
  .app-mail .menu,
  .app-mail ~ .menu,
  .menu {
    padding: calc(6 * var(--u));
    border-radius: calc(12 * var(--u));
    font-size: calc(16.5 * var(--u));
  }
  .app-mail .menu-title {
    padding: calc(5 * var(--u)) calc(10 * var(--u)) calc(6 * var(--u));
    color: var(--ink-3);
    font-size: calc(15 * var(--u));
  }
  .app-mail .menu-item {
    gap: calc(10 * var(--u));
    padding: calc(6 * var(--u)) calc(10 * var(--u));
    border-radius: calc(8 * var(--u));
    color: var(--ink);
    font-size: calc(16.5 * var(--u));
  }
  .app-mail .menu-item .icon {
    width: calc(19 * var(--u));
    height: calc(19 * var(--u));
  }
  .app-mail .modal {
    border-radius: calc(15 * var(--u));
    font-size: calc(16.5 * var(--u));
  }
  .app-mail .modal .input,
  .app-mail .modal .btn {
    font-size: calc(16.5 * var(--u));
  }
  .app-mail .notice {
    padding: calc(8 * var(--u)) calc(13 * var(--u));
    border-radius: calc(10 * var(--u));
    font-size: calc(15.5 * var(--u));
  }
  .app-mail .read-bottom {
    display: none;
  }
}

/* A narrower window shows the list or the conversation, not both: each is
   then the one panel, with room at its sides. */
@media (min-width: 761px) and (max-width: 1000px) {
  .app-mail .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .app-mail .list-pane,
  .app-mail .read-pane {
    margin: 0 calc(10 * var(--u)) 0 0;
  }
  .app-mail .read-toolbar .read-back {
    display: grid;
  }
}

/* ---- Phones: their own layout, in these colours --------------------------- */

@media (max-width: 760px) {
  .app-mail .topbar {
    background: var(--panel);
  }
  .menu-account {
    display: none;
  }
  /* The drawer is the side bar: violet, with the mark on top. */
  .app-mail .sidebar {
    border-right: 0;
    background:
      radial-gradient(240px 96px at 100% 0, var(--glow-phone), transparent 100%), var(--side);
  }
  .app-mail .side-brand {
    display: flex;
    align-items: center;
    flex: none;
    gap: 10px;
    margin: 4px 6px 12px 8px;
    color: var(--side-ink);
    font-size: 22px;
    font-weight: 600;
    text-decoration: none;
  }
  .app-mail .side-mark {
    flex: none;
    width: 30px;
    height: 32px;
  }
  .app-mail .side-account {
    border-bottom-color: var(--side-rule);
  }
  .app-mail .side-address,
  .app-mail .drawer-close {
    color: var(--side-ink);
  }
  .app-mail .nav-write {
    flex: none;
    height: 48px;
    margin: 12px 2px 10px;
    font-size: 16px;
  }
  .app-mail .nav-write .icon {
    color: #ffffff;
  }
  .app-mail .nav-rule {
    display: block;
    flex: none;
    height: 1px;
    margin: 10px 8px 0;
    border: 0;
    background: var(--side-rule);
  }
  .app-mail .nav-heading {
    display: flex;
    margin: 10px 2px 2px 14px;
    font-size: 14px;
  }
  .app-mail .nav-add {
    width: 38px;
    height: 38px;
  }
  .app-mail .sidebar .nav-link.active {
    box-shadow: inset 0 1px 0 var(--side-active-edge);
  }
  .app-mail .side-storage {
    display: flex;
    flex: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin: 14px 4px 10px;
    padding: 0 10px;
    color: var(--side-ink);
    font-size: 14px;
    text-decoration: none;
  }
  .app-mail .side-storage p {
    flex: 1;
    margin: 0;
  }
  .app-mail .side-meter {
    flex-basis: 100%;
    height: 10px;
    overflow: hidden;
    border-radius: 6px;
    background: var(--side-meter);
  }
  .app-mail .side-meter i {
    display: block;
    height: 100%;
    border-radius: 6px;
    background: var(--side-meter-fill);
  }
  .app-mail .side-meter.nearly i {
    background: linear-gradient(90deg, #f59e0b, #f97316);
  }
  .app-mail .drawer-foot {
    border-top-color: var(--side-rule);
  }
  .app-mail .fab {
    background: var(--primary);
    box-shadow: 0 6px 20px var(--accent-glow);
  }
}
