/* ==========================================================================
   Stingray Bookkeeping client login, version 3: the shared look.
   One set of pages, four looks, switched with data-theme on <html>:
     aurora           Northern lights   (the default, also when no theme is set)
     nightsky         Night sky
     engraved-dark    Engraved night
     engraved-cream   Engraved cream
   How to use every piece: read KIT.md.

   Contents
     1  The four looks (colors, fonts, art)
     2  Base and reading rules
     3  The page: sky, header, phone bar, layout
     4  Panels and engravings
     5  Words: headings, quiet text, figures, rows, stamp
     6  Buttons
     7  Form fields
     8  Small pieces: ring, icons, notices, empty state, tag, lists, files, talk, dates,
        table, code box, letter
     9  Pop-ups and the look chooser
    10  Printing
   ========================================================================== */


/* ==========================================================================
   1  THE FOUR LOOKS
   Every look sets the same list of names. Pieces further down only use the
   names, so a new piece works in all four looks without knowing them.
   ========================================================================== */

:root,
[data-theme="aurora"] {
  color-scheme: dark;

  /* fonts */
  --serif: "Source Serif 4", "Source Serif 4 Plain", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-greet: var(--serif);
  --font-head: var(--serif);
  --font-fig: var(--serif);
  --font-body: var(--serif);
  --font-ui: var(--serif);
  --font-brand: var(--serif);
  --w-greet: 630;
  --w-head: 540;
  --w-fig: 660;
  --w-strong: 680;
  --w-ui: 460;
  --w-brand: 440;
  --w-menu: 420;
  --w-menu-on: 600;
  --body-track: 0;
  /* Button words by kind. Light words on a dark button draw heavier than the same weight in dark
     words on a light button, so each kind gets its own weight: 1 main, 2 second, 3 deep, 4 gold. */
  --w-btn1: 600;
  --w-btn2: 400;
  --w-btn3: 400;
  --w-btn4: 600;
  --menu-case: none;
  --menu-track: 0;
  --menu-size: 1.1875rem;
  --greet-track: .012em;
  --h2-size: 1.75rem;
  --h2-track: -.006em;
  --fig-align: left;
  --fig-size: 2.625rem;
  --fig-label: 1.4375rem;
  --btn-h: 56px;
  --field-h: 56px;
  --btn-icon: 28px;
  --btn-icon-line: 1.7;
  --head-icon: 44px;
  --head-icon-line: 1.5;
  --mark-line: 2px;
  --mark-w: 500;

  /* the page */
  --page: #050f1a;
  --sky-art-wide: url("art/aurora-wide.jpg");
  --sky-art-tall: url("art/aurora-tall.jpg");
  --sky-base: radial-gradient(60% 46% at 82% 4%, rgba(64, 224, 168, .34), rgba(64, 224, 168, 0) 72%), radial-gradient(44% 60% at 100% 22%, rgba(39, 166, 184, .26), rgba(39, 166, 184, 0) 70%), radial-gradient(70% 30% at 60% 62%, rgba(255, 197, 110, .10), rgba(255, 197, 110, 0) 70%), linear-gradient(180deg, #040b15 0%, #0a2030 56%, #0d2434 70%, #050e18 100%);
  --sky-pos: left 64%;
  --sky-wider: 16%;
  --sky-veil: linear-gradient(180deg, rgba(3, 9, 16, .22) 0, rgba(3, 9, 16, 0) 18%), linear-gradient(0deg, rgba(3, 9, 16, .18), rgba(3, 9, 16, 0) 26%);
  --greet-plate: radial-gradient(closest-side, rgba(3, 9, 16, .58), rgba(3, 9, 16, .44) 62%, rgba(3, 9, 16, 0));
  /* The header has two states. At rest (the page at its top) the sky runs behind it, as in the
     owner's picture. Once the page has moved under it, it turns dense so no words show through. */
  --top-bg: linear-gradient(180deg, rgba(3, 10, 18, .62), rgba(3, 10, 18, .36));
  --top-filter: blur(10px);
  --top-bg-moved: linear-gradient(180deg, rgba(3, 10, 18, .94), rgba(3, 10, 18, .88));
  --top-filter-moved: blur(18px);
  --top-line: rgba(190, 225, 235, .16);
  --bar-bg: #040d16;
  --bar-line: rgba(190, 225, 235, .16);
  --bar-ink: #dbe4e8;
  --bar-on: #8fdcd5;
  --shade: rgba(2, 7, 13, .74);

  /* panels */
  --panel-bg: linear-gradient(180deg, rgba(22, 39, 54, .62), rgba(14, 29, 43, .68));
  --panel-bg-plain: linear-gradient(180deg, rgba(20, 38, 53, .93), rgba(13, 29, 43, .95));
  --panel-line: rgba(196, 230, 240, .20);
  --panel-radius: 14px;
  --panel-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 28px 60px -28px rgba(0, 0, 0, .78), 0 2px 10px rgba(0, 0, 0, .22);
  --panel-filter: blur(5px) saturate(1.15);
  --pop-bg: #0c2233;
  --box-bg: rgba(7, 20, 31, .34);
  --engrave-lake: none;
  --engrave-papers: none;
  --engrave-strength: 0;
  --engrave-papers-strength: 0;

  /* words */
  --ink: #f7f2e8;
  --soft: #dfe7ea;
  --quiet: #c8d5db;
  --rule: rgba(200, 226, 236, .20);
  --line: rgba(200, 228, 238, .38);
  --accent: #f0c577;
  --fig: #f4ca84;
  --fig-rule: rgba(200, 226, 236, .26);
  --focus: #a6ede5;
  --on: #8fdcd5;
  --menu-on-ink: #ffffff;
  --menu-on-line: #dfe7ea;
  --link: #f7f2e8;
  --stamp: #f0c577;

  /* buttons: 1 main, 2 second, 3 deep, 4 the gold Send */
  --btn-radius: 9px;
  --btn-bw: 1px;
  --btn1-bg: linear-gradient(180deg, #8cc7c2 0%, #74b3ae 52%, #68a7a3 100%);
  --btn1-ink: #051b22;
  --btn1-line: rgba(214, 244, 240, .50);
  --btn1-icon: #062028;
  --btn1-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 8px 18px -8px rgba(0, 0, 0, .6);
  --btn2-bg: linear-gradient(180deg, rgba(40, 60, 73, .86), rgba(24, 42, 54, .88));
  --btn2-ink: #f7f2e8;
  --btn2-line: rgba(200, 228, 238, .32);
  --btn2-icon: #f0c577;
  --btn2-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
  --btn3-bg: linear-gradient(180deg, #44727b 0%, #38626b 52%, #315860 100%);
  --btn3-ink: #ffffff;
  --btn3-line: rgba(176, 226, 226, .50);
  --btn3-icon: #ffffff;
  --btn3-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 8px 18px -8px rgba(0, 0, 0, .6);
  --btn4-bg: linear-gradient(180deg, #edc98a 0%, #e0b778 50%, #d2a560 100%);
  --btn4-ink: #2b1c06;
  --btn4-line: rgba(255, 238, 196, .6);
  --btn4-icon: #2b1c06;
  --btn4-shadow: inset 0 1px 0 rgba(255, 255, 255, .42), 0 8px 18px -8px rgba(0, 0, 0, .6);
  --picked-ring: #f7f2e8;

  /* fields */
  --field-bg: rgba(33, 50, 62, .72);
  --field-ink: #f7f2e8;
  --field-line: rgba(200, 228, 238, .42);
  --tick-bg: #74b3ae;
  --tick-ink: #062028;

  /* ring and notices */
  --ring-line: #f0c577;
  --ring-ink: #f0c577;
  --ring-bg: rgba(240, 197, 119, .06);
  --good: #9be5bd;
  --good-bg: rgba(74, 190, 136, .14);
  --good-line: rgba(124, 220, 170, .55);
  --warn: #f1cb88;
  --warn-bg: rgba(231, 188, 114, .13);
  --warn-line: rgba(231, 188, 114, .6);
  --bad: #ffb9ad;
  --bad-bg: rgba(226, 96, 80, .16);
  --bad-line: rgba(255, 160, 146, .65);
}

[data-theme="nightsky"] {
  color-scheme: dark;
  --font-greet: var(--serif);
  --font-head: var(--sans);
  --font-fig: var(--sans);
  --font-body: var(--sans);
  --font-ui: var(--sans);
  --font-brand: var(--sans);
  --body-track: .012em;
  --w-greet: 740;
  --w-head: 580;
  --w-fig: 700;
  --w-strong: 650;
  --w-ui: 440;
  --w-brand: 400;
  --w-menu: 500;
  --w-menu-on: 640;
  --w-btn1: 640;
  --w-btn2: 440;
  --w-btn3: 640;
  --w-btn4: 640;
  --menu-case: uppercase;
  --menu-track: .07em;
  --menu-size: 1rem;
  --greet-track: .012em;
  --h2-size: 1.875rem;
  --h2-track: .012em;
  --fig-align: left;
  --fig-size: 2.625rem;
  --fig-label: 1.5625rem;
  --btn-h: 56px;
  --field-h: 56px;
  --btn-icon: 28px;
  --btn-icon-line: 1.7;
  --head-icon: 36px;
  --head-icon-line: 1.7;
  --mark-line: 2px;
  --mark-w: 500;

  --page: #071421;
  --sky-art-wide: url("art/nightsky-wide.jpg");
  --sky-art-tall: url("art/nightsky-tall.jpg");
  --sky-base: radial-gradient(90% 60% at 90% 0%, rgba(47, 180, 160, .14), rgba(7, 20, 33, 0) 70%), linear-gradient(180deg, #06111e 0%, #0b1f31 60%, #071421 100%);
  --sky-pos: center 85%;
  --sky-wider: 0%;
  --sky-veil: linear-gradient(180deg, rgba(4, 11, 20, .40) 0, rgba(4, 11, 20, 0) 20%), linear-gradient(0deg, rgba(4, 11, 20, .30), rgba(4, 11, 20, 0) 26%);
  --greet-plate: radial-gradient(closest-side, rgba(4, 11, 20, .62), rgba(4, 11, 20, .46) 62%, rgba(4, 11, 20, 0));
  --top-bg: linear-gradient(180deg, rgba(6, 17, 29, .58), rgba(6, 17, 29, .30));
  --top-filter: none;
  --top-bg-moved: #06111d;
  --top-filter-moved: none;
  --top-line: rgba(170, 205, 222, .20);
  --bar-bg: #050e18;
  --bar-line: rgba(170, 205, 222, .18);
  --bar-ink: #dbe4e8;
  --bar-on: #84d6cf;
  --shade: rgba(2, 7, 13, .78);

  --panel-bg: rgba(13, 32, 49, .93);
  --panel-bg-plain: rgba(13, 32, 49, .96);
  --panel-line: rgba(160, 198, 216, .24);
  --panel-radius: 6px;
  --panel-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset;
  --panel-filter: none;
  --pop-bg: #0e2233;
  --box-bg: rgba(5, 15, 25, .40);
  --engrave-lake: none;
  --engrave-papers: none;
  --engrave-strength: 0;
  --engrave-papers-strength: 0;

  --ink: #f6f3ec;
  --soft: #dde5e9;
  --quiet: #b9c8d0;
  --rule: rgba(180, 210, 226, .22);
  --line: rgba(180, 212, 228, .40);
  --accent: #e3b55f;
  --fig: #ecc070;
  --fig-rule: rgba(180, 210, 226, .30);
  --focus: #a6ede5;
  --on: #84d6cf;
  --menu-on-ink: #ffffff;
  --menu-on-line: #e3b55f;
  --link: #f6f3ec;
  --stamp: #e3b55f;

  --btn-radius: 5px;
  --btn-bw: 1px;
  --btn1-bg: #6dc6bf;
  --btn1-ink: #062028;
  --btn1-line: #6dc6bf;
  --btn1-icon: #062028;
  --btn1-shadow: none;
  --btn2-bg: rgba(9, 24, 37, .55);
  --btn2-ink: #f6f3ec;
  --btn2-line: rgba(170, 206, 222, .42);
  --btn2-icon: #e3b55f;
  --btn2-shadow: none;
  --btn3-bg: #6dc6bf;
  --btn3-ink: #062028;
  --btn3-line: #6dc6bf;
  --btn3-icon: #062028;
  --btn3-shadow: none;
  --btn4-bg: #e3b55f;
  --btn4-ink: #2b1c06;
  --btn4-line: #e3b55f;
  --btn4-icon: #2b1c06;
  --btn4-shadow: none;
  /* 5: the outlined button, only in this look (see .btn-outline) */
  --btn5-bg: rgba(15, 43, 58, .92);
  --btn5-ink: #f6f3ec;
  --btn5-line: #5fb7b1;
  --btn5-icon: #84d6cf;
  --btn5-shadow: none;
  --w-btn5: 440;
  --picked-ring: #f6f3ec;

  --field-bg: rgba(5, 15, 25, .70);
  --field-ink: #f6f3ec;
  --field-line: rgba(170, 206, 222, .45);
  --tick-bg: #6dc6bf;
  --tick-ink: #062028;

  --ring-line: #e3b55f;
  --ring-ink: #e3b55f;
  --ring-bg: transparent;
  --good: #9be5bd;
  --good-bg: rgba(74, 190, 136, .14);
  --good-line: rgba(124, 220, 170, .55);
  --warn: #f1cb88;
  --warn-bg: rgba(227, 181, 95, .13);
  --warn-line: rgba(227, 181, 95, .6);
  --bad: #ffb9ad;
  --bad-bg: rgba(226, 96, 80, .16);
  --bad-line: rgba(255, 160, 146, .65);
}

/* Both engraved looks share the dark engraved page. Everything that sits on the page itself
   (header, phone bar, a button outside a panel) uses these values in both. */
[data-theme="engraved-dark"],
[data-theme="engraved-cream"] {
  color-scheme: dark;
  --font-greet: var(--serif);
  --font-head: var(--serif);
  --font-fig: var(--serif);
  --font-body: var(--sans);
  --font-ui: var(--sans);
  --font-brand: var(--serif);
  --body-track: 0;
  --w-greet: 650;
  --w-head: 650;
  --w-fig: 700;
  --w-strong: 650;
  --w-ui: 420;
  --w-brand: 400;
  --w-menu: 420;
  --w-menu-on: 560;
  --w-btn1: 420;
  --w-btn2: 420;
  --w-btn3: 420;
  --w-btn4: 420;
  --menu-case: none;
  --menu-track: 0;
  --menu-size: 1.1875rem;
  --greet-track: -.012em;
  --h2-size: 1.9375rem;
  --h2-track: -.006em;
  --fig-align: center;
  --fig-size: 2.875rem;
  --fig-label: 1.4375rem;
  --btn-h: 68px;
  --field-h: 60px;
  --btn-icon: 42px;
  --btn-icon-line: 1.4;
  --head-icon: 36px;
  --head-icon-line: 1.7;
  --mark-line: 3px;
  --mark-w: 600;

  --page: #0a1826;
  --sky-art-wide: url("art/engraved-wide.jpg");
  --sky-art-tall: url("art/engraved-tall.jpg");
  --sky-base: linear-gradient(180deg, #0b1b2c 0%, #0a1826 100%);
  --sky-pos: center top;
  --sky-wider: 0%;
  --sky-veil: linear-gradient(180deg, rgba(6, 15, 25, .30) 0, rgba(6, 15, 25, 0) 30%);
  --greet-plate: none;
  --top-bg: linear-gradient(180deg, rgba(8, 20, 33, .72), rgba(8, 20, 33, .52));
  --top-filter: none;
  --top-bg-moved: #08141f;
  --top-filter-moved: none;
  --top-line: rgba(210, 171, 107, .34);
  --bar-bg: #07121e;
  --bar-line: rgba(210, 171, 107, .38);
  --bar-ink: #e3e9ec;
  --bar-on: #e5bf7c;
  --shade: rgba(3, 9, 16, .80);

  --panel-bg: rgba(9, 24, 39, .94);
  --panel-bg-plain: rgba(9, 24, 39, .96);
  --panel-line: rgba(212, 174, 110, .60);
  --panel-radius: 3px;
  --panel-shadow: 0 0 0 1px rgba(0, 0, 0, .28), 0 22px 44px -24px rgba(0, 0, 0, .75);
  --panel-filter: none;
  --pop-bg: #0a1a2b;
  --box-bg: rgba(5, 15, 26, .30);
  --engrave-lake: url("art/lake-gold.webp");
  --engrave-papers: url("art/papers-gold.webp");
  --engrave-strength: .30;
  --engrave-papers-strength: .50;
  --engrave-phone: .19;

  --ink: #fbf8f2;
  --soft: #e3e9ec;
  --quiet: #bfcdd2;
  --rule: rgba(212, 174, 110, .46);
  --line: rgba(212, 174, 110, .78);
  --accent: #dcb673;
  --fig: #fbf8f2;
  --fig-rule: rgba(212, 174, 110, .80);
  --focus: #9fe3dc;
  --on: #e5bf7c;
  --menu-on-ink: #e9c586;
  --menu-on-line: #dcb673;
  --link: #fbf8f2;
  --stamp: #dcb673;

  --btn-radius: 5px;
  --btn-bw: 2px;
  --btn2-bw: 1.5px;
  --btn1-bg: rgba(13, 32, 51, .86);
  --btn1-ink: #fbf8f2;
  --btn1-line: #efca78;
  --btn1-icon: #e5bf7c;
  --btn1-shadow: inset 0 0 0 1px rgba(3, 9, 16, .55), 0 6px 14px -8px rgba(0, 0, 0, .7);
  --btn2-bg: rgba(8, 21, 35, .60);
  --btn2-ink: #fbf8f2;
  --btn2-line: #cba768;
  --btn2-icon: #e5bf7c;
  --btn2-shadow: none;
  --btn3-bg: rgba(13, 32, 51, .86);
  --btn3-ink: #fbf8f2;
  --btn3-line: #efca78;
  --btn3-icon: #e5bf7c;
  --btn3-shadow: inset 0 0 0 1px rgba(3, 9, 16, .55), 0 6px 14px -8px rgba(0, 0, 0, .7);
  --btn4-bg: rgba(13, 32, 51, .86);
  --btn4-ink: #fbf8f2;
  --btn4-line: #efca78;
  --btn4-icon: #e5bf7c;
  --btn4-shadow: inset 0 0 0 1px rgba(3, 9, 16, .55), 0 6px 14px -8px rgba(0, 0, 0, .7);
  --picked-ring: #fbf8f2;

  --field-bg: rgba(5, 15, 26, .70);
  --field-ink: #fbf8f2;
  --field-line: rgba(212, 174, 110, .80);
  --tick-bg: #dcb673;
  --tick-ink: #0a1826;

  --ring-line: #e8c070;
  --ring-ink: #e5bf7c;
  --ring-bg: transparent;
  --good: #a5e6c2;
  --good-bg: rgba(74, 190, 136, .12);
  --good-line: rgba(124, 220, 170, .55);
  --warn: #f0cd8f;
  --warn-bg: rgba(220, 182, 115, .12);
  --warn-line: rgba(220, 182, 115, .65);
  --bad: #ffbcb1;
  --bad-bg: rgba(226, 96, 80, .16);
  --bad-line: rgba(255, 160, 146, .65);
}

/* Engraved cream: the page stays dark, the panels turn into a cream printed statement.
   The cream values are set on the surfaces themselves, so anything put inside a panel,
   a set or a pop-up gets navy words without knowing about it. */
[data-theme="engraved-cream"] {
  --panel-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .33 0 0 0 0 .18 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E"), linear-gradient(180deg, #fdfaf4, #f9f5ec);
  --panel-bg-plain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .33 0 0 0 0 .18 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E"), linear-gradient(180deg, #fdfaf4, #f9f5ec);
  --panel-line: #c9a368;
  --panel-shadow: 0 0 0 1px rgba(0, 0, 0, .30), 0 24px 46px -22px rgba(0, 0, 0, .80);
  --pop-bg: #fbf8f2;
  --box-bg: rgba(255, 253, 247, .55);
  --engrave-lake: url("art/lake-ink.webp");
  --engrave-papers: url("art/papers-ink.webp");
  --engrave-strength: .80;
  --engrave-papers-strength: .80;
  --engrave-phone: .36;
  /* His cream picture is serif all through: the sentences, the buttons, the menu. That is what
     makes it read like a printed statement. */
  --font-body: var(--serif);
  --font-ui: var(--serif);
  --w-ui: 440;
  --w-menu: 440;
  --w-menu-on: 560;
  --w-btn1: 440;
  --w-btn2: 440;
  --w-btn3: 440;
  --w-btn4: 440;
  --btn2-bw: 1px;
}

[data-theme="engraved-cream"] .panel,
[data-theme="engraved-cream"] .set,
[data-theme="engraved-cream"] .popup-box,
.mini[data-theme="engraved-cream"] .mini-panel,
.letter {
  color-scheme: light;
  --ink: #0a1826;
  --soft: #23323f;
  --quiet: #465665;
  --rule: rgba(160, 122, 56, .50);
  --line: #a9843f;
  --accent: #96702c;
  --fig: #0a1826;
  --fig-rule: #b8914f;
  --focus: #0f6d72;
  --on: #0a1826;
  --link: #0a1826;
  --stamp: #3e5a7a;
  --box-bg: rgba(255, 253, 247, .55);

  --btn1-bg: #0a1826;
  --btn1-ink: #fbf8f2;
  --btn1-line: #c9a368;
  --btn1-icon: #e5bf7c;
  --btn1-shadow: 0 6px 14px -8px rgba(10, 24, 38, .65);
  --btn2-bg: #fffdf8;
  --btn2-ink: #0a1826;
  --btn2-line: #b08a4a;
  --btn2-icon: #0a1826;
  --btn2-shadow: none;
  --btn3-bg: #0a1826;
  --btn3-ink: #fbf8f2;
  --btn3-line: #c9a368;
  --btn3-icon: #e5bf7c;
  --btn3-shadow: 0 6px 14px -8px rgba(10, 24, 38, .65);
  --btn4-bg: #0a1826;
  --btn4-ink: #fbf8f2;
  --btn4-line: #c9a368;
  --btn4-icon: #e5bf7c;
  --btn4-shadow: 0 6px 14px -8px rgba(10, 24, 38, .65);
  --picked-ring: #0a1826;

  --field-bg: #fffefa;
  --field-ink: #0a1826;
  --field-line: #a9843f;
  --tick-bg: #0a1826;
  --tick-ink: #fbf8f2;

  --ring-line: #b08a4a;
  --ring-ink: #0a1826;
  --ring-bg: transparent;
  --good: #0d5f41;
  --good-bg: rgba(20, 122, 82, .09);
  --good-line: rgba(13, 95, 65, .55);
  --warn: #6d4a0c;
  --warn-bg: rgba(201, 163, 104, .18);
  --warn-line: #a9843f;
  --bad: #9a2419;
  --bad-bg: rgba(190, 60, 44, .08);
  --bad-line: rgba(154, 36, 25, .55);
}

/* sizes that follow the screen, the same in every look */
:root {
  --page-max: 1200px;
  --gutter: 40px;
  --gap: 22px;
  --pad: 28px;
  --text: 1.25rem;
  --text-quiet: 1.125rem;
  --text-btn: 1.25rem;
  --press: 56px;
  --bar-h: 4.75rem;    /* 76px at the usual text size */
}

@media (max-width: 699px) {
  :root {
    --gutter: 16px;
    --gap: 16px;
    --pad: 20px;
    --text: 1.1875rem;
    --text-quiet: 1.125rem;
    --text-btn: 1.1875rem;
  }
}

/* The two looks with a sans body (Night sky, Engraved night): Source Sans 3 draws smaller than
   the serif at the same size, so it gets one pixel more to read the same. */
[data-theme="nightsky"],
[data-theme="engraved-dark"] {
  --text: 1.3125rem;
  --text-quiet: 1.1875rem;
  --text-btn: 1.3125rem;
}

@media (max-width: 699px) {
  [data-theme="nightsky"],
  [data-theme="engraved-dark"] {
    --text: 1.25rem;
    --text-quiet: 1.15625rem;
    --text-btn: 1.25rem;
  }

  /* the tall engraved buttons give a little back on a phone */
  [data-theme^="engraved"] {
    --btn-h: 62px;
    --field-h: 58px;
    --btn-icon: 32px;
  }
}

@media (min-width: 1100px) {
  [data-theme="nightsky"] {
    --menu-size: 1.0625rem;
  }
}


/* ==========================================================================
   2  BASE AND READING RULES
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Amounts: lining figures of one width, everywhere. Marked important because the font
   shorthand switches it back to normal on the element that uses it. */
* {
  font-variant-numeric: lining-nums tabular-nums !important;
}

[hidden] {
  display: none !important;
}

/* THE DOOR of a signed-in page (signin group, request 1b). In real mode the door script in the page head
   sets html.guard-wait while PortalApi.guard() checks the sign-in: the header, the page and the phone bar
   stay hidden and only the art shows, so nobody sees a page that is about to send them elsewhere. guard()
   and the page script take the class off. Should that never happen (a script file that did not arrive),
   the page shows itself after 8 seconds anyway, with its own words. */
html.guard-wait .top,
html.guard-wait .page,
html.guard-wait .bar {
  visibility: hidden;
  animation: guard-wait-over 0s linear 8s forwards;
}

@keyframes guard-wait-over {
  to { visibility: visible; }
}

html {
  background: var(--page);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 112px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 400 var(--text)/1.5 var(--font-body);
  letter-spacing: var(--body-track, 0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, p, ul, ol, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

a {
  color: var(--link);
}

b, strong {
  font-weight: var(--w-strong);
}

/* one clear focus ring on everything that can be pressed */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* A line of text that never breaks: amounts, dates, codes. */
.nowrap,
.amt {
  white-space: nowrap;
}

/* For screen readers only. */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Shown in some looks only. */
[data-theme="nightsky"] .aurora-only,
[data-theme^="engraved"] .aurora-only,
[data-theme="aurora"] .engraved-only,
[data-theme="nightsky"] .engraved-only,
:root:not([data-theme]) .engraved-only,
[data-theme^="engraved"] .not-engraved {
  display: none !important;
}

/* Shown only where the window is wide enough for it (from 1280px), or only where it is not.
   "Your account" uses both: a word in the header on a wide window, the first button of the
   foot line everywhere else (phones, tablets, zoomed windows). See KIT.md. */
@media (max-width: 1279px) {
  .wide-only {
    display: none !important;
  }
}

@media (min-width: 1280px) {
  .narrow-only {
    display: none !important;
  }
}

/* "Skip to the page" for keyboard users: off the screen until it has focus. */
.skip {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  min-height: var(--press);
  padding: 0 24px;
  border-radius: 8px;
  background: #f7f2e8;
  color: #0a1826;
  font: 600 1.25rem/1.2 var(--sans);
  text-decoration: none;
  transform: translateY(-300%);
}

.skip:focus {
  transform: none;
}

/* "Skip to the page" moves the keyboard to the page itself (portal.js): no ring around the whole page */
main:focus {
  outline: none;
}


/* ==========================================================================
   3  THE PAGE: SKY, HEADER, PHONE BAR, LAYOUT
   ========================================================================== */

/* The art stays still behind the page while the page scrolls over it.
   Two layers: the art file, and under it a night sky built from plain gradients (deep navy,
   a soft glow top right, darker at the bottom) that shows if the art file does not load.
   The height is capped so a very tall window (the picture tool uses one) shows the art at
   a normal size and fades it out below. */
.sky {
  position: fixed;
  z-index: -1;
  top: 0;
  left: 0;
  right: 0;
  height: min(100vh, max(900px, 78vw));
  overflow: hidden;
  background: var(--page) var(--sky-base) center top / cover no-repeat;
  --sky-fade: clamp(0px, calc((100vh - max(900px, 78vw)) * 100), 260px);
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - var(--sky-fade)), transparent 100%);
  mask-image: linear-gradient(180deg, #000 calc(100% - var(--sky-fade)), transparent 100%);
  pointer-events: none;
}

/* the art file, on its own layer over the built sky (which shows if the file does not load) */
.sky::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--sky-art-tall) center top / cover no-repeat;
}

/* the soft darkening where text sits */
.sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--sky-veil);
}

/* A wide window uses the wide art. Each look says where it is anchored (--sky-pos) and how much
   wider than the window its layer is (--sky-wider):
     Northern lights  16% wider and anchored left, so the lights stand to the RIGHT of the greeting
                      as in his picture 2 (not behind its last words), and pulled up so the town
                      lights land in the gap between the rows
     Night sky        pulled up so the mountain ridge runs through the gap between the rows */
@media (min-width: 768px) {
  .sky::before {
    right: calc(-1 * var(--sky-wider, 0%));
    background-image: var(--sky-art-wide);
    background-position: var(--sky-pos, center top);
  }
}

/* ---- the header ----
   It stays at the top of a computer window. Two states:
     at rest   the page is at its top: the art runs behind the header, as in the owner's pictures
     moved     the page has scrolled under it (portal.js sets html.is-moved): dense, so no words of
               the page show through the menu
   Without script it is always dense. On a phone the header scrolls away with the page, so it
   never has anything under it and always shows the art. */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--top-bg-moved);
  border-bottom: 1px solid var(--top-line);
  -webkit-backdrop-filter: var(--top-filter-moved);
  backdrop-filter: var(--top-filter-moved);
}

html.js:not(.is-moved) .top {
  background: var(--top-bg);
  -webkit-backdrop-filter: var(--top-filter);
  backdrop-filter: var(--top-filter);
}

.top-in {
  display: flex;
  align-items: center;
  gap: 8px 20px;
  max-width: calc(var(--page-max) + 2 * var(--gutter));
  min-height: 88px;
  margin: 0 auto;
  padding: 14px var(--gutter);
}

/* When the row gets tight the name wraps onto two lines first. The brand never gets narrower
   than its longest word: if even that does not fit, the row wraps (see below). So the name can
   never run into the words beside it.
   How: the brand starts from nothing (flex-basis 0), may grow up to the full width of its words
   and not further, and never shrinks under its longest word. */
.brand {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  gap: 18px;
  min-height: var(--press);
  min-width: min-content;
  max-width: max-content;
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
}

/* the round gold-ring mark with the business initials */
.mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 3.5rem;      /* 56px at the usual text size: the ring grows with its letters */
  height: 3.5rem;
  border: var(--mark-line) solid var(--ring-line);
  border-radius: 50%;
  background: var(--ring-bg);
  color: var(--ring-ink);
  font: var(--mark-w) 1.5rem/1 var(--serif);
  letter-spacing: .02em;
}

