/* Victor "Canvas" design system: tokens + shared .cv-* components.
   Used by base.html (app) and base_public.html (landing). */

/* ── Canvas design tokens (global) ── */
:root {
    --cv-bg:      #EEE9E4;
    --cv-surface: #FDFAF8;
    --cv-text:    #2A2A2A;
    --cv-body:    #55514D;
    --cv-muted:   #8A8A8A;
    --cv-accent:  #FF6A1A;
    --cv-border:  #DDD8D2;
    --cv-shadow:  0 1px 10px rgba(0,0,0,.07);
    --holiday-cell:  #e5ffe3;
    --weekend-cell:  #EDE6DF;
    --table-max-height: calc(100vh - 220px);
}

/* ── Canvas navbar ── */
nav.cv-navbar.navbar {
    background: var(--cv-surface) !important;
    border-bottom: 1px solid var(--cv-border) !important;
    border-top: none !important;
    box-shadow: 0 1px 10px rgba(0,0,0,.07);
    min-height: 56px;
    font-family: 'DM Sans', system-ui, sans-serif;
}
nav.cv-navbar .navbar-header { display: flex; align-items: center; }
nav.cv-navbar .navbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    height: 56px;
}
nav.cv-navbar .cv-brand-name {
    font-family: 'DM Serif Display', Georgia, serif;
    font-style: italic;
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--cv-text);
    letter-spacing: -.01em;
    line-height: 1;
}
nav.cv-navbar .cv-env {
    font-family: 'DM Sans', sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    background: var(--cv-accent);
    color: #fff;
    border-radius: 20px;
    padding: 2px 8px;
    margin-left: 2px;
}
nav.cv-navbar .cv-welcome {
    font-size: 11px;
    font-weight: 300;
    color: var(--cv-muted) !important;
    padding: 18px 10px 18px 0;
    pointer-events: none;
    letter-spacing: .03em;
}
nav.cv-navbar .navbar-nav > li > a {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .03em;
    color: var(--cv-muted) !important;
    padding: 18px 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}
nav.cv-navbar .navbar-nav > li > a:hover,
nav.cv-navbar .navbar-nav > li > a:focus {
    color: var(--cv-accent) !important;
    background: transparent !important;
}
nav.cv-navbar .navbar-nav > li > a svg { height: 14px; }
nav.cv-navbar .navbar-nav > li.active > a,
nav.cv-navbar .navbar-nav > li.active > a:hover { color: var(--cv-accent) !important; background: transparent !important;
                                                  box-shadow: inset 0 -2px 0 var(--cv-accent); }
/* primary calendar next to "Welcome" - a button opening the switch menu */
nav.cv-navbar .cv-nav-primary-wrap { position: relative; display: flex; align-items: center; min-width: 0; }
nav.cv-navbar .cv-nav-primary { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 360px;
                                margin-left: 6px; padding: 3px 10px; border: 1px solid var(--cv-border); border-radius: 14px;
                                background: var(--cv-surface); color: var(--cv-text); font: inherit; font-size: 12px;
                                white-space: nowrap; cursor: pointer; }
nav.cv-navbar .cv-nav-primary:hover, .cv-nav-primary-wrap.open .cv-nav-primary { border-color: var(--cv-accent); }
.cv-nav-caret { font-size: 10px; color: var(--cv-muted); transition: transform .12s; }
.cv-nav-primary-wrap.open .cv-nav-caret { transform: rotate(180deg); }
.cv-nav-cal-menu { position: absolute; top: calc(100% + 8px); left: 6px; z-index: 1050; width: 280px; max-width: calc(100vw - 20px);
                   border: 1px solid var(--cv-border); border-radius: 10px; background: var(--cv-surface);
                   box-shadow: 0 8px 24px rgba(0, 0, 0, .14); font-size: 12px; overflow: hidden; }
.cv-nav-cal-menu[hidden] { display: none; }
.cv-nav-menu-hd { padding: 10px 14px 6px; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--cv-muted); }
.cv-nav-cal-list { max-height: min(60vh, 420px); overflow-y: auto; padding-bottom: 6px; }
.cv-nav-season { padding: 8px 14px 2px; font-size: 11px; font-weight: 600; color: var(--cv-body); }
.cv-nav-cal { display: flex; align-items: center; gap: 6px; padding: 5px 14px; color: var(--cv-text); text-decoration: none; }
.cv-nav-cal:hover, .cv-nav-cal:focus, .cv-nav-menu-foot a:hover, .cv-nav-menu-foot a:focus { background: #FFF1E8; color: var(--cv-text); text-decoration: none; outline: none; }
.cv-nav-cal.on { font-weight: 600; }
.cv-nav-check { width: 12px; color: var(--cv-accent); font-weight: 700; }
.cv-nav-cal-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-nav-menu-foot { border-top: 1px solid var(--cv-border); padding: 4px 0; }
.cv-nav-menu-foot a { display: flex; align-items: center; gap: 8px; padding: 7px 14px; color: var(--cv-body); text-decoration: none; }
.cv-nav-menu-foot svg { width: 13px; height: 13px; }
.cv-nav-primary-lbl { font-size: 9px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--cv-muted); }
.cv-nav-primary-name { overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.cv-nav-primary-name.none { color: #C0392B; font-weight: 400; }
.cv-nav-primary-lock { display: inline-flex; color: #D93025; }
.cv-nav-primary-lock svg { width: 12px; height: 12px; }
nav.cv-navbar .cv-logo-symbol { display: none; }
@media (max-width: 767px) {
    /* phones: symbol instead of the full logo, no "Welcome", so the primary calendar name has room */
    nav.cv-navbar .cv-logo-full, nav.cv-navbar .cv-welcome-txt { display: none; }
    nav.cv-navbar .cv-logo-symbol { display: inline; }
    nav.cv-navbar .cv-nav-primary { max-width: calc(100vw - 150px); margin-left: 0; }
    .cv-nav-primary-lbl { display: none; }
    /* the badge sits on the right half of a phone: open the menu leftwards from its right edge */
    .cv-nav-cal-menu { left: auto; right: 0; width: min(280px, calc(100vw - 20px)); }
}
nav.cv-navbar .navbar-toggle {
    border: 1.5px solid var(--cv-border) !important;
    border-radius: 6px;
    background: transparent !important;
    margin: 10px 15px;
}
nav.cv-navbar .navbar-toggle:hover { background: rgba(93,138,123,.07) !important; }
nav.cv-navbar .navbar-toggle .icon-bar { background-color: var(--cv-muted); }

@media (max-width: 767px) {
    nav.cv-navbar .navbar-collapse {
        background: var(--cv-surface);
        border-top: 1px solid var(--cv-border);
        box-shadow: 0 4px 12px rgba(0,0,0,.08);
    }
    nav.cv-navbar .navbar-nav > li > a { padding: 12px 16px; }
}


/* ── Canvas page header ── */
.cv-hdr {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 16px;
    padding: 10px 0 10px;
}
.cv-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-style: italic;
    font-size: 2.4rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -.01em;
    color: var(--cv-text);
}
.cv-title-edit {
    display: flex;
    align-self: center;
    margin-left: -8px;
}
.cv-title-edit svg { width: 18px; height: 18px; }
.cv-count {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 300;
    color: var(--cv-muted);
    letter-spacing: .03em;
    align-self: center;
}
.cv-filters {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-left: auto;
}
.cv-filters .filter-dropdown {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 11.5px;
    border: 1.5px solid var(--cv-border);
    border-radius: 20px;
    padding: 4px 12px;
    background: var(--cv-surface);
    color: var(--cv-muted);
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}
.cv-filters .filter-dropdown.picked {
    border-color: var(--cv-accent);
    color: var(--cv-accent);
    background: rgba(93,138,123,.07);
}
.cv-filters a { display: flex; align-items: center; color: #C08080; }

/* ── Canvas page footer ── */
.cv-dropdown:hover {
    color: var(--cv-accent);
    border-color: var(--cv-accent);
}

.cv-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--cv-surface);
    border-top: 1px solid var(--cv-border);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    box-shadow: 0 -2px 12px rgba(0,0,0,.06);
    font-family: 'DM Sans', system-ui, sans-serif;
}
.cv-footer a.cv-back {
    font-size: 12px;
    font-weight: 500;
    color: var(--cv-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border: 1.5px solid var(--cv-border);
    border-radius: 20px;
    white-space: nowrap;
}
.cv-footer a.cv-back:hover { color: var(--cv-accent); border-color: var(--cv-accent); }
.cv-footer .cv-search {
    flex: 1;
    max-width: 240px;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 12px;
    border: 1.5px solid var(--cv-border);
    border-radius: 20px;
    padding: 5px 14px;
    background: var(--cv-bg);
    color: var(--cv-text);
    outline: none;
}
.cv-footer .cv-search:focus { border-color: var(--cv-accent); }
.cv-footer .cv-dl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--cv-border);
    border-radius: 50%;
    color: var(--cv-muted);
    background: transparent;
    cursor: pointer;
    text-decoration: none;
}
.cv-footer .cv-dl-btn:hover { border-color: var(--cv-accent); color: var(--cv-accent); }

