/* Site design for the FAERS explorer pages. Generated by scripts/aems.js. */
@font-face { font-family: "Fraunces"; src: url("../../../assets/fonts/fraunces-var.woff2") format("woff2"); font-weight: 500 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../../../assets/fonts/source-sans-3-var.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../../../assets/fonts/source-sans-3-italic-var.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
:root {
  --bg: #f3eee4;
  --bg-glow: #ece2cf;
  --card: #fffaf2;
  --card-2: #f8f1e4;
  --ink: #1c1915;
  --muted: #6a6458;
  --line: #ddd4c4;
  --accent: #3f8f4a;
  --accent-deep: #2b6834;
  --accent-soft: #e2efe2;
  --accent-ink: #ffffff;
  --warn-bg: #fbf0d9;
  --warn-line: #e3c27a;
  --ok: #1a7f4b; --info: #2563eb; --caution: #a86c12; --bad: #b8382a;
  --crit: #c0573e; --major: #d7a03a;
  --shadow: 0 1px 2px rgb(60 45 20 / .06), 0 8px 24px -12px rgb(60 45 20 / .18);
  --shadow-lg: 0 2px 4px rgb(60 45 20 / .05), 0 24px 48px -20px rgb(60 45 20 / .28);
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --radius: 1.1rem;
  --radius-sm: .6rem;
  --measure: 70ch;
  /* Older names used by the tool styles below. */
  --surface: var(--card);
  --fg: var(--ink);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #15130f; --bg-glow: #231e15; --card: #1d1a14; --card-2: #24211a;
  --ink: #efe8db; --muted: #a8a091; --line: #36322b;
  --accent: #7cc488; --accent-deep: #9ad6a4; --accent-soft: #1f2e21; --accent-ink: #10200f;
  --warn-bg: #2b2516; --warn-line: #7d6526;
  --ok: #4ade80; --info: #7aa7ff; --caution: #f6c35b; --bad: #ff8a7a;
  --crit: #e07a62; --major: #e6b85a;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px -14px rgb(0 0 0 / .6);
  --shadow-lg: 0 2px 4px rgb(0 0 0 / .4), 0 24px 48px -20px rgb(0 0 0 / .7);
  color-scheme: dark;
}
/* Layout and site touches for the FAERS explorer pages. Appended after the
   site tokens by scripts/aems.js; loaded after the extension's own style.css. */
body { font-family: var(--sans); font-size: 16px; background: radial-gradient(1100px 520px at 8% -8%, var(--bg-glow) 0%, transparent 60%) no-repeat, var(--bg); color: var(--ink); color-scheme: light; }
:root[data-theme="dark"] body { color-scheme: dark; }
a { color: var(--accent-deep); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); }

/* Site header */
.pv-bar { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); text-align: left; }
.pv-in { max-width: 1320px; margin: 0 auto; padding: 0 24px; height: 62px; display: flex; align-items: center; gap: 18px; }
.pv-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.pv-brand .mark { width: 32px; height: 32px; }
.pv-word { font: 650 1.15rem/1 var(--serif); letter-spacing: -.02em; }
.pv-word b { font-weight: 650; color: var(--accent-deep); }
.pv-bar nav { margin-left: auto; display: flex; gap: 4px; }
.pv-bar nav a { padding: 7px 14px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.pv-bar nav a:hover { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.pv-theme { width: 38px; height: 38px; flex: none; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; }
.pv-theme[hidden] { display: none; }
.pv-theme:hover { border-color: var(--accent); }
.pv-theme svg { width: 18px; height: 18px; }
.pv-theme .sun { display: none; }
:root[data-theme="dark"] .pv-theme .sun { display: block; }
:root[data-theme="dark"] .pv-theme .moon { display: none; }
.pv-note { max-width: 1320px; margin: 0 auto; padding: 0 24px 10px; font-size: .85rem; color: var(--muted); }
@media (max-width: 640px) {
  .pv-in { padding: 0 16px; gap: 10px; }
  .pv-word { display: none; }
  .pv-bar nav a { padding: 6px 10px; font-size: .9rem; }
  .pv-note { padding: 0 16px 10px; }
}

/* The site theme switch replaces the extension's own toggle. */
#theme-toggle { display: none !important; }

/* Start page: a card like the site's panels */
.popup-container { width: min(560px, calc(100% - 32px)); margin: 28px auto 56px; padding: 24px 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); text-align: left; }
.popup-container h3 { font: 650 1.6rem/1.2 var(--serif); letter-spacing: -.02em; margin: 0 0 14px; }
.api-key-required { color: inherit !important; font-weight: 400 !important; opacity: .75; }

/* Result pages */
.dashboard-container, .container { max-width: 1320px; margin: 0 auto; }
#dashboard-title { font: 650 clamp(1.7rem, 3vw, 2.3rem)/1.15 var(--serif); letter-spacing: -.025em; }
.metric-card p, .sticky-value, .summary-value { font-family: var(--sans); }
.chart-header h3, .alert-header h3, .list-card h3, .analysis-info h2, #analysisTitle { font-family: var(--serif); font-weight: 650; letter-spacing: -.01em; }

/* Rounder controls, as on the rest of the site */
input[type="text"], input[type="date"], input[type="password"], select, textarea { border-radius: var(--radius-sm) !important; font-family: var(--sans); }
#search-button, #sd-run-button, #save-key-button, #reset-button, #add-event-button, #clear-dates-button,
#download-csv-button, #download-pdf-button, #yearly-ror-button, .export-chart-btn,
#exportCSV, #cancelButton, #restoreButton, #runFreshButton { border-radius: 999px !important; font-family: var(--sans); font-weight: 600; }
.popup-tab-bar { border-radius: 999px; }
.popup-tab-btn { border-radius: 999px !important; font-family: var(--sans); }
.metric-card, .chart-wrapper, .list-card, .table-wrapper, .search-section, .recent-searches-section, .api-key-section, .date-range-section { border-radius: var(--radius-sm) !important; }
/* Secondary actions as outlined buttons, like .btn.ghost on the site */
#reset-button, #clear-dates-button, #cancelButton { background: transparent !important; color: var(--ink) !important; border: 1px solid var(--line) !important; box-shadow: none !important; }
#reset-button:hover, #clear-dates-button:hover, #cancelButton:hover { border-color: var(--accent) !important; }