.brand-name {
  font: var(--w-brand) 1.75rem/1.12 var(--font-brand);
  letter-spacing: -.005em;
}

.menu {
  display: flex;
  gap: 4px;
  margin-left: 18px;
}

.menu a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 17px;
  border-radius: 6px;
  color: var(--soft);
  font: var(--w-menu) var(--menu-size)/1 var(--font-ui);
  letter-spacing: var(--menu-track);
  text-transform: var(--menu-case);
  text-decoration: none;
  white-space: nowrap;
}

.menu a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, .06);
}

.menu a[aria-current="page"] {
  color: var(--menu-on-ink);
  font-weight: var(--w-menu-on);
}

.menu a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: var(--menu-on-line);
}

.top-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

[data-theme^="engraved"] .top-tools {
  padding-left: 14px;
  border-left: 1px solid var(--top-line);
}

/* "Your look" and "Sign out": quiet, but real buttons with words, 48px to press */
.top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  color: var(--soft);
  font: var(--w-menu) 1.125rem/1.1 var(--font-ui);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.top-btn:hover {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, .05);
}

@media (min-width: 1100px) {
  /* the engraved looks carry a larger mark and name, as in his pictures */
  [data-theme^="engraved"] .mark {
    width: 4.25rem;
    height: 4.25rem;
    font-size: 1.9375rem;
  }

  [data-theme^="engraved"] .brand-name {
    font-size: 1.9375rem;
  }
}