/* ── Canvas hover popup ── */
#event-popup {
    font-family: 'DM Sans', system-ui, sans-serif;
    background: var(--cv-surface);
    border: 1px solid var(--cv-border);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
}
#popup-name      { font-size: 12.5px; font-weight: 600; color: var(--cv-text); margin-bottom: 4px; }
#popup-order     { font-size: 10px; color: var(--cv-muted); }
#popup-parent_name { font-size: 10px; color: var(--cv-accent); }
#popup-days      { font-size: 11px; color: var(--cv-text); margin-top: 3px; }
#popup-start, #popup-end, #children { font-size: 10px; color: var(--cv-muted); }

/* ── Canvas timeline table (.ttest) ── */
.ttest .table > tbody > tr > td,
.ttest .table > tbody > tr > th,
.ttest .table > thead > tr > td,
.ttest .table > thead > tr > th {
    padding: 0;
    line-height: 1.42857143;
    vertical-align: top;
    border-top: 1px solid var(--cv-border);
}
.ttest {
    border-radius: 5px;
    overflow: auto;
    box-shadow: 0 1px 10px rgba(0,0,0,.07);
    background: var(--cv-surface);
}
.ttest thead th {
    background: var(--cv-surface);
    color: white;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-weight: 400;
    letter-spacing: .04em;
    border-bottom: 2px solid var(--cv-border);
    border-top: none;
    border-left: none;
    border-right: none;
    background-color: #b8b2ac;
}
.ttest tbody th {
    background: #faf7f4;
    border-right: 1px solid var(--cv-border);
    border-bottom: 1px solid rgba(255,255,255,.3);
    border-top: none;
}
.ttest tbody th.event-cell {
    font-family: 'DM Sans', system-ui, sans-serif;
    min-width: 175px;
}
.ttest tbody th.event-cell a {
    font-family: 'DM Sans', system-ui, sans-serif !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    color: var(--cv-text) !important;
}
.ttest tbody th.event-cell a:hover { color: var(--cv-accent) !important; }
.ttest td.event-cell {
    border-bottom: 1px solid rgba(255,255,255,.2);
    border-top: none;
}
.ttest td.event-cell a {
    font-family: 'DM Sans', system-ui, sans-serif !important;
    font-size: 8px !important;
    font-weight: 300;
}
.ttest tbody td:not(.event-cell):not(.col-break) {
    background: var(--cv-surface);
    border-bottom: 1px solid var(--cv-border);
    border-top: none;
}
/* timeline: US holidays in the header row, holiday / vacation days an event skips */
.ttest thead th.holiday-hdr {
    background-color: var(--holiday-cell);
    color: #2E7D32;
    cursor: help;
}
.holiday-hdr-name {
    font-size: 7px;
    line-height: 1.1;
    max-width: 44px;
    margin: 2px auto 0;
    white-space: normal;
}
.ttest td.event-cell.skipped-day { cursor: help; }
.ttest td.event-cell.skipped-day a { text-decoration: line-through; opacity: .6; }
.skipped-swatch {
    background: repeating-linear-gradient(135deg, #cfc9c3 0 3px, var(--cv-surface) 3px 6px);
    border: 1px solid #cfc9c3;
}
.popup-skipped { font-size: 10px; color: #C0392B; margin-top: 3px; }
.ttest .col-break {
    background: var(--cv-bg) !important;
    border: none !important;
    min-width: 10px;
    width: 10px;
}
.ttest .table-hover > tbody > tr:hover > td,
.ttest .table-hover > tbody > tr:hover > th {
    background-color: rgba(93,138,123,.06) !important;
}

/* ── Calendar view (.cal-*) ── */
.cal-container {
    padding: 0 20px;
    font-family: 'DM Sans', system-ui, sans-serif;
}
.cal-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1.5px solid var(--cv-border);
    border-radius: 50%;
    color: var(--cv-muted);
    font-size: 20px;
    line-height: 1;
    text-decoration: none;
    flex-shrink: 0;
    transition: border-color .15s, color .15s;
}
.cal-nav-btn:hover { border-color: var(--cv-accent); color: var(--cv-accent); text-decoration: none; }
.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    align-items: center;
    font-family: 'DM Sans', system-ui, sans-serif;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    color: var(--cv-muted);
    font-weight: 300;
    letter-spacing: .02em;
}
.legend-swatch {
    width: 22px;
    height: 10px;
    border-radius: 20px;
    display: inline-block;
    flex-shrink: 0;
}
.cal-grid-wrapper {
    border-radius: 10px;
    overflow: auto;
    max-height: calc(var(--table-max-height) - 30px); /* minus .legend row */
    background: var(--cv-bg);
    box-shadow: 0 1px 8px rgba(0,0,0,.07);
}
.cal-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 3px;
    table-layout: fixed;
}
.cal-grid td { border-radius: 6px; }
.cal-grid thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    text-align: center;
    padding: 8px 4px;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--cv-muted);
    background: var(--cv-bg);
    border-bottom: none;
}
.cal-grid thead th.weekend-hdr { color: #B0948A; }
.cal-cell {
    vertical-align: top;
    padding: 6px 5px;
    height: 108px;
    background: var(--cv-surface);
    width: 14.28%;
}
.cal-cell.other-month  { background: #F3EDE8; }
.weekend-cell { background: var(--weekend-cell) }
.holiday-cell { background: var(--holiday-cell) }
.cal-cell.today        { box-shadow: inset 0 0 0 2px var(--cv-accent); }
.day-num {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: var(--cv-text);
    margin-bottom: 2px;
    line-height: 1;
}
.day-num.other-month-num { color: #C4B8AE; }
.day-num.today-num       { font-weight: 700; color: var(--cv-accent); }
.holiday-label {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 8px;
    color: var(--cv-accent);
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.event-chip {
    display: block;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 9px;
    font-weight: 400;
    padding: 2px 6px;
    border-radius: 20px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(0,0,0,.55);
    line-height: 1.5;
    text-decoration: none;
}
.event-chip:hover { opacity: .85; color: rgba(0,0,0,.8); }
/* calendar: days an event skips (holiday / vacation = stripes, weekend for weekday-only events = light + dashed) */
.event-chip.chip-skipped { text-decoration: line-through; color: rgba(0,0,0,.4); cursor: help; }
.event-chip.chip-skipped-wknd { color: rgba(0,0,0,.4); outline: 1px dashed rgba(0,0,0,.25); outline-offset: -1px; cursor: help; }
.skipped-wknd-swatch { background: var(--cv-surface); outline: 1px dashed rgba(0,0,0,.3); outline-offset: -1px; }
.more-events {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 9px;
    font-weight: 300;
    color: var(--cv-muted);
    padding-left: 4px;
    cursor: pointer;
}
#cv-popup, #cv-list-popup {
    display: none;
    position: fixed;
    font-family: 'DM Sans', system-ui, sans-serif;
    background: var(--cv-surface);
    border: 1px solid var(--cv-border);
    border-radius: 10px;
    padding: 10px 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
    pointer-events: none;
    z-index: 9999;
    max-width: 260px;
    line-height: 1.6;
}
#cv-popup-name   { font-size: 12.5px; font-weight: 600; color: var(--cv-text); margin-bottom: 4px; }
#cv-popup-order  { font-size: 10px; color: var(--cv-muted); }
#cv-popup-parent { font-size: 10px; color: var(--cv-accent); }
#cv-popup-group, #cv-popup-team { font-size: 10px; color: var(--cv-muted); }
#cv-popup-days   { font-size: 11px; color: var(--cv-text); margin-top: 2px; }
#cv-popup-start, #cv-popup-end { font-size: 10px; color: var(--cv-muted); }
#cv-list-date {
    font-weight: 600;
    font-size: 11px;
    color: var(--cv-text);
    margin-bottom: 5px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--cv-border);
}
.list-popup-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
    font-size: 11px;
    color: var(--cv-text);
}
.list-popup-swatch {
    width: 18px;
    height: 9px;
    border-radius: 10px;
    flex-shrink: 0;
}

