/* ═══════════════════════════════════════════════════════════════
   PHASE 2 — Display & Layout components
   Card variants · Empty state · Error pages · Popover · Drawer
   Command palette · Filter bar · Tag group · Calendar · Timeline
   ═══════════════════════════════════════════════════════════════ */

/* ─── Card variants ──────────────────── */
.card {
  background: var(--ax-background-default);
  border: 1px solid var(--ax-border-subtle);
  border-radius: var(--ax-radius-md);
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color var(--ax-duration-fast) var(--ax-ease),
              box-shadow var(--ax-duration-fast) var(--ax-ease),
              transform var(--ax-duration-fast) var(--ax-ease);
}
.card--hover:hover {
  border-color: var(--ax-border-default);
  box-shadow: var(--ax-elevation-2);
  transform: translateY(-1px);
}
.card--clickable { cursor: pointer; }
.card--clickable:active { transform: translateY(0); box-shadow: var(--ax-elevation-1); }
.card--interactive {
  border-color: var(--ax-border-default);
  cursor: pointer;
}
.card--accent {
  border-left: 3px solid var(--ax-brand-emphasis);
}
.card--accent.card--success { border-left-color: var(--ax-success-emphasis); }
.card--accent.card--warning { border-left-color: var(--ax-warning-emphasis); }
.card--accent.card--error   { border-left-color: var(--ax-error-emphasis); }
.card--filled {
  background: var(--ax-background-subtle);
  border-color: transparent;
}
.card--ghost {
  background: transparent;
  border: 1px dashed var(--ax-border-default);
}

.card__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px;
}
.card__eyebrow {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ax-text-subtle); font-weight: 600;
  font-family: var(--ax-font-mono);
}
.card__title {
  font-size: 15px; font-weight: 600; color: var(--ax-text-heading);
  letter-spacing: -0.005em;
}
.card__desc {
  font-size: 13px; color: var(--ax-text-default); line-height: 1.55;
}
.card__meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--ax-text-subtle);
  font-family: var(--ax-font-mono);
}
.card__meta-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--ax-border-default);
}
.card__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding-top: 10px;
  border-top: 1px solid var(--ax-border-subtle);
}
.card__media {
  margin: -16px -16px 0;
  height: 120px;
  background: linear-gradient(135deg, var(--ax-brand-subtle), var(--ax-background-subtle));
  border-bottom: 1px solid var(--ax-border-subtle);
  display: flex; align-items: center; justify-content: center;
  color: var(--ax-brand-emphasis);
  font-family: var(--ax-font-mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.card__icon-wrap {
  width: 36px; height: 36px;
  border-radius: var(--ax-radius-sm);
  background: var(--ax-brand-subtle);
  color: var(--ax-brand-emphasis);
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
}
.card__icon-wrap--success { background: var(--ax-success-subtle); color: var(--ax-success-emphasis); }
.card__icon-wrap--warning { background: var(--ax-warning-subtle); color: var(--ax-warning-emphasis); }
.card__icon-wrap--error   { background: var(--ax-error-subtle);   color: var(--ax-error-emphasis); }

.stat-card {
  display: flex; flex-direction: column; gap: 6px;
}
.stat-card__label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ax-text-subtle); font-weight: 500;
}
.stat-card__value {
  font-family: var(--ax-font-mono);
  font-size: 28px; font-weight: 600;
  color: var(--ax-text-heading);
  line-height: 1.05; letter-spacing: -0.02em;
}
.stat-card__trend {
  font-size: 11px; font-family: var(--ax-font-mono);
  display: inline-flex; align-items: center; gap: 3px;
}
.stat-card__trend--up   { color: var(--ax-success-emphasis); }
.stat-card__trend--down { color: var(--ax-error-emphasis); }

/* ─── Empty state ──────────────────── */
.empty {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 36px 24px;
  gap: 14px;
}
.empty--inline {
  padding: 24px 16px;
}
.empty__art {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--ax-background-subtle);
  display: flex; align-items: center; justify-content: center;
  color: var(--ax-text-subtle);
  position: relative;
}
.empty__art--inline {
  width: 56px; height: 56px;
}
.empty__art::before {
  content: ''; position: absolute; inset: -10px;
  border-radius: 50%;
  border: 1px dashed var(--ax-border-subtle);
  pointer-events: none;
}
.empty__title {
  font-size: 15px; font-weight: 600; color: var(--ax-text-heading);
  margin: 0;
}
.empty__desc {
  font-size: 13px; color: var(--ax-text-subtle);
  max-width: 360px; line-height: 1.55;
  margin: 0;
}
.empty__actions {
  display: flex; gap: 8px; margin-top: 4px;
}