@media (min-width: 900px) {
  [data-theme="nightsky"] .top-btn {
    font-size: var(--menu-size);
    letter-spacing: var(--menu-track);
    text-transform: var(--menu-case);
  }
}

/* Night sky sets its menu in capitals, which run wide: a little less air between the words */
@media (min-width: 1100px) {
  [data-theme="nightsky"] .menu a {
    padding: 0 13px;
  }

  [data-theme="nightsky"] .top-btn {
    padding: 0 9px;
  }
}

/* Engraved cream sets its menu in the serif, which runs wide: the same between 1100 and 1279 */
@media (min-width: 1100px) and (max-width: 1279px) {
  [data-theme="engraved-cream"] .menu a {
    padding: 0 12px;
  }
}

/* the first computer layout (900 to 1099): everything a little closer, and the row may wrap
   as a last resort when a business name is very long */
@media (max-width: 1099px) {
  .top-in {
    flex-wrap: wrap;
    gap: 4px 10px;
  }

  .brand { gap: 12px; }
  .mark { width: 3.125rem; height: 3.125rem; font-size: 1.3125rem; }
  .menu { margin-left: 2px; gap: 0; }
  .menu a { padding: 0 9px; }
  .brand-name { font-size: 1.4375rem; }
  .top-btn { padding: 0 6px; }

  [data-theme="nightsky"] .menu a { padding: 0 7px; }
  [data-theme^="engraved"] .top-tools { padding-left: 8px; }
}

/* ---- phone: the top menu gives way to a fixed bar at the bottom ---- */
.bar {
  display: none;
}

@media (max-width: 899px) {
  /* scrolls away with the page: nothing is ever under it, so it always shows the art */
  .top,
  html.js:not(.is-moved) .top,
  html.js.is-moved .top {
    position: relative;
    background: var(--top-bg);
    -webkit-backdrop-filter: var(--top-filter);
    backdrop-filter: var(--top-filter);
  }

  .top-in {
    min-height: 0;
    padding: 10px var(--gutter);
    gap: 4px 8px;
    flex-wrap: wrap;
  }

  .menu {
    display: none;
  }

  .brand {
    flex: 1 1 110px;
    gap: 10px;
    min-height: 48px;
    max-width: none;
  }

  .mark {
    width: 2.75rem;
    height: 2.75rem;
    border-width: 2px;
    font-size: 1.1875rem;
  }

  .brand-name {
    max-width: none;
    font-size: 1.1875rem;
    line-height: 1.16;
  }

  [data-theme^="engraved"] .top-tools {
    padding-left: 0;
    border-left: 0;
  }

  /* "Your look" and "Sign out" keep a clear gap between them: a slip of the thumb must not sign out */
  .top-tools {
    gap: 10px;
  }

  .top-btn {
    padding: 0 5px;
  }

  .bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    background: var(--bar-bg);
    border-top: 1px solid var(--bar-line);
  }

  .bar a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: calc(var(--bar-h) - 12px);
    border-radius: 8px;
    color: var(--bar-ink);
    font: 600 1rem/1.1 var(--sans);
    text-decoration: none;
    text-align: center;
  }

  /* Northern lights: the bar speaks the same serif as the page, as in his picture 2 */
  [data-theme="aurora"] .bar a,
  :root:not([data-theme]) .bar a {
    font-family: var(--serif);
  }

  .bar .icon {
    width: 27px;
    height: 27px;
  }

  .bar a[aria-current="page"] {
    color: var(--bar-on);
    font-weight: 700;
  }

  .bar a[aria-current="page"]::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 24%;
    right: 24%;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--bar-on);
  }

  /* keeps the last line of the page clear of the bar */
  body {
    padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px) + 20px);
  }

  html {
    scroll-padding-top: 16px;
    scroll-padding-bottom: calc(var(--bar-h) + 24px);
  }
}

