/* Application components in the selected purple and lime visual language.
   Layout, responsive tables and source controls remain in app.css. */
body { background: var(--paper); }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 4px;
}
.brand { font-size: 32px; letter-spacing: -1.7px; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; background: var(--accent); }
.brand-dot, .green-dot { color: var(--accent); }
.button { border-radius: 14px; font-weight: 600; box-shadow: none; }
.button.small { border-radius: 11px; }
.button-green { background: var(--lime); color: var(--ink); }
.button-green:hover:not(:disabled) { background: #c9ed64; }
.button-light { background: var(--accent-soft); color: var(--accent-dark); }
.button-outline { border-color: var(--line); color: var(--ink); background: white; }
.button-outline:hover:not(:disabled) { background: var(--accent-soft); border-color: #d0c1ee; }
.text-link, .subtle-link, .table-link, .auth-switch a, .label-row a,
.check-label a { color: var(--accent-dark); }
.table-link { text-decoration-color: #d0c1ee; }
.eyebrow { color: var(--accent-dark); font-weight: 600; }
.icon-button { color: var(--muted); border-radius: 11px; }
.icon-button:hover { background: var(--accent-soft); color: var(--accent-dark); }
.icon-button.bordered { border-color: var(--line); }
.stack-form label, .form-two label { color: var(--ink); }
.stack-form input:not([type=checkbox]), .stack-form select, .stack-form textarea,
.table-toolbar select, .mobile-nav select, .search-field {
  border-color: #ccc3d9; border-radius: 12px; color: var(--ink); background: white;
}
.stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus,
.search-field:focus-within {
  border-color: var(--accent); box-shadow: 0 0 0 3px #7345ed12;
}
.stack-form input[readonly] { background: var(--surface); color: var(--muted); }
.stack-form input::placeholder, .search-field input::placeholder { color: #787080; }
.search-field input { color: var(--ink); }
.show-password { color: var(--muted); }
.check-label input, .scope-all input, .root-row input { accent-color: var(--accent); }
.notice { border-radius: 13px; }
.notice-info { background: var(--accent-soft); color: #58417d; }
.backup-retention { display: flex; align-items: flex-start; gap: 5px; max-width: 240px; margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.45; text-decoration: none; }
.backup-retention svg { flex: 0 0 auto; margin-top: 2px; }
.backup-retention:hover { color: var(--accent-dark); text-decoration: underline; }
.backup-table .row-actions { flex-wrap: wrap; max-width: 215px; }
.backup-table .backup-retention { white-space: normal; }
.deletion-review { max-width: 760px; padding: clamp(24px,4vw,40px); }
.deletion-review h2 { margin: 20px 0 14px; }
.deletion-review > p { color: var(--muted); line-height: 1.65; }
.deletion-review .notice { margin: 22px 0; }
.deletion-review form { margin-top: 24px; }
.deletion-review .deletion-review-note { margin: 28px 0 0; font-size: 13px; }
.notice-success { background: #f0f7df; color: #3b5619; }
.notice-error { background: #fff0ed; color: #a13c2f; }
.badge-neutral { background: #f0edf5; color: var(--muted); }
.badge-green { background: #edf6d7; color: #34500c; }
.badge-yellow { background: #fff3d8; color: #78550e; }
.toast { background: var(--ink); border-color: var(--ink); color: white; border-radius: 14px; }

/* Entry pages: the same archive illustration, curves and type as the home page. */
.auth-body { background: var(--paper); }
.auth-navigation { height: 96px; max-width: 1600px; margin: auto; padding: 0 48px; }
.auth-navigation>a:last-child { color: var(--muted); }
.auth-layout {
  max-width: 1600px; margin: auto; padding: 0 28px 28px; gap: 28px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: calc(100dvh - 96px);
}
.auth-story {
  background: var(--accent); color: white; border-radius: 30px;
  padding: 44px 9% 30px; min-height: 650px;
}
.auth-story .eyebrow { color: #f3edff; font-size: 12px; letter-spacing: .08em; }
.auth-story .status-dot { background: var(--lime); box-shadow: none; }
.auth-story h1 { font-size: clamp(42px, 4.3vw, 66px); line-height: 1.04; letter-spacing: -.06em; margin: 25px 0 22px; }
.auth-story h1>span { color: var(--lime); }
.auth-story p { color: #efe7ff; font-size: 18px; line-height: 1.7; max-width: 410px; }
.auth-story>small { color: #e7dbff; margin-top: auto; padding-top: 24px; }
.auth-art { width: 290px; height: 235px; margin: 24px 0 12px; isolation: isolate; }
.auth-ring { width: 310px; height: 190px; border-color: #b89af9; transform: rotate(-20deg); z-index: -1; }
.auth-art::before {
  content: ''; position: absolute; width: 168px; height: 178px; border-radius: 22px;
  background: var(--lime); transform: translate(15px, -16px) rotate(12deg); z-index: -1;
}
.auth-file {
  width: 168px; height: 178px; border-radius: 22px; background: white;
  color: var(--accent); gap: 17px; box-shadow: 0 24px 45px #3c16852b; transform: rotate(-8deg);
}
.auth-file>span { color: var(--ink); font-weight: 600; }
.auth-file i { background: var(--lime); color: var(--ink); box-shadow: none; right: -16px; bottom: 18px; }
.auth-art-note { background: var(--ink); color: white; border-radius: 13px; padding: 11px 16px; bottom: -1px; right: -8px; transform: rotate(4deg); }
.auth-form-wrap { padding: 32px 9%; }
.auth-form { max-width: 420px; }
.auth-form h2 { font-size: 40px; letter-spacing: -.055em; margin: 14px 0 18px; }
.auth-form>.eyebrow { font-size: 12px; letter-spacing: .1em; }
.auth-switch, .auth-footer, .fine-print, .auth-divider>span { color: var(--muted); }
.auth-divider>span { background: var(--paper); }
.auth-footer { max-width: 420px; margin-top: 30px; }

/* Workspace navigation and the dashboard. */
.app-body { background: var(--paper); }
.sidebar { background: white; padding-top: 30px; }
.sidebar nav { margin-top: 36px; }
.nav-item { color: var(--muted); border-radius: 13px; padding: 12px 15px; }
.nav-item:hover { background: var(--surface); color: var(--ink); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-dark); }
.nav-item>small { background: #e0d4fc; color: var(--accent-dark); border-radius: 6px; }
.sidebar-plan { background: var(--accent); border: 0; border-radius: 18px; padding: 18px; }
.sidebar-plan>div:first-child, .sidebar-plan p, .sidebar-plan>a { color: white; }
.sidebar-plan p>span { color: #e7dbff; }
.sidebar-plan .progress-track { background: #9975ed; height: 5px; }
.sidebar-plan .progress-track>i { background: var(--lime); }
.sidebar-plan>a { font-size: 14px; }
.sidebar-account strong { color: var(--ink); }
.sidebar-account small { color: var(--muted); }
.avatar, .top-avatar { background: var(--accent-soft); color: var(--accent-dark); }
.app-topbar { background: white; height: 76px; }
.breadcrumbs, .time-zone { color: var(--muted); }
.breadcrumbs>span { color: var(--ink); }
.top-avatar { height: 34px; width: 34px; }
.app-main { padding-top: 36px; }
.page-heading h1 { font-size: 36px; letter-spacing: -.055em; }
.page-heading p { color: var(--muted); }
.page-heading .eyebrow { color: var(--accent-dark); font-size: 12px; letter-spacing: .09em; }
.demo-banner { background: #f3efdF; border-color: #e9e3c9; color: #6c603a; border-radius: 14px; }
.demo-banner>a { color: #66552c; }
.stat-card { border-radius: 20px; padding: 24px; }
.stat-card>div, .stat-card p { color: var(--muted); }
.stat-card>div svg { color: var(--accent); }
.stat-card>strong { font-weight: 600; letter-spacing: -.06em; }
.stat-tint { background: var(--accent-soft); border-color: #e4d7ff; }
.stat-tint>strong { color: var(--accent-dark); }
.panel, .site-card { border-radius: 20px; }
.panel-header h2 { letter-spacing: -.035em; }
.panel-header p, .panel-header>.muted { color: var(--muted); }
.data-table th { background: #f8f6fd; border-color: var(--line); color: var(--muted); }
.data-table td { border-color: #eeeaf5; }
.data-table small, .backup-name small { color: var(--muted); }
.backup-table { min-width: 0; }
@media (min-width: 1251px) and (max-width: 1550px) {
  .backup-table th { font-size: 12px; letter-spacing: .025em; padding-inline: 12px; white-space: normal; }
  .backup-table td { padding-inline: 12px; }
  .backup-table .backup-name strong { max-width: 205px; }
  .backup-table .backup-name small { max-width: 205px; }
  .backup-table td:nth-child(2) small { font-size: 12px; }
  .backup-table .row-actions { gap: 6px; }
  .backup-table .row-actions .button.small { font-size: 14px; padding-inline: 10px; }
}
.table-file-icon, .site-icon, .large-icon, .feature-icon {
  background: var(--accent-soft); color: var(--accent); border-color: #e4d7ff; border-radius: 13px;
}
.protection-card { background: #edf6d7; border-color: #e0edbc; border-radius: 20px; }
.protection-symbol { background: var(--lime); color: var(--ink); }
.protection-card h3 { color: var(--ink); }
.protection-card p { color: #596146; }
.storage-location { border-color: #d9e4c2; color: #465335; }
.storage-location .badge-neutral { background: #e1ebcc; color: #4d5b3d; }
.storage-location .badge-green { background: #d8edb4; }
.protection-card>.subtle-link { color: #405723; }
.schedule-card>.panel-header, .schedule-line strong { color: var(--ink); }
.schedule-line p { color: var(--muted); }
.timeline-dot { background: var(--accent); border-color: var(--accent-soft); }
.timeline-dot.muted-dot { background: #c4b5df; }
.compact-site { border-radius: 16px; }
.compact-site strong { color: var(--ink); }
.compact-site span:not(.site-icon) { color: var(--muted); }
.empty-site-button, .add-site-tile { background: var(--surface); border-color: #cfc1e9; color: var(--accent-dark); border-radius: 20px; }
.add-site-tile>span { background: var(--accent-soft); border-color: #d9ccf2; }
.add-site-tile p, .empty-search { color: var(--muted); }
.app-footer { color: var(--muted); border-color: var(--line); }
.backup-summary, .onboarding-strip, .access-explainer { background: var(--accent-soft); border-color: #e1d6f7; border-radius: 18px; color: #58417d; }
.table-footnote, .onboarding-strip strong, .site-domain, .site-facts dt,
.site-facts dd, .demo-label { color: var(--muted); }
.onboarding-strip>div>span { background: white; border-color: #d4c4f1; color: var(--accent-dark); }
.site-facts>div { border-color: var(--line); }
.source-card { padding: 28px; }
.root-table { border-radius: 14px; }
.root-name svg { color: var(--accent); }
.root-row:hover { background: var(--surface); }
.root-row:has(input:checked) { background: #f6f2ff; }
.agent-instruction { background: var(--surface); color: var(--muted); border-radius: 14px; }
.access-explainer h3 { color: var(--ink); }
.access-explainer p { color: var(--muted); }
.billing-plan { background: var(--accent-soft); border-color: #e0d4f6; border-radius: 20px; }
.billing-plan h2, .billing-plan .price-main>strong { color: var(--accent-dark); }
.billing-plan>p, .billing-plan>small, .billing-usage { color: var(--muted); }
.progress-track { background: #e0d7ef; }
.progress-track>i { background: var(--accent); }
.invoice-form .panel-header, .invoice-preview, .invoice-preview strong { color: var(--ink); }
.invoice-preview { border-color: var(--line); }
.optional, .payment-methods, .payment-methods strong, .padded-form label small,
.local-hint, .local-hint p, .integration-card small { color: var(--muted); }
.integration-card code { background: var(--surface); color: var(--muted); border-color: var(--line); border-radius: 12px; }
.modal { border-color: var(--line); border-radius: 24px; box-shadow: 0 30px 100px #21182e30; }
.modal::backdrop { background: #21182e55; }
.modal-intro, .credentials dt { color: var(--muted); }
#add-site .source-address-row, #add-site .source-name-row { grid-template-columns: minmax(0, 1fr) 130px; }
#add-site .modal-header { align-items: center; }
#add-site .modal-header h2 { margin: 0; }
#add-site .stack-form { gap: 18px; margin-top: 24px; }
#add-site .muted { font-size: 14px; line-height: 1.6; margin: 0; }
.source-protocol-field { display: flex; flex-direction: column; gap: 8px; }
.field-title { position: relative; display: flex; align-items: center; gap: 6px; min-height: 25.6px; }
.field-title label { white-space: nowrap; }
.help-toggle { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 19px; width: 19px; height: 19px; padding: 0; border: 1px solid var(--muted); border-radius: 50%; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1; cursor: pointer; }
.help-toggle:hover, .help-toggle[aria-expanded="true"] { color: var(--accent-dark); border-color: var(--accent); background: var(--accent-soft); }
.help-popover { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; width: min(320px, calc(100vw - 72px)); padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); box-shadow: 0 8px 32px #21182e24; font-size: 14px; font-weight: 400; line-height: 1.6; }
.source-card .field-title { width: fit-content; max-width: 100%; }
.source-card .help-popover { left: 0; right: auto; }
.source-connection-options summary { cursor: pointer; color: var(--muted); }
.source-connection-options[open] summary { margin-bottom: 14px; }
@media (max-width: 400px) {
  #add-site .source-address-row { grid-template-columns: minmax(0, 1fr) 100px; gap: 10px; }
  #add-site .source-name-row { grid-template-columns: 1fr; }
}
.credentials dd { color: var(--ink); }
.credentials>div { border-color: var(--line); }
.mobile-nav { background: white; border-color: var(--line); }
.error-body, .invoice-body { background: var(--paper); color: var(--ink); }

@media (max-width: 1100px) and (min-width: 651px) {
  .auth-story { padding: 40px 8% 28px; }
  .auth-story h1 { font-size: 46px; }
  .auth-form-wrap { padding-inline: 7%; }
  .auth-art { transform: scale(.86); }
}
@media (max-width: 650px) {
  .brand { font-size: 28px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
  .auth-navigation { height: 84px; padding: 0 24px; }
  .auth-navigation>a:last-child { font-size: 14px; gap: 6px; }
  .auth-layout { display: block; min-height: calc(100dvh - 84px); padding: 12px 24px 28px; }
  .auth-story { display: none; }
  .auth-form-wrap { padding: 24px 0 12px; }
  .auth-form h2 { font-size: 36px; }
  .auth-footer { font-size: 12px; line-height: 1.7; }
  .mobile-nav { padding: 18px 20px; }
  .mobile-nav .brand { font-size: 26px; }
  .mobile-nav .brand-mark { height: 34px; width: 34px; border-radius: 11px; }
  .app-main { padding: 28px 20px 0; }
  .page-heading h1 { font-size: 32px; }
  .page-heading p { font-size: 17px; }
  .stat-card { padding: 20px 16px; border-radius: 16px; }
  .stat-card>div { font-size: 14px; }
  .stat-card>strong { font-size: 32px; }
  .panel, .site-card { border-radius: 18px; }
  .source-card { padding: 20px; }
}

.server-recovery pre{white-space:pre-wrap;overflow-wrap:anywhere;padding:20px;background:var(--surface-soft,#f6f4fa);border-radius:12px;font-size:14px;line-height:1.7}.server-recovery .button{margin-block:16px}.server-recovery td{overflow-wrap:anywhere}

.system-disk-list{border:1px solid var(--line);border-radius:12px;overflow:hidden;margin-block:16px}
.system-disk-row{display:grid;grid-template-columns:64px minmax(0,1fr) auto;align-items:center;gap:6px 16px;padding:16px}
.system-disk-row+.system-disk-row{border-top:1px solid var(--line)}
.system-disk-row .root-name{overflow-wrap:anywhere;font-size:14px;line-height:1.6}
.system-disk-row .root-size{white-space:nowrap;text-align:right}
.system-disk-row .root-state{grid-column:2/4;color:var(--muted);font-size:12px}
@media(max-width:650px){.system-disk-row{grid-template-columns:minmax(0,1fr) auto;gap:8px}.system-disk-row .root-name{grid-column:1/3;grid-row:2}.system-disk-row .root-state{grid-column:1/3}.system-disk-row .root-size{grid-column:2;grid-row:1}}

.agent-health{display:flex;gap:12px;padding:16px 18px;margin:18px 0;border-radius:12px;background:var(--accent-soft);font-size:13px;line-height:1.7}.agent-health>svg{flex:none;margin-top:3px;color:var(--accent)}.agent-health strong{font-size:13px}.agent-health p{margin:4px 0 0;color:var(--muted)}.agent-health small{display:block;color:var(--muted);margin-top:5px}.agent-health-error{background:#fff6e8}.operations-panel{margin-bottom:28px;scroll-margin-top:24px}.operations-settings{display:grid;grid-template-columns:minmax(260px,1fr) minmax(0,1fr);gap:32px;padding:0 26px 26px}.operations-settings p{font-size:13px;line-height:1.8;margin:0 0 14px}.operations-settings .button{justify-self:start}.operations-incident{display:flex;justify-content:space-between;gap:20px;border-top:1px solid var(--line);padding:20px 26px;align-items:start}.operations-incident>div{min-width:0}.operations-incident small{display:block;margin-top:6px;color:var(--muted);font-size:12px}.operations-incident p{font-size:13px;line-height:1.7;overflow-wrap:anywhere;margin:10px 0 0}.operations-incident .badge{flex:none}@media(max-width:700px){.operations-settings{grid-template-columns:1fr;padding:0 20px 22px;gap:22px}.operations-incident{flex-direction:column;padding:20px}.operations-panel .panel-header{align-items:start;flex-direction:column;gap:14px}}

.topbar-right { min-width: 0; }
.topbar-user { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); font-size: 14px; text-decoration: none; }
.topbar-user:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 8px; }
.topbar-email { max-width: min(35vw, 360px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu { position: relative; min-width: 0; z-index: 60; }
.account-menu > summary { cursor: pointer; list-style: none; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu-chevron { display: flex; color: var(--muted); transform: rotate(90deg); }
.account-menu[open] .account-menu-chevron { transform: rotate(-90deg); }
.account-menu-panel { position: absolute; top: calc(100% + 12px); right: 0; width: 250px; max-width: calc(100vw - 32px); padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 36px #251b3d1a; }
.account-menu:not([open]) .account-menu-panel { display: none; }
.account-menu-panel a, .account-menu-panel button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; box-sizing: border-box; }
.account-menu-panel a:hover, .account-menu-panel button:hover, .account-menu-panel a:focus-visible, .account-menu-panel button:focus-visible { background: var(--accent-soft); color: var(--accent-dark); outline: none; }
.account-menu-panel form { margin: 5px 0 0; padding-top: 5px; border-top: 1px solid var(--line); }
@media(max-width:1000px){.mobile-nav{flex-wrap:wrap;height:auto;gap:16px}.mobile-nav .account-menu{margin-left:auto}.mobile-nav .topbar-email{max-width:36vw;font-size:13px}.mobile-nav select{order:3;flex:1 0 100%;width:100%;max-width:none}.mobile-nav .account-menu-panel{top:calc(100% + 10px)}}

/* Live source inventory */
.loading-spinner { display:inline-block; width:18px; height:18px; flex:none; border:2px solid #ddd3ff; border-top-color:var(--accent); border-radius:50%; animation:source-spin .75s linear infinite; vertical-align:middle; }
.loading-spinner[hidden] { display:none; }
@keyframes source-spin { to { transform:rotate(360deg); } }
.source-progress { display:flex; align-items:center; gap:10px; min-height:26px; margin:16px 0; color:var(--muted); font-size:14px; }
.source-progress progress { width:100px; height:5px; margin-left:auto; accent-color:var(--accent); }
.source-content-grid { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); gap:24px; align-items:start; }
.source-content-grid > section { min-width:0; padding:20px; border:1px solid var(--line,#e6e1ef); border-radius:18px; }
.source-content-grid h3 { margin:0 0 18px; font-size:18px; }
.source-content-grid .root-table { margin-top:14px; scrollbar-gutter:stable; }
.source-content-grid .scope-all { font-size:14px; }
.source-content-grid .source-size-note { margin-bottom:0; font-size:12px; }
.source-content-grid .root-row { grid-template-columns:20px minmax(0,1fr) auto; gap:8px; padding:13px 26px 13px 14px; }
.source-content-grid .root-state { grid-column:2 / -1; font-size:11px; }
.root-name,.database-name { overflow-wrap:anywhere; }
.database-list { display:grid; gap:8px; }
.source-content-grid .database-row { display:grid; grid-template-columns:20px minmax(0,1fr) auto; align-items:center; gap:8px; padding:13px 26px 13px 14px; border:1px solid var(--line,#e6e1ef); border-radius:12px; cursor:pointer; }
.database-row:has(input:checked) { background:#f6f2ff; }
.database-row input { width:18px; height:18px; margin:0; accent-color:var(--accent); }
.database-name { display:grid; gap:5px; font-size:14px; }
.database-name small,.database-state { color:var(--muted); font-weight:400; font-size:11px; }
.database-state { grid-column:2 / -1; }
.database-size { font-size:13px; white-space:nowrap; }
.source-reconnect { margin:18px 0; }
.source-reconnect summary { cursor:pointer; color:var(--accent); font-weight:600; }
.source-reconnect form { margin-top:18px; }
.source-form-feedback { color:var(--muted); font-size:13px; }
.source-card[aria-busy=true] { opacity:1; }
.button .loading-spinner { width:15px; height:15px; border-color:currentColor; border-right-color:transparent; }
@media(max-width:1000px) { .source-content-grid { grid-template-columns:1fr; gap:16px; } }
@media(max-width:600px) { .source-content-grid > section { padding:14px; } .source-progress { flex-wrap:wrap; } .source-progress progress { width:100%; margin-left:28px; } }
@media(prefers-reduced-motion:reduce) { .loading-spinner { animation:none; } }

.source-grid { grid-template-columns:minmax(0,1fr); }
.database-list { max-height:440px; overflow:auto; }

/* Schedule presets share one time per day; advanced calendar choices stay compact. */
.source-schedule { margin:24px 0; padding-top:26px; }
.source-schedule .stack-form { max-width:920px; }
.schedule-fields { gap:22px; }
.schedule-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; }
.schedule-heading h3 { display:flex; align-items:center; gap:9px; margin:0; font-size:20px; }
.stack-form .schedule-switch { display:flex; flex-direction:row; align-items:center; gap:10px; cursor:pointer; font-size:14px; }
.schedule-switch input, .schedule-choice input { position:absolute; width:1px!important; height:1px!important; padding:0!important; margin:0!important; opacity:0; }
.schedule-switch-track { width:38px; height:22px; border-radius:20px; background:#c4bdcf; padding:3px; box-sizing:border-box; transition:background .15s; }
.schedule-switch-track::after { content:''; display:block; width:16px; height:16px; border-radius:50%; background:white; box-shadow:0 1px 3px #26193722; transition:transform .15s; }
.schedule-switch input:checked + .schedule-switch-track { background:var(--accent); }
.schedule-switch input:checked + .schedule-switch-track::after { transform:translateX(16px); }
.schedule-switch input:focus-visible + span, .schedule-choice input:focus-visible + span { outline:3px solid var(--accent); outline-offset:3px; }
.schedule-options { display:grid; gap:20px; }
.schedule-options[hidden], .schedule-options [hidden] { display:none!important; }
.schedule-fields fieldset { border:0; padding:0; margin:0; min-width:0; }
.schedule-fields legend { font-size:14px; font-weight:500; padding:0; margin-bottom:10px; }
.schedule-preset-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.stack-form .schedule-choice { position:relative; display:block; cursor:pointer; font-size:14px; }
.schedule-choice > span { display:flex; align-items:center; justify-content:center; min-height:48px; padding:9px 12px; border:1px solid var(--line); border-radius:12px; box-sizing:border-box; background:white; transition:background .15s,border-color .15s; }
.schedule-choice:hover > span { background:var(--surface); }
.schedule-choice input:checked + span { border-color:var(--accent); background:var(--accent-soft); color:var(--accent-dark); box-shadow:inset 0 0 0 1px var(--accent); font-weight:600; }
.schedule-day-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:8px; max-width:460px; }
.schedule-day > span { min-height:44px; padding:8px 4px; }
.schedule-time-grid { display:grid; grid-template-columns:180px minmax(180px,1fr); gap:18px; max-width:540px; }
.schedule-options > label { max-width:340px; }
.schedule-preview { display:flex; margin:0; padding:14px 16px; border-radius:12px; background:var(--surface); color:var(--ink); font-size:14px; line-height:1.6; }
@media(max-width:600px) {
  .schedule-preset-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .schedule-time-grid { grid-template-columns:minmax(0,1fr); gap:14px; }
  .schedule-heading { gap:14px; }
  .schedule-choice > span { padding:9px 6px; }
}

/* Project facts share one section divider; schedules reflect each saved project. */
.source-facts > div { border-bottom:0; }
.source-card { scroll-margin-top:100px; }
.overview-side > .schedule-card { align-self:start; width:100%; }
.project-schedule-list { max-height:440px; overflow:auto; scrollbar-gutter:stable; }
.project-schedule-list .schedule-line > div { min-width:0; }
.schedule-project-link { color:var(--ink); font-weight:600; text-decoration:none; overflow-wrap:anywhere; }
.schedule-project-link:hover { color:var(--accent-dark); text-decoration:underline; }
.project-schedule-list .schedule-line p { margin-bottom:0; }
.schedule-next { display:block; margin-top:6px; color:var(--muted); font-size:12px; line-height:1.6; }
.schedule-empty { margin:0 24px 20px; color:var(--muted); font-size:14px; }

.source-progress[hidden] ~ [data-scope-form] { margin-top:20px; }