/* ─── Error pages ──────────────────── */
.errpage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 36px;
  padding: 36px 32px;
  min-height: 320px;
  background: var(--ax-background-default);
}
.errpage__code {
  font-family: var(--ax-font-mono);
  font-size: 96px; font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ax-text-heading);
  line-height: 0.9;
  display: flex; align-items: baseline; gap: 6px;
}
.errpage__code-sub {
  font-size: 14px; color: var(--ax-text-subtle); font-weight: 500;
  letter-spacing: 0;
}
.errpage__title {
  font-size: 22px; font-weight: 600; color: var(--ax-text-heading);
  margin: 0 0 8px; letter-spacing: -0.01em;
}
.errpage__desc {
  font-size: 13px; color: var(--ax-text-default); line-height: 1.6;
  margin: 0 0 16px;
}
.errpage__actions {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.errpage__diag {
  margin-top: 16px;
  font-family: var(--ax-font-mono); font-size: 11px;
  color: var(--ax-text-subtle);
  padding: 10px 12px;
  background: var(--ax-background-subtle);
  border-radius: var(--ax-radius-sm);
  border-left: 2px solid var(--ax-border-default);
}
.errpage--error   .errpage__code { color: var(--ax-error-emphasis); }
.errpage--warn    .errpage__code { color: var(--ax-warning-emphasis); }
.errpage--neutral .errpage__code { color: var(--ax-text-subtle); }

/* ─── Popover ──────────────────── */
.popover {
  background: var(--ax-background-default);
  border: 1px solid var(--ax-border-default);
  border-radius: var(--ax-radius-md);
  box-shadow: var(--ax-elevation-3);
  width: 320px;
  display: flex; flex-direction: column;
  overflow: hidden;
  position: relative;
}
.popover::before {
  content: ''; position: absolute;
  top: -6px; left: 24px;
  width: 12px; height: 12px;
  background: var(--ax-background-default);
  border-top: 1px solid var(--ax-border-default);
  border-left: 1px solid var(--ax-border-default);
  transform: rotate(45deg);
}
.popover--bottom-arrow::before {
  top: auto; bottom: -6px;
  border-top: none; border-left: none;
  border-bottom: 1px solid var(--ax-border-default);
  border-right: 1px solid var(--ax-border-default);
}
.popover__head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--ax-border-subtle);
  display: flex; align-items: center; justify-content: space-between;
}
.popover__title {
  font-size: 13px; font-weight: 600; color: var(--ax-text-heading);
}
.popover__body {
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 13px; color: var(--ax-text-default);
}
.popover__foot {
  padding: 10px 14px;
  border-top: 1px solid var(--ax-border-subtle);
  display: flex; justify-content: flex-end; gap: 6px;
  background: var(--ax-background-subtle);
}

