/**
 * Operator Dossier — visual layer.
 *
 * Style language: GD808 archive / admin-bw monochrome.
 * Black surfaces, teal (#19e4e7), light blue (#1457c7), warning red (#ff1738) as accents.
 * Tomorrow / monospace typography. No promotional flourishes.
 */

#operator-dossier {
  display: none;
  width: 100%;
  background: linear-gradient(180deg, #04070b 0%, #09111a 100%);
  color: #f7fbff;
  font-family: var(--venturi-font-body, 'Tomorrow', 'Segoe UI', Roboto, Arial, sans-serif);
  border-top: 1px solid rgba(20, 87, 199, 0.25);
  border-bottom: 1px solid rgba(20, 87, 199, 0.25);
  padding: 36px clamp(20px, 4vw, 60px);
  box-sizing: border-box;
  position: relative;
}

#operator-dossier.is-visible {
  display: block;
}

/* Top divider band echoing admin-bw cp-stage style */
#operator-dossier::before {
  content: "";
  position: absolute;
  top: 0;
  left: clamp(20px, 4vw, 60px);
  width: min(38vw, 320px);
  height: 6px;
  background: linear-gradient(
    90deg,
    #f7fbff 0, #f7fbff 14%,
    transparent 14%, transparent 18%,
    #19e4e7 18%, #19e4e7 56%,
    transparent 56%, transparent 60%,
    #1457c7 60%, #1457c7 100%
  );
  opacity: 0.94;
  pointer-events: none;
}

/* Header line: title + status */
.dossier-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Hero program-seal watermark — large faceted sigil glowing behind header text */
.dossier-header .header-seal {
  position: absolute;
  top: 50%;
  right: -40px;
  transform: translateY(-50%);
  width: 280px;
  height: 280px;
  color: #19e4e7;
  opacity: 0.09;
  pointer-events: none;
  z-index: -1;
  filter: drop-shadow(0 0 32px rgba(8, 215, 255, 0.55));
}
@media (max-width: 720px) {
  .dossier-header .header-seal { width: 200px; height: 200px; right: -60px; opacity: 0.07; }
}

.dossier-eyebrow {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #19e4e7;
  text-transform: uppercase;
  margin: 0 0 6px 0;
}

.dossier-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: #f7fbff;
}

.dossier-meta {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 12px;
  color: #95a5b4;
  text-align: right;
  line-height: 1.6;
}

