/* Bento Board (app.web.looks, key "bento"): the app as a board of rounded tiles. Loaded after app.css, only for the
   people who picked this look; its own templates are templates/looks/bento/ (the shell: base.html, _shell.html; Home;
   the Leaderboard). Everything else is the shared templates, restyled here.

   Light: white tiles on a light grey page, some tiles washed in a soft colour (sky, mint, peach, lilac); dark: charcoal
   tiles on black. Tiles have no borders (the gap between them is the edge); type is big and the numbers bigger.
   All text/background pairs meet WCAG AA (4.5:1), on the washes too; input borders meet 3:1. The accent (the main
   button, links, the current tab, selections, focus) is red, as in Classic.

   How this file overrides app.css: it comes after it, so a rule here with the same selector wins. Where app.css has a
   later rule of the same weight that must keep winning (a button's variants, say), it is repeated after the override
   here ("kept:"). */

/* ---- tokens ---- */
:root {
  --bg: #f2f2f7;
  --surface-2: #f4f4f7;
  --border: #e5e5ea;
  --border-input: #8a8a91;
  --text: #1d1d1f;
  --text-muted: #5f5f66;
  --success-soft: #e3f4ea;
  --neutral-soft: #ebebf0;
  --gold: #855e00;
  --gold-soft: #fbf0cf;
  --silver-soft: #e9edf2;
  --bronze-soft: #f9e8dc;

  /* the tiles' washes, and the colour that goes on each (icons, big numbers) */
  --wash-sky: #e2eefc;
  --wash-mint: #dcf2e5;
  --wash-peach: #fdeadb;
  --wash-lilac: #ebe7fb;
  --wash-red: #fde7e7;
  --wash-gold: #fbf0cf;
  --hue-sky: #165fb3;
  --hue-mint: #0a7550;
  --hue-peach: #a8490c;
  --hue-lilac: #5b3fb3;
  --hue-red: #c62828;
  /* segmented controls (range chips, the Submit tabs) and the soft buttons */
  --seg-track: #e4e4ea;
  --seg-thumb: #ffffff;
  --fill: color-mix(in srgb, var(--text) 7%, transparent);
  --fill-hover: color-mix(in srgb, var(--text) 12%, transparent);
  --shadow-pop: 0 24px 60px rgba(0, 0, 0, .16), 0 0 0 1px rgba(0, 0, 0, .05);
  --shadow-tile: 0 1px 3px rgba(0, 0, 0, .08);
  /* the phone's sheets: grey with white tiles (light), charcoal with lighter tiles (dark) */
  --sheet-bg: #f2f2f7;
  --sheet-tile: #ffffff;
  --sheet-tile-hover: #f4f4f7;

  --radius: 12px;
  --radius-lg: 20px;
  --radius-tile: 26px;
  --font: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --topnav-h: 64px;
  --tabbar-h: 64px;
  --capsule-edge: 12px;
}

[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #2a2a2d;
  --border: #38383b;
  --border-input: #7c7c82;
  --text: #f5f5f7;
  --text-muted: #a5a5ab;
  --info-soft: #262a31;
  --success-soft: #11291e;
  --warn-soft: #2d2412;
  --danger-soft: #35191d;
  --neutral-soft: #2c2c2e;
  --sched-soft: #262040;
  --gold: #f4c95d;
  --gold-soft: #2e2610;
  --silver-soft: #262a30;
  --bronze-soft: #302116;
  --overlay: rgba(28, 28, 30, 0.9);

  --wash-sky: #12243a;
  --wash-mint: #0f281c;
  --wash-peach: #2f1f13;
  --wash-lilac: #221c3c;
  --wash-red: #36161a;
  --wash-gold: #2e2610;
  --hue-sky: #84bdff;
  --hue-mint: #5ccf9d;
  --hue-peach: #f5a86e;
  --hue-lilac: #b9a5ff;
  --hue-red: #ff7d7d;
  --seg-track: #2c2c2e;
  --seg-thumb: #4a4a4e;
  --shadow-pop: 0 24px 60px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .09);
  --sheet-bg: #1c1c1e;
  --sheet-tile: #2c2c2e;
  --sheet-tile-hover: #3a3a3c;
}

/* ---- type, layout, tiles ---- */
h1, h2, h3 { letter-spacing: -0.015em; }
h1 { font-family: var(--font-display); font-size: 1.75rem; font-weight: 750; letter-spacing: -0.03em; }

.container { max-width: 1328px; padding: var(--sp-4) var(--sp-5) var(--sp-7); }
@media (max-width: 640px) { .container { padding: var(--sp-3) var(--sp-4) var(--sp-7); } }

/* a tile: no border of its own (a coloured edge only where a card is marked: posted, failed, ...) */
.card { border-color: transparent; border-radius: var(--radius-tile); }
.card + .card { margin-top: var(--sp-4); }
.page-block.is-off { border-color: var(--border-input); }  /* a switched-off page's block: dashed (app.css) */
/* kept: the lists and grids that space their cards themselves */
.tpl-card + .tpl-card, .bcard + .bcard { margin-top: 0; }
.admin-tiles > .card, .vt-cards > .card, .pt-stats > .card, .lb-events > .card, .menu-page > .card, .pr-add > .card,
.pr-items > .card, .home-quick > .card, .adt-pay-grid > .card { margin: 0; }
.card .card { background: var(--surface-2); }  /* a tile inside a tile: the inner tone */

/* ---- buttons: soft pills; the main one red ---- */
.btn { border-radius: 999px; border-color: transparent; background: var(--fill); }
.btn:hover { background: var(--fill-hover); }
/* kept: the variants after .btn in app.css */
.btn-primary { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { border-color: var(--danger); background: var(--surface); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-danger.solid { background: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--fill); color: var(--text); }
.cal-live-toggle.is-on { border-color: var(--success); background: var(--success-soft); }

.flash { border-radius: 16px; }

/* ---- menus ---- */
.pop-menu { border: 0; border-radius: 16px; box-shadow: var(--shadow-pop); }
.menu-item { min-height: 38px; border-radius: 10px; }

/* ---- forms ---- */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search],
input[type=datetime-local], select, textarea { border-radius: 12px; }

