/* SPDX-License-Identifier: GPL-3.0-or-later
   SPDX-FileCopyrightText: 2026 IDEH Labs <https://ideh.top>
   Senda Modern Dark Tech Stylesheet (Linear / Raycast Aesthetic)
   Free Software under GNU GPL-3.0-or-later — WCAG 2.2 AA/AAA, Zero CDNs
*/

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;

  /* Dark Tech Theme (Default) */
  --bg-app: #080c14;
  --bg-glow: radial-gradient(circle at 50% -10%, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0.05) 35%, transparent 70%);
  --bg-card: rgba(15, 23, 42, 0.55);
  --bg-card-hover: rgba(20, 30, 55, 0.75);
  --bg-input: rgba(13, 20, 36, 0.85);
  --bg-chip: rgba(255, 255, 255, 0.04);
  --bg-chip-hover: rgba(255, 255, 255, 0.08);
  --bg-chip-active: rgba(16, 185, 129, 0.15);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  --text-accent: #10b981;
  --text-accent-hover: #34d399;
  --text-cyan: #38bdf8;
  --text-link: #f1f5f9;
  --text-link-hover: #38bdf8;

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-focus: #10b981;
  --border-chip-active: rgba(16, 185, 129, 0.45);

  --shadow-command: 0 20px 45px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-command-focus: 0 20px 45px -10px rgba(0, 0, 0, 0.9), 0 0 0 2px rgba(16, 185, 129, 0.35), 0 0 30px rgba(16, 185, 129, 0.15);
  --shadow-card: 0 4px 16px -4px rgba(0, 0, 0, 0.5);

  --mark-bg: rgba(251, 191, 36, 0.22);
  --mark-text: #fef08a;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Override */
[data-theme="light"],
html.light {
  --bg-app: #f8fafc;
  --bg-glow: radial-gradient(circle at 50% -10%, rgba(5, 150, 105, 0.08) 0%, rgba(2, 132, 199, 0.04) 35%, transparent 70%);
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-input: #ffffff;
  --bg-chip: #f1f5f9;
  --bg-chip-hover: #e2e8f0;
  --bg-chip-active: #ecfdf5;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-faint: #64748b;
  --text-accent: #059669;
  --text-accent-hover: #047857;
  --text-cyan: #0284c7;
  --text-link: #0f172a;
  --text-link-hover: #059669;

  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #059669;
  --border-chip-active: #a7f3d0;

  --shadow-command: 0 10px 30px -10px rgba(0, 0, 0, 0.08), 0 0 0 1px #e2e8f0;
  --shadow-command-focus: 0 15px 35px -10px rgba(0, 0, 0, 0.12), 0 0 0 2px rgba(5, 150, 105, 0.3);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04);

  --mark-bg: #fef08a;
  --mark-text: #713f12;
}

/* High Contrast Override */
@media (prefers-contrast: more) {
  :root {
    --border-subtle: rgba(255, 255, 255, 0.3);
    --border-strong: #ffffff;
    --text-muted: #e2e8f0;
  }
}

/* Global Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100vh;
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  background-image: var(--bg-glow);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: top center;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--text-accent);
  color: #080c14;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  z-index: 1000;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* Header */
header.app-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-main);
  transition: opacity var(--transition-fast);
}

.brand:hover {
  opacity: 0.9;
}

.brand-logo-wrapper {
  display: flex;
  align-items: center;
}

.brand-logo {
  display: block;
  transition: transform var(--transition-normal);
}

.brand:hover .brand-logo {
  transform: rotate(-5deg) scale(1.08);
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .brand-text {
  background: linear-gradient(135deg, #0f172a 30%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.header-link:hover {
  color: var(--text-main);
}

.theme-btn {
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.theme-btn:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
  background: var(--bg-chip-hover);
}

/* Theme Button Icons:
   In dark mode, show SUN (switch to light mode).
   In light mode, show MOON (switch to dark mode). */
.theme-btn .icon-sun { display: block; }
.theme-btn .icon-moon { display: none; }
[data-theme="light"] .theme-btn .icon-sun,
html.light .theme-btn .icon-sun { display: none; }
[data-theme="light"] .theme-btn .icon-moon,
html.light .theme-btn .icon-moon { display: block; }

/* Language Selector (Modern minimal glass pill) */
.lang-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  height: 38px;
  transition: all var(--transition-fast);
  backdrop-filter: blur(8px);
}

.lang-picker:hover,
.lang-picker:focus-within {
  border-color: var(--border-strong);
  background: var(--bg-chip-hover);
  box-shadow: 0 0 0 1px var(--border-strong);
}

.lang-picker .lang-icon {
  position: absolute;
  left: 0.65rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition-fast);
}

