:root {
  --bg: #e9f0f8;
  --panel: #ffffff;
  --text: #11283f;
  --muted: #4e6478;
  --line: #c8d7e8;
  --brand: #0a4a7a;
  --brand-strong: #083b63;
  --teal: #0a8ea0;
  --hl: #ffe270;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

body {
  font: 15px/1.45 "Public Sans", "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1500px 700px at 5% -10%, #f4f8fd 8%, transparent 64%),
    linear-gradient(180deg, #f6fafe 0%, var(--bg) 100%);
  overflow: hidden;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(10, 39, 63, 0.06);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  padding: 10px 14px;
  background: rgba(233, 240, 248, 0.85);
  backdrop-filter: blur(5px);
}

.header-inner {
  width: min(1560px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 12px;
}

.top-nav-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-link {
  display: inline-flex;
  align-items: center;
}

.hero-logo {
  width: min(250px, 100%);
  height: auto;
  display: block;
}

.hero-brand-row {
  display: none;
}

.hero-logo--hero {
  width: 550px;
  max-width: 78vw;
}

.search-form {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1.25fr 1fr auto auto;
  gap: 10px;
}

.search-form--service {
  display: flex;
  align-items: center;
  gap: 10px;
}

.service-search-pill {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  border: 1px solid #abc2d8;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(8, 40, 70, 0.12);
  /* Keep the pill rounded without clipping the region dropdown menu. */
  overflow: visible;
  min-height: 56px;
}

.region-picker {
  position: relative;
  flex: 0 0 auto;
}

.home-search:not(.service-has-search) .region-picker {
  top: 3px;
}

.home-search.service-has-search .region-picker {
  top: 3px;
}

.region-btn {
  border: 0;
  background: transparent;
  height: 56px;
  padding: 0 2px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
  color: #294257;
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  overflow: hidden;
}

.region-btn:hover {
  background: #eef5fc;
}

.region-flag {
  width: 22px;
  height: 16px;
  display: block;
  border-radius: 2px;
  border: 1px solid rgba(20, 40, 60, 0.18);
  object-fit: cover;
}

/* The selected flag in the search pill should be much larger than the dropdown rows. */
#region-flag.region-flag {
  width: auto;
  height: 56px;
  max-width: 84px;
  border-radius: 999px 0 0 999px;
  border: 0;
  object-fit: contain;
}

.region-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  padding: 8px;
  z-index: 1200;
}

.region-option {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  color: #163751;
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.region-option:hover,
.region-option[aria-selected="true"] {
  background: #eef5fc;
}

.region-option[aria-selected="true"] {
  outline: 2px solid #86b5de;
  outline-offset: 2px;
}

.entity-type-picker {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 0;
}

.entity-type-btn {
  border: 0;
  background: transparent;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1d3f5c;
  cursor: pointer;
}

.entity-type-btn:hover {
  background: #eef5fc;
  box-shadow: 0 6px 16px rgba(9, 38, 60, 0.16);
}

.entity-type-btn:focus-visible {
  outline: 2px solid #86b5de;
  outline-offset: 2px;
}

.entity-type-icon,
.entity-type-option-icon,
.service-autocomplete-type-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.entity-type-icon svg,
.entity-type-option-icon svg,
.service-autocomplete-type-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.entity-type-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 176px;
  padding: 6px;
  z-index: 1300;
}

.entity-type-option {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 8px;
  cursor: pointer;
  color: #163751;
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.entity-type-option:hover,
.entity-type-option[aria-selected="true"] {
  background: #eef5fc;
}

.entity-type-option[aria-selected="true"] {
  outline: 2px solid #86b5de;
  outline-offset: 2px;
}

.service-autocomplete-item-wrap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.service-autocomplete-item-text {
  min-width: 0;
}

.service-autocomplete-type-icon {
  flex: 0 0 auto;
  margin-top: 1px;
  color: #294257;
}

#search-q {
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  border: 0;
  background: transparent;
  padding: 12px 14px 12px 8px;
  font: inherit;
  color: var(--text);
}

#search-query-wrap.search-query-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.search-tag-chips {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 48%;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-left: 2px;
}

.search-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #b7ccdf;
  background: #eef5fc;
  color: #153750;
  border-radius: 999px;
  padding: 3px 7px;
  white-space: nowrap;
  font-size: 0.82rem;
  line-height: 1;
}