/* ---- chips; the range and view chips are a segmented control, the picked one a raised pill ---- */
.chip { border-color: transparent; background: var(--fill); }
.chip:hover { background: var(--fill-hover); border-color: transparent; }
.chip.active { background: var(--text); color: var(--bg); border-color: transparent; }
nav.chips { flex: none; width: fit-content; gap: 2px; padding: 3px; border-radius: 999px; background: var(--seg-track); }
nav.chips .chip { height: 34px; padding: 0 var(--sp-4); background: transparent; color: var(--text-muted); }
nav.chips .chip:hover { background: color-mix(in srgb, var(--seg-thumb) 50%, transparent); color: var(--text); }
nav.chips .chip.active { background: var(--seg-thumb); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
/* kept: a page's chip (the Submit pages' recent pages, the + sheet's) stays a white pill with an outline */
.page-chip { border-color: var(--border); background: var(--surface); }
.page-chip:hover { border-color: var(--border-input); }

/* ---- the app shell (looks/bento/base.html) ----
   Desktop (900px and up): no sidebar. One bar across the top: the logo at the left, the sections in the middle as text
   links (Home; Post, Plan & track, Your pages and Admin Tools open drop-downs of their links: app.js), and the theme,
   the account and "Create new post" at the right.
   Phones: the logo and the section's name at the top; a floating capsule of tabs above the bottom edge (the current one
   spelled out, the others as icons), the + in a red circle at its end, and two bottom sheets (More, Create new post)
   that app.js opens, floating like the capsule. */
.topnav { position: sticky; top: 0; z-index: 30; background: var(--bg); }
/* the sections sit in the middle of the room the logo and the right end leave them, as much space on either side (the
   ends never shrink under what they hold, so nothing runs into "Admin Tools" or the theme switch) */
.topnav-inner {
  max-width: 1328px; margin: 0 auto; min-height: var(--topnav-h); padding: 0 var(--sp-5);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--sp-4);
}
.topnav-brand { justify-self: start; gap: 10px; min-width: 0; font-family: var(--font-display); font-size: 1.0625rem; letter-spacing: -0.01em; }
.topnav-brand .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
.topnav-brand .brand-name, .appbar-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appbar-title { display: none; }
.mainnav, .topnav-end { display: none; }
.mainnav { justify-self: center; align-items: center; gap: 2px; }
.mainnav > .side-section { display: flex; }
.side-section + .side-section { margin-top: 0; }
/* the bar's own links: Home, and the sections' names that open their drop-downs */
.mainnav > .side-section > .side-link, .nav-trigger {
  display: inline-flex; align-items: center; gap: 5px; height: 40px; min-height: auto; padding: 0 16px; border-radius: 999px;
  color: var(--text-muted); font-size: .9375rem; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.mainnav > .side-section > .side-link > .ico { display: none; }
.mainnav > .side-section > .side-link:focus-visible, .nav-trigger:focus-visible { border-radius: 999px; }
.nav-trigger .ico { width: 14px; height: 14px; opacity: .75; transition: transform .15s ease; }
.nav-trigger[aria-expanded="true"] .ico { transform: rotate(180deg); }
.mainnav > .side-section > .side-link:hover, .nav-trigger:hover, .nav-trigger[aria-expanded="true"] {
  background: var(--fill); color: var(--text); text-decoration: none;
}
.mainnav > .side-section > .side-link.active, .nav-trigger.is-on {
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-tile);
}
/* a section's drop-down: its links as rows, each with its icon on a soft colour */
.pop-menu.nav-drop {
  min-width: 264px; max-width: 320px; padding: var(--sp-2); border: 0; border-radius: 22px; box-shadow: var(--shadow-pop);
}
.nav-drop .side-link {
  position: relative; display: flex; align-items: center; gap: var(--sp-3); min-height: 48px; padding: 6px 12px 6px 6px;
  border-radius: 14px; color: var(--text); font-size: .9375rem; font-weight: 600; cursor: pointer;
}
.nav-drop .side-link:hover { background: var(--surface-2); text-decoration: none; }
.nav-drop .side-link:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.nav-drop .side-link.active { background: var(--accent-soft); color: var(--accent); }
.nav-drop .side-link > .ico {
  width: 36px; height: 36px; padding: 8px; border-radius: 11px; background: var(--wash-sky); color: var(--hue-sky);
}
.nav-drop .side-link:nth-child(5n+2) > .ico { background: var(--wash-mint); color: var(--hue-mint); }
.nav-drop .side-link:nth-child(5n+3) > .ico { background: var(--wash-peach); color: var(--hue-peach); }
.nav-drop .side-link:nth-child(5n+4) > .ico { background: var(--wash-lilac); color: var(--hue-lilac); }
.nav-drop .side-link:nth-child(5n) > .ico { background: var(--wash-red); color: var(--hue-red); }
.nav-drop .side-link .avatar { width: 36px; height: 36px; font-size: .875rem; }
.nav-drop-admin:not([hidden]) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; width: 500px; max-width: calc(100vw - 32px); }
.nav-drop .nav-more > summary { color: var(--text-muted); }
.nav-drop .nav-more > summary .ico { width: 36px; height: 36px; padding: 8px; }
/* Admin Tools with one link (a manager's Pages): no drop-down, the link itself in the bar, the group's name in small
   type before it, set off from the sections by a short rule */
.mainnav > .nav-solo { align-items: center; gap: 2px; margin-left: 6px; }
.nav-solo::before { content: ""; flex: none; width: 1px; height: 20px; margin-right: 10px; background: var(--border-input); opacity: .45; }
.nav-solo-label { padding-right: 2px; color: var(--text-muted); font-size: .8125rem; font-weight: 650; white-space: nowrap; }

/* the right end: the theme, the account (a pill with the initial and the name) and Create new post */
.topnav-end { justify-self: end; align-items: center; gap: 10px; min-width: 0; }
.side-foot { flex: initial; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0; border-top: 0; }
.side-foot .account { flex: initial; }
.topnav .theme-toggle { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface); color: var(--text); box-shadow: var(--shadow-tile); }
.topnav .theme-toggle:hover { background: var(--surface-2); }
.account { display: flex; min-width: 0; }
.side-me {
  display: flex; align-items: center; gap: var(--sp-2); width: auto; min-width: 0; height: 40px; padding: 0 12px 0 4px;
  border: 0; border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer;
  box-shadow: var(--shadow-tile);
}
.side-me:hover, .side-me[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }
.side-me[aria-expanded="true"] .ico { transform: rotate(180deg); }
.side-me .ico { color: var(--text-muted); transition: transform .15s ease; }
.side-me-text { display: flex; flex-direction: row; align-items: center; gap: 6px; flex: initial; min-width: 0; }
.side-me .me-name { max-width: 140px; color: var(--text); font-weight: 650; font-size: .875rem; }
.side-me .badge { display: none; }
.me-avatar { width: 32px; height: 32px; font-size: .875rem; }
.create-new { display: flex; flex: none; margin-left: 0; }
.create-new .btn { gap: var(--sp-2); height: 40px; padding: 0 18px; }

@media (min-width: 900px) {
  .has-shell .mainnav { display: flex; }
  .has-shell .topnav-end { display: flex; }
}
@media (min-width: 900px) and (max-width: 1239.98px) {
  .topnav-inner { padding: 0 var(--sp-4); gap: var(--sp-2); }
  .topnav-brand .brand-name, .side-me-text { display: none; }
  .side-me { padding-right: 8px; }
  .mainnav > .side-section > .side-link, .nav-trigger { padding: 0 11px; }
}
@media (min-width: 900px) and (max-width: 1059.98px) {
  .create-new .btn { padding: 0 14px; font-size: 0; gap: 0; }  /* just the + */
  .create-new .btn svg:last-child { display: none; }
}

@media (max-width: 899.98px) {
  /* the floating capsule: the current tab spelled out on its red-tinted pill, the others as icons */
  .has-shell .tabbar {
    display: flex; align-items: center; gap: 2px; position: fixed; z-index: 40;
    left: max(var(--capsule-edge), env(safe-area-inset-left)); right: max(var(--capsule-edge), env(safe-area-inset-right));
    bottom: calc(var(--capsule-edge) + env(safe-area-inset-bottom)); height: var(--tabbar-h); padding: 7px 71px 7px 7px;
    border-top: 0; border-radius: 999px; background: color-mix(in srgb, var(--surface) 88%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .16), 0 0 0 1px color-mix(in srgb, var(--text) 8%, transparent);
  }
  .tabbar .tab {
    flex: 1 1 0; min-width: 36px; height: 50px; min-height: 44px; display: flex; flex-direction: row; align-items: center;
    justify-content: center; gap: 6px; margin: 0; padding: 0; border: 0; border-radius: 999px; color: var(--text-muted);
    font-size: .8125rem; font-weight: 650; line-height: 1;
  }
  .tabbar .tab .ico { width: 22px; height: 22px; padding: 0; border-radius: 0; background: none; }
  .tabbar .tab:hover { color: var(--text); text-decoration: none; }
  .tabbar .tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  .tabbar .tab.active { flex: 0 0 auto; padding: 0 14px 0 12px; background: var(--accent-soft); color: var(--accent); }
  /* Chat's badge on its icon's corner, or on the pill's corner when Chat is the one spelled out. The icon-only tabs are
     too narrow for app.css's badge that grows to the right: its right edge stays a little past Chat (the gap and
     Batches' own margin keep it off Batches' icon), so a long count grows over the top of Chat's icon */
  .tabbar .tab .nav-badge { top: 5px; left: auto; right: max(-4px, calc(50% - 36px)); }
  .tabbar .tab.active .nav-badge { top: -3px; left: auto; right: -3px; }
  .tabbar .tab:not(.active) .tab-label {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .tabbar .tab-label { overflow: visible; text-overflow: clip; white-space: nowrap; }
  /* app.css's phone tab bar rules are for ".tab": the Submit page's source tabs (".tabs .tab") keep their own */
  .tabs .tab {
    flex: 0 1 auto; min-width: auto; display: inline-flex; flex-direction: row; align-items: center; justify-content: center;
    gap: var(--sp-2); color: var(--text-muted); font-size: .9375rem; font-weight: 600; line-height: inherit;
  }
  /* the +: a red circle inside the capsule's right end */
  .has-shell .fab {
    display: grid; place-items: center; position: fixed; z-index: 41;
    right: calc(max(var(--capsule-edge), env(safe-area-inset-right)) + 7px);
    bottom: calc(var(--capsule-edge) + 7px + env(safe-area-inset-bottom));
    width: 50px; height: 50px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 45%, transparent);
  }
  .has-shell .fab:hover { background: var(--accent-hover); text-decoration: none; }
  .has-shell .fab:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
  /* the top: the logo and the section's name, on the left */
  .topnav-inner { grid-template-columns: minmax(0, 1fr); min-height: 56px; padding: env(safe-area-inset-top) var(--sp-4) 0; }
  .topnav-brand .brand-name { display: none; }
  .topnav-brand .appbar-title { display: inline; font-size: 1.1875rem; font-weight: 750; letter-spacing: -0.02em; }
  /* room under the page for the capsule */
  .has-shell .container { padding-bottom: calc(var(--tabbar-h) + 48px + env(safe-area-inset-bottom)); }
  .has-shell .toasts { bottom: calc(var(--tabbar-h) + var(--capsule-edge) + var(--sp-3) + env(safe-area-inset-bottom)); }
  .has-shell .sticky-actions, .has-shell .tt-selbar { bottom: calc(var(--tabbar-h) + var(--capsule-edge) + var(--sp-2) + env(safe-area-inset-bottom)); }
  /* a page's own bar of buttons along the bottom: the + button would cover them */
  .has-shell:has(.sticky-actions) .tabbar, .has-shell:has(.tt-selbar:not([hidden])) .tabbar { padding-right: 7px; }
}
@media (max-width: 560px) {
  .tabs .tab { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 2px; font-size: .8125rem; }
}