/* ── Canvas form page (event.html) ── */
.cv-page {
    max-width: 760px;
    margin: 0 auto;
    padding-bottom: 80px;
    font-family: 'DM Sans', system-ui, sans-serif;
}
.cv-card {
    background: var(--cv-surface);
    border-radius: 10px;
    box-shadow: 0 1px 10px rgba(0,0,0,.07);
    padding: 18px 20px 20px;
    margin-bottom: 14px;
}
.cv-card-hd {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--cv-muted);
    padding-bottom: 10px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--cv-border);
}
.cv-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 16px;
}
.cv-field { display: flex; flex-direction: column; gap: 4px; }
.cv-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .03em;
    color: var(--cv-muted);
    margin: 0;
}
.cv-label.input-r:after { color: #C08080; }
.cv-input {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 13px;
    width: 100%;
    height: 36px;
    border: 1.5px solid var(--cv-border);
    border-radius: 8px;
    padding: 6px 12px;
    background: var(--cv-bg);
    color: var(--cv-text);
    outline: none;
    transition: border-color .15s, background .15s;
}
.cv-input:focus { border-color: var(--cv-accent); background: var(--cv-surface); }
.cv-error { font-size: 10px; color: #C08080; }
.cv-input.cv-multi { height: auto; padding: 4px 8px; }
.cv-hint { font-size: 11px; color: var(--cv-muted); margin: 0 0 10px; }
.cv-field .cv-hint { margin: 0; }
.cv-card-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.cv-vac-dates { color: var(--cv-muted); font-weight: 300; }
.cv-vac-overlap { font-size: 11px; color: var(--cv-muted); white-space: nowrap; }
.cv-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .03em;
    padding: 7px 18px;
    border: 1.5px solid var(--cv-accent);
    border-radius: 20px;
    background: var(--cv-accent);
    color: #fff;
    cursor: pointer;
    transition: opacity .15s, background .15s, color .15s;
}
.cv-btn:hover { opacity: .9; }
.cv-btn-outline {
    background: transparent;
    border-color: var(--cv-border);
    color: var(--cv-muted);
}
.cv-btn-outline:hover,
.open > .cv-btn-outline { border-color: var(--cv-accent); color: var(--cv-accent); opacity: 1; }
.cv-btn svg { height: 12px; }
.cv-item-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 10px;
}
.cv-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgb(237,230,223,0.5);
    font-size: 12px;
    color: var(--cv-text);
    transition: background .15s;
}
.cv-item:hover { background: #ede6df; }
.cv-item a { color: var(--cv-text); text-decoration: none; }
.cv-item a.cv-item-del { color: var(--cv-muted); }
.cv-item a.cv-item-del:hover { color: #C08080; }
.cv-item-del svg { height: 13px; }

/* home: calendar rows (primary marker, lock/status icons) */
.cv-cal { border: 1px solid transparent; }
.cv-cal-name, .cv-cal-icons { display: flex; align-items: center; gap: 6px; }
.cv-cal-name { min-width: 0; }
.cv-cal svg { width: 14px; height: 14px; flex-shrink: 0; }
.cv-cal-icons { color: #cfc9c3; }
.cv-cal-icons .cv-cal-on { color: var(--cv-body); }
.cv-cal-icons .cv-cal-locked { color: #D93025; }
.cv-cal-action { display: flex; margin: 0; }
.cv-cal-action button { display: flex; padding: 0; border: 0; background: none; cursor: pointer; }
.cv-cal-toggle { color: inherit; }  /* grey like the other icons; .cv-cal-on / .cv-cal-locked (more specific) keep their colors */
.cv-cal-icons .cv-cal-toggle:hover, .cv-cal-icons .cv-cal-toggle:focus-visible { color: var(--cv-accent); }
.cv-cal-del { color: #bfbfbf; }
.cv-cal-del:hover { color: #D93025; }
.cv-cal-del-off { display: flex; color: #e4dfda; cursor: not-allowed; }
.cv-cal-star { display: flex; color: #cfc9c3; }
.cv-cal a.cv-cal-star:hover { color: var(--cv-accent); }
.cv-cal-primary { border-color: var(--cv-accent); background: var(--cv-surface); }
.cv-cal-primary:hover { background: var(--cv-surface); }
.cv-cal-primary .cv-cal-star { color: var(--cv-accent); }
.cv-cal-primary .cv-cal-star svg { fill: var(--cv-accent); }
/* home: active / inactive toggle */
.cv-toggle {
    display: inline-flex;
    padding: 3px;
    margin: 6px 0 4px;
    border: 1px solid var(--cv-border);
    border-radius: 20px;
    background: var(--cv-surface);
}
.cv-toggle-opt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--cv-muted);
    text-decoration: none;
    transition: background .15s, color .15s;
}
.cv-toggle-opt:hover, .cv-toggle-opt:focus { color: var(--cv-text); text-decoration: none; }
.cv-toggle-opt.on, .cv-toggle-opt.on:hover { background: var(--cv-accent); color: #fff; }
.cv-toggle-n { font-weight: 300; opacity: .8; }
.cv-cal-badge {
    padding: 1px 7px;
    border-radius: 10px;
    background: var(--cv-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 500;
}
.cv-add-section { margin-top: 4px; }
.cv-add-section .dropdown { width: max-content; margin: 0 auto; }
.cv-menu {
    font-family: 'DM Sans', system-ui, sans-serif;
    background: var(--cv-surface);
    border: 1px solid var(--cv-border);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
    max-height: 240px;
    overflow: auto;
    padding: 6px 0;
    min-width: 220px;
}
.cv-menu-search {
    display: block;
    width: calc(100% - 16px);
    margin: 2px 8px 6px;
    font-size: 12px;
    border: 1.5px solid var(--cv-border);
    border-radius: 20px;
    padding: 5px 12px;
    background: var(--cv-bg);
    color: var(--cv-text);
    outline: none;
}
.cv-emphasize { color: var(--cv-accent); }
.cv-menu-search:focus { border-color: var(--cv-accent); }
.cv-menu > li > a {
    font-size: 12px;
    color: var(--cv-text);
    padding: 5px 14px;
}
.cv-menu > li > a:hover { background: rgba(93,138,123,.08); color: var(--cv-accent); }
@media (max-width: 600px) {
    .cv-form-grid, .cv-item-list { grid-template-columns: 1fr; }
}

/* ── Canvas auth page (login.html) ── */
.cv-auth {
    max-width: 420px;
    padding-top: 12vh;
}

/* ── Canvas flash modal (_flash.html) ── */
.cv-flash-dialog { max-width: 420px; margin: 80px auto; padding: 0 16px; }
.modal-content.cv-flash {
    font-family: 'DM Sans', system-ui, sans-serif;
    background: var(--cv-surface);
    border: 1px solid var(--cv-border);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
    padding: 20px;
}
.cv-flash-body { display: flex; align-items: center; gap: 16px; }
.cv-flash-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--cv-border);
}
.cv-flash-text { min-width: 0; }
.cv-flash-title { font-size: 14px; font-weight: 600; color: var(--cv-text); line-height: 1.4; }
.cv-flash-line  { font-size: 12px; font-weight: 300; color: var(--cv-muted); margin-top: 4px; line-height: 1.5; }
.cv-flash-actions { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--cv-border); }


/* ════════════════════════════════════════════════════════════════
   Public pages (base_public.html, body.lp)
   ════════════════════════════════════════════════════════════════ */

/* ── Public base: darker muted for AA contrast, component tweaks ── */
body.lp {
    --cv-muted: #6E6A66;
    margin: 0;
    background: var(--cv-bg);
    color: var(--cv-text);
    font-family: 'DM Sans', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}
html:has(body.lp) { scroll-behavior: smooth; }
.lp *, .lp *::before, .lp *::after { box-sizing: border-box; }
.lp a { text-decoration: none; }
/* :not(.cv-btn) so link colours don't override button text colours */
.lp a:not(.cv-btn) { color: var(--cv-text); }
.lp a:not(.cv-btn):hover { color: var(--cv-accent); }
.lp *:focus-visible { outline: 2px solid var(--cv-accent); outline-offset: 2px; }
.lp img { display: block; max-width: 100%; }

.lp .cv-hdr { padding-bottom: 18px; }
.lp .cv-title { margin: 0; }
.lp .cv-count { align-self: auto; }
.lp .cv-card { margin-bottom: 0; box-shadow: var(--cv-shadow); }
.lp .cv-card-hd { margin-bottom: 18px; }
.lp .cv-btn { padding: 8px 18px; }
.lp .cv-btn:hover { color: #fff; }
.lp .cv-btn-outline:hover { color: var(--cv-accent); }
.lp .cv-item,
.lp .cv-item:hover { gap: 12px; background: rgba(237,230,223,.6); }

/* ── Public header / footer ── */
.lp-wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.lp-page { min-height: 100vh; display: flex; flex-direction: column; }
.lp-page > main { flex: 1; }
.lp-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--cv-surface);
    box-shadow: var(--cv-shadow);
}
.lp-header .lp-wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
}
.lp-logo { display: flex; align-items: center; }
.lp-logo img { height: 32px; }
.lp-nav {
    display: flex;
    gap: 22px;
    margin-left: auto;
    flex-wrap: wrap;
    font-size: 13px;
    font-weight: 500;
}
.lp .lp-nav a, .lp .lp-footer a { color: var(--cv-muted); }
.lp .lp-nav a:hover, .lp .lp-footer a:hover { color: var(--cv-accent); }
.lp-footer { background: var(--cv-surface); border-top: 1px solid var(--cv-border); }
.lp-footer .lp-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 16px;
    padding-bottom: 16px;
    font-size: 12px;
    color: var(--cv-muted);
}
.lp-footer img { height: 22px; }
.lp-footer-links { display: flex; gap: 18px; margin-left: auto; }

/* ── Public flash messages ── */
.lp-flash { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; }
.lp-flash-msg {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 10px;
    background: #FFE3D2;
    font-size: 13px;
}
.lp-flash-msg > div { flex: 1; }
.lp-flash-msg .cv-flash-line { color: var(--cv-body); }
.lp-flash-close {
    border: 0;
    background: none;
    font-size: 18px;
    line-height: 1;
    color: var(--cv-muted);
    cursor: pointer;
    padding: 0;
}

/* ── Landing (landing.html) ── */
.lp-section { max-width: 1160px; margin: 0 auto; padding: 40px 24px; scroll-margin-top: 60px; }
.lp-anchor { scroll-margin-top: 80px; }

.lp-hero {
    max-width: 1160px;
    margin: 0 auto;
    padding: 72px 24px 56px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 48px;
    align-items: center;
}
.lp-hero-text { display: flex; flex-direction: column; gap: 22px; }
.lp-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--cv-muted);
}
.lp-h1 {
    margin: 0;
    font-family: 'DM Serif Display', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(44px, 5.6vw, 72px);
    line-height: 1;
    letter-spacing: -.01em;
    text-wrap: balance;
}
.lp-lead { margin: 0; font-size: 17px; line-height: 1.6; color: var(--cv-body); max-width: 48ch; text-wrap: pretty; }
.lp-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.lp .lp-btn-lg { font-size: 13px; padding: 10px 22px; border-radius: 22px; }
.lp .lp-hero-shot { padding: 14px; }