/* ─── Drawer / Side panel ──────────────────── */
.drawer-stage {
  position: relative;
  height: 480px;
  border: 1px solid var(--ax-border-subtle);
  border-radius: var(--ax-radius-md);
  background: var(--ax-background-page);
  overflow: hidden;
}
.drawer-stage__bg {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(
      45deg,
      transparent 0 12px,
      var(--ax-border-subtle) 12px 13px
    );
  opacity: 0.4;
}
.drawer-scrim {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, 0.4);
}
[data-theme="dark"] .drawer-scrim {
  background: rgba(0, 0, 0, 0.6);
}
.drawer {
  position: absolute;
  top: 0; bottom: 0;
  width: 420px;
  background: var(--ax-background-default);
  display: flex; flex-direction: column;
  box-shadow: var(--ax-elevation-3);
}
.drawer--right { right: 0; border-left: 1px solid var(--ax-border-default); }
.drawer--left  { left: 0;  border-right: 1px solid var(--ax-border-default); }
.drawer__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ax-border-subtle);
  gap: 8px;
}
.drawer__eyebrow {
  font-size: 10px; font-family: var(--ax-font-mono);
  color: var(--ax-text-subtle); text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.drawer__title {
  font-size: 15px; font-weight: 600; color: var(--ax-text-heading);
  letter-spacing: -0.005em;
}
.drawer__close {
  width: 28px; height: 28px;
  border-radius: var(--ax-radius-sm);
  border: none; background: transparent;
  color: var(--ax-text-subtle);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--ax-duration-fast) var(--ax-ease);
}
.drawer__close:hover { background: var(--ax-background-subtle); }
.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 14px;
}
.drawer__foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--ax-border-subtle);
  background: var(--ax-background-subtle);
}
.drawer-section {
  display: flex; flex-direction: column; gap: 6px;
}
.drawer-section__title {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ax-text-subtle); font-weight: 600;
  font-family: var(--ax-font-mono);
  margin-bottom: 4px;
}
.drawer-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 6px 0;
  font-size: 13px;
}
.drawer-row__label { color: var(--ax-text-subtle); }
.drawer-row__value { color: var(--ax-text-heading); font-weight: 500; text-align: right; }

/* ─── Command palette ──────────────────── */
.cmdk {
  background: var(--ax-background-default);
  border: 1px solid var(--ax-border-default);
  border-radius: var(--ax-radius-lg, 12px);
  box-shadow: var(--ax-elevation-3);
  width: 100%;
  max-width: 560px;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.cmdk__search {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--ax-border-subtle);
}
.cmdk__search-icon { color: var(--ax-text-subtle); flex: none; }
.cmdk__search-input {
  flex: 1;
  border: none; outline: none;
  background: transparent;
  font-size: 14px; color: var(--ax-text-heading);
  font-family: inherit;
}
.cmdk__search-input::placeholder { color: var(--ax-text-subtle); }
.cmdk__kbd {
  display: inline-flex; align-items: center;
  height: 18px; padding: 0 5px;
  border-radius: 4px;
  background: var(--ax-background-subtle);
  border: 1px solid var(--ax-border-subtle);
  font-family: var(--ax-font-mono); font-size: 10px;
  color: var(--ax-text-subtle);
}
.cmdk__list {
  max-height: 360px;
  overflow-y: auto;
  padding: 6px 0;
}
.cmdk__group-title {
  padding: 8px 14px 4px;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ax-text-subtle); font-weight: 600;
  font-family: var(--ax-font-mono);
}
.cmdk__item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ax-text-default);
  border-left: 2px solid transparent;
}
.cmdk__item.is-active {
  background: var(--ax-brand-subtle);
  border-left-color: var(--ax-brand-emphasis);
  color: var(--ax-text-heading);
}
.cmdk__item-icon {
  width: 24px; height: 24px;
  border-radius: var(--ax-radius-sm);
  background: var(--ax-background-subtle);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ax-text-subtle);
  flex: none;
}
.cmdk__item.is-active .cmdk__item-icon {
  background: var(--ax-background-default);
  color: var(--ax-brand-emphasis);
}
.cmdk__item-label { flex: 1; }
.cmdk__item-meta {
  font-size: 11px; color: var(--ax-text-subtle);
  font-family: var(--ax-font-mono);
}
.cmdk__item-shortcut {
  display: flex; gap: 3px;
}
.cmdk__foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px;
  border-top: 1px solid var(--ax-border-subtle);
  background: var(--ax-background-subtle);
  font-size: 11px;
  color: var(--ax-text-subtle);
  font-family: var(--ax-font-mono);
}
.cmdk__foot-keys {
  display: flex; align-items: center; gap: 12px;
}
.cmdk__foot-key {
  display: inline-flex; align-items: center; gap: 4px;
}

