@font-face {
  font-family: "Noto Sans SC";
  src: url("fonts/NotoSansSC-VF.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --header-height: 76px;
  --ink: #202124;
  --ink-soft: #404348;
  --muted: #6d7178;
  --line: #e2e4e8;
  --line-strong: #d1d4da;
  --paper: #ffffff;
  --canvas: #f7f8fa;
  --lavender: #f3efff;
  --lavender-2: #e8e0ff;
  --violet: #6753d9;
  --violet-dark: #5140bb;
  --green: #267b67;
  --blue: #3f72c9;
  --orange: #c97b31;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-soft: 0 18px 48px rgba(36, 35, 55, .08);
  --shadow-float: 0 22px 60px rgba(62, 49, 120, .14);
  --shell: min(1220px, calc(100% - 48px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  color: var(--ink);
  background: #f4f3f8;
  font-family: "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.dialog-open {
  overflow: hidden;
}

.ambient-particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 18%, rgba(111, 92, 219, .07), transparent 32rem),
    radial-gradient(circle at 14% 78%, rgba(42, 140, 122, .055), transparent 30rem);
}

#site-particle-canvas {
  width: 100%;
  height: 100%;
  opacity: 1;
}

.site-header,
main,
.site-footer {
  position: relative;
}

main { z-index: auto; }
.site-footer { z-index: 3; }
main > section > .shell { position: relative; z-index: 2; }

.particle-fallback .ambient-particles::before,
.particle-fallback .ambient-particles::after {
  content: "";
  position: absolute;
  width: 310px;
  height: 310px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(107,87,214,.2) 0 2px, rgba(107,87,214,.07) 3px 18%, transparent 54%);
  filter: blur(2px);
  animation: fallback-drift 9s ease-in-out infinite alternate;
}

.particle-fallback .ambient-particles::before { top: 12%; right: 4%; }
.particle-fallback .ambient-particles::after { bottom: 9%; left: 2%; width: 220px; height: 220px; animation-delay: -3s; }

@keyframes fallback-drift { to { transform: translate3d(-26px, 34px, 0) scale(1.08); } }

.anchor-target {
  scroll-margin-top: 0;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

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

img,
canvas {
  display: block;
  max-width: 100%;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  color: #fff;
  border-radius: 8px;
  background: var(--violet);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid rgba(103, 83, 217, .32);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  border-bottom: 1px solid rgba(38, 39, 44, .08);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 11px;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  flex: 0 0 44px;
}

.brand-mark::before,
.brand-mark::after,
.brand-mark i {
  display: none;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(78, 58, 164, .18));
}

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

.brand-copy strong {
  font-size: 16px;
  font-weight: 760;
  letter-spacing: -.02em;
}

.brand-copy small {
  color: #888b92;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .13em;
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: clamp(10px, 1.25vw, 20px);
}

.primary-nav a {
  position: relative;
  padding: 27px 0 25px;
  color: #474a50;
  font-size: 13px;
  font-weight: 560;
  white-space: nowrap;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 18px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--violet);
  transform: scaleX(0);
  transition: transform .2s ease;
}

.primary-nav a:hover,
.primary-nav a.active {
  color: var(--ink);
}

.primary-nav a:hover::after,
.primary-nav a.active::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
}

.lang-button,
.submit-button {
  height: 38px;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.lang-button {
  padding: 0 10px;
  color: #62656c;
}

.submit-button {
  padding: 0 15px;
  color: #fff;
  background: var(--ink);
}

.submit-button span { margin-left: 4px; }

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 10px;
  border-radius: 10px;
  background: var(--canvas);
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  border-radius: 2px;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100svh - var(--header-height));
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.26) 0%, rgba(255,255,255,.08) 54%, rgba(244,240,255,.24) 100%),
    url("hero-crystal-field.webp") center bottom / cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse 59% 76% at 50% 38%, rgba(255,255,255,.99) 0 27%, rgba(255,255,255,.94) 45%, rgba(255,255,255,.7) 61%, rgba(255,255,255,.16) 82%, transparent 100%);
}

.hero-glow {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  height: 180px;
  background: linear-gradient(180deg, transparent, rgba(239, 234, 255, .58));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: inherit;
  padding: clamp(34px, 4.8vh, 66px) 0 clamp(28px, 4vh, 48px);
  text-align: center;
}

.hero-copy {
  max-width: 880px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  color: var(--violet);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
}

.eyebrow::before,
.section-kicker::before {
  content: "";
  width: 18px;
  height: 1px;
  margin-right: 8px;
  background: currentColor;
}

.hero h1 {
  margin: 17px 0 0;
  font-size: clamp(46px, 5.3vw, 72px);
  line-height: 1.08;
  letter-spacing: -.055em;
}

.hero h1 span {
  color: #a2a4a9;
  font-weight: 780;
}

.hero-copy > p {
  margin: 23px 0 0;
  color: #3e4146;
  font-size: 17px;
  font-weight: 540;
}

.agent-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  width: min(820px, 100%);
  min-height: 66px;
  margin-top: 31px;
  padding: 8px 8px 8px 14px;
  border: 1px solid #cfd0d5;
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 48px rgba(58, 45, 121, .12);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.agent-bar:focus-within {
  border-color: rgba(103, 83, 217, .72);
  box-shadow: var(--shadow-float);
  transform: translateY(-1px);
}

.agent-icon {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(112, 87, 208, .15);
  border-radius: 13px;
  background: radial-gradient(circle at 50% 42%, rgba(137, 104, 234, .14), rgba(246, 243, 255, .72) 68%);
  box-shadow: 0 6px 18px rgba(83, 60, 170, .10);
}