.lang-picker:hover .lang-icon,
.lang-picker:focus-within .lang-icon {
  color: var(--text-accent);
}

.lang-selector {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  padding: 0 1.85rem 0 2.15rem;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  height: 100%;
  line-height: 38px;
  font-family: inherit;
}

.lang-selector option {
  background-color: #0f172a;
  color: #f8fafc;
  padding: 0.5rem;
  font-size: 0.88rem;
}

[data-theme="light"] .lang-selector option,
html.light .lang-selector option {
  background-color: #ffffff;
  color: #0f172a;
}

.lang-picker .lang-arrow {
  position: absolute;
  right: 0.6rem;
  color: var(--text-faint);
  pointer-events: none;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.lang-picker:hover .lang-arrow {
  color: var(--text-muted);
}

/* Main Content Layout */
main.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Homepage Center View */
body.homepage-view main.content-area {
  justify-content: center;
  align-items: center;
  padding: 2rem 1.5rem 6rem 1.5rem;
}

.home-container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-emblem-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
  gap: 0.75rem;
}

.home-emblem {
  transition: transform var(--transition-normal), filter var(--transition-normal);
  filter: drop-shadow(0 0 28px rgba(45, 212, 191, 0.40)) drop-shadow(0 0 50px rgba(56, 189, 248, 0.22));
}

.home-emblem:hover {
  transform: scale(1.05) rotate(-3deg);
  filter: drop-shadow(0 0 36px rgba(45, 212, 191, 0.60)) drop-shadow(0 0 65px rgba(56, 189, 248, 0.35));
}

[data-theme="light"] .home-emblem {
  filter: drop-shadow(0 6px 16px rgba(15, 118, 110, 0.25));
}

[data-theme="light"] .home-emblem:hover {
  transform: scale(1.05) rotate(-3deg);
  filter: drop-shadow(0 8px 24px rgba(15, 118, 110, 0.35));
}

/* Dynamic SVG Logo Gradient adaptation between Dark & Light themes */
[data-theme="light"] #brandCurveGrad stop:nth-child(1),
[data-theme="light"] #heroCurveGrad stop:nth-child(1) {
  stop-color: #0f766e !important;
}
[data-theme="light"] #brandCurveGrad stop:nth-child(2),
[data-theme="light"] #heroCurveGrad stop:nth-child(2) {
  stop-color: #059669 !important;
}
[data-theme="light"] #brandCurveGrad stop:nth-child(3),
[data-theme="light"] #heroCurveGrad stop:nth-child(3) {
  stop-color: #0284c7 !important;
}

[data-theme="light"] #heroHalo stop:nth-child(1) {
  stop-color: #059669 !important;
  stop-opacity: 0.16 !important;
}
[data-theme="light"] #heroHalo stop:nth-child(2) {
  stop-color: #0284c7 !important;
  stop-opacity: 0.08 !important;
}

.home-brand-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .home-brand-title {
  background: linear-gradient(135deg, #0f172a 40%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.home-search-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Command Bar (Raycast / Linear Style) */
.command-bar {
  width: 100%;
  height: 52px;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0 1.15rem;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-command);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all var(--transition-fast);
  position: relative;
}

.command-bar:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .command-bar:hover {
  border-color: #94a3b8;
}

.command-bar:focus-within {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-command-focus);
}

.command-bar-sm {
  height: 48px;
  border-radius: var(--radius-sm);
}

.command-bar-icon {
  color: var(--text-accent);
  display: flex;
  align-items: center;
  margin-right: 0.85rem;
  flex-shrink: 0;
}

.command-bar-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-main);
  min-width: 0;
}

.command-bar-input::placeholder {
  color: var(--text-faint);
}

