/* DOR-SEA: How DOR connects. Scoped to .dc. Uses the DOR-SEA tokens from sea.css when present. */
/* DOR Advanced Technologies. DOR-ID 000000011 */
.dc {
  --dc-sans: var(--sea-sans, "DOR Sans", system-ui, -apple-system, "Segoe UI", sans-serif);
  --dc-serif: var(--sea-serif, "DOR Serif", Georgia, serif);
  --dc-text: var(--sea-text, #F2F2F2);
  --dc-text-2: var(--sea-text-2, #B8BFC4);
  --dc-text-3: var(--sea-text-3, #85909A);
  --dc-line: var(--sea-line, rgba(233,229,221,.10));
  --dc-line-2: var(--sea-line-2, rgba(233,229,221,.18));
  --dc-accent: var(--sea-accent, #2E6E93);
  --dc-accent-text: var(--sea-accent-text, #5B9BC0);
  --dc-held: #D2493F;
  --dc-bone: var(--sea-bone, #E9E5DD);
  color: var(--dc-text);
  font-family: var(--dc-sans);
}
.dc *, .dc *::before, .dc *::after { box-sizing: border-box; }

/* top row: vessel tabs and the legend */
.dc-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; border-bottom: 1px solid var(--dc-line-2); }
.dc-tabs { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin-bottom: -1px; }
.dc-tabs::-webkit-scrollbar { display: none; }
.dc-tab {
  appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--dc-text-3);
  font: 600 15px/1 var(--dc-sans); letter-spacing: .01em; padding: 16px 22px 15px 0; margin-right: 22px; cursor: pointer; white-space: nowrap;
  transition: color .2s ease, border-color .2s ease;
}
.dc-tab:last-child { margin-right: 0; }
.dc-tab:hover { color: var(--dc-text-2); }
.dc-tab[aria-selected="true"] { color: var(--dc-text); border-bottom-color: var(--dc-accent); }
.dc-tab:focus-visible, .dc-switch:focus-visible, .dc-item:focus-visible, .dc-label:focus-visible { outline: 2px solid var(--dc-accent-text); outline-offset: 3px; }

.dc-bar { display: flex; align-items: center; gap: 24px; padding: 0 0 14px; flex-wrap: wrap; }
.dc-legend { display: flex; gap: 18px; font-size: 13px; color: var(--dc-text-3); }
.dc-legend span { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.dc-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dc-legend i.ok { background: #CFE6F3; box-shadow: 0 0 8px rgba(91,155,192,.9); }
.dc-legend i.held { background: var(--dc-held); box-shadow: 0 0 8px rgba(210,73,63,.8); }
.dc-switch { appearance: none; background: none; border: 0; padding: 0; color: var(--dc-text-2); font: 600 13px/1 var(--dc-sans); display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.dc-switch-track { width: 34px; height: 18px; border-radius: 9px; border: 1px solid var(--dc-line-2); position: relative; transition: background .2s ease, border-color .2s ease; }
.dc-switch-dot { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--dc-text-3); transition: transform .2s ease, background .2s ease; }
.dc-switch[aria-pressed="true"] .dc-switch-track { background: rgba(210,73,63,.16); border-color: rgba(210,73,63,.55); }
.dc-switch[aria-pressed="true"] .dc-switch-dot { transform: translateX(16px); background: var(--dc-held); }

/* stage */
.dc-figure { position: relative; margin-top: 24px; }
.dc-stage {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--dc-line);
  background:
    radial-gradient(120% 90% at 50% 38%, rgba(46,110,147,.13) 0%, rgba(46,110,147,0) 58%),
    linear-gradient(180deg, #0c1720 0%, #0a131b 100%);
  touch-action: pan-y; -webkit-tap-highlight-color: transparent;
}
.dc-poster, .dc-canvas, .dc-labels, .dc-loading { position: absolute; inset: 0; }
.dc-poster { width: 100%; height: 100%; object-fit: contain; transition: opacity .5s ease; }
.dc-canvas canvas { display: block; width: 100% !important; height: 100% !important; opacity: 0; transition: opacity .5s ease; }
.dc-live .dc-canvas canvas { opacity: 1; }
.dc-live .dc-poster { opacity: 0; pointer-events: none; }
.dc-switching .dc-canvas canvas { opacity: .25; transition-duration: .12s; }
.dc-labels { pointer-events: none; opacity: 0; transition: opacity .4s ease .1s; }
.dc-live .dc-labels { opacity: 1; }
.dc-switching .dc-labels { opacity: 0; transition-duration: .1s; transition-delay: 0s; }

.dc-label {
  position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 7px;
  width: var(--dc-lw, 112px); margin-left: calc(var(--dc-lw, 112px) / -2); transform-origin: 50% 100%; pointer-events: auto; cursor: pointer;
  translate: 0 calc(-100% - 10px); transition: opacity .2s ease;
}
.dc-label-name { font-size: 12px; line-height: 1.3; font-weight: 600; text-align: center; color: var(--dc-text-2); text-wrap: balance; text-shadow: 0 1px 6px rgba(5,9,12,.9); transition: color .2s ease; }
.dc-badge {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 600 11px/1 var(--dc-sans); font-variant-numeric: tabular-nums;
  color: var(--dc-text); background: rgba(10,16,21,.88); border: 1px solid rgba(233,229,221,.32); transition: border-color .2s ease, background .2s ease;
}
.dc-label.is-host .dc-badge { border-color: var(--dc-accent-text); background: rgba(46,110,147,.35); }
.dc-label.is-host .dc-label-name { color: var(--dc-text); }
.dc-label.is-active .dc-badge { border-color: #CFE6F3; background: var(--dc-accent); }
.dc-label.is-active .dc-label-name { color: var(--dc-text); }
.dc-label.is-dim { opacity: .42; }
.dc-label:hover .dc-label-name { color: var(--dc-text); }
.dc-group-label {
  position: absolute; left: 0; top: 0; translate: -50% calc(-100% - 88px); font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--dc-accent-text); white-space: nowrap; pointer-events: none;
}
.dc-compact .dc-label { width: 30px; margin-left: -15px; gap: 0; }
.dc-compact .dc-label-name { display: none; }
.dc-compact .dc-group-label { translate: -50% calc(-100% - 40px); font-size: 10px; letter-spacing: .14em; }

.dc-loading { display: grid; place-items: center; pointer-events: none; }
.dc-loading span { width: 120px; height: 1px; background: var(--dc-line-2); position: relative; overflow: hidden; }
.dc-loading span::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--dc-accent-text); animation: dc-load 1.2s ease-in-out infinite; }
@keyframes dc-load { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* callout */
.dc-callout {
  position: absolute; left: 20px; bottom: 20px; max-width: 380px; padding: 14px 18px 15px; background: rgba(8,13,18,.9);
  border-left: 2px solid var(--dc-accent); display: flex; flex-direction: column; gap: 5px; pointer-events: none;
  opacity: 0; transform: translateY(6px); transition: opacity .25s ease, transform .25s ease, border-color .2s ease;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.dc-callout.is-on { opacity: 1; transform: none; }
.dc-callout strong { font: 600 14px/1.3 var(--dc-sans); color: var(--dc-text); }
.dc-callout span { font: 400 15px/1.5 var(--dc-serif); color: var(--dc-text-2); }
.dc-callout.is-held { border-left-color: var(--dc-held); }
.dc-callout.is-held strong { color: #E8857D; }
.dc-callout.is-pass { border-left-color: var(--dc-bone); }

/* panel */
.dc-panel { margin-top: clamp(28px, 3.4vw, 44px); }
.dc-panel-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 12px 48px; align-items: baseline; margin-bottom: 28px; }
.dc-panel-head h3 { margin: 0; font: 600 clamp(20px, 1.8vw, 24px)/1.25 var(--dc-sans); color: var(--dc-text); }
.dc-panel-head p { margin: 0; font: 400 17px/1.6 var(--dc-serif); color: var(--dc-text-2); max-width: 720px; }
.dc-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1fr); gap: 0 40px; }
.dc-group { border-top: 1px solid var(--dc-line-2); padding-top: 16px; }
.dc-group-title { margin: 0 0 6px; font: 600 11px/1.4 var(--dc-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--dc-accent-text); }
.dc-list { list-style: none; margin: 0; padding: 0; }
.dc-item { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 12px 10px 12px 0; cursor: pointer; border-bottom: 1px solid var(--dc-line); transition: background .2s ease; position: relative; }
.dc-item:last-child { border-bottom: 0; }
.dc-item::before { content: ""; position: absolute; left: -12px; top: 12px; bottom: 12px; width: 2px; background: var(--dc-accent); opacity: 0; transition: opacity .2s ease; }
.dc-item.is-active::before { opacity: 1; }
.dc-item:hover strong, .dc-item.is-active strong { color: var(--dc-text); }
.dc-num { width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; font: 600 11px/1 var(--dc-sans); font-variant-numeric: tabular-nums; color: var(--dc-text-2); border: 1px solid var(--dc-line-2); }
.dc-item.is-active .dc-num { background: var(--dc-accent); border-color: #CFE6F3; color: var(--dc-text); }
.dc-item-body { display: flex; flex-direction: column; gap: 4px; }
.dc-item-body strong { font: 600 15px/1.35 var(--dc-sans); color: var(--dc-text-2); transition: color .2s ease; }
.dc-item-body span { font: 400 15px/1.55 var(--dc-serif); color: var(--dc-text-3); }

/* static fallback (no WebGL): poster stays, labels hidden */
.dc-static .dc-canvas, .dc-static .dc-labels, .dc-static .dc-callout { display: none; }

@media (max-width: 1024px) {
  .dc-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 32px; }
  .dc-cols .dc-group:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
  .dc-panel-head { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .dc-callout { position: relative; left: auto; bottom: auto; max-width: none; margin-top: 12px; min-height: 76px; opacity: 1; transform: none; border-left-color: var(--dc-line-2); }
  .dc-callout:not(.is-on) strong::before { content: "Tap a number to see what it is."; font-weight: 400; color: var(--dc-text-3); }
}
@media (max-width: 760px) {
  .dc-top { flex-direction: column; align-items: stretch; border-bottom: 0; }
  .dc-tabs { border-bottom: 1px solid var(--dc-line-2); }
  .dc-tab { padding: 14px 0 13px; margin-right: 22px; font-size: 14.5px; }
  .dc-bar { order: 2; padding: 4px 0 0; justify-content: space-between; gap: 12px 20px; }
  .dc-figure { margin-top: 16px; }
  .dc-stage { aspect-ratio: 5 / 4; }
  .dc-cols { grid-template-columns: 1fr; }
  .dc-cols .dc-group:nth-child(2) { grid-row: auto; }
  .dc-group + .dc-group { margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .dc *, .dc *::before, .dc *::after { transition: none !important; animation: none !important; }
}