.search-tag-chip-label {
  font-weight: 700;
}

.search-tag-chip-remove {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  padding: 0;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-tag-chip-remove:hover {
  background: rgba(18, 53, 84, 0.14);
}

#search-q:focus {
  outline: none;
}

.where-autocomplete-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.where-autocomplete {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 1300;
  padding: 6px;
  max-height: min(340px, 52vh);
  overflow-y: auto;
}

.where-autocomplete-note {
  padding: 8px 10px;
  color: #35526a;
  font-size: 0.91rem;
  border-bottom: 1px solid #d8e4ef;
  margin-bottom: 4px;
}

.where-autocomplete-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.where-autocomplete-item {
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: #163751;
  font: inherit;
}

.where-autocomplete-item:hover,
.where-autocomplete-item[aria-selected="true"] {
  background: #eef5fc;
}

.where-autocomplete-name {
  font-weight: 700;
}

.where-autocomplete-disambiguator {
  color: #54718a;
  margin-left: 3px;
}

.search-actions {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px 0 8px;
}

.search-sep {
  color: #35526a;
  opacity: 0.60;
  font-weight: 700;
}

.search-action-btn {
  border: 0;
  background: transparent;
  height: 34px;
  padding: 0 6px;
  cursor: pointer;
  color: var(--text);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-action-btn:hover {
  background: transparent;
  box-shadow: 0 6px 16px rgba(9, 38, 60, 0.16);
}

.search-action-btn:focus-visible {
  outline: 2px solid #86b5de;
  outline-offset: 2px;
}

.search-clear {
  font: inherit;
}

.search-go {
  width: auto;
}

.search-actions .search-clear,
.search-actions .search-go {
  width: 30px;
  min-width: 30px;
  padding: 0;
  gap: 0;
}

.icon {
  display: block;
}

.icon-search {
  width: 18px;
  height: 18px;
}

.icon-x {
  width: 18px;
  height: 18px;
}

.search-field-wrap {
  position: relative;
}

#search-what,
#search-where,
#clarify-q,
#medicine-q,
#devices-q {
  width: 100%;
  border: 1px solid #abc2d8;
  border-radius: 9px;
  padding: 11px 13px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

#search-what:focus,
#search-where:focus,
#clarify-q:focus,
#medicine-q:focus,
#devices-q:focus {
  outline: 2px solid #86b5de;
  outline-offset: 1px;
}

.search-form--single {
  grid-template-columns: 1fr auto;
}

.home-search:not(.service-has-search) .page-shell-fixed {
  display: none;
}

.home-search:not(.service-has-search) .search-explain {
  display: none;
}

.home-search:not(.service-has-search) #install-app-btn {
  display: none !important;
}

.home-search:not(.service-has-search) .top-nav-row {
  display: none;
}

.home-search:not(.service-has-search) .header-inner.panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.home-search:not(.service-has-search) .hero-brand-row {
  display: flex;
  position: fixed;
  left: 50%;
  top: calc(46vh - 150px);
  transform: translate(-50%, -50%);
  z-index: 1001;
  justify-content: center;
}

.home-search:not(.service-has-search) .search-form--service {
  position: fixed;
  top: 46vh;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(860px, calc(100vw - 28px));
  z-index: 1000;
  margin-top: 0;
}

.home-search:not(.service-has-search) .search-go {
  display: none;
}

.home-search:not(.service-has-search) .search-actions {
  display: none;
}

.hero-ad-slot {
  display: none;
}

.home-search:not(.service-has-search) .hero-ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  left: 50%;
  top: calc(73vh - (var(--footer-h, 76px) / 2));
  transform: translate(-50%, -50%);
  width: min(860px, calc(100vw - 28px));
  /* Keep this behind the region dropdown (and search pill) in hero mode. */
  z-index: 800;
}

.home-search.service-has-search .hero-ad-slot {
  display: none;
}

.home-search:not(.service-has-search) .service-search-pill {
  height: 58px;
  box-shadow: 0 16px 46px rgba(8, 40, 70, 0.16);
}

.home-search.service-has-search .service-search-pill {
  flex: 0 1 760px;
  height: 58px;
  box-shadow: 0 7px 18px rgba(8, 40, 70, 0.10);
}

