/**
 * Understanding AI — reading-desk styles (canonical copy; tier 1 carries a
 * byte-identical copy, tiers 2 and 3 link this file directly).
 *
 * One authored copy on purpose: the desk markup is identical on all three
 * tiers because one script drives all three, so its styling must not be
 * re-authored per tier and allowed to drift.
 *
 * Everything here is written against the site's design tokens with the same
 * fallbacks the section stylesheet uses, so it degrades the same way.
 */

.uai-desk[hidden],
.uai-desk-parked[hidden],
.uai-desk-pip[hidden] {
  display: none;
}

.uai-desk {
  margin: 0 0 1.75rem;
  padding: 1rem 1.25rem 1.1rem;
  border: 1px solid var(--color-border, #2A3A52);
  border-radius: 10px;
}

.uai-desk-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.uai-desk-kicker {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-text-muted, #9CA3AF);
}

.uai-desk-state {
  font-size: 0.8rem;
  color: var(--color-accent, var(--color-primary, #C75B39));
}

.uai-desk-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.uai-desk-mode {
  flex: 1 1 12rem;
  display: block;
  text-align: left;
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--color-border, #2A3A52);
  background: transparent;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
}

.uai-desk-mode:hover {
  border-color: var(--color-accent, var(--color-primary, #C75B39));
}

.uai-desk-mode.is-on {
  border-color: var(--color-accent, var(--color-primary, #C75B39));
  box-shadow: inset 0 0 0 1px var(--color-accent, var(--color-primary, #C75B39));
}

.uai-desk-mode-name {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
}

.uai-desk-mode-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--color-text-muted, #9CA3AF);
  margin-top: 0.15rem;
}

.uai-desk-pip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--color-text-muted, #9CA3AF);
}

.uai-desk-note {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--color-text-muted, #9CA3AF);
}

.uai-desk-return {
  margin-top: 0.75rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--color-border, #2A3A52);
  background: transparent;
  color: var(--color-text-muted, #9CA3AF);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  display: none;
}

.uai-desk[data-uai-desk-floating="1"] .uai-desk-return {
  display: inline-block;
}

.uai-desk-parked {
  margin: 2rem 0;
  padding: 1.5rem;
  border: 1px dashed var(--color-border, #2A3A52);
  border-radius: 10px;
  text-align: center;
  color: var(--color-text-muted, #9CA3AF);
}

.uai-desk-parked .uai-desk-return {
  display: inline-block;
}

/* The floating window is a fresh document: it receives clones of this page's
   stylesheets (Document PiP inherits none) but none of the site chrome, so it
   needs its own page frame. Without the token-carrying base stylesheet this is
   exactly the Times-New-Roman failure mode fixed on 2026-07-29. */
body.uai-guide-window {
  margin: 0;
  padding: 1rem 1.15rem 2rem;
  background: var(--color-bg, #0F1729);
  color: var(--color-text, #E8EAED);
}

body.uai-guide-window .uai-companion {
  max-width: none;
  margin: 0;
  padding: 0;
}

body.uai-guide-window .companion-header h1 {
  font-size: 1.2rem;
}

body.uai-guide-window .companion-howto {
  display: none;
}