.lp-shot img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.lp-r-16-10 { aspect-ratio: 16 / 10; }
.lp-r-4-3 { aspect-ratio: 4 / 3; }
.lp-r-3-4 { aspect-ratio: 3 / 4; }
.lp-r-9-19 { aspect-ratio: 9 / 19; }

.lp-stack { display: flex; flex-direction: column; gap: 14px; }
.lp-split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 28px;
    align-items: center;
}
.lp-text { display: flex; flex-direction: column; gap: 14px; }
.lp-h3 {
    margin: 0;
    font-family: 'DM Serif Display', Georgia, serif;
    font-weight: 400;
    font-size: 30px;
    line-height: 1.1;
}
.lp-body { margin: 0; font-size: 15px; line-height: 1.6; color: var(--cv-body); max-width: 46ch; text-wrap: pretty; }
.lp-body-wide { max-width: 60ch; }
.lp-pills { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 6px 10px; }
.lp-pills-sm { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.lp-pills .cv-item { justify-content: flex-start; }
.lp .cv-item.lp-blue { background: #ADD5F3; }
.lp .cv-item.lp-green { background: #D9EBC8; }
.lp .cv-item.lp-orange { background: #FFE3D2; }

.lp-waterfall { display: flex; flex-direction: column; gap: 8px; }
.lp-waterfall .cv-item { padding: 8px 14px; }
.lp-waterfall .cv-item span + span { color: var(--cv-muted); }
.lp-waterfall .cv-item.lp-orange span + span { color: #B3440A; }
.lp-indent-1 { margin-left: 24px; }
.lp-indent-2 { margin-left: 48px; }
.lp-indent-3 { margin-left: 72px; }

.lp-views-body { display: flex; flex-direction: column; gap: 22px; }
.lp-views { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.lp-view { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.lp-view figcaption { font-size: 12px; font-weight: 500; color: var(--cv-body); }

.lp-devices {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 2fr);
    gap: 12px;
    align-items: end;
}

.lp-quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.lp .lp-quote { margin: 0; padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 18px; }
.lp-quote-mark {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 48px;
    line-height: .6;
    color: var(--cv-accent);
    height: 22px;
}
.lp-quote blockquote {
    margin: 0;
    font-family: 'DM Serif Display', Georgia, serif;
    font-style: italic;
    font-size: 21px;
    line-height: 1.35;
    flex: 1;
    text-wrap: pretty;
}
.lp-quote figcaption {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 12px;
    border-top: 1px solid var(--cv-border);
}
.lp-quote-name { font-size: 13px; font-weight: 600; }
.lp-quote-role { font-size: 12px; color: var(--cv-muted); }

.lp-contact-section { padding-bottom: 80px; }
.lp .lp-contact { padding: 18px 20px 22px; }
.lp .lp-contact .cv-card-hd { margin-bottom: 22px; }
.lp-contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 32px; }
.lp-h2-contact {
    margin: 0;
    font-family: 'DM Serif Display', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(34px, 4vw, 48px);
    line-height: 1.05;
}
.lp-contact .lp-body { max-width: 42ch; }
.lp-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 16px; align-content: start; }
.lp-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.lp .lp-form-actions .cv-btn { padding: 8px 20px; }
.lp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lp-success {
    align-self: flex-start;
    padding: 8px 14px;
    border-radius: 20px;
    background: #FFE3D2;
    font-size: 13px;
}

/* ── compare: two-calendar diff table ── */
.cv-page.cv-page-wide { max-width: 1200px; }
.cv-diff-pick { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px 16px; align-items: end; }
.cv-diff-swap { display: inline-flex; align-items: center; gap: 6px; height: 36px; text-decoration: none; }
.cv-diff-swap svg { width: 14px; height: 14px; }
.cv-diff-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 14px; }
.cv-diff-mode .cv-toggle { margin: 0; }
.cv-diff-mode .cv-hint { margin: 0; }
.cv-diff-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.cv-diff-stat { background: var(--cv-surface); border-radius: 10px; box-shadow: var(--cv-shadow); padding: 14px 16px; }
.cv-diff-stat-n { font-size: 22px; font-weight: 600; color: var(--cv-text); line-height: 1.2; }
.cv-diff-stat-l { font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--cv-muted); margin-top: 4px; }
.cv-diff-stat-s { font-size: 11px; color: var(--cv-body); margin-top: 2px; }
.cv-diff-wrap { margin-top: 10px; overflow-x: auto; border-radius: 10px; box-shadow: var(--cv-shadow); background: var(--cv-surface); }
.cv-diff { width: 100%; border-collapse: collapse; font-size: 12px; color: var(--cv-body); }
.cv-diff th { position: sticky; top: 0; background: #b8b2ac; color: #fff; font-size: 11px; font-weight: 400; letter-spacing: .04em;
              padding: 8px 10px; text-align: left; white-space: nowrap; }
.cv-diff td { padding: 8px 10px; border-top: 1px solid var(--cv-border); vertical-align: top; }
.cv-diff .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cv-diff-name { min-width: 170px; font-weight: 500; color: var(--cv-text); }
.cv-diff-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cv-diff-sub { font-size: 11px; font-weight: 300; color: var(--cv-muted); }
.cv-diff-changes { min-width: 200px; }
.cv-diff-field { color: var(--cv-muted); }
.cv-diff-na { color: var(--cv-muted); }
.cv-diff-later { color: #C0392B; font-weight: 500; }
.cv-diff-earlier { color: #2E7D32; font-weight: 500; }
.cv-diff-pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 10px; font-weight: 500;
                text-transform: uppercase; letter-spacing: .04em; background: var(--cv-bg); color: var(--cv-muted); }
.cv-diff-pill.added { background: #DFF3E3; color: #2E7D32; }
.cv-diff-pill.removed { background: #FBE0DD; color: #C0392B; }
.cv-diff-pill.changed { background: #FFE3D2; color: #B8470C; }
.cv-diff-removed .cv-diff-name a { text-decoration: line-through; }
.cv-diff-unchanged { opacity: .6; }
.cv-diff-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* add event from another calendar (event.html) + compare "Add to A/B" */
.cv-import-toggle { margin: 0 0 14px; }
.cv-import-search { margin: 4px 0 12px; }
.cv-import-list { display: flex; flex-direction: column; }
.cv-import-group { padding: 10px 0; border-top: 1px solid var(--cv-border); }
.cv-import-group[hidden] { display: none; }
.cv-import-name { font-size: 13px; font-weight: 600; color: var(--cv-text); margin-bottom: 4px; }
.cv-import-ver { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0 6px 12px; font-size: 12px; }
.cv-import-src { min-width: 0; }
.cv-import-actions { display: flex; flex-shrink: 0; gap: 6px; margin: 0; }
.cv-import-actions .cv-btn, .cv-diff-add .cv-btn { padding: 3px 10px; font-size: 11px; }
.cv-import-more summary { padding-left: 12px; font-size: 11px; color: var(--cv-muted); cursor: pointer; }
.cv-diff-add { margin: 6px 0 0; }
@media (max-width: 767px) {
    .cv-import-ver { flex-direction: column; align-items: flex-start; }
}

/* delete event: danger zone (event.html) + confirmation page (event_delete.html) */
.cv-btn.cv-btn-danger { background: #C0392B; border-color: #C0392B; color: #fff; text-decoration: none; }
.cv-btn.cv-btn-danger:hover, .cv-btn.cv-btn-danger:focus { background: #A93226; color: #fff; text-decoration: none; }
.cv-card-actions a.cv-btn { text-decoration: none; }
.cv-danger-zone { margin-top: 28px; border: 1px solid #F1C4BE; }
.cv-danger-zone .cv-card-hd { color: #C0392B; }
.cv-danger-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cv-danger-row .cv-hint { margin: 0; }
/* views: notice when a page shows a calendar other than the primary one (_event_filters.html) */
.cv-other-cal { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 10px 0 4px; padding: 9px 14px;
                border: 1px solid #F3D38A; border-radius: 10px; background: #FFF8E6; font-size: 12px; color: var(--cv-text); }
.cv-other-cal svg { width: 16px; height: 16px; color: #B8860B; flex-shrink: 0; }
.cv-other-cal a { font-weight: 500; color: #B8470C; }

/* events list (events.html) */
.cv-ev-hdr { align-items: center; }
.cv-ev-lock { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.cv-ev-lock svg, .cv-ev-links svg { width: 14px; height: 14px; }
.cv-ev-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-left: auto; font-size: 12px; }
.cv-ev-links a { display: inline-flex; align-items: center; gap: 5px; color: var(--cv-muted); text-decoration: none; }
.cv-ev-links a:hover { color: var(--cv-accent); }
.cv-ev-filters { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
.cv-ev-frow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.cv-ev-q { flex: 1 1 240px; }
.cv-ev-team { flex: 0 1 180px; }
.cv-ev-date { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 11px; font-weight: 500; color: var(--cv-muted); }
.cv-ev-date .cv-input { width: 150px; }
.cv-ev-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-ev-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 14px;
    border: 1.5px solid var(--cv-border); background: var(--cv-surface); color: var(--cv-body);
    font-size: 11px; line-height: 1.5; cursor: pointer;
}
.cv-ev-chip i, .cv-ev-group i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.cv-ev-chip:hover { border-color: var(--cv-accent); }
.cv-ev-chip[aria-pressed="true"] { border-color: var(--cv-accent); background: #FFE3D2; color: var(--cv-text); }
.cv-ev-chip.rule { border-style: dashed; }
.cv-ev-chip.rule[aria-pressed="true"] { border-style: solid; }
.cv-ev-status { justify-content: space-between; font-size: 12px; color: var(--cv-muted); }
.cv-ev-clear { border: none; background: none; padding: 0; color: var(--cv-muted); font-size: 12px; text-decoration: underline; cursor: pointer; }
.cv-ev-clear:hover { color: var(--cv-accent); }
.cv-sort { border: none; background: none; padding: 0; color: inherit; font: inherit; letter-spacing: inherit; cursor: pointer; }
.cv-sort:hover { text-decoration: underline; }
.cv-ev .cv-sort-arrow { font-size: 10px; }
.cv-ev td { vertical-align: middle; }
.cv-ev-group { white-space: nowrap; }
.cv-ev-group i { margin-right: 6px; }
.cv-ev-starts { min-width: 170px; }
.cv-ev-starts a { color: var(--cv-body); }
.cv-ev-rules { white-space: nowrap; }
.cv-tag { display: inline-block; padding: 0 6px; margin: 1px 2px 1px 0; border-radius: 8px; background: var(--cv-bg);
          color: var(--cv-body); font-size: 10px; line-height: 1.7; }
.cv-tag.fixed { background: #E3ECF8; color: #2B5C9E; }
.cv-tag.warn { background: #FBE0DD; color: #C0392B; }
.cv-ev-actions { white-space: nowrap; text-align: right; }
.cv-ev-actions a, .cv-ev-actions span { display: inline-flex; margin-left: 8px; }
.cv-ev-actions svg { width: 15px; height: 15px; }
.cv-ev-empty { padding: 18px; text-align: center; font-size: 13px; color: var(--cv-muted); }
.cv-footer button.cv-dl-btn { cursor: pointer; }
/* events list: edit in place */
.cv-ev-status-r { display: inline-flex; align-items: center; gap: 14px; }
.cv-ev-edit { padding: 3px 12px; border-radius: 14px; border: 1.5px solid var(--cv-border); background: var(--cv-surface);
              color: var(--cv-body); font-size: 11px; font-weight: 500; cursor: pointer; }
.cv-ev-edit:hover { border-color: var(--cv-accent); }
.cv-ev-edit[aria-pressed="true"] { background: var(--cv-accent); border-color: var(--cv-accent); color: #fff; }
.cv-ev-edit.off { cursor: not-allowed; opacity: .6; }
.cv-ev .ed { display: none; }
.cv-ev.editing .ro { display: none; }
.cv-ev.editing .ed { display: inline-flex; }
.cv-ev.editing .cv-ev-rules .ed { gap: 3px; }
.cv-ev-in { height: 26px; padding: 1px 6px; border: 1.5px solid var(--cv-border); border-radius: 6px; background: var(--cv-bg);
            color: var(--cv-text); font-size: 12px; outline: none; }
.cv-ev-in:focus { border-color: var(--cv-accent); background: var(--cv-surface); }
.cv-ev-days { width: 64px; text-align: right; }
.cv-ev-tog { padding: 0 7px; border-radius: 8px; border: 1px dashed var(--cv-border); background: transparent;
             color: var(--cv-muted); font-size: 10px; line-height: 1.7; cursor: pointer; }
.cv-ev-tog.on { border: 1px solid transparent; background: var(--cv-bg); color: var(--cv-body); }
.cv-ev-tog:hover { border-color: var(--cv-accent); }
.cv-ev tr.saving { opacity: .55; }
.cv-ev tr.cv-ev-edited td { background: rgba(255, 106, 26, .08); }
.cv-ev tr.cv-ev-moved td { background: rgba(255, 205, 86, .16); }
.cv-ev tr.cv-ev-moved .cv-ev-dates { color: #B8470C; font-weight: 500; }
.cv-ev-toast { position: sticky; bottom: 64px; z-index: 5; display: flex; align-items: center; gap: 12px; margin: 10px auto 0;
               padding: 9px 14px; max-width: 100%; width: fit-content; border-radius: 10px; background: var(--cv-text);
               color: #fff; font-size: 12px; box-shadow: 0 4px 16px rgba(0, 0, 0, .18); }
.cv-ev-toast[hidden] { display: none; }
.cv-ev-toast.error { background: #C0392B; }
.cv-ev-toast .cv-ev-clear { color: #FFD2B8; }
/* shared filter header on Timeline / Calendar (_event_filters.html) */
.cv-ev-n { font-weight: 600; color: var(--cv-muted); }
.cv-ev-chip[aria-pressed="true"] .cv-ev-n { color: var(--cv-text); }
.cv-ev-range { margin-left: 4px; }
.cv-ev-range .cv-ev-clear { text-decoration: none; font-size: 14px; line-height: 1; }
.cv-ev-status > span:first-child { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.cal-month-nav { align-items: center; gap: 10px; padding-top: 0; }
.cal-month-nav .cv-title { font-size: 1.8rem; }
.cal-cell.out-of-range { background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(0, 0, 0, .025) 6px 12px); }
.cal-cell.out-of-range .day-num { opacity: .4; }

/* events list: tree view, review chips, bulk edit */
.cv-ev .ed-col { display: none; width: 28px; }
.cv-ev.editing .ed-col { display: table-cell; }
.cv-ev .ed-col input { accent-color: var(--cv-accent); }
.cv-ev-namewrap { display: flex; align-items: flex-start; gap: 4px; }
.cv-ev-caret { display: none; flex: 0 0 16px; width: 16px; height: 18px; padding: 0; border: none; background: none;
               color: var(--cv-muted); font-size: 11px; line-height: 18px; cursor: pointer; transition: transform .12s; }
.cv-ev-caret[aria-expanded="false"] { transform: rotate(-90deg); }
.cv-ev-caret:hover { color: var(--cv-accent); }
.cv-ev.tree .cv-ev-caret { display: inline-block; }
.cv-ev.tree td.cv-diff-name { padding-left: calc(6px + min(var(--depth, 0), 12) * 18px); }
.cv-ev tr.cv-ev-context td { opacity: .45; }
.cv-ev-view { margin: 0; }
.cv-ev-view .cv-toggle-opt { border: none; background: none; padding: 3px 12px; }
.cv-ev-view .cv-toggle-opt.on { background: var(--cv-accent); color: #fff; }
.cv-ev-treeonly { display: inline-flex; gap: 12px; }
.cv-ev-treeonly[hidden] { display: none; }
.cv-sort:disabled { cursor: default; text-decoration: none; }
.cv-ev-chip b { font-weight: 600; }
.cv-ev-chip.attn b { color: #C0392B; }
.cv-ev-bulk { position: sticky; top: 70px; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
              margin: 0 0 10px; padding: 8px 12px; border: 1.5px solid var(--cv-accent); border-radius: 10px;
              background: #FFF4EC; font-size: 12px; box-shadow: var(--cv-shadow); }
.cv-ev-bulk[hidden] { display: none; }
.cv-ev-bulk.saving { opacity: .6; pointer-events: none; }
.cv-ev-bulk select.cv-ev-in { max-width: 170px; }
.cv-ev-bulk-days { display: inline-flex; gap: 4px; }
.cv-ev-bulk .cv-ev-bulk-del { border-color: #F1C4BE; color: #C0392B; }
.cv-ev-bulk .cv-ev-bulk-del:hover { background: #FBE0DD; }
.cv-ev-toast-x { border: none; background: none; color: #fff; font-size: 16px; line-height: 1; padding: 0 2px; cursor: pointer; opacity: .8; }
@media (max-width: 767px) {
    .cv-ev-links { margin-left: 0; }
    .cv-ev-date .cv-input { width: 130px; }
}

.cv-rename-all { display: flex; align-items: flex-start; gap: 6px; margin: 2px 0 0; font-size: 11px; font-weight: 400; color: var(--cv-body); cursor: pointer; }
.cv-rename-all input { margin: 1px 0 0; accent-color: var(--cv-accent); }
.cv-row-del a, .cv-row-del span { display: inline-flex; }
.cv-row-del svg { width: 15px; height: 15px; }
.cv-diff-add { display: inline-block; margin-right: 4px; }
.cv-diff-add .cv-btn-danger-outline { border-color: #F1C4BE; color: #C0392B; background: transparent; }
.cv-diff-add .cv-btn-danger-outline:hover { background: #FBE0DD; color: #C0392B; text-decoration: none; }
.cv-del-facts { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--cv-body); margin-bottom: 10px; }
.cv-del-warn { color: #C0392B; }
.cv-del-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin: 0 0 8px;
              border: 1.5px solid var(--cv-border); border-radius: 8px; cursor: pointer; font-weight: 400; }
.cv-del-opt:has(input:checked) { border-color: var(--cv-accent); background: rgba(255, 106, 26, .04); }
.cv-del-opt input { margin-top: 3px; accent-color: var(--cv-accent); }
.cv-del-opt > span { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--cv-text); }
.cv-del-impact { font-size: 12px; font-weight: 500; color: #B8470C; }
@media (max-width: 767px) {
    .cv-danger-row { flex-direction: column; align-items: flex-start; }
}

/* compare: overlay timeline - B bar filled (group color), A bar dashed outline behind it */
.cv-gantt-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 12px 0 0; font-size: 12px; color: var(--cv-body); }
.cv-gantt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cv-gantt-key { display: inline-block; width: 22px; height: 10px; border-radius: 3px; }
.cv-gantt-key.b { background: rgba(255, 106, 26, .45); }
.cv-gantt-key.a { border: 1.5px dashed #6F6A65; height: 14px; }
.cv-gantt-key.today { width: 2px; height: 14px; border-radius: 0; background: var(--cv-accent); }
/* scrolls both ways inside the card, so the date axis (top) and event names (left) stay in view */
.cv-gantt-scroll { max-height: 75vh; overflow: auto; }
.cv-gantt { position: relative; min-width: 900px; font-size: 12px; }
.cv-gantt-row { display: flex; height: 24px; border-top: 1px solid rgba(221, 216, 210, .6); }
.cv-gantt-row:hover { background: rgba(255, 106, 26, .05); }
.cv-gantt-label {
    position: sticky; left: 0; z-index: 2; flex: 0 0 220px; display: flex; align-items: center; gap: 6px;
    padding: 0 10px; background: var(--cv-surface); border-right: 1px solid var(--cv-border);
    white-space: nowrap; overflow: hidden;
}
.cv-gantt-label a { overflow: hidden; text-overflow: ellipsis; color: var(--cv-text); }
.cv-gantt-track { position: relative; flex: 1; margin: 0 12px; }
.cv-gantt-axis { height: 28px; border-top: none; position: sticky; top: 0; z-index: 3; background: #b8b2ac; }
.cv-gantt-axis .cv-gantt-label { background: #b8b2ac; color: #fff; font-size: 11px; letter-spacing: .04em; border-right-color: rgba(255,255,255,.3); }
.cv-gantt-axis .cv-gantt-track span { position: absolute; top: 7px; transform: translateX(-50%); color: #fff; font-size: 10px; white-space: nowrap; }
.cv-gantt-axis .cv-gantt-track span:first-child { transform: none; }
.cv-gantt-grid { position: absolute; top: 0; bottom: 0; left: 232px; right: 12px; pointer-events: none; }
.cv-gantt-grid i { position: absolute; top: 28px; bottom: 0; width: 1px; background: rgba(0, 0, 0, .06); }
.cv-gantt-grid i.today { width: 2px; background: var(--cv-accent); opacity: .7; z-index: 1; }
.cv-gantt-bar { position: absolute; border-radius: 3px; min-width: 3px; }
.cv-gantt-bar.a { top: 3px; bottom: 3px; border: 1.5px dashed #6F6A65; background: rgba(255, 255, 255, .35); }
.cv-gantt-bar.b { top: 7px; bottom: 7px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.cv-diff-removed .cv-gantt-bar.a { border-color: #C0392B; background: rgba(192, 57, 43, .08); }
.cv-diff-added .cv-gantt-bar.b { box-shadow: 0 0 0 1.5px #2E7D32; }
.cv-gantt-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; }
.cv-gantt-dot.changed { background: #B8470C; }
.cv-gantt-dot.added { background: #2E7D32; }
.cv-gantt-dot.removed { background: #C0392B; }
@media (max-width: 767px) {
    .cv-gantt-label { flex-basis: 140px; }
    .cv-gantt-grid { left: 152px; }
    .cv-diff-pick { grid-template-columns: 1fr; }
    .cv-diff-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ── User manual (help.html) ── */
.cv-page.cv-help { max-width: 860px; color: var(--cv-body); font-size: 14px; line-height: 1.6; }
.cv-help .cv-lede { font-size: 15px; margin: 0 0 18px; }
.cv-help-toc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 16px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.cv-help-toc a { color: var(--cv-text); }
.cv-help-toc a:hover { color: var(--cv-accent); }
.cv-help section { scroll-margin-top: calc(var(--nav-h, 71px) + 12px); }
.cv-help h2 { font-family: 'DM Serif Display', Georgia, serif; font-style: italic; font-weight: 400; font-size: 1.8rem;
              color: var(--cv-text); margin: 34px 0 10px; }
.cv-help h3 { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--cv-text); margin: 18px 0 6px; }
.cv-help .cv-card h3:first-child { margin-top: 0; }
.cv-help p { margin: 0 0 10px; }
.cv-help ul, .cv-help ol { padding-left: 20px; margin: 0 0 10px; }
.cv-help li { margin-bottom: 4px; }
.cv-help b { color: var(--cv-text); font-weight: 600; }
.cv-help .ui { font-size: 12px; font-weight: 500; color: var(--cv-text); background: var(--cv-bg);
               border: 1px solid var(--cv-border); border-radius: 6px; padding: 0 6px; white-space: nowrap; }
.cv-help-key { border-left: 3px solid var(--cv-accent); }
.cv-help-key ol { margin: 0; }
.cv-help-note { font-size: 13px; background: var(--cv-bg); border-radius: 8px; padding: 10px 14px; margin: 10px 0; }
.cv-help table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0 12px; }
.cv-help th { text-align: left; font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
              color: var(--cv-muted); border-bottom: 1px solid var(--cv-border); padding: 6px 10px 6px 0; }
.cv-help td { vertical-align: top; border-bottom: 1px solid var(--cv-border); padding: 7px 10px 7px 0; }
.cv-help tr:last-child td { border-bottom: none; }
.cv-help td:first-child { white-space: nowrap; color: var(--cv-text); font-weight: 500; }
.cv-help-top { font-size: 12px; }
@media (max-width: 767px) {
    .cv-help-toc { grid-template-columns: repeat(2, 1fr); }
    .cv-help td:first-child { white-space: normal; }
}