.command-bar-clear {
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.command-bar-clear:hover {
  color: var(--text-main);
}

.command-shortcut {
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  margin-left: 0.65rem;
  user-select: none;
}

/* Category Navigation Chips (Dark Tech) */
.home-category-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.cat-chip {
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  min-height: 40px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cat-chip:hover {
  color: var(--text-main);
  background: var(--bg-chip-hover);
  border-color: var(--border-strong);
}

.cat-chip.active {
  background: var(--bg-chip-active);
  color: var(--text-accent);
  border-color: var(--border-chip-active);
  font-weight: 600;
}

/* Results View Layout */
.results-layout {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 4rem 1.5rem;
}

.results-top-bar {
  margin-bottom: 1.25rem;
}

.results-search-form {
  margin-bottom: 1rem;
}

.results-tab-row {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.results-tab-pill {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.35rem 0.85rem;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-full);
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.results-tab-pill:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
}

.results-tab-pill.active {
  background: var(--bg-chip-active);
  color: var(--text-accent);
  border-color: var(--border-chip-active);
  font-weight: 600;
}

.results-tab-pill.external-tab {
  color: var(--text-cyan);
}

/* Filters Row */
.results-filters-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 0.85rem;
  padding: 0.5rem 0.25rem;
  font-size: 0.8rem;
  color: var(--text-faint);
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-subtle);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.filter-label {
  font-weight: 600;
  color: var(--text-muted);
}

.filter-link {
  color: var(--text-faint);
  text-decoration: none;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  transition: color var(--transition-fast);
}

.filter-link:hover {
  color: var(--text-main);
}

.filter-link.active {
  color: var(--text-accent);
  font-weight: 600;
}

.filter-sep {
  color: var(--border-strong);
}

/* Minimalist Tools Toolbar (Google / Sovereign Clean Design) */
/* Global Details/Summary Reset (cross-browser removal of native disclosure triangles) */
details summary {
  list-style: none !important;
  list-style-type: none !important;
}
details summary::-webkit-details-marker {
  display: none !important;
}
details summary::marker {
  display: none !important;
}

.results-tools-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.4rem 0.1rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-subtle);
}

.filter-dropdown {
  position: relative;
  display: inline-block;
}

.filter-dropdown-btn {
  list-style: none !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  border-radius: 9999px;
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  user-select: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  font-family: inherit;
}

.filter-dropdown-btn::-webkit-details-marker,
.filter-dropdown-btn::marker {
  display: none !important;
}

.filter-dropdown-btn:hover {
  background: var(--bg-chip-hover);
  border-color: var(--border-strong);
  color: var(--text-main);
}

.filter-dropdown[open] .filter-dropdown-btn {
  background: var(--bg-chip-active);
  border-color: var(--border-strong);
  color: var(--text-main);
}

.filter-dropdown[open] .dropdown-chevron {
  transform: rotate(180deg);
}

.filter-dropdown-btn.is-filtered {
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(74, 222, 128, 0.08);
  color: var(--text-accent);
  font-weight: 600;
}

.dropdown-chevron {
  transition: transform 0.18s ease;
  color: var(--text-faint);
}

.filter-dropdown-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  min-width: 190px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.45), 0 8px 10px -6px rgba(0, 0, 0, 0.35);
  padding: 0.35rem 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
}

[data-theme="light"] .filter-dropdown-menu,
html.light .filter-dropdown-menu {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.06);
}

.filter-country-menu {
  min-width: 270px;
  max-width: 330px;
}

.country-search-box {
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

[data-theme="light"] .country-search-box,
html.light .country-search-box {
  background: #ffffff;
}

.country-search-input {
  width: 100%;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.78rem;
  outline: none;
}

.country-search-input:focus {
  border-color: var(--border-chip-active);
}

.country-scroll-list {
  max-height: 290px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.country-continent-header {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-cyan);
  padding: 0.55rem 0.85rem 0.25rem 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-subtle);
}

.country-continent-header:first-of-type {
  border-top: none;
}

.country-code-pill {
  font-size: 0.7rem;
  color: var(--text-faint);
  margin-left: 0.25rem;
}

.filter-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.85rem;
  font-size: 0.79rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}

.filter-dropdown-item:hover {
  background: var(--bg-chip-hover);
  color: var(--text-main);
}

