/*
 * DeafMonitor design system — shared tokens, focus, motion, and primitives.
 * Loaded from the global header so every page inherits one source of truth.
 * Per-page CSS may still add layout; it should not redeclare these tokens.
 */

:root {
  --t: #00D9FF;
  --tl: #66EEFF;
  --td: #00AACC;
  --y: #F5C842;
  --yl: #FFD966;
  --bg1: #060D1C;
  --bg2: #090F1E;
  --bgc: #0E1A2C;
  --bgch: #131F30;
  --bgc2: #0B1626;
  --br: rgba(0, 217, 255, .12);
  --brs: rgba(0, 217, 255, .3);
  --bry: rgba(245, 200, 66, .22);
  --brys: rgba(245, 200, 66, .55);
  --tx1: #EEF4FF;
  --tx2: #7A9AB8;
  --txd: #7A9AB8;
  --div: rgba(0, 217, 255, .08);
  --tag: rgba(0, 217, 255, .09);
  --r: 8px;
  --font-display: "Playfair Display", Georgia, serif;
  --font-ui: "DM Sans", system-ui, sans-serif;
  --focus-ring: 2px solid var(--t);
  --focus-offset: 2px;
}

/* Keyboard focus — visible on every interactive control */
:where(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 0;
}

/* Reduced motion: keep transitions slow, kill looping animation */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .ticker,
  [data-dm-ticker] {
    animation: none !important;
  }
}

html.dm-reduce-motion *,
html.dm-reduce-motion *::before,
html.dm-reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
}

/* Buttons */
.dm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 22px;
  border: none;
  border-radius: 10px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, transform .2s, box-shadow .2s;
}
.dm-btn-primary {
  background: var(--y);
  color: #1a1000;
  box-shadow: 0 4px 20px rgba(245, 200, 66, .28);
}
.dm-btn-primary:hover {
  background: var(--yl);
  color: #1a1000;
}
.dm-btn-accent {
  background: var(--t);
  color: #003038;
}
.dm-btn-accent:hover {
  background: var(--tl);
  color: #003038;
}
.dm-btn-ghost {
  background: transparent;
  color: var(--tx1);
  border: 1px solid var(--br);
}
.dm-btn-ghost:hover {
  border-color: var(--brs);
  background: rgba(0, 217, 255, .06);
}

/* Cards */
.dm-card-link {
  display: block;
  background: var(--bgc);
  border: 1px solid var(--br);
  border-radius: 14px;
  padding: 22px 24px;
  text-decoration: none;
  color: inherit;
  transition: border-color .18s, transform .18s;
}
.dm-card-link:hover {
  border-color: var(--brs);
  transform: translateY(-1px);
}
.dm-card-link h2,
.dm-card-link h3 {
  font-family: var(--font-display);
  color: var(--tx1);
  margin: 0 0 8px;
}
.dm-card-link p {
  margin: 0;
  color: var(--tx2);
  line-height: 1.6;
}

/* Originals strip on the homepage */
.dm-originals-strip {
  margin: 8px 0 22px;
}
.dm-originals-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}
.dm-originals-head h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--tx1);
  margin: 0;
}
.dm-originals-head a {
  margin-left: auto;
  font-family: var(--font-ui);
  font-size: .8rem;
  font-weight: 700;
  color: var(--t);
  text-decoration: none;
}
.dm-originals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 760px) {
  .dm-originals-grid {
    grid-template-columns: 1fr;
  }
}
.dm-originals-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 44px;
  padding: 16px 18px;
  background: var(--bgc);
  border: 1px solid var(--br);
  border-radius: var(--r);
  text-decoration: none;
  color: inherit;
}
.dm-originals-card:hover {
  border-color: var(--brs);
}
.dm-originals-kicker {
  font-family: var(--font-ui);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--y);
}
.dm-originals-card h3 {
  font-family: var(--font-ui);
  font-size: .95rem;
  font-weight: 700;
  color: var(--tx1);
  margin: 0;
  line-height: 1.35;
}
.dm-originals-card p {
  font-family: var(--font-ui);
  font-size: .8rem;
  color: var(--tx2);
  margin: 0;
  line-height: 1.45;
}

:is([data-theme="light"], [data-theme="solarized"], [data-theme="sepia"]) .dm-originals-card h3 {
  color: var(--tx1);
}
:is([data-theme="light"], [data-theme="solarized"], [data-theme="sepia"]) .dm-btn-accent {
  color: #fff;
}
