:root {
  color-scheme: dark;
  --ink: #08090c;
  --night: #10131a;
  --panel: rgba(18, 22, 30, 0.82);
  --panel-solid: #151a23;
  --panel-2: #1c2330;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.22);
  --text: #f7f2ea;
  --muted: #aab1bf;
  --soft: #d8deea;
  --coral: #ff6b57;
  --cyan: #35c2ff;
  --violet: #b392ff;
  --amber: #f5bd4f;
  --lime: #a8e34b;
  --blue: #6ca8ff;
  --green: #36d28f;
  --mint: #57e0c2;
  --pink: #ff79b7;
  --slate: #c6d0df;
  --red: #ff5d6c;
  --neutral: #f2efe7;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  --header-width: 1750px;
  --content-width: 1500px;
  --footer-width: 1350px;
  --page-gutter: 40px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--ink);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  background:
    linear-gradient(115deg, rgba(255, 107, 87, 0.12), transparent 360px),
    linear-gradient(245deg, rgba(53, 194, 255, 0.1), transparent 420px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 96px),
    var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(140deg, transparent 0 24%, rgba(255, 255, 255, 0.035) 24% 24.2%, transparent 24.2% 100%),
    linear-gradient(35deg, transparent 0 58%, rgba(255, 255, 255, 0.028) 58% 58.2%, transparent 58.2% 100%);
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

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

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  color: #0d0f14;
  background: var(--neutral);
  border-radius: 6px;
  text-decoration: none;
  transform: translateY(-160%);
}

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

.site-header {
  position: relative;
  z-index: 3;
  width: min(var(--header-width), calc(100% - var(--page-gutter)));
  margin: 0 auto;
  padding: 18px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.brand-link img {
  width: 210px;
  height: auto;
  display: block;
  filter: drop-shadow(0 16px 34px rgba(0, 0, 0, 0.38));
}

.brand-name {
  padding-left: 12px;
  border-left: 1px solid var(--line);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-switcher,
.language-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  background: rgba(12, 15, 21, 0.72);
  backdrop-filter: blur(18px);
  border-radius: 8px;
}

.language-switcher {
  position: relative;
}

.language-switcher summary {
  min-width: 38px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  list-style: none;
}

.language-switcher summary::-webkit-details-marker {
  display: none;
}

.language-switcher[open] summary {
  color: #101217;
  background: var(--neutral);
  border-radius: 6px;
}

.language-options {
  position: absolute;
  z-index: 20;
  right: 0;
  top: calc(100% + 8px);
  display: grid;
  grid-template-columns: repeat(6, minmax(38px, 1fr));
  gap: 4px;
  width: 290px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 15, 21, 0.96);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.site-switcher a,
.language-switcher a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.language-switcher a {
  min-width: 38px;
  padding: 0 8px;
}

.site-switcher a:hover,
.site-switcher a.is-active,
.language-switcher a:hover,
.language-switcher a.is-active {
  color: #101217;
  background: var(--neutral);
}

main {
  position: relative;
  z-index: 1;
}

.portal-shell {
  width: min(var(--content-width), calc(100% - var(--page-gutter)));
  margin: 24px auto 0;
  padding-bottom: 46px;
}

.hero-grid {
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(420px, 0.65fr);
  gap: 14px;
}

.hero-panel,
.command-panel,
.filter-panel,
.atlas-panel,
.detail-panel,
.answer-form,
.answer-card {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 107, 87, 0.28), transparent 48%),
    linear-gradient(180deg, transparent, rgba(8, 9, 12, 0.54)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 18px);
}

.hero-panel::after {
  content: "AI";
  position: absolute;
  right: 28px;
  top: 8px;
  color: rgba(255, 255, 255, 0.04);
  font-size: 210px;
  line-height: 1;
  font-weight: 950;
}

.hero-copy,
.hero-metrics {
  position: relative;
}

.eyebrow,
.panel-topline,
.search-control label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero-copy h1 {
  max-width: 920px;
  margin: 12px 0 18px;
  font-size: 72px;
  line-height: 0.94;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 760px;
  margin: 0;
  color: var(--soft);
  font-size: 22px;
}