.home-search.service-has-search .search-form--service {
  justify-content: center;
}

.search-tips {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid #cfdfef;
  background: #f5fbff;
  color: #1f3c55;
  font-size: 13px;
}

.search-tips code {
  background: #e8f2fd;
  border-radius: 4px;
  padding: 1px 4px;
}

.search-explain {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid #cfdfef;
  background: #f7fbff;
  color: #1f3c55;
  font-size: 13px;
}

.search-explain > summary {
  cursor: pointer;
  font-weight: 800;
  color: #143a5b;
}

.search-explain-pre {
  margin: 10px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  background: #eef5fc;
  border: 1px solid #d1e0ef;
  border-radius: 8px;
  padding: 10px;
  font: 12px/1.45 Consolas, "Courier New", monospace;
  color: #0f2d47;
}

.page-main {
  padding-top: calc(var(--header-h, 220px) + 12px);
  padding-bottom: calc(var(--footer-h, 76px) + 12px);
  height: 100vh;
  overflow: hidden;
}

.page-shell {
  width: min(1560px, calc(100vw - 28px));
  margin: 0 auto;
  height: 100%;
}

.layout-grid {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 230px;
  gap: 14px;
  align-items: start;
  height: 100%;
}

.left-sidebar {
  padding: 14px;
  height: 100%;
  overflow: auto;
}

.left-sidebar h2 {
  margin: 0 0 10px;
  font-size: 18px;
  color: var(--brand-strong);
}

.filter-group {
  margin-bottom: 14px;
  display: grid;
  gap: 7px;
}

.filter-group h3 {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--brand-strong);
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #203c54;
}

.results-area {
  min-width: 0;
  height: 100%;
  overflow: auto;
  padding-right: 2px;
}

.results-head {
  padding: 14px;
  margin-bottom: 12px;
}

.results-hints {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.35;
}

.results-timing {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed #a9bfd4;
  border-radius: 10px;
  background: #f4f9ff;
}

.results-timing-title {
  margin: 0 0 8px;
  color: #0f3352;
  font-size: 13px;
  font-weight: 800;
}

.results-timing-grid {
  display: grid;
  gap: 5px;
}

.results-timing-subtitle {
  margin: 8px 0 6px;
  color: #1d4c70;
  font-size: 12px;
  font-weight: 800;
}

.results-timing-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  color: #28445b;
  font-size: 13px;
}

.results-timing-value {
  color: #0f3352;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.results-timing-note {
  margin-top: 6px;
  color: #3e5d74;
  font-size: 12px;
  line-height: 1.35;
}

.results-debug {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed #a9bfd4;
  border-radius: 10px;
  background: #f4f9ff;
}

.results-debug-title {
  margin: 0 0 8px;
  color: #0f3352;
  font-size: 13px;
  font-weight: 800;
}

.results-debug-pre {
  margin: 0;
  padding: 7px 8px;
  border: 1px solid #d3e1ef;
  border-radius: 6px;
  background: #fff;
  color: #1f3b52;
  font-size: 11px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 260px;
  overflow: auto;
}

.results-sql-explain {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed #a9bfd4;
  border-radius: 10px;
  background: #f4f9ff;
}

.results-sql-title {
  margin: 0 0 8px;
  color: #0f3352;
  font-size: 13px;
  font-weight: 800;
}

.results-sql-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.results-sql-head .results-sql-title {
  margin: 0;
}

.results-sql-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.results-sql-section {
  border: 1px solid #d3e1ef;
  border-radius: 8px;
  padding: 8px;
  background: #ffffffb3;
}

.results-sql-subtitle {
  margin: 0 0 6px;
  color: #0f3352;
  font-size: 12px;
  font-weight: 800;
}

.results-sql-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
  color: #28445b;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.results-sql-label {
  margin: 6px 0 4px;
  color: #28445b;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.results-sql-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0 4px;
}

.results-sql-label-row .results-sql-label {
  margin: 0;
}

.results-sql-note {
  margin: 6px 0;
  color: #4d6478;
  font-size: 12px;
}

.results-sql-pre {
  margin: 0;
  padding: 7px 8px;
  border: 1px solid #d3e1ef;
  border-radius: 6px;
  background: #fff;
  color: #1f3b52;
  font-size: 11px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow: auto;
}