/* ---- layout ---- */
.page {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  max-width: calc(var(--page-max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 22px var(--gutter) 56px;
}

.page.narrow {
  max-width: calc(760px + 2 * var(--gutter));
}

/* two pieces side by side on a computer, one under the other on a phone */
.duo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gap);
}

.trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}

@media (max-width: 899px) {
  .duo,
  .trio {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* things one under the other with even air between */
.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stack.tight { gap: 6px; }
.stack.loose { gap: 22px; }

/* the greeting at the top of a page. On the two sky looks it sits on the art itself,
   with its own soft darkening behind it that travels with it. */
.greeting {
  position: relative;
  z-index: 0;
  width: fit-content;
  max-width: 100%;
  margin: 2px 0 4px;
  padding: 0 2px;
  color: var(--ink);
  font: var(--w-greet) clamp(2.3125rem, 4.85vw, 4.125rem)/1.08 var(--font-greet);
  letter-spacing: var(--greet-track, -.012em);
  text-shadow: 0 2px 22px rgba(0, 0, 0, .55);
}

/* the soft darkening behind the greeting never reaches past the gutter of the page,
   so it can never make the page scroll sideways */
.greeting::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -34px calc(-1 * var(--gutter)) -30px calc(-1 * var(--gutter));
  background: var(--greet-plate);
  pointer-events: none;
}

/* Northern lights from 600 to 899 wide: the greeting can sit lower (under "Switch business"), right in the
   brightest lights, and its lines run almost from edge to edge. There the darkening behind it is even under
   every word and fades out only in the gutter and the air above and below (home, 12:20 AM item 4). */
@media (min-width: 600px) and (max-width: 899px) {
  [data-theme="aurora"] .greeting::before,
  :root:not([data-theme]) .greeting::before {
    background: linear-gradient(90deg, rgba(3, 9, 16, 0), rgba(3, 9, 16, .6) var(--gutter), rgba(3, 9, 16, .6) calc(100% - var(--gutter)), rgba(3, 9, 16, 0));
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 24px, #000 calc(100% - 20px), transparent);
    mask-image: linear-gradient(180deg, transparent, #000 24px, #000 calc(100% - 20px), transparent);
  }
}

/* the two sky looks: a larger, more confident greeting with more air above it, as in his pictures.
   A line is never longer than "Hello, Dana. 2 things need you.": a longer greeting ("You are all
   caught up.", a long first name) breaks between its sentences instead of running into the lights. */
@media (min-width: 900px) {
  [data-theme="aurora"] .greeting,
  :root:not([data-theme]) .greeting {
    max-width: min(100%, 13.7em);
    margin: 12px 0 8px;
    font-size: clamp(2.5rem, 5.15vw, 4.375rem);
  }

  [data-theme="nightsky"] .greeting {
    max-width: min(100%, 13.9em);
    margin: 12px 0 8px;
    font-size: clamp(2.5rem, 5.35vw, 4.5625rem);
  }
}

/* each sentence of the greeting stays in one piece when the line breaks. A sentence that is
   too long for one line breaks into even lines ("You are all / caught up.", not a lone last word). */
.greeting > span {
  display: inline-block;
  text-wrap: balance;
}

@media (max-width: 699px) {
  .page {
    padding-top: 18px;
  }

  /* follows the width of the phone, so "2 things need you." stays on one line from 360 up */
  .greeting {
    margin: 0 0 2px;
    font-size: clamp(2.0625rem, 9.9vw, 2.4375rem);
    line-height: 1.12;
  }

  .greeting::before {
    inset: -22px -16px -20px -16px;
  }
}

/* a row with "Back" at the top of an inner screen. The button carries its own ground,
   so the row may sit straight on the art.
   <div class="back-row"><a class="btn btn-second btn-inline" href="home.html"><i data-icon="back"></i>Back to home</a></div> */
.back-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

/* one framed card in the middle of the window (sign-in). Use with "framed":
   <main class="page framed center"><section class="panel card"> ... */
.page.center {
  min-height: 100vh;
  justify-content: center;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 40px;
}

.panel.card {
  width: min(100%, 560px);
  padding: 36px 44px 40px;
}

.panel.card.wide {
  width: min(100%, 720px);
}

@media (max-width: 699px) {
  .page.center {
    justify-content: flex-start;
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .panel.card {
    padding: 26px 20px 28px;
  }
}

/* a foot line under the page: quiet buttons on a calm dark band */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  margin-top: 10px;
  padding: 10px 18px;
  border: 1px solid var(--top-line);
  border-radius: var(--panel-radius);
  background: var(--top-bg-moved);
  color: var(--soft);
  font-size: var(--text-quiet);
}

.foot p {
  flex: 1 1 100%;
  padding: 6px 4px;
}


/* ==========================================================================
   4  PANELS AND ENGRAVINGS
   .panel   a piece of the page: frosted dark (aurora), flatter dark (nightsky),
            gold-framed dark (engraved-dark), cream statement (engraved-cream)
   .set     a group of panels. On the two sky looks it is only a wrapper. On the two
            engraved looks the set itself becomes ONE panel and the panels inside
            turn into plain columns with a gold rule between them.
   ========================================================================== */

.panel,
[data-theme^="engraved"] .set {
  position: relative;
  isolation: isolate;
  min-width: 0;
  padding: var(--pad);
  border: 1px solid var(--panel-line);
  border-radius: var(--panel-radius);
  background: var(--panel-bg-plain);
  box-shadow: var(--panel-shadow);
  color: var(--ink);
}

/* frosted glass only where the browser can blur what is behind; otherwise the plainer, denser panel above */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .panel,
  [data-theme^="engraved"] .set {
    background: var(--panel-bg);
    -webkit-backdrop-filter: var(--panel-filter);
    backdrop-filter: var(--panel-filter);
  }
}

.set {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
}

/* On a computer the two sky looks keep their rows a little tighter: the art has to show
   between the rows and under the last one (his pictures leave a strip of snow and spruce). */
@media (min-width: 900px) {
  [data-theme="aurora"],
  [data-theme="nightsky"],
  :root:not([data-theme]) {
    --gap: 20px;
  }

  [data-theme="aurora"] .panel,
  [data-theme="nightsky"] .panel,
  :root:not([data-theme]) .panel {
    padding: 22px 28px;
  }
}

[data-theme^="engraved"] .set {
  gap: 20px;
}

[data-theme^="engraved"] .set .panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

[data-theme^="engraved"] .set .duo {
  gap: 0;
}

[data-theme^="engraved"] .set .duo > * + * {
  margin-left: 30px;
  padding-left: 30px;
  border-left: 1px solid var(--fig-rule);
}

[data-theme^="engraved"] .set .greeting {
  margin: 0;
  font-size: clamp(1.9375rem, 3vw, 2.5625rem);
  text-shadow: none;
}

@media (min-width: 900px) {
  [data-theme^="engraved"] .set .duo > :nth-child(odd) {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }

  [data-theme^="engraved"] .set .duo > :nth-child(n+3) {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--fig-rule);
  }
}

@media (max-width: 899px) {
  [data-theme^="engraved"] .set .duo > * + * {
    margin: 20px 0 0;
    padding: 20px 0 0;
    border-left: 0;
    border-top: 1px solid var(--fig-rule);
  }
}

/* An engraving on the right side of a panel: add has-lake or has-papers.
   Shows in the two engraved looks only. It fades out to the left and stays behind the words.
   The lake sits in the bottom right corner (add art-top to move it to the top right),
   the papers sit in the top right corner. Neither grows past a set size in a tall panel. */
.has-lake::after,
.has-papers::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background-repeat: no-repeat;
  opacity: var(--engrave-strength);
  pointer-events: none;
}

.has-papers::after {
  opacity: var(--engrave-papers-strength, var(--engrave-strength));
}