.hero-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.hero-jumps a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: var(--soft);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.hero-jumps a:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.08);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 40px;
}

.hero-metrics span {
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}

.hero-metrics strong {
  color: var(--text);
  font-size: 30px;
  line-height: 1;
}

.command-panel {
  padding: 18px;
  display: grid;
  grid-template-rows: auto minmax(170px, 1fr) auto auto auto;
  gap: 12px;
}

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

.command-panel textarea,
.answer-form textarea {
  width: 100%;
  resize: vertical;
  color: var(--text);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.command-panel textarea {
  min-height: 174px;
  max-height: 38vh;
  padding: 16px;
  font-size: 17px;
}

.route-preview {
  min-height: 64px;
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.route-preview > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.route-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.route-preview > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.route-preview button {
  min-width: 0;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  padding: 0 8px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.route-preview button:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.route-preview button b {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0d0f14;
  background: var(--lime);
  border-radius: 5px;
  font-size: 10px;
}

.route-preview button > span {
  min-width: 0;
  display: grid;
  gap: 1px;
  text-align: left;
}

.route-preview button strong,
.route-preview button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-preview button strong {
  font-size: 12px;
}

.route-preview button small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.command-panel textarea:focus,
.answer-form textarea:focus,
.search-control input:focus {
  border-color: rgba(53, 194, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(53, 194, 255, 0.14);
}

.command-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 42px 42px;
  gap: 8px;
}

.btn,
.icon-btn,
.preset-btn,
.switch-btn,
.category-btn,
.filter-reset,
.favorite-btn,
.service-body {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.065);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.btn:hover,
.icon-btn:hover,
.preset-btn:hover,
.switch-btn:hover,
.category-btn:hover,
.filter-reset:hover,
.favorite-btn:hover,
.service-body:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.1);
}

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border-radius: 8px;
  font-weight: 850;
}

.btn.primary {
  color: #0d0f14;
  background: var(--coral);
  border-color: transparent;
}

.icon-btn {
  width: 42px;
  min-height: 42px;
  border-radius: 8px;
  font-size: 21px;
  line-height: 1;
}

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

.preset-btn {
  min-height: 34px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.preset-btn:hover {
  color: var(--text);
}

.portal-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1.905 / 1;
  max-height: 620px;
  margin: 14px 0 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #080a0d;
}

.portal-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.46);
}

.portal-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.portal-workspace {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr) 318px;
  gap: 14px;
  align-items: start;
  margin-top: 14px;
}

.choice-guide {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 14px;
  margin-top: 14px;
}

.choice-guide-intro,
.choice-guide-grid article {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.choice-guide-intro {
  padding: 30px;
}

.choice-guide-intro h2 {
  margin: 10px 0 14px;
  font-size: clamp(30px, 3.5vw, 48px);
  line-height: 1.02;
}

.choice-guide-intro p,
.choice-guide-grid p {
  margin: 0;
  color: var(--muted);
}

.choice-guide-intro > a {
  display: inline-flex;
  margin-top: 22px;
  color: var(--text);
  font-weight: 850;
  text-underline-offset: 4px;
}

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

.choice-guide-grid article {
  position: relative;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  overflow: hidden;
}

.choice-guide-grid article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent, var(--neutral));
}

.choice-number {
  color: var(--accent, var(--neutral));
  font-size: 12px;
  font-weight: 950;
}

.choice-guide-grid h3 {
  margin: 16px 0 10px;
  font-size: 23px;
}

.choice-guide-grid button,
.card-explore {
  min-height: 40px;
  margin-top: auto;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.choice-guide-grid button {
  padding-top: 18px;
}

.choice-guide-grid button:hover,
.card-explore:hover {
  color: var(--accent, var(--cyan));
}

.card-explore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
}

.decision-checklist {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(53, 194, 255, 0.08), transparent 42%),
    var(--panel);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.decision-checklist h3 {
  margin: 0 0 18px;
  font-size: 21px;
}