.agent-icon img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 4px 7px rgba(77, 49, 157, .14));
  animation: mineral-robot-hover 4.2s ease-in-out infinite;
}

@keyframes mineral-robot-hover {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.agent-bar textarea {
  width: 100%;
  max-height: 116px;
  min-height: 36px;
  padding: 7px 14px;
  resize: none;
  overflow: hidden;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
  line-height: 1.45;
}

.agent-bar textarea::placeholder {
  color: #a2a4aa;
}

.agent-bar > button {
  height: 48px;
  padding: 0 19px;
  color: #fff;
  border-radius: 12px;
  background: var(--violet);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: background .2s ease, transform .2s ease;
}

.agent-bar > button:hover {
  background: var(--violet-dark);
  transform: translateY(-1px);
}

.agent-bar > button span { margin-left: 5px; }

.agent-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: min(820px, 100%);
  margin-top: 9px;
  color: #7b7e85;
  font-size: 11px;
}

.agent-meta button {
  padding: 4px;
  color: var(--violet);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.agent-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.agent-meta i,
.api-card .trust-card-head em i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #31a57f;
  box-shadow: 0 0 0 4px rgba(49, 165, 127, .11);
}

.agent-suggestions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  width: min(980px, 100%);
  margin-top: 16px;
}

.agent-suggestions > span {
  margin-right: 2px;
  color: #8b8e94;
  font-size: 11px;
}

.agent-suggestions button {
  padding: 7px 11px;
  color: #666970;
  border: 1px solid rgba(213, 211, 222, .9);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  cursor: pointer;
  font-size: 11px;
  transition: .2s ease;
}

.agent-suggestions button:hover {
  color: var(--violet);
  border-color: rgba(103, 83, 217, .35);
  background: #fff;
}

.agent-response {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: min(820px, 100%);
  margin-top: 14px;
  padding: 13px 15px;
  text-align: left;
  border: 1px solid rgba(103, 83, 217, .18);
  border-radius: 14px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 10px 28px rgba(66, 51, 126, .08);
}