/* ─── Filter bar / Toolbar ──────────────────── */
.filterbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px;
  background: var(--ax-background-default);
  border: 1px solid var(--ax-border-subtle);
  border-radius: var(--ax-radius-md);
}
.filterbar__group {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.filterbar__sep {
  width: 1px; height: 18px;
  background: var(--ax-border-subtle);
}
.filterbar__spacer { flex: 1; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px;
  border-radius: 14px;
  background: var(--ax-background-default);
  border: 1px solid var(--ax-border-default);
  font-size: 12px; color: var(--ax-text-default);
  cursor: pointer;
  transition: border-color var(--ax-duration-fast) var(--ax-ease),
              background var(--ax-duration-fast) var(--ax-ease);
}
.filter-chip:hover { border-color: var(--ax-text-subtle); }
.filter-chip.is-active {
  background: var(--ax-brand-subtle);
  border-color: var(--ax-brand-emphasis);
  color: var(--ax-brand-emphasis);
  font-weight: 500;
}
.filter-chip__count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px;
  background: var(--ax-text-heading);
  color: var(--ax-background-default);
  font-size: 10px; font-weight: 600;
  font-family: var(--ax-font-mono);
}
.filter-chip.is-active .filter-chip__count {
  background: var(--ax-brand-emphasis);
  color: var(--ax-background-default);
}
.filter-chip--add {
  border-style: dashed;
  color: var(--ax-text-subtle);
}
.viewtoggle {
  display: inline-flex;
  border: 1px solid var(--ax-border-default);
  border-radius: var(--ax-radius-sm);
  overflow: hidden;
}
.viewtoggle__btn {
  width: 30px; height: 28px;
  background: var(--ax-background-default);
  border: none;
  color: var(--ax-text-subtle);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  border-right: 1px solid var(--ax-border-default);
}
.viewtoggle__btn:last-child { border-right: none; }
.viewtoggle__btn.is-active {
  background: var(--ax-brand-subtle);
  color: var(--ax-brand-emphasis);
}

/* ─── Tag group (semantic colored labels) ──────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px;
  border-radius: 4px;
  font-size: 11px; font-weight: 500;
  font-family: var(--ax-font-mono);
  letter-spacing: 0.01em;
  background: var(--ax-background-subtle);
  color: var(--ax-text-default);
  border: 1px solid var(--ax-border-subtle);
}
.tag__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.tag__close {
  width: 14px; height: 14px;
  border-radius: 3px;
  border: none; background: transparent;
  color: inherit; opacity: 0.6;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; margin-right: -4px;
}
.tag__close:hover { opacity: 1; background: rgba(0,0,0,0.06); }
.tag--brand   { background: var(--ax-brand-subtle);   color: var(--ax-brand-emphasis);   border-color: transparent; }
.tag--success { background: var(--ax-success-subtle); color: var(--ax-success-emphasis); border-color: transparent; }
.tag--warning { background: var(--ax-warning-subtle); color: var(--ax-warning-emphasis); border-color: transparent; }
.tag--error   { background: var(--ax-error-subtle);   color: var(--ax-error-emphasis);   border-color: transparent; }
.tag--info    { background: var(--ax-brand-subtle);   color: var(--ax-brand-emphasis);   border-color: transparent; }
.tag--purple  { background: color-mix(in srgb, var(--ax-color-purple-600) 12%, transparent); color: var(--ax-color-purple-600); border-color: transparent; }
.tag--pink    { background: color-mix(in srgb, var(--ax-color-pink-700)   12%, transparent); color: var(--ax-color-pink-700);   border-color: transparent; }
.tag--teal    { background: color-mix(in srgb, var(--ax-color-cyan-600)   12%, transparent); color: var(--ax-color-cyan-700);   border-color: transparent; }
.tag--neutral { background: var(--ax-background-subtle); color: var(--ax-text-default); }
[data-theme="dark"] .tag--purple { color: var(--ax-color-purple-300); background: color-mix(in srgb, var(--ax-color-purple-600) 18%, transparent); }
[data-theme="dark"] .tag--pink   { color: var(--ax-color-pink-300);   background: color-mix(in srgb, var(--ax-color-pink-700)   18%, transparent); }
[data-theme="dark"] .tag--teal   { color: var(--ax-color-cyan-300);   background: color-mix(in srgb, var(--ax-color-cyan-600)   18%, transparent); }

/* ─── Calendar / Schedule ──────────────────── */
.cal-wrap {
  background: var(--ax-background-default);
  border: 1px solid var(--ax-border-subtle);
  border-radius: var(--ax-radius-md);
  overflow: hidden;
}
.cal-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--ax-border-subtle);
  gap: 10px;
}
.cal-toolbar__title {
  font-size: 14px; font-weight: 600; color: var(--ax-text-heading);
  letter-spacing: -0.005em;
}
.cal-toolbar__nav {
  display: flex; align-items: center; gap: 4px;
}
.cal-month {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.cal-month__dow {
  padding: 8px 6px;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ax-text-subtle); font-weight: 600;
  font-family: var(--ax-font-mono);
  text-align: left;
  border-bottom: 1px solid var(--ax-border-subtle);
  background: var(--ax-background-subtle);
}
.cal-month__cell {
  position: relative;
  min-height: 92px;
  padding: 6px 8px;
  border-right: 1px solid var(--ax-border-subtle);
  border-bottom: 1px solid var(--ax-border-subtle);
  display: flex; flex-direction: column; gap: 3px;
  font-size: 11px;
}
.cal-month__cell:nth-child(7n+8) { border-right: none; } /* every 7th after dow row */
.cal-month__cell.is-other { background: var(--ax-background-subtle); color: var(--ax-text-subtle); }
.cal-month__cell.is-today { background: var(--ax-brand-subtle); }
.cal-month__date {
  font-family: var(--ax-font-mono); font-size: 11px; font-weight: 600;
  color: var(--ax-text-default);
}
.cal-month__cell.is-today .cal-month__date { color: var(--ax-brand-emphasis); }
.cal-month__cell.is-other .cal-month__date { color: var(--ax-text-subtle); font-weight: 400; }
.cal-event {
  display: block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px; font-weight: 500;
  background: var(--ax-brand-subtle);
  color: var(--ax-brand-emphasis);
  border-left: 2px solid var(--ax-brand-emphasis);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer;
}
.cal-event--success { background: var(--ax-success-subtle); color: var(--ax-success-emphasis); border-left-color: var(--ax-success-emphasis); }
.cal-event--warning { background: var(--ax-warning-subtle); color: var(--ax-warning-emphasis); border-left-color: var(--ax-warning-emphasis); }
.cal-event--error   { background: var(--ax-error-subtle); color: var(--ax-error-emphasis); border-left-color: var(--ax-error-emphasis); }
.cal-event--more {
  background: transparent;
  border: none;
  color: var(--ax-text-subtle);
  font-family: var(--ax-font-mono);
}

