:root {
  --ink: #17212b;
  --muted: #5e6974;
  --line: #cdd3d7;
  --line-strong: #9eaab2;
  --paper: #fffefa;
  --wash: #f3f0e9;
  --nav: #101923;
  --nav-raised: #182532;
  --teal: #246b66;
  --teal-dark: #174e4a;
  --slate: #34495e;
  --charcoal: #202a33;
  --steel: #405f79;
  --forest: #38634e;
  --indigo: #4d567c;
  --bronze: #806a42;
  --oxide: #8a3b38;
  --amber: #9a6b27;
  --verified: #356b51;
  --blue: #405f79;
  --gold: #9a6b27;
  --rose: #8a3b38;
  --green-soft: #e8f0eb;
  --blue-soft: #e9eef2;
  --gold-soft: #f4eddf;
  --rose-soft: #f5e8e6;
  --shadow-soft: 0 12px 32px rgba(22, 31, 40, 0.08);
  --shadow-modal: 0 30px 90px rgba(9, 18, 27, 0.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ARCH-007: human context stays visually separate from provider proof. */
.change-observation-dialog {
  max-width: 760px;
}

.change-observation-trust {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 92%, var(--verified) 8%);
}

.change-observation-trust span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.change-context-story {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line));
  background: color-mix(in srgb, var(--paper) 94%, var(--gold) 6%);
  box-shadow: var(--shadow-soft);
}

.change-context-story > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.change-context-story h3,
.change-context-story h4 {
  margin: 0;
}

.change-context-story > header > span {
  color: var(--muted);
  font-weight: 700;
}

.change-observation-card {
  padding: 16px 18px;
  border-left: 5px solid var(--verified);
  background: var(--paper);
}

.change-observation-card.failed {
  border-left-color: var(--rose);
}

.change-observation-card > p {
  margin: 0 0 14px;
  font-size: 19px;
  line-height: 1.55;
}

.change-observation-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 0;
}

.change-observation-card dl div {
  display: grid;
  gap: 2px;
}

.change-observation-card dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.change-observation-card dd {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.change-context-timeline {
  display: grid;
  gap: 8px;
}

.change-context-timeline > div {
  display: grid;
  grid-template-columns: minmax(165px, 0.35fr) minmax(180px, 0.45fr) 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 9px 12px;
  border-left: 3px solid var(--steel);
  background: color-mix(in srgb, var(--paper) 90%, var(--blue) 10%);
}

.change-context-timeline time,
.change-context-timeline strong,
.change-context-timeline span {
  font-size: 16px;
}

.calendar-review-actions {
  align-content: start;
}

.calendar-review-actions .compact-button {
  min-height: 34px;
  white-space: nowrap;
}

.change-report-entry-context {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 2px solid var(--line);
}

.change-report-entry-context h3 {
  margin: 0;
  font-size: 18px;
}

.change-report-entry-observation {
  padding: 12px 14px;
  border-left: 4px solid var(--gold);
  background: color-mix(in srgb, var(--paper) 90%, var(--gold) 10%);
}

.change-report-entry-observation p {
  margin: 0 0 8px;
  font-size: 16px;
}

.change-report-entry-observation span,
.change-report-entry-observation small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  .change-context-story > header,
  .change-observation-card dl {
    display: grid;
    grid-template-columns: 1fr;
  }

  .change-context-timeline > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media print {
  body.printing-calendar-change-report .change-report-entry-context,
  body.printing-calendar-change-report .change-report-entry-observation {
    background: #fff !important;
    color: #111820 !important;
  }

  body.printing-calendar-change-report .change-report-entry-observation {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* PHASE-009: evidence intake, timeline clarity, and Day Proof containment. */
.email-evidence-fields,
.evidence-target-picker {
  min-width: 0;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 94%, var(--gold));
  padding: 14px;
}

.email-evidence-fields[hidden],
.evidence-target-picker[hidden] {
  display: none !important;
}

.email-evidence-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.email-evidence-fields:not([hidden]) {
  display: grid;
}

.email-evidence-fields legend,
.evidence-target-picker legend {
  padding: 0 6px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
}

.evidence-target-picker:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.change-report-source-statement {
  margin: 10px 0;
  border-left: 4px solid var(--gold);
  padding: 8px 12px;
  font-weight: 750;
}

.calendar-change-attribution {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.calendar-change-attribution span {
  display: grid;
  min-width: 0;
  overflow-wrap: anywhere;
}

.calendar-change-attribution b {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

@media (min-width: 901px) {
  .calendar-change-alert {
    grid-template-columns: minmax(180px, 0.9fr) minmax(125px, 0.5fr) minmax(220px, 0.9fr) minmax(240px, 1fr) minmax(205px, 0.75fr);
  }
}

.timeline-mode-controls .filter-button {
  min-width: 190px;
}

.timeline-mode-controls .filter-button.active,
.timeline-mode-controls .filter-button[aria-pressed="true"] {
  border-width: 2px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 18%, transparent);
  font-weight: 900;
}

.timeline-item.story-mode .timeline-content p {
  margin: 8px 0 0;
  font-size: 18px;
  line-height: 1.55;
}

.calendar-events.day-view,
.day-proof-view,
.day-proof-header,
.day-proof-section,
.day-proof-row,
.calendar-agenda-row,
.day-evidence-summary {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.day-proof-view {
  overflow: visible;
}

.day-proof-header,
.calendar-agenda-row,
.day-proof-row {
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}

.calendar-agenda-row > *,
.day-proof-row > *,
.day-proof-section > * {
  min-width: 0;
  max-width: 100%;
}

.day-proof-section img,
.day-proof-section video,
.day-proof-section iframe {
  max-width: 100%;
  height: auto;
}

@media (max-width: 760px) {
  .email-evidence-fields:not([hidden]),
  .evidence-target-picker:not([hidden]) {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--wash);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
select {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: var(--nav);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  flex: 0 0 auto;
  position: relative;
  background: #20323f;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.logo-shield {
  clip-path: polygon(50% 5%, 86% 19%, 80% 72%, 50% 94%, 20% 72%, 14% 19%);
}

.logo-doc {
  position: absolute;
  left: 14px;
  top: 10px;
  width: 15px;
  height: 20px;
  border: 2px solid #dbeafe;
  border-radius: 2px;
}

.logo-doc::before {
  content: "";
  position: absolute;
  right: -2px;
  top: -2px;
  border-top: 7px solid #dbeafe;
  border-left: 7px solid transparent;
}

.logo-doc::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 8px;
  height: 4px;
  border-left: 2px solid #7dd3c7;
  border-bottom: 2px solid #7dd3c7;
  transform: rotate(-45deg);
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 24px;
}

.brand span,
.side-panel p {
  color: #cbd5e1;
  font-size: 15px;
  line-height: 1.5;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 12px;
}

.nav-item {
  text-decoration: none;
  color: #e5e7eb;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
}

.side-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.side-label,
.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 800;
}

.side-panel .side-label {
  color: #94a3b8;
}

.side-panel strong {
  display: block;
  margin-bottom: 8px;
  font-size: 24px;
}

.main {
  padding: 28px;
  display: grid;
  gap: 18px;
  min-width: 0;
}

.ui-build-marker {
  position: sticky;
  top: 0;
  z-index: 20;
  width: fit-content;
  border: 2px solid #174d47;
  border-radius: 8px;
  background: #dff5ef;
  color: #123f3a;
  padding: 9px 14px;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 6px 18px rgba(15, 98, 90, 0.16);
}

.topbar,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  max-width: 790px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 890px;
  margin: 12px 0 0;
  color: #475467;
  line-height: 1.55;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

.primary-action,
.secondary-button,
.filter-button,
.item-action {
  min-height: 48px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0 16px;
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.primary-action {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

.primary-action:hover {
  background: var(--teal-dark);
}

.secondary-button,
.filter-button,
.item-action {
  background: #fff;
  color: #344054;
}

.secondary-button:hover,
.filter-button:hover,
.item-action:hover {
  background: #f8fafc;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.danger-action {
  color: #9f3030;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.notification-center {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.notification-center[hidden] {
  display: none;
}

.notification-list {
  display: grid;
  gap: 9px;
}

.notification-card {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--steel);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 12px;
}

.notification-card.time-sensitive,
.notification-card.missing-proof-alert {
  border-left-color: var(--teal);
  background: #f5fbf9;
}

.notification-card.calendar-sync-error,
.notification-card.removed-provider-event {
  border-left-color: #9f3030;
  background: #fffafa;
}

.notification-card div:first-child {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: baseline;
}

.notification-card strong {
  color: var(--charcoal);
}

.notification-card p {
  margin: 0;
  color: #344054;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--paper);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 7px;
}

.stat strong {
  font-size: 30px;
}

.search-section,
.vault-list,
.detail-view,
.timeline-section,
.save-proof-dialog,
.cases-section,
.alerts-section,
.calendar-page,
.incident-summaries-section,
.story-threads-section,
.learn-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.search-section {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.search-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-height: 48px;
  padding: 0 14px;
  font-size: 17px;
  font-weight: 500;
}

textarea {
  min-height: 104px;
  padding: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(22, 121, 111, 0.2);
  border-color: var(--teal);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button.active {
  border-color: var(--teal);
  background: var(--green-soft);
  color: #125c54;
}

.filter-button.trash-tab {
  margin-left: auto;
  border-color: #cbd5e1;
  background: #f8fafc;
}

.add-category-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.add-category-form input {
  width: 190px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.vault-list,
.detail-view,
.timeline-section,
.cases-section,
.alerts-section,
.calendar-page,
.incident-summaries-section,
.story-threads-section,
.sources-section,
.learn-section,
.settings-section,
.dedication-section {
  padding: 18px;
}

.dedication-section {
  display: none;
}

body[data-page="home"] .cases-section,
body[data-page="home"] .timeline-section,
body[data-page="home"] .calendar-page,
body[data-page="home"] .incident-summaries-section,
body[data-page="home"] .story-threads-section,
body[data-page="home"] .sources-section,
body[data-page="home"] .settings-section,
body[data-page="home"] .dedication-section {
  display: none;
}

body[data-page="home"] .learn-section {
  display: none;
}

body[data-page="trails"] .topbar,
body[data-page="trails"] .stats-grid,
body[data-page="trails"] .mode-examples-section,
body[data-page="trails"] .alerts-section,
body[data-page="trails"] .search-section,
body[data-page="trails"] .timeline-section,
body[data-page="trails"] .calendar-page,
body[data-page="trails"] .incident-summaries-section,
body[data-page="trails"] .story-threads-section,
body[data-page="trails"] .sources-section,
body[data-page="trails"] .settings-section,
body[data-page="trails"] .dedication-section {
  display: none;
}

body[data-page="trails"] .learn-section {
  display: none;
}

body[data-page="timeline"] .topbar,
body[data-page="timeline"] .stats-grid,
body[data-page="timeline"] .mode-examples-section,
body[data-page="timeline"] .alerts-section,
body[data-page="timeline"] .trail-activity-section,
body[data-page="timeline"] .search-section,
body[data-page="timeline"] .workspace,
body[data-page="timeline"] .cases-section,
body[data-page="timeline"] .calendar-page,
body[data-page="timeline"] .incident-summaries-section,
body[data-page="timeline"] .story-threads-section,
body[data-page="timeline"] .sources-section,
body[data-page="timeline"] .settings-section,
body[data-page="timeline"] .dedication-section {
  display: none;
}

body[data-page="timeline"] .learn-section {
  display: none;
}

body[data-page="timeline"] .timeline-search {
  display: none;
}

body[data-page="calendar"] .topbar,
body[data-page="calendar"] .stats-grid,
body[data-page="calendar"] .mode-examples-section,
body[data-page="calendar"] .alerts-section,
body[data-page="calendar"] .trail-activity-section,
body[data-page="calendar"] .search-section,
body[data-page="calendar"] .workspace,
body[data-page="calendar"] .cases-section,
body[data-page="calendar"] .timeline-section,
body[data-page="calendar"] .incident-summaries-section,
body[data-page="calendar"] .story-threads-section,
body[data-page="calendar"] .sources-section,
body[data-page="calendar"] .settings-section,
body[data-page="calendar"] .dedication-section {
  display: none;
}

body[data-page="calendar"] .learn-section {
  display: none;
}

body[data-page="incidents"] .topbar,
body[data-page="incidents"] .stats-grid,
body[data-page="incidents"] .mode-examples-section,
body[data-page="incidents"] .alerts-section,
body[data-page="incidents"] .trail-activity-section,
body[data-page="incidents"] .search-section,
body[data-page="incidents"] .workspace,
body[data-page="incidents"] .cases-section,
body[data-page="incidents"] .timeline-section,
body[data-page="incidents"] .calendar-page,
body[data-page="incidents"] .sources-section,
body[data-page="incidents"] .story-threads-section,
body[data-page="incidents"] .settings-section,
body[data-page="incidents"] .learn-section,
body[data-page="incidents"] .dedication-section {
  display: none;
}

body[data-page="learn"] .topbar,
body[data-page="learn"] .stats-grid,
body[data-page="learn"] .mode-examples-section,
body[data-page="learn"] .alerts-section,
body[data-page="learn"] .trail-activity-section,
body[data-page="learn"] .search-section,
body[data-page="learn"] .workspace,
body[data-page="learn"] .cases-section,
body[data-page="learn"] .timeline-section,
body[data-page="learn"] .calendar-page,
body[data-page="learn"] .incident-summaries-section,
body[data-page="learn"] .story-threads-section,
body[data-page="learn"] .sources-section,
body[data-page="learn"] .settings-section,
body[data-page="learn"] .dedication-section {
  display: none;
}

body[data-page="settings"] .topbar,
body[data-page="settings"] .stats-grid,
body[data-page="settings"] .mode-examples-section,
body[data-page="settings"] .alerts-section,
body[data-page="settings"] .trail-activity-section,
body[data-page="settings"] .search-section,
body[data-page="settings"] .workspace,
body[data-page="settings"] .cases-section,
body[data-page="settings"] .timeline-section,
body[data-page="settings"] .calendar-page,
body[data-page="settings"] .incident-summaries-section,
body[data-page="settings"] .story-threads-section,
body[data-page="settings"] .sources-section,
body[data-page="settings"] .learn-section,
body[data-page="settings"] .dedication-section {
  display: none;
}

body[data-page="sources"] .topbar,
body[data-page="sources"] .stats-grid,
body[data-page="sources"] .mode-examples-section,
body[data-page="sources"] .alerts-section,
body[data-page="sources"] .trail-activity-section,
body[data-page="sources"] .search-section,
body[data-page="sources"] .workspace,
body[data-page="sources"] .cases-section,
body[data-page="sources"] .timeline-section,
body[data-page="sources"] .calendar-page,
body[data-page="sources"] .incident-summaries-section,
body[data-page="sources"] .story-threads-section,
body[data-page="sources"] .learn-section,
body[data-page="sources"] .settings-section,
body[data-page="sources"] .dedication-section {
  display: none;
}

body[data-page="trash"] .topbar,
body[data-page="trash"] .stats-grid,
body[data-page="trash"] .mode-examples-section,
body[data-page="trash"] .alerts-section,
body[data-page="trash"] .trail-activity-section,
body[data-page="trash"] .cases-section,
body[data-page="trash"] .timeline-section,
body[data-page="trash"] .calendar-page,
body[data-page="trash"] .incident-summaries-section,
body[data-page="trash"] .story-threads-section,
body[data-page="trash"] .sources-section,
body[data-page="trash"] .settings-section,
body[data-page="trash"] .dedication-section {
  display: none;
}

body[data-page="trash"] .learn-section {
  display: none;
}

body[data-page="storyThreads"] .topbar,
body[data-page="storyThreads"] .stats-grid,
body[data-page="storyThreads"] .mode-examples-section,
body[data-page="storyThreads"] .alerts-section,
body[data-page="storyThreads"] .trail-activity-section,
body[data-page="storyThreads"] .search-section,
body[data-page="storyThreads"] .workspace,
body[data-page="storyThreads"] .cases-section,
body[data-page="storyThreads"] .timeline-section,
body[data-page="storyThreads"] .calendar-page,
body[data-page="storyThreads"] .incident-summaries-section,
body[data-page="storyThreads"] .sources-section,
body[data-page="storyThreads"] .settings-section,
body[data-page="storyThreads"] .learn-section,
body[data-page="storyThreads"] .dedication-section {
  display: none;
}

body[data-page="dedicated"] .topbar,
body[data-page="dedicated"] .stats-grid,
body[data-page="dedicated"] .mode-examples-section,
body[data-page="dedicated"] .alerts-section,
body[data-page="dedicated"] .trail-activity-section,
body[data-page="dedicated"] .search-section,
body[data-page="dedicated"] .workspace,
body[data-page="dedicated"] .cases-section,
body[data-page="dedicated"] .timeline-section,
body[data-page="dedicated"] .calendar-page,
body[data-page="dedicated"] .incident-summaries-section,
body[data-page="dedicated"] .story-threads-section,
body[data-page="dedicated"] .sources-section,
body[data-page="dedicated"] .learn-section,
body[data-page="dedicated"] .settings-section {
  display: none;
}

body[data-page="dedicated"] .dedication-section {
  display: grid;
}

.section-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
}

.trail-activity-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
  padding: 18px;
}

.incident-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.incident-list-panel,
.incident-summary-detail,
.incident-summary-card,
.incident-summaries-linked-section {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.incident-list-panel {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.incident-list-heading,
.incident-summary-card-header,
.incident-actions,
.incident-link-existing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.incident-list-heading {
  color: var(--muted);
}

.incident-summary-list {
  display: grid;
  gap: 8px;
}

.incident-list-item {
  width: 100%;
  display: grid;
  gap: 4px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
  cursor: pointer;
}

.incident-list-item.active,
.incident-list-item:hover {
  border-color: var(--teal);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.incident-summary-detail {
  min-height: 360px;
  padding: 16px;
}

.incident-summary-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.incident-summary-card.active {
  border-color: rgba(22, 121, 111, 0.55);
}

.incident-summary-card h3 {
  margin: 0;
  font-size: 24px;
}

.incident-narrative {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.incident-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.incident-facts span {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 10px;
  color: var(--ink);
}

.incident-facts b {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.exchange-facts-fields {
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.exchange-facts-fields legend {
  color: var(--ink);
  font-weight: 900;
  padding: 0 6px;
}

.exchange-timeline-editor {
  border: 1px dashed var(--line);
  border-radius: 10px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.exchange-timeline-editor > div:first-child {
  display: grid;
  gap: 3px;
}

.exchange-timeline-editor > div:first-child span {
  color: var(--muted);
  font-size: 13px;
}

#exchangeTimelineRows {
  display: grid;
  gap: 10px;
}

.exchange-timeline-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(100px, 0.35fr) minmax(160px, 0.65fr);
  padding: 10px;
}

.exchange-timeline-order {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
}

.exchange-timeline-order strong {
  color: var(--ink);
  margin-right: auto;
}

.exchange-timeline-row .wide {
  grid-column: 1 / -1;
}

.report-exchange-facts {
  background: #fff9ed;
  border: 1px solid #d9b46f;
  border-left: 6px solid #9b6a21;
  border-radius: 10px;
  display: grid;
  gap: 12px;
  margin: 10px 0 12px;
  padding: 14px;
}

.report-exchange-facts h5 {
  color: #203b4d;
  font-size: 18px;
  letter-spacing: 0.04em;
  margin: 0;
  text-transform: uppercase;
}

.report-exchange-fact-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.report-exchange-fact-grid > div,
.report-exchange-summary,
.report-exchange-timeline article {
  background: #fff;
  border: 1px solid #ead6ad;
  border-radius: 8px;
  padding: 10px;
}

.report-exchange-fact-grid dt {
  color: #6b4d16;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.report-exchange-fact-grid dd {
  color: #111820;
  font-size: 17px;
  font-weight: 850;
  margin: 3px 0 0;
}

.report-exchange-summary strong,
.report-exchange-timeline > strong {
  color: #203b4d;
  display: block;
  font-size: 13px;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.report-exchange-summary p {
  color: #111820;
  font-size: 16px;
  line-height: 1.45;
  margin: 0;
}

.report-exchange-timeline {
  display: grid;
  gap: 8px;
}

.report-exchange-timeline article {
  display: grid;
  gap: 10px;
  grid-template-columns: 90px minmax(0, 1fr);
}

.report-exchange-timeline time {
  color: #111820;
  font-size: 17px;
  font-weight: 950;
}

.report-exchange-timeline p {
  color: #111820;
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 4px;
}

.report-exchange-timeline ul {
  color: #344054;
  font-size: 15px;
  margin: 0;
  padding-left: 18px;
}

.report-nowrap {
  white-space: nowrap;
  word-break: keep-all;
}

.report-exhibit-facts {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 4px 0 0;
}

.report-exhibit-facts div {
  border: 1px solid #dce3e8;
  border-radius: 8px;
  min-width: 0;
  padding: 7px;
}

.report-exhibit-facts dt {
  color: #5f6f7a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.report-exhibit-facts dd {
  color: #111820;
  font-size: 15px;
  font-weight: 800;
  margin: 2px 0 0;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.pdf-attachment-card {
  border: 1px solid #c8d0d6;
  border-left: 6px solid #203b4d;
  border-radius: 10px;
  background: #f7fafc;
  display: grid;
  gap: 6px;
  padding: 14px;
}

.pdf-attachment-card strong {
  color: #111820;
  font-size: 18px;
}

.pdf-attachment-card small,
.pdf-attachment-card p,
.pdf-attachment-card em {
  color: #344054;
  font-size: 15px;
  line-height: 1.4;
  margin: 0;
}

.pdf-attachment-card em {
  color: #203b4d;
  font-style: normal;
  font-weight: 950;
  text-decoration: underline;
}

.pdf-attachment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 2px;
}

.pdf-attachment-actions a,
.pdf-action-button {
  align-items: center;
  background: #fff;
  border: 1px solid #203b4d;
  border-radius: 6px;
  color: #203b4d;
  display: inline-flex;
  font-size: 14px;
  font-weight: 950;
  justify-content: center;
  line-height: 1.1;
  min-height: 34px;
  padding: 7px 10px;
  text-decoration: none;
}

.pdf-attachment-actions a:last-child,
.pdf-action-button.download-pdf-action {
  background: #203b4d;
  color: #fff;
}

.pdf-action-button.open-pdf-action {
  background: #fff;
  color: #203b4d;
}

.pdf-unavailable-card {
  border-left-color: #a13f3f;
  background: #fff7f7;
}

.report-verification-appendix {
  border-top: 5px solid #203b4d;
}

.report-verification-checks {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 10px 0 14px;
}

.report-verification-checks span {
  background: #edf3f6;
  border: 1px solid #c8d0d6;
  border-radius: 10px;
  color: #203b4d;
  font-size: 16px;
  font-weight: 900;
  padding: 10px;
}

.report-verification-statement {
  color: #111820;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.45;
}

.print-settings-note {
  background: #fff8e7;
  border: 1px solid #d7b56d;
  border-radius: 8px;
  color: #4f3b16;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  margin: 0 18px 12px;
  padding: 10px 12px;
}

.incident-linked-evidence,
.incident-summary-compact-list {
  display: grid;
  gap: 10px;
}

.incident-link-existing {
  align-items: end;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
  margin: 12px 0;
}

.incident-link-existing label {
  flex: 1 1 260px;
}

.timeline-mode-controls,
.timeline-export-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.timeline-export-controls {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--wash);
  margin: 12px 0;
  padding: 12px;
}

.unified-timeline-item .timeline-content {
  display: grid;
  gap: 8px;
}

.timeline-evidence-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 750;
}

.story-thread-chip {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--green-soft);
  color: #125c54;
  padding: 4px 9px;
  font-size: 14px;
  font-weight: 900;
}

.story-thread-form,
.story-thread-list {
  display: grid;
  gap: 14px;
}

.story-thread-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--wash);
  margin-bottom: 16px;
  padding: 14px;
}

.story-thread-form label:nth-of-type(2) {
  grid-column: span 2;
}

.story-thread-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow-card, 0 10px 26px rgba(15, 23, 42, 0.05));
  display: grid;
  gap: 14px;
  padding: 16px;
}

.story-thread-header,
.story-thread-facts,
.story-thread-linked {
  display: grid;
  gap: 10px;
}

.story-thread-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.story-thread-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.story-thread-facts span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
  padding: 10px;
}

.story-thread-facts b {
  display: block;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.story-thread-linked {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.story-thread-linked ul {
  margin: 6px 0 0 18px;
  padding: 0;
}

.story-thread-mini-timeline {
  border-left: 4px solid var(--teal);
  display: grid;
  gap: 8px;
  padding-left: 12px;
}

.story-thread-timeline-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 10px;
}

.mode-examples-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
  padding: 18px;
}

.item-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  max-height: 680px;
  overflow: auto;
}

.item-card {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  display: grid;
  gap: 9px;
}

.item-card:hover,
.item-card.active {
  background: #f5fbf9;
  border-color: rgba(22, 121, 111, 0.42);
}

.item-title-row,
.detail-title-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.item-title {
  font-weight: 850;
  font-size: 18px;
  line-height: 1.25;
}

.pill {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.pill.email,
.pill.pdf,
.pill.document {
  background: var(--blue-soft);
  color: #294db2;
}

.pill.receipt,
.pill.screenshot {
  background: var(--gold-soft);
  color: #875c05;
}

.pill.note {
  background: var(--rose-soft);
  color: #9f3030;
}

.pill.calendar {
  background: #edf0f4;
  color: #475467;
}

.pill.deleted,
.pill.archived,
.pill.locked {
  background: #edf0f4;
  color: #475467;
}

.meta,
.item-summary {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  border-radius: 999px;
  background: var(--green-soft);
  color: #125c54;
  padding: 4px 8px;
  font-size: 13px;
}

.detail-pane {
  margin-top: 16px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.detail-pane h3 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.detail-fact {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 12px;
  min-height: 74px;
}

.detail-fact span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-notes {
  color: #344054;
  line-height: 1.65;
}

.locked-banner {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #344054;
  padding: 10px 12px;
  margin: 14px 0;
  font-weight: 750;
}

.relationship-panel {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

.relationship-panel h4,
.activity-log h4 {
  margin: 0 0 12px;
  font-size: 20px;
}

.relationship-tree {
  display: grid;
  gap: 8px;
  position: relative;
}

.relationship-node {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  font-size: 17px;
}

.relationship-node.root {
  border-color: rgba(22, 121, 111, 0.48);
  background: #f5fbf9;
}

.relationship-type {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.activity-log {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

.activity-list {
  display: grid;
  gap: 9px;
}

.activity-entry {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fbfcfe;
  color: #344054;
  font-size: 17px;
  line-height: 1.5;
}

.activity-entry time {
  color: var(--muted);
  font-weight: 800;
}

.activity-entry.diff-entry {
  background: #fff;
  border-left: 3px solid #426579;
}

.source-attribution {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.raw-provider-debug {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 10px;
}

.raw-provider-debug pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
}

.cases-section,
.alerts-section {
  scroll-margin-top: 20px;
}

.cases-grid,
.alerts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.case-card,
.alert-card,
.source-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.case-card strong,
.alert-card strong {
  font-size: 20px;
}

.case-meta {
  color: var(--muted);
  font-size: 16px;
}

.proof-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.proof-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
}

.proof-list span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.proof-list ul {
  margin: 0;
  padding-left: 17px;
  color: #344054;
  line-height: 1.55;
  font-size: 17px;
}

.timeline-search {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  color: #344054;
  font-size: 14px;
  font-weight: 800;
}

.timeline-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.timeline-filters label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 850;
}

.sources-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.source-philosophy {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfe;
  margin-top: 16px;
}

.source-philosophy p,
.source-card p {
  margin: 0;
  color: #344054;
  line-height: 1.45;
}

.release-list {
  display: grid;
  gap: 10px;
}

.release-list div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfe;
}

.release-list span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.wide-card {
  grid-column: span 2;
}

.timeline-section {
  scroll-margin-top: 20px;
}

.timeline-list {
  display: grid;
  gap: 0;
  margin-top: 16px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px;
  padding: 0 0 18px;
}

.timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 151px;
  top: 22px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.timeline-date {
  color: var(--muted);
  font-weight: 800;
  font-size: 14px;
  text-align: right;
}

.timeline-content {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  font-size: 17px;
  line-height: 1.5;
}

.timeline-content::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 12px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}

.timeline-content strong {
  display: block;
  margin-bottom: 5px;
}

.timeline-content.calendar-record {
  border-color: rgba(69, 107, 143, 0.42);
  background: #f7fafc;
}

.timeline-content.calendar-record::before {
  background: var(--steel);
  box-shadow: 0 0 0 1px var(--steel);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 14px;
}

.calendar-header h2 {
  font-size: 26px;
}

.calendar-integrations,
.calendar-view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.provider-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #344054;
  padding: 8px 11px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.provider-button.active {
  border-color: #235f70;
  background: #e9f3f5;
  color: #163f4c;
}

.connection-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.apple-connect-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.apple-connect-form[hidden] {
  display: none;
}

.apple-calendar-picker,
.calendar-source-picker {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.apple-calendar-picker[hidden],
.calendar-source-picker[hidden] {
  display: none;
}

.calendar-select-list {
  display: grid;
  gap: 8px;
}

.calendar-source-option {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  font-size: 15px;
}

.calendar-source-option small {
  display: block;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.calendar-filter-row {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 12px;
}

.calendar-filter-row label {
  display: grid;
  gap: 5px;
  min-width: 210px;
  color: #344054;
  font-size: 14px;
  font-weight: 850;
}

.calendar-dot {
  --calendar-color: #426579;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--calendar-color);
  border: 1px solid rgba(0, 0, 0, 0.14);
  display: inline-block;
  flex: 0 0 auto;
  margin-right: 5px;
  vertical-align: middle;
}

.apple-debug-panel {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 10px;
  font-size: 12px;
  color: #344054;
}

.apple-debug-panel[hidden] {
  display: none;
}

.apple-debug-panel summary {
  cursor: pointer;
  color: #163f4c;
  font-weight: 900;
}

.apple-debug-content {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.apple-debug-panel ul {
  margin: 0;
  padding-left: 18px;
}

.apple-debug-panel code {
  overflow-wrap: anywhere;
  white-space: normal;
}

.apple-connection-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.apple-connection-actions[hidden] {
  display: none;
}

.connection-badge {
  border: 1px solid #8fc1b7;
  border-radius: 999px;
  background: #eef8f5;
  color: #175b52;
  padding: 7px 10px;
  font-size: 14px;
  font-weight: 850;
}

.danger-button {
  color: #8d2d2d;
  border-color: #d7adad;
}

.calendar-count-summary {
  align-self: end;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.apple-connect-form label,
.apple-calendar-picker label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 14px;
  font-weight: 800;
}

.connection-fact {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 12px;
  color: #344054;
  font-size: 14px;
}

.connection-fact span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.calendar-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  margin-bottom: 14px;
}

.calendar-card h3 {
  margin: 0;
  font-size: 23px;
}

.calendar-events {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.calendar-events.day-view {
  grid-template-columns: 1fr;
}

.calendar-events.week-view {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: stretch;
}

.calendar-events.month-view {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-events.year-view {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.calendar-day-column,
.calendar-month-cell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  min-height: 184px;
}

.calendar-weekday {
  color: var(--muted);
  font-size: 15px;
  font-weight: 850;
  text-align: center;
  text-transform: uppercase;
}

.calendar-month-cell.empty {
  background: transparent;
  border-color: transparent;
  min-height: 184px;
}

.calendar-month-cell.clickable-day-cell {
  cursor: pointer;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.calendar-month-cell.clickable-day-cell:hover,
.calendar-month-cell.clickable-day-cell:focus-visible {
  border-color: color-mix(in srgb, var(--signal-teal) 46%, var(--line));
  background: color-mix(in srgb, var(--paper) 84%, var(--signal-teal));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal-teal) 12%, transparent);
}

.calendar-month-cell.clickable-day-cell:focus-visible {
  outline: 3px solid var(--signal-teal);
  outline-offset: 3px;
}

.calendar-day-column strong,
.calendar-month-cell strong {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
}

.calendar-navigation {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.day-proof-view {
  display: grid;
  gap: 18px;
}

.day-proof-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card, 8px);
  background: var(--paper);
  padding: 18px;
}

.day-proof-header h3 {
  margin: 0;
  font-size: 30px;
}

.day-proof-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.day-proof-counts span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 6px 11px;
  color: var(--midnight);
  font-size: 15px;
  font-weight: 900;
}

.day-proof-header-actions {
  align-items: flex-end;
  display: grid;
  gap: 10px;
  justify-items: end;
}

.day-evidence-summary {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card, 8px);
  background: color-mix(in srgb, var(--surface) 72%, var(--paper));
  padding: 14px;
}

.day-evidence-summary > strong {
  color: var(--ink);
  font-size: 20px;
}

.day-evidence-summary div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.day-evidence-summary span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--midnight);
  font-size: 14px;
  font-weight: 850;
  padding: 5px 9px;
}

.day-evidence-summary p {
  color: var(--muted);
  font-size: 15px;
  font-weight: 750;
  margin: 0;
}

.day-proof-section {
  display: grid;
  gap: 10px;
}

.day-proof-section h4 {
  margin: 0;
  font-size: 22px;
}

.day-proof-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card, 8px);
  background: var(--paper);
  padding: 14px;
}

.day-proof-row > div {
  display: grid;
  gap: 5px;
}

.calendar-jump-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 10px;
}

.calendar-jump-panel[hidden] {
  display: none;
}

.calendar-nav-buttons,
.calendar-jump-form,
.calendar-date-search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

.calendar-jump-form label,
.calendar-date-search label {
  display: grid;
  gap: 5px;
  color: #344054;
  font-size: 14px;
  font-weight: 800;
}

.month-jump {
  width: 100%;
  text-align: left;
  background: #eef5f7;
  color: #163f4c;
}

.year-month-card {
  min-height: 94px;
  padding: 0;
}

.year-month-button {
  height: 100%;
  display: grid;
  align-content: center;
  gap: 6px;
  border-radius: 8px;
  padding: 14px;
}

.year-month-button strong {
  margin: 0;
  font-size: 18px;
}

.year-month-button span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.calendar-agenda-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  cursor: pointer;
  font-size: 17px;
}

.calendar-agenda-row:focus-visible {
  outline: 2px solid #235f70;
  outline-offset: 2px;
}

.calendar-agenda-row.removed-event,
.mini-event.removed-event {
  border-style: dashed;
  border-color: #9aa4b2;
  background: #f3f4f6;
  color: #5f6875;
}

.calendar-agenda-row.removed-event {
  box-shadow: inset 3px 0 0 #7b8491;
}

.mini-event.removed-event {
  opacity: 0.82;
}

.removed-event-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid #8c3640;
  border-radius: 999px;
  background: #fff1f2;
  color: #8c2635;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  vertical-align: middle;
}

.agenda-time {
  color: var(--muted);
  font-size: 17px;
  font-weight: 850;
}

