/* Human-first editorial interface. Stage rendering styles remain in atlas.css. */
:root {
  --bg: #ffffff;
  --bg2: #edf5f8;
  --ink: #18485c;
  --ink2: #536b73;
  --line: #d4e3e9;
  --accent: #05668d;
  --accent2: #064b68;
  --accent-soft: #e4f3f8;
  --stage: #083c55;
  --stage2: #05668d;
  --header: 128px;
  --gold: #cba65b;
  --gold-hover: #bc964a;
  --sans: Arial, Helvetica, sans-serif;
  --serif: Arial, Helvetica, sans-serif;
}
html {
  scroll-padding-top: 110px;
  scroll-behavior: smooth;
}
body {
  font-size: 1rem;
  line-height: 1.6;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
a {
  text-underline-offset: 4px;
}
p {
  max-width: 68ch;
}
h1,
h2,
h3 {
  font-weight: 700;
  color: var(--accent);
  line-height: 1.12;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.45rem, 4.5vw, 4rem);
  letter-spacing: -0.04em;
}
h2 {
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  letter-spacing: -0.03em;
}
h3 {
  font-size: 1.4rem;
}
a:hover {
  color: var(--accent2);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
summary {
  cursor: pointer;
  min-height: 44px;
  padding-block: 12px;
}
input,
select {
  min-height: 46px;
  border: 1px solid #87a9b9;
  border-radius: 6px;
  color: var(--ink);
  background: white;
  padding: 10px;
  width: 100%;
  max-width: 100%;
}
.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  background: white;
  padding: 14px;
  z-index: 100;
}
.skip:focus {
  top: 12px;
}
.eyebrow {
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  line-height: 1.6;
  color: var(--accent);
  margin: 0 0 12px;
}
.micro {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--ink2);
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
  height: auto;
  min-height: var(--header);
  padding: 18px max(24px, calc((100vw - 1380px) / 2));
  gap: 24px;
  background: var(--bg);
}
.brand {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  line-height: 1.2;
}
.brand-logo {
  display: block;
  width: 150px;
  height: 84px;
  object-fit: cover;
}
.brand .brand-label {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-top: 2px;
}
.top nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
}
.top nav a {
  text-decoration: none;
  font-size: 0.85rem;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.btn {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  padding: 10px 16px;
  min-height: 46px;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}
.btn:hover {
  background: var(--bg2);
  border-color: #70a6bd;
}
.btn.primary,
#headerPlan {
  background: var(--gold);
  border-color: var(--gold);
  color: #083c55;
  font-weight: 700;
}
.btn.primary:hover,
#headerPlan:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
}
.btn.on,
.btn[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.btn.small {
  font-size: 0.8rem;
  padding: 8px 12px;
  min-height: 42px;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 550;
  padding: 10px 0;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}
.text-button:hover {
  color: var(--accent2);
}
.atlas {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 64px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 50px 32px 70px;
  align-items: start;
}
.content-pane {
  padding: 0;
  max-width: none;
  margin: 0;
  min-width: 0;
  background: none;
}
.intro {
  margin: 0 0 25px;
}
.intro p.lede {
  font-size: 1rem;
  margin: 20px 0 0;
  line-height: 1.7;
  max-width: 48ch;
}
.stage-pane {
  position: sticky;
  top: 24px;
  height: auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: none;
  z-index: 0;
}
.stage-pane figure {
  margin: 0;
  border-radius: 110px 8px 8px 8px;
  overflow: hidden;
  background: #eaf4f8;
}
.stage-pane figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 1/1;
  object-fit: cover;
  object-position: center;
  display: block;
}
.stage-pane figcaption {
  padding: 20px 22px 24px;
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1.4;
}
.stage-pane figcaption span {
  display: block;
  font-family: var(--sans);
  font-size: 0.66rem;
  color: var(--ink2);
  margin-top: 14px;
}
.visual-controls {
  border-bottom: 1px solid var(--line);
  padding: 8px 0 14px;
}
.visual-controls p {
  margin: 0;
}
.companion-note {
  margin-top: 28px;
}
.companion-note p:not(.eyebrow) {
  font-family: var(--serif);
  font-size: 1.12rem;
  margin-bottom: 10px;
}
.companion-note span {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--ink2);
  margin-right: 20px;
}
.stage {
  position: relative;
  inset: auto;
  height: 590px;
  border-radius: 16px;
  min-width: 0;
}
.stage-head {
  z-index: 2;
  flex-wrap: wrap;
}
.stage-head .name {
  max-width: 100%;
  font-size: 1rem;
}
.tabs button {
  min-height: 38px;
  font-size: 0.75rem;
}
.caption .dots button {
  width: 28px;
  height: 32px;
}
.caption {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px 12px;
  padding-top: 24px;
  background: linear-gradient(180deg, #083c5500, #083c55f5 24px);
}
.caption .text {
  grid-column: 1 / -1;
  grid-row: 1;
  min-width: 0;
  font-size: 1rem;
}
.caption .dots {
  justify-self: end;
  padding: 0;
}
.stage.face-mode .caption .text {
  font-size: 0.875rem;
}
.stage .legend {
  top: 125px;
  bottom: auto;
  padding: 8px;
  border-radius: 6px;
  background: #083c55cc;
}
.stage .legend div {
  font-size: 0.75rem;
  color: #f2f9fc;
}
.play {
  width: 44px;
  height: 44px;
}
.stage canvas {
  touch-action: pan-y;
}
.face-access {
  top: 98px;
}
.face-access button {
  min-height: 40px;
}
.stage .stage-fallback {
  padding-top: 130px;
  align-items: center;
  pointer-events: none;
}
.search-form {
  margin: 0;
}
.search-form > label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.search-box {
  display: flex;
  gap: 8px;
  background: white;
  border: 1px solid #8bafbf;
  padding: 5px;
  border-radius: 9px;
}
.search-box:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.search-box input {
  border: 0;
  outline: 0;
  padding: 9px 10px;
  background: none;
  min-width: 0;
  font-size: 0.92rem;
  flex: 1;
}
.search-box button {
  min-width: 105px;
}
.search-form .micro {
  margin: 8px 0 12px;
}
.quick-paths {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.quick-paths button {
  background: none;
  border: 1px solid var(--line);
  border-radius: 50px;
  padding: 8px 12px;
  font-size: 0.75rem;
  min-height: 38px;
}
.quick-paths button:hover,
.quick-paths button[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.filter-panel {
  margin: 10px 0 30px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.filter-panel > summary {
  font-size: 0.8rem;
  font-weight: 550;
  color: var(--ink2);
}
.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0;
  padding: 6px 0 18px;
}
.filter-grid label {
  font-size: 0.8rem;
  display: grid;
  gap: 6px;
}
.filter-grid select {
  font-size: 0.85rem;
}
.filter-grid .check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.check input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  accent-color: var(--accent);
}
.catalogue-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-top: 25px;
  margin-bottom: 12px;
}
.catalogue-head .eyebrow {
  margin-bottom: 6px;
}
.catalogue-head h2 {
  font-size: 1.75rem;
}
.catalogue-head p.micro {
  margin: 7px 0 0;
}
.catalogue-head > .text-button {
  white-space: nowrap;
}
.treatment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}
.treatment-card {
  border: 1px solid var(--line);
  background: #fbfdfe;
  border-radius: 9px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.treatment-card:hover {
  border-color: #6895a8;
}
.treatment-card .card-category {
  color: var(--ink2);
  font-size: 0.65rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.treatment-card h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.24;
  letter-spacing: -0.015em;
}
.treatment-card h3 a {
  color: var(--ink);
  text-decoration: none;
}
.treatment-card h3 a:hover {
  text-decoration: underline;
}
.treatment-card p {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ink2);
  margin: 0;
}
.treatment-card .card-end {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.7rem;
}
.treatment-card .save-btn {
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 36px;
  padding: 5px 8px;
  font-size: 0.72rem;
  color: var(--accent);
  white-space: nowrap;
}
.save-btn[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.flag {
  font-size: 0.7rem !important;
  background: #fff2e5;
  color: #713c14 !important;
  padding: 5px 8px;
  border-radius: 4px;
}
.empty {
  padding: 25px;
  border: 1px dashed #8aa9b6;
  background: #edf5f8;
  border-radius: 8px;
  font-size: 0.95rem;
}
.empty h3 {
  margin-bottom: 12px;
}
.empty p {
  color: var(--ink2);
}
.learn-section,
.market-section,
.agents-section {
  margin-top: 50px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.learn-section h2 {
  margin-bottom: 24px;
}
.learn-section details {
  border-bottom: 1px solid var(--line);
}
.learn-section summary {
  font-size: 0.95rem;
  font-weight: 550;
}
.learn-section details p {
  font-size: 0.9rem;
  color: var(--ink2);
  margin: 6px 0;
}
.market-section {
  background: #e9f4f8;
  padding: 25px;
  border: 0;
  border-radius: 9px;
}
.market-section h2 {
  font-size: 1.7rem;
  margin-bottom: 14px;
}
.market-section p {
  font-size: 0.86rem;
}
.source-link {
  font-size: 0.73rem;
}
.agents-section h2 {
  margin-bottom: 16px;
}
.agents-section p {
  font-size: 0.9rem;
}
.agents-section blockquote {
  margin: 20px 0;
  padding: 18px 20px;
  background: white;
  border-left: 3px solid var(--accent);
  font-size: 0.9rem;
  color: var(--ink2);
}
.agents-section .mcp-status {
  font-size: 0.8rem;
}
.tool-list {
  list-style: none;
  padding: 0;
  overflow-wrap: anywhere;
}
.tool-list li {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  font-size: 0.8rem;
}
.tool-list code {
  color: var(--accent);
  font-size: 0.8rem;
}
.tool-list p {
  font-size: 0.8rem;
  margin: 6px 0;
}
.foot {
  margin-top: 45px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--ink2);
  line-height: 1.7;
}
.foot p {
  margin-bottom: 12px;
}
.foot strong {
  color: var(--ink);
}
.back {
  background: none;
  border: 0;
  color: var(--accent);
  padding: 10px 0;
  font-size: 0.85rem;
  min-height: 44px;
  margin-bottom: 20px;
  cursor: pointer;
}
.detail h1 {
  font-size: clamp(2.4rem, 4vw, 3.3rem);
  margin-bottom: 20px;
}
.detail .lead {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink2);
  margin: 20px 0;
}
.detail .meta-line {
  font-size: 0.8rem;
  color: var(--ink2);
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 28px 0;
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.facts > div {
  padding: 16px 16px 16px 0;
  border-bottom: 1px solid var(--line);
}
.facts > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}
.facts dt {
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink2);
  margin-bottom: 5px;
}
.facts dd {
  margin: 0;
  font-size: 0.92rem;
}
.detail section {
  margin-top: 28px;
}
.detail section h2 {
  font-size: 1.7rem;
  margin-bottom: 14px;
}
.detail section h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}
.detail .two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 30px;
}
.detail .two p,
.detail .plain {
  font-size: 0.9rem;
  color: var(--ink2);
}
.plain {
  padding-left: 20px;
  line-height: 1.75;
}
.plain li {
  margin-bottom: 9px;
}
.safety-notice {
  background: #fff3e7;
  border: 1px solid #d9a877;
  border-left: 4px solid #986020;
  border-radius: 6px;
  padding: 17px 18px;
  font-size: 0.85rem;
  color: #663810;
  margin: 20px 0;
}
.safety-notice strong {
  display: block;
  margin-bottom: 5px;
}
.safety-notice a {
  color: #653b17;
}
.editorial-note {
  background: #edf5f8;
  border-radius: 6px;
  padding: 15px 18px;
  font-size: 0.8rem;
  color: var(--ink2);
  margin: 20px 0;
}
.steps {
  list-style: none;
  padding: 0;
  counter-reset: none;
}
.steps li {
  padding: 0;
  border: 0;
  margin: 8px 0;
  cursor: default;
}
.steps li:before {
  display: none;
}
.steps button {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: left;
  padding: 13px 15px;
  background: white;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.6;
  min-height: 56px;
}
.steps button > span:first-child {
  font-size: 0.7rem;
  display: grid;
  place-items: center;
  background: var(--bg2);
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
}
.steps button[aria-pressed="true"] {
  border-color: var(--accent);
  background: #e9f4f8;
  box-shadow: inset 3px 0 var(--accent);
}
.steps button[aria-pressed="true"] > span:first-child {
  background: var(--accent);
  color: white;
}
.mechanism-text {
  font-size: 0.93rem;
  color: var(--ink2);
}
.result {
  margin: 18px 0;
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.result label {
  display: block;
  font-size: 0.85rem;
}
.result input {
  accent-color: var(--accent);
  padding: 0;
  border: 0;
}
.result .marks {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  gap: 8px;
}
.sources-block {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 0.82rem;
}
.sources-block summary {
  font-weight: 550;
}
.sources-block a {
  overflow-wrap: anywhere;
}
.atlas.compare-mode,
.atlas.plan-mode {
  display: block;
  max-width: 1280px;
}
.atlas.compare-mode .content-pane,
.atlas.plan-mode .content-pane {
  max-width: none;
  padding: 0;
  margin: 0;
}
.atlas.compare-mode .stage-pane,
.atlas.plan-mode .stage-pane {
  display: none;
}
.comparison h1,
.plan h1 {
  margin: 0 0 18px;
  font-size: clamp(2.3rem, 4vw, 3.4rem);
}
.comparison .lead,
.plan .lead {
  color: var(--ink2);
  max-width: 68ch;
}
.cmp {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin: 20px 0;
  background: white;
  max-width: 100%;
}
.cmp table {
  border-collapse: collapse;
  width: 100%;
  min-width: 740px;
  font-size: 0.88rem;
  table-layout: fixed;
}
.cmp caption {
  padding: 16px;
  text-align: left;
  font-size: 0.8rem;
  color: var(--ink2);
  caption-side: bottom;
}
.cmp th,
.cmp td {
  padding: 18px;
  vertical-align: top;
  text-align: left;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.cmp th {
  font-weight: 500;
  background: #edf5f8;
}
.cmp thead th {
  width: auto;
  font-family: var(--serif);
  font-size: 1.35rem;
}
.cmp th:first-child {
  width: 150px;
}
.cmp tbody th {
  font-family: var(--sans);
  font-size: 0.8rem;
}
.cmp .table-alert {
  background: #fff2e5;
  color: #713c14;
  font-size: 0.8rem;
  padding: 10px;
}
.comparison .mobile-hint {
  font-size: 0.8rem;
  color: var(--ink2);
}
.compare-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.compare-links a {
  font-size: 0.82rem;
  min-height: 44px;
}
.plan-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 44px;
}
.question-list {
  padding-left: 28px;
  max-width: 78ch;
}
.question-list li {
  padding: 10px 0 14px 8px;
  border-bottom: 1px solid var(--line);
}
.question-list li::marker {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1.2rem;
}
.plan-note {
  padding: 24px;
  background: #e9f4f8;
  border-radius: 8px;
  align-self: start;
}
.plan-note h2 {
  font-size: 1.6rem;
  margin-bottom: 14px;
}
.plan-note p {
  font-size: 0.85rem;
}
.tray {
  position: sticky;
  bottom: 0;
  left: auto;
  right: auto;
  transform: none;
  display: flex;
  justify-content: center;
  gap: 15px;
  align-items: center;
  margin: 0;
  width: 100%;
  max-width: none;
  background: #e9f4f8;
  color: var(--ink);
  padding: 12px 24px;
  border: 0;
  border-top: 1px solid #a8c4d0;
  border-radius: 0;
  z-index: 8;
  box-shadow: none;
}
.tray > span {
  font-size: 0.82rem;
  max-width: 60ch;
}
.tray-open {
  padding-bottom: 0;
}
.toast {
  bottom: 90px;
  font-size: 0.85rem;
  background: var(--ink);
  color: white;
  max-width: calc(100vw - 32px);
  z-index: 40;
}
.agent-demo {
  position: relative;
  bottom: auto;
  right: auto;
  width: auto;
  max-width: 1280px;
  margin: 0 auto 24px;
  padding: 0 32px;
  z-index: 1;
  box-shadow: none;
  border: 0;
  background: none;
  color: var(--ink);
}
.agent-demo > summary {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  gap: 9px;
  align-items: center;
  width: fit-content;
  font-size: 0.78rem;
  color: var(--ink);
  box-shadow: none;
}
.agent-demo[open] > summary {
  border-radius: 8px 8px 0 0;
}
.agent-panel {
  width: 100%;
  max-height: none;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 0 8px 8px 8px;
  background: white;
  color: var(--ink);
  padding: 20px;
  box-shadow: none;
}
.agent-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}
.agent-panel-head p {
  font-size: 0.8rem;
}
.agent-panel button {
  color: var(--accent);
}
#agentLog {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
#agentLog li {
  padding: 12px;
  background: var(--bg);
  border-radius: 6px;
  overflow-wrap: anywhere;
  font-size: 0.8rem;
}
#agentLog code {
  display: block;
  font-size: 0.75rem;
  white-space: pre-wrap;
  margin-top: 5px;
}
#agentLog p {
  margin: 5px 0 0;
}
#agentOutcome {
  padding: 15px;
  background: #e8f3f8;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.85rem;
}
#agentOutcome p {
  margin: 0;
}
.agent-panel-open .atlas .content-pane {
  margin-right: 0;
}
.agent-panel-open .atlas {
  padding-right: 32px;
}
.agent-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7a817a;
}
.agent-demo.live .agent-dot {
  background: #367948;
}
.agent-demo.working .agent-dot {
  background: #a77a11;
}
.agent-demo.error .agent-dot {
  background: #ab3e2d;
}
.toast {
  position: fixed;
  top: auto;
  left: 50%;
  transform: translateX(-50%);
  bottom: 90px;
  border-radius: 8px;
  padding: 12px 18px;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 24px #05668d22;
  transition: opacity 0.2s;
}
.toast.show {
  opacity: 1;
}
.agent-panel {
  position: static;
  inset: auto;
}
@media (min-width: 1450px) {
  .atlas {
    gap: 84px;
  }
  .stage-pane figure img {
    aspect-ratio: 1/1.05;
  }
}
@media (max-width: 1000px) {
  .atlas {
    gap: 32px;
    padding: 36px 24px 60px;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }
  .top {
    padding-inline: 24px;
    gap: 18px;
  }
  .top nav {
    gap: 16px;
  }
  .stage-pane figure {
    border-radius: 80px 8px 8px 8px;
  }
  .stage-pane figcaption {
    font-size: 1.15rem;
    padding: 18px;
  }
  .stage {
    height: 550px;
  }
  .treatment-grid {
    grid-template-columns: 1fr;
  }
  .agent-panel-open .atlas {
    padding-right: 24px;
  }
  .intro p.lede {
    font-size: 0.95rem;
  }
}
@media (max-width: 760px) {
  :root {
    --header: 120px;
  }
  .top {
    flex-wrap: wrap;
    padding: 16px 20px;
    gap: 8px 14px;
  }
  .brand {
    font-size: 1.4rem;
  }
  .brand .brand-hq {
    font-size: 1.4rem;
  }
  .top nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 28px;
  }
  .top nav a {
    font-size: 0.8rem;
    min-height: 36px;
  }
  .top > .btn {
    margin-left: auto;
    font-size: 0.73rem;
    padding-inline: 9px;
  }
  .atlas {
    display: flex;
    flex-direction: column;
    gap: 36px;
    padding: 30px 20px 40px;
  }
  .content-pane,
  .stage-pane {
    width: 100%;
    min-width: 0;
  }
  .intro h1 {
    font-size: 2.8rem;
  }
  .intro .eyebrow {
    font-size: 0.64rem;
  }
  .intro p.lede {
    font-size: 1rem;
  }
  .stage-pane {
    position: relative;
    top: auto;
    height: auto;
    min-height: 0;
  }
  .stage-pane figure {
    border-radius: 70px 8px 8px 8px;
  }
  .stage-pane figure img {
    aspect-ratio: 3/2;
  }
  .stage-pane figcaption {
    font-size: 1.3rem;
  }
  .stage {
    height: 560px;
  }
  .companion-note {
    display: none;
  }
  .treatment-grid {
    grid-template-columns: 1fr 1fr;
  }
  .treatment-card {
    padding: 15px;
  }
  .treatment-card h3 {
    font-size: 1.15rem;
  }
  .treatment-card .card-end {
    flex-wrap: wrap;
  }
  .filter-panel {
    margin-bottom: 24px;
  }
  .catalogue-head h2 {
    font-size: 1.7rem;
  }
  .learn-section,
  .market-section,
  .agents-section {
    margin-top: 36px;
  }
  .detail .two {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .detail h1 {
    font-size: 2.6rem;
  }
  .facts {
    margin-top: 22px;
  }
  .facts dd {
    font-size: 0.85rem;
  }
  .cmp table {
    min-width: 740px;
  }
  .cmp th,
  .cmp td {
    padding: 13px;
  }
  .cmp thead th {
    font-size: 1.2rem;
  }
  .cmp th:first-child {
    width: 130px;
  }
  .plan-layout {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .tray {
    flex-wrap: wrap;
    padding: 10px 18px;
    gap: 6px 16px;
  }
  .tray > span {
    flex-basis: 100%;
    font-size: 0.76rem;
  }
  .tray button {
    min-height: 42px;
  }
  .agent-demo {
    padding: 0 20px;
  }
  .agent-panel {
    padding: 14px;
  }
  .agent-panel-head {
    flex-wrap: wrap;
  }
  .agent-panel-open .atlas {
    padding-right: 20px;
  }
  .agent-demo[open] {
    position: relative;
    inset: auto;
  }
  .agent-panel-open .atlas.compare-mode .content-pane {
    padding-right: 0;
  }
  .agent-demo > summary {
    width: 100%;
  }
  .foot {
    margin-top: 35px;
  }
}
@media (max-width: 390px) {
  .treatment-grid {
    grid-template-columns: 1fr;
  }
  .intro h1 {
    font-size: 2.45rem;
  }
  .search-box button {
    min-width: 80px;
    padding-inline: 10px;
  }
  .search-box input {
    font-size: 0.85rem;
    padding-inline: 6px;
  }
  .quick-paths {
    gap: 5px;
  }
  .quick-paths button {
    font-size: 0.73rem;
  }
  .filter-grid {
    grid-template-columns: 1fr;
  }
  .catalogue-head > .text-button {
    font-size: 0.76rem;
  }
  .brand {
    font-size: 1.25rem;
  }
  .brand .brand-hq {
    font-size: 1.25rem;
  }
}
/* Readability is part of the midlife-first brief. Respect the browser's
   default text size; don't shrink essential controls or safety copy. */
.brand .brand-label,
.eyebrow,
.intro .eyebrow,
.treatment-card .card-category,
.companion-note span,
.steps button > span:first-child,
.caption .text b {
  font-size: 0.75rem;
}
.micro,
.top nav a,
.top > .btn,
.btn.small,
.text-button,
.quick-paths button,
.filter-panel > summary,
.filter-grid label,
.filter-grid select,
.search-form > label,
.catalogue-head > .text-button,
.treatment-card .card-end,
.treatment-card .save-btn,
.detail .meta-line,
.facts dt,
.source-link,
.stage-pane figcaption span,
.tabs button,
.face-access,
.face-access button,
.result label,
.result .marks,
.compare-links a,
.cmp caption,
.cmp tbody th,
.comparison .mobile-hint,
.tray > span,
.agent-demo > summary,
.agent-panel-head p,
#agentLog li,
#agentLog code,
.tool-list li,
.tool-list code,
.tool-list p,
.agents-section .mcp-status,
.foot {
  font-size: 0.875rem;
}
.treatment-card p,
.detail .two p,
.detail .plain,
.mechanism-text,
.steps button,
.facts dd,
.safety-notice,
.editorial-note,
.sources-block,
.cmp table,
.cmp .table-alert,
.plan-note p {
  font-size: 1rem;
}
.flag {
  font-size: 0.875rem !important;
}
.search-box input {
  font-size: 1rem;
}
.treatment-card .card-end,
.top nav,
.catalogue-head {
  flex-wrap: wrap;
}
.detail section > .text-button + .text-button {
  margin-left: 14px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
@media (forced-colors: active) {
  button,
  input,
  select,
  .treatment-card,
  .steps button,
  .cmp {
    border: 1px solid CanvasText;
  }
  .steps button[aria-pressed="true"] {
    outline: 3px solid Highlight;
  }
  .agent-dot {
    background: CanvasText;
  }
}
@media print {
  .top,
  .stage-pane,
  .tray,
  .agent-demo,
  .toast,
  .actions,
  .back,
  .skip,
  .btn,
  .text-button,
  nav {
    display: none !important;
  }
  .atlas {
    display: block;
    max-width: none;
    padding: 0;
  }
  .content-pane {
    width: 100%;
  }
  body {
    background: white;
    color: black;
    font-size: 11pt;
  }
  .foot {
    font-size: 9pt;
  }
  .plan-layout {
    display: block;
  }
  .cmp {
    overflow: visible;
    border: 0;
  }
  .cmp table {
    min-width: 0;
    font-size: 9pt;
  }
  .question-list li {
    break-inside: avoid;
  }
  .plan-note {
    margin-top: 25px;
  }
  .sources-block details {
    display: block;
  }
  .steps button {
    color: black;
    background: white;
  }
  .treatment-card {
    break-inside: avoid;
  }
  a {
    color: inherit;
  }
  h1 {
    font-size: 28pt;
  }
}
/* Embedded ChatGPT surface keeps the website's visual language. */
.chatgpt-controls {
  padding: 0 0 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.chatgpt-controls .actions { flex-wrap: wrap; gap: 8px; }
.chatgpt-controls label { display: block; margin: 12px 0; font-size: 0.9rem; }
.chatgpt-controls select { font: inherit; max-width: 100%; }
.chatgpt-controls input[type=checkbox] { width: auto; min-height: auto; margin-right: 8px; }
#atlasConnection { margin: 10px 0 0; }
#atlasPreferencePanel, #atlasVisualForm { padding: 12px 16px; margin-top: 16px; background: var(--bg2); border-radius: 8px; }
#atlasDisplayControl { display: flex; align-items: center; gap: 12px; }
#atlasDisplayMode { width: auto; flex: 1; max-width: 240px; }
/* Inherit website typography and brand tokens even when the host supplies its own
   font variables. Compact spacing does not shrink reading text. */
/* ChatGPT injects an important body font; preserve the website's brand font. */
.chatgpt-atlas body { font-family: var(--sans) !important; }
.chatgpt-atlas .top { min-height: 76px; padding: 10px 24px; gap: 16px; }
.chatgpt-atlas .brand-logo { width: 100px; height: 56px; }
.chatgpt-atlas .top nav a[href="/#agents"],
.chatgpt-atlas .agents-section, .chatgpt-atlas .agent-demo,
.chatgpt-atlas .market-section { display: none; }
.chatgpt-atlas .atlas { padding: 24px 24px 40px; gap: 32px; }
.chatgpt-atlas .intro h1 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
.chatgpt-atlas .intro .lede { margin-top: 14px; }
.chatgpt-atlas .treatment-card .save-btn, .chatgpt-atlas .quick-paths button { min-height: 44px; }
@media(max-width: 900px) {
  .chatgpt-atlas .atlas { display: flex; flex-direction: column; }
  .chatgpt-atlas .content-pane, .chatgpt-atlas .stage-pane { width: 100%; }
  .chatgpt-atlas .stage-pane { position: relative; top: auto; }
  .chatgpt-atlas .treatment-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width: 520px) {
  .chatgpt-atlas .top { padding-inline: 16px; }
  .chatgpt-atlas .top nav { gap: 20px; }
  .chatgpt-atlas .atlas { padding-inline: 16px; }
  .chatgpt-atlas .treatment-grid, .chatgpt-atlas .plan-layout { grid-template-columns: minmax(0,1fr); }
  .chatgpt-atlas .treatment-card { padding: 18px; }
  .chatgpt-atlas .catalogue-head { flex-wrap: wrap; gap: 12px; }
  .chatgpt-atlas .chatgpt-controls .actions > .btn { flex: 1 1 auto; }
  .chatgpt-atlas .cmp th, .chatgpt-atlas .cmp td { padding: 14px; }
  .chatgpt-atlas .tray { padding: 12px 16px; flex-wrap: wrap; gap: 8px 12px; }
}
/* Every reading and input surface follows the host theme. Safety notices retain
   their own contrasting dark text on a pale background in both themes. */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14212b;
  --bg2: #1c2e3b;
  --ink: #edf4f8;
  --ink2: #b9ced9;
  --line: #405763;
  --accent: #79d0f0;
  --accent2: #a2e2fa;
  --accent-soft: #243e4e;
}
html[data-theme="dark"] :is(input,select,.search-box,.skip,.steps button,.result,.cmp,.agents-section blockquote,.treatment-card) { background: var(--bg); }
html[data-theme="dark"] :is(.empty,.market-section,.editorial-note,.cmp th,.plan-note,.tray) { background: var(--bg2); }
html[data-theme="dark"] .steps button[aria-pressed="true"] { background: var(--accent-soft); }
html[data-theme="dark"] .steps button[aria-pressed="true"] > span:first-child { color: var(--bg); }
html[data-theme="dark"] .toast { background: var(--accent2); color: var(--bg); }
.chatgpt-atlas[data-theme="dark"] .stage-pane figure { background: var(--bg2); }
.chatgpt-atlas[data-theme="dark"] .brand-logo { background: #fff; border-radius: 6px; }

.atlas-welcome { margin: 0 0 28px; padding: 24px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg2); }
.atlas-welcome h2 { margin: 8px 0 20px; font-size: clamp(1.4rem, 2.5vw, 1.9rem); line-height: 1.2; }
.atlas-goals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.atlas-goals button { display: flex; flex-direction: column; gap: 10px; min-height: 116px; padding: 18px; text-align: left; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 9px; font: inherit; cursor: pointer; }
.atlas-goals button:hover, .atlas-goals button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.atlas-goals strong { font-size: 1rem; line-height: 1.3; }
.atlas-goals span { font-size: .875rem; line-height: 1.5; }
#atlasStartForm { padding-top: 20px; }
#atlasStartForm label { display: block; font-size: 1rem; margin-bottom: 8px; }
#atlasStartTreatments { width: 100%; max-width: 100%; padding: 12px; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
#atlasStartTreatments option { padding: 8px; }
#atlasStartError:empty { display: none; }
@media(max-width:700px) { .atlas-goals { grid-template-columns: 1fr; } .atlas-goals button { min-height: 80px; } .atlas-welcome { padding: 18px; } }
