:root {
  --clay: #BFE3F2;
  --gold: #FFBF00;
  --ink:  #E8F4F8;
  --cream: #02181C;
  --night: #032124;
  --forest: #08353b;
  --lagoon: #11444f;
  --current: #1d5260;
  --sea: #88bfbf;
  --ice: #cfe9ee;
  --bone: #f5f3ef;
  --white: #ffffff;
  --amber: #ffbf00;
}

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  line-height: 1.7;
  text-wrap: pretty;
}

p {
  orphans: 3;
  widows: 3;
}

h1, h2, h3, h4 {
  text-wrap: balance;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.headline-balance { text-wrap: balance; }

.rule-clay {
  height: 1px;
  background: linear-gradient(90deg, var(--clay), transparent);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

.link-underline {
  background-image: linear-gradient(var(--clay), var(--clay));
  background-size: 0% 1.5px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.link-underline:hover { background-size: 100% 1.5px; }

.score-ring {
  background: conic-gradient(var(--clay) calc(var(--pct) * 1%), #11444F 0);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(191, 227, 242, 0.25);
  border-top-color: var(--clay);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.field-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(191, 227, 242, 0.2);
}

/* Dark card = section en contraste fort sur le site vitrine */
.dark-card {
  background: #0C3A41;
  color: #BFE3F2;
}
.dark-card-deep {
  background: #05272C;
  color: #BFE3F2;
}

/* Panel */
.modal-open { overflow: hidden; }
[data-modal] { transition: opacity 0.2s ease; }
[data-modal].hidden { display: none; }

.tl-track { position: relative; height: 8px; border-radius: 999px; background: #11444F; }
.tl-seg { position: absolute; top: 0; height: 8px; border-radius: 999px; background: var(--clay); opacity: 0.85; }

.marker-chip { transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease; }

/* ── Research workspace design system ─────────────────────────── */
/* Shared card: one radius, one subtle 1px border, one padding scale. */
.rcard {
  border-radius: 16px;
  border: 1px solid rgba(191, 227, 242, 0.12);
  background: #05272C;
  padding: 24px;
}
.rcard-lg { padding: 32px; }
.rcard-sm { padding: 16px; }
.rcard-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(191, 227, 242, 0.55);
}

/* Primary / secondary actions — one primary per screen, top-right. */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 12px; padding: 9px 18px;
  font-size: 14px; font-weight: 600; line-height: 1;
  background: #FFBF00; color: #04262B;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}
.btn-primary:hover { background: #FFD44D; box-shadow: 0 4px 14px -6px rgba(255, 191, 0, 0.6); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 12px; padding: 9px 16px;
  font-size: 14px; font-weight: 600; line-height: 1;
  background: transparent; color: #BFE3F2;
  border: 1px solid rgba(191, 227, 242, 0.22);
  transition: border-color 0.16s ease, background-color 0.16s ease;
}
.btn-ghost:hover { border-color: rgba(191, 227, 242, 0.5); background: rgba(191, 227, 242, 0.06); }

/* Visible keyboard focus on every interactive element. */
.focus-ring:focus-visible,
.rcard a:focus-visible, .rcard button:focus-visible,
.btn-primary:focus-visible, .btn-ghost:focus-visible,
[data-tab]:focus-visible, .kpi:focus-visible {
  outline: 2px solid #FFBF00;
  outline-offset: 2px;
  border-radius: 10px;
}

/* KPI — summary-first numbers. */
.kpi-value { font-family: 'Fraunces', Georgia, serif; font-weight: 600; line-height: 1; color: #E8F4F8; }
.kpi-label { font-size: 12px; font-weight: 500; color: rgba(191, 227, 242, 0.55); }

/* Progress bar — clamped visually by inline width. */
.rprogress { height: 5px; border-radius: 999px; background: rgba(191, 227, 242, 0.12); overflow: hidden; }
.rprogress > span { display: block; height: 100%; border-radius: 999px; background: var(--clay); transition: width 0.5s cubic-bezier(0.16,1,0.3,1); }
.rprogress-gold > span { background: var(--gold); }
textarea[data-autogrow] { resize: none; overflow: hidden; }
.marker-matrix-sticky { position: sticky; left: 0; z-index: 1; background: #05272C; white-space: nowrap; }
.marker-matrix thead .marker-matrix-sticky { z-index: 2; }

/* One-line placeholder for empty fields (progressive disclosure). */
.field-empty { font-size: 13px; font-style: italic; color: rgba(191, 227, 242, 0.4); }

/* Loading skeletons for cards, lists and charts. */
.skel { position: relative; overflow: hidden; background: rgba(191, 227, 242, 0.07); border-radius: 8px; }
.skel::after {
  content: ""; position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(191, 227, 242, 0.10), transparent);
  animation: skelshimmer 1.35s ease-in-out infinite;
}
@keyframes skelshimmer { 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .skel::after { animation: none; } }

/* Compact list rows. */
.rrow { transition: background-color 0.14s ease; }
.rrow:hover { background: rgba(191, 227, 242, 0.05); }

/* Research tabs. */
[data-tab] {
  position: relative; padding: 8px 2px; font-size: 14px; font-weight: 600;
  color: rgba(191, 227, 242, 0.55); transition: color 0.15s ease;
}
[data-tab]:hover { color: #BFE3F2; }
[data-tab].is-active { color: #E8F4F8; }
[data-tab].is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: #FFBF00; border-radius: 2px;
}

.panel-topbar { color: #BFE3F2; }
.panel-topbar-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 1rem;
  row-gap: .5rem;
  min-height: 60px;
}
.panel-top-nav { scrollbar-width: thin; scrollbar-color: #11444F transparent; }
.panel-top-nav a:hover { color: #BFE3F2 !important; background: rgba(191,227,242,0.07) !important; }
.panel-top-nav a[data-active]:hover { background: rgba(191,227,242,0.14) !important; }
@media (max-width: 767px) {
  .panel-topbar-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .panel-top-nav { grid-column: 1 / -1; grid-row: 2; }
  .panel-topbar-controls { grid-column: 2; grid-row: 1; }
}
[data-full-dataset-table] th,
[data-full-dataset-table] td,
[data-engineer-overview] [data-engineer-panel="dataset-overview"] table th,
[data-engineer-overview] [data-engineer-panel="dataset-overview"] table td { padding: .375rem .5rem !important; }
[data-full-dataset-table] th:nth-child(1), [data-full-dataset-table] td:nth-child(1) { width: 34px !important; min-width: 34px !important; max-width: 34px !important; left: 0 !important; padding-right: .2rem !important; padding-left: .2rem !important; }
[data-full-dataset-table] th:nth-child(2), [data-full-dataset-table] td:nth-child(2) { width: 100px !important; min-width: 100px !important; max-width: 100px !important; left: 34px !important; padding-right: .35rem !important; padding-left: .35rem !important; }
[data-full-dataset-table] th:nth-child(3), [data-full-dataset-table] td:nth-child(3) { width: 110px !important; min-width: 110px !important; max-width: 110px !important; left: 134px !important; padding-right: .35rem !important; padding-left: .35rem !important; }
[data-full-dataset-table] th:nth-child(4), [data-full-dataset-table] td:nth-child(4) { width: 120px !important; min-width: 120px !important; max-width: 120px !important; left: 244px !important; padding-right: .35rem !important; padding-left: .35rem !important; }
[data-full-dataset-table] th:nth-child(5), [data-full-dataset-table] td:nth-child(5) { width: 190px !important; min-width: 190px !important; max-width: 190px !important; left: 364px !important; padding-right: .35rem !important; padding-left: .35rem !important; }
[data-full-dataset-table] .ka-dataset-cell-done { color: #0d5663; background: rgba(88,199,216,.18); box-shadow: inset 0 -2px 0 #58c7d8; font-weight: 800; }
.ka-annotation-summary-row.is-finished { background: rgba(88,199,216,.14); box-shadow: inset 4px 0 #58c7d8; }
.ka-annotation-summary-row.is-finished td { color: #D8F8FF; font-weight: 700; }
.ka-annotation-summary-row.is-finished [data-annotation-validation] { outline: 2px solid rgba(88,199,216,.72); outline-offset: 2px; accent-color: #58C7D8; }
.ka-done-badge { display: inline-flex; align-items: center; border: 1px solid rgba(88,199,216,.45); border-radius: 999px; padding: 3px 7px; color: #BFEFFF; background: rgba(88,199,216,.2); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ka-done-badge.is-not-done { border-color: rgba(191,227,242,.14); color: rgba(207,233,238,.45); background: transparent; }
.ka-review-notice { display: inline-flex; max-width: 100%; align-items: center; gap: 8px; border: 1px solid rgba(235,166,124,.42); border-radius: 999px; padding: 6px 10px 6px 8px; color: #FFD0BC; background: rgba(235,166,124,.13); font-size: 12px; font-weight: 700; line-height: 1.35; }
.ka-review-notice::before { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #EBA67C; content: ''; }
.ka-review-notice-prominent { border-radius: 10px; padding: 9px 12px 9px 10px; font-size: 13px; }
.ka-review-row-total { display: inline-flex; align-items: center; gap: 6px; color: #F0B79D; font-size: 12px; font-weight: 700; line-height: 1.35; white-space: nowrap; }
.ka-review-row-total::before { width: 6px; height: 6px; flex: none; border-radius: 50%; background: #EBA67C; content: ''; }
.ka-ask-sue-summary, .ka-ask-sue-badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,191,0,.42); border-radius: 999px; color: #FFE18A; background: rgba(255,191,0,.12); font-weight: 700; line-height: 1.35; }
.ka-ask-sue-summary { padding: 6px 10px; font-size: 12px; }
.ka-ask-sue-badge { padding: 3px 8px; font-size: 11px; letter-spacing: .03em; }
.ka-ask-sue-summary::before, .ka-ask-sue-badge::before { width: 6px; height: 6px; flex: none; border-radius: 50%; background: #FFBF00; content: ''; }

/* Annotation studio v2 */
.ka-studio {
  --ka-side-width: 330px;
  --ka-label-width: 214px;
  --ka-lane-height: 38px;
  color: var(--ink);
}
.ka-studio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.ka-studio-head-actions { display: flex; flex: none; align-items: center; gap: 8px; white-space: nowrap; }
.ka-studio:not(.is-dual-screen) .ka-studio-head-actions { display: grid; width: var(--ka-side-width); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ka-studio:not(.is-dual-screen) .ka-studio-head-actions [data-open-metadata],
.ka-studio:not(.is-dual-screen) .ka-studio-head-actions [data-open-video-screen] { width: auto; min-width: 0; }
.ka-back-link { color: rgba(207,233,238,.58); font-size: 12px; font-weight: 600; }
.ka-back-link:hover { color: var(--gold); }
.ka-status-pill {
  flex: none; border: 1px solid rgba(191,227,242,.16); border-radius: 999px;
  padding: 3px 10px; color: var(--ice); background: rgba(191,227,242,.07);
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.ka-save-state { color: rgba(207,233,238,.54); font-size: 12px; min-width: 100px; text-align: right; }
.ka-save-state.is-saving { color: var(--gold); }
.ka-save-state.is-error { color: #ff8e8e; }
.ka-button, .ka-icon-button, .ka-play-button {
  display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent;
  border-radius: 9px; font-size: 12px; font-weight: 700; line-height: 1; transition: .15s ease;
}
.ka-button { min-height: 34px; padding: 0 13px; }
.ka-button:disabled, .ka-icon-button:disabled { cursor: not-allowed; opacity: .35; }
.ka-button-primary { color: #05272c; background: var(--clay); }
.ka-button-primary:hover { background: var(--ice); }
.ka-button-gold { color: #172c2d; background: var(--gold); }
.ka-button-gold:hover { background: #ffd34d; }
.ka-button-quiet { color: var(--ice); border-color: rgba(191,227,242,.16); background: rgba(191,227,242,.04); }
.ka-button-quiet:hover { border-color: rgba(191,227,242,.38); background: rgba(191,227,242,.09); }
.ka-button-danger { color: #ffadad; border-color: rgba(255,110,110,.25); background: rgba(255,90,90,.07); }
.ka-button-danger:hover { background: rgba(255,90,90,.14); }
.ka-video-grid { display: grid; grid-template-columns: minmax(0, 1fr) var(--ka-side-width); gap: 14px; }
.ka-video-panel, .ka-side-panel, .ka-timeline-panel {
  border: 1px solid rgba(191,227,242,.12); border-radius: 14px; background: #041f24;
  box-shadow: 0 14px 34px rgba(0,0,0,.14);
}
.ka-video-panel { min-width: 0; overflow: hidden; }
.ka-video-stage {
  position: relative; display: flex; height: min(48vh, 510px); min-height: 330px;
  align-items: center; justify-content: center; overflow: hidden; background: #000;
}
.ka-video-world { position: absolute; transform-origin: 0 0; will-change: transform; }
.ka-video-world video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.ka-video-world canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.ka-video-world .ka-tracking-overlay,.ka-companion-video-world .ka-tracking-overlay { z-index: 3; pointer-events: none; }
.ka-video-world.is-pan canvas { cursor: grab; }
.ka-video-world.is-panning canvas { cursor: grabbing; }
.ka-video-world.is-draw canvas { cursor: crosshair; }
.ka-video-world.is-tracking-pick [data-video-overlay],.ka-companion-video-world.is-tracking-pick [data-companion-overlay] { cursor: crosshair; }
.ka-video-world.is-guide-drag [data-video-overlay],.ka-companion-video-world.is-guide-drag [data-companion-overlay] { cursor: grabbing; }
.ka-spatial-toolbar {
  position: absolute; z-index: 5; top: 10px; left: 10px; display: flex; gap: 4px; padding: 4px;
  border: 1px solid rgba(255,255,255,.16); border-radius: 9px; background: rgba(0,0,0,.72); backdrop-filter: blur(8px);
}
.ka-spatial-toolbar button { border-radius: 6px; padding: 6px 8px; color: rgba(255,255,255,.65); font-size: 12px; font-weight: 700; }
.ka-spatial-toolbar button:hover, .ka-spatial-toolbar button.is-active { color: #051f24; background: var(--gold); }
.ka-video-loading {
  position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.55);
  color: rgba(255,255,255,.72); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
}
.ka-frame-badge {
  position: absolute; right: 10px; bottom: 10px; padding: 5px 8px; border-radius: 6px;
  color: rgba(255,255,255,.8); background: rgba(0,0,0,.72); font: 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.ka-tracking-status {
  position: absolute; z-index: 5; bottom: 10px; left: 10px; display: flex; align-items: center; gap: 7px;
  border: 1px solid rgba(103,232,168,.28); border-radius: 999px; padding: 6px 9px;
  color: #dcfff0; background: rgba(0,20,22,.82); font-size: 12px; font-weight: 700; backdrop-filter: blur(8px);
}
.ka-tracking-status i { width: 7px; height: 7px; border-radius: 50%; background: #67e8a8; box-shadow: 0 0 9px rgba(103,232,168,.72); }
.ka-tracking-status.is-searching i { background: var(--gold); box-shadow: 0 0 9px rgba(255,191,0,.72); }
.ka-tracking-status.is-error { border-color: rgba(255,110,110,.35); color: #ffc2c2; }
.ka-tracking-status.is-error i { background: #ff7373; box-shadow: 0 0 9px rgba(255,90,90,.72); }
.ka-transport {
  display: flex; align-items: center; gap: 7px; min-height: 54px; padding: 9px 11px; overflow-x: auto; white-space: nowrap;
  border-top: 1px solid rgba(191,227,242,.1); background: #05272c;
}
.ka-transport-seek-controls { display: flex; min-width: max-content; align-items: center; flex: none; flex-wrap: nowrap; gap: 7px; }
.ka-icon-button { width: 35px; height: 35px; color: var(--ice); border-color: rgba(191,227,242,.15); background: rgba(191,227,242,.045); }
.ka-icon-button:hover { color: #fff; border-color: rgba(191,227,242,.38); background: rgba(191,227,242,.1); }
.ka-transport-jump { width: 39px; padding-right: 4px; padding-left: 4px; font-size: 11px; }
.ka-transport-edge { width: 42px; padding-right: 4px; padding-left: 4px; font-size: 11px; }
.ka-play-button { width: 40px; height: 40px; color: #05272c; background: var(--gold); font-size: 15px; }
.ka-time-readout {
  display: flex; gap: 6px; margin-left: 5px; color: var(--ice); font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}
.ka-rate-label { display: flex; flex: none; align-items: center; gap: 6px; margin-left: 0; color: rgba(207,233,238,.52); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.ka-select-compact { height: 32px; border: 1px solid rgba(191,227,242,.15); border-radius: 7px; padding: 0 7px; color: var(--ice); background: #08353b; font-size: 12px; outline: none; }
.ka-speed-gauge { display: flex; width: clamp(280px, 30vw, 390px); align-items: center; gap: 4px; }
.ka-speed-emoji { display: grid; width: 22px; height: 28px; flex: none; place-items: center; border: 0; border-radius: 6px; padding: 0; color: var(--ice); background: transparent; font-size: 16px; line-height: 1; }
.ka-speed-emoji:hover { background: rgba(191,227,242,.1); transform: scale(1.08); }
.ka-speed-emoji.is-active { color: var(--gold); background: rgba(255,191,0,.1); }
.ka-speed-emoji:focus-visible,.ka-speed-tick:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.ka-speed-scale { position: relative; display: grid; min-width: 0; flex: 1; grid-template-columns: repeat(18, minmax(0,1fr)); align-items: start; padding: 0 2px; }
.ka-speed-scale::before { position: absolute; top: 8px; right: 8px; left: 8px; height: 2px; border-radius: 2px; background: rgba(191,227,242,.24); content: ''; }
.ka-speed-tick { position: relative; z-index: 1; display: flex; min-width: 0; align-items: center; flex-direction: column; gap: 4px; padding: 0 1px; color: rgba(207,233,238,.55); font: inherit; }
.ka-speed-tick i { display: block; width: 2px; height: 9px; border-radius: 2px; background: rgba(191,227,242,.62); transition: width .15s ease, height .15s ease, background .15s ease; }
.ka-speed-tick.is-center i { width: 3px; height: 13px; background: rgba(255,191,0,.78); }
.ka-speed-tick span { overflow: hidden; max-width: 100%; font: 11px/1 ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.ka-speed-tick:hover i,.ka-speed-tick.is-active i { width: 4px; height: 12px; background: var(--gold); }
.ka-speed-tick.is-center:hover i,.ka-speed-tick.is-center.is-active i { height: 15px; }
.ka-speed-tick.is-active { color: #fff; }
.ka-video-zoom-range { width: 92px; accent-color: var(--gold); }
.ka-video-zoom-value { min-width: 35px; color: rgba(207,233,238,.55); font: 12px/1 ui-monospace, monospace; text-align: center; }
.ka-spatial-object-row { display: grid; grid-template-columns: minmax(0,1fr) 34px; gap: 5px; }
.ka-spatial-eye { border: 1px solid rgba(191,227,242,.14); border-radius: 7px; color: var(--ice); background: rgba(191,227,242,.04); font-size: 14px; }
.ka-spatial-eye:hover { border-color: rgba(191,227,242,.35); background: rgba(191,227,242,.09); }
.ka-side-panel { min-width: 0; overflow: hidden; }
.ka-side-open-video { display: flex; gap: 5px; padding: 5px; border-bottom: 1px solid rgba(191,227,242,.1); }
.ka-side-open-video .ka-button { flex: 1; min-width: 0; min-height: 30px; padding-right: 7px; padding-left: 7px; }
.ka-side-tabs { display: grid; grid-template-columns: repeat(2,1fr); border-bottom: 1px solid rgba(191,227,242,.1); }
.ka-side-tabs button { position: relative; padding: 13px 8px; color: rgba(207,233,238,.5); font-size: 12px; font-weight: 700; }
.ka-side-tabs button.is-active { color: var(--ice); background: rgba(191,227,242,.04); }
.ka-side-tabs button.is-active::after { content: ''; position: absolute; right: 16px; bottom: -1px; left: 16px; height: 2px; background: var(--gold); }
.ka-side-content { height: calc(min(48vh, 510px) + 54px - 45px - 40px); min-height: 299px; overflow: auto; padding: 13px; }
.ka-input {
  width: 100%; border: 1px solid rgba(191,227,242,.14); border-radius: 8px; padding: 8px 10px;
  color: var(--ice); background: #05272c; font-size: 12px; line-height: 1.3; outline: none;
}
.ka-input:focus { border-color: var(--clay); box-shadow: 0 0 0 2px rgba(191,227,242,.08); }
.ka-input::placeholder { color: rgba(207,233,238,.3); }
.ka-field { display: grid; gap: 5px; color: rgba(207,233,238,.55); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.ka-track-palette { display: grid; gap: 10px; margin-top: 12px; }
.ka-text-button { color: var(--gold); font-size: 12px; font-weight: 700; }
.ka-text-button:hover { color: #ffe07a; }
.ka-track-manager-row { display: grid; min-width: 0; grid-template-columns: 18px 18px minmax(0,1fr) 24px 24px; align-items: center; gap: 4px; border: 1px solid transparent; border-radius: 8px; padding: 2px 4px; }
.ka-track-manager-row:hover { border-color: rgba(191,227,242,.1); background: rgba(191,227,242,.035); }
.ka-track-manager-row.is-dragging { opacity: .42; }
.ka-track-manager-row.is-drop-before { box-shadow: 0 -2px 0 var(--gold); }
.ka-track-manager-row.is-drop-after { box-shadow: 0 2px 0 var(--gold); }
.ka-track-drag { display: grid; height: 26px; cursor: grab; place-items: center; color: rgba(207,233,238,.28); font-size: 13px; letter-spacing: -2px; }
.ka-track-drag:active { cursor: grabbing; }
.ka-track-visibility { width: 15px; height: 15px; accent-color: var(--gold); }
.ka-metadata-table { width: 100%; min-width: 600px; border-collapse: collapse; color: #E8F4F8; font-size: 14px; }
.ka-metadata-table th, .ka-metadata-table td { border-bottom: 1px solid rgba(191,227,242,.1); padding: 9px 11px; text-align: left; vertical-align: middle; }
.ka-metadata-table thead th { color: rgba(207,233,238,.5); background: rgba(191,227,242,.04); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ka-metadata-table tbody th { width: 126px; color: rgba(207,233,238,.62); font-size: 14px; font-weight: 700; }
.ka-metadata-table tbody td:nth-child(2) { width: 190px; color: rgba(207,233,238,.72); font-size: 14px; }
.ka-metadata-table tbody tr:last-child th, .ka-metadata-table tbody tr:last-child td { border-bottom: 0; }
.ka-metadata-table .ka-metadata-section th { padding-top: 13px; padding-bottom: 7px; color: var(--gold); background: rgba(255,191,0,.06); font-size: 12px; letter-spacing: .09em; text-transform: uppercase; }
.ka-metadata-table .ka-input { min-width: 190px; }
.ka-annotation-metadata-modal { color: #E8F4F8; }
.ka-palette-group { display: grid; gap: 4px; }
.ka-palette-group-title { display: flex; align-items: center; justify-content: space-between; padding: 2px 3px; color: rgba(207,233,238,.4); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.ka-track-choice {
  display: flex; width: 100%; min-width: 0; align-items: center; gap: 8px; min-height: 29px; overflow: hidden; padding: 4px 7px;
  border: 1px solid transparent; border-radius: 7px; color: rgba(232,244,248,.75); font-size: 14px; text-align: left;
}
.ka-track-choice > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ka-track-choice:hover { background: rgba(191,227,242,.06); }
.ka-track-choice.is-active { border-color: rgba(255,191,0,.38); color: #fff; background: rgba(255,191,0,.08); }
.ka-track-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--track-color); box-shadow: 0 0 0 2px color-mix(in srgb, var(--track-color) 20%, transparent); }
.ka-track-choice small { margin-left: auto; color: rgba(207,233,238,.3); font-size: 12px; }
.ka-marker-action-button { display: grid; width: 24px; height: 26px; place-items: center; border-radius: 6px; color: #9a7200; }
.ka-marker-action-button:hover { background: #fff7d6; color: #725600; }
.ka-marker-action { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; border: 1px solid currentColor; border-radius: 50%; font-size: 11px !important; line-height: 1; }
.ka-marker-inference-button { display: grid; width: 24px; height: 26px; place-items: center; border-radius: 6px; color: #58c7d8; font-size: 15px; line-height: 1; transition: .15s ease; }
.ka-marker-inference-button:hover { color: #fff; background: rgba(88,199,216,.14); box-shadow: 0 0 0 1px rgba(88,199,216,.18); }
.ka-marker-inference-button.is-running { color: var(--gold); animation: ka-inference-sparkle 1s ease-in-out infinite; }
.ka-marker-inference-button:disabled { cursor: wait; opacity: .8; }
.ka-add-track { display: grid; gap: 10px; margin-top: 12px; border: 1px solid rgba(88,199,216,.2); border-radius: 10px; padding: 12px; background: rgba(88,199,216,.045); }
.ka-color-input { width: 100%; height: 34px; border: 1px solid rgba(191,227,242,.14); border-radius: 8px; padding: 3px; background: #05272c; }
.ka-empty-note { border: 1px dashed rgba(191,227,242,.15); border-radius: 10px; padding: 24px 14px; color: rgba(207,233,238,.42); font-size: 12px; text-align: center; }
.ka-revision-box { border: 1px solid rgba(191,227,242,.1); border-radius: 9px; padding: 9px 10px; background: rgba(191,227,242,.025); }
.ka-revision-box summary { cursor: pointer; color: rgba(207,233,238,.62); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.ka-revision-item { border-left: 2px solid rgba(191,227,242,.18); padding: 5px 0 5px 9px; color: rgba(207,233,238,.5); font-size: 12px; line-height: 1.45; }
.ka-revision-item strong { color: var(--ice); }
.ka-divider { height: 1px; margin: 18px 0; background: rgba(191,227,242,.1); }
.ka-speed-zone-item, .ka-thread-item { display: flex; align-items: center; gap: 8px; border: 1px solid rgba(191,227,242,.09); border-radius: 7px; padding: 7px 8px; background: rgba(191,227,242,.035); font-size: 12px; }
.ka-speed-zone-item button { margin-left: auto; color: rgba(255,180,180,.7); }
.ka-thread-item { align-items: flex-start; flex-direction: column; }
.ka-thread-status { border-radius: 999px; padding: 2px 6px; color: var(--gold); background: rgba(255,191,0,.09); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.ka-timeline-panel { margin-top: 14px; overflow: hidden; }
.ka-timeline-toolbar { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 15px; padding: 9px 11px; border-bottom: 1px solid rgba(191,227,242,.1); background: #05272c; }
.ka-range-readout { display: flex; gap: 8px; margin-left: 5px; color: rgba(207,233,238,.5); font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.ka-zoom-label { display: flex; align-items: center; gap: 8px; color: rgba(207,233,238,.5); font-size: 12px; }
.ka-zoom-label input { width: 110px; accent-color: var(--gold); }
.ka-overview-wrap { position: relative; display: grid; grid-template-columns: var(--ka-label-width) minmax(0,1fr); height: 48px; border-bottom: 1px solid rgba(191,227,242,.1); background: #031b20; box-shadow: inset 0 0 0 1px rgba(88,199,216,.24); }
.ka-overview-label { display: flex; align-items: center; padding: 0 13px; border-right: 1px solid rgba(191,227,242,.1); color: rgba(207,233,238,.4); font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.ka-overview-wrap canvas { width: 100%; height: 48px; cursor: crosshair; }
.ka-overview-duration { position: absolute; z-index: 3; top: 50%; right: 10px; padding: 4px 7px; border: 1px solid rgba(191,227,242,.13); border-radius: 6px; color: rgba(232,244,248,.72); background: rgba(3,27,32,.82); font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; pointer-events: none; transform: translateY(-50%); }
.ka-timeline-scroll { position: relative; max-height: 44vh; overflow: auto; background: #031b20; overscroll-behavior: contain; }
.ka-timeline-content { position: relative; min-width: 100%; width: max-content; }
.ka-ruler-row, .ka-lane-row { display: flex; width: max-content; min-width: 100%; }
.ka-ruler-row { position: sticky; top: 0; z-index: 12; height: 31px; border-bottom: 1px solid rgba(191,227,242,.12); background: rgba(3,27,32,.97); }
.ka-lane-row { height: var(--ka-lane-height); border-bottom: 1px solid rgba(191,227,242,.065); }
.ka-lane-row:hover { background: rgba(191,227,242,.018); }
.ka-lane-row.is-selected { background: rgba(88,199,216,.08); box-shadow: inset 3px 0 #58c7d8; }
.ka-lane-label {
  position: sticky; left: 0; z-index: 8; display: flex; width: var(--ka-label-width); min-width: var(--ka-label-width);
  align-items: center; gap: 8px; overflow: hidden; padding: 0 12px; border-right: 1px solid rgba(191,227,242,.1);
  color: rgba(232,244,248,.72); background: #041f24; font-size: 14px;
}
.ka-lane-label button { display: flex; min-width: 0; flex: 1; align-items: center; gap: 8px; overflow: hidden; text-align: left; }
.ka-lane-label button span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ka-lane-count { margin-left: auto; color: rgba(207,233,238,.27); font-size: 12px; }
.ka-lane-validation { display: flex; flex: none; align-items: center; justify-content: center; }
.ka-track-validation { width: 15px; height: 15px; accent-color: var(--ice); }
.ka-ruler-label { z-index: 14; color: rgba(207,233,238,.4); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ka-ruler-surface, .ka-lane-surface { position: relative; flex: none; }
.ka-ruler-surface { height: 31px; overflow: hidden; }
.ka-ruler-surface { cursor: zoom-in; }
.ka-ruler-surface canvas { position: absolute; inset: 0; width: 100%; height: 31px; }
.ka-tick-layer { position: absolute; inset: 0; pointer-events: none; }
.ka-ruler-tick { position: absolute; top: 0; bottom: 0; width: 1px; color: rgba(207,233,238,.38); }
.ka-ruler-tick i { position: absolute; top: 19px; left: 0; width: 1px; height: 12px; background: rgba(191,227,242,.2); }
.ka-ruler-tick b { position: absolute; top: 3px; left: 4px; font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.ka-lane-surface { height: var(--ka-lane-height); cursor: crosshair; background-image: linear-gradient(90deg, rgba(191,227,242,.028) 1px, transparent 1px); background-size: 50px 100%; }
.ka-event {
  position: absolute; top: 6px; height: calc(var(--ka-lane-height) - 12px); min-width: 3px; overflow: hidden;
  border: 1px solid #d6b72b; border-radius: 0;
  color: #173b3e; background: #FFF48D; cursor: grab;
  box-shadow: none;
}
.ka-event:hover { filter: brightness(1.14); z-index: 4; }
.ka-event.is-selected { z-index: 5; outline: 1px solid #173b3e; outline-offset: 1px; }
.ka-event.is-in-review { --track-color: #EBA67C; border-color: #B45D32; background: #EBA67C; color: #173B3E; }
.ka-event.is-in-review .ka-event-handle { background: rgba(255,255,255,.28); }
.ka-event.is-legacy-pending { border-style: dashed; border-color: #a45f30; background: #fff0c9; }
.ka-ai-preview-event { position: absolute; z-index: 7; top: 5px; display: flex; min-width: 30px; height: calc(var(--ka-lane-height) - 10px); align-items: center; overflow: hidden; border: 1px dashed #7f1d1d; color: #fff; background: #dc3545; cursor: pointer; box-shadow: 0 1px 5px rgba(127,29,29,.35); }
.ka-ai-preview-event::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(135deg,transparent 0,transparent 6px,rgba(255,255,255,.12) 6px,rgba(255,255,255,.12) 9px); pointer-events: none; }
.ka-ai-preview-label { position: relative; min-width: 0; flex: 1; overflow: hidden; padding: 0 5px; font-size: 11px; font-weight: 900; letter-spacing: .02em; text-overflow: ellipsis; white-space: nowrap; }
.ka-ai-preview-event button { position: relative; display: grid; width: 18px; height: 100%; flex: none; place-items: center; border-left: 1px solid rgba(255,255,255,.3); color: #fff; background: rgba(80,0,5,.18); font-size: 15px; line-height: 1; }
.ka-ai-preview-event button:hover { background: rgba(80,0,5,.48); }
.ka-event-legacy { display: inline-block; border-radius: 999px; padding: 0 3px; color: #fff; background: #a45f30; font-size: 10px; font-style: normal; letter-spacing: .03em; text-transform: uppercase; }
.ka-legacy-verification { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #e4b986; border-radius: 10px; padding: 9px 10px; background: #fff5dd; }
.ka-legacy-verification.hidden { display: none; }
.ka-legacy-verification p { margin-top: 4px; color: #715841; font-size: 12px; line-height: 1.35; }
.ka-legacy-badge { display: inline-flex; border-radius: 999px; padding: 3px 7px; color: #fff; background: #a45f30; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.ka-review-event { cursor: pointer; }
.ka-review-event.is-treated { cursor: default; }
.ka-studio[data-feedback-mode="1"] .ka-review-event.is-treated:not(.is-review-deleted) { cursor: pointer; }
.ka-review-event.is-review-deleted { opacity: .55; text-decoration: line-through; }
.ka-review-original-event { position: absolute; top: 9px; height: calc(var(--ka-lane-height) - 18px); min-width: 3px; border: 1px dashed #EBA67C; border-radius: 0; background: rgba(235,166,124,.25); pointer-events: none; }
.ka-review-done { flex: none; border: 1px solid #b8d4c8; border-radius: 7px; padding: 4px 7px; color: #356a63; background: #edf8f1; font-size: 12px; font-weight: 800; }
.ka-review-done:hover { border-color: #4a8f85; background: #e2f2e8; }
.ka-review-queue { display: grid; gap: 9px; margin-bottom: 13px; }
.ka-review-queue-total { display: grid; min-width: 26px; height: 26px; place-items: center; border-radius: 50%; color: #05272c; background: var(--gold); font: 12px/1 ui-monospace,monospace; }
.ka-side-tabs button .ka-review-queue-total { display: inline-grid; margin-left: 5px; vertical-align: middle; }
.ka-review-type-group { display: grid; gap: 5px; }
.ka-review-type-heading,.ka-review-marker-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ka-review-type-heading { border-top: 1px solid rgba(191,227,242,.1); padding-top: 8px; color: rgba(232,244,248,.8); font-size: 12px; font-weight: 800; }
.ka-review-type-name { display: inline-flex; align-items: center; gap: 6px; }
.ka-review-type-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; }
.ka-review-marker-group { display: grid; gap: 3px; }
.ka-review-marker-heading { padding: 3px 4px 2px 13px; color: rgba(207,233,238,.58); font-size: 11px; font-weight: 800; }
.ka-review-marker-heading strong { color: rgba(232,244,248,.78); font: 11px/1 ui-monospace,monospace; }
.ka-review-marker-list { display: grid; gap: 4px; }
.ka-review-marker-option { display: flex; min-width: 0; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 7px; padding: 7px 8px; color: rgba(232,244,248,.72); background: rgba(191,227,242,.025); font-size: 12px; text-align: left; }
.ka-review-marker-option:hover { border-color: rgba(88,199,216,.36); color: #E8F4F8; background: rgba(88,199,216,.1); }
.ka-review-marker-option .ka-track-dot { width: 8px; height: 8px; }
.ka-review-marker-option-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ka-review-marker-option-slug { margin-left: auto; color: rgba(207,233,238,.4); font: 10px/1 ui-monospace,monospace; }
.ka-review-marker-search { margin-bottom: 9px; }
.ka-review-marker-empty { border: 1px dashed rgba(191,227,242,.15); border-radius: 8px; padding: 10px; color: rgba(207,233,238,.48); font-size: 12px; text-align: center; }
.ka-review-done-check { display: inline-flex; flex: none; align-items: center; gap: 4px; margin-left: auto; border: 1px solid #b8d4c8; border-radius: 7px; padding: 4px 7px; color: #356a63; background: #edf8f1; font-size: 11px; font-weight: 800; }
.ka-review-done-check input { width: 14px; height: 14px; accent-color: #4a8f85; }
.ka-review-queue-item { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 7px; border: 1px solid transparent; border-radius: 6px; padding: 5px 7px 5px 13px; color: rgba(232,244,248,.72); background: rgba(191,227,242,.025); font-size: 12px; text-align: left; }
.ka-review-queue-item:hover,.ka-review-queue-item.is-selected { border-color: rgba(88,199,216,.36); color: #E8F4F8; background: rgba(88,199,216,.1); }
.ka-review-queue-item time { flex: none; color: rgba(207,233,238,.45); font: 10px/1 ui-monospace,monospace; }
.ka-review-queue-empty { border: 1px dashed rgba(191,227,242,.15); border-radius: 8px; padding: 10px; color: rgba(207,233,238,.48); font-size: 12px; text-align: center; }
.ka-review-navigation { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 12px; }
.ka-review-navigation button { min-height: 29px; padding: 0 7px; font-size: 11px; }
.ka-review-navigation span { color: rgba(207,233,238,.48); font: 11px/1 ui-monospace,monospace; }
.ka-review-marker-field { display: grid; gap: 5px; margin-top: 12px; color: rgba(207,233,238,.58); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.ka-review-marker-field .ka-select-compact { width: 100%; text-transform: none; }
.ka-review-create { display: grid; gap: 9px; margin-bottom: 13px; border-bottom: 1px solid rgba(191,227,242,.1); padding-bottom: 13px; }
.ka-review-create.hidden,.ka-review-origin.hidden,.ka-review-marker-field.hidden { display: none; }
.ka-review-time-field { display: grid; gap: 5px; color: rgba(207,233,238,.58); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.ka-review-origin { display: inline-flex; width: fit-content; border: 1px solid rgba(210,164,58,.38); border-radius: 999px; padding: 3px 8px; color: #785b16; background: #fff4c2; font-size: 11px; font-weight: 800; }
.ka-review-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: #87928f; font-size: 11px; }
.ka-review-legend span { display: inline-flex; align-items: center; gap: 4px; }
.ka-review-legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.ka-review-legend-dot.is-yellow { background: #fff1b8; border: 1px solid #d6b72b; }
.ka-review-legend-dot.is-orange { background: #eba67c; }
.ka-review-legend-dot.is-lilac { background: #c2a8e8; }
.ka-temporal-overlap-dot { display: inline-block; width: 8px; height: 8px; flex: none; border: 1px solid #B84F78; border-radius: 50%; background: #E989A8; }
.ka-temporal-overlap-dot.hidden { display: none; }
#reviewerReviewStudio .ka-speed-scale { grid-template-columns: repeat(19, minmax(0,1fr)); }
.ka-event.is-saving { opacity: .58; }
.ka-event-label { display: block; overflow: hidden; padding: 3px 6px; font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.ka-event-handle { position: absolute; top: 0; bottom: 0; width: 6px; cursor: ew-resize; }
.ka-event-handle.is-start { left: 0; }
.ka-event-handle.is-end { right: 0; }
.ka-draft-range { position: absolute; top: 6px; height: calc(var(--ka-lane-height) - 12px); border: 1px dashed #fff; border-radius: 0; background: rgba(255,255,255,.13); pointer-events: none; }
.ka-time-zoom-draft { position: absolute; z-index: 20; top: 0; bottom: 0; min-width: 2px; border: 1px solid rgba(255,239,156,.95); background: rgba(255,191,0,.2); pointer-events: none; box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.ka-playhead { position: absolute; z-index: 10; top: 31px; bottom: 0; width: 1px; background: #ffef9c; pointer-events: none; box-shadow: 0 0 5px rgba(255,239,156,.65); }
.ka-playhead span { position: absolute; top: -5px; left: -4px; width: 9px; height: 9px; transform: rotate(45deg); background: #ffef9c; }
.ka-speed-band { position: absolute; top: 3px; bottom: 3px; border: 1px solid rgba(88,199,216,.52); border-radius: 4px; background: rgba(88,199,216,.13); color: #a8eef5; font: 11px/23px ui-monospace, monospace; text-align: center; overflow: hidden; }
.ka-shortcuts { display: flex; flex-wrap: wrap; gap: 12px; padding: 8px 12px; border-top: 1px solid rgba(191,227,242,.08); color: rgba(207,233,238,.35); font-size: 12px; }
.ka-shortcuts span { display: inline-flex; align-items: center; gap: 4px; }
.ka-shortcuts kbd { border: 1px solid rgba(191,227,242,.15); border-radius: 4px; padding: 1px 4px; color: rgba(207,233,238,.62); background: rgba(191,227,242,.05); font: inherit; }

@media (max-width: 1100px) {
  .ka-studio { --ka-side-width: 290px; --ka-label-width: 180px; }
  .ka-time-readout { display: none; }
}

body.ka-dual-screen-active header { display: none !important; }
body.ka-dual-screen-active main { height: 100vh; overflow: hidden; padding: 10px !important; }
.ka-studio.is-dual-screen { display: grid; height: calc(100vh - 20px); grid-template-columns: minmax(0,1fr) 340px; grid-template-rows: auto minmax(0,1fr); gap: 10px; }
.ka-studio.is-dual-screen .ka-studio-head { grid-column: 1 / -1; }
.ka-studio.is-dual-screen .ka-video-grid { display: contents; }
.ka-studio.is-dual-screen .ka-video-panel { display: none; }
.ka-studio.is-dual-screen .ka-side-panel { grid-column: 2; grid-row: 2; min-height: 0; }
.ka-studio.is-dual-screen .ka-side-content { height: calc(100vh - 132px); }
.ka-studio.is-dual-screen .ka-timeline-panel { grid-column: 1; grid-row: 2; min-height: 0; margin-top: 0; }
.ka-studio.is-dual-screen .ka-timeline-scroll { max-height: calc(100vh - 236px); }

/* Standalone synchronized annotation video screen. */
.ka-companion-body { min-height: 100vh; margin: 0; overflow: hidden; color: var(--ink); background: #000; font-family: "Spline Sans", ui-sans-serif, system-ui, sans-serif; }
.ka-companion { display: grid; height: 100vh; grid-template-rows: auto minmax(0,1fr) auto; background: #000; }
.ka-companion-head { z-index: 4; display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 16px; border-bottom: 1px solid rgba(191,227,242,.13); background: #041f24; }
.ka-companion-kicker { margin: 0; color: rgba(207,233,238,.42); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.ka-companion-head h1 { overflow: hidden; margin: 2px 0 0; color: var(--ice); font-size: 16px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.ka-companion-status { display: flex; flex: none; align-items: center; gap: 7px; border: 1px solid rgba(191,227,242,.14); border-radius: 999px; padding: 5px 10px; color: rgba(207,233,238,.55); font-size: 12px; }
.ka-companion-status i { width: 7px; height: 7px; border-radius: 50%; background: #ffbf00; box-shadow: 0 0 10px rgba(255,191,0,.6); }
.ka-companion-status.is-connected i { background: #67e8a8; box-shadow: 0 0 10px rgba(103,232,168,.65); }
.ka-companion-video-stage { position: relative; min-height: 0; overflow: hidden; background: #000; }
.ka-companion-video-world { position: absolute; transform-origin: 0 0; will-change: transform; }
.ka-companion-video-world video,.ka-companion-video-world canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ka-companion-video-world video { object-fit: fill; }
.ka-companion-video-world canvas { cursor: grab; touch-action: none; }
.ka-companion-video-world.is-panning canvas { cursor: grabbing; }
.ka-companion-frame { position: absolute; right: 12px; bottom: 12px; border-radius: 6px; padding: 5px 8px; color: rgba(255,255,255,.82); background: rgba(0,0,0,.72); font: 12px/1.2 ui-monospace, monospace; }
.ka-companion-hint { position: absolute; z-index: 3; top: 50%; left: 50%; transform: translate(-50%,-50%); border: 1px solid rgba(255,191,0,.45); border-radius: 10px; padding: 12px 16px; color: #fff1a6; background: rgba(0,0,0,.82); font-size: 12px; }
.ka-companion .hidden { display: none !important; }
.ka-companion-controls { z-index: 4; display: flex; min-height: 58px; align-items: center; flex-wrap: wrap; gap: 7px; padding: 9px 12px; border-top: 1px solid rgba(191,227,242,.13); background: #041f24; }
.ka-companion-controls button { height: 34px; border: 1px solid rgba(191,227,242,.16); border-radius: 8px; padding: 0 10px; color: var(--ice); background: rgba(191,227,242,.05); font-size: 12px; font-weight: 700; }
.ka-companion-controls button.is-primary { color: #05272c; background: var(--gold); }
.ka-companion-controls button.is-active { border-color: rgba(255,191,0,.45); color: var(--gold); }
.ka-companion-controls button.hidden { display: none; }
.ka-companion-controls input { min-width: 120px; flex: 1; accent-color: var(--gold); }
.ka-companion-timecode { color: rgba(207,233,238,.62); font: 12px/1 ui-monospace, monospace; white-space: nowrap; }
.ka-companion-controls [data-companion-zoom-value] { min-width: 38px; color: rgba(207,233,238,.5); font: 12px/1 ui-monospace, monospace; text-align: center; }
.ka-companion-controls [data-companion-zoom] { width: 96px; min-width: 72px; flex: 0 1 96px; }
.ka-companion-controls .ka-rate-label { margin-left: 0; color: rgba(207,233,238,.62); }
.ka-companion-controls .ka-speed-gauge { width: 220px; flex: 0 1 220px; }

/* Annotation workspace theme: dark teal page background. */
body.ka-studio-page, body.ka-studio-page main { background: #02181C !important; color: #E8F4F8; }
.ka-studio { color: #173b3e; }
.ka-studio .text-ink { color: #173b3e !important; }
.ka-studio .text-ink-700 { color: #173b3e !important; }
.ka-studio .text-ink-500 { color: #6e7d7b !important; }
.ka-studio-head h2 { color: #173b3e !important; }
.ka-back-link { color: #5f7574; }
.ka-status-pill { border-color: #d9d1c4; color: #315053; background: #f9f6ef; }
.ka-scorer-pill { flex: none; border: 1px solid #ded5c6; border-radius: 999px; padding: 4px 10px; color: #667876; background: #fffdf8; font-size: 12px; }
.ka-scorer-pill strong { color: #173b3e; }
.ka-scorer-editor { display: inline-flex; align-items: center; gap: 5px; }
.ka-scorer-editor input { width: 55px; border: 1px solid #d8d0c3; border-radius: 5px; padding: 2px 4px; color: #173b3e; background: #fff; font: 12px/1.3 ui-monospace,monospace; }
.ka-scorer-editor button { color: #8a6800; font-size: 12px; font-weight: 800; }
.ka-save-state { color: #6e7d7b; }
.ka-button-quiet { color: #28484b; border-color: #d8d0c3; background: #fffdf8; }
.ka-button-quiet:hover { border-color: #9baca9; background: #fff; }
.ka-button-danger { color: #a44444; border-color: #e7c8c2; background: #fff6f3; }
.ka-video-panel,.ka-side-panel,.ka-timeline-panel { border-color: #d9d1c4; background: #fffdf8; box-shadow: 0 12px 28px rgba(61,47,27,.08); }
.ka-transport { flex-wrap: nowrap !important; overflow-x: auto; overflow-y: hidden; border-color: #ded7ca; background: #fbf8f2; }
.ka-icon-button { color: #28484b; border-color: #d7d0c3; background: #fff; }
.ka-icon-button:hover { color: #14373a; border-color: #9aaba9; background: #f3eee4; }
.ka-time-readout { color: #294a4d; }
.ka-rate-label { color: #6d7c7a; }
.ka-select-compact { border-color: #d7d0c3; color: #28484b; background: #fff; }
.ka-video-zoom-value { color: #687876; }
.ka-side-tabs { border-color: #ded7ca; background: #f8f4ec; }
.ka-side-tabs button { color: #71807e; }
.ka-side-tabs button.is-active { color: #173b3e; background: #fffdf8; }
.ka-input { border-color: #d9d1c4; color: #173b3e; background: #fff; }
.ka-input::placeholder { color: #a2aaa7; }
.ka-field { color: #6b7a78; }
.ka-text-button { color: #9a7200; }
.ka-track-manager-row { grid-template-columns: 18px 18px minmax(0,1fr) 24px 24px; }
.ka-track-manager-row:hover { border-color: #e2d9cc; background: #f8f4ed; }
.ka-track-manager-row.is-marking { border-color: #d2a812; background: #fff7d6; box-shadow: 0 0 0 2px rgba(210,168,18,.12); }
.ka-track-visibility { accent-color: #b88700; }
.ka-track-choice { color: #405b5d; }
.ka-track-choice:hover { background: #f3eee5; }
.ka-track-choice.is-active { border-color: #d2a812; color: #173b3e; background: #fff7d6; }
.ka-track-choice small { color: #889491; }
.ka-track-manager-row.is-marking .ka-track-choice small { color: #9a7200; font-weight: 800; }
.ka-studio .ka-marker-inference-button { color: #16717a; }
.ka-studio .ka-marker-inference-button:hover { color: #0c5057; background: #e4f5f6; box-shadow: 0 0 0 1px #b8dfe2; }
.ka-studio .ka-marker-inference-button.is-running { color: #9a7200; }
.ka-add-track { border-color: #cbdcda; background: #f5faf9; }
.ka-empty-note { border-color: #d8d0c4; color: #71807e; background: #faf7f1; }
.ka-revision-box { border-color: #ded7ca; background: #faf7f1; }
.ka-revision-box summary,.ka-revision-item { color: #687876; }
.ka-revision-item { border-color: #cfc6b9; }
.ka-revision-item strong { color: #173b3e; }
.ka-divider { background: #e2dbcf; }
.ka-speed-zone-item,.ka-thread-item { border-color: #ddd5c8; background: #faf7f1; }
.ka-timeline-toolbar { flex-wrap: wrap; border-color: #ded7ca; background: #fbf8f2; }
.ka-button.is-recording { color: #fff; background: #b84c3b; box-shadow: 0 0 0 3px rgba(184,76,59,.14); }
.ka-range-readout { color: #647674; }
.ka-next-rating-label { color: #74817f; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.ka-rating-field { border: 0; padding: 0; }
.ka-rating-field legend { margin-bottom: 6px; color: #6b7a78; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ka-rating-control { display: inline-grid; grid-template-columns: repeat(3,32px); overflow: hidden; border: 1px solid #d3cabd; border-radius: 8px; background: #fff; }
.ka-rating-control button { height: 30px; border-right: 1px solid #e2dbcf; color: #667876; font-size: 12px; font-weight: 800; }
.ka-rating-control button:last-child { border-right: 0; }
.ka-rating-control button.is-active { color: #173b3e; background: #ffd966; }
.ka-overview-wrap { border-color: #0C3A41; background: #05272C; box-shadow: inset 0 0 0 1px #1C6871; }
.ka-overview-label { border-color: #ded7ca; color: #74817f; }
.ka-overview-duration { border-color: rgba(190,181,166,.72); color: #405b5d; background: rgba(255,253,248,.9); }
.ka-timeline-scroll { background: #fffdf8; }
.ka-ruler-row { border-color: #ddd5c8; background: rgba(248,244,236,.97); }
.ka-lane-row { border-color: #ece6dd; }
.ka-lane-row:hover { background: #faf7f1; }
.ka-lane-row.is-selected { background: #e5f2f3; box-shadow: inset 3px 0 #2f6970; }
.ka-lane-row.is-selected .ka-lane-label { background: #edf7f7; }
.ka-lane-row.is-validated { background: #e8f7fa; }
.ka-lane-row.is-validated .ka-lane-label { background: #e0f3f6; }
.ka-lane-row.is-validated .ka-lane-count { color: #397b86; }
.ka-lane-row.is-selected.is-validated { background: #e0f2f5; box-shadow: inset 3px 0 #1c6871, inset 0 1px 0 #b5dfe7, inset 0 -1px 0 #b5dfe7; }
.ka-lane-row.is-dragging { opacity: .45; }
.ka-lane-row.is-drop-before { box-shadow: inset 0 2px 0 #c79a00; }
.ka-lane-row.is-drop-after { box-shadow: inset 0 -2px 0 #c79a00; }
.ka-lane-label { border-color: #ddd5c8; color: #405b5d; background: #fbf8f2; }
.ka-lane-drag { display: grid; width: 18px; flex: none; cursor: grab; place-items: center; color: #a0978a; font-size: 13px; }
.ka-lane-drag:active { cursor: grabbing; }
.ka-lane-count,.ka-ruler-label,.ka-ruler-tick { color: #87928f; }
.ka-track-validation { accent-color: #58c7d8; }
.ka-ruler-tick i { background: #d7d0c3; }
.ka-lane-surface { background-image: linear-gradient(90deg, rgba(63,87,88,.055) 1px, transparent 1px); }
.ka-studio .ka-review-original-event { z-index: 6; top: 7px; height: calc(var(--ka-lane-height) - 14px); border: 2px dashed #355B5E; background: rgba(53,91,94,.18); box-shadow: inset 0 0 0 1px rgba(255,255,255,.75), 0 1px 3px rgba(23,59,62,.16); }
.ka-studio .ka-review-event.is-review-modified { --track-color: #D9784F; border: 2px solid #8B3E24; background: #D9784F; box-shadow: inset 0 0 0 1px rgba(255,246,238,.72), 0 2px 6px rgba(139,62,36,.28); }
.ka-event.is-selected { outline-color: #173b3e; }
.ka-draft-range { border-color: #355b5e; background: rgba(53,91,94,.12); }
.ka-marking-preview {
  z-index: 3;
  border: 1px dashed #b88700;
  background: repeating-linear-gradient(135deg, rgba(255,217,102,.34) 0, rgba(255,217,102,.34) 7px, rgba(255,247,214,.55) 7px, rgba(255,247,214,.55) 14px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
}
.ka-playhead { background: #b88700; box-shadow: 0 0 5px rgba(184,135,0,.4); }
.ka-playhead span { background: #b88700; }
.ka-studio .ka-event,
.ka-studio .ka-review-event.is-review-modified { border-radius: 0; border-color: #d6b72b; background: #FFF48D; box-shadow: none; }
.ka-studio .ka-event.is-in-review { border-color: #B45D32; background: #EBA67C; color: #173B3E; }
.ka-studio .ka-review-event:not(.is-treated):not(.is-unreviewed) { border-color: #B45D32 !important; background: #EBA67C !important; color: #173B3E; box-shadow: inset 0 0 0 1px rgba(255,246,238,.55), 0 2px 6px rgba(139,62,36,.24) !important; }
.ka-studio .ka-review-event.is-treated:not(.is-review-modified):not(.is-review-deleted):not(.is-review-qualitative):not(.is-review-quantitative) { border-color: #1C6871 !important; background: #58C7D8 !important; color: #04262B; box-shadow: inset 0 0 0 1px rgba(232,250,255,.56), 0 2px 6px rgba(28,104,113,.24) !important; }
.ka-studio .ka-review-event.is-review-modified { border-color: #B45D32 !important; background: #EBA67C !important; color: #173B3E; }
.ka-studio .ka-review-event.is-review-deleted { border-color: #8B3024 !important; background: #B84C3B !important; color: #FFF7F3; }
.ka-studio .ka-review-event.is-review-qualitative:not(.is-review-deleted):not(.is-review-modified) { border-color: #B45D32 !important; background: #EBA67C !important; color: #173B3E; }
.ka-studio .ka-review-event.is-review-quantitative:not(.is-review-deleted):not(.is-review-modified) { border-color: #7D5AA8 !important; background: #C2A8E8 !important; color: #2B2040; }
.ka-studio .ka-review-event.is-unreviewed { border-color: #D6B72B !important; background: #FFF1B8 !important; color: #5A4818; box-shadow: inset 0 0 0 1px rgba(255,255,255,.48) !important; }
.ka-studio .ka-event.is-legacy-pending { border-color: #a45f30; background: #fff0c9; }
.ka-studio .ka-event.is-temporal-overlap { border-color: #B84F78 !important; background: #E989A8 !important; color: #4B2030; }
.ka-studio .ka-event.is-selected { z-index: 7; outline: 3px solid #FFBF00; outline-offset: 2px; box-shadow: 0 0 0 5px #02181C !important; filter: none; }
.ka-studio .ka-review-original-event { border-radius: 0; box-shadow: none; }
.ka-studio .ka-marking-preview { box-shadow: none; }
.ka-shortcuts { border-color: #ded7ca; color: #7b8784; background: #fbf8f2; }
.ka-shortcuts kbd { border-color: #d3cabd; color: #455f61; background: #fff; }
.ka-ai-state { flex: none; border-radius: 999px; padding: 4px 7px; color: #6d7b79; background: #eee8dc; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.ka-ai-suggestion { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; border: 1px solid #ddd5c8; border-radius: 9px; padding: 8px; background: #fff; }
.ka-ai-suggestion.is-accepted { border-color: #b9d6c3; background: #f2faf5; }
.ka-ai-suggestion.is-rejected { opacity: .62; }
.ka-ai-seek { display: grid; gap: 2px; text-align: left; }
.ka-ai-seek strong { color: #173b3e; font-size: 12px; }
.ka-ai-seek span,.ka-ai-seek small { color: #71807e; font: 12px/1.35 ui-monospace,monospace; }
.ka-ai-actions { display: grid; gap: 4px; }
.ka-ai-actions button { border: 1px solid #d3cabd; border-radius: 6px; padding: 5px 7px; color: #405b5d; background: #faf7f1; font-size: 12px; font-weight: 800; }
.ka-ai-actions [data-ai-accept] { border-color: #aacfb7; color: #28603c; background: #f0faf3; }
.ka-ai-decision { color: #647674; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.ka-inference-modal { color: #173b3e; }
.ka-inference-modal-head { display: grid; grid-template-columns: 72px minmax(0,1fr); align-items: center; gap: 18px; }
.ka-inference-modal-head h3 { margin-top: 7px; font-family: var(--font-display,inherit); font-size: 27px; font-weight: 650; letter-spacing: -.025em; }
.ka-inference-modal-head p { margin-top: 4px; overflow: hidden; color: #6e7d7b; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ka-inference-static-badge { display: inline-flex; border: 1px solid #e3c95d; border-radius: 999px; padding: 4px 8px; color: #806000; background: #fff7d6; font-size: 12px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.ka-inference-orbit { position: relative; display: grid; width: 68px; height: 68px; place-items: center; border: 1px solid #b9dcdf; border-radius: 50%; color: #12636c; background: radial-gradient(circle at 50% 50%,#fff 0,#edf8f8 58%,#d9eff0 100%); box-shadow: 0 10px 28px rgba(22,113,122,.14); }
.ka-inference-orbit span { font-size: 26px; animation: ka-inference-sparkle 1s ease-in-out infinite; }
.ka-inference-orbit i,.ka-inference-orbit b { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #d2a812; box-shadow: 0 0 0 3px rgba(210,168,18,.14); animation: ka-inference-orbit 1.9s linear infinite; }
.ka-inference-orbit b { width: 5px; height: 5px; background: #58c7d8; animation-delay: -.95s; }
.ka-inference-progress-track { height: 8px; margin-top: 27px; overflow: hidden; border-radius: 999px; background: #e8e1d6; }
.ka-inference-progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#16717a,#58c7d8,#d2a812); transition: width .1s linear; }
.ka-inference-progress-copy { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-top: 9px; color: #687876; font-size: 12px; }
.ka-inference-progress-copy strong { flex: none; color: #173b3e; font: 12px/1 ui-monospace,SFMono-Regular,Menlo,monospace; }
.ka-inference-disclaimer,.ka-inference-mail-state { display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 10px; margin-top: 21px; border: 1px solid #dfd6c9; border-radius: 12px; padding: 13px 14px; color: #5d706e; background: #faf7f1; font-size: 12px; line-height: 1.5; }
.ka-inference-disclaimer > span,.ka-inference-mail-state > span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: #806000; background: #fff1b9; font-weight: 900; }
.ka-inference-disclaimer strong { color: #173b3e; }
.ka-inference-mail-state { margin-top: 10px; border-color: #c9e2e3; background: #f1f9f9; }
.ka-inference-mail-state > span { color: #12636c; background: #dceff0; }
.ka-inference-mail-state p.is-warning { color: #9a4d36; }
.ka-inference-request-id { min-height: 14px; margin-top: 8px; color: #8a9693; font: 12px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace; text-align: right; }
.ka-inference-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.ka-inference-modal.is-inference-complete .ka-inference-orbit { border-color: #9ccbb1; color: #28744b; background: #eff9f2; }
.ka-inference-modal.is-inference-complete .ka-inference-orbit i,.ka-inference-modal.is-inference-complete .ka-inference-orbit b,
.ka-inference-modal.is-inference-error .ka-inference-orbit i,.ka-inference-modal.is-inference-error .ka-inference-orbit b { animation-play-state: paused; }
.ka-inference-modal.is-inference-error .ka-inference-orbit { border-color: #e4b8ad; color: #a44444; background: #fff3ef; }
@keyframes ka-inference-sparkle { 0%,100% { opacity: .55; transform: scale(.88) rotate(-8deg); } 50% { opacity: 1; transform: scale(1.16) rotate(8deg); } }
@keyframes ka-inference-orbit { from { transform: rotate(0deg) translateX(29px) rotate(0deg); } to { transform: rotate(360deg) translateX(29px) rotate(-360deg); } }
@media (prefers-reduced-motion: reduce) { .ka-marker-inference-button.is-running,.ka-inference-orbit span,.ka-inference-orbit i,.ka-inference-orbit b { animation: none; } }
.ka-compact-toggle {
  align-items: center; gap: 7px; min-height: 34px; border: 1px solid #d8d0c3; border-radius: 9px;
  padding: 0 9px; color: #526967; background: #fffdf8; font-size: 12px; font-weight: 700;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.ka-compact-toggle:hover { border-color: #9baca9; color: #173b3e; background: #fff; }
.ka-compact-toggle.is-active { border-color: #d3aa18; color: #725600; background: #fff7d6; }
.ka-compact-switch { position: relative; width: 27px; height: 16px; border-radius: 999px; background: #d8d0c3; transition: background .15s ease; }
.ka-compact-switch b { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(61,47,27,.22); transition: transform .15s ease; }
.ka-compact-toggle.is-active .ka-compact-switch { background: #d3aa18; }
.ka-compact-toggle.is-active .ka-compact-switch b { transform: translateX(11px); }
.ka-guide-toggle {
  display: inline-flex; min-height: 32px; align-items: center; gap: 6px; border: 1px solid #d7d0c3; border-radius: 8px;
   padding: 0 8px; color: #6d7c7a; background: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.ka-guide-toggle strong { min-width: 18px; color: #687876; font-size: 12px; }
.ka-guide-toggle.is-active { border-color: #d3aa18; color: #725600; background: #fff7d6; }
.ka-guide-toggle.is-active strong { color: #725600; }
.ka-guide-toggle.is-active .ka-compact-switch { background: #d3aa18; }
.ka-guide-toggle.is-active .ka-compact-switch b { transform: translateX(11px); }
.ka-studio-resizer { display: none; }
body.ka-studio-resizing { cursor: row-resize !important; user-select: none; }

.sparkline path { vector-effect: non-scaling-stroke; }

input[type="range"].clay-range { accent-color: var(--clay); }

.panel-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.panel-scroll::-webkit-scrollbar-thumb { background: #11444F; border-radius: 999px; }

/* Focus area accordion */
.focus-card-label {
  text-shadow: 0 1px 8px rgba(2, 24, 28, 0.9);
}
.focus-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(10px);
  transition: max-height 0.8s cubic-bezier(0.22, 0.61, 0.36, 1),
              opacity 0.6s ease,
              transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.focus-card[data-open] .focus-body {
  max-height: 500px;
  opacity: 1;
  transform: translateY(0);
}
.focus-card[data-open] .focus-chevron {
  transform: rotate(180deg);
}

@media (min-width: 1024px) {
  /* Annotation focus mode: keep the essential controls in a single viewport
   and allocate the remaining height between video and timelines. */
  html.ka-annotation-compact body.ka-studio-page header {
    display: none !important;
  }
  html.ka-annotation-compact body.ka-feedback-page header {
    display: block !important;
  }
  html.ka-annotation-compact body.ka-studio-page main {
    height: 100vh;
    overflow: hidden;
    padding: 6px !important;
  }
  html.ka-annotation-compact body.ka-feedback-page main {
    height: calc(100vh - 60px);
  }
  html.ka-annotation-compact .ka-studio:not(.is-dual-screen) {
    --ka-side-width: 220px;
    --ka-label-width: 174px;
    --ka-lane-height: 28px;
    display: grid;
    height: calc(100vh - 12px);
    grid-template-rows: auto minmax(220px, var(--ka-compact-video-height, 1.55fr)) 6px minmax(124px, 1fr);
    gap: 3px;
  }
  html.ka-annotation-compact body.ka-feedback-page .ka-studio:not(.is-dual-screen) {
    height: calc(100vh - 72px);
  }
  html.ka-annotation-compact .ka-studio-head {
    min-height: 30px;
    gap: 8px;
    margin-bottom: 0;
  }
  html.ka-annotation-compact .ka-studio-head > div:last-child {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    justify-content: flex-end;
    gap: 5px;
  }
  html.ka-annotation-compact .ka-studio-head h2 { font-size: 16px; }
  html.ka-annotation-compact .ka-back-link { display: inline-flex; }
  html.ka-annotation-compact .ka-button { min-height: 30px; padding-right: 9px; padding-left: 9px; }
  html.ka-annotation-compact .ka-video-grid {
    height: 100%;
    min-height: 0;
    grid-template-columns: minmax(0,1fr) var(--ka-side-width);
    gap: 6px;
  }
  html.ka-annotation-compact .ka-studio:not(.is-dual-screen) > .ka-studio-resizer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d9d1c4;
    border-radius: 999px;
    background: #eee8dc;
    cursor: row-resize;
    outline: none;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  }
  html.ka-annotation-compact .ka-studio-resizer:hover,
  html.ka-annotation-compact .ka-studio-resizer:focus-visible,
  html.ka-annotation-compact .ka-studio-resizer.is-dragging {
    border-color: #c79a00;
    background: #fff2be;
    box-shadow: 0 0 0 2px rgba(199,154,0,.13);
  }
  html.ka-annotation-compact .ka-studio-resizer > span {
    display: flex;
    align-items: center;
    gap: 3px;
  }
  html.ka-annotation-compact .ka-studio-resizer i {
    display: block;
    width: 18px;
    height: 1px;
    background: #8d8272;
  }
  html.ka-annotation-compact .ka-studio-resizer i:nth-child(2) { width: 26px; }
  html.ka-annotation-compact .ka-video-panel {
    display: flex;
    min-height: 0;
    flex-direction: column;
  }
  html.ka-annotation-compact .ka-video-stage {
    height: auto;
    min-height: 0;
    flex: 1;
  }
  html.ka-annotation-compact .ka-transport {
    min-height: 36px;
    flex: none;
    gap: 4px;
    padding: 2px 4px;
  }
  html.ka-annotation-compact .ka-transport-seek-controls { flex-basis: auto; gap: 4px; }
  html.ka-annotation-compact .ka-icon-button { width: 28px; height: 28px; }
  html.ka-annotation-compact .ka-play-button { width: 30px; height: 30px; }
  html.ka-annotation-compact .ka-video-zoom-range,
  html.ka-annotation-compact .ka-rate-label > span { display: none; }
  html.ka-annotation-compact .ka-rate-label { gap: 3px; margin-left: 0; }
  html.ka-annotation-compact .ka-time-readout { margin-right: auto; margin-left: 2px; }
  html.ka-annotation-compact .ka-speed-gauge { width: 280px; gap: 2px; }
  html.ka-annotation-compact .ka-speed-emoji { width: 19px; height: 27px; font-size: 14px; }
  html.ka-annotation-compact .ka-speed-tick span { display: none; }
  html.ka-annotation-compact .ka-side-panel { height: 100%; min-height: 0; }
  html.ka-annotation-compact .ka-side-open-video { padding: 3px; }
  html.ka-annotation-compact .ka-side-tabs button { padding: 7px 3px; font-size: 11px; }
  html.ka-annotation-compact .ka-side-content {
    height: calc(100% - 72px);
    min-height: 0;
    padding: 6px;
  }
  html.ka-annotation-compact .ka-track-palette { gap: 4px; margin-top: 6px; }
  html.ka-annotation-compact .ka-palette-group { gap: 1px; }
  html.ka-annotation-compact .ka-track-manager-row { gap: 2px; padding: 1px 2px; }
  html.ka-annotation-compact .ka-track-choice { min-height: 23px; padding: 1px 2px; font-size: 13px; }
  html.ka-annotation-compact .ka-divider { margin: 10px 0; }
  html.ka-annotation-compact .ka-timeline-panel {
    display: flex;
    min-height: 0;
    flex-direction: column;
    margin-top: 0;
  }
  html.ka-annotation-compact .ka-timeline-toolbar {
    min-height: 36px;
    flex: none;
    gap: 6px;
    padding: 2px 4px;
  }
  html.ka-annotation-compact .ka-timeline-toolbar > div { gap: 4px; }
  html.ka-annotation-compact .ka-overview-wrap {
    height: 27px;
    flex: none;
  }
  html.ka-annotation-compact .ka-overview-wrap canvas { height: 27px; }
  html.ka-annotation-compact .ka-overview-label { padding-right: 8px; padding-left: 8px; }
  html.ka-annotation-compact .ka-ruler-row { height: 26px; }
  html.ka-annotation-compact .ka-ruler-surface { height: 26px; }
  html.ka-annotation-compact .ka-ruler-surface canvas { height: 26px; }
  html.ka-annotation-compact .ka-ruler-tick i { top: 15px; height: 11px; }
  html.ka-annotation-compact .ka-ruler-tick b { top: 2px; }
  html.ka-annotation-compact .ka-playhead { top: 26px; }
  html.ka-annotation-compact .ka-lane-label { padding-right: 8px; padding-left: 8px; }
  html.ka-annotation-compact .ka-event { top: 4px; height: calc(var(--ka-lane-height) - 8px); }
  html.ka-annotation-compact .ka-event-label { padding: 2px 5px; }
  html.ka-annotation-compact .ka-history-button { min-height: 28px; padding-right: 7px; padding-left: 7px; }
  html.ka-annotation-compact .ka-timeline-scroll {
    min-height: 0;
    max-height: none;
    flex: 1;
  }
  html.ka-annotation-compact .ka-shortcuts { display: none; }
}

/* ==========================================================================
   Gantt strategic roadmap
   ========================================================================== */
.gantt-wrap {
  display: grid;
  grid-template-columns: 340px 1fr;
  border: 1px solid rgba(191,227,242,0.12);
  border-radius: 16px;
  overflow: hidden;
  background: #041f24;
  height: calc(100vh - 220px);
  min-height: 480px;
}
.gantt-left {
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid rgba(191,227,242,0.12);
  background: #05272C;
  flex-shrink: 0;
}
.gantt-right {
  overflow: auto;
  position: relative;
  background: #041f24;
}
.gantt-timeline-grid {
  position: relative;
  min-width: 100%;
}
.gantt-header-row {
  display: flex;
  background: #05272C;
  border-bottom: 1px solid rgba(191,227,242,0.15);
}
.gantt-header-cell {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: rgba(191,227,242,0.65);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-right: 1px solid rgba(191,227,242,0.08);
  white-space: nowrap;
  overflow: hidden;
  user-select: none;
}
.gantt-header-year {
  font-size: 13px;
  font-weight: 700;
  color: #E8F4F8;
  font-family: 'Fraunces', Georgia, serif;
  border-bottom: 1px solid rgba(191,227,242,0.12);
}
.gantt-header-quarter {
  font-size: 12px;
  color: rgba(191,227,242,0.5);
  border-bottom: 1px solid rgba(191,227,242,0.08);
}
.gantt-row {
  position: relative;
  display: flex;
  height: 40px;
  border-bottom: 1px solid rgba(191,227,242,0.06);
}
.gantt-row-month {
  flex-shrink: 0;
  border-right: 1px solid rgba(191,227,242,0.04);
  height: 100%;
}
.gantt-row-month.alt-month {
  background: rgba(191,227,242,0.015);
}
.gantt-row-quarter-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(191,227,242,0.08);
}
.gantt-row-year-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(191,227,242,0.12);
}
.gantt-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #FFBF00;
  z-index: 15;
  pointer-events: none;
}
.gantt-today-line::before {
  content: '';
  position: absolute;
  top: 0;
  left: -5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #FFBF00;
}
.gantt-track-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid rgba(191,227,242,0.06);
  transition: background 0.12s ease;
}
.gantt-track-header:hover { background: rgba(191,227,242,0.04); }
.gantt-track-color {
  width: 4px;
  height: 24px;
  border-radius: 2px;
  flex-shrink: 0;
}
.gantt-track-title {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #E8F4F8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gantt-track-chevron {
  flex-shrink: 0;
  color: rgba(191,227,242,0.45);
  transition: transform 0.18s ease;
}
.gantt-track-chevron.collapsed { transform: rotate(-90deg); }
.gantt-subtrack-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 28px;
  font-size: 12px;
  color: rgba(191,227,242,0.75);
  border-bottom: 1px solid rgba(191,227,242,0.03);
  position: relative;
  height: 40px;
}
.gantt-subtrack-row:hover { background: rgba(191,227,242,0.03); }
.gantt-subtrack-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(191,227,242,0.3);
  flex-shrink: 0;
}
.gantt-subtrack-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gantt-bar {
  position: absolute;
  top: 6px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: #04262B;
  cursor: grab;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  z-index: 5;
  transition: box-shadow 0.15s ease, filter 0.15s ease;
  user-select: none;
}
.gantt-bar:hover { filter: brightness(1.1); box-shadow: 0 3px 12px -3px rgba(0,0,0,0.4); z-index: 8; }
.gantt-bar:active { cursor: grabbing; }
.gantt-bar.dragging { z-index: 12; box-shadow: 0 6px 20px -4px rgba(0,0,0,0.5); opacity: 0.92; }
.gantt-bar-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  cursor: ew-resize;
  z-index: 6;
}
.gantt-bar-handle.left { left: 0; border-radius: 6px 0 0 6px; }
.gantt-bar-handle.right { right: 0; border-radius: 0 6px 6px 0; }
.gantt-bar-handle:hover { background: rgba(0,0,0,0.18); }
.gantt-milestone {
  position: absolute;
  top: 8px;
  width: 22px;
  height: 22px;
  transform: rotate(45deg);
  z-index: 7;
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}
.gantt-milestone:hover { box-shadow: 0 0 0 3px rgba(255,255,255,0.15); z-index: 10; }
.gantt-milestone-label {
  position: absolute;
  top: 34px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(191,227,242,0.7);
  white-space: nowrap;
  pointer-events: none;
  transform: rotate(-45deg);
  transform-origin: top left;
}
.gantt-drag-ghost {
  position: absolute;
  top: 6px;
  height: 28px;
  border-radius: 6px;
  border: 2px dashed rgba(191,227,242,0.5);
  background: rgba(191,227,242,0.08);
  z-index: 11;
  pointer-events: none;
}
.gantt-focus-note-btn {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(191,227,242,0.5);
  transition: color 0.12s ease, background 0.12s ease;
}
.gantt-focus-note-btn:hover { color: #FFBF00; background: rgba(255,191,0,0.08); }
.gantt-focus-note-btn.has-note { color: #FFBF00; }
.gantt-actions-btn {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(191,227,242,0.4);
  transition: color 0.12s ease, background 0.12s ease;
}
.gantt-actions-btn:hover { color: #BFE3F2; background: rgba(191,227,242,0.06); }
.gantt-zoom-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 120px;
  height: 4px;
  border-radius: 2px;
  background: rgba(191,227,242,0.15);
  outline: none;
  cursor: pointer;
}
.gantt-zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #FFBF00;
  cursor: pointer;
  border: 2px solid #04262B;
}
.gantt-zoom-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #FFBF00;
  cursor: pointer;
  border: 2px solid #04262B;
}
.gantt-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 100vw;
  z-index: 60;
  background: #05272C;
  border-left: 1px solid rgba(191,227,242,0.15);
  box-shadow: -12px 0 40px -10px rgba(0,0,0,0.4);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16,1,0.3,1);
}
.gantt-drawer.open { transform: translateX(0); }
.gantt-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(4,38,43,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.gantt-drawer-overlay.open { opacity: 1; pointer-events: auto; }
.gantt-focus-popover {
  position: fixed;
  z-index: 65;
  width: 340px;
  background: #08353B;
  border: 1px solid rgba(191,227,242,0.15);
  border-radius: 12px;
  box-shadow: 0 12px 40px -8px rgba(0,0,0,0.5);
  padding: 18px;
}
.gantt-empty-row-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  font-size: 12px;
  color: rgba(191,227,242,0.2);
  pointer-events: none;
  white-space: nowrap;
}

/* ==========================================================================
   Rendu mobile du site vitrine (<768px) — rapproché de la version bureau
   ========================================================================== */
@media (max-width: 767px) {

  /* Règle 5 — marges latérales et overflow horizontal */
  html, body { overflow-x: hidden; }

  main .px-6 { padding-left: 14px !important; padding-right: 14px !important; }

  /* Espacements verticaux entre sections resserrés */
  main .py-16, main .py-20, main .py-24, main .py-28, main .py-32, main .py-14 { padding-top: 40px !important; padding-bottom: 40px !important; }
  main .pt-16, main .pt-20, main .pt-24, main .pt-28, main .pt-32 { padding-top: 40px !important; }
  main .pb-16, main .pb-20, main .pb-24, main .pb-28, main .pb-32 { padding-bottom: 40px !important; }
  main .mt-16 { margin-top: 36px !important; }
  main .mt-14 { margin-top: 32px !important; }

  /* Règle 1 — sections hero immersives */
  .hero-immersive { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
  .hero-immersive img[aria-hidden="true"] {
    object-fit: cover !important;
    object-position: center center !important;
  }

  /* Règle 2 — grilles multi-cartes : conserver le nombre de colonnes du bureau.
     Les classes Tailwind responsive n'ont aucun effet sous leur breakpoint, on
     réutilise donc leurs sélecteurs échappés pour rétablir les colonnes ici.
     Exclut le panel (main.panel-scroll) dont les grilles doivent s'empiler
     normalement sur mobile, pas être forcées en multi-colonnes. */
  main:not(.panel-scroll) .grid.md\:grid-cols-3:not(.keep-stack),
  main:not(.panel-scroll) .grid.sm\:grid-cols-3:not(.keep-stack),
  main:not(.panel-scroll) .grid.lg\:grid-cols-3:not(.keep-stack) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  main:not(.panel-scroll) .grid.md\:grid-cols-2:not(.keep-stack),
  main:not(.panel-scroll) .grid.sm\:grid-cols-2:not(.keep-stack),
  main:not(.panel-scroll) .grid.lg\:grid-cols-2:not(.keep-stack) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  /* 4 colonnes — stats science, partenaires about */
  main:not(.panel-scroll) .grid.md\:grid-cols-4:not(.keep-stack),
  main:not(.panel-scroll) .grid.sm\:grid-cols-4:not(.keep-stack) {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  /* 5 colonnes — focus areas science, case grid cases */
  main:not(.panel-scroll) .grid.lg\:grid-cols-5:not(.keep-stack),
  main:not(.panel-scroll) .grid.xl\:grid-cols-5:not(.keep-stack) {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 3px !important;
  }

  /* Grilles template custom 2 colonnes (lg:grid-cols-[…]) — splits texte/image */
  main:not(.panel-scroll) .grid[class*="lg:grid-cols-["]:not(.keep-stack):not(.person-media) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  /* Anti-overflow : autoriser le passage à la ligne sur mobile */
  main .whitespace-nowrap { white-space: normal !important; }

  /* Densité interne des cartes de ces grilles */
  main:not(.panel-scroll) .grid.md\:grid-cols-3:not(.keep-stack) > *,
  main:not(.panel-scroll) .grid.sm\:grid-cols-3:not(.keep-stack) > *,
  main:not(.panel-scroll) .grid.lg\:grid-cols-3:not(.keep-stack) > *,
  main:not(.panel-scroll) .grid.md\:grid-cols-2:not(.keep-stack) > *,
  main:not(.panel-scroll) .grid.sm\:grid-cols-2:not(.keep-stack) > *,
  main:not(.panel-scroll) .grid.lg\:grid-cols-2:not(.keep-stack) > * {
    padding: 9px !important;
  }

  /* Titres de carte 10–11px, corps 9–10px */
  main:not(.panel-scroll) .grid.md\:grid-cols-3:not(.keep-stack) h2, main:not(.panel-scroll) .grid.md\:grid-cols-3:not(.keep-stack) h3, main:not(.panel-scroll) .grid.md\:grid-cols-3:not(.keep-stack) h4,
  main:not(.panel-scroll) .grid.sm\:grid-cols-3:not(.keep-stack) h2, main:not(.panel-scroll) .grid.sm\:grid-cols-3:not(.keep-stack) h3, main:not(.panel-scroll) .grid.sm\:grid-cols-3:not(.keep-stack) h4,
  main:not(.panel-scroll) .grid.lg\:grid-cols-3:not(.keep-stack) h2, main:not(.panel-scroll) .grid.lg\:grid-cols-3:not(.keep-stack) h3, main:not(.panel-scroll) .grid.lg\:grid-cols-3:not(.keep-stack) h4,
  main:not(.panel-scroll) .grid.md\:grid-cols-2:not(.keep-stack) h2, main:not(.panel-scroll) .grid.md\:grid-cols-2:not(.keep-stack) h3, main:not(.panel-scroll) .grid.md\:grid-cols-2:not(.keep-stack) h4,
  main:not(.panel-scroll) .grid.sm\:grid-cols-2:not(.keep-stack) h2, main:not(.panel-scroll) .grid.sm\:grid-cols-2:not(.keep-stack) h3, main:not(.panel-scroll) .grid.sm\:grid-cols-2:not(.keep-stack) h4,
  main:not(.panel-scroll) .grid.lg\:grid-cols-2:not(.keep-stack) h2, main:not(.panel-scroll) .grid.lg\:grid-cols-2:not(.keep-stack) h3, main:not(.panel-scroll) .grid.lg\:grid-cols-2:not(.keep-stack) h4 {
    font-size: 12px !important;
    line-height: 1.25 !important;
  }
  main:not(.panel-scroll) .grid.md\:grid-cols-3:not(.keep-stack) p, main:not(.panel-scroll) .grid.md\:grid-cols-3:not(.keep-stack) li,
  main:not(.panel-scroll) .grid.sm\:grid-cols-3:not(.keep-stack) p, main:not(.panel-scroll) .grid.sm\:grid-cols-3:not(.keep-stack) li,
  main:not(.panel-scroll) .grid.lg\:grid-cols-3:not(.keep-stack) p, main:not(.panel-scroll) .grid.lg\:grid-cols-3:not(.keep-stack) li,
  main:not(.panel-scroll) .grid.md\:grid-cols-2:not(.keep-stack) p, main:not(.panel-scroll) .grid.md\:grid-cols-2:not(.keep-stack) li,
  main:not(.panel-scroll) .grid.sm\:grid-cols-2:not(.keep-stack) p, main:not(.panel-scroll) .grid.sm\:grid-cols-2:not(.keep-stack) li,
  main:not(.panel-scroll) .grid.lg\:grid-cols-2:not(.keep-stack) p, main:not(.panel-scroll) .grid.lg\:grid-cols-2:not(.keep-stack) li {
    font-size: 12.5px !important;
    line-height: 1.4 !important;
  }

  /* Icônes décoratives des cartes réduites à 14–16px.
     Ciblage restreint aux icônes portant des attributs width/height explicites
     (les SVG de graphiques utilisent viewBox + classes de taille et sont épargnés). */
  main:not(.panel-scroll) .grid.md\:grid-cols-3:not(.keep-stack) svg[width],
  main:not(.panel-scroll) .grid.sm\:grid-cols-3:not(.keep-stack) svg[width],
  main:not(.panel-scroll) .grid.lg\:grid-cols-3:not(.keep-stack) svg[width],
  main:not(.panel-scroll) .grid.md\:grid-cols-2:not(.keep-stack) svg[width],
  main:not(.panel-scroll) .grid.sm\:grid-cols-2:not(.keep-stack) svg[width],
  main:not(.panel-scroll) .grid.lg\:grid-cols-2:not(.keep-stack) svg[width] {
    width: 15px !important;
    height: 15px !important;
  }
  main:not(.panel-scroll) .grid.md\:grid-cols-3:not(.keep-stack) .font-display,
  main:not(.panel-scroll) .grid.sm\:grid-cols-3:not(.keep-stack) .font-display,
  main:not(.panel-scroll) .grid.lg\:grid-cols-3:not(.keep-stack) .font-display,
  main:not(.panel-scroll) .grid.md\:grid-cols-2:not(.keep-stack) .font-display,
  main:not(.panel-scroll) .grid.sm\:grid-cols-2:not(.keep-stack) .font-display,
  main:not(.panel-scroll) .grid.lg\:grid-cols-2:not(.keep-stack) .font-display {
    font-size: 15px !important;
    line-height: 1.1 !important;
  }
  /* Conteneurs d'icônes : réduire les pastilles fixes pour rester dans la carte */
  main:not(.panel-scroll) .grid.md\:grid-cols-3:not(.keep-stack) .h-11, main:not(.panel-scroll) .grid.md\:grid-cols-3:not(.keep-stack) .h-12, main:not(.panel-scroll) .grid.md\:grid-cols-3:not(.keep-stack) .h-14,
  main:not(.panel-scroll) .grid.sm\:grid-cols-3:not(.keep-stack) .h-11, main:not(.panel-scroll) .grid.sm\:grid-cols-3:not(.keep-stack) .h-12, main:not(.panel-scroll) .grid.sm\:grid-cols-3:not(.keep-stack) .h-14,
  main:not(.panel-scroll) .grid.lg\:grid-cols-3:not(.keep-stack) .h-11, main:not(.panel-scroll) .grid.lg\:grid-cols-3:not(.keep-stack) .h-12, main:not(.panel-scroll) .grid.lg\:grid-cols-3:not(.keep-stack) .h-14,
  main:not(.panel-scroll) .grid.md\:grid-cols-2:not(.keep-stack) .h-11, main:not(.panel-scroll) .grid.md\:grid-cols-2:not(.keep-stack) .h-12, main:not(.panel-scroll) .grid.md\:grid-cols-2:not(.keep-stack) .h-14,
  main:not(.panel-scroll) .grid.sm\:grid-cols-2:not(.keep-stack) .h-11, main:not(.panel-scroll) .grid.sm\:grid-cols-2:not(.keep-stack) .h-12, main:not(.panel-scroll) .grid.sm\:grid-cols-2:not(.keep-stack) .h-14,
  main:not(.panel-scroll) .grid.lg\:grid-cols-2:not(.keep-stack) .h-11, main:not(.panel-scroll) .grid.lg\:grid-cols-2:not(.keep-stack) .h-12, main:not(.panel-scroll) .grid.lg\:grid-cols-2:not(.keep-stack) .h-14 {
    width: 26px !important; height: 26px !important; border-radius: 8px !important;
  }

  /* Densité 4 colonnes — plus serré que 2/3 colonnes */
  main:not(.panel-scroll) .grid.md\:grid-cols-4:not(.keep-stack) > *,
  main:not(.panel-scroll) .grid.sm\:grid-cols-4:not(.keep-stack) > * {
    padding: 6px !important;
  }
  main:not(.panel-scroll) .grid.md\:grid-cols-4:not(.keep-stack) h2, main:not(.panel-scroll) .grid.md\:grid-cols-4:not(.keep-stack) h3, main:not(.panel-scroll) .grid.md\:grid-cols-4:not(.keep-stack) h4,
  main:not(.panel-scroll) .grid.sm\:grid-cols-4:not(.keep-stack) h2, main:not(.panel-scroll) .grid.sm\:grid-cols-4:not(.keep-stack) h3, main:not(.panel-scroll) .grid.sm\:grid-cols-4:not(.keep-stack) h4 {
    font-size: 12px !important; line-height: 1.2 !important;
  }
  main:not(.panel-scroll) .grid.md\:grid-cols-4:not(.keep-stack) p, main:not(.panel-scroll) .grid.md\:grid-cols-4:not(.keep-stack) li,
  main:not(.panel-scroll) .grid.sm\:grid-cols-4:not(.keep-stack) p, main:not(.panel-scroll) .grid.sm\:grid-cols-4:not(.keep-stack) li {
    font-size: 12px !important; line-height: 1.35 !important;
  }
  main:not(.panel-scroll) .grid.md\:grid-cols-4:not(.keep-stack) svg[width],
  main:not(.panel-scroll) .grid.sm\:grid-cols-4:not(.keep-stack) svg[width] {
    width: 13px !important; height: 13px !important;
  }
  main:not(.panel-scroll) .grid.md\:grid-cols-4:not(.keep-stack) .font-display,
  main:not(.panel-scroll) .grid.sm\:grid-cols-4:not(.keep-stack) .font-display {
    font-size: 13px !important; line-height: 1.1 !important;
  }

  /* Densité 5 colonnes — le plus serré */
  main:not(.panel-scroll) .grid.lg\:grid-cols-5:not(.keep-stack) > *,
  main:not(.panel-scroll) .grid.xl\:grid-cols-5:not(.keep-stack) > * {
    padding: 4px !important;
  }
  main:not(.panel-scroll) .grid.lg\:grid-cols-5:not(.keep-stack) h2, main:not(.panel-scroll) .grid.lg\:grid-cols-5:not(.keep-stack) h3, main:not(.panel-scroll) .grid.lg\:grid-cols-5:not(.keep-stack) h4,
  main:not(.panel-scroll) .grid.xl\:grid-cols-5:not(.keep-stack) h2, main:not(.panel-scroll) .grid.xl\:grid-cols-5:not(.keep-stack) h3, main:not(.panel-scroll) .grid.xl\:grid-cols-5:not(.keep-stack) h4 {
    font-size: 12px !important; line-height: 1.15 !important;
  }
  main:not(.panel-scroll) .grid.lg\:grid-cols-5:not(.keep-stack) p, main:not(.panel-scroll) .grid.lg\:grid-cols-5:not(.keep-stack) li,
  main:not(.panel-scroll) .grid.xl\:grid-cols-5:not(.keep-stack) p, main:not(.panel-scroll) .grid.xl\:grid-cols-5:not(.keep-stack) li {
    font-size: 11px !important; line-height: 1.3 !important;
  }
  main:not(.panel-scroll) .grid.lg\:grid-cols-5:not(.keep-stack) svg[width],
  main:not(.panel-scroll) .grid.xl\:grid-cols-5:not(.keep-stack) svg[width] {
    width: 11px !important; height: 11px !important;
  }
  main:not(.panel-scroll) .grid.lg\:grid-cols-5:not(.keep-stack) .font-display,
  main:not(.panel-scroll) .grid.xl\:grid-cols-5:not(.keep-stack) .font-display {
    font-size: 12px !important; line-height: 1.05 !important;
  }

  /* Densité grilles template custom 2 colonnes — splits texte/image */
  main:not(.panel-scroll) .grid[class*="lg:grid-cols-["]:not(.keep-stack):not(.person-media) h2,
  main:not(.panel-scroll) .grid[class*="lg:grid-cols-["]:not(.keep-stack):not(.person-media) h3,
  main:not(.panel-scroll) .grid[class*="lg:grid-cols-["]:not(.keep-stack):not(.person-media) h4 {
    font-size: 13px !important; line-height: 1.2 !important;
  }
  main:not(.panel-scroll) .grid[class*="lg:grid-cols-["]:not(.keep-stack):not(.person-media) p,
  main:not(.panel-scroll) .grid[class*="lg:grid-cols-["]:not(.keep-stack):not(.person-media) li {
    font-size: 11.5px !important; line-height: 1.4 !important;
  }
  main:not(.panel-scroll) .grid[class*="lg:grid-cols-["]:not(.keep-stack):not(.person-media) svg[width] {
    width: 14px !important; height: 14px !important;
  }
  main:not(.panel-scroll) .grid[class*="lg:grid-cols-["]:not(.keep-stack):not(.person-media) .font-display {
    font-size: 14px !important; line-height: 1.1 !important;
  }

  /* Réduire le padding des cartes dans les splits template custom */
  main:not(.panel-scroll) .grid[class*="lg:grid-cols-["]:not(.keep-stack):not(.person-media) .p-8,
  main:not(.panel-scroll) .grid[class*="lg:grid-cols-["]:not(.keep-stack):not(.person-media) .p-6,
  main:not(.panel-scroll) .grid[class*="lg:grid-cols-["]:not(.keep-stack):not(.person-media) .p-5 {
    padding: 10px !important;
  }

  /* Tailwind text-size overrides pour grilles 4 et 5 colonnes */
  main:not(.panel-scroll) .grid.md\:grid-cols-4:not(.keep-stack) .text-sm,
  main:not(.panel-scroll) .grid.sm\:grid-cols-4:not(.keep-stack) .text-sm {
    font-size: 12px !important;
  }
  main:not(.panel-scroll) .grid.md\:grid-cols-4:not(.keep-stack) .text-xs,
  main:not(.panel-scroll) .grid.sm\:grid-cols-4:not(.keep-stack) .text-xs {
    font-size: 11px !important;
  }
  main:not(.panel-scroll) .grid.lg\:grid-cols-5:not(.keep-stack) .text-sm,
  main:not(.panel-scroll) .grid.xl\:grid-cols-5:not(.keep-stack) .text-sm {
    font-size: 11px !important;
  }
  main:not(.panel-scroll) .grid.lg\:grid-cols-5:not(.keep-stack) .text-xs,
  main:not(.panel-scroll) .grid.xl\:grid-cols-5:not(.keep-stack) .text-xs {
    font-size: 10px !important;
  }

  /* Contrainte images dans grilles 4 colonnes (logos partenaires) */
  main:not(.panel-scroll) .grid.md\:grid-cols-4:not(.keep-stack) img,
  main:not(.panel-scroll) .grid.sm\:grid-cols-4:not(.keep-stack) img {
    max-width: 100% !important;
    max-height: 44px !important;
  }

  /* Réduire le padding des éléments imbriqués dans les grilles 5 colonnes */
  main:not(.panel-scroll) .grid.lg\:grid-cols-5:not(.keep-stack) .p-3,
  main:not(.panel-scroll) .grid.lg\:grid-cols-5:not(.keep-stack) .p-4,
  main:not(.panel-scroll) .grid.lg\:grid-cols-5:not(.keep-stack) .p-5,
  main:not(.panel-scroll) .grid.xl\:grid-cols-5:not(.keep-stack) .p-3,
  main:not(.panel-scroll) .grid.xl\:grid-cols-5:not(.keep-stack) .p-4,
  main:not(.panel-scroll) .grid.xl\:grid-cols-5:not(.keep-stack) .p-5 {
    padding: 4px !important;
  }
  main:not(.panel-scroll) .grid.lg\:grid-cols-5:not(.keep-stack) .space-y-2 > * + *,
  main:not(.panel-scroll) .grid.xl\:grid-cols-5:not(.keep-stack) .space-y-2 > * + * {
    margin-top: 2px !important;
  }
  /* Conteneur d'image carré des focus cards : rester compact */
  main:not(.panel-scroll) .grid.lg\:grid-cols-5:not(.keep-stack) .h-24 {
    height: auto !important;
  }

  /* Règle 3 — photos de personnes côte à côte du texte (bloc Dyson home) */
  .person-media { display: flex !important; flex-direction: row !important; align-items: flex-start !important; gap: 12px !important; }
  .person-media .person-photo { width: 32% !important; flex: 0 0 32% !important; margin-top: 0 !important; }
  .person-media .person-body { width: 68% !important; flex: 1 1 auto !important; }

  /* Règle 4 — invest : hero immersif + séparation countdown / How it works */
  .invest-hero { position: relative !important; min-height: 100svh; background: #02181C !important; }
  /* L'image proportionnelle plein largeur devient le fond couvrant */
  .invest-hero > img:not([aria-hidden="true"]) {
    position: absolute !important; inset: 0 !important;
    width: 100% !important; height: 100% !important;
    object-fit: cover !important; object-position: center center !important;
  }
  .invest-hero > img[aria-hidden="true"] {
    object-fit: cover !important; object-position: center center !important;
  }
  /* Le contenu reprend le flux pour éviter tout chevauchement avec la suite */
  .invest-hero .invest-hero-overlay {
    position: relative !important;
    min-height: 100svh;
    padding-top: 48px !important; padding-bottom: 48px !important;
  }
  .invest-countdown {
    position: relative !important;
    margin-top: 24px !important; margin-bottom: 32px !important;
    z-index: 1 !important;
  }
}

body.ka-studio-page,
body.ka-studio-page main { background: #02181C !important; color: #E8F4F8; }
.ka-studio { color: #E8F4F8; }
.ka-studio .text-ink,
.ka-studio .text-ink-700,
.ka-studio-head h2 { color: #E8F4F8 !important; }
.ka-studio .text-ink-500 { color: rgba(207,233,238,.62) !important; }
.ka-studio .ka-back-link { color: rgba(207,233,238,.68); }
.ka-studio .ka-status-pill,
.ka-studio .ka-scorer-pill { border-color: rgba(191,227,242,.18); color: #BFE3F2; background: #0C3A41; }
.ka-studio .ka-scorer-pill strong { color: #E8F4F8; }
.ka-studio .ka-scorer-editor input,
.ka-studio .ka-input { border-color: rgba(191,227,242,.18); color: #E8F4F8; background: #05272C; }
.ka-studio .ka-save-state { color: rgba(207,233,238,.62); }
.ka-studio .ka-button-quiet { color: #BFE3F2; border-color: rgba(191,227,242,.18); background: rgba(191,227,242,.06); }
.ka-studio .ka-button-quiet:hover { border-color: rgba(191,227,242,.4); background: rgba(191,227,242,.12); }
.ka-studio .ka-button-danger { color: #ffadad; border-color: rgba(255,110,110,.28); background: rgba(255,90,90,.09); }
.ka-studio .ka-video-panel,
.ka-studio .ka-side-panel,
.ka-studio .ka-timeline-panel { border-color: rgba(191,227,242,.14); background: #041F24; box-shadow: 0 14px 34px rgba(0,0,0,.2); }
.ka-studio .ka-transport,
.ka-studio .ka-timeline-toolbar,
.ka-studio .ka-shortcuts { border-color: rgba(191,227,242,.12); background: #05272C; }
.ka-studio .ka-icon-button { color: #BFE3F2; border-color: rgba(191,227,242,.18); background: rgba(191,227,242,.06); }
.ka-studio .ka-icon-button:hover { color: #E8F4F8; border-color: rgba(191,227,242,.42); background: rgba(191,227,242,.12); }
.ka-studio .ka-time-readout { color: #CFE9EE; }
.ka-studio .ka-rate-label,
.ka-studio .ka-range-readout { color: rgba(207,233,238,.62); }
.ka-studio .ka-next-rating-label,
.ka-studio .ka-rating-field legend,
.ka-studio .ka-video-zoom-value { color: rgba(207,233,238,.62); }
.ka-studio .ka-select-compact { border-color: rgba(191,227,242,.18); color: #BFE3F2; background: #0C3A41; }
.ka-studio .ka-speed-emoji { color: #BFE3F2; }
.ka-studio .ka-speed-emoji.is-active { color: #FFBF00; background: rgba(255,191,0,.1); }
.ka-studio .ka-speed-scale::before { background: rgba(191,227,242,.3); }
.ka-studio .ka-speed-tick { color: rgba(207,233,238,.64); }
.ka-studio .ka-speed-tick i { background: rgba(191,227,242,.72); }
.ka-studio .ka-speed-tick.is-center i { background: rgba(255,191,0,.86); }
.ka-studio .ka-speed-tick.is-active { color: #E8F4F8; }
.ka-studio .ka-rating-control { border-color: rgba(191,227,242,.2); background: #0C3A41; }
.ka-studio .ka-rating-control button { border-color: rgba(191,227,242,.16); color: #BFE3F2; background: #05272C; }
.ka-studio .ka-rating-control button.is-active { color: #04262B; background: #FFBF00; }
.ka-studio .ka-side-tabs { border-color: rgba(191,227,242,.12); background: #05272C; }
.ka-studio .ka-side-tabs button { color: rgba(207,233,238,.62); }
.ka-studio .ka-side-tabs button.is-active { color: #E8F4F8; background: #0C3A41; }
.ka-studio [data-side-panel="review"] .text-xs { font-size: 13px; }
.ka-studio [data-side-panel="review"] .text-sm { font-size: 15px; }
.ka-studio [data-side-panel="review"] .ka-input { font-size: 14px; }
.ka-studio [data-side-panel="review"] .ka-button { font-size: 13px; }
.ka-studio [data-side-panel="review"] .ka-thread-item { font-size: 14px; }
.ka-studio [data-side-panel="review"] .ka-thread-status { font-size: 12px; }
.ka-studio [data-side-panel="review"] .ka-empty-note { font-size: 14px; }
.ka-studio .ka-field { color: rgba(207,233,238,.62); }
.ka-studio .ka-input::placeholder { color: rgba(207,233,238,.36); }
.ka-studio .ka-track-manager-row:hover { border-color: rgba(191,227,242,.16); background: rgba(191,227,242,.06); }
.ka-studio .ka-track-choice { color: rgba(232,244,248,.82); }
.ka-studio .ka-track-choice:hover { background: rgba(191,227,242,.08); }
.ka-studio .ka-track-choice.is-active { border-color: rgba(88,199,216,.42); color: #E8F4F8; background: #0C3A41; }
.ka-studio .ka-track-choice small { color: rgba(207,233,238,.42); }
.ka-studio.is-global-review .ka-track-manager-row,
.ka-studio.is-reviewer-review .ka-track-manager-row { grid-template-columns: minmax(0,1fr); }
.ka-studio.is-global-review .ka-track-choice > span:last-child,
.ka-studio.is-reviewer-review .ka-track-choice > span:last-child { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.ka-studio input[data-metadata-session-key="ask_sue"] + span { background: #0C3A41; }
.ka-studio input[data-metadata-session-key="ask_sue"]:checked + span { background: #58C7D8; }
.ka-studio .ka-add-track,
.ka-studio .ka-revision-box,
.ka-studio .ka-speed-zone-item,
.ka-studio .ka-thread-item,
.ka-studio .ka-empty-note,
.ka-studio .ka-legacy-verification { border-color: rgba(191,227,242,.16); background: #05272C; }
.ka-studio .ka-empty-note,
.ka-studio .ka-revision-box summary,
.ka-studio .ka-revision-item { color: rgba(207,233,238,.62); }
.ka-studio .ka-revision-item { border-color: rgba(191,227,242,.24); }
.ka-studio .ka-revision-item strong { color: #E8F4F8; }
.ka-studio .ka-divider { background: rgba(191,227,242,.12); }
.ka-studio .ka-overview-label { border-color: rgba(191,227,242,.12); color: rgba(207,233,238,.62); }
.ka-studio .ka-overview-duration { border-color: rgba(191,227,242,.2); color: #CFE9EE; background: rgba(4,31,36,.9); }
.ka-studio .ka-timeline-scroll { background: #031B20; }
.ka-studio .ka-ruler-row { border-color: rgba(191,227,242,.14); background: rgba(3,27,32,.97); }
.ka-studio .ka-lane-row { border-color: rgba(191,227,242,.08); }
.ka-studio .ka-lane-row:hover { background: rgba(191,227,242,.04); }
.ka-studio .ka-lane-row.is-selected { background: #08353B; box-shadow: inset 3px 0 #58C7D8; }
.ka-studio .ka-lane-row.is-selected .ka-lane-label { background: #0C3A41; }
.ka-studio .ka-lane-row.is-validated { background: #073138; }
.ka-studio .ka-lane-row.is-validated .ka-lane-label { background: #08353B; }
.ka-studio .ka-lane-row.is-validated .ka-lane-count { color: #58C7D8; }
.ka-studio .ka-lane-row.is-selected.is-validated { background: #0C3A41; box-shadow: inset 3px 0 #58C7D8, inset 0 1px 0 rgba(88,199,216,.42), inset 0 -1px 0 rgba(88,199,216,.42); }
.ka-studio .ka-lane-label { border-color: rgba(191,227,242,.12); color: rgba(232,244,248,.82); background: #041F24; }
.ka-studio .ka-lane-count,
.ka-studio .ka-ruler-label,
.ka-studio .ka-ruler-tick { color: rgba(207,233,238,.48); }
.ka-studio .ka-ruler-tick i { background: rgba(191,227,242,.24); }
.ka-studio .ka-shortcuts { color: rgba(207,233,238,.48); }
.ka-studio .ka-shortcuts kbd { border-color: rgba(191,227,242,.2); color: #CFE9EE; background: rgba(191,227,242,.06); }
.ka-studio .ka-ai-state { color: rgba(207,233,238,.7); background: #0C3A41; }
.ka-studio .ka-ai-suggestion,
.ka-studio .ka-ai-actions button { border-color: rgba(191,227,242,.16); color: #E8F4F8; background: #05272C; }
.ka-studio .ka-ai-seek strong { color: #E8F4F8; }
.ka-studio .ka-ai-seek span,
.ka-studio .ka-ai-seek small,
.ka-studio .ka-ai-decision { color: rgba(207,233,238,.62); }
#modalRoot .ka-inference-modal,
.ka-studio .ka-inference-modal { color: #E8F4F8; }
.ka-studio .ka-inference-progress-track { background: rgba(191,227,242,.12); }
.ka-studio .ka-inference-progress-copy { color: rgba(207,233,238,.68); }
.ka-studio .ka-inference-progress-copy strong { color: #E8F4F8; }
.ka-studio .ka-inference-disclaimer,
.ka-studio .ka-inference-mail-state { border-color: rgba(191,227,242,.16); color: rgba(207,233,238,.7); background: #05272C; }
.ka-studio .ka-inference-disclaimer strong { color: #E8F4F8; }
#modalRoot .ka-inference-disclaimer,
#modalRoot .ka-inference-mail-state { border-color: rgba(191,227,242,.16); color: rgba(207,233,238,.7); background: #05272C; }
#modalRoot .ka-inference-disclaimer strong { color: #E8F4F8; }
.ka-studio .ka-compact-toggle,
.ka-studio .ka-guide-toggle { border-color: rgba(191,227,242,.18); color: #BFE3F2; background: #05272C; }
.ka-studio .ka-compact-toggle:hover,
.ka-studio .ka-guide-toggle:hover { border-color: rgba(191,227,242,.42); color: #E8F4F8; background: #0C3A41; }
.ka-studio .ka-compact-switch { background: #0C3A41; }
html.ka-annotation-compact .ka-studio:not(.is-dual-screen) > .ka-studio-resizer { border-color: rgba(191,227,242,.18) !important; background: #05272C !important; }
html.ka-annotation-compact .ka-studio:not(.is-dual-screen) > .ka-studio-resizer:hover,
html.ka-annotation-compact .ka-studio:not(.is-dual-screen) > .ka-studio-resizer:focus-visible,
html.ka-annotation-compact .ka-studio:not(.is-dual-screen) > .ka-studio-resizer.is-dragging { border-color: #FFBF00 !important; background: #0C3A41 !important; }
html.ka-annotation-compact .ka-studio-resizer i { background: rgba(191,227,242,.58); }
[data-full-dataset-table] th:nth-child(1),
[data-full-dataset-table] tbody td:nth-child(1) { width: 34px !important; min-width: 34px !important; max-width: 34px !important; left: 0 !important; padding-left: 4px !important; padding-right: 4px !important; }
[data-full-dataset-table] th:nth-child(2),
[data-full-dataset-table] tbody td:nth-child(2) { width: 100px !important; min-width: 100px !important; max-width: 100px !important; left: 34px !important; padding-left: 8px !important; padding-right: 8px !important; }
[data-full-dataset-table] th:nth-child(3),
[data-full-dataset-table] tbody td:nth-child(3) { width: 110px !important; min-width: 110px !important; max-width: 110px !important; left: 134px !important; padding-left: 8px !important; padding-right: 8px !important; }
[data-full-dataset-table] th:nth-child(4),
[data-full-dataset-table] tbody td:nth-child(4) { width: 120px !important; min-width: 120px !important; max-width: 120px !important; left: 244px !important; padding-left: 8px !important; padding-right: 8px !important; }
[data-full-dataset-table] th:nth-child(5),
[data-full-dataset-table] tbody td:nth-child(5) { width: 190px !important; min-width: 190px !important; max-width: 190px !important; left: 364px !important; padding-left: 8px !important; padding-right: 8px !important; }

.text-\[7px\] { font-size: 10px !important; }
.text-\[8px\] { font-size: 11px !important; }
.text-\[9px\] { font-size: 12px !important; }
.text-\[10px\] { font-size: 13px !important; }
.text-\[11px\] { font-size: 13px !important; }

@media print {
  .grain,
  .no-print,
  header,
  footer,
  #toast,
  #modalRoot,
  #sidebar,
  #sidebarBackdrop,
  #sidebarToggle {
    display: none !important;
  }

  body,
  main {
    background: #fff !important;
    color: #04262B !important;
  }

  main,
  .panel-scroll {
    overflow: visible !important;
    height: auto !important;
  }
}
