/* Current apps: three themes, the band with the coin logo, and the theme switcher.
   Taken from Current actions (theme.css, DEC-20261203-JOELYANG-01) for Current's other apps, 3 Dec 2026.
   Load it after the app's own styles. It resets the house tokens, so each app's rules follow it.
   - institutional ("Light"): navy band, gold kicker, white rows, pastel status tints (the default;
     Joel, 3 Dec: "exactly match" Current actions as he sees it live; reference in ../reference/)
   - pastel: kept defined for Current actions' old choice; not in the switcher
   - green: bottle green band on pale green pages; defined but not offered in the apps (Joel, 3 Dec:
     green "only works if it.s a full site", so it is for the website)
   - dark: a soft slate dark with the pastel accents
   The page starts on Light whatever the Mac's setting; Dark is chosen, never automatic.
   App-specific touches live in each app, not here. */

:root { color-scheme: light; --on-accept: #ffffff; }

/* ---------- Light (Institutional): the default, value for value as Current actions 4a5b96e6 ----------
   Tokens it doesn't set (--line, --current-blue, shadows) come from the app's own tokens.css, as on Current actions. */
:root, :root[data-skin="institutional"] {
  --vellum: #fbf9f4; --paper: #ffffff; --cream: #f5f0e4; --mist: #f4f2ec;
  --rule: #e8e1d1; --rule-strong: #b8a678; --slate: #434e62; --haze: #8a93a3;
  --ink: #0b1b34; --ink-body: #1c2940;
  --gold: #c9a54e; --gold-ink: #7d5f18;
  --navy: #0b1b34; --navy-deep: #1c3561; --on-navy: #ffffff; --on-navy-muted: #c7c0ae;
  --gain: #0b7a55; --gain-tint: #e4f4ec; --loss: #b4410f; --loss-tint: #fcece3;
  --band: #0b1b34; --band-ink: #f3efe4; --band-muted: #c7c0ae; --band-accent: #c9a54e;
  --logo-1: #eef1ea; --logo-2: #c5d1c8; --logo-3: #aab9e8; --logo-word: #f3efe4;
  --row-line: #ebe4d6; --row-hover: #fffdf8; --tick-ring: #9099a8;
  --done: #0b7a55; --done-tint: #e4f4ec;
  --late-tint: #fcece3; --today: #8a5f00; --today-tint: #fdf3d8;
  --accept: #2a44c4; --accept-tint: #f0f3fe; --accept-line: #cdd5f7;
  --neutral-tint: #f1eee6; --nav-active: #f1eadb;
  --shadow-lift: 0 2px 4px rgba(11,27,52,0.06), 0 16px 36px rgba(11,27,52,0.14);
}

/* ---------- Pastel ---------- */
:root[data-skin="pastel"] {
  --vellum: #fbfaff; --paper: #ffffff; --cream: #f3f1fc; --mist: #f4f3fa;
  --rule: #ebe8f5; --rule-strong: #c6bfe0; --slate: #4d5270; --haze: #9196b0;
  --line: #ebe8f5; --line-control: #a7a3c4;
  --ink: #1f2340; --ink-body: #2a2f4d;
  --gold: #9b8ae6; --gold-ink: #5646b8;
  --navy: #4a3fae; --navy-deep: #3a3092; --on-navy: #ffffff; --on-navy-muted: #d8d3f5; --on-navy-body: #ece9fb;
  --current-blue: #3f4fd6; --on-current-blue: #ffffff; --blue-deep: #2f3cb0; --blue-tint: #eef0fe; --focus-ring: #d0d5fb;
  --gain: #23825f; --gain-tint: #e1f5ea; --loss: #c0532a; --loss-tint: #fde8de;
  --band: linear-gradient(115deg, #ece8fd 0%, #e5f4ee 55%, #fdf0e3 100%);
  --band-ink: #1f2340; --band-muted: #4d5270; --band-accent: #5646b8;
  --logo-1: #0f2f27; --logo-2: #7d8f86; --logo-3: #243f8f; --logo-word: #1f2340;
  --row-line: #ece9f6; --row-hover: #fcfbff; --tick-ring: #a7a3c4;
  --done: #2f9a72; --done-tint: #e1f5ea;
  --late-tint: #fde8de; --today: #8a6400; --today-tint: #fff3c9;
  --accept: #5646b8; --accept-tint: #f0edfe; --accept-line: #d9d2fa;
  --neutral-tint: #eef0f8; --nav-active: #ece8fd;
  --shadow-float: 0 1px 2px rgba(31,35,64,0.04), 0 12px 32px rgba(31,35,64,0.08);
  --shadow-lift: 0 2px 4px rgba(31,35,64,0.05), 0 16px 36px rgba(31,35,64,0.12);
}

/* ---------- Current green ---------- */
:root[data-skin="green"] {
  --vellum: #f3f6f1; --paper: #ffffff; --cream: #e9efe6; --mist: #eef2ec;
  --rule: #dce4d9; --rule-strong: #9db0a3; --slate: #46574f; --haze: #8a9a91;
  --line: #dce4d9; --line-control: #8fa198;
  --ink: #0f2f27; --ink-body: #1d3a32;
  --gold: #3f5bbf; --gold-ink: #243f8f;
  --navy: #0f2f27; --navy-deep: #1b4a3d; --on-navy: #eef1ea; --on-navy-muted: #c5d1c8; --on-navy-body: #dfe6df;
  --current-blue: #243f8f; --on-current-blue: #ffffff; --blue-deep: #1a2f6e; --blue-tint: #ebeffb; --focus-ring: #cbd4f2;
  --gain: #1f7a55; --gain-tint: #e0f1e6; --loss: #b4410f; --loss-tint: #fbebe3;
  --band: #0f2f27; --band-ink: #eef1ea; --band-muted: #c5d1c8; --band-accent: #aab9e8;
  --logo-1: #eef1ea; --logo-2: #c5d1c8; --logo-3: #aab9e8; --logo-word: #eef1ea;
  --row-line: #e1e8de; --row-hover: #fbfdfa; --tick-ring: #8fa198;
  --done: #1f7a55; --done-tint: #e0f1e6;
  --late-tint: #fbebe3; --today: #855f00; --today-tint: #fbf2d4;
  --accept: #243f8f; --accept-tint: #ebeffb; --accept-line: #cbd4f2;
  --neutral-tint: #edf1ea; --nav-active: #e3ebe0;
  --shadow-float: 0 1px 2px rgba(15,47,39,0.05), 0 12px 32px rgba(15,47,39,0.08);
  --shadow-lift: 0 2px 4px rgba(15,47,39,0.06), 0 16px 36px rgba(15,47,39,0.13);
}

/* ---------- Dark ---------- */
:root[data-skin="dark"] {
  color-scheme: dark; --on-accept: #15182a;
  --vellum: #181c2b; --paper: #20253a; --cream: #2a3049; --mist: #232840;
  --rule: #2f354f; --rule-strong: #4b5277; --slate: #b6bad2; --haze: #858ca9;
  --line: #2f354f; --line-control: #6f7699;
  --ink: #f2f1fb; --ink-body: #dedded;
  --gold: #b9abf6; --gold-ink: #cbc0fd;
  --navy: #9d8ef0; --navy-deep: #b2a6f6; --on-navy: #15182a; --on-navy-muted: #3a3560; --on-navy-body: #15182a;
  --current-blue: #8ea0ff; --on-current-blue: #15182a; --blue-deep: #b3c0ff; --blue-tint: #262c50; --focus-ring: #3a4a8c;
  --gain: #6fd3a7; --gain-tint: #183a2e; --loss: #f49d7a; --loss-tint: #3e2419;
  --band: linear-gradient(115deg, #272b4a 0%, #1f3632 55%, #3b2f2a 100%);
  --band-ink: #f2f1fb; --band-muted: #b6bad2; --band-accent: #cbc0fd;
  --logo-1: #eef1ea; --logo-2: #c5d1c8; --logo-3: #aab9e8; --logo-word: #f2f1fb;
  --row-line: #2d334f; --row-hover: #262c45; --tick-ring: #6f7699;
  --done: #5cc797; --done-tint: #183a2e;
  --late-tint: #3e2419; --today: #f2c75e; --today-tint: #3a3117;
  --accept: #b3a6ff; --accept-tint: #262647; --accept-line: #403c72;
  --neutral-tint: #2a2f48; --nav-active: #30355a;
  --shadow-float: 0 1px 2px rgba(0,0,0,0.3), 0 12px 32px rgba(0,0,0,0.45);
  --shadow-lift: 0 2px 4px rgba(0,0,0,0.35), 0 16px 36px rgba(0,0,0,0.5);
  --on-navy-body: #15182a; --mist-strong: #2a3049; --line-strong: #4b5277;
  --warn: #f2c75e; --warn-tint: #3a3117; --critical: #f49d7a; --critical-tint: #3e2419;
}

body { background: var(--vellum); color: var(--ink-body); }

/* ---------- Band: logo, theme switcher ---------- */
.band { background: var(--band); color: var(--band-ink); }
.band .cfx-kicker, .band__link, .band__meta a { color: var(--band-accent); }
.band__title { color: var(--band-ink); }
.band__lede { color: var(--band-ink); }
.band__meta { color: var(--band-muted); }
.band__top { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.band__rule { height: 6px; border-top: 1px solid var(--band-accent); border-bottom: 1px solid var(--band-accent); background: var(--band); }
:root[data-skin="pastel"] .band__rule { height: 1px; border: 0; background: var(--rule-strong); }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo__coin { width: 30px; height: 30px; flex: none; }
.logo__coin .c1 { stroke: var(--logo-1); } .logo__coin .c2 { stroke: var(--logo-2); } .logo__coin .c3 { stroke: var(--logo-3); }
.logo__word { font-family: "Archivo", var(--font-sans); font-weight: 500; font-stretch: 94%; letter-spacing: -0.025em; font-size: 24px; line-height: 1; color: var(--logo-word); }

.skins { display: inline-flex; align-items: center; gap: 6px; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--band-ink) 10%, transparent); margin-left: auto; }
.skins:empty { display: none; }
.skins__label { font-family: var(--font-sans); font-size: 12.5px; color: var(--band-muted); padding: 0 6px 0 8px; }
.skin { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; position: relative; }
.skin[aria-pressed="true"] { border-color: var(--band-ink); box-shadow: 0 0 0 2px color-mix(in srgb, var(--band-ink) 25%, transparent); }
.skin:focus-visible { outline: 2px solid var(--band-accent); outline-offset: 2px; }
.skin--institutional { background: linear-gradient(135deg, #0b1b34 50%, #c9a54e 50%); }
.skin--pastel { background: conic-gradient(#ece8fd 0 33%, #d9f0e6 0 66%, #fde6cf 0); }
.skin--green { background: linear-gradient(135deg, #0f2f27 50%, #aab9e8 50%); }
.skin--dark { background: linear-gradient(135deg, #181c2b 50%, #b3a6ff 50%); }
@media (max-width: 640px) { .skins__label { display: none; } }

/* A slim top bar used as the band (apps whose header is one row): the same two gold lines below it. */
.band-bar { background: var(--band); color: var(--band-ink); }
.band-bar::after { content: ""; display: block; height: 6px; border-top: 1px solid var(--band-accent); border-bottom: 1px solid var(--band-accent); background: var(--band); }
:root[data-skin="pastel"] .band-bar::after { height: 1px; border: 0; background: var(--rule-strong); }

/* ---------- Shared touches, Things-like ---------- */
:focus-visible { outline-color: var(--accept); }
.cfx-btn { border-radius: 10px; transition: background-color .12s, border-color .12s, color .12s, transform .08s; }
.cfx-btn:active { transform: translateY(1px); }
.cfx-btn--outline { border-color: var(--rule-strong); background: var(--paper); }
.cfx-btn--outline:hover { border-color: var(--ink); background: var(--cream); }
@media (prefers-reduced-motion: reduce) { .cfx-btn, .cfx-btn:active { transition: none; transform: none; } }

/* ---------- Standard monitors (Joel, 3 Dec 2026; from Current actions) ----------
   The look was tuned on a MacBook Pro (Retina, wide colour). On an ordinary 1x sRGB monitor the
   soft tints wash out to white, hairline dotted rules blur, and thin serif and small light text
   look rough. These values hold up there without changing the look on a MacBook. Each app's
   theme-touches.css adds the same treatment for its own selectors. */

/* Tints and row lines a step stronger */
:root, :root[data-skin="institutional"] {
  --rule: #e0d7c3; --row-line: #e2d9c6; --row-hover: #fdf8ec;
  --late-tint: #fae0d2; --today-tint: #fbeac0; --done-tint: #d8efe2;
  --accept-tint: #e7ecfd; --accept-line: #bcc8f4; --neutral-tint: #ece7db; --nav-active: #ede3cf;
  --tick-ring: #7f8899;
}
:root[data-skin="green"] {
  --rule: #d3ddd0; --row-line: #d7e0d3; --row-hover: #f8fbf6;
  --late-tint: #f8dfd2; --today-tint: #f8e9bf; --done-tint: #d4ebdc;
  --accept-tint: #e1e7f9; --accept-line: #bcc7ee; --neutral-tint: #e4ebe0; --nav-active: #dbe5d7;
  --tick-ring: #7d9087;
}
:root[data-skin="dark"] {
  --row-line: #363d5c; --rule: #363d5c; --accept-line: #4a4685; --tick-ring: #7d84a8;
}

/* Solid 1px lines instead of hairline dotted ones (the shared ledger table) */
.cfx-ledger td { border-bottom-style: solid; border-bottom-color: var(--rule); }

/* Small text a touch larger; mono labels at 12px */
.cfx-kicker { font-size: 12px; font-weight: 500; }
.cfx-ledger th { font-size: 12px; font-weight: 500; }
.band__meta { font-size: 14.5px; }
.skins__label { font-size: 13px; }
