/* Themes (owner, 2026-10-16: "a handful of different themes the team can choose from"; then "tweak everything about
   the UI in different themes, rounded corners to square, thin to thick, really try and give a variety"). Settings →
   Themes opens a carousel (web/app/ui/themes.js). The chosen theme is <html data-look="…">, set before the page draws
   by web/index.html. No data-look = "Peddys", the original look in app.css (nothing here touches it), which follows
   Appearance (light / dark).

   How it works: every look sets the DESIGN TOKENS below (colours, font, size, corners, border weights, shadows,
   spacing, heading/button/tag styles, header and nav bar); the SHAPE LAYER turns them into rules. The shape layer
   is wrapped in :where(:root[data-look]) so its rules weigh the same as app.css's plain ones (a class): they win over
   `.card` or `.btn` (this file loads later) but app.css's more specific rules (`.rows.card`, `.hd-actions .btn`,
   the [data-theme="dark"] ones) still win, so special cases keep working. A few looks add their own rules at the end.
   Night forces data-theme="dark" (every dark rule in app.css applies); Big & bold, Pool, Clean, Workshop,
   Brutalist, Soft and Classic force light; Compact follows Appearance. Red stays red in every look (--danger, the
   counts), and the status badges keep their own colours. */

/* ==== DESIGN TOKENS: the defaults are app.css's own values (a look changes only what it needs) ==== */
:root[data-look] {
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: var(--font-ui);
  --z: 1; /* the whole app's size: zoom on <body> */
  --lh: 1.45;
  --ls: normal;
  --body-w: 400;
  /* headings */
  --head-w: 700;
  --head-case: none;
  --head-caps: normal; /* small-caps */
  --head-ls: normal;
  /* cards */
  --card-r: var(--radius);
  --card-bw: 0px;
  --card-bc: var(--line);
  --card-stripe: 0px; /* a coloured left edge */
  --card-stripe-c: var(--card-bc);
  --card-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
  --card-pad: 16px;
  --card-gap: 14px;
  --hd-bw: max(1px, var(--card-bw)); /* Help Desk cards keep a hairline unless a look drops it */
  --main-pad: 16px;
  --row-pad: 10px;
  --row-bw: 1px;
  /* buttons, tabs, the List | Map switch */
  --btn-r: 10px;
  --btn-bw: 1px;
  --btn-w: 600;
  --btn-case: none;
  --btn-ls: normal;
  --btn-shadow: none;
  --btn-press: none;
  --tab-r: 999px;
  /* inputs: --in-bw can be one width (a box) or "0 0 2px" (an underline) */
  --in-r: 10px;
  --in-bw: 1px;
  /* badges, chips, the Help Desk card's kind / status tags */
  --tag-r: 999px;
  --tag-w: 500;
  --tag-case: none;
  --tag-ls: normal;
  --tag-ring: 0px; /* an outline in the text's own colour */
  /* the red counts */
  --count-r: 10px;
  --count-ring: none;
  /* the header (top bar) */
  --top-bg: var(--card);
  --top-fg: var(--text);
  --top-muted: var(--muted);
  --top-line: var(--line);
  --top-hover: var(--bg);
  --top-bw: 1px;
  --top-bc: var(--line);
  --top-shadow: none;
  --mark-bg: var(--accent);
  --mark-fg: #fff;
  --mark-r: 7px;
  /* the nav bar (bottom on phones, under the header on a computer) */
  --nav-bg: var(--card);
  --nav-fg: var(--muted);
  --nav-active: var(--accent-dark);
  --nav-bw: 1px;
  --nav-bc: var(--line);
  --nav-shadow: none;
  /* icons are emoji: a look can make them flat grey */
  --icon-filter: none;
}

