:root {
  --bg: #f3efe6;
  --bg-soft: #ebe4d6;
  --surface: rgba(255, 252, 246, 0.82);
  --surface-strong: #fffaf1;
  --ink: #1e2421;
  --muted: #5f665e;
  --line: rgba(30, 36, 33, 0.12);
  --gold: #c79b52;
  --forest: #1b252c;
  --amber: #bb7a20;
  --shadow: 0 24px 60px rgba(39, 26, 8, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(199, 155, 82, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(27, 37, 44, 0.24), transparent 26%),
    linear-gradient(180deg, #223038 0%, #1b252c 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 48px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-lockup__logo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.brand-lockup__text {
  display: flex;
  flex-direction: column;
}

.brand-lockup__chain {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-lockup__sub {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topnav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.topnav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--forest);
}

.topnav a:hover,
.topnav__more:hover {
  background: rgba(27, 37, 44, 0.08);
  color: var(--forest);
}

.topnav__more {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 42px;
  padding: 10px 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--forest);
  cursor: pointer;
  font: inherit;
}

.topnav__more span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0;
  border-radius: 999px;
  background: currentColor;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 22, 0.35);
  backdrop-filter: blur(2px);
  z-index: 30;
}

.more-drawer {
  position: fixed;
  top: 18px;
  right: 18px;
  width: min(360px, calc(100vw - 24px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 24px;
  background: rgba(255, 250, 241, 0.96);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transform: translateX(calc(100% + 24px));
  transition: transform 220ms ease;
  z-index: 40;
}

body.drawer-open .more-drawer {
  transform: translateX(0);
}

.account-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 24px;
  background: rgba(255, 250, 241, 0.98);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transform: translate(-50%, calc(-50% + 24px));
  opacity: 0;
  pointer-events: none;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
  z-index: 50;
}

body.account-modal-open .account-modal {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.account-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.account-modal__header h2 {
  margin: 6px 0 0;
  font-family: "Instrument Serif", serif;
  font-size: 2rem;
  line-height: 0.95;
}

.account-modal__copy {
  margin-bottom: 12px;
}

.checkbox-field {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 8px 0 2px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.25;
  width: 100%;
}

.checkbox-field input {
  width: 16px;
  height: 16px;
  margin-top: 0;
  flex: 0 0 auto;
  accent-color: var(--forest);
}

.checkbox-field span {
  display: inline-block;
  max-width: 100%;
}

.source-form .checkbox-field input {
  width: 16px;
}

.more-drawer__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.more-drawer__header h2 {
  margin: 6px 0 0;
  font-family: "Instrument Serif", serif;
  font-size: 2rem;
  line-height: 0.95;
}

.more-drawer__close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(27, 37, 44, 0.06);
  color: var(--forest);
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
}

.more-drawer__section {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.more-drawer__section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.more-drawer__label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.more-drawer__section a {
  display: block;
  padding: 12px 14px;
  border-radius: 16px;
  color: var(--ink);
  font-weight: 500;
}

.more-drawer__section a:hover {
  background: rgba(27, 37, 44, 0.08);
  color: var(--forest);
}

.app-shell {
  padding-top: 24px;
}

.mobile-tabbar {
  display: none;
}

.hero,
.page {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 28px;
  padding: 36px;
}

.hero__copy h1,
.page__header h1 {
  margin: 0 0 14px;
  font-family: "Instrument Serif", serif;
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  line-height: 0.95;
}

.page__header h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.result-snapshot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 6px;
  color: rgba(95, 102, 94, 0.9);
  font-size: 0.82rem;
  line-height: 1.35;
}

.result-snapshot__item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.result-snapshot__item strong {
  color: rgba(95, 102, 94, 0.78);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-snapshot__divider {
  color: rgba(30, 36, 33, 0.22);
}

.result-intro--compact {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 90ch;
  margin-top: 0;
  font-size: 0.96rem;
  line-height: 1.45;
}

.result-heading__logo,
.profile-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  padding: 7px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.profile-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero__panel,
.panel,
.result-card,
.analysis-card,
.source-card {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(30, 36, 33, 0.08);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.hero__panel {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(27, 37, 44, 0.94), rgba(17, 24, 29, 0.98)),
    #1b252c;
  color: #f6efde;
}

.score-card__label,
.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.build-version {
  margin: 0 0 12px;
  color: rgba(246, 239, 222, 0.78);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.lede {
  margin: 0;
  max-width: 64ch;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.hero__actions,
.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.button-with-tooltip {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.tooltip-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  min-width: 220px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(27, 37, 44, 0.96);
  color: #fffaf1;
  font-size: 0.84rem;
  line-height: 1.35;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 5;
}

.button-with-tooltip:hover .tooltip-bubble,
.button-with-tooltip:focus-within .tooltip-bubble {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

.result-link {
  color: var(--forest);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.button--primary {
  background: linear-gradient(135deg, var(--forest), #11181d);
  color: #fffaf1;
}

.button--ghost {
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--line);
  color: var(--ink);
}

.button--small {
  padding: 8px 12px;
  font-size: 0.88rem;
}

.checklist {
  margin: 18px 0 0;
  padding-left: 18px;
  line-height: 1.8;
}

.page {
  padding: 28px;
}

.page__header {
  margin-bottom: 24px;
}

.page__eyebrow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow--muted {
  color: rgba(95, 102, 94, 0.68);
  text-align: right;
}

.search-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: start;
}

.panel {
  padding: 20px;
}

.panel-kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panel__heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(27, 37, 44, 0.14);
  box-shadow: 0 12px 28px rgba(27, 37, 44, 0.07);
}

.search-intro {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  margin-bottom: 16px;
}

.search-intro h2 {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(1.35rem, 2.8vw, 1.9rem);
  line-height: 1.02;
}

.search-intro p,
.search-guidance p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.search-form__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.field-label {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font: inherit;
}

#brand-input {
  padding: 18px 20px;
  border: 1px solid rgba(27, 37, 44, 0.22);
  border-radius: 18px;
  background: #fffdf8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 10px 24px rgba(27, 37, 44, 0.07);
  font-size: 1.02rem;
}

#brand-input:focus {
  outline: 2px solid rgba(27, 37, 44, 0.16);
  outline-offset: 2px;
  border-color: rgba(27, 37, 44, 0.4);
}

.helper-text,
.status {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.search-guidance {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.search-guidance article {
  padding: 14px;
  border-radius: 18px;
  background: rgba(27, 37, 44, 0.06);
  border: 1px solid rgba(27, 37, 44, 0.1);
}

.panel--recent {
  padding-top: 14px;
}

.panel--recent .panel__heading {
  margin-bottom: 12px;
}

.status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(27, 37, 44, 0.08);
  border: 1px solid rgba(27, 37, 44, 0.12);
}

.status--error {
  color: #8b2e12;
  background: rgba(187, 122, 32, 0.14);
  border-color: rgba(187, 122, 32, 0.18);
}

.suggestions-panel {
  margin-top: 14px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(199, 155, 82, 0.1);
  border: 1px solid rgba(199, 155, 82, 0.18);
}

.suggestion-chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.suggestion-chip {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(27, 37, 44, 0.16);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font: inherit;
}

.recent-list,
.source-grid,
.analysis-grid,
.result-grid {
  display: grid;
  gap: 14px;
}

.recent-item,
.source-card,
.analysis-card,
.result-card {
  padding: 16px;
}

.recent-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  cursor: pointer;
  transition:
    transform 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    color 140ms ease;
}

.recent-item:hover,
.recent-item:focus-visible {
  transform: translateY(-2px);
  background:
    linear-gradient(135deg, rgba(27, 37, 44, 0.96), rgba(17, 24, 29, 0.97)),
    #1b252c;
  border-color: rgba(27, 37, 44, 0.92);
  box-shadow: 0 16px 34px rgba(19, 32, 29, 0.18);
  color: #fff8ec;
  outline: none;
}

.recent-item:hover .recent-item__meta,
.recent-item:focus-visible .recent-item__meta,
.recent-item:hover .recent-item__title,
.recent-item:focus-visible .recent-item__title {
  color: #fff8ec;
}

.recent-item:active {
  transform: translateY(0);
}

.recent-item__meta,
.result-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.recent-item__title,
.source-card h2,
.analysis-card h2,
.result-card h2 {
  margin: 8px 0 6px;
  font-size: 1.04rem;
}

.result-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.overview-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.overview-stat {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.overview-stat__label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.overview-stat__value {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
}

.overview-stat__sub {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.result-card--hero {
  grid-column: 1 / -1;
  background:
    linear-gradient(180deg, rgba(27, 37, 44, 0.95), rgba(17, 24, 29, 0.98)),
    #1b252c;
  color: #fff8ec;
}

.band-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
}

.signal-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
}

.hero-summary {
  margin: 18px 0 0;
  max-width: 68ch;
  color: rgba(255, 248, 236, 0.92);
  font-size: 1rem;
  line-height: 1.65;
}

.analysis-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analysis-grid--compact {
  margin-top: 16px;
}

.analysis-card--full {
  margin-top: 16px;
  padding: 18px;
}

.confirm-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
}

.confirm-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(27, 37, 44, 0.06);
  border: 1px solid rgba(27, 37, 44, 0.1);
}

