/* LeeCal calendar theme. Dark, high-contrast, color-forward.
   Custody is the cell background tint (whose day it is); events are vivid chips/bands on top. */

:root {
    --bg: #0c0d12;
    --surface: #16181f;
    --surface-2: #1e212a;
    --cell: #191c24;
    --cell-out: #121419;       /* leading/trailing days, dimmed */
    --text: #e8eaed;
    --text-dim: #8a8f98;
    --text-faint: #5b606b;
    --border: #2a2d37;
    --border-soft: #23262f;

    /* People (custody owners + tags) */
    --sean: #2E6DE6;
    --lindsay: #E0529C;
    --amanda: #18A999;
    --patrick: #E8590C;

    --today: #f5c518;
    --nc: #8E5BD9;             /* "Sean in NC" rail - violet, distinct from every person color */
    --sync-pending: #ffb020;   /* amber: painted locally, not in Apple yet */
    --sync-differs: #e5484d;   /* red: differs from Apple / feeds conflict */
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ---- App shell ---- */
.app-shell { min-height: 100vh; }

.app-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1.1rem;
    background: rgba(12, 13, 18, 0.85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-soft);
}

.app-bar-brand {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text);
    text-decoration: none;
}

.app-bar-user { display: flex; align-items: center; gap: 0.75rem; }
.app-bar-name { color: var(--text-dim); font-size: 0.9rem; }
.app-bar-logout-form { margin: 0; }
.app-bar-logout {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 0.3rem 0.7rem;
    border-radius: 7px;
    font-size: 0.85rem;
    cursor: pointer;
}
.app-bar-logout:hover { color: var(--text); border-color: var(--text-dim); }

.app-main { padding: 1.1rem; max-width: 1400px; margin: 0 auto; }

.cal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    gap: 0.6rem;
}

/* ---- Toolbar: mode switch + view controls on one space-efficient row ---- */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.8rem;
    margin-bottom: 0.8rem;
}
.view-controls {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.tool-btn {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    color: var(--text-dim);
    min-height: 2.2rem;
    padding: 0.35rem 0.7rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
}
.tool-btn:hover { color: var(--text); }
.tool-btn.active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.tool-btn:disabled { opacity: 0.5; cursor: default; }
.apple-inline { font-size: 0.78rem; color: var(--text-dim); }

.mode-switch {
    display: inline-flex;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}
.mode-switch button {
    background: transparent;
    border: none;
    color: var(--text-dim);
    min-height: 2.2rem;
    padding: 0.35rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
}
.mode-switch button.active {
    background: var(--surface-2);
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--border);
}

/* ---- Month layout: user-selected columns (phones always stack to one) ---- */
.month-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
}
@media (min-width: 760px) {
    .month-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
    .month-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
    .month-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---- Month card ---- */
.month-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 1rem 1rem 1.1rem;
}

.month-head { margin-bottom: 0.7rem; }
.month-title {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.month-title .m-name { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.month-title .m-year { font-size: 1.5rem; font-weight: 800; color: var(--text-faint); line-height: 1; }
.month-summary {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.35;
}

/* ---- Weekday header ---- */
.weekday-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 4px;
}
.weekday-row.with-gutter { grid-template-columns: 1.4rem repeat(7, 1fr); }
.weekday {
    text-align: center;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--text-faint);
    padding: 2px 0;
}

/* ---- Day grid ---- */
.week-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 4px;
}
.week-row.with-gutter { grid-template-columns: 1.4rem repeat(7, 1fr); }

/* Custody mode: per-row paint button in the left gutter. */
.week-btn {
    align-self: stretch;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-dim);
    border-radius: 6px;
    padding: 0;
    font-size: 0.7rem;
    cursor: pointer;
    touch-action: manipulation;
}
.week-btn:hover { color: var(--text); border-color: var(--text-dim); }

.day-cell {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 9px;
    background: var(--cell);
    border: 1px solid transparent;
    padding: 3px 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    /* Paint modes involve rapid tapping: suppress double-tap zoom and text selection. */
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}
.day-cell.out-of-month { background: var(--cell-out); }
.day-cell.out-of-month .day-num { color: var(--text-faint); }
.day-cell.today { box-shadow: inset 0 0 0 2px var(--today); }

/* Custody background tint: --owner / --owner2 set inline per cell */
.day-cell.custody {
    background: color-mix(in srgb, var(--owner) 26%, var(--cell));
}
.day-cell.custody.split {
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--owner) 30%, var(--cell)) 0 50%,
        color-mix(in srgb, var(--owner2) 30%, var(--cell)) 50% 100%);
}

