/* Kohinoor Farm — themed app shell
   ------------------------------------------------------------------
   Twelve themes, chosen per phone on Settings → Appearance (System, Light,
   Dark, Vivid, Neon, Peach, Prism, Ember, 3D, Silk, Forge, Hologram).
   The shared shell below comes from the AMSO Meters app, which was itself
   forked from this stylesheet. Kohinoor keeps its Onyx & Gold identity for
   Dark and Light (see the "gold identity" block at the end); the colourful
   themes are the same as in Meters. The print block still flips everything
   to white so receipts print cleanly. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root{
  color-scheme:dark;

  --bg:#06070f;
  --bg-2:#0a0c1a;
  --card:rgba(255,255,255,.055);
  --card-2:rgba(255,255,255,.075);
  --card-hi:rgba(255,255,255,.115);
  --line:rgba(255,255,255,.12);
  --line-2:rgba(255,255,255,.20);

  --ink:#f4f6ff;
  --ink-2:#d3d9f2;
  --muted:#c3c9e3;
  --faint:#9ea6c7;

  --gold:#bdc8ff;
  --gold-hi:#d7dcff;
  --gold-lo:#4f5fd1;
  --gold-ink:#0a0d24;
  --gold-tint:rgba(189,200,255,.16);
  --gold-line:rgba(189,200,255,.42);
  --gold-grad:linear-gradient(135deg,#d7dcff 0%,#bdc8ff 45%,#6472dd 100%);

  --brand:var(--gold);
  --brand-dark:var(--gold-lo);
  --brand-tint:var(--gold-tint);

  --ok:#3ddc97;      --ok-bg:rgba(61,220,151,.12);   --ok-line:rgba(61,220,151,.28);
  --warn:#fbbf24;    --warn-bg:rgba(251,191,36,.12); --warn-line:rgba(251,191,36,.3);
  --bad:#ff8585;     --bad-bg:rgba(255,133,133,.12); --bad-line:rgba(255,133,133,.3);
  --grey:#9aa1ab;    --grey-bg:rgba(154,161,171,.12);

  /* surfaces, shadows and chart colours that differ between themes */
  --appbar-bg:rgba(8,10,24,.55);
  --nav-bg:rgba(8,10,24,.62);
  --seg-shadow:0 1px 3px rgba(0,0,0,.4);
  --shadow-lg:0 30px 80px rgba(0,0,0,.6);
  --pop-shadow:0 10px 30px rgba(0,0,0,.5);
  --label-shadow:0 1px 3px rgba(0,0,0,.9);
  --flow:#7dd3fc;
  --flow-wash:rgba(125,211,252,.14);
  --tank-a:#7dd3fc;
  --tank-b:#4f5fd1;
  /* validated on the #141619 card: sparkline gray + today, heatmap ramp deep (low) to light (high) */
  --spark-past:#c3c9e3;
  --spark-now:#93a5ff;
  --heat-1:#1e3a8a; --heat-2:#2b52b8; --heat-3:#3b74e0; --heat-4:#6f9cf0; --heat-5:#a2c2f7; --heat-6:#d3e3fd;

  --radius:16px;
  --radius-sm:11px;
  --shadow:0 1px 0 rgba(255,255,255,.08) inset, 0 18px 40px -24px rgba(0,0,0,.95);
  --shadow-sm:0 1px 0 rgba(255,255,255,.06) inset, 0 8px 22px -16px rgba(0,0,0,.9);
  --nav-h:64px;
  --font:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --card-solid:#12152b;
  --accent-rgb:189,200,255;   /* the accent as channels, for glows and shadows */
  /* day bars and the limit bar: normal, today, near the limit, over it */
  --bar-fill:linear-gradient(180deg,var(--gold-hi) 0%,var(--gold) 55%,var(--gold-lo) 100%);
  --bar-today:linear-gradient(180deg,#5ef0b4 0%,var(--ok) 55%,#1f8f62 100%);
  --bar-near:linear-gradient(180deg,#fde68a 0%,#fbbf24 55%,#b7791f 100%);
  --bar-over:linear-gradient(180deg,#ffb3b3 0%,var(--bad) 55%,#a33 100%);
  --limit-fill:linear-gradient(90deg,var(--gold-hi) 0%,var(--gold) 45%,var(--gold-lo) 100%);
  --limit-near:linear-gradient(90deg,#fde68a 0%,#fbbf24 100%);
  --limit-over:linear-gradient(90deg,#ffb3b3 0%,var(--bad) 100%);
}

/* Light theme: the phone's own setting (System), or the Account page choice stored per phone.
   data-theme="dark" wins over a light phone setting; data-theme="light" wins over a dark one. */
:root[data-theme="light"]{
  color-scheme:light;
  --bg:#e4ecf7; --bg-2:#dae4f3; --card:rgba(255,255,255,.46); --card-2:rgba(255,255,255,.52); --card-hi:rgba(255,255,255,.64);
  --line:rgba(255,255,255,.70); --line-2:rgba(15,23,42,.14);
  --ink:#0b1324; --ink-2:#1e293b; --muted:#334155; --faint:#475569;
  --gold:#0c4a6e; --gold-hi:#0b3a57; --gold-lo:#0c4a6e; --gold-ink:#ffffff;
  --gold-tint:rgba(12,74,110,.10); --gold-line:rgba(12,74,110,.36);
  --gold-grad:linear-gradient(135deg,#38bdf8 0%,#0369a1 50%,#0c4a6e 100%);
  --ok:#0d6b4b; --ok-bg:rgba(13,107,75,.10); --ok-line:rgba(13,107,75,.28);
  --warn:#7c5300; --warn-bg:rgba(124,83,0,.10); --warn-line:rgba(124,83,0,.28);
  --bad:#c62f2f; --bad-bg:rgba(198,47,47,.08); --bad-line:rgba(198,47,47,.26);
  --grey:#6b7280; --grey-bg:rgba(107,114,128,.10);
  --shadow:0 1px 0 rgba(255,255,255,.75) inset, 0 12px 36px -14px rgba(30,64,175,.32);
  --shadow-sm:0 1px 0 rgba(255,255,255,.7) inset, 0 8px 22px -12px rgba(30,64,175,.28);
  --appbar-bg:rgba(255,255,255,.56); --nav-bg:rgba(255,255,255,.62);
  --seg-shadow:0 1px 3px rgba(17,19,24,.12);
  --shadow-lg:0 20px 50px rgba(17,19,24,.14);
  --pop-shadow:0 10px 30px rgba(17,19,24,.16);
  --label-shadow:0 0 3px rgba(255,255,255,.95);
  --flow:#0369a1; --flow-wash:rgba(3,105,161,.16);
  --tank-a:#38bdf8; --tank-b:#0284c7;
  /* validated on white: text >= 4.5:1, flow line 4.42:1, sparkline gray + #b8860b, heatmap light (low) to dark (high) */
  --spark-past:#475569; --spark-now:#0369a1;
  --heat-1:#d3e3fd; --heat-2:#a2c2f7; --heat-3:#6f9cf0; --heat-4:#3b74e0; --heat-5:#2b52b8; --heat-6:#12306e;
  --card-solid:#ffffff;
  --accent-rgb:3,105,161;   /* the accent as channels, for glows and shadows */
  /* day bars and the limit bar: normal, today, near the limit, over it */
  --bar-fill:linear-gradient(180deg,#7dd3fc 0%,#0ea5e9 45%,#075985 100%);
  --bar-today:linear-gradient(180deg,#6ee7b7 0%,#10b981 55%,#047857 100%);
  --bar-near:linear-gradient(180deg,#fcd34d 0%,#d97706 55%,#92400e 100%);
  --bar-over:linear-gradient(180deg,#fca5a5 0%,#dc2626 55%,#991b1b 100%);
  --limit-fill:linear-gradient(90deg,#0ea5e9 0%,#075985 100%);
  --limit-near:linear-gradient(90deg,#f59e0b 0%,#b45309 100%);
  --limit-over:linear-gradient(90deg,#ef4444 0%,#991b1b 100%);
}
@media (prefers-color-scheme: light){
  :root:not([data-theme]){
    color-scheme:light;
    --bg:#e4ecf7; --bg-2:#dae4f3; --card:rgba(255,255,255,.46); --card-2:rgba(255,255,255,.52); --card-hi:rgba(255,255,255,.64);
    --line:rgba(255,255,255,.70); --line-2:rgba(15,23,42,.14);
    --ink:#0b1324; --ink-2:#1e293b; --muted:#334155; --faint:#475569;
    --gold:#0c4a6e; --gold-hi:#0b3a57; --gold-lo:#0c4a6e; --gold-ink:#ffffff;
    --gold-tint:rgba(12,74,110,.10); --gold-line:rgba(12,74,110,.36);
    --gold-grad:linear-gradient(135deg,#38bdf8 0%,#0369a1 50%,#0c4a6e 100%);
    --ok:#0d6b4b; --ok-bg:rgba(13,107,75,.10); --ok-line:rgba(13,107,75,.28);
    --warn:#7c5300; --warn-bg:rgba(124,83,0,.10); --warn-line:rgba(124,83,0,.28);
    --bad:#c62f2f; --bad-bg:rgba(198,47,47,.08); --bad-line:rgba(198,47,47,.26);
    --grey:#6b7280; --grey-bg:rgba(107,114,128,.10);
    --shadow:0 1px 0 rgba(255,255,255,.75) inset, 0 12px 36px -14px rgba(30,64,175,.32);
    --shadow-sm:0 1px 0 rgba(255,255,255,.7) inset, 0 8px 22px -12px rgba(30,64,175,.28);
    --appbar-bg:rgba(255,255,255,.56); --nav-bg:rgba(255,255,255,.62);
    --seg-shadow:0 1px 3px rgba(17,19,24,.12);
    --shadow-lg:0 20px 50px rgba(17,19,24,.14);
    --pop-shadow:0 10px 30px rgba(17,19,24,.16);
    --label-shadow:0 0 3px rgba(255,255,255,.95);
    --flow:#0369a1; --flow-wash:rgba(3,105,161,.16);
    --tank-a:#38bdf8; --tank-b:#0284c7;
    /* validated on white: text >= 4.5:1, flow line 4.42:1, sparkline gray + #b8860b, heatmap light (low) to dark (high) */
    --spark-past:#475569; --spark-now:#0369a1;
    --heat-1:#d3e3fd; --heat-2:#a2c2f7; --heat-3:#6f9cf0; --heat-4:#3b74e0; --heat-5:#2b52b8; --heat-6:#12306e;
    --card-solid:#ffffff;
    --accent-rgb:3,105,161;   /* the accent as channels, for glows and shadows */
    /* day bars and the limit bar: normal, today, near the limit, over it */
    --bar-fill:linear-gradient(180deg,#7dd3fc 0%,#0ea5e9 45%,#075985 100%);
    --bar-today:linear-gradient(180deg,#6ee7b7 0%,#10b981 55%,#047857 100%);
    --bar-near:linear-gradient(180deg,#fcd34d 0%,#d97706 55%,#92400e 100%);
    --bar-over:linear-gradient(180deg,#fca5a5 0%,#dc2626 55%,#991b1b 100%);
    --limit-fill:linear-gradient(90deg,#0ea5e9 0%,#075985 100%);
    --limit-near:linear-gradient(90deg,#f59e0b 0%,#b45309 100%);
    --limit-over:linear-gradient(90deg,#ef4444 0%,#991b1b 100%);
  }
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;background:var(--bg)}
body{
  margin:0;background:var(--bg);color:var(--ink);
  font:15px/1.5 var(--font);
  padding-bottom:calc(var(--nav-h) + env(safe-area-inset-bottom));
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
  font-feature-settings:"cv11","ss01";
}
body::before{
  /* The page's colour lives here: one fixed layer behind everything, which the frosted panels
     blur. Fixed rather than scrolling, so a long page costs no more to paint than a short one. */
  content:"";position:fixed;inset:0;pointer-events:none;z-index:0;
  background:
    radial-gradient(620px 420px at 6% -4%, rgba(124,92,255,.48) 0%, rgba(124,92,255,0) 60%),
    radial-gradient(520px 380px at 98% 12%, rgba(56,189,248,.30) 0%, rgba(56,189,248,0) 62%),
    radial-gradient(640px 460px at 2% 52%, rgba(79,70,229,.40) 0%, rgba(79,70,229,0) 62%),
    radial-gradient(580px 430px at 100% 74%, rgba(168,85,247,.34) 0%, rgba(168,85,247,0) 62%),
    radial-gradient(660px 480px at 30% 104%, rgba(59,130,246,.30) 0%, rgba(59,130,246,0) 62%);
}
:root[data-theme="light"] body::before{
  background:
    radial-gradient(640px 460px at 4% -4%, rgba(125,211,252,.28) 0%, rgba(125,211,252,0) 64%),
    radial-gradient(600px 440px at 99% 12%, rgba(147,197,253,.28) 0%, rgba(147,197,253,0) 64%),
    radial-gradient(640px 480px at 0% 55%, rgba(165,180,252,.22) 0%, rgba(165,180,252,0) 64%),
    radial-gradient(620px 460px at 100% 80%, rgba(186,230,253,.30) 0%, rgba(186,230,253,0) 64%);
}
@media (prefers-color-scheme: light){
  :root:not([data-theme]) body::before{
    background:
      radial-gradient(640px 460px at 4% -4%, rgba(125,211,252,.28) 0%, rgba(125,211,252,0) 64%),
      radial-gradient(600px 440px at 99% 12%, rgba(147,197,253,.28) 0%, rgba(147,197,253,0) 64%),
      radial-gradient(640px 480px at 0% 55%, rgba(165,180,252,.22) 0%, rgba(165,180,252,0) 64%),
      radial-gradient(620px 460px at 100% 80%, rgba(186,230,253,.30) 0%, rgba(186,230,253,0) 64%);
  }
}
a{color:var(--gold);text-decoration:none}
a:active{color:var(--gold-hi)}
h1,h2,h3{margin:0;font-weight:700;letter-spacing:-.015em}
b,strong{font-weight:700}
code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.92em;
  background:var(--card-2);padding:1px 6px;border-radius:6px;color:var(--gold-hi)}
::selection{background:rgba(var(--accent-rgb),.35)}

/* ---------- header ---------- */
.appbar{
  position:sticky;top:0;z-index:40;
  background:var(--appbar-bg);
  -webkit-backdrop-filter:saturate(160%) blur(16px);backdrop-filter:saturate(160%) blur(16px);
  color:var(--ink);
  padding:calc(10px + env(safe-area-inset-top)) 16px 10px;
  display:flex;align-items:center;gap:10px;
  border-bottom:1px solid var(--line);
}
.appbar::after{
  content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;
  background:linear-gradient(90deg,transparent,var(--gold-line) 35%,var(--gold-line) 65%,transparent);
}
.appbar .back{color:var(--gold);font-size:26px;line-height:1;padding:0 8px 2px 0;font-weight:400}
.appbar h1{font-size:17px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  display:flex;flex-direction:column;line-height:1.2}
.appbar .sub{display:block;font-size:10.5px;font-weight:600;color:var(--gold);
  letter-spacing:.14em;text-transform:uppercase;margin-top:2px}
.appbar .act{color:var(--gold-hi);background:var(--gold-tint);border:1px solid var(--gold-line);
  border-radius:999px;padding:6px 13px;font-size:13px;font-weight:600;white-space:nowrap;
  font-family:inherit;cursor:pointer}
.appbar .act:active{background:rgba(var(--accent-rgb),.22)}
.appbar .brandmark{width:34px;height:34px;flex:0 0 34px;border-radius:10px;
  background:var(--gold-grad);display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 14px rgba(var(--accent-rgb),.28)}
.appbar .brandmark svg{width:20px;height:20px}

/* ---------- layout ---------- */
.wrap{padding:16px 16px 90px;max-width:760px;margin:0 auto;position:relative;z-index:1}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
  box-shadow:var(--shadow-sm);padding:16px;margin-bottom:12px}
.card.tight{padding:0;overflow:hidden}
.card h2{font-size:11.5px;text-transform:uppercase;letter-spacing:.12em;color:var(--muted);
  margin-bottom:10px;font-weight:700}
.section-head{display:flex;align-items:center;justify-content:space-between;margin:20px 2px 8px}
.section-head h2{font-size:11.5px;text-transform:uppercase;letter-spacing:.12em;color:var(--muted);font-weight:700}
.section-head a{font-size:13px;font-weight:600}
.muted{color:var(--muted)}
.small{font-size:12.5px}
.empty{text-align:center;color:var(--muted);padding:30px 16px;font-size:14px}
.empty .big{font-size:30px;display:block;margin-bottom:8px;opacity:.6;filter:grayscale(.3)}

/* ---------- stat tiles ---------- */
.stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}
.stat{position:relative;overflow:hidden;background:var(--card);border:1px solid var(--line);
  border-radius:var(--radius);padding:14px 14px 13px;box-shadow:var(--shadow-sm);min-width:0}
.stat::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;
  background:var(--gold);border-radius:3px 0 0 3px}
.stat::after{content:"";position:absolute;right:-50px;top:-50px;width:150px;height:150px;
  border-radius:50%;background:radial-gradient(circle,var(--gold) 0%,transparent 68%);opacity:.045;pointer-events:none}
.stat .label{font-size:10.5px;text-transform:uppercase;letter-spacing:.12em;color:var(--muted);font-weight:700}
.stat .value{font-size:21px;font-weight:800;margin-top:6px;letter-spacing:-.03em;
  overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums;color:var(--ink)}
.stat .foot{font-size:11.5px;color:var(--muted);margin-top:4px}
.stat.in::before,.stat.in::after{background:var(--ok)}      .stat.in .value{color:var(--ok)}
.stat.out::before,.stat.out::after{background:var(--bad)}   .stat.out .value{color:var(--bad)}
.stat.due::before,.stat.due::after{background:var(--warn)}  .stat.due .value{color:var(--warn)}
.stat.evt::before,.stat.evt::after{background:var(--gold)}  .stat.evt .value{color:var(--gold-hi)}
.stat.wide{grid-column:1 / -1}

/* ---------- list rows ---------- */
.list{list-style:none;margin:0;padding:0}
.list li{border-bottom:1px solid var(--line)}
.list li:last-child{border-bottom:0}
.row{display:flex;align-items:center;gap:12px;padding:13px 16px;color:inherit;
  transition:background .12s}
a.row:active,a.row:hover{background:var(--card-2)}
.row .grow{flex:1;min-width:0}
.row .t{display:block;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ink)}
.row .s{display:block;font-size:12.5px;color:var(--muted);margin-top:2px;
  overflow:hidden;text-overflow:ellipsis}
.row .amt{text-align:right;font-weight:700;white-space:nowrap;flex:0 0 auto;
  font-variant-numeric:tabular-nums;color:var(--ink)}
.row .amt .s{font-weight:500;margin-top:1px}
.row .chev{color:var(--faint);font-size:20px}

.datechip{width:48px;flex:0 0 48px;text-align:center;border-radius:12px;padding:6px 0;
  background:var(--gold-tint);color:var(--gold-hi);border:1px solid var(--gold-line)}
.datechip .d{font-size:18px;font-weight:800;line-height:1;letter-spacing:-.02em}
.datechip .m{font-size:9.5px;text-transform:uppercase;letter-spacing:.1em;font-weight:700;
  margin-top:3px;display:block;color:var(--gold)}

/* ---------- badges ---------- */
.badge{display:inline-block;font-size:10.5px;font-weight:700;padding:3px 9px;border-radius:999px;
  letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;border:1px solid transparent}
.b-confirmed{background:var(--bad-bg);color:var(--bad);border-color:var(--bad-line)}
.b-tentative{background:var(--warn-bg);color:var(--warn);border-color:var(--warn-line)}
.b-available{background:var(--ok-bg);color:var(--ok);border-color:var(--ok-line)}
.b-cancelled{background:var(--grey-bg);color:var(--grey);border-color:rgba(154,161,171,.25)}
.b-plain{background:var(--gold-tint);color:var(--gold-hi);border-color:var(--gold-line)}
.t-warn{color:var(--warn)} .t-bad{color:var(--bad)} .t-ok{color:var(--ok)} .t-gold{color:var(--gold-hi)}

/* ---------- buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;
  background:var(--gold-grad);color:var(--gold-ink);border:0;border-radius:12px;padding:13px 18px;
  font-size:15px;font-weight:700;cursor:pointer;font-family:inherit;text-align:center;
  box-shadow:0 6px 18px rgba(var(--accent-rgb),.22), inset 0 1px 0 rgba(255,255,255,.35);
  transition:transform .08s, filter .12s;letter-spacing:-.005em}
.btn:active{transform:translateY(1px);filter:brightness(.92)}
.btn.block{display:flex;width:100%}
.btn.ghost{background:transparent;color:var(--gold-hi);border:1.5px solid var(--gold-line);box-shadow:none}
.btn.ghost:active{background:var(--gold-tint)}
.btn.grey{background:var(--card-2);color:var(--ink-2);border:1px solid var(--line-2);box-shadow:none}
.btn.danger{background:transparent;color:var(--bad);border:1.5px solid var(--bad-line);box-shadow:none}
.btn.danger:active{background:var(--bad-bg)}
.btn.sm{padding:8px 12px;font-size:13px;border-radius:9px}
.btnrow{display:flex;gap:9px;flex-wrap:wrap}
.btnrow > *{flex:1;min-width:130px}

.fab{position:fixed;right:18px;bottom:calc(var(--nav-h) + 16px + env(safe-area-inset-bottom));
  width:58px;height:58px;border-radius:50%;background:var(--gold-grad);color:var(--gold-ink);border:0;
  font-size:32px;font-weight:500;line-height:1;display:flex;align-items:center;justify-content:center;
  box-shadow:0 10px 26px rgba(var(--accent-rgb),.35), inset 0 1px 0 rgba(255,255,255,.4);z-index:35}
.fab:active{transform:scale(.96)}

/* ---------- forms ---------- */
label{display:block;font-size:11.5px;font-weight:700;color:var(--muted);
  text-transform:uppercase;letter-spacing:.1em;margin:16px 0 6px}
input,select,textarea{
  width:100%;padding:12px 13px;border:1.5px solid var(--line-2);border-radius:12px;
  font-size:16px;font-family:inherit;background:var(--bg-2);color:var(--ink);
  transition:border-color .12s, box-shadow .12s}   /* 16px stops iOS zoom */
input::placeholder,textarea::placeholder{color:var(--faint)}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--gold);
  box-shadow:0 0 0 3px rgba(var(--accent-rgb),.18)}
select{-webkit-appearance:none;appearance:none;padding-right:38px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d9ad48' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 12px center;background-size:18px}
input[type=file]{padding:10px;background:var(--bg-2)}
input[type=file]::file-selector-button{font-family:inherit;font-weight:600;font-size:13px;
  background:var(--gold-tint);color:var(--gold-hi);border:1px solid var(--gold-line);
  border-radius:8px;padding:7px 11px;margin-right:10px}
input[type=date]::-webkit-calendar-picker-indicator{filter:invert(.75) sepia(.6) saturate(3) hue-rotate(5deg)}
textarea{min-height:80px;resize:vertical}
.field-note{font-size:12.5px;color:var(--muted);margin-top:6px;line-height:1.45}
.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.two label{margin-top:16px}
.inline-form{display:flex;gap:8px;align-items:flex-end}
.inline-form label{margin-top:0}

.chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:6px}
.chip{position:relative;margin:0;text-transform:none;letter-spacing:0}
.chip input{position:absolute;opacity:0;width:0;height:0}
.chip span{display:block;padding:9px 15px;border-radius:999px;background:var(--card-2);
  color:var(--ink-2);font-size:14px;font-weight:600;border:1.5px solid var(--line-2);
  transition:all .12s}
.chip input:checked + span{background:var(--gold-tint);color:var(--gold-hi);border-color:var(--gold);
  box-shadow:0 0 0 3px rgba(var(--accent-rgb),.12)}
.chip input:focus-visible + span{outline:2px solid var(--gold);outline-offset:2px}

/* ---------- flash ---------- */
.flash{padding:12px 15px;border-radius:12px;margin-bottom:12px;font-size:14px;font-weight:600;
  border:1px solid transparent}
.flash.ok{background:var(--ok-bg);color:var(--ok);border-color:var(--ok-line)}
.flash.error{background:var(--bad-bg);color:var(--bad);border-color:var(--bad-line)}

/* ---------- calendar ---------- */
.calbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
.calbar .mlabel{font-size:17px;font-weight:700;letter-spacing:-.01em}
.calnav{background:var(--card);border:1px solid var(--line-2);border-radius:11px;width:40px;height:40px;
  font-size:20px;color:var(--gold);display:flex;align-items:center;justify-content:center;
  box-shadow:var(--shadow-sm)}
.calnav:active{background:var(--card-2)}
.cal{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.cal .dow{text-align:center;font-size:10.5px;font-weight:700;color:var(--faint);padding:4px 0 6px;
  text-transform:uppercase;letter-spacing:.1em}
.cell{aspect-ratio:1/1;border-radius:11px;display:flex;flex-direction:column;
  align-items:center;justify-content:center;background:var(--ok-bg);color:var(--ok);
  font-weight:600;font-size:15px;position:relative;border:1.5px solid var(--ok-line);
  font-variant-numeric:tabular-nums}
.cell.out{background:transparent;color:var(--faint);border-color:transparent}
.cell.tentative{background:var(--warn-bg);color:var(--warn);border-color:var(--warn-line)}
.cell.confirmed{background:var(--bad-bg);color:var(--bad);border-color:var(--bad-line)}
.cell.today{border-color:var(--gold);box-shadow:0 0 0 2px rgba(var(--accent-rgb),.35), 0 0 16px rgba(var(--accent-rgb),.25)}
.cell .dot{width:5px;height:5px;border-radius:50%;background:currentColor;
  opacity:.85;margin-top:3px}
.cell .nm{position:absolute;bottom:4px;right:6px;font-size:9px;font-weight:700;opacity:.85}
.legend{display:flex;gap:14px;flex-wrap:wrap;margin-top:14px;font-size:12.5px;color:var(--muted)}
.legend i{display:inline-block;width:11px;height:11px;border-radius:3px;margin-right:6px;
  vertical-align:-1px;border:1px solid transparent}
.legend .l-available{background:var(--ok-bg);border-color:var(--ok)}
.legend .l-tentative{background:var(--warn-bg);border-color:var(--warn)}
.legend .l-confirmed{background:var(--bad-bg);border-color:var(--bad)}

/* ---------- tables ---------- */
.tablewrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:0 -16px;padding:0 16px}
table{border-collapse:collapse;width:100%;font-size:13.5px}
th,td{padding:10px 10px;text-align:left;border-bottom:1px solid var(--line);white-space:nowrap}
th{font-size:10.5px;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);
  font-weight:700;background:var(--bg-2)}
td.num,th.num{text-align:right;font-variant-numeric:tabular-nums}
tr.total td{font-weight:700;background:var(--card-2);border-top:2px solid var(--gold-line);color:var(--gold-hi)}
.pos,.kv .v.pos,.row .amt.pos,td.pos{color:var(--ok)}
.neg,.kv .v.neg,.row .amt.neg,td.neg{color:var(--bad)}

.kv{display:flex;justify-content:space-between;gap:12px;padding:10px 0;
  border-bottom:1px solid var(--line);font-size:14px}
.kv:last-child{border-bottom:0}
.kv .k{color:var(--muted)}
.kv .v{font-weight:600;text-align:right;font-variant-numeric:tabular-nums;color:var(--ink)}
.kv.big .v{font-size:18px;font-weight:800;letter-spacing:-.02em}
.kv.big .k{color:var(--ink-2);font-weight:600}

.bar{height:7px;border-radius:4px;background:var(--card-hi);overflow:hidden;margin-top:8px}
.bar > i{display:block;height:100%;background:var(--gold-grad);border-radius:4px}

/* ---------- segmented control ---------- */
.seg{display:flex;background:var(--bg-2);border:1px solid var(--line);border-radius:12px;padding:3px;margin-bottom:12px}
.seg a{flex:1;text-align:center;padding:9px 4px;border-radius:9px;font-size:13.5px;
  font-weight:600;color:var(--muted)}
.seg a.on{background:var(--card-hi);color:var(--gold-hi);box-shadow:var(--seg-shadow);
  border:1px solid var(--line-2)}

/* ---------- bottom nav ---------- */
.bottomnav{
  position:fixed;left:0;right:0;bottom:0;z-index:50;
  background:var(--nav-bg);
  -webkit-backdrop-filter:saturate(160%) blur(18px);backdrop-filter:saturate(160%) blur(18px);
  border-top:1px solid var(--line-2);display:flex;
  padding-bottom:env(safe-area-inset-bottom);
}
.bottomnav a{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:4px;height:var(--nav-h);color:var(--muted);font-size:10.5px;font-weight:600;letter-spacing:.02em;
  position:relative;transition:color .12s}
.bottomnav a svg{width:23px;height:23px;stroke:currentColor;fill:none;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round}
.bottomnav a.on{color:var(--gold-hi)}
.bottomnav a.on::before{content:"";position:absolute;top:0;left:50%;transform:translateX(-50%);
  width:28px;height:2px;border-radius:0 0 2px 2px;background:var(--gold);
  box-shadow:0 2px 12px rgba(var(--accent-rgb),.6)}
.bottomnav a.on svg{filter:drop-shadow(0 0 6px rgba(var(--accent-rgb),.45))}

/* ---------- login ---------- */
.login{min-height:100vh;min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:22px;
  background:var(--bg)}
/* the sign-in page keeps the same lit backdrop as the app behind it, so the two do not look like
   two different products; body::before paints it and the box frosts what it covers */
.login .box{background:var(--card);border:1px solid var(--line-2);border-radius:22px;padding:30px 24px 26px;
  width:100%;max-width:380px;box-shadow:var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.04);
  position:relative}
.login .box::before{content:"";position:absolute;left:24px;right:24px;top:0;height:1px;
  background:linear-gradient(90deg,transparent,var(--gold-line),transparent)}
.login .logo{text-align:center;margin-bottom:22px}
.login .logo .mark{width:68px;height:68px;border-radius:20px;background:var(--gold-grad);
  display:flex;align-items:center;justify-content:center;margin:0 auto 14px;
  box-shadow:0 14px 34px -10px rgba(var(--accent-rgb),.55), inset 0 1px 0 rgba(255,255,255,.45)}
.login .logo .mark svg{width:38px;height:38px}
.login .logo h1{font-size:22px;color:var(--ink);letter-spacing:-.02em}
.login .logo p{margin:6px 0 0;color:var(--gold);font-size:11px;font-weight:600;
  letter-spacing:.18em;text-transform:uppercase}
.login .foot{text-align:center;margin-top:18px;font-size:11.5px;color:var(--faint)}

/* ---------- receipt ---------- */
.receipt{max-width:640px;margin:0 auto;background:var(--card);border:1px solid var(--line-2);
  padding:28px 24px;border-radius:var(--radius);box-shadow:var(--shadow)}
.receipt .rhead{text-align:center;border-bottom:2px solid var(--gold);padding-bottom:16px;
  margin-bottom:18px}
.receipt .rhead h1{color:var(--gold-hi);font-size:24px;letter-spacing:.12em;font-weight:800}
.receipt .rhead p{margin:6px 0 0;color:var(--muted);font-size:12.5px;letter-spacing:.04em}
.receipt .rtitle{text-align:center;font-weight:700;letter-spacing:.2em;font-size:11.5px;
  color:var(--muted);margin-bottom:14px;text-transform:uppercase}
.receipt .amtbox{background:var(--gold-tint);border:1px solid var(--gold-line);border-radius:14px;
  padding:16px;text-align:center;margin:16px 0}
.receipt .amtbox .n{font-size:30px;font-weight:800;color:var(--gold-hi);letter-spacing:-.02em;
  font-variant-numeric:tabular-nums}
.receipt .amtbox .w{font-size:12.5px;color:var(--ink-2);margin-top:5px;font-style:italic}
.receipt .sign{margin-top:38px;display:flex;justify-content:space-between;font-size:12.5px;
  color:var(--muted)}
.receipt .sign div{border-top:1px solid var(--line-2);padding-top:8px;width:44%;text-align:center}

/* ---------- print: flip to a white palette so receipts print cleanly ---------- */
@media print{
  :root{
    color-scheme:light;
    --bg:#fff;--bg-2:#fff;--card:#fff;--card-2:#f5f5f5;--card-hi:#eee;
    --line:#ddd;--line-2:#ccc;--ink:#111;--ink-2:#333;--muted:#666;--faint:#999;
    --gold:#8a6a1c;--gold-hi:#6b5114;--gold-tint:#faf5e6;--gold-line:#d9c68f;
    --ok:#15803d;--bad:#b91c1c;--warn:#b45309;
  }
  body::before{display:none}
  .appbar,.bottomnav,.noprint,.fab{display:none !important}
  body{background:#fff;padding:0;color:#111}
  .wrap{padding:0;max-width:none}
  .receipt{box-shadow:none;border:1px solid #ccc;max-width:none;background:#fff}
  .receipt .rhead h1{color:#111}
  .receipt .amtbox{background:#f7f3e8;border-color:#d9c68f}
  .receipt .amtbox .n{color:#111}
}

@media (min-width:640px){
  .stats{grid-template-columns:repeat(4,1fr)}
  .stat .value{font-size:22px}
  .wrap{padding-top:20px}
}

@media (hover:hover){
  .btn:hover{filter:brightness(1.06)}
  .btn.ghost:hover{background:var(--gold-tint)}
  .bottomnav a:hover{color:var(--ink-2)}
  .bottomnav a.on:hover{color:var(--gold-hi)}
  .calnav:hover{background:var(--card-2)}
}

/* the hidden attribute always wins over component display rules such as .btn.block */
[hidden]{display:none!important}


/* ------------------------------------------------------------------ refinement pass, Sep 2026
   Surfaces, figures and controls only: no layout moved, no colour invented. The point is that a
   number should read as a number (one baseline, tabular figures), a card should feel like a
   surface rather than a rectangle, and a control should be the size of a thumb. */

:root{
  --r-lg:18px; --r-md:12px; --r-sm:9px;
  --surface:linear-gradient(180deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.02) 42%, rgba(255,255,255,0) 100%);
  --lift:0 1px 0 rgba(255,255,255,.10) inset, 0 18px 40px -24px rgba(0,0,0,.95);
}
:root[data-theme="light"], :root.light-theme{
  --surface:linear-gradient(135deg, rgba(255,255,255,.58) 0%, rgba(255,255,255,.16) 40%, rgba(255,255,255,.04) 100%);
  --lift:0 1px 0 rgba(255,255,255,.75) inset, 0 12px 36px -14px rgba(30,64,175,.32);
}
@media (prefers-color-scheme: light){
  :root:not([data-theme]){
    --surface:linear-gradient(135deg, rgba(255,255,255,.58) 0%, rgba(255,255,255,.16) 40%, rgba(255,255,255,.04) 100%);
    --lift:0 1px 0 rgba(255,255,255,.75) inset, 0 12px 36px -14px rgba(30,64,175,.32);
  }
}

.card{background-image:var(--surface);border-radius:var(--r-lg);box-shadow:var(--lift)}
.card.tight{background-image:var(--surface)}
.stat{border-radius:var(--r-lg);background-image:var(--surface);box-shadow:var(--lift)}
.stat::before{width:4px;border-radius:var(--r-lg) 0 0 var(--r-lg);opacity:.9}
.stat::after{opacity:.10;filter:blur(6px)}
.stat .label{font-size:10px;letter-spacing:.14em}
.stat .value{font-size:24px;letter-spacing:-.035em;line-height:1.05;margin-top:7px}
.stat .foot{font-size:11px;line-height:1.35}

/* figures are read, not admired: one width per digit so columns line up and nothing jitters on refresh */
.stat .value,.mg .v,.tot .v,.amt,.kv .v,.bars.months .c b,.ml span:last-child{
  font-variant-numeric:tabular-nums lining-nums}

.btn{border-radius:var(--r-sm);min-height:42px;letter-spacing:.01em;
  transition:transform .12s ease, filter .12s ease, box-shadow .12s ease}
.btn:not(.ghost):not(.grey):not(.danger){
  background-image:linear-gradient(180deg,var(--gold-hi) 0%,var(--gold) 52%,var(--gold-lo) 100%);
  box-shadow:0 1px 0 rgba(255,255,255,.35) inset, 0 6px 16px -10px rgba(var(--accent-rgb),.9)}
.btn.sm{min-height:36px;border-radius:8px}
.btn:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{
  outline:2px solid var(--gold);outline-offset:2px}
input,select,textarea{border-radius:var(--r-sm);min-height:42px}
input:focus,select:focus,textarea:focus{border-color:var(--gold-line);box-shadow:0 0 0 3px rgba(var(--accent-rgb),.14)}

.list .row{transition:background .14s ease}
.list .row:active{background:var(--card-hi)}
.chev{opacity:.55}
.section-head h2{letter-spacing:.14em}
.appbar{backdrop-filter:saturate(1.3) blur(14px)}
.appbar .brandmark{box-shadow:0 4px 14px -6px rgba(var(--accent-rgb),.8)}

@media (prefers-reduced-motion:reduce){*{transition:none !important;animation:none !important}}


/* ------------------------------------------------------------------ frosted panels, Sep 2026
   Cards, tiles and the two bars are translucent and blur what is behind them, so the colour of the
   page shows through instead of being hidden by a solid rectangle. Everything below is only about
   that: no layout changes, and every rule has a way out for a phone that cannot do it. */

.card,.stat,.appbar,.bottomnav,.nav,.seg,.readout,.login .box{
  backdrop-filter:blur(20px) saturate(1.35);
  -webkit-backdrop-filter:blur(20px) saturate(1.35);
}
.card,.stat{border-color:rgba(255,255,255,.11)}

/* a panel inside a card steps up in light rather than down in dark, so nesting still reads as depth */
.mg.big > div,.tot,input,select,textarea{background:var(--card-2)}

/* a statement is read and printed, so it stays on paper-solid white rather than glass
   (the chart labels and the sticky heat-table column do the same, in meters.css) */
.receipt{background:var(--card-solid)}

/* A phone that cannot blur would show the translucent colour with the page straight through it,
   which is unreadable. Those phones, and anyone who has asked for less transparency, get the same
   palette with solid panels. */
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  :root{--card:#12152b;--card-2:#191d37;--card-hi:#232849;--line:rgba(165,180,252,.10);--line-2:rgba(165,180,252,.18)}
  :root[data-theme="light"]{--card:#fff;--card-2:#f4f8fd;--card-hi:#e9f1fa;--line:rgba(15,23,42,.08);--line-2:rgba(15,23,42,.15)}
  @media (prefers-color-scheme: light){
    :root:not([data-theme]){--card:#fff;--card-2:#f4f8fd;--card-hi:#e9f1fa;--line:rgba(15,23,42,.08);--line-2:rgba(15,23,42,.15)}
  }
  body::before{opacity:.45}
  .appbar,.bottomnav,.search{background:var(--card-solid)}   /* nothing to blur with: bars go solid */
}
@media (prefers-reduced-transparency: reduce){
  .card,.stat,.appbar,.bottomnav,.nav,.seg,.readout,.login .box,.search{backdrop-filter:none !important;-webkit-backdrop-filter:none !important}
  .appbar,.bottomnav,.search{background:var(--card-solid)}
  :root{--card:#12152b;--card-2:#191d37;--card-hi:#232849}
  :root[data-theme="light"]{--card:#fff;--card-2:#f4f8fd;--card-hi:#e9f1fa}
  @media (prefers-color-scheme: light){:root:not([data-theme]){--card:#fff;--card-2:#f4f8fd;--card-hi:#e9f1fa}}
  body::before{opacity:.35}
}
@media print{
  .card,.stat,.appbar,.bottomnav,.nav,.seg,.readout,.login .box{backdrop-filter:none !important;-webkit-backdrop-filter:none !important}
  .card,.stat,.receipt{background:#fff !important;border-color:#ddd}
}

/* ------------------------------------------------------------------ light theme as glass, Sep 2026
   The day theme follows the night one: the colour is on the page and the panels only frost it.
   Kept calm on purpose: the backdrop stays still while cards scroll over it, so any colour behind
   a card becomes a change in the card's own colour as it moves. One blue family at low strength
   and 46% white panels hold that to dE 5 - one steady colour to the eye. (A first version with
   teal, blue and violet at up to 70% swung by dE 60 and was tiring to scroll.) Text is a step darker to
   stay readable over the deepest blob (tests/test_theme_contrast.py checks it there). Bars and the
   limit bar end in deep blue so they read against their own track on a colourful page. */
:root[data-theme="light"] .card,:root[data-theme="light"] .stat,:root[data-theme="light"] .appbar,:root[data-theme="light"] .bottomnav,:root[data-theme="light"] .seg,:root[data-theme="light"] .login .box{
  backdrop-filter:blur(24px) saturate(1.1);-webkit-backdrop-filter:blur(24px) saturate(1.1)}
:root[data-theme="light"] .card,:root[data-theme="light"] .stat{border:1px solid var(--line)}
:root[data-theme="light"] .mg.big > div,:root[data-theme="light"] .tot,:root[data-theme="light"] input,:root[data-theme="light"] select,:root[data-theme="light"] textarea{background:var(--card-2);border-color:var(--line)}
:root[data-theme="light"] .stat.evt .value{color:#0c4a6e}
:root[data-theme="light"] .stat.in .value{color:#065f46}
:root[data-theme="light"] .bar{background:rgba(15,23,42,.12)}
:root[data-theme="light"] .btn:not(.ghost):not(.grey):not(.danger){background-image:var(--gold-grad);color:#fff;
  box-shadow:0 1px 0 rgba(255,255,255,.4) inset, 0 8px 20px -10px rgba(3,105,161,.8)}
@media (prefers-color-scheme: light){
  :root:not([data-theme]) .card,:root:not([data-theme]) .stat,:root:not([data-theme]) .appbar,:root:not([data-theme]) .bottomnav,:root:not([data-theme]) .seg,:root:not([data-theme]) .login .box{
    backdrop-filter:blur(24px) saturate(1.1);-webkit-backdrop-filter:blur(24px) saturate(1.1)}
  :root:not([data-theme]) .card,:root:not([data-theme]) .stat{border:1px solid var(--line)}
  :root:not([data-theme]) .mg.big > div,:root:not([data-theme]) .tot,:root:not([data-theme]) input,:root:not([data-theme]) select,:root:not([data-theme]) textarea{background:var(--card-2);border-color:var(--line)}
  :root:not([data-theme]) .stat.evt .value{color:#0c4a6e}
  :root:not([data-theme]) .stat.in .value{color:#065f46}
  :root:not([data-theme]) .bar{background:rgba(15,23,42,.12)}
  :root:not([data-theme]) .btn:not(.ghost):not(.grey):not(.danger){background-image:var(--gold-grad);color:#fff;
    box-shadow:0 1px 0 rgba(255,255,255,.4) inset, 0 8px 20px -10px rgba(3,105,161,.8)}
}

/* ------------------------------------------------------------------ Vivid, Sep 2026
   A colourful glass theme, chosen on the Account page. Smoked glass - dark translucent panels -
   over an aurora page, so light text sits on a calm dark surface while the colour shows through.
   The colour layer scrolls WITH the page instead of staying still behind it: a card then keeps
   its own colour as it moves, which is what made the first colourful light theme tiring. */
:root[data-theme="vivid"]{
  color-scheme:dark;
  --bg:#140a33; --bg-2:#1b0f40;
  --card:rgba(20,12,56,.34); --card-2:rgba(255,255,255,.08); --card-hi:rgba(255,255,255,.14);
  --card-solid:#1f1450;
  --line:rgba(255,255,255,.20); --line-2:rgba(255,255,255,.28);
  --ink:#ffffff; --ink-2:#f2eeff; --muted:#ddd6fe; --faint:#c4b5fd;
  --gold:#a5f3fc; --gold-hi:#cffafe; --gold-lo:#22d3ee; --gold-ink:#1e0b3a;
  --gold-tint:rgba(165,243,252,.14); --gold-line:rgba(165,243,252,.40);
  --gold-grad:linear-gradient(135deg,#f5d0fe 0%,#c084fc 50%,#818cf8 100%);
  --accent-rgb:165,243,252;
  --ok:#6ee7b7; --ok-bg:rgba(110,231,183,.14); --ok-line:rgba(110,231,183,.34);
  --warn:#fcd34d; --warn-bg:rgba(252,211,77,.14); --warn-line:rgba(252,211,77,.34);
  --bad:#fda4af; --bad-bg:rgba(253,164,175,.14); --bad-line:rgba(253,164,175,.34);
  --appbar-bg:rgba(20,10,51,.45); --nav-bg:rgba(20,10,51,.55);
  --flow:#67e8f9; --flow-wash:rgba(103,232,249,.16); --tank-a:#67e8f9; --tank-b:#818cf8;
  --spark-past:#c4b5fd; --spark-now:#67e8f9;
  --heat-1:#3b1a78; --heat-2:#5b2bb0; --heat-3:#7c3aed; --heat-4:#a78bfa; --heat-5:#67e8f9; --heat-6:#cffafe;
  --surface:linear-gradient(135deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,.03) 45%, rgba(255,255,255,0) 100%);
  --lift:0 1px 0 rgba(255,255,255,.14) inset, 0 18px 44px -20px rgba(8,4,24,.9);
  --shadow:0 1px 0 rgba(255,255,255,.14) inset, 0 18px 44px -20px rgba(8,4,24,.9);
  --shadow-sm:0 1px 0 rgba(255,255,255,.12) inset, 0 10px 26px -16px rgba(8,4,24,.85);
  /* day bars and the limit bar: normal, today, near the limit, over it */
  --bar-fill:linear-gradient(180deg,#a5f3fc 0%,#818cf8 55%,#7c3aed 100%);
  --bar-today:linear-gradient(180deg,#a7f3d0 0%,#34d399 55%,#059669 100%);
  --bar-near:linear-gradient(180deg,#fef08a 0%,#fcd34d 55%,#d97706 100%);
  --bar-over:linear-gradient(180deg,#fecdd3 0%,#fda4af 55%,#e11d48 100%);
  --limit-fill:linear-gradient(90deg,#67e8f9 0%,#c084fc 100%);
  --limit-near:linear-gradient(90deg,#fde68a 0%,#fcd34d 100%);
  --limit-over:linear-gradient(90deg,#fecdd3 0%,#fb7185 100%);
}
:root[data-theme="vivid"] body{position:relative}
:root[data-theme="vivid"] body::before{
  position:absolute;inset:0;      /* the whole page, scrolling with it */
  /* One 1400px band of colour, repeated down the page, so a long meter page is as vivid at the
     bottom as at the top. Every glow fades out 350px from its centre and sits at least that
     far from the band's edges, so the bands join without a seam. */
  background:
    radial-gradient(720px 540px at 0% 380px, rgba(236,72,153,0.55) 0%, rgba(236,72,153,0) 64%),
    radial-gradient(720px 540px at 100% 600px, rgba(139,92,246,0.60) 0%, rgba(139,92,246,0) 64%),
    radial-gradient(720px 540px at 60% 700px, rgba(244,114,182,0.25) 0%, rgba(244,114,182,0) 64%),
    radial-gradient(720px 540px at 0% 1000px, rgba(6,182,212,0.45) 0%, rgba(6,182,212,0) 64%),
    radial-gradient(720px 540px at 100% 1040px, rgba(59,130,246,0.50) 0%, rgba(59,130,246,0) 64%);
  background-size:100% 1400px;background-repeat:repeat-y;
}

:root[data-theme="vivid"] .card,:root[data-theme="vivid"] .stat,:root[data-theme="vivid"] .appbar,
:root[data-theme="vivid"] .bottomnav,:root[data-theme="vivid"] .seg,:root[data-theme="vivid"] .login .box{
  backdrop-filter:blur(22px) saturate(1.4);-webkit-backdrop-filter:blur(22px) saturate(1.4)}
:root[data-theme="vivid"] .card,:root[data-theme="vivid"] .stat{border:1px solid var(--line)}
:root[data-theme="vivid"] .mg.big > div,:root[data-theme="vivid"] .tot,:root[data-theme="vivid"] input,
:root[data-theme="vivid"] select,:root[data-theme="vivid"] textarea{background:var(--card-2);border-color:var(--line)}
:root[data-theme="vivid"] .btn:not(.ghost):not(.grey):not(.danger){background-image:var(--gold-grad);color:var(--gold-ink);
  box-shadow:0 1px 0 rgba(255,255,255,.45) inset, 0 10px 24px -10px rgba(192,132,252,.8)}
:root[data-theme="vivid"] .bar{background:rgba(255,255,255,.14)}
:root[data-theme="vivid"] .flowsvg .fl{filter:drop-shadow(0 0 6px rgba(103,232,249,.55))}

/* the same ways out as the other themes: no blur support or less transparency asked for -> solid
   panels; printing -> white paper */
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  :root[data-theme="vivid"]{--card:#1f1450;--card-2:#2a1c63;--card-hi:#352674}
}
@media (prefers-reduced-transparency: reduce){
  :root[data-theme="vivid"]{--card:#1f1450;--card-2:#2a1c63;--card-hi:#352674}
}
@media print{
  :root[data-theme="vivid"]{color-scheme:light;
    --bg:#fff;--bg-2:#fff;--card:#fff;--card-2:#f5f5f5;--card-hi:#eee;--card-solid:#fff;
    --line:#ddd;--line-2:#ccc;--ink:#111;--ink-2:#333;--muted:#666;--faint:#999;
    --gold:#1d4ed8;--gold-hi:#1e3a8a;--ok:#15803d;--bad:#b91c1c;--warn:#b45309}
}

/* the gauge in the header and on the sign-in page takes the colour each theme gives text on its accent */
.appbar .brandmark,.login .logo .mark{color:var(--gold-ink)}

/* ------------------------------------------------------------------ four more themes, Sep 2026
   Neon (glossy keycaps on a graphite panel), Peach (a warm apricot page), Prism (frosted glass
   over iridescent blue, lavender and peach) and Ember (midnight indigo lit with gold). Each is a
   full token set - its base theme's with its own colours over it - so nothing falls back to
   another theme's value, and each colour layer scrolls with the page like Vivid's, so a card
   keeps its colour as it moves. tests/test_theme_contrast.py measures all of them. */
:root[data-theme="neon"]{
  color-scheme:dark;
  --bg:#0e1016;
  --bg-2:#141821;
  --card:rgba(26,30,41,.78);
  --card-2:rgba(255,255,255,.05);
  --card-hi:rgba(255,255,255,.10);
  --line:rgba(255,255,255,.09);
  --line-2:rgba(255,255,255,.16);
  --ink:#f6f8fc;
  --ink-2:#dbe0ea;
  --muted:#b6bfce;
  --faint:#8e98aa;
  --gold:#ff9a5c;
  --gold-hi:#ffc09a;
  --gold-lo:#f05a2a;
  --gold-ink:#1a0b05;
  --gold-tint:rgba(255,154,92,.14);
  --gold-line:rgba(255,154,92,.42);
  --gold-grad:linear-gradient(135deg,#f9a8d4 0%,#c4b5fd 50%,#67e8f9 100%);
  --brand:var(--gold);
  --brand-dark:var(--gold-lo);
  --brand-tint:var(--gold-tint);
  --ok:#5eead4;
  --ok-bg:rgba(61,220,151,.12);
  --ok-line:rgba(61,220,151,.28);
  --warn:#fbbf24;
  --warn-bg:rgba(251,191,36,.12);
  --warn-line:rgba(251,191,36,.3);
  --bad:#fb7185;
  --bad-bg:rgba(255,133,133,.12);
  --bad-line:rgba(255,133,133,.3);
  --grey:#9aa1ab;
  --grey-bg:rgba(154,161,171,.12);
  --appbar-bg:rgba(14,16,22,.62);
  --nav-bg:rgba(14,16,22,.70);
  --seg-shadow:0 1px 3px rgba(0,0,0,.4);
  --shadow-lg:0 30px 80px rgba(0,0,0,.6);
  --pop-shadow:0 10px 30px rgba(0,0,0,.5);
  --label-shadow:0 1px 3px rgba(0,0,0,.9);
  --flow:#67e8f9;
  --flow-wash:rgba(103,232,249,.14);
  --tank-a:#67e8f9;
  --tank-b:#a78bfa;
  --spark-past:#8e98aa;
  --spark-now:#ff9a5c;
  --heat-1:#1e3a8a;
  --heat-2:#2b52b8;
  --heat-3:#3b74e0;
  --heat-4:#6f9cf0;
  --heat-5:#a2c2f7;
  --heat-6:#d3e3fd;
  --radius:16px;
  --radius-sm:11px;
  --shadow:0 1px 0 rgba(255,255,255,.08) inset, 0 18px 40px -24px rgba(0,0,0,.95);
  --shadow-sm:0 1px 0 rgba(255,255,255,.06) inset, 0 8px 22px -16px rgba(0,0,0,.9);
  --nav-h:64px;
  --font:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --card-solid:#1a1e29;
  --accent-rgb:255,154,92;
  --bar-fill:linear-gradient(180deg,#f9a8d4 0%,#c4b5fd 50%,#22d3ee 100%);
  --bar-today:linear-gradient(180deg,#5ef0b4 0%,var(--ok) 55%,#1f8f62 100%);
  --bar-near:linear-gradient(180deg,#fde68a 0%,#fbbf24 55%,#b7791f 100%);
  --bar-over:linear-gradient(180deg,#ffb3b3 0%,var(--bad) 55%,#a33 100%);
  --limit-fill:linear-gradient(90deg,#ff9a5c 0%,#f472b6 100%);
  --limit-near:linear-gradient(90deg,#fde68a 0%,#fbbf24 100%);
  --limit-over:linear-gradient(90deg,#ffb3b3 0%,var(--bad) 100%);
  --surface:linear-gradient(180deg, rgba(255,255,255,.07) 0%, rgba(255,255,255,.015) 40%, rgba(255,255,255,0) 100%);
  --lift:0 1px 0 rgba(255,255,255,.08) inset, 0 -1px 0 rgba(0,0,0,.5) inset, 0 14px 30px -18px rgba(0,0,0,.95);
}
:root[data-theme="peach"]{
  color-scheme:light;
  --bg:#fbeee4;
  --bg-2:#f6e2d3;
  --card:rgba(255,255,255,.55);
  --card-2:rgba(255,255,255,.60);
  --card-hi:rgba(255,255,255,.75);
  --line:rgba(255,255,255,.85);
  --line-2:rgba(120,53,15,.13);
  --ink:#2b1a12;
  --ink-2:#4a3024;
  --muted:#6b4636;
  --faint:#8a5f4b;
  --gold:#b93d0a;
  --gold-hi:#9a3412;
  --gold-lo:#7c2d12;
  --gold-ink:#3b1206;
  --gold-tint:rgba(234,88,12,.10);
  --gold-line:rgba(194,65,12,.34);
  --gold-grad:linear-gradient(135deg,#ffc9a8 0%,#ff9e72 50%,#fb7c4c 100%);
  --ok:#15803d;
  --ok-bg:rgba(13,107,75,.10);
  --ok-line:rgba(13,107,75,.28);
  --warn:#9a5a00;
  --warn-bg:rgba(124,83,0,.10);
  --warn-line:rgba(124,83,0,.28);
  --bad:#b91c1c;
  --bad-bg:rgba(198,47,47,.08);
  --bad-line:rgba(198,47,47,.26);
  --grey:#6b7280;
  --grey-bg:rgba(107,114,128,.10);
  --shadow:0 1px 0 rgba(255,255,255,.75) inset, 0 12px 36px -14px rgba(30,64,175,.32);
  --shadow-sm:0 1px 0 rgba(255,255,255,.7) inset, 0 8px 22px -12px rgba(30,64,175,.28);
  --appbar-bg:rgba(251,238,228,.66);
  --nav-bg:rgba(255,248,243,.74);
  --seg-shadow:0 1px 3px rgba(17,19,24,.12);
  --shadow-lg:0 20px 50px rgba(17,19,24,.14);
  --pop-shadow:0 10px 30px rgba(17,19,24,.16);
  --label-shadow:0 0 3px rgba(255,255,255,.95);
  --flow:#c2410c;
  --flow-wash:rgba(194,65,12,.12);
  --tank-a:#fdba74;
  --tank-b:#ea580c;
  --spark-past:#8a5f4b;
  --spark-now:#c2410c;
  --heat-1:#d3e3fd;
  --heat-2:#a2c2f7;
  --heat-3:#6f9cf0;
  --heat-4:#3b74e0;
  --heat-5:#2b52b8;
  --heat-6:#12306e;
  --card-solid:#fff8f3;
  --accent-rgb:234,88,12;
  --bar-fill:linear-gradient(180deg,#ffc9a8 0%,#fb8a5a 50%,#c2410c 100%);
  --bar-today:linear-gradient(180deg,#6ee7b7 0%,#10b981 55%,#047857 100%);
  --bar-near:linear-gradient(180deg,#fcd34d 0%,#d97706 55%,#92400e 100%);
  --bar-over:linear-gradient(180deg,#fca5a5 0%,#dc2626 55%,#991b1b 100%);
  --limit-fill:linear-gradient(90deg,#fdba74 0%,#c2410c 100%);
  --limit-near:linear-gradient(90deg,#f59e0b 0%,#b45309 100%);
  --limit-over:linear-gradient(90deg,#ef4444 0%,#991b1b 100%);
  --surface:linear-gradient(160deg, rgba(255,255,255,.75) 0%, rgba(255,255,255,.2) 45%, rgba(255,255,255,.06) 100%);
  --lift:0 1px 0 rgba(255,255,255,.9) inset, 0 14px 32px -18px rgba(154,52,18,.35);
}
:root[data-theme="prism"]{
  color-scheme:light;
  --bg:#dfe3f5;
  --bg-2:#d4d9ef;
  --card:rgba(255,255,255,.50);
  --card-2:rgba(255,255,255,.56);
  --card-hi:rgba(255,255,255,.70);
  --line:rgba(255,255,255,.78);
  --line-2:rgba(49,46,129,.13);
  --ink:#16152b;
  --ink-2:#2d2b50;
  --muted:#474470;
  --faint:#625f8a;
  --gold:#5b21b6;
  --gold-hi:#4c1d95;
  --gold-lo:#3b0764;
  --gold-ink:#1e1b4b;
  --gold-tint:rgba(91,33,182,.10);
  --gold-line:rgba(91,33,182,.32);
  --gold-grad:linear-gradient(135deg,#fdba74 0%,#d8b4fe 50%,#93c5fd 100%);
  --ok:#047857;
  --ok-bg:rgba(13,107,75,.10);
  --ok-line:rgba(13,107,75,.28);
  --warn:#8a5a00;
  --warn-bg:rgba(124,83,0,.10);
  --warn-line:rgba(124,83,0,.28);
  --bad:#b91c1c;
  --bad-bg:rgba(198,47,47,.08);
  --bad-line:rgba(198,47,47,.26);
  --grey:#6b7280;
  --grey-bg:rgba(107,114,128,.10);
  --shadow:0 1px 0 rgba(255,255,255,.75) inset, 0 12px 36px -14px rgba(30,64,175,.32);
  --shadow-sm:0 1px 0 rgba(255,255,255,.7) inset, 0 8px 22px -12px rgba(30,64,175,.28);
  --appbar-bg:rgba(236,238,252,.60);
  --nav-bg:rgba(246,245,255,.70);
  --seg-shadow:0 1px 3px rgba(17,19,24,.12);
  --shadow-lg:0 20px 50px rgba(17,19,24,.14);
  --pop-shadow:0 10px 30px rgba(17,19,24,.16);
  --label-shadow:0 0 3px rgba(255,255,255,.95);
  --flow:#6d28d9;
  --flow-wash:rgba(109,40,217,.12);
  --tank-a:#a5b4fc;
  --tank-b:#6d28d9;
  --spark-past:#625f8a;
  --spark-now:#6d28d9;
  --heat-1:#d3e3fd;
  --heat-2:#a2c2f7;
  --heat-3:#6f9cf0;
  --heat-4:#3b74e0;
  --heat-5:#2b52b8;
  --heat-6:#12306e;
  --card-solid:#f6f5ff;
  --accent-rgb:124,58,237;
  --bar-fill:linear-gradient(180deg,#fdba74 0%,#c4b5fd 45%,#6d28d9 100%);
  --bar-today:linear-gradient(180deg,#6ee7b7 0%,#10b981 55%,#047857 100%);
  --bar-near:linear-gradient(180deg,#fcd34d 0%,#d97706 55%,#92400e 100%);
  --bar-over:linear-gradient(180deg,#fca5a5 0%,#dc2626 55%,#991b1b 100%);
  --limit-fill:linear-gradient(90deg,#fb923c 0%,#a855f7 55%,#3b82f6 100%);
  --limit-near:linear-gradient(90deg,#f59e0b 0%,#b45309 100%);
  --limit-over:linear-gradient(90deg,#ef4444 0%,#991b1b 100%);
  --surface:linear-gradient(135deg, rgba(255,255,255,.7) 0%, rgba(255,255,255,.18) 42%, rgba(255,255,255,.05) 100%);
  --lift:0 1px 0 rgba(255,255,255,.85) inset, 0 16px 36px -18px rgba(76,29,149,.35);
}
:root[data-theme="ember"]{
  color-scheme:dark;
  --bg:#0b0b1e;
  --bg-2:#11122a;
  --card:rgba(16,16,44,.50);
  --card-2:rgba(255,255,255,.07);
  --card-hi:rgba(255,255,255,.12);
  --line:rgba(251,191,36,.18);
  --line-2:rgba(255,255,255,.20);
  --ink:#fdf8ee;
  --ink-2:#f1e8d6;
  --muted:#d8ccb2;
  --faint:#b3a68c;
  --gold:#fcd34d;
  --gold-hi:#fde68a;
  --gold-lo:#d97706;
  --gold-ink:#1c1204;
  --gold-tint:rgba(252,211,77,.14);
  --gold-line:rgba(252,211,77,.40);
  --gold-grad:linear-gradient(135deg,#fef3c7 0%,#fcd34d 50%,#f59e0b 100%);
  --brand:var(--gold);
  --brand-dark:var(--gold-lo);
  --brand-tint:var(--gold-tint);
  --ok:#6ee7b7;
  --ok-bg:rgba(61,220,151,.12);
  --ok-line:rgba(61,220,151,.28);
  --warn:#fdba74;
  --warn-bg:rgba(251,191,36,.12);
  --warn-line:rgba(251,191,36,.3);
  --bad:#fda4af;
  --bad-bg:rgba(255,133,133,.12);
  --bad-line:rgba(255,133,133,.3);
  --grey:#9aa1ab;
  --grey-bg:rgba(154,161,171,.12);
  --appbar-bg:rgba(11,11,30,.55);
  --nav-bg:rgba(11,11,30,.64);
  --seg-shadow:0 1px 3px rgba(0,0,0,.4);
  --shadow-lg:0 30px 80px rgba(0,0,0,.6);
  --pop-shadow:0 10px 30px rgba(0,0,0,.5);
  --label-shadow:0 1px 3px rgba(0,0,0,.9);
  --flow:#c4b5fd;
  --flow-wash:rgba(196,181,253,.14);
  --tank-a:#c4b5fd;
  --tank-b:#7c3aed;
  --spark-past:#b3a68c;
  --spark-now:#fcd34d;
  --heat-1:#1e3a8a;
  --heat-2:#2b52b8;
  --heat-3:#3b74e0;
  --heat-4:#6f9cf0;
  --heat-5:#a2c2f7;
  --heat-6:#d3e3fd;
  --radius:16px;
  --radius-sm:11px;
  --shadow:0 1px 0 rgba(255,255,255,.08) inset, 0 18px 40px -24px rgba(0,0,0,.95);
  --shadow-sm:0 1px 0 rgba(255,255,255,.06) inset, 0 8px 22px -16px rgba(0,0,0,.9);
  --nav-h:64px;
  --font:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --card-solid:#15163a;
  --accent-rgb:252,211,77;
  --bar-fill:linear-gradient(180deg,#fef3c7 0%,#fcd34d 45%,#d97706 100%);
  --bar-today:linear-gradient(180deg,#5ef0b4 0%,var(--ok) 55%,#1f8f62 100%);
  --bar-near:linear-gradient(180deg,#fde68a 0%,#fbbf24 55%,#b7791f 100%);
  --bar-over:linear-gradient(180deg,#ffb3b3 0%,var(--bad) 55%,#a33 100%);
  --limit-fill:linear-gradient(90deg,#fde68a 0%,#f59e0b 100%);
  --limit-near:linear-gradient(90deg,#fde68a 0%,#fbbf24 100%);
  --limit-over:linear-gradient(90deg,#ffb3b3 0%,var(--bad) 100%);
  --surface:linear-gradient(180deg, rgba(252,211,77,.08) 0%, rgba(255,255,255,.02) 40%, rgba(255,255,255,0) 100%);
  --lift:0 1px 0 rgba(252,211,77,.22) inset, 0 18px 44px -20px rgba(4,4,16,.9);
}
:root[data-theme="neon"] body{position:relative}
:root[data-theme="neon"] body::before{position:absolute;inset:0;
  background:
    radial-gradient(700px 460px at 0% 300px, rgba(236,72,153,0.24) 0%, rgba(236,72,153,0) 64%),
    radial-gradient(700px 460px at 100% 560px, rgba(34,211,238,0.20) 0%, rgba(34,211,238,0) 64%),
    radial-gradient(700px 460px at 8% 900px, rgba(251,146,60,0.22) 0%, rgba(251,146,60,0) 64%),
    radial-gradient(700px 460px at 96% 1100px, rgba(167,139,250,0.16) 0%, rgba(167,139,250,0) 64%);
  background-size:100% 1400px;background-repeat:repeat-y}
:root[data-theme="peach"] body{position:relative}
:root[data-theme="peach"] body::before{position:absolute;inset:0;
  background:
    radial-gradient(700px 460px at 4% 300px, rgba(255,183,138,0.42) 0%, rgba(255,183,138,0) 64%),
    radial-gradient(700px 460px at 100% 560px, rgba(255,214,186,0.55) 0%, rgba(255,214,186,0) 64%),
    radial-gradient(700px 460px at 0% 900px, rgba(253,186,116,0.30) 0%, rgba(253,186,116,0) 64%),
    radial-gradient(700px 460px at 96% 1100px, rgba(255,226,204,0.55) 0%, rgba(255,226,204,0) 64%);
  background-size:100% 1400px;background-repeat:repeat-y}
:root[data-theme="prism"] body{position:relative}
:root[data-theme="prism"] body::before{position:absolute;inset:0;
  background:
    radial-gradient(700px 460px at 0% 300px, rgba(96,165,250,0.40) 0%, rgba(96,165,250,0) 64%),
    radial-gradient(700px 460px at 100% 520px, rgba(167,139,250,0.38) 0%, rgba(167,139,250,0) 64%),
    radial-gradient(700px 460px at 10% 860px, rgba(251,146,60,0.26) 0%, rgba(251,146,60,0) 64%),
    radial-gradient(700px 460px at 94% 1100px, rgba(244,114,182,0.20) 0%, rgba(244,114,182,0) 64%);
  background-size:100% 1400px;background-repeat:repeat-y}
:root[data-theme="ember"] body{position:relative}
:root[data-theme="ember"] body::before{position:absolute;inset:0;
  background:
    radial-gradient(700px 460px at 0% 300px, rgba(79,70,229,0.40) 0%, rgba(79,70,229,0) 64%),
    radial-gradient(700px 460px at 8% 620px, rgba(245,158,11,0.28) 0%, rgba(245,158,11,0) 64%),
    radial-gradient(700px 460px at 100% 780px, rgba(139,92,246,0.34) 0%, rgba(139,92,246,0) 64%),
    radial-gradient(700px 460px at 96% 1100px, rgba(251,191,36,0.16) 0%, rgba(251,191,36,0) 64%);
  background-size:100% 1400px;background-repeat:repeat-y}
/* glass, dark themes */
:root:is([data-theme="neon"],[data-theme="ember"]) .card,:root:is([data-theme="neon"],[data-theme="ember"]) .stat,:root:is([data-theme="neon"],[data-theme="ember"]) .appbar,:root:is([data-theme="neon"],[data-theme="ember"]) .bottomnav,:root:is([data-theme="neon"],[data-theme="ember"]) .seg,:root:is([data-theme="neon"],[data-theme="ember"]) .login .box{
  backdrop-filter:blur(22px) saturate(1.3);-webkit-backdrop-filter:blur(22px) saturate(1.3)}
:root:is([data-theme="neon"],[data-theme="ember"]) .card,:root:is([data-theme="neon"],[data-theme="ember"]) .stat{border:1px solid var(--line)}
:root:is([data-theme="neon"],[data-theme="ember"]) .mg.big > div,:root:is([data-theme="neon"],[data-theme="ember"]) .tot,:root:is([data-theme="neon"],[data-theme="ember"]) input,:root:is([data-theme="neon"],[data-theme="ember"]) select,:root:is([data-theme="neon"],[data-theme="ember"]) textarea{background:var(--card-2);border-color:var(--line)}
:root:is([data-theme="neon"],[data-theme="ember"]) .btn:not(.ghost):not(.grey):not(.danger){background-image:var(--gold-grad);color:var(--gold-ink);
  box-shadow:0 1px 0 rgba(255,255,255,.45) inset, 0 10px 24px -10px rgba(var(--accent-rgb),.7)}
:root:is([data-theme="neon"],[data-theme="ember"]) .bar{background:rgba(255,255,255,.12)}
:root:is([data-theme="neon"],[data-theme="ember"]) .flowsvg .fl{filter:drop-shadow(0 0 6px color-mix(in srgb,var(--flow) 55%,transparent))}
/* glass, light themes */
:root:is([data-theme="peach"],[data-theme="prism"]) .card,:root:is([data-theme="peach"],[data-theme="prism"]) .stat,:root:is([data-theme="peach"],[data-theme="prism"]) .appbar,:root:is([data-theme="peach"],[data-theme="prism"]) .bottomnav,:root:is([data-theme="peach"],[data-theme="prism"]) .seg,:root:is([data-theme="peach"],[data-theme="prism"]) .login .box{
  backdrop-filter:blur(24px) saturate(1.1);-webkit-backdrop-filter:blur(24px) saturate(1.1)}
:root:is([data-theme="peach"],[data-theme="prism"]) .card,:root:is([data-theme="peach"],[data-theme="prism"]) .stat{border:1px solid var(--line)}
:root:is([data-theme="peach"],[data-theme="prism"]) .mg.big > div,:root:is([data-theme="peach"],[data-theme="prism"]) .tot,:root:is([data-theme="peach"],[data-theme="prism"]) input,:root:is([data-theme="peach"],[data-theme="prism"]) select,:root:is([data-theme="peach"],[data-theme="prism"]) textarea{background:var(--card-2);border-color:var(--line)}
:root:is([data-theme="peach"],[data-theme="prism"]) .btn:not(.ghost):not(.grey):not(.danger){background-image:var(--gold-grad);color:var(--gold-ink);border-radius:999px;
  box-shadow:0 1px 0 rgba(255,255,255,.7) inset, 0 8px 20px -10px rgba(var(--accent-rgb),.55)}
:root:is([data-theme="peach"],[data-theme="prism"]) .bar{background:rgba(15,23,42,.12)}
:root:is([data-theme="peach"],[data-theme="prism"]) .flowsvg .fl{filter:none}
:root:is([data-theme="peach"],[data-theme="prism"]) .flowsvg .fb{opacity:.22}
/* Neon: keys that sit up off the panel, and figures and headings that glow */
:root[data-theme="neon"] .btn:not(.ghost):not(.grey):not(.danger){border-radius:12px;
  box-shadow:0 1px 0 rgba(255,255,255,.6) inset, 0 -2px 0 rgba(0,0,0,.18) inset, 0 4px 0 rgba(0,0,0,.45), 0 12px 24px -8px rgba(244,114,182,.55)}
:root[data-theme="neon"] .stat .value,:root[data-theme="neon"] .mg.big .v{text-shadow:0 0 14px color-mix(in srgb,currentColor 45%,transparent)}
:root[data-theme="neon"] .card h2,:root[data-theme="neon"] .section-head h2{color:var(--gold);text-shadow:0 0 10px rgba(var(--accent-rgb),.45)}
/* Ember: a line of gold light along the top of every panel */
:root[data-theme="ember"] .card,:root[data-theme="ember"] .stat{box-shadow:0 1px 0 rgba(252,211,77,.28) inset, 0 18px 44px -20px rgba(4,4,16,.9)}
:root[data-theme="ember"] .card h2,:root[data-theme="ember"] .section-head h2{color:var(--gold-hi)}
/* Peach: soft pills */
:root[data-theme="peach"] .seg,:root[data-theme="peach"] .search{border-radius:999px}

/* the same ways out as the other themes */
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  :root:is([data-theme="neon"],[data-theme="peach"],[data-theme="prism"],[data-theme="ember"]){--card:var(--card-solid);--card-2:var(--card-solid)}
}
@media (prefers-reduced-transparency: reduce){
  :root:is([data-theme="neon"],[data-theme="peach"],[data-theme="prism"],[data-theme="ember"]){--card:var(--card-solid);--card-2:var(--card-solid)}
}
@media print{
  :root:is([data-theme="neon"],[data-theme="peach"],[data-theme="prism"],[data-theme="ember"]){color-scheme:light;
    --bg:#fff;--bg-2:#fff;--card:#fff;--card-2:#f5f5f5;--card-hi:#eee;--card-solid:#fff;
    --line:#ddd;--line-2:#ccc;--ink:#111;--ink-2:#333;--muted:#666;--faint:#999;
    --gold:#1d4ed8;--gold-hi:#1e3a8a;--ok:#15803d;--bad:#b91c1c;--warn:#b45309}
}

/* ------------------------------------------------------------------ 3D, Sep 2026
   From the glossy keycaps: solid slate slabs with real thickness - a bevelled top, a side edge and a
   cast shadow - rather than glass. Inner tiles are wells cut into the slab, the headline Today and
   This month tiles are coloured keycaps, buttons and meter cards press down when tapped, bars are
   columns lit from the left, and the limit bar is a groove with a raised fill. */
:root[data-theme="depth"]{
  color-scheme:dark;
  --bg:#12161f;
  --bg-2:#181d28;
  --card:rgba(38,45,61,.94);
  --card-2:rgba(12,15,22,.55);
  --card-hi:rgba(255,255,255,.10);
  --line:rgba(255,255,255,.07);
  --line-2:rgba(255,255,255,.14);
  --ink:#f3f5f9;
  --ink-2:#d5dae4;
  --muted:#b0b9c8;
  --faint:#8993a5;
  --gold:#ff8a6b;
  --gold-hi:#ffb39e;
  --gold-lo:#f0553a;
  --gold-ink:#1a0b05;
  --gold-tint:rgba(255,138,107,.14);
  --gold-line:rgba(255,138,107,.42);
  --gold-grad:linear-gradient(135deg,#f472b6 0%,#a78bfa 50%,#60a5fa 100%);
  --brand:var(--gold);
  --brand-dark:var(--gold-lo);
  --brand-tint:var(--gold-tint);
  --ok:#5eead4;
  --ok-bg:rgba(61,220,151,.12);
  --ok-line:rgba(61,220,151,.28);
  --warn:#fbbf24;
  --warn-bg:rgba(251,191,36,.12);
  --warn-line:rgba(251,191,36,.3);
  --bad:#fb7185;
  --bad-bg:rgba(255,133,133,.12);
  --bad-line:rgba(255,133,133,.3);
  --grey:#9aa1ab;
  --grey-bg:rgba(154,161,171,.12);
  --appbar-bg:rgba(24,29,40,.94);
  --nav-bg:rgba(24,29,40,.96);
  --seg-shadow:0 1px 3px rgba(0,0,0,.4);
  --shadow-lg:0 30px 80px rgba(0,0,0,.6);
  --pop-shadow:0 10px 30px rgba(0,0,0,.5);
  --label-shadow:0 1px 3px rgba(0,0,0,.9);
  --flow:#7dd3fc;
  --flow-wash:rgba(125,211,252,.14);
  --tank-a:#7dd3fc;
  --tank-b:#6366f1;
  --spark-past:#8993a5;
  --spark-now:#ff8a6b;
  --heat-1:#1e3a8a;
  --heat-2:#2b52b8;
  --heat-3:#3b74e0;
  --heat-4:#6f9cf0;
  --heat-5:#a2c2f7;
  --heat-6:#d3e3fd;
  --radius:16px;
  --radius-sm:11px;
  --shadow:0 1px 0 rgba(255,255,255,.13) inset, 0 -2px 0 rgba(0,0,0,.30) inset, 0 7px 0 #0b0e15, 0 20px 32px -12px rgba(0,0,0,.75);
  --shadow-sm:0 1px 0 rgba(255,255,255,.12) inset, 0 -2px 0 rgba(0,0,0,.28) inset, 0 5px 0 #0b0e15, 0 14px 24px -12px rgba(0,0,0,.7);
  --nav-h:64px;
  --font:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --card-solid:#262d3d;
  --accent-rgb:255,138,107;
  --bar-fill:linear-gradient(180deg,#bfdbfe 0%,#818cf8 50%,#4f46e5 100%);
  --bar-today:linear-gradient(180deg,#5ef0b4 0%,var(--ok) 55%,#1f8f62 100%);
  --bar-near:linear-gradient(180deg,#fde68a 0%,#fbbf24 55%,#b7791f 100%);
  --bar-over:linear-gradient(180deg,#ffb3b3 0%,var(--bad) 55%,#a33 100%);
  --limit-fill:linear-gradient(90deg,#f472b6 0%,#60a5fa 100%);
  --limit-near:linear-gradient(90deg,#fde68a 0%,#fbbf24 100%);
  --limit-over:linear-gradient(90deg,#ffb3b3 0%,var(--bad) 100%);
  --surface:linear-gradient(180deg, rgba(255,255,255,.09) 0%, rgba(255,255,255,.02) 45%, rgba(0,0,0,.10) 100%);
  --lift:0 1px 0 rgba(255,255,255,.13) inset, 0 -2px 0 rgba(0,0,0,.30) inset, 0 7px 0 #0b0e15, 0 20px 32px -12px rgba(0,0,0,.75);
  /* 3D family settings: slab and key edges, the two headline keycaps, headings */
  --slab-edge:#0b0e15;
  --key-edge:#3b2a6b;
  --kc1-face:linear-gradient(160deg,#fed7aa 0%,#fb923c 55%,#ea580c 100%);
  --kc1-edge:#9a3412;
  --kc1-ink:#2a1004;
  --kc1-small:#3b1a0a;
  --kc2-face:linear-gradient(160deg,#fbcfe8 0%,#f472b6 50%,#60a5fa 100%);
  --kc2-edge:#6b21a8;
  --kc2-ink:#1b0a2b;
  --kc2-small:#2e1245;
  --legend:#ff8a6b;
  --legend-glow:rgba(255,138,107,.35);
}
:root[data-theme="depth"] body{position:relative}
:root[data-theme="depth"] body::before{position:absolute;inset:0;
  background:
    radial-gradient(700px 460px at 100% 320px, rgba(255,90,60,0.16) 0%, rgba(255,90,60,0) 64%),
    radial-gradient(700px 460px at 0% 700px, rgba(96,165,250,0.14) 0%, rgba(96,165,250,0) 64%),
    radial-gradient(700px 460px at 100% 1080px, rgba(244,114,182,0.12) 0%, rgba(244,114,182,0) 64%);
  background-size:100% 1400px;background-repeat:repeat-y}

/* the 3D family - 3D, Silk, Forge and Hologram. One set of rules; each theme sets its own slab and
   key edges, keycap faces and heading colour. */
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .card,:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .stat{border:1px solid var(--line)}
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .card{margin-bottom:18px}
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .stats{gap:18px 12px}
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .appbar{box-shadow:0 1px 0 rgba(255,255,255,.08) inset, 0 5px 0 var(--slab-edge), 0 14px 22px -12px rgba(0,0,0,.75)}
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .bottomnav{box-shadow:0 1px 0 rgba(255,255,255,.08) inset, 0 -8px 18px -8px rgba(0,0,0,.6)}
/* wells cut into the slab */
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .mg.big > div,:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .tot,:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) input,:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) select,:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) textarea,:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .seg,:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .readout{background:var(--card-2);border-color:rgba(0,0,0,.35);box-shadow:inset 0 2px 5px rgba(0,0,0,.55), inset 0 -1px 0 rgba(255,255,255,.06)}
/* keys that press */
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="holo"]) .btn:not(.ghost):not(.grey):not(.danger){background-image:var(--gold-grad);color:var(--gold-ink);border-radius:11px;
  box-shadow:0 1px 0 rgba(255,255,255,.55) inset, 0 -2px 0 rgba(0,0,0,.2) inset, 0 5px 0 var(--key-edge), 0 12px 20px -8px rgba(0,0,0,.6);
  transition:transform .08s ease, box-shadow .08s ease}
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="holo"]) .btn:not(.ghost):not(.grey):not(.danger):active{transform:translateY(4px);
  box-shadow:0 1px 0 rgba(255,255,255,.55) inset, 0 -1px 0 rgba(0,0,0,.2) inset, 0 1px 0 var(--key-edge), 0 4px 8px -4px rgba(0,0,0,.6)}
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .btn.ghost,:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .btn.grey{box-shadow:0 1px 0 rgba(255,255,255,.12) inset, 0 4px 0 var(--slab-edge), 0 10px 16px -8px rgba(0,0,0,.6);transition:transform .08s ease, box-shadow .08s ease}
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .btn.ghost:active,:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .btn.grey:active{transform:translateY(3px);box-shadow:0 1px 0 rgba(255,255,255,.12) inset, 0 1px 0 var(--slab-edge)}
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) a.card{transition:transform .08s ease, box-shadow .08s ease}
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) a.card:active{transform:translateY(5px);box-shadow:0 1px 0 rgba(255,255,255,.13) inset, 0 -2px 0 rgba(0,0,0,.30) inset, 0 2px 0 var(--slab-edge), 0 8px 14px -8px rgba(0,0,0,.7)}
/* the headline Today and This month tiles are keycaps */
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .stats.headline > .stat:nth-child(1),:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .stats.headline > .stat:nth-child(2){border-color:rgba(255,255,255,.35)}
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .stats.headline > .stat:nth-child(1){background:var(--kc1-face);
  box-shadow:0 1px 0 rgba(255,255,255,.7) inset, 0 -3px 0 rgba(0,0,0,.18) inset, 0 7px 0 var(--kc1-edge), 0 20px 30px -12px rgba(0,0,0,.7)}
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .stats.headline > .stat:nth-child(2){background:var(--kc2-face);
  box-shadow:0 1px 0 rgba(255,255,255,.7) inset, 0 -3px 0 rgba(0,0,0,.18) inset, 0 7px 0 var(--kc2-edge), 0 20px 30px -12px rgba(0,0,0,.7)}
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .stats.headline > .stat:nth-child(1) .value{color:var(--kc1-ink);text-shadow:0 1px 0 rgba(255,255,255,.25)}
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .stats.headline > .stat:nth-child(1) .label,:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .stats.headline > .stat:nth-child(1) .foot{color:var(--kc1-small)}
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .stats.headline > .stat:nth-child(2) .value{color:var(--kc2-ink);text-shadow:0 1px 0 rgba(0,0,0,.2)}
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .stats.headline > .stat:nth-child(2) .label,:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .stats.headline > .stat:nth-child(2) .foot{color:var(--kc2-small)}
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .stats.headline > .stat:nth-child(-n+2)::before,:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .stats.headline > .stat:nth-child(-n+2)::after{display:none}
/* columns, a groove, a knob, and headings like the lit legends on a panel */
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .bars .c i{border-radius:4px 4px 1px 1px;box-shadow:inset 3px 0 0 rgba(255,255,255,.28), inset -3px 0 0 rgba(0,0,0,.28), 3px 3px 0 rgba(0,0,0,.35)}
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .bar{height:12px;background:var(--slab-edge);box-shadow:inset 0 2px 4px rgba(0,0,0,.75), 0 1px 0 rgba(255,255,255,.06)}
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .bar i{box-shadow:inset 0 1px 0 rgba(255,255,255,.5), inset 0 -2px 0 rgba(0,0,0,.25)}
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .ring{box-shadow:0 3px 0 var(--slab-edge), 0 7px 12px -5px rgba(0,0,0,.65)}
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .card h2,:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .section-head h2{color:var(--legend);text-shadow:0 0 8px var(--legend-glow)}
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .mg.big .v{text-shadow:0 1px 0 rgba(0,0,0,.6)}
:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .flowsvg .fl{filter:drop-shadow(0 0 5px color-mix(in srgb,var(--flow) 50%,transparent))}
@media print{
  :root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]){color-scheme:light;
    --bg:#fff;--bg-2:#fff;--card:#fff;--card-2:#f5f5f5;--card-hi:#eee;--card-solid:#fff;
    --line:#ddd;--line-2:#ccc;--ink:#111;--ink-2:#333;--muted:#666;--faint:#999;
    --gold:#1d4ed8;--gold-hi:#1e3a8a;--ok:#15803d;--bad:#b91c1c;--warn:#b45309;--legend:#111;--legend-glow:transparent}
  :root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .card,:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .stat,:root:is([data-theme="depth"],[data-theme="silk"],[data-theme="forge"],[data-theme="holo"]) .stats.headline > .stat{box-shadow:none !important;background:#fff !important}
}

/* ------------------------------------------------------------------ Silk, Forge and Hologram, Sep 2026
   Three more of the 3D family: Silk from a fashion studio (aubergine drapes, a blueprint grid, cream
   keys), Forge from an orange-on-black robotics site (steel slabs, slanted orange keys), Hologram
   from a blockchain site (navy, glowing cyan borders, hexagons, HUD corner brackets). */
:root[data-theme="silk"]{
  color-scheme:dark;
  --bg:#0c0911;
  --bg-2:#130e1a;
  --card:rgba(29,21,38,.94);
  --card-2:rgba(8,5,12,.50);
  --card-hi:rgba(255,255,255,.08);
  --line:rgba(232,213,181,.12);
  --line-2:rgba(255,255,255,.14);
  --ink:#f6f1e8;
  --ink-2:#e4dac8;
  --muted:#c4b7a4;
  --faint:#9c8f7e;
  --gold:#e8d5b5;
  --gold-hi:#f5ead6;
  --gold-lo:#b89b6c;
  --gold-ink:#1a1208;
  --gold-tint:rgba(232,213,181,.12);
  --gold-line:rgba(232,213,181,.40);
  --gold-grad:linear-gradient(135deg,#f7eedf 0%,#e0c9a3 50%,#b89b6c 100%);
  --brand:var(--gold);
  --brand-dark:var(--gold-lo);
  --brand-tint:var(--gold-tint);
  --ok:#a3e635;
  --ok-bg:rgba(61,220,151,.12);
  --ok-line:rgba(61,220,151,.28);
  --warn:#fbbf24;
  --warn-bg:rgba(251,191,36,.12);
  --warn-line:rgba(251,191,36,.3);
  --bad:#fb7185;
  --bad-bg:rgba(255,133,133,.12);
  --bad-line:rgba(255,133,133,.3);
  --grey:#9aa1ab;
  --grey-bg:rgba(154,161,171,.12);
  --appbar-bg:rgba(19,14,26,.94);
  --nav-bg:rgba(19,14,26,.96);
  --seg-shadow:0 1px 3px rgba(0,0,0,.4);
  --shadow-lg:0 30px 80px rgba(0,0,0,.6);
  --pop-shadow:0 10px 30px rgba(0,0,0,.5);
  --label-shadow:0 1px 3px rgba(0,0,0,.9);
  --flow:#d8b4fe;
  --flow-wash:rgba(216,180,254,.14);
  --tank-a:#d8b4fe;
  --tank-b:#7c3aed;
  --spark-past:#9c8f7e;
  --spark-now:#e8d5b5;
  --heat-1:#1e3a8a;
  --heat-2:#2b52b8;
  --heat-3:#3b74e0;
  --heat-4:#6f9cf0;
  --heat-5:#a2c2f7;
  --heat-6:#d3e3fd;
  --radius:16px;
  --radius-sm:11px;
  --shadow:0 1px 0 rgba(255,255,255,.12) inset, 0 -2px 0 rgba(0,0,0,.30) inset, 0 7px 0 #06040a, 0 20px 32px -12px rgba(0,0,0,.75);
  --shadow-sm:0 1px 0 rgba(255,255,255,.12) inset, 0 -2px 0 rgba(0,0,0,.30) inset, 0 7px 0 #06040a, 0 20px 32px -12px rgba(0,0,0,.75);
  --nav-h:64px;
  --font:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --card-solid:#1d1526;
  --accent-rgb:232,213,181;
  --bar-fill:linear-gradient(180deg,#ede9fe 0%,#a78bfa 50%,#6d28d9 100%);
  --bar-today:linear-gradient(180deg,#5ef0b4 0%,var(--ok) 55%,#1f8f62 100%);
  --bar-near:linear-gradient(180deg,#fde68a 0%,#fbbf24 55%,#b7791f 100%);
  --bar-over:linear-gradient(180deg,#ffb3b3 0%,var(--bad) 55%,#a33 100%);
  --limit-fill:linear-gradient(90deg,#e9d5ff 0%,#7c3aed 100%);
  --limit-near:linear-gradient(90deg,#fde68a 0%,#fbbf24 100%);
  --limit-over:linear-gradient(90deg,#ffb3b3 0%,var(--bad) 100%);
  --surface:linear-gradient(180deg, rgba(232,213,181,.06) 0%, rgba(255,255,255,.015) 45%, rgba(0,0,0,.10) 100%);
  --lift:0 1px 0 rgba(255,255,255,.12) inset, 0 -2px 0 rgba(0,0,0,.30) inset, 0 7px 0 #06040a, 0 20px 32px -12px rgba(0,0,0,.75);
  --slab-edge:#06040a;
  --key-edge:#6e5431;
  --kc1-face:linear-gradient(160deg,#fbf6ec 0%,#e8d5b5 55%,#c9ab7c 100%);
  --kc1-edge:#7a5c34;
  --kc1-ink:#1a1208;
  --kc1-small:#3a2a14;
  --kc2-face:linear-gradient(160deg,#9b72bd 0%,#6b3f8f 50%,#4f2a70 100%);
  --kc2-edge:#2e1245;
  --kc2-ink:#ffffff;
  --kc2-small:#f1e7ff;
  --legend:#e8d5b5;
  --legend-glow:rgba(0,0,0,0);
}
:root[data-theme="silk"] body{position:relative}
:root[data-theme="silk"] body::before{position:absolute;inset:0;
  background:
    radial-gradient(700px 460px at 0% 320px, rgba(88,40,112,0.55) 0%, rgba(88,40,112,0) 64%) 0 0/100% 1400px repeat-y,
    radial-gradient(700px 460px at 100% 680px, rgba(64,30,88,0.50) 0%, rgba(64,30,88,0) 64%) 0 0/100% 1400px repeat-y,
    radial-gradient(700px 460px at 0% 1060px, rgba(110,58,138,0.32) 0%, rgba(110,58,138,0) 64%) 0 0/100% 1400px repeat-y,
    linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px) 0 0/28px 28px repeat,linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px) 0 0/28px 28px repeat,
    var(--bg)}
:root[data-theme="forge"]{
  color-scheme:dark;
  --bg:#0f0f10;
  --bg-2:#161617;
  --card:rgba(26,26,28,.95);
  --card-2:rgba(0,0,0,.45);
  --card-hi:rgba(255,255,255,.08);
  --line:rgba(255,122,46,.20);
  --line-2:rgba(255,255,255,.12);
  --ink:#f5f5f4;
  --ink-2:#dcd8d5;
  --muted:#b4aea9;
  --faint:#8d8681;
  --gold:#ff7a2e;
  --gold-hi:#ffa46b;
  --gold-lo:#e2560b;
  --gold-ink:#1a0900;
  --gold-tint:rgba(255,122,46,.14);
  --gold-line:rgba(255,122,46,.45);
  --gold-grad:linear-gradient(135deg,#ffb27a 0%,#ff7a2e 50%,#e2560b 100%);
  --brand:var(--gold);
  --brand-dark:var(--gold-lo);
  --brand-tint:var(--gold-tint);
  --ok:#4ade80;
  --ok-bg:rgba(61,220,151,.12);
  --ok-line:rgba(61,220,151,.28);
  --warn:#facc15;
  --warn-bg:rgba(251,191,36,.12);
  --warn-line:rgba(251,191,36,.3);
  --bad:#f87171;
  --bad-bg:rgba(255,133,133,.12);
  --bad-line:rgba(255,133,133,.3);
  --grey:#9aa1ab;
  --grey-bg:rgba(154,161,171,.12);
  --appbar-bg:rgba(15,15,16,.95);
  --nav-bg:rgba(15,15,16,.97);
  --seg-shadow:0 1px 3px rgba(0,0,0,.4);
  --shadow-lg:0 30px 80px rgba(0,0,0,.6);
  --pop-shadow:0 10px 30px rgba(0,0,0,.5);
  --label-shadow:0 1px 3px rgba(0,0,0,.9);
  --flow:#ff8a3d;
  --flow-wash:rgba(255,138,61,.14);
  --tank-a:#ffb27a;
  --tank-b:#e2560b;
  --spark-past:#8d8681;
  --spark-now:#ff7a2e;
  --heat-1:#1e3a8a;
  --heat-2:#2b52b8;
  --heat-3:#3b74e0;
  --heat-4:#6f9cf0;
  --heat-5:#a2c2f7;
  --heat-6:#d3e3fd;
  --radius:16px;
  --radius-sm:11px;
  --shadow:0 1px 0 rgba(255,255,255,.12) inset, 0 -2px 0 rgba(0,0,0,.30) inset, 0 7px 0 #070707, 0 20px 32px -12px rgba(0,0,0,.75);
  --shadow-sm:0 1px 0 rgba(255,255,255,.12) inset, 0 -2px 0 rgba(0,0,0,.30) inset, 0 7px 0 #070707, 0 20px 32px -12px rgba(0,0,0,.75);
  --nav-h:64px;
  --font:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --card-solid:#1a1a1c;
  --accent-rgb:255,122,46;
  --bar-fill:linear-gradient(180deg,#f5f5f4 0%,#a8a29e 50%,#57534e 100%);
  --bar-today:linear-gradient(180deg,#5ef0b4 0%,var(--ok) 55%,#1f8f62 100%);
  --bar-near:linear-gradient(180deg,#fef9c3 0%,#facc15 55%,#a16207 100%);
  --bar-over:linear-gradient(180deg,#ffb3b3 0%,var(--bad) 55%,#a33 100%);
  --limit-fill:linear-gradient(90deg,#ffb27a 0%,#ff7a2e 100%);
  --limit-near:linear-gradient(90deg,#fef08a 0%,#facc15 100%);
  --limit-over:linear-gradient(90deg,#ffb3b3 0%,var(--bad) 100%);
  --surface:linear-gradient(180deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,.012) 45%, rgba(0,0,0,.12) 100%);
  --lift:0 1px 0 rgba(255,255,255,.12) inset, 0 -2px 0 rgba(0,0,0,.30) inset, 0 7px 0 #070707, 0 20px 32px -12px rgba(0,0,0,.75);
  --slab-edge:#070707;
  --key-edge:#7c2d12;
  --kc1-face:linear-gradient(160deg,#ffcfa8 0%,#ff7a2e 55%,#e2560b 100%);
  --kc1-edge:#7c2d12;
  --kc1-ink:#1a0900;
  --kc1-small:#2a0f00;
  --kc2-face:linear-gradient(160deg,#fafaf9 0%,#d6d3d1 50%,#a8a29e 100%);
  --kc2-edge:#44403c;
  --kc2-ink:#1c1917;
  --kc2-small:#292524;
  --legend:#ff7a2e;
  --legend-glow:rgba(0,0,0,0);
}
:root[data-theme="forge"] body{position:relative}
:root[data-theme="forge"] body::before{position:absolute;inset:0;
  background:
    radial-gradient(700px 460px at 100% 340px, rgba(255,106,26,0.20) 0%, rgba(255,106,26,0) 64%) 0 0/100% 1400px repeat-y,
    radial-gradient(700px 460px at 0% 760px, rgba(255,140,60,0.10) 0%, rgba(255,140,60,0) 64%) 0 0/100% 1400px repeat-y,
    radial-gradient(700px 460px at 100% 1080px, rgba(255,106,26,0.16) 0%, rgba(255,106,26,0) 64%) 0 0/100% 1400px repeat-y,
    var(--bg)}
:root[data-theme="holo"]{
  color-scheme:dark;
  --bg:#040826;
  --bg-2:#070d33;
  --card:rgba(8,18,64,.72);
  --card-2:rgba(2,6,30,.50);
  --card-hi:rgba(125,211,252,.10);
  --line:rgba(56,189,248,.42);
  --line-2:rgba(125,211,252,.25);
  --ink:#eaf6ff;
  --ink-2:#cde6ff;
  --muted:#a9ccf0;
  --faint:#86a9d4;
  --gold:#67e8f9;
  --gold-hi:#a5f3fc;
  --gold-lo:#0891b2;
  --gold-ink:#021b33;
  --gold-tint:rgba(103,232,249,.14);
  --gold-line:rgba(103,232,249,.45);
  --gold-grad:linear-gradient(135deg,#a5f3fc 0%,#38bdf8 50%,#3b82f6 100%);
  --brand:var(--gold);
  --brand-dark:var(--gold-lo);
  --brand-tint:var(--gold-tint);
  --ok:#5eead4;
  --ok-bg:rgba(61,220,151,.12);
  --ok-line:rgba(61,220,151,.28);
  --warn:#fcd34d;
  --warn-bg:rgba(251,191,36,.12);
  --warn-line:rgba(251,191,36,.3);
  --bad:#fb7185;
  --bad-bg:rgba(255,133,133,.12);
  --bad-line:rgba(255,133,133,.3);
  --grey:#9aa1ab;
  --grey-bg:rgba(154,161,171,.12);
  --appbar-bg:rgba(4,8,38,.80);
  --nav-bg:rgba(4,8,38,.88);
  --seg-shadow:0 1px 3px rgba(0,0,0,.4);
  --shadow-lg:0 30px 80px rgba(0,0,0,.6);
  --pop-shadow:0 10px 30px rgba(0,0,0,.5);
  --label-shadow:0 1px 3px rgba(0,0,0,.9);
  --flow:#a5f3fc;
  --flow-wash:rgba(165,243,252,.14);
  --tank-a:#7dd3fc;
  --tank-b:#2563eb;
  --spark-past:#86a9d4;
  --spark-now:#67e8f9;
  --heat-1:#1e3a8a;
  --heat-2:#2b52b8;
  --heat-3:#3b74e0;
  --heat-4:#6f9cf0;
  --heat-5:#a2c2f7;
  --heat-6:#d3e3fd;
  --radius:16px;
  --radius-sm:11px;
  --shadow:0 1px 0 rgba(255,255,255,.12) inset, 0 -2px 0 rgba(0,0,0,.30) inset, 0 7px 0 #020518, 0 20px 32px -12px rgba(0,0,0,.75), 0 0 22px -6px rgba(56,189,248,.55);
  --shadow-sm:0 1px 0 rgba(255,255,255,.12) inset, 0 -2px 0 rgba(0,0,0,.30) inset, 0 7px 0 #020518, 0 20px 32px -12px rgba(0,0,0,.75), 0 0 16px -6px rgba(56,189,248,.5);
  --nav-h:64px;
  --font:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --card-solid:#0a1648;
  --accent-rgb:103,232,249;
  --bar-fill:linear-gradient(180deg,#bae6fd 0%,#38bdf8 50%,#1d4ed8 100%);
  --bar-today:linear-gradient(180deg,#5ef0b4 0%,var(--ok) 55%,#1f8f62 100%);
  --bar-near:linear-gradient(180deg,#fde68a 0%,#fbbf24 55%,#b7791f 100%);
  --bar-over:linear-gradient(180deg,#ffb3b3 0%,var(--bad) 55%,#a33 100%);
  --limit-fill:linear-gradient(90deg,#67e8f9 0%,#3b82f6 100%);
  --limit-near:linear-gradient(90deg,#fde68a 0%,#fbbf24 100%);
  --limit-over:linear-gradient(90deg,#ffb3b3 0%,var(--bad) 100%);
  --surface:linear-gradient(180deg, rgba(125,211,252,.10) 0%, rgba(125,211,252,.02) 45%, rgba(0,0,0,.10) 100%);
  --lift:0 1px 0 rgba(255,255,255,.12) inset, 0 -2px 0 rgba(0,0,0,.30) inset, 0 7px 0 #020518, 0 20px 32px -12px rgba(0,0,0,.75), 0 0 22px -6px rgba(56,189,248,.55);
  --slab-edge:#020518;
  --key-edge:#0c2a6b;
  --kc1-face:linear-gradient(160deg,#93c5fd 0%,#60a5fa 50%,#3b82f6 100%);
  --kc1-edge:#1e3a8a;
  --kc1-ink:#021533;
  --kc1-small:#061c40;
  --kc2-face:linear-gradient(160deg,#a5f3fc 0%,#22d3ee 50%,#0891b2 100%);
  --kc2-edge:#155e75;
  --kc2-ink:#01232b;
  --kc2-small:#032e38;
  --legend:#67e8f9;
  --legend-glow:rgba(103,232,249,.55);
}
:root[data-theme="holo"] body{position:relative}
:root[data-theme="holo"] body::before{position:absolute;inset:0;
  background:
    radial-gradient(700px 460px at 20% 320px, rgba(37,99,235,0.50) 0%, rgba(37,99,235,0) 64%) 0 0/100% 1400px repeat-y,
    radial-gradient(700px 460px at 100% 700px, rgba(56,189,248,0.30) 0%, rgba(56,189,248,0) 64%) 0 0/100% 1400px repeat-y,
    radial-gradient(700px 460px at 0% 1060px, rgba(99,102,241,0.40) 0%, rgba(99,102,241,0) 64%) 0 0/100% 1400px repeat-y,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98' viewBox='0 0 56 98'%3E%3Cpath d='M28 66L0 50V16L28 0l28 16v34L28 66zm0 32L0 82V66l28 16 28-16v16L28 98z' fill='none' stroke='%2360a5fa' stroke-opacity='.12'/%3E%3C/svg%3E") 0 0/56px 98px repeat,
    var(--bg)}
/* Silk: wide cream headings, each with a lime cross like a pattern-maker's mark */
:root[data-theme="silk"] .card h2,:root[data-theme="silk"] .section-head h2{letter-spacing:.15em}
:root[data-theme="silk"] .card h2::before{content:"+";color:#c7e36b;margin-right:9px;font-weight:400}

/* Forge: slanted keys like the reference's "Get Started" buttons - the slab is a slanted layer
   behind the label, so the label stays upright and the key keeps its edge and shadow */
:root[data-theme="forge"] .btn:not(.ghost):not(.grey):not(.danger){position:relative;isolation:isolate;background:none;box-shadow:none;
  border-radius:0;color:var(--gold-ink);padding-left:22px;padding-right:22px;transition:transform .08s ease}
:root[data-theme="forge"] .btn:not(.ghost):not(.grey):not(.danger)::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:3px;
  transform:skewX(-14deg);background-image:var(--gold-grad);
  box-shadow:0 1px 0 rgba(255,255,255,.45) inset, 0 -2px 0 rgba(0,0,0,.2) inset, 0 4px 0 var(--key-edge), 0 10px 18px -8px rgba(0,0,0,.6);
  transition:box-shadow .08s ease}
:root[data-theme="forge"] .btn:not(.ghost):not(.grey):not(.danger):active{transform:translateY(3px)}
:root[data-theme="forge"] .btn:not(.ghost):not(.grey):not(.danger):active::before{box-shadow:0 1px 0 rgba(255,255,255,.45) inset, 0 1px 0 var(--key-edge)}

/* Hologram: HUD corner brackets on every panel, and wide glowing headings */
:root[data-theme="holo"] .card{border-radius:10px;
  background-image:linear-gradient(var(--gold),var(--gold)),linear-gradient(var(--gold),var(--gold)),
    linear-gradient(var(--gold),var(--gold)),linear-gradient(var(--gold),var(--gold)),var(--surface);
  background-size:16px 2px,2px 16px,16px 2px,2px 16px,auto;
  background-position:left 7px top 7px,left 7px top 7px,right 7px bottom 7px,right 7px bottom 7px,0 0;
  background-repeat:no-repeat}
:root[data-theme="holo"] .card h2,:root[data-theme="holo"] .section-head h2{letter-spacing:.2em}


/* =====================================================================
   KOHINOOR — gold identity for the Dark and Light themes.
   In the Meters shell above, Dark and Light are indigo / sky blue.
   Kohinoor keeps Onyx & Gold, so these blocks come last and win over those
   values; the nine colourful themes use more specific selectors
   (:root[data-theme="…"]) and are left exactly as they are.
   ===================================================================== */
/* screen only: this block comes after the print block with the same weight,
   so in print it would win and put near-white text on white paper */
@media screen{
  :root{
    --bg:#07080a; --bg-2:#0d0f12;
    --card:rgba(255,255,255,.055); --card-2:rgba(255,255,255,.075); --card-hi:rgba(255,255,255,.115);
    --line:rgba(255,255,255,.12); --line-2:rgba(255,255,255,.20);
    --ink:#f6f3ec; --ink-2:#ddd6c6; --muted:#bdb5a3; --faint:#958d7c;
    --gold:#d9ad48; --gold-hi:#f0cc6e; --gold-lo:#a67f26; --gold-ink:#1a1305;
    --gold-tint:rgba(217,173,72,.16); --gold-line:rgba(217,173,72,.42);
    --gold-grad:linear-gradient(135deg,#f0cc6e 0%,#d9ad48 45%,#b8892c 100%);
    --appbar-bg:rgba(10,9,7,.58); --nav-bg:rgba(10,9,7,.66);
    --card-solid:#16140f;
    --accent-rgb:217,173,72;
  }
}
:root[data-theme="light"]{
  --bg:#f4ecdd; --bg-2:#ece2cf;
  --card:rgba(255,255,255,.50); --card-2:rgba(255,255,255,.58); --card-hi:rgba(255,255,255,.70);
  --line:rgba(255,255,255,.72); --line-2:rgba(60,42,10,.15);
  --ink:#1c160a; --ink-2:#372c1a; --muted:#54493a; --faint:#6e6250;
  --gold:#8a6516; --gold-hi:#6f500f; --gold-lo:#a67f26; --gold-ink:#1a1305;
  --gold-tint:rgba(166,127,38,.13); --gold-line:rgba(138,101,22,.38);
  --gold-grad:linear-gradient(135deg,#ecc874 0%,#cf9d35 50%,#a67f26 100%);
  --shadow:0 1px 0 rgba(255,255,255,.75) inset, 0 12px 36px -14px rgba(110,80,20,.30);
  --shadow-sm:0 1px 0 rgba(255,255,255,.7) inset, 0 8px 22px -12px rgba(110,80,20,.26);
  --lift:0 1px 0 rgba(255,255,255,.75) inset, 0 12px 36px -14px rgba(110,80,20,.30);
  --card-solid:#ffffff;
  --accent-rgb:166,127,38;
  --bar-fill:linear-gradient(180deg,#f0cc6e 0%,#cf9d35 45%,#8a6516 100%);
  --limit-fill:linear-gradient(90deg,#cf9d35 0%,#8a6516 100%);
}
@media (prefers-color-scheme: light){
  :root:not([data-theme]){
    --bg:#f4ecdd; --bg-2:#ece2cf;
    --card:rgba(255,255,255,.50); --card-2:rgba(255,255,255,.58); --card-hi:rgba(255,255,255,.70);
    --line:rgba(255,255,255,.72); --line-2:rgba(60,42,10,.15);
    --ink:#1c160a; --ink-2:#372c1a; --muted:#54493a; --faint:#6e6250;
    --gold:#8a6516; --gold-hi:#6f500f; --gold-lo:#a67f26; --gold-ink:#1a1305;
    --gold-tint:rgba(166,127,38,.13); --gold-line:rgba(138,101,22,.38);
    --gold-grad:linear-gradient(135deg,#ecc874 0%,#cf9d35 50%,#a67f26 100%);
    --shadow:0 1px 0 rgba(255,255,255,.75) inset, 0 12px 36px -14px rgba(110,80,20,.30);
    --shadow-sm:0 1px 0 rgba(255,255,255,.7) inset, 0 8px 22px -12px rgba(110,80,20,.26);
    --lift:0 1px 0 rgba(255,255,255,.75) inset, 0 12px 36px -14px rgba(110,80,20,.30);
    --card-solid:#ffffff;
    --accent-rgb:166,127,38;
    --bar-fill:linear-gradient(180deg,#f0cc6e 0%,#cf9d35 45%,#8a6516 100%);
    --limit-fill:linear-gradient(90deg,#cf9d35 0%,#8a6516 100%);
  }
}
/* the page's lit backdrop, in warm gold instead of indigo */
body::before{
  background:
    radial-gradient(620px 420px at 6% -4%, rgba(217,173,72,.26) 0%, rgba(217,173,72,0) 60%),
    radial-gradient(520px 380px at 98% 12%, rgba(240,204,110,.13) 0%, rgba(240,204,110,0) 62%),
    radial-gradient(640px 460px at 2% 52%, rgba(166,127,38,.18) 0%, rgba(166,127,38,0) 62%),
    radial-gradient(580px 430px at 100% 74%, rgba(184,137,44,.15) 0%, rgba(184,137,44,0) 62%),
    radial-gradient(660px 480px at 30% 104%, rgba(217,173,72,.12) 0%, rgba(217,173,72,0) 62%);
}
:root[data-theme="light"] body::before{
  background:
    radial-gradient(640px 460px at 4% -4%, rgba(240,204,110,.34) 0%, rgba(240,204,110,0) 64%),
    radial-gradient(600px 440px at 99% 12%, rgba(255,200,140,.28) 0%, rgba(255,200,140,0) 64%),
    radial-gradient(640px 480px at 0% 55%, rgba(226,184,96,.22) 0%, rgba(226,184,96,0) 64%),
    radial-gradient(620px 460px at 100% 80%, rgba(255,222,170,.34) 0%, rgba(255,222,170,0) 64%);
}
@media (prefers-color-scheme: light){
  :root:not([data-theme]) body::before{
    background:
      radial-gradient(640px 460px at 4% -4%, rgba(240,204,110,.34) 0%, rgba(240,204,110,0) 64%),
      radial-gradient(600px 440px at 99% 12%, rgba(255,200,140,.28) 0%, rgba(255,200,140,0) 64%),
      radial-gradient(640px 480px at 0% 55%, rgba(226,184,96,.22) 0%, rgba(226,184,96,0) 64%),
      radial-gradient(620px 460px at 100% 80%, rgba(255,222,170,.34) 0%, rgba(255,222,170,0) 64%);
  }
}
/* Meters paints the event tile's figure sky blue in Light; gold here */
:root[data-theme="light"] .stat.evt .value{color:var(--gold-hi)}
@media (prefers-color-scheme: light){ :root:not([data-theme]) .stat.evt .value{color:var(--gold-hi)} }
/* Meters' Light buttons use white text and a blue shadow (right for its blue
   buttons); on Kohinoor's gold that is low contrast, so dark ink, warm shadow */
:root[data-theme="light"] .btn:not(.ghost):not(.grey):not(.danger){color:var(--gold-ink);
  box-shadow:0 1px 0 rgba(255,255,255,.45) inset, 0 8px 20px -10px rgba(138,101,22,.7)}
@media (prefers-color-scheme: light){ :root:not([data-theme]) .btn:not(.ghost):not(.grey):not(.danger){color:var(--gold-ink);
  box-shadow:0 1px 0 rgba(255,255,255,.45) inset, 0 8px 20px -10px rgba(138,101,22,.7)} }
/* the progress-bar track in a warm tint rather than slate grey */
:root[data-theme="light"] .bar{background:rgba(60,42,10,.12)}
@media (prefers-color-scheme: light){ :root:not([data-theme]) .bar{background:rgba(60,42,10,.12)} }

/* =====================================================================
   KOHINOOR additions — pieces the Meters shell does not have. Colours come
   from the theme tokens, so they follow whichever theme is chosen.
   ===================================================================== */
.flash.warn{background:var(--gold-tint);color:var(--gold-hi);border-color:var(--gold-line)}
.btn.warn{background:var(--gold-grad);color:var(--gold-ink)}

/* default-password reminder */
.pwbanner{display:flex;align-items:center;gap:10px;margin:0 0 12px;padding:10px 12px;border-radius:12px;
  background:var(--gold-tint);border:1px solid var(--gold-line);color:var(--gold-hi);font-size:13px;font-weight:600;
  position:relative;z-index:1}
.pwbanner span{flex:1;min-width:0}
.pwbanner .pwb-act{white-space:nowrap;background:var(--gold-grad);color:var(--gold-ink);
  padding:7px 11px;border-radius:9px;font-weight:800;font-size:12.5px}
.pwbanner .pwb-x{flex:0 0 auto;background:none;border:none;color:var(--gold-hi);font-size:20px;
  line-height:1;padding:0 2px;cursor:pointer;opacity:.75}

/* WhatsApp share keeps WhatsApp's own green in every theme; !important holds it
   against the themes' own button paint (glass, keycaps, overlays). */
.btn.wa{display:flex;align-items:center;justify-content:center;gap:9px;font-weight:800;
  background:#25d366 !important;color:#07140c !important;border:1px solid #1faa52 !important;
  text-shadow:none !important}
.btn.wa::before,.btn.wa::after{display:none !important}
.btn.wa:active{background:#1da851 !important}
.wa-i{width:19px;height:19px;flex:0 0 19px;background:center/contain no-repeat;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2307140c'><path d='M19.05 4.91A9.82 9.82 0 0 0 12.04 2C6.58 2 2.13 6.45 2.13 11.91c0 1.75.46 3.45 1.32 4.95L2 22l5.25-1.38a9.9 9.9 0 0 0 4.79 1.22c5.46 0 9.91-4.45 9.91-9.91 0-2.65-1.03-5.14-2.92-7.02zM12.04 20.15a8.2 8.2 0 0 1-4.18-1.15l-.3-.18-3.11.82.83-3.03-.2-.31a8.2 8.2 0 0 1-1.26-4.36c0-4.54 3.7-8.24 8.24-8.24 2.2 0 4.27.86 5.82 2.42a8.19 8.19 0 0 1 2.41 5.83c0 4.54-3.69 8.23-8.23 8.23zm4.52-6.16c-.25-.12-1.47-.72-1.69-.81-.23-.08-.39-.12-.56.12-.17.25-.64.81-.79.98-.14.17-.29.19-.54.06-.25-.12-1.05-.39-1.99-1.23-.74-.66-1.23-1.47-1.38-1.72-.14-.25-.02-.38.11-.51.11-.11.25-.29.37-.43.12-.14.17-.25.25-.42.08-.17.04-.31-.02-.43-.06-.12-.56-1.34-.76-1.84-.2-.48-.41-.42-.56-.43h-.48c-.17 0-.43.06-.66.31-.23.25-.87.85-.87 2.07 0 1.22.89 2.4 1.01 2.56.12.17 1.75 2.67 4.23 3.74.59.26 1.05.41 1.41.52.59.19 1.13.16 1.56.1.48-.07 1.47-.6 1.68-1.18.21-.58.21-1.07.14-1.18-.06-.11-.22-.17-.47-.29z'/></svg>")}

/* calendar: taken dates carry a solid label pill (text in the theme's opaque
   card colour, so it reads on the red / amber pill in light and dark themes) */
.cell.booked{justify-content:flex-start;padding-top:5px}
.cell.confirmed{background:var(--bad-bg);background:color-mix(in srgb,var(--bad) 17%,transparent)}
.cell.tentative{background:var(--warn-bg);background:color-mix(in srgb,var(--warn) 17%,transparent)}
.cell .dnum{line-height:1}
.cell .tag{position:absolute;left:4px;right:4px;bottom:4px;padding:1px 2px;border-radius:6px;
  font-size:8.5px;font-weight:800;letter-spacing:.02em;text-transform:uppercase;text-align:center;
  line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cell .tag-confirmed{background:var(--bad);color:var(--card-solid)}
.cell .tag-tentative{background:var(--warn);color:var(--card-solid)}

/* ---------- theme picker (Settings → Appearance), same as Meters ---------- */
.themeseg{display:flex;gap:4px;padding:4px;border-radius:12px;background:var(--bg-2);border:1px solid var(--line)}
.themeseg button{flex:1;appearance:none;-webkit-appearance:none;border:0;background:transparent;color:var(--ink-2);font:inherit;font-size:14px;font-weight:600;padding:9px 6px;border-radius:9px;cursor:pointer}
.themeseg button.on{background:var(--card-hi);color:var(--gold-hi);box-shadow:var(--seg-shadow)}
.themeseg button:focus-visible{outline:2px solid var(--gold);outline-offset:1px}
.themegrid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:6px}
.themegrid button{display:flex;flex-direction:column;align-items:center;gap:6px;padding:7px 4px 6px;font-size:12.5px}
.themegrid button.on{box-shadow:0 0 0 2px var(--gold),var(--seg-shadow)}
.tsw{position:relative;display:block;width:100%;aspect-ratio:5/4;border-radius:9px;overflow:hidden;box-shadow:inset 0 0 0 1px rgba(127,127,127,.28)}
.tsw::before{content:"";position:absolute;left:14%;right:14%;top:20%;height:36%;border-radius:5px;background:var(--sw-card);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.3)}
.tsw::after{content:"";position:absolute;left:20%;bottom:16%;width:38%;height:11%;border-radius:99px;background:var(--sw-acc)}
.tsw-system{background:linear-gradient(135deg,#e4ecf7 0 50%,#06070f 50% 100%);--sw-card:rgba(255,255,255,.45);--sw-acc:linear-gradient(90deg,#38bdf8,#6472dd)}
.tsw-light{background:radial-gradient(80% 70% at 15% 10%,rgba(125,211,252,.6),transparent 70%),#e4ecf7;--sw-card:rgba(255,255,255,.7);--sw-acc:linear-gradient(90deg,#38bdf8,#0369a1)}
.tsw-dark{background:radial-gradient(80% 70% at 15% 10%,rgba(124,92,255,.55),transparent 70%),#06070f;--sw-card:rgba(255,255,255,.08);--sw-acc:linear-gradient(90deg,#d7dcff,#6472dd)}
.tsw-vivid{background:radial-gradient(70% 60% at 10% 10%,rgba(236,72,153,.75),transparent 70%),radial-gradient(70% 60% at 95% 90%,rgba(6,182,212,.65),transparent 70%),#140a33;--sw-card:rgba(20,12,56,.45);--sw-acc:linear-gradient(90deg,#f5d0fe,#818cf8)}
.tsw-neon{background:radial-gradient(70% 60% at 10% 10%,rgba(236,72,153,.45),transparent 70%),radial-gradient(70% 60% at 95% 95%,rgba(34,211,238,.4),transparent 70%),#0e1016;--sw-card:#1a1e29;--sw-acc:linear-gradient(90deg,#f9a8d4,#67e8f9)}
.tsw-peach{background:radial-gradient(60% 55% at 85% 20%,rgba(255,170,120,.7),transparent 70%),#fbeee4;--sw-card:rgba(255,255,255,.65);--sw-acc:linear-gradient(90deg,#ffc9a8,#fb7c4c)}
.tsw-prism{background:linear-gradient(135deg,#93c5fd 0%,#c4b5fd 50%,#fdba74 100%);--sw-card:rgba(255,255,255,.5);--sw-acc:linear-gradient(90deg,#fdba74,#d8b4fe,#93c5fd)}
.tsw-ember{background:radial-gradient(70% 60% at 10% 10%,rgba(79,70,229,.7),transparent 70%),radial-gradient(60% 50% at 20% 95%,rgba(245,158,11,.55),transparent 70%),#0b0b1e;--sw-card:rgba(16,16,44,.55);--sw-acc:linear-gradient(90deg,#fef3c7,#f59e0b)}
.tsw-depth{background:radial-gradient(70% 60% at 90% 15%,rgba(255,90,60,.35),transparent 70%),#12161f;
  --sw-card:linear-gradient(180deg,#2e3649,#262d3d);--sw-acc:linear-gradient(90deg,#f472b6,#a78bfa,#60a5fa)}
.tsw-depth::before{box-shadow:0 4px 0 #0b0e15, inset 0 1px 0 rgba(255,255,255,.18)}
.tsw-depth::after{box-shadow:0 3px 0 #3b2a6b}
.tsw-silk{background:linear-gradient(rgba(255,255,255,.06) 1px,transparent 1px) 0 0/8px 8px,linear-gradient(90deg,rgba(255,255,255,.06) 1px,transparent 1px) 0 0/8px 8px,
  radial-gradient(70% 70% at 10% 20%,rgba(88,40,112,.8),transparent 70%),#0c0911;
  --sw-card:linear-gradient(180deg,#261c31,#1d1526);--sw-acc:linear-gradient(90deg,#f7eedf,#b89b6c)}
.tsw-silk::before,.tsw-forge::before,.tsw-holo::before{box-shadow:0 4px 0 #050307, inset 0 1px 0 rgba(255,255,255,.14)}
.tsw-forge{background:radial-gradient(70% 60% at 95% 15%,rgba(255,106,26,.45),transparent 70%),#0f0f10;
  --sw-card:#1a1a1c;--sw-acc:linear-gradient(90deg,#ffb27a,#ff7a2e)}
.tsw-forge::before{box-shadow:0 4px 0 #050505, inset 0 0 0 1px rgba(255,122,46,.4)}
.tsw-forge::after{transform:skewX(-14deg)}
.tsw-holo{background:radial-gradient(70% 60% at 25% 20%,rgba(37,99,235,.8),transparent 70%),radial-gradient(60% 50% at 90% 90%,rgba(56,189,248,.45),transparent 70%),#040826;
  --sw-card:rgba(8,18,64,.8);--sw-acc:linear-gradient(90deg,#a5f3fc,#3b82f6)}
.tsw-holo::before{box-shadow:0 4px 0 #020518, inset 0 0 0 1px rgba(56,189,248,.7), 0 0 10px rgba(56,189,248,.5)}
/* Kohinoor's System / Light / Dark swatches show gold, not Meters' blue */
.tsw-system{background:linear-gradient(135deg,#f4ecdd 0 50%,#07080a 50% 100%);--sw-card:rgba(255,255,255,.45);--sw-acc:linear-gradient(90deg,#f0cc6e,#a67f26)}
.tsw-light{background:radial-gradient(80% 70% at 15% 10%,rgba(240,204,110,.6),transparent 70%),#f4ecdd;--sw-card:rgba(255,255,255,.7);--sw-acc:linear-gradient(90deg,#ecc874,#8a6516)}
.tsw-dark{background:radial-gradient(80% 70% at 15% 10%,rgba(217,173,72,.45),transparent 70%),#07080a;--sw-card:rgba(255,255,255,.08);--sw-acc:linear-gradient(90deg,#f0cc6e,#b8892c)}