.has-lake::after {
  background-image: var(--engrave-lake);
  background-position: right -8px bottom -6px;
  background-size: auto min(124%, 250px);
  -webkit-mask-image: linear-gradient(90deg, transparent 38%, #000 66%);
  mask-image: linear-gradient(90deg, transparent 38%, #000 66%);
}

.has-papers::after {
  background-image: var(--engrave-papers);
  background-position: right -34px top -26px;
  background-size: auto min(168%, 290px);
  -webkit-mask-image: linear-gradient(90deg, transparent 46%, #000 78%);
  mask-image: linear-gradient(90deg, transparent 46%, #000 78%);
}

.has-lake.art-top::after {
  background-position: right -8px top -14px;
}

/* quiet words in a panel with an engraving are set a little stronger, so they still read
   where a line of the drawing runs behind them */
[data-theme="engraved-dark"] .has-lake,
[data-theme="engraved-dark"] .has-papers {
  --quiet: #d2dde1;
}

[data-theme="engraved-cream"] .has-lake,
[data-theme="engraved-cream"] .has-papers {
  --quiet: #34434f;
}

/* Words and engravings: keep quiet text out from under an engraving. On a computer the
   engraving takes the right side of its panel; clear-art keeps a long line to the left of it.
   On a phone the engraving is small and sits in the top right corner under the heading, so
   clear-art does nothing there: keep quiet text out of the first 190px of such a panel. */
@media (min-width: 900px) {
  [data-theme^="engraved"] .clear-art {
    max-width: 56%;
  }
}

/* phone: smaller and fainter, tucked into the right edge under the heading, clear of the amounts */
@media (max-width: 899px) {
  .has-lake::after,
  .has-papers::after {
    opacity: var(--engrave-phone, 0);
  }

  .has-lake::after {
    background-position: right -52px top 58px;
    background-size: auto 132px;
    -webkit-mask-image: linear-gradient(90deg, transparent 52%, #000 88%);
    mask-image: linear-gradient(90deg, transparent 52%, #000 88%);
  }

  .has-papers::after {
    background-position: right -84px top -52px;
    background-size: auto 220px;
    -webkit-mask-image: linear-gradient(90deg, transparent 58%, #000 92%);
    mask-image: linear-gradient(90deg, transparent 58%, #000 92%);
  }
}

/* The two engraved looks on a phone: ONE continuous sheet from edge to edge, as in his
   pictures, with a thin gold rule between the parts. No separate framed cards, no dark gutters.
   A page that must keep its frame on a phone (the sign-in card) says class="page framed". */
@media (max-width: 699px) {
  [data-theme^="engraved"] .page:not(.framed) {
    gap: 0;
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
  }

  [data-theme^="engraved"] .page:not(.framed) .duo,
  [data-theme^="engraved"] .page:not(.framed) .trio {
    gap: 0;
  }

  [data-theme^="engraved"] .page:not(.framed) .panel,
  [data-theme^="engraved"] .page:not(.framed) .set {
    padding: 24px 16px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  [data-theme^="engraved"] .page:not(.framed) .set .panel {
    padding: 0;
  }

  /* inside a set the second piece keeps its gold rule above it ("A receipt is missing" under the charge) */
  [data-theme^="engraved"] .page:not(.framed) .set .duo > * + * {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--fig-rule);
  }

  /* the rule between two parts: inset from both edges, like a ruled line on paper */
  [data-theme^="engraved"] .page:not(.framed) .panel::before,
  [data-theme^="engraved"] .page:not(.framed) .set::before {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    top: 0;
    height: 1px;
    background: var(--fig-rule);
  }

  [data-theme^="engraved"] .page:not(.framed) > .panel:first-child::before,
  [data-theme^="engraved"] .page:not(.framed) > .set:first-child::before,
  [data-theme^="engraved"] .page:not(.framed) .set .panel::before {
    content: none;
  }

  /* whatever is not a part of the sheet (a Back row, a greeting, the foot line) keeps the
     gutter and gets air above and below */
  [data-theme^="engraved"] .page:not(.framed) > :not(.panel):not(.set):not(.duo):not(.trio) {
    margin: 14px 16px;
  }

  [data-theme^="engraved"] .page:not(.framed) > .foot {
    margin-top: 20px;
  }
}

/* a framed box inside a panel ("Who paid you" inside the weekly statement) */
.box {
  min-width: 0;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background: var(--box-bg, transparent);
}

@media (max-width: 699px) {
  .box {
    padding: 16px 16px;
  }
}

/* a hairline inside a panel */
.rule {
  height: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--rule);
}


/* ==========================================================================
   5  WORDS: HEADINGS, QUIET TEXT, FIGURES, ROWS, STAMP
   ========================================================================== */

.h1 {
  font: var(--w-greet) clamp(1.9375rem, 3vw, 2.5625rem)/1.14 var(--font-greet);
  letter-spacing: -.012em;
}

.h2 {
  font: var(--w-head) var(--h2-size)/1.2 var(--font-head);
  letter-spacing: var(--h2-track, -.006em);
}

.h3 {
  font: var(--w-head) 1.4375rem/1.25 var(--font-head);
}

@media (max-width: 699px) {
  .h1 { font-size: 1.875rem; }
  .h2 { font-size: 1.5625rem; }
  .h3 { font-size: 1.3125rem; }

  /* the sans headings of Night sky draw smaller than the serif at the same size */
  [data-theme="nightsky"] .h2 { font-size: 1.625rem; }
}

.lead {
  font-size: 1.375rem;
  line-height: 1.42;
}

@media (max-width: 699px) {
  .lead { font-size: 1.25rem; }
}

/* quiet text: smaller, but never grey on grey */
.quiet {
  color: var(--quiet);
  font-size: var(--text-quiet);
  line-height: 1.45;
}

.soft {
  color: var(--soft);
}

/* a heading with a gold line icon in front of it */
.head-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.head-row > .icon {
  width: var(--head-icon, 36px);
  height: var(--head-icon, 36px);
  stroke-width: var(--head-icon-line, 1.7);
  color: var(--accent);
}

@media (max-width: 699px) {
  .head-row {
    gap: 12px;
  }

  .head-row > .icon {
    width: 34px;
    height: 34px;
    stroke-width: 1.7;
  }
}

/* ---- statement figures: a big amount with its small label ("came in") ---- */
.figs {
  display: flex;
  align-items: stretch;
}

.fig {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2px clamp(22px, 3.8vw, 52px) 2px 0;
  text-align: var(--fig-align);
}

.fig + .fig {
  padding-left: clamp(20px, 3.5vw, 48px);
  border-left: 1px solid var(--fig-rule);
}

.fig-n {
  color: var(--fig);
  font: var(--w-fig) var(--fig-size, 2.625rem)/1.1 var(--font-fig);
  letter-spacing: -.008em;
  white-space: nowrap;
}

.fig-l {
  margin-top: 1px;
  font-size: var(--fig-label, 1.4375rem);
  line-height: 1.25;
}

/* engraved: a gold rule to the left of every figure, label centered under it */
[data-theme^="engraved"] .fig {
  padding: 4px clamp(18px, 2.5vw, 34px);
  border-left: 1px solid var(--fig-rule);
}

/* one figure standing alone, larger ("In the bank on Oct 11") */
.fig-n.big {
  font-size: 3.5rem;
}

/* narrow windows: the figures go one under the other, amount on the left, label on the right */
@media (max-width: 899px) {
  .figs {
    flex-direction: column;
  }

  .fig,
  .fig + .fig,
  [data-theme^="engraved"] .fig {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 2px 16px;
    padding: 11px 0;
    border-left: 0;
    border-top: 1px solid var(--rule);
    text-align: left;
  }

  [data-theme^="engraved"] .fig {
    padding-left: 14px;
    border-left: 1px solid var(--fig-rule);
    border-top: 0;
  }

  .fig:first-child {
    border-top: 0;
    padding-top: 4px;
  }

  .fig-n {
    font-size: 2.375rem;
  }

  .fig-l {
    margin-top: 0;
  }
}

@media (max-width: 899px) {
  .fig-l {
    font-size: 1.3125rem;
  }
}

@media (max-width: 699px) {
  .fig-n {
    font-size: 2rem;
  }

  .fig-l {
    font-size: 1.1875rem;
  }

  .fig-n.big {
    font-size: 2.5rem;
  }
}

/* ---- ruled rows: a name on the left, an amount on the right ---- */
.rows {
  display: block;
}

.row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 22px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
}

.row:last-child {
  border-bottom: 0;
}

.row > :first-child {
  min-width: 0;
}

.row .amt {
  flex: none;
  text-align: right;
}

.row.total {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  font-weight: var(--w-strong);
}

/* a row that can be pressed */
a.row,
button.row {
  align-items: center;
  width: 100%;
  min-height: var(--press);
  background: none;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

a.row:hover,
button.row:hover {
  border-bottom-color: var(--line);
}

/* ---- the "Checked" stamp ---- */
.stamp {
  display: inline-block;
  padding: 3px 16px 5px;
  border: 2px solid var(--stamp);
  border-radius: 7px;
  outline: 1px solid var(--stamp);
  outline-offset: 3px;
  color: var(--stamp);
  font: italic 600 1.4375rem/1.2 var(--serif);
  letter-spacing: .02em;
  white-space: nowrap;
  transform: rotate(-7deg);
}

@media (max-width: 699px) {
  .stamp { font-size: 1.25rem; }
}


/* ==========================================================================
   6  BUTTONS
   .btn + one of: btn-main, btn-second, btn-deep, btn-gold, btn-quiet
   Add an icon in front with <i data-icon="camera"></i> before the words.
   On a phone every button is as wide as its box, except with btn-inline.
   ========================================================================== */

.btn {
  --b-bg: var(--btn2-bg);
  --b-ink: var(--btn2-ink);
  --b-line: var(--btn2-line);
  --b-icon: var(--btn2-icon);
  --b-shadow: var(--btn2-shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: var(--btn-h, var(--press));
  padding: 9px 26px;
  border: var(--btn-bw) solid var(--b-line);
  border-radius: var(--btn-radius);
  background: var(--b-bg);
  box-shadow: var(--b-shadow);
  color: var(--b-ink);
  font: var(--b-w, var(--w-ui)) var(--text-btn)/1.2 var(--font-ui);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: filter .12s ease, transform .12s ease, border-color .12s ease;
}

.btn:hover {
  filter: brightness(1.09);
}

.btn:active {
  transform: translateY(1px);
  filter: brightness(.96);
}

.btn .icon {
  width: var(--btn-icon, 28px);
  height: var(--btn-icon, 28px);
  stroke-width: var(--btn-icon-line, 1.7);
  color: var(--b-icon);
}

/* the small arrow after the words ("Open the full report >") stays small in every look */
.btn .icon.small {
  width: 22px;
  height: 22px;
  stroke-width: 1.9;
}

.btn-main {
  --b-bg: var(--btn1-bg);
  --b-ink: var(--btn1-ink);
  --b-line: var(--btn1-line);
  --b-icon: var(--btn1-icon);
  --b-shadow: var(--btn1-shadow);
  --b-w: var(--w-btn1);
}

.btn-second {
  --b-bg: var(--btn2-bg);
  --b-ink: var(--btn2-ink);
  --b-line: var(--btn2-line);
  --b-icon: var(--btn2-icon);
  --b-shadow: var(--btn2-shadow);
  --b-w: var(--w-btn2);
}

/* second buttons carry a thinner line than main ones */
.btn-second {
  border-width: var(--btn2-bw, 1px);
}

.btn-deep {
  --b-bg: var(--btn3-bg);
  --b-ink: var(--btn3-ink);
  --b-line: var(--btn3-line);
  --b-icon: var(--btn3-icon);
  --b-shadow: var(--btn3-shadow);
  --b-w: var(--w-btn3);
}

.btn-gold {
  --b-bg: var(--btn4-bg);
  --b-ink: var(--btn4-ink);
  --b-line: var(--btn4-line);
  --b-icon: var(--btn4-icon);
  --b-shadow: var(--btn4-shadow);
  --b-w: var(--w-btn4);
}

/* The button that opens something next to figures ("Open the full report").
   Night sky draws it as a teal outline (his picture 1); the other looks draw it like btn-deep. */
.btn-outline {
  --b-bg: var(--btn5-bg, var(--btn3-bg));
  --b-ink: var(--btn5-ink, var(--btn3-ink));
  --b-line: var(--btn5-line, var(--btn3-line));
  --b-icon: var(--btn5-icon, var(--btn3-icon));
  --b-shadow: var(--btn5-shadow, var(--btn3-shadow));
  --b-w: var(--w-btn5, var(--w-btn3));
}

/* a quiet text-button: underlined words, still 48px to press */
.btn-quiet {
  min-height: 48px;
  padding: 8px 10px;
  border-color: transparent;
  background: none;
  box-shadow: none;
  color: var(--link);
  font-weight: var(--w-ui);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.btn-quiet .icon {
  width: 28px;
  height: 28px;
  stroke-width: 1.7;
  color: var(--accent);
}

.btn-quiet:hover {
  filter: none;
  border-color: var(--line);
}

/* the answer that was picked: a strong ring around it */
.btn[aria-pressed="true"] {
  box-shadow: 0 0 0 3px var(--picked-ring);
}

/* a button that cannot be pressed yet: dashed, same readable words, a reason next to it */
.btn[disabled],
.btn[aria-disabled="true"] {
  background: var(--btn2-bg);
  border-style: dashed;
  border-color: var(--line);
  box-shadow: none;
  color: var(--quiet);
  cursor: not-allowed;
  filter: none;
  transform: none;
}

/* a button that is busy: keeps its colors, shows a small turning ring, cannot be pressed twice.
   <button class="btn btn-main is-busy" disabled>Sending</button> */
.btn.is-busy,
.btn.is-busy[disabled] {
  background: var(--b-bg);
  border-style: solid;
  border-color: var(--b-line);
  box-shadow: var(--b-shadow);
  color: var(--b-ink);
  cursor: progress;
}

.btn.is-busy::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-turn .9s linear infinite;
}

@keyframes btn-turn {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .btn.is-busy::before {
    animation: none;
  }
}

.btn.full {
  width: 100%;
}

.btn.big {
  min-height: 64px;
  font-size: 1.375rem;
}

/* a row of buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.actions.spread > .btn {
  flex: 1 1 auto;
}

.actions.end {
  justify-content: flex-end;
}

@media (max-width: 699px) {
  .btn:not(.btn-inline) {
    width: 100%;
  }

  .btn {
    padding-left: 16px;
    padding-right: 16px;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* A link inside a sentence. The padding gives it 48px to press without moving the lines, and
   it lies on top of the lines above and below it, so all of that height really takes a press. */
.link {
  position: relative;
  z-index: 1;
  padding: 14px 2px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--link);
  font: inherit;
  font-weight: var(--w-ui);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  cursor: pointer;
}

.link:hover {
  text-decoration-thickness: 2px;
}


/* ==========================================================================
   7  FORM FIELDS
   <div class="field">
     <label class="label" for="x">Email</label>
     <input class="input" id="x" type="email">
     <p class="help">Help text</p>
     <p class="error" hidden>What is wrong, in plain words</p>
   </div>
   ========================================================================== */

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.label {
  font: 600 var(--text)/1.3 var(--font-ui);
  color: var(--ink);
}

.input {
  display: block;
  width: 100%;
  min-height: var(--field-h, var(--press));
  padding: 12px 16px;
  border: 1px solid var(--field-line);
  border-radius: var(--btn-radius);
  background: var(--field-bg);
  color: var(--field-ink);
  font: 400 var(--text)/1.35 var(--font-body);
}

.input::placeholder {
  color: var(--quiet);
  opacity: 1;
}

textarea.input {
  min-height: 132px;
  resize: vertical;
}

/* a list to pick from: its own small arrow, drawn in the field's ink */
select.input {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 50px;
  background-image: linear-gradient(45deg, transparent 50%, var(--field-ink) 50%), linear-gradient(135deg, var(--field-ink) 50%, transparent 50%);
  background-position: right 24px center, right 16px center;
  background-size: 8px 8px, 8px 8px;
  background-repeat: no-repeat;
  cursor: pointer;
}

select.input option {
  background: var(--pop-bg);
  color: var(--ink);
}

.input:focus-visible {
  outline-offset: 1px;
}

.input.is-wrong,
.input[aria-invalid="true"] {
  border-color: var(--bad-line);
  box-shadow: 0 0 0 1px var(--bad-line);
}

/* a box that is filled in for the person and cannot be changed (the email of a welcome letter).
   Say in one plain line under it why. */
.input[readonly] {
  border-style: dashed;
  background: none;
  cursor: default;
}

.help {
  color: var(--quiet);
  font-size: var(--text-quiet);
  line-height: 1.45;
}

.error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--bad);
  font-size: var(--text-quiet);
  font-weight: 600;
  line-height: 1.4;
}

.error .icon {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 1px;
}

/* a tick box with its sentence: the whole row can be pressed */
.tick {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 48px;
  padding: 9px 0;
  cursor: pointer;
}

.tick input {
  -webkit-appearance: none;
  appearance: none;
  display: grid;
  place-content: center;
  flex: none;
  width: 30px;
  height: 30px;
  margin: 0;
  border: 1.5px solid var(--field-line);
  border-radius: 5px;
  background: var(--field-bg);
  cursor: pointer;
}

.tick input::before {
  content: "";
  width: 18px;
  height: 18px;
  background: var(--tick-ink);
  clip-path: polygon(13% 50%, 4% 61%, 38% 93%, 97% 23%, 87% 13%, 37% 72%);
  transform: scale(0);
}

.tick input:checked {
  border-color: var(--tick-bg);
  background: var(--tick-bg);
}

.tick input:checked::before {
  transform: scale(1);
}

.tick input[type="radio"] {
  border-radius: 50%;
}

.tick input[type="radio"]::before {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  clip-path: none;
}

/* a code: one wide box ... */
.input.code {
  min-height: 64px;
  font: var(--w-fig) 1.6875rem/1.2 var(--font-fig);
  letter-spacing: .12em;
  text-align: center;
  text-transform: uppercase;
}

/* ... or six boxes, one number each */
.code-boxes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  max-width: 420px;
}

.code-boxes input {
  width: 100%;
  min-width: 0;
  min-height: 66px;
  padding: 0;
  border: 1px solid var(--field-line);
  border-radius: var(--btn-radius);
  background: var(--field-bg);
  color: var(--field-ink);
  font: var(--w-fig) 1.875rem/1 var(--font-fig);
  text-align: center;
}

@media (max-width: 699px) {
  .code-boxes { gap: 6px; }
  .input.code { font-size: 1.4375rem; letter-spacing: .08em; }
}

/* a box and a button on one line ("Ask us something") */
.send-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.send-row > .input {
  flex: 1 1 auto;
  min-width: 0;
}

.send-row > .btn {
  flex: none;
}

@media (max-width: 699px) {
  .send-row {
    flex-direction: column;
  }

  /* a box with a short button that stays beside it on a phone too (Password and "Show").
     Give the button btn-inline. */
  .send-row.keep {
    flex-direction: row;
  }
}


/* ==========================================================================
   8  SMALL PIECES: RING, ICONS, NOTICES, EMPTY STATE
   ========================================================================== */

/* line icons: write <i data-icon="camera"></i>, portal.js turns it into the drawing */
.icon {
  display: inline-block;
  flex: none;
  width: 1.3em;
  height: 1.3em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -.26em;
}

i[data-icon] {
  display: inline-block;
  flex: none;
  width: 1.3em;
  height: 1.3em;
}

/* the round gold-ring icon holder */
.ring {
  display: grid;
  place-items: center;
  flex: none;
  width: 56px;
  height: 56px;
  border: 2px solid var(--ring-line);
  border-radius: 50%;
  background: var(--ring-bg);
  color: var(--ring-ink);
}

.ring .icon {
  width: 34px;
  height: 34px;
  stroke-width: 1.9;
}

.ring.small {
  width: 44px;
  height: 44px;
}

.ring.small .icon {
  width: 24px;
  height: 24px;
}

.ring.good {
  border-color: var(--good-line);
  color: var(--good);
}

/* the firm's logo (white mark) on its own dark round ground, so it also works on cream:
   <span class="firm-logo"><img src="logo-mark-white.png" alt="Stingray Bookkeeping"></span> */
.firm-logo {
  display: grid;
  place-items: center;
  flex: none;
  width: 96px;
  height: 96px;
  border: 2px solid #c9a368;
  border-radius: 50%;
  background: #0a1826;
}

.firm-logo img {
  width: 70%;
  height: auto;
}

.firm-logo.small {
  width: 56px;
  height: 56px;
}

/* notices: good news, needs attention, error */
.notice {
  --n-ink: var(--accent);
  --n-bg: var(--warn-bg);
  --n-line: var(--warn-line);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--n-line);
  border-left-width: 4px;
  border-radius: 6px;
  background: var(--n-bg);
  color: var(--ink);
}

.notice > .icon {
  width: 28px;
  height: 28px;
  margin-top: 1px;
  color: var(--n-ink);
}

.notice.good {
  --n-ink: var(--good);
  --n-bg: var(--good-bg);
  --n-line: var(--good-line);
}

.notice.warn {
  --n-ink: var(--warn);
  --n-bg: var(--warn-bg);
  --n-line: var(--warn-line);
}

.notice.bad {
  --n-ink: var(--bad);
  --n-bg: var(--bad-bg);
  --n-line: var(--bad-line);
}

/* a calm note that is neither good nor bad news ("For your safety: this code only works with ...") */
.notice.plain {
  --n-ink: var(--accent);
  --n-bg: var(--box-bg, transparent);
  --n-line: var(--line);
}

/* one good-news line without a box */
.thanks {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--ink);
}

.thanks > .icon {
  width: 28px;
  height: 28px;
  margin-top: 1px;
  color: var(--good);
}

/* nothing here yet */
.empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 36px 22px;
  border: 1px dashed var(--line);
  border-radius: var(--panel-radius);
  text-align: center;
}

.empty .ring {
  margin-bottom: 4px;
}

/* ---- a small status tag: <span class="tag good"><i data-icon="check"></i>Filed</span> ---- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 2px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font: 600 var(--text-quiet)/1.2 var(--font-ui);
  /* a short tag stays on one line by itself; a long one ("Placeholder [owner to confirm]") wraps inside the
     window instead of pushing the page sideways on a small phone or at a large browser text size */
  max-width: 100%;
  white-space: normal;
}