/* Day-flag edge rails: NC pins to the top edge, Patrick to the bottom. The cell's
   overflow:hidden clips them to the rounded corners. */
.rail {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    pointer-events: none;
}
.rail-nc { top: 0; background: var(--nc); }
.rail-patrick { bottom: 0; background: var(--patrick); }

/* Apple sync markers: a dashed inset ring, visually distinct from the solid gold today ring.
   pointer-events:none keeps taps landing on the cell. */
.sync-ring {
    position: absolute;
    inset: 1px;
    border-radius: 8px;
    border: 1.5px dashed var(--sync-pending);
    pointer-events: none;
}
.day-cell.sync-differs .sync-ring { border-color: var(--sync-differs); }
.day-cell.sync-conflict .sync-ring { border-style: solid; border-color: var(--sync-differs); }
.day-cell.today .sync-ring { inset: 4px; border-radius: 5px; }   /* nest inside the gold ring */

.day-num {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    margin-bottom: 2px;
}

.exchange-tag {
    font-size: 0.55rem;
    color: var(--text-dim);
    line-height: 1;
    margin-bottom: 2px;
}

/* ---- Event chips ---- */
.chips { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.chip {
    --chip: var(--patrick);
    background: var(--chip);
    color: #fff;
    font-size: 0.58rem;
    font-weight: 600;
    line-height: 1.15;
    padding: 1px 4px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Travel / multi-day band: square the interior edges so adjacent days read continuous. */
.chip.band { border-radius: 0; }
.chip.band.start { border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.chip.band.end   { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.chip.band:not(.start) { color: transparent; }   /* label only on the first day */

.chip.tentative {
    background: transparent;
    border: 1px dashed var(--chip);
    color: var(--text);
}

.chip.apple { opacity: 0.85; }   /* read-only Apple feed event, not ours */

.chip-more { font-size: 0.55rem; color: var(--text-dim); padding: 0 3px; }

/* ---- Legend ---- */
.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    align-items: center;
    margin-bottom: 1.1rem;
    padding: 0.6rem 0.8rem;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    font-size: 0.78rem;
    color: var(--text-dim);
}
.legend-item { display: inline-flex; align-items: center; gap: 0.4rem; }
.legend-swatch { width: 13px; height: 13px; border-radius: 4px; display: inline-block; }
.legend-swatch.split {
    background: linear-gradient(135deg, var(--sean) 0 50%, var(--lindsay) 50% 100%);
}
.legend-swatch.tentative { background: transparent; border: 1px dashed currentColor; }
.legend-swatch.rail-swatch { width: 16px; height: 5px; border-radius: 2px; }
.legend-swatch.sync-pending { background: transparent; border: 1.5px dashed var(--sync-pending); }
.legend-swatch.sync-differs { background: transparent; border: 1.5px dashed var(--sync-differs); }
.legend-swatch.sync-conflict { background: transparent; border: 1.5px solid var(--sync-differs); }

/* ---- Apple sync panel ---- */
.apple-panel {
    margin-bottom: 1.1rem;
    padding: 0.6rem 0.8rem;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    font-size: 0.82rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.apple-status { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; }
.apple-warn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    background: color-mix(in srgb, var(--sync-pending) 16%, var(--surface));
    color: var(--text);
}
.apple-warn-x {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.8rem;
}
.nudge-head { font-weight: 700; color: var(--text); }
.nudge-list { display: flex; flex-direction: column; gap: 0.35rem; }
.nudge-row { display: flex; align-items: center; gap: 0.5rem; color: var(--text); }
.nudge-pill {
    font-size: 0.66rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
    letter-spacing: 0.3px;
}
.nudge-pill.add { background: color-mix(in srgb, var(--sync-pending) 25%, var(--surface)); color: var(--sync-pending); }
.nudge-pill.change { background: color-mix(in srgb, var(--sync-differs) 22%, var(--surface)); color: var(--sync-differs); }
.nudge-pill.conflict { background: var(--sync-differs); color: #fff; }
.nudge-past { font-size: 0.75rem; }
.nudge-send { display: flex; align-items: center; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.2rem; }
.nudge-recip { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--text); cursor: pointer; }
.nudge-send-btn {
    background: var(--sean);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.4rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
}
.nudge-send-btn:disabled { opacity: 0.5; cursor: default; }
.apple-panel .muted { color: var(--text-dim); }

/* ---- Login ---- */
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.login-card {
    width: 100%;
    max-width: 360px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 2rem 1.6rem;
    text-align: center;
}
.login-brand { font-size: 2rem; font-weight: 800; margin: 0 0 1rem; letter-spacing: 0.5px; }
.login-lead { color: var(--text-dim); font-size: 0.92rem; margin-bottom: 1.2rem; }
.login-form { display: flex; flex-direction: column; gap: 0.7rem; }
.login-input {
    background: var(--cell);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 0.7rem 0.8rem;
    color: var(--text);
    font-size: 1rem;
}
.login-input:focus { outline: none; border-color: var(--sean); }
.login-btn {
    background: var(--sean);
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 0.7rem 0.8rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}
.login-btn:hover { filter: brightness(1.08); }
.login-msg { font-size: 0.9rem; line-height: 1.4; padding: 0.6rem; border-radius: 9px; }
.login-msg-ok { background: color-mix(in srgb, var(--amanda) 20%, var(--surface)); color: var(--text); }
.login-msg-err { background: color-mix(in srgb, #c0392b 22%, var(--surface)); color: var(--text); margin-bottom: 1rem; }

.placeholder { padding: 2rem; }

/* ---- View switch (Family / per-child school views) in the app bar ---- */
.app-bar-nav { display: flex; gap: 0.2rem; }
.app-bar-nav a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: 8px;
}
.app-bar-nav a:hover { color: var(--text); }
.app-bar-nav a.active { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
/* Phones: the switch needs the room the signed-in name was using. */
@media (max-width: 520px) {
    .app-bar { padding: 0.6rem 0.7rem; }
    .app-bar-name { display: none; }
}

/* ---- School view ---- */
:root {
    --overdue: #e5484d;
    --done: #3fb950;
    --check: #ffb020;    /* amber: handed in, but look at it */
}

.school { max-width: 760px; margin: 0 auto; }
.school-title { font-size: 1.5rem; font-weight: 800; margin: 0; line-height: 1; }
.school-title .m-year { color: var(--text-faint); }
.school .cal-nav { justify-content: center; }

.school-panel {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 0.8rem 1rem 0.9rem;
    margin-bottom: 0.8rem;
}
.school-panel.attention { border-color: color-mix(in srgb, var(--overdue) 45%, var(--border-soft)); }
.school-panel.day-panel { margin-top: 0.8rem; }
.school-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}
.school-panel-head h2 { font-size: 1rem; margin: 0; }
.school-panel .muted { color: var(--text-dim); font-size: 0.85rem; margin: 0; }
.count-pill {
    background: var(--overdue);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 999px;
}

.school-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.school-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    text-align: left;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.45rem 0.55rem;
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    min-width: 0;
}
.school-row:hover { border-color: var(--text-faint); }
.row-course { color: var(--text-dim); font-weight: 600; white-space: nowrap; }
.row-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-date { color: var(--text-dim); white-space: nowrap; font-size: 0.78rem; }
.btn-more {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 0.8rem;
    padding: 0.4rem 0 0;
    cursor: pointer;
}
.btn-more:hover { color: var(--text); }

.row-title a { color: var(--text); text-decoration: none; }
.row-title a:hover { text-decoration: underline; }
.row-link { color: var(--text-dim); font-size: 0.75rem; margin-left: 0.4rem; text-decoration: none; white-space: nowrap; }
.row-link:hover { color: var(--text); text-decoration: underline; }

/* Day sheet: bottom sheet on phones, centered dialog on wider screens (mirrors the DayEditor). */
.school-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 100;
}
.school-sheet {
    width: 100%;
    max-width: 560px;
    max-height: 88vh;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    padding: 0.9rem 1rem 1.4rem;
}
.school-sheet .school-panel-head { position: sticky; top: 0; background: var(--surface); padding-bottom: 0.4rem; z-index: 1; }
.school-sheet .sheet-x {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    margin-left: auto;
}
.school-sheet .sheet-x:hover { color: var(--text); }
@media (min-width: 560px) {
    .school-sheet-backdrop { align-items: center; }
    .school-sheet { border-radius: 16px; border-bottom: 1px solid var(--border); }
}

.school .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }

.status-pill {
    flex: none;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    padding: 1px 7px;
    border-radius: 999px;
    white-space: nowrap;
    background: var(--surface-2);
    color: var(--text-dim);
    border: 1px solid var(--border);
}
.status-pill.dismissed { color: var(--text-dim); border-color: var(--border); }
.status-pill.check { background: var(--check); border-color: var(--check); color: #1a1200; }
.school-month .chip.check { box-shadow: inset 0 0 0 1.5px var(--check); }
.school-item.check { border-color: color-mix(in srgb, var(--check) 60%, var(--border)); }
.row-typed { color: var(--check); font-weight: 600; margin-left: 0.4rem; }
.due-day {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    margin: 0.6rem 0 0.3rem;
}
.due-day.is-today { color: var(--today); }
.due-day .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.item-sub { color: var(--text-dim); font-size: 0.75rem; margin-top: 3px; }
.item-sub a { color: var(--text-dim); margin-left: 0.4rem; font-weight: 600; }
.attention-item { display: flex; align-items: stretch; gap: 4px; min-width: 0; }
.attention-item .school-row { flex: 1; }
.item-side { display: flex; align-items: center; gap: 0.4rem; flex: none; }
.dismiss-btn {
    flex: none;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 0.75rem;
    padding: 0.3rem 0.55rem;
    cursor: pointer;
    touch-action: manipulation;
}
.dismiss-btn:hover { color: var(--text); border-color: var(--text-dim); }
.status-pill.done { color: var(--done); border-color: color-mix(in srgb, var(--done) 40%, var(--border)); }
.status-pill.overdue, .status-pill.missing { background: var(--overdue); border-color: var(--overdue); color: #fff; }

/* Custody stays visible under schoolwork but quieter than in the family view. */
.school-month .day-cell.custody { background: color-mix(in srgb, var(--owner) 14%, var(--cell)); }
.school-month .day-cell.custody.split {
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--owner) 16%, var(--cell)) 0 50%,
        color-mix(in srgb, var(--owner2) 16%, var(--cell)) 50% 100%);
}
.school-month .day-cell { cursor: pointer; }
.school-month .day-cell.selected { border-color: var(--text); }
.school-month .chip.done { opacity: 0.4; text-decoration: line-through; }
.school-month .chip.overdue, .school-month .chip.missing { box-shadow: inset 0 0 0 1.5px var(--overdue); background: color-mix(in srgb, var(--chip) 55%, var(--overdue)); }