.filter-dropdown-item.active {
  color: var(--text-accent);
  font-weight: 600;
  background: rgba(74, 222, 128, 0.05);
}

.item-check {
  font-size: 0.85rem;
  color: var(--text-accent);
  margin-left: 0.75rem;
  font-weight: bold;
}

.badge-time {
  color: var(--text-accent);
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}

.density-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-faint);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.density-btn:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
}

/* Compact Density Mode */
body.compact-density .result-card {
  padding: 0.85rem 1.15rem;
  gap: 0.2rem;
}

body.compact-density .result-heading {
  font-size: 1.1rem;
}

body.compact-density .result-snippet {
  font-size: 0.85rem;
  line-height: 1.45;
}

/* Results Meta Row */
.results-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-faint);
  margin-bottom: 1.25rem;
  padding: 0 0.25rem;
}

.meta-tag-organic {
  color: var(--text-accent);
  font-weight: 600;
  font-size: 0.75rem;
}

/* Results Feed */
.results-feed {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.result-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-fast);
}

.result-card:hover {
  border-color: rgba(16, 185, 129, 0.3);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.result-cite {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--text-accent);
  flex-wrap: wrap;
}

.result-cite-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-accent);
  display: inline-block;
}

.result-domain {
  color: var(--text-accent);
  font-family: var(--font-mono);
  font-weight: 500;
}

.result-source-badge {
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  color: var(--text-faint);
  font-size: 0.7rem;
  padding: 0.05rem 0.35rem;
  border-radius: 3px;
}

.result-date {
  color: var(--text-faint);
  font-family: var(--font-sans);
}

/* Native HTML5 Why-Seen Disclosure (100% Zero-JS & Accessible) */
.why-seen-disclosure {
  position: relative;
  margin-left: auto;
  display: inline-block;
}

.why-seen-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-faint);
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: all var(--transition-fast);
}

.why-seen-summary::-webkit-details-marker {
  display: none;
}

.why-seen-summary:hover {
  color: var(--text-cyan);
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.06);
}

.why-seen-summary:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.why-seen-chevron {
  transition: transform var(--transition-fast);
}

.why-seen-disclosure[open] .why-seen-chevron {
  transform: rotate(180deg);
}

.why-seen-disclosure[open] .why-seen-summary {
  color: var(--text-accent);
  border-color: var(--border-chip-active);
  background: var(--bg-chip-active);
}

.why-seen-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  width: 440px;
  max-width: 92vw;
  background: var(--bg-app);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.75), 0 0 0 1px var(--border-subtle);
  animation: whySlideDown 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes whySlideDown {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.why-seen-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.72rem;
}

.why-seen-source-tag {
  color: var(--text-accent);
  font-weight: 600;
  font-family: var(--font-mono);
}

.why-seen-privacy-tag {
  color: var(--text-cyan);
  background: rgba(56, 189, 248, 0.08);
  padding: 0.05rem 0.4rem;
  border-radius: 3px;
  font-size: 0.68rem;
}

.why-seen-text {
  font-size: 0.82rem;
  color: var(--text-main);
  line-height: 1.5;
  margin-bottom: 0.65rem;
}

.why-seen-footer {
  font-size: 0.7rem;
  color: var(--text-faint);
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.4rem;
}

/* Badges semánticos de procedencia en resultados */
.badge-alert-retraction {
  display: inline-flex;
  align-items: center;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

[data-theme="light"] .badge-alert-retraction {
  background: #fef2f2;
  border-color: #dc2626;
  color: #991b1b;
}

.badge-content-pill {
  display: inline-flex;
  align-items: center;
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  color: var(--text-accent);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
}

/* Panel estructurado de procedencia verificable */
.provenance-panel {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  margin: 0.6rem 0;
  font-size: 0.74rem;
}

[data-theme="light"] .provenance-panel {
  background: #f8fafc;
}

.provenance-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.5rem;
  padding: 0.25rem 0;
  border-bottom: 1px dashed var(--border-subtle);
  line-height: 1.4;
}

.provenance-row:last-child {
  border-bottom: none;
}

