/* App shell + wiki-term tokens (external so CSP can avoid inline style where possible). */
:root {
  --gold-pale: #ffd97a;
  --gold: #c8960a;
  --cream: #f4f1e8;
  --cream-70: rgba(244, 241, 232, 0.7);
  --hairline-strong: rgba(244, 241, 232, 0.18);
  --ink-700: #100d25;
}

.wiki-term {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: #f0e6d0;
  cursor: help;
  display: inline;
  text-decoration: underline dotted var(--gold-pale);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.75px;
  text-decoration-skip-ink: none;
  transition: color 120ms ease, text-decoration-color 120ms ease;
}
.wiki-term:hover,
.wiki-term:focus-visible {
  color: var(--gold-pale);
  text-decoration-style: solid;
  text-decoration-color: var(--gold);
  outline: none;
}
.wiki-term:focus-visible {
  text-decoration-color: var(--gold);
}

.wiki-term-card {
  background: linear-gradient(180deg, rgba(20, 18, 38, 0.96), rgba(11, 12, 21, 0.96));
  border-color: var(--hairline-strong);
  color: var(--cream);
  backdrop-filter: blur(8px);
  box-shadow:
    0 20px 50px -10px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 217, 122, 0.04) inset;
}

body {
  background-color: #0b0c15;
  color: #e2e8f0;
  font-family: var(--font-ui);
  color-scheme: dark;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
h1,
h2,
h3,
h4,
.font-serif {
  font-family: var(--font-display);
}
.font-sans,
.font-ui {
  font-family: var(--font-ui);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #1e1b4b;
}
::-webkit-scrollbar-thumb {
  background: #4f46e5;
  border-radius: 4px;
  border: 1px solid #1e1b4b;
}
::-webkit-scrollbar-thumb:hover {
  background: #6366f1;
}

.markdown-body p {
  margin-bottom: 0.75rem;
  color: #cbd5e1;
  line-height: 1.65;
}
.markdown-body strong {
  color: #fbbf24;
  font-weight: 700;
}
.markdown-body h3 {
  color: #fbbf24;
  font-weight: 700;
  font-size: 1rem;
  margin: 1rem 0 0.5rem;
}
.markdown-body h4 {
  color: #fcd34d;
  font-weight: 600;
  font-size: 0.925rem;
  margin: 0.75rem 0 0.35rem;
}
.markdown-body ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: #cbd5e1;
}
.markdown-body li {
  margin-bottom: 0.25rem;
}

.golden-icon::-webkit-calendar-picker-indicator {
  filter: invert(28%) sepia(51%) saturate(1148%) hue-rotate(356deg) brightness(104%) contrast(105%);
  cursor: pointer;
}