.decision-checklist dl {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.decision-checklist dl > div {
  padding: 15px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.16);
  border-radius: 8px;
}

.decision-checklist dt {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.decision-checklist dd {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.filter-panel,
.detail-panel {
  position: sticky;
  top: 14px;
}

.filter-panel {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.search-control {
  display: grid;
  gap: 7px;
}

.search-control input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.switch-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.switch-btn {
  min-height: 36px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 850;
}

.switch-btn.is-active {
  color: #0d0f14;
  background: var(--neutral);
  border-color: transparent;
}

.check-line {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 750;
}

.check-line input {
  width: 16px;
  height: 16px;
  accent-color: var(--amber);
}

.filter-reset {
  min-height: 38px;
  padding: 0 10px;
  color: var(--muted);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.filter-reset:hover {
  color: var(--text);
}

.category-list {
  display: grid;
  gap: 6px;
  max-height: calc(100vh - 260px);
  overflow: auto;
  padding-right: 2px;
}

.category-btn {
  min-height: 42px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  text-align: left;
  color: var(--muted);
  border-radius: 8px;
}

.category-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-btn strong {
  color: var(--text);
  font-size: 12px;
}

.category-btn.is-active {
  color: #0d0f14;
  background: var(--accent, var(--neutral));
  border-color: transparent;
}

.category-btn.is-active strong {
  color: #0d0f14;
}

.atlas-panel {
  min-height: 640px;
  padding: 16px;
}

.atlas-head {
  min-height: 74px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.atlas-head h2 {
  margin: 4px 0 0;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: 0;
}

.result-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  border-radius: 8px;
  white-space: nowrap;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 10px;
}

.service-card {
  position: relative;
  min-height: 292px;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    var(--panel-solid);
  border-radius: 8px;
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: auto 292px;
}

.service-card::before {
  content: "";
  height: 4px;
  background: var(--accent, var(--neutral));
}

.service-card:target {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  scroll-margin-top: 100px;
}

.service-permalink {
  display: block;
  padding: 0 14px 12px;
  color: var(--muted);
  font-size: 12px;
  text-underline-offset: 3px;
}

.service-card.is-selected {
  border-color: var(--accent, var(--line-strong));
}

.tone-coral { --accent: var(--coral); }
.tone-cyan { --accent: var(--cyan); }
.tone-violet { --accent: var(--violet); }
.tone-amber { --accent: var(--amber); }
.tone-lime { --accent: var(--lime); }
.tone-blue { --accent: var(--blue); }
.tone-green { --accent: var(--green); }
.tone-mint { --accent: var(--mint); }
.tone-pink { --accent: var(--pink); }
.tone-slate { --accent: var(--slate); }
.tone-neutral { --accent: var(--neutral); }
.tone-red { --accent: var(--red); }

.status-watch {
  border-style: dashed;
}

.status-sunset {
  opacity: 0.68;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 14px 0;
}

.service-mark,
.detail-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #0d0f14;
  background: var(--accent, var(--neutral));
  border-radius: 8px;
  font-weight: 950;
}

.service-initials {
  position: relative;
  z-index: 0;
}

.service-mark img,
.detail-mark img {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 6px;
  object-fit: contain;
  background: transparent;
}

.detail-mark img {
  padding: 9px;
}

.service-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  font-size: 15px;
}

.favorite-btn {
  width: 34px;
  height: 34px;
  color: var(--muted);
  border-radius: 8px;
}

.favorite-btn.is-active {
  color: #0d0f14;
  background: var(--amber);
  border-color: transparent;
}

.service-body {
  display: grid;
  align-content: start;
  gap: 4px;
  width: 100%;
  min-height: 138px;
  padding: 12px 14px 8px;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 0;
}

.service-body:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.035);
}

.service-context,
.service-org,
.service-purpose {
  color: var(--muted);
}