/* the phone's bottom sheets (app.js): float up over a dim backdrop, rounded like the tiles */
.sheet-backdrop { background: rgba(0, 0, 0, .42); }
.sheet-panel {
  left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); max-height: 86vh; max-height: 86dvh;
  padding-bottom: 0; background: var(--sheet-bg); border-radius: 30px; box-shadow: 0 -8px 40px rgba(0, 0, 0, .25);
  transform: translateY(110%); transition: transform .24s ease;
}
.sheet.is-open .sheet-panel { transform: none; }
@media (min-width: 600px) {
  .sheet-panel { left: 50%; right: auto; width: 560px; transform: translate(-50%, 110%); }
  .sheet.is-open .sheet-panel { transform: translate(-50%, 0); }
}
@media (prefers-reduced-motion: reduce) { .sheet-backdrop, .sheet-panel { transition: none; } }
.sheet-grip { height: 20px; }
.sheet-grip::before { top: 8px; height: 5px; border-radius: 3px; opacity: .5; }
.sheet-head { padding: 0 var(--sp-4) var(--sp-2) var(--sp-5); }
.sheet-head h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 750; letter-spacing: -0.025em; }
.sheet-x { width: 36px; height: 36px; border-radius: 50%; background: var(--fill); color: var(--text); }

.sheet-user { padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4); border-radius: 22px; background: var(--sheet-tile); }
.sheet-user .me-avatar { width: 40px; height: 40px; font-size: 1rem; }
.side-label, .sheet-label {
  margin: 0 0 var(--sp-2); padding: 0 var(--sp-1); color: var(--text-muted);
  font-size: .8125rem; font-weight: 650; letter-spacing: 0; text-transform: none;
}
/* each group of the More sheet: its links as small tiles, two to a row */
.sheet-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.sheet-group > .sheet-label, .sheet-group > .nav-more, .sheet-group[data-sheet-group="home"] > .sheet-link { grid-column: 1 / -1; }
.sheet-group + .sheet-group { margin-top: var(--sp-5); }
.sheet-link {
  min-height: 56px; padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-2);
  border-radius: 18px; background: var(--sheet-tile); font-size: .9375rem; font-weight: 600;
}
.sheet-link:hover { background: var(--sheet-tile-hover); }
.sheet-link > .ico { width: 36px; height: 36px; padding: 8px; border-radius: 11px; background: var(--wash-sky); color: var(--hue-sky); }
.sheet-group .sheet-link:nth-of-type(5n+2) > .ico { background: var(--wash-mint); color: var(--hue-mint); }
.sheet-group .sheet-link:nth-of-type(5n+3) > .ico { background: var(--wash-peach); color: var(--hue-peach); }
.sheet-group .sheet-link:nth-of-type(5n+4) > .ico { background: var(--wash-lilac); color: var(--hue-lilac); }
.sheet-group .sheet-link:nth-of-type(5n) > .ico { background: var(--wash-red); color: var(--hue-red); }
.sheet-link.active { background: var(--accent-soft); color: var(--accent); }
.sheet-link.active > .ico, .sheet-group .sheet-link.active > .ico { background: var(--sheet-tile); color: var(--accent); }  /* over the colours above */
.sheet-link .avatar { width: 36px; height: 36px; font-size: .875rem; }
.sheet-group .nav-more:not([open]) > summary { justify-content: center; min-height: 44px; background: var(--fill); }
.sheet-group .nav-more[open] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.sheet-group .nav-more > summary { grid-column: 1 / -1; }
.sheet-group .nav-more > summary > .ico { background: none; color: var(--text-muted); }
/* Admin Tools (_shell.html nav_fold): one wide tile (the group's icon on a dark chip, its name, a chevron that turns)
   that opens its links below it as tiles, two to a row; lit like a current link when it's shut on one of its pages */
.sheet-group > .nav-fold { grid-column: 1 / -1; padding-top: 0; border-top: 0; }
.sheet-link.nav-fold-toggle > .ico:first-child { background: var(--text); color: var(--sheet-tile); }
.sheet-link.nav-fold-toggle > .ico:last-child {
  width: 20px; height: 20px; margin-right: 6px; padding: 0; border-radius: 0; background: none; color: var(--text-muted);
}
.nav-fold:not([open]) > .sheet-link.is-on > .ico:first-child { background: var(--sheet-tile); color: var(--accent); }
.nav-fold:not([open]) > .sheet-link.is-on > .ico:last-child { color: inherit; }
.sheet-group .nav-fold-links {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); margin: var(--sp-2) 0 0; padding: 0; border-left: 0;
}
.nav-fold-links .sheet-link .nav-text { white-space: normal; line-height: 1.2; }  /* "Leaderboard events" on two lines, not cut */
/* the account group: plain rows (the theme switch, Appearance, Change password, Log out) */
.sheet-group[data-sheet-group="account"] { grid-template-columns: minmax(0, 1fr); gap: 0; overflow: hidden; }
.sheet-group[data-sheet-group="account"] > .sheet-link, .sheet-group[data-sheet-group="account"] > form > .sheet-link { border-radius: 0; }
.sheet-group[data-sheet-group="account"] > .sheet-label + .sheet-link { border-radius: 18px 18px 0 0; }
.sheet-group[data-sheet-group="account"] > form > .sheet-link { border-radius: 0 0 18px 18px; }
.sheet-group[data-sheet-group="account"] > .sheet-link + .sheet-link,
.sheet-group[data-sheet-group="account"] > .sheet-link + form { box-shadow: 0 -1px 0 var(--border); }
.sheet-theme { justify-content: space-between; cursor: default; padding-left: var(--sp-4); }
.sheet-theme:hover { background: var(--sheet-tile); }
.sheet-theme .theme-toggle { border: 0; border-radius: 50%; background: var(--fill); color: var(--text); }
.sheet-group .sheet-logout > .ico { background: var(--danger-soft); color: var(--danger); }

/* "Create new post" (the + sheet and /menu): a Reel or a feed post, then the recent pages */
.create-choice {
  gap: var(--sp-4); min-height: 148px; border: 0; border-radius: 24px; background: var(--wash-red);
}
.create-choice + .create-choice { background: var(--wash-lilac); }
a.create-choice:hover { text-decoration: none; box-shadow: inset 0 0 0 2px var(--accent); }
.create-ico { width: 48px; height: 48px; border-radius: 15px; background: var(--surface); }
.create-text { margin-top: auto; }
.create-title { font-family: var(--font-display); font-size: 1.1875rem; font-weight: 750; letter-spacing: -0.02em; }
.menu-card .sheet-link { background: var(--surface-2); }