/* week view */
.cal-week {
  display: grid;
  grid-template-columns: 56px repeat(7, 1fr);
  border-bottom: 1px solid var(--ax-border-subtle);
}
.cal-week__head {
  padding: 8px 4px;
  font-size: 10px;
  text-align: center;
  border-bottom: 1px solid var(--ax-border-subtle);
  border-right: 1px solid var(--ax-border-subtle);
  background: var(--ax-background-subtle);
}
.cal-week__head:last-child { border-right: none; }
.cal-week__head-dow { color: var(--ax-text-subtle); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.cal-week__head-date { font-family: var(--ax-font-mono); font-size: 16px; font-weight: 600; color: var(--ax-text-heading); margin-top: 2px; }
.cal-week__head.is-today .cal-week__head-date { color: var(--ax-brand-emphasis); }
.cal-week__col {
  position: relative;
  border-right: 1px solid var(--ax-border-subtle);
  min-height: 240px;
}
.cal-week__col:last-child { border-right: none; }
.cal-week__hours {
  position: relative;
  border-right: 1px solid var(--ax-border-subtle);
}
.cal-week__hour {
  height: 30px;
  padding: 0 6px;
  font-size: 10px;
  font-family: var(--ax-font-mono);
  color: var(--ax-text-subtle);
  border-bottom: 1px dashed var(--ax-border-subtle);
  text-align: right;
}
.cal-week__col {
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 29px,
    var(--ax-border-subtle) 29px,
    var(--ax-border-subtle) 30px
  );
}
.cal-week__event {
  position: absolute;
  left: 4px; right: 4px;
  background: var(--ax-brand-subtle);
  color: var(--ax-brand-emphasis);
  border-left: 3px solid var(--ax-brand-emphasis);
  border-radius: 3px;
  padding: 4px 6px;
  font-size: 10px;
  display: flex; flex-direction: column; gap: 1px;
  cursor: pointer;
  overflow: hidden;
}
.cal-week__event--success { background: var(--ax-success-subtle); color: var(--ax-success-emphasis); border-left-color: var(--ax-success-emphasis); }
.cal-week__event--warning { background: var(--ax-warning-subtle); color: var(--ax-warning-emphasis); border-left-color: var(--ax-warning-emphasis); }
.cal-week__event--error   { background: var(--ax-error-subtle); color: var(--ax-error-emphasis); border-left-color: var(--ax-error-emphasis); }
.cal-week__event-title { font-weight: 600; font-size: 11px; }
.cal-week__event-time { font-family: var(--ax-font-mono); font-size: 9px; opacity: 0.85; }

