/* ==========================================================================
   Geological Survey & Geotechnical Investigation Handbook
   Global stylesheet
   ========================================================================== */

:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --text: #22303c;
  --muted: #5c6b7a;
  --brand: #1b5e8f;
  --brand-dark: #14476d;
  --border: #d9e0e8;
  --accent: #0f8a5f;
  --warn: #b45309;
  --shadow: 0 1px 3px rgba(16, 35, 55, 0.10), 0 6px 16px rgba(16, 35, 55, 0.08);
  --radius: 10px;
  --header-h: 58px;
  --font-base: "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-base);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Top bar (global chrome)
   -------------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow);
  height: var(--header-h);
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
}
.topbar .brand {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.3px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
}
.topbar .brand small { font-weight: 400; opacity: 0.85; margin-left: 6px; font-size: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.10);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.btn:hover { background: rgba(255,255,255,0.22); text-decoration: none; }
.btn--solid { background: #fff; color: var(--brand); border-color: #fff; }
.btn--solid:hover { background: #eaf3fb; }

/* Language switcher (Windows-style dropdown) */
.lang-wrap { position: relative; }
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
.lang-btn:hover { background: rgba(255,255,255,0.22); }
.lang-btn .arrow { font-size: 9px; opacity: 0.85; }
.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 190px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 6px;
  display: none;
  z-index: 60;
}
.lang-menu.open { display: block; }
.lang-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  margin: 0;
  border: 0;
  background: transparent;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}
.lang-menu button:hover { background: #eef2f6; }
.lang-menu button .tick { float: right; color: var(--brand); font-weight: 700; }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 18px 60px;
}
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb .sep { margin: 0 6px; opacity: 0.6; }

.hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 34px 30px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}
.hero h1 { margin: 0 0 8px; font-size: 26px; line-height: 1.3; }
.hero p { margin: 0; opacity: 0.92; font-size: 15px; max-width: 820px; }

/* --------------------------------------------------------------------------
   Chapter grid (index)
   -------------------------------------------------------------------------- */
.chapters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.chapter-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.chapter-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(16,35,55,0.14); }
.chapter-card .num {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
  align-self: flex-start;
}
.chapter-card h3 { margin: 0 0 8px; font-size: 18px; color: var(--brand-dark); }
.chapter-card p { margin: 0 0 16px; font-size: 14px; color: var(--muted); flex: 1 1 auto; }
.chapter-card .go { font-weight: 600; font-size: 14px; color: var(--accent); }
.chapter-card .go:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Chapter content
   -------------------------------------------------------------------------- */
.chapter-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}
.chapter-wrap h2 {
  font-size: 22px;
  color: var(--brand-dark);
  margin: 0 0 4px;
}
.chapter-wrap > .lead { color: var(--muted); margin: 0 0 8px; font-size: 15px; }