/* ---- Home (app.web.home_blocks): the person's blocks as a bento board ----
   app.css lays the blocks out (12 columns, each block's size its share of a row; 6 below 1100px; 2 on phones). Here
   each block is a tile: the numbers on their washes with a big figure, the greeting a hero with today's quotas as one
   ring (looks/bento/_home/blocks/greeting.html; as a Large block it's two rows tall beside the numbers), Needs you with
   its count big at the top right and Next scheduled as a timeline (looks/bento/_home/_need.html). */
.hb-grid { gap: var(--sp-4); grid-auto-rows: minmax(150px, auto); }
.hb-grid > .hb { padding: var(--sp-5); border-radius: var(--radius-tile); background: var(--surface); color: var(--text); }
.hb-head { margin-bottom: var(--sp-4); }
.hb-title { font-family: var(--font-display); font-size: 1.1875rem; font-weight: 750; letter-spacing: -0.02em; }
.hb-title .muted { font-weight: 550; letter-spacing: 0; font-size: .9375rem; }
.hb-link { font-size: .875rem; font-weight: 650; }
.home-bar h1 { font-family: var(--font-display); font-size: clamp(1.75rem, 2.6vw, 2.375rem); font-weight: 750; letter-spacing: -0.035em; }
.hb[data-block="posts_today"] { background: var(--wash-sky); --hue: var(--hue-sky); }
.hb[data-block="pages_at_quota"] { background: var(--wash-mint); --hue: var(--hue-mint); }
.hb[data-block="scheduled_24h"] { background: var(--wash-lilac); --hue: var(--hue-lilac); }
.hb[data-block="rank"], .hb[data-block="connections"] { background: var(--wash-peach); --hue: var(--hue-peach); }
.hb[data-block="failed"], .hb[data-block="ad_follow_ups"] { background: var(--wash-red); --hue: var(--hue-red); }

/* the hero: the greeting and today's quotas as one big ring */
.hb[data-block="greeting"] { padding: var(--sp-6); overflow: hidden; background: linear-gradient(135deg, var(--wash-peach) 0%, var(--wash-lilac) 62%, var(--wash-sky) 100%); }
@media (min-width: 1100px) { .hb[data-block="greeting"].hb-l { grid-row: span 2; } }
.bento-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr auto; gap: var(--sp-3) var(--sp-5); align-items: center; flex: 1; }
.hero-main { align-self: start; min-width: 0; }
.hero-date { margin: 0 0 var(--sp-3); color: var(--text-muted); font-size: .9375rem; font-weight: 650; }
.bento-hero h1 {
  margin: 0 0 var(--sp-3); font-family: var(--font-display); font-size: clamp(2.125rem, 3.1vw, 2.875rem);
  font-weight: 750; letter-spacing: -0.035em; line-height: 1.04; overflow-wrap: anywhere;
}
.hero-sub { margin: 0; color: var(--text-muted); font-size: 1.0625rem; }
.hero-ring { position: relative; grid-column: 2; grid-row: 1 / span 2; width: 196px; height: 196px; color: var(--text); }
.hero-ring:hover { text-decoration: none; }
.hero-ring svg { display: block; width: 100%; height: 100%; }
.ring-track { stroke: color-mix(in srgb, var(--text) 9%, transparent); }
.ring-fill { stroke: var(--accent); }
.ring-fill.is-full { stroke: var(--success); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring-pct { font-family: var(--font-display); font-size: 3.25rem; font-weight: 750; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.ring-unit { margin-left: 2px; font-size: 1.5rem; letter-spacing: 0; }
.ring-cap { margin-top: 6px; color: var(--text-muted); font-size: .8125rem; font-weight: 650; }
.hero-foot { grid-column: 1; align-self: end; margin: 0; color: var(--text-muted); font-size: .875rem; font-weight: 600; }
.hero-foot::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: var(--accent); vertical-align: 0; }
/* a narrow greeting: the ring under the words, smaller */
.hb-s .bento-hero, .hb-m .bento-hero { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
.hb-s .hero-ring, .hb-m .hero-ring { grid-column: 1; grid-row: auto; justify-self: center; width: 150px; height: 150px; }
.hb-s .hero-foot, .hb-m .hero-foot { display: none; }
.hb-s .bento-hero h1, .hb-m .bento-hero h1 { font-size: 1.875rem; }
.hb-s .ring-pct, .hb-m .ring-pct { font-size: 2.5rem; }

/* the four numbers */
.hb-grid > .hb-compact { align-self: stretch; transition: transform .18s ease, box-shadow .18s ease; }  /* tiles fill their row */
.hb-grid > .hb-compact:has(a.hb-stat:hover) { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .08); }
a.hb-stat { gap: 2px; padding: 20px 22px; }
a.hb-stat:hover { background: none; }
.home-stat .pt-stat-label { color: var(--text); font-size: .9375rem; font-weight: 650; line-height: 1.3; }
.stat-ico { width: 36px; height: 36px; border-radius: 12px; background: var(--surface); color: var(--hue, var(--text)); }
.home-stat .pt-stat-value {
  margin-top: auto; font-family: var(--font-display); font-size: 3.5rem; font-weight: 750; letter-spacing: -0.05em;
  line-height: 1; color: var(--text); font-variant-numeric: tabular-nums;
}
.home-stat .pt-stat-of { font-size: 1.375rem; font-weight: 650; letter-spacing: -0.02em; color: var(--text-muted); }
.home-stat .pt-stat-sub { color: var(--text-muted); font-size: .8125rem; }

/* Needs you: a tile per list, its count big at the top right */
.hb[data-block="failed"], .hb[data-block="ready"], .hb[data-block="scheduled"] { padding: 20px 16px 14px; }
.home-need-head { align-items: flex-start; padding: 4px 8px 12px; margin: 0; }
.home-need-head .badge {
  height: auto; padding: 0; background: none; font-family: var(--font-display); font-size: 2.5rem; font-weight: 750;
  letter-spacing: -0.04em; line-height: .9; font-variant-numeric: tabular-nums;
}
.home-need-empty { padding: var(--sp-2) 8px; }
.home-dot { width: 10px; height: 10px; }
.home-rows { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.home-row { min-height: 60px; padding: 10px; border-radius: 16px; }
.home-row .avatar { width: 38px; height: 38px; font-size: .875rem; border: 0; }
.home-row-title { font-weight: 650; }
.home-need-more { padding: 12px 10px 4px; font-weight: 650; }
.hb[data-block="failed"] .home-row:hover, .hb[data-block="ad_follow_ups"] .home-row:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.need-failed .home-need-head .badge { color: var(--danger); }
.tile-glyph { display: none; position: absolute; right: 18px; bottom: 14px; color: var(--danger); opacity: .14; pointer-events: none; }
@media (min-width: 1100px) { .hb-m .need-failed .tile-glyph, .hb-l .need-failed .tile-glyph { display: block; } }
.tile-glyph svg { display: block; }
.need-failed .home-row { align-items: flex-start; }
.need-failed .home-row > .ico { margin-top: 10px; }
.need-failed .home-row-meta { white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; }

/* Next scheduled: a timeline across the tile, each post's time over its headline and page (down the tile when it's
   narrow, or on a phone) */
.hb-l .home-rows.timeline, .hb-f .home-rows.timeline { position: relative; flex-direction: row; gap: var(--sp-2); padding: 0 4px; }
.home-rows.timeline::before {
  content: ""; position: absolute; left: 20px; right: 20px; top: 15px; height: 2px; border-radius: 1px;
  background: color-mix(in srgb, var(--sched) 28%, transparent);
}
.hb-l .timeline > li, .hb-f .timeline > li { flex: 1 1 0; min-width: 0; }
.timeline .home-row { flex-direction: column; align-items: flex-start; gap: 6px; height: 100%; min-height: 0; padding: 8px 10px 12px; }
.timeline .home-row:hover { background: var(--sched-soft); }
.tl-dot { position: relative; z-index: 1; flex: none; width: 14px; height: 14px; margin: 1px 0 6px; border-radius: 50%; background: var(--sched); box-shadow: 0 0 0 4px var(--surface); }
.timeline .home-row:hover .tl-dot { box-shadow: 0 0 0 4px var(--sched-soft); }
.tl-when { display: flex; flex-direction: column; gap: 1px; }
.tl-time { font-family: var(--font-display); font-size: 1.375rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1.1; color: var(--sched); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-day { color: var(--text-muted); font-size: .75rem; font-weight: 650; white-space: nowrap; }
.timeline .home-row-title {
  font-size: .9375rem; line-height: 1.3; white-space: normal; overflow: hidden; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
}
.tl-page { display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; margin-top: auto; color: var(--text-muted); font-size: .8125rem; font-weight: 600; }
.tl-page .avatar { width: 22px; height: 22px; font-size: .625rem; border: 0; }
.tl-handle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* down the tile */
.hb-s .home-rows.timeline, .hb-m .home-rows.timeline { position: relative; flex-direction: column; gap: 0; }
.hb-s .home-rows.timeline::before, .hb-m .home-rows.timeline::before { left: 22px; right: auto; top: 16px; bottom: 16px; width: 2px; height: auto; }
.hb-s .timeline .home-row, .hb-m .timeline .home-row { display: grid; grid-template-columns: 14px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; padding: 8px 10px; }
.hb-s .tl-dot, .hb-m .tl-dot { grid-row: 1 / span 3; margin: 6px 0 0; }
.hb-s .tl-when, .hb-m .tl-when { flex-direction: row; align-items: baseline; gap: 8px; }
.hb-s .tl-time, .hb-m .tl-time { font-size: 1.125rem; }

/* Leaderboard: the all-time top three on a podium */
.mini-podium { gap: 10px; }
.mp-step { gap: 3px; }
.mp-avatar { width: 44px; height: 44px; margin-bottom: 4px; font-weight: 750; font-size: 1.0625rem; }
.mp-1 .mp-avatar { width: 56px; height: 56px; font-size: 1.375rem; box-shadow: 0 0 0 3px var(--gold-line); }
.mp-name { font-weight: 650; font-size: .9375rem; }
.mp-points strong { font-size: .9375rem; }
.mp-block { margin-top: 6px; padding-top: 8px; border-radius: 16px 16px 8px 8px; font-family: var(--font-display); font-size: 1.625rem; }
.mp-1 .mp-block { height: 124px; background: var(--wash-gold); }
.mp-2 .mp-block { height: 90px; }
.mp-3 .mp-block { height: 64px; }

/* Today's quotas: a mini bar per page */
.hb .pt-pages.quota-bars { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp-3) var(--sp-5); }
.quota-bars .vt-page .avatar { width: 30px; height: 30px; font-size: .75rem; border: 0; }
.quota-bars .vt-handle, .quota-bars .vt-count { font-size: .875rem; }
.quota-bars .vt-count strong { font-size: 1rem; }
.quota-bars .vt-bar { height: 8px; }

/* Quick access: app-icon buttons; across the whole board it's a dock, its name at the left */
.home-quick { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--sp-2) var(--sp-1); }
.hb-f .home-quick { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
@media (min-width: 1240px) {
  .home-board:not(.is-editing) .hb-f[data-block="shortcuts"] { flex-direction: row; align-items: center; gap: var(--sp-5); padding: var(--sp-4) var(--sp-5); }
  .home-board:not(.is-editing) .hb-f[data-block="shortcuts"] .hb-head { flex: 0 0 auto; margin: 0; }
  .home-board:not(.is-editing) .hb-f[data-block="shortcuts"] .home-quick { flex: 1; }
}
.home-quick > .card.home-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); margin: 0;
  padding: 10px 4px 8px; border-radius: 18px; background: none; color: var(--text); text-align: center;
}
.home-quick > a.home-tile:hover { background: var(--surface-2); text-decoration: none; border-color: transparent; }
.home-quick > a.home-tile:hover .home-tile-title { color: inherit; }
.home-quick > a.home-tile:hover .home-tile-ico { transform: scale(1.05); }
.home-tile-ico {
  display: grid; place-items: center; flex: none; width: 58px; height: 58px; border-radius: 18px;
  background: var(--wash-sky); color: var(--hue-sky); transition: transform .15s ease;
}
.home-quick > .home-tile:nth-child(5n+2) .home-tile-ico { background: var(--wash-mint); color: var(--hue-mint); }
.home-quick > .home-tile:nth-child(5n+3) .home-tile-ico { background: var(--wash-peach); color: var(--hue-peach); }
.home-quick > .home-tile:nth-child(5n+4) .home-tile-ico { background: var(--wash-lilac); color: var(--hue-lilac); }
.home-quick > .home-tile:nth-child(5n) .home-tile-ico { background: var(--wash-red); color: var(--hue-red); }
.home-tile-text { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; max-width: 100%; }
.home-tile-title { font-size: .8125rem; font-weight: 650; line-height: 1.25; }
.home-tile-sub {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  color: inherit; font-size: inherit; line-height: inherit;
}

