html {
  scroll-behavior: smooth;
}

body.is-voice-speaking #voice-heading { animation: heading-voice-pulse 1.05s ease-in-out infinite; text-shadow: 0 0 10px rgba(94,220,255,.8), 0 0 28px rgba(22,143,212,.65); }
body.is-voice-speaking #voice-heading em { color: #a9f3ff; }
@keyframes heading-voice-pulse { 0%,100% { transform: scale(1); filter: brightness(1); } 50% { transform: scale(1.018); filter: brightness(1.18); } }

.work-assigner { font-size: 11px; font-weight: 400; color: var(--muted); opacity: .8; }

.section-date { margin: 8px 0 0; color: var(--cyan); font-size: 13px; letter-spacing: .02em; }
.progress-panel { margin: 24px 0; }
.older-projects { grid-column: 1 / -1; }
#older-project-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.archive-month { grid-column: 1 / -1; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; background: rgba(255,255,255,.025); overflow: hidden; }
.archive-month > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; font-weight: 700; color: rgba(255,255,255,.92); }
.archive-month > summary::-webkit-details-marker { display: none; }
.archive-month > summary::after { content: '＋'; color: rgba(255,255,255,.55); font-size: 1.1rem; }
.archive-month[open] > summary::after { content: '−'; }
.archive-month > summary span { margin-left: auto; margin-right: 12px; color: rgba(255,255,255,.55); font-size: .85rem; }
.archive-month__orgs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 0 18px 18px; }
@media (max-width: 760px) { .archive-month__orgs { grid-template-columns: 1fr; } }
#progress-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.progress-card { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #091622; min-width: 0; }
.progress-card h3 { margin: 0; color: var(--cyan); font-size: 17px; }
.progress-card h4 { font-size: 12px; margin: 24px 0 14px; }
.progress-caption { font-size: 11px; color: var(--muted); line-height: 1.6; }
.progress-row { display: grid; grid-template-columns: 115px minmax(0,1fr) 24px; gap: 10px; align-items: center; margin: 12px 0; font-size: 12px; }
.progress-track { height: 7px; background: #23303e; border-radius: 6px; overflow: hidden; }
.progress-track i { display: block; height: 100%; }
.complete { background: #65ddc0; } .pending { background: #edbc69; } .active { background: #70bdff; } .cancelled { background: #e98eab; }
.progress-days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.progress-day { flex: 1 0 38px; text-align: center; font-size: 10px; color: var(--muted); }
.day-track { height: 68px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; border-bottom: 1px solid var(--line); margin: 6px 0; }
.day-track i { display: block; width: 12px; border-radius: 3px 3px 0 0; }
@media (max-width: 1100px) { #progress-charts { grid-template-columns: 1fr; } }

.summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.priority-panel { grid-column: 1 / -1; position: relative; border: 1px solid #f2bd5c; background: radial-gradient(circle at 90% 0, rgba(255,199,92,.16), transparent 30rem), linear-gradient(125deg, #382815, #121b26 70%); box-shadow: 0 0 34px rgba(242,189,92,.18), inset 0 1px rgba(255,235,190,.08); animation: priority-arrive .48s ease-out both; }
.priority-panel[hidden] { display: none; }
.priority-panel .eyebrow { color: #ffd58c; }
.priority-panel h2 { text-shadow: 0 0 18px rgba(255,213,140,.3); }
.priority-help { margin: 7px 0 0; color: #d9bc8b; font-size: 12px; }
.reminder-toggle { border-color: rgba(255,213,140,.4); background: rgba(255,213,140,.08); color: #ffe2ad; }
.reminder-toggle[aria-pressed="false"] { color: var(--muted); border-color: var(--line); background: transparent; }
@keyframes priority-arrive { from { opacity: .3; transform: translateY(-8px) scale(.992); } to { opacity: 1; transform: none; } }
#priority-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.organisation-column h3 { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.organisation-column h3 span { display: inline-grid; place-items: center; min-width: 42px; min-height: 42px; padding: 5px; border-radius: 12px; background: #183644; color: #95eaff; font-size: 25px; font-weight: 800; }
.work-item { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 14px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(10, 23, 35, .7); }
.work-check { appearance: auto; width: 24px; height: 24px; flex: 0 0 24px; margin: 0; accent-color: #63ddf9; cursor: pointer; }
.work-copy { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; }
.work-copy small { display: block; color: var(--muted); font-size: 11px; }
.work-action { flex-shrink: 0; min-width: 32px; min-height: 32px; border: 1px solid #784349; border-radius: 8px; background: #2c1921; color: #ffc2c2; font: inherit; cursor: pointer; }
.work-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.work-edit { width: 32px; min-height: 32px; padding: 0; border: 1px solid rgba(99,221,249,.28); border-radius: 8px; background: rgba(99,221,249,.07); color: #d7f7ff; font: inherit; font-size: 18px; font-weight: 700; line-height: 1; cursor: pointer; opacity: 0; transform: translateY(2px); transition: opacity .18s ease, transform .18s ease, border-color .18s ease, background .18s ease; }
.work-item:hover .work-edit, .work-edit:focus-visible { opacity: 1; transform: none; }
.work-edit:hover { border-color: rgba(99,221,249,.7); background: rgba(99,221,249,.14); }
.work-edit:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.drag-handle { flex: 0 0 28px; width: 28px; min-height: 32px; padding: 0; border: 0; background: transparent; color: #d9bc8b; font: inherit; font-size: 22px; font-weight: 700; line-height: 1; cursor: grab; touch-action: none; }
.drag-handle:active { cursor: grabbing; }
.work-item.is-dragging { opacity: .45; border-color: #ffd58c; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.work-item.is-completed b { text-decoration: line-through; opacity: .65; }
.work-item.is-cancelled b { opacity: .55; }
.work-check:focus-visible, .work-action:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.meeting { gap: 14px; align-items: center; }
.meeting-copy { display: grid; grid-template-columns: minmax(110px, .8fr) minmax(150px, 1.25fr) auto; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.meeting-copy strong { color: var(--cyan); font: 700 16px/1.3 "Space Grotesk", sans-serif; }
.meeting-copy b { font-size: 14px; }
.meeting-copy small { display: inline-flex; justify-content: center; padding: 7px 10px; border: 1px solid rgba(99,221,249,.22); border-radius: 999px; color: #d7f7ff; background: rgba(99,221,249,.07); font-size: 12px; white-space: nowrap; }
.meeting.is-completed { opacity: .65; }
.meeting.is-completed .meeting-copy b { text-decoration: line-through; }
.completed-meetings { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.completed-meetings h3 { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.note-actions { display: flex; align-items: center; gap: 12px; }
.dictate-button { min-height: 38px; padding: 8px 13px; border: 1px solid rgba(99,221,249,.24); background: rgba(99,221,249,.07); color: #d7f7ff; cursor: pointer; }
.dictate-button[aria-pressed="true"] { border-color: #ff8f8f; background: rgba(255,95,95,.12); color: #ffd5d5; }
.dictate-button:disabled { cursor: not-allowed; opacity: .5; }
@media (max-width: 720px) { .meeting-copy { grid-template-columns: 1fr; gap: 5px; } .meeting-copy small { justify-self: start; } }
@media (max-width: 720px) { .work-edit { opacity: 1; transform: none; } }
@media (max-width: 520px) { .work-item { align-items: flex-start; flex-wrap: wrap; } .work-copy { flex-basis: calc(100% - 82px); } .work-actions { width: 100%; justify-content: flex-end; } }
@media (max-width: 600px) { .summary-grid { grid-template-columns: 1fr; } }

.panel,
.summary-grid {
  scroll-margin-top: 30px;
}

.sidebar nav a.is-active {
  outline: 1px solid rgba(94, 220, 255, .42);
  box-shadow: inset 2px 0 var(--cyan), 0 0 20px rgba(94,220,255,.2), inset 0 0 18px rgba(94,220,255,.08);
  text-shadow: 0 0 12px rgba(148,235,255,.7);
}

.workspace > section,
.workspace-grid > .panel { transition: border-color .28s ease, box-shadow .28s ease; }
.workspace > section.is-view-active,
.workspace-grid > .panel.is-view-active {
  border-color: rgba(94,220,255,.38);
  box-shadow: 0 0 28px rgba(22,143,212,.14), inset 0 0 22px rgba(94,220,255,.035);
}

.sidebar__footer strong {
  color: var(--white);
  font-weight: 700;
}

.sidebar__footer strong[data-mode="saving"] {
  color: #f4c36a;
}

.sidebar__footer strong[data-mode="error"] {
  color: #ff8f8f;
}

.workspace { width: min(1380px, calc(100% - 52px)); min-width: 0; }
.app-shell { grid-template-columns: 260px minmax(0, 1fr); }
.panel { min-width: 0; }
.project, .task, .meeting { overflow-wrap: anywhere; }
.panel--projects, #tasks { grid-column: 1 / -1; grid-row: auto; }
#project-list, #task-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.organisation-column { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(5, 16, 27, .4); }
.organisation-column:nth-child(2) { border-color: rgba(170, 150, 255, .24); }
.organisation-column h3 { margin: 0 0 18px; color: var(--cyan); font: 600 19px/1.3 "Space Grotesk", sans-serif; }
.organisation-column:nth-child(2) h3 { color: #c8baff; }
.daily-group h4 span { color: var(--muted); font-size: 12px; }
.organisation-column .project, .organisation-column .task { margin-top: 10px; }
.organisation-column .project { align-items: flex-start; }
.organisation-column .pill, .check { flex-shrink: 0; }
.daily-group { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.daily-group h4 { display: flex; justify-content: space-between; margin: 0 0 10px; font-size: 13px; }
.daily-group .empty { padding: 0; line-height: 1.6; }
.task-history { margin-top: 20px; color: var(--muted); font-size: 12px; }
.task-history summary { cursor: pointer; padding: 10px 0; }
.panel__head { flex-wrap: wrap; }
@media (max-width: 1100px) {
  #project-list, #task-list { grid-template-columns: minmax(0, 1fr); }
}
.sidebar nav a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar__footer { display: block; position: static; margin-top: 12px; }
  .workspace { width: calc(100% - 30px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