.results-sql-copy-btn,
.results-sql-copy-all {
  margin-right: 0;
  flex: 0 0 auto;
}

.hints-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.mode-link {
  border: 0;
  background: transparent;
  color: #0e5d93;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mode-link:hover {
  text-decoration-thickness: 2px;
}

.results-list {
  display: grid;
  gap: 12px;
  padding-bottom: 12px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 5px 16px rgba(9, 38, 60, 0.06);
  padding: 14px;
}

.card--high,
.card--mid,
.card--low {
  background: var(--panel);
  border-color: var(--line);
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-link:hover .card-title {
  text-decoration: underline;
}

.card-top {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 170px;
  gap: 10px;
}

.card-logo-col {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.card-main-logo {
  width: 62px;
  height: auto;
  object-fit: contain;
}

.summary-line {
  margin-top: 5px;
  color: #1f3c55;
}

.summary-k {
  color: #4a6379;
  font-weight: 700;
}

.card-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.card-actions {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 8px;
}

.clarify-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  margin-bottom: 10px;
}

.clarify-card-title-wrap h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.clarify-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.clarify-score {
  font-weight: 800;
  color: #0d3352;
  white-space: nowrap;
}

.clarify-sections {
  display: grid;
  gap: 10px;
}

.clarify-section h4,
.clarify-section h2 {
  margin: 0 0 6px;
  color: #0d3352;
  font-size: 14px;
  letter-spacing: 0.01em;
  text-transform: none;
}

.clarify-md p {
  margin: 0 0 8px;
}

.clarify-md p:last-child {
  margin-bottom: 0;
}

.clarify-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.clarify-footer {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #d7e3ef;
  padding-top: 10px;
}

.clarify-open-link {
  color: #0e5d93;
  font-weight: 800;
  text-decoration: none;
}

.clarify-open-link:hover {
  text-decoration: underline;
}

.clarify-link {
  color: #0e5d93;
  font-weight: 700;
  text-decoration: none;
}

.clarify-link:hover {
  text-decoration: underline;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #b7ccdf;
  background: #eef5fc;
  color: #153750;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  margin: 0 6px 6px 0;
  text-decoration: none;
}

.chip-muted {
  color: #4f6579;
  font-weight: 700;
}

.chip-link:hover {
  text-decoration: underline;
  background: #dbeaf9;
}

.score {
  font-weight: 700;
  color: #0d4f2a;
}

.location-id-wrap {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  color: #1e3a54;
}

.hl {
  background: var(--hl);
  border-radius: 3px;
  padding: 0 2px;
}

.copy-btn {
  border: 1px solid #90a8c0;
  border-radius: 6px;
  background: #fff;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  margin-right: 6px;
  vertical-align: middle;
}

.copy-btn:hover {
  background: #eef5fc;
  border-color: #647f99;
}

.copy-btn svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: #304a64;
  stroke-width: 1.8;
}

.btn {
  border: 0;
  border-radius: 9px;
  font: inherit;
  font-weight: 700;
  padding: 10px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(180deg, var(--teal) 0%, #0b7f8f 100%);
  color: #fff;
}

.search-actions .search-go.btn-primary {
  background: transparent;
  color: var(--text);
}

.search-actions .search-go.btn-primary .btn-spinner {
  border-color: rgba(10, 52, 82, 0.25);
  border-top-color: #113e61;
}

.btn-secondary {
  background: #eaf2fb;
  color: #153750;
  border: 1px solid #b7ccdf;
}

.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.75;
}

.btn-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  display: none;
  animation: spin 0.8s linear infinite;
}

.btn-secondary .btn-spinner {
  border-color: rgba(10, 52, 82, 0.25);
  border-top-color: #113e61;
}

.btn.is-loading .btn-spinner { display: inline-block; }

.load-more-wrap {
  padding: 14px;
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.infinite-scroll-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #35526a;
  font-weight: 700;
  font-size: 0.92rem;
}

.load-more-wrap .btn-spinner {
  border-color: rgba(10, 52, 82, 0.25);
  border-top-color: #113e61;
}

.load-more-wrap.is-loading .btn-spinner {
  display: inline-block;
}