.mini-event {
  border-radius: 8px;
  background: #f5fbf9;
  color: #125c54;
  padding: 7px 8px;
  margin-top: 6px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.event-source-badges {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.event-source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  border-radius: 3px;
  padding: 2px 5px;
  color: #fff;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
}

.badge-apple {
  background: #344054;
}

.badge-shared {
  background: #806214;
}

.badge-google {
  background: #2f5f91;
}

.badge-outlook {
  background: #1d6f78;
}

.badge-holiday {
  background: #356859;
}

.badge-milestone {
  background: #526b8a;
}

.badge-neverlost {
  background: #59636e;
}

.badge-removed {
  background: #8c3640;
}

.event-pill-title {
  display: block;
  width: 100%;
  color: inherit;
}

.event-pill-time {
  margin-right: 5px;
  font-weight: 950;
}

.mini-event.source-apple,
.calendar-agenda-row.source-apple,
.calendar-search-result.source-apple {
  border-color: #9ca5b1;
  border-left: 5px solid #344054;
  background: #f5f6f7;
  color: #27313d;
}

.mini-event.source-shared,
.calendar-agenda-row.source-shared,
.calendar-search-result.source-shared {
  border-color: #d5bd70;
  border-left: 5px solid #806214;
  background: #fff9e8;
  color: #55430f;
}

.mini-event.source-google,
.calendar-agenda-row.source-google,
.calendar-search-result.source-google {
  border-color: #94b3ce;
  border-left: 5px solid #2f5f91;
  background: #eef5fb;
  color: #244966;
}

.mini-event.source-outlook,
.calendar-agenda-row.source-outlook,
.calendar-search-result.source-outlook {
  border-color: #8dbabd;
  border-left: 5px solid #1d6f78;
  background: #edf7f7;
  color: #18555c;
}

.mini-event.source-holiday,
.calendar-agenda-row.source-holiday,
.calendar-search-result.source-holiday {
  border-color: #91b2a3;
  border-left: 5px solid #356859;
  background: #eef6f1;
  color: #274f44;
}

.mini-event.source-milestone,
.calendar-agenda-row.source-milestone,
.calendar-search-result.source-milestone {
  border-color: #9eacc0;
  border-left: 5px solid #526b8a;
  background: #f0f3f8;
  color: #3f536c;
}

.mini-event.source-neverlost,
.calendar-agenda-row.source-neverlost,
.calendar-search-result.source-neverlost {
  border-color: #aeb5bc;
  border-left: 5px solid #59636e;
  background: #f3f4f6;
  color: #414a54;
}

.mini-event.source-removed,
.calendar-agenda-row.source-removed,
.calendar-search-result.source-removed {
  border: 1px dashed #a46870;
  border-left: 5px solid #8c3640;
  background: #fff4f4;
  color: #6e3038;
  opacity: 1;
}

.calendar-agenda-row .event-source-badges {
  margin-bottom: 5px;
}

.calendar-search-result .event-source-badges {
  margin-right: 8px;
}

.calendar-event {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 13px;
  display: grid;
  gap: 8px;
}

.calendar-event.active {
  background: #f5fbf9;
  border-color: rgba(22, 121, 111, 0.42);
}

.calendar-event strong {
  font-size: 17px;
  line-height: 1.25;
}

.event-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.event-primary-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.event-more-actions {
  position: relative;
}

.event-more-actions summary {
  list-style: none;
}

.event-more-actions summary::-webkit-details-marker {
  display: none;
}

.event-more-actions div {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.event-actions button,
.event-more-actions summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: #344054;
  font-weight: 800;
  font-size: 15px;
  padding: 0 12px;
  cursor: pointer;
}

.event-snapshot,
.trail-suggestion {
  display: grid;
  gap: 8px;
  color: #344054;
}

.snapshot-title {
  font-size: 28px;
  font-weight: 900;
  color: var(--ink);
}

.snapshot-description {
  max-width: 72ch;
  margin: 0;
  color: #475467;
  font-size: 17px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.snapshot-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.snapshot-section {
  display: grid;
  gap: 10px;
  padding-top: 8px;
}

.snapshot-section + .snapshot-section {
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 14px;
}

.snapshot-section h4 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
}

.story-copy {
  margin: 0;
  color: #344054;
  font-size: 17px;
  line-height: 1.6;
}

.calendar-context-story {
  border-left: 3px solid #47735f;
  padding-left: 12px;
}

.removed-event-story {
  display: grid;
  gap: 5px;
  border: 1px solid #d8a0a6;
  border-left: 4px solid #9f3030;
  border-radius: 8px;
  background: #fff5f5;
  padding: 12px;
}

.removed-event-story strong {
  color: #7f1d2d;
  font-size: 16px;
}

.removed-event-story p {
  margin: 0;
  color: #5d3640;
  font-size: 14px;
  line-height: 1.55;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.snapshot-fact {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 12px;
  font-size: 17px;
  line-height: 1.45;
}

.snapshot-fact span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.snapshot-verification {
  border-left: 3px solid #28786f;
  background: #f3f8f7;
  padding: 12px 14px;
  display: grid;
  gap: 3px;
  font-size: 16px;
  color: #475467;
}

.snapshot-verification strong {
  color: #174d47;
  font-size: 17px;
}

.source-note,
.snapshot-proof-note {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.lifecycle-list {
  display: grid;
  gap: 0;
  margin-top: 4px;
}

.lifecycle-entry {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 9px;
  min-height: 56px;
  position: relative;
}

.lifecycle-entry:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 13px;
  bottom: -3px;
  width: 2px;
  background: #cfd8dc;
}

.lifecycle-marker {
  width: 12px;
  height: 12px;
  border: 2px solid #53727d;
  border-radius: 999px;
  background: #fff;
  margin-top: 2px;
  position: relative;
  z-index: 1;
}

.lifecycle-entry.current .lifecycle-marker {
  border-color: #28786f;
  background: #dcefeb;
}

.lifecycle-entry div {
  display: grid;
  gap: 2px;
  padding-bottom: 10px;
}

.lifecycle-entry strong {
  color: var(--ink);
  font-size: 17px;
}

.lifecycle-entry time,
.lifecycle-entry p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.removal-section {
  border-left: 3px solid #9f3030;
  padding-left: 12px;
}

.difference-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 0;
}

.difference-values div {
  min-width: 0;
}

.difference-values dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.difference-values dd {
  margin: 3px 0 0;
  font-size: 17px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.proof-history {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.proof-history h4 {
  margin: 8px 0 0;
  font-size: 17px;
}

.compact-note {
  margin: 2px 0 10px;
}

.advanced-audit {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 10px 12px;
  margin-top: 12px;
}

.advanced-audit summary {
  cursor: pointer;
  color: #163f4c;
  font-size: 15px;
  font-weight: 900;
}

.audit-summary-open {
  display: none;
}

.advanced-audit[open] .audit-summary-closed {
  display: none;
}

.advanced-audit[open] .audit-summary-open {
  display: inline;
}

.raw-audit-data {
  max-height: 18rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.apple-activity-story {
  border-left: 3px solid var(--steel, #52758b);
}

.advanced-audit h4 {
  margin: 14px 0 8px;
  font-size: 15px;
}

.advanced-difference {
  display: grid;
  gap: 2px;
  border-left: 2px solid var(--line);
  margin-top: 8px;
  padding-left: 8px;
}

.advanced-difference span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.audit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.add-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.save-proof-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
}

.confirm-dialog {
  width: min(440px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
}

.confirm-dialog::backdrop {
  background: rgba(15, 23, 42, 0.38);
}

.confirm-dialog label {
  display: grid;
  gap: 8px;
  color: #344054;
  font-weight: 800;
}

.danger-solid {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid #9f3030;
  background: #9f3030;
  color: white;
  padding: 0 14px;
  font-weight: 800;
}

.form-error {
  color: #9f3030;
  font-weight: 800;
}

.learn-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.learn-card,
.settings-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.learn-card h3,
.settings-card h3 {
  margin: 0 0 8px;
}

.learn-card ul {
  margin: 0;
  padding-left: 18px;
  color: #344054;
  line-height: 1.5;
}

.settings-card label {
  display: grid;
  gap: 8px;
  color: #344054;
  font-weight: 850;
}

.mode-list {
  display: grid;
  gap: 8px;
}

.developer-status {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.pdf-route-diagnostic {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
}

.diagnostic-heading {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.pdf-route-results {
  display: grid;
  gap: 10px;
}

.pdf-route-result {
  border: 1px solid var(--line);
  border-left: 5px solid #b7791f;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.pdf-route-result.passed {
  border-left-color: #2f855a;
}

.pdf-route-result.failed {
  border-left-color: #b42318;
}

.pdf-route-result h4,
.pdf-route-result p {
  margin: 0;
}

.pdf-route-result code,
.pdf-route-result a {
  overflow-wrap: anywhere;
}

.pdf-route-checks {
  display: grid;
  gap: 6px;
}

.pdf-route-checks div {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 3px;
  padding: 8px;
}

.pdf-route-checks span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.pdf-route-error {
  border: 1px solid #b42318;
  border-radius: 8px;
  color: #b42318;
  font-weight: 900;
  padding: 10px;
}

.dedicated-entry-button {
  justify-self: start;
  margin: 12px 0 2px;
}

.dedication-section {
  min-height: calc(100vh - 72px);
  place-items: center;
}

.dedication-shell {
  display: grid;
  gap: 18px;
  max-width: 760px;
  width: min(100%, 760px);
}

.dedication-back {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  justify-self: start;
  padding: 6px 0;
}

.dedication-back:hover,
.dedication-back:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

.dedication-page {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(17, 19, 21, 0.92);
  border: 1px solid rgba(200, 155, 60, 0.24);
  border-radius: 2px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.28);
  color: #f5f3ee;
  display: grid;
  gap: 22px;
  line-height: 1.75;
  padding: clamp(42px, 7vw, 78px);
  text-align: center;
}

.dedication-kicker {
  color: rgba(245, 243, 238, 0.58);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.16em;
  margin: 0;
  text-transform: uppercase;
}

.dedication-page h1 {
  color: #f5f3ee;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 8vw, 68px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0;
}

.dedication-page p {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(19px, 2.3vw, 24px);
  margin: 0;
}

.dedication-lead,
.dedication-date {
  color: #f8e3ad;
}

.dedication-page blockquote {
  border: 0;
  color: #f5f3ee;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(21px, 2.8vw, 28px);
  font-style: italic;
  line-height: 1.65;
  margin: 10px auto 0;
  max-width: 620px;
  padding: 0;
}

.dedication-reference {
  color: rgba(245, 243, 238, 0.72);
  font-size: clamp(16px, 2vw, 19px) !important;
}

.dedication-closing {
  color: rgba(245, 243, 238, 0.76);
  font-size: clamp(17px, 2vw, 21px) !important;
}

.mode-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fbfcfe;
  color: var(--muted);
  font-size: 13px;
}

.mode-row strong {
  color: var(--charcoal);
}

.onboarding-dialog {
  max-width: 520px;
}

.onboarding-options {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.onboarding-options .secondary-button {
  justify-content: flex-start;
  text-align: left;
}

.onboarding-options .secondary-button.selected {
  border-color: var(--teal);
  background: #e9f3f5;
  color: #163f4c;
  box-shadow: inset 0 0 0 1px rgba(22, 121, 111, 0.22);
}

.save-proof-dialog::backdrop {
  background: rgba(15, 23, 42, 0.38);
}

.add-form label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 14px;
  font-weight: 800;
}

.wide {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  line-height: 1.5;
  background: #fbfcfe;
}

/* Genesis 1.0 visual scale: evidence review favors legibility over density. */
body {
  font-size: 19px;
  line-height: 1.6;
}

.app-shell {
  grid-template-columns: 320px minmax(0, 1fr);
}

.sidebar {
  padding: 32px 24px;
  gap: 34px;
}

.brand {
  gap: 16px;
}

.brand-mark {
  width: 56px;
  height: 56px;
}

.logo-doc {
  left: 18px;
  top: 13px;
  width: 20px;
  height: 27px;
}

.logo-doc::after {
  left: 5px;
  top: 12px;
  width: 10px;
  height: 5px;
}

.brand strong {
  font-size: 30px;
  line-height: 1.15;
}

.brand span,
.side-panel p {
  font-size: 17px;
}

.nav-list {
  gap: 12px;
}

.nav-item {
  min-height: 60px;
  padding: 16px 18px;
  font-size: 19px;
}

.side-panel {
  padding: 20px;
}

.side-label,
.eyebrow {
  font-size: 13px;
}

.side-panel strong {
  font-size: 28px;
}

.main {
  padding: 36px 40px 56px;
  gap: 28px;
}

.ui-build-marker {
  position: static;
  padding: 11px 16px;
  font-size: 17px;
}

h1 {
  max-width: 900px;
  font-size: 58px;
  line-height: 1.05;
}

h2 {
  font-size: 32px;
  line-height: 1.2;
}

.hero-copy {
  max-width: 960px;
  margin-top: 18px;
  font-size: 20px;
  line-height: 1.65;
}

.primary-action,
.secondary-button,
.filter-button,
.item-action {
  min-height: 54px;
  padding: 0 20px;
  font-size: 17px;
}

input,
select,
textarea {
  min-height: 54px;
  padding-left: 16px;
  padding-right: 16px;
  font-size: 18px;
}

textarea {
  min-height: 132px;
  padding: 16px;
}

.stats-grid,
.cases-grid,
.alerts-grid,
.learn-grid,
.settings-grid {
  gap: 18px;
}

.stat,
.notification-center,
.search-section,
.trail-activity-section,
.mode-examples-section {
  padding: 24px;
}

.stat span,
.search-field {
  font-size: 16px;
}

.stat strong {
  font-size: 36px;
}

.notification-card {
  padding: 18px;
}

.workspace {
  grid-template-columns: minmax(380px, 500px) minmax(0, 1fr);
  gap: 26px;
}

.vault-list,
.detail-view,
.timeline-section,
.cases-section,
.alerts-section,
.calendar-page,
.sources-section,
.learn-section,
.settings-section {
  padding: 26px;
}

.item-list {
  gap: 14px;
  margin-top: 22px;
}

.item-card {
  padding: 20px;
  gap: 12px;
}

.item-title {
  font-size: 20px;
}

.meta,
.item-summary {
  font-size: 17px;
}

.detail-pane h3 {
  font-size: 34px;
}

.detail-grid {
  gap: 14px;
  margin: 24px 0;
}

.detail-fact {
  min-height: 90px;
  padding: 16px;
}

.relationship-panel h4,
.activity-log h4 {
  font-size: 23px;
}

.relationship-tree,
.activity-list {
  gap: 12px;
}

.relationship-node,
.activity-entry {
  padding: 16px 18px;
  font-size: 18px;
}

.cases-grid,
.alerts-grid {
  margin-top: 22px;
}

.case-card,
.alert-card,
.source-card {
  padding: 22px;
  gap: 14px;
}

.case-card strong,
.alert-card strong {
  font-size: 22px;
}

.case-meta {
  font-size: 18px;
}

.proof-columns {
  gap: 14px;
}

.proof-list {
  padding: 18px;
}

.proof-list span {
  font-size: 15px;
}

.proof-list ul {
  font-size: 19px;
}

.sources-grid {
  gap: 20px;
  margin-top: 24px;
}

.source-philosophy {
  padding: 22px;
}

.source-philosophy p,
.source-card p {
  font-size: 18px;
  line-height: 1.6;
}

.timeline-list {
  margin-top: 24px;
}

.timeline-item {
  gap: 24px;
  padding-bottom: 24px;
}

.timeline-date {
  font-size: 16px;
}

.timeline-content {
  padding: 18px;
  font-size: 18px;
}

.calendar-header {
  gap: 18px;
  margin-bottom: 22px;
}

.calendar-header h2 {
  font-size: 34px;
}

.calendar-integrations,
.calendar-view-tabs {
  gap: 12px;
  margin-bottom: 22px;
}

.provider-button {
  min-height: 50px;
  padding: 10px 16px;
  font-size: 17px;
}

.connection-status {
  gap: 14px;
  margin-top: 18px;
}

.calendar-source-option {
  padding: 15px;
  font-size: 17px;
}

.connection-fact {
  padding: 16px;
  font-size: 17px;
}

.calendar-card {
  padding: 26px;
  margin-bottom: 22px;
}

.calendar-card h3 {
  font-size: 28px;
}

.calendar-events {
  gap: 12px;
  margin-top: 20px;
}

.calendar-day-column,
.calendar-month-cell {
  min-height: 230px;
  padding: 15px;
}

.calendar-month-cell.empty {
  min-height: 230px;
}

.calendar-weekday {
  font-size: 17px;
}

.calendar-day-column strong,
.calendar-month-cell strong {
  font-size: 19px;
}

.calendar-navigation {
  gap: 14px;
  margin-bottom: 22px;
}

.calendar-agenda-row {
  padding: 18px;
  font-size: 19px;
}

.agenda-time {
  font-size: 19px;
}

.mini-event {
  padding: 10px 11px;
  margin-top: 8px;
  font-size: 17px;
}

.calendar-event {
  padding: 18px;
  gap: 12px;
}

.calendar-event strong {
  font-size: 19px;
}

.event-actions button,
.event-more-actions summary {
  min-height: 48px;
  font-size: 16px;
}

.event-snapshot,
.trail-suggestion {
  gap: 14px;
}

.snapshot-title {
  font-size: 34px;
}

.snapshot-description,
.story-copy {
  font-size: 19px;
}

.snapshot-section {
  gap: 14px;
  padding-top: 12px;
}

.snapshot-section + .snapshot-section {
  margin-top: 8px;
  padding-top: 22px;
}

.snapshot-section h4 {
  font-size: 24px;
}

.snapshot-grid {
  gap: 14px;
}

.snapshot-fact {
  padding: 16px;
  font-size: 19px;
}

.snapshot-verification {
  padding: 16px 18px;
  font-size: 18px;
}

.source-note,
.snapshot-proof-note {
  font-size: 18px;
}

.lifecycle-entry strong {
  font-size: 19px;
}

.lifecycle-entry time,
.lifecycle-entry p {
  font-size: 18px;
}

.proof-history h4 {
  font-size: 20px;
}

.learn-grid,
.settings-grid {
  margin-top: 24px;
}

.learn-card,
.settings-card {
  padding: 22px;
}

.calendar-page {
  display: flex;
  flex-direction: column;
}

.calendar-page > .calendar-header {
  order: 1;
}

.calendar-page > .calendar-monitoring-strip {
  order: 2;
}

.calendar-page > .calendar-change-review {
  order: 3;
}

.calendar-page > .calendar-view-tabs {
  order: 4;
}

.calendar-page > .calendar-evidence-card {
  order: 5;
}

.calendar-page > .sync-control-center {
  order: 6;
}

.calendar-page > .calendar-snapshot-card {
  order: 7;
}

.calendar-page > .calendar-trail-card {
  order: 8;
}

.calendar-page > .calendar-setup-panel {
  order: 9;
}

.nav-item-with-badge {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.calendar-alert-badge {
  align-items: center;
  background: #b4232f;
  border: 2px solid #ffe2e5;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 15px;
  font-weight: 800;
  justify-content: center;
  min-height: 28px;
  min-width: 28px;
  padding: 2px 7px;
}

.calendar-alert-badge[hidden] {
  display: none;
}

.calendar-change-review {
  background: #fff;
  border: 1px solid #9eacb6;
  border-top: 4px solid #263f52;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 14px 16px 16px;
}

.calendar-change-review.collapsed {
  gap: 0;
  padding-bottom: 14px;
}

.calendar-change-review.collapsed .calendar-change-toolbar > :not(#calendarChangeCount):not(#generateCalendarChangeReport):not(#toggleCalendarReview) {
  display: none;
}

.calendar-change-body[hidden] {
  display: none;
}

.calendar-change-heading {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.calendar-change-heading h3,
.calendar-change-heading p {
  margin: 0;
}

.calendar-change-heading h3 {
  color: #132b3a;
  font-size: 26px;
}

.calendar-change-heading p:not(.eyebrow) {
  color: #50616e;
  font-size: 15px;
}

.calendar-change-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.compact-button {
  min-height: 38px;
  padding: 7px 11px;
}

.calendar-change-count {
  background: #f8d7da;
  border: 1px solid #d97880;
  border-radius: 6px;
  color: #7b1720;
  font-weight: 800;
  padding: 8px 12px;
  white-space: nowrap;
}

.calendar-change-count:not(:disabled) {
  cursor: pointer;
}

.calendar-change-count:disabled {
  background: #eef1f3;
  border-color: #c8d0d5;
  color: #65747d;
}

.calendar-review-status {
  color: #445864;
  font-size: 15px;
  margin: 0;
  min-height: 20px;
}

.calendar-change-print-header {
  display: none;
}

.calendar-change-list {
  display: grid;
  gap: 14px;
}

.calendar-change-group {
  border: 1px solid #b6c1c9;
  border-radius: 6px;
  overflow: hidden;
}

.calendar-change-group-heading {
  align-items: center;
  background: #e9eef1;
  border-bottom: 1px solid #b6c1c9;
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
}

.calendar-change-group-heading h4 {
  color: #172f3e;
  font-size: 22px;
  margin: 0;
}

.calendar-change-group-heading span {
  color: #53636e;
  font-size: 15px;
  font-weight: 700;
}

.calendar-change-audit-table {
  display: grid;
}

.calendar-change-set {
  border-bottom: 1px solid #d7dfe4;
}

.calendar-change-set:last-child {
  border-bottom: 0;
}

.calendar-change-set-heading {
  align-items: center;
  background: #f5f7f8;
  border-bottom: 1px solid #d7dfe4;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 7px 10px;
}

.calendar-change-set-heading > div {
  display: grid;
  gap: 1px;
}

.calendar-change-set-heading strong {
  color: #193546;
  font-size: 18px;
}

.calendar-change-set-heading span,
.calendar-change-set-heading time {
  color: #5b6b75;
  font-size: 15px;
}

.calendar-change-alert {
  align-items: center;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #d7dfe4;
  border-radius: 0;
  color: #26323b;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(180px, 1fr) minmax(125px, 0.55fr) minmax(250px, 1.2fr) minmax(205px, 0.8fr);
  min-height: 0;
  padding: 7px 10px;
  text-align: left;
  width: 100%;
}

.calendar-change-alert > * {
  min-width: 0;
}

.calendar-change-alert:last-child {
  border-bottom: 0;
}

.calendar-change-alert:focus-within {
  background: #edf4f7;
  outline: 2px solid #315a7d;
  outline-offset: -2px;
}

.calendar-change-alert.unread {
  background: #fffafa;
  box-shadow: inset 5px 0 0 #b4232f;
}

.calendar-change-alert.reviewed {
  color: #596871;
}

.calendar-change-primary {
  display: grid;
  gap: 1px;
}

.calendar-change-primary strong {
  color: #142c3b;
  font-size: 19px;
}

.calendar-change-alert > span,
.calendar-change-event-time {
  font-size: 15px;
}

.calendar-change-type,
.calendar-review-state {
  color: #8d1d27;
  font-size: 15px;
  font-weight: 800;
}

.calendar-change-source {
  align-items: center;
  display: flex;
  gap: 7px;
}

.calendar-change-source > span:last-child {
  display: grid;
  font-size: 15px;
  font-weight: 700;
}

.calendar-change-source small {
  color: #63727b;
  font-size: 14px;
  font-weight: 500;
}

.calendar-change-timestamps {
  display: grid;
  gap: 2px 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.calendar-change-timestamps span {
  display: grid;
  font-size: 15px;
}

.calendar-change-timestamps b {
  color: #60707a;
  font-size: 13px;
  text-transform: uppercase;
}

.calendar-review-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-self: stretch;
  justify-content: flex-end;
}

.calendar-review-actions .secondary-button {
  font-size: 13px;
  justify-content: center;
  min-height: 32px;
  padding: 4px 8px;
  white-space: nowrap;
}

.calendar-review-actions small {
  flex-basis: 100%;
  color: #62717a;
  font-size: 13px;
  text-align: right;
}

.badge-change {
  background: #b4232f;
  color: #fff;
}

.badge-change-reappeared {
  background: #315d4f;
}

.badge-change-modified {
  background: #315a7d;
}

.calendar-review-dialog {
  border: 1px solid #6f818d;
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(12, 28, 39, 0.35);
  height: min(900px, calc(100vh - 40px));
  max-height: calc(100vh - 40px);
  max-width: 1220px;
  overflow: hidden;
  padding: 0;
  width: min(1220px, calc(100vw - 40px));
}

.calendar-review-dialog::backdrop {
  background: rgba(15, 27, 36, 0.62);
}

.calendar-review-dialog-header {
  align-items: flex-start;
  background: #eef3f5;
  border-bottom: 1px solid #aebbc3;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 16px 20px 12px;
}

.calendar-review-dialog-header h2,
.calendar-review-dialog-header p {
  margin: 0;
}

.calendar-review-dialog-header h2 {
  color: #132c3b;
  font-size: 26px;
}

.calendar-review-dialog-header p:last-child {
  color: #53646f;
  font-size: 15px;
}

.calendar-event-review-generated {
  color: #63737d;
  display: block;
  font-size: 14px;
  margin-top: 4px;
}

.calendar-review-dialog-actions {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #c7d0d6;
  display: flex;
  gap: 8px;
  padding: 10px 20px;
}

.calendar-review-snapshot {
  height: calc(100% - 132px);
  overflow: auto;
  padding: 20px;
}

.calendar-review-snapshot .event-snapshot {
  gap: 18px;
}

.calendar-review-snapshot .snapshot-toolbar,
.calendar-review-snapshot .attached-evidence-section .evidence-detach-button {
  display: none;
}

.calendar-change-report-dialog {
  background: #e8edf0;
  border: 1px solid #687b87;
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(12, 28, 39, 0.38);
  height: min(940px, calc(100vh - 32px));
  max-height: calc(100vh - 32px);
  max-width: 1380px;
  overflow: hidden;
  padding: 0;
  width: min(1380px, calc(100vw - 32px));
}

.calendar-change-report-dialog::backdrop {
  background: rgba(9, 18, 27, 0.72);
}

.calendar-change-report-header {
  align-items: flex-start;
  background: #eef3f5;
  border-bottom: 1px solid #aebbc3;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 16px 20px 12px;
}

.calendar-change-report-header h2,
.calendar-change-report-header p {
  margin: 0;
}

.calendar-change-report-header h2 {
  color: #132c3b;
  font-size: 28px;
}

.calendar-change-report-header > div > p:last-child {
  color: #53646f;
  font-size: 15px;
}

.calendar-change-report-actions {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #c7d0d6;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 10px 20px;
}

.calendar-change-report-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  height: calc(100% - 142px);
  min-height: 0;
}

.calendar-change-report-filters {
  align-content: start;
  background: #f6f7f6;
  border-right: 1px solid #b7c1c7;
  display: grid;
  gap: 11px;
  overflow: auto;
  padding: 18px;
}

.calendar-change-report-filters h3 {
  color: #172c3a;
  font-size: 22px;
  margin: 0 0 2px;
}

.standard-change-report-dates,
.daily-packet-controls {
  display: grid;
  gap: 11px;
}

.standard-change-report-dates[hidden],
.daily-packet-controls[hidden],
.daily-packet-controls label[hidden] {
  display: none;
}

.daily-packet-controls {
  background: #e9eef0;
  border: 1px solid #a8b6be;
  padding: 11px;
}

.daily-packet-checklist {
  display: grid;
  gap: 7px;
  max-height: 290px;
  overflow: auto;
}

.daily-packet-checklist-heading {
  border-bottom: 1px solid #a8b6be;
  display: grid;
  gap: 3px;
  padding-bottom: 8px;
}

.daily-packet-checklist-heading strong {
  color: #172c3a;
  font-size: 15px;
}

.daily-packet-checklist-heading span {
  color: #596b75;
  font-size: 12px;
  font-weight: 750;
}

.daily-packet-check {
  align-items: start;
  background: #fff;
  border: 1px solid #aab7be;
  display: grid !important;
  gap: 8px !important;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 8px;
}

.daily-packet-check input {
  min-height: 18px;
  width: 18px;
}

.daily-packet-check > span {
  color: #172c3a !important;
  display: grid;
  font-size: 13px !important;
  gap: 2px;
}

.daily-packet-check > span strong {
  color: #315a68;
  font-size: 10px;
  letter-spacing: 0;
}

.daily-packet-check > span small {
  color: #5f707a;
  font-size: 11px;
}

.calendar-change-report-filters label {
  color: #263d4b;
  display: grid;
  font-size: 14px;
  font-weight: 850;
  gap: 5px;
}

.calendar-change-report-filters label > span {
  color: #687780;
  font-size: 12px;
  font-weight: 700;
}

.calendar-change-report-filters input,
.calendar-change-report-filters select,
.calendar-change-report-filters textarea {
  background: #fff;
  border: 1px solid #9eaeb8;
  color: #132c3b;
  font-size: 15px;
  min-height: 42px;
}

.calendar-change-report-filters textarea {
  line-height: 1.45;
  resize: vertical;
}

.calendar-change-report-preview {
  background: #dce2e5;
  overflow: auto;
  padding: 24px;
}

.change-report-page {
  background: #fff;
  box-shadow: 0 9px 28px rgba(23, 41, 52, 0.18);
  color: #142632;
  margin: 0 auto 24px;
  max-width: 8.1in;
  min-height: 9.6in;
  padding: 0.55in;
}

.change-report-brand {
  align-items: baseline;
  border-bottom: 3px solid #213f50;
  display: flex;
  gap: 12px;
  margin-bottom: 38px;
  padding-bottom: 12px;
}

.change-report-brand strong {
  font-size: 28px;
}

.change-report-brand span {
  color: #5a6c77;
  font-size: 15px;
  font-weight: 800;
}

.change-report-page h1 {
  color: #132c3b;
  font-size: 36px;
  line-height: 1.12;
  margin: 10px 0 34px;
}

.change-report-page h2 {
  border-bottom: 2px solid #8597a2;
  color: #173244;
  font-size: 24px;
  margin: 26px 0 14px;
  padding-bottom: 7px;
}

.change-report-cover-facts,
.change-report-entry dl {
  display: grid;
  gap: 0;
  margin: 0;
}

.change-report-cover-facts > div,
.change-report-entry dl > div {
  border-bottom: 1px solid #c7d0d5;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(170px, 0.7fr) minmax(0, 1.3fr);
  padding: 11px 0;
}

.change-report-cover-facts dt,
.change-report-entry dt {
  color: #536670;
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.change-report-cover-facts dd,
.change-report-entry dd {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}

.change-report-safety {
  background: #eef3f2;
  border-left: 4px solid #315f66;
  font-size: 15px;
  margin-top: 32px;
  padding: 12px 14px;
}

.change-report-body > p {
  font-size: 17px;
  line-height: 1.55;
}

.change-report-observation {
  background: #fff7e7;
  border: 1px solid #bd9953;
  border-left: 5px solid #9c742d;
  margin: 20px 0;
  padding: 14px 16px;
}

.change-report-observation strong {
  font-size: 17px;
  text-transform: uppercase;
}

.change-report-observation p {
  font-size: 17px;
  line-height: 1.5;
  margin: 8px 0;
  white-space: pre-wrap;
}

.change-report-observation small {
  color: #6b5a39;
  font-size: 13px;
}

.change-report-list {
  display: grid;
  gap: 14px;
}

.change-report-entry {
  border: 1px solid #98a8b1;
  border-left: 6px solid #315f66;
  padding: 14px 16px;
}

.change-report-entry.change-report-removed {
  border-left-color: #8d2f32;
}

.change-report-entry.change-report-modified {
  border-left-color: #315a7d;
}

.change-report-entry.change-report-reappeared {
  border-left-color: #2f6b57;
}

.change-report-entry header {
  align-items: baseline;
  display: grid;
  gap: 6px 12px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-bottom: 8px;
}

.change-report-entry header > span,
.change-report-entry header > em {
  border: 1px solid #7f909a;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  padding: 4px 7px;
  text-transform: uppercase;
}

.change-report-entry header strong {
  font-size: 20px;
}

.change-report-differences {
  background: #f2f5f6;
  margin-top: 12px;
  padding: 10px 12px;
}

.change-report-differences h3 {
  font-size: 17px;
  margin: 0 0 8px;
}

.change-report-differences > div {
  border-top: 1px solid #bac5ca;
  display: grid;
  gap: 5px;
  padding: 9px 0;
}

.change-report-differences span,
.change-report-differences p {
  font-size: 15px;
}

.change-report-supporting > p {
  font-size: 15px;
  line-height: 1.5;
}

.change-report-chain-of-custody table {
  border-collapse: collapse;
  width: 100%;
}

.change-report-chain-of-custody th,
.change-report-chain-of-custody td {
  border-bottom: 1px solid #aebac1;
  font-size: 13px;
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

.change-report-chain-of-custody th {
  background: #e9eef0;
  color: #263d4b;
  font-weight: 900;
}

.daily-change-packet-card {
  align-items: center;
  border-left: 6px solid var(--evidence-gold);
  grid-template-columns: minmax(0, 1fr) auto;
}

.daily-change-packet-card > div {
  display: grid;
  gap: 6px;
}

.change-report-evidence-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.change-report-evidence-item {
  border: 1px solid #a7b3ba;
  display: grid;
  gap: 10px;
  grid-template-columns: 96px minmax(0, 1fr);
  padding: 9px;
}

.change-report-evidence-item img {
  background: #edf0f1;
  height: 82px;
  object-fit: contain;
  width: 96px;
}

.change-report-evidence-item div {
  display: grid;
  gap: 4px;
}

.change-report-evidence-item strong {
  font-size: 15px;
}

.change-report-evidence-item span,
.change-report-evidence-item small {
  color: #536670;
  font-size: 12px;
}

@media (max-width: 900px) {
  .calendar-change-report-workspace {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .calendar-change-report-filters,
  .calendar-change-report-preview {
    overflow: visible;
  }

  .calendar-change-report-filters {
    border-bottom: 1px solid #b7c1c7;
    border-right: 0;
  }
}

.review-source-summary h3 {
  font-size: 24px;
}

body[data-page="calendar"] .main {
  padding: 18px 6px 36px;
  gap: 16px;
}

body[data-page="calendar"] .calendar-page {
  width: 100%;
  max-width: none;
  padding: 6px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body[data-page="calendar"] .calendar-header {
  margin-bottom: 10px;
}

body[data-page="calendar"] .calendar-view-tabs {
  margin-bottom: 10px;
}

body[data-page="calendar"] .calendar-card {
  margin-bottom: 12px;
}

.calendar-monitoring-strip {
  align-items: center;
  background: #152c3a;
  border: 1px solid #0d202b;
  border-radius: 7px;
  color: #fff;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(230px, 1fr) minmax(300px, auto) minmax(210px, auto);
  margin-bottom: 10px;
  padding: 11px 14px;
}

.monitoring-identity {
  align-items: center;
  display: flex;
  gap: 10px;
}

.monitoring-identity > div {
  display: grid;
  gap: 1px;
}

.monitoring-identity strong {
  font-size: 17px;
}

.monitoring-identity span:last-child {
  color: #c4d1d8;
  font-size: 13px;
}

.monitoring-indicator {
  background: #5fc59b;
  border: 3px solid #284b4a;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #84d8b5;
  height: 12px;
  width: 12px;
}

.monitoring-facts {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.monitoring-facts > span {
  display: grid;
  gap: 1px;
}

.monitoring-facts b {
  color: #9fb2be;
  font-size: 12px;
  text-transform: uppercase;
}

.monitoring-facts strong {
  font-size: 14px;
}

.calendar-monitoring-strip .monitoring-control {
  align-items: center;
  display: grid;
  gap: 2px 8px;
  grid-template-columns: auto minmax(145px, 190px);
  min-width: 0;
}

.calendar-monitoring-strip .monitoring-control label {
  color: #b8c8d1;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-monitoring-strip .monitoring-control select {
  min-height: 38px;
}

.calendar-monitoring-strip #checkAppleNow {
  grid-row: 1 / span 2;
}

.calendar-monitoring-strip .monitoring-save-status {
  color: #92ddb9;
  font-size: 12px;
  grid-column: 1 / -1;
  text-align: right;
}

.calendar-monitoring-strip .monitoring-error {
  background: rgba(117, 24, 34, 0.34);
  border-left: 4px solid #e06a72;
  color: #fff2f2;
  font-size: 14px;
  font-weight: 750;
  grid-column: 1 / -1;
  margin: 0;
  padding: 8px 10px;
}

.sync-control-center {
  border: 1px solid #aebdc8;
  border-radius: 8px;
  background: #f8fbfc;
  margin: 0 0 12px;
  padding: 0;
}

.provider-sync-drawer > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  list-style: none;
  padding: 11px 14px;
}

.provider-sync-drawer > summary::-webkit-details-marker {
  display: none;
}

.provider-sync-drawer > summary > div:first-child {
  display: grid;
  gap: 1px;
}

.provider-sync-drawer > summary .eyebrow {
  margin: 0;
}

.provider-sync-drawer > summary strong {
  color: #183444;
  font-size: 19px;
}

.provider-sync-drawer > summary span {
  color: #647681;
  font-size: 14px;
}

.provider-sync-drawer-status {
  align-items: flex-end;
  display: grid;
  gap: 1px;
  text-align: right;
}

.provider-sync-drawer-status b {
  color: #315d52;
  font-size: 13px;
}

.provider-sync-drawer[open] .provider-sync-drawer-status b {
  font-size: 0;
}

.provider-sync-drawer[open] .provider-sync-drawer-status b::after {
  content: "Collapse";
  font-size: 13px;
}

.provider-sync-drawer-body {
  border-top: 1px solid #cbd5db;
  display: grid;
  gap: 14px;
  padding: 14px;
}

.sync-control-heading,
.sync-provider-title,
.sync-provider-title > div,
.picker-heading,
.sync-actions,
.sync-meaning {
  display: flex;
  align-items: center;
}

.sync-control-heading,
.sync-provider-title,
.picker-heading {
  justify-content: space-between;
}

.sync-control-heading {
  gap: 24px;
}

.sync-control-heading h3 {
  margin: 0 0 4px;
  font-size: 26px;
}

.sync-control-heading p {
  margin: 0;
  color: #4b5f6b;
  font-size: 16px;
}

.monitoring-save-status[data-state="saving"] {
  color: #bcd9eb;
}

.monitoring-save-status[data-state="error"] {
  color: #ffb8be;
}

.built-in-source-control {
  border-top: 1px solid #d7dee3;
  margin-top: 18px;
  padding-top: 18px;
}

.built-in-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.built-in-source-card {
  border: 1px solid #cdd7dc;
  border-radius: 6px;
  background: #f8faf9;
  display: grid;
  gap: 8px;
  padding: 12px 14px;
}

.built-in-source-toggle {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.built-in-source-card small {
  display: block;
  margin-top: 3px;
  color: #5e6b70;
}

.built-in-source-card input {
  width: 20px;
  height: 20px;
}

.milestone-source-card {
  grid-template-columns: minmax(0, 1fr) auto;
}

.milestone-source-card .built-in-source-toggle {
  min-width: 0;
}

.milestone-source-card > button {
  align-self: center;
}

.source-state,
.built-in-save-status {
  color: #315d52;
  font-size: 14px;
  font-weight: 700;
}

.built-in-save-status[data-state="saving"] {
  color: #85631e;
}

.built-in-save-status[data-state="error"] {
  color: #9a3030;
}

.source-safety-note {
  margin: 12px 0 0;
  color: #5e6b70;
  font-size: 15px;
  line-height: 1.5;
}

.built-in-proof-story {
  border-left: 5px solid #356859;
  background: #edf4f1;
  padding: 16px 18px;
}

.built-in-proof-story p {
  margin: 6px 0 0;
  font-size: 18px;
  line-height: 1.5;
}

.milestone-dialog {
  width: min(720px, calc(100vw - 32px));
}

.copy-review-dialog {
  border: 1px solid #768a96;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.3);
  padding: 18px;
  width: min(780px, calc(100vw - 32px));
}

.copy-review-dialog::backdrop {
  background: rgba(15, 27, 36, 0.58);
}

.copy-review-dialog textarea {
  background: #f8fafb;
  border-color: #9cabb4;
  color: #172b38;
  font: 16px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  margin-top: 12px;
  min-height: 420px;
  width: 100%;
}

.optional-label {
  color: #687883;
  font-size: 13px;
  font-weight: 600;
}

.review-collapse-button {
  border-color: #526978;
  box-shadow: inset 0 0 0 1px #d3dce2;
  font-weight: 900;
}

.sync-provider-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.sync-provider-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  border: 1px solid #c7d2da;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.sync-provider-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.sync-provider-summary > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.sync-provider-summary h4 {
  margin: 0;
  color: #152d3b;
  font-size: 18px;
}

.sync-provider-summary p {
  margin: 2px 0 0;
  color: #536773;
  font-size: 13px;
  line-height: 1.35;
}

.sync-provider-summary .primary-action {
  grid-column: 1 / -1;
  min-height: 42px;
}

.sync-provider-details {
  border-top: 1px solid #d7dee3;
  padding-top: 10px;
}

.sync-provider-details > summary {
  cursor: pointer;
  color: #344b58;
  font-size: 14px;
  font-weight: 850;
}

.sync-provider-details[open] > summary {
  margin-bottom: 12px;
}

.outlook-mark {
  background: #1d6f78;
}

.source-classification {
  border-left: 6px solid #59636e;
}

.source-classification.source-apple {
  border-left-color: #344054;
  background: #f5f6f7;
}

.source-classification.source-shared {
  border-left-color: #806214;
  background: #fff9e8;
}

.source-classification.source-google {
  border-left-color: #2f5f91;
  background: #eef5fb;
}

.source-classification.source-outlook {
  border-left-color: #1d6f78;
  background: #edf7f7;
}

.source-classification.source-holiday {
  border-left-color: #356859;
  background: #eef6f1;
}

.source-classification.source-milestone {
  border-left-color: #526b8a;
  background: #f0f3f8;
}

.source-classification.source-removed {
  border-left-color: #8c3640;
  background: #fff4f4;
}

.source-classification-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.source-classification-heading h4 {
  margin: 2px 0 0;
}

.source-classification-grid {
  margin-top: 12px;
}

.attached-evidence-section {
  border-color: #b9c8cf;
  background: #f8fafb;
}

.attached-evidence-heading,
.trail-evidence-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.attached-evidence-heading > span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 850;
}

.attached-evidence-grid,
.trail-evidence-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.attached-evidence-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  min-width: 0;
  border: 1px solid #c8d4da;
  border-radius: 6px;
  background: #fff;
  padding: 16px;
}

.evidence-preview {
  display: grid;
  place-items: center;
  width: 132px;
  height: 104px;
  overflow: hidden;
  border: 1px solid #bcc9d0;
  border-radius: 4px;
  background: #edf2f4;
  color: #405762;
  font-weight: 900;
  text-decoration: none;
}

.evidence-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.evidence-card-caption,
.evidence-card-description {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

.evidence-card-description {
  color: var(--muted);
  font-size: 16px;
}

.evidence-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.evidence-edit-history {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 8px;
}

.evidence-edit-history summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 850;
}

.evidence-edit-history p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.evidence-drop-zone {
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 132px;
  border: 2px dashed color-mix(in srgb, var(--signal-teal) 58%, var(--line));
  border-radius: 10px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--signal-teal) 8%, transparent), transparent 56%),
    color-mix(in srgb, var(--paper) 88%, var(--surface));
  padding: 18px;
  color: var(--midnight);
  cursor: pointer;
}

.evidence-drop-zone strong {
  font-size: 20px;
}

.evidence-drop-zone span {
  color: var(--muted);
  font-weight: 750;
}

.evidence-drop-zone.drag-over,
.evidence-drop-zone.has-file {
  border-color: var(--signal-teal);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--signal-teal) 16%, transparent), transparent 60%),
    color-mix(in srgb, var(--paper) 82%, var(--signal-teal));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--signal-teal) 14%, transparent);
}

