@import url("./fonts.css");
@import url("./deck-polish.css");
@import url("./companion-polish.css");

body[data-lfe-theme] {
  --lfe-paper: #f7fafe;
  --lfe-ink: #16202d;
  --lfe-muted: #52657f;
  --lfe-accent: #2864db;
  --lfe-rule: #dce5f2;
  --lfe-wash: #edf3ff;
  --lfe-display: "Space Grotesk", sans-serif;
  --lfe-control-height: 40px;
  --lfe-radius: 8px;
  --blue: var(--lfe-accent);
  --green: var(--lfe-accent);
  --ink: var(--lfe-ink);
  --muted: var(--lfe-muted);
  --line: var(--lfe-rule);
  --viewer-ink: var(--lfe-ink);
  --viewer-subtle: var(--lfe-muted);
  margin: 0;
  background: var(--lfe-paper);
  color: var(--lfe-ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-weight: 500;
  font-synthesis: none;
  font-variant-numeric: tabular-nums;
  accent-color: var(--lfe-accent);
  caret-color: var(--lfe-accent);
  scrollbar-color: var(--lfe-muted) var(--lfe-paper);
}

body[data-lfe-theme="dynasty"] {
  --lfe-paper: #f4f6f4;
  --lfe-ink: #183c31;
  --lfe-muted: #4d625a;
  --lfe-accent: #285c48;
  --lfe-rule: #dce4de;
  --lfe-wash: #e9efeb;
  --lfe-display: "Manrope", "Segoe UI", sans-serif;
}

body[data-lfe-theme] :is(button, select, textarea, input, .slide) {
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-weight: 500;
}
body[data-lfe-theme]
  :is(p, td, .cover-story, .narrative-list, .slide-table > div) {
  font-weight: 500;
}
body[data-lfe-theme]
  :is(button, select, .week-picker label, .edition-picker label) {
  font-weight: 600;
}
body[data-lfe-theme]
  :is(
    h1,
    h2,
    h3,
    .slide-content > h3,
    .has-cover-art h3,
    .briefing-columns h4,
    .room-sheet h3
  ) {
  font-family: var(--lfe-display);
  font-optical-sizing: auto;
  font-weight: 600;
  letter-spacing: -0.035em;
}
body[data-lfe-theme="dynasty"] :is(h1, h2, h3, .briefing-columns h4) {
  font-weight: 700;
}
body[data-lfe-theme] :is(.viewer-header, .room-header, .site-header) {
  background: var(--lfe-paper);
  border-bottom: 1px solid var(--lfe-rule);
}
body[data-lfe-theme="dynasty"] :is(.viewer-header, .site-header) {
  background: #fff;
}
body[data-lfe-theme] :is(.viewer-brand, .brand, .wordmark) {
  color: var(--lfe-ink);
  font-family: var(--lfe-display);
  font-weight: 700;
}
body[data-lfe-theme]
  :is(
    .viewer-brand span,
    .brand span,
    .wordmark span,
    .week-picker label,
    .edition-picker label
  ) {
  color: var(--lfe-muted);
}
body[data-lfe-theme]
  :is(.download, .viewer-sources a, .text-button, .sources a) {
  color: var(--lfe-accent);
}
body[data-lfe-theme] :is(select, .viewer-toolbar select) {
  border: 1px solid var(--lfe-rule);
  border-radius: 6px;
  background: #fff;
  color: var(--lfe-ink);
}
body[data-lfe-theme] :is(a, button, select, input, summary):focus-visible {
  outline: 2px solid var(--lfe-accent);
  outline-offset: 4px;
}
body[data-lfe-theme] ::selection {
  color: #fff;
  background: var(--lfe-accent);
}
body[data-lfe-theme] :is(h1, h2, h3, h4) {
  text-wrap: balance;
}
body[data-lfe-theme] :is(.sources a, .viewer-sources a, .room-footer a) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
body[data-lfe-theme] .viewer-toolbar button[aria-pressed="true"],
body[data-lfe-theme] .outline-link[aria-current] {
  background: var(--lfe-wash);
  color: var(--lfe-ink);
}
body[data-lfe-theme]
  :is(.viewer-toolbar button, .viewer-controls button, .viewer-meta button) {
  color: var(--lfe-muted);
}
body[data-lfe-theme]
  :is(
    .viewer-toolbar button,
    .viewer-controls button,
    .viewer-meta button
  ):hover:not(:disabled) {
  background: var(--lfe-wash);
}
body[data-lfe-theme] .room-nav a[aria-current] {
  background: var(--lfe-ink);
  color: #fff;
}
body[data-lfe-theme] #stage {
  width: min(100%, calc((100svh - 280px) * 16 / 9));
}
body[data-lfe-theme].reading #stage {
  width: 100%;
}
body[data-lfe-theme] #stage .slide {
  box-shadow: 0 8px 28px #16202d0d;
  border-radius: 2px;
}
body[data-lfe-theme] #stage .slide-cover.has-cover-art {
  color: var(--lfe-ink);
  background: #fff;
}
body[data-lfe-theme] .has-cover-art h3,
body[data-lfe-theme] .has-cover-art .cover-copy h3 {
  font-size: 5.65cqw;
  line-height: 1.07;
  letter-spacing: -0.04em;
}
body[data-lfe-theme]
  :is(
    .cover-kicker,
    .cover-story,
    .cover-matchup,
    .slide-top,
    .slide-subtitle,
    .briefing-columns h4
  ) {
  color: var(--lfe-muted);
}
body[data-lfe-theme="dynasty"] :is(.cover-kicker, .section-label, .eyebrow) {
  color: #806b42;
  font-weight: 600;
}
body[data-lfe-theme="dynasty"] :is(.viewer-brand span, .wordmark span) {
  color: var(--lfe-ink);
  font-weight: 600;
}
body[data-lfe-theme] .cover-matchup {
  font-family: "Manrope", sans-serif;
}
body[data-lfe-theme="dynasty"]
  :is(.slide-content > h3, .slide-team .team-header h3) {
  color: var(--lfe-ink);
}
body[data-lfe-theme] .room-sheet {
  border-color: var(--lfe-rule);
  border-radius: 12px;
  box-shadow: none;
}
body[data-lfe-theme] :is(.run-note, .deadline, .player-band, .preview-strip) {
  background: var(--lfe-wash);
}
body[data-lfe-theme] .feature-strip article {
  border-color: var(--lfe-rule);
}
body[data-lfe-theme] .viewer-ready {
  color: inherit;
}
body[data-lfe-theme="redraft"].viewer-ready .deck-page:not([hidden]) {
  animation: current-entrance 140ms ease-out;
}
body[data-lfe-theme="dynasty"].viewer-ready .deck-page:not([hidden]) {
  animation: legacy-entrance 180ms ease-out;
}
@keyframes current-entrance {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes legacy-entrance {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 750px) {
  body[data-lfe-theme] {
    --lfe-control-height: 44px;
  }
  body[data-lfe-theme].reading .has-cover-art h3,
  body[data-lfe-theme].reading .has-cover-art .cover-copy h3 {
    font-size: 42px;
    line-height: 1.05;
  }
}
@media (prefers-reduced-motion: reduce) {
  body[data-lfe-theme].viewer-ready .deck-page:not([hidden]) {
    animation: none;
  }
}
