@font-face {
  font-family: Inter;
  src: url('/assets/inter.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  --bg: #edf1f9;
  --text: #17254b;
  --muted: #4f5c7b;
  --accent: #3454e8;
  --line: #d6dff0;
  --white: #fff;
  font: 15px/1.5 Inter, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.wrap { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.top { background: #17254b; color: white; }
.brandbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 60px; color: #dbe4ff; font-size: .85rem; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 1.4rem; font-weight: 780; letter-spacing: -.055em; color: inherit; }
.logo { display: block; width: 36px; height: 36px; }
.brand-context { font-weight: 600; }
.top a { color: inherit; }
.top a:focus-visible { outline-color: white; }
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-block: 20px 14px;
  padding: 23px 26px;
  border-radius: 18px;
  overflow: hidden;
  background: #233eaf;
  color: white;
}
.hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: min(48%, 390px);
  background: repeating-linear-gradient(to bottom, transparent 0 24px, #fff2 24px 25px);
  border-inline: 1px solid #fff2;
  opacity: .65;
}
.hero-date { color: #dbe4ff; font-weight: 550; margin-bottom: 5px; }
.hero-date::first-letter { text-transform: uppercase; }
.hero .live { color: #17254b; background: #e8eeff; }
.hero .live::before { color: #3454e8; }
.hero .live.offline { color: #6c4200; background: #fff0d1; }
.hero .live.offline::before { color: #9a5d00; }
.hero :is(select,button):focus-visible { outline-color: white; }
.hero-actions, .actions, .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.9rem, 6vw, 3.15rem); line-height: 1.13; letter-spacing: -.052em; }
h2 { font-size: 1.13rem; letter-spacing: -.025em; line-height: 1.35; }
.eyebrow { color: var(--muted); font-size: .73rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 6px; }
.live, .chip { border-radius: 999px; padding: 4px 10px; font-size: .77rem; font-weight: 700; color: #203da7; background: #e8eeff; }
.live::before { content: '●'; margin-right: 6px; }
.live.offline { background: #fff0d1; color: #7a4b00; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-bottom: 16px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.metric { padding: 11px 16px; background: white; }
.metric strong { display: block; font-size: 1.65rem; letter-spacing: -.05em; font-variant-numeric: tabular-nums; line-height: 1.24; }
.metric span, .muted { color: var(--muted); font-size: .87rem; }
.layout { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); gap: 16px; align-items: start; padding-bottom: 30px; }
.card { min-width: 0; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 17px; }
.card h2 { margin-bottom: 12px; }
aside { display: grid; gap: 12px; }
ol { padding: 0; margin: 0 0 14px; list-style: none; }
.task { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task time { font-size: .85rem; color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.agenda-page .task > div { border-inline-start: 2px solid var(--line); padding-inline-start: 12px; }
.task strong, .summary, #pending p { overflow-wrap: anywhere; }
.task .actions { margin-top: 6px; }
.meta { margin-top: 4px; color: var(--muted); font-size: .78rem; }
.chip.pending { background: #fff0d1; color: #7a4b00; }
.chip.moved { background: #e6ecf8; color: #2a4a8a; }
.chip.cancelled { background: #edf0ed; color: #4f5c7b; }
.summary { border-radius: 12px; padding: 12px; background: #e8eeff; white-space: pre-wrap; margin-bottom: 5px; }
progress { width: 100%; height: 10px; accent-color: var(--accent); }
button, input, select, textarea { font: inherit; }
button, select, input, textarea { border-radius: 9px; border: 1px solid #8594b7; padding: 8px 11px; }
button { min-height: 40px; background: var(--accent); border-color: var(--accent); color: white; font-size: .85rem; font-weight: 700; cursor: pointer; }
button.secondary { background: white; color: #203da7; border-color: #8594b7; }
button.danger { color: #9a2929; }
button:disabled { opacity: .65; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #2a4a8a; outline-offset: 2px; }
label { display: grid; gap: 4px; color: var(--muted); font-size: .88rem; font-weight: 600; }
input, select, textarea { background: white; color: var(--text); min-width: 0; width: 100%; }
.hero-actions select { width: auto; }
.filters, .form-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(135px, 100%), 1fr)); margin-bottom: 12px; }
.notice:not(:empty) { padding: 12px; background: #e6ecf8; color: #2a4a8a; border-radius: 10px; margin-top: 14px; }
dialog { width: min(570px, calc(100% - 24px)); max-height: calc(100% - 32px); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
dialog::backdrop { background: #17254b88; }
dialog form, .stack { display: grid; gap: 10px; }
dialog .actions { justify-content: end; }
.form-error { color: #9a2929; font-size: .9rem; }
.form-error:empty { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.admin-main { padding-block: 25px; }
.admin-list { display: grid; gap: 10px; margin-top: 14px; }
.admin-item { display: flex; gap: 12px; justify-content: space-between; align-items: start; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .wrap { width: calc(100% - 24px); }
  .hero { align-items: start; flex-direction: column; padding: 18px; margin-top: 12px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .layout { grid-template-columns: 1fr; }
  .task { grid-template-columns: 58px minmax(0, 1fr); gap: 8px; }
  button { min-height: 44px; }
}

.prompt-text { white-space: pre-wrap; overflow-wrap: anywhere; }

.ai-flow { padding-inline-start: 24px; margin: 0; }
.ai-flow > li { padding: 4px 0 10px 4px; }
.ai-flow > li > span { display: block; }
.ai-flow details { margin-top: 6px; }

.admin-page .admin-main { padding-block: 24px 48px; }
.admin-nav, .admin-toolbar, .admin-account-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.admin-nav {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.admin-nav-sections { display: flex; flex-wrap: wrap; gap: 4px; }
.admin-nav-sections button {
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}
.admin-nav-sections button[aria-pressed="true"] {
  color: #203da7;
  background: #e8eeff;
}
.admin-heading { display: grid; gap: 8px; margin-block: 22px 18px; }
.admin-heading h1 { font-size: clamp(1.85rem, 5vw, 2.6rem); }
.admin-page #login { max-width: 420px; gap: 16px; }
.admin-page #status:not(:empty) { margin-bottom: 14px; }
.admin-sections { display: grid; gap: 12px; }
.admin-page #activity-status:empty, .admin-page #ai-example-status:empty { display: none; }
.admin-page #activity-events { margin-top: 0; }
.admin-page #older-events { justify-self: start; }
.admin-page .admin-account-heading { justify-content: start; }
.admin-page .admin-account-heading h2 { margin: 0; }
.admin-page .admin-item > div { display: grid; gap: 5px; }
.admin-page .chip.paused { background: #fff0d1; color: #7a4b00; }
.admin-page .chip.expired { background: #f5e7e7; color: #8a2626; }
.admin-page details > summary { cursor: pointer; font-weight: 650; }
.admin-page details[open] > summary { margin-bottom: 10px; }
.admin-page .activity-event { border-inline-start: 4px solid var(--accent); }
.admin-page .activity-error { border-inline-start-color: #9a2929; }
.admin-page .activity-attention { border-inline-start-color: #a96a19; }
.admin-page .activity-event button { margin-top: 8px; }
.admin-page #ai-flow-title { margin: 0; }
.admin-page #ai > section > .ai-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  counter-reset: ai-step;
}
.admin-page #ai > section > .ai-flow > li {
  counter-increment: ai-step;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
.admin-page #ai > section > .ai-flow > li strong::before {
  content: counter(ai-step, decimal-leading-zero) " ";
  color: var(--accent);
  margin-inline-end: 6px;
}
.admin-page #ai > section > .ai-flow > li span { color: var(--muted); font-size: .87rem; }

@media (max-width: 720px) {
  .admin-page #ai > section > .ai-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 440px) {
  .admin-page #ai > section > .ai-flow { grid-template-columns: 1fr; }
}

.panel-views { margin-bottom: 14px; border-bottom: 1px solid var(--line); gap: 2px; }
.panel-views button {
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
}
.panel-views button[aria-pressed="true"] { border-bottom-color: var(--accent); color: var(--text); }
.calendar-shell {
  --fc-border-color: var(--line);
  --fc-today-bg-color: #e8eeff;
  --fc-event-bg-color: var(--accent);
  --fc-event-border-color: var(--accent);
}
#calendar-view { display: grid; gap: 12px; padding-bottom: 24px; }
.calendar-shell { padding: 0; overflow: hidden; }
.calendar-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}
.calendar-header h2 { margin-bottom: 2px; }
.calendar-header h2::first-letter { text-transform: uppercase; }
.calendar-controls label { display: flex; align-items: center; gap: 6px; }
.calendar-controls select { width: auto; }
#calendar-grid { min-width: 0; overflow-x: auto; }
#calendar-grid[data-view="timeGridWeek"] > :first-child { min-width: 540px; }
#calendar-grid .calendar-done { opacity: .72; text-decoration: line-through; }
#calendar-unscheduled { margin: 0; }
.calendar-task {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 8px;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
#calendar-event h2, #calendar-event p { overflow-wrap: anywhere; }
#calendar-event .actions { margin-top: 16px; }
.calendar-event-notes { margin-top: 8px; white-space: pre-wrap; }
@media (max-width: 620px) {
  .calendar-header { align-items: start; flex-direction: column; }
  .calendar-controls button { min-width: 44px; }
}


.admin-page #messaging-responses details {
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

#messaging-commands textarea { min-height: 5.4rem; }
@media (min-width: 860px) {
  #messaging-commands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-main:has(.admin-nav:not([hidden])) {
    display: grid;
    grid-template-columns: 195px minmax(0, 1fr);
    column-gap: 24px;
    align-items: start;
  }
  .admin-main:has(.admin-nav:not([hidden])) > :not(.admin-nav) {
    grid-column: 2;
  }
  .admin-nav {
    position: sticky;
    top: 16px;
    grid-column: 1;
    grid-row: 1 / span 3;
    display: grid;
    align-items: start;
    justify-content: stretch;
    padding: 8px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
  }
  .admin-nav-sections { display: grid; }
  .admin-nav-sections button { text-align: left; }
  .admin-nav #logout { justify-self: start; margin: 4px; }
  .admin-main:has(.admin-nav:not([hidden])) .admin-heading { margin-top: 0; }
}