.section {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.section:first-of-type { border-top: 0; margin-top: 20px; }
.section h3 {
  font-size: 18px;
  color: var(--brand-dark);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section h3 .snum {
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  border-radius: 6px;
  padding: 2px 8px;
  min-width: 26px;
  text-align: center;
}
.section p { margin: 0 0 10px; }
.section ul, .section ol { margin: 0 0 12px; padding-left: 22px; }
.section li { margin-bottom: 4px; }

.note, .warn {
  border-left: 4px solid var(--brand);
  background: #eef6fc;
  padding: 12px 14px;
  border-radius: 0 8px 8px 0;
  margin: 12px 0;
  font-size: 14px;
}
.warn { border-color: var(--warn); background: #fdf3e7; }

/* Tables */
.table-scroll { overflow-x: auto; margin: 12px 0; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
}
table.data th, table.data td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
table.data th {
  background: #eef2f6;
  color: var(--brand-dark);
  font-weight: 700;
  white-space: nowrap;
}
table.data tr:nth-child(even) td { background: #f8fafc; }

/* References list */
.ref-list { list-style: none; padding: 0; margin: 6px 0; }
.ref-list li {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  background: #fbfcfe;
}
.ref-list li code { background: #eef2f6; padding: 1px 6px; border-radius: 5px; font-size: 13px; }

/* Figures (inline diagrams / charts) */
figure {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfcfe;
}
figure img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 6px;
}
figure figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* Multiple figures in one section: side-by-side on wide, stacked on narrow */
figure.multi-figure {
  flex: 1 1 260px;
  margin: 10px;
}
.multi-figures-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0;
}

/* Prev / next pager */
.pager {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.pager a {
  flex: 1 1 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  background: #fbfcfe;
}
.pager a:hover { border-color: var(--brand); background: #f0f6fb; }
.pager .dir {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
  margin-bottom: 4px;
}
.pager .name { font-weight: 600; color: var(--brand-dark); }
.pager a.next { text-align: right; }

/* --------------------------------------------------------------------------
   Page footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: auto;
}
.site-footer .inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}
.site-footer a { color: var(--muted); font-weight: 600; }

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */
@media print {
  body { background: #fff; color: #000; }
  .topbar, .topbar-inner, .breadcrumb, .pager, .page-toc,
  .back-top, .lang-wrap, .export-wrap, .search-overlay { display: none !important; }
  .chapter-wrap, .page { box-shadow: none; border: 0; padding: 0; margin: 0; max-width: none; width: 100%; }
  .no-print { display: none !important; }
  a { color: var(--text); text-decoration: none; }
  figure, .note, .warn { page-break-inside: avoid; break-inside: avoid; }
  img { max-width: 100%; }
  h2, h3 { page-break-after: avoid; }
  .section { page-break-inside: auto; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 720px) {
  body { font-size: 15px; }
  .hero { padding: 24px 20px; }
  .hero h1 { font-size: 21px; }
  .chapter-wrap { padding: 20px 16px; }
  .topbar .brand small { display: none; }
  .btn span.lbl { display: none; }   /* icon-only buttons on very small screens */
  .chapter-card { padding: 16px; }
}

/* --------------------------------------------------------------------------
   Interactive calculators (tools page)
   -------------------------------------------------------------------------- */
.tools-list { display: flex; flex-direction: column; gap: 22px; margin-top: 18px; }

.calc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px 22px;
}
.calc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.calc-num {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.calc-title { margin: 0; font-size: 17px; color: var(--brand-dark); }
.calc-desc { margin: 4px 0 14px; color: var(--muted); font-size: 14px; }

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.calc-field { display: flex; flex-direction: column; gap: 4px; }
.calc-label { font-size: 12.5px; color: var(--muted); }
.calc-row { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; background: #fbfcfe; overflow: hidden; }
.calc-row:focus-within { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(27, 94, 143, 0.14); }
.calc-input {
  border: 0; outline: 0; background: transparent;
  padding: 8px 10px; width: 100%; min-width: 0;
  font: inherit; color: var(--text);
}
.calc-unit { flex: 0 0 auto; padding: 0 10px 0 4px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.calc-select {
  border: 0; outline: 0; background: transparent; cursor: pointer;
  padding: 8px 10px; width: 100%; min-width: 0; color: var(--text);
  font: inherit;
}
.calc-select option { color: var(--text); background: var(--card-bg, #fff); }

.calc-result {
  margin-top: 16px;
  background: #eef4fa;
  border: 1px solid #d7e3f0;
  border-radius: 10px;
  padding: 12px 16px;
}
.calc-result-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.7px; color: var(--brand-dark); font-weight: 700; margin-bottom: 6px; }
.calc-rrow { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; border-top: 1px dashed rgba(27, 94, 143, 0.15); }
.calc-rrow:first-of-type { border-top: 0; }
.calc-rlabel { font-size: 13px; color: var(--muted); flex: 1 1 auto; }
.calc-rval { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--brand-dark); }
.calc-runit { font-size: 12px; color: var(--muted); }

.calc-foot { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.calc-ref { margin-top: 6px; font-size: 12.5px; color: var(--brand); font-weight: 600; }

.calc-plot { margin: 4px 0 6px; }
.calc-plot svg { max-width: 100%; height: auto; display: block; border: 1px solid rgba(27, 94, 143, 0.12); border-radius: 10px; background: #fbfcfe; }
[data-theme="dark"] .calc-plot svg { background: #16202b; border-color: #243546; }

/* --------------------------------------------------------------------------
   Soil classification wizards (USCS + AASHTO)
   -------------------------------------------------------------------------- */
.tools-sub {
  margin: 28px 0 4px;
  font-size: 20px;
  color: var(--brand-dark);
  border-top: 2px solid var(--border);
  padding-top: 20px;
}
.tools-sub:first-child { border-top: 0; padding-top: 0; margin-top: 8px; }
.tools-sub-desc { margin: 0 0 6px; color: var(--muted); font-size: 14px; }

.uscs-steps {
  margin: 14px 0 4px;
  padding: 4px 0;
  display: flex; flex-direction: column;
}
.uscs-step {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px;
  border-left: 3px solid var(--brand);
  margin-top: 6px;
  background: #f2f7fc;
  border-radius: 0 8px 8px 0;
}
.uscs-step:first-child { margin-top: 0; }
.uscs-step-label { font-size: 12.5px; color: var(--muted); flex: 0 0 auto; }
.uscs-step-arrow { color: var(--brand); font-weight: 700; flex: 0 0 auto; }
.uscs-step-value { font-size: 13px; font-weight: 600; color: var(--brand-dark); }

.uscs-symbol {
  font-size: 26px; font-weight: 800;
  color: var(--brand); letter-spacing: 1px;
  margin: 4px 0 6px;
}
.uscs-chart-wrap { margin-top: 14px; overflow-x: auto; }
.uscs-chart { max-width: 100%; height: auto; display: block; }

/* ==========================================================================
   Reading experience: search, on-page TOC, theme toggle, back-to-top
   ========================================================================== */
html { scroll-behavior: smooth; }
.section { scroll-margin-top: calc(var(--header-h) + 6px); }

/* compact square icon buttons in the top bar */
.icon-btn { width: 36px; padding: 0; justify-content: center; flex: 0 0 auto; }
.icon-btn svg { display: inline-flex; }

/* PDF-export dropdown in the top bar */
.export-wrap { position: relative; flex: 0 0 auto; }
.export-menu {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + 6px);
  min-width: 210px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 40;
}
.export-menu.open { display: block; }
.export-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.export-menu button:hover { background: #eef3f8; }

/* off-screen iframe used to print the full-handbook PDF (visible for layout) */
.print-frame {
  position: fixed;
  top: 0; left: -30000px;
  width: 1280px; height: 100%;
  border: 0; background: #fff;
  pointer-events: none;
}

/* On-page table of contents */
.page-toc {
  background: #f7f9fc;
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: 0 10px 10px 0;
  padding: 12px 16px;
  margin: 16px 0 4px;
  font-size: 14px;
}
.page-toc-title {
  display: flex; align-items: center; gap: 7px;
  font-weight: 700; color: var(--brand-dark);
  margin-bottom: 8px; letter-spacing: 0.2px;
}
.page-toc ul { list-style: none; margin: 0; padding: 0; }
.page-toc li { margin: 2px 0; }
.page-toc a {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text); padding: 3px 6px; border-radius: 6px;
}
.page-toc a:hover { background: #eef3f8; text-decoration: none; color: var(--brand); }
.page-toc .toc-num {
  min-width: 22px; text-align: center;
  background: var(--brand); color: #fff;
  font-size: 11px; font-weight: 700; border-radius: 5px;
  padding: 1px 5px;
}

/* Section heading permalink (appears on hover) */
.section h3 { position: relative; }
.sec-permalink {
  margin-left: 6px; opacity: 0; color: var(--muted);
  display: inline-flex; align-items: center;
  transition: opacity 0.12s ease;
}
.section h3:hover .sec-permalink,
.sec-permalink:focus-visible { opacity: 0.75; }
.sec-permalink:hover { color: var(--brand); opacity: 1; }

/* Deep-link flash highlight */
@keyframes hlflash { 0% { background: rgba(15,138,95,0.22); } 100% { background: transparent; } }
.section.hl-flash { animation: hlflash 1.6s ease-out; border-radius: 8px; }

/* Back-to-top floating button */
.back-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 45;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface); color: var(--brand);
  box-shadow: 0 6px 18px rgba(16,35,55,0.22);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.back-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-top:hover { background: var(--brand); color: #fff; }

/* Search overlay */
.search-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(12,18,26,0.55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 9vh 16px 24px;
  overflow-y: auto;
}
.search-overlay[hidden] { display: none; }
.search-panel {
  width: 100%; max-width: 720px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(8,14,22,0.4);
  overflow: hidden;
}
.search-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.search-svg { color: var(--muted); flex: 0 0 auto; }
.search-bar input {
  flex: 1 1 auto; min-width: 0;
  border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 16px; color: var(--text);
}
.search-close {
  flex: 0 0 auto; width: 30px; height: 30px;
  border: 0; background: transparent; color: var(--muted);
  font-size: 24px; line-height: 1; border-radius: 8px; cursor: pointer;
}
.search-close:hover { background: #eef2f6; color: var(--text); }
.search-meta {
  padding: 10px 16px 2px; font-size: 12.5px; color: var(--muted);
  min-height: 22px;
}
.search-results { max-height: 60vh; overflow-y: auto; padding: 4px 12px 14px; }
.search-hit {
  display: block; padding: 11px 12px; margin: 3px 0;
  border-radius: 10px; color: var(--text);
}
.search-hit:hover { background: #eef3f8; text-decoration: none; }
.search-hit-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.sch-chapter { font-size: 12px; font-weight: 700; color: var(--brand); }
.sch-no {
  font-size: 11px; font-weight: 700; color: #fff; background: var(--accent);
  border-radius: 5px; padding: 1px 6px;
}
.search-hit-head { font-weight: 600; color: var(--brand-dark); margin-bottom: 2px; }
.search-hit-snippet { font-size: 13px; color: var(--muted); }
mark.hl {
  background: #ffe9a8; color: inherit;
  border-radius: 3px; padding: 0 1px;
}

/* ==========================================================================
   Dark theme
   ========================================================================== */
[data-theme="dark"] {
  --bg: #12171d;
  --surface: #1c242e;
  --text: #dde6ee;
  --muted: #9fb2c2;
  --brand: #57a5dd;
  --brand-dark: #83c6ef;
  --border: #2c3946;
  --accent: #2fbd87;
  --warn: #e8a24d;
  --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 6px 18px rgba(0,0,0,0.35);
}
[data-theme="dark"] .topbar { background: linear-gradient(135deg, #0f2330 0%, #122c3f 100%); }
[data-theme="dark"] .brand { color: #eaf3fb; }
[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #153446 0%, #0f2330 100%);
  color: #eaf3fb;
}
[data-theme="dark"] body { background: var(--bg); }

/* swap hardcoded light fills to dark equivalents */
[data-theme="dark"] .chapter-card,
[data-theme="dark"] .chapter-wrap,
[data-theme="dark"] .calc-card { background: var(--surface); color: var(--text); }
[data-theme="dark"] a { color: var(--brand); }
[data-theme="dark"] .lang-menu button:hover { background: #26313d; }
[data-theme="dark"] .page-toc { background: #16202a; }
[data-theme="dark"] .page-toc a:hover { background: #223040; }
[data-theme="dark"] table.data { background: #202a34; color: var(--text); }
[data-theme="dark"] table.data th { background: #283541; color: var(--text); }
[data-theme="dark"] table.data tr:nth-child(even) td { background: #232e38; }
[data-theme="dark"] .ref-list li { background: #202a34; color: var(--text); }
[data-theme="dark"] .ref-list li code { background: #2b3846; }
[data-theme="dark"] figure { background: #1a232d; }
[data-theme="dark"] .note { background: #142b38; }
[data-theme="dark"] .warn { background: #2c2415; }
[data-theme="dark"] .pager a { background: #1a232d; }
[data-theme="dark"] .pager a:hover { background: #1e2c3a; }
[data-theme="dark"] .calc-row { background: #1a232d; }
[data-theme="dark"] .calc-result { background: #142b38; border-color: #1e3a4d; }
[data-theme="dark"] .search-close:hover { background: #26313d; }
[data-theme="dark"] .search-hit:hover { background: #26313d; }
[data-theme="dark"] .search-bar input { color: var(--text); }
[data-theme="dark"] mark.hl { background: #6b5a1f; color: #fff8e0; }
[data-theme="dark"] .uscs-step { background: #16242f; }

@media (max-width: 720px) {
  .back-top { right: 14px; bottom: 14px; width: 40px; height: 40px; }
  .search-overlay { padding: 4vh 10px 16px; }
}