/* ==== SHAPE LAYER ==== */
:where(:root[data-look]),
:where(:root[data-look]) body {
  font-family: var(--font-ui);
}
:where(:root[data-look]) body {
  zoom: var(--z);
  line-height: var(--lh);
  letter-spacing: var(--ls);
  font-weight: var(--body-w);
}
/* zoom scales viewport heights too: divide them back so boxes still fit the screen. */
:where(:root[data-look]) .shell {
  min-height: calc(100vh / var(--z));
}
:where(:root[data-look]) .modal {
  max-height: calc(92vh / var(--z));
}
:where(:root[data-look]) .bell-pop {
  max-height: min(calc(70vh / var(--z)), 560px);
}
/* The map keeps its own scale (maplibre reads mouse and touch positions unzoomed). */
:where(:root[data-look]) .maplibregl-map {
  zoom: calc(1 / var(--z));
}

:where(:root[data-look]) :is(h1, h2, h3, .brand) {
  font-family: var(--font-head);
  font-weight: var(--head-w);
  letter-spacing: var(--head-ls);
}
:where(:root[data-look]) :is(h1, h2) {
  text-transform: var(--head-case);
  font-variant-caps: var(--head-caps);
}

:where(:root[data-look]) .main {
  padding-left: var(--main-pad);
  padding-right: var(--main-pad);
}
:where(:root[data-look]) .card {
  border-radius: var(--card-r);
  border: var(--card-bw) solid var(--card-bc);
  border-left: max(var(--card-bw), var(--card-stripe)) solid var(--card-stripe-c);
  box-shadow: var(--card-shadow);
  padding: var(--card-pad);
  margin-bottom: var(--card-gap);
}
:where(:root[data-look]) .card-warn {
  border: max(1px, var(--card-bw)) solid var(--warn-line);
}
:where(:root[data-look]) .rows.card {
  padding: 4px var(--card-pad);
}
:where(:root[data-look]) .hd-card {
  border-radius: var(--card-r);
  border-width: var(--hd-bw);
  border-left-width: max(4px, var(--card-stripe));
  box-shadow: var(--card-shadow);
  padding: calc(var(--card-pad) - 4px) calc(var(--card-pad) - 2px);
  margin-bottom: calc(var(--card-gap) - 4px);
}
:where(:root[data-look]) .row {
  padding-top: var(--row-pad);
  padding-bottom: var(--row-pad);
  border-top-width: var(--row-bw);
}
:where(:root[data-look]) .row:first-child {
  border-top-width: 0;
}

:where(:root[data-look]) .btn {
  border-radius: var(--btn-r);
  border-width: var(--btn-bw);
  font-weight: var(--btn-w);
  text-transform: var(--btn-case);
  letter-spacing: var(--btn-ls);
  box-shadow: var(--btn-shadow);
}
:where(:root[data-look]) .btn:active:not(:disabled) {
  transform: var(--btn-press);
}
:where(:root[data-look]) .seg {
  border-radius: var(--btn-r);
  border-width: var(--btn-bw);
  box-shadow: var(--btn-shadow);
}
:where(:root[data-look]) .seg-btn {
  font-weight: var(--btn-w);
  text-transform: var(--btn-case);
  letter-spacing: var(--btn-ls);
}
:where(:root[data-look]) .tab {
  border-radius: var(--tab-r);
  border-width: var(--btn-bw);
  font-weight: var(--btn-w);
  text-transform: var(--btn-case);
  letter-spacing: var(--btn-ls);
}
:where(:root[data-look]) :is(input:not([type="checkbox"], [type="radio"], [type="color"], [type="range"]), select) {
  border-radius: var(--in-r);
  border-width: var(--in-bw);
}
:where(:root[data-look]) textarea {
  border-radius: min(var(--in-r), 12px);
  border-width: max(1px, var(--card-bw), var(--btn-bw));
}

:where(:root[data-look]) :is(.badge, .chip, .hd-kind, .hd-status) {
  border-radius: var(--tag-r);
  font-weight: var(--tag-w);
  text-transform: var(--tag-case);
  letter-spacing: var(--tag-ls);
  box-shadow: inset 0 0 0 var(--tag-ring) currentColor;
}
:where(:root[data-look]) :is(.hd-btn-count, .bell-count, .hd-sec-count, .hd-tabcount, .tab-count) {
  border-radius: var(--count-r);
  box-shadow: var(--count-ring);
}