.agent-response[hidden] { display: none; }
.agent-response strong { display: block; font-size: 13px; }
.agent-response p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.agent-response ul { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 0; padding: 0; list-style: none; }
.agent-response li { padding: 4px 7px; color: #5e51a5; border-radius: 6px; background: var(--lavender); font-size: 10px; }
.agent-response button { padding: 9px 12px; color: #fff; border-radius: 9px; background: var(--ink); cursor: pointer; font-size: 11px; }

.agent-run { min-width: 0; }
.agent-run-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 10px 0 0; padding: 0; list-style: none; }
.agent-run-steps li { position: relative; padding: 5px 4px 5px 13px; color: #8a8d93; border-radius: 6px; background: #f2f2f5; font-size: 8px; white-space: nowrap; }
.agent-run-steps li::before { content: ""; position: absolute; top: 50%; left: 5px; width: 4px; height: 4px; border-radius: 50%; background: #b9bbc0; transform: translateY(-50%); }
.agent-run-steps li.active { color: #5e51a5; background: #eeeaff; }
.agent-run-steps li.active::before { background: var(--violet); box-shadow: 0 0 0 3px rgba(103,83,217,.12); }
.agent-run-steps li.done { color: #3c806e; background: #eaf5f1; }
.agent-run-steps li.done::before { background: #31a57f; }

.hero-data-proof {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  width: min(1120px, 100%);
  margin-top: clamp(22px, 3.2vh, 34px);
  overflow: hidden;
  border: 1px solid rgba(205, 202, 218, .84);
  border-radius: 16px;
  background: rgba(255, 255, 255, .69);
  box-shadow: 0 13px 34px rgba(49, 42, 78, .055);
  backdrop-filter: blur(16px);
}

.hero-data-proof-head {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 15px 18px;
  text-align: left;
  border-right: 1px solid rgba(215, 213, 223, .92);
}

.hero-data-proof-head > span {
  color: var(--violet);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}

.hero-data-proof-head > strong { margin-top: 4px; font-size: 13px; }
.hero-data-proof-head > small { display: flex; align-items: center; gap: 5px; margin-top: 3px; color: var(--muted); font-size: 8px; }
.hero-data-proof-head > small i { width: 6px; height: 6px; border-radius: 50%; background: #31a57f; box-shadow: 0 0 0 4px rgba(49,165,127,.1); }

.hero-data-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0;
}

.hero-data-grid > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 15px 12px;
  text-align: left;
  border-left: 1px solid rgba(220, 218, 226, .8);
}

.hero-data-grid > div:first-child { border-left: 0; }
.hero-data-grid dt { font-size: clamp(18px, 1.65vw, 23px); font-weight: 760; letter-spacing: -.035em; }
.hero-data-grid dd { margin: 2px 0 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.section {
  padding: 104px 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 32px;
}

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(30px, 3.5vw, 46px);
  line-height: 1.15;
  letter-spacing: -.045em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.section-heading > a,
.section-heading > button,
.text-button {
  padding: 10px 0;
  color: var(--violet);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.section-heading > a span,
.section-heading > button span { margin-left: 5px; }

.catalog-section {
  background: rgba(247, 248, 250, .90);
}

.service-section-label {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 12px;
}

.service-section-label span,
.service-strip-title span {
  display: block;
  color: var(--violet);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
}

.service-section-label h3 {
  margin: 2px 0 0;
  font-size: 15px;
}

.service-section-label p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

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

.domain-grid > button {
  position: relative;
  min-height: 184px;
  padding: 24px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.domain-grid > button::before {
  content: "";
  position: absolute;
  top: -70px;
  right: -72px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(103, 83, 217, .12), transparent 70%);
}

.domain-grid > button:hover {
  border-color: rgba(103, 83, 217, .28);
  box-shadow: var(--shadow-soft);
  transform: translateY(-3px);
}

.domain-index {
  color: #aaa8b3;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.domain-grid h3 {
  margin: 30px 0 7px;
  font-size: 20px;
  letter-spacing: -.02em;
}

.domain-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.domain-grid small {
  display: block;
  margin-top: 15px;
  color: var(--violet);
  font-size: 10px;
  font-weight: 670;
}

.domain-grid > button > i {
  position: absolute;
  right: 23px;
  bottom: 22px;
  color: #b1adb9;
  font-size: 10px;
  font-weight: 700;
  font-style: normal;
}

.catalog-list-card {
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.service-capability-strip {
  display: grid;
  grid-template-columns: 150px repeat(4, minmax(0, 1fr));
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.service-strip-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px;
  border-right: 1px solid var(--line);
  background: linear-gradient(145deg, #f5f2ff, #fbfbfd);
}

.service-strip-title strong { margin-top: 3px; font-size: 12px; }

.service-capability-strip > button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 72px;
  padding: 10px 12px;
  text-align: left;
  border-left: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition: background .18s ease;
}

.service-capability-strip > button:first-of-type { border-left: 0; }
.service-capability-strip > button:hover { background: #faf9fe; }
.service-capability-strip > button > i { display: grid; width: 30px; height: 30px; place-items: center; color: #fff; border-radius: 8px; background: var(--ink); font-size: 8px; font-style: normal; font-weight: 780; }
.service-capability-strip > button span { min-width: 0; }
.service-capability-strip > button strong,
.service-capability-strip > button small { display: block; }
.service-capability-strip > button strong { font-size: 11px; }
.service-capability-strip > button small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.service-capability-strip > button > b { color: var(--violet); font-size: 10px; }

.catalog-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}

.catalog-list-head h3 {
  margin: 0;
  font-size: 16px;
}

.catalog-list-head > div span {
  color: var(--muted);
  font-size: 10px;
}

.catalog-list-head label {
  display: block;
  width: min(320px, 40%);
}

.catalog-list-head input {
  width: 100%;
  height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: var(--canvas);
  font-size: 11px;
}

.catalog-list-head input:focus {
  border-color: rgba(103, 83, 217, .45);
  background: #fff;
}

.dataset-list {
  display: flex;
  flex-direction: column;
}

.dataset-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 100px 100px 20px;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition: background .16s ease;
}

.dataset-row:last-child { border-bottom: 0; }
.dataset-row:hover { background: #faf9fe; }
.dataset-row[hidden] { display: none; }

.dataset-code {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 820;
}

.code-purple { color: #644fc8; background: #eeeaff; }
.code-blue { color: #3f70ba; background: #e9f2ff; }
.code-green { color: #24755f; background: #e8f6ee; }
.code-cyan { color: #267e95; background: #e6f5fa; }
.code-orange { color: #a96422; background: #fff0de; }

.dataset-main { min-width: 0; }
.dataset-main small { display: block; color: var(--violet); font-size: 9px; font-weight: 720; }
.dataset-main strong { display: block; margin-top: 3px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.dataset-main em { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }

.dataset-meta b,
.dataset-meta small { display: block; }
.dataset-meta b { font-size: 12px; }
.dataset-meta small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.dataset-row > i { color: #aaaeb5; font-style: normal; }

/* A full desktop catalog view: six domains and five datasets remain visible together. */
@media (min-width: 1041px) {
  .catalog-section { padding: 36px 0 40px; }
  .catalog-section .section-heading { margin-bottom: 12px; }
  .catalog-section .section-heading h2 { margin-top: 4px; font-size: 32px; line-height: 1.08; }
  .catalog-section .section-heading p { margin-top: 3px; font-size: 12px; }

  .catalog-section .domain-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
  }

  .catalog-section .domain-grid > button {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-content: center;
    min-height: 92px;
    padding: 11px 12px;
    column-gap: 5px;
    border-radius: 12px;
  }

  .catalog-section .domain-index {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    font-size: 8px;
  }

  .catalog-section .domain-grid h3 {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    font-size: 15px;
    line-height: 1.3;
  }

  .catalog-section .domain-grid p {
    display: -webkit-box;
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 25px;
    margin-top: 4px;
    overflow: hidden;
    font-size: 9px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .catalog-section .domain-grid small {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 4px;
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .catalog-section .domain-grid > button > i { right: 10px; bottom: 9px; font-size: 8px; }
  .catalog-section .domain-grid > button::before { top: -88px; right: -88px; opacity: .7; }

  .catalog-section .catalog-list-card { margin-top: 12px; border-radius: 12px; }
  .catalog-section .catalog-list-head { min-height: 48px; padding: 6px 14px; }
  .catalog-section .catalog-list-head h3 { font-size: 14px; }
  .catalog-section .catalog-list-head input { height: 34px; }

  .catalog-section .dataset-row {
    grid-template-columns: auto minmax(0, 1fr) 84px 84px 16px;
    min-height: 54px;
    padding: 6px 14px;
    gap: 10px;
  }

  .catalog-section .dataset-code { width: 34px; height: 34px; border-radius: 9px; font-size: 9px; }
  .catalog-section .dataset-main small { font-size: 8px; }
  .catalog-section .dataset-main strong { margin-top: 2px; font-size: 12px; }
  .catalog-section .dataset-main em { display: none; }
  .catalog-section .dataset-meta b { font-size: 11px; }
  .catalog-section .dataset-meta small { margin-top: 1px; font-size: 8px; }
}

.topics-section {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 8% 90%, rgba(113, 87, 236, .22), transparent 28rem),
    radial-gradient(circle at 92% 12%, rgba(41, 140, 117, .17), transparent 26rem),
    rgba(23, 26, 37, .93);
}

.topics-section::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
}

.topics-section .shell { position: relative; z-index: 2; }
.light-heading .section-kicker { color: #a998ff; }
.light-heading p { color: rgba(255,255,255,.56); }
.light-heading > a { color: #c7bcff; }

.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.featured-card {
  position: relative;
  min-height: 480px;
  padding: 31px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 24px;
  overflow: hidden;
}

.featured-card::before,
.featured-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.featured-card::before { width: 310px; height: 310px; right: -120px; top: -120px; border: 1px solid rgba(255,255,255,.14); }
.featured-card::after { width: 210px; height: 210px; right: -70px; top: -70px; border: 1px solid rgba(255,255,255,.10); }

.rare-card { background: linear-gradient(145deg, rgba(103,83,217,.38), rgba(41,35,74,.78)); }
.ready-card { background: linear-gradient(145deg, rgba(42,126,104,.36), rgba(27,57,52,.76)); }

.featured-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255,255,255,.65);
  font-size: 10px;
}

.featured-top span { font-weight: 730; letter-spacing: .08em; }
.featured-top em { padding: 5px 8px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; font-style: normal; }

.featured-card h3 {
  position: relative;
  z-index: 1;
  margin: 42px 0 11px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.22;
  letter-spacing: -.035em;
}

.featured-card > p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255,255,255,.62);
  font-size: 13px;
}

.element-row {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  margin-top: 39px;
}

.element-row span {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  font-size: 12px;
  font-weight: 740;
}

.featured-card dl {
  position: absolute;
  right: 31px;
  bottom: 76px;
  left: 31px;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
}

.featured-card dl > div { border-left: 1px solid rgba(255,255,255,.15); padding-left: 14px; }
.featured-card dl > div:first-child { padding-left: 0; border-left: 0; }
.featured-card dt { font-size: 18px; font-weight: 760; }
.featured-card dd { margin: 3px 0 0; color: rgba(255,255,255,.48); font-size: 9px; }

.featured-card > button {
  position: absolute;
  right: 24px;
  bottom: 22px;
  z-index: 2;
  padding: 10px 13px;
  color: #fff;
  border-radius: 9px;
  background: rgba(255,255,255,.11);
  cursor: pointer;
  font-size: 11px;
  font-weight: 680;
}

.quality-bars {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 22px;
  margin-top: 37px;
}

.quality-bars > span {
  display: grid;
  grid-template-columns: 66px 1fr 28px;
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,.66);
  font-size: 9px;
}

.quality-bars b { font-weight: 560; }
.quality-bars i { height: 4px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.quality-bars i em { display: block; height: 100%; border-radius: inherit; background: #75d8bd; }
.quality-bars strong { color: #fff; font-size: 9px; }

.map-section {
  background: rgba(255, 255, 255, .91);
}

.outlook-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 44px rgba(29, 32, 39, .07);
}

.outlook-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 66px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}

.mineral-tabs,
.view-tabs {
  display: flex;
  gap: 4px;
}

.mineral-tabs button,
.view-tabs button {
  height: 34px;
  padding: 0 12px;
  color: #696c72;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

.mineral-tabs button.active,
.view-tabs button.active {
  color: #fff;
  background: var(--violet);
}

.outlook-context {
  display: flex;
  justify-content: center;
  gap: 15px;
  color: var(--muted);
  font-size: 10px;
}

.outlook-context em {
  padding: 2px 6px;
  color: #9b7220;
  border-radius: 5px;
  background: #fff4d7;
  font-style: normal;
}

.outlook-body {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(310px, .7fr);
  min-height: 520px;
}

.outlook-visual {
  position: relative;
  min-width: 0;
  border-right: 1px solid var(--line);
  background: #edf1ef;
}

.outlook-view {
  position: absolute;
  inset: 0;
  display: none;
}

.outlook-view.active { display: block; }
.outlook-view[data-view-panel="map"] { overflow: hidden; }
.outlook-view[data-view-panel="map"]::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(246,248,247,.08), transparent 40%), linear-gradient(180deg, transparent 65%, rgba(32,33,36,.08)); pointer-events: none; }
.outlook-view[data-view-panel="map"] > img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.78) contrast(.94) brightness(1.04); }

.map-marker {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  border: 2px solid rgba(255,255,255,.92);
  border-radius: 50%;
  background: rgba(103, 83, 217, .90);
  box-shadow: 0 8px 20px rgba(61, 48, 124, .26);
  transform: translate(-50%, -50%);
}

.map-marker i { position: absolute; inset: -8px; border: 1px solid rgba(103,83,217,.24); border-radius: 50%; animation: marker-pulse 2.8s ease-in-out infinite; }
.map-marker b { font-size: 9px; }
.marker-a { left: 83%; top: 70%; }
.marker-b { left: 27%; top: 69%; }
.marker-c { left: 73%; top: 44%; }
.marker-d { left: 57%; top: 72%; }
.marker-e { left: 31%; top: 77%; }

@keyframes marker-pulse {
  0%, 100% { transform: scale(.86); opacity: .45; }
  50% { transform: scale(1.18); opacity: .12; }
}

.map-legend {
  position: absolute;
  z-index: 3;
  left: 16px;
  bottom: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 9px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px);
  font-size: 9px;
}

.map-legend span { display: inline-flex; align-items: center; gap: 5px; font-weight: 650; }
.map-legend span i { width: 7px; height: 7px; border-radius: 50%; background: var(--violet); }
.map-legend small { color: var(--muted); }

.outlook-view[data-view-panel="trend"] {
  padding: 34px;
  background: linear-gradient(180deg, #fafafe, #f4f1fc);
}

#trend-canvas { width: 100%; height: 100%; }
.chart-note { position: absolute; right: 25px; bottom: 20px; color: var(--muted); font-size: 10px; }

.rank-full {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: 38px;
  background: #fafafa;
}

.rank-full > div { display: grid; grid-template-columns: 76px 1fr 72px; align-items: center; gap: 12px; margin: 11px 0; font-size: 12px; }
.rank-full i { height: 14px; border-radius: 4px; background: #ece9fa; overflow: hidden; }
.rank-full i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), #8d7bf1); }
.rank-full strong { text-align: right; font-size: 11px; }

.outlook-summary {
  display: flex;
  flex-direction: column;
  padding: 35px 30px 24px;
}

.outlook-summary > span {
  color: var(--muted);
  font-size: 11px;
}

.outlook-summary h3 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 8px 0 0;
}

.outlook-summary h3 b { font-size: 36px; letter-spacing: -.05em; }
.outlook-summary h3 small { color: var(--muted); font-size: 12px; font-weight: 560; }
.outlook-summary > p { margin: 5px 0 24px; color: var(--green); font-size: 10px; }

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rank-list > div { display: grid; grid-template-columns: 62px 1fr 44px; align-items: center; gap: 8px; font-size: 10px; }
.rank-list span { color: #53565c; }
.rank-list i { height: 5px; border-radius: 5px; background: #eeeef2; overflow: hidden; }
.rank-list i b { display: block; height: 100%; border-radius: inherit; background: var(--violet); }
.rank-list strong { text-align: right; font-size: 9px; }

.outlook-summary footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.outlook-summary footer span { color: var(--muted); font-size: 8px; }
.outlook-summary footer button { color: var(--violet); background: transparent; cursor: pointer; font-size: 9px; font-weight: 680; }

.usgs-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
  padding-block: 11px;
}

.map-dataset-title span,
.map-dataset-title strong { display: block; }
.map-dataset-title span { color: var(--violet); font-size: 8px; font-weight: 820; letter-spacing: .12em; }
.map-dataset-title strong { margin-top: 3px; font-size: 14px; }

.usgs-map-body { grid-template-columns: minmax(0, 2.15fr) minmax(280px, .72fr); min-height: 520px; }
.usgs-map-frame { display: grid; grid-template-rows: minmax(0, 1fr) auto; margin: 0; overflow: hidden; background: #d8ebfa; }
.usgs-map-frame > img { width: 100%; height: 100%; object-fit: contain; background: #d8ebfa; }
.usgs-map-frame figcaption { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 9px 13px; color: #4d5560; border-top: 1px solid rgba(102,143,178,.2); background: rgba(247,251,255,.96); font-size: 8px; }
.usgs-map-frame figcaption small { color: #737b84; text-align: right; }
.usgs-map-summary > p { margin: 12px 0 20px; color: #545a63; font-size: 11px; line-height: 1.65; }
.map-summary-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.map-summary-stats > div { padding: 12px 8px; text-align: center; border-left: 1px solid var(--line); }
.map-summary-stats > div:first-child { border-left: 0; }
.map-summary-stats dt { font-size: 12px; font-weight: 760; }
.map-summary-stats dd { margin: 3px 0 0; color: var(--muted); font-size: 8px; }
.map-observation { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 19px; }
.map-observation strong { width: 100%; margin-bottom: 2px; font-size: 10px; }
.map-observation span { padding: 6px 8px; color: #5d50a6; border-radius: 7px; background: var(--lavender); font-size: 8px; }
.usgs-map-summary footer { align-items: flex-start; flex-direction: column; }
.usgs-map-summary footer span { font-size: 8px; line-height: 1.55; }

.services-section {
  background: rgba(247, 248, 250, .89);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.service-grid article {
  display: flex;
  flex-direction: column;
  min-height: 244px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
}

.service-grid article:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }

.service-code {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--violet);
  border-radius: 11px;
  background: var(--lavender);
  font-size: 10px;
  font-weight: 820;
}

.service-grid h3 { margin: 38px 0 6px; font-size: 18px; }
.service-grid p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.service-grid button { margin-top: auto; padding: 10px 0 0; text-align: left; color: var(--violet); background: transparent; cursor: pointer; font-size: 10px; font-weight: 700; }

.trust-section {
  background: rgba(255, 255, 255, .91);
}

.trust-grid {
  display: grid;
  grid-template-columns: 1.18fr 1fr .9fr;
  gap: 14px;
}

.trust-grid > article {
  min-height: 308px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.trust-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trust-card-head > span { font-size: 14px; font-weight: 720; }
.trust-card-head a,
.trust-card-head button {
  padding: 0;
  color: var(--violet);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 680;
}

.update-card ol {
  margin: 23px 0 0;
  padding: 0;
  list-style: none;
}

.update-card li {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 67px;
  border-top: 1px solid var(--line);
}

.update-card time { color: #989ba2; font-size: 10px; font-weight: 700; }
.update-card button { text-align: left; background: transparent; cursor: pointer; font-size: 11px; font-weight: 570; }

.standard-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 14px;
  margin: 31px 0 24px;
}

.standard-card dt { font-size: 24px; font-weight: 760; letter-spacing: -.04em; }
.standard-card dd { margin: 2px 0 0; color: var(--muted); font-size: 9px; }
.standard-card > p { height: 6px; margin: 0; border-radius: 6px; background: #ecebf1; overflow: hidden; }
.standard-card > p i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), #7f6bea); }
.standard-card > small { display: block; margin-top: 12px; color: var(--muted); font-size: 9px; line-height: 1.7; }

.api-card {
  color: #fff;
  border-color: transparent !important;
  background: #20222a;
}

.api-card .trust-card-head em { display: inline-flex; align-items: center; gap: 7px; color: #a8dccc; font-size: 9px; font-style: normal; }
.api-card h3 { margin: 37px 0 4px; font-size: 28px; }
.api-card > p { margin: 0 0 20px; color: rgba(255,255,255,.52); font-size: 10px; }
.api-card > div:not(.trust-card-head) { display: flex; gap: 6px; }
.api-card > div:not(.trust-card-head) button { padding: 6px 8px; color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.12); border-radius: 7px; background: transparent; cursor: pointer; font-size: 8px; }
.api-primary { margin-top: 28px; padding: 10px 12px; color: var(--ink); border-radius: 9px; background: #fff; cursor: pointer; font-size: 10px; font-weight: 720; }

.knowledge-section {
  min-height: 340px;
  padding: 58px 0;
  border-top: 1px solid var(--line);
  background: rgba(250, 250, 250, .88);
}

.knowledge-inner {
  display: grid;
  grid-template-columns: 230px 1fr;
  align-items: center;
  gap: 36px;
}

.knowledge-inner h2 { margin: 6px 0 0; font-size: 28px; letter-spacing: -.035em; }
.knowledge-inner nav { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; }
.knowledge-inner nav button { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 2px 10px; min-height: 102px; padding: 20px; text-align: left; border-right: 1px solid var(--line); background: #fff; cursor: pointer; }
.knowledge-inner nav button:last-child { border-right: 0; }
.knowledge-inner nav span { grid-row: 1 / 3; color: #acaeb4; font-size: 9px; font-weight: 740; }
.knowledge-inner nav strong { font-size: 12px; }
.knowledge-inner nav i { color: var(--violet); font-size: 9px; font-style: normal; }

.about-section {
  position: relative;
  padding: 92px 0 156px;
  border-top: 1px solid rgba(211, 209, 221, .88);
  background:
    radial-gradient(circle at 88% 18%, rgba(111, 91, 220, .09), transparent 28rem),
    rgba(244, 242, 250, .82);
}

.about-inner {
  display: grid;
  grid-template-columns: minmax(230px, .72fr) minmax(0, 1.55fr);
  align-items: start;
  gap: clamp(48px, 7vw, 96px);
}

.about-heading h2 { margin: 9px 0 0; font-size: clamp(34px, 4vw, 52px); letter-spacing: -.05em; }
.about-heading p { max-width: 390px; margin: 17px 0 0; color: var(--muted); font-size: 13px; line-height: 1.85; }
.about-action { margin-top: 14px; }

.about-institute {
  overflow: hidden;
  border: 1px solid rgba(205, 202, 218, .88);
  border-radius: 22px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 20px 54px rgba(49,42,78,.07);
  backdrop-filter: blur(18px);
}

.about-institute-title { display: grid; grid-template-columns: 90px 1fr; align-items: center; min-height: 92px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.about-institute-title span { color: var(--violet); font-size: 10px; font-weight: 780; letter-spacing: .08em; }
.about-institute-title strong { font-size: clamp(19px, 2vw, 27px); letter-spacing: -.035em; }
.about-institute > p { margin: 0; padding: 23px 24px; color: #555961; border-bottom: 1px solid var(--line); font-size: 12px; line-height: 1.9; }
.about-institute dl { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; }
.about-institute dl > div { display: grid; grid-template-columns: 25px 1fr; gap: 8px; min-height: 112px; padding: 22px 18px; border-left: 1px solid var(--line); }
.about-institute dl > div:first-child { border-left: 0; }
.about-institute dt { color: #aaa5bd; font-size: 9px; font-weight: 780; }
.about-institute dd { margin: 0; }
.about-institute dd strong,
.about-institute dd span { display: block; }
.about-institute dd strong { font-size: 11px; }
.about-institute dd span { margin-top: 5px; color: var(--muted); font-size: 8px; line-height: 1.65; }

.site-footer {
  color: rgba(255,255,255,.76);
  background:
    radial-gradient(circle at 8% 0%, rgba(111,91,210,.18), transparent 28rem),
    #17191e;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(300px, 1.05fr) minmax(280px, .85fr) minmax(360px, 1fr);
  align-items: center;
  gap: 54px;
  min-height: 186px;
}

.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-logo { display: grid; width: 62px; height: 62px; flex: 0 0 62px; place-items: center; border: 1px solid rgba(255,255,255,.1); border-radius: 17px; background: rgba(255,255,255,.07); }
.footer-logo img { display: block; width: 52px; height: 52px; object-fit: contain; filter: brightness(1.12) saturate(.92); }
.footer-brand strong { display: block; color: #fff; font-size: 15px; letter-spacing: .01em; }
.footer-brand p { margin: 6px 0 0; color: rgba(255,255,255,.4); font-size: 8px; letter-spacing: .08em; }
.footer-institute { padding-left: 24px; border-left: 1px solid rgba(255,255,255,.1); }
.footer-institute span { display: block; color: #a89bea; font-size: 8px; font-weight: 760; letter-spacing: .12em; }
.footer-institute strong { display: block; margin-top: 8px; color: rgba(255,255,255,.9); font-size: 11px; }
.footer-institute p { max-width: 300px; margin: 9px 0 0; color: rgba(255,255,255,.44); font-size: 9px; line-height: 1.7; }
.footer-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 24px; }
.footer-actions nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 20px; }
.footer-actions nav a { color: rgba(255,255,255,.62); font-size: 10px; transition: color .2s ease; }
.footer-actions nav a:hover { color: #fff; }
.footer-actions > button { padding: 11px 15px; color: var(--ink); border-radius: 9px; background: #fff; cursor: pointer; font-size: 10px; font-weight: 720; }

.footer-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  min-height: 68px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.36);
  font-size: 8px;
}
.footer-bottom > div { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-bottom nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }
.footer-bottom a { color: rgba(255,255,255,.42); transition: color .2s ease; }
.footer-bottom a:hover { color: rgba(255,255,255,.86); }

.portal-dialog {
  width: min(780px, calc(100% - 30px));
  max-height: min(820px, calc(100vh - 30px));
  padding: 0;
  color: var(--ink);
  border: 0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 40px 110px rgba(18, 15, 37, .30);
  overflow: auto;
}

.portal-dialog::backdrop {
  background: rgba(20, 18, 29, .62);
  backdrop-filter: blur(7px);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--canvas);
  cursor: pointer;
  font-size: 18px;
}

.dialog-title {
  padding: 31px 34px 22px;
  border-bottom: 1px solid var(--line);
}

.dialog-title h2 { margin: 8px 0 3px; font-size: 26px; }
.dialog-title p { margin: 0; color: var(--muted); font-size: 11px; }

.advanced-dialog form { padding: 26px 34px 30px; }

.advanced-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.advanced-grid label { display: flex; flex-direction: column; gap: 7px; }
.advanced-grid label > span { color: #595c62; font-size: 10px; font-weight: 660; }
.advanced-grid input,
.advanced-grid select { width: 100%; height: 43px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: var(--canvas); font-size: 11px; }
.advanced-grid input:focus,
.advanced-grid select:focus { border-color: rgba(103,83,217,.45); background: #fff; }

.query-preview {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  gap: 9px;
  margin-top: 20px;
  padding: 15px;
  border-radius: 11px;
  background: var(--lavender);
}

.query-preview span { color: #675c95; font-size: 10px; }
.query-preview strong { color: var(--violet); font-size: 24px; }
.query-preview small { color: #797286; font-size: 9px; }

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.dialog-actions button { height: 40px; padding: 0 15px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; font-size: 10px; font-weight: 680; }
.dialog-actions button[type="submit"] { color: #fff; border-color: var(--violet); background: var(--violet); }

.dataset-dialog-body { padding: 34px; }
.dataset-dialog-body > span { color: var(--violet); font-size: 10px; font-weight: 760; }
.dataset-dialog-body h2 { margin: 9px 44px 6px 0; font-size: 25px; line-height: 1.3; }
.dataset-dialog-body > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.dialog-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 24px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.dialog-stats div { padding: 14px; border-right: 1px solid var(--line); }
.dialog-stats div:last-child { border-right: 0; }
.dialog-stats b { display: block; font-size: 16px; }
.dialog-stats small { color: var(--muted); font-size: 8px; }
.dialog-fields { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.dialog-fields span { padding: 6px 8px; color: #6253a7; border-radius: 7px; background: var(--lavender); font-size: 9px; }
.dataset-dialog-body footer { display: flex; gap: 8px; margin-top: 24px; }
.dataset-dialog-body footer button { padding: 10px 13px; color: var(--violet); border: 1px solid rgba(103,83,217,.26); border-radius: 9px; background: #fff; cursor: pointer; font-size: 10px; font-weight: 680; }
.dataset-dialog-body footer button:first-child { color: #fff; border-color: var(--violet); background: var(--violet); }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  max-width: 360px;
  padding: 12px 15px;
  color: #fff;
  border-radius: 10px;
  background: rgba(28, 29, 34, .94);
  box-shadow: 0 16px 38px rgba(0,0,0,.20);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: .2s ease;
}

.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1080px) {
  .outlook-body { grid-template-columns: 1.45fr .8fr; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .api-card { grid-column: 1 / -1; min-height: 230px !important; }
}

@media (max-width: 1180px) {
  .header-inner { gap: 16px; }
  .primary-nav { gap: 9px; }
  .primary-nav a { font-size: 12px; }
  .brand-copy small,
  .lang-button { display: none; }
  .brand-copy strong { font-size: 14px; }
}

@media (max-width: 1040px) {
  :root { --header-height: 68px; }
  .site-header { height: var(--header-height); }
  .header-inner { justify-content: space-between; }
  .menu-toggle { display: block; order: 3; cursor: pointer; }
  .header-actions { margin-left: auto; }
  .primary-nav { position: absolute; top: var(--header-height); right: 24px; left: 24px; display: none; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.98); box-shadow: var(--shadow-soft); }
  .primary-nav.open { display: flex; }
  .primary-nav a { padding: 10px 12px; border-radius: 8px; }
  .primary-nav a::after { display: none; }
  .primary-nav a:hover,
  .primary-nav a.active { background: var(--lavender); }
}

@media (max-width: 860px) {
  :root { --shell: min(100% - 30px, 1220px); }
  .primary-nav { right: 15px; left: 15px; }
  .hero { min-height: calc(100svh - var(--header-height)); }
  .hero-inner { padding: 52px 0 40px; }
  .hero-data-proof { grid-template-columns: 1fr; }
  .hero-data-proof-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 12px 15px; border-right: 0; border-bottom: 1px solid rgba(215,213,223,.92); }
  .hero-data-proof-head > strong { margin-top: 0; }
  .hero-data-proof-head > small { justify-self: end; margin-top: 0; }
  .hero-data-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-data-grid > div:nth-child(4) { border-left: 0; }
  .domain-grid { grid-template-columns: 1fr 1fr; }
  .featured-grid { grid-template-columns: 1fr; }
  .outlook-body { grid-template-columns: 1fr; }
  .outlook-visual { min-height: 460px; border-right: 0; border-bottom: 1px solid var(--line); }
  .outlook-summary { min-height: 380px; }
  .service-capability-strip { grid-template-columns: 1fr 1fr; }
  .service-strip-title { grid-column: 1 / -1; min-height: 60px; border-right: 0; border-bottom: 1px solid var(--line); }
  .service-capability-strip > button:nth-of-type(odd) { border-left: 0; }
  .knowledge-inner { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-main { grid-template-columns: 1fr; gap: 28px; padding: 42px 0; }
  .footer-institute { padding: 0; border-left: 0; }
  .footer-actions { align-items: flex-start; }
  .footer-actions nav { justify-content: flex-start; }
}

@media (max-width: 620px) {
  .header-actions .lang-button { display: none; }
  .submit-button { display: none; }
  .brand-copy strong { font-size: 14px; }
  .hero { min-height: auto; }
  .hero-inner { padding: 58px 0 40px; }
  .hero h1 { font-size: 42px; }
  .hero-copy > p { max-width: 330px; margin-inline: auto; font-size: 14px; line-height: 1.6; }
  .agent-bar { grid-template-columns: auto 1fr; padding: 10px; }
  .agent-bar textarea { font-size: 13px; }
  .agent-bar > button { grid-column: 1 / -1; width: 100%; margin-top: 7px; }
  .agent-meta { justify-content: space-between; }
  .agent-meta span { display: none; }
  .agent-suggestions > span { width: 100%; }
  .agent-response { grid-template-columns: 1fr; gap: 10px; }
  .agent-response button { width: 100%; }
  .agent-run-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-data-proof-head { display: flex; align-items: flex-start; gap: 0; }
  .hero-data-proof-head > small { align-self: stretch; margin-top: 6px; }
  .hero-data-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-data-grid > div { padding: 12px; }
  .hero-data-grid > div:nth-child(odd) { border-left: 0; }
  .hero-data-grid > div:nth-child(4) { border-left: 1px solid rgba(220,218,226,.8); }
  .section { padding: 76px 0; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 24px; }
  .domain-grid { grid-template-columns: 1fr; }
  .domain-grid > button { min-height: 164px; }
  .service-section-label { align-items: flex-start; flex-direction: column; gap: 4px; }
  .service-capability-strip { grid-template-columns: 1fr; }
  .service-capability-strip > button { border-top: 1px solid var(--line); border-left: 0; }
  .service-capability-strip > button:first-of-type { border-top: 0; }
  .catalog-list-head { align-items: flex-start; flex-direction: column; }
  .catalog-list-head label { width: 100%; }
  .dataset-row { grid-template-columns: auto 1fr 16px; }
  .dataset-meta { display: none; }
  .featured-card { min-height: 500px; padding: 24px; }
  .featured-card dl { right: 24px; left: 24px; }
  .quality-bars { grid-template-columns: 1fr; }
  .outlook-toolbar { grid-template-columns: 1fr; padding: 13px; }
  .outlook-context { justify-content: flex-start; flex-wrap: wrap; }
  .view-tabs { justify-content: flex-start; }
  .outlook-visual { min-height: 380px; }
  .usgs-map-frame { min-height: 0; }
  .usgs-map-frame > img { min-height: 310px; }
  .usgs-map-frame figcaption { align-items: flex-start; flex-direction: column; gap: 4px; }
  .usgs-map-frame figcaption small { text-align: left; }
  .service-grid,
  .trust-grid { grid-template-columns: 1fr; }
  .api-card { grid-column: auto; }
  .knowledge-inner nav { grid-template-columns: 1fr; }
  .knowledge-inner nav button { border-right: 0; border-bottom: 1px solid var(--line); }
  .knowledge-inner nav button:last-child { border-bottom: 0; }
  .about-section { padding: 70px 0; }
  .about-institute-title { grid-template-columns: 1fr; gap: 7px; }
  .about-institute dl { grid-template-columns: 1fr; }
  .about-institute dl > div { min-height: 84px; border-top: 1px solid var(--line); border-left: 0; }
  .about-institute dl > div:first-child { border-top: 0; }
  .footer-actions nav { gap: 12px; }
  .footer-bottom { flex-direction: column; gap: 5px; }
  .footer-bottom nav { justify-content: flex-start; padding-bottom: 18px; }
  .advanced-grid { grid-template-columns: 1fr; }
  .dialog-title,
  .advanced-dialog form,
  .dataset-dialog-body { padding-inline: 22px; }
}

@media (min-width: 861px) and (max-height: 820px) {
  .hero-inner { padding: 26px 0 24px; }
  .hero h1 { margin-top: 11px; font-size: clamp(44px, 4.65vw, 60px); }
  .hero-copy > p { margin-top: 14px; font-size: 15px; }
  .agent-bar { min-height: 60px; margin-top: 20px; }
  .agent-bar > button { height: 44px; }
  .agent-suggestions { margin-top: 10px; }
  .hero-data-proof { margin-top: 15px; }
  .hero-data-proof-head { padding-block: 10px; }
  .hero-data-grid > div { padding-block: 10px; }
  .hero-data-grid dt { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .agent-icon img { animation: none !important; transform: none !important; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