.bulk-photo-import-dialog {
  width: min(980px, 96vw);
}

.bulk-photo-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.bulk-photo-stats article,
.bulk-photo-group,
.bulk-photo-destination,
.bulk-photo-file-list article {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--paper) 90%, var(--surface));
}

.bulk-photo-stats article {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.bulk-photo-stats strong,
.bulk-photo-destination span,
.bulk-photo-file-list small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.bulk-photo-stats span {
  font-size: 22px;
  font-weight: 950;
}

.bulk-photo-groups {
  display: grid;
  gap: 12px;
}

.bulk-photo-group {
  overflow: hidden;
}

.bulk-photo-group summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 18px;
}

.bulk-photo-destination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 12px 12px;
  padding: 10px;
}

.bulk-photo-file-list {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.bulk-photo-file-list article {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) minmax(140px, auto);
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.bulk-photo-file-list article.duplicate {
  border-color: color-mix(in srgb, var(--evidence-gold) 70%, var(--line));
  background: color-mix(in srgb, var(--evidence-gold) 12%, var(--paper));
}

.bulk-photo-stats article.needs-review,
.bulk-photo-group.needs-review,
.bulk-photo-file-list article.low-confidence {
  border-color: color-mix(in srgb, var(--alert-red) 62%, var(--line));
  background: color-mix(in srgb, var(--alert-red) 9%, var(--paper));
}

.timestamp-review-controls {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--alert-red) 8%, var(--surface));
}

.bulk-media-debug {
  grid-column: 1 / -1;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 82%, var(--paper));
}

.bulk-media-debug summary {
  cursor: pointer;
  font-weight: 850;
}

.bulk-media-debug dl {
  display: grid;
  grid-template-columns: minmax(120px, 0.35fr) 1fr;
  gap: 4px 10px;
  margin: 8px 0;
}

.bulk-media-debug dt {
  color: var(--muted);
  font-weight: 800;
}

.bulk-media-debug dd {
  margin: 0;
}

.bulk-media-debug ul {
  margin: 6px 0 0 18px;
  padding: 0;
}

.timestamp-review-controls p,
.timestamp-warning {
  color: var(--alert-red);
  font-weight: 850;
}

.bulk-media-completion {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--signal-teal) 55%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--signal-teal) 10%, var(--paper));
}

.bulk-media-completion strong {
  font-size: 22px;
}

.bulk-import-history-section,
.bulk-import-report-dialog {
  width: min(1100px, 96vw);
}

.bulk-import-history-section {
  margin-top: 14px;
}

.bulk-import-history-list,
.bulk-import-file-report,
.bulk-import-destinations {
  display: grid;
  gap: 10px;
}

.bulk-import-history-list article,
.bulk-import-linked-card,
.bulk-import-destinations article,
.bulk-import-file-report article {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--paper) 90%, var(--surface));
  padding: 12px;
}

.bulk-import-history-list article > div,
.bulk-import-destinations article > div {
  display: grid;
  gap: 4px;
}

.bulk-import-history-list span,
.bulk-import-linked-card span,
.bulk-import-destinations span,
.bulk-import-file-report span {
  font-weight: 850;
}

.bulk-import-history-list small,
.bulk-import-destinations small,
.bulk-import-file-report small {
  color: var(--muted);
  font-weight: 800;
}

.bulk-import-linked-card {
  margin: 0 0 12px;
}

.bulk-import-report {
  display: grid;
  gap: 18px;
}

.bulk-import-report h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.bulk-import-report-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.bulk-import-report-summary article {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 80%, var(--paper));
  padding: 12px;
}

.bulk-import-report-summary article strong,
.bulk-import-facts dt,
.bulk-import-file-report dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.bulk-import-report-summary article span {
  font-size: 24px;
  font-weight: 950;
}

.bulk-import-facts,
.bulk-import-file-report dl {
  display: grid;
  grid-template-columns: minmax(150px, 0.35fr) 1fr;
  gap: 6px 12px;
  margin: 0;
}

.bulk-import-facts dd,
.bulk-import-file-report dd {
  margin: 0;
  font-weight: 850;
}

.bulk-import-file-report article {
  display: grid;
  grid-template-columns: minmax(220px, 0.38fr) 1fr;
  align-items: start;
}

.bulk-import-file-report article.duplicate {
  border-color: color-mix(in srgb, var(--evidence-gold) 70%, var(--line));
  background: color-mix(in srgb, var(--evidence-gold) 12%, var(--paper));
}

.bulk-import-file-report article.needs-review,
.bulk-import-destinations article.needs-review {
  border-color: color-mix(in srgb, var(--alert-red) 55%, var(--line));
  background: color-mix(in srgb, var(--alert-red) 8%, var(--paper));
}

.bulk-photo-file-list article span,
.bulk-photo-file-list article strong {
  font-weight: 900;
}

.evidence-file-preview {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 78%, var(--paper));
  padding: 10px;
}

.evidence-file-preview[hidden] {
  display: none;
}

.evidence-file-preview img,
.evidence-file-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 58px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--midnight) 8%, var(--paper));
  color: var(--midnight);
  object-fit: cover;
  font-size: 13px;
  font-weight: 950;
}

.evidence-file-preview div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.evidence-file-preview strong,
.evidence-file-preview span {
  overflow-wrap: anywhere;
}

.evidence-drop-target-active {
  position: relative;
  outline: 4px solid var(--signal-teal) !important;
  outline-offset: 3px;
  box-shadow:
    0 0 0 6px color-mix(in srgb, var(--signal-teal) 18%, transparent),
    var(--shadow-card, 0 12px 24px rgba(15, 23, 42, 0.12)) !important;
}

.evidence-drop-target-active::after {
  content: "Drop proof here";
  position: absolute;
  inset: auto 8px 8px auto;
  z-index: 5;
  border-radius: 999px;
  background: var(--signal-teal);
  color: #fff;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 950;
  pointer-events: none;
}

.print-evidence-image-label {
  display: none;
}

.report-only-section {
  display: none;
}

.report-fact-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-fact-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-evidence-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.report-evidence-inventory {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-evidence-inventory li {
  display: grid;
  gap: 2px;
  margin-bottom: 7px;
}

.report-evidence-inventory li strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}

.report-evidence-inventory li span,
.report-evidence-inventory li em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 750;
}

.report-gallery-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.report-gallery-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 10px;
}

.report-gallery-preview {
  display: grid;
  place-items: center;
  min-height: 150px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 78%, var(--paper));
  color: var(--midnight);
  font-weight: 900;
  text-decoration: none;
}

.report-gallery-preview img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: contain;
}

.report-gallery-card div {
  display: grid;
  gap: 3px;
}

.report-gallery-card strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
}

.report-gallery-card span,
.report-gallery-card small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.report-custody-table {
  width: 100%;
  border-collapse: collapse;
}

.report-custody-table th,
.report-custody-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
}

.attached-evidence-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.evidence-security-status {
  color: var(--teal);
  font-size: 17px;
  font-weight: 900;
}

.evidence-sort-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--paper) 88%, var(--signal-teal));
  color: var(--midnight);
}

.evidence-sort-control label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.evidence-sort-control select {
  min-height: 38px;
}

.evidence-sort-control > span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 750;
}

.attached-evidence-card.manual-order-editing {
  cursor: grab;
  border-style: dashed;
}

.attached-evidence-card.manual-order-editing.dragging {
  opacity: 0.55;
}

.attached-evidence-card.manual-order-editing.drag-over {
  outline: 3px solid var(--signal-teal);
  outline-offset: 3px;
}

.manual-order-number {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--evidence-gold);
  color: var(--midnight);
  font-size: 13px;
  font-weight: 950;
}

.drag-handle {
  color: inherit;
  font-size: 16px;
  line-height: 1;
}

.report-evidence-number {
  color: var(--midnight);
  font-size: 15px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.manual-order-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: center;
}

.evidence-metadata-list {
  display: grid;
  grid-template-columns: minmax(130px, 0.38fr) minmax(0, 1fr);
  gap: 7px 14px;
  margin: 8px 0 2px;
  font-size: 17px;
}

.evidence-metadata-list div {
  display: contents;
}

.evidence-metadata-list dt {
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
  text-transform: none;
}

.evidence-metadata-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 850;
}

.attached-evidence-copy .evidence-card-title {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.25;
  font-weight: 950;
}

.attached-evidence-copy .evidence-card-submeta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.attached-evidence-copy .evidence-card-note {
  margin: 2px 0 0;
  border-left: 4px solid var(--evidence-gold);
  background: color-mix(in srgb, var(--evidence-gold) 12%, var(--paper));
  color: var(--ink);
  padding: 10px 12px;
  font-size: 20px;
  line-height: 1.5;
  font-weight: 750;
}

.attached-evidence-copy span,
.attached-evidence-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.connected-evidence-count span {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.attached-evidence-copy code {
  width: fit-content;
  max-width: 100%;
  color: #314a56;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.evidence-detach-button {
  align-self: center;
}

.case-card .attached-evidence-card {
  grid-template-columns: 82px minmax(0, 1fr);
}

.case-card .evidence-preview {
  width: 82px;
  height: 66px;
}

.case-card .evidence-detach-button {
  grid-column: 1 / -1;
  justify-self: end;
}

.needs-review-card {
  border-style: dashed;
}

.empty-state.compact {
  min-height: 0;
  padding: 12px;
}

.evidence-upload-dialog {
  width: min(760px, calc(100vw - 32px));
}

@media (max-width: 760px) {
  .attached-evidence-card,
  .case-card .attached-evidence-card {
    grid-template-columns: 1fr;
  }

  .evidence-preview,
  .case-card .evidence-preview {
    width: 100%;
    height: 180px;
  }

  .evidence-detach-button,
  .case-card .evidence-detach-button {
    grid-column: auto;
    width: 100%;
  }
}

.sync-provider-title {
  gap: 12px;
}

.sync-provider-title > div {
  min-width: 0;
  gap: 10px;
}

.sync-provider-title h4 {
  margin: 0;
  color: #152d3b;
  font-size: 20px;
}

.sync-provider-title p {
  margin: 2px 0 0;
  color: #536773;
  font-size: 14px;
  line-height: 1.4;
}

.provider-mark {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: 17px;
  font-weight: 950;
}

.apple-mark {
  background: #344054;
}

.google-mark {
  background: #285a72;
}

.sync-health {
  flex: 0 0 auto;
  border: 1px solid #b8c5cd;
  border-radius: 999px;
  background: #eef2f4;
  padding: 5px 9px;
  color: #465b67;
  font-size: 13px;
  font-weight: 900;
}

.sync-health[data-tone="good"] {
  border-color: #91b6a4;
  background: #e8f3ed;
  color: #245d45;
}

.sync-health[data-tone="error"] {
  border-color: #d7a9a9;
  background: #faeeee;
  color: #8a3030;
}

.sync-health[data-tone="working"] {
  border-color: #9db9cb;
  background: #ebf3f8;
  color: #285a72;
}

.sync-fact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.sync-fact {
  min-width: 0;
  border-left: 2px solid #c8d4da;
  background: #f6f8f9;
  padding: 8px 9px;
}

.sync-fact span,
.sync-fact strong {
  display: block;
}

.sync-fact span {
  color: #667985;
  font-size: 12px;
  font-weight: 800;
}

.sync-fact strong {
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: #203b49;
  font-size: 15px;
  line-height: 1.3;
}

.sync-fact-warning {
  border-left-color: #c58a35;
  background: #fff8ec;
}

.sync-fact-muted {
  border-left-color: #a9b2b8;
}

.sync-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.sync-actions .primary-action,
.sync-actions .secondary-button {
  min-height: 44px;
  font-size: 15px;
}

.sync-calendar-picker {
  display: grid;
  gap: 9px;
  border-top: 1px solid #d7e0e5;
  padding-top: 11px;
}

.sync-calendar-picker[hidden] {
  display: none;
}

.picker-heading {
  align-items: flex-start;
  gap: 18px;
}

.picker-heading strong {
  color: #263f4d;
  font-size: 15px;
}

.picker-heading span {
  max-width: 420px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.sync-calendar-picker .calendar-select-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.sync-calendar-picker .calendar-source-option {
  min-height: 48px;
  padding: 8px 10px;
}

.calendar-source-unavailable {
  border-style: dashed;
  background: #f4f4f3;
}

.sync-result {
  min-height: 20px;
  color: #405965;
  font-size: 14px;
  line-height: 1.4;
}

.sync-meaning {
  flex-wrap: wrap;
  gap: 8px 18px;
  border-top: 1px solid #cfdae0;
  padding-top: 10px;
  color: #526874;
  font-size: 13px;
}

.sync-meaning strong {
  color: #213f4e;
}

.calendar-setup-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  margin-top: 2px;
}

.calendar-setup-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  padding: 12px 16px;
  color: #344054;
  cursor: pointer;
  font-size: 17px;
  font-weight: 900;
  list-style: none;
}

.calendar-setup-panel > summary::-webkit-details-marker {
  display: none;
}

.calendar-setup-panel > summary::after {
  content: "+";
  font-size: 24px;
  line-height: 1;
}

.calendar-setup-panel[open] > summary::after {
  content: "-";
}

.calendar-setup-panel > summary small {
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.calendar-setup-content {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 14px;
}

.calendar-setup-content .calendar-integrations {
  margin: 0;
}

.calendar-setup-content .calendar-card {
  margin: 0;
}

.calendar-configuration-card {
  padding: 16px;
}

.calendar-configuration-card h3 {
  font-size: 21px;
}

.calendar-configuration-card .primary-action,
.calendar-configuration-card .secondary-button,
.calendar-configuration-card select {
  min-height: 46px;
  font-size: 15px;
}

.calendar-configuration-card .connection-status {
  gap: 8px;
  margin-top: 10px;
}

.calendar-configuration-card .connection-fact {
  padding: 10px 12px;
  font-size: 15px;
}

.compact-monitoring-card .section-heading {
  align-items: center;
}

.compact-monitoring-card .meta {
  margin: 6px 0 0;
}

.apple-compact-card .apple-connection-actions {
  gap: 6px;
}

.provider-details {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 10px;
}

.provider-details > summary {
  color: #344054;
  cursor: pointer;
  font-size: 15px;
  font-weight: 850;
}

.calendar-evidence-card {
  width: 100%;
  padding: 18px 10px 22px;
}

.calendar-day-column,
.calendar-month-cell {
  min-width: 0;
  min-height: 300px;
  padding: 10px;
}

.calendar-month-cell.empty {
  min-height: 300px;
}

.mini-event {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  overflow-wrap: break-word;
  word-break: normal;
  text-align: left;
}

.calendar-agenda-row {
  min-height: 68px;
  padding: 18px 20px;
}

.calendar-agenda-row > div {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.calendar-agenda-row .event-actions {
  margin-top: 2px;
}

.calendar-agenda-row .event-primary-actions,
.calendar-agenda-row .event-more-actions {
  align-self: center;
}

.calendar-events.month-view,
.calendar-events.week-view {
  width: 100%;
  gap: 6px;
}

.mini-event .calendar-dot {
  width: 8px;
  height: 8px;
  margin-right: 4px;
}

.calendar-day-column strong,
.calendar-month-cell strong {
  font-size: 22px;
  line-height: 1.2;
}

.calendar-filter-row {
  justify-content: space-between;
  gap: 16px;
}

.calendar-filter-row label {
  flex: 1 1 320px;
  max-width: 520px;
}

.calendar-count-summary {
  flex: 1 1 360px;
  text-align: right;
}

.calendar-snapshot-card {
  padding: 20px;
}

.calendar-snapshot-card > .eyebrow {
  margin-bottom: 10px;
}

.event-snapshot {
  gap: 22px;
}

.evidence-header {
  display: grid;
  gap: 18px;
  border: 1px solid #9ebdb5;
  border-left: 5px solid var(--teal);
  border-radius: 8px;
  background: #f4faf8;
  padding: 22px;
}

.evidence-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.evidence-heading .eyebrow {
  margin-bottom: 4px;
}

.event-snapshot .snapshot-title {
  font-size: 40px;
  line-height: 1.15;
}

.event-snapshot > .snapshot-section h4,
.event-snapshot > .evidence-timeline h4 {
  font-size: 28px;
  line-height: 1.2;
}

.evidence-signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.evidence-signal-grid .snapshot-fact {
  border: 0;
  border-left: 1px solid #c7d9d4;
  border-radius: 0;
  background: transparent;
  padding: 8px 14px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  min-height: 76px;
}

.evidence-signal-grid .snapshot-fact:nth-child(3n + 1) {
  border-left: 0;
  padding-left: 0;
}

.evidence-signal-grid .snapshot-fact span {
  font-size: 16px;
}

.evidence-timeline {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 22px 24px;
}

.evidence-timeline h4 {
  font-size: 28px;
}

.evidence-timeline .source-note {
  max-width: 78ch;
  margin-bottom: 4px;
  font-size: 19px;
}

.evidence-timeline .lifecycle-list {
  margin-top: 14px;
}

.evidence-timeline .lifecycle-entry {
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 18px;
  min-height: 92px;
}

.evidence-timeline .lifecycle-entry:not(:last-child)::before {
  left: 10px;
  top: 22px;
  bottom: -7px;
  width: 4px;
  background: color-mix(in srgb, var(--signal-teal) 48%, var(--line));
}

.evidence-timeline .lifecycle-marker {
  width: 22px;
  height: 22px;
  border-width: 3px;
  margin-top: 3px;
}

.evidence-timeline .lifecycle-entry div {
  gap: 7px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  padding: 0 0 20px;
}

.evidence-timeline .lifecycle-entry:last-child div {
  border-bottom: 0;
  padding-bottom: 0;
}

.evidence-timeline .lifecycle-entry strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1.25;
  font-weight: 950;
}

.evidence-timeline .lifecycle-entry time {
  color: var(--midnight);
  font-size: 23px;
  font-weight: 950;
}

.evidence-timeline .lifecycle-entry p {
  color: var(--ink);
  font-size: 21px;
  line-height: 1.5;
  font-weight: 650;
}

.event-lineage {
  gap: 12px;
}

.event-lineage .source-note {
  max-width: 86ch;
  margin-bottom: 4px;
  font-size: 19px;
}

.event-lineage-list {
  display: grid;
  margin: 12px 0 0 12px;
  border-left: 4px solid color-mix(in srgb, var(--signal-teal) 46%, var(--line));
}

.event-lineage-entry {
  position: relative;
  min-height: 108px;
  padding: 10px 20px 26px 32px;
}

.event-lineage-entry:last-child {
  padding-bottom: 8px;
}

.lineage-node {
  position: absolute;
  top: 18px;
  left: -12px;
  width: 20px;
  height: 20px;
  border: 3px solid var(--teal);
  border-radius: 50%;
  background: #fff;
}

.event-lineage-entry.enrichment .lineage-node {
  border-color: #456b8f;
  background: #eaf1f7;
}

.event-lineage-entry.lifecycle .lineage-node {
  border-color: #a33a32;
  background: #fbe9e7;
}

.event-lineage-entry.current .lineage-node {
  border-color: #2f6b43;
  background: #e7f3eb;
}

.event-lineage-entry time {
  display: block;
  color: var(--midnight);
  font-size: 23px;
  font-weight: 950;
}

.event-lineage-entry strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.25;
  font-weight: 950;
}

.event-lineage-entry p {
  max-width: 92ch;
  margin: 7px 0 0;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.5;
  font-weight: 650;
}

.evidence-overview,
.source-proof-compact {
  gap: 16px;
}

.evidence-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.evidence-card-grid .snapshot-fact {
  min-height: 96px;
  padding: 16px 18px;
  background: #f8fafc;
  font-size: 24px;
  font-weight: 650;
  line-height: 1.45;
}

.event-snapshot .evidence-card-grid .snapshot-fact span {
  font-size: 16px;
}

.evidence-overview .snapshot-description {
  font-size: 24px;
  line-height: 1.5;
}

.source-proof-grid .snapshot-fact {
  min-height: 90px;
  font-size: 22px;
}

.changes-compact.no-changes {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 54px;
  border-top: 1px solid var(--line);
  padding: 14px 0 0;
}

.changes-compact.no-changes h4,
.changes-compact.no-changes .compact-note {
  margin: 0;
}

.changes-compact.no-changes .compact-note {
  color: #475467;
  font-size: 17px;
}

.calendar-trail-card {
  padding: 7px 12px;
}

.calendar-trail-card > .eyebrow {
  margin-bottom: 4px;
}

.calendar-trail-card .trail-suggestion {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.trail-action-copy {
  min-width: 0;
}

.trail-action-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trail-action-copy .meta {
  margin: 2px 0 0;
  font-size: 15px;
}

.trail-action-buttons {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.calendar-trail-card .secondary-button {
  min-height: 40px;
  padding: 0 14px;
  font-size: 15px;
}

.advanced-audit {
  margin-top: 4px;
}

.compact-story-section {
  gap: 12px;
  padding-top: 12px;
}

.compact-story-section + .snapshot-section {
  margin-top: 5px;
  padding-top: 16px;
}

.context-evidence-grid,
.apple-activity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.context-evidence-card,
.apple-activity-evidence {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  padding: 12px 14px;
  color: #344054;
  font-size: 22px;
  line-height: 1.48;
}

.context-evidence-card > span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 850;
  text-transform: uppercase;
}

.context-evidence-card strong,
.apple-activity-evidence strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.45;
}

.context-evidence-card ul {
  margin: 4px 0 0;
  padding-left: 20px;
}

.shared-context-card {
  grid-column: 1 / -1;
}

.apple-activity-evidence {
  display: grid;
  gap: 3px;
}

.apple-activity-evidence p,
.apple-activity-evidence time {
  margin: 0;
  font-size: 22px;
  line-height: 1.5;
}

.apple-activity-story > .source-note,
.calendar-context-story > .source-note {
  font-size: 20px;
  line-height: 1.5;
}

.advanced-audit {
  padding: 0;
  overflow: hidden;
  background: #f8fafc;
}

.advanced-audit > summary {
  padding: 13px 16px;
  font-size: 17px;
}

.advanced-audit[open] > summary {
  border-bottom: 1px solid var(--line);
  background: #eef4f5;
}

.advanced-audit-content {
  padding: 18px 20px 24px;
}

.advanced-audit h4 {
  margin: 22px 0 9px;
  color: #173b47;
  font-size: 19px;
}

.advanced-audit h4:first-of-type {
  margin-top: 8px;
}

.advanced-audit .audit-actions {
  margin: 0 0 10px;
}

.audit-evidence-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.audit-evidence-grid .snapshot-fact {
  min-height: 0;
  border-radius: 5px;
  padding: 12px 14px;
  background: #fff;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.audit-evidence-grid .snapshot-fact span {
  margin-bottom: 2px;
  font-size: 14px;
}

.audit-proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.audit-proof-card {
  min-width: 0;
  border: 1px solid #b9c9cf;
  border-left: 3px solid var(--steel, #52758b);
  border-radius: 6px;
  background: #fff;
  padding: 13px;
}

.audit-proof-card > strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 20px;
  text-transform: capitalize;
}

.audit-proof-card .audit-evidence-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.raw-notification-proof {
  margin-top: 8px;
}

.audit-compact-list {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.audit-compact-row {
  display: grid;
  grid-template-columns: 150px minmax(180px, 0.8fr) minmax(0, 1.8fr);
  gap: 16px;
  align-items: baseline;
  padding: 10px 12px;
  color: #344054;
  font-size: 20px;
  line-height: 1.45;
}

.audit-compact-row + .audit-compact-row {
  border-top: 1px solid #e6eaef;
}

.audit-compact-row time {
  color: #475467;
  font-size: 20px;
  font-weight: 850;
  white-space: nowrap;
}

.audit-compact-row strong {
  color: var(--ink);
  font-size: 20px;
}

.audit-compact-row span {
  min-width: 0;
  font-size: 20px;
  overflow-wrap: anywhere;
}

.audit-timeline {
  display: grid;
  border-left: 2px solid #9fb9b3;
  margin-left: 6px;
}

.audit-timeline-entry {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  position: relative;
  padding: 11px 12px 12px 20px;
  font-size: 20px;
}

.audit-timeline-entry::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 13px;
  width: 10px;
  height: 10px;
  border: 2px solid #52758b;
  border-radius: 50%;
  background: #fff;
}

.audit-timeline-entry + .audit-timeline-entry {
  border-top: 1px solid #e6eaef;
}

.audit-timeline-entry > time {
  color: #475467;
  font-size: 20px;
  font-weight: 850;
  white-space: nowrap;
}

.audit-timeline-entry > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.audit-timeline-entry strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.45;
}

.audit-timeline-entry .meta {
  font-size: 20px;
  line-height: 1.45;
}

.advanced-difference {
  grid-template-columns: minmax(140px, 0.7fr) repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
  padding: 9px 0 0;
  border-top: 1px dashed #cfd8dc;
  border-left: 0;
}

.advanced-difference span {
  font-size: 20px;
  line-height: 1.45;
}

.raw-audit-data {
  max-height: 22rem;
  margin: 7px 0 0;
  padding: 16px;
  border-radius: 5px;
  background: #17202b;
  color: #e6edf3;
  font: 20px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre;
  overflow: auto;
}

.forensic-viewer {
  width: 100%;
  margin-top: 10px;
  padding: 0;
  overflow: hidden;
  border-color: #304457;
  background: #111827;
  color: #e6edf3;
}

.forensic-viewer > summary {
  cursor: pointer;
  padding: 12px 14px;
  background: #1d2939;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.forensic-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid #344054;
  border-bottom: 1px solid #344054;
  color: #cbd5e1;
  font-size: 14px;
}

.forensic-toolbar .secondary-button {
  min-height: 40px;
  border-color: #94a3b8;
  background: #334155;
  color: #fff;
  font-size: 16px;
  font-weight: 850;
}

.forensic-code {
  width: 100%;
  max-height: 520px;
  margin: 0;
  padding: 20px;
  overflow: auto;
  background: #0b1220;
  color: #d9e5f2;
  font: 20px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  tab-size: 2;
  white-space: pre;
}

.raw-provider-debug pre.forensic-code {
  overflow: auto;
  overflow-wrap: normal;
  color: #d9e5f2;
  font: 20px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre;
}

.observation-list .audit-compact-row {
  grid-template-columns: 150px minmax(0, 1fr);
  min-height: 42px;
}