.provenance-key {
  color: var(--text-faint);
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.provenance-val {
  color: var(--text-main);
  word-break: break-word;
}

.text-retracted {
  color: #ef4444;
  font-weight: 700;
}

.text-unverified {
  color: var(--text-faint);
  font-style: italic;
}

.why-seen-link {
  color: var(--text-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

[data-theme="light"] .why-seen-dropdown {
  background: #ffffff;
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.result-heading {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0.15rem 0;
}

.result-link {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.result-link:hover {
  color: var(--text-link-hover);
}

.result-snippet {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.result-snippet mark {
  background-color: var(--mark-bg);
  color: var(--mark-text);
  font-weight: 600;
  padding: 0.08rem 0.3rem;
  border-radius: 3px;
}

/* Results metadata row */
.results-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-bottom: 1.25rem;
  padding: 0 0.25rem;
}

.meta-tag-organic {
  color: var(--text-accent);
  font-weight: 500;
  font-size: 0.75rem;
  background: rgba(16, 185, 129, 0.08);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Image Grid */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.image-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  transition: all var(--transition-fast);
}

.image-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
}

.image-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.image-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.image-card:hover .image-thumb img {
  transform: scale(1.04);
}

.image-caption {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.image-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.72rem;
}

.image-source {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  background: var(--bg-chip-active);
  color: var(--text-accent);
}

.image-domain {
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Video Grid (Sovereign & Open Video Cards) */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.video-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  transition: all var(--transition-fast);
}

.video-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.4);
}

.video-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.video-thumb-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-card:hover .video-thumb {
  transform: scale(1.04);
}

.video-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  background: rgba(15, 23, 42, 0.8);
}

.video-play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  color: #ffffff;
  opacity: 0.85;
  transition: all var(--transition-fast);
}

.video-card:hover .video-play-badge {
  opacity: 1;
  background: rgba(16, 185, 129, 0.25);
  color: var(--text-accent-hover);
}

