/* Laughter League ops app: mobile-first, no framework. */
:root {
  --red: #d7263d;
  --red-dark: #a91b2e;
  --red-soft: #fdecee;
  --sun: #ffb627; --sun-soft: #fff3d6;
  --sky: #3a86ff; --sky-soft: #e6efff;
  --mint: #2bb673; --mint-soft: #e3f6ec;
  --ink: #1d2130;
  --muted: #646b7d;
  --line: #ebe6de;
  --field-line: #d6d0c6;
  --subtle: #fbf9f5;
  --bg: #faf7f2;
  --card: #ffffff;
  --side: #1d2130; --side-ink: #c9cdd8; --side-hover: #2a2f42; --side-muted: #7d8396;
  --ok-bg: #e7f6ec; --ok: #1d6b39;
  --warn-bg: #fff4d6; --warn: #7a5300;
  --err-bg: #fde8ea; --err: #9c1c2c;
  --info-bg: #e8f0fd; --info: #1f4b99;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29,33,48,.04), 0 4px 14px rgba(29,33,48,.05);
  --tap: 44px;
  --display: ui-rounded, "SF Pro Rounded", "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.45;
}
a { color: var(--red-dark); }
h1, h2, h3, .brand, .stat .n { font-family: var(--display); }
h1 { font-size: 1.75rem; margin: .25rem 0 1rem; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; margin: 1.6rem 0 .6rem; }
h3 { font-size: 1.02rem; margin: 1rem 0 .4rem; }
p { margin: .4rem 0 .8rem; }
small, .muted { color: var(--muted); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Brand mark: the red clown nose */
.brand { font-weight: 800; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; font-size: 1.1rem; }
.brand .nose { width: 22px; height: 22px; border-radius: 50%; flex: none; display: inline-block;
  background: radial-gradient(circle at 35% 30%, #ff8a98 0 16%, var(--red) 45%, var(--red-dark) 100%);
  box-shadow: 0 0 0 4px rgba(215,38,61,.15); }
.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Signed-out pages (login, a clown's private page): a simple top bar */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; min-height: 60px; }

/* Signed-in pages: dark sidebar on the left; a drawer on phones */
.nav-open { position: fixed; top: 0; left: 0; opacity: 0; pointer-events: none; } /* fixed, so opening the menu doesn't scroll the page */
.side { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column;
  padding: 18px 14px 14px; overflow-y: auto; position: fixed; top: 0; bottom: 0; left: 0; width: 248px; z-index: 30; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 8px 16px; }
.side .brand { color: #fff; font-size: 1.05rem; }
.close-btn { display: none; color: var(--side-muted); cursor: pointer; padding: 6px; border-radius: 8px; }
.cta { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--red); color: #fff;
  text-decoration: none; font-weight: 600; border-radius: 12px; padding: 11px; margin: 0 4px 10px;
  box-shadow: 0 6px 18px rgba(215,38,61,.35); }
.cta:hover { background: #e8344b; }
.cta .ic { stroke-width: 2.4; }
.cta.small { margin: 0; padding: 8px 12px; font-size: .9rem; box-shadow: none; }
.side-nav .group { font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; color: var(--side-muted); padding: 16px 12px 6px; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; min-height: 40px; border-radius: 10px;
  color: var(--side-ink); text-decoration: none; font-weight: 500; position: relative; }
.side-nav a:hover, .side-nav a.active { background: var(--side-hover); color: #fff; }
.side-nav a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px;
  border-radius: 0 4px 4px 0; background: var(--red); }
.side-nav .count { margin-left: auto; background: var(--red); color: #fff; font-size: .72rem; font-weight: 700;
  border-radius: 999px; padding: 1px 7px; }
.me { margin-top: auto; border-top: 1px solid #2f3448; padding: 14px 6px 2px; display: flex; align-items: center; gap: 10px; }
.me .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--sun); color: var(--ink); display: grid;
  place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.me .who { font-size: .85rem; line-height: 1.3; min-width: 0; }
.me .who b { color: #fff; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { color: var(--side-muted); font-size: .78rem; }
.me form { margin: 0 0 0 auto; }
.me button { background: none; border: 0; color: var(--side-muted); cursor: pointer; padding: 8px; border-radius: 8px; display: flex; }
.me button:hover { color: #fff; background: var(--side-hover); }
.mobilebar, .scrim { display: none; }
body.has-side main { margin-left: 248px; padding-top: 28px; }
body.has-side main .wrap { padding: 0 32px; }

@media (max-width: 899px) {
  .side { transform: translateX(-100%); transition: transform .22s ease; width: 280px; }
  .nav-open:checked ~ .side { transform: none; }
  .nav-open:checked ~ .scrim { display: block; position: fixed; inset: 0; background: rgba(20,22,32,.45); z-index: 25; }
  .close-btn { display: flex; }
  .mobilebar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20;
    background: rgba(250,247,242,.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    padding: 10px 16px; border-bottom: 1px solid var(--line); min-height: 58px; }
  .mobilebar .brand { font-size: 1rem; min-width: 0; }
  .mobilebar .cta { margin-left: auto; white-space: nowrap; }
  .menu-btn { display: flex; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
  body.has-side main { margin-left: 0; padding-top: 18px; }
  body.has-side main .wrap { padding: 0 16px; }
}
main { padding: 16px 0 64px; }

/* Cards, tables */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: var(--subtle); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--subtle); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tfoot td { font-weight: 700; background: var(--subtle); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat .n { font-size: 1.9rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .stat-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 10px; background: var(--red-soft); color: var(--red); }
.stat .stat-ic .ic { stroke-width: 2; }
.stat .stat-ic.sun { background: var(--sun-soft); color: #b07800; }
.stat .stat-ic.sky { background: var(--sky-soft); color: var(--sky); }
.stat .stat-ic.mint { background: var(--mint-soft); color: var(--mint); }
.stat .l { font-size: .85rem; color: var(--muted); }

/* Forms */
label { display: block; font-weight: 600; margin: 14px 0 6px; }
.hint { font-weight: 400; color: var(--muted); font-size: .88rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search],
select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 12px; font: inherit; color: var(--ink);
  border: 1px solid var(--field-line); border-radius: 10px; background: #fff;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(215,38,61,.2); border-color: var(--red); }
input[type=number] { font-size: 1.2rem; }
.row { display: grid; gap: 0 12px; }
@media (min-width: 640px) { .row.two { grid-template-columns: 1fr 1fr; } .row.three { grid-template-columns: repeat(3, 1fr); } }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 10px 0; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; }

/* Chip-style multi-select (big tap targets on phones) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; margin: 0; font-weight: 500; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1px solid var(--field-line); border-radius: 999px; background: #fff; cursor: pointer; user-select: none; }
.chip input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid rgba(215,38,61,.35); }
.chip.hidden { display: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 10px 18px;
  border-radius: 10px; border: 1px solid var(--red); background: var(--red); color: #fff; font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--field-line); }
.btn.secondary:hover { background: var(--bg); }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: .88rem; }
.btn.block { width: 100%; }
.btn.danger { background: #fff; color: var(--err); border-color: #e7b3ba; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; align-items: center; }
.sticky-submit { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 18px 0 12px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--red-dark); text-decoration: underline; font: inherit; cursor: pointer; }

/* Messages */
.flash { padding: 12px 14px; border-radius: 10px; margin-bottom: 12px; }
.flash.success { background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--err-bg); color: var(--err); }
.flash.info { background: var(--info-bg); color: var(--info); }
.flash.warning, .privacy-warn { background: var(--warn-bg); color: var(--warn); }
.privacy-note { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: .9rem; margin: 6px 0; }
.privacy-warn { border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; border: 1px solid #f0d38a; }
.privacy-warn ul { margin: 6px 0 0 18px; padding: 0; }
.errors { background: var(--err-bg); color: var(--err); border-radius: 10px; padding: 12px 14px 12px 32px; margin-bottom: 14px; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--bg); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge.new { background: var(--info-bg); color: var(--info); border-color: transparent; }
.badge.edited { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge.used { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge.flag { background: var(--err-bg); color: var(--err); border-color: transparent; }
.badge.fake { background: #efe6fb; color: #5b2a99; border-color: transparent; }

/* Filters */
.filters { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; align-items: end; margin-bottom: 16px; }
.filters label { margin: 0 0 4px; font-size: .8rem; color: var(--muted); }
.filters .wide { grid-column: 1 / -1; }
@media (min-width: 800px) { .filters { grid-template-columns: repeat(6, 1fr); } .filters .wide { grid-column: span 2; } }
.custom-dates { display: contents; }
.custom-dates[hidden] { display: none; }

/* Story list */
.story { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.story .meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.story .text { white-space: pre-wrap; }
.story.clamp .text { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.compare { display: grid; gap: 12px; }
@media (min-width: 800px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare .card { white-space: pre-wrap; }

.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); }
.tabs a.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 12px 0; }
.headline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.headline h1 { margin: 0; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-plain li:last-child { border-bottom: 0; }
.grid-links { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid-links a { display: block; text-decoration: none; color: inherit; }
.grid-links .card:hover { border-color: var(--red); }
.login { max-width: 400px; margin: 40px auto; }
code.cell { background: var(--bg); padding: 1px 6px; border-radius: 6px; font-size: .85rem; }

/* To-do list */
.task-list li.task { display: flex; gap: 12px; align-items: flex-start; }
.task .tick { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--field-line); background: #fff; color: #fff; font-weight: 700; cursor: pointer; flex: none; margin-top: 1px; }
.task .tick:hover { border-color: var(--red); }
.task.done .tick { background: var(--ok); border-color: var(--ok); }
.task-body { flex: 1; min-width: 0; }
.task.done .task-title { text-decoration: line-through; color: var(--muted); }
.task .meta { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: .82rem; align-items: center; }
.task-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }

/* Scheduling (Phase 5): month calendar. On phones it collapses to a list of days with shifts. */
input[type=time] { width: 100%; min-height: var(--tap); padding: 10px 12px; font: inherit; color: var(--ink); border: 1px solid var(--field-line); border-radius: 10px; background: #fff; }
.cal { display: block; margin-bottom: 12px; }
.cal-head { display: none; }
.cal-day { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.cal-day.empty, .cal-day.other { display: none; }
.cal-day.today { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.cal-date { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: .9rem; }
.cal-add { text-decoration: none; color: var(--muted); font-size: 1.2rem; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.cal-add:hover { background: var(--bg); color: var(--red); }
.cal-shift { display: block; margin-top: 6px; padding: 6px 8px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: .85rem; border-left: 4px solid; }
.cal-shift.open { background: var(--warn-bg); border-color: #e0a800; }
.cal-shift.filled { background: var(--ok-bg); border-color: var(--ok); }
.cal-shift.cancelled { background: var(--bg); border-color: #b9bec9; color: var(--muted); text-decoration: line-through; }
.cal-shift .cal-fill, .cal-shift .cal-market { display: block; font-size: .78rem; color: var(--muted); }
.cal-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; }
.cal-key.open { background: #e0a800; } .cal-key.filled { background: var(--ok); } .cal-key.cancelled { background: #b9bec9; }
@media (min-width: 760px) {
  .cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .cal-head { display: block; text-align: center; font-size: .75rem; text-transform: uppercase; color: var(--muted); padding: 4px 0; }
  .cal-day, .cal-day.empty, .cal-day.other { display: block; min-height: 96px; margin: 0; padding: 6px; }
  .cal-day.other { background: var(--subtle); }
  .cal-day.other .cal-date { color: #b0b5c0; }
  .cal-dow { display: none; }
  .cal-shift { font-size: .78rem; padding: 4px 6px; }
}
.assign-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.assign-actions { display: flex; gap: 10px; align-items: center; }
.assign-actions select { min-height: 34px; padding: 4px 8px; width: auto; }
.notice-body { white-space: pre-wrap; background: var(--bg); padding: 10px 12px; border-radius: 8px; font-size: .88rem; font-family: inherit; }

/* Performer's private page */
.shift-card.declined { opacity: .75; }
.avail-row { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.avail-row:last-of-type { border-bottom: 0; }
@media (min-width: 700px) { .avail-row { grid-template-columns: 130px auto 1fr; align-items: center; } }
.seg { display: inline-flex; border: 1px solid var(--field-line); border-radius: 10px; overflow: hidden; }
.seg label { margin: 0; font-weight: 500; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: 8px 12px; cursor: pointer; font-size: .88rem; border-right: 1px solid var(--field-line); background: #fff; }
.seg label:last-child span { border-right: 0; }
.seg input:checked + span { background: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid rgba(215,38,61,.35); }
.avail-row input[type=text] { min-height: 38px; padding: 6px 10px; }
.date-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
@media (min-width: 700px) { .date-grid { grid-template-columns: repeat(7, 1fr); } }
.date-cell { margin: 0; padding: 6px; border-radius: 8px; border: 1px solid var(--line); font-weight: 600; font-size: .85rem; }
.date-cell select { min-height: 34px; padding: 4px 6px; font-size: .85rem; margin-top: 4px; }
.date-cell.yes { background: var(--ok-bg); }
.date-cell.no { background: var(--err-bg); }
.date-cell.past { opacity: .5; }

/* Scheduling: week availability grid (scrolls sideways on phones, clown names stay put) */
.avail-week table { min-width: 720px; }
.avail-week th, .avail-week td { padding: 6px 8px; text-align: center; }
.avail-week .who-col { position: sticky; left: 0; background: #fff; text-align: left; z-index: 1; min-width: 120px; border-right: 1px solid var(--line); text-transform: none; letter-spacing: 0; font-size: .88rem; color: var(--ink); white-space: normal; }
.avail-week thead .who-col { background: var(--subtle); }
.avail-week th.today { color: var(--red); }
.avail-week .day-free { font-weight: 400; text-transform: none; letter-spacing: 0; }
.avail-week .past { opacity: .55; }
.avail-week .shift-row td { background: var(--subtle); vertical-align: top; }
.mini-shift { display: block; margin-bottom: 4px; padding: 3px 4px; border-radius: 6px; font-size: .75rem; text-decoration: none; color: var(--ink); border-left: 3px solid; text-align: left; }
.mini-shift.open { background: var(--warn-bg); border-color: #e0a800; }
.mini-shift.filled { background: var(--ok-bg); border-color: var(--ok); }
.mini-shift.cancelled { background: var(--bg); border-color: #b9bec9; color: var(--muted); text-decoration: line-through; }
.ac.yes { background: var(--ok-bg); }
.ac.no { background: var(--err-bg); }
.ac-mark { font-weight: 700; }
.ac.yes .ac-mark { color: var(--ok); } .ac.no .ac-mark { color: var(--err); } .ac.unknown .ac-mark { color: #b0b5c0; }
.on-shift { display: block; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.ac-note { font-size: .72rem; color: var(--muted); line-height: 1.2; }

/* In-app help (app/help/*.md) */
.help { max-width: 760px; line-height: 1.55; }
.help h1 { margin-top: 0; }
.help h2 { margin-top: 1.6em; padding-top: .4em; border-top: 1px solid var(--line); }
.help li { margin-bottom: .35em; }
.help .toc { background: var(--bg); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 1em; }
.help .toc .toctitle { font-weight: 600; font-size: .9rem; }
.help .toc ul { margin: 4px 0 0; padding-left: 18px; columns: 2; column-gap: 24px; }
@media (max-width: 600px) { .help .toc ul { columns: 1; } }
.help .table-wrap { margin: .6em 0 1em; }
.help code { font-size: .88em; }
.help li.check { list-style: none; margin-left: -1.2em; }

form.inline { display: inline; margin: 0; }

/* Impact: visits-by-month bars (plain HTML, no chart library) */
.bars { display: flex; align-items: stretch; gap: 6px; height: 190px; overflow-x: auto; }
.bars .bar { flex: 1 0 28px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bars .track { flex: 1; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding-top: 20px; }
.bars .track .fill { flex: none; }
.bars .fill { width: 100%; max-width: 40px; min-height: 2px; border-radius: 7px 7px 3px 3px; background: #f3c3ca; }
.bars .bar.last .fill, .bars .bar:hover .fill { background: var(--red); }
.bars .fill { position: relative; }
.bars .v { position: absolute; bottom: 100%; left: 0; right: 0; text-align: center; padding-bottom: 2px; font-size: .75rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.bars small { font-size: .72rem; line-height: 1.2; text-align: center; min-height: 2.4em; }

/* Today page (app/main/today.py) */
.today-head h1 { margin-bottom: 0; }
.today-head p { margin: 2px 0 18px; }
.one-thing { background: linear-gradient(120deg, var(--red) 0%, #ec4459 60%, #ff7b54 100%); color: #fff;
  border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px; position: relative; overflow: hidden;
  box-shadow: 0 10px 28px rgba(215,38,61,.25); }
.one-thing::after { content: ""; position: absolute; right: -50px; top: -50px; width: 190px; height: 190px;
  border-radius: 50%; background: rgba(255,255,255,.12); pointer-events: none; }
.one-thing .eyebrow { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; opacity: .85; }
.one-thing h2 { font-size: 1.5rem; margin: 6px 0 4px; line-height: 1.2; }
.one-thing p { margin: 0 0 14px; opacity: .95; max-width: 60ch; }
.one-thing .btn { background: #fff; color: var(--red-dark); border-color: #fff; position: relative; z-index: 1; }
.one-thing .btn:hover { background: var(--red-soft); }
.one-thing .then { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.25); font-size: .88rem;
  display: flex; flex-wrap: wrap; gap: 6px 14px; position: relative; z-index: 1; }
.one-thing .then span { opacity: .8; }
.one-thing .then a { color: #fff; }
.today-grid { display: grid; gap: 0 16px; }
@media (min-width: 1000px) { .today-grid { grid-template-columns: 1.5fr 1fr; } }
.card-title { font-size: 1.05rem; margin: 0 0 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card-title a { font-family: inherit; font-size: .82rem; font-weight: 500; text-decoration: none; }
.card-foot { margin: 8px 0 0; font-size: .88rem; }
.empty-day { color: var(--muted); }
.fold summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; align-items: baseline; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary .fold-title { font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.fold summary .fold-title::before { content: "▸"; display: inline-block; width: 1em; color: var(--muted); transition: transform .15s; }
.fold[open] summary .fold-title::before { transform: rotate(90deg); }
.fold[open] summary { margin-bottom: 8px; }
.fold .short { color: var(--err); font-weight: 600; }
.fold h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 2px; }
.shift-list li { display: grid; grid-template-columns: 150px 1fr; gap: 10px; }
.shift-list .when { font-weight: 600; font-variant-numeric: tabular-nums; font-size: .9rem; white-space: nowrap; }
.shift-list a { color: var(--ink); text-decoration: none; }
.clowns { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.clown { font-size: .8rem; padding: 2px 9px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.clown.confirmed { background: var(--ok-bg); border-color: transparent; color: var(--ok); }
.goal { padding: 10px 0; border-top: 1px solid var(--line); }
.goal:first-of-type { border-top: 0; padding-top: 0; }
.goal-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.goal-label a { color: var(--ink); text-decoration: none; font-weight: 600; }
.goal-label { font-weight: 600; }
.goal-top b { font-family: var(--display); font-size: 1.15rem; }
.goal-bar { height: 8px; background: #f0ece6; border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
.goal-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--sun), var(--red)); }
.why blockquote { margin: 0 0 8px; padding: 2px 0 2px 14px; border-left: 4px solid var(--sun); font-size: 1rem; line-height: 1.55; white-space: pre-line; }
@media (max-width: 600px) { .shift-list li { grid-template-columns: 1fr; gap: 2px; } .one-thing h2 { font-size: 1.25rem; } }

/* My goals (app/goals) */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.my-goal { padding: 14px 0; border-top: 1px solid var(--line); }
.my-goal:first-child { border-top: 0; padding-top: 2px; }
.goal-list { padding-top: 14px; }
.goal-meta { font-size: .85rem; display: flex; flex-wrap: wrap; gap: 4px; }
.goal-meta b { color: var(--ink); }
.goal-why { margin: 6px 0 0; font-style: italic; color: var(--muted); font-size: .92rem; border-left: 3px solid var(--sun); padding-left: 10px; }
.goal-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.goal-actions form { margin: 0; }
.progress-form { display: flex; gap: 6px; }
.progress-form input { width: 110px; min-height: 34px; padding: 6px 10px; }
.pace { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pace.on-track, .pace.done { background: var(--ok-bg); color: var(--ok); }
.pace.behind { background: var(--warn-bg); color: var(--warn); }
.pace.late { background: var(--err-bg); color: var(--err); }
.done-goal { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.done-goal .goal-actions { margin: 0; }
.empty-goals h2 { margin-top: 0; }
.empty-goals ul { margin: 0 0 16px; padding-left: 20px; }
.empty-goals li { margin: 4px 0; }
fieldset.tracking { border: 0; padding: 0; margin: 14px 0 0; }
fieldset.tracking legend { font-weight: 600; padding: 0; margin-bottom: 2px; }
form:has(input[name=tracking][value=auto]:checked) .hand-only { display: none; }
form:has(input[name=tracking][value=hand]:checked) .auto-only { display: none; }
.goals-sub { margin: 14px 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.goals-sub + .goal { border-top: 0; padding-top: 2px; }
.goals-sub { border-top: 1px solid var(--line); padding-top: 14px; }