:where(:root[data-look]) .topbar {
  background: var(--top-bg);
  border-bottom: var(--top-bw) solid var(--top-bc);
  box-shadow: var(--top-shadow);
}
:where(:root[data-look]) :is(.brand, .topbar-refresh, .topbar-helpdesk) {
  color: var(--top-fg);
}
:where(:root[data-look]) .topbar-user {
  color: var(--top-muted);
}
:where(:root[data-look]) .topbar-helpdesk {
  border-color: var(--top-line);
  border-width: var(--btn-bw);
  border-radius: var(--btn-r);
}
:where(:root[data-look]) :is(.topbar-helpdesk:hover, .topbar-helpdesk.on, .topbar-refresh:hover, .user-menu > button.topbar-user:hover, .user-menu > button.topbar-user[aria-expanded="true"]) {
  background: var(--top-hover);
  color: var(--top-fg);
}
:where(:root[data-look]) .topbar-helpdesk.on {
  border-color: var(--top-fg);
}
:where(:root[data-look]) .brand-mark {
  background: var(--mark-bg);
  color: var(--mark-fg);
  border-radius: var(--mark-r);
}
:where(:root[data-look]) .bottomnav {
  background: var(--nav-bg);
  border-color: var(--nav-bc);
  border-top-width: var(--nav-bw);
  box-shadow: var(--nav-shadow);
}
@media (min-width: 700px) {
  :where(:root[data-look]) .bottomnav {
    border-top-width: 0;
    border-bottom-width: var(--nav-bw);
  }
}
:where(:root[data-look]) .navitem {
  color: var(--nav-fg);
}
:where(:root[data-look]) .navitem.active {
  color: var(--nav-active);
  font-weight: 700;
}
:where(:root[data-look]) :is(.navicon, .hd-btn-icon) {
  filter: var(--icon-filter);
}

/* ==== THE LOOKS ==== */

