@import "tailwindcss";
@import "@fortawesome/fontawesome-free/css/fontawesome.min.css";
@import "@fortawesome/fontawesome-free/css/solid.min.css";

@theme {
  --font-sans: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
  --font-display: Fraunces, Georgia, "Times New Roman", serif;

  --color-ink: #1a1d23;
  --color-muted: rgba(26, 29, 35, 0.62);
  --color-border: rgba(26, 29, 35, 0.12);
  --color-surface: #ffffff;
  --color-surface-muted: #f3f4f6;
  --color-accent: #3d5a80;
  --color-accent-foreground: #ffffff;
  --color-sidebar: #1a1d23;
  --color-sidebar-muted: rgba(255, 255, 255, 0.55);
  --color-sidebar-hover: rgba(255, 255, 255, 0.08);
  --color-sidebar-active: rgba(255, 255, 255, 0.12);

  --color-seat-free: #bae6fd;
  --color-seat-held: #fde68a;
  --color-seat-confirmed: #bbf7d0;
}

@layer base {
  html {
    font-size: 100%;
  }

  body {
    @apply bg-surface-muted text-ink font-sans text-base leading-normal antialiased;
  }

  h1 {
    @apply font-sans text-2xl font-semibold leading-tight tracking-tight text-ink;
  }

  h2 {
    @apply font-sans text-xl font-semibold leading-snug text-ink;
  }

  h3 {
    @apply font-sans text-lg font-semibold leading-snug text-ink;
  }
}