.tag .icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.tag.good { border-color: var(--good-line); background: var(--good-bg); color: var(--good); }
.tag.warn { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn); }
.tag.bad { border-color: var(--bad-line); background: var(--bad-bg); color: var(--bad); }

/* ---- lists ----
   <ul class="list"><li>...</li></ul>                      a short list with gold dots
   <ol class="numbered"><li><span class="n" aria-hidden="true">1</span><div>...</div></li></ol>
                                                            steps, each with its number in a ring */
.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list > li {
  position: relative;
  padding-left: 26px;
}

.list > li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.numbered {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.numbered > li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.numbered .n {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid var(--ring-line);
  border-radius: 50%;
  color: var(--ring-ink);
  font: var(--w-fig) 1.25rem/1 var(--font-fig);
}

.numbered > li > :last-child {
  padding-top: 5px;
}

/* a reading page (privacy): even air between paragraphs, more above a heading */
.prose > * + * {
  margin-top: 14px;
}

.prose > .h2,
.prose > .h3 {
  margin-top: 30px;
}

.prose > :first-child {
  margin-top: 0;
}

/* ---- files that were sent ----
   <ul class="files"><li class="file-row">
     <span class="file-icon"><i data-icon="receipt"></i></span>
     <div class="file-words"><b>Fuel receipt</b><span class="quiet">Photo, sent Oct 12</span></div>
     <span class="tag good"><i data-icon="check"></i>Filed</span>
     <button type="button" class="btn btn-second btn-inline"><i data-icon="trash"></i>Remove</button>
   </li></ul> */
.file-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.file-row:last-child {
  border-bottom: 0;
}

.file-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--btn-radius);
  color: var(--accent);
}

.file-icon .icon {
  width: 30px;
  height: 30px;
}

.file-words {
  min-width: 0;
}

.file-words .quiet {
  display: block;
}

/* ---- a paper's photo, big in its list row (decision 468: "Papers they sent" and "What you sent") ----
   PortalApi.watchPreviews gives each <img data-preview> its small copy when it comes near the screen. The frame
   takes the photo's own shape, at most about two thirds of a phone screen, and the whole paper shows (contain).
   Until the photo is there the frame shows the receipt icon; with no photo to show the row goes back to its icon
   (.preview-none, the page's own css). Tap or click it = the same large view as Open. */
.paper-shot {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1.5px solid var(--p3-gold, var(--accent));
  border-radius: 12px;
  background: var(--box-bg);
  color: var(--p3-gold-ink, var(--accent));
  font: inherit;
  text-align: center;
  cursor: zoom-in;
}

button.paper-shot:hover {
  border-color: var(--accent);
}

button.paper-shot:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.paper-shot-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(66vh, 720px);
  object-fit: contain;
}

.paper-shot-img:not([src]) {
  display: none;
}

.paper-shot-icon {
  display: none;
}

.paper-shot-img:not([src]) + .paper-shot-icon {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
}

.paper-shot-icon .icon {
  width: 44px;
  height: 44px;
  stroke-width: 1.4;
}

/* "Tap to zoom" on a phone, "Click to zoom" with a mouse: dark glass on the photo, the same in every look */
.paper-shot-zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 11px;
  border: 1px solid rgba(240, 197, 119, .55);
  border-radius: 999px;
  background: rgba(5, 12, 20, .8);
  color: #f7f2e8;
  font: 600 1.125rem/1.2 var(--sans);
  pointer-events: none;
}

.paper-shot-img:not([src]) ~ .paper-shot-zoom {
  display: none;
}

.paper-shot-zoom .icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  color: #f0c577;
}

.paper-shot-click {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .paper-shot-tap { display: none; }
  .paper-shot-click { display: inline; }
  .paper-shot-zoom { font-size: 1rem; }
}