/* ---- Big & bold: 12% bigger, black on white, thick grey lines, heavy type, no shadows (in the sun) ---- */
:root[data-look="bold"] {
  --accent: #00566b;
  --accent-dark: #003f4f;
  --bg: #ffffff;
  --card: #ffffff;
  --text: #000000;
  --muted: #2b3440;
  --line: #8795a5;
  --danger: #c00000;
  --warn-bg: #fff1cc;
  --warn-line: #c98a00;
  --radius: 8px;
  --z: 1.12;
  --lh: 1.4;
  --body-w: 500;
  --head-w: 800;
  --card-bw: 2px;
  --card-shadow: none;
  --card-pad: 16px;
  --row-bw: 2px;
  --btn-r: 8px;
  --btn-bw: 2px;
  --btn-w: 800;
  --tab-r: 8px;
  --in-r: 8px;
  --in-bw: 2px;
  --tag-r: 6px;
  --tag-w: 700;
  --count-r: 6px;
  --top-bw: 3px;
  --top-bc: #000;
  --nav-bw: 3px;
  --nav-bc: #000;
  --nav-fg: #000;
  --nav-active: #00566b;
  color-scheme: light;
}
:root[data-look="bold"] .row-title {
  font-weight: 800;
}
:root[data-look="bold"] .badge-info { color: #102a73; }
:root[data-look="bold"] .badge-ok { color: #064e2b; }
:root[data-look="bold"] .badge-bad { color: #7f1010; }
:root[data-look="bold"] .badge-warn { color: #5c2a06; }
:root[data-look="bold"] .badge-purple { color: #3b1585; }
/* The map view keeps its buttons on one line on a phone (app.css): a little less padding for the bigger text. */
@media (max-width: 700px) {
  :root[data-look="bold"] .jobs-mapview .head-actions {
    gap: 4px;
  }
  :root[data-look="bold"] .jobs-mapview .head-actions .btn,
  :root[data-look="bold"] .jobs-mapview .seg-small .seg-btn {
    padding: 4px 7px;
    font-weight: 700;
  }
}

/* ---- Night: true black, amber, near-square corners, hairlines, small spaced capitals ---- */
:root[data-look="night"] {
  --accent: #fbbf24;
  --accent-dark: #fcd34d;
  --bg: #000000;
  --card: #121212;
  --text: #f5f5f5;
  --muted: #a8a8a8;
  --line: #333333;
  --danger: #ff5c4d;
  --warn-bg: #2e2208;
  --warn-line: #8a6d24;
  --radius: 3px;
  --lh: 1.5;
  --head-case: uppercase;
  --head-ls: 0.06em;
  --card-bw: 1px;
  --card-shadow: none;
  --btn-r: 3px;
  --btn-ls: 0.02em;
  --tab-r: 3px;
  --in-r: 3px;
  --tag-r: 2px;
  --tag-case: uppercase;
  --tag-ls: 0.05em;
  --count-r: 3px;
  --mark-fg: #1a1204;
  --mark-r: 2px;
  --nav-active: #fbbf24;
  --icon-filter: grayscale(1) brightness(1.4);
  color-scheme: dark;
}
:root[data-look="night"] h1 {
  font-size: 19px;
}
:root[data-look="night"] h2 {
  font-size: 15px;
}
:root[data-look="night"] :is(.btn-primary, .tab.on, .seg-btn.on) {
  color: #1a1204;
}
:root[data-look="night"] :is(.bell-count.hot, .hd-tabcount, .hd-sec-count.hot, .hd-btn-count) {
  color: #2a0d0b;
}
:root[data-look="night"] .topbar {
  background: #000;
  border-bottom: 1px solid var(--line);
}
:root[data-look="night"] .bottomnav {
  background: #000;
  border-color: var(--line);
}
:root[data-look="night"] :is(.badge, .chip, .hd-kind) {
  font-size: 11px;
}

/* ---- Pool: aqua, a solid blue header, round corners, pill buttons, soft blue shadows, no borders ---- */
:root[data-look="pool"] {
  --font-ui: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --accent: #0369a1;
  --accent-dark: #075985;
  --bg: #e4f5fa;
  --card: #ffffff;
  --text: #0c2f3d;
  --muted: #3f6577;
  --line: #bfe0ea;
  --danger: #c81e1e;
  --warn-bg: #fff6dd;
  --warn-line: #f2c661;
  --radius: 18px;
  --body-w: 500;
  --head-w: 800;
  --card-shadow: 0 4px 14px rgba(3, 105, 161, 0.12);
  --card-pad: 18px;
  --card-gap: 16px;
  --hd-bw: 0px;
  --btn-r: 999px;
  --btn-w: 700;
  --in-r: 14px;
  --count-r: 999px;
  --count-ring: 0 0 0 2px #fff;
  --top-bg: #0369a1;
  --top-fg: #ffffff;
  --top-muted: #d6efff;
  --top-line: rgba(255, 255, 255, 0.45);
  --top-hover: rgba(255, 255, 255, 0.16);
  --top-bw: 0px;
  --top-shadow: 0 2px 10px rgba(3, 105, 161, 0.25);
  --mark-bg: #ffffff;
  --mark-fg: #0369a1;
  --mark-r: 50%;
  --nav-bw: 0px;
  --nav-shadow: 0 -2px 12px rgba(3, 105, 161, 0.12);
  --nav-active: #0369a1;
  color-scheme: light;
}
:root[data-look="pool"] .row-title {
  font-weight: 800;
}
:root[data-look="pool"] .btn:where(:not(.btn-primary, .btn-danger, .btn-ghost)) {
  background: #e0f2fe;
  border-color: #e0f2fe;
  color: #075985;
}
:root[data-look="pool"] .topbar-user .dot {
  box-shadow: 0 0 0 2px #fff;
}

/* ---- Clean: white, hairlines, flat, ghost buttons, underlined inputs, a modern sans ---- */
:root[data-look="clean"] {
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --bg: #ffffff;
  --card: #ffffff;
  --text: #111827;
  --muted: #5b6472;
  --line: #e5e7eb;
  --danger: #dc2626;
  --warn-bg: #fffbeb;
  --warn-line: #f5c26b;
  --radius: 6px;
  --lh: 1.5;
  --head-w: 600;
  --head-ls: -0.02em;
  --card-bw: 1px;
  --card-shadow: none;
  --card-pad: 20px;
  --card-gap: 12px;
  --main-pad: 20px;
  --row-pad: 12px;
  --btn-r: 6px;
  --btn-w: 500;
  --tab-r: 6px;
  --in-r: 0;
  --in-bw: 0 0 1px 0;
  --tag-r: 4px;
  --count-r: 6px;
  --top-bg: rgba(255, 255, 255, 0.92);
  --nav-bg: #fafafa;
  --icon-filter: grayscale(1) opacity(0.75);
  color-scheme: light;
}
:root[data-look="clean"] .btn:where(:not(.btn-primary, .btn-danger)) {
  background: transparent;
  border-color: transparent;
  color: var(--accent-dark);
}
:root[data-look="clean"] .btn:where(:not(.btn-primary, .btn-danger)):hover {
  background: #f3f4f6;
}
:root[data-look="clean"] :is(input:not([type="checkbox"], [type="radio"], [type="color"], [type="range"]), select) {
  background: transparent;
  padding-left: 2px;
}
:root[data-look="clean"] .topbar {
  backdrop-filter: blur(6px);
}

/* ---- Workshop: warm paper, dark brown bars, slab type, square tags, a mustard stripe down each card ---- */
:root[data-look="workshop"] {
  --font-head: "Roboto Slab", Rockwell, "Courier New", Georgia, serif;
  --accent: #9a5b13;
  --accent-dark: #7a4510;
  --bg: #f3ede3;
  --card: #fffdf8;
  --text: #2a2118;
  --muted: #655443;
  --line: #d6c7b0;
  --danger: #b91c1c;
  --warn-bg: #fdf0d2;
  --warn-line: #d9a64a;
  --radius: 3px;
  --card-bw: 2px;
  --card-stripe: 6px;
  --card-stripe-c: #b7791f;
  --card-shadow: 0 3px 0 var(--line);
  --btn-r: 3px;
  --btn-bw: 2px;
  --btn-w: 700;
  --btn-case: uppercase;
  --btn-ls: 0.04em;
  --tab-r: 3px;
  --in-r: 3px;
  --in-bw: 2px;
  --tag-r: 2px;
  --tag-w: 700;
  --tag-case: uppercase;
  --tag-ls: 0.04em;
  --count-r: 3px;
  --count-ring: 0 0 0 2px #fdf6e9;
  --top-bg: #2a2118;
  --top-fg: #fdf6e9;
  --top-muted: #e2d3bd;
  --top-line: rgba(253, 246, 233, 0.4);
  --top-hover: rgba(255, 255, 255, 0.14);
  --top-bw: 0px;
  --mark-bg: #fdf6e9;
  --mark-fg: #2a2118;
  --mark-r: 2px;
  --nav-bg: #3a2e22;
  --nav-fg: #e2d3bd;
  --nav-active: #f2c14e;
  --nav-bw: 0px;
  color-scheme: light;
}
:root[data-look="workshop"] .card-head {
  background: #efe3cf;
  margin: calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) 12px;
  padding: 8px var(--card-pad);
  border-bottom: 2px solid var(--line);
}
:root[data-look="workshop"] .card-head h2 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
:root[data-look="workshop"] .row-title {
  font-weight: 700;
}
:root[data-look="workshop"] .topbar-user .dot {
  box-shadow: 0 0 0 2px #fdf6e9;
}
:root[data-look="workshop"] :is(.badge, .chip, .hd-kind, .hd-status) {
  font-size: 11px;
}

/* ---- Compact: Peddys colours, 10% smaller, tight rows, thin lines (for the office computer) ---- */
:root[data-look="compact"] {
  --radius: 6px;
  --z: 0.9;
  --lh: 1.3;
  --card-bw: 1px;
  --card-shadow: none;
  --card-pad: 10px;
  --card-gap: 8px;
  --main-pad: 12px;
  --row-pad: 6px;
  --btn-r: 6px;
  --tab-r: 6px;
  --in-r: 6px;
  --tag-r: 4px;
  --count-r: 4px;
}
:root[data-look="compact"] .main {
  max-width: 1100px;
}
:root[data-look="compact"] .topbar {
  padding-top: calc(6px + env(safe-area-inset-top));
  padding-bottom: 6px;
}
:root[data-look="compact"] h1 {
  font-size: 20px;
}

/* ---- Brutalist: square, thick black lines, hard offset shadows, a mono font, yellow and black ---- */
:root[data-look="brutalist"] {
  --font-ui: "IBM Plex Mono", ui-monospace, Menlo, Consolas, "Courier New", monospace;
  --accent: #ffe500;
  --accent-dark: #0b3dd9;
  --bg: #f2f0e6;
  --card: #ffffff;
  --text: #000000;
  --muted: #2e2e2e;
  --line: #000000;
  --danger: #e00000;
  --warn-bg: #fff3a3;
  --warn-line: #000000;
  --radius: 0;
  --lh: 1.4;
  --body-w: 500;
  --head-w: 700;
  --head-case: uppercase;
  --head-ls: 0.02em;
  --card-bw: 3px;
  --card-shadow: 6px 6px 0 #000;
  --card-gap: 22px;
  --hd-bw: 3px;
  --row-bw: 2px;
  --btn-r: 0;
  --btn-bw: 3px;
  --btn-w: 700;
  --btn-case: uppercase;
  --btn-shadow: 3px 3px 0 #000;
  --btn-press: translate(2px, 2px);
  --tab-r: 0;
  --in-r: 0;
  --in-bw: 3px;
  --tag-r: 0;
  --tag-w: 700;
  --tag-case: uppercase;
  --tag-ring: 2px;
  --count-r: 0;
  --count-ring: 0 0 0 2px #000;
  --top-bw: 3px;
  --top-bc: #000;
  --top-line: #000;
  --top-hover: #ffe500;
  --mark-bg: #000;
  --mark-fg: #ffe500;
  --mark-r: 0;
  --nav-bg: #000;
  --nav-fg: #ffffff;
  --nav-active: #ffe500;
  --nav-bw: 0px;
  --icon-filter: grayscale(1) contrast(1.4);
  color-scheme: light;
}
:root[data-look="brutalist"] :is(.btn-primary, .tab.on, .seg-btn.on) {
  color: #000;
  border-color: #000;
}
:root[data-look="brutalist"] .seg-btn + .seg-btn {
  border-left: 3px solid #000;
}
:root[data-look="brutalist"] h1 {
  font-size: 21px;
}
:root[data-look="brutalist"] :is(.badge, .chip, .hd-kind, .hd-status) {
  font-size: 11px;
}
:root[data-look="brutalist"] .navicon {
  filter: grayscale(1) brightness(1.8);
}
:root[data-look="brutalist"] :is(.hd-sec-count, .bell-count):not(.hot) {
  background: #fff;
  color: #000;
  box-shadow: 0 0 0 2px #000;
}
:root[data-look="brutalist"] .navitem.active .navicon {
  filter: none;
}
/* Yellow is for buttons only: words that use the accent colour take the blue instead. */
:root[data-look="brutalist"] :is(.kv-tap .kv-pen, .golive button.linkish) {
  color: var(--accent-dark);
}
:root[data-look="brutalist"] .card-head {
  border-bottom: 3px solid #000;
  padding-bottom: 8px;
}

/* ---- Soft: pastel lilac, pill shapes everywhere, airy spacing, big soft shadows, no lines ---- */
:root[data-look="soft"] {
  --font-ui: "Quicksand", "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --accent: #7c4dcc;
  --accent-dark: #5b2fa8;
  --bg: #f6f1fb;
  --card: #ffffff;
  --text: #2e2640;
  --muted: #625878;
  --line: #ece4f6;
  --danger: #d6263b;
  --warn-bg: #fff4e5;
  --warn-line: #f6c58d;
  --radius: 26px;
  --lh: 1.6;
  --body-w: 600;
  --head-w: 700;
  --card-shadow: 0 10px 30px rgba(124, 77, 204, 0.12);
  --card-pad: 22px;
  --card-gap: 20px;
  --hd-bw: 0px;
  --main-pad: 18px;
  --row-pad: 14px;
  --btn-r: 999px;
  --btn-bw: 0px;
  --btn-w: 700;
  --in-r: 999px;
  --in-bw: 0px;
  --count-r: 999px;
  --top-bg: var(--bg);
  --top-bw: 0px;
  --top-hover: #ece4f6;
  --top-line: transparent;
  --mark-r: 50%;
  --nav-bw: 0px;
  --nav-shadow: 0 -6px 24px rgba(124, 77, 204, 0.1);
  --nav-active: #7c4dcc;
  color-scheme: light;
}
:root[data-look="soft"] .btn:where(:not(.btn-primary, .btn-danger, .btn-ghost)),
:root[data-look="soft"] .tab:where(:not(.on)),
:root[data-look="soft"] .seg-btn:where(:not(.on)) {
  background: #efe7fa;
  color: #4a2a86;
}
:root[data-look="soft"] .tab {
  border-color: transparent;
}
:root[data-look="soft"] .seg {
  border: 0;
  background: #efe7fa;
  padding: 3px;
  gap: 3px;
}
:root[data-look="soft"] .seg-btn {
  border-radius: 999px;
}
:root[data-look="soft"] :is(input:not([type="checkbox"], [type="radio"], [type="color"], [type="range"]), select) {
  background: #f3eefa;
  padding-left: 18px;
}
:root[data-look="soft"] textarea {
  background: #f3eefa;
  border-color: transparent;
}
:root[data-look="soft"] .row {
  border-top-color: #f1ebf8;
}

/* ---- Classic: serif, square, thin rules, small capitals, navy (formal, like a printed ledger) ---- */
:root[data-look="classic"] {
  --font-ui: "Source Serif 4", Georgia, "Times New Roman", serif;
  --accent: #1f3a5f;
  --accent-dark: #1f3a5f;
  --bg: #fbfaf7;
  --card: #ffffff;
  --text: #1b1b1b;
  --muted: #555049;
  --line: #d8d4cc;
  --danger: #b00020;
  --warn-bg: #fbf3df;
  --warn-line: #d4b46a;
  --radius: 0;
  --lh: 1.55;
  --head-w: 600;
  --head-caps: small-caps;
  --head-ls: 0.03em;
  --card-bw: 1px;
  --card-shadow: none;
  --card-pad: 18px;
  --btn-r: 2px;
  --btn-w: 600;
  --btn-ls: 0.02em;
  --tab-r: 2px;
  --in-r: 0;
  --in-bw: 0 0 1px 0;
  --tag-r: 2px;
  --tag-w: 600;
  --count-r: 999px;
  --top-bw: 3px;
  --top-bc: var(--line);
  --mark-r: 0;
  --nav-bw: 3px;
  --icon-filter: grayscale(1) opacity(0.8);
  color-scheme: light;
}
:root[data-look="classic"] .topbar {
  border-bottom-style: double;
}
:root[data-look="classic"] .bottomnav {
  border-top-style: double;
}
@media (min-width: 700px) {
  :root[data-look="classic"] .bottomnav {
    border-top-style: none;
    border-bottom-style: double;
  }
}
:root[data-look="classic"] .btn:where(:not(.btn-primary, .btn-danger, .btn-ghost)) {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}
:root[data-look="classic"] :is(input:not([type="checkbox"], [type="radio"], [type="color"], [type="range"]), select) {
  background: transparent;
  padding-left: 2px;
}
:root[data-look="classic"] .card-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}
:root[data-look="classic"] .page-title {
  font-size: 26px;
}
:root[data-look="classic"] :is(.badge, .chip, .hd-kind) {
  font-variant-caps: all-small-caps;
  font-size: 13px;
}

/* Phones: the roomy and the big looks give the screen back some width (the job page's rows need it). */
@media (max-width: 520px) {
  /* Bigger or wider type: the job page's labels may wrap rather than push the values off the screen. */
  :where(:root[data-look]) .kv th {
    white-space: normal;
    min-width: 5.5em;
  }
  :root[data-look="bold"] {
    --card-pad: 12px;
    --main-pad: 10px;
  }
  :root[data-look="brutalist"] {
    --card-pad: 12px;
    --main-pad: 12px;
    --card-shadow: 4px 4px 0 #000;
    --card-gap: 18px;
  }
  :root[data-look="soft"] {
    --card-pad: 16px;
    --main-pad: 12px;
    --card-gap: 16px;
  }
  :root[data-look="clean"] {
    --card-pad: 16px;
    --main-pad: 14px;
  }
}

/* ---- The Themes window (Settings → Themes; web/app/ui/themes.js) ---- */
.themes-back {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}
.themes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top));
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.themes-head h2 {
  margin: 0;
}
.themes-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}
.themes-body .preview-banner {
  margin-bottom: 8px;
}
.themes-track {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.themes-track::-webkit-scrollbar {
  display: none;
}
.theme-slide {
  flex: 0 0 100%;
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  padding: 0 2px;
}
.theme-slide-head {
  display: flex;
  padding-right: 8px;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.theme-slide-head h3 {
  margin: 0;
  font-size: 20px;
}
.theme-slide p {
  margin: 0 0 8px;
}
.theme-shots {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: flex-start;
}
.theme-shot {
  position: relative;
  flex: none;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}
.theme-shot iframe {
  position: absolute;
  left: 0;
  top: 0;
  border: 0;
  transform-origin: 0 0;
  pointer-events: none;
}
.theme-shot-cover {
  position: absolute;
  inset: 0;
}
.theme-shot-label {
  text-align: center;
  font-size: 12px;
  margin-top: 4px;
}
.theme-shot-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.themes-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 10px 0 6px;
}
.themes-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex: none;
}
.themes-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}
.themes-dots {
  display: flex;
  gap: 4px;
}
.themes-dot {
  width: 28px;
  height: 28px;
  border: 0;
  background: none;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.themes-dot::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}
.themes-dot.on::before {
  background: var(--accent);
  transform: scale(1.3);
}
.themes-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.themes-actions .btn {
  flex: 1 1 160px;
  max-width: 280px;
}
.theme-current {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-dark);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0 8px;
}
.theme-swatches {
  display: inline-flex;
  gap: 3px;
  vertical-align: middle;
  margin-left: auto;
}
.theme-swatches i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.15);
}
.themes-open-card .btn {
  margin-top: 4px;
}
@media (max-width: 520px) {
  /* Ten dots and both arrows on one line on a phone. */
  .themes-nav {
    gap: 4px;
  }
  .themes-dots {
    gap: 0;
  }
  .themes-dot {
    width: 20px;
  }
  .themes-dot::before {
    width: 8px;
    height: 8px;
  }
  .themes-body {
    padding-left: 10px;
    padding-right: 10px;
  }
  .theme-slide p {
    font-size: 14px;
  }
}
