body[data-track="l1"], .card[data-track="l1"], .ann-lvl[data-track="l1"], .att-lvl[data-track="l1"], .att-lvl-edit[data-track="l1"], .tn-sec[data-track="l1"], .add-opt-btn[data-track="l1"], .sch-lvl[data-track="l1"], .pp-cls[data-track="l1"] { --accent:#95bfe4; --on-accent:#000000; --accent-fg:color-mix(in srgb, #95bfe4 65%, var(--ink)); --chip:color-mix(in srgb, #95bfe4 75%, var(--surface)); }
body[data-track="l2-smooth"], .card[data-track="l2-smooth"], .ann-lvl[data-track="l2-smooth"], .att-lvl[data-track="l2-smooth"], .att-lvl-edit[data-track="l2-smooth"], .tn-sec[data-track="l2-smooth"], .add-opt-btn[data-track="l2-smooth"], .sch-lvl[data-track="l2-smooth"], .pp-cls[data-track="l2-smooth"] { --accent:#a8b28a; --on-accent:#000000; --accent-fg:color-mix(in srgb, #a8b28a 65%, var(--ink)); --chip:color-mix(in srgb, #a8b28a 75%, var(--surface)); }
body[data-track="l2"], .card[data-track="l2"], .ann-lvl[data-track="l2"], .att-lvl[data-track="l2"], .att-lvl-edit[data-track="l2"], .tn-sec[data-track="l2"], .add-opt-btn[data-track="l2"], .sch-lvl[data-track="l2"], .pp-cls[data-track="l2"] { --accent:#508d51; --on-accent:#000000; --accent-fg:color-mix(in srgb, #508d51 65%, var(--ink)); --chip:color-mix(in srgb, #508d51 75%, var(--surface)); }
body[data-track="l3"], .card[data-track="l3"], .ann-lvl[data-track="l3"], .att-lvl[data-track="l3"], .att-lvl-edit[data-track="l3"], .tn-sec[data-track="l3"], .add-opt-btn[data-track="l3"], .sch-lvl[data-track="l3"], .pp-cls[data-track="l3"] { --accent:#f9bf78; --on-accent:#000000; --accent-fg:color-mix(in srgb, #f9bf78 65%, var(--ink)); --chip:color-mix(in srgb, #f9bf78 75%, var(--surface)); }
/* FDA Instructor Dashboard styles. Per-track color variables are generated in server.js and prepended. */
/* Fonts (SIL Open Font License, self-hosted in public/fonts, latin, variable weight): Work Sans for text, Bricolage
   Grotesque for titles and headings. */
@font-face { font-family:"Work Sans"; font-style:normal; font-weight:100 900; font-display:swap; src:url(/fonts/work-sans.woff2) format("woff2"); }
@font-face { font-family:"Work Sans"; font-style:italic; font-weight:100 900; font-display:swap; src:url(/fonts/work-sans-italic.woff2) format("woff2"); }
@font-face { font-family:"Bricolage Grotesque"; font-style:normal; font-weight:200 800; font-display:swap; src:url(/fonts/bricolage-grotesque.woff2) format("woff2"); }
:root { --font-body:"Work Sans",system-ui,-apple-system,"Segoe UI",sans-serif; --font-head:"Bricolage Grotesque","Work Sans",system-ui,sans-serif; }
:root { color-scheme:light; --ink:#1f2328; --muted:#656d76; --line:#d0d7de; --hair:color-mix(in srgb, var(--ink) 7%, transparent); --accent:#0969da; --bg:#ffffff;
        --surface:#ffffff; --soft:#eef4fb; --hover:#afb8c1; --mix:#ffffff; --pct:45%; --tag-bg:#fff1c2; --tag-ink:#6a4a00; --spotify:#1a8f45;
        --video:#0969da; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme:dark; --ink:#e6edf3; --muted:#9198a1; --line:#3d444d; --hair:color-mix(in srgb, var(--ink) 9%, transparent); --accent:#4493f8; --bg:#0d1117;
        --surface:#151b23; --soft:#1a2433; --hover:#656c76; --mix:#151b23; --pct:28%; --tag-bg:#4d3800; --tag-ink:#f2cc60; --spotify:#1ed760;
        --video:#4493f8; }
}
:root[data-theme="dark"] { color-scheme:dark; --ink:#e6edf3; --muted:#9198a1; --line:#3d444d; --hair:color-mix(in srgb, var(--ink) 9%, transparent); --accent:#4493f8; --bg:#0d1117;
        --surface:#151b23; --soft:#1a2433; --hover:#656c76; --mix:#151b23; --pct:28%; --tag-bg:#4d3800; --tag-ink:#f2cc60; --spotify:#1ed760;
        --video:#4493f8; }
/* Good = the Smoothstepping sage as is, with the Baystyle green on it; bad = danger orange, mixed with the theme so it reads in light and dark. */
body { --ml-purple:color-mix(in srgb, #7a4fd8 82%, var(--ink)); --good:#a8b28a; --good-2:#508d51; --danger:#f5691b; --success:#3f7d41; --failure:#cf222e; --ok-bg:var(--good); --ok-ink:#fff;
       --bad-bg:color-mix(in srgb, var(--danger) 22%, var(--surface)); --bad-ink:color-mix(in srgb, var(--danger) 62%, var(--ink)); }
* { box-sizing: border-box; }
body, .card { --soft:color-mix(in srgb, var(--accent) 12%, var(--surface)); --on-accent:#fff; }
[data-theme="dark"] body, [data-theme="dark"] .card { --on-accent:#0d1117; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body, :root:not([data-theme="light"]) .card { --on-accent:#0d1117; } }
body { margin:0; font:15px/1.5 var(--font-body); color:var(--ink); background:var(--bg); }
button, input, select, textarea { font-family:inherit; }
h1, h2, h3, h4, .card-title { font-family:var(--font-head); }
header { position:sticky; top:0; z-index:20; background:var(--bg); display:flex; justify-content:space-between; align-items:center; gap:.5rem 1rem; flex-wrap:wrap;
         padding:.45rem 16px; border-bottom:1px solid var(--line); border-top:3px solid var(--accent); }
.hdr-left { display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; min-width:0; }
.hdr-right { display:flex; align-items:center; gap:.5rem; margin-left:auto; }
.hdr-icon { display:block; flex-shrink:0; }
.hdr-logo { display:flex; flex-shrink:0; color:var(--ink); }
.hdr-logo svg { display:block; }
body[data-track] header { background:color-mix(in srgb, var(--accent) 10%, var(--bg)); }
.hdr-week { padding:.2rem .85rem; border-radius:999px; background:var(--accent); color:#fff; font-size:15px; font-weight:700; white-space:nowrap; }
.hdr-week[hidden] { display:none; }
header h1 { font-size:1.1rem; margin:0; white-space:nowrap; }
.back { margin-left:-.4rem; color:var(--ink); }
.updated { color:var(--muted); font-size:13px; }
.status { display:flex; align-items:center; gap:.35rem; }
.status-sep { color:var(--muted); font-size:13px; padding:0 .15rem; }
.status .tool:not(:hover) { color:var(--muted); }
@media (max-width: 640px) { .updated, .status-sep { display:none; } }
.new-ver { display:inline-flex; align-items:center; gap:.4rem; height:28px; margin-right:.25rem; padding:0 .65rem; border:1px solid var(--line); border-radius:999px;
           background:var(--bg); color:var(--ink); font:inherit; font-size:13px; font-weight:600; white-space:nowrap; cursor:pointer; }
.new-ver[hidden] { display:none; }
.new-ver:hover { background:color-mix(in srgb, var(--accent) 10%, var(--bg)); }
.new-ver .dot { width:8px; height:8px; border-radius:50%; background:var(--accent); }
.usermenu { position:relative; }
.usermenu summary { list-style:none; cursor:pointer; display:flex; border-radius:50%; }
.usermenu summary::-webkit-details-marker { display:none; }
.usermenu summary:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.usermenu img, .usermenu .initial { width:30px; height:30px; border-radius:50%; display:block; }
.usermenu .initial { display:flex; align-items:center; justify-content:center; background:var(--accent); color:var(--on-accent); font-weight:600; font-size:14px; }
.usermenu .menu { position:absolute; right:0; top:calc(100% + 6px); z-index:10; min-width:220px; padding:.35rem; border:1px solid var(--line); border-radius:8px;
                  background:var(--surface); box-shadow:0 8px 24px rgba(0,0,0,.18); }
.menu-name { padding:.35rem .6rem 0; font-weight:600; }
.ctx-menu { position:fixed; z-index:50; min-width:200px; padding:.35rem; border:1px solid var(--line); border-radius:8px; background:var(--surface); box-shadow:0 8px 24px rgba(0,0,0,.18); }
.ctx-menu[hidden] { display:none; }
.ctx-menu a { display:block; padding:.4rem .6rem; border-radius:6px; color:var(--ink); text-decoration:none; font-size:14px; }
.ctx-menu a:hover, .ctx-menu a:focus-visible { background:color-mix(in srgb, var(--ink) 8%, transparent); outline:none; }
.menu-email { padding:0 .6rem .45rem; color:var(--muted); font-size:13px; border-bottom:1px solid var(--line); margin-bottom:.3rem; word-break:break-all; }
.menu-name + .menu-email { padding-top:0; }
.menu-email:first-child { padding-top:.35rem; }
.usermenu .menu a { display:block; padding:.4rem .6rem; border-radius:6px; color:var(--ink); text-decoration:none; font-size:14px; }
.usermenu .menu a:hover { background:color-mix(in srgb, var(--ink) 8%, transparent); }
.select { position:relative; display:inline-block; }
.select::after { content:""; position:absolute; right:.8rem; top:50%; width:.45rem; height:.45rem; margin-top:-.35rem;
                 border:solid var(--accent-fg, var(--accent)); border-width:0 2px 2px 0; transform:rotate(45deg); pointer-events:none; }
.select select { appearance:none; -webkit-appearance:none; font:inherit; font-weight:600; color:var(--ink); cursor:pointer;
                 padding:.35rem 2.2rem .35rem .8rem; border:1.5px solid var(--accent); border-radius:8px; background:var(--soft); }
.select select:hover { background:color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.select select:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
main { padding:12px 16px 16px; max-width:1400px; margin:0 auto; }
h2 { font-size:1.1rem; margin:1.5rem 0 .5rem; }
a { color:var(--accent-fg, var(--accent)); }
.btn { display:inline-block; padding:.55rem 1rem; border-radius:6px; background:var(--accent); color:var(--on-accent); text-decoration:none; font-weight:600; }
.subtabs { display:flex; align-items:center; gap:.4rem; flex-wrap:wrap; margin:0 0 .75rem; }
.subtabs > a { padding:.3rem .8rem; border:1px solid var(--line); border-radius:999px; text-decoration:none; font-size:13px; color:var(--ink); }
/* A curriculum's week tabs: bigger, so the week reads at a glance. */
.wk-tabs > a { padding:.4rem 1rem; font-size:15px; font-weight:500; }
.wk-tabs > a:hover { border-color:var(--accent); }
.subtabs > a.on { background:var(--accent); border-color:var(--accent); color:#fff; font-weight:700; } /* white reads better here than the contrast pick */
.subtabs > a.now::after { content:""; display:inline-block; width:6px; height:6px; margin:0 0 1px .4rem; border-radius:50%; background:var(--accent); vertical-align:middle; }
.subtabs > a.on.now::after { background:currentColor; }
.subtabs-right { display:flex; align-items:center; gap:.75rem; margin-left:auto; }
/* Half a screen: the status beside the week tabs is just its buttons (the times are in their tooltips and the menu), so it
   stays on the tabs' row. */
@media (max-width: 1024px) { .subtabs-right .updated, .subtabs-right .status-sep { display:none; } .wk-tabs > a { padding:.4rem .8rem; } }
@media (max-width: 640px) { .wk-tabs { gap:.3rem; } .wk-tabs > a { padding:.35rem .65rem; font-size:14px; } }
.roster { position:relative; }
.roster > summary { list-style:none; cursor:pointer; display:inline-flex; align-items:center; gap:.35rem; padding:.25rem .75rem;
                    border:1px solid var(--line); border-radius:999px; font-size:13px; color:var(--ink); white-space:nowrap; }
.roster > summary svg { width:15px; height:15px; color:var(--muted); }
.roster > summary::-webkit-details-marker { display:none; }
.roster > summary:hover, .roster[open] > summary { border-color:var(--accent); }
.roster > summary:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.roster-panel { position:absolute; right:0; top:calc(100% + 6px); z-index:15; width:min(300px, calc(100vw - 32px)); max-height:60vh; overflow:auto;
                padding:.4rem .35rem; border:1px solid var(--line); border-radius:8px; background:var(--surface); box-shadow:0 8px 24px rgba(0,0,0,.18); }
.roster-head { padding:.1rem .5rem .45rem; margin-bottom:.25rem; border-bottom:1px solid var(--line); color:var(--muted); font-size:13px; }
.roster-panel ul { list-style:none; margin:0; padding:0; }
.roster-panel li { display:flex; justify-content:space-between; align-items:center; gap:.5rem; padding:.3rem .5rem; font-size:14px; }
.roster-tag { flex-shrink:0; padding:0 .45rem; border-radius:999px; background:var(--tag-bg); color:var(--tag-ink); font-size:12px; }
.roster-empty { margin:0; padding:.3rem .5rem; color:var(--muted); font-size:14px; }
/* Phones and tablets (<= 1024px): the Attendance button is just the icon and the count. */
@media (max-width: 1024px) { .roster-label { display:none; } }
/* History (/attendance header): the roster's panel, wider, newest change first. */
.hist { position:relative; display:inline-flex; }
.hist > summary { list-style:none; }
.hist > summary::-webkit-details-marker { display:none; }
.hist[open] > summary { color:var(--accent); }
.hist-panel { width:min(380px, calc(100vw - 32px)); }
/* In the menu (phones): History opens under its item. */
.nav-hist { display:block; }
.nav-hist > summary::-webkit-details-marker { display:none; }
.nav-hist .hist-list li { padding-left:.6rem; padding-right:.6rem; }
.hist-list { list-style:none; margin:0; padding:0; }
.hist-list li { display:flex; gap:.6rem; padding:.35rem .5rem; font-size:14px; }
.hist-list li + li { border-top:1px solid var(--line); }
.hist-when { flex:none; min-width:4.6em; color:var(--muted); font-variant-numeric:tabular-nums; font-size:13px; }
.hist-what { flex:1; min-width:0; overflow-wrap:anywhere; }
.hist-who { color:var(--muted); }
.clear-done { font:inherit; font-size:13px; color:var(--muted); background:none; border:0; cursor:pointer; text-decoration:underline; }
.cards { display:grid; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:16px; }
.card { display:flex; flex-direction:column; border:1px solid var(--line); border-radius:10px; overflow:hidden;
        text-decoration:none; color:var(--ink); background:var(--surface); transition:box-shadow .15s, border-color .15s; }
.card:hover { border-color:var(--hover); box-shadow:0 4px 14px rgba(31,35,40,.12); }
.card-icon { display:flex; align-items:center; justify-content:center; height:130px; background:var(--soft); color:var(--accent-fg, var(--accent)); }
.card-body { padding:.7rem .85rem .85rem; border-top:1px solid var(--line); }
.card-title { font-weight:600; }
.card-sub { color:var(--muted); font-size:13px; }
/* Links: plain rows, icon spanning the name and its details line. */
.links { display:grid; grid-template-columns:repeat(auto-fill, minmax(360px, 1fr)); gap:4px 24px; }
.link { display:flex; align-items:center; gap:.75rem; padding:.45rem .5rem; margin:0 -.5rem; border-radius:8px; text-decoration:none; color:var(--ink); }
.link:hover { background:var(--soft); }
.link:hover .link-title { text-decoration:underline; }
.link img { flex:none; }
.link-body { display:flex; flex-direction:column; min-width:0; }
.link-title { font-weight:600; }
.link-title .ext { display:inline-block; width:13px; height:13px; margin-left:.3rem; vertical-align:-1px; color:var(--muted); }
.link-title .ext svg { width:100%; height:100%; }
.link-sub { color:var(--muted); font-size:13px; }
.week { max-width:760px; }
.ann-group { font-size:12px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); margin:1rem 0 .35rem; }
.wk-announce h3 + .ann-group { margin-top:0; }
/* Home: the tiles, with this week's announcements in a column fixed to the right edge, full height, in a faint wash of the
   announcement card color; minimized it's a strip (html[data-ann-min]). Below the tiles on narrow screens. */
body.has-ann { --ann-w:320px; }
html[data-ann-min] body.has-ann { --ann-w:44px; }
body.has-ann main { max-width:calc(1400px + var(--ann-w)); padding-right:calc(var(--ann-w) + 24px); }
.ann-side { --ann:#f4cccc; --ann-ink:color-mix(in srgb, #c0436a 80%, var(--ink));
            position:fixed; z-index:10; top:var(--hdr-h, 52px); right:0; bottom:0; width:var(--ann-w); overflow-y:auto; overscroll-behavior:contain;
            padding:12px 16px 16px; background:color-mix(in srgb, var(--ann) calc(var(--pct) * .55), var(--bg));
            border-left:1px solid color-mix(in srgb, var(--ann) 50%, var(--line)); }
.ann-head { display:flex; align-items:center; gap:.25rem; }
.ann-head h2 { display:flex; align-items:center; gap:.45rem; margin:0 auto 0 0; }
.ann-head h2 svg, .ann-tab svg { width:18px; height:18px; flex:none; }
.ann-when { color:var(--muted); font-size:13px; margin:0 0 .25rem; }
.ann-side .ann-group { color:var(--ann-ink); font-size:12px; font-weight:800; letter-spacing:.08em; margin:1.25rem 0 .1rem; }
.ann-list { list-style:none; margin:0; padding:0; }
/* Lines between announcements run edge to edge; none above a group's first. */
.ann-list li { margin:0 -16px; padding:.5rem 16px; }
.ann-list li + li { border-top:1px solid color-mix(in srgb, var(--ann) 45%, var(--line)); }
/* A line between groups too, edge to edge, above the next group's title. */
.ann-side .ann-list + .ann-group { margin:.5rem -16px .1rem; padding:1rem 16px 0; border-top:1px solid color-mix(in srgb, var(--ann) 45%, var(--line)); }
.ann-meta { display:flex; align-items:center; flex-wrap:wrap; gap:.35rem; font-size:12px; }
.ann-topic { font-weight:600; }
.ann-lvl { padding:0 .45rem; border-radius:999px; background:var(--chip, var(--soft)); color:var(--ink); font-size:11px; font-weight:600; }
.ann-text { font-size:14px; overflow-wrap:anywhere; }
.ann-tab { display:none; flex-direction:column; align-items:center; gap:.6rem; width:100%; margin:0; padding:.35rem 0;
           font:inherit; font-size:13px; font-weight:600; color:var(--ink); background:none; border:0; border-radius:6px; cursor:pointer; }
.ann-tab:hover { background:color-mix(in srgb, var(--ann) 45%, transparent); }
.ann-tab span { writing-mode:vertical-rl; }
html[data-ann-min] .ann-side { padding:8px 6px; overflow:hidden; }
html[data-ann-min] .ann-tab { display:flex; }
html[data-ann-min] .ann-full { display:none; }
/* Enlarged: the same list in a dialog, in bigger type for reading out. */
dialog.ann-dlg { width:min(820px, calc(100vw - 32px)); }
.ann-dlg .add-head h2 { display:flex; align-items:baseline; flex-wrap:wrap; gap:.5rem; font-size:1.4rem; }
.ann-dlg .add-head h2 svg { width:22px; height:22px; flex:none; align-self:center; }
/* Its top bar in the red of the column's group titles, with white text. */
.ann-dlg .add-head { background:var(--ann-ink); border-bottom-color:var(--ann-ink); color:#fff; }
.ann-dlg .add-head .tool, .ann-dlg .add-head .tool:hover { color:#fff; }
.ann-dlg .add-head .tool:hover { background:rgb(255 255 255 / .18); }
.ann-dlg-when { color:rgb(255 255 255 / .85); font-size:16px; font-weight:400; }
.ann-dlg-body { padding:8px 24px 24px; overflow:auto; overscroll-behavior:contain; }
.ann-dlg .ann-group { color:var(--ann-ink); font-size:15px; font-weight:800; letter-spacing:.08em; margin:1.5rem 0 .25rem; }
.ann-dlg .ann-list li { margin:0 -24px; padding:.85rem 24px; }
.ann-dlg .ann-list + .ann-group { margin:.75rem -24px .25rem; padding:1.25rem 24px 0; }
.ann-dlg .ann-meta { font-size:16px; gap:.5rem; margin-bottom:.2rem; }
.ann-dlg .ann-lvl { font-size:14px; padding:.05rem .6rem; }
.ann-dlg .ann-text { font-size:22px; line-height:1.45; }
.ann-dlg .empty { font-size:20px; }
@media (max-width: 900px) {
  body.has-ann main { padding-right:16px; }
  .ann-side, html[data-ann-min] .ann-side { position:static; width:auto; margin:1.5rem -16px -16px; padding:1rem 16px 16px; border-left:0;
              border-top:1px solid color-mix(in srgb, var(--ann) 50%, var(--line)); }
  .ann-min, html[data-ann-min] .ann-tab { display:none; }
  html[data-ann-min] .ann-full { display:block; }
}
.wk-section { margin:0 0 1.5rem; }
.wk-section h3 { font-size:15px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--ink); margin:0 0 .5rem; }
.item { --card:var(--surface); display:flex; border:1px solid var(--line); border-radius:6px; overflow:hidden; margin:0 0 .4rem; background:var(--card); }
.item[style] { --card:color-mix(in srgb, var(--cell) var(--pct), var(--mix)); }
/* Left strip: a slightly darker shade of the card, holding the card-type icon. */
.item-icon { flex:0 0 36px; display:flex; justify-content:center; align-items:center; padding:.4rem 0;
             background:color-mix(in srgb, var(--ink) 9%, var(--card)); color:color-mix(in srgb, var(--ink) 70%, var(--card)); }
.item-icon svg { display:block; }
.item-body { flex:1; min-width:0; padding:.5rem .7rem; }
.item .lead { font-weight:500; } /* the card's first line: a touch heavier than the rest, not bold */
/* Curriculum link · playlist · role, on one line at the top of a week. */
.basics { display:flex; flex-wrap:wrap; align-items:center; gap:.3rem 1.25rem; margin:0 0 .75rem; font-size:14px; }
.basic { display:inline-flex; align-items:center; gap:.35rem; color:var(--ink); text-decoration:none; min-width:0; }
.basic svg { flex:none; color:var(--muted); }
a.basic { color:var(--accent-fg, var(--accent)); }
a.basic svg { color:currentColor; }
a.basic:hover span { text-decoration:underline; }
/* Card-type key at the far right of that line; pressed types filter the week to just those cards. */
.key { display:flex; gap:.35rem; margin-left:auto; }
.key-btn { --card:var(--surface); display:inline-flex; align-items:center; gap:.4rem; padding:0 .6rem 0 0; overflow:hidden;
           font:inherit; font-size:12px; color:var(--ink); background:var(--card); border:1px solid var(--line); border-radius:6px; cursor:pointer; }
.key-btn[style] { --card:color-mix(in srgb, var(--cell) var(--pct), var(--mix)); }
.key-icon { display:flex; align-items:center; justify-content:center; width:26px; height:26px;
            background:color-mix(in srgb, var(--ink) 9%, var(--card)); color:color-mix(in srgb, var(--ink) 70%, var(--card)); }
.key-icon svg { width:16px; height:16px; }
.key .key { margin-left:0; }
/* Open/close all notes: two icon squares, before the card-type key. */
.notes-all { padding:0; gap:0; margin-right:.5rem; }
.notes-all .key-icon + .key-icon { background:none; }
.key-btn:hover { border-color:var(--hover); }
.key-btn[aria-pressed="true"] { border-color:var(--ink); outline:1px solid var(--ink); outline-offset:-2px; font-weight:600; } /* outline paints over the icon's fill */
.week.filtering .item.filtered { display:none; }
.week.filtering .wk-section:not(:has(.basics, .item:not(.filtered))) { display:none; }
.count { padding:.05rem .3rem; margin:0 .1rem; border-radius:4px; background:color-mix(in srgb, var(--ink) 9%, transparent);
         font:500 12px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; white-space:nowrap; }
.count .dbl > span { margin-left:-.25em; } /* {{ and }}: the second brace overlaps the first */
.chev { vertical-align:-2px; margin:0 .1rem; color:var(--muted); }
.seq-head { margin-bottom:.35rem; }
/* Sequence timeline: counts | spine | moves. Rows touch so the spine is one line; a dot marks each move's start.
   Simplified shows each move once with all its counts; expanded (.seq.expanded) gives each beat a row; the spine stays put. */
.seq { --cw:6.6rem; --spine:color-mix(in srgb, var(--ink) 28%, transparent); }
.seq-row { display:grid; grid-template-columns:var(--cw) minmax(0, 1fr); }
.seq-n { display:flex; flex-wrap:wrap; justify-content:flex-end; align-content:flex-start; gap:0 .22rem; padding:0 .7rem 0 0;
         font-size:11px; line-height:22px; font-variant-numeric:tabular-nums; color:var(--muted); }
.seq-n { -webkit-user-select:none; user-select:none; } /* copying a sequence copies just the moves */
.seq-n .one { position:relative; margin:0 .3rem; }
.seq-n .one::before { content:""; position:absolute; left:50%; top:50%; width:14px; height:14px; margin:-8px 0 0 -8px; border-radius:50%;
                      border:1px solid color-mix(in srgb, var(--ink) 30%, transparent); }
.seq-all, .seq-first { display:contents; }
.seq-txt { position:relative; min-width:0; padding:0 0 .25rem .8rem; border-left:2px solid var(--spine); line-height:22px; }
.seq-move .seq-txt::before { content:""; position:absolute; left:-4.5px; top:7.5px; width:7px; height:7px; border-radius:50%;
                             background:var(--accent-fg, var(--accent)); box-shadow:0 0 0 2px var(--card); }
.seq-note .seq-txt { color:var(--muted); font-size:13px; }
.seq-beat, .seq .seq-first, .seq.expanded .seq-all { display:none; }
.seq.expanded .seq-beat { display:grid; }
.seq.expanded .seq-first { display:contents; }
.seq.expanded .seq-txt { padding-bottom:0; }
.seq-beat .seq-txt { min-height:20px; }
.seq-beat .seq-n { line-height:20px; }
.seq-btn .ic-collapse, .seq-btn[aria-pressed="true"] .ic-expand, .notes-all .ic-collapse, .notes-all[aria-pressed="true"] .ic-expand { display:none; }
.seq-btn[aria-pressed="true"] .ic-collapse, .notes-all[aria-pressed="true"] .ic-collapse { display:block; }
.grid-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:6px; }
table.grid { border-collapse:collapse; font-size:13px; }
/* Fixed column widths so opening a row's $ details (or any long cell) never resizes the columns; Notes takes the rest. */
table.att-grid { width:100%; min-width:62rem; table-layout:fixed; }
.att-grid col.c-name { width:11rem; }
.att-grid col.c-block { width:11rem; }
.att-grid col.c-wk { width:4rem; }
.att-grid col.c-mail { width:7.5rem; }
.grid td { border:1px solid var(--line); padding:.4rem .55rem; vertical-align:top; min-width:7rem; max-width:26rem; }
.grid td.b { font-weight:600; }
.grid td[style] { background:color-mix(in srgb, var(--cell) calc(var(--pct) * 2), var(--mix)); }
.grid td.dk { color:#fff; }
/* Sheet content: links look like the surrounding text; videos are flagged by the blue icon. */
.item a, .grid a, .note-body a { color:inherit; text-decoration:none; }
.item a:hover, .grid a:hover, .note-body a:hover { text-decoration:underline; text-decoration-color:var(--muted); }
/* On track pages, video and playlist buttons take the track color. */
body[data-track] { --video:var(--accent-fg); --spotify:var(--accent-fg); }
.tool[data-embed] { color:var(--video); }
.tool.spotify { color:var(--spotify); }
.tool.spotify:hover { color:var(--spotify); background:color-mix(in srgb, var(--spotify) 15%, transparent); }
.refresh-form { display:contents; }
.hdr-right .tool:not(:hover) { color:var(--muted); }
.refresh-btn .ring, .refresh-btn.busy svg:not(.ring) { display:none; }
.refresh-btn.busy .ring { display:block; flex-shrink:0; }
.ring-bg { opacity:.2; }
.ring-fg { stroke:var(--accent-fg, currentColor); stroke-linecap:round; }
@keyframes spin { to { transform:rotate(360deg); } }
.tool[data-embed]:hover { color:var(--video); background:color-mix(in srgb, var(--video) 15%, transparent); }
.tag { display:inline-block; padding:0 .4rem; border-radius:4px; background:var(--tag-bg); color:var(--tag-ink); font-size:11px; font-weight:600; }
.cell { display:flex; gap:.5rem; align-items:flex-start; }
.cell-main { flex:1; min-width:0; }
.cell-tools { display:flex; gap:.2rem; flex-shrink:0; order:1; margin:-.15rem -.25rem 0 0; }
/* Narrow screens: the tools float top right and the content wraps under them, so they don't narrow the whole card.
   (Tools come first in the markup for the float; order:1 puts them last in the desktop flex row.) */
@media (max-width: 640px) {
  .cell { display:flow-root; }
  .cell-tools { float:right; margin-left:.4rem; }
}
.tool { display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; padding:0; border:0; border-radius:6px;
        background:transparent; color:var(--muted); cursor:pointer; font:inherit; }
.tool:hover, .tool[aria-expanded="true"] { background:color-mix(in srgb, var(--ink) 10%, transparent); color:var(--ink); }
.theme-btn { border:1px solid var(--line); }
.note-wrap { display:grid; grid-template-rows:0fr; opacity:0; transition:grid-template-rows .25s ease, opacity .2s ease; }
.note-wrap.open { grid-template-rows:1fr; opacity:1; }
.note-inner { overflow:hidden; min-height:0; }
.note-body { margin-top:.35rem; font-size:13px; font-weight:400;
             transform:translateY(-4px); transition:transform .25s ease; }
.note-wrap.open .note-body { transform:none; }
/* Cards with a note: a dog-ear (bottom-right corner folded up, a little bigger on hover and while open); hovering shows the
   note on one line under the card text; a click opens the whole note. The card's corner is cut off
   (clip-path) and the fold drawn in its place. The note button is there for keyboards only. */
@property --fold { syntax:'<length>'; inherits:true; initial-value:15px; } /* inherits: the fold (::after) sizes to the card's value */
.item.has-note { cursor:pointer; position:relative; --fold:15px; transition:opacity .25s ease, --fold .2s ease;
                 clip-path:polygon(0 0, 100% 0, 100% calc(100% - var(--fold)), calc(100% - var(--fold)) 100%, 0 100%); }
.item.has-note::after { content:""; position:absolute; right:0; bottom:0; width:calc(var(--fold) - 1px); height:calc(var(--fold) - 1px);
  border-top-left-radius:3px; background:linear-gradient(315deg, transparent 50%, color-mix(in srgb, var(--ink) 20%, var(--card)) 50%);
  filter:drop-shadow(-1px -1px 1px rgba(0,0,0,.12)); }
.item.has-note.note-open { --fold:21px; } /* stays the hover size while the note is open */
.item.has-note.done { --fold:0px; }
.item.has-note .note-btn { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.item.has-note:has(.note-btn:focus-visible) { outline:2px solid var(--accent); outline-offset:-2px; }
/* Hovered, the note's first line and a half (a longer one fades out halfway through its second line; no "…"). */
.note-peek { max-height:0; margin-top:0; opacity:0; overflow:hidden; line-height:1.4;
             font-size:13px; font-weight:400; color:var(--muted); transition:max-height .2s ease, margin-top .2s ease, opacity .2s ease; }
.note-body .ic-open { width:14px; height:14px; margin-right:.3rem; vertical-align:-2px; color:var(--muted); }
/* The note button shows the filled note while its note is open. */
.note-btn .ic-open, .note-btn[aria-expanded="true"] svg:not(.ic-open) { display:none; }
.note-btn[aria-expanded="true"] .ic-open { display:block; }
.note-peek svg { width:14px; height:14px; margin-right:.3rem; vertical-align:-2px; }
.note-peek { padding-right:16px; } /* clear of the dog-ear */
@media (hover: hover) {
  .item.has-note:hover .note-peek { max-height:2.1em; margin-top:.3rem; opacity:1;
    -webkit-mask-image:linear-gradient(to bottom, #000 1.4em, transparent 2.1em); mask-image:linear-gradient(to bottom, #000 1.4em, transparent 2.1em); }
  .item.has-note:not(.done):hover { --fold:21px; }
}
.item.has-note.note-open .note-peek, .item.has-note.done .note-peek { max-height:0; margin-top:0; opacity:0; }
.item.has-note.done { cursor:default; }
/* Done items: collapse to one line, fade, strike through. */
.item { transition:opacity .25s ease; }
.item-body { transition:padding .25s ease; }
.item .cell-main { max-height:60em; overflow:hidden; transition:max-height .3s ease, color .25s ease; }
/* Not overflow:hidden on narrow screens: that would keep the text beside the floated tools instead of wrapping under them. */
@media (max-width: 640px) { .item .cell-main { overflow:clip; } }
.item.done { opacity:.55; }
.item.done .item-body { padding-top:.3rem; padding-bottom:.3rem; }
/* Done sequences swap the tall icon for the short one so they stay one line. */
.item-icon .ic-short, .item.done .item-icon .ic-full { display:none; }
.item.done .item-icon .ic-short { display:block; }
/* Strikethrough only on done items: an always-on transparent line-through can still render in Safari. */
.item.done .cell-main { max-height:1.5em; color:var(--muted); text-decoration:line-through 1.5px; }
.done-btn { opacity:0; transition:opacity .15s ease, color .15s ease; width:auto; gap:.3rem; padding:0 .35rem 0 .5rem; }
.done-label { font-size:12px; font-weight:600; }
.item.done .done-label { display:none; }
.item.done .done-btn { padding:0; width:30px; }
.item:hover .done-btn, .done-btn:focus-visible { opacity:1; }
@media (hover: none) { .done-btn { opacity:.45; } }
.done-btn .tick { stroke-dasharray:14; stroke-dashoffset:14; transition:stroke-dashoffset .25s ease; }
.done-btn:hover .tick { stroke-dashoffset:0; opacity:.5; }
.item.done .done-btn { opacity:1; color:var(--accent); }
.item.done .done-btn circle { fill:var(--accent); }
.item.done .done-btn .tick { stroke:var(--surface); stroke-dashoffset:0; opacity:1; }
dialog.player { width:min(960px, calc(100vw - 32px)); padding:0; border:1px solid var(--line); border-radius:10px;
                background:var(--surface); color:var(--ink); }
dialog.player::backdrop { background:rgba(0,0,0,.65); }
.player-bar { display:flex; align-items:center; gap:.5rem; padding:.4rem .5rem .4rem .9rem; border-bottom:1px solid var(--line); }
.player-title { flex:1; min-width:0; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.player-bar a { font-size:13px; white-space:nowrap; }
.player-frame { position:relative; aspect-ratio:16/9; background:#000; }
.player-frame iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }
.empty { color:var(--muted); }
.loading { display:flex; flex-direction:column; align-items:center; gap:12px; padding:64px 16px; color:var(--muted); text-align:center; }
.loading p { margin:0; }
.spinner { width:28px; height:28px; border:3px solid currentColor; border-right-color:transparent; border-radius:50%; animation:spin 1s linear infinite; }
.loading [hidden] { display:none; }
/* Hamburger menu: replaces the header controls and week-tab status on narrow screens. */
.navmenu { display:none; position:relative; }
.nav-btn { color:var(--ink); }
.hdr-right .nav-btn:not(:hover) { color:var(--ink); }
.nav-panel { display:none; position:absolute; right:0; top:calc(100% + 6px); z-index:30; width:260px; padding:.35rem; border:1px solid var(--line);
             border-radius:8px; background:var(--surface); box-shadow:0 8px 24px rgba(0,0,0,.18); }
.navmenu.open .nav-panel { display:block; }
.nav-scrim { display:none; }
.nav-account { display:flex; align-items:center; gap:.6rem; padding:.4rem .5rem .55rem; margin-bottom:.3rem; border-bottom:1px solid var(--line); min-width:0; }
.nav-account img, .nav-account .initial { width:34px; height:34px; border-radius:50%; flex-shrink:0; }
.nav-account .initial { display:flex; align-items:center; justify-content:center; background:var(--accent); color:var(--on-accent); font-weight:600; }
.nav-who { min-width:0; }
.nav-who .menu-name, .nav-who .menu-email { padding:0; margin:0; border:0; }
.nav-item { display:flex; align-items:center; gap:.65rem; width:100%; padding:.5rem .55rem; border:0; border-radius:6px; background:none;
            font:inherit; font-size:14px; color:var(--ink); text-decoration:none; text-align:left; cursor:pointer; }
.nav-item > svg { flex-shrink:0; color:var(--muted); }
.nav-label { flex:1; min-width:0; }
.nav-value { color:var(--muted); font-size:13px; white-space:nowrap; }
.nav-info { cursor:default; }
a.nav-item:hover, button.nav-item:hover { background:color-mix(in srgb, var(--ink) 8%, transparent); }
.nav-item:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
.nav-item:disabled { cursor:default; opacity:.7; }
.nav-sep { height:1px; margin:.3rem 0; background:var(--line); }
.switch { position:relative; flex-shrink:0; width:32px; height:18px; border-radius:999px; background:var(--line); transition:background .2s; }
.switch::after { content:""; position:absolute; top:2px; left:2px; width:14px; height:14px; border-radius:50%; background:var(--surface);
                 box-shadow:0 1px 2px rgba(0,0,0,.3); transition:transform .2s; }
[aria-checked="true"] > .switch { background:var(--accent); }
[aria-checked="true"] > .switch::after { transform:translateX(14px); }
@media (max-width: 640px) {
  .has-menu > .status, .has-menu > .usermenu, .has-menu > .theme-btn, .subtabs-right .status { display:none; }
  /* The rest of the status is in the menu, but "New version" stays out where it can be seen. */
  .has-menu > .status:has(> .new-ver:not([hidden])), .subtabs-right .status:has(> .new-ver:not([hidden])) { display:flex; }
  .status:has(> .new-ver:not([hidden])) > :not(.new-ver) { display:none; }
  .navmenu { display:block; }
  /* Keep the hamburger on the title row: the left side wraps internally instead of pushing it down. */
  header:has(.has-menu) { flex-wrap:nowrap; align-items:flex-start; }
  header:has(.has-menu) .hdr-left { flex:1; }
  /* The title fills the first row (ellipsis if long); the sheet picker and week pill wrap below it. */
  header:has(.has-menu) h1 { flex:1 0 60%; min-width:0; overflow:hidden; text-overflow:ellipsis; }
  .has-menu { flex-shrink:0; }
  /* Attendance: the view picker names the view, so it takes the title's place (one row). */
  body.att-page header h1 { display:none; }
  body.att-page header { align-items:center; }
  body.att-page header .hdr-left { flex-wrap:nowrap; }
}
/* Touch screens: a drawer that slides in from the right edge. */
@media (max-width: 640px) and (pointer: coarse) {
  .nav-panel { display:block; position:fixed; top:0; right:0; bottom:0; width:min(300px, 85vw); padding:calc(.6rem + env(safe-area-inset-top)) .5rem .6rem;
               border:0; border-left:1px solid var(--line); border-radius:0; overflow-y:auto; overscroll-behavior:contain;
               transform:translateX(100%); visibility:hidden; transition:transform .25s ease, visibility 0s .25s; }
  .navmenu.open .nav-panel { transform:none; visibility:visible; transition:transform .25s ease; }
  .nav-scrim { display:block; position:fixed; inset:0; z-index:29; background:rgba(0,0,0,.4); opacity:0; visibility:hidden;
               transition:opacity .25s ease, visibility 0s .25s; }
  .navmenu.open .nav-scrim { opacity:1; visibility:visible; transition:opacity .25s ease; }
  .nav-item { padding:.7rem .6rem; font-size:15px; }
}
/* /admin header: the logo (home), the main pages as tabs (underlined when current), then the data sources and Settings. */
.admin-hdr { padding-block:0; }
.admin-hdr .hdr-left { align-self:stretch; flex-wrap:nowrap; gap:1rem; }
.admin-logo { display:flex; align-items:center; padding:.45rem 0; color:var(--ink); }
.admin-logo svg { display:block; }
.admin-nav { display:flex; align-self:stretch; gap:.15rem; min-width:0; }
.admin-nav a { display:flex; align-items:center; gap:.4rem; min-height:48px; padding:0 .7rem; margin-bottom:-1px; border-bottom:2px solid transparent;
               color:var(--muted); text-decoration:none; font-size:15px; font-weight:500; white-space:nowrap; }
.admin-nav a:hover { color:var(--ink); }
.admin-nav a[aria-current="page"] { color:var(--ink); font-weight:650; border-bottom-color:var(--ink); }
.admin-nav a:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
.admin-nav .live { width:7px; height:7px; border-radius:50%; background:var(--good-2); box-shadow:0 0 0 3px color-mix(in srgb, var(--good-2) 25%, transparent); }
/* The admin header's integrations (first on the right): one green light when all's well, else each icon with its light;
   hover, focus or a tap (app.js: .open) shows the list below it. */
.srcs { position:relative; display:inline-flex; margin:0 .25rem 0 0; }
.srcs[data-worst="green"] .srcs-btn { padding:0 .75rem; }
.srcs-btn { display:inline-flex; align-items:center; gap:.7rem; height:30px; padding:0 .7rem; border:1px solid var(--line); border-radius:999px;
            background:none; color:var(--muted); cursor:pointer; }
.srcs:hover .srcs-btn, .srcs.open .srcs-btn, .srcs-btn:focus-visible { border-color:var(--hover); color:var(--ink); }
.src-ic { display:inline-flex; align-items:center; gap:5px; }
.src-ic > svg { width:16px; height:16px; }
/* The light: a solid dot in a ring of the same color at half strength. */
.src-light { --c:var(--muted); display:inline-block; flex:none; width:6px; height:6px; border-radius:50%; vertical-align:middle;
             background:var(--c); box-shadow:0 0 0 2.5px color-mix(in srgb, var(--c) 50%, transparent); }
.src-light.green { --c:#22b866; }
.src-light.orange { --c:#f59e0b; }
.src-light.red { --c:#ef4444; }
.srcs-panel { display:none; position:absolute; right:0; top:100%; z-index:15; padding-top:6px; width:min(460px, calc(100vw - 32px)); }
.srcs:hover .srcs-panel, .srcs:focus-within .srcs-panel, .srcs.open .srcs-panel { display:block; }
.srcs.shut .srcs-panel { display:none; }
.srcs-panel > * { background:var(--surface); }
.srcs-panel .roster-head, .src-list { border-left:1px solid var(--line); border-right:1px solid var(--line); }
.srcs-panel .roster-head { margin:0; padding:.5rem .85rem .45rem; border-top:1px solid var(--line); border-radius:8px 8px 0 0; }
/* One table for every integration, so its columns line up: each integration a tbody, its head row (light, icon, name)
   then a row per check (light, label, text, action). */
.src-list { display:table; width:100%; border-collapse:separate; border-spacing:0; padding:0 .35rem .35rem; border-bottom:1px solid var(--line); border-radius:0 0 8px 8px; box-shadow:0 8px 24px rgba(0,0,0,.18); font-size:13px; }
.src-row + .src-row th { border-top:1px solid var(--line); }
.src-list th, .src-list td { padding:.2rem .3rem; vertical-align:baseline; text-align:left; }
.src-list th { padding:.6rem .3rem .3rem; font-weight:400; font-size:14px; }
.src-row tr:last-child td { padding-bottom:.6rem; }
/* An integration: its light (all its checks) left of its icon, its name; then a line per check, each with its light. */
.src-head > * { vertical-align:middle; }
.src-head > .src-light { margin:0 .5rem 0 .15rem; }
.src-head .src-ic { color:var(--muted); margin-right:.5rem; }
.src-name { font-weight:600; color:inherit; text-decoration:none; }
.src-name:hover { text-decoration:underline; }
.src-check td:first-child { width:1.65rem; text-align:right; padding-right:.6rem; }
.src-check .src-light { width:5px; height:5px; box-shadow:0 0 0 2px color-mix(in srgb, var(--c) 50%, transparent); transform:translateY(-1px); }
.src-text { overflow-wrap:anywhere; }
.src-text.green, .src-text:not(.orange):not(.red) { color:var(--muted); }
.src-text.orange { color:color-mix(in srgb, #f59e0b 60%, var(--ink)); }
.src-text.red { color:var(--bad-ink); }
.src-label { color:var(--muted); white-space:nowrap; }
.src-every { color:var(--muted); font-variant-numeric:tabular-nums; }
.src-act { width:24px; text-align:right; vertical-align:middle !important; }
/* Settings (the outline cog) and Refresh: just their icons. */
.src-set, .src-refresh { display:inline-grid; place-items:center; width:24px; height:22px; margin:-3px -4px; padding:0; border:0; border-radius:4px;
                         background:none; color:var(--muted); cursor:pointer; }
.src-set svg, .src-refresh svg { width:16px; height:16px; }
.src-set:hover, .src-refresh:hover, .src-set:focus-visible, .src-refresh:focus-visible { color:var(--ink); background:color-mix(in srgb, var(--ink) 7%, transparent); }
.src-refresh.busy { color:var(--muted); cursor:default; }
.src-refresh.busy svg { animation:src-spin 1s linear infinite; }
@keyframes src-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .src-refresh.busy svg { animation-duration:3s; } }
.nav-src .nav-value { display:inline-flex; align-items:center; }
.set-value .src-light { margin-right:.35rem; }
.set-interval { display:grid; gap:.5rem; }
.iv-row { display:flex; align-items:center; gap:.4rem; }
.set-in { font:inherit; padding:.3rem .5rem; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink); }
.iv-n { width:5em; }
.set-in:disabled { opacity:.55; cursor:default; }
select.set-input { font:inherit; padding:.3rem .5rem; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink); }
.setlink { border-radius:6px; }
.admin-title { display:flex; align-items:center; gap:.5rem 1rem; flex-wrap:wrap; margin:0 0 .75rem; }
.admin-title h1 { font-size:1.3rem; margin:0; }
.admin-title .back { margin-left:-.4rem; }
/* Its tools at the right: Add… (and on the Month view, the lock, as tall as Add). */
.admin-tools { display:flex; align-items:center; gap:.6rem; margin-left:auto; }
.admin-tools .tn-lock { --lock-h:36px; margin-left:0; min-height:36px; }
.admin-tools .tn-add { height:36px; }
.admin-title .sch-tabs { margin:0; }
.admin-count { color:var(--muted); font-size:13px; font-variant-numeric:tabular-nums; }
/* Warning banners (People): flat full-width strips, one per issue, hairlines between them. */
@media (max-width: 640px) {
  /* Phones: logo and menu on the first row, the tabs on their own row below (scrolling sideways if they must). */
  header.admin-hdr { flex-wrap:wrap; align-items:center; }
  .admin-hdr .hdr-left { display:contents; }
  .admin-nav { order:3; flex-basis:calc(100% + 32px); margin:0 -16px; padding:0 8px; overflow-x:auto; scrollbar-width:none; border-top:1px solid var(--line); }
  .admin-nav a { min-height:42px; }
}
/* Overview (a placeholder for now): the series, each a row opening its Month view. */
.ov { max-width:1140px; --ov-red:#cf222e; --ov-blue:#2f6fdb; }
/* All series: the whole window's width, with just the usual gutter. */
body.wide main { max-width:none; }
.ov.ov-all { max-width:none; }
.ov-title { margin:.25rem 0 1.5rem; font-size:32px; }
.ov-top { display:grid; grid-template-columns:1fr 1fr; gap:24px; align-items:start; margin-bottom:2.25rem; }
@media (max-width:900px) { .ov-top { grid-template-columns:1fr; gap:16px; } }
.ov-box { background:var(--surface); border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.ov-head { display:flex; align-items:baseline; justify-content:space-between; gap:1rem; padding:1rem 1.25rem; }
.ov-head h2, .ov-shead h2 { margin:0; font-size:17px; font-weight:600; }
.ov-head h2 a { color:inherit; text-decoration:none; }
.ov-head h2 a:hover { text-decoration:underline; }
.ov-meta { display:inline-flex; align-items:center; color:var(--muted); font-size:14px; white-space:nowrap; }
.ov-clear { margin:0; padding:0 1.25rem 1.1rem; color:var(--muted); }
.ov-list { list-style:none; margin:0; padding:0; border-top:1px solid var(--line); }
.ov-list li + li { border-top:1px solid var(--line); }
.ov-need { display:flex; align-items:center; gap:.9rem; padding:.8rem 1.25rem; color:var(--ink); text-decoration:none; }
.ov-need:hover { background:color-mix(in srgb, var(--ink) 4%, transparent); }
.ov-dot { flex:none; width:7px; height:7px; border-radius:50%; background:var(--danger); }
.ov-dot.bad { background:var(--ov-red); }
.ov-what { flex:1; min-width:0; display:flex; flex-direction:column; }
.ov-what b { font-weight:500; }
.ov-what span { color:var(--muted); font-size:14px; }
.ov-n { font-weight:600; font-variant-numeric:tabular-nums; }
.ov-need svg, .ov-go svg { flex:none; width:14px; height:14px; color:var(--muted); }
.ov-when { margin:-.4rem 1.25rem 0; padding-bottom:.9rem; border-bottom:1px solid var(--line); color:var(--ink); font-size:15px; }
.ov-classes { list-style:none; margin:0; padding:.35rem 1.25rem 0; }
.ov-cls { padding:.6rem 0 .15rem; }
.ov-cls-top { display:flex; justify-content:space-between; gap:1rem; font-size:14px; margin-bottom:.35rem; }
.ov-cls-top b { font-weight:500; }
.ov-blk { color:var(--muted); font-weight:400; }
.ov-bar { display:flex; height:7px; border:1px solid var(--line); border-radius:4px; overflow:hidden; background:var(--surface); }
.ov-bar .lead, .ov-key .lead { background:var(--ink); }
.ov-bar .follow { background:color-mix(in srgb, var(--ink) 10%, var(--surface)); }
.ov-bar .other { border-left:1px solid var(--line); }
.ov-key { display:flex; align-items:center; gap:.4rem; margin:0; padding:.8rem 1.25rem 1rem; color:var(--muted); font-size:13.5px; }
.ov-key span { width:9px; height:9px; border-radius:2px; }
.ov-key .follow { margin-left:.8rem; border:1px solid var(--hover); }
/* By week, in each Series row: small stacked bars on a baseline, on one scale down the table. */
.ov-tbl td.ov-weeks { padding-top:.6rem; padding-bottom:.6rem; }
.ov-wk { display:inline-flex; vertical-align:middle; align-items:flex-end; gap:3px; height:64px; border-bottom:1px solid var(--line); }
.ov-wk-col { display:flex; flex-direction:column-reverse; gap:1px; width:14px; height:100%; }
.ov-wk-seg { display:block; flex:none; min-height:1px; background:color-mix(in srgb, var(--c) calc(var(--a) * 100%), transparent); }
.ov-wk-seg:last-child { border-radius:2px 2px 0 0; }
.ov-wk-seg:hover { outline:1.5px solid var(--ink); outline-offset:-1px; }
/* Stacked by class, by type, or a row per person: all are on the page, the header's buttons show one (app.js remembers it). */
.ov-tbl .ov-wk.by-type, .ov-tbl .ov-wk.by-person, .ov-tbl.by-type .ov-wk.by-class, .ov-tbl.by-person .ov-wk.by-class { display:none; }
.ov-tbl.by-type .ov-wk.by-type, .ov-tbl.by-person .ov-wk.by-person { display:inline-flex; }
.ov-wk.by-person { height:auto; }
.ov-wk.by-person .ov-wk-col { gap:0; height:calc(var(--rows) * 2px); }
.ov-wk.by-person i { display:block; flex:none; height:2px; }
.ov-wk.by-person i.pass { background:var(--c); }
.ov-wk.by-person i.drop { background:color-mix(in srgb, var(--c) 50%, transparent); }
.ov-wk.by-person i.none { background:color-mix(in srgb, var(--c) 20%, transparent); }
.ov-wk-by { margin-left:.35rem; padding:.05rem .5rem; border:1px solid var(--line); border-radius:999px; background:none; color:var(--muted); font:inherit; font-size:12px; cursor:pointer; vertical-align:1px; }
.ov-wk-by:hover { color:var(--ink); border-color:var(--hover); }
.ov-shead { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; margin-bottom:.6rem; }
.ov-more { color:var(--ink); font-size:14px; }
.ov-shead-r { display:flex; align-items:center; gap:1.25rem; margin-left:auto; }
.ov-show { display:flex; align-items:center; gap:.4rem; color:var(--muted); font-size:14px; }
.ov-show select { font-size:14px; }
.ov-mix-th { text-align:center; color:var(--ink); font-weight:600; }
/* Time: the dates, then the Schedule's little calendars beside them, shrunk (a class is a plain square at this size). */
.ov-time { white-space:nowrap; }
.ov-time-in { display:flex; align-items:center; gap:.75rem; }
.ov-range { font-size:14px; }
.ov-time .sch-cals { flex-wrap:nowrap; gap:.3rem; }
.ov-time .sch-cal { gap:2px; }
.ov-time .sch-cal-m { font-size:8.5px; }
.ov-time .sch-cal-g { grid-template-columns:repeat(7, 3px); grid-auto-rows:3px; gap:1px; padding:2px; border-top-width:2px; border-radius:2px; }
.ov-time .sch-cal-g i::before { width:2px; height:2px; }
.ov-time .sch-cal-g i.on::before { width:3px; height:3px; -webkit-mask:none; mask:none; }
.ov-time .sch-cal-g i.skip::before { width:3px; height:3px; }
.ov-mix-c.ov-mix-t { background:none; margin-right:.6rem; }
.ov-mix-th { margin-right:.6rem; }
.ov-tbl { width:100%; border-collapse:collapse; font-size:15px; }
.ov-tbl th { text-align:left; font-weight:400; font-size:13.5px; color:var(--muted); padding:.7rem 1.25rem; border-bottom:1px solid var(--line); }
.ov-tbl td { padding:.8rem 1.25rem; border-top:1px solid var(--line); white-space:nowrap; }
.ov-tbl tbody tr:first-child td { border-top:0; }
.ov-tbl tbody tr:hover { background:color-mix(in srgb, var(--ink) 4%, transparent); cursor:pointer; }
.ov-tbl .num { text-align:right; font-variant-numeric:tabular-nums; }
.ov-tbl .ov-go { width:1%; padding-left:0; }
.ov-tbl .ov-go svg { display:block; }
/* Who took each class: a column per class, a row per kind (Pass, Drop-in, No-show), each count shaded by it. */
.ov-tbl th.ov-chart, .ov-tbl td.ov-chart { width:1%; }
/* The Month view's charts: the Series table's two, in a box of their own, sized to them. */
.ov-charts { width:fit-content; max-width:100%; margin:0 0 1rem; overflow-x:auto; }
.ov-charts .ov-tbl { width:auto; }
.ov-charts .ov-tbl th.ov-chart, .ov-charts .ov-tbl td.ov-chart { width:auto; } /* a % width would stretch the table */
.ov-charts .ov-tbl tbody tr:hover { background:none; cursor:auto; }
.ov-mix { display:grid; gap:3px 5px; font-size:12.5px; font-variant-numeric:tabular-nums; }
.ov-mix-head { font-size:12.5px; }
.ov-mix-head span { text-align:center; white-space:nowrap; }
.ov-mix-k { color:var(--muted); font-size:12px; line-height:20px; text-align:right; padding-right:.1rem; }
.ov-mix-c { text-align:center; line-height:20px; border-radius:3px; color:var(--ink);
  background:color-mix(in srgb, var(--c) var(--p), var(--surface)); }
.ov-mix-c.dark { color:#fff; }
.ov-mix-c.zero { color:var(--muted); background:none; }
.ov-sname a { color:var(--ink); font-weight:500; text-decoration:none; }
@media (max-width:640px) {
  .ov-tbl .ov-chart, .ov-tbl .ov-weeks, .ov-tbl .ov-money { display:none; }
  .ov-charts { display:none; }
  .ov-tbl th, .ov-tbl td { padding-left:.75rem; padding-right:.75rem; }
  .ov-head, .ov-need { padding-left:1rem; padding-right:1rem; }
}
.sch-open { font-size:13px; white-space:nowrap; }
/* Settings pages (the integrations): each section a heading over one hairline, then its label/value rows, no lines between them. */
/* An integration page: its settings on the left, Status on the right (Status on top when there's no room). */
.set-page { display:grid; grid-template-columns:minmax(0, 1fr) 340px; gap:0 3rem; align-items:start; }
.set-body { grid-column:1; grid-row:1; min-width:0; }
.set-aside { grid-column:2; grid-row:1; min-width:0; position:sticky; top:4rem; }
.set-body > h2:first-child { margin-top:1rem; }
/* Status: a box like the header's list of integrations (its table and rows), a hairline round it, no shadow. */
.set-status-box { margin-top:1rem; border:1px solid var(--line); border-radius:8px; background:var(--surface); }
.set-page .set-status-box h2 { display:flex; align-items:center; gap:.6rem; margin:0; padding:.55rem .85rem .5rem; border-bottom:1px solid var(--line); }
.set-status-box h2 .src-light { margin-left:.15rem; }
.set-status-box .src-list { border:0; border-radius:0; box-shadow:none; padding:.35rem .35rem .4rem; }
.set-status-box .src-check td { padding-top:.4rem; padding-bottom:.4rem; }
.set-status-box .src-act { vertical-align:baseline !important; }
.set-status-box .src-text small { display:block; margin-top:.15rem; color:var(--muted); font-size:12.5px; }
@media (max-width: 1100px) { .set-page { grid-template-columns:minmax(0, 1fr); } .set-body, .set-aside { grid-column:1; grid-row:auto; } .set-aside { position:static; } }
.set-page h2, .set-extra h2 { font-size:12px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin:2rem 0 .4rem; padding-bottom:.4rem; border-bottom:1px solid var(--line); }
.set-row { display:grid; grid-template-columns:minmax(0, 1fr); gap:.35rem; padding:.6rem 0; } /* the label above its value, which takes the full width */
.set-label { font-weight:600; }
/* A label's ? : its explanation as a tooltip (hover, focus, or a tap: .show). */
.set-help { position:relative; display:inline-grid; place-items:center; width:20px; height:20px; margin:0 0 0 .3rem; padding:0; border:0; border-radius:50%;
            background:none; color:var(--muted); cursor:help; vertical-align:-4px; }
.set-help svg { width:16px; height:16px; }
.set-help:hover, .set-help:focus-visible, .set-help.show { color:var(--ink); }
.set-help::after { content:attr(data-tip); position:absolute; left:50%; bottom:calc(100% + 6px); z-index:5; width:max-content; max-width:16rem; padding:.4rem .6rem;
                   border-radius:6px; background:var(--ink); color:var(--surface); font-size:12.5px; font-weight:400; line-height:1.4; text-align:left;
                   opacity:0; transform:translate(-50%, 2px); transition:opacity .12s, transform .12s; pointer-events:none; }
.set-help:hover::after, .set-help:focus-visible::after, .set-help.show::after { opacity:1; transform:translate(-50%, 0); }
.set-label small, .set-value small { display:block; font-weight:400; color:var(--muted); font-size:13px; }
.set-value { min-width:0; overflow-wrap:anywhere; }
.set-edit .set-value { display:flex; align-items:center; gap:.75rem; }
.set-switch { padding:0; border:0; background:none; cursor:pointer; }
.set-switch .switch { display:block; }
.set-switch:focus-visible { outline:2px solid var(--accent); outline-offset:2px; border-radius:999px; }
.set-switch:disabled, .set-input:disabled { cursor:default; opacity:.55; }
input.set-input { font:inherit; padding:.3rem .5rem; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink); }
.set-saved { color:var(--muted); font-size:13px; }
.set-saved:empty { display:none; } /* no gap after a field until it says something */
.set-note { color:var(--muted); font-size:13px; }
/* Settings: a sidebar beside the page (a page picker on phones): a Settings title, then each group, with full-width
   lines between them; the header's line runs down between it and the page, to the bottom of the window. */
.set-shell { display:grid; grid-template-columns:14rem minmax(0, 1fr); align-items:start; margin:-12px 0 -16px -16px; }
.set-side { position:sticky; top:3.3rem; }
.side-title { padding:1rem 1rem 1rem 1.4rem; font-weight:600; border-bottom:1px solid var(--line); }
.side-group { display:grid; gap:2px; padding:1rem 1rem 1rem .75rem; border-bottom:1px solid var(--line); }
.side-group:last-of-type { border-bottom:0; }
.side-head { font-size:12px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); padding:0 .65rem .45rem; }
.set-side a { display:flex; align-items:center; justify-content:space-between; gap:.5rem; padding:.4rem .65rem; border-radius:8px; color:inherit; text-decoration:none; }
.set-side a:hover { background:var(--soft); }
.set-side a[aria-current="page"] { background:var(--soft); font-weight:600; }
.set-side a .src-light { width:7px; height:7px; }
.set-side a .src-ic { color:var(--muted); }
.set-side a .src-ic svg { width:16px; height:16px; }
.side-label { flex:1 1 auto; }
.side-pick { display:none; }
.set-main { min-width:0; min-height:calc(100vh - 52px); padding:12px 2.5rem 16px; border-left:1px solid var(--line); }
/* Every Settings page one width, against the sidebar (the pages themselves set none). */
.set-inner { max-width:1200px; }
.set-inner:has(.set-page) { max-width:828px; } /* the integration pages: 440px of settings, Status beside them */
.set-inner:has(.set-page.no-status) { max-width:440px; } /* General: no Status */
.set-page.no-status { grid-template-columns:minmax(0, 1fr); }
/* Settings rows under another page's own content (Classes' Class time). */
.set-extra { max-width:440px; margin-top:1.5rem; }
@media (max-width: 1100px) { .set-inner:has(.set-page) { max-width:440px; } }
@media (max-width: 760px) {
  .set-shell { grid-template-columns:minmax(0, 1fr); margin:0; }
  .set-side { position:static; margin-bottom:.9rem; }
  .set-main { min-height:0; padding:0; border-left:0; }
  .set-side .side-group, .side-title { display:none; }
  .side-pick { display:block; width:100%; font:inherit; padding:.5rem .6rem; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink); }
}
/* Buttons on the Settings pages; API keys; spreadsheet lists. */
.set-btn { display:inline-flex; align-items:center; gap:.45rem; min-height:32px; padding:0 .8rem; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:inherit; font:inherit; font-size:14px; cursor:pointer; white-space:nowrap; }
.set-btn:hover:not(:disabled) { border-color:var(--hover); }
.set-btn:disabled { opacity:.55; cursor:default; }
.set-btn.primary { background:var(--accent); border-color:var(--accent); color:var(--on-accent); font-weight:600; }
.set-btn .add-spin { display:none; }
.busy .set-btn.primary .add-spin { display:inline-block; }
.set-key .set-value { flex-wrap:wrap; gap:.5rem; }
.key-now code { font-size:14px; letter-spacing:.04em; }
.key-form { display:flex; flex-wrap:wrap; gap:.5rem; flex-basis:100%; }
.key-form[hidden] { display:none; }
.key-form .set-in { flex:1 1 16rem; min-width:0; }
.set-key.editing .key-edit, .set-key.editing .key-remove { display:none; }
.set-text { flex:1 1 auto; min-width:0; } /* the rest of the row (Saved after it) */
.muted { color:var(--muted); }
.sheet-list .set-value { display:grid; gap:.5rem; }
.sheet-items { list-style:none; margin:0; padding:0; }
.sheet-items li { display:flex; align-items:center; gap:.75rem; min-height:38px; padding:.25rem 0; }
.sheet-ic { flex:none; width:1em; height:1em; margin-right:-.35rem; }
.sheet-items li > a { flex:1 1 auto; min-width:0; color:inherit; text-decoration:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sheet-items li > a:hover { text-decoration:underline; }
.sheet-items li > a svg { width:13px; height:13px; margin-left:.3rem; vertical-align:-1px; color:var(--muted); }
.sheet-items li > .muted { font-size:13px; white-space:nowrap; }
.sheet-items li.muted { font-size:14px; }
.sheet-add { display:flex; align-items:center; gap:.5rem; }
.sheet-add .set-in { flex:1 1 auto; min-width:0; height:32px; box-sizing:border-box; padding-block:0; }
.sheet-add .set-in::-webkit-calendar-picker-indicator { margin:0; align-self:center; }
.sheet-remove { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; flex:none; padding:0; border:0; border-radius:6px; background:none; color:var(--muted); cursor:pointer; }
.sheet-remove svg { width:16px; height:16px; }
.sheet-remove:hover:not(:disabled) { color:var(--ink); background:var(--soft); }
.sheet-remove:disabled { opacity:.35; cursor:default; }
.sheet-list.busy { opacity:.7; }
.set-page .set-note code { font-size:13px; }
/* /attendance (editors only) */
.att-stats { display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:8px; margin:0 0 .9rem; }
/* The Month view's top: the stat boxes, the charts to their right (below them when there's no room). */
.att-top { display:flex; flex-wrap:wrap; align-items:stretch; gap:12px; margin:0 0 .9rem; }
.att-top > .att-stats { flex:1 1 340px; margin:0; align-content:start; }
.att-top > .ov-charts { flex:none; margin:0; }
.att-stat { padding:.5rem .75rem; border:1px solid var(--line); border-radius:8px; background:var(--surface); }
.att-stat-label { color:var(--muted); font-size:12px; }
.att-stat-value { font-size:1.2rem; font-weight:700; font-variant-numeric:tabular-nums; }
.att-stat-sub { color:var(--muted); font-size:12px; }
.att-owed { color:var(--bad-ink); }
.att-grid th { padding:.4rem .55rem; border:0; border-bottom:1px solid var(--line); background:var(--surface); text-align:left; font-size:12px; white-space:nowrap; }
.att-grid td { min-width:0; max-width:none; border:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; vertical-align:middle; }
/* A hairline between rows (a person's extra rows, .cont, stay with them); no stripes. Phones draw their own lines. */
/* 1x screens can't draw half a pixel, so they get a fainter full pixel instead. */
@media (min-width: 641px) { .att-grid tbody tr + tr:not(.cont) > td { border-top:1px solid color-mix(in srgb, var(--line) 50%, var(--surface)); } }
@media (min-width: 641px) and (min-resolution: 2dppx) { .att-grid tbody tr + tr:not(.cont) > td { border-top:.5px solid var(--line); } }
@media (hover: hover) { .att-grid tbody tr:hover > td { background:color-mix(in srgb, var(--ink) 6%, transparent); } }
.att-grid th.att-wk, .att-grid td.att-wk { padding-left:.3rem; padding-right:.3rem; text-align:center; }
.att-grid .num { text-align:right; font-variant-numeric:tabular-nums; }
.att-grid .ctr { text-align:center; font-variant-numeric:tabular-nums; }
.att-grid .att-name { font-weight:600; white-space:normal; overflow-wrap:anywhere; }
.att-grid .att-notes { white-space:normal; overflow:visible; overflow-wrap:anywhere; }
.att-row-notes { display:flex; align-items:flex-start; gap:.5rem; }
.att-row-notes > :last-child { flex:1; min-width:0; }
.att-money { display:flex; align-items:center; gap:.5rem; flex:0 1 auto; min-width:0; padding:3px; margin:-3px 0; border-radius:8px; }
.att-money.open { padding-right:.6rem; background:color-mix(in srgb, var(--ink) 8%, var(--surface)); }
.att-money-btn { display:inline-flex; align-items:center; justify-content:center; gap:1px; height:26px; padding:0 3px 0 5px; border:1px solid transparent;
                 border-radius:6px; cursor:pointer; font:inherit; }
.att-money-btn svg { width:15px; height:15px; }
.att-money-btn svg.ic-closed { width:13px; height:13px; }
.att-money-btn[aria-expanded="true"] .ic-closed { display:none; }
.att-money-btn[aria-expanded="true"] { padding:0 5px; }
.att-money-close { display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px; margin-right:-.4rem; padding:0;
                   border:0; border-radius:6px; background:none; color:var(--muted); cursor:pointer; }
.att-money-close:hover { color:var(--ink); background:color-mix(in srgb, var(--ink) 10%, transparent); }
.att-money-close svg { width:15px; height:15px; }
.att-notes-head { vertical-align:middle; }
.att-money-all { display:inline-flex; align-items:center; gap:1px; height:22px; margin-right:.5rem; padding:0 3px 0 5px; vertical-align:middle;
                 border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--muted); cursor:pointer; }
.att-money-all:hover { color:var(--ink); border-color:var(--hover); }
.att-money-all svg { width:13px; height:13px; }
.att-money-all .ic-open, .att-money-all[aria-expanded="true"] .ic-closed { display:none; }
.att-money-all[aria-expanded="true"] .ic-open { display:block; }
.att-money-btn.ok { background:var(--ok-bg); color:var(--ok-ink); }
.att-money-btn.bad { background:var(--bad-bg); color:var(--bad-ink); }
.att-money-btn:hover { border-color:currentColor; }
.att-money-btn:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.att-money-info { display:flex; flex-wrap:wrap; align-items:center; gap:.25rem .6rem; font-size:12px; white-space:nowrap; }
.att-money-info[hidden] { display:none; }
.att-money-info b { font-size:13px; font-variant-numeric:tabular-nums; }
.att-money-info .lbl { color:var(--muted); }
.att-money-info .att-move { font:inherit; max-width:12rem; }
.att-date { display:block; font-weight:400; color:var(--muted); }
.att-wk { position:relative; text-align:center; }
td.att-wk.off, th.att-wk.off { background:color-mix(in srgb, var(--ink) 6%, transparent); }
.att-yes { display:inline-flex; color:var(--good); }
.att-lvl { display:inline-block; max-width:100%; padding:0 .5rem; overflow:hidden; text-overflow:ellipsis; vertical-align:middle; border-radius:999px;
           background:color-mix(in srgb, var(--ink) 8%, transparent); font-size:12px; font-weight:600; }
.att-lvl[data-track] { background:var(--chip); color:var(--on-accent); }
/* Attendance's own primary color: black (light ink in dark mode). */
body.att-page { --accent:var(--ink); }
body.att-page .subtabs > a.on { color:var(--on-accent); }
.att-tag { display:inline-block; padding:0 .45rem; border-radius:999px; background:color-mix(in srgb, var(--ink) 8%, transparent); font-size:12px; }
.att-no { display:inline-flex; color:var(--bad-ink); }
.att-yes circle { fill:currentColor; }
.att-yes .tick { stroke:var(--ok-ink); stroke-width:3; }
/* A drop-in's: hollow, drawn like the missed ⊗. */
.att-yes.drop { color:color-mix(in srgb, var(--good-2) 80%, var(--ink)); }
.att-yes.drop circle { fill:none; }
.att-yes.drop .tick { stroke:currentColor; stroke-width:1.5; }
/* Green-on-sage needs weight to read: doubled strokes, bold text. */
.att-money-btn.ok svg path { stroke-width:1.75; }
.att-tag.ok { font-weight:700; }
.att-tag.ok { background:var(--ok-bg); color:var(--ok-ink); }
.att-tag.bad { background:var(--bad-bg); color:var(--bad-ink); font-weight:600; }
.att-note { position:absolute; top:4px; right:4px; width:6px; height:6px; border-radius:50%; background:var(--accent); }
.subtabs > a.att-check { background:var(--tag-bg); border-color:var(--tag-bg); color:var(--tag-ink); }
.subtabs > a.att-check.on { border-color:var(--tag-ink); font-weight:700; }
.subtabs.att-levels { margin-bottom:.4rem; }
.att-bdot { display:inline-block; width:8px; height:8px; margin:0 .35rem 1px 0; border-radius:50%; background:var(--b); vertical-align:middle; }
/* A row's warnings: icons on the left of its note, each saying what it is as its tooltip. */
.att-note-line { display:flex; align-items:flex-start; gap:4px; }
.att-note-line > :last-child:not(.att-flags) { flex:1; min-width:0; }
.att-flags { flex:none; display:flex; gap:3px; }
.att-flag { position:relative; display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; border-radius:4px;
  background:var(--tag-bg); color:var(--tag-ink); cursor:help; }
.att-flag svg { flex:none; width:14px; height:14px; stroke-width:1.75; }
.att-flag::after { content:attr(data-tip); position:absolute; left:0; bottom:calc(100% + 6px); z-index:5; padding:.3rem .55rem; border-radius:6px;
  background:var(--ink); color:var(--surface); font-size:12px; font-weight:600; white-space:nowrap; box-shadow:0 2px 8px rgb(0 0 0 / .2);
  opacity:0; transform:translateY(2px); transition:opacity .12s, transform .12s; pointer-events:none; }
.att-flag:hover::after { opacity:1; transform:none; }
.att-foot { color:var(--muted); font-size:12px; }
.att-grid .att-name a { color:inherit; text-decoration:none; }
.att-grid .att-name a:hover { text-decoration:underline; }
.att-find-hit { display:flex; align-items:flex-start; gap:8px; font-size:12.5px; color:var(--muted); margin-top:4px; }
.att-find-hit[hidden] { display:none; }
.att-find-txt { flex:1; min-width:0; white-space:pre-line; }
/* The arrow to the Month view, at the right; under the pointer the arrow's own lines lift and cast a shadow (no box). */
.att-find-go { flex:none; display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; margin-top:-4px;
  color:var(--accent); border-radius:6px; outline-offset:-2px; }
.att-find-go svg { width:16px; height:16px; transition:transform .15s ease, filter .15s ease; }
.att-find-go:hover svg, .att-find-go:focus-visible svg { transform:translateY(-2px); filter:drop-shadow(0 3px 2px rgb(0 0 0 / .35)); }
.att-find-go:active svg { transform:translateY(0); filter:drop-shadow(0 1px 1px rgb(0 0 0 / .25)); }
@media (prefers-reduced-motion: reduce) { .att-find-go svg { transition:none; } .att-find-go:hover svg, .att-find-go:focus-visible svg { transform:none; } }
.att-find-hit .lbl { font-weight:600; }
.att-info { margin:0; color:var(--muted); font-size:13px; }
.att-info a { color:inherit; }
.att-shared { display:inline-flex; align-items:center; gap:3px; padding:0 6px 0 4px; border-radius:4px; background:var(--tag-bg); color:var(--tag-ink); font-size:12px; cursor:help; }
.att-shared svg { flex:none; width:13px; height:13px; stroke-width:1.75; }
.att-sep { padding:0 .4rem; }
.att-uid { font-variant-numeric:tabular-nums; }
.att-grid td.att-untracked { color:var(--muted); font-size:12px; text-align:center; }
h2.att-person { margin:0 0 .25rem; font-size:2rem; line-height:1.15; overflow-wrap:anywhere; }
.att-people { min-width:50rem; }
.att-people col.c-count { width:5rem; }
.att-people col.c-badges { width:12rem; }
.att-sort { display:inline-flex; align-items:center; gap:2px; color:inherit; text-decoration:none; }
.att-sort:hover { text-decoration:underline; }
.att-sort .ic-sort { width:13px; height:13px; }
tr.att-row-link { cursor:pointer; }
tr.att-row-link > td.att-notes { cursor:auto; }
.att-note-wrap { display:flex; align-items:flex-start; gap:6px; }
.att-note-edit { display:block; flex:1; min-width:0; margin:0; padding:0; border:0; border-radius:0; background:transparent; color:inherit;
  font:inherit; line-height:1.35; resize:none; overflow:hidden; field-sizing:content; outline:none; }
.att-note-edit:disabled { color:var(--muted); cursor:progress; }
.att-note-edit::placeholder { color:transparent; }
.att-note-edit:hover::placeholder, .att-note-edit:focus::placeholder { color:var(--muted); }
/* Save indicator, left of the note: a spinning arc while saving, which closes into a ring around a tick, then fades. */
.att-save { flex:none; width:14px; height:14px; margin-top:calc((1.35em - 14px) / 2); color:var(--muted); opacity:0; }
.att-save svg { display:block; width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.25; stroke-linecap:round; stroke-linejoin:round; }
.att-save .ring { stroke-dasharray:40.9; stroke-dashoffset:29; transform-origin:8px 8px; }
.att-save .tick { stroke-dasharray:10; stroke-dashoffset:10; }
.att-save.saving { opacity:1; }
.att-save.saving .ring { animation:att-spin .8s linear infinite; }
.att-save.saved { color:var(--good-2); animation:att-fade .5s ease 1.2s forwards; opacity:1; }
.att-save.saved .ring { stroke-dashoffset:0; transition:stroke-dashoffset .3s ease; }
.att-save.saved .tick { stroke-dashoffset:0; transition:stroke-dashoffset .25s ease .2s; }
.att-save.failed { opacity:1; color:var(--bad-ink); }
.att-save.failed .ring { stroke-dashoffset:0; }
@keyframes att-spin { to { transform:rotate(360deg); } }
@keyframes att-fade { to { opacity:0; } }
@media (prefers-reduced-motion: reduce) {
  .att-save.saving .ring { animation:none; stroke-dashoffset:20; }
  .att-save.saved .ring, .att-save.saved .tick { transition:none; }
}
.att-note-status { display:block; margin:4px 0 0 20px; color:var(--bad-ink); font-size:11px; }
.att-note-status[hidden] { display:none; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
/* The purchase table (Month view, Tonight, Person view) on phones: each row as lines, the name (or month) on the first
   of a group's rows, then its blocks and the four weeks, then $, flags and notes. The header keeps just the block and
   week headings, over their columns, and the open-all $ with Notes. */
@media (max-width: 640px) {
  table.att-purchases { min-width:0; }
  .att-purchases colgroup { display:none; }
  .att-purchases, .att-purchases thead, .att-purchases tbody { display:block; }
  .att-purchases tr { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) repeat(4, 2.6rem); align-items:center; gap:.3rem .3rem; padding:.45rem .5rem; }
  .att-purchases th, .att-purchases td { padding:0; }
  .att-purchases tr > :first-child, .att-purchases tr > :last-child { grid-column:1 / -1; }
  .att-purchases thead tr { padding-top:.35rem; padding-bottom:.35rem; border-bottom:1px solid var(--line); background:var(--surface); }
  .att-purchases thead th { border:0; background:none; }
  .att-purchases thead th:first-child { display:none; }
  .att-purchases th.att-wk { font-size:11px; }
  .att-purchases th.att-wk, .att-purchases td.att-wk { padding:0; }
  .att-purchases tbody tr.first + tr.first, .att-purchases tbody tr.cont + tr.first { border-top:1px solid var(--line); }
  .att-purchases tbody tr.cont { padding-top:0; }
  .att-purchases td.att-name:empty { display:none; }
  .att-purchases td.att-name { font-size:15px; }
  .att-purchases td.att-untracked { grid-column:3 / -1; }
  .att-purchases .att-mail-cell { display:none; } /* People has it on phones */
  /* The Person view's: the class across the top, then its session beside the weeks. */
}
/* Tonight's tables on phones: no header; the name with the weeks on its right, then the blocks with the $ button, then
   the $ details when open, then flags and notes (only when there are some, or a note can be added). The notes cell's
   wrappers step aside so their parts take those lines. */
@media (max-width: 640px) {
  .tn .att-purchases thead { display:none; }
  .tn .att-purchases tr { grid-template-columns:repeat(4, minmax(0, 1fr)) 3.2rem;
    grid-template-areas:"name name name name name" "b1 b1 b2 b2 pay" "info info info info info" "notes notes notes notes notes"; }
  .tn .att-purchases tbody tr.first:first-child { border-top:0; }
  .tn .att-purchases td.att-name { grid-area:name; align-self:center; min-height:34px; display:flex; align-items:center; padding-right:140px; }
  .tn .att-purchases td:nth-child(2) { grid-area:b1; }
  .tn .att-purchases td:nth-child(3) { grid-area:b2; }
  /* Each class (its pill, or its dropdown when editable) fills its half of the line; one class on its
     own takes the other's half too, unless that one can be picked (unlocked). */
  .tn .att-purchases td:nth-child(2), .tn .att-purchases td:nth-child(3) { display:flex; }
  .tn .att-purchases td:nth-child(2) > *, .tn .att-purchases td:nth-child(3) > * { flex:1; min-width:0; }
  .tn .att-purchases .att-lvl-edit > select { width:100%; height:30px; }
  .tn .att-purchases td > .att-lvl { text-align:center; line-height:30px; }
  .tn .att-purchases tr:has(> td:nth-child(3):empty, > td:nth-child(3) select:disabled[data-before=""]) > td:nth-child(2) { grid-column:1 / 5; }
  .tn .att-purchases tr:has(> td:nth-child(2):empty, > td:nth-child(2) select:disabled[data-before=""]) > td:nth-child(3) { grid-column:1 / 5; }
  .tn .att-purchases td:nth-child(2):is(:empty, :has(select:disabled[data-before=""])),
  .tn .att-purchases td:nth-child(3):is(:empty, :has(select:disabled[data-before=""])) { display:none; }
  /* The weeks share the name's line, each 34px further in from the right (No attendance taken, at the right). */
  .tn .att-purchases td:nth-child(n+4):nth-child(-n+7), .tn .att-purchases td.att-untracked { grid-area:name; justify-self:end; }
  .tn .att-purchases td:nth-child(4) { margin-right:102px; }
  .tn .att-purchases td:nth-child(5) { margin-right:68px; }
  .tn .att-purchases td:nth-child(6) { margin-right:34px; }
  .tn .att-purchases td.att-untracked { margin:0; color:var(--muted); font-size:12px; }
  .tn .att-purchases td.att-wk { display:flex; align-items:center; justify-content:center; width:30px; min-height:30px; border-radius:6px; }
  /* A week that hasn't happened yet, with no mark: a dotted circle, as an open week's toggle has (shown locked too). */
  .tn .att-purchases td.att-wk.upcoming:not(:has(button, .att-yes))::before { content:""; width:16px; height:16px; box-sizing:border-box;
    border:1.5px dashed color-mix(in srgb, var(--muted) 70%, transparent); border-radius:50%; }
  .tn .att-purchases td.att-wk.upcoming [data-field]:disabled .att-wk-off { visibility:visible; }
  .tn .att-purchases td.att-notes, .tn .att-purchases .att-row-notes, .tn .att-purchases .att-money { display:contents; }
  .tn .att-purchases .att-money-btn { grid-area:pay; justify-self:end; }
  /* Its details open below, so the chevron points down (up when open; the close button is hidden). */
  .tn .att-purchases .att-money-btn svg.ic-closed { transform:rotate(90deg); }
  .tn .att-purchases .att-money-btn[aria-expanded="true"] { padding:0 3px 0 5px; }
  .tn .att-purchases .att-money-btn[aria-expanded="true"] svg.ic-closed { display:block; transform:rotate(-90deg); }
  .tn .att-purchases .att-money-info { grid-area:info; padding:.4rem .6rem; border-radius:8px; background:color-mix(in srgb, var(--ink) 8%, var(--surface)); }
  .tn .att-purchases .att-money-info[hidden] { display:none; }
  .tn .att-purchases .att-money-close { display:none; } /* the $ button closes it */
  .tn .att-purchases .att-row-note:not(:disabled)::placeholder { color:var(--muted); }
  .tn .att-purchases .att-row-notes > :last-child { grid-area:notes; }
  .tn .att-purchases .att-row-notes > :last-child:empty,
  .tn .att-purchases .att-row-notes > :last-child:not(:has(.att-flags)):has(> .att-row-note:disabled:placeholder-shown) { display:none; }
  .tn .att-purchases .att-row-note:disabled:placeholder-shown { display:none; }
}
/* Row checkboxes, and the actions on the people picked. */
.att-people col.c-pick { width:2.4rem; }
.att-grid .att-pick { padding-right:0; cursor:auto; }
.att-pick input { width:16px; height:16px; margin:0; vertical-align:middle; accent-color:var(--accent); cursor:pointer; }
tr.att-row-link.picked > td { background:color-mix(in srgb, var(--accent) 10%, transparent); }
.att-pickbar { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; margin:0 0 .6rem; }
.att-pickbar[hidden] > * { visibility:hidden; } /* keeps its space, so checking a row doesn't move the table */
/* Desktop: the actions stick under the page header, and the table's header row under them. The wrap can't scroll
   sideways then (a scroll box would hold the header row in), so a narrow window scrolls the page instead. */
@media (min-width: 641px) {
  .att-pickbar { position:sticky; top:var(--hdr-h, 52px); z-index:14; margin:0; padding:0 0 .6rem; background:var(--bg); }
  .grid-wrap:has(> .att-people) { overflow:visible; }
  .att-people thead th { position:sticky; top:calc(var(--hdr-h, 52px) + var(--pick-h, 46px)); z-index:13;
    border-bottom:0; box-shadow:inset 0 -1px var(--line); } /* a collapsed border doesn't stick with the cell */
  .att-people thead th:first-child { border-top-left-radius:6px; }
  .att-people thead th:last-child { border-top-right-radius:6px; }
}
.att-pick-count { margin-right:.25rem; font-weight:600; font-size:14px; }
.att-pickbar .add-cancel { display:inline-flex; align-items:center; min-height:34px; text-decoration:none; }
.att-pickbar .add-cancel:disabled, .att-pickbar .add-cancel[aria-disabled="true"] { color:var(--muted); cursor:not-allowed; opacity:.6; }
/* ---------- People (/admin/people) ---------- */
/* The title row: People, its counts, then Find (the big search box) and + Add person at the right. */
.admin-title:has(.pp-find) .admin-tools { flex:1; justify-content:flex-end; }
.admin-title:has(.pp-find) .admin-tools .tn-add { height:40px; white-space:nowrap; }
@media (max-width: 900px) { .admin-title:has(.pp-find) .admin-tools { flex-basis:100%; } .pp-find { flex:1; width:auto; } }
.pp-find { display:flex; align-items:center; gap:8px; width:min(34rem, 100%); height:40px; padding:0 8px 0 12px; border:1.5px solid var(--ink); border-radius:8px;
  background:var(--surface); cursor:text; }
.pp-find:focus-within { outline:2px solid var(--accent); outline-offset:1px; }
.pp-find > svg { flex:none; width:18px; height:18px; color:var(--muted); }
.pp-find input { flex:1; min-width:0; height:100%; padding:0; border:0; background:none; color:var(--ink); font:inherit; font-size:15px; outline:none; }
.pp-find kbd { flex:none; min-width:20px; padding:0 5px; border:1px solid var(--line); border-radius:4px; color:var(--muted); font:12px/18px var(--font-body); text-align:center; }
.pp-find:focus-within kbd { visibility:hidden; }
/* Needs you: a pill per open kind; on = the table shows just those people. */
.pp-needs { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; margin:0 0 .75rem; }
.pp-lbl { margin-right:.25rem; color:var(--muted); font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; }
.pp-need { display:inline-flex; align-items:center; gap:.45rem; height:32px; padding:0 .8rem; border:1px solid var(--line); border-radius:999px; background:var(--surface);
  color:var(--ink); font:inherit; font-size:14px; text-decoration:none; white-space:nowrap; cursor:pointer; }
.pp-need:hover { border-color:var(--hover); text-decoration:none; }
.pp-need.on { border-color:var(--ink); background:var(--ink); color:var(--bg); }
.pp-need b { font-variant-numeric:tabular-nums; }
.pp-need-go { font-size:13px; color:var(--ink); }
.pp-dot { flex:none; width:8px; height:8px; border-radius:50%; background:var(--muted); }
.pp-dot.unpaid { background:var(--danger); }
.pp-dot.reply, .pp-dot.err { background:var(--failure); }
.pp-dot.dup, .pp-dot.unlinked, .pp-dot.orders { background:#c99a06; }
/* Filters: dropdowns (a <details> each). */
.pp-filters { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; margin:0 0 .75rem; }
.pp-dd { position:relative; }
.pp-dd > summary { list-style:none; }
.pp-dd > summary::-webkit-details-marker { display:none; }
.pp-dd-btn { display:inline-flex; align-items:center; gap:.35rem; height:34px; padding:0 .7rem; border:1px solid var(--line); border-radius:6px; background:var(--surface);
  color:var(--ink); font-size:14px; white-space:nowrap; cursor:pointer; user-select:none; }
.pp-dd-btn:hover { border-color:var(--hover); }
.pp-dd-btn.on { border-color:var(--ink); box-shadow:inset 0 0 0 1px var(--ink); }
.pp-dd-btn.on .pp-dd-val { font-weight:600; }
.pp-dd-btn > svg { flex:none; width:15px; height:15px; }
.pp-dd-btn > svg:last-child { width:13px; height:13px; color:var(--muted); }
.pp-dd-menu { position:absolute; left:0; top:calc(100% + 4px); z-index:30; display:flex; flex-direction:column; min-width:13rem; max-height:24rem; overflow:auto; padding:4px;
  border:1px solid var(--line); border-radius:8px; background:var(--surface); box-shadow:0 8px 24px rgb(0 0 0 / .14); color:var(--ink); }
.pp-dd:not([open]) > .pp-dd-menu { display:none; } /* closed, Chrome still lays it out: it would widen the page */
.pp-filters > .pp-dd:last-child > .pp-dd-menu { left:auto; right:0; } /* the last one opens leftward, near the window's edge */
.pp-dd-menu > a, .pp-dd-menu > button { display:flex; align-items:center; gap:.6rem; padding:.4rem .6rem; border:0; border-radius:5px; background:none; color:var(--ink);
  font:inherit; font-size:14px; text-align:left; text-decoration:none; white-space:nowrap; cursor:pointer; }
.pp-dd-menu > a:hover, .pp-dd-menu > button:hover { background:color-mix(in srgb, var(--ink) 7%, transparent); text-decoration:none; }
.pp-dd-menu > a.on { background:color-mix(in srgb, var(--accent) 12%, transparent); font-weight:600; }
.pp-dd-n { margin-left:auto; padding-left:1rem; color:var(--muted); font-size:12px; font-weight:400; font-variant-numeric:tabular-nums; }
.pp-dd-wait { margin:0; padding:.4rem .6rem; color:var(--muted); font-size:13px; }
/* Add to MailerLite group: how many of the people picked each group has: all (a filled circle with a tick), some (half filled), none (an empty ring). */
.pp-gm { flex:none; position:relative; width:14px; height:14px; border:1.5px solid var(--muted); border-radius:50%; box-sizing:border-box; }
.pp-gm.some { border-color:var(--success); background:linear-gradient(90deg, var(--success) 50%, transparent 50%); }
.pp-gm.all { border-color:var(--success); background:var(--success); }
.pp-gm.all::after { content:""; position:absolute; left:3.5px; top:1.5px; width:3px; height:6px; border:solid #fff; border-width:0 1.5px 1.5px 0; transform:rotate(45deg); }
.pp-dd-menu > .pp-dd-new { margin-top:4px; border-top:1px solid var(--line); border-radius:0; }
/* The selection bar: dark, above the table. */
.att-pickbar.pp-bar { position:relative; top:auto; gap:.5rem; padding:.5rem .6rem .5rem 1rem; border-bottom:.6rem solid var(--bg); border-radius:8px 8px 0 0; background:var(--ink); background-clip:padding-box;
  color:var(--bg); margin:0; }
.att-pickbar.pp-bar[hidden] { background:none; }
/* Nothing picked: a hint in its place (the bar keeps its space, so ticking a row doesn't move the table). */
.att-pickbar.pp-bar[hidden]::before { content:"Select people to add them to a MailerLite group, copy their emails, export or merge them."; position:absolute; left:2px; top:50%; transform:translateY(-50%); color:var(--muted); font-size:13px; }
.pp-bar .att-pick-count { margin-right:.5rem; font-size:15px; }
.pp-bar-btn { display:inline-flex; align-items:center; gap:.4rem; height:34px; padding:0 .75rem; border:1px solid color-mix(in srgb, var(--bg) 35%, transparent); border-radius:6px;
  background:none; color:var(--bg); font:inherit; font-size:14px; text-decoration:none; white-space:nowrap; cursor:pointer; user-select:none; }
.pp-bar-btn:hover { background:color-mix(in srgb, var(--bg) 12%, transparent); text-decoration:none; }
.pp-bar-btn:disabled, .pp-bar-btn[aria-disabled="true"] { opacity:.45; cursor:not-allowed; }
.pp-bar-btn > svg { flex:none; width:15px; height:15px; }
.pp-bar-btn > svg:last-child { width:13px; height:13px; }
.pp-bar .pp-bar-clear { margin-left:auto; border-color:transparent; }
.pp-ml.busy > summary { opacity:.6; pointer-events:none; }
/* The table: a line a row. Wider screens: it scrolls inside the window (app.js sets its max-height), its header row stuck at its top. */
.pp-wrap { border-radius:8px; }
/* This month and Net, folded (wider screens): a narrow column with just a button in its header that opens it. */
.pp-fold-btn { display:none; }
@media (min-width: 641px) {
  .pp-fold-btn { display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px; margin-left:4px; padding:0; vertical-align:middle;
    border:0; background:none; color:var(--ink); opacity:.5; cursor:pointer; transition:opacity .12s; }
  .pp-fold-btn:hover, .pp-fold-btn:focus-visible { opacity:1; }
  .pp-fold-btn svg { width:14px; height:14px; }
  .pp-fold-btn .pp-fold-open, .pp-fold-btn[aria-expanded="true"] .pp-fold-closed { display:none; }
  .pp-fold-btn[aria-expanded="true"] .pp-fold-open { display:inline-flex; }
  .pp-table:not(.now-open) col.c-now, .pp-table:not(.net-open) col.c-net { width:3rem; }
  .pp-table:not(.now-open) th.pp-now > :not(.pp-fold-btn), .pp-table:not(.now-open) td.pp-now > *, .pp-table:not(.net-open) th.pp-net > .att-sort { display:none; }
  .pp-table:not(.net-open) td.pp-net { font-size:0; }
  .pp-table th.pp-now:has(.pp-fold-btn[aria-expanded="false"]), .pp-table th.pp-net:has(.pp-fold-btn[aria-expanded="false"]) { text-align:center; padding-left:4px; padding-right:4px; }
  .pp-table th .pp-fold-btn[aria-expanded="false"] { margin:0; }
  .grid-wrap.pp-wrap { position:relative; overflow:auto; overscroll-behavior:contain; } /* relative: its absolute bits (.sr-only) scroll with it, not widen the page */
  .att-people.pp-table thead th { top:0; }
}
.pp-table { width:100%; min-width:72rem; table-layout:fixed; font-size:14px; }
.pp-table col.c-pick { width:2.6rem; }
.pp-table col.c-name { width:15rem; }
.pp-table col.c-now { width:calc(var(--slots, 2) * 3.5rem + 1.4rem); }
.pp-table col.c-issues { width:11rem; }
.pp-table col.c-count { width:5.5rem; }
.pp-table col.c-net { width:5.5rem; }
.pp-table col.c-badges { width:7.5rem; }
.pp-table col.c-mail { width:3.2rem; }
.pp-table th { padding:.55rem 10px; vertical-align:top; color:var(--muted); font-size:12px; font-weight:600; letter-spacing:.05em; text-transform:uppercase; }
.pp-table th.att-pick { vertical-align:middle; }
.pp-table th .att-sort { gap:5px; color:var(--ink); }
.pp-table th .att-sort:hover { text-decoration:none; }
.pp-table .ic-sort { flex:none; width:12px; height:12px; color:var(--ink); }
.pp-table .ic-sort.idle { color:#a3aab2; }
.pp-table th .att-sort:hover .ic-sort.idle { color:var(--ink); }
.pp-table th.num { text-align:right; }
.pp-table th.pp-mail svg:not(.ic-sort) { width:16px; height:16px; }
.pp-times { display:flex; margin-top:1px; color:var(--muted); font-size:11px; font-weight:400; letter-spacing:0; text-transform:none; }
.pp-table td { height:34px; padding:4px 10px; border-top:1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.pp-table tbody tr:first-child td { border-top:0; }
.pp-table tbody tr:hover > td { background:color-mix(in srgb, var(--ink) 3%, transparent); }
.pp-name a { color:var(--ink); font-weight:600; }
.pp-email { margin-left:.35rem; color:var(--muted); font-size:13px; }
.pp-table .pp-slot { display:inline-block; width:3.5rem; vertical-align:middle; }
.pp-cls { display:inline-flex; align-items:center; gap:3px; padding:0 6px; border-radius:4px; background:color-mix(in srgb, var(--ink) 10%, transparent);
  font-size:11.5px; font-weight:700; line-height:20px; white-space:nowrap; }
.pp-cls[data-track] { background:var(--accent); color:var(--on-accent); }
.pp-none { color:var(--muted); }
.pp-issue { display:inline-block; margin-right:4px; padding:0 7px; border-radius:4px; background:var(--tag-bg); color:var(--tag-ink); font-size:12.5px; font-weight:600; line-height:22px; }
.pp-issue.unpaid { background:var(--bad-bg); color:var(--bad-ink); }
.pp-issue.badge { background:color-mix(in srgb, var(--ink) 8%, transparent); color:var(--ink); }
.pp-table td.num { text-align:right; font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:13px; font-variant-numeric:tabular-nums; }
.pp-table .att-badge { line-height:20px; padding:0 .4rem; }
.pp-table .att-badge > svg { width:12px; height:12px; }
.pp-table .att-badge-cell .att-badge + .att-badge { margin-left:4px; }
.pp-table td.pp-mail, .pp-table th.pp-mail { text-align:center; }
.pp-mk { font-weight:700; }
/* MailerLite's marks: purple when subscribed, gray otherwise. */
.pp-mk.ok { color:var(--ml-purple); }
.pp-mk.open, .pp-mk.none, .pp-mk.bad { color:var(--muted); font-weight:400; }
.pp-key { margin:.5rem 0 0; color:var(--muted); font-size:13px; }
/* Notes: the first line over the box, cut off, until it's edited (then the box grows to fit). */
.pp-table .att-note-wrap { position:relative; }
.pp-peek { position:absolute; top:0; left:20px; right:0; overflow:hidden; line-height:1.35; text-overflow:ellipsis; white-space:nowrap; pointer-events:none; }
.pp-table .att-note-edit:not(:focus) { height:1.35em; overflow:hidden; color:transparent; white-space:pre; field-sizing:fixed; }
.pp-table .att-note-wrap:has(.att-note-edit:focus) .pp-peek { display:none; }
/* People on phones: no header row (the sort bar takes its place), and each person as a few lines: the checkbox, name and
   MailerLite; their classes this month; months, classes and net; issues; badges; notes (each only when there are any).
   The actions on the people picked pin to the bottom of the screen. */
.att-unit, .att-psort { display:none; }
@media (max-width: 640px) {
  .admin-title:has(.pp-find) .admin-tools { flex-basis:100%; }
  .pp-find { flex:1; width:auto; }
  .pp-find kbd { display:none; }
  .att-pickbar.pp-bar { position:fixed; left:0; right:0; bottom:0; z-index:20; flex-wrap:wrap; gap:.35rem; padding:.6rem 16px calc(.6rem + env(safe-area-inset-bottom));
    border:0; border-radius:0; }
  .att-pickbar.pp-bar[hidden] { display:none; }
  .pp-bar .att-pick-count { flex-basis:100%; }
  .pp-bar-btn { height:32px; padding:0 .55rem; font-size:13px; }
  .pp-bar .pp-dd-menu { top:auto; bottom:calc(100% + 4px); }
  body:has(.att-pickbar:not([hidden])) main { padding-bottom:7rem; }
  .att-psort { display:flex; align-items:center; gap:.6rem; margin:0 0 .5rem; font-size:14px;
    position:sticky; top:var(--hdr-h, 52px); z-index:14; padding:.3rem 0; background:var(--bg); } /* the header row's stand-in sticks too */
  .att-psort-all { display:inline-flex; align-items:center; gap:.4rem; min-height:36px; padding:0 .35rem; font-weight:600; cursor:pointer; }
  .att-psort-all input { width:16px; height:16px; margin:0; accent-color:var(--accent); }
  .att-psort-by { display:inline-flex; align-items:center; gap:.4rem; margin-left:auto; color:var(--muted); }
  .att-psort-sel { min-height:36px; padding:0 .5rem; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink); font:inherit; }
  .att-psort-dir { display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; border:1px solid var(--line); border-radius:6px;
    background:var(--surface); color:var(--ink); }
  .att-psort-dir svg { width:16px; height:16px; }
  table.att-people.pp-table { width:100%; min-width:0; }
  .att-people tr.picked { background:color-mix(in srgb, var(--accent) 10%, var(--surface)); }
  .att-people tr.picked > td { background:none; }
  .att-people colgroup, .att-people thead { display:none; }
  .att-people, .att-people tbody { display:block; }
  .att-people tr { display:grid; grid-template-columns:2rem auto auto auto minmax(0, 1fr) auto; align-items:center; column-gap:.6rem;
    padding:.5rem .5rem .55rem .35rem; border-bottom:1px solid var(--line);
    grid-template-areas:"pick name name name name mail" ". now now now now now" ". months classes net . ." ". issues issues issues issues issues" ". badges badges badges badges badges" ". notes notes notes notes notes"; }
  .pp-table td { height:auto; padding:0; border:0; overflow:visible; white-space:normal; }
  .pp-table tbody tr:hover > td { background:none; }
  .att-people td.att-pick { grid-area:pick; }
  .att-people td.pp-name { grid-area:name; font-size:15px; min-width:0; }
  .pp-table .pp-email { display:block; margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .att-people td.pp-mail { grid-area:mail; }
  .att-people td.pp-now { grid-area:now; margin-top:.3rem; }
  .pp-table .pp-slot { width:auto; margin-right:4px; }
  .pp-table .pp-slot:empty, .pp-table td.pp-now:has(> .pp-none) { display:none; }
  .att-people td.att-months { grid-area:months; }
  .att-people td.att-classes { grid-area:classes; }
  .att-people td.pp-net { grid-area:net; }
  .pp-table td.num { margin-top:.25rem; text-align:left; font-family:inherit; color:var(--muted); }
  .att-people td.att-classes::before, .att-people td.pp-net::before { content:"· "; }
  .att-people .att-unit { display:inline; }
  .att-people td.pp-issues { grid-area:issues; margin-top:.3rem; }
  .att-people td.pp-issues:empty { display:none; }
  .att-people td.att-badge-cell { grid-area:badges; margin-top:.3rem; line-height:1.7; }
  .att-people td.att-badge-cell:empty { display:none; }
  .att-people td.att-notes { grid-area:notes; min-width:0; margin:.25rem 0 0 -20px; font-size:13px; } /* the save icon sits under the checkbox */
  .att-people td.att-notes:has(.att-note-edit:placeholder-shown:not(:focus)):not(:has(.att-find-hit:not([hidden]))) { display:none; }
}
/* Tonight's check-in: big rows to tap at the door. A person checked in moves from their level sections to Here. */
.tn-head { display:flex; align-items:center; flex-wrap:wrap; gap:.4rem .7rem; position:sticky; top:var(--hdr-h, 52px); z-index:15;
  margin:-12px -16px .6rem; padding:8px 16px; background:var(--bg); border-bottom:1px solid transparent; transition:border-color .15s; }
.tn-head.stuck { border-bottom-color:var(--line); }
.tn-head h2 { margin:0; font-size:1.5rem; line-height:1.2; }
.tn-date-short { display:none; }
/* Wider screens: .tn-top's date line and tools take their places among the rest: date line, warning, tools. */
@media (min-width: 641px) {
  .tn { display:flex; flex-direction:column; }
  .tn-top { display:contents; }
  .tn > *, .tn-top > * { order:4; }
  .tn-top > .tn-head { order:0; }
  .tn > .tn-closed { order:1; }
  .tn-top > .tn-tools { order:3; }
}
.tn-fold, .tn-bar { display:none; }
/* Phones: one sticky block. The date line (short date, smaller; the week; the lock at the right, its switch alone), then,
   folding under the chevron, the tools (no view switch: always by class). Its bottom border is the Here count, filling as people
   arrive, with the chevron on it. The warning comes after. */
@media (max-width: 640px) {
  .tn-top { position:sticky; top:var(--hdr-h, 52px); z-index:15; margin:-12px -16px 1.1rem; padding:6px 16px 16px; background:var(--bg); }
  .tn-top > .tn-head { position:static; margin:0; padding:0; border:0; }
  .tn .tn-head { gap:.35rem .3rem; }
  .tn .tn-head h2 { font-size:1.25rem; }
  .tn-head .tn-date-long, .tn-head .tn-today { display:none; }
  .tn-head .tn-date-short { display:inline; }
  .tn .tn-head .tn-lock, .tn .tn-head .tn-views + .tn-lock { order:1; margin-left:auto; min-height:36px; }
  .tn .tn-head .tn-views { display:none; }
  .tn .tn-head > .tn-nav:first-child { margin-left:-6px; }
  .tn-head .tn-view { padding:0 .65rem; }
  .tn-top > .tn-tools { margin:.5rem 0 .75rem; flex-wrap:nowrap; }
  .tn-top .tn-search { flex:1 1 0; min-width:0; }
  .tn.folded .tn-top > .tn-tools { display:none; }
  .tn-bar { display:block; position:absolute; left:0; right:0; bottom:0; height:7px; background:var(--line); }
  .tn-bar::before { content:''; display:block; height:100%; width:var(--fill, 0%); background:var(--muted); transition:width 1.2s cubic-bezier(.3,.7,.3,1); }
  .tn-fold { display:flex; align-items:center; justify-content:center; position:absolute; z-index:1; left:50%; bottom:-19px; width:72px; height:40px;
    margin-left:-36px; padding:0; border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--muted); cursor:pointer; }
  .tn-fold svg { width:32px; height:32px; transition:transform .2s; }
  .tn.folded .tn-fold svg { transform:rotate(180deg); }
  .tn-fold:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
}
@media (max-width: 640px) and (prefers-reduced-motion: reduce) { .tn-bar::before, .tn-fold svg { transition:none; } }
.tn-closed { margin:0 0 .8rem; padding:.5rem .75rem; border-radius:8px; background:var(--tag-bg); color:var(--tag-ink); font-size:14px; }
.tn-tools { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem .75rem; margin:0 0 .9rem; }
.tn-search { flex:1 1 14rem; max-width:22rem; height:40px; padding:0 .75rem; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:inherit; font:inherit; font-size:16px; }
.tn-search:focus { outline:2px solid var(--accent); outline-offset:1px; }
.att-people tr[hidden] { display:none; } /* Find's misses, also over the phone layout's grid rows */
.tn-views { display:inline-flex; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
/* In the head, left of the lock: both pushed right. */
.tn-head .tn-views { margin-left:auto; }
.tn-head .tn-views + .tn-lock { margin-left:0; }
.tn-view { height:34px; padding:0 .8rem; border:0; background:var(--surface); color:inherit; font:inherit; font-size:14px; cursor:pointer; }
.tn-view + .tn-view { border-left:1px solid var(--line); }
.tn-view:hover { background:color-mix(in srgb, var(--ink) 6%, var(--surface)); }
.tn-view[aria-pressed="true"] { background:var(--ink); color:var(--on-accent); font-weight:600; }
.tn[data-view="person"] .tn-classes, .tn[data-view="person"] .tn-here, .tn[data-view="class"] .tn-all { display:none; }
/* By class: a block's classes split the width evenly (stacked on phones), each on a faint wash of its color. */
.tn-blk { margin:0 0 1.1rem; }
.tn-blk[hidden] { display:none; }
.tn-blk-h { margin:0 0 .4rem; color:var(--muted); font-size:13px; font-weight:600; }
.tn-cols { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0, 1fr); gap:10px; align-items:start; }
@media (max-width:640px) { .tn-cols { grid-auto-flow:row; } }
.tn-sec { --bar:var(--muted); position:relative; min-width:0; padding:calc(.5rem + 6px) .6rem .6rem; border:1px solid var(--line); border-top:0; border-radius:6px;
  background:color-mix(in srgb, var(--ink) 3%, var(--bg)); }
/* Its top edge: a thick bar, faint, filling in the class's color with the share of it checked in (--f, 0–1). */
@property --f { syntax:'<number>'; inherits:true; initial-value:0; }
.tn-sec { transition:--f 1.2s cubic-bezier(.3,.7,.3,1); }
.tn-sec::before { content:''; position:absolute; top:0; left:-1px; right:-1px; height:6px; border-radius:6px 6px 0 0; pointer-events:none;
  background:linear-gradient(color-mix(in srgb, var(--bar) 80%, var(--bg)) 0 0) no-repeat 0 0 / calc(var(--f) * 100%) 100%, color-mix(in srgb, var(--bar) 22%, var(--bg)); }
@media (prefers-reduced-motion: reduce) { .tn-sec { transition:none; } }
.tn-sec[hidden] { display:none; }
.tn-sec[data-track] { --bar:var(--accent); background:color-mix(in srgb, var(--accent) 12%, var(--bg)); border-color:color-mix(in srgb, var(--accent) 55%, var(--line)); }
.tn-sec h3 { display:flex; align-items:center; gap:.5rem; margin:0 0 .45rem; font-size:15px; }
.tn-done { margin:0; color:var(--muted); font-size:13px; }
.tn ul { display:grid; grid-template-columns:repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap:6px; margin:0; padding:0; list-style:none; }
.tn-all { margin-bottom:1.1rem !important; }
.tn-sec .tn-p.here, .tn-p.nomatch, .tn-here .tn-row:not(.here), .tn-row.nomatch { display:none; }
/* A card under its class is in the class's color. */
.tn-sec[data-track] .tn-p { background:var(--chip); color:var(--on-accent); border-color:transparent; }
.tn-sec[data-track] .tn-box, .tn-sec[data-track] .tn-note-btn { color:inherit; }
.tn:not(.locked) .tn-sec[data-track] .tn-p:hover .tn-check:not([aria-disabled]) { background:color-mix(in srgb, var(--on-accent) 10%, transparent); }
.tn-p { border:1px solid var(--line); border-radius:8px; background:var(--surface); cursor:pointer; }
.tn.locked .tn-p, .tn-p:has(.tn-check[aria-disabled]) { cursor:default; }
.tn-line { display:flex; align-items:center; gap:6px; padding-right:8px; }
.tn-check { display:flex; flex:1; min-width:0; align-items:center; gap:.6rem; min-height:52px; padding:.4rem .75rem; border:0; border-radius:8px;
  background:none; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.tn:not(.locked) .tn-p:hover .tn-check:not([aria-disabled]) { background:color-mix(in srgb, var(--ink) 6%, transparent); }
.tn-check:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
.tn-check[aria-disabled] { cursor:default; }
.tn-check[aria-disabled] .tn-box, .tn.locked .tn-box { opacity:.4; }
.tn.locked .tn-check { cursor:default; }
.tn.locked .tn-check:hover { background:none; }
.tn-nav { flex:none; }
.tn-nav svg { width:20px; height:20px; }
span.tn-nav { opacity:.3; }
.tn-today { font-size:13px; color:var(--muted); }
/* The lock, at the far right of the date line: a big switch (green while editing) with the padlock and Locked / Editing
   inside its track, on the side away from the knob. Phones: just the padlock. --lock-h is the track's height: 30px in
   Check-in's date line, the height of the Add button beside it in a title row (.admin-tools). */
.subtabs .tn-lock { margin-left:0; min-height:36px; }
.tn-lock { display:inline-flex; align-items:center; min-height:44px; margin-left:auto; padding:0; border:0; border-radius:999px;
  background:none; font:inherit; cursor:pointer; }
.tn-lock { --lock-h:30px; }
.tn-lock .switch { display:inline-flex; align-items:center; gap:.3rem; width:auto; height:var(--lock-h); padding:0 .75rem 0 calc(var(--lock-h) + 4px);
  color:var(--ink); font-size:13px; font-weight:600; transition:background .2s, padding .2s; }
.tn-lock .switch::after { top:3px; left:3px; width:calc(var(--lock-h) - 6px); height:calc(var(--lock-h) - 6px); transition:left .2s; }
.tn-lock svg { width:16px; height:16px; flex-shrink:0; }
.tn-lock-label { min-width:3.6em; }
.tn-lock .ic-unlock, .tn-lock[aria-checked="true"] .ic-lock { display:none; }
.tn-lock[aria-checked="true"] .ic-unlock { display:block; }
.tn-lock[aria-checked="true"] > .switch { padding:0 calc(var(--lock-h) + 4px) 0 .75rem; background:var(--good-2); color:#fff; }
.tn-lock[aria-checked="true"] > .switch::after { left:calc(100% - var(--lock-h) + 3px); transform:none; }
@media (max-width: 640px) {
  .tn-lock-label { display:none; }
  .tn-lock .switch { padding:0 .55rem 0 calc(var(--lock-h) + 2px); }
  .tn-lock[aria-checked="true"] > .switch { padding:0 calc(var(--lock-h) + 2px) 0 .55rem; }
}
.tn:not(.locked) .tn-hint { display:none; }
.tn-lock:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.tn-text { display:flex; flex-wrap:wrap; align-items:center; gap:2px .5rem; min-width:0; }
.tn-name { min-width:0; font-size:16px; font-weight:600; overflow-wrap:break-word; }
.tn-check .att-lvl { flex:none; max-width:9rem; font-size:12px; }
.tn-box { position:relative; flex:none; display:inline-flex; width:26px; height:26px; color:var(--muted); }
.tn-box svg { width:26px; height:26px; }
.tn-box .tick { opacity:0; }
.tn-p.here .tn-box { color:var(--good); }
.tn-p.here .tn-box circle { fill:currentColor; }
.tn-p.here .tn-box .tick { opacity:1; stroke:var(--ok-ink); stroke-width:3; }
.tn-p.here { background:color-mix(in srgb, var(--good) 10%, var(--surface)); border-color:color-mix(in srgb, var(--good) 35%, var(--line)); }
.tn-spin { display:none; position:absolute; inset:-3px; border:2px solid transparent; border-top-color:var(--ink); border-radius:50%; animation:att-spin .8s linear infinite; }
.tn-p.busy .tn-spin, .tn-p.settling .tn-spin { display:block; }
/* Saving: the card breathes until the sheet confirms. Confirmed: the circle pops green, then the card flies (app.js). */
.tn-p.busy { animation:tn-breathe 1.1s ease-in-out infinite; }
@keyframes tn-breathe { 50% { border-color:var(--hover); box-shadow:0 0 0 4px color-mix(in srgb, var(--ink) 7%, transparent); } }
.tn-p.confirmed { background:color-mix(in srgb, var(--good) 22%, var(--surface)); border-color:var(--good); transition:background .2s, border-color .2s; }
.tn-p.confirmed .tn-box { color:var(--good); animation:tn-pop .42s cubic-bezier(.3,1.8,.5,1); }
.tn-p.confirmed .tn-box circle { fill:currentColor; }
.tn-p.confirmed .tn-box .tick { opacity:1; stroke:var(--ok-ink); stroke-width:3; stroke-dasharray:14; stroke-dashoffset:14; animation:tn-tick .3s ease-out .08s forwards; }
@keyframes tn-pop { 0% { transform:scale(.6); } 60% { transform:scale(1.4); } 100% { transform:scale(1); } }
@keyframes tn-tick { to { stroke-dashoffset:0; } }
.tn-p.moving .tn-check { cursor:default; }
.tn-ghost { position:fixed; z-index:30; margin:0; pointer-events:none; transform-origin:30% 50%; }
.tn-spark { position:fixed; z-index:31; width:9px; height:9px; border-radius:50%; background:var(--good-2); pointer-events:none; }
.tn-spark.alt { width:7px; height:7px; border-radius:2px; background:var(--good); }
.tn-ring { position:fixed; z-index:31; width:30px; height:30px; border:3px solid var(--good-2); border-radius:50%; pointer-events:none; }
.tn-p.settling, .tn-p.settling .tn-check { cursor:not-allowed; }
/* Being canceled: a bare ✕ in place of the circle until the server has put it back. */
.tn-box .tn-x, .tn-p.settling .tn-box svg:not(.tn-x) { display:none; }
.tn-p.settling .tn-box .tn-x { display:block; color:var(--muted); }
.tn-p.settling .tn-box .tn-x circle { display:none; } /* just the ✕ */
.tn-sec[data-track] .tn-p.settling .tn-box .tn-x { color:inherit; }
/* Not settled this month: a warning triangle on its own chip, so it reads on any class color. */
.tn-owes { flex:none; display:inline-flex; padding:5px; border-radius:8px; background:var(--bad-bg); color:var(--bad-ink); }
.tn-owes svg { width:20px; height:20px; }
.tn-nouid { flex:none; display:inline-flex; padding:5px; border-radius:8px; background:var(--tag-bg); color:var(--tag-ink); }
.tn-nouid svg { width:20px; height:20px; }
/* A badge's tooltip (data-tip): on hover, or a tap (app.js adds .show). */
.tn-tip { position:relative; cursor:help; }
.tn-tip::after { content:attr(data-tip); position:absolute; right:0; bottom:calc(100% + 6px); z-index:5; padding:.3rem .55rem; border-radius:6px;
                 background:var(--ink); color:var(--surface); font-size:12px; font-weight:600; white-space:nowrap; box-shadow:0 2px 8px rgb(0 0 0 / .2);
                 opacity:0; transform:translateY(2px); transition:opacity .12s, transform .12s; pointer-events:none; }
.tn-tip:hover::after, .tn-tip.show::after { opacity:1; transform:none; }
.tn-note-btn { flex:none; display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; padding:0; border:1px solid transparent; border-radius:8px;
  background:none; color:var(--muted); cursor:pointer; }
.tn-note-btn:hover, .tn-note-btn[aria-expanded="true"] { color:var(--ink); background:color-mix(in srgb, var(--ink) 8%, transparent); }
.tn-note { padding:0 .75rem .6rem calc(.75rem + 26px + .6rem); font-size:14px; white-space:pre-line; }
.tn-note p { margin:0; }
.tn-note p + p { margin-top:.25rem; }
.tn-here { margin:1.4rem 0 0; }
.tn-here > summary { margin:0 0 .5rem; font-weight:700; font-size:15px; cursor:pointer; }
.tn-here:has(.tn-row.here) .tn-none, .tn-here:not(:has(.tn-row.here:not(.nomatch))) .grid-wrap { display:none; }
/* Rows edited in place (Tonight's Here, the Month view): level pills and dropdowns that open on tap, week marks and Paid as toggles. */
.att-edit { appearance:none; -webkit-appearance:none; max-width:100%; height:24px; padding:0 20px 0 .5rem; border:1px solid var(--line); border-radius:6px;
  background:var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 5px center / 11px;
  color:var(--ink); font:inherit; font-size:12px; text-overflow:ellipsis; cursor:pointer; }
.att-edit.att-lvl { border-color:transparent; border-radius:999px; background-color:color-mix(in srgb, var(--ink) 8%, transparent); font-weight:600; }
.att-edit.att-lvl[data-track] { background-color:var(--chip); color:var(--on-accent); }
.att-lvl-edit { position:relative; display:inline-block; max-width:100%; vertical-align:middle; color:var(--ink); }
.att-lvl-edit[data-track] { color:var(--on-accent); }
.att-lvl-edit::after { content:""; position:absolute; top:50%; right:7px; width:10px; height:10px; margin-top:-5px; background:currentColor; opacity:.75; pointer-events:none;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain; }
.att-lvl-edit:has(select:disabled)::after { display:none; }
.att-edit.att-lvl { background-image:none; }
.att-edit:hover:not(:disabled) { border-color:var(--hover); }
.att-edit:focus-visible, .att-wk-btn:focus-visible, .att-paid-btn:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.att-edit option { background:var(--surface); color:var(--ink); }
.att-wk-btn { display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; margin:-4px 0; padding:0; vertical-align:middle;
  border:0; border-radius:50%; background:none; color:inherit; cursor:pointer; }
.att-wk-btn:hover:not(:disabled) { background:color-mix(in srgb, var(--ink) 10%, transparent); }
.att-wk-off { width:16px; height:16px; border:1.5px dashed color-mix(in srgb, var(--muted) 70%, transparent); border-radius:50%; }
.att-paid-btn { display:inline-flex; align-items:center; gap:4px; height:22px; padding:0 .6rem 0 .3rem; border:1px solid transparent; border-radius:999px; font:inherit; font-size:12px; font-weight:700; cursor:pointer; }
.att-paid-btn.ok { background:var(--ok-bg); color:var(--ok-ink); }
.att-paid-btn.bad { background:var(--bad-bg); color:var(--bad-ink); }
.att-paid-btn:hover:not(:disabled) { border-color:currentColor; }
/* Unlocked, Paid shows what a tap undoes: a ticked circle or a crossed one, on its left. Locked: just the word. */
.att-paid-btn svg { width:15px; height:15px; flex:none; }
.att-paid-btn.ok svg circle { fill:currentColor; }
.att-paid-btn.ok svg .tick { stroke:var(--ok-bg); stroke-width:3; }
.att-paid-btn:disabled { padding-left:.6rem; }
.att-paid-btn:disabled svg { display:none; }
.att-row-note { display:block; width:100%; min-width:8rem; margin:0; padding:2px 4px; border:1px solid transparent; border-radius:4px; background:transparent;
  color:inherit; font:inherit; line-height:1.35; resize:none; overflow:hidden; field-sizing:content; outline:none; }
.att-row-note:hover:not(:disabled) { border-color:var(--line); }
.att-row-note:focus { border-color:var(--accent); background:var(--surface); }
.att-row-note::placeholder { color:transparent; }
.att-row-note:hover::placeholder, .att-row-note:focus::placeholder { color:var(--muted); }
/* Locked: the same values, just not editable. Saving: a little spinner beside the control (around a week's mark) until the sheet has it. */
.att-grid [data-field]:disabled { opacity:1; cursor:default; }
.att-edit:disabled { color:var(--ink); }
/* Locked, blanks look blank: no empty week circle, no "—" level. */
[data-field]:disabled .att-wk-off, .att-edit:disabled:has(option[value=""]:checked) { visibility:hidden; }
.att-edit.att-lvl[data-track]:disabled { color:var(--on-accent); }
.att-grid select[data-field]:disabled { background-image:none; padding-right:.5rem; }
.att-grid [aria-busy] { cursor:progress; }
.att-spin { display:inline-block; width:12px; height:12px; margin-left:4px; vertical-align:middle; border:2px solid color-mix(in srgb, var(--ink) 15%, transparent);
  border-top-color:var(--ink); border-radius:50%; animation:att-spin .8s linear infinite; pointer-events:none; }
.att-wk .att-spin { position:absolute; top:50%; left:50%; width:26px; height:26px; margin:-13px 0 0 -13px; border-color:transparent; border-top-color:var(--ink); }
.att-row-notes > div:has(> .att-row-note) { position:relative; }
.att-row-note + .att-spin { position:absolute; top:4px; right:4px; margin:0; }
@media (prefers-reduced-motion: reduce) { .att-spin { animation-duration:2.4s; } }
/* Toasts: failure red, success green (the Baystyle green, a shade deeper for white text), anything else (Locked, Pick a date) black. */
.tn-toast { position:fixed; left:50%; bottom:1rem; z-index:20; max-width:calc(100% - 32px); padding:.6rem 1rem; transform:translateX(-50%); border-radius:8px;
  background:var(--failure); color:#fff; font-weight:600; box-shadow:0 4px 16px rgb(0 0 0 / .2); }
.tn-toast.ok { background:var(--success); color:#fff; }
.tn-toast.warn { background:#1f2328; color:#fff; box-shadow:0 0 0 1px rgb(255 255 255 / .18), 0 4px 16px rgb(0 0 0 / .2); }
@media (prefers-reduced-motion: reduce) { .tn-spin { animation-duration:2.4s; } .tn-p.busy, .tn-p.confirmed .tn-box, .tn-p.confirmed .tn-box .tick { animation:none; stroke-dashoffset:0; } }

/* Add person (Tonight): a dialog with big controls; full screen on phones. */
.tn-add { display:inline-flex; align-items:center; gap:.4rem; height:40px; padding:0 1rem 0 .8rem; border:0; border-radius:8px; background:var(--accent); color:var(--on-accent);
          font:inherit; font-size:15px; font-weight:600; cursor:pointer; }
.tn-add:hover { background:color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.tn-add:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.tn.locked .tn-add, body:has(.att-month.locked) .att-add { opacity:.55; }
dialog.add-dlg { width:min(560px, calc(100vw - 32px)); max-height:calc(100dvh - 32px); padding:0; border:1px solid var(--line); border-radius:12px;
                 background:var(--bg); color:var(--ink); box-shadow:0 18px 50px rgb(0 0 0 / .3); }
dialog.add-dlg::backdrop { background:rgb(0 0 0 / .5); }
.add-form { display:flex; flex-direction:column; max-height:inherit; }
.add-head { display:flex; align-items:center; gap:.5rem; padding:.6rem .6rem .6rem 16px; border-bottom:1px solid var(--line); }
.add-head h2 { margin:0 auto 0 0; font-size:1.15rem; }
.add-body { display:grid; gap:14px; padding:14px 16px 16px; overflow:auto; overscroll-behavior:contain; }
.add-row[hidden] { display:none; }
.add-lbl { display:block; margin:0 0 5px; color:var(--muted); font-size:13px; font-weight:600; }
.add-opt { font-weight:400; }
.add-in { width:100%; height:44px; padding:0 .75rem; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:inherit; font:inherit; font-size:16px; }
textarea.add-in { height:auto; padding:.55rem .75rem; resize:vertical; }
.edit-hint { margin:5px 0 0; color:var(--muted); font-size:13px; }
.add-in:focus { outline:2px solid var(--accent); outline-offset:1px; }
.add-in[hidden] { display:none; }
.add-seg { display:flex; flex-wrap:wrap; gap:6px; }
.add-opt-btn { min-height:44px; padding:0 1rem; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:inherit; font:inherit; font-size:15px; cursor:pointer; }
.add-opt-btn:hover { border-color:var(--hover); }
.add-opt-btn[aria-pressed="true"] { background:var(--ink); border-color:var(--ink); color:var(--on-accent); font-weight:600; }
.add-opt-btn:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.add-pair { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.add-pair .select, .add-pair .select select { display:block; width:100%; }
.add-pair .select select { height:44px; font-size:16px; }
.add-money { position:relative; display:block; }
.add-money > span { position:absolute; left:.75rem; top:50%; transform:translateY(-50%); color:var(--muted); pointer-events:none; }
.add-money .add-in { padding-left:1.6rem; }
.add-who { position:relative; }
.add-sugg { margin:4px 0 0; padding:4px; list-style:none; border:1px solid var(--line); border-radius:8px; background:var(--surface); }
.add-sugg[hidden] { display:none; }
.add-sugg li { display:flex; flex-wrap:wrap; align-items:baseline; gap:0 .6rem; min-height:44px; padding:.45rem .65rem; border-radius:6px; cursor:pointer; }
.add-sugg li[aria-selected="true"] { background:var(--soft); }
.add-s-name { font-weight:600; }
.add-s-sub { color:var(--muted); font-size:13px; }
.add-s-new .add-s-name { font-weight:500; color:var(--accent-fg, var(--accent)); }
.add-picked { display:flex; align-items:center; gap:.6rem; min-height:44px; padding:.3rem .4rem .3rem .75rem; border:1px solid color-mix(in srgb, var(--good) 45%, var(--line));
              border-radius:8px; background:color-mix(in srgb, var(--good) 12%, var(--surface)); }
.add-picked[hidden] { display:none; }
.add-picked-name { font-size:16px; font-weight:600; }
.add-picked-sub { color:var(--muted); font-size:13px; }
.add-change, .add-cancel { min-height:40px; padding:0 .9rem; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:inherit; font:inherit; font-size:14px; cursor:pointer; }
.add-change { margin-left:auto; }
.add-here { display:flex; align-items:center; gap:.6rem; font-size:16px; cursor:pointer; }
.add-here input { width:22px; height:22px; margin:0; accent-color:var(--good-2); }
.add-foot { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:8px; padding:10px 16px; border-top:1px solid var(--line); }
.add-err { flex:1 1 100%; margin:0; color:var(--bad-ink); font-size:14px; font-weight:600; }
.add-err[hidden] { display:none; }
.add-go { display:inline-flex; align-items:center; gap:.5rem; min-height:44px; padding:0 1.5rem; border:0; font:inherit; font-weight:600; cursor:pointer; }
.add-spin { display:none; width:14px; height:14px; border:2px solid color-mix(in srgb, var(--on-accent) 35%, transparent); border-top-color:var(--on-accent); border-radius:50%; animation:att-spin .8s linear infinite; }
.add-form.busy .add-spin { display:inline-block; }
.add-form.busy .add-go { opacity:.8; cursor:progress; }
.link-intro { margin:0; font-size:15px; }
.link-list { margin:0; padding:4px; list-style:none; border:1px solid var(--line); border-radius:8px; background:var(--surface); }
.link-list li { display:flex; flex-wrap:wrap; align-items:baseline; gap:0 .6rem; min-height:44px; padding:.45rem .65rem; border-radius:6px; cursor:pointer; }
.link-list li:hover { background:var(--soft); }
.link-list li[aria-selected="true"] { background:var(--ink); color:var(--on-accent); }
.link-list li[aria-selected="true"] .add-s-sub, .link-list li[aria-selected="true"] .add-s-name { color:inherit; }
/* Link: on a row typed into the sheet with no UID (Month view, Tonight's Here table). */
.att-link-btn { margin-left:.5rem; padding:1px .55rem; border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--accent-fg, var(--accent));
                font:inherit; font-size:12px; font-weight:600; cursor:pointer; vertical-align:1px; }
.att-link-btn:hover { border-color:var(--hover); }
.locked .att-link-btn { opacity:.6; }
/* People: the Unlinked box's Review button and its list. */
.att-stat.warn { border-color:color-mix(in srgb, var(--tag-ink) 35%, var(--line)); }
.att-stat-btn { margin-top:2px; padding:0; border:0; background:none; color:var(--accent-fg, var(--accent)); font:inherit; font-size:13px; font-weight:600; text-decoration:underline; text-underline-offset:2px; cursor:pointer; }
.unl-list { margin:0; padding:0; list-style:none; }
.unl-list li { display:flex; align-items:center; gap:.75rem; min-height:48px; padding:.4rem 0; border-bottom:1px solid var(--line); }
.unl-list li:last-child { border-bottom:0; }
.unl-who { display:flex; flex-direction:column; flex:1; min-width:0; }
.unl-list .att-link-btn { display:inline-flex; align-items:center; gap:.4rem; min-height:32px; padding:0 .8rem; font-size:13px; }
/* Person view: Merge… by the name. */
.att-person-head { display:flex; align-items:center; flex-wrap:wrap; gap:.4rem 1rem; }
.att-person-head h2.att-person { margin-bottom:0; }
.link-none { cursor:default !important; }
/* Duplicates: a card per group, its people side by side. */
.dup { display:grid; grid-template-columns:minmax(0, 1fr); gap:14px; max-width:960px; }
.dup-info { min-width:0; }
.dup-intro { margin:0; color:var(--muted); }
.dup-card { padding:.7rem 16px 0; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.dup-card h2 { margin:0 0 .6rem; font-size:1.05rem; overflow-wrap:anywhere; }
.dup-people { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap:10px; }
.dup-p { padding:.6rem .75rem; border:1px solid var(--line); border-radius:8px; min-width:0; }
.dup-p:has(.dup-keep input:checked) { border-color:var(--ink); box-shadow:inset 0 0 0 1px var(--ink); }
.dup-p.out { opacity:.55; }
.dup-picks { display:flex; flex-wrap:wrap; justify-content:space-between; gap:.25rem .75rem; margin:0 0 .35rem; }
.dup-picks label { display:inline-flex; align-items:center; gap:.4rem; min-height:32px; font-size:14px; cursor:pointer; }
.dup-picks input { width:18px; height:18px; margin:0; accent-color:var(--ink); }
.dup-who { overflow-wrap:anywhere; }
.dup-name { font-weight:700; font-size:16px; }
.dup-who .att-uid { color:var(--muted); font-size:13px; }
.dup-info { color:var(--muted); font-size:13px; overflow-wrap:anywhere; }
.dup-notes { margin:.35rem 0 0; font-size:14px; white-space:pre-line; }
.dup-p.pick { cursor:pointer; }
.dup-p.pick:not(:has(.dup-keep input:checked)):hover { border-color:var(--muted); }
.dup-fields { display:grid; gap:10px; margin:.9rem 0 0; padding:.7rem 0 0; border-top:1px solid var(--line); }
.dup-fields h3 { margin:0; font-size:1rem; }
.dup-hint { margin:-.4rem 0 0; color:var(--muted); font-size:13px; }
.dup-row { display:grid; grid-template-columns:6.5rem minmax(0, 1fr); align-items:start; gap:4px 10px; }
.dup-row .add-lbl { margin:0; padding-top:.7rem; }
.dup-val { display:grid; gap:6px; min-width:0; }
.dup-val .edit-hint { margin:0; }
.dup-opts { display:flex; flex-wrap:wrap; gap:6px; }
.dup-opt { max-width:100%; padding:.25rem .6rem; border:1px solid var(--line); border-radius:999px; background:var(--surface); color:inherit; font:inherit; font-size:13px; overflow-wrap:anywhere; text-align:left; cursor:pointer; }
.dup-opt:hover { border-color:var(--ink); }
.dup-opt[hidden] { display:none; }
@media (max-width: 560px) { .dup-row { grid-template-columns:minmax(0, 1fr); } .dup-row .add-lbl { padding-top:0; } }
.dup-warn { display:flex; align-items:flex-start; gap:.5rem; margin:.8rem 0 0; padding:.5rem .7rem; border-radius:8px; background:var(--tag-bg); color:var(--tag-ink); font-size:14px; }
.dup-warn svg { flex:none; margin-top:2px; }
.dup-what { margin:.8rem 0 0; color:var(--muted); font-size:13px; }
.dup-foot { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:8px; margin:.6rem -16px 0; padding:10px 16px; border-top:1px solid var(--line); }
.dup-foot .add-cancel { display:inline-flex; align-items:center; gap:.5rem; }
.dup-merge { display:inline-flex; align-items:center; gap:.5rem; min-height:40px; border:0; font:inherit; font-weight:600; cursor:pointer; }
.dup-merge.confirm { background:var(--danger); color:#fff; }
.dup .busy { cursor:progress; }
.dup .busy > .add-spin { display:inline-block; }
.dup .add-cancel.busy > .add-spin { border-color:color-mix(in srgb, currentColor 30%, transparent); border-top-color:currentColor; }
.sqs-check { font-size:13px; color:var(--tag-ink); white-space:normal; }
.sqs-head { margin:1rem 0 .25rem; font-size:14px; }
.sqs-dlg .add-foot { flex-wrap:wrap; }
.sqs-last { margin-right:auto; font-size:13px; color:var(--muted); }
.sqs-dlg .sqs-now { display:inline-flex; align-items:center; gap:.4rem; }
.unl-dlg .busy > .add-spin { display:inline-block; border-color:color-mix(in srgb, currentColor 30%, transparent); border-top-color:currentColor; }
@media (max-width: 640px) {
  dialog.add-dlg { width:100vw; max-width:none; height:100dvh; max-height:none; margin:0; border:0; border-radius:0; }
  .add-form { height:100%; }
  .add-body { flex:1; }
}
.add-blocks { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.add-block[hidden] { display:none; }
.add-sub { display:block; margin:0 0 4px; color:var(--muted); font-size:12px; }
.add-col { flex-direction:column; align-items:stretch; }
.add-col .add-opt-btn { text-align:left; }
/* Classes: a wash of their color, the color itself once picked. Paid: green, orange, purple the same way. */
.add-opt-btn[data-track] { background:color-mix(in srgb, var(--accent) 16%, var(--surface)); border-color:color-mix(in srgb, var(--accent) 45%, var(--line)); }
.add-opt-btn[data-tone="yes"] { --tone:var(--good-2); }
.add-opt-btn[data-tone="no"] { --tone:var(--danger); }
.add-opt-btn[data-tone="redeemed"] { --tone:#8957e5; }
.add-opt-btn[data-tone] { background:color-mix(in srgb, var(--tone) 14%, var(--surface)); border-color:color-mix(in srgb, var(--tone) 45%, var(--line)); }
.add-opt-btn[data-track][aria-pressed="true"] { background:var(--chip); border-color:var(--chip); color:var(--on-accent); }
.add-opt-btn[data-tone][aria-pressed="true"] { background:var(--tone); border-color:var(--tone); color:#fff; }

/* Schedule editor: a row per series. Locked, the controls show their state but don't take taps. */
.sch { border-top:1px solid var(--hair); }
.sch-new:disabled { opacity:.55; cursor:default; }
.sch-new.busy { pointer-events:none; }
.sch-new.busy svg { display:none; }
.sch-new.busy .add-spin { display:inline-block; }
/* A series: a flat row, hairlines between; its nights beside its blocks when there's room. */
.sch-series { padding:.7rem 0 .9rem; border-bottom:1px solid var(--hair); }
.sch-head { display:flex; align-items:center; flex-wrap:wrap; gap:.4rem .9rem; min-height:36px; margin-bottom:.3rem; }
.sch-title { display:flex; flex-direction:column; min-width:0; }
.sch-name-line { display:flex; align-items:center; gap:.4rem; }
.sch-name { min-width:6rem; width:13rem; field-sizing:content; max-width:100%; padding:.2rem .4rem; margin-left:-.4rem; border:1px solid transparent; border-radius:6px; background:none;
  color:var(--ink); font:inherit; font-size:1.05rem; font-weight:700; }
.sch:not(.locked) .sch-name:hover, .sch-name:focus { border-color:var(--line); background:var(--bg); }
.sch-name:disabled { opacity:1; }
.sch-range { color:var(--muted); font-size:13px; white-space:nowrap; }
/* The months a series' nights are in, as tiny calendars: a pip a day, its classes a checked square, skipped nights an empty one. */
.sch-cals { display:flex; flex-wrap:wrap; gap:.7rem; }
.sch-cal { display:flex; flex-direction:column; gap:3px; }
.sch-cal-m { color:var(--muted); font-size:11px; font-weight:600; line-height:1; }
.sch-cal-g { display:grid; grid-template-columns:repeat(7, 7px); grid-auto-rows:7px; gap:2px; padding:3px; border:1px solid var(--line); border-top:3px solid var(--muted); border-radius:3px; }
.sch-cal-g i, .sch-cal-g b { position:relative; display:flex; align-items:center; justify-content:center; }
.sch-cal-g i::before { content:""; width:4px; height:4px; border-radius:50%; background:color-mix(in srgb, var(--muted) 50%, transparent); }
/* A class: a little square with a check cut out of it (so the check shows the background, in either theme). */
.sch-cal-g i.on::before { width:7px; height:7px; border-radius:0; background:var(--ink);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cmask id='m'%3E%3Crect width='14' height='14' fill='white'/%3E%3Cpath d='M3.3 7.3l2.4 2.4 5-5.2' stroke='black' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/mask%3E%3Crect width='14' height='14' rx='3' mask='url(%23m)'/%3E%3C/svg%3E") center/7px 7px no-repeat; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cmask id='m'%3E%3Crect width='14' height='14' fill='white'/%3E%3Cpath d='M3.3 7.3l2.4 2.4 5-5.2' stroke='black' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/mask%3E%3Crect width='14' height='14' rx='3' mask='url(%23m)'/%3E%3C/svg%3E") center/7px 7px no-repeat; }
.sch-cal-g i.skip::before { width:7px; height:7px; box-sizing:border-box; border-radius:0; background:none; border:1px solid var(--muted); }
.sch-now { background:var(--ink); color:var(--bg); }
.sch-saving { display:none; width:12px; height:12px; border:2px solid color-mix(in srgb, var(--ink) 15%, transparent); border-top-color:var(--ink);
  border-radius:50%; animation:att-spin .8s linear infinite; }
.sch-series.saving .sch-saving { display:inline-block; }
/* Remove at the end of the line, the spinner (while saving) just before it. */
.sch-remove { margin-left:auto; }
.sch-series.saving .sch-saving { margin-left:auto; }
.sch-series.saving .sch-remove { margin-left:0; }
.sch-remove.busy { opacity:.5; pointer-events:none; }
.sch-body { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); gap:.4rem 1.6rem; align-items:start; }
.sch-nights { list-style:none; margin:.3rem 0 0; padding:0; }
.sch-night, .sch-slot { display:grid; grid-template-columns:4.2rem 8.4rem minmax(0, 1fr) 36px; align-items:center; gap:.4rem; min-height:40px; border-top:1px solid var(--hair); }
.sch-night:first-child, .sch-slot:first-child { border-top:0; }
.sch-wk { color:var(--muted); font-size:13px; font-weight:600; font-variant-numeric:tabular-nums; }
.sch-night:not(.skipped) .sch-wk { color:var(--ink); }
.sch-slot { grid-template-columns:4.2rem auto auto 1fr 36px; }
.sch-slot .sch-wk { color:var(--muted); }
.sch-slot .sch-slot-x { grid-column:5; }
.sch-slot .sch-slot-x svg { width:16px; height:16px; }
.sch-date { min-height:32px; padding:.2rem .4rem; border:1px solid var(--line); border-radius:6px; background:var(--bg); color:var(--ink); font:inherit; font-size:13px; }
.sch-slot-add { min-height:32px; padding:0 .9rem; font-size:13px; }
.sch-more { padding:.4rem 0 0; border-top:1px solid var(--hair); }
.sch-night:first-child + .sch-more, .sch-more:first-child { border-top:0; }
.sch-add-wk { display:inline-flex; align-items:center; gap:.3rem; min-height:32px; font-size:13px; }
.sch-add-wk svg { width:14px; height:14px; }
.sch-class { display:inline-flex; align-items:center; gap:.35rem; min-height:36px; padding:0 .3rem; border:0; border-radius:6px; background:none;
  color:var(--good-2); font:inherit; font-weight:600; cursor:pointer; text-align:left; white-space:nowrap; }
.sch-class span { color:var(--ink); }
.sch-box { position:relative; flex:none; width:18px; height:18px; border:2px solid var(--good-2); border-radius:5px; background:var(--good-2); }
.sch-box::after { content:""; position:absolute; left:4px; top:0; width:5px; height:10px; border:solid var(--surface); border-width:0 2px 2px 0; transform:rotate(45deg); }
.sch-night.skipped .sch-box { border-color:var(--hover); background:none; }
.sch-night.skipped .sch-box::after { display:none; }
.sch-night.skipped .sch-class span:last-child { color:var(--muted); text-decoration:line-through; }
.sch-note { min-width:0; width:100%; min-height:32px; padding:.25rem .5rem; border:1px solid var(--line); border-radius:6px; background:var(--bg); color:var(--ink); font:inherit; font-size:13px; }
.sch-note:disabled { border-color:transparent; background:none; }
.sch-note:disabled::placeholder { color:transparent; }
.sch-del svg { width:16px; height:16px; }
.sch.locked .sch-del, .sch.locked .sch-remove { visibility:hidden; }
.sch.locked .sch-slot, .sch.locked .sch-more { display:none; }
.sch-warn { grid-column:1 / -1; display:flex; gap:.4rem; margin:0; padding:.4rem .6rem; border-radius:6px; background:var(--tag-bg); color:var(--tag-ink); font-size:13px; }
.sch-warn svg { flex:none; width:16px; height:16px; margin-top:2px; }
.sch-blocks { display:grid; grid-template-columns:repeat(var(--blocks, 2), minmax(0, 1fr)); gap:8px; }
@media (max-width: 640px) { .sch-blocks { grid-template-columns:repeat(2, minmax(0, 1fr)); } }
.sch-badd { display:inline-flex; align-items:center; gap:.25rem; white-space:nowrap; }
.sch-badd svg { width:14px; height:14px; }
.sch-right { display:grid; gap:8px; align-content:start; min-width:0; }
.sch-blist { display:grid; gap:4px; margin:0; padding:0; list-style:none; }
.sch-brow { display:grid; grid-template-columns:minmax(6rem, 1fr) auto auto auto 28px; align-items:center; gap:.4rem; }
.sch-bname { min-width:0; padding:.25rem .45rem; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink); font:inherit; font-size:14px; }
.sch-brow input[type="time"] { width:7.6rem; padding:.2rem .35rem; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink); font:inherit; font-size:13px; }
.sch-bto { color:var(--muted); }
.sch-brow input[type="time"].need { border-color:#f59e0b; box-shadow:0 0 0 1px #f59e0b; }
.sch-bdel { width:28px; height:28px; }
.sch-bdel svg { width:14px; height:14px; }
.sch-bmore { display:flex; }
@media (max-width: 520px) { .sch-brow { grid-template-columns:minmax(0, 1fr) auto auto auto 28px; } .sch-brow input[type="time"] { width:6.2rem; } }
.sch-cname { font-weight:600; }
.sch-btime { font-weight:400; margin-left:.35rem; }
.sch-dup-note { margin:.2rem 0 0; color:var(--muted); font-size:13px; }
.sch-dup-note[hidden] { display:none; }
.sch-col { display:flex; flex-direction:column; min-width:0; padding:.4rem; border:1px dashed var(--line); border-radius:8px; transition:background .15s, border-color .15s; }
.sch-col-head { margin:0 0 .35rem .2rem; color:var(--muted); font-size:12px; font-weight:600; }
.sch-drop { display:flex; flex-direction:column; gap:6px; flex:1; min-height:44px; }
.sch-drop:empty::before { content:"No classes"; align-self:flex-start; margin:.2rem .3rem; color:var(--muted); opacity:.6; font-size:13px; }
.sch-idle { grid-column:1 / -1; }
.sch-idle .sch-drop { flex-direction:row; flex-wrap:wrap; min-height:36px; }
.sch-col.over { border-color:var(--ink); border-style:solid; background:color-mix(in srgb, var(--ink) 6%, transparent); }
.sch-lvl { display:flex; align-items:center; gap:.55rem; min-height:44px; padding:0 .8rem 0 .55rem; border:0; border-radius:8px; text-align:left;
  background:color-mix(in srgb, var(--ink) 8%, var(--surface)); color:var(--ink); font:inherit; font-weight:700; cursor:grab; user-select:none; -webkit-user-select:none; }
.sch-lvl[data-track] { background:var(--chip); color:var(--on-accent); }
.sch-idle .sch-lvl[data-track] { background:var(--accent); } /* faded as a whole instead (opacity) */
.sch-lvl span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sch-lvl .ic-grip { flex:none; opacity:.6; }
.sch-idle .sch-lvl { min-height:36px; opacity:.75; }
.sch:not(.locked) .sch-lvl { touch-action:none; }
.sch-lvl:disabled { cursor:default; }
.sch-lvl:disabled .ic-grip { visibility:hidden; }
.sch-lvl.dragging { opacity:.3; }
.sch-ghost { position:fixed; left:0; top:0; z-index:50; margin:0; pointer-events:none; cursor:grabbing; box-shadow:0 8px 24px rgb(0 0 0 / .25); }
.sch-lvl:focus-visible { outline:2px solid var(--ink); outline-offset:2px; }
.sch-class:focus-visible, .sch-off:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
@media (max-width: 900px) { .sch-body { grid-template-columns:1fr; } }
@media (max-width: 480px) {
  .sch-night { grid-template-columns:3.4rem auto minmax(0, 1fr) 36px; }
  .sch-name { width:100%; }
  .sch-len-pick { margin-left:0; }
}
@media (prefers-reduced-motion: reduce) { .sch-saving { animation-duration:2.4s; } }
.sch-series button:disabled, .sch-series select:disabled { cursor:default; }
/* Badges: a chip in the badge's own color (--b, text --on-b), softened like the level chips; squarer corners than a level pill. */
.att-badge { display:inline-flex; align-items:center; gap:.3rem; max-width:100%; padding:.1rem .5rem; border-radius:5px; vertical-align:middle; line-height:1.4;
             background:color-mix(in srgb, var(--b) 75%, var(--surface)); color:var(--on-b); font-size:12px; font-weight:600; white-space:nowrap; }
.att-badge > svg { flex:none; width:13px; height:13px; margin-left:-.1rem; }
.att-badge-name { overflow:hidden; text-overflow:ellipsis; }
.att-badge-date { font-weight:400; opacity:.8; }
.att-badge-x { display:inline-flex; margin:0 -.3rem 0 0; padding:2px; border:0; border-radius:50%; background:none; color:inherit; cursor:pointer; }
.att-badge-x svg { width:12px; height:12px; }
.att-badge-x:hover { background:color-mix(in srgb, var(--on-b) 15%, transparent); }
.att-badges { display:flex; flex-wrap:wrap; align-items:center; gap:4px 6px; margin:.5rem 0 0; font-size:13px; }
.att-badges .lbl { color:var(--muted); margin-right:.2rem; }
.att-badges.busy { opacity:.55; pointer-events:none; }
.pv-badges .att-badges { margin:0; }
.att-badge-add { display:inline-flex; align-items:center; gap:.2rem; padding:0 .55rem 0 .4rem; border:1px dashed var(--line); border-radius:999px;
                 background:none; color:var(--ink); font:inherit; font-size:12px; cursor:pointer; }
.att-badge-add svg { width:13px; height:13px; }
.att-none { color:var(--muted); font-size:13px; }
.att-badge-cell { line-height:1.9; }
.att-badge-cell .att-badge + .att-badge { margin-left:3px; }
.att-badge-role { font-weight:400; opacity:.85; }
.att-badge-role::before { content:"· "; }

/* Dance roles: the role mark (server.js roleMark), the one concise way a role is shown, in four kinds: lead (L) and
   follow (F) in a ring, both (L/F set small) in the same ring, unknown (?) in a faint dashed ring. It takes its
   color from what it sits in (a class pill, a badge, text); its tooltip says the role in full. No color stands for a role. */
.role-mark { position:relative; flex:none; display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box;
  width:15px; height:15px; padding:0; border:1.25px solid currentColor; border-radius:50%;
  font-family:var(--font-body); font-size:9px; font-weight:700; line-height:1; letter-spacing:0; font-variant-numeric:normal; vertical-align:middle; cursor:help; }
.role-mark > span { display:block; transform:translateY(.25px); }
/* Both: L/F set small to fit the same ring. */
.role-mark.role-both { font-size:6.5px; letter-spacing:-.06em; }
.role-mark.role-unknown { border-style:dashed; opacity:.7; }
/* Its tooltip: app.js's .float-tip, on top of everything (a ::after would be clipped by a table's scroll box). */
.float-tip { position:fixed; z-index:60; padding:.3rem .55rem; border-radius:6px; background:var(--ink); color:var(--surface);
  font-size:12px; font-weight:600; line-height:1.3; white-space:nowrap; box-shadow:0 2px 8px rgb(0 0 0 / .2);
  opacity:0; transform:translateY(2px); transition:opacity .12s, transform .12s; pointer-events:none; }
.float-tip.below { transform:translateY(-2px); }
.float-tip.show { opacity:1; transform:none; }
.role-mark.role-unknown:hover { opacity:1; }
/* Counts by role: "5 (L) · 4 (F)". */
.role-count { display:inline-flex; align-items:center; gap:3px; font-variant-numeric:tabular-nums; }
.role-sep { margin:0 .35em; opacity:.6; }
.att-badge .role-mark { margin-left:3px; }
.att-lvl.has-role { display:inline-flex; align-items:center; gap:4px; padding:1px 2px 1px .5rem; overflow:visible; }
.att-lvl-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* In the purchase tables' Block columns a class fills its column: its name on the left, the role's letter on the right. */
.att-purchases td > .att-lvl, .att-purchases td > .att-lvl-edit, .att-purchases .att-lvl-edit > select.att-lvl { display:flex; box-sizing:border-box; width:100%; }
.att-purchases td > .att-lvl { align-items:center; }
.att-purchases td > .att-lvl.has-role .att-lvl-name { flex:1; }
/* Editable: the letter sits in the pill before its chevron, a see-through dropdown over it picks the role. */
.att-lvl-edit.has-role > select.att-lvl { padding-right:40px; }
.att-lvl-edit.has-role > select.att-lvl:disabled { padding-right:calc(.5rem + 18px); }
.role-mark-edit { position:absolute; top:50%; right:20px; margin-top:-8px; }
.att-lvl-edit:has(> select:disabled) > .role-mark-edit { right:4px; }
.role-mark-edit select, .att-grid .role-mark-edit select[data-field]:disabled { position:absolute; inset:-3px; width:auto; height:auto; margin:0; padding:0;
  appearance:none; -webkit-appearance:none; opacity:0; font-size:16px; cursor:pointer; }
.role-mark-edit select:disabled { pointer-events:none; }
.role-mark-edit:has(select:not(:disabled)):hover { background:color-mix(in srgb, currentColor 22%, transparent); }
.role-mark-edit:has(select:focus-visible) { outline:2px solid var(--accent); outline-offset:1px; }
.role-mark-edit:has(select[aria-busy]) > span { visibility:hidden; }
.role-mark-edit .att-spin { position:absolute; inset:0; width:8px; height:8px; margin:auto; border-width:1.5px; }
.role-bal { display:inline-flex; flex-direction:column; gap:3px; min-width:0; font-size:12px; font-weight:400; color:var(--muted); }
.role-words { display:flex; flex-wrap:wrap; align-items:center; }
.role-bal .role-count { color:var(--ink); font-weight:600; }
.tn-sec h3 .tn-bal { margin-left:auto; align-items:flex-end; }
.roster-bal { display:flex; margin:0 .5rem .4rem; font-size:13px; }
.roster-panel li .roster-name { flex:1; min-width:0; }
.roster-lf { display:inline-flex; align-items:center; color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; }
.add-role { margin-top:6px; }
.add-role[hidden], .award-role[hidden] { display:none; }
.add-role .add-opt-btn { flex:1; min-height:36px; padding:0 .5rem; font-size:14px; }
.award-role .add-opt-btn:disabled { opacity:.45; cursor:not-allowed; }
.tn-prereq { background:var(--tag-bg); color:var(--tag-ink); }
.roster-prereq { display:inline-flex; align-items:center; gap:3px; flex-shrink:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.roster-prereq svg { flex:none; width:12px; height:12px; }
/* The Badges page: the badges, then the classes, each a row with what it needs. */
.bdg { display:grid; gap:1.75rem; }
.bdg-sec { padding:0; }
.bdg-sec-head { display:flex; align-items:center; justify-content:space-between; gap:.6rem; margin:0 0 .3rem; }
.bdg-sec-head h3 { margin:0; font-size:1.05rem; }
.bdg-list { margin:0; padding:0; list-style:none; }
.bdg-item { display:grid; grid-template-columns:minmax(10rem, 14rem) minmax(0, 1fr) auto; align-items:center; gap:.4rem 1rem; padding:.55rem 0; border-top:1px solid var(--hair); }
.bdg-item:first-child { border-top:0; }
.bdg-item.busy { opacity:.55; pointer-events:none; }
.bdg-main { display:flex; flex-wrap:wrap; align-items:center; gap:.3rem .6rem; min-width:0; }
/* Bigger chips here than in tables: the badges and classes are what this page is about. */
.bdg-main .att-badge, .bdg-main .att-lvl { font-size:14px; line-height:1.4; padding:.3rem .75rem; }
.bdg-main .att-badge > svg { width:15px; height:15px; }
.bdg-main .att-lvl { display:inline-flex; align-items:center; gap:.35rem; }
.bdg-main .att-lvl > svg { flex:none; width:16px; height:16px; margin-left:-.15rem; }
.bdg-needs .att-badge { font-size:13px; padding:.15rem .55rem; }
.bdg-held { color:var(--muted); font-size:13px; }
.bdg-needs { display:flex; flex-wrap:wrap; align-items:center; gap:4px; min-width:0; }
.bdg-needs .lbl { color:var(--muted); font-size:13px; margin-right:.2rem; }
.bdg-acts { display:flex; gap:.4rem; }
.bdg.locked .bdg-acts, .bdg.readonly .bdg-acts { visibility:hidden; }
.bdg.locked .bdg-add { opacity:.55; }
.bdg-picks { display:flex; flex-wrap:wrap; gap:6px 14px; margin:0; padding:0; border:0; }
.bdg-picks legend { padding:0; margin-bottom:.35rem; }
.bdg-picks label { display:inline-flex; align-items:center; gap:.35rem; min-height:32px; cursor:pointer; }
.bdg-picks label[hidden] { display:none; }
.bdg-picks input { width:18px; height:18px; margin:0; accent-color:var(--ink); }
.bdg-colors { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.bdg-swatch { width:30px; height:30px; padding:0; border:2px solid var(--surface); border-radius:50%; background:var(--b); box-shadow:0 0 0 1px var(--line); cursor:pointer; }
.bdg-swatch[aria-pressed="true"] { box-shadow:0 0 0 2px var(--ink); }
.bdg-picker { width:38px; height:32px; padding:0 2px; border:1px solid var(--line); border-radius:6px; background:var(--surface); cursor:pointer; }
.bdg-hex.add-in { width:7.5rem; font-variant-numeric:tabular-nums; }
.cls-color-default[aria-pressed="true"] { box-shadow:0 0 0 2px var(--ink); }
/* Codes (/attendance/codes): flat rows, a dot for the kind. */
.cds-intro { margin:.2rem 0 .8rem; color:var(--muted); font-size:14px; }
.cds { display:grid; gap:1.4rem; }
.cds-sec h3 { margin:0 0 .15rem; color:var(--muted); font-size:13px; font-weight:600; }
.cds-list { margin:0; padding:0; list-style:none; }
.cds-item { display:grid; grid-template-columns:minmax(7.5rem, 11rem) minmax(10rem, 1fr) 7rem minmax(5.5rem, 8rem) auto; align-items:center;
  gap:.3rem 1rem; padding:.55rem 0; border-top:1px solid var(--hair); }
.cds-item:first-child { border-top:0; }
.cds-code { font-weight:600; font-variant-numeric:tabular-nums; letter-spacing:.02em; overflow-wrap:anywhere; }
.cds-off, .cds-used { font-size:14px; }
.cds-used { color:var(--muted); }
.cds-sqs { display:block; margin-top:.15rem; font-size:12.5px; color:var(--muted); }
.cds-kind { justify-self:start; }
.cds-pill { display:inline-flex; align-items:center; gap:.4rem; padding:.15rem .55rem; border-radius:6px; font-size:13px; font-weight:600;
  background:color-mix(in srgb, var(--k, var(--muted)) 14%, var(--surface)); color:color-mix(in srgb, var(--k, var(--muted)) 75%, var(--ink)); }
.cds-dot { width:8px; height:8px; border-radius:50%; background:var(--k, var(--muted)); flex-shrink:0; }
.k-promo { --k:#3b82c4; }
.k-comp { --k:#8a63d2; }
.k-scholarship { --k:#2e9e6a; }
.k-admin { --k:#c2410c; }
.k-host { --k:#3b82c4; }
.usr-item { grid-template-columns:minmax(12rem, 1fr) minmax(6rem, 8rem) minmax(8rem, 14rem) auto; }
.usr-email .att-tag { margin-left:.4rem; }
.usr-hint { margin:.2rem 0 0; color:var(--muted); font-size:14px; }
.usr-hint[hidden], .usr-dlg .cds-new[hidden], .usr-remove[hidden] { display:none; }
.usr-remove { margin-right:auto; color:var(--bad-ink); }
.cds-pick { background:var(--tag-bg); color:var(--tag-ink); }
.cds-acts { display:flex; justify-content:flex-end; white-space:nowrap; }
.cds.locked .cds-acts, .cds.readonly .cds-acts { visibility:hidden; }
.cds-add[disabled] { opacity:.55; }
.cds-seg label { display:inline-flex; align-items:center; min-height:44px; padding:0 1rem; border:1px solid var(--line); border-radius:8px;
  background:var(--surface); font-size:15px; cursor:pointer; }
.cds-seg label:hover { border-color:var(--hover); }
.cds-seg input { position:absolute; opacity:0; pointer-events:none; }
.cds-seg label:has(input:checked) { background:var(--ink); border-color:var(--ink); color:var(--on-accent); font-weight:600; }
.cds-seg label:has(input:focus-visible) { outline:2px solid var(--accent); outline-offset:2px; }
.cds-dlg .cds-new[hidden] { display:none; }
/* Discounts: code, what it takes off, Kind (a dropdown over its pill), uses (a number over a faint line of them a month) */
.codes .cds-item, .codes .cds-head { grid-template-columns:minmax(10.5rem, 12.5rem) minmax(6rem, 1fr) 7.5rem 5.75rem 5.75rem minmax(3.5rem, 9rem); column-gap:.75rem; }
.codes .cds-kname { white-space:nowrap; }
.cds-later { color:var(--muted); }
.cds-made { font-size:14px; white-space:nowrap; }
.cds-head { display:grid; gap:0 1rem; padding:0 0 .45rem; border-bottom:1px solid var(--hair); color:var(--muted); font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.04em; }
.cds-head span:last-child, .codes .cds-used { text-align:right; }
.cds-kind-pick { position:relative; cursor:pointer; }
.cds-kind-pick svg { width:13px; height:13px; margin-left:-.1rem; opacity:.7; }
.cds-sel { position:absolute; inset:0; width:100%; opacity:0; cursor:pointer; font-size:16px; }
.cds-kind-pick:has(.cds-sel:focus-visible) { outline:2px solid var(--accent); outline-offset:2px; }
.cds-kind-pick:has(.cds-sel:disabled) { opacity:.6; }
.codes .cds-used { position:relative; align-self:stretch; display:flex; align-items:center; justify-content:flex-end; min-height:2rem; }
.cds-graph { position:absolute; inset:.35rem 0; width:100%; height:calc(100% - .7rem); color:var(--muted); }
.cds-graph polyline { stroke:currentColor; stroke-width:1.5; opacity:.35; stroke-linejoin:round; }
.cds-n { position:relative; padding-left:.25rem; color:var(--ink); font-size:15px; font-weight:600; font-variant-numeric:tabular-nums;
  text-shadow:0 0 3px var(--surface), 0 0 3px var(--surface); }
.pss-std { color:var(--muted); }
.pss-what { color:var(--muted); }
@media (max-width: 640px) {
  .cds-item { grid-template-columns:minmax(0, 1fr) auto; }
  .cds-off, .cds-kind, .cds-used { grid-column:1; }
  .cds-acts { grid-column:2; grid-row:1; }
  .cds-head { display:none; }
  .codes .cds-item { grid-template-columns:minmax(0, 1fr) 5rem; }
  .codes .cds-off, .codes .cds-kind, .codes .cds-made { grid-column:1; }
  .codes .cds-made { font-size:13px; color:var(--muted); }
  .codes .cds-made:empty { display:none; }
  .codes .cds-made:not(.cds-end)::before { content:'Start '; }
  .codes .cds-end::before { content:'End '; }
  .codes .cds-used { grid-column:2; grid-row:1 / span 5; align-self:center; min-height:0; height:2.6rem; }
}
@media (max-width: 640px) {
  .bdg-item { grid-template-columns:minmax(0, 1fr) auto; }
  .bdg-needs { grid-column:1 / -1; grid-row:2; }
}

.att-who { display:inline-flex; align-items:center; gap:.5rem; min-width:0; vertical-align:middle; }
.att-who > a, .att-who > span { min-width:0; }

/* The Person view: the profile column (sections under hairlines, no boxes) beside the timeline, one column under 1000px. */
.pv { display:grid; grid-template-columns:minmax(0, 340px) minmax(0, 1fr); gap:0 32px; align-items:start; }
/* The Person view: a faint gray page, its profile sections and the filter bar on white panels (a hairline, no shadow). */
body.pv-page { background:color-mix(in srgb, var(--ink) 3.5%, var(--bg)); }
.pv-profile, .pv-sec, .pv-bar { border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.pv-profile, .pv-sec { padding:14px 16px; }
@media (max-width: 1000px) { .pv { grid-template-columns:minmax(0, 1fr); } }
.pv-side { min-width:0; }
.pv-who { display:flex; align-items:flex-start; gap:14px; }
.pv-id { flex:1; min-width:0; }
.pv-id h2.att-person { font-size:1.6rem; }
.pv-id .att-info { overflow-wrap:anywhere; }
.set-value:has(> .set-folder-link) { display:flex; flex-wrap:wrap; align-items:center; gap:4px 6px; }
.set-value:has(> .set-folder-link) > .set-in { flex:1 1 0; min-width:0; }
.set-value:has(> .set-folder-link) > .set-saved:not(:empty) { flex-basis:100%; }
.set-folder-link { flex:none; color:var(--muted); }
.set-folder-link[hidden] { display:none; }
.set-folder-link:hover { color:var(--ink); }
.pv-acts { display:flex; gap:6px; margin-top:.5rem; }
.pv-acts button { min-height:30px; padding:0 .8rem; font-size:13px; }
.pv-pills { display:flex; flex-wrap:wrap; gap:6px; margin:.7rem 0 0; }
.pv-pills .att-lvl { line-height:22px; }
.pv-pill { display:inline-flex; align-items:center; gap:5px; padding:0 9px; border-radius:999px; font-size:12px; font-weight:600; line-height:22px; white-space:nowrap;
           background:color-mix(in srgb, var(--ink) 8%, transparent); color:var(--ink); }
.pv-pill svg { width:13px; height:13px; }
.pv-pill.good { background:color-mix(in srgb, var(--good-2) 18%, var(--surface)); color:color-mix(in srgb, var(--good-2) 60%, var(--ink)); }
.pv-pill.warn { background:var(--bad-bg); color:var(--bad-ink); }
.pv-pill.tag { background:var(--tag-bg); color:var(--tag-ink); }
.pv-pill.blue { background:color-mix(in srgb, #0b5cad 14%, var(--surface)); color:color-mix(in srgb, #0b5cad 70%, var(--ink)); }
.pv-sec { margin:14px 0 0; }
.pv-h { display:flex; align-items:baseline; gap:.5rem; margin:0 0 .6rem; font-family:var(--font-body); font-size:11.5px; font-weight:700; letter-spacing:.05em;
        text-transform:uppercase; color:var(--muted); }
.pv-h-meta { margin-left:auto; font-weight:500; letter-spacing:0; text-transform:none; font-size:12px; }
.pv-hist { padding:0; border:0; background:none; color:var(--accent-fg, var(--accent)); font:inherit; text-decoration:underline; text-underline-offset:2px; cursor:pointer; }
.pv-glance { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px 16px; }
.pv-glance div { display:flex; flex-direction:column; }
.pv-glance b { font-family:var(--font-head); font-size:22px; line-height:1.15; font-variant-numeric:tabular-nums; }
.pv-glance span { color:var(--muted); font-size:12px; }
.pv-needs[hidden] { display:none; }
.pv-needs ul { margin:0; padding:0; list-style:none; }
.pv-needs li { padding:6px 0; border-top:1px solid color-mix(in srgb, var(--line) 50%, transparent); font-size:13.5px; line-height:1.4; }
.pv-needs li:first-child { border-top:0; padding-top:0; }
.pv-needs li > a { display:flex; align-items:flex-start; gap:10px; color:inherit; text-decoration:none; }
.pv-needs li > a:hover > span:last-child { text-decoration:underline; text-underline-offset:2px; }
.pv-notes .att-note-wrap { padding:6px 8px; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.pv-notes .att-note-edit { min-height:3.6em; }
.pv-notes .att-note-edit::placeholder { color:var(--muted); }
.pv-notes .att-note-status { display:block; margin-top:4px; color:var(--bad-ink); font-size:12px; }
.pv-main { min-width:0; }
.pv-bar { position:sticky; top:var(--hdr-h, 49px); z-index:5; display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; padding:10px 14px; }
@media (max-width: 1000px) { .pv-bar { position:static; margin-top:14px; } }
.pv-flts { display:flex; flex-wrap:wrap; gap:6px; }
.pv-flt { display:inline-flex; align-items:center; gap:6px; height:30px; padding:0 11px; border:1px solid var(--line); border-radius:999px; background:var(--surface);
          color:var(--ink); font:inherit; font-size:13px; cursor:pointer; }
.pv-flt svg { width:15px; height:15px; }
.pv-flt .k { font:500 11px/1 ui-monospace, Menlo, monospace; opacity:.7; }
.pv-flt[aria-pressed="true"] { background:var(--ink); border-color:var(--ink); color:var(--bg); font-weight:600; }
/* Each filter faintly in its rows' color (All: plain); picked, solid in it. */
.pv-flt[data-kind="class"] { --b:var(--good-2); }
.pv-flt[data-kind="purchase"] { --b:#b7791f; }
.pv-flt[data-kind="mail"] { --b:#6f4fc7; }
/* An × on each filter but All, shown while it's on (tapping it again turns it off). */
.pv-flt-x { display:none; margin:0 -4px 0 -2px; }
.pv-flt-x svg { width:13px; height:13px; }
.pv-flt[aria-pressed="true"] .pv-flt-x { display:inline-flex; }
.pv-flt[data-kind]:not([data-kind="all"]) { background:color-mix(in srgb, var(--b) 8%, var(--surface)); border-color:color-mix(in srgb, var(--b) 30%, var(--line)); }
.pv-flt[data-kind]:not([data-kind="all"]) svg { color:color-mix(in srgb, var(--b) 80%, var(--ink)); }
.pv-flt[data-kind]:not([data-kind="all"])[aria-pressed="true"] { background:color-mix(in srgb, var(--b) 85%, var(--ink)); border-color:transparent; color:#fff; }
.pv-flt[aria-pressed="true"] svg { color:inherit !important; }

.pv-grp { margin-left:auto; display:inline-flex; align-items:center; gap:6px; color:var(--muted); font-size:13px; cursor:pointer; }
.pv-grp input { width:16px; height:16px; margin:0; accent-color:var(--ink); }
.pv-feed-note { margin:.5rem 0 0; color:var(--muted); font-size:13px; }
.pv-feed-note[hidden] { display:none; }
.pv-group.pv-quiet { display:none; }
.pv-month { margin:22px 0 4px; padding-bottom:6px; border-bottom:1px solid var(--line); }
.pv-month h3 { margin:0; font-size:17px; }
.pv-sess { display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; margin-top:4px; font-size:13px; }
.pv-sess .att-lvl { line-height:20px; }
.pv-sess-name, .pv-month-link { font-weight:600; color:var(--ink); text-decoration:none; }
.pv-sess-name:hover, .pv-month-link:hover { text-decoration:underline; text-underline-offset:3px; }
.pv-att { margin-left:auto; display:inline-flex; align-items:center; gap:5px; }
.pv-sess + .pv-sess .pv-lbl { visibility:hidden; }
.pv-lbl { margin-right:2px; color:var(--muted); font-size:11px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; }
.pv-att > span[role="img"] { display:inline-flex; width:18px; height:18px; align-items:center; justify-content:center; }
.pv-wk-up::before { content:""; width:15px; height:15px; box-sizing:border-box; border:1.5px dashed color-mix(in srgb, var(--muted) 70%, transparent); border-radius:50%; }
.pv-wk-none::before { content:""; width:5px; height:5px; border-radius:50%; background:color-mix(in srgb, var(--muted) 40%, transparent); }
.pv-evs { margin:0; padding:0; list-style:none; }
.pv-ev { display:grid; grid-template-columns:6rem 30px minmax(0, 1fr) auto; gap:2px 12px; align-items:start; padding:9px 0;
         border-bottom:1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.pv-ev[hidden] { display:none; }
.pv-evs .pv-ev:last-child { border-bottom:0; }
.pv-ev.pv-off { display:none; }
.pv-when { font:500 12px/30px ui-monospace, Menlo, monospace; color:var(--muted); text-align:right; white-space:nowrap; }
.pv-ic { --b:var(--muted); display:flex; align-items:center; justify-content:center; width:30px; height:30px; border-radius:8px;
         background:color-mix(in srgb, var(--b) 16%, var(--surface)); color:color-mix(in srgb, var(--b) 75%, var(--ink)); }
.pv-ic svg { width:16px; height:16px; }
.pv-ic.sm { flex:none; width:24px; height:24px; border-radius:6px; }
.pv-ic.sm svg { width:14px; height:14px; }
.pv-ic-checkin { --b:var(--good-2); }
.pv-ic-missed { --b:var(--danger); }
.pv-ic-purchase { --b:#b7791f; }
.pv-ic-newsletter, .pv-ic-fold { --b:#6f4fc7; }
.pv-ic-email { --b:#6f4fc7; }
.pv-ic-note { --b:#a3870f; }
.pv-need-unpaid .pv-ic { --b:var(--danger); }
.pv-need-email .pv-ic { --b:#6f4fc7; }
.pv-need-badge .pv-ic { --b:#b7791f; }
.pv-body { min-width:0; padding-top:4px; }
.pv-ttl { font-size:14.5px; line-height:1.4; overflow-wrap:anywhere; }
.pv-ttl strong { font-weight:600; }
.pv-ttl a { color:inherit; }
.pv-sub { margin-top:2px; color:var(--muted); font-size:13px; line-height:1.45; overflow-wrap:anywhere; }
.pv-sub-row { display:inline-flex; flex-wrap:wrap; align-items:center; gap:4px 8px; }
.pv-sub .pv-pill { line-height:20px; }
.pv-bought { display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; }
.pv-cls { display:inline-flex; align-items:center; gap:4px; }
.pv-cls .att-lvl { line-height:20px; }
.pv-cls > span:last-child:not(.att-lvl) { color:var(--muted); font-size:12px; }
.pv-now-list { margin:0; padding:0; list-style:none; }
.pv-now-list li + li { margin-top:8px; padding-top:8px; border-top:1px solid color-mix(in srgb, var(--line) 50%, transparent); }
.pv-now-pass { display:flex; justify-content:space-between; gap:8px; margin-bottom:4px; font-size:14px; }
.pv-now-pass span { font-size:13px; }
.pv-now-att { margin-top:10px; }
.pv-now-att .pv-sess { flex-wrap:nowrap; }
.pv-now-att .pv-sess .att-lvl { flex:none; }
.pv-now-att .pv-att { margin-left:auto !important; flex-basis:auto !important; }
.pv-now-att .pv-sess > .pv-muted { display:none; }
.pv-now-att .pv-lbl { display:none; }
.pv-now-next { margin:8px 0 0; color:var(--muted); font-size:13px; }
.pv-note { font-style:italic; }
.pv-muted { color:var(--muted); font-weight:400; }
.pv-unpaid { color:var(--bad-ink); font-weight:600; }
.pv-ins { padding:0 3px; border-radius:3px; background:color-mix(in srgb, var(--good-2) 18%, var(--surface)); color:color-mix(in srgb, var(--good-2) 60%, var(--ink)); text-decoration:none; }
.pv-del { color:var(--muted); }
.pv-right { padding-top:4px; font:600 13px/20px ui-monospace, Menlo, monospace; text-align:right; white-space:nowrap; }
.pv-right s { display:block; font-weight:500; color:var(--muted); }
.pv-exp { color:var(--muted); }
.pv-exp svg { width:16px; height:16px; transition:transform .15s; }
.pv-exp[aria-expanded="true"] svg { transform:rotate(180deg); }
/* An email's whole exchange, under its row: each message's sender and time, then its own text. */
.pv-thread { margin-top:8px; font-size:13.5px; line-height:1.5; }
.pv-thread[hidden] { display:none; }
.pv-msgs { margin:0; padding:0; list-style:none; border-top:1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.pv-msg { padding:8px 0; border-bottom:1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.pv-msg:last-child { border-bottom:0; }
.pv-msg-h { display:flex; flex-wrap:wrap; gap:2px 6px; align-items:baseline; margin-bottom:3px; }
.pv-msg-h b { font-weight:600; }
.pv-msg-when { margin-left:auto; color:var(--muted); font-size:12px; white-space:nowrap; }
.pv-msg-t { white-space:pre-wrap; overflow-wrap:anywhere; }
.pv-fold-show { padding:0; border:0; background:none; color:var(--accent-fg, var(--accent)); font:inherit; text-decoration:underline; text-underline-offset:2px; cursor:pointer; }
@media (max-width: 640px) {
  .pv-ev { grid-template-columns:30px minmax(0, 1fr) auto; }
  .pv-when { grid-column:2 / 4; grid-row:1; text-align:left; line-height:1.4; }
  .pv-ev > .pv-ic { grid-row:1 / 3; grid-column:1; }
  .pv-body { grid-column:2; grid-row:2; padding-top:0; }
  .pv-right { grid-column:3; grid-row:2; padding-top:0; }
  .pv-att { margin-left:0; flex-basis:100%; }
}

/* A code, anywhere (couponHtml): shaped like a coupon, a notch in each end and a perforation near the left, in its
   Kind's color (.k-promo etc.; none: yellow). Its border is the coupon itself in the border color, with the fill
   (::before) inset 1px; the notches are cut from both. The perforation is near the left end. */
.coupon { --cb:color-mix(in srgb, var(--tag-ink) 55%, var(--surface)); --cf:var(--tag-bg); --ci:var(--tag-ink); --n:4px;
  position:relative; isolation:isolate; display:inline-flex; align-items:center; padding:0 10px 0 17px; border-radius:3px; background:var(--cb); color:var(--ci);
  font-size:12px; font-weight:600; line-height:20px; letter-spacing:.02em; white-space:nowrap; vertical-align:middle;
  -webkit-mask:radial-gradient(circle var(--n) at 0 50%, #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--n) at 100% 50%, #0000 97%, #000) right / 51% 100% no-repeat;
  mask:radial-gradient(circle var(--n) at 0 50%, #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--n) at 100% 50%, #0000 97%, #000) right / 51% 100% no-repeat; }
.coupon[class*="k-"] { --cb:color-mix(in srgb, var(--k) 50%, var(--surface)); --cf:color-mix(in srgb, var(--k) 13%, var(--surface)); --ci:color-mix(in srgb, var(--k) 70%, var(--ink)); }
.coupon::before { content:""; position:absolute; inset:1px; z-index:-1; border-radius:2px; background:var(--cf);
  -webkit-mask:radial-gradient(circle calc(var(--n) + 1px) at -1px 50%, #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle calc(var(--n) + 1px) at calc(100% + 1px) 50%, #0000 97%, #000) right / 51% 100% no-repeat;
  mask:radial-gradient(circle calc(var(--n) + 1px) at -1px 50%, #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle calc(var(--n) + 1px) at calc(100% + 1px) 50%, #0000 97%, #000) right / 51% 100% no-repeat; }
.coupon::after { content:""; position:absolute; top:3px; bottom:3px; left:9px; border-left:1.5px dashed var(--cb); }
.coupon-x { font-weight:500; white-space:pre; }
.ov-codes { min-width:7rem; }
.ov-codes .coupon { margin:1px 4px 1px 0; }