/* ─── Timeline / Activity feed ──────────────────── */
.timeline {
  display: flex; flex-direction: column;
  position: relative;
}
.timeline__item {
  position: relative;
  padding-left: 36px;
  padding-bottom: 18px;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: '';
  position: absolute;
  left: 12px; top: 24px; bottom: 0;
  width: 1px;
  background: var(--ax-border-subtle);
}
.timeline__item:last-child::before { display: none; }
.timeline__dot {
  position: absolute;
  left: 6px; top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--ax-background-default);
  border: 2px solid var(--ax-border-default);
  z-index: 1;
}
.timeline__dot--brand   { border-color: var(--ax-brand-emphasis);   background: var(--ax-brand-subtle); }
.timeline__dot--success { border-color: var(--ax-success-emphasis); background: var(--ax-success-subtle); }
.timeline__dot--warning { border-color: var(--ax-warning-emphasis); background: var(--ax-warning-subtle); }
.timeline__dot--error   { border-color: var(--ax-error-emphasis);   background: var(--ax-error-subtle); }
.timeline__dot--filled {
  background: var(--ax-brand-emphasis);
  border-color: var(--ax-brand-emphasis);
}
.timeline__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}
.timeline__title {
  font-size: 13px; font-weight: 500; color: var(--ax-text-heading);
}
.timeline__time {
  font-size: 11px; font-family: var(--ax-font-mono);
  color: var(--ax-text-subtle);
  flex: none;
}
.timeline__desc {
  font-size: 12px; color: var(--ax-text-default);
  line-height: 1.55;
}
.timeline__meta {
  display: flex; gap: 10px; flex-wrap: wrap;
  font-size: 11px;
  color: var(--ax-text-subtle);
  font-family: var(--ax-font-mono);
  margin-top: 6px;
}
.timeline__actor {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px;
  color: var(--ax-text-subtle);
  margin-top: 6px;
}
.timeline__actor-avatar {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--ax-brand-subtle);
  color: var(--ax-brand-emphasis);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 600;
}
.timeline__card {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--ax-background-subtle);
  border-radius: var(--ax-radius-sm);
  border-left: 2px solid var(--ax-border-default);
  font-size: 12px;
  color: var(--ax-text-default);
  line-height: 1.55;
}

/* compact horizontal */
.timeline-h {
  display: flex; align-items: flex-start;
  position: relative;
  padding: 10px 0;
}
.timeline-h__step {
  flex: 1;
  position: relative;
  padding-top: 22px;
  text-align: center;
}
.timeline-h__step::before {
  content: '';
  position: absolute;
  top: 7px;
  left: 0; right: 0;
  height: 2px;
  background: var(--ax-border-subtle);
}
.timeline-h__step:first-child::before { left: 50%; }
.timeline-h__step:last-child::before { right: 50%; }
.timeline-h__step.is-done::before,
.timeline-h__step.is-active::before {
  background: var(--ax-brand-emphasis);
}
.timeline-h__dot {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--ax-background-default);
  border: 2px solid var(--ax-border-default);
  z-index: 1;
}
.timeline-h__step.is-done .timeline-h__dot {
  background: var(--ax-brand-emphasis);
  border-color: var(--ax-brand-emphasis);
}
.timeline-h__step.is-active .timeline-h__dot {
  border-color: var(--ax-brand-emphasis);
  background: var(--ax-brand-subtle);
  box-shadow: 0 0 0 4px var(--ax-brand-subtle);
}
.timeline-h__label {
  font-size: 11px; color: var(--ax-text-default);
  margin-top: 2px;
}
.timeline-h__time {
  font-size: 10px; font-family: var(--ax-font-mono);
  color: var(--ax-text-subtle);
  margin-top: 1px;
}