.service-context {
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.service-body strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.1;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.service-org {
  font-size: 13px;
}

.service-purpose {
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.45;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.service-tags,
.detail-tags,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.service-tags {
  min-height: 54px;
  align-content: end;
  align-items: end;
  padding: 0 14px 14px;
}

.service-tags span,
.detail-tags span,
.detail-meta span,
.service-link {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  color: #dce3ee;
  background: rgba(255, 255, 255, 0.064);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
}

.service-link {
  margin-left: auto;
  align-self: end;
  color: var(--text);
  text-decoration: none;
}

.service-link:hover {
  color: #0d0f14;
  background: var(--accent, var(--neutral));
  border-color: transparent;
}

.detail-panel {
  min-height: 430px;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.detail-mark {
  width: 64px;
  height: 64px;
  font-size: 19px;
}

.detail-panel h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
}

.detail-panel p {
  margin: 0;
  color: var(--soft);
  font-size: 16px;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.detail-actions .btn {
  text-decoration: none;
}

.editorial-band {
  margin-top: 14px;
  padding: 54px 0 10px;
  border-top: 1px solid var(--line);
}

.visual-guide,
.context-gallery {
  margin-top: 64px;
}

.visual-guide-grid,
.context-gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.visual-guide-grid article,
.context-gallery-grid article {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.visual-guide-grid figure,
.context-gallery-grid figure {
  aspect-ratio: 3 / 2;
  margin: 0;
  overflow: hidden;
  background: var(--panel-solid);
}

.visual-guide-grid img,
.context-gallery-grid img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 320ms ease;
}

.visual-guide-grid article:hover img,
.context-gallery-grid article:hover img {
  transform: scale(1.035);
}

.visual-guide-grid article > div,
.context-gallery-grid article > div {
  padding: 18px;
}

.visual-guide-grid h3,
.context-gallery-grid h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.visual-guide-grid p,
.context-gallery-grid p {
  margin: 0;
  color: var(--soft);
}

.editorial-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  column-gap: 48px;
  align-items: end;
}

.editorial-intro .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 10px;
}

.editorial-intro h2 {
  max-width: 720px;
  margin: 0;
  font-size: 46px;
  line-height: 1.02;
}

.editorial-intro p {
  max-width: 760px;
  margin: 0;
  color: var(--soft);
  font-size: 20px;
}

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 42px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.editorial-grid article {
  min-height: 190px;
  padding: 28px;
  background: var(--ink);
}

.editorial-grid article:nth-child(1) {
  box-shadow: inset 0 4px 0 var(--cyan);
}

.editorial-grid article:nth-child(2) {
  box-shadow: inset 0 4px 0 var(--coral);
}

.editorial-grid article:nth-child(3) {
  box-shadow: inset 0 4px 0 var(--lime);
}

.editorial-grid h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.editorial-grid p,
.faq-grid p {
  margin: 0;
  color: var(--muted);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.faq-grid details {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 8px;
}

.faq-grid summary {
  min-height: 64px;
  display: flex;
  align-items: center;
  padding: 14px 40px 14px 16px;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.faq-grid details p {
  padding: 0 16px 18px;
}

:focus-visible {
  outline: 3px solid rgba(53, 194, 255, 0.72);
  outline-offset: 3px;
}

.empty-state {
  margin: 34px 0;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(360px, calc(100% - 36px));
  padding: 12px 14px;
  color: #0d0f14;
  background: var(--lime);
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

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

.answer-page {
  width: min(var(--content-width), calc(100% - var(--page-gutter)));
  margin: 34px auto 0;
  display: grid;
  gap: 14px;
}

.answer-form {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.answer-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.answer-form textarea {
  min-height: 190px;
  padding: 16px;
}

.answer-card {
  padding: 22px;
  color: var(--soft);
}

.site-footer {
  position: relative;
  z-index: 1;
  width: min(var(--footer-width), calc(100% - var(--page-gutter)));
  margin: 0 auto 32px;
  padding-top: 18px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 1.35fr) auto auto;
  align-items: start;
  gap: 18px;
  font-size: 13px;
}

.site-footer div {
  display: grid;
  gap: 3px;
}

.ai-disclaimer {
  display: grid;
  gap: 5px;
  line-height: 1.35;
}

.ai-disclaimer small {
  max-width: 520px;
  color: var(--muted);
  font-size: 11px;
}

.site-footer strong {
  color: var(--text);
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

@media (max-width: 1380px) {
  .portal-workspace {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .detail-panel {
    position: static;
    grid-column: 1 / -1;
  }

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

@media (max-width: 1080px) {
  .hero-grid,
  .portal-workspace {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
  }

  .category-list {
    max-height: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero-copy h1 {
    font-size: 54px;
  }

  .editorial-intro {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .editorial-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .editorial-grid article {
    min-height: 0;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 740px) {
  :root {
    --page-gutter: 24px;
  }

  .site-header,
  .site-footer {
    width: calc(100% - 24px);
  }

  .site-header,
  .header-actions,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .site-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .site-switcher,
  .language-switcher {
    width: 100%;
  }

  .language-options {
    left: 0;
    right: auto;
    width: min(100%, 360px);
    grid-template-columns: repeat(5, minmax(38px, 1fr));
  }

  .site-switcher a,
  .language-switcher a {
    flex: 1;
  }

  .portal-shell {
    width: calc(100% - 24px);
    margin-top: 14px;
  }

  .hero-panel {
    padding: 24px;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .hero-copy p {
    font-size: 17px;
  }

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

  .command-actions {
    grid-template-columns: 1fr 42px 42px;
  }

  .command-actions .btn:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .preset-row,
  .category-list,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .route-preview > div {
    grid-template-columns: 1fr;
  }

  .portal-visual {
    aspect-ratio: 1.25 / 1;
  }

  .portal-visual img {
    object-position: center;
  }

  .editorial-band {
    padding-top: 38px;
  }

  .editorial-intro h2 {
    font-size: 34px;
  }

  .editorial-intro p {
    font-size: 17px;
  }

  .atlas-head {
    align-items: start;
    flex-direction: column;
  }

  .service-card {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

main[id],
section[id],
article[id],
h1[id],
h2[id],
h3[id] {
  scroll-margin-top: 5rem;
}

:where(button, [role="button"], input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select, textarea) {
  min-height: 44px;
}

@media (forced-colors: active) {
  :where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid ButtonText !important;
  }
}

.home-hero,
.content-section,
.site-cta,
.prose-page,
.error-page {
  width: min(var(--content-width), calc(100% - var(--page-gutter)));
  margin-inline: auto;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(420px, 1.06fr);
  gap: 14px;
  margin-top: 24px;
}

.home-hero-copy,
.home-visual,
.home-metrics,
.content-grid article,
.steps-grid li,
.site-cta,
.page-heading,
.prose-sections section,
.method-list li,
.notice-panel,
.form-message,
.error-page {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.home-hero-copy {
  padding: clamp(28px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-hero-copy h1,
.page-heading h1,
.error-page h1 {
  margin: 12px 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
}

.home-hero-copy p,
.page-heading > p,
.error-page p {
  margin: 0;
  color: var(--soft);
  font-size: clamp(18px, 2vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.hero-actions .btn,
.site-cta .btn,
.error-page .btn {
  text-decoration: none;
}

.home-visual {
  min-height: 430px;
  margin: 0;
  overflow: hidden;
}

.home-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.page-visual {
  aspect-ratio: 16 / 8;
  margin: 14px 0 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.page-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.home-metrics {
  grid-column: 1 / -1;
  margin: 0;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.home-metrics div {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  border-radius: 8px;
}

.home-metrics dt {
  color: var(--muted);
}

.home-metrics dd {
  margin: 0;
  font-size: 34px;
  font-weight: 900;
}

.content-section {
  padding-top: 72px;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 28px;
}

.section-heading h2,
.site-cta h2,
.prose-sections h2,
.notice-panel h2 {
  margin: 8px 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.04;
}

.section-heading p,
.content-grid p,
.steps-grid p,
.site-cta p,
.prose-sections p,
.method-list p,
.notice-panel p {
  margin: 0;
  color: var(--muted);
}

.content-grid {
  display: grid;
  gap: 10px;
}

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

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

.content-grid article {
  min-height: 190px;
  padding: 26px;
}

.content-grid h3,
.steps-grid h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.steps-grid,
.method-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.steps-grid li {
  min-height: 220px;
  padding: 26px;
}

.steps-grid li > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  color: #0d0f14;
  background: var(--cyan);
  border-radius: 8px;
  font-weight: 900;
}

.site-cta {
  margin-top: 72px;
  margin-bottom: 48px;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-cta h2 {
  margin-top: 0;
}

.prose-page {
  margin-top: 34px;
  margin-bottom: 56px;
}

.prose-page.narrow {
  width: min(var(--content-width), calc(100% - var(--page-gutter)));
}

.page-heading {
  padding: clamp(28px, 5vw, 56px);
}

.page-heading small {
  display: block;
  margin-top: 18px;
  color: var(--muted);
}

.prose-sections,
.method-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.prose-sections section,
.method-list li,
.notice-panel {
  padding: 28px;
}

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

.legal-grid section {
  min-height: 210px;
}

.legal-grid .legal-contact,
.legal-grid .legal-ai-notice {
  min-height: 0;
}

.legal-contact a {
  color: var(--text);
  font-weight: 800;
  text-underline-offset: 4px;
}

.legal-ai-notice {
  border-color: rgba(53, 194, 255, 0.42) !important;
  background: linear-gradient(135deg, rgba(53, 194, 255, 0.12), rgba(179, 146, 255, 0.08)) !important;
}

.prose-sections h2,
.method-list h2,
.notice-panel h2 {
  margin-top: 0;
  font-size: 26px;
}

.notice-panel {
  margin-top: 14px;
  border-color: rgba(255, 191, 71, 0.42);
}

.error-page {
  margin-top: 34px;
  margin-bottom: 56px;
  padding: clamp(32px, 6vw, 72px);
}

.error-page .btn {
  margin-top: 24px;
}

.form-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.form-message {
  margin: 0;
  padding: 16px 18px;
}

.form-message.error {
  color: #ffd9d5;
  border-color: rgba(255, 107, 87, 0.5);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

@media (max-width: 1120px) {
  .site-header {
    align-items: flex-start;
  }

  .header-actions {
    align-items: flex-end;
    flex-direction: column;
  }

  .site-switcher {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .home-hero {
    grid-template-columns: 1fr;
  }

  .home-visual {
    min-height: 0;
    aspect-ratio: 1.9 / 1;
  }

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

@media (max-width: 740px) {
  .home-hero,
  .content-section,
  .site-cta,
  .prose-page,
  .prose-page.narrow,
  .error-page {
    width: calc(100% - 24px);
  }

  .header-actions {
    align-items: stretch;
  }

  .site-switcher {
    justify-content: flex-start;
  }

  .site-switcher a {
    flex: 0 1 auto;
  }

  .brand-link img {
    width: 185px;
  }

  .home-metrics,
  .four-columns,
  .three-columns,
  .steps-grid,
  .legal-grid {
    grid-template-columns: 1fr;
  }

  .home-metrics div,
  .site-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .content-section {
    padding-top: 48px;
  }

  .site-cta {
    margin-top: 48px;
  }
}

@media (max-width: 1080px) {
  .choice-guide {
    grid-template-columns: 1fr;
  }

  .decision-checklist dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

@media (min-width: 1081px) and (max-width: 1320px) {
  .visual-guide-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .context-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .choice-guide-grid {
    grid-template-columns: 1fr;
  }

  .choice-guide-intro,
  .choice-guide-grid article {
    padding: 22px;
  }

  .decision-checklist dl {
    grid-template-columns: 1fr;
  }

  .visual-guide,
  .context-gallery {
    margin-top: 46px;
  }

  .visual-guide-grid,
  .context-gallery-grid {
    grid-template-columns: 1fr;
  }
}