.right-sidebar {
  height: 100%;
}

.ad-slot {
  border: 1px dashed #9bb4cc;
  border-radius: 10px;
  color: #4d6a84;
  background: #f4f9ff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 11px;
}

.ad-slot-tall {
  min-height: 540px;
  height: 100%;
}

.ad-slot-inline {
  min-height: 78px;
}

.site-footer {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 10px;
  z-index: 900;
  width: min(1560px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #294157;
}

.site-footer a { color: #0e5d93; }

.ogl-logo {
  width: 36px;
  height: auto;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(231, 240, 250, 0.68);
  display: grid;
  place-items: center;
}

.center-spinner {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 5px solid rgba(10, 74, 122, 0.2);
  border-top-color: #0a4a7a;
  animation: spin 0.9s linear infinite;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%) translateY(10px);
  background: #0f2d47;
  color: #fff;
  border-radius: 8px;
  padding: 9px 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 1400;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.muted { color: var(--muted); }

.detail-layout-grid {
  grid-template-columns: minmax(0, 1fr) 230px;
}

.detail-area {
  overflow: auto;
}

.detail-panel {
  padding: 16px;
  margin-bottom: 12px;
}

.detail-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.detail-top h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.detail-source-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 8px;
}

.detail-source-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f3f8fd;
  border: 1px solid #c9d9e8;
  color: #173a55;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 12px;
}

.detail-source-chip img {
  width: 24px;
  height: 14px;
  object-fit: contain;
}

.detail-inline-ad {
  margin: 14px 0;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(240px, 3fr);
  gap: 12px;
  align-items: start;
}

.detail-main-col {
  min-width: 0;
}

.detail-side-col {
  min-width: 0;
}

.detail-specialisms {
  margin: 0 0 12px;
  padding: 12px;
}

.detail-specialisms h2 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #17344e;
}

.detail-specialisms-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.detail-specialisms-list li {
  color: #17344e;
}

.detail-specialisms-list li::before {
  content: "✓";
  color: #1f7a37;
  font-weight: 800;
  margin-right: 8px;
}

.detail-disclaimer {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #cfdfef;
  background: #f7fbff;
  color: #20425f;
  font-size: 13px;
}

/* Stable tick marker for specialisms list. */
.detail-specialisms-list li::before {
  content: "\2713";
}

.kv {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 6px 10px;
}

.k {
  font-weight: 700;
  color: #4d667b;
}

.v {
  color: #17344e;
  word-break: break-word;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1160px) {
  .page-main {
    padding-top: calc(var(--header-h, 250px) + 12px);
  }
  .layout-grid {
    grid-template-columns: 230px minmax(0, 1fr);
  }
  .right-sidebar {
    display: none;
  }
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }
  .site-header,
  .site-footer {
    position: static;
    width: auto;
    left: auto;
    right: auto;
    margin: 10px;
  }
  .page-main {
    height: auto;
    overflow: visible;
    padding: 0 0 10px;
  }
  .page-shell {
    width: calc(100vw - 20px);
  }
  .top-nav-row {
    justify-content: center;
  }
  .search-form {
    grid-template-columns: 1fr;
  }
  .home-search:not(.service-has-search) .search-form--service {
    position: static;
    top: auto;
    left: auto;
    transform: none;
    width: auto;
    margin-top: 18vh;
  }
  .home-search:not(.service-has-search) .hero-ad-slot {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    width: auto;
    margin: 6vh 0 10px;
  }
  .home-search:not(.service-has-search) .hero-brand-row {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    margin-top: 10vh;
    margin-bottom: 12px;
  }
  .entity-type-btn {
    width: 30px;
    height: 30px;
  }
  .detail-content-grid {
    grid-template-columns: 1fr;
  }
  .layout-grid,
  .detail-layout-grid {
    grid-template-columns: 1fr;
    height: auto;
  }
  .left-sidebar,
  .results-area {
    height: auto;
    overflow: visible;
  }
  .results-sql-grid {
    grid-template-columns: 1fr;
  }
  .card-top {
    grid-template-columns: 52px minmax(0, 1fr);
  }
  .card-actions {
    grid-column: 1 / -1;
    justify-items: start;
  }
  .kv {
    grid-template-columns: 1fr;
  }
}