/* Connections: the pages to check, as white pills on the peach tile */
.token-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--sp-2); }
.token-rows .home-row { background: var(--surface); }
.token-rows .home-row:hover { background: var(--surface); box-shadow: inset 0 0 0 2px var(--accent); }
.token-rows .home-row .badge { flex: none; }

/* Customize: the tools as a soft pill bar along each tile's top; adding blocks in a tile of its own */
.home-board.is-editing .hb-grid > .hb { outline: 2px dashed color-mix(in srgb, var(--text) 18%, transparent); outline-offset: 3px; }
.hb-tools { margin: -6px -6px var(--sp-3); padding: 5px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 75%, transparent); }
.hb[data-block="greeting"] .hb-tools { margin: -14px -14px var(--sp-3); }
.hb-compact .hb-tools { margin: 12px 12px 0; }
.hb-tool, .hb-size, .hb-grip { height: 32px; min-width: 32px; border-radius: 11px; }
.hb-size[aria-pressed="true"] { border-color: transparent; background: var(--accent); color: var(--accent-ink); }
.hb-ghost { border: 2px dashed var(--accent); border-radius: var(--radius-tile); }
.hb-add { gap: var(--sp-5); padding: var(--sp-6); border: 0; border-radius: var(--radius-tile); }
.hb-add-head h2 { font-family: var(--font-display); font-size: 1.625rem; font-weight: 750; letter-spacing: -0.03em; }
.hb-bubble { height: 46px; padding: 0 var(--sp-5) 0 var(--sp-4); border: 0; background: var(--wash-sky); font-weight: 650; }
.hb-bubbles li:nth-child(5n+2) .hb-bubble { background: var(--wash-mint); }
.hb-bubbles li:nth-child(5n+3) .hb-bubble { background: var(--wash-peach); }
.hb-bubbles li:nth-child(5n+4) .hb-bubble { background: var(--wash-lilac); }
.hb-bubbles li:nth-child(5n) .hb-bubble { background: var(--wash-red); }
.hb-bubble .ico { color: var(--text); }
.hb-bubble:hover { background: var(--fill-hover, var(--surface-2)); box-shadow: inset 0 0 0 2px var(--accent); }
.hb-cat { border: 0; border-radius: 18px; background: var(--surface-2); }
.hb-cat-ico { border-radius: 12px; background: var(--surface); }
.hb-cat.is-on { opacity: .75; }