.dossier-meta .meta-row { display: block; }
.dossier-meta .meta-label { color: #5d6d7c; margin-right: 8px; }
.dossier-meta .meta-value { color: #f7fbff; }
.dossier-meta .meta-value.designation { color: #19e4e7; letter-spacing: 0.06em; }

.dossier-help-link {
  display: inline-block;
  margin-top: 8px;
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #95a5b4;
  text-decoration: none;
  border-bottom: 1px dashed rgba(149, 165, 180, 0.5);
}
.dossier-help-link:hover { color: #19e4e7; border-bottom-color: #19e4e7; }

/* Cycle contribution inline form */
.cycle-contribution {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed rgba(20, 87, 199, 0.3);
}
.cycle-contribution-label {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5d6d7c;
  margin-bottom: 8px;
}
.cycle-contribution input,
.cycle-contribution textarea {
  display: block;
  width: 100%;
  background: #04070b;
  border: 1px solid rgba(20, 87, 199, 0.45);
  color: #f7fbff;
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 12px;
  padding: 8px 10px;
  margin-bottom: 8px;
  outline: none;
  box-sizing: border-box;
  resize: vertical;
}
.cycle-contribution input:focus,
.cycle-contribution textarea:focus { border-color: #19e4e7; }
.cycle-contribution-actions { margin-bottom: 6px; }

/* Grid of modules */
.dossier-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.dossier-module {
  grid-column: span 6;
  background: rgba(11, 18, 27, 0.72);
  border: 1px solid rgba(20, 87, 199, 0.22);
  padding: 22px 24px;
  position: relative;
  min-height: 160px;
}

.dossier-module.full   { grid-column: span 12; }
.dossier-module.third  { grid-column: span 4; }
.dossier-module.two-thirds { grid-column: span 8; }

@media (max-width: 1100px) {
  .dossier-module,
  .dossier-module.third,
  .dossier-module.two-thirds { grid-column: span 12; }
}

.module-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(20, 87, 199, 0.22);
}

.module-ref {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #5d6d7c;
  text-transform: uppercase;
}

.module-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
  color: #f7fbff;
}

.module-status {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid currentColor;
}

.module-status.open    { color: #19e4e7; }
.module-status.pending { color: #ff1738; }
.module-status.archived{ color: #95a5b4; }
.module-status.under-review { color: #f7fbff; }

.module-body {
  font-size: 13.5px;
  line-height: 1.55;
  color: #c9d4dd;
}

.module-body p { margin: 0 0 10px 0; }
.module-body p:last-child { margin-bottom: 0; }

.module-body .kv {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 6px 14px;
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 12px;
}

.module-body .kv .k { color: #5d6d7c; text-transform: uppercase; letter-spacing: 0.08em; }
.module-body .kv .v { color: #f7fbff; }

/* Action buttons / links */
.dossier-action {
  display: inline-block;
  background: transparent;
  border: 1px solid rgba(20, 87, 199, 0.55);
  color: #f7fbff;
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 8px 14px;
  cursor: pointer;
  text-decoration: none;
  margin-top: 12px;
  margin-right: 8px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dossier-action:hover {
  background: rgba(8, 215, 255, 0.12);
  border-color: #19e4e7;
}

.dossier-action.primary { border-color: #19e4e7; color: #19e4e7; }
.dossier-action.primary:hover { background: rgba(8, 215, 255, 0.18); color: #f7fbff; }

.dossier-action.warning { border-color: #ff1738; color: #ff1738; }
.dossier-action.warning:hover { background: rgba(255, 23, 56, 0.12); color: #ff1738; }

.dossier-action[disabled],
.dossier-action.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Cycle module — full width feature */
.cycle-feature .cycle-config {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 28px;
  letter-spacing: 0.06em;
  color: #19e4e7;
  margin: 0 0 4px 0;
}

.cycle-feature .cycle-window {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #95a5b4;
  margin-bottom: 14px;
}

.cycle-feature .cycle-briefing {
  font-size: 14px;
  line-height: 1.55;
  color: #c9d4dd;
  margin-bottom: 16px;
  max-width: 78ch;
}

.cycle-feature .cycle-progress {
  display: flex;
  gap: 0;
  margin: 18px 0 14px 0;
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cycle-feature .progress-step {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid rgba(20, 87, 199, 0.28);
  border-right: none;
  color: #5d6d7c;
  text-align: center;
}

.cycle-feature .progress-step:last-child { border-right: 1px solid rgba(20, 87, 199, 0.28); }

.cycle-feature .progress-step.is-current { color: #f7fbff; background: rgba(8, 215, 255, 0.08); border-color: #19e4e7; }
.cycle-feature .progress-step.is-done    { color: #19e4e7; background: rgba(8, 215, 255, 0.04); }

/* Top row: text column + Steam-styled launch panel on the right */
.cycle-feature .cycle-top-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 8px;
}
@media (min-width: 900px) {
  .cycle-feature .cycle-top-row {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
}

.cycle-feature .cycle-text { min-width: 0; }

/* Steam-styled launch panel
   Borrows Steam's library-page idiom: a dark slab with a large green
   PLAY button and a secondary action below. Tone here is functional —
   the panel reads as the participant's handoff into BeamNG, not as a
   marketing call to action. */
.launch-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: linear-gradient(180deg, #1b2838 0%, #15202b 100%);
  border: 1px solid rgba(102, 192, 244, 0.18);
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  align-self: start;
}

.launch-panel-label {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: #66c0f4;                    /* Steam link blue */
  text-transform: uppercase;
}

.launch-panel-play {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #a4d007 0%, #6aa314 100%);  /* Steam PLAY green */
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  font-family: 'Tomorrow', 'Segoe UI', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 2px 4px rgba(0, 0, 0, 0.35);
  transition: filter 0.15s ease, transform 0.05s ease;
}
.launch-panel-play:hover { filter: brightness(1.08); }
.launch-panel-play:active { transform: translateY(1px); filter: brightness(0.95); }
.launch-panel-play:focus-visible {
  outline: 2px solid #66c0f4;
  outline-offset: 2px;
}

.launch-panel-play-icon {
  font-size: 16px;
  line-height: 1;
}

.launch-panel-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 6px 0;
  border-top: 1px solid rgba(102, 192, 244, 0.12);
  border-bottom: 1px solid rgba(102, 192, 244, 0.12);
}
.launch-panel-meta-k { color: #6d869c; text-transform: uppercase; }
.launch-panel-meta-v { color: #c7d5e0; }

.launch-panel-pair {
  display: block;
  width: 100%;
  padding: 8px 12px;
  background: rgba(103, 193, 245, 0.08);
  border: 1px solid rgba(102, 192, 244, 0.32);
  color: #c7d5e0;
  font-family: 'Tomorrow', 'Segoe UI', sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.launch-panel-pair:hover {
  background: rgba(103, 193, 245, 0.16);
  border-color: rgba(102, 192, 244, 0.55);
}
.launch-panel-pair:focus-visible {
  outline: 2px solid #66c0f4;
  outline-offset: 2px;
}

.launch-panel-status {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #6d869c;
  min-height: 1em;
}
.launch-panel-status.ok { color: #a4d007; }
.launch-panel-status.fail { color: #ff6b6b; }

.launch-panel-store {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 10px;
  margin-top: 4px;
  background: rgba(0, 0, 0, 0.20);
  border: 1px solid rgba(102, 192, 244, 0.18);
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: #b8c6d3;
  transition: border-color 0.12s, color 0.12s;
}
.launch-panel-store:hover {
  border-color: rgba(102, 192, 244, 0.5);
  color: #c7e7ff;
}
.launch-panel-store-k {
  text-transform: uppercase;
  color: #6d869c;
}
.launch-panel-store-v {
  color: #66c0f4;
}

.launch-panel-help-toggle {
  appearance: none;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(102, 192, 244, 0.18);
  margin-top: 4px;
  padding: 8px 0 0 0;
  color: #66c0f4;
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
}
.launch-panel-help-toggle::before {
  content: '+ ';
  display: inline-block;
  width: 1em;
  color: #66c0f4;
}
.launch-panel-help-toggle[aria-expanded="true"]::before { content: '\2212 '; }
.launch-panel-help-toggle:hover { color: #c7e7ff; }

.launch-panel-help-body {
  margin-top: 6px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(102, 192, 244, 0.15);
  color: #b8c6d3;
  font-size: 12px;
  line-height: 1.5;
}
.launch-panel-help-body p {
  margin: 0 0 8px 0;
}
.launch-panel-help-body p:last-child { margin-bottom: 0; }
.launch-panel-help-steps {
  margin: 0 0 8px 0;
  padding-left: 18px;
  font-size: 11.5px;
  color: #9fb1c2;
}
.launch-panel-help-steps li {
  margin-bottom: 4px;
}
.launch-panel-help-foot {
  font-size: 10.5px;
  color: #6d869c;
  letter-spacing: 0.02em;
}

/* Anomaly module */
.anomaly-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.anomaly-fragment {
  border-left: 2px solid rgba(255, 23, 56, 0.55);
  padding: 14px 14px 16px 14px;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background:
    linear-gradient(180deg, rgba(255,23,56,0.04) 0%, transparent 100%);
}

/* Hero provenance glyph — large faceted sigil anchoring each fragment */
.anomaly-fragment .frag-glyph {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  color: rgba(255, 23, 56, 0.78);
  filter: drop-shadow(0 0 14px rgba(255, 23, 56, 0.25));
}
.anomaly-fragment[data-source="footage"]      .frag-glyph { color: #19e4e7; filter: drop-shadow(0 0 14px rgba(8,215,255,0.35)); }
.anomaly-fragment[data-source="signage"]      .frag-glyph { color: #ffba00; filter: drop-shadow(0 0 14px rgba(255,186,0,0.30)); }
.anomaly-fragment[data-source="document"]     .frag-glyph { color: #c9d4dd; filter: drop-shadow(0 0 12px rgba(201,212,221,0.20)); }
.anomaly-fragment[data-source="transmission"] .frag-glyph { color: #ff5cd0; filter: drop-shadow(0 0 14px rgba(255,92,208,0.30)); }
.anomaly-fragment[data-source="unknown"]      .frag-glyph { color: rgba(255,23,56,0.85); }

.anomaly-fragment .frag-body {
  flex: 1;
  min-width: 0;
}

.anomaly-fragment .frag-prov-tag {
  display: inline-block;
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.24em;
  color: #5d6d7c;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.anomaly-fragment .frag-label {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ff1738;
  margin-bottom: 4px;
}

.anomaly-fragment .frag-excerpt {
  font-size: 13px;
  color: #c9d4dd;
  line-height: 1.5;
  font-family: 'Courier New', ui-monospace, monospace;
}

.anomaly-fragment .frag-cite {
  font-size: 11px;
  color: #5d6d7c;
  margin-top: 6px;
  font-style: italic;
}

/* Generic glyph helper */
.gd-glyph {
  display: inline-block;
  vertical-align: middle;
  width: 16px; height: 16px;
  fill: currentColor;
}

/* Reconciled stamp — appears overlaid on the recovery feedback when a code resolves */
.reconciled-stamp {
  display: block;
  width: 320px;
  height: 160px;
  margin: 14px auto 0;
  color: #19e4e7;
  opacity: 0;
  transform: scale(1.6);
  filter: drop-shadow(0 0 20px rgba(8, 215, 255, 0.45));
  transition: opacity 220ms ease-out, transform 320ms cubic-bezier(.2,.9,.3,1.4);
}
.reconciled-stamp.is-active {
  opacity: 0.9;
  transform: scale(1);
}

.recovery-input {
  display: flex;
  gap: 0;
  margin-top: 10px;
}

.recovery-input input {
  flex: 1;
  background: #04070b;
  border: 1px solid rgba(20, 87, 199, 0.45);
  color: #f7fbff;
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 9px 12px;
  border-right: none;
  text-transform: uppercase;
  outline: none;
}

.recovery-input input:focus {
  border-color: #19e4e7;
}

.recovery-input button {
  background: transparent;
  border: 1px solid rgba(20, 87, 199, 0.55);
  color: #19e4e7;
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0 16px;
  cursor: pointer;
}

.recovery-input button:hover { background: rgba(8, 215, 255, 0.12); }

.recovery-feedback {
  margin-top: 10px;
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 12px;
  min-height: 1em;
}

.recovery-feedback.ok      { color: #19e4e7; }
.recovery-feedback.fail    { color: #ff1738; }
.recovery-feedback.neutral { color: #95a5b4; }

/* Stamps module */
.stamp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.stamp {
  border: 1px solid rgba(20, 87, 199, 0.32);
  padding: 10px 12px;
  background: rgba(4, 7, 11, 0.55);
  font-family: 'Courier New', ui-monospace, monospace;
}

.stamp .stamp-code {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #19e4e7;
  margin-bottom: 4px;
  word-break: break-all;
}

.stamp .stamp-cite {
  font-size: 11px;
  color: #95a5b4;
  line-height: 1.4;
}

.stamp .stamp-date {
  font-size: 10px;
  color: #5d6d7c;
  margin-top: 6px;
}

.stamps-empty {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 12px;
  color: #5d6d7c;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Sessions module */
.session-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.session-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(20, 87, 199, 0.22);
}

.session-row:last-child { border-bottom: none; }

.session-when {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #95a5b4;
  line-height: 1.4;
}

.session-when .when-day { color: #f7fbff; font-size: 13px; display: block; }

.session-detail .session-config {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 13px;
  color: #19e4e7;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.session-detail .session-briefing {
  font-size: 12.5px;
  color: #c9d4dd;
  line-height: 1.5;
}

.session-action {
  align-self: center;
}

.session-action .attend-mark {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: #19e4e7;
  text-transform: uppercase;
}

/* Loading state */
.dossier-loading {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #5d6d7c;
  text-align: center;
  padding: 40px 0;
}


/* ---------------------------------------------------------------------------
 * Dossier accordion — teaser collapse / expand
 * The grid is partially obscured by default so participants who arrive for
 * video content are not confronted with a full-screen personnel record.
 * --------------------------------------------------------------------------- */

.dossier-collapse {
  position: relative;
  margin-top: 4px;
}

.dossier-collapse-inner {
  overflow: hidden;
  max-height: 180px;
  transition: max-height 520ms cubic-bezier(.2,.7,.2,1);
}

.dossier-collapse.is-expanded .dossier-collapse-inner {
  max-height: 4000px;
  transition: max-height 720ms cubic-bezier(.2,.7,.2,1);
}

/* Teaser fade — obscures ~80% of the grid until expanded */
.dossier-collapse-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 160px;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(4, 7, 11, 0) 0%,
    rgba(4, 7, 11, 0.55) 35%,
    rgba(4, 7, 11, 0.92) 75%,
    #04070b 100%
  );
  transition: opacity 320ms ease-out;
}
.dossier-collapse.is-expanded .dossier-collapse-fade {
  opacity: 0;
}

/* Large expand button — sits below the teaser */
.dossier-collapse-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  margin-top: -28px;
  padding: 18px 24px 20px 24px;
  background: linear-gradient(180deg, rgba(8, 215, 255, 0.04) 0%, rgba(8, 215, 255, 0.10) 100%);
  border: 1px solid rgba(8, 215, 255, 0.35);
  border-radius: 0;
  color: #19e4e7;
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 2;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
}

.dossier-collapse-toggle:hover {
  background: linear-gradient(180deg, rgba(8, 215, 255, 0.08) 0%, rgba(8, 215, 255, 0.18) 100%);
  border-color: #19e4e7;
  color: #f7fbff;
}

.dossier-collapse-toggle:focus-visible {
  outline: 2px solid #19e4e7;
  outline-offset: 2px;
}

.dossier-collapse-toggle .toggle-chevron {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  transition: transform 360ms cubic-bezier(.2,.7,.2,1);
  filter: drop-shadow(0 0 10px rgba(8, 215, 255, 0.45));
}

.dossier-collapse.is-expanded .dossier-collapse-toggle .toggle-chevron {
  transform: rotate(180deg);
}

.dossier-collapse-toggle .toggle-label-expanded { display: none; }
.dossier-collapse.is-expanded .dossier-collapse-toggle .toggle-label-collapsed { display: none; }
.dossier-collapse.is-expanded .dossier-collapse-toggle .toggle-label-expanded  { display: inline; }

/* ---------------------------------------------------------------------------
 * Hint tooltip system
 * Any element with [data-hint] gets a hover/focus tooltip in plain English.
 * Used to expose what a button does and what is expected of the participant
 * — a quiet cheat-code layer for first-time users.
 * Edge awareness: tooltip flips horizontal anchor (left / center / right) and
 * vertical anchor (above / below) via classes set by the runtime observer in
 * operator-dossier.js so it never overflows the viewport.
 * --------------------------------------------------------------------------- */

[data-hint] { position: relative; }

[data-hint]::before,
[data-hint]::after {
  pointer-events: none;
  opacity: 0;
  position: absolute;
  z-index: 9999;
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}

/* --- Default: above the trigger, centered horizontally --- */
[data-hint]::after {
  content: attr(data-hint);
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, 4px);
  width: max-content;
  max-width: min(320px, calc(100vw - 24px));
  padding: 10px 12px;
  background: #04070b;
  border: 1px solid #19e4e7;
  color: #f7fbff;
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.5;
  text-transform: none;
  text-align: left;
  white-space: normal;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55), 0 0 18px rgba(8, 215, 255, 0.18);
}

/* Caret — by default points down toward the trigger from a tooltip above. */
[data-hint]::before {
  content: '';
  bottom: calc(100% + 4px);
  left: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, 4px) rotate(45deg);
  background: #04070b;
  border-right: 1px solid #19e4e7;
  border-bottom: 1px solid #19e4e7;
}

/* --- Horizontal edge variants --- */
/* Left-anchored: tooltip pinned to trigger's left edge (overflow on right). */
[data-hint].hint-anchor-left::after {
  left: 0;
  right: auto;
  transform: translate(0, 4px);
}
[data-hint].hint-anchor-left:hover::after,
[data-hint].hint-anchor-left:focus-visible::after {
  transform: translate(0, 0);
}
[data-hint].hint-anchor-left::before {
  left: 18px;
  right: auto;
  transform: translate(0, 4px) rotate(45deg);
}
[data-hint].hint-anchor-left:hover::before,
[data-hint].hint-anchor-left:focus-visible::before {
  transform: translate(0, 0) rotate(45deg);
}

/* Right-anchored: tooltip pinned to trigger's right edge (overflow on left). */
[data-hint].hint-anchor-right::after {
  left: auto;
  right: 0;
  transform: translate(0, 4px);
}
[data-hint].hint-anchor-right:hover::after,
[data-hint].hint-anchor-right:focus-visible::after {
  transform: translate(0, 0);
}
[data-hint].hint-anchor-right::before {
  left: auto;
  right: 18px;
  transform: translate(0, 4px) rotate(45deg);
}
[data-hint].hint-anchor-right:hover::before,
[data-hint].hint-anchor-right:focus-visible::before {
  transform: translate(0, 0) rotate(45deg);
}

/* --- Vertical edge variant: flip below when too close to viewport top --- */
[data-hint].hint-below::after {
  bottom: auto;
  top: calc(100% + 10px);
}
[data-hint].hint-below::before {
  bottom: auto;
  top: calc(100% + 4px);
  border-right: none;
  border-bottom: none;
  border-left: 1px solid #19e4e7;
  border-top: 1px solid #19e4e7;
}

/* --- Reveal on hover / focus (default vertical motion) --- */
[data-hint]:hover::before,
[data-hint]:hover::after,
[data-hint]:focus-visible::before,
[data-hint]:focus-visible::after {
  opacity: 1;
}
[data-hint]:hover::after,
[data-hint]:focus-visible::after { transform: translate(-50%, 0); }
[data-hint]:hover::before,
[data-hint]:focus-visible::before { transform: translate(-50%, 0) rotate(45deg); }

/* Touch / coarse pointer: suppress the hover tooltip — fall back to native title. */
@media (hover: none) {
  [data-hint]::before,
  [data-hint]::after { display: none; }
}