/* MYNIFEST styles. Design tokens first; everything below reads them. */
:root {
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --serif: Georgia, "Times New Roman", "Liberation Serif", Times, serif;
  /* MYNIFEST palette: cream, deep navy, gold, crimson, a little teal */
  --cream: #f4ead4; --ivory: #fffaf0; --navy: #0b1f3a; --navy-2: #102c50; --gold: #d4a63a; --gold-light: #f0c75e; --crimson-deep: #8c0f12;
  --gold-grad: linear-gradient(180deg, #f0d27a 0%, #dcb350 48%, #c3994a 100%); --gold-grad-hover: linear-gradient(180deg, #f6dc8c 0%, #e6bf5e 48%, #cfa44f 100%);
  --bg: #f4ead4; --surface: #fffaf0; --surface-2: #f6ecd8; --surface-3: #ebdcbc; --ink: #181818;
  --text: #0b1f3a; --muted: #5e4726; --line: #e6d8b8; --line-strong: #cdb98a; --field: #8f7a49;
  --brand: #0f2c4f; --brand-600: #0b1f3a; --brand-50: #f6e8c0; --on-brand: #fbf4e4; --link: #8c0f12; --eyebrow: #7a5a0c;
  --crimson: #8c0f12; --crimson-50: #f6dcd6;
  --teal: #1b8479; --teal-50: #d7efea; --teal-fg: #0d5a52; --amber: #7f5200; --amber-50: #fbe9bd;
  --danger: #a8101a; --danger-50: #f9dcd6; --ok: #146b3f; --ok-50: #d9f0df;
  --focus: #0f2c4f;
  --shadow: 0 1px 2px rgba(11, 31, 58, .07), 0 6px 20px rgba(86, 62, 18, .09);
  --shadow-lg: 0 10px 40px rgba(11, 31, 58, .3);
  --hero-a: #0b1f3a; --hero-b: #16427a; --side-bg: #0b1f3a; --rays: rgba(212, 166, 58, .14); --glow: rgba(240, 199, 94, .38);
  --radius: 16px; --radius-sm: 10px;
  /* statuses: soft (tint + dark text) and solid */
  --st-not_started-bg: #ece2cb; --st-not_started-fg: #3d3220; --st-not_started-dot: #8a7a5c;
  --st-in_progress-bg: #d3e4f4; --st-in_progress-fg: #0f2c4f; --st-in_progress-dot: #2b6cb0;
  --st-on_hold-bg: #e6dcf3; --st-on_hold-fg: #3f2a6b; --st-on_hold-dot: #7a58b8;
  --st-completed-bg: #1d7f43; --st-completed-fg: #ffffff; --st-completed-dot: #1d7f43;
  --st-cancelled-bg: #b01218; --st-cancelled-fg: #ffffff; --st-cancelled-dot: #b01218;
  /* priorities: Low green, Medium yellow, High pink, Urgent red */
  --pr-low-bg: #bfe8c6; --pr-low-fg: #0d3b1d;
  --pr-medium-bg: #f4d63c; --pr-medium-fg: #3a2a00;
  --pr-high-bg: #f2b0cf; --pr-high-fg: #6b0f3a;
  --pr-urgent-bg: #b01218; --pr-urgent-fg: #ffffff;
  --tab-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #071a33; --surface: #0e2745; --surface-2: #14355c; --surface-3: #1d4672; --ink: #f6ecd6;
    --text: #f6ecd6; --muted: #c3b690; --line: #25466f; --line-strong: #3b6290; --field: #6f95c2;
    --brand: #e8c464; --brand-600: #f3d783; --brand-50: #1a3558; --on-brand: #0b1f3a; --link: #f0c75e; --eyebrow: #e0b84f;
    --crimson: #e0606a; --crimson-50: #3d1a2a;
    --teal: #4fc3b6; --teal-50: #0f3d49; --teal-fg: #8fe5d9; --amber: #f0c75e; --amber-50: #3a3010;
    --danger: #ff9a8f; --danger-50: #4a1b22; --ok: #7fe0a8; --ok-50: #12402c; --focus: #f0c75e;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.3); --shadow-lg: 0 10px 40px rgba(0,0,0,.6);
    --hero-a: #0f2c4f; --hero-b: #123a66; --side-bg: #051326; --rays: rgba(232, 196, 100, .07); --glow: rgba(232, 196, 100, .12);
    --st-not_started-bg: #223a5c; --st-not_started-fg: #e7dcc0; --st-not_started-dot: #9fb0c9;
    --st-in_progress-bg: #1d4a7c; --st-in_progress-fg: #d6e8fb; --st-in_progress-dot: #6fb0ee;
    --st-on_hold-bg: #3b2f66; --st-on_hold-fg: #e4daff; --st-on_hold-dot: #a58be0;
    --st-completed-dot: #3fb36b;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #071a33; --surface: #0e2745; --surface-2: #14355c; --surface-3: #1d4672; --ink: #f6ecd6;
  --text: #f6ecd6; --muted: #c3b690; --line: #25466f; --line-strong: #3b6290; --field: #6f95c2;
  --brand: #e8c464; --brand-600: #f3d783; --brand-50: #1a3558; --on-brand: #0b1f3a; --link: #f0c75e; --eyebrow: #e0b84f;
  --crimson: #e0606a; --crimson-50: #3d1a2a;
  --teal: #4fc3b6; --teal-50: #0f3d49; --teal-fg: #8fe5d9; --amber: #f0c75e; --amber-50: #3a3010;
  --danger: #ff9a8f; --danger-50: #4a1b22; --ok: #7fe0a8; --ok-50: #12402c; --focus: #f0c75e;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.3); --shadow-lg: 0 10px 40px rgba(0,0,0,.6);
  --hero-a: #0f2c4f; --hero-b: #123a66; --side-bg: #051326; --rays: rgba(232, 196, 100, .07); --glow: rgba(232, 196, 100, .12);
  --st-not_started-bg: #223a5c; --st-not_started-fg: #e7dcc0; --st-not_started-dot: #9fb0c9;
  --st-in_progress-bg: #1d4a7c; --st-in_progress-fg: #d6e8fb; --st-in_progress-dot: #6fb0ee;
  --st-on_hold-bg: #3b2f66; --st-on_hold-fg: #e4daff; --st-on_hold-dot: #a58be0;
  --st-completed-dot: #3fb36b;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--font); background: var(--bg); color: var(--text); min-height: 100vh; overflow-x: hidden; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--link); }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
#view:focus, #view:focus-visible { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* the link buttons in Settings on phones and tablets (the sidebar is not shown there) */
.ext-links { display: flex; flex-wrap: wrap; gap: 10px; }
.ext-btn { min-width: 0; max-width: 100%; height: auto; min-height: 44px; padding-top: 8px; padding-bottom: 8px; text-align: left; }
.ext-btn .ext-t { min-width: 0; overflow-wrap: anywhere; }
.ext-btn .ico, .side-ext .ico { flex: none; }
/* 0.3.18 */
.nowrap { white-space: nowrap; }
@media (max-width: 559px) { .data-row .btn { width: 100%; } }
/* 0.3.18: on phones and tablets the Links card sits at the top of Settings, styled like the sidebar it stands in for (it is hidden from 900px up) */
@media (max-width: 899px) {
  .card.ext-links-card { gap: 10px; padding: 14px; background: linear-gradient(160deg, var(--side-bg) 0%, #12345e 100%); border: 1px solid rgba(240, 199, 94, .45); box-shadow: 0 6px 22px rgba(11, 31, 58, .22); color: #f6ecd6; }
  .card.ext-links-card > h2 { margin-bottom: 0; color: #f0c75e; }
  .ext-links-card .ext-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(136px, 1fr)); gap: 10px; }
  .ext-links-card .ext-btn { justify-content: flex-start; gap: 10px; min-height: 54px; padding: 8px 12px 8px 8px; border-radius: 14px; background: rgba(255, 255, 255, .08); border-color: rgba(240, 199, 94, .38); color: #f6ecd6; font-size: .95rem; line-height: 1.2; }
  .ext-links-card .ext-btn:hover { background: rgba(255, 255, 255, .14); }
  .ext-links-card .ext-btn:focus-visible { outline: 3px solid #f0c75e; outline-offset: 2px; }
  .ext-links-card .ext-btn .ico { width: 36px; height: 36px; padding: 9px; border-radius: 11px; background: var(--gold-grad); color: var(--navy); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45); }
  /* the two Your data buttons: icon and words line up on the left when the words wrap */
  .data-row .btn { justify-content: flex-start; text-align: left; height: auto; min-height: 48px; padding-top: 10px; padding-bottom: 10px; line-height: 1.25; }
}
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); letter-spacing: .08em; font-weight: 700; }

/* ---------- wordmark */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark { width: 34px; height: 34px; border-radius: 50%; flex: none; object-fit: contain; }
.brand-word { font-family: var(--serif); font-weight: 700; letter-spacing: .2em; font-size: 1.05rem; color: var(--ink); }
.brand-word sup { font-size: .55em; letter-spacing: 0; vertical-align: super; font-weight: 700; margin-left: 1px; }

/* ---------- buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font-weight: 650; cursor: pointer; text-decoration: none; transition: background .15s, transform .08s, box-shadow .15s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--gold-grad); border-color: #b48b30; color: var(--navy); font-weight: 750; letter-spacing: .01em; border-radius: 999px; box-shadow: 0 2px 8px rgba(150, 105, 20, .32), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn.primary:hover { background: var(--gold-grad-hover); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
:root[data-theme="dark"] .btn.danger { color: #1a0b0b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.danger { color: #1a0b0b; } }
.btn.ghost { background: transparent; border-color: transparent; color: var(--brand); }
.btn.ghost:hover { background: var(--brand-50); }
.btn.outline-danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn.sm { min-height: 44px; padding: 0 14px; font-size: .92rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--muted); position: relative; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
label.field, .field { display: grid; gap: 6px; font-weight: 650; font-size: .92rem; }
.field > .hint, .hint { font-weight: 400; color: var(--muted); font-size: .86rem; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=search], input[type=datetime-local], input[type=number], select, textarea {
  width: 100%; min-height: 44px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--field); background: var(--surface); font-weight: 400; }
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); }
::placeholder { color: var(--muted); opacity: .8; }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--brand); flex: none; }
input[type=range] { width: 100%; accent-color: var(--brand); min-height: 44px; }
.form-error { background: var(--danger-50); color: var(--danger); border: 1px solid var(--danger); border-radius: 12px; padding: 10px 12px; font-weight: 600; font-size: .94rem; }
.form-ok { background: var(--ok-50); color: var(--ok); border: 1px solid var(--ok); border-radius: 12px; padding: 10px 12px; font-weight: 600; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1 1 auto; }
.muted { color: var(--muted); }
.tiny { font-size: .82rem; }
.eyebrow { font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--eyebrow); }

/* ---------- app shell */
.shell { min-height: 100vh; display: block; }
.sidebar { display: none; }
/* the sidebar is navy in both themes, so its keyboard focus ring is gold in both (a navy ring would not show on the navy sidebar) */
.sidebar { --focus: #f0c75e; }
.main { min-width: 0; padding: 0 16px calc(var(--tab-h) + var(--safe-b) + 96px); max-width: 1180px; margin: 0 auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 8px; gap: 8px; }
.topbar .brand-word { font-size: .98rem; }
/* the logo link's tap area is 44 px tall (34 px logo + 5 px above and below); the negative margin keeps the layout the same */
.topbar .brand, .admin-head .brand { padding-top: 5px; padding-bottom: 5px; margin-top: -5px; margin-bottom: -5px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface);
  border-top: 1px solid var(--line); padding-bottom: var(--safe-b); box-shadow: 0 -4px 20px rgba(11, 31, 58, .08); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--tab-h); color: var(--muted); text-decoration: none;
  font-size: .72rem; font-weight: 650; position: relative; border: 0; background: none; cursor: pointer; padding: 6px 2px; }
.tab[aria-current="page"] { color: var(--brand); }
.tab[aria-current="page"]::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: var(--gold); }
.badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: .7rem; font-weight: 800; display: grid; place-items: center; }
:root[data-theme="dark"] .badge { color: #1a0b0b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge { color: #1a0b0b; } }
.fab { position: fixed; right: 16px; bottom: calc(var(--tab-h) + var(--safe-b) + 16px); z-index: 31; width: 58px; height: 58px; border-radius: 50%; cursor: pointer;
  background: var(--gold-grad); color: var(--navy); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(150, 105, 20, .5), inset 0 1px 0 rgba(255, 255, 255, .5); border: 1px solid #b48b30; transition: transform .15s; }
.fab:hover { transform: scale(1.05); }
.fab .ico { width: 28px; height: 28px; stroke-width: 2.6; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 248px 1fr; }
  .sidebar { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; padding: 22px 16px; background: linear-gradient(180deg, var(--side-bg) 0%, #0d2a4e 100%); color: #f6ecd6; border-right: 2px solid #b48b30; }
  .sidebar .brand-word { color: #f6ecd6; font-size: .98rem; letter-spacing: .16em; }
  .sidebar .muted { color: #c9bc98; }
  .sidebar .brand { padding: 0 8px 18px; }
  .side-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: #d9cdac; text-decoration: none; font-weight: 650; position: relative; }
  .side-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
  .side-link[aria-current="page"] { background: rgba(240, 199, 94, .16); color: #f0c75e; box-shadow: inset 3px 0 0 #f0c75e; }
  .side-link .badge { position: static; margin-left: auto; }
  .side-add { margin: 4px 0 14px; width: 100%; min-height: 48px; }
  .side-foot { margin-top: auto; display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(240, 199, 94, .25); font-size: .88rem; }
  /* a long name without spaces wraps inside the card (at most 3 lines, then an ellipsis) instead of spilling out */
  .side-foot { min-width: 0; } .side-foot > * { min-width: 0; overflow-wrap: anywhere; }
  .side-foot > b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
  /* the two link buttons under Settings (set by an administrator); a long title wraps inside the sidebar */
  .side-ext-nav { display: grid; gap: 6px; margin-top: 6px; padding-top: 8px; border-top: 1px solid rgba(240, 199, 94, .25); }
  .side-link.side-ext { min-width: 0; padding-top: 10px; padding-bottom: 10px; line-height: 1.25; }
  .side-link.side-ext .ext-t { min-width: 0; overflow-wrap: anywhere; }
  .card.ext-links-card { display: none; }
  .tabbar, .fab, .topbar .brand, .topbar-settings { display: none; }
  .main { padding: 0 32px 48px; width: 100%; }
  .topbar { justify-content: flex-end; padding-top: 18px; }
}

/* ---------- page headings and cards */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 8px 0 18px; }
.page-head h1 { font-family: var(--serif); font-size: clamp(1.55rem, 5vw, 2.1rem); line-height: 1.15; letter-spacing: -.01em; font-weight: 700; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; min-width: 0; }
.card > h2, .card-title { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(2, 1fr); } .span-2 { grid-column: span 2; } }
@media (min-width: 1100px) { .grid.g3 { grid-template-columns: repeat(3, 1fr); } .grid.g3 .span-2 { grid-column: span 2; } }
.section-title { font-size: 1.15rem; font-weight: 800; margin: 26px 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

/* ---------- dashboard */
.hello { position: relative; overflow: hidden; border-radius: 22px; padding: 20px; color: #f6ecd6; margin: 4px 0 16px; border: 1px solid #b48b30;
  background: radial-gradient(circle at 92% 8%, rgba(240, 199, 94, .28) 0, rgba(240, 199, 94, 0) 46%), linear-gradient(120deg, var(--hero-a) 0%, var(--hero-b) 100%); box-shadow: 0 10px 30px rgba(11, 31, 58, .3); }
.hello::after { content: ""; position: absolute; right: -50px; top: -70px; width: 220px; height: 220px; border-radius: 50%; border: 2px solid rgba(240, 199, 94, .35); box-shadow: 0 0 0 14px rgba(240, 199, 94, .08); }
.hello h1 { font-family: var(--serif); font-size: clamp(1.4rem, 5vw, 1.9rem); font-weight: 700; letter-spacing: -.01em; position: relative; color: #fbf4e4; }
.hello p { margin-top: 4px; opacity: .92; position: relative; max-width: 46ch; }
.hello .when { display: inline-block; margin-top: 12px; color: #f6e3a5; border: 1px solid rgba(240, 199, 94, .45); background: rgba(240, 199, 94, .14); border-radius: 999px; padding: 4px 12px; font-weight: 650; font-size: .88rem; position: relative; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px; scroll-snap-type: x proximity; scroll-padding-inline: 12px; scrollbar-width: thin; }
.chips::after { content: ""; flex: none; width: 30px; }   /* room after the last chip, so it can be scrolled fully into view */
.chips.wrap { flex-wrap: wrap; overflow: visible; padding-bottom: 2px; } .chips.wrap::after { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: min(100%, 300px); padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line-strong);
  background: var(--surface); cursor: pointer; font-weight: 650; scroll-snap-align: start; white-space: nowrap; }
.chip:hover { border-color: var(--brand); } .chip-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips:not(.wrap) .chip { max-width: min(78vw, 300px); }
/* a sideways row says so: soft fade on the clipped side, arrow buttons, and a "Swipe" line on touch screens until it has been used once */
.scroll-row { position: relative; }
.scroll-row::before, .scroll-row::after { content: ""; position: absolute; top: 0; bottom: 8px; width: 34px; pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 2; }
.scroll-row::before { left: -1px; background: linear-gradient(to right, var(--fade-bg, var(--surface)) 15%, transparent); }
.scroll-row::after { right: -1px; background: linear-gradient(to left, var(--fade-bg, var(--surface)) 15%, transparent); }
.scroll-row.can-left::before, .scroll-row.can-right::after { opacity: 1; }
.sr-btn { display: none; position: absolute; top: 5px; z-index: 3; width: 34px; height: 34px; padding: 0; place-items: center; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--brand); cursor: pointer; box-shadow: var(--shadow); }
.sr-btn .ico { width: 18px; height: 18px; }
.sr-btn:hover { background: var(--brand-50); border-color: var(--brand); }
.sr-btn.prev { left: 0; } .sr-btn.next { right: 0; }
.scroll-row.can-left .sr-btn.prev, .scroll-row.can-right .sr-btn.next { display: grid; }
.swipe-hint { display: none; margin: 0 0 4px; font-size: .8rem; font-weight: 650; color: var(--muted); text-align: center; }
.swipe-hint::before { content: "\2190  "; } .swipe-hint::after { content: "  \2192"; }
.scroll-row.overflowing:not(.hint-off) .swipe-hint { display: block; }
@media (min-width: 900px) { .swipe-hint { display: none !important; } }
.scroll-row > .tabs { display: flex; width: 100%; }
.scroll-row > .tabs button { flex: none; }
.chip[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--goal, var(--brand)); flex: none; }
.goal-feature { display: grid; gap: 14px; grid-template-columns: auto 1fr; align-items: center; margin-top: 8px; }
.goal-feature h3 { font-size: 1.15rem; font-weight: 800; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stat { background: var(--surface-2); border-radius: 12px; padding: 8px 10px; text-align: center; }
.stat b { display: block; font-size: 1.4rem; line-height: 1.15; }
.stat span { font-size: .76rem; color: var(--muted); font-weight: 650; }
.stat.bad b { color: var(--danger); } .stat.warn b { color: var(--amber); }
.ring { --p: 0; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--ring, var(--gold)) calc(var(--p) * 1%), var(--surface-3) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 9px; background: var(--surface); border-radius: 50%; }
.ring b { position: relative; font-size: 1.15rem; font-weight: 800; }
.ring.sm { width: 56px; height: 56px; } .ring.sm::before { inset: 6px; } .ring.sm b { font-size: .88rem; }
.ring.lg { width: 112px; height: 112px; } .ring.lg::before { inset: 12px; } .ring.lg b { font-size: 1.6rem; }

.cells { display: grid; gap: 6px; }
.cell { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 8px 0 12px; border-radius: 12px; font-weight: 700; border: 0; width: 100%; cursor: pointer; text-align: left; }
.cell .n { min-width: 34px; height: 30px; border-radius: 9px; background: rgba(255, 255, 255, .55); display: grid; place-items: center; font-weight: 800; color: #0b1f3a; }
.cell.st-completed .n, .cell.st-cancelled .n, .cell.pr-urgent .n { background: rgba(255, 255, 255, .92); color: #0b1f3a; }
.cell.st-not_started { background: var(--st-not_started-bg); color: var(--st-not_started-fg); }
.cell.st-in_progress { background: var(--st-in_progress-bg); color: var(--st-in_progress-fg); }
.cell.st-on_hold { background: var(--st-on_hold-bg); color: var(--st-on_hold-fg); }
.cell.st-completed { background: var(--st-completed-bg); color: var(--st-completed-fg); }
.cell.st-cancelled { background: var(--st-cancelled-bg); color: var(--st-cancelled-fg); }
.cell.pr-low { background: var(--pr-low-bg); color: var(--pr-low-fg); }
.cell.pr-medium { background: var(--pr-medium-bg); color: var(--pr-medium-fg); }
.cell.pr-high { background: var(--pr-high-bg); color: var(--pr-high-fg); }
.cell.pr-urgent { background: var(--pr-urgent-bg); color: var(--pr-urgent-fg); }
:root[data-theme="dark"] .cell .n { color: #0b1f3a; }
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 92px 1fr 28px; gap: 10px; align-items: center; font-size: .9rem; font-weight: 600; }
.bar-row .track { height: 12px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar-row .fill { display: block; height: 100%; border-radius: 999px; transition: width .4s ease; }
.bar-row .n { text-align: right; font-weight: 800; }
.f-not_started { background: var(--st-not_started-dot); } .f-in_progress { background: var(--st-in_progress-dot); } .f-on_hold { background: var(--st-on_hold-dot); }
.f-completed { background: var(--st-completed-dot); } .f-cancelled { background: var(--st-cancelled-dot); }
.tabs { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 2px; max-width: 100%; overflow-x: auto; }
.tabs button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button[aria-pressed="true"], .tabs button[aria-selected="true"] { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
/* the tap area of these buttons is 44 px tall. The button draws at 40 px; 2 px of invisible tap area above
   and below sit inside the 4 px track padding, so nothing on the screen looks or moves different */
.tabs button { position: relative; }
.tabs button::after { content: ""; position: absolute; left: 0; right: 0; top: -2px; bottom: -2px; }
/* the agree and age boxes on the sign-up and "Choose your password" screens: the whole line is the tap area, at least
   44 px tall. Padding with an equal negative margin, so nothing moves; the first box reaches 10 px up, the second 9 px down, and they meet in the
   middle of the 12 px gap between them, never over each other */
.auth-card label.row { padding: 6px 0; margin: -6px 0; }
.auth-card label.row:has(+ label.row) { padding-top: 10px; margin-top: -10px; }
.auth-card label.row + label.row { padding-bottom: 9px; margin-bottom: -9px; }

/* ---------- pills and labels (color is never the only signal: there is always text) */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: .8rem; font-weight: 750; white-space: nowrap; }
.pill.st-not_started { background: var(--st-not_started-bg); color: var(--st-not_started-fg); }
.pill.st-in_progress { background: var(--st-in_progress-bg); color: var(--st-in_progress-fg); }
.pill.st-on_hold { background: var(--st-on_hold-bg); color: var(--st-on_hold-fg); }
.pill.st-completed { background: var(--st-completed-bg); color: var(--st-completed-fg); }
.pill.st-cancelled { background: var(--st-cancelled-bg); color: var(--st-cancelled-fg); }
.pill.pr-low { background: var(--pr-low-bg); color: var(--pr-low-fg); }
.pill.pr-medium { background: var(--pr-medium-bg); color: var(--pr-medium-fg); }
.pill.pr-high { background: var(--pr-high-bg); color: var(--pr-high-fg); }
.pill.pr-urgent { background: var(--pr-urgent-bg); color: var(--pr-urgent-fg); }
.state { display: inline-flex; align-items: center; gap: 4px; font-weight: 750; font-size: .86rem; }
.state .ico { width: 16px; height: 16px; }
.state.overdue { color: var(--danger); } .state.soon { color: var(--amber); } .state.ontime { color: var(--ok); } .state.done { color: var(--ok); } .state.cancelled { color: var(--muted); }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: .78rem; font-weight: 650; border: 0; cursor: pointer; }
.tag::before { content: "#"; opacity: .6; margin-right: 1px; }
.ex-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 7px; background: var(--amber-50); color: var(--amber); font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- tasks */
.filters { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-bottom: 14px; padding: 14px; }
.filters .field.wide, .filters .more-filters { grid-column: 1 / -1; }
.more-filters summary { cursor: pointer; font-weight: 700; color: var(--brand); min-height: 44px; display: flex; align-items: center; }
.mf-grid { display: grid; gap: 10px; grid-template-columns: 1fr; padding-bottom: 4px; }
/* desktop: the sort box is always as wide as its longest choice ("Due date, soonest first"); below 1400 px the extra filters get their own row */
@media (min-width: 900px) { .filters { grid-template-columns: 2fr 1fr 1fr; align-items: end; } .filters .field.wide { grid-column: auto; } .more-filters summary { display: none; } .mf-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(max-content, 1fr); } .filters .more-filters { grid-column: 1 / -1; } }
@media (min-width: 1400px) { .filters { grid-template-columns: 2fr 1fr 1fr 3.4fr; } .filters .more-filters { grid-column: auto; } .mf-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(max-content, 1.5fr); } }
.quick { display: grid; gap: 8px; grid-template-columns: 1fr auto; margin-bottom: 14px; }
.quick select { grid-column: 1 / -1; }
/* the goal box is as wide as its longest goal name, at least 220px and at most 360px (a longer name ends with "..." inside the box); the task name field takes the rest */
@media (min-width: 700px) { .quick { grid-template-columns: minmax(0, 1fr) fit-content(360px) auto; } .quick select { grid-column: auto; min-width: 220px; max-width: 360px; } .quick input { min-width: 0; } }
.task-list { display: grid; gap: 12px; }
.task { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--goal, var(--brand)); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; min-width: 0; }
.task.is-done .task-title { color: var(--muted); }
.task-main { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.check { width: 44px; height: 44px; border-radius: 50%; border: 2.5px solid var(--line-strong); background: transparent; cursor: pointer; display: grid; place-items: center; color: transparent; flex: none; transition: all .15s; }
.check:hover { border-color: var(--ok); color: var(--ok); }
.check.on { background: var(--ok); border-color: var(--ok); color: #fff; }
:root[data-theme="dark"] .check.on { color: #0b2a17; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .check.on { color: #0b2a17; } }
.task-goal { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.task-title { font-size: 1.08rem; font-weight: 750; line-height: 1.3; overflow-wrap: anywhere; margin: 2px 0 6px; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.task-meta .pct { font-weight: 800; }
.progress { height: 10px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--teal), #5fcdbf); transition: width .4s ease; }
.progress.done > span { background: var(--ok); }
.task-dates { display: grid; gap: 2px; font-size: .88rem; color: var(--muted); margin-top: 10px; }
.task-dates b { color: var(--text); }
.task-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.task-side { grid-column: 1 / -1; }
@media (min-width: 760px) {
  .task-main { grid-template-columns: auto 1fr auto; }
  .task-side { grid-column: auto; display: grid; gap: 10px; justify-items: end; min-width: 220px; }
  .task-dates { margin-top: 0; text-align: right; } .task-actions { margin-top: 0; justify-content: flex-end; }
}
details.more { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 4px; }
details.more > summary { cursor: pointer; font-weight: 700; color: var(--brand); min-height: 44px; display: flex; align-items: center; gap: 6px; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "▸"; display: inline-block; transition: transform .15s; }
details.more[open] > summary::before { transform: rotate(90deg); }
.more-body { background: var(--surface-2); border-radius: 12px; padding: 12px; display: grid; gap: 12px; }
.more-body h4 { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.checklist { display: grid; gap: 2px; }
.checklist label { display: flex; gap: 10px; align-items: center; min-height: 44px; cursor: pointer; padding: 0 4px; border-radius: 8px; }
.checklist label:hover { background: var(--surface-3); }
.checklist .done span { text-decoration: line-through; color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line-strong); display: grid; gap: 12px; }
.timeline li { position: relative; font-size: .9rem; }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); border: 2px solid var(--surface-2); }
.timeline .when { color: var(--muted); font-size: .8rem; display: block; }
.timeline .note { display: block; margin-top: 2px; background: var(--surface); border-radius: 8px; padding: 6px 10px; overflow-wrap: anywhere; }

.empty { text-align: center; padding: 36px 18px; background: var(--surface); border: 1.5px dashed var(--line-strong); border-radius: var(--radius); }
.empty .art { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 20px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.empty .art .ico { width: 32px; height: 32px; }
.empty h3 { font-size: 1.1rem; margin-bottom: 4px; }
.empty p { color: var(--muted); max-width: 40ch; margin: 0 auto 14px; }
.empty .row { justify-content: center; }
.skeleton { height: 90px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- goals */
.goal-card { padding: 0; overflow: hidden; display: grid; }
.goal-card .band { height: 8px; background: var(--goal, var(--brand)); }
.goal-card .gbody { padding: 14px 16px 16px; display: grid; gap: 10px; }
.goal-card h3 { font-size: 1.1rem; font-weight: 800; overflow-wrap: anywhere; }
.goal-card .desc { color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; }
.goal-card .top { display: flex; align-items: center; gap: 14px; }
.goal-card.add { place-items: center; min-height: 160px; border-style: dashed; cursor: pointer; background: transparent; color: var(--brand); font-weight: 750; gap: 6px; }
.goal-banner { border-radius: 22px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-top: 8px solid var(--goal, var(--brand)); box-shadow: var(--shadow); display: grid; gap: 14px; margin: 6px 0 16px; }
.goal-banner h1 { font-size: clamp(1.4rem, 5vw, 1.9rem); font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-weight: 650; min-height: 44px; }

/* ---------- calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.cal-head h2 { font-size: 1.15rem; font-weight: 800; min-width: 9ch; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .dow { text-align: center; font-size: .72rem; font-weight: 800; color: var(--muted); letter-spacing: .06em; padding: 4px 0; text-transform: uppercase; }
.day { min-height: 52px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); padding: 4px 2px; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; font-weight: 650; font-size: .9rem; }
.day.other { opacity: .45; }
.day.today .num { background: var(--brand); color: var(--on-brand); border-radius: 50%; }
.day .num { width: 26px; height: 26px; display: grid; place-items: center; }
.day[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand) inset; background: var(--brand-50); }
.day .dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; max-width: 100%; }
.day .d { width: 8px; height: 8px; border-radius: 50%; background: var(--goal, var(--brand)); }
.day .d.start { background: transparent; border: 2px solid var(--goal, var(--brand)); width: 9px; height: 9px; }
.day .more-n { font-size: .65rem; color: var(--muted); }
@media (min-width: 900px) { .day { min-height: 92px; align-items: flex-start; padding: 6px; } .day .num { margin-bottom: 2px; } }
.legend { display: flex; gap: 14px; font-size: .82rem; color: var(--muted); margin-top: 10px; flex-wrap: wrap; }
.legend .d { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); margin-right: 6px; }
.legend .d.start { background: transparent; border: 2px solid var(--brand); width: 11px; height: 11px; }
.event { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--goal, var(--brand)); width: 100%; text-align: left; cursor: pointer; min-height: 56px; }
.event.two { grid-template-columns: auto minmax(0, 1fr); }
.event .kind { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.agenda-day { font-weight: 800; margin: 16px 0 8px; font-size: .95rem; }

/* ---------- alerts and activity */
.note-item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); width: 100%; text-align: left; cursor: pointer; }
.note-item.unread { border-color: var(--brand); background: var(--brand-50); }
.note-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--brand); }
.note-item .t { font-weight: 750; overflow-wrap: anywhere; } .note-item .b { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); margin-top: 6px; }

/* ---------- settings */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.switch input { position: absolute; left: 0; top: 0; opacity: 0; width: 52px; height: 32px; margin: 0; cursor: pointer; }
.switch .sw { display: block; position: relative; width: 52px; height: 32px; border-radius: 16px; background: var(--line-strong); flex: none; transition: background .15s; }
.switch .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + .sw { background: var(--teal); }
.switch input:checked + .sw::after { transform: translateX(20px); }
.switch input:focus-visible + .sw { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch .holder { position: relative; display: block; }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + .sw { opacity: .45; }
.push-row { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.push-row .push-help { margin: 0; color: var(--muted); }
.push-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.stack p, .stack b { overflow-wrap: anywhere; }
.page-head .sub { overflow-wrap: anywhere; }
.version { text-align: center; color: var(--muted); font-size: .85rem; margin: 26px 0 8px; }

/* ---------- sheets, toasts, banners */
.backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(7, 23, 45, .62); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease; }
.sheet { background: var(--surface); width: 100%; max-height: 94vh; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + var(--safe-b)); box-shadow: var(--shadow-lg); animation: rise .22s ease; overscroll-behavior: contain; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; position: sticky; top: -18px; background: var(--surface); padding: 4px 0 8px; z-index: 2; }
.sheet-head h2 { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; }
@media (min-width: 700px) { .backdrop { align-items: center; padding: 24px; } .sheet { max-width: 680px; border-radius: 22px; padding: 22px; max-height: 90vh; } .sheet.narrow { max-width: 460px; } }
@keyframes fade { from { opacity: 0; } } @keyframes rise { from { transform: translateY(24px); opacity: .6; } }
.form-grid { display: grid; gap: 14px; }
.two { display: grid; gap: 14px; grid-template-columns: 1fr; } @media (min-width: 560px) { .two { grid-template-columns: 1fr 1fr; } }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 650; font-size: .92rem; padding: 0; margin-bottom: 6px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 2px solid var(--line-strong); font-weight: 700; background: var(--surface); }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice input:checked + span { border-color: transparent; }
.choice .ck { display: none; width: 16px; height: 16px; }
.choice input:checked + span .ck { display: inline-block; }
.choice.st-not_started input:checked + span { background: var(--st-not_started-bg); color: var(--st-not_started-fg); box-shadow: 0 0 0 2px var(--st-not_started-dot); }
.choice.st-in_progress input:checked + span { background: var(--st-in_progress-bg); color: var(--st-in_progress-fg); box-shadow: 0 0 0 2px var(--st-in_progress-dot); }
.choice.st-on_hold input:checked + span { background: var(--st-on_hold-bg); color: var(--st-on_hold-fg); box-shadow: 0 0 0 2px var(--st-on_hold-dot); }
.choice.st-completed input:checked + span { background: var(--st-completed-bg); color: var(--st-completed-fg); }
.choice.st-cancelled input:checked + span { background: var(--st-cancelled-bg); color: var(--st-cancelled-fg); }
.choice.pr-low input:checked + span { background: var(--pr-low-bg); color: var(--pr-low-fg); box-shadow: 0 0 0 2px #22a24a; }
.choice.pr-medium input:checked + span { background: var(--pr-medium-bg); color: var(--pr-medium-fg); box-shadow: 0 0 0 2px #c9a400; }
.choice.pr-high input:checked + span { background: var(--pr-high-bg); color: var(--pr-high-fg); box-shadow: 0 0 0 2px #d6479a; }
.choice.pr-urgent input:checked + span { background: var(--pr-urgent-bg); color: var(--pr-urgent-fg); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { position: relative; width: 44px; height: 44px; }
.swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.swatch span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--c); color: #fff; border: 3px solid transparent; }
.swatch input:checked + span { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface) inset; }
.swatch input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.swatch .ico { opacity: 0; filter: drop-shadow(0 0 2px rgba(0, 0, 0, .75)); } .swatch input:checked + span .ico { opacity: 1; }
.sub-edit { display: grid; gap: 8px; }
.sub-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
/* the Done box of a checklist row has a 44 x 44 px tap area (a label around it); the negative margins keep the box and the row in place */
.sub-hit { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 -7.5px; cursor: pointer; }
.sheet-foot { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.sheet-foot .primary { flex: 1 1 140px; }
.menu-list { display: grid; gap: 10px; }
.menu-item { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; text-align: left; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; min-height: 64px; }
.menu-item:hover { background: var(--surface-2); }
.menu-item .mi { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.menu-item b { display: block; } .menu-item span.d { color: var(--muted); font-size: .9rem; }
.dots-steps { display: flex; gap: 6px; justify-content: center; margin: 10px 0 4px; }
.dots-steps i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); } .dots-steps i.on { background: var(--brand); width: 22px; border-radius: 4px; }
.welcome-art { height: 120px; border-radius: 18px; background: radial-gradient(circle at 80% 15%, rgba(240, 199, 94, .3) 0, rgba(240, 199, 94, 0) 55%), linear-gradient(120deg, #0b1f3a, #16427a); border: 1px solid #b48b30; display: grid; place-items: center; margin-bottom: 14px; color: #f0c75e; }
.welcome-art .ico { width: 56px; height: 56px; stroke-width: 1.8; }
.toasts { position: fixed; left: 12px; right: 12px; top: 12px; z-index: 80; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { pointer-events: auto; max-width: 440px; width: 100%; background: #0b1f3a; color: #fbf4e4; border: 1px solid #b48b30; padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; animation: rise .2s ease; font-weight: 600; }
.toast.err { background: #8c0f12; border-color: #e0a96a; }
.toast button { margin-left: auto; background: none; border: 0; color: #f0c75e; font-weight: 800; cursor: pointer; min-height: 44px; padding: 0 8px; }
.banner { position: sticky; top: 0; z-index: 50; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 8px 12px; background: #0b1f3a; color: #fbf4e4; border-bottom: 3px solid #d4a63a; font-weight: 650; text-align: center; }
.banner .btn { min-height: 44px; background: var(--gold-grad); color: #0b1f3a; border-color: #b48b30; }
.news { background: linear-gradient(120deg, var(--brand-50), var(--teal-50)); border-color: var(--brand); margin-bottom: 14px; }
.news ul { margin: 6px 0 12px; padding-left: 20px; display: grid; gap: 4px; }
.offline-note { background: var(--amber-50); color: var(--amber); padding: 8px 12px; border-radius: 12px; font-weight: 650; margin-bottom: 12px; }

/* ---------- sign in / landing */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); position: relative; overflow: hidden; background: var(--bg); }
/* soft golden rays and a glow behind the sign-in screen */
.auth::before { content: ""; position: absolute; inset: -25%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg at 68% 40%, var(--rays) 0deg 7deg, transparent 7deg 14deg);
  -webkit-mask-image: radial-gradient(circle at 68% 40%, #000 0, rgba(0, 0, 0, .25) 50%, transparent 72%); mask-image: radial-gradient(circle at 68% 40%, #000 0, rgba(0, 0, 0, .25) 50%, transparent 72%); }
.auth::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 68% 38%, var(--glow) 0, rgba(240, 199, 94, 0) 42%); animation: glow 9s ease-in-out infinite alternate; }
@keyframes glow { from { opacity: .7; } to { opacity: 1; } }
.auth-hero, .auth-panel { position: relative; z-index: 1; }
.auth-hero { padding: 26px 22px 6px; display: grid; gap: 14px; align-content: center; color: var(--text); }
.auth-hero .brand { gap: 12px; }
.auth-hero .brand-mark { width: 46px; height: 46px; filter: drop-shadow(0 3px 6px rgba(86, 62, 18, .35)); }
.auth-hero .brand-word { font-size: clamp(1.45rem, 7.4vw, 3.3rem); letter-spacing: .16em; line-height: 1; text-shadow: 0 2px 10px rgba(212, 166, 58, .35); }
.auth-hero .brand-word sup { font-size: .32em; letter-spacing: 0; }
.auth-hero h1 { font-family: var(--font); font-size: .78rem; line-height: 1.2; letter-spacing: .3em; text-transform: uppercase; font-weight: 800; color: var(--eyebrow); }
.auth-hero p.lead { font-family: var(--serif); color: var(--muted); max-width: 30ch; font-size: clamp(1.15rem, 4.6vw, 1.55rem); line-height: 1.35; }
.auth-hero p.lead em { color: var(--crimson); font-style: italic; white-space: nowrap; }
.auth-hero ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.auth-hero li { display: flex; gap: 10px; align-items: center; font-weight: 600; color: var(--text); }
.auth-hero li .ico { background: #8c0f12; color: #fbf4e4; box-shadow: 0 0 0 2px #d4a63a; border-radius: 50%; padding: 5px; width: 28px; height: 28px; stroke-width: 2.2; }
.free-pill { display: flex; align-items: center; gap: 12px; max-width: 420px; padding: 10px 18px 10px 12px; border-radius: 999px; background: var(--surface); border: 1px solid #d9c28a; color: var(--text); font-weight: 600; font-size: .92rem !important; box-shadow: 0 6px 18px rgba(86, 62, 18, .12); }
.free-pill::before { content: "\2713"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #a40c10; color: #fbf4e4; font-weight: 800; box-shadow: 0 0 0 2px #d4a63a; }
.auth-panel { padding: 18px 18px 40px; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; justify-items: center; }
.auth-card p, .auth-card b, .auth-card .fine { overflow-wrap: anywhere; }
/* the sign-in card is a deep navy card with gold edges: it carries its own colors in both themes */
.auth-card { color-scheme: light; --text: #f6ecd6; --muted: #d3c7a3; --link: #f0c75e; --brand: #f0c75e; --focus: #f0c75e; --danger: #ffb0a6; --danger-50: #4a1b22; --ok: #8fe5b0; --ok-50: #12402c; --line: #2c4f7c;
  width: 100%; max-width: 440px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 22px 20px; border-radius: 24px; color: var(--text); border: 1px solid #b48b30;
  background: radial-gradient(circle at 90% 0, rgba(240, 199, 94, .16) 0, rgba(240, 199, 94, 0) 45%), linear-gradient(165deg, #123560 0%, #0b1f3a 70%); box-shadow: 0 18px 50px rgba(11, 31, 58, .38), inset 0 1px 0 rgba(255, 255, 255, .08); }
.auth-card h2 { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; letter-spacing: -.01em; color: #fbf4e4; }
.auth-card input[type=text], .auth-card input[type=email], .auth-card input[type=password], .auth-card input[type=search], .auth-card select, .auth-card textarea { background: #fffaf0; color: #0b1f3a; border-color: #d9c28a; }
.auth-card input:focus { border-color: #f0c75e; box-shadow: 0 0 0 3px rgba(240, 199, 94, .35); }
.auth-card .pw-wrap .icon-btn { color: #5e4726; }
.auth-card .pw-wrap .icon-btn:hover { background: #f1e3bf; color: #0b1f3a; }
.auth-card .btn:not(.primary) { background: transparent; color: #f6ecd6; border-color: #b48b30; }
.auth-card .btn:not(.primary):hover { background: rgba(240, 199, 94, .14); }
.auth-card .btn.primary { min-height: 48px; font-size: 1.02rem; }
.auth-card a { color: #f0c75e; }
.pw-wrap { position: relative; } .pw-wrap input { padding-right: 52px; }
.pw-wrap .icon-btn { position: absolute; right: 0; top: 0; }
.link-btn { background: none; border: 0; color: var(--link); font-weight: 700; cursor: pointer; min-height: 44px; padding: 0 4px; text-decoration: underline; }
.fine { font-size: .85rem; color: var(--muted); text-align: center; }
/* desktop sign-in screen is a centered two-column composition (hero left, form card right), rays fill the whole window */
@media (min-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr) minmax(400px, 460px); column-gap: clamp(40px, 5vw, 72px); align-items: center; align-content: center;
    padding: 48px max(40px, calc((100% - 1180px) / 2)); }
  .auth::before { inset: -40%; background: repeating-conic-gradient(from 0deg at 50% 50%, var(--rays) 0deg 7deg, transparent 7deg 14deg);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0, rgba(0, 0, 0, .5) 38%, rgba(0, 0, 0, .18) 62%, transparent 82%); mask-image: radial-gradient(circle at 50% 50%, #000 0, rgba(0, 0, 0, .5) 38%, rgba(0, 0, 0, .18) 62%, transparent 82%); }
  .auth::after { background: radial-gradient(ellipse at 50% 46%, var(--glow) 0, rgba(240, 199, 94, 0) 55%); }
  .auth-hero { padding: 0; gap: 26px; align-content: center; }
  .auth-hero .brand { gap: 18px; }
  .auth-hero .brand-mark { width: clamp(60px, 6vw, 88px); height: clamp(60px, 6vw, 88px); }
  .auth-hero .brand-word { letter-spacing: .15em; font-size: clamp(2.2rem, 4.5vw, 4.5rem); }
  .auth-hero h1 { font-size: clamp(.85rem, 1.1vw, 1.1rem); letter-spacing: .32em; }
  .auth-hero p.lead { font-size: clamp(1.5rem, 2.5vw, 2.45rem); max-width: 24ch; line-height: 1.28; }
  .auth-hero ul { gap: 16px; margin-top: 4px; }
  .auth-hero li { gap: 16px; font-size: clamp(1.05rem, 1.45vw, 1.35rem); }
  .auth-hero li .ico { width: clamp(38px, 3.4vw, 50px); height: clamp(38px, 3.4vw, 50px); padding: 10px; box-shadow: 0 0 0 3px #d4a63a; }
  .free-pill { font-size: clamp(1rem, 1.3vw, 1.2rem) !important; max-width: 520px; padding: 14px 24px 14px 16px; margin-top: 6px; }
  .free-pill::before { width: 38px; height: 38px; }
  .auth-panel { padding: 0; justify-items: stretch; align-content: center; }
  .auth-card { max-width: 460px; width: 100%; justify-self: end; padding: 36px 34px; gap: 16px; }
  .auth-card h2 { font-size: 2rem; }
  .auth-card .field { font-size: .95rem; }
  .auth-card input[type=text], .auth-card input[type=email], .auth-card input[type=password], .auth-card select { min-height: 52px; font-size: 1.05rem; }
  .auth-card .btn.primary { min-height: 54px; font-size: 1.1rem; }
  .auth-card .hint, .auth-card .fine { font-size: .9rem; }
}
@media (min-width: 900px) and (max-width: 1099px) { .auth-card { padding: 30px 26px; } }
@media (min-width: 900px) and (max-height: 1000px) { .auth { padding-top: 32px; padding-bottom: 32px; } .auth-card { padding: 26px 30px 22px; gap: 11px; } .auth-card h2 { font-size: 1.8rem; }
  .auth-card input[type=text], .auth-card input[type=email], .auth-card input[type=password], .auth-card select { min-height: 48px; } .auth-card .btn.primary { min-height: 50px; } .auth-card .field { gap: 5px; } }
@media (min-width: 900px) and (max-height: 760px) { .auth { padding-top: 28px; padding-bottom: 28px; } .auth-card { padding-top: 26px; padding-bottom: 24px; gap: 12px; } .auth-hero { gap: 18px; } }
@media (max-width: 380px) { .auth-hero .brand-mark { width: 38px; height: 38px; } .auth-hero .brand-word { letter-spacing: .12em; } .auth-card { padding: 20px 16px; }
  .auth-hero .brand { padding-top: 3px; padding-bottom: 3px; margin-top: -3px; margin-bottom: -3px; } /* 44 px tap area, same layout */ }

/* ---------- motion and print */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.print-only { display: none; }
@media print {
  body { background: #fff; color: #000; }
  .sidebar, .tabbar, .fab, .topbar, .banner, .toasts, .no-print, .task-actions, .check, .backdrop { display: none !important; }
  .shell { display: block; } .main { padding: 0; max-width: none; }
  .print-only { display: block; }
  .card, .task, .goal-banner { box-shadow: none; break-inside: avoid; border-color: #999; }
  details.more > :not(summary) { display: block; } details.more > summary { display: none; }
  .hello { display: none; }
}

/* ---------- admin area */
.admin-banner { position: sticky; top: 0; z-index: 40; background: #0b1f3a; color: #fbf4e4; padding: 8px 14px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-weight: 650; font-size: .92rem; border-bottom: 3px solid #d4a63a; }
.admin-banner a { color: #f0c75e; font-weight: 800; }
.admin-wrap { max-width: 1180px; margin: 0 auto; padding: 14px 16px 60px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.admin-head .brand-word { font-size: 1rem; }
.sc b { font-family: var(--serif); }
.admin-tag { background: var(--gold-grad); color: #0b1f3a; font-weight: 800; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; padding: 3px 9px; border-radius: 8px; margin-left: 6px; }
.admin-nav { margin-bottom: 16px; display: flex; }
.stat-cards { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .stat-cards { grid-template-columns: repeat(4, 1fr); } }
.sc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); border-top: 4px solid var(--c, var(--gold)); }
.sc b { display: block; font-size: 1.9rem; line-height: 1.1; font-weight: 800; }
.sc span { color: var(--muted); font-size: .84rem; font-weight: 650; }
.sc.warn { --c: #d4a63a; } .sc.bad { --c: #b01218; } .sc.good { --c: #1d7f43; } .sc.teal { --c: var(--teal); }
.health { display: grid; gap: 8px; }
.health .h { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.health .h:last-child { border-bottom: 0; } .health .h span:first-child { color: var(--muted); font-weight: 650; }
table.tbl { width: 100%; border-collapse: collapse; }
/* only the table scrolls sideways, never the whole page (a long email keeps its width instead of breaking mid-word) */
.tbl-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (min-width: 760px) { table.tbl.tbl-nowrap td.main { overflow-wrap: normal; } table.tbl.tbl-nowrap td.main .muted { white-space: nowrap; } }
table.tbl th { text-align: left; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--line); }
table.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tbl td.main { overflow-wrap: anywhere; min-width: 150px; }
table.tbl.tbl-audit td.wrap { overflow-wrap: anywhere; }
@media (min-width: 1240px) { table.tbl.tbl-nowrap td:not(.main) { white-space: nowrap; } }
table.tbl tbody tr:hover { background: var(--surface-2); }
@media (max-width: 759px) {
  table.tbl thead { display: none; }
  table.tbl, table.tbl tbody, table.tbl tr, table.tbl td { display: block; width: 100%; }
  table.tbl tr { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; padding: 6px 4px; box-shadow: var(--shadow); }
  table.tbl td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 6px 10px; text-align: right; }
  table.tbl td::before { content: attr(data-label); color: var(--muted); font-weight: 700; font-size: .8rem; text-align: left; flex: none; }
  table.tbl td.main { display: block; text-align: left; } table.tbl td.main::before { display: none; }
}
.toolbar { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-bottom: 12px; padding: 14px; }
.toolbar .wide { grid-column: 1 / -1; }
@media (min-width: 900px) { .toolbar { grid-template-columns: 2fr 1fr 1fr auto auto; align-items: end; } .toolbar .wide { grid-column: auto; } }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.badge-s { white-space: nowrap; display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 8px; font-size: .74rem; font-weight: 800; letter-spacing: .04em; margin: 2px 4px 2px 0; }
.badge-s.ok { background: var(--ok-50); color: var(--ok); } .badge-s.no { background: var(--amber-50); color: var(--amber); } .badge-s.stop { background: var(--danger-50); color: var(--danger); } .badge-s.adm { background: var(--brand-50); color: var(--brand); }
.facts { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); } @media (min-width: 760px) { .facts { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
.facts div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; } .facts b { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); } .facts span { font-weight: 650; overflow-wrap: anywhere; }
.actions-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.audit-note { background: var(--brand-50); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-weight: 600; }
@media (min-width: 900px) { .toasts { top: auto; bottom: 20px; left: 232px; right: 20px; justify-items: start; } }
@media (min-width: 900px) { .home-grid { grid-template-columns: 1.5fr 1fr 1fr; align-items: start; } .home-grid > :nth-child(1) { grid-column: 1 / span 2; grid-row: 1; } .home-grid > :nth-child(2) { grid-column: 3; grid-row: 1; } .home-grid > :nth-child(3) { grid-column: 3; grid-row: 2; } .home-grid > :nth-child(4) { grid-column: 1 / span 2; grid-row: 2; } }
.event .ev-main { display: flex; flex-direction: column; align-items: flex-start; width: 100%; height: auto; text-align: left; color: inherit; padding: 2px 4px; justify-self: stretch; }
@media (max-width: 420px) { .tabs button { padding: 0 10px; font-size: .92rem; } }
@media (max-width: 340px) { .tabs button { padding: 0 7px; font-size: .88rem; } }
.admin-nav .tabs { flex-wrap: wrap; overflow: visible; }
/* admin sections look and act like tabs: bordered buttons, a hover state, a gold active tab, a clear focus ring */
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-tabs [role=tab] { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; transition: background .15s, border-color .15s, transform .1s; }
.admin-tabs [role=tab]:hover { background: var(--brand-50); border-color: var(--brand); transform: translateY(-1px); }
.admin-tabs [role=tab][aria-selected="true"] { background: var(--gold-grad); border-color: #b48b30; color: #0b1f3a; font-weight: 800; box-shadow: 0 3px 10px rgba(180, 139, 48, .35), inset 0 -3px 0 rgba(11, 31, 58, .55); transform: none; }
.admin-tabs [role=tab]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.admin-tabs .tab-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #a40c10; color: #fff; font-size: .78rem; font-weight: 800; }
@media (max-width: 480px) { .admin-tabs { gap: 6px; } .admin-tabs [role=tab] { padding: 0 13px; flex: 1 1 auto; justify-content: center; } }
/* tablet in portrait (600 to 899 wide): one centered column, a bit larger than the phone */
@media (min-width: 600px) and (max-width: 899px) {
  .auth { align-content: center; padding: 28px 0; }
  .auth-hero { width: 100%; max-width: 588px; margin: 0 auto; padding: 18px 24px 6px; gap: 18px; }
  .auth-hero .brand-mark { width: 60px; height: 60px; } .auth-hero .brand-word { font-size: 2.6rem; letter-spacing: .15em; }
  .auth-hero p.lead { font-size: 1.6rem; } .auth-hero li { font-size: 1.08rem; } .auth-hero li .ico { width: 36px; height: 36px; padding: 8px; }
  .auth-panel { padding: 8px 24px 40px; } .auth-card { max-width: 540px; padding: 28px 26px; }
}
@media (max-width: 340px) { .scroll-row .tabs button { padding: 0 6px; font-size: .84rem; } }

/* help requests (tickets): the list in Settings, the conversation, and the status pills (open, answered, closed) */
.tk-pill { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 999px; font-size: .8rem; font-weight: 800; letter-spacing: .02em; white-space: nowrap; border: 1px solid transparent; }
.tk-pill.open { background: var(--amber-50); color: var(--amber); border-color: var(--gold); }
.tk-pill.answered { background: var(--teal-50); color: var(--teal-fg); border-color: var(--teal); }
.tk-pill.closed { background: var(--surface-3); color: var(--text); border-color: var(--line-strong); }
.tk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tk-row { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; text-align: left; padding: 12px 14px; min-height: 56px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
.tk-row:hover { border-color: var(--brand); background: var(--brand-50); }
.tk-row .tk-no { font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.tk-row .tk-sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.tk-row .tk-date { grid-column: 2 / -1; color: var(--muted); font-size: .82rem; }
@media (max-width: 520px) { .tk-row { grid-template-columns: minmax(0, 1fr) auto; } .tk-row .tk-no { grid-column: 1; } .tk-row .tk-pill { grid-column: 2; grid-row: 1; } .tk-row .tk-sub { grid-column: 1 / -1; white-space: normal; } .tk-row .tk-date { grid-column: 1 / -1; } }
h1 .tk-no { color: var(--brand); font-variant-numeric: tabular-nums; }
.page-head h1 { overflow-wrap: anywhere; }
.tk-thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tk-msg { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); border-left: 5px solid var(--gold); overflow-wrap: anywhere; }
.tk-msg.admin { background: var(--brand-50); border-left-color: var(--teal); }
.tk-msg.note { background: var(--amber-50); border: 1.5px dashed var(--gold); border-left: 5px solid var(--crimson); }
.tk-msg.system { background: none; border: 0; padding: 0; text-align: center; color: var(--muted); font-size: .84rem; font-weight: 650; }
.tk-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .85rem; margin-bottom: 4px; } .tk-meta span { color: var(--muted); }
.tk-msg.note .tk-meta b::after { content: " · only admins can see this"; font-weight: 600; color: var(--muted); }
.tk-body { line-height: 1.55; }
button.sc { text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%; } button.sc b { font-family: var(--serif); } button.sc:hover { border-color: var(--brand); background: var(--brand-50); } button.sc:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.tab-count.mute { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--surface-3); color: var(--text); font-size: .78rem; font-weight: 800; }
.chip[aria-pressed="true"] .tab-count.mute { background: var(--surface); }

@media (max-width: 759px) { table.tbl.tbl-tk td.wrap { flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; } table.tbl.tbl-tk td { overflow-wrap: anywhere; } table.tbl.tbl-tk td[data-label="Ticket"] .tk-no { font-size: 1.05rem; } }
@media (max-width: 759px) { table.tbl.tbl-tk td:not(.wrap) { align-items: baseline; } }
/* 0.3.16: Install the app (Settings) */
#install details.install-step { margin-top: 4px; }
#install .install-list { margin: 6px 0 8px; padding-left: 22px; display: grid; gap: 4px; }

/* 0.3.22: Export goal PDF (Settings > Your data): the goal picker and its button sit with the two download buttons and wrap on phones */
.goal-pdf { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.goal-pdf select { width: auto; min-width: 180px; max-width: 360px; min-height: 44px; }
@media (max-width: 559px) { .goal-pdf { width: 100%; } .goal-pdf select { width: 100%; max-width: none; } .goal-pdf .btn { width: 100%; } }

/* 0.3.24: the hidden box robots fill on the signed-out forms (people and screen readers never meet it) */
.hp-box { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