@layer components {
  .btn {
    @apply inline-flex min-h-10 items-center justify-center gap-2 rounded-sm border border-border bg-surface px-4 py-2 text-sm font-semibold text-ink transition hover:bg-surface-muted;
  }

  .btn__label {
    @apply hidden sm:inline;
  }

  .btn-primary {
    @apply border-transparent bg-accent text-accent-foreground hover:opacity-95 hover:bg-accent;
  }

  .btn-danger {
    @apply border-transparent bg-rose-700 text-white hover:bg-rose-700;
  }

  .btn-primary:disabled,
  .btn-primary.is-busy,
  .btn-primary[aria-busy="true"],
  .btn-danger:disabled,
  .btn-danger.is-busy,
  .btn-danger[aria-busy="true"] {
    @apply pointer-events-none opacity-90;
    animation: btn-busy-pulse 1.1s ease-in-out infinite;
  }

  @keyframes btn-busy-pulse {
    0%,
    100% {
      opacity: 0.72;
      transform: scale(1);
    }
    50% {
      opacity: 1;
      transform: scale(1.02);
    }
  }

  .btn-ghost {
    @apply border-transparent bg-transparent hover:bg-surface-muted;
  }

  .btn-touch {
    @apply min-h-12 w-full text-base;
  }

  .nav-dropdown {
    @apply absolute right-0 z-50 mt-2 min-w-[16rem] overflow-hidden rounded-sm border border-border bg-surface py-2 shadow-lg;
  }

  .nav-dropdown__section {
    @apply border-b border-border px-2 py-2;
  }

  .nav-dropdown__section--footer {
    @apply border-b-0;
  }

  .nav-dropdown__label {
    @apply px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-muted;
  }

  .nav-dropdown__item {
    @apply block rounded-sm px-3 py-2 text-sm font-medium text-ink no-underline transition hover:bg-surface-muted;
  }

  .nav-dropdown__item--active {
    @apply bg-surface-muted font-semibold;
  }

  .nav-dropdown__item--danger {
    @apply text-rose-800 hover:bg-rose-50;
  }

  .nav-dropdown__section--footer form {
    @apply m-0;
  }

  .card {
    @apply rounded-sm border border-border bg-surface p-5 shadow-sm;
  }

  .form-input {
    @apply w-full min-h-10 rounded-sm border border-border bg-surface px-3 py-2 text-base text-ink focus:border-accent focus:outline-none focus:ring-2 focus:ring-accent;
  }

  .form-label {
    @apply mb-1.5 block text-sm font-semibold text-ink;
  }

  .meta {
    @apply text-sm leading-normal text-muted;
  }

  .stat {
    @apply text-base font-semibold text-ink;
  }

  .flash {
    @apply mb-4 rounded-sm border px-4 py-3 text-sm font-medium;
  }

  .flash--alert {
    @apply border-rose-300 bg-rose-50 text-rose-950;
  }

  .flash--notice {
    @apply border-emerald-300 bg-emerald-50 text-emerald-950;
  }

  .toast-stack {
    @apply pointer-events-none fixed right-4 top-20 z-50 flex w-[min(24rem,calc(100vw-2rem))] flex-col gap-3;
  }

  .toast {
    @apply pointer-events-auto flex items-start gap-3 rounded-sm border bg-surface px-4 py-3 text-sm font-medium shadow-lg transition duration-300 ease-out;
    transform: translateX(120%);
    opacity: 0;
  }

  .toast--visible {
    transform: translateX(0);
    opacity: 1;
  }

  .toast--leaving {
    transform: translateX(120%);
    opacity: 0;
  }

  .toast--alert {
    @apply border-rose-300 bg-rose-50 text-rose-950;
  }

  .toast--notice {
    @apply border-emerald-300 bg-emerald-50 text-emerald-950;
  }

  .toast__body {
    @apply flex min-w-0 flex-1 items-start gap-2.5;
  }

  .toast__icon {
    @apply mt-0.5 shrink-0;
  }

  .toast__message {
    @apply m-0 min-w-0 flex-1 leading-snug;
  }

  .toast__close {
    @apply -mr-1 -mt-1 inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-sm text-current opacity-70 transition hover:bg-black/5 hover:opacity-100;
  }

  .toast__action {
    @apply shrink-0 rounded-sm border border-current/20 bg-black/5 px-2.5 py-1 text-xs font-semibold uppercase tracking-wide transition hover:bg-black/10;
  }

  .event-panel {
    @apply w-full sm:max-w-lg;
  }

  .modal-backdrop {
    @apply fixed inset-0 z-50 flex items-start justify-center overflow-y-auto bg-black/40 p-4 sm:items-center;
  }

  .modal-backdrop:has(.modal-panel--full-mobile) {
    @apply items-stretch justify-start p-0 sm:items-center sm:justify-center sm:p-4;
  }

  .modal-panel {
    @apply w-full max-w-lg rounded-sm border border-border bg-surface p-5 shadow-xl;
  }

  .modal-panel--wide {
    @apply max-h-[calc(100vh-2rem)] max-w-3xl overflow-y-auto;
  }

  .modal-panel--full-mobile {
    @apply h-dvh max-h-dvh max-w-none min-h-dvh overflow-y-auto rounded-none border-0 sm:h-auto sm:max-h-[calc(100vh-2rem)] sm:min-h-0 sm:max-w-lg sm:rounded-sm sm:border;
  }

  .modal-panel--wide.modal-panel--full-mobile {
    @apply sm:max-w-3xl;
  }

  .modal-header {
    @apply mb-4 flex items-start justify-between gap-3;
  }

  .modal-title {
    @apply text-lg font-semibold text-ink;
  }

  .form-accordion {
    @apply grid gap-3;
  }

  .form-accordion__item {
    @apply rounded-sm border border-border bg-surface-muted/40 transition-colors duration-200;
  }

  .form-accordion__item[data-open] {
    @apply border-accent/40 bg-surface;
  }

  .form-accordion__trigger {
    @apply flex w-full cursor-pointer items-center gap-2.5 px-4 py-3.5 text-left text-base font-semibold tracking-tight text-ink;
  }

  .form-accordion__chevron {
    @apply inline-block text-lg leading-none text-accent transition-transform duration-200 ease-out;
  }

  .form-accordion__item[data-open] .form-accordion__chevron {
    @apply rotate-90;
  }

  .form-accordion__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 220ms ease-out;
  }

  .form-accordion__item[data-open] .form-accordion__panel {
    grid-template-rows: 1fr;
  }

  .form-accordion__panel-inner {
    @apply min-h-0 overflow-hidden;
  }

  .form-accordion__body {
    @apply grid gap-4 border-t border-border px-4 py-4;
  }

  .person-search {
    @apply relative grid gap-2;
  }

  .person-search__results {
    @apply absolute left-0 right-0 top-full z-20 mt-1 max-h-60 overflow-y-auto rounded-sm border border-border bg-surface shadow-lg;
  }

  .person-search__option {
    @apply flex w-full flex-col items-start gap-0.5 border-b border-border px-3 py-2 text-left text-sm last:border-b-0 hover:bg-surface-muted;
  }

  .person-search__option-name {
    @apply font-medium text-ink;
  }

  .person-search__option-meta {
    @apply text-xs text-muted;
  }

  .person-search__empty {
    @apply px-3 py-2 text-sm text-muted;
  }

  .person-search__selected {
    @apply flex flex-wrap items-start justify-between gap-2 rounded-sm border border-border bg-surface-muted/50 px-3 py-2;
  }

  .consent-summary {
    @apply grid gap-2 border-t border-border pt-3;
  }

  .consent-summary__label {
    @apply text-xs font-semibold uppercase tracking-wide text-muted;
  }

  .consent-summary__chips {
    @apply flex flex-wrap gap-2;
  }

  .consent-chip {
    @apply inline-flex max-w-full items-center gap-2 rounded-sm border px-2.5 py-1.5 text-left text-sm transition;
  }

  .consent-chip--ok {
    @apply border-border bg-surface-muted text-ink hover:border-ink/30;
  }

  .consent-chip--missing {
    @apply border-amber-300 bg-amber-50 text-ink hover:border-amber-400;
  }

  .consent-chip__title {
    @apply font-medium;
  }

  .consent-chip__status {
    @apply inline-flex items-center gap-1 text-xs text-muted;
  }

  .popover {
    @apply relative inline-flex;
  }

  .popover__panel {
    @apply absolute left-0 top-full z-40 mt-2 w-[min(24rem,calc(100vw-2rem))] rounded-sm border border-border bg-surface p-4 shadow-xl;
  }

  .popover__header {
    @apply mb-3 flex items-start justify-between gap-3;
  }

  .popover__title {
    @apply text-base font-semibold text-ink;
  }

  .data-table-wrap {
    @apply w-full overflow-x-auto rounded-sm border border-border bg-surface;
  }

  .data-table {
    @apply w-full min-w-[36rem] border-collapse text-left text-sm;
  }

  .data-table th {
    @apply whitespace-nowrap border-b border-border bg-surface-muted px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted;
  }

  .data-table td {
    @apply border-b border-border px-3 py-2 align-middle text-ink;
  }

  .data-table tr:last-child td {
    @apply border-b-0;
  }

  .data-table tbody tr.data-table__row--clickable {
    @apply cursor-pointer;
  }

  .data-table tbody tr.data-table__row--clickable:focus-visible td {
    @apply bg-surface-muted outline-none;
  }

  .data-table tbody tr:hover td {
    @apply bg-surface-muted/70;
  }

  .data-table__actions {
    @apply whitespace-nowrap text-right;
  }

  .data-table__actions .btn {
    @apply min-h-8 px-2.5 py-1 text-xs;
  }

  .documents-shell.is-file-drop {
    @apply rounded-sm outline outline-2 outline-offset-2 outline-accent;
  }

  .documents-layout {
    @apply grid gap-6 lg:grid-cols-[18rem_minmax(0,1fr)] lg:items-start;
  }

  .documents-layout__main {
    @apply overflow-auto lg:max-h-[calc(100dvh-11rem)];
  }

  .documents-layout__main--show {
    @apply hidden lg:block;
  }

  .documents-pane {
    @apply relative min-w-0;
  }

  .documents-pane__backdrop {
    @apply fixed inset-0 z-30 bg-ink/40;
  }

  .documents-pane__aside {
    @apply fixed inset-y-0 right-0 z-40 flex w-[min(20rem,calc(100vw-2.5rem))] flex-col border-l border-border bg-surface shadow-xl;
    transform: translateX(100%);
    transition: transform 0.2s ease;
  }

  .documents-pane[data-open] .documents-pane__aside {
    transform: translateX(0);
  }

  .documents-pane__aside-header {
    @apply flex items-center justify-between gap-2 border-b border-border px-4 py-3;
  }

  .documents-pane__aside-body {
    @apply overflow-auto p-4;
  }

  .documents-pane__versions-title {
    @apply sr-only;
  }

  /* xl+: versions as side column; below that: trigger + overlay */
  @media (min-width: 1280px) {
    .documents-pane {
      @apply grid grid-cols-[minmax(0,1fr)_16rem] items-start gap-6;
    }

    .documents-pane__versions-trigger,
    .documents-pane__backdrop,
    .documents-pane__aside-header {
      @apply hidden;
    }

    .documents-pane__aside {
      @apply static z-auto w-auto max-w-none border-0 bg-transparent shadow-none;
      transform: none;
      transition: none;
    }

    .documents-pane__aside-body {
      @apply p-0;
    }

    .documents-pane__versions-title {
      position: static;
      width: auto;
      height: auto;
      margin: 0 0 0.75rem;
      padding: 0;
      overflow: visible;
      clip-path: none;
      white-space: normal;
      @apply block text-base font-semibold;
    }
  }

  .documents-tree {
    @apply rounded-sm border border-border bg-surface p-3;
  }

  .documents-tree__header {
    @apply mb-2 flex items-center justify-between gap-2 px-1;
  }

  .documents-tree__label {
    @apply text-[0.65rem] font-semibold uppercase tracking-wider text-muted;
  }

  .documents-tree__add {
    @apply min-h-8 gap-1.5 px-2 py-1 text-xs;
  }

  .documents-tree__add-label {
    @apply hidden sm:inline;
  }

  .documents-tree__list {
    @apply m-0 list-none p-0;
  }

  .documents-tree__node {
    @apply rounded-sm transition;
    padding-left: calc(var(--tree-depth, 0) * 0.75rem);
  }

  .documents-tree__node--root {
    padding-left: 0;
  }

  .documents-tree__row {
    @apply flex min-w-0 items-center gap-0.5;
  }

  .documents-tree__link {
    @apply flex min-w-0 flex-1 items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-ink no-underline hover:bg-surface-muted;
  }

  .documents-tree__chevron {
    @apply inline-flex w-3 shrink-0 text-[0.65rem] text-muted transition-transform;
  }

  .documents-tree__node[data-open] > .documents-tree__row .documents-tree__chevron {
    @apply rotate-90;
  }

  .documents-tree__children {
    @apply hidden;
  }

  .documents-tree__node[data-open] > .documents-tree__children {
    @apply block;
  }

  .documents-tree__node--file .documents-tree__link {
    @apply font-normal text-muted;
  }

  .documents-tree__node--file.documents-tree__node--active .documents-tree__link {
    @apply font-semibold text-ink;
  }

  .documents-tree__node--active .documents-tree__link {
    @apply bg-surface-muted font-semibold;
  }

  .documents-tree__node--path .documents-tree__link {
    @apply text-ink;
  }

  .documents-tree__badge {
    @apply ml-auto shrink-0 text-muted;
  }

  .documents-tree__node-add {
    @apply min-h-7 shrink-0 px-1.5 py-1 text-xs opacity-0 transition group-hover:opacity-100;
  }

  .documents-tree__row:hover .documents-tree__node-add,
  .documents-tree__node--active .documents-tree__node-add {
    @apply opacity-70 hover:opacity-100;
  }

  .documents-tree__node.is-drop-target,
  .documents-browser__row.is-drop-target td {
    @apply bg-accent/10 outline outline-2 outline-offset-[-2px] outline-accent;
  }

  .documents-tree__node.is-dragging,
  .documents-browser__row.is-dragging {
    @apply opacity-40;
  }

  .documents-browser__row[draggable="true"] {
    @apply cursor-grab;
  }

  .documents-browser__row[draggable="true"]:active {
    @apply cursor-grabbing;
  }

  .documents-browser__row--previewable {
    @apply cursor-default;
  }

  .documents-hover-preview {
    @apply pointer-events-auto fixed z-50 w-[min(22rem,calc(100vw-1.5rem))] overflow-hidden rounded-sm border border-border bg-surface p-3 shadow-xl;
  }

  .documents-hover-preview__title {
    @apply mb-2 truncate text-sm font-semibold text-ink;
  }

  .documents-hover-preview__body {
    @apply overflow-hidden rounded-sm bg-surface-muted;
  }

  .documents-hover-preview__image {
    @apply max-h-56 w-full object-contain;
  }

  .documents-hover-preview__video {
    @apply max-h-56 w-full bg-black;
  }

  .documents-hover-preview__pdf {
    @apply h-64 w-full border-0 bg-white;
  }

  .documents-hover-preview__audio {
    @apply grid gap-2 p-3;
  }

  .documents-hover-preview__hint {
    @apply m-0 text-xs text-muted;
  }

  .documents-rename {
    @apply inline-flex min-w-0 max-w-full flex-col gap-1;
  }

  .documents-rename__display {
    @apply inline-flex min-w-0 max-w-full items-center gap-1.5;
  }

  .documents-rename__edit {
    @apply min-h-8 shrink-0 px-2 py-1 text-xs opacity-70 hover:opacity-100;
  }

  .documents-rename__form {
    @apply flex min-w-0 max-w-full flex-wrap items-center gap-1.5;
  }

  .documents-rename__input {
    @apply min-w-[10rem] flex-1 py-1.5 text-sm;
  }

  .icon-link {
    @apply inline-flex items-center gap-1.5 no-underline;
  }

  .shell {
    @apply min-h-dvh bg-surface-muted;
  }

  .shell__sidebar {
    @apply fixed inset-y-0 left-0 z-30 flex h-dvh w-64 -translate-x-full flex-col border-r border-border bg-sidebar text-white transition-transform duration-200 lg:translate-x-0;
  }

  .shell__sidebar[data-open="true"] {
    @apply translate-x-0;
  }

  .shell__backdrop {
    @apply fixed inset-0 z-20 bg-black/40 lg:hidden;
  }

  .shell__main {
    @apply flex min-h-dvh min-w-0 flex-col lg:pl-64;
  }

  .shell__topbar {
    @apply sticky top-0 z-10 flex items-center gap-3 border-b border-border bg-surface px-4 py-3 lg:px-6;
  }

  .shell__topbar-actions {
    @apply relative z-20 ml-auto flex max-w-[60%] shrink-0 flex-nowrap items-center justify-end gap-2;
  }

  .shell__topbar-actions .nav-dropdown {
    @apply z-[60];
  }

  .shell__content {
    @apply flex-1 px-4 py-5 lg:px-6 lg:py-6;
  }

  .shell__content--flush {
    @apply px-0 py-0 lg:px-0 lg:py-0;
  }

  .calendar-layout {
    @apply flex h-[calc(100dvh-5.5rem)] min-h-0 flex-col overflow-hidden lg:flex-row;
  }

  .calendar-filters {
    @apply w-full shrink-0 border-b border-border bg-surface-muted/40 px-4 py-3 lg:w-60 lg:overflow-y-auto lg:border-b-0 lg:border-r lg:px-4 lg:py-5;
  }

  .calendar-filters__disclosure {
    @apply block;
  }

  .calendar-filters__summary {
    @apply flex cursor-pointer list-none items-center gap-2 text-sm font-semibold text-ink lg:hidden;
  }

  .calendar-filters__summary > span {
    @apply min-w-0 flex-1 truncate;
  }

  .calendar-filters__summary::-webkit-details-marker {
    display: none;
  }

  .calendar-filters__chevron {
    @apply ml-auto transition-transform;
  }

  .calendar-filters__disclosure[open] .calendar-filters__chevron {
    @apply rotate-180;
  }

  .calendar-filters__body {
    @apply mt-3 flex flex-col gap-6 lg:mt-0;
  }

  @media (min-width: 1024px) {
    .calendar-filters__disclosure > .calendar-filters__body {
      display: flex !important;
    }
  }

  .calendar-filters__section {
    @apply grid gap-2;
  }

  .calendar-filters__heading {
    @apply text-xs font-semibold uppercase tracking-wide text-muted;
  }

  .calendar-filters__list {
    @apply grid gap-0.5;
  }

  .calendar-filters__item {
    @apply flex items-center gap-2 rounded-sm px-2 py-1.5 text-sm font-medium text-ink no-underline transition hover:bg-surface;
  }

  .calendar-filters__item--active {
    @apply bg-surface font-semibold shadow-sm;
  }

  .calendar-main {
    @apply flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden px-4 py-4 lg:px-6 lg:py-5;
    background:
      radial-gradient(ellipse 90% 70% at 0% 0%, rgba(61, 90, 128, 0.10), transparent 55%),
      linear-gradient(165deg, #e7ebf1 0%, #dfe5ec 100%);
  }

  .calendar-main > [data-calendar-target="el"] {
    @apply min-h-0 flex-1;
  }

  .calendar-surface {
    @apply flex min-h-[22rem] flex-col overflow-hidden rounded-sm border border-border/80 p-2 shadow-sm sm:p-3 lg:min-h-[48rem];
    height: min(calc(100dvh - 12rem), 80rem);
    background:
      radial-gradient(ellipse 90% 70% at 0% 0%, rgba(61, 90, 128, 0.10), transparent 55%),
      linear-gradient(165deg, #e7ebf1 0%, #dfe5ec 100%);
  }

  @media (min-width: 1024px) {
    .calendar-surface {
      height: min(calc(100dvh - 9rem), 80rem);
    }
  }

  .calendar-surface .fc,
  .calendar-main .fc {
    @apply h-full min-h-0;
  }

  .service-layout {
    @apply flex min-h-[calc(100dvh-3.5rem)] flex-col lg:flex-row;
  }

  .service-nav {
    @apply w-full shrink-0 border-b border-border bg-surface-muted/40 px-4 py-3 lg:w-72 lg:overflow-y-auto lg:border-b-0 lg:border-r lg:px-4 lg:py-5;
  }

  .service-nav__disclosure {
    @apply block;
  }

  .service-nav__summary {
    @apply flex cursor-pointer list-none items-center gap-2 text-sm font-semibold text-ink lg:hidden;
  }

  .service-nav__summary::-webkit-details-marker {
    display: none;
  }

  .service-nav__chevron {
    @apply ml-auto transition-transform;
  }

  .service-nav__disclosure[open] .service-nav__chevron {
    @apply rotate-180;
  }

  .service-nav__body {
    @apply mt-3 flex flex-col gap-4 lg:mt-0;
  }

  @media (min-width: 1024px) {
    .service-nav__disclosure > .service-nav__body {
      display: flex !important;
    }
  }

  .service-nav__heading {
    @apply text-xs font-semibold uppercase tracking-wide text-muted;
  }

  .service-nav__scopes {
    @apply mb-3 grid grid-cols-2 gap-1 rounded-md border border-black/10 p-1;
  }

  .service-nav__scope {
    @apply inline-flex items-center justify-center gap-1.5 rounded px-2 py-1.5 text-xs font-semibold text-muted no-underline hover:bg-black/5;
  }

  .service-nav__scope--active {
    @apply bg-ink text-white hover:bg-ink;
  }

  .service-nav__scope--active .service-nav__count {
    @apply text-white/80;
  }

  .service-nav__months {
    @apply grid gap-5;
  }

  .service-nav__month-label {
    @apply mb-2 px-2 text-xs font-semibold uppercase tracking-wide text-muted;
  }

  .service-nav__item {
    @apply grid gap-1 rounded-sm border-l-[3px] px-2 py-2;
    border-left-color: var(--service-group, #94a3b8);
  }

  .service-nav__item--active {
    @apply bg-surface shadow-sm;
  }

  .service-nav__title {
    @apply flex items-start gap-2 text-sm font-semibold text-ink no-underline;
  }

  .service-nav__swatch {
    @apply mt-1.5 h-2.5 w-2.5 shrink-0 rounded-full;
    background: var(--service-group, #94a3b8);
  }

  .service-nav__title-copy {
    @apply grid min-w-0 gap-0.5;
  }

  .service-nav__production {
    @apply leading-snug;
  }

  .service-nav__when {
    @apply text-xs font-medium text-muted;
  }

  .service-nav__meta {
    @apply pl-[18px] text-xs text-muted;
  }

  .service-nav__links {
    @apply mt-1 grid gap-0.5 pl-[18px];
  }

  .service-nav__link {
    @apply flex items-center justify-between gap-2 rounded-sm px-2 py-1 text-sm font-medium text-ink no-underline transition hover:bg-surface;
  }

  .service-nav__link--active {
    @apply bg-accent/10 font-semibold text-accent;
  }

  .service-nav__count {
    @apply tabular-nums text-xs font-semibold text-muted;
  }

  .service-nav__link--active .service-nav__count {
    @apply text-accent;
  }

  .service-main {
    @apply min-w-0 flex-1 px-4 py-4 lg:px-6 lg:py-5;
  }

  .sidebar-brand {
    @apply flex shrink-0 items-center gap-3 border-b border-white/10 px-4 py-4;
  }

  .sidebar-brand__logo {
    @apply h-9 w-9 shrink-0 rounded-sm object-contain bg-white/10;
  }

  .sidebar-nav {
    @apply flex min-h-0 flex-1 flex-col gap-6 overflow-y-auto px-3 py-4;
  }

  .sidebar-nav__group-label {
    @apply mb-1 px-2 text-[0.65rem] font-semibold uppercase tracking-wider text-sidebar-muted;
  }

  .sidebar-nav__link {
    @apply flex items-center gap-3 rounded-sm px-2.5 py-2 text-sm font-medium text-white/85 no-underline transition hover:bg-sidebar-hover hover:text-white;
  }

  .sidebar-nav__link--active {
    @apply bg-sidebar-active text-white;
  }

  .sidebar-nav__icon {
    @apply w-5 shrink-0 text-center text-sidebar-muted;
  }

  .sidebar-subnav {
    @apply mb-2 ml-4 flex flex-col gap-0.5 border-l border-white/15 pl-2;
  }

  .sidebar-subnav__link {
    @apply flex items-center gap-2 rounded-sm px-2 py-1.5 text-xs font-medium text-white/70 no-underline transition hover:bg-sidebar-hover hover:text-white;
  }

  .sidebar-subnav__link--active {
    @apply bg-sidebar-active text-white;
  }

  .sidebar-subnav__icon {
    @apply w-4 shrink-0 text-center text-sidebar-muted;
  }

  .sidebar-footer {
    @apply mt-auto shrink-0 border-t border-white/10 px-3 py-3;
  }

  .apex-chrome {
    @apply border-b border-border bg-surface;
  }

  .apex-hero {
    @apply relative overflow-hidden;
    background:
      radial-gradient(ellipse 80% 60% at 20% 10%, rgba(61, 90, 128, 0.18), transparent 55%),
      radial-gradient(ellipse 70% 50% at 90% 20%, rgba(26, 29, 35, 0.08), transparent 50%),
      linear-gradient(165deg, #f8f9fb 0%, #eef1f5 45%, #e4e9ef 100%);
  }

  .apex-hero__brand {
    @apply font-display text-5xl font-semibold tracking-tight text-ink sm:text-6xl;
  }

  .seat-chip {
    @apply inline-flex min-h-11 min-w-11 cursor-pointer items-center justify-center rounded-sm border border-transparent px-2 py-1.5 text-base font-semibold transition;
  }

  .seat-chip:has(input:checked) {
    @apply border-accent ring-2 ring-accent/30;
  }

  .seat-chip--free {
    @apply border-sky-300 bg-seat-free text-sky-950;
  }

  .seat-chip--held {
    @apply border-amber-300 bg-seat-held text-amber-950 opacity-80;
  }

  .seat-chip--confirmed {
    @apply border-emerald-400 bg-seat-confirmed text-emerald-950 opacity-80;
  }

  .table-card {
    @apply rounded-sm border border-border p-4 text-left transition hover:border-accent/50;
  }

  .row-label {
    @apply w-10 shrink-0 pt-2.5 text-sm font-bold text-muted;
  }

  .legend-dot {
    @apply inline-block h-4 w-4 rounded-sm border border-border;
  }

  .fc {
    @apply text-sm;
  }

  .fc .fc-scrollgrid {
    border-color: rgba(26, 29, 35, 0.1) !important;
  }

  .fc .fc-scrollgrid td,
  .fc .fc-scrollgrid th {
    border-color: rgba(26, 29, 35, 0.08) !important;
  }

  .fc .fc-col-header-cell {
    background-color: rgba(255, 255, 255, 0.72);
  }

  .fc .fc-daygrid-day,
  .fc .fc-timegrid-slot,
  .fc .fc-timegrid-col {
    background-color: rgba(255, 255, 255, 0.55);
  }

  .fc .fc-day-today {
    background-color: rgba(61, 90, 128, 0.1) !important;
  }

  .fc .fc-toolbar-title {
    @apply text-base font-semibold lg:text-xl;
  }

  .fc .fc-button {
    @apply min-h-9 rounded-sm px-2.5 text-sm font-semibold lg:min-h-10 lg:px-3;
  }

  .fc .fc-col-header-cell-cushion,
  .fc .fc-daygrid-day-number {
    @apply text-sm font-medium;
  }

  .fc .fc-event {
    @apply text-sm font-medium;
  }

  .fc .fc-daygrid-day-frame {
    min-height: 3.25rem;
  }

  @media (min-width: 1024px) {
    .fc .fc-daygrid-day-frame {
      min-height: 4.5rem;
    }
  }

  .fc .fc-event.event--internal {
    @apply opacity-70;
    border-style: dashed !important;
  }

  .fc .fc-event.booking--soft {
    @apply opacity-80;
    border-style: dashed !important;
  }

  .badge {
    @apply inline-flex items-center rounded-sm border border-border px-2 py-0.5 text-xs font-semibold uppercase tracking-wide;
  }

  .badge--public {
    @apply border-emerald-300 bg-emerald-50 text-emerald-900;
  }

  .badge--internal {
    @apply border-border bg-surface-muted text-muted;
  }

  .badge--kind {
    @apply border-sky-200 bg-sky-50 text-sky-950 normal-case;
  }

  .queue-row {
    @apply flex min-h-14 flex-wrap items-center justify-between gap-3 rounded-sm border border-border bg-surface px-4 py-3 no-underline transition hover:border-accent/40;
  }

  .queue-row--active {
    @apply border-accent bg-accent/5;
  }

  /* CMS public themes */
  .cms-body {
    --cms-font-body: system-ui, sans-serif;
    --cms-font-heading: system-ui, sans-serif;
    font-family: var(--cms-font-body);
    @apply antialiased;
  }

  .cms-theme-carol {
    background: var(--cms-surface, #f6f5f5);
    color: var(--cms-ink, #15171a);
  }

  .cms-body {
    background: var(--cms-surface, #f6f5f5);
    color: var(--cms-ink, #15171a);
  }

  .cms-color-field {
    @apply flex items-center gap-2;
  }

  .cms-color-field__swatch {
    @apply h-10 w-12 shrink-0 cursor-pointer rounded-sm border border-black/15 bg-white p-0.5;
  }

  .cms-theme-casper {
    @apply bg-[#fafaf9] text-[#15171a];
  }

  .cms-preview-banner {
    @apply bg-amber-100 px-4 py-2 text-center text-sm font-semibold text-amber-950;
  }

  .cms-header {
    @apply sticky top-0 z-20 border-b border-black/10;
  }

  .cms-theme-carol .cms-header {
    background: color-mix(in oklab, var(--cms-surface, #f6f5f5) 92%, transparent);
    @apply backdrop-blur;
  }

  .cms-theme-casper .cms-header {
    @apply bg-[#fafaf9];
  }

  .cms-header__inner {
    @apply mx-auto flex max-w-3xl items-center justify-between gap-4 px-5 py-4;
  }

  .cms-theme-carol .cms-header__inner {
    @apply max-w-7xl;
  }

  .cms-header__brand {
    @apply inline-flex items-center gap-3 font-semibold tracking-tight no-underline;
    color: var(--cms-ink, #15171a);
    font-family: var(--cms-font-heading);
    font-size: 1.35rem;
  }

  .cms-header__logo {
    @apply max-h-12 w-auto max-w-[14rem] object-contain;
  }

  .cms-theme-carol .cms-header__logo {
    @apply max-h-14 max-w-[16rem];
  }

  .cms-header__title {
    @apply leading-tight;
  }

  .cms-header__nav {
    @apply flex flex-wrap items-center gap-4 text-sm font-medium text-[#15171a]/70;
  }

  .cms-header__nav a {
    @apply no-underline hover:text-[#15171a];
  }

  .cms-theme-carol .cms-header__nav a:hover {
    @apply text-accent;
  }

  .cms-main {
    @apply mx-auto min-h-[60vh] max-w-3xl px-5 py-10;
  }

  .cms-theme-carol .cms-main {
    @apply max-w-none px-0 py-0;
  }

  .cms-theme-carol .cms-main > .cms-article,
  .cms-theme-carol .cms-main > .cms-home:not(.cms-home--carol) {
    @apply mx-auto max-w-3xl px-5 py-10;
  }

  .cms-theme-carol .cms-home--carol,
  .cms-theme-carol .cms-carol-article {
    @apply max-w-none;
  }

  .cms-footer {
    @apply mt-16 border-t border-black/10;
  }

  .cms-theme-carol .cms-footer {
    @apply mt-0;
  }

  .cms-footer__inner {
    @apply mx-auto flex max-w-3xl flex-col gap-3 px-5 py-8 text-sm text-[#15171a]/65;
  }

  .cms-theme-carol .cms-footer__inner {
    @apply max-w-7xl items-center text-center;
  }

  .cms-footer__brand {
    font-family: var(--cms-font-heading);
    @apply text-base font-semibold text-[#15171a];
  }

  .cms-footer__pub {
    @apply inline-flex justify-center no-underline;
  }

  .cms-footer__pub-logo {
    @apply max-h-14 w-auto max-w-[12rem] object-contain;
  }

  .cms-footer__nav,
  .cms-footer__social {
    @apply flex flex-wrap gap-4;
  }

  .cms-theme-carol .cms-footer__nav,
  .cms-theme-carol .cms-footer__social {
    @apply justify-center;
  }

  .cms-theme-carol .cms-footer__nav a,
  .cms-theme-carol .cms-footer__social a {
    @apply text-[#15171a]/65 no-underline hover:text-accent;
  }

  /* —— Carol theater home (light shell) —— */
  .cms-carol-kicker {
    @apply mb-2 inline-flex items-center gap-2 text-[0.7rem] font-semibold uppercase tracking-[0.22em] text-accent;
  }

  .cms-carol-hero {
    position: relative;
    isolation: isolate;
    min-height: min(78vh, 46rem);
    @apply flex items-end overflow-hidden bg-[#15171a];
    animation: carol-hero-in 700ms ease-out both;
  }

  .cms-carol-hero--show {
    min-height: min(56vh, 34rem);
  }

  .cms-carol-hero--compact {
    min-height: min(42vh, 26rem);
  }

  .cms-carol-hero--empty {
    background:
      linear-gradient(135deg, color-mix(in oklab, var(--color-accent) 22%, transparent), transparent 45%),
      linear-gradient(180deg, #2a2d36, #15171a);
    @apply min-h-[48vh];
  }

  .cms-carol-hero--light .cms-carol-hero__veil {
    background:
      linear-gradient(90deg, rgba(246, 245, 245, 0.88) 0%, rgba(246, 245, 245, 0.55) 48%, rgba(246, 245, 245, 0.2) 100%),
      linear-gradient(0deg, rgba(246, 245, 245, 0.92) 0%, transparent 52%);
  }

  .cms-carol-hero--light .cms-carol-hero__title,
  .cms-carol-hero--light .cms-carol-hero__date,
  .cms-carol-hero--light .cms-carol-hero__lede {
    color: var(--cms-ink, #15171a);
  }

  .cms-carol-hero--light .cms-carol-hero__date {
    @apply opacity-80;
  }

  .cms-carol-hero--light .cms-carol-hero__lede {
    @apply opacity-75;
  }

  .cms-carol-hero--light.cms-carol-hero--empty {
    background:
      linear-gradient(135deg, color-mix(in oklab, var(--color-accent) 16%, transparent), transparent 45%),
      var(--cms-surface, #f6f5f5);
  }

  .cms-carol-hero__stage {
    @apply absolute inset-0 -z-20;
  }

  .cms-carol-hero__stage img {
    @apply h-full w-full object-cover;
    transform: scale(1.04);
    animation: carol-kenburns 18s ease-out both;
  }

  .cms-carol-hero__veil {
    @apply absolute inset-0 -z-10;
    background:
      linear-gradient(90deg, rgba(21, 23, 26, 0.9) 0%, rgba(21, 23, 26, 0.5) 48%, rgba(21, 23, 26, 0.22) 100%),
      linear-gradient(0deg, rgba(21, 23, 26, 0.88) 0%, transparent 48%);
  }

  .cms-carol-hero__content {
    @apply relative w-full max-w-7xl px-5 pb-12 pt-28 sm:px-8 lg:px-10 lg:pb-16;
  }

  .cms-carol-hero__title {
    font-family: var(--cms-font-heading);
    @apply mb-4 max-w-4xl text-4xl font-bold leading-[1.05] tracking-tight text-white sm:text-5xl lg:text-6xl;
  }

  .cms-carol-hero__title a {
    @apply text-inherit no-underline;
  }

  .cms-carol-hero__date {
    @apply mb-4 inline-flex items-center gap-2 text-sm font-semibold uppercase tracking-[0.14em] text-white/85;
  }

  .cms-carol-hero__lede {
    @apply mb-6 max-w-2xl text-lg leading-relaxed text-white/75;
  }

  .cms-carol-btn {
    @apply inline-flex items-center gap-2 no-underline;
  }

  .cms-carol-rail {
    @apply border-t border-black/10 py-10;
    background: var(--cms-surface, #f6f5f5);
  }

  .cms-carol-rail--echo {
    background: color-mix(in oklab, var(--cms-surface, #f6f5f5) 88%, #15171a);
  }

  .cms-carol-rail__inner,
  .cms-carol-bulletin__inner {
    @apply mx-auto max-w-7xl px-5 sm:px-8 lg:px-10;
  }

  .cms-carol-rail__head {
    @apply mb-6;
  }

  .cms-carol-rail__head h2 {
    font-family: var(--cms-font-heading);
    @apply text-2xl font-bold lg:text-3xl;
    color: var(--cms-ink, #15171a);
  }

  .cms-carol-posters {
    @apply flex gap-4 overflow-x-auto pb-3 [-ms-overflow-style:none] [scrollbar-width:none];
  }

  .cms-carol-posters--grid {
    @apply grid grid-cols-2 gap-5 overflow-visible sm:grid-cols-3 lg:grid-cols-4;
  }

  .cms-carol-posters--grid .cms-poster {
    @apply w-auto;
  }

  .cms-carol-posters::-webkit-scrollbar {
    display: none;
  }

  .cms-poster {
    @apply w-44 shrink-0 sm:w-52;
    animation: carol-rise 600ms ease-out both;
  }

  .cms-poster:nth-child(2) { animation-delay: 60ms; }
  .cms-poster:nth-child(3) { animation-delay: 120ms; }
  .cms-poster:nth-child(4) { animation-delay: 180ms; }
  .cms-poster:nth-child(5) { animation-delay: 240ms; }

  .cms-poster--echo {
    @apply w-36 opacity-90 sm:w-40;
  }

  .cms-poster__link {
    @apply block text-inherit no-underline;
  }

  .cms-poster__frame {
    @apply mb-3 overflow-hidden bg-black/5;
    box-shadow: 0 12px 28px rgba(21, 23, 26, 0.08);
  }

  .cms-poster__image,
  .cms-poster__placeholder {
    @apply aspect-[3/4] w-full object-cover transition duration-500;
  }

  .cms-poster__placeholder {
    @apply flex items-center justify-center bg-[#ecece8] text-3xl text-accent;
  }

  .cms-poster__link:hover .cms-poster__image,
  .cms-poster__link:hover .cms-poster__placeholder {
    transform: scale(1.04);
  }

  .cms-poster__body h3 {
    font-family: var(--cms-font-heading);
    @apply text-base font-semibold leading-snug;
    color: var(--cms-ink, #15171a);
  }

  .cms-poster__date {
    @apply mt-1 inline-flex items-center gap-1.5 text-xs uppercase tracking-[0.12em] opacity-55;
    color: var(--cms-ink, #15171a);
  }

  .cms-carol-dates {
    @apply border-t border-black/10 py-10;
    background: var(--cms-surface, #f6f5f5);
  }

  .cms-carol-dates__inner {
    @apply mx-auto max-w-7xl px-5 sm:px-8 lg:px-10;
  }

  .cms-carol-dates__list {
    @apply divide-y divide-black/10;
  }

  .cms-carol-dates__list--stacked {
    @apply mt-2;
  }

  .cms-carol-dates__link,
  .cms-carol-dates__row {
    @apply grid grid-cols-[minmax(0,1fr)_auto] items-center gap-4 py-3.5 text-inherit no-underline;
  }

  .cms-carol-dates__link {
    @apply sm:grid-cols-[14rem_minmax(0,1fr)_auto];
  }

  .cms-carol-dates__link:hover {
    @apply text-accent;
  }

  .cms-carol-dates__when {
    @apply text-xs font-semibold uppercase tracking-[0.12em] text-accent;
  }

  .cms-carol-dates__title {
    font-family: var(--cms-font-heading);
    @apply text-lg font-semibold;
    color: var(--cms-ink, #15171a);
  }

  .cms-carol-dates__chevron {
    @apply text-sm opacity-40;
  }

  .cms-carol-dates__item--past {
    @apply opacity-45;
  }

  .cms-carol-article__shell {
    @apply mx-auto max-w-7xl px-5 py-10 sm:px-8 lg:px-10;
  }

  .cms-carol-article__body {
    @apply mx-auto max-w-3xl;
  }

  .cms-carol-section {
    @apply mx-auto mt-12 max-w-3xl;
  }

  .cms-carol-article__comments {
    @apply mx-auto mt-12 max-w-3xl;
  }

  .cms-carol-titleblock {
    @apply border-b border-black/10 py-14;
    background: var(--cms-surface, #f6f5f5);
  }

  .cms-carol-titleblock__inner {
    @apply mx-auto max-w-3xl px-5 sm:px-8 lg:px-10;
  }

  .cms-carol-titleblock h1 {
    font-family: var(--cms-font-heading);
    @apply text-4xl font-bold leading-tight sm:text-5xl;
    color: var(--cms-ink, #15171a);
  }

  .cms-carol-titleblock__meta {
    @apply mt-3 text-sm opacity-60;
    color: var(--cms-ink, #15171a);
  }

  .cms-cast-list--carol {
    @apply gap-5;
  }

  .cms-cast-item__photo--carol {
    @apply h-20 w-20 rounded-sm object-cover;
  }

  .cms-image-crop {
    @apply fixed inset-0 z-50 flex items-center justify-center bg-black/55 p-4;
  }

  .cms-image-crop__panel {
    @apply w-full max-w-3xl rounded-md bg-white p-4 shadow-xl;
  }

  .cms-image-crop__canvas {
    @apply mb-4 max-h-[60vh] overflow-hidden bg-black/5;
  }

  .cms-image-crop__actions {
    @apply flex justify-end gap-2;
  }

  .cms-nav-editor__list {
    @apply mb-4 flex flex-col gap-2;
  }

  .cms-nav-editor__row {
    @apply grid grid-cols-1 items-end gap-2 rounded-md border border-black/10 bg-white p-3 sm:grid-cols-[1.2fr_1.4fr_auto];
  }

  .cms-nav-editor__handle {
    @apply cursor-grab text-sm opacity-50;
  }

  .cms-carol-bulletin {
    @apply border-t border-black/10 py-12;
    background: var(--cms-surface, #f6f5f5);
  }

  .cms-carol-bulletin--more {
    @apply pb-16;
  }

  .cms-carol-bulletin__list {
    @apply divide-y divide-black/10;
  }

  .cms-carol-bulletin__link {
    @apply grid grid-cols-[minmax(0,1fr)_auto] items-center gap-4 py-4 text-inherit no-underline transition;
  }

  .cms-carol-bulletin__link:hover {
    @apply text-accent;
  }

  .cms-carol-bulletin__meta {
    @apply col-span-2 mb-1 flex flex-wrap items-center gap-3 text-xs uppercase tracking-[0.14em] opacity-55;
    color: var(--cms-ink, #15171a);
  }

  .cms-carol-bulletin__kind {
    @apply text-accent;
  }

  .cms-carol-bulletin__title {
    font-family: var(--cms-font-heading);
    @apply text-xl font-semibold leading-snug;
    color: var(--cms-ink, #15171a);
  }

  .cms-carol-bulletin__link:hover .cms-carol-bulletin__title {
    @apply text-accent;
  }

  .cms-carol-bulletin__chevron {
    @apply text-sm opacity-40;
    color: var(--cms-ink, #15171a);
  }

  .cms-carol-date {
    @apply mb-3 text-sm font-semibold uppercase tracking-[0.08em] text-accent;
  }

  @keyframes carol-hero-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes carol-kenburns {
    from { transform: scale(1.08); }
    to { transform: scale(1.02); }
  }

  @keyframes carol-rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @media (prefers-reduced-motion: reduce) {
    .cms-carol-hero,
    .cms-carol-hero__stage img,
    .cms-poster {
      animation: none !important;
    }
  }

  .cms-layout-feed-grid .cms-card-list,
  .cms-layout-feed-grid.cms-card-list {
    @apply grid gap-6 sm:grid-cols-2;
  }

  .cms-layout-nav-stacked .cms-header__nav {
    @apply flex-col items-end gap-2;
  }

  .cms-callout {
    @apply mb-5 border-l-4 border-black/25 bg-[#15171a]/5 px-4 py-3;
  }

  .cms-cta {
    @apply mb-5;
  }

  .cms-ed-block {
    @apply space-y-2 rounded-sm border border-black/10 bg-white p-3;
  }

  .cms-ed-tool {
    @apply block text-sm;
  }

  .cms-ed-tool__label {
    @apply mb-1 block text-xs font-semibold uppercase tracking-wide text-[#15171a]/55;
  }

  .cms-revision-list {
    @apply space-y-3;
  }

  .cms-revision-list__item {
    @apply flex items-start justify-between gap-3 border-b border-black/10 pb-3;
  }

  .cms-hero {
    @apply mb-12;
  }

  .cms-hero__image {
    @apply mb-6 aspect-[16/9] w-full object-cover;
  }

  .cms-hero__body h1 {
    font-family: var(--cms-font-heading);
    @apply text-4xl font-bold leading-tight;
  }

  .cms-hero__body h1 a,
  .cms-card h3 a,
  .cms-article h1 {
    @apply text-inherit no-underline;
  }

  .cms-home__intro h1,
  .cms-article h1,
  .cms-section h2,
  .cms-prose h2,
  .cms-prose h3,
  .cms-prose h4 {
    font-family: var(--cms-font-heading);
  }

  .cms-home__intro h1,
  .cms-article h1 {
    @apply mb-4 text-4xl font-bold leading-tight;
  }

  .cms-kicker {
    @apply mb-2 text-xs font-semibold uppercase tracking-[0.14em] text-[#15171a]/55;
  }

  .cms-lede {
    @apply text-lg leading-relaxed text-[#15171a]/75;
  }

  .cms-byline {
    @apply mb-2 text-sm text-[#15171a]/55;
  }

  .cms-section {
    @apply mb-12;
  }

  .cms-section h2 {
    @apply mb-5 text-2xl font-bold;
  }


  .cms-card-list {
    @apply flex flex-col gap-8;
  }

  .cms-card__image,
  .cms-article__feature {
    @apply mb-4 aspect-[16/9] w-full object-cover;
  }

  .cms-card h3 {
    font-family: var(--cms-display);
    @apply mb-2 text-2xl font-bold leading-snug;
  }

  .cms-prose {
    @apply text-lg leading-relaxed;
  }

  .cms-prose p,
  .cms-prose ul,
  .cms-prose ol,
  .cms-prose blockquote {
    @apply mb-5;
  }

  .cms-prose h2,
  .cms-prose h3,
  .cms-prose h4 {
    font-family: var(--cms-display);
    @apply mb-3 mt-8 font-bold;
  }

  .cms-prose blockquote {
    @apply border-l-2 border-black/20 pl-4 italic text-[#15171a]/80;
  }

  .cms-figure img {
    @apply w-full;
  }

  .cms-gallery {
    @apply mb-6;
  }

  .cms-gallery--fit {
    @apply grid grid-cols-2 gap-2 sm:grid-cols-3;
  }

  .cms-gallery--slider {
    @apply flex gap-3 overflow-x-auto pb-2;
  }

  .cms-gallery--slider .cms-gallery__item {
    @apply w-72 shrink-0;
  }

  .cms-gallery__item {
    @apply m-0 overflow-hidden;
  }

  .cms-gallery__item img {
    @apply aspect-[16/9] w-full object-cover;
  }

  .cms-gallery__caption {
    @apply col-span-full mt-2 text-sm text-[#15171a]/65;
  }

  .cms-autosave {
    @apply text-xs;
  }

  .cms-autosave--error {
    @apply text-rose-700;
  }


  .cms-dates {
    @apply space-y-3;
  }

  .cms-dates__item--past {
    @apply text-[#15171a]/45;
  }

  .cms-dates__item--past strong {
    @apply font-medium;
  }

  .cms-cta-stub {
    @apply ml-2 text-sm text-[#15171a]/55;
  }

  .cms-cast-list {
    @apply grid gap-6 sm:grid-cols-2;
  }

  .cms-cast-item {
    @apply flex gap-3;
  }

  .cms-cast-item__photo {
    @apply h-16 w-16 shrink-0 rounded-full object-cover;
  }

  .cms-muted {
    @apply text-[#15171a]/55;
  }

  .cms-join-form {
    @apply flex max-w-xl flex-col gap-4;
  }

  .cms-join-option {
    @apply flex items-start gap-3 rounded-sm border border-black/10 bg-white p-3;
  }

  .cms-join-option--hint {
    @apply opacity-80;
  }

  .cms-comments {
    @apply mt-12 border-t border-black/10 pt-8;
  }

  .cms-comments__header {
    @apply mb-6 flex flex-wrap items-end justify-between gap-3;
  }

  .cms-comments__header h2 {
    font-family: var(--cms-font-heading);
    @apply text-2xl font-bold;
  }

  .cms-comments__sort {
    @apply inline-flex gap-1 rounded-sm border border-black/10 bg-black/[0.03] p-1;
  }

  .cms-comments__sort-link {
    @apply rounded-sm px-3 py-1.5 text-sm font-medium text-[#15171a]/60 no-underline;
  }

  .cms-comments__sort-link.is-active {
    @apply bg-white text-[#15171a] shadow-sm;
  }

  .cms-comments__signin {
    @apply mb-6 flex items-center gap-2 text-sm text-[#15171a]/65;
  }

  .cms-comment-form {
    @apply mb-8 flex max-w-2xl flex-col gap-2;
  }

  .cms-comment-form--reply {
    @apply mt-3 mb-0;
  }

  .cms-comment-form__label {
    @apply text-xs font-semibold uppercase tracking-[0.12em] text-[#15171a]/50;
  }

  .cms-comment-input {
    @apply w-full resize-y rounded-sm border border-black/15 bg-white px-3.5 py-3 text-base leading-relaxed text-[#15171a] shadow-[inset_0_1px_2px_rgba(0,0,0,0.04)] outline-none transition;
  }

  .cms-comment-input::placeholder {
    @apply text-[#15171a]/40;
  }

  .cms-comment-input:focus {
    @apply border-[#15171a]/40 ring-2 ring-[#15171a]/10;
  }

  .cms-comment-form__actions {
    @apply mt-1 flex flex-wrap items-center gap-2;
  }

  .cms-comment-btn {
    @apply inline-flex items-center gap-2 rounded-sm border border-transparent bg-transparent px-2.5 py-1.5 text-sm font-medium text-[#15171a]/70 no-underline transition hover:bg-black/[0.05] hover:text-[#15171a];
  }

  .cms-comment-btn--primary {
    @apply border-black/10 bg-[#15171a] text-white hover:bg-[#15171a]/90 hover:text-white;
  }

  .cms-comment-btn--danger:hover {
    @apply bg-red-50 text-red-700;
  }

  .cms-comment-btn--static {
    @apply cursor-default hover:bg-transparent;
  }

  button.cms-comment-btn {
    @apply cursor-pointer;
  }

  .cms-comment {
    @apply mb-6 border-b border-black/10 pb-5;
  }

  .cms-comment--reply {
    @apply ml-4 mt-4 border-l-2 border-black/10 border-b-0 pb-0 pl-4 sm:ml-6;
  }

  .cms-comment--pinned {
    @apply rounded-sm border border-amber-200/80 bg-amber-50/70 px-3 pt-3;
  }

  .cms-comment__header {
    @apply mb-2 flex flex-wrap items-baseline gap-x-3 gap-y-1;
  }

  .cms-comment__author {
    @apply text-sm font-semibold;
  }

  .cms-comment__time {
    @apply text-xs text-[#15171a]/50;
  }

  .cms-comment__pin {
    @apply inline-flex items-center gap-1 text-xs font-semibold uppercase tracking-wide text-amber-800;
  }

  .cms-comment__body {
    @apply text-[0.95rem] leading-relaxed;
  }

  .cms-comment__body p {
    @apply mb-2 last:mb-0;
  }

  .cms-comment__actions {
    @apply mt-3 flex flex-wrap items-center gap-1;
  }

  .cms-comment__reply summary {
    @apply list-none;
  }

  .cms-comment__reply summary::-webkit-details-marker {
    display: none;
  }

  .cms-side-thumb {
    @apply max-h-36 w-full rounded-sm object-cover;
  }

  .cms-dns-hint {
    @apply my-3 rounded-sm border border-border bg-surface-muted p-3 text-sm;
  }

  /* CMS staff workspace: tools rail + tool content */
  .cms-workspace {
    @apply relative flex min-h-[calc(100dvh-3.5rem)] flex-col bg-surface-muted lg:flex-row;
  }

  .cms-tools-toggle {
    @apply absolute left-3 top-3 z-20 inline-flex items-center gap-2 rounded-sm border border-border bg-surface px-2.5 py-1.5 text-sm font-semibold text-ink shadow-sm hover:bg-surface-muted;
  }

  .cms-tools-toggle__label {
    @apply hidden sm:inline;
  }

  .cms-workspace--with-tools .cms-tool-content {
    @apply pt-12 lg:pt-0;
  }

  .cms-workspace--tools-open .cms-tools-toggle {
    @apply lg:left-[14.5rem];
  }

  .cms-tools {
    @apply hidden shrink-0 border-b border-border bg-surface lg:border-b-0 lg:border-r;
  }

  .cms-workspace--tools-open .cms-tools {
    @apply flex w-full flex-col lg:w-56;
  }

  .cms-tools__header {
    @apply flex items-center justify-between gap-3 border-b border-border px-4 py-3 lg:flex-col lg:items-stretch;
  }

  .cms-tools__eyebrow {
    @apply text-xs font-semibold uppercase tracking-wide text-muted;
  }

  .cms-tools__site {
    @apply inline-flex items-center gap-2 text-sm font-medium text-accent no-underline hover:underline;
  }

  .cms-tools__nav {
    @apply flex gap-1 overflow-x-auto px-2 py-2 lg:flex-col lg:overflow-visible lg:px-2 lg:py-3;
  }

  .cms-tools__link {
    @apply inline-flex shrink-0 items-center gap-2 rounded-sm px-3 py-2 text-sm font-medium text-ink no-underline hover:bg-surface-muted;
  }

  .cms-tools__link--active {
    @apply bg-accent/10 text-accent;
  }

  .cms-tools__icon {
    @apply w-4 shrink-0 text-center text-muted;
  }

  .cms-tools__link--active .cms-tools__icon {
    @apply text-accent;
  }

  .cms-tool-content {
    @apply flex min-h-0 min-w-0 flex-1 flex-col;
  }

  .cms-tool-content:has(.cms-compose) {
    @apply overflow-hidden;
  }

  .cms-tool-header {
    @apply flex flex-wrap items-start justify-between gap-3 border-b border-border bg-surface px-4 py-4 lg:px-6;
  }

  .cms-tool-header h1 {
    @apply mb-1;
  }

  .cms-entry-list {
    @apply divide-y divide-border bg-surface;
  }

  .cms-entry-row {
    @apply flex items-center justify-between gap-4 px-4 py-4 no-underline transition hover:bg-surface-muted lg:px-6;
  }

  .cms-entry-row__main {
    @apply min-w-0;
  }

  .cms-entry-row__title {
    @apply block truncate text-base font-semibold text-ink;
  }

  .cms-entry-row__meta {
    @apply mt-0.5 block truncate text-sm text-muted;
  }

  .cms-badge {
    @apply inline-flex shrink-0 items-center rounded-sm border px-2 py-0.5 text-xs font-semibold uppercase tracking-wide;
  }

  .cms-badge--live {
    @apply border-emerald-300 bg-emerald-50 text-emerald-900;
  }

  .cms-badge--draft {
    @apply border-border bg-surface-muted text-muted;
  }

  .cms-badge--scheduled {
    @apply border-amber-300 bg-amber-50 text-amber-950;
  }

  .cms-empty {
    @apply flex flex-1 flex-col items-start justify-center gap-4 px-4 py-16 lg:px-6;
  }

  .cms-comment-row {
    @apply flex flex-col gap-3 border-b border-border bg-surface px-4 py-4 sm:flex-row sm:items-start sm:justify-between lg:px-6;
  }

  .cms-comment-row--hidden {
    @apply opacity-55;
  }

  .cms-comment-row__text {
    @apply text-sm leading-relaxed text-ink;
  }

  .cms-comment-row__actions {
    @apply flex shrink-0 flex-wrap gap-2;
  }

  .cms-compose {
    @apply flex min-h-0 flex-1 flex-col;
  }

  .cms-compose__layout {
    @apply flex min-h-0 flex-1 flex-col lg:flex-row;
  }

  .cms-compose__errors {
    @apply m-4 lg:mx-6;
  }

  .cms-compose__canvas {
    @apply min-w-0 flex-1 overflow-y-auto bg-surface px-4 py-4 lg:px-10 lg:py-6;
  }

  .cms-compose__toolbar {
    @apply mx-auto mb-5 flex max-w-3xl flex-wrap items-center justify-between gap-3;
  }

  .cms-compose__toolbar-status {
    @apply flex min-w-0 flex-wrap items-center gap-2;
  }

  .cms-compose__toolbar-actions {
    @apply flex flex-wrap items-center justify-end gap-2;
  }

  .cms-compose__inspector-toggle[aria-expanded="true"] {
    @apply border-accent bg-accent/10;
  }

  .cms-compose__title-wrap {
    @apply mx-auto mb-6 max-w-3xl;
  }

  .cms-compose__title {
    @apply w-full border-0 bg-transparent p-0 text-3xl font-semibold leading-tight text-ink outline-none placeholder:text-muted/50 focus:ring-0 lg:text-4xl;
  }

  .cms-compose__editor {
    @apply mx-auto max-w-3xl;
  }

  .cms-editorjs {
    @apply min-h-[28rem] rounded-sm border border-border bg-surface-muted/40 px-3 py-5 lg:px-5;
  }

  .cms-compose__inspector {
    @apply hidden w-full shrink-0 flex-col border-t border-border bg-surface lg:w-80 lg:border-l lg:border-t-0;
  }

  .cms-compose--inspector-open .cms-compose__inspector {
    @apply flex;
  }

  .cms-compose__tabs {
    @apply flex border-b border-border;
  }

  .cms-compose__tab {
    @apply flex-1 border-0 border-b-2 border-transparent bg-transparent px-2 py-3 text-sm font-semibold text-muted hover:text-ink;
  }

  .cms-compose__tab--active {
    @apply border-accent text-ink;
  }

  .cms-compose__panels {
    @apply flex-1 overflow-y-auto p-4;
  }

  .cms-compose__panel {
    @apply flex flex-col gap-4;
  }

  .cms-compose__panel .field {
    @apply flex flex-col gap-1.5;
  }

  .cms-compose__group {
    @apply border-t border-border pt-4;
  }

  .cms-compose__group-label {
    @apply mb-2 text-xs font-semibold uppercase tracking-wide text-muted;
  }

  .cms-compose__group--danger {
    @apply mt-auto;
  }

  .cms-check {
    @apply flex items-start gap-2 text-sm leading-snug text-ink;
  }

  .cms-check input {
    @apply mt-0.5;
  }

  .cms-settings-shell {
    @apply flex h-[calc(100dvh-5.5rem)] min-h-0 flex-col overflow-hidden lg:flex-row;
  }

  .cms-settings-nav {
    @apply flex w-full shrink-0 flex-col border-b border-border bg-surface-muted/40 lg:w-64 lg:overflow-y-auto lg:border-b-0 lg:border-r;
  }

  .cms-settings-nav__header {
    @apply border-b border-border px-4 py-4 lg:px-5;
  }

  .cms-settings-nav__eyebrow {
    @apply text-[0.65rem] font-semibold uppercase tracking-[0.14em] text-muted;
  }

  .cms-settings-nav__title {
    @apply mt-1 text-lg font-semibold text-ink;
  }

  .cms-settings-nav__list {
    @apply flex gap-1 overflow-x-auto px-2 py-2 lg:flex-col lg:overflow-x-visible lg:px-3 lg:py-3;
  }

  .cms-settings-nav__link {
    @apply flex min-w-[10.5rem] items-start gap-3 rounded-sm px-3 py-2.5 text-ink no-underline transition-colors hover:bg-surface lg:min-w-0;
  }

  .cms-settings-nav__link--active {
    @apply bg-surface text-ink shadow-sm ring-1 ring-border;
  }

  .cms-settings-nav__icon {
    @apply mt-0.5 inline-flex w-4 shrink-0 justify-center text-muted;
  }

  .cms-settings-nav__link--active .cms-settings-nav__icon {
    @apply text-accent;
  }

  .cms-settings-nav__copy {
    @apply flex min-w-0 flex-col gap-0.5;
  }

  .cms-settings-nav__label {
    @apply text-sm font-medium;
  }

  .cms-settings-nav__hint {
    @apply hidden text-xs text-muted lg:block;
  }

  .cms-settings-nav__footer {
    @apply mt-auto border-t border-border px-3 py-3;
  }

  .cms-settings-nav__site {
    @apply inline-flex items-center gap-2 px-2 py-1.5 text-sm text-muted no-underline hover:text-ink;
  }

  .cms-settings-pane {
    @apply flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto bg-surface-muted;
  }

  .cms-settings-pane__header {
    @apply border-b border-border bg-surface px-4 py-4 lg:px-6 lg:py-5;
  }

  .cms-settings-pane__header h2 {
    @apply text-xl font-semibold text-ink;
  }

  .cms-settings {
    @apply flex flex-col gap-4 px-4 py-4 lg:px-6 lg:py-6;
  }

  .cms-settings__card {
    @apply rounded-sm border border-border bg-surface p-4 lg:p-5;
  }

  .cms-settings__card h2,
  .cms-settings__card h3 {
    @apply mb-4 text-base font-semibold text-ink;
  }

  .cms-settings__grid {
    @apply grid gap-4 md:grid-cols-2;
  }

  .cms-settings__span-2 {
    @apply md:col-span-2;
  }

  .cms-settings__checks {
    @apply mt-4 flex flex-col gap-2;
  }

  .cms-settings__footer {
    @apply flex flex-wrap gap-2;
  }


  .cms-pack-preview {
    @apply mx-4 mb-6 space-y-4 lg:mx-6;
  }
}