.confirm-card h2,
.profile-grid h3 {
  margin: 0 0 8px;
}

.confirm-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.profile-stat {
  padding: 14px;
  border-radius: 18px;
  background: rgba(27, 37, 44, 0.05);
  border: 1px solid rgba(27, 37, 44, 0.08);
}

.profile-stat__label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-stat__value {
  display: block;
  line-height: 1.5;
}

.analysis-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  line-height: 1.7;
}

.analysis-card p,
.source-card p,
.result-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.simple-page-card {
  grid-column: 1 / -1;
}

.simple-page-body {
  width: 100%;
  max-width: none;
}

.simple-page-body > * {
  max-width: none;
}

.simple-page-body p,
.simple-page-body ul,
.simple-page-body ol,
.simple-page-body h3,
.simple-page-body hr {
  max-width: none;
}

.simple-page-body p,
.simple-page-body li {
  line-height: 1.7;
}

.simple-page-body ul,
.simple-page-body ol {
  margin: 12px 0 0;
  padding-left: 20px;
}

.simple-page-body h3 {
  margin: 22px 0 8px;
}

.source-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sources-toolbar {
  margin-bottom: 16px;
}

.page__header-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.page__header-inline h1 {
  margin: 0;
}

.source-form {
  display: grid;
  gap: 14px;
}

.source-form textarea,
.source-form input {
  width: 100%;
}

.donate-embed {
  width: 100%;
  min-height: 520px;
  border: 0;
  border-radius: 18px;
  background: rgba(27, 37, 44, 0.04);
}

.admin-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.admin-nav-card {
  position: sticky;
  top: 20px;
}

.admin-section-nav {
  display: grid;
  gap: 10px;
}

.admin-section-nav__link {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--forest);
  text-decoration: none;
  border: 1px solid rgba(27, 37, 44, 0.08);
  background: rgba(27, 37, 44, 0.04);
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.admin-section-nav__link:hover,
.admin-section-nav__link:focus-visible,
.admin-section-nav__link.is-active {
  background:
    linear-gradient(135deg, rgba(27, 37, 44, 0.96), rgba(17, 24, 29, 0.97)),
    #1b252c;
  border-color: rgba(27, 37, 44, 0.92);
  color: #fff8ec;
  transform: translateY(-1px);
  outline: none;
}

.admin-section-content {
  min-width: 0;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-list__item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(27, 37, 44, 0.05);
  border: 1px solid rgba(27, 37, 44, 0.08);
}

.admin-list__item--interactive {
  transition:
    transform 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    color 140ms ease;
}

.admin-list__item--interactive:hover,
.admin-list__item--interactive:focus-within {
  transform: translateY(-2px);
  background:
    linear-gradient(135deg, rgba(27, 37, 44, 0.96), rgba(17, 24, 29, 0.97)),
    #1b252c;
  border-color: rgba(27, 37, 44, 0.92);
  box-shadow: 0 16px 34px rgba(19, 32, 29, 0.18);
  color: #fff8ec;
}

.admin-list__button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.admin-list__button:hover,
.admin-list__button:focus-visible {
  color: inherit;
  outline: none;
}

.admin-list__button span:last-child {
  color: var(--muted);
}

.admin-list__item--interactive:hover .admin-list__button span:last-child,
.admin-list__item--interactive:focus-within .admin-list__button span:last-child,
.admin-list__item--interactive:hover .admin-list__item--saved span,
.admin-list__item--interactive:focus-within .admin-list__item--saved span {
  color: rgba(255, 248, 236, 0.82);
}

.admin-list__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.band-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: rgba(27, 37, 44, 0.22);
}

.tone-green {
  background: #5ac94a;
}

.tone-amber {
  background: #e6a33d;
}

.tone-red {
  background: #da4a43;
}

.tone-neutral {
  background: rgba(27, 37, 44, 0.28);
}

.admin-list__item--saved {
  align-items: center;
}

.admin-list__item--saved strong,
.admin-list__item--saved span {
  display: block;
}

.admin-list__button--saved {
  display: block;
  flex: 1;
}

.admin-list__item--saved span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-table {
  display: grid;
  gap: 12px;
}

.admin-table__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(27, 37, 44, 0.05);
  border: 1px solid rgba(27, 37, 44, 0.08);
  transition:
    transform 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    color 140ms ease;
}

.admin-table__row:hover,
.admin-table__row:focus-within {
  transform: translateY(-2px);
  background:
    linear-gradient(135deg, rgba(27, 37, 44, 0.96), rgba(17, 24, 29, 0.97)),
    #1b252c;
  border-color: rgba(27, 37, 44, 0.92);
  box-shadow: 0 16px 34px rgba(19, 32, 29, 0.18);
}

.admin-table__row div {
  display: grid;
  gap: 4px;
}

.admin-table__row strong {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-table__row span {
  word-break: break-word;
}

.admin-table__row:hover strong,
.admin-table__row:focus-within strong {
  color: rgba(255, 248, 236, 0.7);
}

.admin-table__row:hover span,
.admin-table__row:focus-within span,
.admin-table__row:hover a,
.admin-table__row:focus-within a {
  color: #fff8ec;
}

.admin-table__row--source {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.admin-table__full {
  grid-column: 1 / -1;
}

.admin-actions {
  display: flex !important;
  justify-content: flex-end;
  align-items: center;
}

.admin-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(27, 37, 44, 0.08);
  border: 1px solid rgba(27, 37, 44, 0.14);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--forest);
}

.sources-admin-link {
  margin-top: 18px;
}

@media (max-width: 980px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-nav-card {
    position: static;
  }
}

.sources-admin-link a {
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.source-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.source-card__image {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  flex-shrink: 0;
}

.source-card__image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--forest);
  font-weight: 700;
}

.source-card__meta {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

.source-card__meta a {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

.source-link-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.source-link {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(27, 37, 44, 0.06);
  border: 1px solid rgba(27, 37, 44, 0.08);
}

.source-link strong {
  display: block;
  margin-bottom: 6px;
}

.source-link a {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero,
  .search-layout,
  .confirm-layout,
  .search-intro,
  .search-guidance,
  .overview-strip,
  .analysis-grid,
  .profile-grid,
  .source-grid,
  .result-grid,
  .sources-toolbar {
    grid-template-columns: 1fr;
  }

  .topbar {
    border-radius: 28px;
    align-items: center;
    flex-direction: row;
  }

  .more-drawer {
    top: 12px;
    right: 12px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

  .account-modal {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    padding: 22px;
  }
}

@media (max-width: 640px) {
  .account-modal {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-height: min(72vh, 680px);
    padding: 18px;
    border-radius: 24px;
    transform: translateY(calc(100% + 24px));
  }

  body.account-modal-open .account-modal {
    transform: translateY(0);
  }

  .site-shell {
    width: min(100% - 20px, 1200px);
    padding-top: 14px;
    padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px));
  }

  .hero,
  .page {
    padding: 18px;
  }

  .page__header {
    margin-bottom: 14px;
  }

  .page__header h1 {
    margin-bottom: 6px;
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  .lede {
    max-width: none;
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .search-form__row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .search-layout {
    gap: 12px;
  }

  .panel {
    padding: 16px;
  }

  .search-intro {
    display: block;
    margin-bottom: 12px;
  }

  .search-intro h2 {
    max-width: none;
    font-size: 1.55rem;
    line-height: 1.02;
  }

  .search-intro > p {
    margin-top: 8px;
    font-size: 0.92rem;
    line-height: 1.42;
  }

  .search-form {
    padding: 14px;
    gap: 8px;
    border-radius: 18px;
  }

  .field-label {
    font-size: 0.74rem;
    letter-spacing: 0.09em;
  }

  #brand-input {
    padding: 15px 16px;
    border-radius: 16px;
  }

  .helper-text {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.32;
  }

  .search-guidance {
    gap: 10px;
    margin-top: 10px;
  }

  .search-guidance article {
    padding: 14px;
  }

  .topbar {
    position: static;
    z-index: auto;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 18px;
  }

  .brand-lockup__logo {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .topnav {
    display: none;
  }

  .mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 250, 241, 0.98);
    border-top: 1px solid var(--line);
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 20px 40px rgba(12, 17, 20, 0.18);
  }

  .mobile-tabbar__item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    align-items: center;
    min-height: 60px;
    padding: 8px 4px;
    border-radius: 16px;
    color: var(--forest);
  }

  .mobile-tabbar__button {
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
  }

  .mobile-tabbar__icon {
    display: inline-flex;
    width: 20px;
    min-width: 20px;
    height: 20px;
    color: var(--forest);
  }

  .mobile-tabbar__icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
  }

  .mobile-tabbar__label {
    display: block;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--forest);
    text-align: center;
    line-height: 1.05;
  }

  .app-shell {
    padding-top: 18px;
    padding-bottom: calc(126px + env(safe-area-inset-bottom, 0px));
  }

  .more-drawer {
    left: 10px;
    right: 10px;
    top: auto;
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-height: min(68vh, 680px);
    border-radius: 24px 24px 16px 16px;
    transform: translateY(calc(100% + 24px));
  }

  body.drawer-open .more-drawer {
    transform: translateY(0);
  }
}