@media print {
  .paper-shot-zoom { display: none; }
}

@media (max-width: 699px) {
  .file-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .file-row > .tag {
    grid-column: 2;
    justify-self: start;
  }

  .file-row > .btn {
    grid-column: 1 / -1;
  }
}

/* ---- a question and its answer ----
   <div class="talk">
     <p class="talk-q"><span class="quiet">You asked on <span class="nowrap">Oct 6</span></span> Why was fuel so high?</p>
     <p class="talk-a"><span class="quiet">Stingray Bookkeeping, <span class="nowrap">Oct 7</span></span> Two fill-ups ...</p>
   </div> */
.talk {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.talk .quiet {
  display: block;
}

.talk-a {
  padding-left: 18px;
  border-left: 2px solid var(--accent);
}

/* ---- dates: the day in gold, what happens, and a button if there is something to do ----
   <ul class="rows dates"><li class="row">
     <b class="date-day">Oct 16</b>
     <span class="date-what">Payroll day <span class="quiet">Approve the hours by Thursday.</span></span>
     <button type="button" class="btn btn-second">Check the hours</button>
   </li></ul> */
.dates .row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 18px;
  min-height: 76px;
}

.date-day {
  color: var(--fig);
  font: var(--w-fig) 1.5625rem/1.2 var(--font-fig);
  white-space: nowrap;
}

.date-what .quiet {
  display: block;
}

@media (max-width: 699px) {
  .dates .row {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .dates .row > .btn {
    grid-column: 1 / -1;
  }

  .date-day {
    font-size: 1.4375rem;
  }
}

/* ---- a table with more than two columns (the owner's list of companies) ----
   <table class="table">
     <thead><tr><th>Company</th><th>Books</th><th class="num">Open</th><th><span class="sr">What you can do</span></th></tr></thead>
     <tbody><tr>
       <td class="lead"><b>Birchline Plumbing</b></td>
       <td><span class="cell-l">Books</span>Records only</td>
       <td class="num"><span class="cell-l">Open</span>2</td>
       <td><a class="btn btn-second" href="...">Open</a></td>
     </tr></tbody>
   </table>
   On a phone every row becomes its own block: the column names (cell-l) show in front of the values. */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  padding: 8px 16px 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--quiet);
  font: 600 var(--text-quiet)/1.3 var(--font-ui);
  text-align: left;
  vertical-align: bottom;
}

.table td {
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table th:last-child,
.table td:last-child {
  padding-right: 0;
}

.table .num {
  text-align: right;
  white-space: nowrap;
}

.table .cell-l {
  display: none;
}

/* the cell with the button of a row: <td class="act"> */
.table .act {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 899px) {
  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
  }

  .table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .table tr {
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
  }

  .table tr:last-child {
    border-bottom: 0;
  }

  .table td,
  .table td.num {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 18px;
    padding: 4px 0;
    border: 0;
    text-align: right;
  }

  .table td.lead {
    display: block;
    text-align: left;
  }

  .table .cell-l {
    display: inline;
    color: var(--quiet);
    text-align: left;
  }

  .table td.act {
    display: block;
    width: auto;
    margin-top: 8px;
    text-align: left;
    white-space: normal;
  }
}

/* ---- the Business code, large, in its own box ----
   <div class="code-show"><span class="code-show-l">Your Business code</span><b class="code-show-n">BIRCH-7Q4K-M2XD</b></div> */
.code-show {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 20px 20px;
  border: 2px solid var(--line);
  border-radius: var(--btn-radius);
  background: var(--box-bg, transparent);
  text-align: center;
}

.code-show-l {
  color: var(--soft);
  font: 600 var(--text-quiet)/1.3 var(--font-ui);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.code-show-n {
  color: var(--fig);
  font: var(--w-fig) 2.125rem/1.2 var(--font-fig);
  letter-spacing: .08em;
  white-space: nowrap;
}

@media (max-width: 699px) {
  .code-show {
    padding: 14px 8px 16px;
  }

  .code-show-n {
    font-size: 1.4375rem;
    letter-spacing: .04em;
  }
}

/* ---- a letter: the true preview of an email we send (the welcome letter) ----
   Cream paper with navy words in EVERY look, because that is what the email looks like.
   <article class="letter">
     <header class="letter-head">
       <p><span class="letter-l">From</span> Stingray Bookkeeping</p>
       <p><span class="letter-l">To</span> dana@birchlineplumbing.example</p>
       <p><span class="letter-l">Subject</span> <b>Welcome to Stingray Bookkeeping, Birchline Plumbing</b></p>
     </header>
     <div class="letter-body stack"> ... any shared piece ... </div>
   </article> */
.letter {
  --font-head: var(--serif);
  --font-fig: var(--serif);
  --font-body: var(--serif);
  --font-ui: var(--serif);
  --w-head: 650;
  --w-fig: 700;
  --w-strong: 650;
  --w-ui: 440;
  --w-btn1: 440;
  --w-btn2: 440;
  --w-btn3: 440;
  --w-btn4: 440;
  --btn-radius: 5px;
  --btn-bw: 2px;
  --btn2-bw: 1px;
  --btn-h: 60px;
  --panel-radius: 3px;
  min-width: 0;
  border: 1px solid #c9a368;
  border-radius: 6px;
  background: #fdfaf4;
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .7);
  color: var(--ink);
  font: 400 var(--text)/1.5 var(--serif);
  letter-spacing: 0;
}

.letter-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 26px;
  border-bottom: 1px solid var(--rule);
  background: rgba(10, 24, 38, .045);
}

.letter-l {
  display: inline-block;
  min-width: 86px;
  color: var(--quiet);
}

.letter-body {
  padding: 24px 26px 28px;
}

@media (max-width: 699px) {
  .letter-head {
    padding: 14px 14px;
  }

  .letter-l {
    display: block;
    min-width: 0;
  }

  .letter-body {
    padding: 18px 14px 22px;
  }
}

/* shown on paper only, or on the screen only */
.print-only {
  display: none !important;
}


/* ==========================================================================
   9  POP-UPS AND THE LOOK CHOOSER
   <div class="popup" id="pop-NAME" hidden>
     <div class="popup-box">
       <div class="popup-head"><h2 class="h2">Title</h2>
         <button type="button" class="btn btn-second btn-inline" data-close><i data-icon="close"></i>Close</button></div>
       ...
     </div>
   </div>
   Open it with any button that has data-open="NAME", or with #show=NAME in the address.
   ========================================================================== */

/* The pop-up never grows past the window. When it holds more than fits, the BOX scrolls inside
   itself and its title bar with the Close button stays in sight, at every width. */
.popup {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
  background: var(--shade);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.popup-box {
  position: relative;
  width: min(100%, 580px);
  max-height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 30px 30px;
  border: 1px solid var(--panel-line);
  border-radius: var(--panel-radius);
  background: var(--pop-bg);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 40px 100px -20px rgba(0, 0, 0, .8);
  color: var(--ink);
}

.popup-box.wide {
  width: min(100%, 860px);
}

/* the title and the Close button: always in sight while the pop-up scrolls */
.popup-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 -30px 16px;
  padding: 16px 30px 12px;
  background: var(--pop-bg);
  border-bottom: 1px solid var(--rule);
}

.popup-head .btn {
  flex: none;
}

html.popup-open {
  overflow: hidden;
}

/* Only for the picture tool (mark=1 in the address): the pop-up is laid out at its own full
   length, so a whole-page picture shows all of it and is cut where the pop-up ends. */
.popup.popup-picture {
  position: absolute;
  bottom: auto;
  align-items: flex-start;
  overflow: visible;
}

.popup.popup-picture .popup-box {
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}