.hash-history-list .audit-compact-row span {
  color: #243447;
  font: 18px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.version-history-timeline .advanced-difference > strong {
  font-size: 20px;
}

@media (max-width: 980px) {
  .app-shell,
  .workspace {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .main {
    padding-right: 18px;
  }

  .sync-provider-grid {
    grid-template-columns: 1fr;
  }

  .calendar-monitoring-strip {
    grid-template-columns: 1fr 1fr;
  }

  .calendar-monitoring-strip .monitoring-control {
    grid-column: 1 / -1;
  }

  .calendar-setup-panel > summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .calendar-setup-panel > summary small {
    margin-left: 0;
  }

  .evidence-signal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .evidence-signal-grid .snapshot-fact:nth-child(3n + 1) {
    border-left: 1px solid #c7d9d4;
    padding-left: 12px;
  }

  .evidence-signal-grid .snapshot-fact:nth-child(2n + 1) {
    border-left: 0;
    padding-left: 0;
  }

  .audit-evidence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-proof-grid {
    grid-template-columns: 1fr;
  }

  .side-panel {
    margin-top: 0;
  }
}

@media (max-width: 680px) {
  .main {
    padding: 18px;
    overflow-x: hidden;
  }

  .main > *,
  .calendar-page,
  .calendar-card,
  .ui-build-marker {
    min-width: 0;
    max-width: 100%;
  }

  .ui-build-marker {
    width: 100%;
    white-space: normal;
  }

  body[data-page="calendar"] .main,
  body[data-page="calendar"] .calendar-page {
    padding: 12px;
  }

  .calendar-evidence-card {
    padding: 16px;
  }

  .sync-control-center {
    padding: 0;
  }

  .provider-sync-drawer-body {
    padding: 12px;
  }

  .calendar-monitoring-strip {
    grid-template-columns: 1fr;
  }

  .monitoring-facts {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .calendar-monitoring-strip .monitoring-control {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .calendar-monitoring-strip .monitoring-save-status {
    grid-column: auto;
    text-align: left;
  }

  .provider-sync-drawer > summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .provider-sync-drawer-status {
    align-items: flex-start;
    text-align: left;
  }

  .built-in-source-grid,
  .milestone-source-card {
    grid-template-columns: 1fr;
  }

  .calendar-change-list {
    gap: 10px;
  }

  .calendar-change-heading,
  .calendar-change-toolbar,
  .calendar-change-group-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-change-toolbar {
    justify-content: flex-start;
  }

  .calendar-change-set-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-change-alert {
    grid-template-columns: 1fr;
  }

  .calendar-change-timestamps {
    grid-column: 1;
    grid-template-columns: 1fr;
  }

  .calendar-review-actions {
    grid-column: 1;
    grid-row: auto;
    min-width: 0;
  }

  .calendar-review-dialog {
    height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
    width: calc(100vw - 16px);
  }

  .calendar-review-dialog-header,
  .calendar-review-dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-review-snapshot {
    height: calc(100% - 220px);
    padding: 12px;
  }

  .sync-control-heading,
  .sync-provider-title,
  .picker-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .monitoring-control,
  .sync-fact-grid,
  .sync-calendar-picker .calendar-select-list,
  .built-in-source-grid,
  .built-in-source-card,
  .sync-provider-grid {
    grid-template-columns: 1fr;
  }

  .monitoring-control {
    min-width: 0;
  }

  .monitoring-control span,
  .picker-heading span {
    text-align: left;
  }

  .sync-health {
    align-self: flex-start;
  }

  .evidence-heading,
  .calendar-trail-card .trail-suggestion,
  .related-trails-heading,
  .related-trail-record {
    align-items: stretch;
    flex-direction: column;
  }

  .evidence-card-grid,
  .evidence-signal-grid {
    grid-template-columns: 1fr;
  }

  .context-evidence-grid,
  .apple-activity-grid,
  .audit-evidence-grid,
  .audit-proof-card .audit-evidence-grid {
    grid-template-columns: 1fr;
  }

  .audit-compact-row,
  .audit-timeline-entry {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .audit-compact-row time,
  .audit-timeline-entry > time {
    white-space: normal;
  }

  .advanced-difference {
    grid-template-columns: 1fr;
  }

  .advanced-audit-content {
    padding: 10px;
  }

  .forensic-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .evidence-signal-grid .snapshot-fact {
    border-left: 0;
    border-top: 1px solid #c7d9d4;
    padding: 10px 0;
  }

  .evidence-signal-grid .snapshot-fact:first-child {
    border-top: 0;
  }

  .trail-action-copy strong {
    white-space: normal;
  }

  .trail-action-buttons {
    flex-wrap: wrap;
  }

  .topbar,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .stats-grid,
  .detail-grid,
  .add-form,
  .cases-grid,
  .alerts-grid,
  .sources-grid,
  .timeline-filters,
  .proof-columns,
  .calendar-events,
  .calendar-events.week-view,
  .calendar-events.month-view,
  .learn-grid,
  .settings-grid,
  .connection-status,
  .snapshot-grid,
  .difference-values {
    grid-template-columns: 1fr;
  }

  .apple-connect-form {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .timeline-date {
    text-align: left;
  }

  .timeline-item::after,
  .timeline-content::before {
    display: none;
  }

  .primary-action,
  .secondary-button,
  .filter-button {
    width: 100%;
  }

  .filter-button.trash-tab {
    margin-left: 0;
  }

  .relationship-node {
    grid-template-columns: 1fr;
  }
}

/* NeverLost Design System 1.0: auditor workspace */
.ui-build-marker {
  border-color: #8ea49d;
  background: #edf3ef;
  color: #244a3d;
  box-shadow: none;
}

.sidebar {
  background: var(--nav);
  border-right: 1px solid #283746;
}

.brand-mark {
  background: #20303e;
  border-color: #5c6d79;
}

.nav-item {
  border-color: transparent;
  color: #dce3e8;
}

.nav-item:hover,
.nav-item.active {
  background: var(--nav-raised);
  border-color: #536575;
}

.primary-action {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

.primary-action:hover {
  background: #123f3c;
}

.secondary-button,
.filter-button {
  border-color: #aab5bc;
  background: #fffefa;
  color: #263746;
}

.secondary-button:hover,
.filter-button:hover,
.filter-button.active {
  border-color: var(--steel);
  background: #e9eef1;
  color: #172c3b;
}

.calendar-monitoring-strip {
  background: #162431;
  border-color: #314452;
  box-shadow: var(--shadow-soft);
}

.calendar-change-body {
  max-height: min(620px, 62vh);
  overflow: auto;
  padding-right: 3px;
}

.monitoring-indicator {
  background: #70ad8b;
  border-color: #29473d;
  box-shadow: 0 0 0 2px #a4c8b4;
}

.calendar-change-review {
  border-color: var(--line-strong);
  border-top-color: var(--charcoal);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.calendar-change-heading h3,
.calendar-change-group-heading h4,
.calendar-change-set-heading strong {
  color: #172c3a;
}

.calendar-change-toolbar {
  max-width: 760px;
}

.review-collapse-button {
  border: 2px solid #435b6d;
  background: #e7ecef;
  color: #182f3f;
  font-weight: 900;
}

.review-collapse-button::after {
  content: "⌃";
  margin-left: 7px;
  font-size: 16px;
}

.calendar-change-review.collapsed .review-collapse-button::after {
  content: "⌄";
}

.calendar-change-count {
  border-color: #b47d36;
  background: #f4ead9;
  color: #674719;
}

.calendar-change-group {
  border-color: #aeb8bf;
  background: #fff;
}

.calendar-change-group-heading {
  background: #e8ecee;
  border-color: #aeb8bf;
}

.calendar-change-set-heading {
  background: #f3f1eb;
}

.calendar-change-alert {
  align-items: start;
  grid-template-columns: minmax(230px, 1.25fr) minmax(170px, 0.75fr) minmax(270px, auto);
  padding: 10px 12px;
}

.calendar-change-timestamps {
  grid-column: 1 / 3;
}

.calendar-change-alert.unread {
  background: #fffdf8;
  box-shadow: inset 5px 0 0 var(--amber);
}

.calendar-change-type {
  color: #76501f;
}

.calendar-review-actions {
  grid-column: 3;
  grid-row: 1 / 3;
  min-width: 290px;
}

.calendar-review-dialog {
  border-color: #667988;
  background: var(--paper);
  box-shadow: var(--shadow-modal);
}

.calendar-review-dialog::backdrop {
  background: rgba(9, 18, 27, 0.72);
}

.calendar-review-dialog-header {
  background: #e9edef;
  border-color: #9eabb4;
}

.event-review-brand {
  align-items: baseline;
  display: flex;
  gap: 9px;
  margin-bottom: 4px;
}

.event-review-brand strong {
  color: #152c3a;
  font-size: 18px;
}

.event-review-brand span {
  color: #576875;
  font-size: 13px;
  font-weight: 750;
}

.calendar-review-dialog-actions {
  background: #f8f6f0;
  border-color: #c6ccd0;
}

.calendar-review-dialog-actions #openFullCalendarEvent {
  margin-left: auto;
}

.calendar-review-snapshot {
  background: #f4f1ea;
}

.calendar-evidence-card,
.calendar-snapshot-card,
.calendar-trail-card {
  background: var(--paper);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.calendar-day-column,
.calendar-month-cell {
  border-color: #bdc5ca;
  background: #fffefa;
}

.calendar-weekday {
  color: #3d4a54;
}

.mini-event {
  border-radius: 5px;
  box-shadow: 0 1px 1px rgba(26, 35, 44, 0.05);
}

.event-source-badge {
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 11px;
  letter-spacing: 0.03em;
}

.badge-apple {
  background: var(--slate);
}

.badge-shared {
  background: var(--bronze);
}

.badge-google {
  background: var(--steel);
}

.badge-outlook {
  background: #326a72;
}

.badge-holiday {
  background: var(--forest);
}

.badge-milestone {
  background: var(--indigo);
}

.badge-neverlost {
  background: var(--teal);
}

.badge-removed,
.badge-change {
  background: var(--oxide);
}

.badge-change-modified {
  background: var(--steel);
}

.badge-change-reappeared {
  background: var(--verified);
}

.mini-event.source-apple,
.calendar-agenda-row.source-apple,
.calendar-search-result.source-apple {
  border-color: #9da8b2;
  border-left-color: var(--slate);
  background: #eef1f3;
  color: #263442;
}

.mini-event.source-shared,
.calendar-agenda-row.source-shared,
.calendar-search-result.source-shared {
  border-color: #b9aa8d;
  border-left-color: var(--bronze);
  background: #f3eee4;
  color: #4e422f;
}

.mini-event.source-google,
.calendar-agenda-row.source-google,
.calendar-search-result.source-google {
  border-color: #9daeba;
  border-left-color: var(--steel);
  background: #eaf0f3;
  color: #2b4659;
}

.mini-event.source-outlook,
.calendar-agenda-row.source-outlook,
.calendar-search-result.source-outlook {
  border-color: #98b1b3;
  border-left-color: #326a72;
  background: #eaf2f1;
  color: #265158;
}

.mini-event.source-holiday,
.calendar-agenda-row.source-holiday,
.calendar-search-result.source-holiday {
  border-color: #9db0a3;
  border-left-color: var(--forest);
  background: #eaf0eb;
  color: #304d3d;
}

.mini-event.source-milestone,
.calendar-agenda-row.source-milestone,
.calendar-search-result.source-milestone {
  border-color: #a4a8ba;
  border-left-color: var(--indigo);
  background: #eeedf3;
  color: #3d4361;
}

.mini-event.source-neverlost,
.calendar-agenda-row.source-neverlost,
.calendar-search-result.source-neverlost {
  border-color: #99afa9;
  border-left-color: var(--teal);
  background: #e9f0ee;
  color: #27504c;
}

.mini-event.source-removed,
.calendar-agenda-row.source-removed,
.calendar-search-result.source-removed {
  border-color: #ad7773;
  border-left-color: var(--oxide);
  background: #f4e9e7;
  color: #67322f;
}

.sync-control-center,
.provider-sync-drawer-body,
.sync-provider-card {
  background: #f5f3ed;
}

.provider-sync-drawer > summary {
  background: #e8ecec;
}

.provider-sync-drawer > summary strong {
  color: #243845;
}

.evidence-header {
  border-color: #8ca9a2;
  border-left-color: var(--teal);
  background: #edf3f1;
  box-shadow: var(--shadow-soft);
}

.snapshot-section,
.evidence-timeline,
.source-classification {
  border-color: #b6c0c6;
  background: var(--paper);
}

.change-review-status {
  border-left: 5px solid var(--amber);
  background: #faf6ed;
}

.change-review-status.removed-status {
  border-left-color: var(--oxide);
  background: #f7ecea;
}

.change-review-status > .removed-event-story,
.change-review-status > .apple-activity-story {
  margin: 0;
}

.source-classification.source-shared {
  border-left-color: var(--bronze);
  background: #f3eee4;
}

.source-classification.source-milestone {
  border-left-color: var(--indigo);
  background: #eeedf3;
}

.context-evidence-card,
.apple-activity-evidence,
.evidence-card-grid .snapshot-fact {
  background: #f4f3ef;
  border-color: #c6ccd0;
}

.attached-evidence-section {
  border-left: 5px solid var(--teal);
}

.related-trails-section {
  border-left: 5px solid var(--bronze);
  background: #f8f4eb;
}

.related-trails-heading,
.related-trail-record {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.related-trails-heading h4,
.related-trails-heading p {
  margin: 0;
}

.related-trails-heading > span {
  border: 1px solid #a99168;
  border-radius: 999px;
  color: #674e28;
  font-size: 14px;
  font-weight: 850;
  padding: 5px 9px;
}

.related-trail-record {
  border-top: 1px solid #d6cbb7;
  padding-top: 12px;
}

.related-trail-record > div:first-child {
  display: grid;
  gap: 3px;
}

.related-trail-record strong {
  font-size: 21px;
}

.related-trail-record span,
.related-trail-record small {
  color: #5d5547;
  font-size: 15px;
}

.related-trail-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.connected-evidence-section {
  border-left: 5px solid var(--signal-teal);
}

.connected-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.connected-evidence-grid > article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
  background: var(--ivory);
}

.connected-evidence-grid > article > strong {
  display: block;
  margin-bottom: 7px;
  font-size: 18px;
}

.connected-evidence-grid ul {
  margin: 0;
  padding-left: 20px;
  font-size: 18px;
  line-height: 1.5;
}

.connected-evidence-grid li + li {
  margin-top: 8px;
}

.connected-evidence-grid li span,
.connected-evidence-grid li small {
  display: block;
}

.connected-evidence-grid li small {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

.connected-evidence-empty {
  color: var(--muted);
  font-size: 17px;
}

.connected-trail-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 18px;
}

.suggested-trail-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-left: 5px solid var(--evidence-gold);
}

.suggested-trail-section h4,
.suggested-trail-section p {
  margin: 0;
}

.suggested-trail-section strong,
.suggested-trail-section span {
  display: block;
}

.suggested-trail-section strong {
  margin-top: 8px;
  font-size: 21px;
}

.suggested-trail-section span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 17px;
}

.summary-change-story {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.summary-change-story > strong {
  font-size: 18px;
}

.summary-change-story > p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.trust-integrity-section {
  border-left: 5px solid var(--signal-teal);
}

.verification-summary-card {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
  background: var(--ivory);
}

.verification-summary-card > div:first-child > strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
  line-height: 1.4;
}

.verification-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.verification-summary-grid .snapshot-fact {
  min-height: 0;
}

.parsed-provider-snapshot {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  background: #fff;
}

.parsed-provider-snapshot > .source-note {
  margin-top: 0;
}

.advanced-audit > summary {
  background: #202a33;
  color: #eef2f4;
}

.forensic-viewer,
.forensic-code {
  background: #131b22;
  color: #e7ecef;
}

/* NeverLost Visual Comfort + Brand System */
:root {
  --midnight: #0f2433;
  --ivory: #f6f3ec;
  --evidence-gold: #b08a28;
  --signal-teal: #1f6f78;
  --alert-red: #a63d40;
  --ink: var(--midnight);
  --muted: color-mix(in srgb, var(--midnight) 62%, var(--ivory));
  --line: color-mix(in srgb, var(--midnight) 20%, var(--ivory));
  --line-strong: color-mix(in srgb, var(--midnight) 34%, var(--ivory));
  --paper: color-mix(in srgb, var(--ivory) 96%, var(--midnight));
  --wash: color-mix(in srgb, var(--ivory) 97%, var(--midnight));
  --nav: var(--midnight);
  --nav-raised: color-mix(in srgb, var(--midnight) 88%, var(--ivory));
  --teal: var(--signal-teal);
  --teal-dark: color-mix(in srgb, var(--signal-teal) 72%, var(--midnight));
  --slate: color-mix(in srgb, var(--midnight) 82%, var(--ivory));
  --charcoal: color-mix(in srgb, var(--midnight) 90%, var(--ivory));
  --steel: color-mix(in srgb, var(--midnight) 72%, var(--signal-teal));
  --forest: color-mix(in srgb, var(--midnight) 52%, var(--signal-teal));
  --indigo: color-mix(in srgb, var(--midnight) 68%, var(--evidence-gold));
  --bronze: color-mix(in srgb, var(--evidence-gold) 76%, var(--midnight));
  --oxide: var(--alert-red);
  --amber: var(--evidence-gold);
  --verified: color-mix(in srgb, var(--signal-teal) 76%, var(--midnight));
  --blue: var(--steel);
  --gold: var(--evidence-gold);
  --rose: var(--alert-red);
  --green-soft: color-mix(in srgb, var(--signal-teal) 10%, var(--ivory));
  --blue-soft: color-mix(in srgb, var(--midnight) 8%, var(--ivory));
  --gold-soft: color-mix(in srgb, var(--evidence-gold) 12%, var(--ivory));
  --rose-soft: color-mix(in srgb, var(--alert-red) 10%, var(--ivory));
  --shadow-soft: 0 10px 26px color-mix(in srgb, var(--midnight) 10%, transparent);
  --shadow-modal: 0 30px 90px color-mix(in srgb, var(--midnight) 44%, transparent);
}

html {
  color-scheme: light;
}

:root[data-theme="neverlost-default"] {
  --midnight: #0f2433;
  --ivory: #f6f3ec;
  --evidence-gold: #b08a28;
  --signal-teal: #1f6f78;
  --alert-red: #a63d40;
  --indigo: #4d6171;
  --paper: #f2f0ea;
  --wash: #f3f1eb;
  --nav-raised: #263b49;
}

:root[data-theme="axiom-one"] {
  --midnight: #25282d;
  --ivory: #fbfaf7;
  --evidence-gold: #14805e;
  --signal-teal: #14805e;
  --alert-red: #a33f43;
  --indigo: #4f5966;
  --paper: #ffffff;
  --wash: #f5f4f0;
  --nav-raised: #30343a;
}

:root[data-theme="obsidian-ledger"] {
  --midnight: #080a0d;
  --ivory: #f4f6f8;
  --evidence-gold: #c2c8cf;
  --signal-teal: #aeb8c2;
  --alert-red: #c8565b;
  --indigo: #7d8996;
  --paper: #15191e;
  --wash: #090b0e;
  --nav-raised: #1a1f25;
}

:root[data-theme="living-record"] {
  --midnight: #284136;
  --ivory: #f6f1e7;
  --evidence-gold: #9a7b3d;
  --signal-teal: #5e7d67;
  --alert-red: #a45450;
  --indigo: #687c75;
  --paper: #fbf8f0;
  --wash: #e9ede4;
  --nav-raised: #3d5849;
}

:root[data-theme="edc-field-notebook"] {
  --midnight: #111315;
  --ivory: #f5f3ee;
  --evidence-gold: #c66a2b;
  --brass-accent: #9b6a32;
  --signal-teal: #7b8b52;
  --timeline-blue: #66717d;
  --alert-red: #c65454;
  --success: #3e9b62;
  --ink: #f5f3ee;
  --muted: #b7b4ac;
  --line: #3b4148;
  --line-strong: #58616a;
  --paper: #1e2227;
  --wash: #111315;
  --nav: #1a1614;
  --nav-raised: #262b31;
  --teal: #7b8b52;
  --teal-dark: #657344;
  --slate: #68727d;
  --charcoal: #111315;
  --steel: #68727d;
  --forest: #7b8b52;
  --indigo: #66717d;
  --bronze: #9b6a32;
  --oxide: #c65454;
  --amber: #c66a2b;
  --verified: #7b8b52;
  --blue: #66717d;
  --gold: #c66a2b;
  --rose: #c65454;
  --green-soft: #173a38;
  --blue-soft: #252f40;
  --gold-soft: #3a3120;
  --rose-soft: #3d2526;
  --graphite-card: #292e34;
  --graphite-card-deep: #202429;
  --field-olive: #34382b;
  --field-olive-deep: #292d23;
  --steel-card: #2b3036;
  --steel-edge: #77828d;
  --brass-card: #363023;
  --notebook-grid: rgba(92, 135, 199, 0.075);
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.28);
  --shadow-modal: 0 34px 100px rgba(0, 0, 0, 0.72);
}

body {
  background: var(--wash);
  color: var(--ink);
}

.theme-explorer {
  display: grid;
  gap: 6px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--ivory) 22%, var(--midnight));
  border-radius: 6px;
  background: var(--nav-raised);
}

.theme-explorer > span {
  color: color-mix(in srgb, var(--ivory) 78%, var(--midnight));
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.theme-explorer select {
  width: 100%;
  min-height: 42px;
  border-color: color-mix(in srgb, var(--ivory) 34%, var(--midnight));
  background: var(--paper);
  color: var(--midnight);
  font-size: 15px;
  font-weight: 750;
}

.theme-explorer option,
select option {
  background: var(--paper);
  color: var(--midnight);
}

.ui-build-marker {
  border-color: color-mix(in srgb, var(--signal-teal) 48%, var(--ivory));
  background: color-mix(in srgb, var(--signal-teal) 9%, var(--ivory));
  color: var(--midnight);
}

.sidebar {
  border-right-color: color-mix(in srgb, var(--ivory) 16%, var(--midnight));
}

.brand-mark {
  background: color-mix(in srgb, var(--midnight) 84%, var(--signal-teal));
  border-color: color-mix(in srgb, var(--ivory) 30%, var(--midnight));
}

.nav-item {
  color: color-mix(in srgb, var(--ivory) 92%, var(--midnight));
}

.nav-item:hover,
.nav-item.active {
  background: color-mix(in srgb, var(--signal-teal) 18%, var(--midnight));
  border-color: color-mix(in srgb, var(--signal-teal) 62%, var(--ivory));
}

.primary-action {
  background: var(--signal-teal);
  border-color: var(--signal-teal);
}

.primary-action:hover {
  background: color-mix(in srgb, var(--signal-teal) 76%, var(--midnight));
}

.secondary-button,
.filter-button,
input,
select,
textarea {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--ivory) 98%, var(--midnight));
  color: var(--midnight);
}

.stat,
.notification-center,
.search-section,
.trail-activity-section,
.mode-examples-section,
.vault-list,
.detail-view,
.timeline-section,
.cases-section,
.alerts-section,
.calendar-page,
.sources-section,
.learn-section,
.settings-section,
.item-card,
.case-card,
.alert-card,
.source-card,
.detail-pane,
dialog {
  border-color: var(--line-strong);
  background: var(--paper);
  color: var(--midnight);
}

.side-panel {
  background: var(--nav-raised);
  border-color: color-mix(in srgb, var(--ivory) 18%, var(--midnight));
}

.secondary-button:hover,
.filter-button:hover,
.filter-button.active {
  border-color: var(--signal-teal);
  background: color-mix(in srgb, var(--signal-teal) 8%, var(--ivory));
  color: var(--midnight);
}

.calendar-monitoring-strip {
  background: var(--midnight);
  border-color: color-mix(in srgb, var(--signal-teal) 48%, var(--midnight));
}

.monitoring-indicator {
  background: var(--signal-teal);
  border-color: color-mix(in srgb, var(--signal-teal) 52%, var(--midnight));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--signal-teal) 46%, var(--ivory));
}

.calendar-change-review,
.calendar-evidence-card,
.calendar-snapshot-card,
.calendar-trail-card,
.snapshot-section,
.evidence-timeline,
.source-classification {
  background: var(--paper);
  border-color: var(--line-strong);
}

.calendar-change-review {
  border-top-color: var(--midnight);
}

.calendar-change-heading h3,
.calendar-change-group-heading h4,
.calendar-change-set-heading strong {
  color: var(--midnight);
}

.calendar-change-heading p:not(.eyebrow),
.calendar-review-status,
.calendar-change-set-heading span,
.calendar-change-set-heading time {
  color: var(--muted);
}

.review-collapse-button {
  border-color: var(--signal-teal);
  background: color-mix(in srgb, var(--signal-teal) 10%, var(--ivory));
  color: var(--midnight);
}

.calendar-change-count {
  border-color: color-mix(in srgb, var(--evidence-gold) 72%, var(--midnight));
  background: color-mix(in srgb, var(--evidence-gold) 13%, var(--ivory));
  color: color-mix(in srgb, var(--evidence-gold) 42%, var(--midnight));
}

.calendar-change-group {
  border-color: var(--line-strong);
  background: var(--ivory);
}

.calendar-change-group-heading {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--midnight) 7%, var(--ivory));
}

.calendar-change-set-heading {
  background: color-mix(in srgb, var(--evidence-gold) 5%, var(--ivory));
}

.calendar-change-alert {
  background: var(--ivory);
  border-color: var(--line);
}

.calendar-change-alert.unread {
  background: color-mix(in srgb, var(--evidence-gold) 4%, var(--ivory));
  box-shadow: inset 5px 0 0 var(--evidence-gold);
}

.calendar-change-alert:focus-within {
  background: color-mix(in srgb, var(--signal-teal) 8%, var(--ivory));
  outline-color: var(--signal-teal);
}

.calendar-change-primary strong {
  color: var(--midnight);
  font-size: 21px;
}

.calendar-change-type {
  color: color-mix(in srgb, var(--evidence-gold) 42%, var(--midnight));
  font-size: 17px;
}

.calendar-change-alert > span,
.calendar-change-event-time,
.calendar-change-source > span:last-child,
.calendar-change-timestamps span {
  font-size: 17px;
  line-height: 1.45;
}

.calendar-change-source small,
.calendar-change-timestamps b,
.calendar-review-actions small {
  color: var(--muted);
  font-size: 15px;
}

.calendar-review-actions .secondary-button {
  font-size: 15px;
}

/* Targeted Review Queue readability pass. Layout and behavior remain unchanged. */
.calendar-change-heading h3 {
  font-size: 29px;
}

.calendar-change-heading p:not(.eyebrow),
.calendar-review-status {
  font-size: 19px;
  line-height: 1.45;
}

.calendar-change-group-heading h4 {
  font-size: 28px;
}

.calendar-change-group-heading span {
  font-size: 21px;
}

.calendar-change-set-heading strong {
  font-size: 24px;
}

.calendar-change-set-heading span,
.calendar-change-set-heading time {
  font-size: 21px;
  line-height: 1.4;
}

.calendar-change-primary strong {
  font-size: 27px;
  line-height: 1.3;
}

.calendar-change-type,
.calendar-review-state {
  font-size: 23px;
}

.calendar-change-alert > span,
.calendar-change-event-time,
.calendar-change-source > span:last-child,
.calendar-change-timestamps span {
  font-size: 23px;
  line-height: 1.45;
}

.calendar-change-source small,
.calendar-change-timestamps b,
.calendar-review-actions small {
  font-size: 21px;
  line-height: 1.35;
}

.calendar-review-actions .secondary-button {
  min-height: 42px;
  font-size: 20px;
}

.calendar-change-count,
.calendar-change-toolbar .secondary-button {
  font-size: 18px;
}

.verification-history-panel {
  max-height: 420px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.verification-history-panel:focus-visible {
  outline: 2px solid var(--signal-teal);
  outline-offset: 2px;
}

.calendar-review-dialog {
  background: var(--ivory);
  border-color: var(--line-strong);
}

.calendar-review-dialog::backdrop {
  background: color-mix(in srgb, var(--midnight) 76%, transparent);
}

.calendar-review-dialog-header {
  background: color-mix(in srgb, var(--midnight) 7%, var(--ivory));
  border-color: var(--line-strong);
}

.event-review-brand strong,
.calendar-review-dialog-header h2 {
  color: var(--midnight);
}

.event-review-brand span,
.calendar-review-dialog-header p:last-child,
.calendar-event-review-generated {
  color: var(--muted);
}

.calendar-review-dialog-actions {
  background: color-mix(in srgb, var(--evidence-gold) 3%, var(--ivory));
  border-color: var(--line);
}

.calendar-review-snapshot {
  background: var(--wash);
}

.calendar-day-column,
.calendar-month-cell {
  border-color: var(--line);
  background: var(--ivory);
}

.calendar-month-cell.empty {
  background: color-mix(in srgb, var(--midnight) 2%, var(--ivory));
}

.calendar-weekday,
.calendar-day-column strong,
.calendar-month-cell strong {
  color: var(--midnight);
}

.mini-event {
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--evidence-gold) 58%, var(--ivory));
}

.event-source-badge {
  border-color: color-mix(in srgb, var(--ivory) 38%, transparent);
}

.badge-apple,
.badge-google,
.badge-outlook {
  background: var(--slate);
}

.badge-shared,
.badge-holiday {
  background: var(--evidence-gold);
  color: var(--midnight);
}

.badge-milestone {
  background: var(--indigo);
}

.badge-life-proof {
  background: var(--evidence-gold);
  color: var(--midnight);
}

.badge-event {
  background: var(--signal-teal);
  color: var(--ivory);
}

.badge-neverlost {
  background: var(--signal-teal);
}

.badge-removed,
.badge-change {
  background: var(--alert-red);
}

.badge-change-new,
.badge-change-reappeared {
  background: var(--signal-teal);
}

.badge-change-modified {
  background: var(--evidence-gold);
  color: var(--midnight);
}

.mini-event.source-apple,
.calendar-agenda-row.source-apple,
.calendar-search-result.source-apple,
.mini-event.source-google,
.calendar-agenda-row.source-google,
.calendar-search-result.source-google,
.mini-event.source-outlook,
.calendar-agenda-row.source-outlook,
.calendar-search-result.source-outlook {
  border-color: color-mix(in srgb, var(--midnight) 28%, var(--ivory));
  border-left-color: var(--slate);
  background: color-mix(in srgb, var(--midnight) 7%, var(--ivory));
  color: var(--midnight);
}

.mini-event.source-shared,
.calendar-agenda-row.source-shared,
.calendar-search-result.source-shared {
  border-color: color-mix(in srgb, var(--evidence-gold) 48%, var(--ivory));
  border-left-color: var(--evidence-gold);
  background: color-mix(in srgb, var(--evidence-gold) 10%, var(--ivory));
  color: var(--midnight);
}

.mini-event.source-holiday,
.calendar-agenda-row.source-holiday,
.calendar-search-result.source-holiday {
  border-color: color-mix(in srgb, var(--evidence-gold) 36%, var(--ivory));
  border-left-color: var(--evidence-gold);
  background: color-mix(in srgb, var(--evidence-gold) 7%, var(--ivory));
  color: var(--midnight);
}

.mini-event.source-milestone,
.calendar-agenda-row.source-milestone,
.calendar-search-result.source-milestone {
  border-color: color-mix(in srgb, var(--evidence-gold) 58%, var(--ivory));
  border-left-color: var(--evidence-gold);
  background: color-mix(in srgb, var(--evidence-gold) 12%, var(--ivory));
  color: var(--midnight);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--evidence-gold) 20%, transparent);
}

.mini-event.source-neverlost,
.calendar-agenda-row.source-neverlost,
.calendar-search-result.source-neverlost {
  border-color: color-mix(in srgb, var(--evidence-gold) 46%, var(--ivory));
  border-left-color: var(--evidence-gold);
  background: color-mix(in srgb, var(--evidence-gold) 9%, var(--ivory));
  color: var(--midnight);
}

.mini-event.source-removed,
.calendar-agenda-row.source-removed,
.calendar-search-result.source-removed {
  border-color: color-mix(in srgb, var(--alert-red) 54%, var(--ivory));
  border-left-color: var(--alert-red);
  background: color-mix(in srgb, var(--alert-red) 9%, var(--ivory));
  color: color-mix(in srgb, var(--alert-red) 54%, var(--midnight));
}

.sync-control-center,
.provider-sync-drawer-body,
.sync-provider-card {
  background: color-mix(in srgb, var(--midnight) 2%, var(--ivory));
}

.advanced-audit,
.advanced-audit-content,
.parsed-provider-snapshot,
.audit-proof-card,
.audit-evidence-grid .snapshot-fact,
.connected-evidence-grid > article,
.verification-summary-card,
.attached-evidence-card {
  border-color: var(--line);
  background: var(--paper);
  color: var(--midnight);
}

.advanced-audit[open] > summary {
  background: color-mix(in srgb, var(--midnight) 90%, var(--signal-teal));
  color: var(--ivory);
}

.audit-compact-row,
.audit-timeline-entry {
  border-color: var(--line);
}