@media (max-width: 1099.98px) {
  .hb-l .home-rows.timeline, .hb-f .home-rows.timeline { overflow-x: auto; scrollbar-width: none; }
  .hb-l .timeline > li, .hb-f .timeline > li { flex: 0 0 170px; }
}
@media (max-width: 640px) {
  .home-tile-sub { display: inline; -webkit-line-clamp: none; line-clamp: none; }
}
@media (max-width: 639.98px) {
  .hb-grid { grid-auto-rows: auto; gap: var(--sp-3); }
  .hb-grid > .hb { padding: 18px; border-radius: 24px; }
  .hb[data-block="greeting"] { padding: 22px 18px 20px 22px; }
  .bento-hero { grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-2) var(--sp-3); }
  .bento-hero h1 { font-size: 1.75rem; }
  .hero-sub { font-size: .9375rem; }
  .hero-ring, .hb-s .hero-ring, .hb-m .hero-ring { grid-column: 2; grid-row: 1 / span 2; width: 124px; height: 124px; }
  .ring-pct, .hb-s .ring-pct, .hb-m .ring-pct { font-size: 2.125rem; }
  .ring-unit { font-size: 1rem; }
  .ring-cap { margin-top: 3px; font-size: .6875rem; }
  .hero-foot { grid-column: 1 / -1; font-size: .8125rem; }
  .hb-grid > .hb-compact { padding: 0; }
  a.hb-stat { min-height: 136px; padding: 16px; }
  .home-stat .pt-stat-label { font-size: .8125rem; }
  .stat-ico { display: none; }  /* room for the label */
  .home-stat .pt-stat-value { font-size: 2.625rem; }
  .home-stat .pt-stat-of { font-size: 1.0625rem; }
  .home-stat .pt-stat-sub { min-height: 2.6em; font-size: .75rem; line-height: 1.3; }  /* two lines: the numbers line up */
  .hb[data-block="failed"], .hb[data-block="ready"], .hb[data-block="scheduled"] { padding: 16px 10px 10px; }
  /* the timeline runs down the tile */
  .home-rows.timeline, .hb-l .home-rows.timeline, .hb-f .home-rows.timeline { flex-direction: column; gap: 0; overflow: visible; }
  .home-rows.timeline::before { left: 22px; right: auto; top: 16px; bottom: 16px; width: 2px; height: auto; }
  .timeline > li, .hb-l .timeline > li, .hb-f .timeline > li { flex: none; }
  .timeline .home-row { display: grid; grid-template-columns: 14px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; padding: 8px 10px; }
  .tl-dot { grid-row: 1 / span 3; margin: 6px 0 0; }
  .tl-when { flex-direction: row; align-items: baseline; gap: 8px; }
  .tl-time { font-size: 1.125rem; }
  .home-quick, .hb-f .home-quick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-tile-ico { width: 52px; height: 52px; border-radius: 16px; }
  .home-tile-title { font-size: .75rem; }
  .hb-add { padding: var(--sp-5) var(--sp-4); }
}

/* ---- the tile language on every other page ----
   Cards are tiles (no border, a big radius, white on the grey page / charcoal on black); a page's numbers are tiles of
   their own with a soft colour wash; range and view chips are a segmented control; tables and lists sit flush inside
   their tile. */
.page-head h1, h1.bar-title { font-family: var(--font-display); font-size: 2.25rem; font-weight: 750; letter-spacing: -0.035em; line-height: 1.1; }
.vt-title, .list-head h2 { font-family: var(--font-display); font-size: 1.375rem; font-weight: 750; letter-spacing: -0.025em; }
.vt-title .muted, .list-head h2 .muted { font-size: 1rem; font-weight: 550; letter-spacing: 0; }

/* the page's numbers (the Post Tracker's and others): washed tiles, huge figures */
.pt-stats { gap: var(--sp-4); }
.pt-stat { gap: 4px; padding: 20px 22px; min-height: 148px; border-radius: var(--radius-tile); }
.pt-stats > .pt-stat:nth-child(4n+1) { background: var(--wash-sky); }
.pt-stats > .pt-stat:nth-child(4n+2) { background: var(--wash-mint); }
.pt-stats > .pt-stat:nth-child(4n+3) { background: var(--wash-lilac); }
.pt-stats > .pt-stat:nth-child(4n) { background: var(--wash-peach); }
.pt-stat-label { color: var(--text); font-size: .9375rem; font-weight: 650; }
.pt-stat-value { margin-top: auto; font-family: var(--font-display); font-size: 3.25rem; font-weight: 750; letter-spacing: -0.05em; line-height: 1; }
.pt-stat-of { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.02em; }
.pt-stat-sub { font-size: .8125rem; }
.pt-pages { padding: var(--sp-5); gap: var(--sp-4) var(--sp-6); }
.pt-pages .vt-page .avatar { border: 0; }
.pt-pages .vt-bar { height: 8px; }
.vt-filters { gap: var(--sp-3); }
.vt-step { border-radius: 50%; }
.vt-date input { padding: 0 var(--sp-3); }

/* tables inside a tile (on phones a .stack-mobile table's rows are cards of their own: no indent there) */
@media (min-width: 641px) {
  .card.flush > table th:first-child, .card.flush > .table-wrap > table th:first-child { padding-left: var(--sp-5); }
  .card.flush > table td:first-child, .card.flush > .table-wrap > table td:first-child { padding-left: var(--sp-5); }
}
th { background: transparent; color: var(--text-muted); font-size: .75rem; letter-spacing: .04em; }
tbody tr:hover td { background: var(--surface-2); }
th, td { border-bottom-color: var(--border); }

/* ---- the Leaderboard (looks/bento/leaderboard.html): first, second and third as a podium of tiles, everyone else in
   one tile below ---- */