.video-play-badge svg {
  background: rgba(0, 0, 0, 0.6);
  padding: 0.55rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.video-info {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.video-title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card:hover .video-title {
  color: var(--text-accent);
}

.video-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.74rem;
  margin-top: 0.15rem;
}

.video-channel {
  font-weight: 600;
  color: var(--text-cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

.video-domain {
  color: var(--text-faint);
  font-size: 0.7rem;
  background: var(--bg-chip);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.video-snippet {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0.2rem;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  font-size: 0.88rem;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.page-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-main);
}

.page-btn.active {
  background: var(--bg-chip-active);
  color: var(--text-accent);
  border-color: var(--border-chip-active);
  font-weight: 700;
}

.page-dots {
  color: var(--text-faint);
  padding: 0 0.25rem;
}

/* Bangs Hint Bar */
.bangs-hint-bar {
  margin-top: 2.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-faint);
}

.bangs-hint-bar code {
  color: var(--text-cyan);
  font-family: var(--font-mono);
  font-weight: 600;
}

/* Empty State / No Results Suggestions */
.no-results-panel {
  padding: 3.5rem 2rem;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.no-results-icon {
  color: var(--text-faint);
  margin-bottom: 1.25rem;
  opacity: 0.75;
}

.no-results-title {
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text-main);
}

.no-results-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.no-results-suggestions {
  width: 100%;
  max-width: 580px;
  margin-bottom: 1.5rem;
}

.suggestions-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.suggestions-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.suggestion-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.suggestion-chip:hover {
  background: var(--bg-chip-hover);
  border-color: var(--border-strong);
  color: var(--text-accent);
  transform: translateY(-1px);
}

.suggestion-chip .chip-cmd {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-cyan);
  font-size: 0.8rem;
}

.no-results-federation-tip {
  max-width: 580px;
  background: rgba(16, 185, 129, 0.07);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  text-align: left;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: 0.5rem;
}

.no-results-federation-tip code {
  color: var(--text-accent);
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.25);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

/* Info Pages (About, Privacy, Javascript) */
.info-card {
  max-width: 720px;
  margin: 3rem auto;
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
}

.info-card h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .info-card h1 {
  background: linear-gradient(135deg, #0f172a 40%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.info-card h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-accent);
}

.info-card p, .info-card ul {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.info-card ul {
  padding-left: 1.75rem;
}

.info-card li {
  margin-bottom: 0.4rem;
}

.info-card a {
  color: var(--text-accent);
  text-decoration: none;
}

.info-card a:hover {
  text-decoration: underline;
}

/* Footer */
footer.app-footer {
  height: 56px;
  background: var(--bg-app);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  font-size: 0.82rem;
  color: var(--text-faint);
}

.footer-left, .footer-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.footer-dot {
  color: var(--border-subtle);
}

footer.app-footer a {
  color: var(--text-faint);
  text-decoration: none;
  transition: color var(--transition-fast);
}

footer.app-footer a:hover {
  color: var(--text-main);
  text-decoration: underline;
}

/* Responsive Viewports */
@media (max-width: 640px) {
  header.app-header {
    padding: 0 1rem;
    height: 54px;
  }

  .home-brand-title {
    font-size: 2.5rem;
  }

  .results-layout {
    padding: 1rem 0.75rem 3rem 0.75rem;
  }

  .command-shortcut {
    display: none;
  }

  .results-tab-row {
    gap: 0.4rem;
    padding-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .results-tab-row::-webkit-scrollbar {
    display: none;
  }

  .results-tab-pill {
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    min-height: 40px;
  }

  .results-tools-bar,
  .results-filters-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .filter-group {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .filter-density-toggle {
    margin-top: 0.25rem;
  }

  .results-meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .result-card {
    padding: 0.85rem;
  }

  .result-heading {
    font-size: 1.15rem;
  }

  .why-seen-dropdown {
    width: 290px;
    right: -10px;
  }

  footer.app-footer {
    height: auto;
    padding: 1.25rem 1rem;
    flex-direction: column;
    gap: 0.65rem;
    text-align: center;
  }

  .footer-left, .footer-right {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .home-brand-title {
    font-size: 2.15rem;
  }

  .command-bar {
    padding: 0 0.75rem;
  }

  .why-seen-dropdown {
    width: 260px;
    right: -20px;
  }

  .suggestion-chip {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   Grounded AI Synthesis Box (Zero-JS, Accessible, Provenance-First)
   ========================================================================== */
.grounded-answer-box {
  margin-bottom: 1.5rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-left: 4px solid var(--text-cyan);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.grounded-answer-box.refusal {
  border-left-color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.04);
}

.grounded-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.grounded-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-cyan);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.grounded-answer-box.refusal .grounded-badge {
  color: #f59e0b;
}

.grounded-disclaimer {
  font-size: 0.75rem;
  color: var(--text-faint);
  font-style: italic;
}

.grounded-content p {
  margin: 0 0 0.85rem 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.grounded-citations {
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--border-subtle);
}

.citations-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.citations-list {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.citation-item {
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.citation-num {
  font-weight: 600;
  color: var(--text-cyan);
  margin-right: 0.25rem;
}

.citation-link {
  color: var(--text-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.citation-link:hover {
  color: #7dd3fc;
}

.citation-meta {
  color: var(--text-faint);
  font-size: 0.75rem;
  margin-left: 0.3rem;
}

/* ==========================================================================
   Verifiable Encyclopedic Entity Card (Wikipedia & Wikidata)
   ========================================================================== */
.entity-card {
  margin-bottom: 1.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.entity-card-body {
  display: flex;
  flex-direction: row;
  gap: 1.25rem;
  padding: 1.25rem;
}

.entity-thumbnail-wrapper {
  flex-shrink: 0;
  width: 140px;
  height: 175px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
}

.entity-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.entity-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.entity-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.entity-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.entity-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-cyan);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
}

.entity-description {
  margin: 0 0 0.5rem 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-accent);
}

.entity-extract {
  margin: 0 0 1rem 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.entity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.entity-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--bg-surface);
  background: var(--text-cyan);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.entity-action-btn:hover {
  opacity: 0.9;
}

.entity-action-btn.secondary {
  color: var(--text-secondary);
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
}

.entity-action-btn.secondary:hover {
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.entity-card-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  background: rgba(0, 0, 0, 0.12);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.74rem;
  color: var(--text-faint);
}

.entity-footer-sep {
  opacity: 0.5;
}

@media (max-width: 640px) {
  .entity-card-body {
    flex-direction: column;
    align-items: flex-start;
  }
  .entity-thumbnail-wrapper {
    width: 100%;
    max-width: 200px;
    height: 180px;
  }
}