/* Phones: cells are too narrow for titles, so chips become color bars; the day panel has the text. */
@media (max-width: 600px) {
    .school-month { padding: 0.8rem 0.6rem 0.9rem; }
    .school-month .chip { font-size: 0; line-height: 0; height: 6px; padding: 0; border-radius: 3px; }
    .school-month .chip-more { font-size: 0.5rem; padding: 0; }
}

.school-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.9rem;
    margin-top: 0.6rem;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.course-group { border-top: 1px solid var(--border-soft); padding: 0.6rem 0 0.2rem; }
.course-group:first-of-type { border-top: none; padding-top: 0.1rem; }
.course-group h3 {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    margin: 0 0 0.4rem;
}
.school-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 0.6rem;
}
.school-item.overdue, .school-item.missing { border-color: color-mix(in srgb, var(--overdue) 55%, var(--border)); }
.school-item.done .item-main > a, .school-item.done .item-main > span { color: var(--text-dim); }
.item-main { min-width: 0; font-size: 0.9rem; overflow-wrap: anywhere; }
.item-main a { color: var(--text); text-decoration: none; font-weight: 600; }
.item-main a:hover { text-decoration: underline; }
.item-meta { color: var(--text-dim); font-size: 0.75rem; margin-top: 2px; }

/* Teacher agendas: raw text per course for the selected day, or a link when none was split out. */
.agenda-block { border-top: 1px solid var(--border-soft); margin-top: 0.8rem; padding-top: 0.7rem; display: flex; flex-direction: column; gap: 4px; }
.agenda-head { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); margin: 0 0 0.3rem; }
.agenda-row, .agenda-entry > summary {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    padding: 0.45rem 0.55rem;
}
.agenda-row, .agenda-entry { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; }
.agenda-row .row-course, .agenda-entry .row-course { flex: 1; color: var(--text); }
.agenda-block a { color: var(--text-dim); text-decoration: none; font-size: 0.78rem; white-space: nowrap; }
.agenda-block a:hover { color: var(--text); text-decoration: underline; }
.agenda-entry > summary { cursor: pointer; list-style: none; }
.agenda-entry > summary::-webkit-details-marker { display: none; }
.agenda-entry > summary::before { content: "▸"; color: var(--text-faint); font-size: 0.7rem; }
.agenda-entry[open] > summary::before { content: "▾"; }
.agenda-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text);
    padding: 0 0.7rem 0.6rem 1.6rem;
}