.lb-section { margin-bottom: var(--sp-7); }
.lb-board-head { margin-bottom: var(--sp-4); }
.lb-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); align-items: end; gap: var(--sp-4); margin-bottom: var(--sp-4); }
.lb-stage > .lb-hero { grid-column: 2; grid-row: 1; }
.lb-stage > .lb-steps { display: contents; }
.lb-stage .lb-silver { grid-column: 1; grid-row: 1; }
.lb-stage .lb-bronze { grid-column: 3; grid-row: 1; }
/* first place: a tall gold tile, the crown on top, the points huge */
.lb-hero {
  position: relative; flex-direction: column; align-items: center; justify-content: flex-end; gap: var(--sp-2);
  min-height: 330px; margin: 0; padding: var(--sp-6) var(--sp-5); text-align: center;
  border: 0; border-radius: var(--radius-tile); background: linear-gradient(180deg, var(--wash-gold), color-mix(in srgb, var(--wash-gold) 45%, var(--surface)));
  box-shadow: none;
}
.lb-hero .lb-crown { width: 76px; height: 76px; border: 0; background: var(--surface); color: var(--gold); box-shadow: 0 0 0 4px var(--gold-line); margin-bottom: auto; }
.lb-hero-main { flex: none; }
.lb-hero-kicker { color: var(--gold); letter-spacing: .08em; }
.lb-hero-name { justify-content: center; }
.lb-hero-name .lb-name { font-family: var(--font-display); font-size: 1.875rem; letter-spacing: -0.03em; }
.lb-hero-points { text-align: center; }
.lb-hero-points strong { font-family: var(--font-display); font-size: 4rem; font-weight: 800; letter-spacing: -0.05em; color: var(--gold); }
.lb-hero-points span { font-size: .875rem; }
/* second and third: shorter tiles beside it, in silver and bronze */
.lb-stage .lb-row {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; padding: var(--sp-5) var(--sp-4);
  border: 0; border-radius: var(--radius-tile); text-align: center;
}
.lb-stage .lb-silver { min-height: 264px; background: linear-gradient(180deg, var(--silver-soft), color-mix(in srgb, var(--silver-soft) 40%, var(--surface))); }
.lb-stage .lb-bronze { min-height: 222px; background: linear-gradient(180deg, var(--bronze-soft), color-mix(in srgb, var(--bronze-soft) 40%, var(--surface))); }
.lb-stage .lb-rank { width: 56px; height: 56px; margin-bottom: auto; font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; background: var(--surface); }
.lb-stage .lb-silver .lb-rank, .lb-stage .lb-bronze .lb-rank { box-shadow: 0 0 0 4px currentColor; }
.lb-stage .lb-who { display: flex; flex-direction: column; align-items: center; }
.lb-stage .lb-who-line { justify-content: center; margin: 0; }
.lb-stage .lb-name { font-family: var(--font-display); font-size: 1.375rem; font-weight: 750; letter-spacing: -0.02em; }
.lb-stage .lb-bar { display: none; }
.lb-stage .lb-points { order: 3; text-align: center; font-size: .875rem; }
.lb-stage .lb-points strong { display: block; font-family: var(--font-display); font-size: 2.75rem; font-weight: 800; letter-spacing: -0.05em; line-height: 1; }
.lb-stage .lb-silver .lb-points strong { color: var(--silver); }
.lb-stage .lb-bronze .lb-points strong { color: var(--bronze); }
.lb-stage .lb-posts { order: 4; }
/* everyone else */
.lb-card { border-radius: var(--radius-tile); padding: var(--sp-2); }
/* rows split by hairlines; the signed-in person's row is a rounded red-tinted band (no hairline around it) */
.lb-row { border-bottom: 0; border-radius: 0; padding: var(--sp-3) var(--sp-4); }
.lb-list > .lb-row + .lb-row { box-shadow: inset 0 1px 0 var(--border); }
.lb-list > .lb-row.is-me, .lb-list > .lb-row.is-me + .lb-row { box-shadow: none; }
.lb-row.is-me { background: var(--accent-soft); border-radius: 16px; }
.lb-rank { border-radius: 50%; }
.lb-bar { height: 6px; max-width: 360px; }
.lb-points strong { font-size: 1.25rem; font-family: var(--font-display); letter-spacing: -0.02em; }
.lb-you { height: 18px; }
/* the live event: one wide golden tile, the event at the left and its own ranking at the right */
.lb-event { border: 0; border-radius: var(--radius-tile); }
.lb-event.is-live { background: linear-gradient(120deg, var(--wash-gold), var(--wash-peach)); }
.lb-event-name { font-family: var(--font-display); font-size: 1.75rem; font-weight: 750; letter-spacing: -0.03em; }
.lb-event.is-live .lb-prize { background: var(--surface); }
.lb-event-board .lb-hero-sm {
  flex-direction: row; align-items: center; justify-content: flex-start; min-height: 0; padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-2); text-align: left; background: var(--surface); border-radius: 20px;
}
.lb-event-board .lb-hero-sm .lb-crown { width: 48px; height: 48px; margin: 0; box-shadow: 0 0 0 3px var(--gold-line); }
.lb-event-board .lb-hero-sm .lb-hero-main { flex: 1; }
.lb-event-board .lb-hero-sm .lb-hero-name { justify-content: flex-start; }
.lb-event-board .lb-hero-sm .lb-hero-name .lb-name { font-size: 1.25rem; }
.lb-event-board .lb-hero-sm .lb-hero-points { text-align: right; }
.lb-event-board .lb-hero-sm .lb-hero-points strong { font-size: 2rem; }
.lb-event .lb-list { border: 0; border-radius: 20px; background: var(--surface); padding: 4px; }
.lb-ended { border-radius: var(--radius-tile); }
/* the podium's steps keep their own colours and shape (even when one of them is you: a red ring then) */
.lb-stage .lb-steps > .lb-row { border-radius: var(--radius-tile); box-shadow: none; }
.lb-stage .lb-steps > .lb-silver { background: linear-gradient(180deg, var(--silver-soft), color-mix(in srgb, var(--silver-soft) 40%, var(--surface))); }
.lb-stage .lb-steps > .lb-bronze { background: linear-gradient(180deg, var(--bronze-soft), color-mix(in srgb, var(--bronze-soft) 40%, var(--surface))); }
.lb-stage .lb-steps > .lb-row.is-me { box-shadow: inset 0 0 0 3px var(--accent); }
@media (max-width: 899.98px) {
  .lb-stage { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
  .lb-stage > .lb-hero { grid-column: 1 / -1; grid-row: 1; min-height: 0; }
  .lb-stage .lb-silver { grid-column: 1; grid-row: 2; min-height: 0; }
  .lb-stage .lb-bronze { grid-column: 2; grid-row: 2; min-height: 0; }
}
@media (max-width: 640px) {
  .lb-hero { flex-wrap: nowrap; padding: var(--sp-5) var(--sp-4); }
  .lb-hero .lb-crown { width: 60px; height: 60px; }
  .lb-hero-points { flex-basis: auto; display: block; text-align: center; }
  .lb-hero-points strong { display: block; font-size: 3rem; }
  .lb-stage .lb-row { display: flex; padding: var(--sp-4) var(--sp-3); }
  .lb-stage .lb-rank { width: 44px; height: 44px; font-size: 1.25rem; margin-bottom: var(--sp-2); }
  .lb-stage .lb-name { font-size: 1.125rem; }
  .lb-stage .lb-points strong { font-size: 2.25rem; }
  .lb-event-board .lb-hero-sm { flex-wrap: wrap; }
  .lb-event-board .lb-hero-sm .lb-hero-points { flex-basis: auto; text-align: right; display: block; }
  .lb-event-board .lb-hero-sm .lb-hero-points strong { display: block; font-size: 1.75rem; }
  .lb-event-name { font-size: 1.375rem; }
}

/* ---- Calendar: the toolbar and the days inside one big tile (the bar is its top, the days its body) ---- */
.cal-bar { margin-bottom: 0; padding: var(--sp-5) var(--sp-5) var(--sp-4); background: var(--surface); border-radius: var(--radius-tile) var(--radius-tile) 0 0; }
.cal-bar + #cal-body { padding: 0 var(--sp-5) var(--sp-5); background: var(--surface); border-radius: 0 0 var(--radius-tile) var(--radius-tile); }
.cal-title { font-family: var(--font-display); font-size: 1.375rem; font-weight: 750; letter-spacing: -0.025em; }
.cal-day { border: 0; border-radius: 18px; background: var(--surface-2); padding: var(--sp-3); }
.cal-day.is-past { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
.cal-day.is-today { background: var(--surface); box-shadow: inset 0 0 0 2px var(--accent); }
@media (min-width: 901px) { .cal-week .cal-day { min-height: 220px; } }
.cal-item { border-left: 0; border-radius: 12px; padding: 8px 10px; }
.cal-month { border: 0; border-radius: 20px; background: var(--surface-2); }
.cal-cell { background: var(--surface); border-radius: 0; }
.cal-cell.is-outside { background: var(--surface-2); }
.cal-cell.is-today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-legend { margin-bottom: var(--sp-4); }
.cal-empty { border: 0; border-radius: 16px; background: var(--surface-2); }
@media (max-width: 640px) {
  .cal-bar { padding: var(--sp-3) var(--sp-3) var(--sp-4); border-radius: 22px 22px 0 0; }
  .cal-bar + #cal-body { padding: 0 var(--sp-3) var(--sp-3); border-radius: 0 0 22px 22px; }
}

/* ---- Promotions: each campaign a tile, its content as rounded cards ---- */
.promo-card { border-radius: var(--radius-tile); padding: var(--sp-6); }
.promo-brand { color: var(--hue-peach); }
.promo-name { font-family: var(--font-display); font-size: 1.875rem; font-weight: 750; letter-spacing: -0.03em; }
.promo-progress { padding: var(--sp-4); border-radius: 20px; background: var(--wash-mint); }
.promo-count { text-align: left; }
.promo-count strong { font-family: var(--font-display); font-size: 2rem; font-weight: 750; letter-spacing: -0.04em; }
.promo-progress .vt-bar { height: 8px; background: var(--surface); }
.promo-brief { border-left: 0; border-radius: 18px; background: var(--wash-sky); }
.promo-tile { border: 0; border-radius: 22px; background: var(--surface-2); }
.promo-thumb { border-radius: 22px 22px 0 0; }
.promo-tile-body { padding: var(--sp-3) var(--sp-4) var(--sp-4); }
.promo-states { border-top-color: var(--border); }
.promo-use-menu { border: 0; border-radius: 16px; background: var(--surface); }
@media (max-width: 560px) { .promo-card { padding: var(--sp-4); } }

/* ---- Submit: the form in one tile, the source tabs as a segmented control, the recent list in another tile ---- */
.submit-card { border-radius: var(--radius-tile); padding: var(--sp-6); }
/* wide screens: the form across the page, the page and template at the left, the video tabs at the right */
@media (min-width: 1100px) {
  .submit-card { max-width: none; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--sp-7); align-items: start; }
  .submit-card > * { grid-column: 1 / -1; }
  .submit-card > .page-picker { grid-column: 1; grid-row: 1; }
  .submit-card > .tpl-picker { grid-column: 1; grid-row: 2; }
  .submit-card > .submit-limits { grid-column: 1; grid-row: 3; }
  .submit-card > .source { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; padding-left: var(--sp-7); box-shadow: inset 1px 0 0 var(--border); }
  .submit-card .page-options { grid-template-columns: minmax(0, 1fr); }
}
.page-option { border-radius: 16px; }
.tabs { width: fit-content; max-width: 100%; gap: 2px; padding: 3px; border: 0; border-radius: 999px; background: var(--seg-track); margin-bottom: var(--sp-5); }
.tabs .tab { margin: 0; min-height: 38px; padding: 0 var(--sp-4); border: 0; border-radius: 999px; }
.tabs .tab:hover { background: color-mix(in srgb, var(--seg-thumb) 50%, transparent); }
.tabs .tab[aria-selected="true"] { background: var(--seg-thumb); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.tabs .tab[aria-selected="true"]:hover { background: var(--seg-thumb); }
.source .tabs { border-radius: 22px; }  /* one row: still a pill (44px tall); two rows: a rounded box */
.dropzone { border-radius: 22px; }
/* the recent list: its groups' names as soft bands (green Ready to post, purple Scheduled) inside the tile */
#recent.card.flush { padding: var(--sp-2); }
.recent-group + .recent-group { margin-top: var(--sp-2); }
.recent-group-head, .recent-group.is-ready .recent-group-head, .recent-group.is-scheduled .recent-group-head,
.recent-group + .recent-group .recent-group-head {
  margin: 0 0 2px; padding: 10px var(--sp-4); border: 0; border-radius: 16px; background: var(--surface-2);
  font-size: .8125rem; letter-spacing: .03em;
}
.recent-group.is-ready .recent-group-head { background: var(--wash-mint); color: var(--success); }
.recent-group.is-scheduled .recent-group-head { background: var(--wash-lilac); color: var(--sched); }
.recent-group .sub-item, .recent-group.is-ready .sub-item, .recent-group.is-scheduled .sub-item,
.recent-group .sub-del, .recent-group.is-ready .sub-del, .recent-group.is-scheduled .sub-del { box-shadow: none; }
.sub-item { border-radius: 16px; }
.thumb { border-radius: 10px; border: 0; }
@media (max-width: 560px) {
  .tabs { width: 100%; border-radius: 18px; }
  .tabs .tab { border-radius: 15px; min-height: 52px; padding: 6px 2px; }
  .submit-card { padding: var(--sp-4); }
}

/* ---- every other page: the same tiles, pills and washes ---- */
/* the light/dark switch: a round soft button (the top bar's is white, see the shell) */
.theme-toggle { border: 0; border-radius: 50%; background: var(--fill); color: var(--text); }
.theme-toggle:hover { background: var(--fill-hover); }
/* a bare page (sign-in while signed in): the same grey page under the bar */
.topbar { background: var(--bg); border-bottom: 0; }
/* a file picker's button is a soft pill like the others */
input[type=file]::file-selector-button {
  margin-right: var(--sp-3); padding: 7px 14px; border: 0; border-radius: 999px; background: var(--fill); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer;
}
input[type=file]::file-selector-button:hover { background: var(--fill-hover); }
.note { border-radius: 16px; }
/* a list in groups (Batches, Submit Reels/Feeds): the groups' bands sit inside the tile, rounded */
.card.flush:has(> .recent-group) { padding: var(--sp-2); }

/* Home: the live event over the Leaderboard's podium */
.home-event {
  display: flex; align-items: center; gap: var(--sp-3); margin: 0 0 var(--sp-4); padding: 10px 14px 10px 10px;
  border-radius: 18px; background: var(--wash-gold); color: var(--text);
}
.home-event:hover { text-decoration: none; box-shadow: inset 0 0 0 2px var(--gold-line); }
.home-event-ico { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 12px; background: var(--surface); color: var(--gold); }
.home-event-text { display: flex; flex-direction: column; min-width: 0; }
.home-event-name { display: flex; align-items: center; flex-wrap: wrap; gap: 2px var(--sp-2); font-weight: 700; }
.home-event .lb-mult { height: 20px; background: var(--surface); font-size: .6875rem; }
.home-event-meta { color: var(--text-muted); font-size: .8125rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* the review page: the template and trim panels get a tile's room; the player sits in its tile */
.template-panel.card, .trim-panel.card { padding: 20px var(--sp-5); }
.video-card { padding: 14px; }
.video-card > p.muted:first-child { margin: 0; padding: 6px 8px; }
.job-bar { border-radius: 16px; }

/* the Admin overview: each tile's icon on its own soft colour, like the menus */
.admin-tile-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 750; letter-spacing: -0.02em; }
.admin-tile-icon { border-radius: 15px; background: var(--wash-sky); color: var(--hue-sky); }
.admin-tiles > .admin-tile:nth-child(5n+2) .admin-tile-icon { background: var(--wash-mint); color: var(--hue-mint); }
.admin-tiles > .admin-tile:nth-child(5n+3) .admin-tile-icon { background: var(--wash-peach); color: var(--hue-peach); }
.admin-tiles > .admin-tile:nth-child(5n+4) .admin-tile-icon { background: var(--wash-lilac); color: var(--hue-lilac); }
.admin-tiles > .admin-tile:nth-child(5n) .admin-tile-icon { background: var(--wash-red); color: var(--hue-red); }
.admin-tile { transition: transform .18s ease, box-shadow .18s ease; }
.admin-tile:hover { border-color: transparent; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .08); }

/* Templates: each card's preview framed on the tile itself */
.tpl-thumb { padding: var(--sp-4) var(--sp-4) 0; background: var(--surface); border-bottom: 0; }
.tpl-thumb img { border-radius: 12px; }

/* the date pickers (Post Tracker, VA Tracker, Calendar): like the other fields */
.vt-date input { border: 1px solid var(--border-input); border-radius: 12px; background: var(--surface); color: var(--text); }

/* /menu: the account's name on the inner tone, like its links; on a phone the page is the sheet itself (no tile
   around it, its links white tiles on the grey page, as in the More sheet) */
.menu-card .sheet-user, .menu-card .sheet-theme:hover { background: var(--surface-2); }
@media (max-width: 640px) {
  .menu-card { padding: var(--sp-2) 0; background: none; }
  .menu-card .sheet-link, .menu-card .sheet-user, .menu-card .sheet-theme:hover { background: var(--surface); }
  .menu-card .sheet-link:hover { background: var(--surface-2); }
}

/* the options to tick (a template's layers, a promotion's status, mode and pages): soft tiles, the ticked ones red */
.toggle-field .check, .checklist .check, .pr-choice { border-color: transparent; border-radius: 14px; background: var(--surface-2); }
.toggle-field .check:has(input:checked), .checklist .check:has(input:checked), .pr-choice:has(input:checked) {
  border-color: var(--accent); background: var(--accent-soft);
}

/* Appearance: the themes as tiles, the section's name like the others */
.appearance-head { font-family: var(--font-display); font-size: 1.375rem; font-weight: 750; letter-spacing: -0.025em; }
.look-pick { border-color: transparent; border-radius: 22px; transition: box-shadow .15s, transform .15s; }
.look-pick:hover { border-color: transparent; box-shadow: 0 10px 24px rgba(0, 0, 0, .08); }
.look-preview { border-bottom: 0; }

/* the Calendar has its own "Create new post": the bar's goes away (not just hidden), the account pill at the end */
.has-shell:has(.cal-new) .topnav .create-new { display: none; }

@media (max-width: 640px) {
  /* a page's own title is smaller on a phone (the review page, a batch, a page's settings) */
  .page-head h1 { font-size: 1.75rem; }
  /* the review page's Post buttons side by side: room for "Post to Trial Reels" on one line */
  .post-card .btn-lg { padding: 0 var(--sp-2); font-size: .9375rem; }
  /* the Post Tracker's numbers: two tiles to a row, like Home's */
  .pt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
  .pt-stats > .pt-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .pt-stat { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; gap: 2px; min-height: 128px; padding: 16px; border-radius: 24px; }
  .pt-stat-label { flex-basis: auto; font-size: .8125rem; }
  .pt-stat-value { font-size: 2.625rem; }
  .pt-stat-of { font-size: 1.0625rem; }
  .pt-stat-sub { font-size: .75rem; }
  /* the Earnings pages' money is too wide for half a row: a tile each, only as tall as it needs */
  .earn-stats { grid-template-columns: minmax(0, 1fr); }
  .earn-stat { min-height: 0; }
  .earn-stat .pt-stat-value { margin-top: var(--sp-2); overflow-wrap: anywhere; }
}