.raw-audit-data,
.forensic-viewer,
.forensic-code,
.raw-provider-debug pre.forensic-code {
  background: color-mix(in srgb, var(--midnight) 94%, #000);
  color: color-mix(in srgb, var(--ivory) 94%, #fff);
}

.forensic-viewer > summary,
.forensic-toolbar {
  border-color: color-mix(in srgb, var(--ivory) 22%, var(--midnight));
  background: color-mix(in srgb, var(--midnight) 86%, var(--signal-teal));
  color: var(--ivory);
}

.forensic-toolbar .secondary-button {
  border-color: color-mix(in srgb, var(--ivory) 44%, var(--midnight));
  background: color-mix(in srgb, var(--midnight) 76%, var(--signal-teal));
  color: var(--ivory);
}

.provider-sync-drawer > summary {
  background: color-mix(in srgb, var(--midnight) 4%, var(--ivory));
  padding-block: 9px;
}

.provider-sync-drawer > summary strong {
  color: var(--midnight);
}

.provider-sync-drawer > summary span,
.provider-sync-drawer-status,
.sync-provider-summary p,
.sync-provider-details p {
  color: var(--muted);
}

.provider-sync-drawer-body {
  gap: 10px;
  padding: 10px;
}

.sync-provider-grid {
  gap: 8px;
}

.sync-provider-card {
  border-color: color-mix(in srgb, var(--midnight) 16%, var(--ivory));
  gap: 8px;
  padding: 11px 12px;
}

.sync-provider-summary {
  gap: 7px;
}

.sync-provider-summary h4 {
  font-size: 17px;
}

.sync-provider-summary p {
  font-size: 14px;
}

.sync-provider-summary .primary-action {
  min-height: 38px;
}

.sync-provider-details {
  border-top-color: color-mix(in srgb, var(--midnight) 12%, var(--ivory));
  padding-top: 7px;
}

.sync-provider-details > summary {
  color: var(--muted);
  font-size: 13px;
}

.sync-meaning {
  color: var(--muted);
  font-size: 13px;
}

.calendar-create-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.evidence-header {
  border-color: color-mix(in srgb, var(--signal-teal) 42%, var(--ivory));
  border-left-color: var(--signal-teal);
  background: color-mix(in srgb, var(--signal-teal) 7%, var(--ivory));
}

.change-review-status {
  border-left-color: var(--evidence-gold);
  background: color-mix(in srgb, var(--evidence-gold) 7%, var(--ivory));
}

.change-review-status.removed-status {
  border-left-color: var(--alert-red);
  background: color-mix(in srgb, var(--alert-red) 7%, var(--ivory));
}

.source-classification.source-shared {
  border-left-color: var(--evidence-gold);
  background: color-mix(in srgb, var(--evidence-gold) 9%, var(--ivory));
}

.source-classification.source-milestone {
  border-left-color: var(--indigo);
  background: color-mix(in srgb, var(--indigo) 7%, var(--ivory));
}

.context-evidence-card,
.apple-activity-evidence,
.evidence-card-grid .snapshot-fact {
  background: color-mix(in srgb, var(--midnight) 3%, var(--ivory));
  border-color: var(--line);
}

.attached-evidence-section {
  border-left-color: var(--signal-teal);
}

.related-trails-section {
  border-left-color: var(--evidence-gold);
  background: color-mix(in srgb, var(--evidence-gold) 5%, var(--ivory));
}

.related-trails-heading > span {
  border-color: color-mix(in srgb, var(--evidence-gold) 54%, var(--ivory));
  color: color-mix(in srgb, var(--evidence-gold) 42%, var(--midnight));
}

.related-trail-record {
  border-top-color: color-mix(in srgb, var(--evidence-gold) 24%, var(--ivory));
}

.related-trail-record span,
.related-trail-record small {
  color: var(--muted);
}

.advanced-audit > summary {
  background: var(--midnight);
  color: var(--ivory);
}

.forensic-viewer,
.forensic-code {
  background: color-mix(in srgb, var(--midnight) 94%, var(--signal-teal));
  color: var(--ivory);
}

:root[data-theme="edc-field-notebook"] body,
:root[data-theme="edc-field-notebook"] .main {
  background: #111315;
  color: #f5f3ee;
}

:root[data-theme="edc-field-notebook"] .sidebar {
  background: #1a1614;
  border-right-color: #4b4038;
}

:root[data-theme="edc-field-notebook"] .brand-mark {
  background: #262b31;
  border-color: #a67c2d;
}

:root[data-theme="edc-field-notebook"] .brand span,
:root[data-theme="edc-field-notebook"] .side-panel p,
:root[data-theme="edc-field-notebook"] .side-label {
  color: #b7b4ac;
}

:root[data-theme="edc-field-notebook"] .nav-item {
  border-color: #3b3632;
  color: #f5f3ee;
}

:root[data-theme="edc-field-notebook"] .nav-item:hover,
:root[data-theme="edc-field-notebook"] .nav-item.active {
  border-color: #a67c2d;
  background: #2e2925;
  color: #f5f3ee;
}

:root[data-theme="edc-field-notebook"] .theme-explorer,
:root[data-theme="edc-field-notebook"] .side-panel {
  border-color: #4a433d;
  background: #262b31;
}

:root[data-theme="edc-field-notebook"] .theme-explorer > span {
  color: #c89b3c;
}

:root[data-theme="edc-field-notebook"] .theme-explorer select,
:root[data-theme="edc-field-notebook"] select option {
  border-color: #58616a;
  background: #1e2227;
  color: #f5f3ee;
}

:root[data-theme="edc-field-notebook"] .ui-build-marker {
  border-color: #53646a;
  background: #1e2227;
  color: #b7b4ac;
}

:root[data-theme="edc-field-notebook"] :is(
  .stat,
  .notification-center,
  .search-section,
  .trail-activity-section,
  .mode-examples-section,
  .vault-list,
  .detail-view,
  .timeline-section,
  .cases-section,
  .alerts-section,
  .calendar-page,
  .sources-section,
  .learn-section,
  .settings-section,
  .item-card,
  .case-card,
  .alert-card,
  .source-card,
  .detail-pane,
  .calendar-change-review,
  .calendar-evidence-card,
  .calendar-snapshot-card,
  .calendar-trail-card,
  .snapshot-section,
  .evidence-timeline,
  .source-classification,
  dialog
) {
  border-color: #58616a;
  background: #1e2227;
  color: #f5f3ee;
}

:root[data-theme="edc-field-notebook"] :is(
  h1,
  h2,
  h3,
  h4,
  .snapshot-title,
  .calendar-change-heading h3,
  .calendar-change-group-heading h4,
  .calendar-change-set-heading strong,
  .calendar-change-primary strong,
  .calendar-weekday,
  .calendar-day-column > strong,
  .calendar-month-cell > strong,
  .event-lineage-entry strong,
  .lifecycle-entry strong
) {
  color: #f5f3ee;
}

:root[data-theme="edc-field-notebook"] :is(
  .meta,
  .hero-copy,
  .item-summary,
  .source-note,
  .section-subtitle,
  .notification-card p,
  .proof-list ul,
  .timeline-search,
  .calendar-change-heading p:not(.eyebrow),
  .calendar-review-status,
  .calendar-change-set-heading span,
  .calendar-change-set-heading time,
  .calendar-change-source small,
  .calendar-change-timestamps b,
  .calendar-review-actions small,
  .event-lineage-entry time,
  .event-lineage-entry p,
  .lifecycle-entry time,
  .lifecycle-entry p
) {
  color: #b7b4ac;
}

:root[data-theme="edc-field-notebook"] :is(
  .notification-card,
  .proof-list,
  .activity-entry
) {
  border-color: #4c545c;
  background: #262b31;
  color: #f5f3ee;
}

:root[data-theme="edc-field-notebook"] :is(
  .notification-card.time-sensitive,
  .notification-card.missing-proof-alert
) {
  border-left-color: #2e9e95;
  background: #20302f;
}

:root[data-theme="edc-field-notebook"] :is(
  .notification-card.calendar-sync-error,
  .notification-card.removed-provider-event
) {
  border-left-color: #c65454;
  background: #3d2526;
}

:root[data-theme="edc-field-notebook"] :is(
  .secondary-button,
  .filter-button,
  input,
  select,
  textarea
) {
  border-color: #58616a;
  background: #262b31;
  color: #f5f3ee;
}

:root[data-theme="edc-field-notebook"] :is(
  .secondary-button:hover,
  .filter-button:hover,
  .filter-button.active
) {
  border-color: #2e9e95;
  background: #203b3b;
  color: #f5f3ee;
}

:root[data-theme="edc-field-notebook"] .primary-action {
  border-color: #2e9e95;
  background: #2e9e95;
  color: #111315;
}

:root[data-theme="edc-field-notebook"] .primary-action:hover {
  border-color: #42b7ae;
  background: #42b7ae;
  color: #111315;
}

:root[data-theme="edc-field-notebook"] .calendar-monitoring-strip {
  border-color: #a67c2d;
  background: #1a1614;
  color: #f5f3ee;
}

:root[data-theme="edc-field-notebook"] .monitoring-indicator {
  border-color: #5bc1b8;
  background: #2e9e95;
  box-shadow: 0 0 0 2px #173a38;
}

:root[data-theme="edc-field-notebook"] :is(
  .calendar-change-group,
  .calendar-change-alert,
  .calendar-day-column,
  .calendar-month-cell,
  .sync-control-center,
  .provider-sync-drawer-body,
  .sync-provider-card,
  .connected-evidence-grid > article,
  .verification-summary-card,
  .attached-evidence-card,
  .parsed-provider-snapshot,
  .audit-proof-card,
  .audit-evidence-grid .snapshot-fact
) {
  border-color: #4c545c;
  background: #262b31;
  color: #f5f3ee;
}

:root[data-theme="edc-field-notebook"] .calendar-change-group-heading,
:root[data-theme="edc-field-notebook"] .calendar-review-dialog-header,
:root[data-theme="edc-field-notebook"] .provider-sync-drawer > summary {
  border-color: #58616a;
  background: #20252a;
  color: #f5f3ee;
}

:root[data-theme="edc-field-notebook"] .calendar-change-set-heading,
:root[data-theme="edc-field-notebook"] .calendar-review-dialog-actions {
  border-color: #4f493d;
  background: #302a20;
}

:root[data-theme="edc-field-notebook"] .calendar-change-alert.unread {
  background: #302a20;
  box-shadow: inset 5px 0 0 #c89b3c;
}

:root[data-theme="edc-field-notebook"] .calendar-change-alert:focus-within {
  background: #203b3b;
  outline-color: #2e9e95;
}

:root[data-theme="edc-field-notebook"] .calendar-change-type {
  color: #c89b3c;
}

:root[data-theme="edc-field-notebook"] .calendar-change-count {
  border-color: #a67c2d;
  background: #3a3120;
  color: #f0c76c;
}

:root[data-theme="edc-field-notebook"] .calendar-review-dialog::backdrop {
  background: rgba(4, 5, 6, 0.84);
}

:root[data-theme="edc-field-notebook"] .calendar-review-snapshot {
  background: #111315;
}

:root[data-theme="edc-field-notebook"] .calendar-month-cell.empty {
  background: #181b1e;
}

:root[data-theme="edc-field-notebook"] .mini-event,
:root[data-theme="edc-field-notebook"] .calendar-agenda-row,
:root[data-theme="edc-field-notebook"] .calendar-search-result {
  box-shadow: inset 0 0 0 1px rgba(200, 155, 60, 0.14), inset 0 -3px 0 rgba(200, 155, 60, 0.34);
}

:root[data-theme="edc-field-notebook"] :is(
  .mini-event.source-apple,
  .calendar-agenda-row.source-apple,
  .calendar-search-result.source-apple,
  .mini-event.source-google,
  .calendar-agenda-row.source-google,
  .calendar-search-result.source-google,
  .mini-event.source-outlook,
  .calendar-agenda-row.source-outlook,
  .calendar-search-result.source-outlook,
  .mini-event.source-shared,
  .calendar-agenda-row.source-shared,
  .calendar-search-result.source-shared
) {
  border-color: #66717d;
  border-left-color: #66717d;
  background: #262b31;
  color: #f5f3ee;
}

:root[data-theme="edc-field-notebook"] :is(
  .mini-event.source-neverlost,
  .calendar-agenda-row.source-neverlost,
  .calendar-search-result.source-neverlost,
  .mini-event.source-milestone,
  .calendar-agenda-row.source-milestone,
  .calendar-search-result.source-milestone,
  .mini-event.source-holiday,
  .calendar-agenda-row.source-holiday,
  .calendar-search-result.source-holiday
) {
  border-color: #a67c2d;
  border-left-color: #c89b3c;
  background: #3a3120;
  color: #f5f3ee;
}

:root[data-theme="edc-field-notebook"] :is(
  .mini-event.source-removed,
  .calendar-agenda-row.source-removed,
  .calendar-search-result.source-removed
) {
  border-color: #c65454;
  border-left-color: #c65454;
  background: #3d2526;
  color: #f5f3ee;
}

:root[data-theme="edc-field-notebook"] .badge-apple {
  background: #66717d;
  color: #f5f3ee;
}

:root[data-theme="edc-field-notebook"] .badge-google {
  border-color: #8e959c;
  background: #e6e7e5;
  color: #262b31;
}

:root[data-theme="edc-field-notebook"] .badge-outlook {
  background: #5c87c7;
  color: #f5f3ee;
}

:root[data-theme="edc-field-notebook"] :is(
  .badge-neverlost,
  .badge-life-proof,
  .badge-holiday,
  .badge-milestone,
  .badge-change-modified
) {
  background: #c89b3c;
  color: #111315;
}

:root[data-theme="edc-field-notebook"] :is(
  .badge-removed,
  .badge-change,
  .removed-event-badge
) {
  background: #c65454;
  color: #f5f3ee;
}

:root[data-theme="edc-field-notebook"] :is(
  .badge-verified,
  .badge-change-new,
  .badge-change-reappeared,
  .badge-event
) {
  background: #2e9e95;
  color: #111315;
}

:root[data-theme="edc-field-notebook"] .evidence-header {
  border-color: #2e9e95;
  border-left-color: #2e9e95;
  background: #202a2d;
}

:root[data-theme="edc-field-notebook"] .trust-integrity-section {
  border-color: #2e9e95;
  border-left-color: #2e9e95;
  background: #262b31;
}

:root[data-theme="edc-field-notebook"] .trust-integrity-section .verification-summary-card {
  border-color: #c89b3c;
  background: #1e2227;
  box-shadow: inset 0 0 0 1px rgba(200, 155, 60, 0.16);
}

:root[data-theme="edc-field-notebook"] .event-lineage-list {
  border-left-color: #5c87c7;
  border-left-width: 4px;
}

:root[data-theme="edc-field-notebook"] .lineage-node {
  width: 21px;
  height: 21px;
  left: -13px;
  border-width: 4px;
  border-color: #5c87c7;
  background: #1e2227;
  box-shadow: 0 0 0 3px #111315;
}

:root[data-theme="edc-field-notebook"] .event-lineage-entry[data-lineage-state="verified"] .lineage-node {
  border-color: #2e9e95;
  background: #173a38;
}

:root[data-theme="edc-field-notebook"] .event-lineage-entry[data-lineage-state="removed"] .lineage-node {
  border-color: #c65454;
  background: #3d2526;
}

:root[data-theme="edc-field-notebook"] .event-lineage-entry[data-lineage-state="preserved"] .lineage-node {
  border-color: #c89b3c;
  background: #3a3120;
}

:root[data-theme="edc-field-notebook"] .lifecycle-marker {
  border-color: #c89b3c;
  background: #3a3120;
}

:root[data-theme="edc-field-notebook"] .lifecycle-entry.current .lifecycle-marker {
  border-color: #2e9e95;
  background: #173a38;
}

:root[data-theme="edc-field-notebook"] .advanced-audit,
:root[data-theme="edc-field-notebook"] .advanced-audit-content {
  border-color: #58616a;
  background: #1e2227;
  color: #f5f3ee;
}

:root[data-theme="edc-field-notebook"] .advanced-audit > summary,
:root[data-theme="edc-field-notebook"] .advanced-audit[open] > summary {
  border-color: #a67c2d;
  background: #1a1614;
  color: #c89b3c;
}

:root[data-theme="edc-field-notebook"] .advanced-audit h4 {
  color: #c89b3c;
}

:root[data-theme="edc-field-notebook"] :is(
  .raw-audit-data,
  .forensic-viewer,
  .forensic-code,
  .raw-provider-debug pre.forensic-code
) {
  border-color: #4b5158;
  background: #0c0e10;
  color: #f5f3ee;
}

:root[data-theme="edc-field-notebook"] .forensic-viewer > summary,
:root[data-theme="edc-field-notebook"] .forensic-toolbar {
  border-color: #58616a;
  background: #1a1d20;
  color: #c89b3c;
}

@media screen {
  :root[data-theme="edc-field-notebook"] .calendar-month-cell,
  :root[data-theme="edc-field-notebook"] .calendar-day-column {
    border-color: #3f474f;
    background-color: #1b1f23;
    background-image:
      linear-gradient(var(--notebook-grid) 1px, transparent 1px),
      linear-gradient(90deg, var(--notebook-grid) 1px, transparent 1px);
    background-size: 24px 24px;
  }

  :root[data-theme="edc-field-notebook"] .calendar-month-cell.empty {
    border-color: #30363c;
    background-color: #15191c;
    background-image:
      linear-gradient(rgba(92, 135, 199, 0.045) 1px, transparent 1px),
      linear-gradient(90deg, rgba(92, 135, 199, 0.045) 1px, transparent 1px);
    background-size: 24px 24px;
  }

  :root[data-theme="edc-field-notebook"] :is(
    .mini-event,
    .calendar-agenda-row,
    .calendar-search-result
  ) {
    border-style: solid;
    border-width: 1px;
    border-left-width: 6px;
    background-image: none;
    color: #f5f3ee;
    opacity: 1;
    box-shadow:
      inset 0 0 0 1px rgba(245, 243, 238, 0.035),
      inset 0 -3px 0 rgba(166, 124, 45, 0.22),
      0 2px 5px rgba(0, 0, 0, 0.26);
  }

  :root[data-theme="edc-field-notebook"] :is(
    .mini-event.source-apple,
    .calendar-agenda-row.source-apple,
    .calendar-search-result.source-apple,
    .mini-event.source-google,
    .calendar-agenda-row.source-google,
    .calendar-search-result.source-google,
    .mini-event.source-outlook,
    .calendar-agenda-row.source-outlook,
    .calendar-search-result.source-outlook
  ) {
    border-color: #535d67;
    border-left-color: var(--steel-edge);
    background-color: var(--steel-card);
  }

  :root[data-theme="edc-field-notebook"] :is(
    .mini-event.source-shared,
    .calendar-agenda-row.source-shared,
    .calendar-search-result.source-shared
  ) {
    border-color: #6d5b32;
    border-left-color: #c89b3c;
    background-color: var(--brass-card);
    box-shadow:
      inset 0 0 0 1px rgba(200, 155, 60, 0.12),
      inset 0 -3px 0 rgba(166, 124, 45, 0.38),
      0 2px 5px rgba(0, 0, 0, 0.28);
  }

  :root[data-theme="edc-field-notebook"] :is(
    .mini-event.source-neverlost,
    .calendar-agenda-row.source-neverlost,
    .calendar-search-result.source-neverlost,
    .mini-event.source-milestone,
    .calendar-agenda-row.source-milestone,
    .calendar-search-result.source-milestone
  ) {
    border-color: #69613d;
    border-left-color: #c89b3c;
    background-color: var(--field-olive);
    box-shadow:
      inset 0 0 0 1px rgba(200, 155, 60, 0.14),
      inset 0 -3px 0 rgba(200, 155, 60, 0.32),
      0 2px 5px rgba(0, 0, 0, 0.3);
  }

  :root[data-theme="edc-field-notebook"] :is(
    .mini-event.source-holiday,
    .calendar-agenda-row.source-holiday,
    .calendar-search-result.source-holiday
  ) {
    border-color: #4e5a43;
    border-left-color: #849061;
    background-color: var(--field-olive-deep);
  }

  :root[data-theme="edc-field-notebook"] :is(
    .mini-event.source-removed,
    .calendar-agenda-row.source-removed,
    .calendar-search-result.source-removed,
    .mini-event.removed-event,
    .calendar-agenda-row.removed-event
  ) {
    border-color: #8f4749;
    border-left-color: #c65454;
    background-color: #3d2526;
    color: #f5f3ee;
    opacity: 1;
    box-shadow:
      inset 0 0 0 1px rgba(198, 84, 84, 0.13),
      inset 0 -3px 0 rgba(198, 84, 84, 0.34),
      0 2px 5px rgba(0, 0, 0, 0.28);
  }

  :root[data-theme="edc-field-notebook"] .trust-integrity-section {
    border-color: #89713b;
    border-left-color: #c89b3c;
    background: #202429;
  }

  :root[data-theme="edc-field-notebook"] .trust-integrity-section .verification-summary-card {
    border-color: #766235;
    background: var(--graphite-card-deep);
    box-shadow:
      inset 0 0 0 1px rgba(200, 155, 60, 0.12),
      inset 5px 0 0 #a67c2d;
  }

  :root[data-theme="edc-field-notebook"] .trust-integrity-section .verification-summary-grid .snapshot-fact {
    border-color: #4b535b;
    background: var(--graphite-card);
    color: #f5f3ee;
    box-shadow: inset 0 1px 0 rgba(245, 243, 238, 0.04);
  }

  :root[data-theme="edc-field-notebook"] .trust-integrity-section .verification-summary-grid .snapshot-fact span,
  :root[data-theme="edc-field-notebook"] .trust-integrity-section .source-note {
    color: #b7b4ac;
  }

  :root[data-theme="edc-field-notebook"] .trust-integrity-section .verification-summary-grid .snapshot-fact strong,
  :root[data-theme="edc-field-notebook"] .trust-integrity-section .verification-summary-grid .snapshot-fact time {
    color: #f5f3ee;
  }

  :root[data-theme="edc-field-notebook"] .badge-shared {
    border: 1px solid #d0a94f;
    background: #a67c2d;
    color: #111315;
  }

  :root[data-theme="edc-field-notebook"] :is(
    .badge-neverlost,
    .badge-life-proof
  ) {
    border: 1px solid #e0b954;
    background: #c89b3c;
    color: #111315;
    box-shadow: inset 0 -1px 0 rgba(17, 19, 21, 0.34);
  }

  :root[data-theme="edc-field-notebook"] :is(
    .badge-apple,
    .badge-google,
    .badge-outlook
  ) {
    border: 1px solid #87919b;
  }

  :root[data-theme="edc-field-notebook"] .badge-google {
    background: #d9dcda;
    color: #202429;
  }

  :root[data-theme="edc-field-notebook"] :is(
    .badge-removed,
    .removed-event-badge
  ) {
    border: 1px solid #e07676;
    background: #c65454;
    color: #f5f3ee;
  }
}

/* Final specificity guards for the two material-heavy calendar identities. */
@media screen {
  :root[data-theme="obsidian-ledger"] body[data-page="calendar"] .calendar-month-cell {
    border-radius: 14px;
  }

  :root[data-theme="obsidian-ledger"] body[data-page="calendar"] .calendar-evidence-card {
    border-top-color: #b87333;
  }

  :root[data-theme="edc-field-notebook"] body[data-page="calendar"] .calendar-page,
  :root[data-theme="edc-field-notebook"] body[data-page="calendar"] .calendar-evidence-card,
  :root[data-theme="edc-field-notebook"] body[data-page="calendar"] .calendar-month-cell {
    border-radius: 0;
  }
}

/* Distinct screen identities. Workflows and print output remain shared. */
@media screen {
  :root[data-theme="axiom-one"] body {
    background: #f5f4f0;
    color: #25282d;
  }

  :root[data-theme="axiom-one"] .sidebar {
    border-right: 0;
    background: #25282d;
    box-shadow: 10px 0 35px rgba(25, 29, 34, 0.08);
  }

  :root[data-theme="axiom-one"] .nav-item {
    border: 0;
    border-radius: 12px;
    color: #eef0ed;
  }

  :root[data-theme="axiom-one"] .nav-item:hover,
  :root[data-theme="axiom-one"] .nav-item.active {
    border: 0;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 3px 0 0 #24a77b;
  }

  :root[data-theme="axiom-one"] .theme-explorer,
  :root[data-theme="axiom-one"] .side-panel {
    border: 0;
    border-radius: 14px;
    background: #30343a;
  }

  :root[data-theme="axiom-one"] :is(
    .stat,
    .notification-center,
    .search-section,
    .trail-activity-section,
    .mode-examples-section,
    .vault-list,
    .detail-view,
    .timeline-section,
    .cases-section,
    .alerts-section,
    .calendar-page,
    .sources-section,
    .learn-section,
    .settings-section,
    .item-card,
    .case-card,
    .alert-card,
    .source-card,
    .calendar-change-review,
    .calendar-evidence-card,
    .calendar-snapshot-card,
    .calendar-trail-card,
    .snapshot-section,
    .evidence-timeline,
    .source-classification,
    .calendar-month-cell,
    .calendar-day-column,
    .sync-provider-card,
    dialog
  ) {
    border-color: transparent;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(35, 40, 47, 0.07);
  }

  :root[data-theme="axiom-one"] :is(
    .primary-action,
    .secondary-button,
    .filter-button,
    input,
    select,
    textarea
  ) {
    border-radius: 10px;
  }

  :root[data-theme="axiom-one"] .primary-action {
    border-color: #14805e;
    background: #14805e;
    box-shadow: 0 6px 16px rgba(20, 128, 94, 0.2);
  }

  :root[data-theme="axiom-one"] .secondary-button,
  :root[data-theme="axiom-one"] .filter-button,
  :root[data-theme="axiom-one"] input,
  :root[data-theme="axiom-one"] select,
  :root[data-theme="axiom-one"] textarea {
    border-color: transparent;
    background: #f1f2ef;
    color: #25282d;
  }

  :root[data-theme="axiom-one"] .calendar-monitoring-strip {
    border: 0;
    border-radius: 14px;
    background: #25282d;
    box-shadow: 0 12px 30px rgba(35, 40, 47, 0.13);
  }

  :root[data-theme="axiom-one"] .mini-event,
  :root[data-theme="axiom-one"] .calendar-agenda-row {
    border-width: 0 0 0 4px;
    border-radius: 10px;
    box-shadow: 0 5px 14px rgba(37, 40, 45, 0.08);
  }

  :root[data-theme="axiom-one"] .advanced-audit > summary {
    border: 0;
    border-radius: 12px;
    background: #25282d;
  }

  :root[data-theme="obsidian-ledger"] {
    --ink: #f4f6f8;
    --muted: #aeb6bf;
    --line: rgba(218, 225, 232, 0.16);
    --line-strong: rgba(218, 225, 232, 0.28);
    --nav: #080a0d;
    color-scheme: dark;
  }

  :root[data-theme="obsidian-ledger"] body,
  :root[data-theme="obsidian-ledger"] .main {
    background:
      radial-gradient(circle at 72% 5%, rgba(126, 143, 160, 0.1), transparent 28%),
      linear-gradient(145deg, #080a0d, #11151a 55%, #090b0e);
    color: #f4f6f8;
  }

  :root[data-theme="obsidian-ledger"] .sidebar {
    border-right: 1px solid rgba(225, 232, 239, 0.12);
    background: rgba(8, 10, 13, 0.92);
    box-shadow: 16px 0 50px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(22px);
  }

  :root[data-theme="obsidian-ledger"] .nav-item {
    border-color: transparent;
    border-radius: 4px;
    color: #dce1e6;
  }

  :root[data-theme="obsidian-ledger"] .nav-item:hover,
  :root[data-theme="obsidian-ledger"] .nav-item.active {
    border-color: rgba(222, 229, 236, 0.2);
    background: linear-gradient(90deg, rgba(210, 220, 230, 0.14), rgba(210, 220, 230, 0.04));
    box-shadow: 0 0 24px rgba(188, 202, 216, 0.08);
  }

  :root[data-theme="obsidian-ledger"] :is(
    .theme-explorer,
    .side-panel,
    .stat,
    .notification-center,
    .search-section,
    .trail-activity-section,
    .mode-examples-section,
    .vault-list,
    .detail-view,
    .timeline-section,
    .cases-section,
    .alerts-section,
    .calendar-page,
    .sources-section,
    .learn-section,
    .settings-section,
    .item-card,
    .case-card,
    .alert-card,
    .source-card,
    .calendar-change-review,
    .calendar-evidence-card,
    .calendar-snapshot-card,
    .calendar-trail-card,
    .snapshot-section,
    .evidence-timeline,
    .source-classification,
    .evidence-header,
    .snapshot-fact,
    .empty-state,
    .calendar-month-cell,
    .calendar-day-column,
    .sync-control-center,
    .provider-sync-drawer > summary,
    .calendar-setup-panel > summary,
    .provider-sync-drawer-body,
    .sync-provider-card,
    .verification-summary-card,
    dialog
  ) {
    border-color: rgba(220, 228, 235, 0.17);
    border-radius: 5px;
    background: linear-gradient(145deg, rgba(35, 41, 48, 0.82), rgba(16, 20, 25, 0.88));
    color: #f4f6f8;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.045),
      0 18px 50px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
  }

  :root[data-theme="obsidian-ledger"] :is(
    h1, h2, h3, h4,
    .snapshot-title,
    .calendar-change-primary strong,
    .calendar-month-cell strong,
    .calendar-weekday
  ) {
    color: #f8fafc;
  }

  :root[data-theme="obsidian-ledger"] :is(
    .meta,
    .hero-copy,
    .section-subtitle,
    .source-note,
    .calendar-review-status,
    .snapshot-description,
    .snapshot-fact span,
    .provider-sync-drawer > summary span
  ) {
    color: #aeb6bf;
  }

  :root[data-theme="obsidian-ledger"] :is(
    .snapshot-fact strong,
    .snapshot-fact time,
    .provider-sync-drawer > summary strong
  ) {
    color: #f4f6f8;
  }

  :root[data-theme="obsidian-ledger"] :is(
    .secondary-button,
    .filter-button,
    input,
    select,
    textarea
  ) {
    border-color: rgba(220, 228, 235, 0.2);
    border-radius: 4px;
    background: rgba(11, 14, 18, 0.72);
    color: #f4f6f8;
  }

  :root[data-theme="obsidian-ledger"] .primary-action {
    border-color: #d6dbe0;
    border-radius: 4px;
    background: #e2e6ea;
    color: #0b0d10;
    box-shadow: 0 0 26px rgba(221, 228, 234, 0.14);
  }

  :root[data-theme="obsidian-ledger"] .calendar-monitoring-strip {
    border-color: rgba(224, 230, 236, 0.2);
    border-radius: 5px;
    background: rgba(8, 10, 13, 0.86);
    box-shadow: 0 0 34px rgba(182, 197, 211, 0.08);
  }

  :root[data-theme="obsidian-ledger"] .mini-event,
  :root[data-theme="obsidian-ledger"] .calendar-agenda-row {
    border-color: rgba(221, 228, 234, 0.2);
    border-left-color: #9ba5af;
    border-radius: 3px;
    background: rgba(35, 41, 48, 0.94);
    color: #f4f6f8;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  }

  :root[data-theme="obsidian-ledger"] .advanced-audit,
  :root[data-theme="obsidian-ledger"] .advanced-audit-content {
    background: #0d1014;
    color: #edf1f4;
  }

  :root[data-theme="living-record"] body {
    background:
      linear-gradient(rgba(94, 125, 103, 0.035) 1px, transparent 1px),
      #e9ede4;
    background-size: 100% 34px;
    color: #284136;
  }

  :root[data-theme="living-record"] .sidebar {
    border-right: 0;
    background: #3d5849;
    box-shadow: 10px 0 30px rgba(52, 78, 62, 0.1);
  }

  :root[data-theme="living-record"] .nav-item {
    border-color: transparent;
    border-radius: 14px 6px 14px 6px;
    color: #f4f1e9;
  }

  :root[data-theme="living-record"] .nav-item:hover,
  :root[data-theme="living-record"] .nav-item.active {
    border-color: transparent;
    background: rgba(246, 241, 231, 0.14);
  }

  :root[data-theme="living-record"] :is(
    .theme-explorer,
    .side-panel,
    .stat,
    .notification-center,
    .search-section,
    .trail-activity-section,
    .mode-examples-section,
    .vault-list,
    .detail-view,
    .timeline-section,
    .cases-section,
    .alerts-section,
    .calendar-page,
    .sources-section,
    .learn-section,
    .settings-section,
    .item-card,
    .case-card,
    .alert-card,
    .source-card,
    .calendar-change-review,
    .calendar-evidence-card,
    .calendar-snapshot-card,
    .calendar-trail-card,
    .snapshot-section,
    .evidence-timeline,
    .source-classification,
    .calendar-month-cell,
    .calendar-day-column,
    .sync-provider-card,
    dialog
  ) {
    border-color: rgba(69, 91, 75, 0.14);
    border-radius: 14px 7px 14px 7px;
    background: #fbf8f0;
    box-shadow: 0 8px 24px rgba(58, 78, 64, 0.055);
  }

  :root[data-theme="living-record"] :is(
    .primary-action,
    .secondary-button,
    .filter-button,
    input,
    select,
    textarea
  ) {
    border-radius: 12px 6px 12px 6px;
  }

  :root[data-theme="living-record"] .primary-action {
    border-color: #5e7d67;
    background: #5e7d67;
    box-shadow: none;
  }

  :root[data-theme="living-record"] .secondary-button,
  :root[data-theme="living-record"] .filter-button,
  :root[data-theme="living-record"] input,
  :root[data-theme="living-record"] select,
  :root[data-theme="living-record"] textarea {
    border-color: rgba(67, 91, 74, 0.2);
    background: #f1f1e8;
    color: #284136;
  }

  :root[data-theme="living-record"] .calendar-monitoring-strip {
    border-color: transparent;
    border-radius: 14px 7px 14px 7px;
    background: #3d5849;
    box-shadow: 0 10px 24px rgba(58, 78, 64, 0.1);
  }

  :root[data-theme="living-record"] .mini-event,
  :root[data-theme="living-record"] .calendar-agenda-row {
    border-color: rgba(70, 94, 77, 0.18);
    border-left-color: #718a74;
    border-radius: 11px 5px 11px 5px;
    background: #eef0e6;
    color: #284136;
    box-shadow: none;
  }

  :root[data-theme="living-record"] .event-lineage-list {
    border-left-color: #8ba08d;
  }

  :root[data-theme="edc-field-notebook"] body {
    background:
      linear-gradient(rgba(123, 139, 82, 0.055) 1px, transparent 1px),
      linear-gradient(90deg, rgba(123, 139, 82, 0.055) 1px, transparent 1px),
      #111315;
    background-size: 28px 28px;
  }

  :root[data-theme="edc-field-notebook"] .sidebar {
    border-right: 2px solid #4d4b37;
    background:
      linear-gradient(90deg, rgba(198, 106, 43, 0.06), transparent 14px),
      #191b19;
  }

  :root[data-theme="edc-field-notebook"] :is(
    .eyebrow,
    .side-label,
    .event-source-badge,
    .calendar-change-type,
    .calendar-change-timestamps b,
    .snapshot-fact span
  ) {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  :root[data-theme="edc-field-notebook"] .nav-item,
  :root[data-theme="edc-field-notebook"] :is(
    .primary-action,
    .secondary-button,
    .filter-button
  ) {
    border-radius: 2px;
  }

  :root[data-theme="edc-field-notebook"] .nav-item.active {
    border-color: #c66a2b;
    background: #2b2e27;
    box-shadow: inset 5px 0 0 #c66a2b;
  }

  :root[data-theme="edc-field-notebook"] :is(
    .stat,
    .notification-center,
    .search-section,
    .trail-activity-section,
    .mode-examples-section,
    .vault-list,
    .detail-view,
    .timeline-section,
    .cases-section,
    .alerts-section,
    .calendar-page,
    .sources-section,
    .learn-section,
    .settings-section,
    .item-card,
    .case-card,
    .alert-card,
    .source-card,
    .calendar-change-review,
    .calendar-evidence-card,
    .calendar-snapshot-card,
    .calendar-trail-card,
    .snapshot-section,
    .evidence-timeline,
    .source-classification,
    .snapshot-fact,
    .provider-sync-drawer > summary,
    dialog
  ) {
    border-radius: 2px;
  }

  :root[data-theme="edc-field-notebook"] .primary-action {
    border-color: #c66a2b;
    background: #c66a2b;
    color: #111315;
  }

  :root[data-theme="edc-field-notebook"] .calendar-monitoring-strip {
    border-color: #75633d;
    border-radius: 2px;
    background: #20231e;
    box-shadow: inset 5px 0 0 #7b8b52;
  }

  :root[data-theme="edc-field-notebook"] :is(
    .snapshot-fact,
    .empty-state,
    .provider-sync-drawer > summary,
    .calendar-setup-panel > summary
  ) {
    border-color: #4c545c;
    background: #292e34;
    color: #f5f3ee;
  }

  :root[data-theme="edc-field-notebook"] :is(
    .snapshot-description,
    .snapshot-fact span,
    .provider-sync-drawer > summary span
  ) {
    color: #b7b4ac;
  }

  :root[data-theme="edc-field-notebook"] :is(
    .snapshot-fact strong,
    .snapshot-fact time,
    .provider-sync-drawer > summary strong
  ) {
    color: #f5f3ee;
  }

  :root[data-theme="edc-field-notebook"] .theme-explorer > span,
  :root[data-theme="edc-field-notebook"] .calendar-change-type,
  :root[data-theme="edc-field-notebook"] .advanced-audit h4,
  :root[data-theme="edc-field-notebook"] .advanced-audit > summary,
  :root[data-theme="edc-field-notebook"] .advanced-audit[open] > summary,
  :root[data-theme="edc-field-notebook"] .forensic-viewer > summary,
  :root[data-theme="edc-field-notebook"] .forensic-toolbar {
    color: #d98445;
  }

  :root[data-theme="edc-field-notebook"] :is(
    .badge-neverlost,
    .badge-life-proof,
    .badge-holiday,
    .badge-milestone,
    .badge-change-modified
  ) {
    border-color: #df8e50;
    background: #c66a2b;
    color: #111315;
  }

  :root[data-theme="edc-field-notebook"] :is(
    .badge-verified,
    .badge-change-new,
    .badge-change-reappeared,
    .badge-event
  ) {
    background: #7b8b52;
    color: #111315;
  }

  :root[data-theme="edc-field-notebook"] .badge-shared {
    border-color: #bb8b4d;
    background: #9b6a32;
  }

  :root[data-theme="edc-field-notebook"] :is(
    .mini-event.source-shared,
    .calendar-agenda-row.source-shared,
    .calendar-search-result.source-shared
  ) {
    border-left-color: #c66a2b;
    background-color: #342a20;
  }

  :root[data-theme="edc-field-notebook"] :is(
    .mini-event.source-neverlost,
    .calendar-agenda-row.source-neverlost,
    .calendar-search-result.source-neverlost,
    .mini-event.source-milestone,
    .calendar-agenda-row.source-milestone,
    .calendar-search-result.source-milestone
  ) {
    border-left-color: #c66a2b;
    background-color: #303426;
  }
}

/* Theme Identity Pass: shape, material, event construction, and luxury. */
:root[data-theme="axiom-one"] {
  --midnight: #1f2529;
  --ivory: #fafaf7;
  --paper: #ffffff;
  --wash: #f4f5f2;
  --nav-raised: #2b3237;
  --signal-teal: #147c70;
  --evidence-gold: #b87822;
  --indigo: #4f637f;
  --alert-red: #b24a3d;
  --workspace-surface: #fafaf7;
  --elevated-surface: #ffffff;
  --secondary-text: #59636b;
  --muted-theme-text: #7b858c;
  --theme-border: #e1e5e2;
  --radius-panel: 16px;
  --radius-cell: 12px;
  --radius-card: 10px;
  --radius-button: 10px;
  --radius-badge: 7px;
  --shadow-panel: 0 8px 24px rgba(20, 35, 45, 0.07);
  --shadow-card: 0 5px 14px rgba(20, 35, 45, 0.06);
  --surface-material: #ffffff;
  --event-provider-bg: #ffffff;
  --event-shared-bg: #fbf4e9;
  --event-neverlost-bg: #edf7f3;
  --event-lifeproof-bg: #f8f2e5;
  --event-removed-bg: #faeeeb;
  --badge-shape: 7px;
}

:root[data-theme="obsidian-ledger"] {
  --midnight: #090b0d;
  --ivory: #f2f0ea;
  --paper: #171d23;
  --wash: #090b0d;
  --nav-raised: #202832;
  --signal-teal: #2aa198;
  --evidence-gold: #d2a84a;
  --indigo: #c7cdd4;
  --alert-red: #9e3f3f;
  --workspace-surface: #11161b;
  --elevated-surface: #202832;
  --secondary-text: #b9b4aa;
  --muted-theme-text: #8e948f;
  --theme-border: rgba(255, 255, 255, 0.14);
  --copper-accent: #b87333;
  --radius-panel: 18px;
  --radius-cell: 14px;
  --radius-card: 12px;
  --radius-button: 10px;
  --radius-badge: 6px;
  --shadow-panel: 0 18px 45px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 10px 26px rgba(0, 0, 0, 0.32);
  --surface-material: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  --event-provider-bg: linear-gradient(180deg, #2b333c, #202832);
  --event-shared-bg: linear-gradient(180deg, #4a321f, #30251e);
  --event-neverlost-bg: linear-gradient(180deg, #393122, #28251e);
  --event-lifeproof-bg: linear-gradient(180deg, #4a3820, #30281c);
  --event-removed-bg: linear-gradient(180deg, #51282a, #351d20);
  --badge-shape: 6px;
}

:root[data-theme="living-record"] {
  --midnight: #26312d;
  --ivory: #faf7f0;
  --paper: #fffdf8;
  --wash: #f7f3ea;
  --nav-raised: #3f6652;
  --signal-teal: #4e7c63;
  --evidence-gold: #c08a3e;
  --indigo: #5f9c86;
  --alert-red: #b76e5c;
  --workspace-surface: #faf7f0;
  --elevated-surface: #ffffff;
  --secondary-text: #59665f;
  --muted-theme-text: #7a857d;
  --theme-border: #ddd5c8;
  --radius-panel: 22px;
  --radius-cell: 18px;
  --radius-card: 14px;
  --radius-button: 12px;
  --radius-badge: 999px;
  --shadow-panel: 0 10px 28px rgba(74, 61, 38, 0.08);
  --shadow-card: 0 5px 16px rgba(74, 61, 38, 0.07);
  --surface-material: #fffdf8;
  --event-provider-bg: #f1f0eb;
  --event-shared-bg: #edf3e9;
  --event-neverlost-bg: #eaf3ec;
  --event-lifeproof-bg: #f7edda;
  --event-removed-bg: #f5e4df;
  --badge-shape: 999px;
}

:root[data-theme="axiom-archive"] {
  --midnight: #292927;
  --ivory: #f6f0e6;
  --paper: #fff9ee;
  --wash: #efe8dc;
  --nav-raised: #5b5145;
  --signal-teal: #2d7268;
  --evidence-gold: #9c6a38;
  --indigo: #3e4a46;
  --alert-red: #b45245;
  --workspace-surface: #f6f0e6;
  --elevated-surface: #fbf5ea;
  --secondary-text: #625d54;
  --muted-theme-text: #817a6d;
  --theme-border: #d8cbb7;
  --radius-panel: 10px;
  --radius-cell: 8px;
  --radius-card: 6px;
  --radius-button: 8px;
  --radius-badge: 4px;
  --shadow-panel: 0 8px 20px rgba(76, 60, 39, 0.09);
  --shadow-card: 0 3px 9px rgba(76, 60, 39, 0.08);
  --surface-material: linear-gradient(135deg, rgba(156, 106, 56, 0.035) 25%, transparent 25%) 0 0 / 14px 14px, #fff9ee;
  --event-provider-bg: #f2eee5;
  --event-shared-bg: #f3e7d7;
  --event-neverlost-bg: #e8efe9;
  --event-lifeproof-bg: #f1e3ce;
  --event-removed-bg: #f1ded8;
  --badge-shape: 4px;
}

:root[data-theme="edc-field-notebook"] {
  --midnight: #111315;
  --ivory: #f5f3ee;
  --paper: #20262a;
  --wash: #111315;
  --nav: #181d20;
  --nav-raised: #2a3035;
  --signal-teal: #2e9e95;
  --evidence-gold: #c06a2d;
  --brass-accent: #a67c2d;
  --indigo: #5c87c7;
  --alert-red: #c65454;
  --workspace-surface: #181d20;
  --elevated-surface: #2a3035;
  --secondary-text: #c5c0b7;
  --muted-theme-text: #8f938e;
  --theme-border: #3d4547;
  --radius-panel: 8px;
  --radius-cell: 6px;
  --radius-card: 4px;
  --radius-button: 6px;
  --radius-badge: 3px;
  --shadow-panel: 0 10px 24px rgba(0, 0, 0, 0.28);
  --shadow-card: 0 4px 10px rgba(0, 0, 0, 0.26);
  --surface-material: #20262a;
  --event-provider-bg: #2a3035;
  --event-shared-bg: #383225;
  --event-neverlost-bg: #2c3429;
  --event-lifeproof-bg: #3a2c22;
  --event-removed-bg: #402628;
  --badge-shape: 3px;
}

@media screen {
  :root[data-theme] body,
  :root[data-theme] .main {
    background-color: var(--wash);
  }

  :root[data-theme] :is(
    .stat,
    .notification-center,
    .search-section,
    .trail-activity-section,
    .mode-examples-section,
    .vault-list,
    .detail-view,
    .timeline-section,
    .cases-section,
    .alerts-section,
    .calendar-page,
    .sources-section,
    .learn-section,
    .settings-section,
    .item-card,
    .case-card,
    .alert-card,
    .source-card,
    .detail-pane,
    .calendar-change-review,
    .calendar-change-group,
    .calendar-evidence-card,
    .calendar-snapshot-card,
    .calendar-trail-card,
    .snapshot-section,
    .evidence-timeline,
    .source-classification,
    .sync-control-center,
    .provider-sync-drawer-body,
    .sync-provider-card,
    .verification-summary-card,
    .trust-integrity-section,
    .advanced-audit,
    .advanced-audit-content,
    dialog
  ) {
    border-color: var(--theme-border);
    border-radius: var(--radius-panel);
    background: var(--surface-material);
    box-shadow: var(--shadow-panel);
  }

  :root[data-theme] :is(
    .calendar-month-cell,
    .calendar-day-column
  ) {
    border-color: var(--theme-border);
    border-radius: var(--radius-cell);
    background: var(--surface-material);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--theme-border) 45%, transparent);
  }

  :root[data-theme] .calendar-month-cell.empty {
    background: color-mix(in srgb, var(--workspace-surface) 88%, var(--paper));
    box-shadow: inset 0 0 18px color-mix(in srgb, var(--midnight) 5%, transparent);
  }

  :root[data-theme] :is(
    .mini-event,
    .calendar-agenda-row,
    .calendar-search-result
  ) {
    border-radius: var(--radius-card);
    background: var(--event-provider-bg);
    box-shadow: var(--shadow-card);
  }

  :root[data-theme] :is(
    .mini-event.source-apple,
    .calendar-agenda-row.source-apple,
    .calendar-search-result.source-apple,
    .mini-event.source-google,
    .calendar-agenda-row.source-google,
    .calendar-search-result.source-google,
    .mini-event.source-outlook,
    .calendar-agenda-row.source-outlook,
    .calendar-search-result.source-outlook
  ) {
    background: var(--event-provider-bg);
    border-left-color: var(--indigo);
  }

  :root[data-theme] :is(
    .mini-event.source-shared,
    .calendar-agenda-row.source-shared,
    .calendar-search-result.source-shared
  ) {
    background: var(--event-shared-bg);
    border-left-color: var(--evidence-gold);
  }

  :root[data-theme] :is(
    .mini-event.source-neverlost,
    .calendar-agenda-row.source-neverlost,
    .calendar-search-result.source-neverlost,
    .mini-event.source-milestone,
    .calendar-agenda-row.source-milestone,
    .calendar-search-result.source-milestone
  ) {
    background: var(--event-neverlost-bg);
    border-left-color: var(--signal-teal);
  }

  :root[data-theme] :is(
    .mini-event:has(.badge-life-proof),
    .calendar-agenda-row:has(.badge-life-proof),
    .calendar-search-result:has(.badge-life-proof)
  ) {
    background: var(--event-lifeproof-bg);
    border-left-color: var(--evidence-gold);
    box-shadow: var(--shadow-card), inset 0 3px 0 color-mix(in srgb, var(--evidence-gold) 70%, transparent);
  }

  :root[data-theme] :is(
    .mini-event.source-removed,
    .calendar-agenda-row.source-removed,
    .calendar-search-result.source-removed,
    .mini-event.removed-event,
    .calendar-agenda-row.removed-event
  ) {
    background: var(--event-removed-bg);
    border-left-color: var(--alert-red);
  }

  :root[data-theme] :is(
    .event-source-badge,
    .badge-apple,
    .badge-google,
    .badge-outlook,
    .badge-shared,
    .badge-neverlost,
    .badge-life-proof,
    .badge-holiday,
    .badge-milestone,
    .badge-removed,
    .badge-verified,
    .badge-change
  ) {
    border-radius: var(--badge-shape);
  }

  :root[data-theme] :is(
    button,
    input,
    select,
    textarea,
    .primary-action,
    .secondary-button,
    .filter-button,
    .provider-button
  ) {
    border-radius: var(--radius-button);
  }

  :root[data-theme] .primary-action {
    border-color: var(--signal-teal);
    background: var(--signal-teal);
  }

  :root[data-theme] :is(.secondary-button, .filter-button, .provider-button) {
    border-color: var(--theme-border);
    background: var(--elevated-surface);
  }

  :root[data-theme] .section-heading {
    border-bottom: 1px solid color-mix(in srgb, var(--theme-border) 75%, transparent);
    padding-bottom: 12px;
  }

  :root[data-theme] .calendar-monitoring-strip {
    border-radius: var(--radius-panel);
    box-shadow: var(--shadow-panel);
  }

  :root[data-theme] .event-lineage-list {
    border-left-color: var(--indigo);
  }

  :root[data-theme] .lineage-node {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--workspace-surface) 82%, transparent);
  }

  :root[data-theme] .advanced-audit > summary {
    border-radius: calc(var(--radius-panel) - 2px);
  }

  :root[data-theme] dialog {
    border-radius: var(--radius-panel);
    box-shadow: 0 30px 80px color-mix(in srgb, var(--midnight) 44%, transparent);
  }

  :root[data-theme="axiom-one"] .sidebar {
    background: #252c31;
  }

  :root[data-theme="axiom-one"] .section-heading {
    border-bottom-color: transparent;
  }

  :root[data-theme="obsidian-ledger"] {
    color-scheme: dark;
  }

  :root[data-theme="obsidian-ledger"] body,
  :root[data-theme="obsidian-ledger"] .main {
    background: radial-gradient(circle at 75% 0%, rgba(199, 205, 212, 0.08), transparent 30%), #090b0d;
  }

  :root[data-theme="obsidian-ledger"] .sidebar {
    background: linear-gradient(180deg, #0c0f12, #090b0d);
  }

  :root[data-theme="obsidian-ledger"] :is(
    .calendar-page,
    .calendar-change-review,
    .evidence-header,
    .trust-integrity-section,
    .advanced-audit,
    dialog
  ) {
    border-top: 1px solid rgba(184, 115, 51, 0.6);
    backdrop-filter: blur(18px);
  }

  :root[data-theme="obsidian-ledger"] .calendar-month-cell {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 24px rgba(0, 0, 0, 0.2);
  }

  :root[data-theme="obsidian-ledger"] .badge-apple {
    background: #c7cdd4;
    color: #171d23;
  }

  :root[data-theme="obsidian-ledger"] .badge-shared {
    background: #b87333;
    color: #090b0d;
  }

  :root[data-theme="obsidian-ledger"] :is(.badge-neverlost, .badge-life-proof) {
    background: #d2a84a;
    color: #090b0d;
  }

  :root[data-theme="obsidian-ledger"] .primary-action {
    box-shadow: 0 0 22px rgba(42, 161, 152, 0.22);
  }

  :root[data-theme="living-record"] body {
    background: linear-gradient(rgba(111, 143, 114, 0.025) 1px, transparent 1px), #f7f3ea;
    background-size: 100% 36px;
  }

  :root[data-theme="living-record"] .sidebar {
    background: #416451;
  }

  :root[data-theme="living-record"] .section-heading {
    border-bottom-color: #e3dacd;
  }

  :root[data-theme="living-record"] .badge-removed {
    background: #b76e5c;
  }

  :root[data-theme="axiom-archive"] body {
    background:
      linear-gradient(90deg, rgba(156, 106, 56, 0.025) 1px, transparent 1px),
      linear-gradient(rgba(156, 106, 56, 0.025) 1px, transparent 1px),
      #efe8dc;
    background-size: 28px 28px;
  }

  :root[data-theme="axiom-archive"] .sidebar {
    border-right: 3px double #9c6a38;
    background: #3e4a46;
  }

  :root[data-theme="axiom-archive"] .section-heading {
    border-bottom: 2px solid #9c6a38;
  }

  :root[data-theme="axiom-archive"] :is(
    .eyebrow,
    .event-source-badge,
    .calendar-change-type
  ) {
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: 0.06em;
  }

  :root[data-theme="axiom-archive"] .badge-removed {
    border: 2px solid #b45245;
    background: transparent;
    color: #b45245;
    transform: rotate(-1deg);
  }

  :root[data-theme="edc-field-notebook"] body {
    background:
      linear-gradient(rgba(92, 135, 199, 0.06) 1px, transparent 1px),
      linear-gradient(90deg, rgba(92, 135, 199, 0.06) 1px, transparent 1px),
      #111315;
    background-size: 26px 26px;
  }

  :root[data-theme="edc-field-notebook"] .sidebar {
    background: #181d20;
  }

  :root[data-theme="edc-field-notebook"] :is(
    .eyebrow,
    .side-label,
    .event-source-badge,
    .calendar-change-type
  ) {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    letter-spacing: 0.09em;
    text-transform: uppercase;
  }

  :root[data-theme="edc-field-notebook"] :is(
    .mini-event,
    .calendar-agenda-row,
    .calendar-search-result
  ) {
    border-left-width: 7px;
  }

  :root[data-theme="edc-field-notebook"] :is(
    .mini-event.source-neverlost,
    .calendar-agenda-row.source-neverlost,
    .calendar-search-result.source-neverlost
  ) {
    border-left-color: #2e9e95;
  }

  :root[data-theme="edc-field-notebook"] :is(
    .mini-event:has(.badge-life-proof),
    .calendar-agenda-row:has(.badge-life-proof),
    .calendar-search-result:has(.badge-life-proof)
  ) {
    border-left-color: #c06a2d;
    box-shadow: inset 0 3px 0 #a67c2d, var(--shadow-card);
  }
}

/* Live visual separation pass. These selectors intentionally override older theme layers. */
@media screen {
  :root[data-theme="axiom-one"] body,
  :root[data-theme="axiom-one"] .main {
    background:
      radial-gradient(circle at 78% 0%, rgba(20, 124, 112, 0.055), transparent 30%),
      #f4f5f2;
  }

  :root[data-theme="axiom-one"] .sidebar {
    border-right: 0;
    background: linear-gradient(180deg, #252c31, #1f2529);
    box-shadow: 14px 0 40px rgba(31, 37, 41, 0.1);
  }

  :root[data-theme="axiom-one"] :is(
    .calendar-page,
    .calendar-change-review,
    .calendar-evidence-card,
    .snapshot-section,
    .evidence-timeline,
    .source-classification,
    .trust-integrity-section,
    .advanced-audit,
    .sync-control-center,
    .provider-sync-drawer-body,
    dialog
  ) {
    border: 0;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 16px 42px rgba(20, 35, 45, 0.085);
  }

  :root[data-theme="axiom-one"] .calendar-monitoring-strip {
    border: 0;
    border-radius: 16px;
    background: linear-gradient(120deg, #1f2529, #29383a);
    box-shadow: 0 14px 30px rgba(20, 35, 45, 0.14);
  }

  :root[data-theme="axiom-one"] .section-heading {
    border: 0;
    padding-bottom: 16px;
  }

  :root[data-theme="axiom-one"] .section-heading h2,
  :root[data-theme="axiom-one"] .section-heading h3 {
    letter-spacing: 0;
  }

  :root[data-theme="axiom-one"] .calendar-month-cell {
    border: 0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 7px 22px rgba(20, 35, 45, 0.07);
  }

  :root[data-theme="axiom-one"] .calendar-month-cell.empty {
    background: #f7f8f5;
    box-shadow: inset 0 0 0 1px #eef0ed;
  }

  :root[data-theme="axiom-one"] :is(.mini-event, .calendar-agenda-row, .calendar-search-result) {
    border: 0;
    border-left: 5px solid #4f637f;
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 6px 16px rgba(20, 35, 45, 0.09);
  }

  :root[data-theme="axiom-one"] :is(.event-source-badge, .badge-change, .badge-removed, .badge-verified) {
    border: 0;
    border-radius: 7px;
    box-shadow: none;
  }

  :root[data-theme="axiom-one"] :is(.primary-action, .secondary-button, .filter-button, .provider-button) {
    border-radius: 12px;
    min-height: 48px;
  }

  :root[data-theme="axiom-one"] .primary-action {
    border: 0;
    background: #147c70;
    box-shadow: 0 9px 20px rgba(20, 124, 112, 0.22);
  }

  :root[data-theme="axiom-one"] :is(.secondary-button, .filter-button, .provider-button) {
    border: 1px solid #e1e5e2;
    background: #ffffff;
    box-shadow: 0 3px 10px rgba(20, 35, 45, 0.045);
  }

  :root[data-theme="obsidian-ledger"] body,
  :root[data-theme="obsidian-ledger"] .main {
    background:
      radial-gradient(circle at 82% -5%, rgba(184, 115, 51, 0.13), transparent 29%),
      radial-gradient(circle at 35% 12%, rgba(199, 205, 212, 0.065), transparent 24%),
      #090b0d;
  }

  :root[data-theme="obsidian-ledger"] .sidebar {
    border-right: 1px solid rgba(210, 168, 74, 0.22);
    background: linear-gradient(180deg, #11161b, #090b0d);
    box-shadow: 22px 0 70px rgba(0, 0, 0, 0.48);
  }

  :root[data-theme="obsidian-ledger"] :is(
    .calendar-page,
    .calendar-change-review,
    .calendar-change-group,
    .calendar-change-alert,
    .calendar-evidence-card,
    .snapshot-section,
    .evidence-timeline,
    .source-classification,
    .trust-integrity-section,
    .verification-summary-card,
    .advanced-audit,
    .advanced-audit-content,
    .sync-control-center,
    .provider-sync-drawer-body,
    .sync-provider-card,
    .snapshot-fact,
    .empty-state,
    .provider-sync-drawer > summary,
    .calendar-setup-panel > summary,
    .calendar-review-dialog-header,
    .calendar-review-dialog-actions,
    dialog
  ) {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018)),
      #171d23;
    color: #f2f0ea;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.055),
      0 22px 54px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(20px);
  }

  :root[data-theme="obsidian-ledger"] :is(
    .calendar-page,
    .calendar-change-review,
    .evidence-header,
    .trust-integrity-section,
    .advanced-audit
  ) {
    border-top-color: #b87333;
  }

  :root[data-theme="obsidian-ledger"] :is(
    .section-heading,
    .calendar-change-group-heading,
    .calendar-review-dialog-header
  ) {
    border-bottom: 1px solid rgba(210, 168, 74, 0.38);
    background: transparent;
  }

  :root[data-theme="obsidian-ledger"] :is(
    h1, h2, h3, h4,
    .snapshot-title,
    .snapshot-fact strong,
    .snapshot-fact time,
    .calendar-month-cell strong,
    .provider-sync-drawer > summary strong
  ) {
    color: #f2f0ea;
  }

  :root[data-theme="obsidian-ledger"] :is(
    .meta,
    .section-subtitle,
    .source-note,
    .snapshot-description,
    .snapshot-fact span,
    .provider-sync-drawer > summary span
  ) {
    color: #b9b4aa;
  }

  :root[data-theme="obsidian-ledger"] .calendar-monitoring-strip {
    border: 1px solid rgba(184, 115, 51, 0.5);
    border-radius: 18px;
    background: linear-gradient(110deg, #171d23, #202832);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.36);
  }

  :root[data-theme="obsidian-ledger"] .calendar-month-cell {
    border: 1px solid rgba(199, 205, 212, 0.16);
    border-radius: 14px;
    background:
      linear-gradient(160deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.012)),
      #11161b;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.07),
      0 14px 32px rgba(0, 0, 0, 0.28);
  }

  :root[data-theme="obsidian-ledger"] .calendar-month-cell.empty {
    background: linear-gradient(160deg, #12171c, #0d1115);
  }

  :root[data-theme="obsidian-ledger"] :is(.mini-event, .calendar-agenda-row, .calendar-search-result) {
    border: 1px solid rgba(199, 205, 212, 0.2);
    border-left: 6px solid #c7cdd4;
    border-radius: 12px;
    padding: 10px 12px;
    color: #f2f0ea;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.34);
  }

  :root[data-theme="obsidian-ledger"] :is(
    .mini-event.source-shared,
    .calendar-agenda-row.source-shared,
    .calendar-search-result.source-shared
  ) {
    border-left-color: #b87333;
    background: linear-gradient(145deg, #563820, #30251e);
  }

  :root[data-theme="obsidian-ledger"] :is(
    .mini-event.source-neverlost,
    .calendar-agenda-row.source-neverlost,
    .calendar-search-result.source-neverlost,
    .mini-event.source-milestone,
    .calendar-agenda-row.source-milestone,
    .calendar-search-result.source-milestone
  ) {
    border-left-color: #d2a84a;
    background: linear-gradient(145deg, #463820, #29251c);
  }

  :root[data-theme="obsidian-ledger"] :is(
    .mini-event.source-removed,
    .calendar-agenda-row.source-removed,
    .calendar-search-result.source-removed,
    .mini-event.removed-event
  ) {
    border-left-color: #9e3f3f;
    background: linear-gradient(145deg, #582a2c, #321c20);
  }

  :root[data-theme="obsidian-ledger"] :is(.event-source-badge, .badge-change, .badge-removed, .badge-verified) {
    border-radius: 6px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }

  :root[data-theme="obsidian-ledger"] :is(.secondary-button, .filter-button, .provider-button, input, select, textarea) {
    border: 1px solid rgba(199, 205, 212, 0.3);
    border-radius: 10px;
    background: linear-gradient(180deg, #252d36, #171d23);
    color: #f2f0ea;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
  }

  :root[data-theme="obsidian-ledger"] .primary-action {
    border: 1px solid #48bdb3;
    border-radius: 10px;
    background: linear-gradient(180deg, #35ada3, #23877f);
    box-shadow: 0 0 26px rgba(42, 161, 152, 0.26), 0 10px 22px rgba(0, 0, 0, 0.32);
  }

  :root[data-theme="living-record"] body,
  :root[data-theme="living-record"] .main {
    background:
      repeating-linear-gradient(0deg, rgba(111, 143, 114, 0.035) 0 1px, transparent 1px 34px),
      #f7f3ea;
  }

  :root[data-theme="living-record"] .sidebar {
    border-right: 0;
    background: linear-gradient(180deg, #456b57, #355443);
    box-shadow: 12px 0 34px rgba(74, 61, 38, 0.1);
  }

  :root[data-theme="living-record"] :is(
    .calendar-page,
    .calendar-change-review,
    .calendar-evidence-card,
    .snapshot-section,
    .evidence-timeline,
    .source-classification,
    .trust-integrity-section,
    .advanced-audit,
    .sync-control-center,
    .provider-sync-drawer-body,
    dialog
  ) {
    border: 1px solid #e2d8ca;
    border-radius: 28px 12px 28px 12px;
    background:
      linear-gradient(rgba(111, 143, 114, 0.022), rgba(111, 143, 114, 0.022)),
      #fffdf8;
    box-shadow: 0 14px 34px rgba(74, 61, 38, 0.09);
  }

  :root[data-theme="living-record"] .calendar-monitoring-strip {
    border: 0;
    border-radius: 24px 10px 24px 10px;
    background: #416451;
    box-shadow: 0 12px 28px rgba(74, 61, 38, 0.13);
  }

  :root[data-theme="living-record"] .section-heading {
    border-bottom: 2px solid #e7ddcf;
    padding-bottom: 16px;
  }

  :root[data-theme="living-record"] .section-heading::after {
    content: "";
    display: block;
    width: 72px;
    height: 5px;
    margin-top: 12px;
    border-radius: 999px;
    background: #6f8f72;
  }

  :root[data-theme="living-record"] .calendar-month-cell {
    border: 1px solid #e2d8ca;
    border-radius: 22px 9px 22px 9px;
    background: #fbf8f1;
    box-shadow: 0 8px 22px rgba(74, 61, 38, 0.075);
  }

  :root[data-theme="living-record"] .calendar-month-cell.empty {
    background: #f3eee4;
    box-shadow: inset 0 0 0 1px rgba(111, 143, 114, 0.08);
  }

  :root[data-theme="living-record"] :is(.mini-event, .calendar-agenda-row, .calendar-search-result) {
    border: 1px solid #d9d5c9;
    border-left: 6px solid #6f8f72;
    border-radius: 18px 7px 18px 7px;
    padding: 10px 13px;
    box-shadow: 0 6px 16px rgba(74, 61, 38, 0.08);
  }

  :root[data-theme="living-record"] :is(.event-source-badge, .badge-change, .badge-removed, .badge-verified) {
    border: 0;
    border-radius: 999px;
    padding-inline: 9px;
  }

  :root[data-theme="living-record"] :is(.primary-action, .secondary-button, .filter-button, .provider-button) {
    border-radius: 16px 7px 16px 7px;
  }

  :root[data-theme="living-record"] .primary-action {
    border: 0;
    background: #4e7c63;
    box-shadow: 0 8px 18px rgba(78, 124, 99, 0.18);
  }

  :root[data-theme="living-record"] :is(.secondary-button, .filter-button, .provider-button) {
    border: 1px solid #cbd8cd;
    background: #fffdf8;
    color: #355443;
  }

  :root[data-theme="axiom-archive"] body,
  :root[data-theme="axiom-archive"] .main {
    background:
      repeating-linear-gradient(90deg, rgba(156, 106, 56, 0.035) 0 1px, transparent 1px 24px),
      repeating-linear-gradient(0deg, rgba(156, 106, 56, 0.025) 0 1px, transparent 1px 24px),
      #efe8dc;
  }

  :root[data-theme="axiom-archive"] .sidebar {
    border-right: 4px double #9c6a38;
    background:
      linear-gradient(rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.035)),
      #3e4a46;
    box-shadow: 10px 0 0 rgba(156, 106, 56, 0.09);
  }

  :root[data-theme="axiom-archive"] :is(
    .calendar-page,
    .calendar-change-review,
    .calendar-evidence-card,
    .snapshot-section,
    .evidence-timeline,
    .source-classification,
    .trust-integrity-section,
    .advanced-audit,
    .sync-control-center,
    .provider-sync-drawer-body,
    dialog
  ) {
    border: 1px solid #c9b99f;
    border-top: 7px solid #9c6a38;
    border-radius: 3px;
    background:
      repeating-linear-gradient(0deg, rgba(62, 74, 70, 0.022) 0 1px, transparent 1px 22px),
      #fff9ee;
    box-shadow: 6px 8px 0 rgba(98, 79, 55, 0.09);
  }

  :root[data-theme="axiom-archive"] .calendar-monitoring-strip {
    border: 1px solid #9c6a38;
    border-left: 9px solid #2d7268;
    border-radius: 2px;
    background: #f2e6d2;
    color: #292927;
    box-shadow: 5px 6px 0 rgba(98, 79, 55, 0.09);
  }

  :root[data-theme="axiom-archive"] .section-heading {
    border-top: 1px solid #9c6a38;
    border-bottom: 3px double #9c6a38;
    padding-block: 10px;
  }

  :root[data-theme="axiom-archive"] :is(.section-heading h2, .section-heading h3, .eyebrow) {
    font-family: Georgia, "Times New Roman", serif;
  }

  :root[data-theme="axiom-archive"] .calendar-month-cell {
    position: relative;
    border: 1px solid #c9b99f;
    border-top: 8px solid #d4b98f;
    border-radius: 3px;
    background:
      repeating-linear-gradient(0deg, rgba(156, 106, 56, 0.025) 0 1px, transparent 1px 20px),
      #fbf5ea;
    box-shadow: 4px 5px 0 rgba(98, 79, 55, 0.08);
  }

  :root[data-theme="axiom-archive"] .calendar-month-cell.empty {
    background: #e8dece;
    box-shadow: inset 0 0 0 1px rgba(156, 106, 56, 0.11);
  }

  :root[data-theme="axiom-archive"] :is(.mini-event, .calendar-agenda-row, .calendar-search-result) {
    border: 1px solid #bca98b;
    border-left: 8px solid #9c6a38;
    border-radius: 1px;
    padding: 8px 10px;
    background: #fffaf0;
    box-shadow: 3px 3px 0 rgba(98, 79, 55, 0.1);
  }

  :root[data-theme="axiom-archive"] :is(.event-source-badge, .badge-change, .badge-verified) {
    border: 1px solid currentColor;
    border-radius: 1px;
    background: transparent;
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  :root[data-theme="axiom-archive"] .badge-removed {
    border: 2px solid #b45245;
    border-radius: 1px;
    background: transparent;
    color: #b45245;
    transform: rotate(-2deg);
  }

  :root[data-theme="axiom-archive"] :is(.primary-action, .secondary-button, .filter-button, .provider-button) {
    border-radius: 2px;
    font-family: Georgia, "Times New Roman", serif;
  }

  :root[data-theme="axiom-archive"] .primary-action {
    border: 1px solid #245f56;
    background: #2d7268;
    box-shadow: 3px 4px 0 rgba(45, 114, 104, 0.18);
  }

  :root[data-theme="axiom-archive"] :is(.secondary-button, .filter-button, .provider-button) {
    border: 1px solid #9c6a38;
    background: #fbf5ea;
    color: #3e4a46;
  }

  :root[data-theme="edc-field-notebook"] body,
  :root[data-theme="edc-field-notebook"] .main {
    background:
      linear-gradient(rgba(92, 135, 199, 0.12) 1px, transparent 1px),
      linear-gradient(90deg, rgba(92, 135, 199, 0.12) 1px, transparent 1px),
      #111315;
    background-size: 24px 24px;
  }

  :root[data-theme="edc-field-notebook"] .sidebar {
    border-right: 3px solid #586647;
    background:
      linear-gradient(90deg, rgba(192, 106, 45, 0.09), transparent 18px),
      #181d20;
    box-shadow: 10px 0 0 rgba(88, 102, 71, 0.12);
  }

  :root[data-theme="edc-field-notebook"] :is(
    .calendar-page,
    .calendar-change-review,
    .calendar-evidence-card,
    .snapshot-section,
    .evidence-timeline,
    .source-classification,
    .trust-integrity-section,
    .advanced-audit,
    .sync-control-center,
    .provider-sync-drawer-body,
    dialog
  ) {
    border: 1px solid #4b5456;
    border-left: 8px solid #586647;
    border-radius: 0;
    background:
      linear-gradient(rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.018)),
      #20262a;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.025),
      7px 8px 0 rgba(0, 0, 0, 0.24);
  }

  :root[data-theme="edc-field-notebook"] .calendar-monitoring-strip {
    border: 1px solid #6d755a;
    border-left: 10px solid #c06a2d;
    border-radius: 0;
    background: #252c28;
    box-shadow: 6px 7px 0 rgba(0, 0, 0, 0.23);
  }

  :root[data-theme="edc-field-notebook"] .section-heading {
    border-bottom: 2px solid #586647;
    padding-bottom: 12px;
    background: linear-gradient(90deg, rgba(88, 102, 71, 0.18), transparent 65%);
  }

  :root[data-theme="edc-field-notebook"] .calendar-month-cell {
    border: 1px solid #465053;
    border-radius: 0;
    background:
      linear-gradient(rgba(92, 135, 199, 0.11) 1px, transparent 1px),
      linear-gradient(90deg, rgba(92, 135, 199, 0.11) 1px, transparent 1px),
      #181d20;
    background-size: 18px 18px;
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.16);
  }

  :root[data-theme="edc-field-notebook"] .calendar-month-cell.empty {
    background:
      linear-gradient(rgba(92, 135, 199, 0.065) 1px, transparent 1px),
      linear-gradient(90deg, rgba(92, 135, 199, 0.065) 1px, transparent 1px),
      #15191c;
    background-size: 18px 18px;
  }

  :root[data-theme="edc-field-notebook"] :is(.mini-event, .calendar-agenda-row, .calendar-search-result) {
    border: 1px solid #4b5456;
    border-left: 9px solid #77828d;
    border-radius: 0;
    padding: 9px 10px;
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.22), 4px 4px 0 rgba(0, 0, 0, 0.18);
  }

  :root[data-theme="edc-field-notebook"] :is(
    .mini-event.source-shared,
    .calendar-agenda-row.source-shared,
    .calendar-search-result.source-shared
  ) {
    border-left-color: #a67c2d;
    background: #383225;
  }

  :root[data-theme="edc-field-notebook"] :is(
    .mini-event.source-neverlost,
    .calendar-agenda-row.source-neverlost,
    .calendar-search-result.source-neverlost,
    .mini-event.source-milestone,
    .calendar-agenda-row.source-milestone,
    .calendar-search-result.source-milestone
  ) {
    border-left-color: #2e9e95;
    background: #2c3429;
  }

  :root[data-theme="edc-field-notebook"] :is(.event-source-badge, .badge-change, .badge-removed, .badge-verified) {
    border: 1px dashed currentColor;
    border-radius: 0;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  :root[data-theme="edc-field-notebook"] :is(.primary-action, .secondary-button, .filter-button, .provider-button) {
    border-radius: 0;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  :root[data-theme="edc-field-notebook"] .primary-action {
    border: 1px solid #52bdb4;
    background: #2e9e95;
    color: #111315;
    box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.28);
  }

  :root[data-theme="edc-field-notebook"] :is(.secondary-button, .filter-button, .provider-button) {
    border: 1px solid #596265;
    background: #2a3035;
    color: #f5f3ee;
    box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.18);
  }
}

/*
 * Final Theme Rebuild
 *
 * Identity is carried by construction, silhouette, spacing, depth, and
 * material. Color remains supporting evidence, not the defining feature.
 */
@media screen and (min-width: 901px) {
  /* AXIOM ONE — spatial operating system */
  :root[data-theme="axiom-one"] .app-shell {
    grid-template-columns: 248px minmax(0, 1fr);
  }

  :root[data-theme="axiom-one"] .main {
    padding: 42px 34px 72px;
  }

  :root[data-theme="axiom-one"] .sidebar {
    margin: 18px 0 18px 18px;
    min-height: calc(100vh - 36px);
    border-radius: 28px;
  }

  :root[data-theme="axiom-one"] .nav-item {
    min-height: 52px;
    border: 0;
    border-radius: 15px;
    background: transparent;
    box-shadow: none;
  }

  :root[data-theme="axiom-one"] .nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  }

  :root[data-theme="axiom-one"] body[data-page="calendar"] .calendar-page {
    gap: 30px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  :root[data-theme="axiom-one"] .calendar-header {
    padding: 4px 8px 0;
  }

  :root[data-theme="axiom-one"] .calendar-header h2 {
    font-weight: 650;
    letter-spacing: 0;
  }

  :root[data-theme="axiom-one"] .calendar-monitoring-strip {
    align-items: center;
    padding: 16px 20px;
    border-radius: 999px;
  }

  :root[data-theme="axiom-one"] .calendar-navigation,
  :root[data-theme="axiom-one"] .calendar-evidence-card,
  :root[data-theme="axiom-one"] .calendar-change-review {
    border: 0;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 24px 70px rgba(25, 39, 48, 0.08);
    backdrop-filter: blur(24px);
  }

  :root[data-theme="axiom-one"] .calendar-month-grid {
    gap: 18px;
    padding: 10px 4px 20px;
  }

  :root[data-theme="axiom-one"] body[data-page="calendar"] .calendar-month-cell {
    min-height: 210px;
    padding: 16px 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  :root[data-theme="axiom-one"] body[data-page="calendar"] .calendar-month-cell:not(.empty) {
    border-top: 1px solid rgba(20, 35, 45, 0.09);
  }

  :root[data-theme="axiom-one"] body[data-page="calendar"] .calendar-month-cell.empty {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  :root[data-theme="axiom-one"] .calendar-month-cell > strong {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 8px 24px rgba(25, 39, 48, 0.07);
  }

  :root[data-theme="axiom-one"] body[data-page="calendar"] :is(
    .mini-event,
    .calendar-agenda-row,
    .calendar-search-result
  ) {
    width: calc(100% - 10px);
    margin: 8px 5px 0;
    padding: 11px 14px;
    border: 0;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow:
      0 14px 30px rgba(25, 39, 48, 0.09),
      inset 0 0 0 1px rgba(25, 39, 48, 0.035);
    backdrop-filter: blur(18px);
  }

  :root[data-theme="axiom-one"] .event-source-badge {
    border: 0;
    border-radius: 999px;
    box-shadow: none;
  }

  :root[data-theme="axiom-one"] :is(
    .primary-action,
    .secondary-button,
    .filter-button,
    .provider-button
  ) {
    min-height: 44px;
    border-radius: 999px;
    box-shadow: none;
  }

  :root[data-theme="axiom-one"] .secondary-button {
    border-color: transparent;
    background: rgba(255, 255, 255, 0.72);
  }

  /* OBSIDIAN LEDGER — executive glass and machined plaques */
  :root[data-theme="obsidian-ledger"] .app-shell {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  :root[data-theme="obsidian-ledger"] .main {
    padding: 32px 24px 84px;
    perspective: 1600px;
  }

  :root[data-theme="obsidian-ledger"] .sidebar {
    margin: 14px 0 14px 14px;
    min-height: calc(100vh - 28px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow:
      0 40px 100px rgba(0, 0, 0, 0.58),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  :root[data-theme="obsidian-ledger"] .nav-item {
    min-height: 56px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
  }

  :root[data-theme="obsidian-ledger"] .nav-item.active {
    border-color: rgba(210, 168, 74, 0.34);
    background: linear-gradient(90deg, rgba(184, 115, 51, 0.2), rgba(255, 255, 255, 0.035));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 16px 34px rgba(0, 0, 0, 0.28);
  }

  :root[data-theme="obsidian-ledger"] body[data-page="calendar"] .calendar-page {
    gap: 28px;
    padding: 24px 22px;
    border-radius: 30px;
    transform: translateZ(0);
    box-shadow:
      0 55px 120px rgba(0, 0, 0, 0.54),
      0 12px 30px rgba(0, 0, 0, 0.38),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  :root[data-theme="obsidian-ledger"] .calendar-header {
    padding: 4px 8px 20px;
    border-bottom: 1px solid rgba(184, 115, 51, 0.42);
  }

  :root[data-theme="obsidian-ledger"] .calendar-header h2 {
    font-weight: 520;
    letter-spacing: 0.035em;
  }

  :root[data-theme="obsidian-ledger"] .calendar-monitoring-strip {
    border-radius: 999px;
    box-shadow:
      0 22px 48px rgba(0, 0, 0, 0.48),
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      inset 0 -1px 0 rgba(184, 115, 51, 0.2);
  }

  :root[data-theme="obsidian-ledger"] .calendar-navigation,
  :root[data-theme="obsidian-ledger"] .calendar-evidence-card,
  :root[data-theme="obsidian-ledger"] .calendar-change-review,
  :root[data-theme="obsidian-ledger"] .snapshot-section,
  :root[data-theme="obsidian-ledger"] .trust-integrity-section,
  :root[data-theme="obsidian-ledger"] .advanced-audit {
    border-radius: 26px;
    box-shadow:
      0 34px 80px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.09),
      inset 0 -1px 0 rgba(184, 115, 51, 0.15);
  }

  :root[data-theme="obsidian-ledger"] .calendar-month-grid {
    gap: 10px;
    padding: 8px 2px 16px;
  }

  :root[data-theme="obsidian-ledger"] body[data-page="calendar"] .calendar-month-cell {
    min-height: 210px;
    padding: 11px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 24px;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.018) 48%),
      #11161b;
    box-shadow:
      0 26px 54px rgba(0, 0, 0, 0.48),
      0 8px 18px rgba(0, 0, 0, 0.32),
      inset 0 1px 0 rgba(255, 255, 255, 0.11),
      inset 0 -1px 0 rgba(184, 115, 51, 0.16);
    transform: translateY(-2px);
    backdrop-filter: blur(26px);
  }

  :root[data-theme="obsidian-ledger"] body[data-page="calendar"] .calendar-month-cell.empty {
    opacity: 0.48;
    transform: translateY(2px) scale(0.985);
  }

  :root[data-theme="obsidian-ledger"] .calendar-month-cell > strong {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(210, 168, 74, 0.32);
    border-radius: 50%;
    background: linear-gradient(145deg, #303840, #151a1f);
    box-shadow:
      0 12px 22px rgba(0, 0, 0, 0.38),
      inset 0 1px 0 rgba(255, 255, 255, 0.13);
  }

  :root[data-theme="obsidian-ledger"] body[data-page="calendar"] :is(
    .mini-event,
    .calendar-agenda-row,
    .calendar-search-result
  ) {
    position: relative;
    overflow: hidden;
    margin-top: 11px;
    width: 100%;
    padding: 12px 24px 12px 10px;
    border: 1px solid rgba(210, 168, 74, 0.38);
    border-left: 3px solid #b87333;
    border-radius: 15px;
    background:
      linear-gradient(125deg, rgba(255, 255, 255, 0.14), transparent 38%),
      linear-gradient(180deg, #363d43, #171c21);
    box-shadow:
      0 20px 34px rgba(0, 0, 0, 0.5),
      0 0 22px rgba(184, 115, 51, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      inset 0 -1px 0 rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
    overflow-wrap: normal;
    word-break: normal;
  }

  :root[data-theme="obsidian-ledger"] body[data-page="calendar"] :is(
    .mini-event,
    .calendar-agenda-row,
    .calendar-search-result
  )::after {
    content: "•";
    position: absolute;
    top: 50%;
    right: 7px;
    width: 11px;
    height: 11px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: linear-gradient(145deg, #747b80, #22272b);
    color: transparent;
    box-shadow:
      0 3px 6px rgba(0, 0, 0, 0.55),
      inset 0 1px 1px rgba(255, 255, 255, 0.25);
    transform: translateY(-50%);
  }

  :root[data-theme="obsidian-ledger"] .event-source-badge {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      0 5px 12px rgba(0, 0, 0, 0.25);
  }

  :root[data-theme="obsidian-ledger"] :is(
    .primary-action,
    .secondary-button,
    .filter-button,
    .provider-button
  ) {
    min-height: 48px;
    border-radius: 999px;
    padding-inline: 22px;
    box-shadow:
      0 14px 30px rgba(0, 0, 0, 0.36),
      inset 0 1px 0 rgba(255, 255, 255, 0.11);
  }

  /* LIVING RECORD — layered family archive and pinned memories */
  :root[data-theme="living-record"] .app-shell {
    grid-template-columns: 286px minmax(0, 1fr);
  }

  :root[data-theme="living-record"] .main {
    padding: 42px 36px 90px;
  }

  :root[data-theme="living-record"] .sidebar {
    margin: 22px 0 22px 20px;
    min-height: calc(100vh - 44px);
    border-radius: 42px 16px 42px 16px;
  }

  :root[data-theme="living-record"] .nav-item {
    min-height: 58px;
    border: 0;
    border-radius: 24px 10px 24px 10px;
    background: rgba(255, 255, 255, 0.045);
  }

  :root[data-theme="living-record"] .nav-item:nth-child(even) {
    border-radius: 10px 24px 10px 24px;
  }

  :root[data-theme="living-record"] .nav-item.active {
    transform: translateX(7px) rotate(-0.35deg);
    box-shadow: 0 12px 24px rgba(54, 74, 60, 0.22);
  }

  :root[data-theme="living-record"] body[data-page="calendar"] .calendar-page,
  :root[data-theme="living-record"] .calendar-evidence-card,
  :root[data-theme="living-record"] .calendar-change-review,
  :root[data-theme="living-record"] .snapshot-section,
  :root[data-theme="living-record"] .trust-integrity-section,
  :root[data-theme="living-record"] .advanced-audit {
    position: relative;
    isolation: isolate;
    overflow: visible;
    border-radius: 42px 18px 38px 16px;
  }

  :root[data-theme="living-record"] body[data-page="calendar"] .calendar-page::before,
  :root[data-theme="living-record"] .calendar-evidence-card::before,
  :root[data-theme="living-record"] .snapshot-section::before {
    content: "";
    position: absolute;
    z-index: -2;
    inset: 13px -9px -10px 12px;
    border: 1px solid #dfd3c4;
    border-radius: 24px 42px 18px 38px;
    background: #f0eadf;
    box-shadow: 0 18px 36px rgba(74, 61, 38, 0.1);
    transform: rotate(0.35deg);
  }

  :root[data-theme="living-record"] body[data-page="calendar"] .calendar-page::after,
  :root[data-theme="living-record"] .calendar-evidence-card::after,
  :root[data-theme="living-record"] .snapshot-section::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 6px 7px -5px -7px;
    border-radius: 36px 16px 34px 18px;
    background: #faf5eb;
    transform: rotate(-0.22deg);
  }

  :root[data-theme="living-record"] .calendar-header {
    padding: 12px 14px 22px;
    border-bottom: 0;
  }

  :root[data-theme="living-record"] .calendar-header h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 600;
  }

  :root[data-theme="living-record"] .calendar-monitoring-strip {
    border-radius: 34px 14px 32px 16px;
    transform: rotate(-0.15deg);
  }

  :root[data-theme="living-record"] .calendar-month-grid {
    gap: 14px;
    padding: 14px 8px 24px;
  }

  :root[data-theme="living-record"] body[data-page="calendar"] .calendar-month-cell {
    position: relative;
    min-height: 210px;
    padding: 18px 13px;
    border: 1px solid #ddd1c0;
    border-radius: 32px 13px 29px 16px;
    background:
      repeating-linear-gradient(0deg, transparent 0 27px, rgba(111, 143, 114, 0.07) 27px 28px),
      #fffaf1;
    box-shadow:
      0 13px 24px rgba(74, 61, 38, 0.1),
      3px 5px 0 rgba(153, 139, 116, 0.07);
    transform: rotate(-0.18deg);
  }

  :root[data-theme="living-record"] body[data-page="calendar"] .calendar-month-cell:nth-child(3n) {
    border-radius: 14px 31px 16px 28px;
    transform: rotate(0.24deg) translateY(2px);
  }

  :root[data-theme="living-record"] body[data-page="calendar"] .calendar-month-cell:nth-child(4n) {
    border-radius: 28px 15px 34px 12px;
    transform: rotate(-0.32deg) translateY(-2px);
  }

  :root[data-theme="living-record"] body[data-page="calendar"] .calendar-month-cell:not(.empty)::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 50%;
    width: 48px;
    height: 15px;
    background: rgba(219, 207, 174, 0.68);
    box-shadow: 0 2px 4px rgba(74, 61, 38, 0.1);
    transform: translateX(-50%) rotate(-1.5deg);
  }

  :root[data-theme="living-record"] body[data-page="calendar"] .calendar-month-cell.empty {
    opacity: 0.55;
    transform: scale(0.97);
  }

  :root[data-theme="living-record"] body[data-page="calendar"] :is(
    .mini-event,
    .calendar-agenda-row,
    .calendar-search-result
  ) {
    position: relative;
    margin-top: 11px;
    padding: 13px 14px 13px 18px;
    border: 0;
    border-radius: 7px 18px 9px 16px;
    background: #fffef9;
    box-shadow:
      0 10px 18px rgba(74, 61, 38, 0.13),
      2px 3px 0 rgba(153, 139, 116, 0.1);
    transform: rotate(-0.5deg);
    transform-origin: 18% 20%;
  }

  :root[data-theme="living-record"] body[data-page="calendar"] :is(
    .mini-event,
    .calendar-agenda-row,
    .calendar-search-result
  ):nth-of-type(even) {
    transform: rotate(0.65deg) translateX(3px);
  }

  :root[data-theme="living-record"] body[data-page="calendar"] :is(
    .mini-event,
    .calendar-agenda-row,
    .calendar-search-result
  )::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6f8f72;
    box-shadow: 0 2px 4px rgba(74, 61, 38, 0.3);
  }

  :root[data-theme="living-record"] .event-source-badge {
    border: 0;
    border-radius: 999px;
  }

  :root[data-theme="living-record"] :is(
    .primary-action,
    .secondary-button,
    .filter-button,
    .provider-button
  ) {
    min-height: 48px;
    border-radius: 24px 11px 24px 11px;
    padding-inline: 20px;
  }

  :root[data-theme="living-record"] .secondary-button:nth-of-type(even) {
    border-radius: 11px 24px 11px 24px;
  }

  /* AXIOM ARCHIVE — physical folders and evidence slips */
  :root[data-theme="axiom-archive"] .app-shell {
    grid-template-columns: 310px minmax(0, 1fr);
  }

  :root[data-theme="axiom-archive"] .main {
    padding: 34px 28px 80px;
  }

  :root[data-theme="axiom-archive"] .sidebar {
    border-right: 8px double #9c6a38;
    box-shadow: 14px 0 0 rgba(62, 74, 70, 0.1);
  }

  :root[data-theme="axiom-archive"] .nav-item {
    min-height: 54px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.025);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.12);
    font-family: Georgia, "Times New Roman", serif;
  }

  :root[data-theme="axiom-archive"] .nav-item.active {
    border-left: 10px solid #9c6a38;
    background: rgba(255, 255, 255, 0.08);
  }

  :root[data-theme="axiom-archive"] body[data-page="calendar"] .calendar-page,
  :root[data-theme="axiom-archive"] .calendar-evidence-card,
  :root[data-theme="axiom-archive"] .calendar-change-review,
  :root[data-theme="axiom-archive"] .snapshot-section,
  :root[data-theme="axiom-archive"] .trust-integrity-section,
  :root[data-theme="axiom-archive"] .advanced-audit {
    position: relative;
    overflow: visible;
    border: 1px solid #b7a486;
    border-top: 12px solid #9c6a38;
    border-radius: 0;
    box-shadow:
      9px 11px 0 rgba(98, 79, 55, 0.12),
      18px 20px 0 rgba(98, 79, 55, 0.05);
  }

  :root[data-theme="axiom-archive"] body[data-page="calendar"] .calendar-page::before,
  :root[data-theme="axiom-archive"] .calendar-evidence-card::before,
  :root[data-theme="axiom-archive"] .snapshot-section::before {
    content: "PRESERVED RECORD";
    position: absolute;
    top: -38px;
    left: 28px;
    min-width: 190px;
    padding: 9px 18px 7px;
    border: 1px solid #9c6a38;
    border-bottom: 0;
    background: #d8c39f;
    color: #3d3932;
    font: 800 12px/1 Georgia, "Times New Roman", serif;
    letter-spacing: 0.12em;
    text-align: center;
    clip-path: polygon(0 16%, 12px 0, 100% 0, 100% 100%, 0 100%);
  }

  :root[data-theme="axiom-archive"] .calendar-header {
    padding: 12px 16px 18px;
    border-bottom: 4px double #9c6a38;
  }

  :root[data-theme="axiom-archive"] .calendar-header h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  :root[data-theme="axiom-archive"] .calendar-monitoring-strip {
    border-radius: 0;
    box-shadow: 6px 7px 0 rgba(98, 79, 55, 0.13);
  }

  :root[data-theme="axiom-archive"] .calendar-month-grid {
    gap: 9px;
    padding: 16px 8px 24px;
  }

  :root[data-theme="axiom-archive"] body[data-page="calendar"] .calendar-month-cell {
    position: relative;
    min-height: 210px;
    padding: 38px 12px 12px;
    border: 0;
    border-radius: 0;
    background:
      repeating-linear-gradient(0deg, transparent 0 24px, rgba(62, 74, 70, 0.06) 24px 25px),
      #f8f0e3;
    box-shadow: none;
    filter: drop-shadow(5px 7px 0 rgba(98, 79, 55, 0.12));
    clip-path: polygon(0 15px, 34% 15px, 39% 0, 72% 0, 77% 15px, 100% 15px, 100% 100%, 0 100%);
  }

  :root[data-theme="axiom-archive"] body[data-page="calendar"] .calendar-month-cell::before {
    content: "DATE FILE";
    position: absolute;
    top: 4px;
    left: 41%;
    font: 800 10px/1 Georgia, "Times New Roman", serif;
    letter-spacing: 0.12em;
  }

  :root[data-theme="axiom-archive"] body[data-page="calendar"] .calendar-month-cell.empty {
    opacity: 0.45;
    filter: none;
  }

  :root[data-theme="axiom-archive"] .calendar-month-cell > strong {
    position: absolute;
    top: 26px;
    right: 12px;
    min-width: 34px;
    padding: 5px 7px;
    border: 2px solid #6d6252;
    font-family: Georgia, "Times New Roman", serif;
    text-align: center;
  }

  :root[data-theme="axiom-archive"] body[data-page="calendar"] :is(
    .mini-event,
    .calendar-agenda-row,
    .calendar-search-result
  ) {
    position: relative;
    margin-top: 9px;
    padding: 13px 12px 11px 18px;
    border: 1px solid #a89372;
    border-left: 0;
    border-radius: 0;
    background:
      linear-gradient(90deg, #9c6a38 0 7px, transparent 7px),
      #fffaf0;
    box-shadow: 4px 5px 0 rgba(98, 79, 55, 0.13);
    clip-path: polygon(0 0, 96% 0, 100% 8px, 100% 100%, 0 100%);
  }

  :root[data-theme="axiom-archive"] body[data-page="calendar"] :is(
    .mini-event,
    .calendar-agenda-row,
    .calendar-search-result
  )::after {
    content: "EVIDENCE";
    position: absolute;
    right: 7px;
    bottom: 5px;
    font: 700 8px/1 Georgia, "Times New Roman", serif;
    letter-spacing: 0.12em;
    opacity: 0.45;
  }

  :root[data-theme="axiom-archive"] .event-source-badge {
    border: 2px solid currentColor;
    border-radius: 0;
    background: transparent;
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: 0.08em;
    box-shadow: none;
  }

  :root[data-theme="axiom-archive"] .badge-removed {
    transform: rotate(-4deg);
    box-shadow: 2px 2px 0 rgba(180, 82, 69, 0.14);
  }

  :root[data-theme="axiom-archive"] :is(
    .primary-action,
    .secondary-button,
    .filter-button,
    .provider-button
  ) {
    min-height: 46px;
    border-radius: 0;
    box-shadow: 4px 5px 0 rgba(98, 79, 55, 0.13);
    font-family: Georgia, "Times New Roman", serif;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  /* EDC FIELD NOTEBOOK — coordinate-marked field equipment */
  :root[data-theme="edc-field-notebook"] .app-shell {
    grid-template-columns: 270px minmax(0, 1fr);
  }

  :root[data-theme="edc-field-notebook"] .main {
    padding: 30px 24px 76px;
  }

  :root[data-theme="edc-field-notebook"] .sidebar {
    border-right: 0;
    box-shadow:
      8px 0 0 #586647,
      12px 0 0 rgba(0, 0, 0, 0.42);
  }

  :root[data-theme="edc-field-notebook"] .nav-item {
    min-height: 50px;
    border: 1px solid #4c5557;
    border-radius: 0;
    background:
      linear-gradient(90deg, #586647 0 5px, transparent 5px),
      #20262a;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.025),
      3px 4px 0 rgba(0, 0, 0, 0.23);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  :root[data-theme="edc-field-notebook"] .nav-item.active {
    background:
      linear-gradient(90deg, #c06a2d 0 7px, transparent 7px),
      #2a302c;
    transform: translateX(5px);
  }

  :root[data-theme="edc-field-notebook"] body[data-page="calendar"] .calendar-page,
  :root[data-theme="edc-field-notebook"] .calendar-evidence-card,
  :root[data-theme="edc-field-notebook"] .calendar-change-review,
  :root[data-theme="edc-field-notebook"] .snapshot-section,
  :root[data-theme="edc-field-notebook"] .trust-integrity-section,
  :root[data-theme="edc-field-notebook"] .advanced-audit {
    position: relative;
    border: 2px solid #586647;
    border-left: 12px solid #586647;
    border-radius: 0;
    box-shadow:
      9px 10px 0 rgba(0, 0, 0, 0.32),
      inset 0 0 0 1px rgba(255, 255, 255, 0.035);
    clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  }

  :root[data-theme="edc-field-notebook"] body[data-page="calendar"] .calendar-page::before,
  :root[data-theme="edc-field-notebook"] .calendar-evidence-card::before,
  :root[data-theme="edc-field-notebook"] .snapshot-section::before {
    content: "NL // FIELD RECORD";
    position: absolute;
    top: 8px;
    right: 28px;
    z-index: 2;
    padding: 5px 8px;
    border: 1px solid #6d755a;
    background: #181d20;
    font: 800 10px/1 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    letter-spacing: 0.12em;
  }

  :root[data-theme="edc-field-notebook"] .calendar-header {
    padding: 12px 16px 18px;
    border-bottom: 3px solid #586647;
    background:
      linear-gradient(90deg, rgba(88, 102, 71, 0.28), transparent 62%);
  }

  :root[data-theme="edc-field-notebook"] .calendar-header h2 {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  :root[data-theme="edc-field-notebook"] .calendar-monitoring-strip {
    border: 2px solid #6d755a;
    border-left: 13px solid #c06a2d;
    border-radius: 0;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  }

  :root[data-theme="edc-field-notebook"] .calendar-month-grid {
    counter-reset: field-cell;
    gap: 8px;
    padding: 16px 8px 24px;
  }

  :root[data-theme="edc-field-notebook"] body[data-page="calendar"] .calendar-month-cell {
    counter-increment: field-cell;
    position: relative;
    min-height: 210px;
    padding: 38px 11px 26px;
    border: 1px solid #596265;
    border-radius: 0;
    background:
      linear-gradient(rgba(92, 135, 199, 0.12) 1px, transparent 1px),
      linear-gradient(90deg, rgba(92, 135, 199, 0.12) 1px, transparent 1px),
      #181d20;
    background-size: 18px 18px;
    box-shadow:
      inset 0 0 0 3px rgba(0, 0, 0, 0.18),
      4px 5px 0 rgba(0, 0, 0, 0.25);
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  }

  :root[data-theme="edc-field-notebook"] body[data-page="calendar"] .calendar-month-cell::before {
    content: "GRID-" counter(field-cell, decimal-leading-zero);
    position: absolute;
    top: 8px;
    left: 10px;
    padding: 3px 6px;
    border-left: 4px solid #c06a2d;
    background: rgba(17, 19, 21, 0.86);
    font: 800 10px/1 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    letter-spacing: 0.1em;
  }

  :root[data-theme="edc-field-notebook"] body[data-page="calendar"] .calendar-month-cell::after {
    content: "+";
    position: absolute;
    right: 8px;
    bottom: 5px;
    color: #77828d;
    font: 700 17px/1 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  }

  :root[data-theme="edc-field-notebook"] .calendar-month-cell > strong {
    position: absolute;
    top: 7px;
    right: 10px;
    min-width: 31px;
    padding: 3px 5px;
    border: 1px solid #77828d;
    background: #252b2e;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    text-align: center;
  }

  :root[data-theme="edc-field-notebook"] body[data-page="calendar"] :is(
    .mini-event,
    .calendar-agenda-row,
    .calendar-search-result
  ) {
    position: relative;
    margin-top: 9px;
    padding: 19px 10px 9px;
    border: 1px solid #687276;
    border-left: 10px solid #77828d;
    border-radius: 0;
    background: #2a3035;
    box-shadow:
      inset 0 -4px 0 rgba(0, 0, 0, 0.24),
      4px 5px 0 rgba(0, 0, 0, 0.28);
    clip-path: polygon(0 0, 96% 0, 100% 8px, 100% 100%, 0 100%);
  }

  :root[data-theme="edc-field-notebook"] body[data-page="calendar"] :is(
    .mini-event,
    .calendar-agenda-row,
    .calendar-search-result
  )::before {
    content: "EQUIPMENT TAG";
    position: absolute;
    top: 3px;
    left: 9px;
    color: #b7b4ac;
    font: 800 8px/1 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    letter-spacing: 0.12em;
  }

  :root[data-theme="edc-field-notebook"] .event-source-badge {
    border: 1px dashed currentColor;
    border-radius: 0;
    box-shadow: none;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  }

  :root[data-theme="edc-field-notebook"] :is(
    .primary-action,
    .secondary-button,
    .filter-button,
    .provider-button
  ) {
    min-height: 46px;
    border-radius: 0;
    box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.28);
    clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    text-transform: uppercase;
  }
}

/*
 * Obsidian Ledger Luxury Pass V2
 *
 * Executive black glass only. This layer deliberately removes the utility
 * hardware language used by EDC and reduces visible borders in favor of
 * reflection, shadow, spacing, and material depth.
 */
@media screen {
  :root[data-theme="obsidian-ledger"] body,
  :root[data-theme="obsidian-ledger"] .main {
    background:
      radial-gradient(ellipse at 82% -12%, rgba(186, 132, 72, 0.14), transparent 34%),
      radial-gradient(ellipse at 24% 18%, rgba(255, 255, 255, 0.055), transparent 29%),
      linear-gradient(145deg, #0d0e10 0%, #15171a 48%, #090a0c 100%);
  }

  :root[data-theme="obsidian-ledger"] .sidebar {
    border: 0;
    background:
      linear-gradient(155deg, rgba(255, 255, 255, 0.055), transparent 28%),
      linear-gradient(180deg, rgba(25, 27, 30, 0.98), rgba(8, 9, 11, 0.99));
    box-shadow:
      28px 0 90px rgba(0, 0, 0, 0.55),
      inset -1px 0 0 rgba(193, 138, 77, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(30px) saturate(115%);
  }

  :root[data-theme="obsidian-ledger"] .brand {
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(193, 138, 77, 0.24);
  }

  :root[data-theme="obsidian-ledger"] .brand-mark {
    border: 0;
    background:
      radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.16), transparent 36%),
      #17191c;
    box-shadow:
      0 16px 32px rgba(0, 0, 0, 0.42),
      inset 0 0 0 1px rgba(193, 138, 77, 0.22);
  }

  :root[data-theme="obsidian-ledger"] .nav-list {
    gap: 10px;
  }

  :root[data-theme="obsidian-ledger"] .nav-item {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  :root[data-theme="obsidian-ledger"] .nav-item:hover {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.07), transparent);
  }

  :root[data-theme="obsidian-ledger"] .nav-item.active {
    border: 0;
    background:
      linear-gradient(90deg, rgba(193, 138, 77, 0.2), rgba(255, 255, 255, 0.055) 52%, transparent);
    box-shadow:
      0 18px 38px rgba(0, 0, 0, 0.3),
      inset 3px 0 0 #c18a4d,
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.18);
  }

  :root[data-theme="obsidian-ledger"] :is(.theme-explorer, .side-panel) {
    border: 0;
    background: rgba(255, 255, 255, 0.045);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 16px 32px rgba(0, 0, 0, 0.22);
  }

  :root[data-theme="obsidian-ledger"] body[data-page="calendar"] .calendar-page {
    border: 0;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.07), transparent 24%),
      linear-gradient(180deg, rgba(31, 34, 38, 0.96), rgba(16, 18, 21, 0.98));
    box-shadow:
      0 70px 150px rgba(0, 0, 0, 0.58),
      0 22px 54px rgba(0, 0, 0, 0.36),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(34px) saturate(115%);
  }

  :root[data-theme="obsidian-ledger"] .calendar-header {
    border: 0;
    padding-bottom: 24px;
    background:
      linear-gradient(90deg, #c18a4d 0 68px, rgba(193, 138, 77, 0.16) 68px 100%) bottom / 100% 1px no-repeat;
  }

  :root[data-theme="obsidian-ledger"] .calendar-header h2 {
    font-weight: 480;
    letter-spacing: 0.055em;
  }

  :root[data-theme="obsidian-ledger"] .calendar-monitoring-strip {
    border: 0;
    background:
      linear-gradient(110deg, rgba(255, 255, 255, 0.07), transparent 32%),
      rgba(10, 12, 14, 0.72);
    box-shadow:
      0 24px 52px rgba(0, 0, 0, 0.38),
      inset 0 1px 0 rgba(255, 255, 255, 0.09),
      inset 0 -1px 0 rgba(193, 138, 77, 0.18);
    backdrop-filter: blur(28px);
  }

  :root[data-theme="obsidian-ledger"] :is(
    .calendar-navigation,
    .calendar-evidence-card,
    .snapshot-section,
    .evidence-timeline,
    .source-classification,
    .trust-integrity-section,
    .advanced-audit,
    .advanced-audit-content,
    .sync-control-center,
    .provider-sync-drawer-body,
    .sync-provider-card,
    .snapshot-fact,
    .empty-state,
    .provider-sync-drawer > summary,
    .calendar-setup-panel > summary,
    dialog
  ) {
    border-color: transparent;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.065), transparent 28%),
      rgba(24, 27, 31, 0.9);
    box-shadow:
      0 30px 70px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  :root[data-theme="obsidian-ledger"] .calendar-month-grid {
    gap: 14px;
    padding: 16px 4px 24px;
  }

  :root[data-theme="obsidian-ledger"] body[data-page="calendar"] .calendar-month-cell {
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: 24px;
    background:
      radial-gradient(circle at 18% 5%, rgba(255, 255, 255, 0.1), transparent 34%),
      linear-gradient(155deg, rgba(43, 47, 53, 0.94), rgba(17, 20, 24, 0.96));
    box-shadow:
      0 28px 58px rgba(0, 0, 0, 0.48),
      0 8px 20px rgba(0, 0, 0, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      inset 0 -18px 30px rgba(0, 0, 0, 0.13);
    transform: translateY(-3px);
  }

  :root[data-theme="obsidian-ledger"] body[data-page="calendar"] .calendar-month-cell::before {
    content: "";
    position: absolute;
    inset: 0 18px auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c18a4d 22%, #d6b073 50%, #c18a4d 78%, transparent);
    box-shadow: 0 0 14px rgba(193, 138, 77, 0.34);
  }

  :root[data-theme="obsidian-ledger"] body[data-page="calendar"] .calendar-month-cell::after {
    content: "";
    position: absolute;
    inset: 1px 0 auto;
    height: 42%;
    border-radius: 24px 24px 55% 55%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent);
    pointer-events: none;
  }

  :root[data-theme="obsidian-ledger"] body[data-page="calendar"] .calendar-month-cell.empty {
    opacity: 0.3;
    transform: translateY(1px) scale(0.98);
    box-shadow:
      0 18px 40px rgba(0, 0, 0, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  :root[data-theme="obsidian-ledger"] .calendar-month-cell > strong {
    border: 0;
    background:
      radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.14), transparent 40%),
      rgba(10, 12, 14, 0.52);
    box-shadow:
      0 14px 30px rgba(0, 0, 0, 0.42),
      inset 0 0 0 1px rgba(193, 138, 77, 0.28);
  }

  :root[data-theme="obsidian-ledger"] body[data-page="calendar"] :is(
    .mini-event,
    .calendar-agenda-row,
    .calendar-search-result
  ) {
    overflow: hidden;
    padding: 12px 13px;
    border: 0;
    border-radius: 17px;
    background:
      linear-gradient(125deg, rgba(255, 255, 255, 0.13), transparent 35%),
      linear-gradient(180deg, rgba(55, 60, 67, 0.97), rgba(24, 27, 31, 0.99));
    box-shadow:
      0 20px 38px rgba(0, 0, 0, 0.48),
      0 0 26px rgba(193, 138, 77, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.14),
      inset 3px 0 0 rgba(193, 138, 77, 0.7);
    transform: translateY(-2px);
  }

  :root[data-theme="obsidian-ledger"] body[data-page="calendar"] :is(
    .mini-event,
    .calendar-agenda-row,
    .calendar-search-result
  )::after {
    content: none;
  }

  :root[data-theme="obsidian-ledger"] body[data-page="calendar"] :is(
    .mini-event.source-shared,
    .calendar-agenda-row.source-shared,
    .calendar-search-result.source-shared
  ) {
    background:
      linear-gradient(125deg, rgba(222, 184, 116, 0.14), transparent 38%),
      linear-gradient(180deg, #41372c, #241f1a);
    box-shadow:
      0 20px 38px rgba(0, 0, 0, 0.48),
      0 0 28px rgba(193, 138, 77, 0.14),
      inset 0 1px 0 rgba(255, 239, 205, 0.12),
      inset 3px 0 0 #c18a4d;
  }

  :root[data-theme="obsidian-ledger"] body[data-page="calendar"] :is(
    .mini-event.source-neverlost,
    .calendar-agenda-row.source-neverlost,
    .calendar-search-result.source-neverlost,
    .mini-event.source-milestone,
    .calendar-agenda-row.source-milestone,
    .calendar-search-result.source-milestone
  ) {
    background:
      linear-gradient(125deg, rgba(76, 151, 126, 0.13), transparent 38%),
      linear-gradient(180deg, #273a34, #18231f);
    box-shadow:
      0 20px 38px rgba(0, 0, 0, 0.48),
      0 0 24px rgba(65, 141, 116, 0.12),
      inset 0 1px 0 rgba(214, 255, 241, 0.1),
      inset 3px 0 0 #438e76;
  }

  :root[data-theme="obsidian-ledger"] body[data-page="calendar"] :is(
    .mini-event.source-removed,
    .calendar-agenda-row.source-removed,
    .calendar-search-result.source-removed,
    .mini-event.removed-event
  ) {
    background:
      linear-gradient(125deg, rgba(141, 61, 70, 0.16), transparent 40%),
      linear-gradient(180deg, #3a2228, #201417);
    box-shadow:
      0 20px 38px rgba(0, 0, 0, 0.48),
      0 0 22px rgba(112, 38, 46, 0.12),
      inset 0 1px 0 rgba(255, 220, 224, 0.08),
      inset 3px 0 0 #7f3740;
  }

  :root[data-theme="obsidian-ledger"] .event-source-badge {
    border: 0;
    background: rgba(0, 0, 0, 0.36);
    color: #f2efe9;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      0 5px 12px rgba(0, 0, 0, 0.2);
  }

  :root[data-theme="obsidian-ledger"] .badge-shared {
    background: rgba(193, 138, 77, 0.22);
    color: #efd5a8;
  }

  :root[data-theme="obsidian-ledger"] :is(.badge-neverlost, .badge-life-proof, .badge-milestone) {
    background: rgba(67, 142, 118, 0.2);
    color: #bfe0d5;
  }

  :root[data-theme="obsidian-ledger"] .calendar-change-review {
    position: relative;
    overflow: hidden;
    padding: 26px 28px;
    border: 0;
    background:
      radial-gradient(circle at 92% 0%, rgba(193, 138, 77, 0.12), transparent 34%),
      linear-gradient(150deg, rgba(255, 255, 255, 0.075), transparent 30%),
      #171a1e;
    box-shadow:
      0 38px 86px rgba(0, 0, 0, 0.46),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }

  :root[data-theme="obsidian-ledger"] .calendar-change-review::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(#7a532c, #d6b073 45%, #7a532c);
    box-shadow: 0 0 18px rgba(193, 138, 77, 0.35);
  }

  :root[data-theme="obsidian-ledger"] :is(
    .calendar-change-group,
    .calendar-change-alert
  ) {
    border: 0;
    background: rgba(255, 255, 255, 0.035);
    box-shadow:
      0 18px 40px rgba(0, 0, 0, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.055);
  }

  :root[data-theme="obsidian-ledger"] :is(
    .primary-action,
    .secondary-button,
    .filter-button,
    .provider-button,
    .item-action
  ) {
    border: 0;
    border-radius: 999px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
      #1a1d21;
    color: #f3f1ec;
    box-shadow:
      0 16px 34px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      inset 0 0 0 1px rgba(193, 138, 77, 0.18);
  }

  :root[data-theme="obsidian-ledger"] :is(
    .primary-action,
    .secondary-button,
    .filter-button,
    .provider-button,
    .item-action
  ):hover {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(193, 138, 77, 0.06)),
      #1c1f23;
    box-shadow:
      0 18px 38px rgba(0, 0, 0, 0.44),
      0 0 22px rgba(193, 138, 77, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.15),
      inset 0 0 0 1px rgba(193, 138, 77, 0.35);
  }

  :root[data-theme="obsidian-ledger"] .primary-action {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(193, 138, 77, 0.05)),
      #111315;
    box-shadow:
      0 18px 38px rgba(0, 0, 0, 0.48),
      0 0 20px rgba(193, 138, 77, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.14),
      inset 0 0 0 1px rgba(193, 138, 77, 0.42);
  }

  :root[data-theme="obsidian-ledger"] :is(
    .danger-action,
    .badge-removed,
    .removed-event-badge
  ) {
    background: linear-gradient(180deg, #49262d, #26161a);
    color: #f3dedf;
    box-shadow:
      0 12px 24px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
}

@media (max-width: 900px) {
  .story-thread-form,
  .story-thread-facts,
  .story-thread-linked,
  .story-thread-timeline-row {
    grid-template-columns: 1fr;
  }

  .story-thread-form label:nth-of-type(2) {
    grid-column: auto;
  }

  .calendar-change-alert {
    grid-template-columns: 1fr;
  }

  .calendar-change-timestamps,
  .calendar-review-actions {
    grid-column: 1;
    grid-row: auto;
    min-width: 0;
  }

  .calendar-change-timestamps {
    grid-template-columns: 1fr;
  }

  .calendar-review-dialog-actions #openFullCalendarEvent {
    margin-left: 0;
  }

  .related-trails-heading,
  .related-trail-record {
    align-items: stretch;
    flex-direction: column;
  }
}

.attached-evidence-card .evidence-card-title,
.attached-evidence-card .evidence-card-note,
.evidence-metadata-list dd,
.evidence-timeline .lifecycle-entry strong,
.evidence-timeline .lifecycle-entry p,
.event-lineage-entry strong,
.event-lineage-entry p {
  color: var(--ink);
}

.evidence-timeline .lifecycle-entry time,
.event-lineage-entry time {
  color: var(--midnight);
}

:root[data-theme="obsidian-ledger"] .attached-evidence-card .evidence-card-title,
:root[data-theme="obsidian-ledger"] .attached-evidence-card .evidence-card-note,
:root[data-theme="obsidian-ledger"] .evidence-metadata-list dd,
:root[data-theme="obsidian-ledger"] .evidence-timeline .lifecycle-entry strong,
:root[data-theme="obsidian-ledger"] .evidence-timeline .lifecycle-entry p,
:root[data-theme="obsidian-ledger"] .event-lineage-entry strong,
:root[data-theme="obsidian-ledger"] .event-lineage-entry p,
:root[data-theme="edc-field-notebook"] .attached-evidence-card .evidence-card-title,
:root[data-theme="edc-field-notebook"] .attached-evidence-card .evidence-card-note,
:root[data-theme="edc-field-notebook"] .evidence-metadata-list dd,
:root[data-theme="edc-field-notebook"] .evidence-timeline .lifecycle-entry strong,
:root[data-theme="edc-field-notebook"] .evidence-timeline .lifecycle-entry p,
:root[data-theme="edc-field-notebook"] .event-lineage-entry strong,
:root[data-theme="edc-field-notebook"] .event-lineage-entry p {
  color: #f5f3ee;
}

:root[data-theme="obsidian-ledger"] .evidence-timeline .lifecycle-entry time,
:root[data-theme="obsidian-ledger"] .event-lineage-entry time,
:root[data-theme="edc-field-notebook"] .evidence-timeline .lifecycle-entry time,
:root[data-theme="edc-field-notebook"] .event-lineage-entry time {
  color: #d7c8a6;
}

/* UX-011 Calendar Date Visibility: dates are the primary calendar scanning target. */
body[data-page="calendar"] .calendar-month-cell > strong {
  position: relative;
  z-index: 6;
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  min-height: 46px;
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 34px;
  font-weight: 1000;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: none;
}

body[data-page="calendar"] .calendar-month-cell.clickable-day-cell:hover > strong,
body[data-page="calendar"] .calendar-month-cell.clickable-day-cell:focus-visible > strong {
  transform: scale(1.04);
}

:root[data-theme="axiom-one"] body[data-page="calendar"] .calendar-month-cell > strong {
  min-width: 42px;
  min-height: 40px;
  color: #172126;
  font-size: 32px;
  font-weight: 950;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(20, 35, 45, 0.08);
}

:root[data-theme="obsidian-ledger"] body[data-page="calendar"] .calendar-month-cell::before {
  opacity: 0.38;
}

:root[data-theme="obsidian-ledger"] body[data-page="calendar"] .calendar-month-cell::after {
  opacity: 0.34;
}

:root[data-theme="obsidian-ledger"] body[data-page="calendar"] .calendar-month-cell > strong {
  width: 54px;
  height: 54px;
  min-width: 54px;
  min-height: 54px;
  margin-bottom: 14px;
  color: #fff8e8;
  font-size: 34px;
  font-weight: 1000;
  border: 1px solid rgba(214, 176, 115, 0.46);
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.2), transparent 38%),
    linear-gradient(145deg, rgba(46, 52, 59, 0.92), rgba(9, 11, 14, 0.84));
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(193, 138, 77, 0.22);
  text-shadow: 0 2px 16px rgba(214, 176, 115, 0.24);
}

:root[data-theme="living-record"] body[data-page="calendar"] .calendar-month-cell:not(.empty)::before {
  width: 36px;
  height: 10px;
  opacity: 0.42;
}

:root[data-theme="living-record"] body[data-page="calendar"] .calendar-month-cell > strong {
  min-width: 48px;
  min-height: 44px;
  color: #263c30;
  font-size: 34px;
  font-weight: 950;
  border-radius: 18px 8px 18px 8px;
  background: rgba(255, 253, 248, 0.78);
  box-shadow: 0 8px 18px rgba(74, 61, 38, 0.1);
}

:root[data-theme="axiom-archive"] body[data-page="calendar"] .calendar-month-cell {
  padding-top: 46px;
}

:root[data-theme="axiom-archive"] body[data-page="calendar"] .calendar-month-cell::before {
  top: 6px;
  left: 38%;
  font-size: 8px;
  opacity: 0.42;
}

:root[data-theme="axiom-archive"] body[data-page="calendar"] .calendar-month-cell > strong {
  top: 17px;
  right: 12px;
  min-width: 54px;
  min-height: 46px;
  padding: 5px 9px;
  color: #241b12;
  font-size: 34px;
  font-weight: 1000;
  background: rgba(255, 250, 238, 0.82);
  border: 3px solid #5f513f;
  box-shadow: 2px 3px 0 rgba(98, 79, 55, 0.18);
}

:root[data-theme="edc-field-notebook"] body[data-page="calendar"] .calendar-month-cell {
  padding-top: 48px;
}

:root[data-theme="edc-field-notebook"] body[data-page="calendar"] .calendar-month-cell::before {
  top: 9px;
  padding: 2px 5px;
  font-size: 8px;
  opacity: 0.38;
}

:root[data-theme="edc-field-notebook"] body[data-page="calendar"] .calendar-month-cell::after {
  opacity: 0.28;
}

:root[data-theme="edc-field-notebook"] body[data-page="calendar"] .calendar-month-cell > strong {
  top: 9px;
  right: 9px;
  min-width: 52px;
  min-height: 42px;
  padding: 4px 8px;
  color: #f7f2df;
  font-size: 32px;
  font-weight: 1000;
  border: 2px solid #a67c2d;
  background: linear-gradient(180deg, #2f3738, #1d2426);
  box-shadow:
    0 8px 0 rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(246, 211, 148, 0.14);
}

:root[data-theme] .calendar-change-report-dialog .calendar-change-report-header h2,
:root[data-theme] .calendar-change-report-dialog .calendar-change-report-header p,
:root[data-theme] .calendar-change-report-dialog .calendar-change-report-header .event-review-brand strong {
  color: #132c3b;
}

:root[data-theme] .calendar-change-report-dialog .calendar-change-report-header .event-review-brand span,
:root[data-theme] .calendar-change-report-dialog .calendar-change-report-header > div > p:last-child {
  color: #53646f;
}

:root[data-theme] .calendar-change-report-dialog .calendar-change-report-filters h3 {
  color: #172c3a;
  text-shadow: none;
}

:root[data-theme] .calendar-change-report-dialog .change-report-page,
:root[data-theme] .calendar-change-report-dialog .change-report-page p,
:root[data-theme] .calendar-change-report-dialog .change-report-page dd,
:root[data-theme] .calendar-change-report-dialog .change-report-page strong {
  color: #142632;
}

:root[data-theme] .calendar-change-report-dialog .change-report-page h1,
:root[data-theme] .calendar-change-report-dialog .change-report-page h2,
:root[data-theme] .calendar-change-report-dialog .change-report-page h3 {
  color: #132c3b;
  text-shadow: none;
}

:root[data-theme] .calendar-change-report-dialog .change-report-page dt,
:root[data-theme] .calendar-change-report-dialog .change-report-page small {
  color: #536670;
}

@media print {
  .evidence-sort-control,
  .manual-order-actions,
  .manual-order-number {
    display: none !important;
  }
  @page {
    margin: 0.6in;
    size: letter portrait;
  }

  html,
  body {
    --midnight: #111820;
    --ivory: #ffffff;
    --evidence-gold: #8a6822;
    --signal-teal: #315f66;
    --alert-red: #8d2f32;
    --paper: #ffffff;
    --wash: #ffffff;
    --line: #c9ced1;
    --line-strong: #8e989e;
    background: #fff !important;
    color: #111820 !important;
    color-scheme: light;
    font-size: 11pt;
    print-color-adjust: exact;
  }

  :root[data-theme] {
    --midnight: #111820;
    --ivory: #ffffff;
    --evidence-gold: #8a6822;
    --signal-teal: #315f66;
    --alert-red: #8d2f32;
    --ink: #111820;
    --muted: #4f5960;
    --paper: #ffffff;
    --wash: #ffffff;
    --line: #c9ced1;
    --line-strong: #8e989e;
  }

  .sidebar,
  .ui-build-marker,
  .calendar-page > :not(.calendar-change-review),
  .calendar-change-heading .eyebrow,
  .calendar-change-heading p,
  .calendar-change-toolbar,
  .calendar-review-status,
  .calendar-review-actions,
  .calendar-review-dialog {
    display: none !important;
  }

  .app-shell,
  .main,
  body[data-page="calendar"] .main,
  body[data-page="calendar"] .calendar-page {
    display: block;
    margin: 0;
    max-width: none;
    padding: 0;
    width: 100%;
  }

  .calendar-change-review {
    background: #fff !important;
    border: 0;
    display: block;
    margin: 0;
    max-width: 7.3in;
    padding: 0;
    width: 100%;
  }

  .calendar-change-print-header {
    border-bottom: 3px solid #203b4d;
    display: grid;
    gap: 3px;
    margin-bottom: 18px;
    padding-bottom: 10px;
  }

  .calendar-change-print-header strong {
    font-size: 24pt;
  }

  .calendar-change-print-header span {
    font-size: 16pt;
    font-weight: 700;
  }

  .calendar-change-print-header time {
    font-size: 11pt;
  }

  .calendar-change-heading {
    display: block;
    margin-bottom: 12px;
  }

  .calendar-change-heading h3 {
    font-size: 20pt;
  }

  .calendar-change-list {
    display: block;
  }

  .calendar-change-body,
  .calendar-change-body[hidden] {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0;
  }

  .calendar-change-group {
    break-inside: auto;
    display: block !important;
    margin-bottom: 12px;
    overflow: visible;
  }

  .calendar-change-group-heading {
    background: #e4e9ec !important;
    break-after: avoid;
    color: #111820 !important;
    print-color-adjust: exact;
  }

  .calendar-change-group-heading h4 {
    font-size: 16pt;
  }

  .calendar-change-set {
    break-inside: auto;
    display: block;
  }

  .calendar-change-set-heading {
    background: #f2f4f5 !important;
    padding: 6px 8px;
  }

  .calendar-change-set-heading strong {
    font-size: 12pt;
  }

  .calendar-change-set-heading span,
  .calendar-change-set-heading time {
    font-size: 9.5pt;
  }

  .calendar-change-alert {
    background: #fff !important;
    break-inside: avoid;
    break-after: auto;
    display: grid !important;
    gap: 5px 12px;
    grid-template-columns: minmax(190px, 1.1fr) minmax(130px, 0.65fr);
    padding: 6px 8px;
  }

  .calendar-change-audit-table {
    display: block;
  }

  .calendar-change-alert.unread {
    background: #fff !important;
    box-shadow: inset 4px 0 0 #6e1c24;
    print-color-adjust: exact;
  }

  .calendar-change-primary strong {
    font-size: 12pt;
  }

  .calendar-change-alert > span,
  .calendar-change-event-time,
  .calendar-change-source > span:last-child,
  .calendar-change-timestamps span {
    font-size: 9.5pt;
  }

  .calendar-change-timestamps {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .event-source-badge {
    border: 1px solid #273945;
    color: #111820 !important;
    print-color-adjust: exact;
  }

  body.printing-calendar-event-review .calendar-change-review {
    display: none !important;
  }

  body.printing-calendar-event-review .calendar-review-dialog {
    border: 0;
    box-shadow: none;
    display: block !important;
    height: auto;
    max-height: none;
    max-width: none;
    overflow: visible;
    padding: 0;
    position: static;
    width: 100%;
  }

  body.printing-calendar-event-review .calendar-review-dialog-header {
    display: none !important;
  }

  body.printing-calendar-event-review .calendar-review-dialog-header h2 {
    font-size: 22pt;
  }

  body.printing-calendar-event-review .calendar-review-dialog-header > button,
  body.printing-calendar-event-review .calendar-review-dialog-actions,
  body.printing-calendar-event-review .print-settings-note {
    display: none !important;
  }

  body.printing-calendar-event-review .calendar-review-snapshot {
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
    padding: 9px 0 0;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-only-section {
    display: block;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .evidence-header,
  body.printing-calendar-event-review .calendar-review-snapshot .snapshot-section,
  body.printing-calendar-event-review .calendar-review-snapshot .evidence-timeline,
  body.printing-calendar-event-review .calendar-review-snapshot .source-classification,
  body.printing-calendar-event-review .calendar-review-snapshot .removed-story {
    margin: 0 0 8px;
    padding: 10px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .evidence-header {
    display: none !important;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .report-cover-page {
    order: 1;
    break-after: page;
    page-break-after: always;
    border: 0;
    min-height: 0;
    display: block;
    padding: 0.35in 0.22in;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-cover-topline {
    border-bottom: 3px solid #203b4d;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 34px;
    padding-bottom: 10px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-cover-topline strong {
    color: #111820;
    font-size: 19pt;
    letter-spacing: 0.02em;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-cover-topline span,
  body.printing-calendar-event-review .calendar-review-snapshot .report-cover-source-stack,
  body.printing-calendar-event-review .calendar-review-snapshot .report-cover-purpose {
    color: #4f5f69;
    font-size: 12pt;
    line-height: 1.45;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-cover-source-stack {
    color: #203b4d;
    display: grid;
    gap: 3px;
    font-size: 15pt;
    font-weight: 850;
    margin: 0 0 22px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-cover-source-stack span {
    display: block;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-cover-event-date {
    color: #203b4d;
    font-size: 34pt;
    font-weight: 950;
    letter-spacing: 0.08em;
    line-height: 1.05;
    margin: 0 0 10px;
    text-transform: uppercase;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-cover-scheduled-time {
    color: #111820;
    font-size: 28pt;
    font-weight: 950;
    line-height: 1.08;
    margin: 0 0 4px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-cover-scheduled-label {
    color: #4f5f69;
    font-size: 16pt;
    font-weight: 850;
    margin: 0 0 20px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .report-cover-page h4 {
    color: #111820;
    font-size: 25pt;
    line-height: 1.14;
    margin: 0 0 14px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .report-event-summary {
    order: 2;
    break-after: avoid;
    page-break-after: avoid;
    border-top: 5px solid #203b4d;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .suggested-trail-section {
    display: grid !important;
    order: 5;
    break-before: avoid;
    page-break-before: avoid;
    break-after: avoid;
    page-break-after: avoid;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .report-calendar-day-context {
    order: 3;
    break-before: auto;
    page-break-before: avoid;
    break-after: avoid;
    page-break-after: avoid;
    break-inside: avoid;
    min-height: 1.25in;
    page-break-inside: avoid;
    border-left: 5px solid #9b6a21;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-nowrap,
  body.printing-calendar-event-review .calendar-review-snapshot time,
  body.printing-calendar-event-review .calendar-review-snapshot .report-exhibit-timestamp,
  body.printing-calendar-event-review .calendar-review-snapshot .snapshot-fact dd {
    white-space: nowrap;
    word-break: keep-all;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .report-calendar-changes-summary {
    order: 4;
    break-before: avoid;
    page-break-before: avoid;
    break-after: avoid;
    page-break-after: avoid;
    break-inside: avoid;
    page-break-inside: avoid;
    border-left: 5px solid #203b4d;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .evidence-summary-section {
    display: none !important;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .evidence-overview {
    display: none !important;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .report-evidence-overview {
    display: none !important;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .incident-summaries-linked-section {
    display: none !important;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .source-classification {
    display: none !important;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .source-proof-compact,
  body.printing-calendar-event-review .calendar-review-snapshot > .built-in-proof-story,
  body.printing-calendar-event-review .calendar-review-snapshot > .calendar-context-story {
    display: none !important;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .change-review-status {
    display: none !important;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .connected-evidence-section {
    display: none !important;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .report-evidence-gallery {
    display: none !important;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .proof-lifecycle {
    display: none !important;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .event-lineage {
    display: none !important;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .related-trails-section {
    display: none !important;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .report-full-evidence-pages {
    display: none !important;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .attached-evidence-section:not(.report-full-evidence-pages) {
    order: 5;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .trust-integrity-section {
    display: none !important;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .report-chain-of-custody {
    display: none !important;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .report-record-change-summary {
    display: none !important;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .report-incident-summary-packet,
  body.printing-calendar-event-review .calendar-review-snapshot > .report-unlinked-supporting-evidence {
    order: 6;
    break-before: page;
    page-break-before: always;
    break-inside: auto;
    page-break-inside: auto;
    border-top: 4px solid #203b4d;
    margin-top: 12px;
    padding-top: 10px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .report-event-summary,
  body.printing-calendar-event-review .calendar-review-snapshot > .report-calendar-day-context,
  body.printing-calendar-event-review .calendar-review-snapshot > .report-calendar-changes-summary,
  body.printing-calendar-event-review .calendar-review-snapshot > .report-incident-summary-packet,
  body.printing-calendar-event-review .calendar-review-snapshot > .report-unlinked-supporting-evidence,
  body.printing-calendar-event-review .calendar-review-snapshot > .report-verification-appendix {
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    max-width: 7.1in;
    width: 100%;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-day-context-list {
    display: grid;
    gap: 6px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-day-context-list article {
    align-items: center;
    border: 1px solid #d2c6ae;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) 0.9in 1.15in;
    padding: 7px 9px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-day-context-list strong {
    color: #111820;
    font-size: 11.5pt;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-day-context-list span,
  body.printing-calendar-event-review .calendar-review-snapshot .report-day-context-list time {
    color: #4f5f69;
    font-size: 9.8pt;
    font-weight: 800;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-calendar-change-list {
    display: grid;
    gap: 6px;
    margin-top: 8px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-calendar-event-change-list {
    display: grid;
    gap: 8px;
    margin-top: 8px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-calendar-event-change-card {
    background: #fff !important;
    border: 1px solid #c8d0d6;
    border-left: 6px solid #9eaab2;
    break-inside: avoid;
    display: grid;
    gap: 7px;
    page-break-inside: avoid;
    padding: 9px 11px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-calendar-event-change-card.status-removed {
    border-left-color: #a74949;
    box-shadow: inset 0 0 0 1px rgba(167, 73, 73, 0.16);
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-calendar-event-change-card.status-active {
    border-left-color: #203b4d;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-calendar-event-change-card.status-changed {
    border-left-color: #9b6a21;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-calendar-event-change-card > header {
    align-items: center;
    border-bottom: 1px solid #dce3e8;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding-bottom: 5px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-calendar-event-change-card > header strong {
    color: #111820;
    font-size: 13pt;
    font-weight: 950;
    letter-spacing: 0.03em;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-change-status {
    border: 1px solid #9eaab2;
    color: #203b4d;
    font-size: 9.5pt;
    font-weight: 950;
    letter-spacing: 0.06em;
    padding: 3px 7px;
    text-transform: uppercase;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-change-status.status-removed {
    background: #f7e6e6 !important;
    border-color: #a74949;
    color: #8f3232;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-change-status.status-active {
    background: #edf3f6 !important;
    border-color: #203b4d;
    color: #203b4d;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-change-status.status-changed {
    background: #fff4da !important;
    border-color: #9b6a21;
    color: #7a4e12;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-change-card-section {
    display: grid;
    gap: 4px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-change-card-section > b {
    color: #203b4d;
    font-size: 9.5pt;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-change-card-section > span,
  body.printing-calendar-event-review .calendar-review-snapshot .report-change-card-section > time {
    color: #111820;
    font-size: 11pt;
    font-weight: 760;
    line-height: 1.28;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-change-card-section.scheduled-event time {
    display: grid;
    gap: 1px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-change-history {
    border-left: 3px solid #d2c6ae;
    display: grid;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0 0 0 10px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-change-history li {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) minmax(1.78in, 1.9in);
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-change-history span,
  body.printing-calendar-event-review .calendar-review-snapshot .report-change-history time {
    color: #111820;
    font-size: 10.4pt;
    line-height: 1.25;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-change-history span {
    font-weight: 850;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-change-history time {
    color: #4f5f69;
    font-weight: 760;
    text-align: right;
    white-space: nowrap;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-calendar-event-change-card .report-change-diffs {
    margin-top: 0;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-calendar-change-entry {
    align-items: start;
    border: 1px solid #c8d0d6;
    break-inside: avoid;
    display: grid;
    gap: 8px;
    grid-template-columns: 0.95in minmax(0, 1fr);
    padding: 7px 9px;
    page-break-inside: avoid;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-calendar-change-entry strong {
    color: #203b4d;
    font-size: 11pt;
    font-weight: 900;
    text-transform: uppercase;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-calendar-change-entry div {
    display: grid;
    gap: 1px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-change-diffs {
    border-left: 3px solid #9b6a21;
    display: grid;
    gap: 5px;
    margin-top: 4px;
    padding-left: 8px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-change-diff-card,
  body.printing-calendar-event-review .calendar-review-snapshot .report-change-diff {
    color: #111820;
    font-size: 9.8pt;
    line-height: 1.25;
    margin: 0;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-change-diff-card b {
    color: #203b4d;
    display: block;
    font-size: 9.4pt;
    text-transform: uppercase;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-change-diff-card dl {
    display: grid;
    gap: 3px;
    margin: 2px 0 0;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-change-diff-card dl > div {
    display: grid;
    gap: 6px;
    grid-template-columns: 0.78in minmax(0, 1fr);
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-change-diff-card dt,
  body.printing-calendar-event-review .calendar-review-snapshot .report-change-diff-card dd {
    margin: 0;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-change-diff-card dt {
    color: #4f5f69;
    font-weight: 900;
    text-transform: uppercase;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-change-diff-card dd {
    color: #111820;
    font-weight: 750;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-removed-story {
    border-left: 3px solid #a74949;
    display: grid;
    gap: 2px;
    margin-top: 5px;
    padding-left: 8px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-removed-story p {
    color: #111820;
    font-size: 9.8pt;
    line-height: 1.25;
    margin: 0;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-calendar-change-entry span {
    color: #111820;
    font-size: 11.5pt;
    font-weight: 850;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-calendar-change-entry time,
  body.printing-calendar-event-review .calendar-review-snapshot .report-calendar-change-entry small,
  body.printing-calendar-event-review .calendar-review-snapshot .report-calendar-change-entry em {
    color: #4f5f69;
    font-size: 9.6pt;
    font-style: normal;
    font-weight: 700;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-incident-summary-packet h4,
  body.printing-calendar-event-review .calendar-review-snapshot .report-unlinked-supporting-evidence h4 {
    color: #111820;
    font-size: 18pt;
    line-height: 1.18;
    margin-bottom: 8px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-incident-narrative {
    border-left: 5px solid #9b6a21;
    color: #111820;
    font-size: 12.5pt;
    line-height: 1.48;
    margin: 8px 0 10px;
    padding: 5px 0 5px 12px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exchange-facts {
    background: #fff9ed !important;
    border: 1px solid #d9b46f;
    border-left: 6px solid #9b6a21;
    break-inside: avoid;
    display: grid;
    gap: 8px;
    margin: 8px 0 10px;
    page-break-inside: avoid;
    padding: 10px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exchange-facts h5 {
    color: #203b4d;
    font-size: 14pt;
    letter-spacing: 0.04em;
    margin: 0;
    text-transform: uppercase;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exchange-fact-grid {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exchange-fact-grid > div,
  body.printing-calendar-event-review .calendar-review-snapshot .report-exchange-summary,
  body.printing-calendar-event-review .calendar-review-snapshot .report-exchange-timeline article {
    background: #fff !important;
    border: 1px solid #ead6ad;
    padding: 7px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exchange-fact-grid dt {
    color: #6b4d16;
    font-size: 8.8pt;
    font-weight: 950;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exchange-fact-grid dd {
    color: #111820;
    font-size: 12pt;
    font-weight: 850;
    margin: 2px 0 0;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exchange-summary strong,
  body.printing-calendar-event-review .calendar-review-snapshot .report-exchange-timeline > strong {
    color: #203b4d;
    font-size: 9.5pt;
    font-weight: 950;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exchange-summary p {
    color: #111820;
    font-size: 11.5pt;
    line-height: 1.36;
    margin: 2px 0 0;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exchange-timeline {
    display: grid;
    gap: 5px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exchange-timeline article {
    break-inside: avoid;
    display: grid;
    gap: 8px;
    grid-template-columns: 0.85in minmax(0, 1fr);
    page-break-inside: avoid;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exchange-timeline time {
    color: #111820;
    font-size: 12pt;
    font-weight: 950;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exchange-timeline p,
  body.printing-calendar-event-review .calendar-review-snapshot .report-exchange-timeline li {
    color: #111820;
    font-size: 10.6pt;
    line-height: 1.25;
    margin: 0;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-supporting-exhibits {
    display: grid;
    gap: 8px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-supporting-exhibits-start {
    break-inside: avoid;
    display: grid;
    gap: 8px;
    min-height: 2.6in;
    page-break-inside: avoid;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-supporting-exhibits h5 {
    color: #203b4d;
    font-size: 14pt;
    letter-spacing: 0.04em;
    margin: 2px 0 0;
    text-transform: uppercase;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-supporting-exhibit {
    background: #fff !important;
    border: 1px solid #9eaab2;
    break-inside: avoid;
    display: block;
    overflow: hidden;
    page-break-inside: avoid;
    padding: 7px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-supporting-exhibit header {
    align-items: flex-start;
    border-bottom: 1px solid #c8d0d6;
    break-after: avoid;
    break-inside: avoid;
    display: grid;
    gap: 8px;
    grid-template-columns: 1.05in minmax(0, 1fr);
    margin-bottom: 4px;
    page-break-after: avoid;
    page-break-inside: avoid;
    padding-bottom: 4px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exhibit-label {
    background: #203b4d !important;
    color: #fff;
    display: inline-block;
    font-size: 12pt;
    font-weight: 900;
    letter-spacing: 0.04em;
    padding: 6px 8px;
    text-align: center;
    text-transform: uppercase;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-supporting-exhibit header strong {
    color: #111820;
    display: block;
    font-size: 14.5pt;
    line-height: 1.18;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exhibit-timestamp {
    color: #111820;
    font-size: 12.5pt;
    font-weight: 900;
    line-height: 1.22;
    margin: 2px 0;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-supporting-exhibit header small {
    color: #4f5f69;
    font-size: 10pt;
    font-weight: 800;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exhibit-caption {
    display: grid;
    gap: 2px;
    margin-bottom: 5px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exhibit-caption p {
    color: #111820;
    font-size: 11.8pt;
    line-height: 1.3;
    margin: 0;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exhibit-facts {
    display: grid;
    gap: 4px;
    grid-template-columns: minmax(0, 1.45fr) minmax(0.78in, 0.85fr) minmax(0, 1fr);
    margin: 3px 0 0;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exhibit-facts > div {
    border: 1px solid #dce3e8;
    min-width: 0;
    padding: 5px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exhibit-facts dt {
    color: #4f5f69;
    font-size: 8.4pt;
    font-weight: 950;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exhibit-facts dd {
    color: #111820;
    font-size: 10.2pt;
    font-weight: 800;
    margin: 1px 0 0;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exhibit-preview {
    break-inside: avoid;
    display: block;
    page-break-inside: avoid;
    width: 100%;
    color: #111820;
    text-decoration: none;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .pdf-attachment-card {
    background: #f7fafc !important;
    border: 1px solid #c8d0d6;
    border-left: 6px solid #203b4d;
    display: grid;
    gap: 4px;
    padding: 10px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .pdf-attachment-card strong {
    color: #111820;
    font-size: 13pt;
    line-height: 1.2;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .pdf-attachment-card small,
  body.printing-calendar-event-review .calendar-review-snapshot .pdf-attachment-card p,
  body.printing-calendar-event-review .calendar-review-snapshot .pdf-attachment-card em {
    color: #344054;
    font-size: 10.5pt;
    line-height: 1.28;
    margin: 0;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .pdf-attachment-card em {
    color: #203b4d;
    font-style: normal;
    font-weight: 950;
    text-decoration: underline;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .pdf-attachment-actions {
    display: flex;
    gap: 6px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .pdf-attachment-actions a,
  body.printing-calendar-event-review .calendar-review-snapshot .pdf-action-button {
    border: 1px solid #203b4d;
    color: #203b4d !important;
    display: inline-block;
    font-size: 10pt;
    font-weight: 950;
    padding: 5px 7px;
    text-decoration: none;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .pdf-action-button.download-pdf-action {
    background: #203b4d !important;
    color: #fff !important;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exhibit-preview > span {
    display: block;
    color: #203b4d;
    font-size: 10pt;
    font-weight: 900;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
    text-transform: uppercase;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exhibit-preview img {
    display: block;
    height: auto;
    margin: 0 auto;
    max-height: 4.2in;
    max-width: 50%;
    object-fit: contain;
    object-position: center top;
    width: auto;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exhibit-preview.wide-screenshot-exhibit img {
    max-height: 6.8in;
    max-width: 96%;
    width: 96%;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exhibit-preview.file-preview {
    border: 1px solid #c8d0d6;
    padding: 14px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-exhibit-preview.file-preview strong {
    display: block;
    font-size: 13pt;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .report-technical-appendix {
    order: 10;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .report-verification-appendix {
    order: 9;
    break-before: page;
    page-break-before: always;
    border-top: 5px solid #203b4d;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-verification-checks {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 8px 0 12px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-verification-checks span {
    background: #edf3f6 !important;
    border: 1px solid #c8d0d6;
    color: #203b4d;
    font-size: 10.5pt;
    font-weight: 900;
    padding: 7px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-verification-appendix h5 {
    color: #203b4d;
    font-size: 12.5pt;
    letter-spacing: 0.04em;
    margin: 12px 0 6px;
    text-transform: uppercase;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-verification-statement {
    color: #111820;
    font-size: 11.4pt;
    font-weight: 750;
    line-height: 1.4;
    margin: 10px 0 0;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .report-technical-appendix:not([open]) {
    display: none !important;
  }

  .attached-evidence-card:has(.image-preview) {
    break-inside: auto;
    page-break-inside: auto;
  }

  .attached-evidence-card:has(.image-preview) .evidence-preview {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #111820;
    text-decoration: none;
  }

  .attached-evidence-card:has(.image-preview) .print-evidence-image-label {
    display: block;
    margin: 0 0 7px;
    color: #111820;
    font-size: 10pt;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .attached-evidence-card:has(.image-preview) .evidence-preview img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 8.35in;
    margin: 0 auto;
    object-fit: contain;
    object-position: center top;
    break-inside: auto;
    page-break-inside: auto;
  }

  .attached-evidence-card:has(.image-preview) .attached-evidence-copy {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-full-evidence-pages {
    break-before: auto;
    break-inside: auto;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .attached-evidence-grid {
    display: block;
    margin-top: 8px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .attached-evidence-card {
    display: block;
    break-inside: auto;
    page-break-inside: auto;
    border: 1px solid #9eaab2;
    border-radius: 0;
    background: #fff !important;
    margin: 0 0 16px;
    padding: 10px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .attached-evidence-card:has(.image-preview) {
    break-before: page;
    page-break-before: always;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .attached-evidence-card:has(.image-preview) .evidence-preview {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #111820;
    text-decoration: none;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .attached-evidence-card:has(.image-preview) .print-evidence-image-label {
    display: block;
    margin: 0 0 7px;
    color: #111820;
    font-size: 10pt;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .attached-evidence-card:has(.image-preview) .evidence-preview img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 8.35in;
    margin: 0 auto;
    object-fit: contain;
    object-position: center top;
    break-inside: auto;
    page-break-inside: auto;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .attached-evidence-card:has(.image-preview) .attached-evidence-copy {
    display: grid;
    gap: 3px;
    margin: 8px 0 0;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .attached-evidence-card:has(.image-preview) .attached-evidence-copy strong {
    font-size: 13pt;
    line-height: 1.25;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .attached-evidence-card:has(.image-preview) .attached-evidence-copy span,
  body.printing-calendar-event-review .calendar-review-snapshot .attached-evidence-card:has(.image-preview) .attached-evidence-copy p {
    font-size: 9.5pt;
    line-height: 1.35;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-full-evidence-card .evidence-card-note {
    border-left: 4px solid #9b6a21;
    background: #fff8e8 !important;
    color: #111820;
    font-size: 12pt;
    line-height: 1.45;
    margin: 3px 0 2px;
    padding: 7px 9px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-full-evidence-card .report-evidence-number {
    color: #203b4d;
    display: block;
    font-size: 10.5pt;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-full-evidence-card .evidence-card-note span {
    display: block;
    color: #4f5f69;
    font-size: 8.6pt;
    font-weight: 900;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
    text-transform: uppercase;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-full-evidence-card .evidence-metadata-list {
    display: grid;
    grid-template-columns: 1.55in minmax(0, 1fr);
    gap: 3px 8px;
    margin: 5px 0;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-full-evidence-card .evidence-metadata-list dt,
  body.printing-calendar-event-review .calendar-review-snapshot .report-full-evidence-card .evidence-card-submeta {
    color: #596772;
    font-size: 8.6pt;
    font-weight: 700;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-full-evidence-card .evidence-metadata-list dd {
    color: #111820;
    font-size: 9.2pt;
    font-weight: 800;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-full-evidence-card .evidence-security-status {
    color: #145d56;
    font-size: 9.5pt;
    font-weight: 850;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .attached-evidence-card:has(.image-preview) .evidence-detach-button {
    display: none !important;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .advanced-audit {
    order: 10;
  }

  body.printing-calendar-event-review .calendar-review-snapshot > .snapshot-proof-note,
  body.printing-calendar-event-review .calendar-review-snapshot > .removal-section {
    display: none !important;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .snapshot-title {
    font-size: 20pt;
  }

  body.printing-calendar-event-review .calendar-review-snapshot h4,
  body.printing-calendar-event-review .calendar-review-snapshot .snapshot-section h4,
  body.printing-calendar-event-review .calendar-review-snapshot .evidence-timeline h4 {
    font-size: 13pt;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .snapshot-fact,
  body.printing-calendar-event-review .calendar-review-snapshot .snapshot-description,
  body.printing-calendar-event-review .calendar-review-snapshot .timeline-entry,
  body.printing-calendar-event-review .calendar-review-snapshot p {
    font-size: 10pt;
    line-height: 1.35;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .evidence-card-grid,
  body.printing-calendar-event-review .calendar-review-snapshot .evidence-signal-grid,
  body.printing-calendar-event-review .calendar-review-snapshot .source-proof-grid,
  body.printing-calendar-event-review .calendar-review-snapshot .report-fact-grid {
    gap: 5px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-evidence-counts {
    border: 1px solid #9eaab2;
    display: grid;
    gap: 4px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 8px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-evidence-inventory {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 8px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-evidence-inventory ul {
    margin: 4px 0 0 18px;
    padding: 0;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-evidence-inventory li {
    display: grid;
    gap: 1px;
    margin-bottom: 4px;
    break-inside: avoid;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-evidence-inventory li strong {
    font-size: 9.8pt;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-evidence-inventory li span,
  body.printing-calendar-event-review .calendar-review-snapshot .report-evidence-inventory li em {
    font-size: 8.6pt;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-gallery-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-gallery-card {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #9eaab2;
    border-radius: 0;
    background: #fff !important;
    padding: 7px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-gallery-preview {
    min-height: 1.18in;
    border: 1px solid #9eaab2;
    border-radius: 0;
    background: #f5f7f8 !important;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-gallery-preview img {
    width: 100%;
    height: 1.18in;
    object-fit: contain;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-gallery-card strong {
    font-size: 9.5pt;
    line-height: 1.2;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-gallery-card span,
  body.printing-calendar-event-review .calendar-review-snapshot .report-gallery-card small {
    font-size: 8.3pt;
    line-height: 1.2;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .report-custody-table th,
  body.printing-calendar-event-review .calendar-review-snapshot .report-custody-table td {
    border-bottom: 1px solid #9eaab2;
    font-size: 9.5pt;
    padding: 5px 7px;
  }

  body.printing-calendar-event-review .calendar-review-snapshot .empty-evidence,
  body.printing-calendar-event-review .calendar-review-snapshot .changes-compact.no-changes,
  body.printing-calendar-event-review .calendar-review-snapshot .related-trails-section:has([data-related-trail-attach]),
  body.printing-calendar-event-review .calendar-review-snapshot .advanced-audit:not([open]),
  body.printing-calendar-event-review .calendar-review-snapshot .snapshot-proof-note {
    display: none !important;
  }

  body.printing-calendar-event-review .calendar-review-snapshot details {
    break-inside: avoid;
  }

  body.printing-day-view {
    background: #fff !important;
    color: #111820 !important;
  }

  body.printing-day-view .sidebar,
  body.printing-day-view .calendar-header,
  body.printing-day-view .calendar-monitoring-strip,
  body.printing-day-view .calendar-change-review,
  body.printing-day-view .calendar-view-tabs,
  body.printing-day-view .sync-control-center,
  body.printing-day-view .calendar-snapshot-card,
  body.printing-day-view .calendar-trail-card,
  body.printing-day-view .calendar-setup-panel,
  body.printing-day-view .calendar-navigation,
  body.printing-day-view #printDayView {
    display: none !important;
  }

  body.printing-day-view .app-shell,
  body.printing-day-view main,
  body.printing-day-view .calendar-page,
  body.printing-day-view .calendar-evidence-card {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  body.printing-day-view .day-proof-view {
    display: grid;
    gap: 12px;
  }

  body.printing-day-view .day-proof-header,
  body.printing-day-view .day-proof-section,
  body.printing-day-view .calendar-agenda-row,
  body.printing-day-view .day-evidence-summary,
  body.printing-day-view .day-proof-row {
    border: 1px solid #9eaab2;
    border-radius: 0;
    background: #fff !important;
    color: #111820 !important;
    box-shadow: none !important;
    break-inside: avoid;
  }

  body.printing-day-view .event-actions {
    display: none !important;
  }

  body.printing-calendar-change-report .sidebar,
  body.printing-calendar-change-report .main > :not(#calendarChangeReportDialog),
  body.printing-calendar-change-report .calendar-change-report-header,
  body.printing-calendar-change-report .calendar-change-report-actions,
  body.printing-calendar-change-report .calendar-change-report-filters {
    display: none !important;
  }

  body.printing-calendar-change-report .app-shell,
  body.printing-calendar-change-report .main {
    display: block !important;
    margin: 0 !important;
    max-width: none !important;
    padding: 0 !important;
    width: 100% !important;
  }

  body.printing-calendar-change-report .calendar-change-report-dialog {
    background: #fff !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #111820 !important;
    display: block !important;
    height: auto !important;
    margin: 0 !important;
    max-height: none !important;
    max-width: none !important;
    overflow: visible !important;
    padding: 0 !important;
    position: static !important;
    width: 100% !important;
  }

  body.printing-calendar-change-report .calendar-change-report-workspace {
    display: block !important;
    height: auto !important;
  }

  body.printing-calendar-change-report .calendar-change-report-preview {
    background: #fff !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  body.printing-calendar-change-report .change-report-page {
    background: #fff !important;
    box-shadow: none !important;
    color: #111820 !important;
    margin: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  body.printing-calendar-change-report .change-report-cover {
    break-after: page;
    page-break-after: always;
  }

  body.printing-calendar-change-report .change-report-brand {
    margin-bottom: 0.45in;
  }

  body.printing-calendar-change-report .change-report-page h1 {
    font-size: 28pt;
  }

  body.printing-calendar-change-report .change-report-page h2 {
    break-after: avoid;
    color: #173244 !important;
    font-size: 18pt;
  }

  body.printing-calendar-change-report .change-report-body > p,
  body.printing-calendar-change-report .change-report-observation p {
    font-size: 11pt;
  }

  body.printing-calendar-change-report .change-report-entry,
  body.printing-calendar-change-report .change-report-observation,
  body.printing-calendar-change-report .change-report-evidence-item {
    background: #fff !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.printing-calendar-change-report .change-report-entry header strong {
    font-size: 14pt;
  }

  body.printing-calendar-change-report .change-report-cover-facts dd,
  body.printing-calendar-change-report .change-report-entry dd {
    font-size: 10.5pt;
  }

  body.printing-calendar-change-report .change-report-cover-facts dt,
  body.printing-calendar-change-report .change-report-entry dt {
    font-size: 8.5pt;
  }

  body.printing-calendar-change-report .change-report-evidence-item img {
    height: 1in;
    object-fit: contain;
    width: 1.15in;
  }
}

/* ARCH-008: permanent packet records and unmistakable calendar awareness. */
.calendar-view-context {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.calendar-view-context strong {
  color: var(--ink);
}

.calendar-month-cell,
.calendar-day-column {
  position: relative;
}

.calendar-month-cell.calendar-date-today,
.calendar-day-column.calendar-date-today {
  background: color-mix(in srgb, var(--teal) 16%, var(--paper)) !important;
}

.calendar-month-cell.calendar-date-today > strong,
.calendar-day-column.calendar-date-today > strong {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 42px;
  padding: 4px;
  border-radius: 50%;
  background: var(--teal) !important;
  color: #fff !important;
}

.calendar-month-cell.calendar-date-selected,
.calendar-day-column.calendar-date-selected,
.day-proof-view.calendar-date-selected {
  outline: 4px solid var(--gold) !important;
  outline-offset: -4px;
  z-index: 2;
}

.calendar-month-cell.calendar-date-today-selected,
.calendar-day-column.calendar-date-today-selected,
.day-proof-view.calendar-date-today-selected {
  box-shadow: inset 0 0 0 3px var(--teal), 0 0 0 3px var(--gold) !important;
}

.calendar-change-packet-indicator {
  display: grid;
  gap: 1px;
  margin: 6px 0 8px;
  padding: 6px 8px;
  border-left: 4px solid var(--gold);
  background: color-mix(in srgb, var(--gold) 14%, var(--paper));
  color: var(--ink);
  line-height: 1.2;
}

.calendar-change-packet-indicator strong {
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font-size: 14px !important;
}

.calendar-change-packet-indicator small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.daily-change-packet-card {
  border-left: 6px solid var(--gold) !important;
}

.calendar-packet-records {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: var(--paper);
  order: 6;
}

.calendar-page > .calendar-view-tabs { order: 4; }
.calendar-page > .calendar-evidence-card { order: 5; }
.calendar-page > .sync-control-center { order: 7; }
.calendar-page > .calendar-snapshot-card { order: 8; }
.calendar-page > .calendar-trail-card { order: 9; }
.calendar-page > .calendar-setup-panel { order: 10; }

.calendar-packet-record-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
}

.calendar-packet-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 13px 15px;
  border-left: 5px solid var(--gold);
  background: color-mix(in srgb, var(--gold) 8%, var(--paper));
}

.calendar-packet-record > div:first-child {
  display: grid;
  gap: 3px;
}

.calendar-packet-record > div:first-child > strong {
  font-size: 19px;
}

.calendar-packet-record > div:first-child > small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.calendar-packet-record-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 7px;
}

.daily-change-packet-card > div {
  display: grid;
  gap: 5px;
}

.metadata-inspector-dialog {
  max-width: min(980px, calc(100vw - 32px));
}

.metadata-inspector-content {
  display: grid;
  gap: 18px;
  max-height: min(72vh, 760px);
  overflow: auto;
  padding-right: 6px;
}

.metadata-inspector-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 92%, var(--gold));
}

.metadata-inspector-section h3,
.metadata-inspector-section h4 {
  margin: 0;
}

.metadata-inspector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.metadata-inspector-grid > div {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  background: var(--card);
  border: 1px solid var(--line);
}

.metadata-inspector-grid dt,
.metadata-inspector-row.header {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.metadata-inspector-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 800;
}

.metadata-inspector-table {
  display: grid;
  gap: 4px;
}

.metadata-inspector-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.35fr) minmax(220px, 1fr) minmax(90px, 0.2fr);
  gap: 10px;
  padding: 7px 9px;
  background: var(--card);
  border-left: 3px solid var(--line);
}

.metadata-inspector-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.metadata-inspector-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.metadata-inspector-list li span {
  color: var(--muted);
  font-weight: 700;
}

.change-report-packet-verification,
.change-report-packet-observations {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 2px solid var(--line);
}

.packet-verification-history {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.packet-verification-history > div {
  display: grid;
  grid-template-columns: minmax(170px, 0.35fr) minmax(240px, 1fr) minmax(180px, 0.5fr);
  gap: 12px;
  padding: 9px 12px;
  border-left: 3px solid var(--verified);
  background: color-mix(in srgb, var(--verified) 8%, var(--paper));
}

@media (max-width: 760px) {
  .calendar-packet-record {
    grid-template-columns: 1fr;
  }

  .calendar-packet-record-actions {
    justify-content: start;
  }

  .packet-verification-history > div {
    grid-template-columns: 1fr;
  }
}

@media print {
  body.printing-calendar-change-report .change-report-packet-verification,
  body.printing-calendar-change-report .change-report-packet-observations,
  body.printing-calendar-change-report .packet-verification-history > div {
    background: #fff !important;
    color: #111820 !important;
  }
}
