/* ---------- Mark ---------- */
.oe-mark { width: 34px; height: 31px; flex: none; fill: var(--oe-signal); }
.oe-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--oe-text-strong); text-decoration: none;
  font-size: 1.4rem; font-weight: 600; letter-spacing: -.03em; }

/* ---------- Buttons ---------- */
.oe-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; padding: 0 28px;
  border-radius: var(--oe-r-control); border: 1px solid transparent; font-size: 1.0625rem; font-weight: 600; letter-spacing: -.005em;
  text-decoration: none; transition: transform var(--oe-dur-fast) var(--oe-ease-out), background-color var(--oe-dur-fast), box-shadow var(--oe-dur-base); }
.oe-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.oe-btn--signal { background: var(--oe-signal); color: #fff; box-shadow: 0 0 0 1px rgba(143,179,255,.35) inset, var(--oe-glow-signal); }
.oe-btn--signal:hover { background: #2f73ff; transform: translateY(-1px); }
.oe-btn--ghost { border-color: var(--oe-line-strong); color: var(--oe-text-strong); background: rgba(14, 27, 46, .6); }
.oe-btn--ghost:hover { border-color: var(--oe-beam); }
.oe-btn.unavailable, .oe-btn[aria-disabled="true"] { background: #1a2638; color: #8796aa; box-shadow: none; cursor: not-allowed; transform: none; }

.oe-link { color: var(--oe-text-strong); text-decoration: underline; text-decoration-color: var(--oe-line-strong); text-underline-offset: 5px; }
.oe-link:hover { text-decoration-color: var(--oe-beam); }

/* ---------- Release status (driven by site.js) ---------- */
.oe-status { display: flex; align-items: center; gap: 10px; margin: 0; font-size: var(--oe-type-small); color: var(--oe-text-muted); }
.oe-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--oe-attention); flex: none; box-shadow: 0 0 10px rgba(255, 200, 97, .6); }
.oe-status.available .dot { background: var(--oe-ok); box-shadow: 0 0 10px rgba(89, 211, 154, .7); }

/* ---------- Copyable command ---------- */
.oe-copy { display: inline-flex; align-items: center; gap: 4px; min-height: 56px; padding: 0 6px 0 18px; border-radius: var(--oe-r-control);
  background: rgba(5, 10, 18, .7); border: 1px solid var(--oe-line-strong); font-size: var(--oe-type-code); color: var(--oe-text-strong); max-width: 100%; }
.oe-copy code { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oe-copy code::before { content: '$ '; color: var(--oe-ok); }
.oe-copy button { margin-left: 10px; min-height: 42px; padding: 0 14px; border: 0; border-radius: 8px; background: rgba(110, 160, 255, .14); color: var(--oe-glow); font-size: .875rem; font-weight: 600; }
.oe-copy button:hover { background: rgba(110, 160, 255, .26); }

/* ---------- Segmented control (one choice, applied immediately) ---------- */
.oe-seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 12px; background: rgba(5, 10, 18, .7); border: 1px solid var(--oe-line); }
.oe-seg button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; color: var(--oe-text); font-size: .9375rem; font-weight: 500; white-space: nowrap; }
.oe-seg button[aria-pressed="true"], .oe-seg button[aria-selected="true"] { background: var(--oe-signal); color: #fff; }
.oe-seg button:not([aria-pressed="true"]):not([aria-selected="true"]):hover { color: var(--oe-text-strong); background: rgba(110, 160, 255, .1); }
.oe-seg--paper { background: var(--oe-paper-2); border-color: var(--oe-paper-line); }
.oe-seg--paper button { color: var(--oe-ink-muted); }
.oe-seg--paper button[aria-pressed="true"], .oe-seg--paper button[aria-selected="true"] { background: var(--oe-navy); }

/* ---------- Lit documents: app window and paper ---------- */
.oe-window { background: var(--oe-paper); color: var(--oe-ink); border-radius: var(--oe-r-window); box-shadow: var(--oe-shadow-window); overflow: hidden; }
.oe-window__bar { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 22px; border-bottom: 1px solid var(--oe-paper-line); font-size: 1rem; }
.oe-window__bar .oe-mark { width: 24px; height: 22px; }
.oe-window__bar b { font-weight: 600; letter-spacing: -.01em; }
.oe-window__bar .crumb { color: var(--oe-ink-muted); }
.oe-window__bar .pill { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--oe-r-pill);
  border: 1px solid var(--oe-paper-line); font-size: .875rem; font-weight: 500; color: #3c4d5a; white-space: nowrap; }
.oe-window__bar .pill i { width: 8px; height: 8px; border-radius: 50%; background: #2fa36b; }
.oe-paper { background: var(--oe-paper); color: #111; border-radius: var(--oe-r-paper); box-shadow: var(--oe-shadow-window); font-family: var(--oe-serif); }

/* ---------- Terminal ---------- */
.oe-term { border-radius: var(--oe-r-window); background: var(--oe-panel); border: 1px solid var(--oe-line-strong); box-shadow: var(--oe-shadow-float); overflow: hidden; }
.oe-term__tabs { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--oe-line); overflow-x: auto; }
.oe-term__tabs button { min-height: 38px; padding: 0 14px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--oe-text-muted); font-family: var(--oe-mono); font-size: .875rem; white-space: nowrap; }
.oe-term__tabs button[aria-selected="true"] { color: #fff; background: rgba(34, 99, 237, .35); border-color: rgba(110, 160, 255, .6); }
.oe-term pre { margin: 0; padding: 22px 24px 26px; font-size: .875rem; line-height: 1.75; color: #c9d6e6; white-space: pre-wrap; word-break: break-word; }
.oe-term .c { color: var(--oe-text-muted); }
.oe-term .k { color: var(--oe-glow); }
.oe-term .s { color: #ffb38a; }

/* ---------- Data chip (a filter or a highlight in a chart) ---------- */
.oe-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: var(--oe-r-pill);
  border: 1px solid var(--oe-line-strong); background: transparent; color: var(--oe-text); font-size: .875rem; font-weight: 500; }
.oe-chip[aria-pressed="true"] { background: rgba(34, 99, 237, .3); border-color: var(--oe-beam); color: #fff; }
.oe-chip .n { font-family: var(--oe-mono); font-size: .75rem; color: var(--oe-text-muted); }
.oe-chip[aria-pressed="true"] .n { color: var(--oe-glow); }

/* ---------- Toast ---------- */
.oe-toast { position: fixed; left: 50%; bottom: 28px; z-index: 150; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 14px 22px; border-radius: 12px; background: var(--oe-paper); color: var(--oe-ink); font-weight: 600; box-shadow: var(--oe-shadow-float);
  transition: opacity var(--oe-dur-base) var(--oe-ease-out), transform var(--oe-dur-base) var(--oe-ease-out); }
.oe-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Cookie choices and optional statistics ---------- */
.consent { position: fixed; left: 50%; bottom: 20px; z-index: 160; transform: translateX(-50%); width: min(1100px, calc(100vw - 32px));
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 28px; align-items: center; padding: 24px; border-radius: var(--oe-r-card);
  max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain;
  background: rgba(10, 20, 36, .97); border: 1px solid var(--oe-line-strong); box-shadow: var(--oe-shadow-window); backdrop-filter: blur(10px); }
.consent[hidden], .consent [hidden] { display: none !important; }
.consent__text { min-width: 0; }
.consent h2 { font-size: 1.2rem; line-height: 1.2; letter-spacing: -.01em; max-width: none; }
.consent p { margin-top: 6px; font-size: .9rem; line-height: 1.5; color: var(--oe-text); }
.consent .consent__gpc { color: var(--oe-attention); }
.consent .oe-link { display: inline-block; margin-top: 8px; font-size: .875rem; }
.consent__actions { display: grid; gap: 8px; min-width: 154px; grid-column: 2; grid-row: 1; }
.consent__btn { min-height: 46px; min-width: 0; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--oe-line-strong);
  background: rgba(14, 27, 46, .9); color: var(--oe-text-strong); font: inherit; font-weight: 600; font-size: .9375rem; cursor: pointer; }
.consent__btn:hover, .consent__back:hover { border-color: var(--oe-beam); }
.consent__btn:focus-visible, .consent__back:focus-visible, .consent__category input:focus-visible { outline: 2px solid var(--oe-beam); outline-offset: 3px; }
.consent__preferences { grid-column: 1 / -1; border-top: 1px solid var(--oe-line); padding-top: 18px; }
.consent__heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.consent h3 { font-size: 1.05rem; line-height: 1.3; }
.consent__navigation { display: flex; gap: 8px; }
.consent__back { border: 1px solid var(--oe-line); border-radius: 8px; padding: 8px 12px; min-height: 44px; background: transparent; color: var(--oe-text-strong); font-size: .875rem; }
.consent__categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.consent__category { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 16px; border: 1px solid var(--oe-line); border-radius: 12px; background: var(--oe-panel); cursor: pointer; }
.consent__category strong { color: var(--oe-text-strong); font-size: 1rem; }
.consent__status, .consent__description { display: block; font-size: .875rem; line-height: 1.45; margin-top: 6px; }
.consent__status { color: var(--oe-ok); }
.consent__category input { appearance: none; -webkit-appearance: none; flex: none; width: 44px; height: 26px; margin: 0; border: 1px solid var(--oe-line-strong); border-radius: 20px; background: var(--oe-night); position: relative; cursor: pointer; }
.consent__category input::after { content: ''; position: absolute; top: 4px; left: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--oe-text-strong); }
.consent__category input:checked { background: var(--oe-signal); }
.consent__category input:checked::after { transform: translateX(18px); }
.consent__category input:disabled { opacity: .6; cursor: default; }
.consent .consent__media-note { font-size: .8125rem; margin-top: 14px; }
.consent[data-expanded="true"] .consent__text { grid-column: 1 / -1; }
.consent[data-expanded="true"] .consent__actions { grid-column: 1 / -1; grid-row: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) {
  .consent { grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: 16px; bottom: 12px; padding: 18px; width: calc(100vw - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .consent__actions { grid-column: 1; grid-row: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); min-width: 0; }
  .consent__btn { padding: 10px 8px; font-size: .875rem; line-height: 1.2; }
  .consent__categories { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Click-to-load YouTube player ---------- */
.video-lightbox { position: fixed; inset: 0; margin: auto; padding: 0; color: var(--oe-text-strong); background: #000;
  width: min(calc(100vw - 32px), calc((100vh - 96px) * 16 / 9));
  width: min(calc(100vw - 32px), calc((100dvh - 96px) * 16 / 9));
  max-width: none; max-height: calc(100dvh - 32px); border: 1px solid var(--oe-line-strong); border-radius: 16px; overflow: hidden; }
.video-lightbox::backdrop { background: rgba(0, 4, 10, .9); }
.video-lightbox__bar { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 8px 6px 18px; }
.video-lightbox__bar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9375rem; }
.video-lightbox__close { flex: none; min-height: 44px; padding: 0 16px; border: 1px solid var(--oe-line-strong); border-radius: 9px;
  background: var(--oe-night); color: var(--oe-text-strong); }
.video-lightbox__close:hover { border-color: var(--oe-beam); }
.video-lightbox iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }
