﻿body {
  background-attachment: fixed;
}

:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-soft: #f3f7fb;
  --text: #0f172a;
  --muted: #64748b;
  --border: #cfdae7;
  --border-strong: #bdcbdd;
  --accent: #334155;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --yellow: #d97706;
  --yellow-soft: #fef3c7;
  --green: #15803d;
  --green-soft: #dcfce7;
  --shadow: 0 20px 48px rgba(15, 23, 42, 0.06);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.site-header,
.page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 12px;
  height: auto;
  background: transparent;
  border-bottom: 0;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--blue) 0%, #4f8cff 100%);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.22);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-size: 0.98rem;
  font-weight: 700;
}

.brand-copy span {
  font-size: 0.84rem;
  color: var(--muted);
}

.page {
  max-width: none;
  padding: 24px 0 72px;
  margin-top: 0;
}

#credit-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid rgba(219, 228, 239, 0.7);
  background: var(--surface-soft);
  color: #94a3b8;
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 40px;
  text-align: center;
  white-space: nowrap;
}

#credit-badge.warn {
  background: #fff4f4;
  color: #b91c1c;
  border-color: #fecaca;
}

.search-shell {
  padding: 0;
}

.search-toolbar {
  margin-bottom: 28px;
  padding-bottom: 22px;
}

.search-wrap {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  position: relative;
}

#search-input {
  flex: 1;
  height: 54px;
  padding: 0 18px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#search-input:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 4px rgba(51, 65, 85, 0.08);
}

#search-input:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

#search-input::placeholder {
  color: #9aa7b8;
  font-weight: 400;
}

#search-btn {
  min-width: 118px;
  height: 54px;
  padding: 0 20px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue) 0%, #4f8cff 100%);
  color: #fff;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

#search-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#search-icon {
  display: none;
}

.region-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.region-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.region-pill {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(207, 218, 231, 0.58);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
  color: #5b6779;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.region-pill:hover,
.region-pill.active {
  border-color: rgba(37, 99, 235, 0.3);
  background: linear-gradient(135deg, var(--blue) 0%, #4f8cff 100%);
  color: #ffffff;
}

.offices-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.offices-label-text {
  font-size: 0.9rem;
  color: var(--muted);
}

#offices-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(207, 218, 231, 0.58);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  color: #334155;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

#offices-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px 0;
  z-index: 50;
}

#offices-dropdown.open {
  display: grid;
  grid-template-columns: repeat(var(--office-columns, 1), minmax(0, 1fr));
}

#offices-dropdown.office-cols-1 {
  min-width: 240px;
}

#offices-dropdown.office-cols-2 {
  min-width: 380px;
}

#offices-dropdown.office-cols-3 {
  min-width: 540px;
}

.office-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  cursor: pointer;
  color: #334155;
}

.office-option:hover {
  background: #f8fafc;
}

.office-option input[type=checkbox] {
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
}

.office-fixed {
  color: #94a3b8;
  cursor: default;
}

.office-fixed:hover {
  background: none;
}

.office-divider {
  height: 1px;
  background: #e9eff6;
  margin: 6px 0;
  grid-column: 1 / -1;
}

.arrow {
  font-size: 0.72rem;
  color: var(--muted);
}

#no-credits-banner {
  background: #fff4f4;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #b91c1c;
  line-height: 1.5;
}

#no-credits-banner a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
  margin-left: 8px;
  white-space: nowrap;
}

#no-credits-banner a:hover {
  text-decoration: underline;
}

#searching-msg,
#refilter-loading,
#analysis-card,
#verdict-panel,
.country-block {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfe 100%);
  box-shadow: var(--shadow-soft);
}

#searching-msg {
  text-align: center;
  padding: 40px;
  margin-bottom: 20px;
  border: 1px solid rgba(219, 228, 239, 0.7);
  border-radius: 18px;
  background: var(--surface-soft);
  box-shadow: none;
}

.spinner-ring {
  width: 44px;
  height: 44px;
  border: 4px solid #e5e7eb;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 1.1s linear infinite;
  margin: 0 auto 14px;
}

.btn-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid #e5e7eb;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

#searching-msg .label-main,
#analysis-loading .label-main,
#refilter-loading .label-main {
  font-size: 15px;
  color: #334155;
  font-weight: 600;
  margin-bottom: 6px;
}

#searching-msg .label-sub,
#analysis-loading .label-sub,
#refilter-loading .label-sub {
  font-size: 13px;
  color: #94a3b8;
}

.search-error-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.search-error-icon {
  font-size: 28px;
  margin-bottom: 4px;
}

#refilter-loading {
  display: none;
  text-align: center;
  padding: 40px;
  margin-bottom: 20px;
}


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

.results-heading {
  min-width: 0;
}

#results-title {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  font-weight: 700;
}

#results-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.94rem;
}

.meta-category-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-category-label {
  display: inline-flex;
  align-items: center;
  color: #5b6779;
  font-size: 0.82rem;
  font-weight: 500;
}

.meta-category-separator {
  margin-right: 4px;
}

.meta-category-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(243, 247, 251, 0.95);
  border: 0;
  color: #5b6779;
  font-size: 0.82rem;
  font-weight: 500;
}

.meta-refilter-btn {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(207, 218, 231, 0.68);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #475569;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
}

#export-btn {
  border: none;
  background: linear-gradient(135deg, var(--blue) 0%, #4f8cff 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.22);
}

#export-btn:hover {
  text-decoration: none;
  filter: brightness(1.04);
}

#export-btn .btn-spinner {
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
}

#analysis-card {
  padding: 22px 24px;
  margin-bottom: 18px;
  border: 1px solid rgba(219, 228, 239, 0.7);
  border-radius: 16px;
  background: var(--surface-soft);
  box-shadow: none;
}

.analysis-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.analysis-card-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.analysis-card-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--blue) 0%, #4f8cff 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

#analysis-summary {
  font-size: 14px;
  color: #334155;
  line-height: 1.6;
  margin-bottom: 28px;
}

#analysis-summary .chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 6px;
}

#analysis-summary .chip-red { background: var(--red-soft); color: #991b1b; }
#analysis-summary .chip-yellow { background: var(--yellow-soft); color: #92400e; }
#analysis-summary .chip-green { background: var(--green-soft); color: #166534; }


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

.panel-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

#analysis-loading {
  text-align: center;
  padding: 16px 0;
}

#analysis-content {
  font-size: 14px;
  line-height: 1.85;
  color: #334155;
}

#analysis-content h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 14px 0 6px;
  color: #111827;
}

#analysis-content p {
  margin: 4px 0;
}

#analysis-content p:last-child em {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}

.analysis-error {
  color: #b91c1c;
  font-size: 14px;
}

.retry-link {
  margin-left: 8px;
  font-size: 13px;
  color: #2563eb;
  text-decoration: underline;
  cursor: pointer;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 18px;
}

.side-column,
.main-column {
  display: grid;
  gap: 16px;
  align-content: start;
}

#verdict-panel {
  padding: 20px;
  border: 1px solid rgba(219, 228, 239, 0.7);
  border-radius: 18px;
  background: var(--surface-soft);
  box-shadow: none;
}

.verdict-row {
  display: grid;
  grid-template-columns: 10px minmax(64px, max-content) 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  font-size: 14px;
  border-bottom: 1px solid #e9eff6;
}

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

.traffic-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.traffic-dot-red {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.traffic-dot-yellow {
  background: var(--yellow);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.12);
}

.traffic-dot-green {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.12);
}

.verdict-name {
  display: block;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.verdict-text {
  color: #334155;
  font-size: 13px;
  line-height: 1.6;
}

.verdict-eu-note {
  color: var(--muted);
  font-size: 12px;
  margin-left: 6px;
}

#verdict-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e9eff6;
}

#verdict-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#results-list {
  display: block;
}

.country-block {
  padding: 0;
  margin-bottom: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.country-block + .country-block {
  margin-top: 22px;
}

.country-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #334155;
}

.country-name {
  color: var(--muted);
  font-weight: 500;
}

.country-count {
  margin-left: auto;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
}

.country-empty {
  color: #94a3b8;
  font-size: 13px;
  padding: 8px 0 16px;
}

.tm-card {
  background: var(--surface-soft);
  border: 1px solid rgba(219, 228, 239, 0.7);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.tm-card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 10px;
  flex-shrink: 0;
  background: #fff;
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.tm-card img:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
}

/* ---------- Trademark image lightbox ---------- */
.tm-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 25, 0.86);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  z-index: 9999;
  cursor: pointer;
  animation: tm-lb-fade 0.15s ease-out;
}
.tm-lightbox.open { display: flex; }
@keyframes tm-lb-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.tm-lightbox-inner {
  position: relative;
  max-width: min(92vw, 900px);
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: auto;
}

.tm-lightbox img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  user-select: none;
  -webkit-user-drag: none;
  animation: tm-lb-pop 0.18s ease-out;
}
@keyframes tm-lb-pop {
  from { transform: scale(0.96); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.tm-lightbox-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: tm-lb-spin 0.8s linear infinite;
}
@keyframes tm-lb-spin {
  to { transform: rotate(360deg); }
}

.tm-lightbox-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: none;
  font-size: 20px;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: grid;
  place-items: center;
  line-height: 1;
}
.tm-lightbox-close:hover { background: #f1f5f9; }

.tm-lightbox-error {
  color: #fff;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: 10px;
  padding: 16px 24px;
  font-size: 14px;
}

.tm-placeholder {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #ffffff 0%, #eef4fb 100%);
  color: #475569;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tm-card .tm-info {
  flex: 1;
  min-width: 0;
}

.tm-card .tm-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0f172a;
}

.tm-card .tm-meta {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.75;
}

.tm-card .tm-meta span {
  margin-right: 12px;
}

.tm-card .tm-designations {
  font-size: 11px;
  color: #475569;
  margin-top: 4px;
  word-break: break-word;
}

.badge {
  display: inline-block;
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 8px;
  font-weight: 500;
  margin-left: 6px;
}

.badge-active,
.badge-expired,
.badge-pending {
  background: #fff;
  color: #64748b;
  border: 1px solid var(--border);
}

.badge-conflict-direct {
  background: var(--red-soft);
  color: #991b1b;
}

.badge-conflict-indirect {
  background: var(--yellow-soft);
  color: #92400e;
}

.badge-conflict-none {
  background: var(--green-soft);
  color: #166534;
}

.welcome-note {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.welcome-replacement-note {
  display: none;
  color: var(--red);
  font-size: 12px;
  font-weight: 500;
  margin: -6px 0 14px;
}

#welcome-modal.is-replacement .welcome-replacement-note {
  display: block;
}

.welcome-url-row {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.welcome-url-row input {
  flex: 1;
  height: 38px;
  padding: 0 10px;
  font-size: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-family: monospace;
  min-width: 0;
}

.welcome-url-row button,
.confirm-go {
  background: linear-gradient(135deg, var(--blue) 0%, #4f8cff 100%);
  color: #fff;
  border: none;
}

.welcome-url-row button {
  height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.welcome-close-btn,
.confirm-cancel {
  background: #f8fafc;
  border: 1px solid var(--border);
  color: #475569;
}

.welcome-close-btn {
  width: 100%;
  height: 42px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

.modal-box {
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.modal-box h2 {
  color: #0f172a;
}

.modal-close {
  color: #94a3b8;
}

.confirm-box {
  max-width: 520px;
  padding: 28px 24px 24px;
  text-align: center;
}

.confirm-box h2 {
  margin-bottom: 10px;
}

.confirm-credits {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.confirm-offices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--muted);
}

#confirm-offices {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.confirm-office-tag {
  background: linear-gradient(135deg, var(--blue) 0%, #4f8cff 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 600;
}

.confirm-actions {
  display: flex;
  gap: 10px;
}

.confirm-cancel,
.confirm-go {
  height: 42px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

.confirm-cancel {
  flex: 1;
}

.confirm-go {
  flex: 2;
  font-weight: 600;
}

.confirm-go:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.confirm-section-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
  text-align: left;
}

#confirm-category-grid,
#refilter-category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

#confirm-category-grid label,
#refilter-category-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}

#confirm-category-grid label:hover,
#refilter-category-grid label:hover,
#confirm-category-grid label:has(input:checked),
#refilter-category-grid label:has(input:checked) {
  border-color: #94a3b8;
  background: #f8fafc;
}

#confirm-category-grid input[type=checkbox],
#refilter-category-grid input[type=checkbox] {
  accent-color: var(--blue);
  flex-shrink: 0;
}

#confirm-category-grid label:has(input:disabled:not(:checked)),
#refilter-category-grid label:has(input:disabled:not(:checked)) {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

#confirm-category-counter,
#refilter-category-counter {
  font-size: 13px;
  color: var(--muted);
  text-align: right;
  margin-bottom: 14px;
}

.modal-box:has([data-mode="complex"]) {
  max-width: 780px;
}

.modal-box:has([data-mode="complex"]) #confirm-category-grid,
.modal-box:has([data-mode="complex"]) #refilter-category-grid {
  grid-template-columns: 1fr 1fr 1fr;
}

.niceclass-toggle-row {
  grid-column: 1 / -1;
  text-align: left;
  margin-top: 4px;
}

.niceclass-toggle-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 0;
  font-family: inherit;
}

.niceclass-toggle-btn:hover,
.meta-refilter-btn:hover {
  text-decoration: underline;
}

.meta-refilter-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 980px) {
  .results-header,
  .dashboard-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .dashboard-grid {
    display: grid;
  }
}

@media (max-width: 720px) {
  .site-header,
  .page {
    width: min(100% - 24px, 1180px);
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .search-shell {
    padding: 0;
  }

  .search-wrap,
  .results-header,
  .confirm-actions,
  .welcome-url-row {
    flex-direction: column;
  }

  #search-btn,
  .confirm-cancel,
  .confirm-go,
  .welcome-url-row button {
    width: 100%;
  }

  .offices-wrap {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  #offices-dropdown.open {
    position: static;
    flex-basis: 100%;
    width: 100%;
    min-width: 0;
    grid-template-columns: 1fr;
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  #confirm-category-grid,
  #refilter-category-grid {
    grid-template-columns: 1fr;
  }
}