@media (max-width: 699px) {
  /* a full-screen sheet */
  .popup {
    align-items: stretch;
    padding: 0;
  }

  .popup-box,
  .popup-box.wide {
    width: 100%;
    max-height: none;
    padding: 0 16px calc(28px + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-radius: 0;
  }

  .popup-head {
    margin: 0 -16px 14px;
    padding: 12px 16px;
  }
}

/* ---- the look chooser: four big cards, each a small true preview ---- */
.looks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.look-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 48px;
  padding: 12px 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.look-card:hover {
  border-color: var(--ink);
}

.look-card[aria-pressed="true"] {
  border-color: var(--on);
  box-shadow: 0 0 0 2px var(--on);
}

.look-name {
  font: var(--w-head) 1.5rem/1.2 var(--font-head);
}

.look-state {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: var(--quiet);
  font-size: var(--text-quiet);
  line-height: 1.3;
}

.look-on {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.look-state .icon {
  width: 24px;
  height: 24px;
  color: var(--good);
}

.look-card[aria-pressed="true"] .look-state {
  color: var(--ink);
  font-weight: var(--w-strong);
}

.look-card[aria-pressed="true"] .look-off,
.look-card:not([aria-pressed="true"]) .look-on {
  display: none;
}

/* a wide but short window (most office laptops): four in a row, so all four show at once */
@media (min-width: 900px) and (max-height: 859px) {
  .popup-box.wide {
    width: min(100%, 1180px);
  }

  .looks {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

  .look-card {
    padding: 10px 10px 12px;
  }

  .look-name {
    font-size: 1.375rem;
  }
}

/* a phone: two by two, so all four can be compared at a glance */
@media (max-width: 699px) {
  .looks {
    gap: 10px;
    margin-top: 14px;
  }

  .look-card {
    gap: 6px;
    padding: 8px 8px 10px;
  }

  .look-name {
    font-size: 1.25rem;
  }

  .look-state {
    gap: 5px;
    font-size: 1.125rem;
  }

  .look-state .icon {
    width: 20px;
    height: 20px;
  }
}

/* The small preview. It carries its own data-theme, so it is drawn with that look's real
   colors, art, panel and buttons. It holds shapes only, no words (words that small would
   break the reading rules). */
.mini {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8.5;
  overflow: hidden;
  border-radius: 6px;
  background-color: var(--page);
  background-image: var(--sky-veil), var(--sky-art-wide), var(--sky-base);
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}

.mini i {
  position: absolute;
  display: block;
}

.mini-mark {
  left: 5%;
  top: 7%;
  width: 8.4%;
  aspect-ratio: 1;
  border: 1.5px solid var(--ring-line);
  border-radius: 50%;
}

.mini-name {
  left: 16.5%;
  top: 10.6%;
  width: 24%;
  height: 4.6%;
  border-radius: 2px;
  background: var(--ink);
  opacity: .9;
}

.mini-menu {
  right: 5%;
  top: 11.4%;
  width: 28%;
  height: 3%;
  border-radius: 2px;
  background: var(--soft);
  opacity: .55;
}

.mini-hello {
  left: 5%;
  top: 25%;
  width: 62%;
  height: 9%;
  border-radius: 2px;
  background: var(--ink);
}

.mini-panel {
  border: 1px solid var(--panel-line);
  border-radius: calc(var(--panel-radius) / 2.4);
  background: var(--panel-bg);
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .7);
}

.mini-set { display: none !important; }
.mini-a { left: 5%; top: 40%; width: 44%; height: 27%; }
.mini-b { left: 51%; top: 40%; width: 44%; height: 27%; }
.mini-c { left: 5%; top: 71%; width: 90%; height: 22%; }

.mini .mini-line {
  left: 8%;
  top: 16%;
  width: 56%;
  height: 13%;
  border-radius: 2px;
  background: var(--ink);
}

.mini .mini-text {
  left: 8%;
  top: 37%;
  width: 74%;
  height: 8%;
  border-radius: 2px;
  background: var(--soft);
  opacity: .75;
}

.mini .mini-b1,
.mini .mini-b2,
.mini .mini-b3 {
  bottom: 13%;
  height: 27%;
  border-radius: calc(var(--btn-radius) / 2.4);
}

.mini .mini-b1 {
  left: 8%;
  width: 40%;
  border: 1px solid var(--btn1-line);
  background: var(--btn1-bg);
}

.mini .mini-b2 {
  left: 52%;
  width: 30%;
  border: 1px solid var(--btn2-line);
  background: var(--btn2-bg);
}

.mini .mini-b3 {
  left: 8%;
  width: 84%;
  border: 1px solid var(--btn3-line);
  background: var(--btn3-bg);
}

.mini .mini-f {
  top: 30%;
  width: 17%;
  height: 26%;
  border-radius: 2px;
  background: var(--fig);
}

.mini .mini-f1 { left: 4%; }
.mini .mini-f2 { left: 26%; }
.mini .mini-f3 { left: 48%; }

.mini .mini-fl {
  top: 66%;
  width: 11%;
  height: 10%;
  border-radius: 2px;
  background: var(--soft);
  opacity: .7;
}

.mini .mini-fl1 { left: 4%; }
.mini .mini-fl2 { left: 26%; }
.mini .mini-fl3 { left: 48%; }

.mini .mini-go {
  right: 4%;
  top: 30%;
  width: 22%;
  height: 42%;
  border: 1px solid var(--btn3-line);
  border-radius: calc(var(--btn-radius) / 2.4);
  background: var(--btn3-bg);
}

.mini .mini-art {
  inset: 0;
  background: var(--engrave-lake) right center / auto 130% no-repeat;
  opacity: var(--engrave-strength);
  -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000 70%);
  mask-image: linear-gradient(90deg, transparent 40%, #000 70%);
}

/* engraved minis: the greeting sits inside one framed piece, as on the real page */
.mini[data-theme^="engraved"] .mini-set {
  display: block !important;
  left: 5%;
  top: 22%;
  width: 90%;
  height: 45%;
}

.mini[data-theme^="engraved"] .mini-hello {
  left: 8.5%;
  top: 27%;
  width: 50%;
  height: 7.5%;
}

.mini[data-theme^="engraved"] .mini-a,
.mini[data-theme^="engraved"] .mini-b {
  top: 38%;
  border-color: transparent;
  background: none;
  box-shadow: none;
}

.mini[data-theme="engraved-cream"] .mini-hello {
  background: #0a1826;
}


/* ==========================================================================
   10  PRINTING
   A report prints clean on white paper in any look: black words, no art, no menus.
   ========================================================================== */

@media print {
  @page {
    margin: 14mm;
  }

  html[data-theme],
  html[data-theme] .panel,
  html[data-theme] .set,
  html[data-theme] .popup-box {
    color-scheme: light;
    --page: #fff;
    --ink: #000;
    --soft: #111;
    --quiet: #333;
    --rule: #999;
    --line: #555;
    --accent: #333;
    --fig: #000;
    --fig-rule: #777;
    --link: #000;
    --stamp: #222;
    --panel-bg: #fff;
    --panel-line: #888;
    --panel-shadow: none;
    --panel-filter: none;
    --panel-radius: 0;
    --engrave-strength: 0;
    --good: #000;
    --warn: #000;
    --bad: #000;
    --good-bg: #fff;
    --warn-bg: #fff;
    --bad-bg: #fff;
    --good-line: #666;
    --warn-line: #666;
    --bad-line: #666;
    --ring-line: #555;
    --ring-ink: #000;
    --ring-bg: #fff;
    --field-bg: #fff;
    --field-ink: #000;
    --field-line: #555;
    --top-bg: #fff;
    --top-bg-moved: #fff;
    --top-line: #888;
    --box-bg: #fff;
  }

  html,
  body {
    background: #fff !important;
    color: #000 !important;
  }

  body {
    padding: 0 !important;
  }

  .sky,
  .menu,
  .top-tools,
  .bar,
  .skip,
  .popup,
  .btn,
  .back-row,
  .foot,
  .no-print,
  .has-lake::after,
  .has-papers::after,
  .greeting::before {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }

  /* a link inside a sentence keeps its words on paper, as plain words */
  .link {
    position: static;
    padding: 0;
    color: #000;
    text-decoration: none;
  }

  .top,
  html.js .top,
  html.js:not(.is-moved) .top {
    position: static;
    background: #fff;
    border-bottom: 1px solid #888;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .letter {
    border-color: #888;
    background: #fff;
    box-shadow: none;
  }

  .top-in {
    min-height: 0;
    padding: 0 0 8pt;
  }

  .page {
    max-width: none;
    padding: 12pt 0 0;
    gap: 12pt;
  }

  .panel,
  .set {
    break-inside: avoid;
    padding: 12pt 14pt;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .greeting,
  .h1 {
    margin: 0;
    font-size: 24pt;
    text-shadow: none;
  }

  .h2 { font-size: 17pt; }
  .fig-n { font-size: 24pt; }
  .fig-n.big { font-size: 30pt; }

  * {
    text-shadow: none !important;
    -webkit-print-color-adjust: economy;
    print-color-adjust: economy;
  }
}


/* ==========================================================================
   PASS-3 CLIENT NAMES PER LOOK (the --p3-* names of client-pass3.css)
   Moved here from client-pass3.css section 1 at the joining step (Oct 17 2026, joint check item 4), so that
   client-pass3.css holds no colour of its own: it starts with the verbatim Look A block of owner-aurora.css
   and points its aurora names at Look A names. The values below are what the other three looks (and the
   cream paper inside them) use; in the aurora look client-pass3.css overrides most of them with Look A names.
   ========================================================================== */

:root,
[data-theme="aurora"] {
  --p3-gold: #d4af6a;                 /* lines, dots, chip grounds, the "you are here" mark */
  --p3-gold-ink: #f4ca84;             /* gold WORDS on a dark ground (kept figure, current step) */
  --p3-teal: #0b7470;                 /* the main button: white words on it are 5.6 to 1 */
  --p3-teal-hover: #095f5c;
  --p3-main-line: rgba(143, 217, 210, .42);
  --p3-bar-out: #1e9c94;              /* bars: what went out */
  --p3-bar-kept: #d4af6a;             /* bars: what was kept, taxes */
  --p3-bar-track: rgba(200, 226, 236, .16);
  --p3-card-line: rgba(212, 175, 106, .55);
  --p3-radius: var(--panel-radius, 14px);
  --p3-line-bg: rgba(6, 16, 27, .42); /* ground of the gold-outline button and the switch */
  --p3-chip-ground: rgba(5, 13, 22, .62);  /* the soft ground of words that sit on the art */
  --p3-quote-bg: rgba(7, 18, 30, .74);
  --p3-dot-bg: #0b1626;
  --p3-track-next: rgba(243, 235, 221, .62);
  --p3-pill-gold-bg: #d4af6a;  --p3-pill-gold-ink: #1b1405;   --p3-pill-gold-line: #d4af6a;
  --p3-pill-have-bg: #f3ebdd;  --p3-pill-have-ink: #0b1626;   --p3-pill-have-line: #f3ebdd;
  --p3-pill-done-bg: #8fd9d2;  --p3-pill-done-ink: #062028;   --p3-pill-done-line: #8fd9d2;
  --p3-bar-on: #e3c07c;               /* phone tab bar and menu: the page you are on */
  --p3-photo-veil: rgba(8, 17, 29, 1);

  /* one-off colours that used to sit in client-pass3.css (moved at joining, Oct 17 2026) */
  --p3-deep: #0b1626;                 /* the ground behind the logo ring and the photo banner */
  --p3-title-shadow: 0 2px 22px rgba(0, 0, 0, .55);
  --p3-photo-ink: #f7f2e8;            /* words on a photo: always light, in every look */
  --p3-photo-shadow: 0 2px 18px rgba(0, 0, 0, .6);
  --p3-banner-fade:
    linear-gradient(90deg, rgba(8, 17, 29, .80) 0%, rgba(8, 17, 29, .45) 36%, rgba(8, 17, 29, 0) 66%),
    linear-gradient(180deg, rgba(8, 17, 29, 0) 0%, rgba(8, 17, 29, .12) 30%, rgba(8, 17, 29, .70) 52%, rgba(8, 17, 29, .90) 72%, rgba(8, 17, 29, .97) 100%);
  --p3-banner-fade-phone: linear-gradient(180deg, rgba(8, 17, 29, .05) 0%, rgba(8, 17, 29, .14) 30%, rgba(8, 17, 29, .72) 52%, rgba(8, 17, 29, .92) 70%, rgba(8, 17, 29, .98) 100%);
  --p3-glow: 0 0 0 1px rgba(212, 175, 106, .30), 0 0 30px -8px rgba(212, 175, 106, .50);
  --p3-gold-wash: rgba(212, 175, 106, .14);
  --p3-gold-halo: rgba(212, 175, 106, .22);
  --p3-row-hover: rgba(255, 255, 255, .05);
  --p3-menu-hover: rgba(127, 127, 127, .12);
  --p3-cream-ink: #0a1826;            /* navy words of a cream sentence card */
  --p3-cream-gold-line: #a9843f;      /* the gold-outline button on cream paper */
  --p3-main-ink: #ffffff;             /* words and icon on the dark teal main button */
  --p3-main-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 8px 18px -10px rgba(0, 0, 0, .7);
  --p3-gold-btn-bg: #d4af6a;
  --p3-gold-btn-ink: #1b1405;
  --p3-gold-btn-line: #e6c88c;
  --p3-gold-btn-shadow: 0 8px 18px -10px rgba(0, 0, 0, .6);
  --p3-print-line: #999;
  --p3-print-ink: #000;
}

[data-theme="nightsky"] {
  --p3-gold-ink: #ecc070;
  --p3-bar-on: #e3b55f;
}

[data-theme="engraved-dark"],
[data-theme="engraved-cream"] {
  --p3-gold-ink: #e5bf7c;
  --p3-card-line: var(--panel-line);
  --p3-bar-on: #e5bf7c;
}

/* Engraved cream: panels and pop-ups are cream paper, so the pass-3 names turn dark there too.
   Gold WORDS on cream would fail contrast: they become a deep bronze (5.8 to 1 on the cream). */
[data-theme="engraved-cream"] .panel,
[data-theme="engraved-cream"] .set,
[data-theme="engraved-cream"] .popup-box {
  --p3-gold-ink: #7a5a1c;
  --p3-bar-out: #0b7470;
  --p3-bar-kept: #a37b2f;
  --p3-bar-track: rgba(10, 24, 38, .12);
  --p3-main-line: #0b7470;
  --p3-line-bg: #fffdf8;
  --p3-chip-ground: rgba(10, 24, 38, .06);
  --p3-quote-bg: rgba(201, 163, 104, .16);
  --p3-dot-bg: #fbf8f2;
  --p3-track-next: #a9843f;
  --p3-pill-have-bg: #efe4cf;  --p3-pill-have-line: #b08a4a;
  --p3-pill-done-line: #0b7470;
  --p3-pill-gold-line: #a9843f;
}

/* ---------- the owner seeing a client's page (fix list item 1, Oct 17 2026) ----------
   portal.js Portal.asOwner() puts this bar right under the header. It stays in sight while the page
   scrolls: under the sticky header on a computer (portal.js sets its top), at the very top on a phone. */
.owner-view-bar {
  position: sticky;
  top: 0;
  z-index: 39;
  background: var(--pop-bg);
  border-bottom: 1px solid var(--accent);
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .7);
}
.owner-view-in {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
.owner-view-words {
  margin: 0;
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 600;
}
.owner-view-back {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
@media (max-width: 600px) {
  .owner-view-back { width: 100%; justify-content: center; }
}
@media print { .owner-view-bar { display: none; } }
