/* Diagnostic only: every rule is scoped to its section, dialog, or open state. */
.fxdiag-section[hidden],
.fxdiag-modal [hidden] {
  display: none !important;
}
.fxdiag-section,
.fxdiag-modal {
  --fd-cta: linear-gradient(112deg, #c35426, #c13470 48%, #7443b7);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
.fxdiag-section *,
.fxdiag-modal * {
  box-sizing: border-box;
}
.fxdiag-section {
  margin: 0;
  padding: 40px 24px 48px;
  color: #f5f5fa;
  background: radial-gradient(ellipse at 82% 36%, #60395615, transparent 64%), #080d18;
}
.fxdiag-signature { max-width: 1080px; margin: 0 auto; }
.fxdiag-entry-content {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: 48px;
  align-items: center;
}
.fxdiag-story, .fxdiag-entry-action { min-width: 0; }
.fxdiag-eyebrow {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 24px;
  color: #c5c6d7; font-size: 11px; font-weight: 600; letter-spacing: .08em;
}
.fxdiag-dot {
  display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: #c1d4ec;
  box-shadow: 0 0 0 4px #a4c4ef06, 0 0 14px #a1bce540;
}
.fxdiag-signature h2 {
  max-width: 550px; margin: 0;
  color: #aeb7c9; font-size: 17px; line-height: 1.5; font-weight: 450;
  letter-spacing: -.015em; text-wrap: balance;
}
.fxdiag-signature h2 span {
  display: block; max-width: 20ch; margin-top: 12px;
  color: #f5f5fa; font-size: clamp(28px, 3.2vw, 38px); line-height: 1.16;
  font-weight: 650; letter-spacing: -.035em;
}
.fxdiag-signature p.fxdiag-copy {
  max-width: 48ch; margin: 16px 0 0; color: #b6bdd0;
  font-size: 15px; line-height: 1.65;
}
.fxdiag-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid #e5d9ff30;
  border-radius: 16px;
  padding: 14px 20px;
  min-height: 48px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: var(--fd-cta);
  box-shadow:
    inset 0 1px #ffffff30, inset 0 -1px #24204240,
    0 5px 20px #ce487a24;
  text-decoration: none;
  transition:
    transform 0.18s,
    box-shadow 0.18s,
    background 0.18s;
}
.fxdiag-button > span[aria-hidden] {
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
}
@media (hover: hover) {
  .fxdiag-button:not(.quiet):not(.secondary):not(:disabled):hover {
    filter: brightness(1.08);
    box-shadow:
      inset 0 1px #ffffff30, 0 6px 24px #b4416d22;
  }
  .fxdiag-visual:not(:disabled):hover {
    color: #f0d4e4;
  }
  .fxdiag-media-button:not(:disabled):hover,
  .fxdiag-drop:hover {
    background-color: #ffffff08;
  }
}
.fxdiag-button:not(:disabled):active,
.fxdiag-visual:not(:disabled):active {
  transform: scale(0.985);
}
.fxdiag-button:disabled {
  cursor: not-allowed;
  color: #e0d9e5;
  background: linear-gradient(#10182755, #10182755), var(--fd-cta);
  filter: saturate(.7);
  box-shadow: inset 0 1px 0 #ffffff08;
  transform: none;
}
.fxdiag-button[aria-busy="true"],
.fxdiag-visual[aria-busy="true"],
.fxdiag-footer[aria-busy="true"] .fxdiag-button {
  cursor: progress;
}
.fxdiag-button.secondary {
  background: #ffffff09;
  border: 1px solid #ffffff24;
  color: #e4e7f0;
  box-shadow: none;
}
.fxdiag-button.quiet {
  border-color: transparent;
  background: transparent;
  color: #bdc5d7;
  box-shadow: none;
  padding: 10px 14px;
}
.fxdiag-section :focus-visible,
.fxdiag-modal :focus-visible {
  outline: 3px solid #a6c8ff;
  outline-offset: 4px;
}
.fxdiag-modal #fxdiag-title:focus {
  outline: none;
}
.fxdiag-signature small {
  display: block;
  color: #a6aec2;
  font-size: 11px;
  margin-top: 12px;
  line-height: 1.5;
  text-align: center;
}
.fxdiag-visual-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.fxdiag-visual-tags li {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #aeb7c9;
}
.fxdiag-visual-tags li::before {
  content: "✓";
  color: #c4accf;
  font-size: 11px;
}
.fxdiag-visual {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: fit-content; max-width: 100%; min-height: 44px;
  margin: 8px auto 0; padding: 8px 4px;
  appearance: none; border: 0; background: transparent; color: #aeb7c9;
  font: inherit; font-size: 12px; line-height: 1.5; cursor: pointer;
}
.fxdiag-visual[disabled] { cursor: progress; opacity: .65; }
.fxdiag-signature .fxdiag-button {
  width: 100%; justify-content: space-between; text-align: left;
  min-height: 54px; font-size: 15px; font-weight: 600;
}
.fxdiag-launch-status {
  font-size: 12px;
  color: #ffd0ae;
  line-height: 1.5;
  margin: 10px 0 0;
}
.fxdiag-launch-status:empty {
  display: none;
}
/* Only hide the existing floating controls for the lifetime of this modal. */
body.fxdiag-is-open {
  overflow: hidden;
}
body.fxdiag-is-open #fixeo-urgent-fab,
body.fxdiag-is-open .chat-widget {
  visibility: hidden !important;
  pointer-events: none !important;
}
dialog.fxdiag-modal {
  position: fixed;
  inset: calc(var(--fxdiag-panel-top, 0px) + 16px) 0 auto;
  margin: 0 auto;
  --fd-muted: #acb8cf;
  --fd-line: #ffffff12;
  color-scheme: dark;
  color: #f5f6fb;
  background:
    radial-gradient(ellipse at 0 0, #4a365626, transparent 58%), #101623;
  border: 1px solid #ffffff14;
  border-radius: 24px;
  padding: 0;
  width: min(860px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(var(--fxdiag-panel-height, 100dvh) - 32px);
  box-shadow:
    0 32px 120px #000a,
    inset 0 1px 0 #ffffff0d;
  overflow: hidden;
}
.fxdiag-modal::backdrop {
  background: #050b18bd;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.fxdiag-shell {
  display: flex;
  flex-direction: column;
  max-height: calc(var(--fxdiag-panel-height, 100dvh) - 34px);
}
.fxdiag-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  padding: 10px 24px;
  border-bottom: 1px solid var(--fd-line);
}
.fxdiag-brand { min-width: 0; }
.fxdiag-brand-line {
  display: flex; align-items: center; gap: 8px;
  color: #c7c6d8; font-size: 10px; letter-spacing: .06em; font-weight: 600;
}
.fxdiag-brand .fxdiag-dot { width: 6px; height: 6px; }
.fxdiag-brand p {
  margin: 6px 0 0; color: #9ea9bf; font-size: 12px; line-height: 1.4;
}
.fxdiag-close {
  flex: none;
  display: grid;
  place-items: center;
  color: #ccd5e7;
  background: #ffffff06;
  border: 0;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  font: inherit;
  font-size: 26px;
  line-height: 1;
  transition: background 0.2s;
}
.fxdiag-close:hover {
  background: #ffffff10;
}
.fxdiag-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  list-style: none;
  margin: 0 0 24px;
  color: #9ca9c0;
  font-size: 10px;
}
.fxdiag-progress li {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  position: relative;
}
.fxdiag-progress li:not(:last-child)::after {
  content: "";
  height: 1px;
  flex: 1;
  min-width: 6px;
  background: #ffffff14;
  margin-left: 4px;
}
.fxdiag-step-number {
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  background: #ffffff05;
  color: #acb9cf;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}
.fxdiag-progress [aria-current="step"] {
  color: #f0cadc;
}
.fxdiag-progress [aria-current="step"] .fxdiag-step-number {
  background: linear-gradient(112deg, #c3542626, #c1347026 48%, #7443b726);
  color: #f8d3e6;
  box-shadow: inset 0 0 0 1px #eeaccf40;
}
.fxdiag-progress .done .fxdiag-step-number {
  color: #d0dfd9;
  background: #8ebfa31b;
}
.fxdiag-body {
  flex: 0 1 auto;
  min-height: 0;
  padding: 24px 30px 20px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #45556d transparent;
  scroll-padding: 16px;
}
.fxdiag-body h2 {
  font-size: clamp(25px, 3vw, 31px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.2;
  margin: 0 0 8px;
  color: #fff;
  text-wrap: balance;
}
.fxdiag-intro {
  font-size: 14px;
  line-height: 1.6;
  color: var(--fd-muted);
  margin: 0 0 24px;
  max-width: 640px;
}
.fxdiag-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: start;
  gap: 28px;
}
.fxdiag-grid > div {
  min-width: 0;
}
.fxdiag-label,
.fxdiag-label-row {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #dbe2ef;
  margin: 0 0 9px;
}
.fxdiag-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.fxdiag-label-row .fxdiag-label {
  margin: 0;
}
.fxdiag-optional {
  color: #94a4bf;
  font-size: 10px;
  font-weight: 400;
}
.fxdiag-input {
  width: 100%;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: #eef2fa;
  background: #0b1220;
  border: 1px solid #ffffff1c;
  border-radius: 16px;
  padding: 11px 13px;
  outline: none;
}
.fxdiag-input:focus {
  border-color: #c98ba9;
  box-shadow: 0 0 0 3px #ce80aa10;
}
.fxdiag-input::placeholder {
  color: #91a0b8;
}
textarea.fxdiag-input {
  resize: vertical;
  min-height: 104px;
  max-height: 190px;
}
.fxdiag-field {
  margin-bottom: 17px;
}
.fxdiag-field-help {
  display: block;
  color: #99a8c0;
  font-size: 10px;
  line-height: 1.55;
  margin-top: 6px;
}
.fxdiag-outcome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 3px;
}
.fxdiag-outcome-icon {
  color: #f7c39f;
  font-size: 24px;
}
.fxdiag-outcome p {
  margin: 0;
  color: #a8b7ce;
  font-size: 11px;
  line-height: 1.6;
}
.fxdiag-outcome strong {
  display: block;
  color: #dce3ef;
  font-weight: 550;
}
.fxdiag-media-well {
  position: relative;
  height: 144px;
  border: 1px solid #bbc5e51c;
  border-radius: 17px;
  background:
    radial-gradient(ellipse at 15% 30%, #5c43652b, transparent 70%), #131c2b;
  overflow: hidden;
  transition: border-color 0.2s;
}
.fxdiag-media-well.drag {
  border-color: #ffc59e;
  background-color: #263043;
}
.fxdiag-drop {
  appearance: none; position: absolute; inset: 0; width: 100%;
  display: grid; grid-template-columns: 44px minmax(0, 1fr);
  align-content: center; align-items: center; gap: 6px 12px;
  padding: 20px; text-align: left; border: 0;
  background: transparent; color: #e4ecfa; cursor: pointer; font: inherit;
  transition: background-color .2s;
}
.fxdiag-upload-icon {
  display: grid; place-items: center; grid-row: 1 / 3;
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(145deg, #c793bb18, #ffffff03);
  box-shadow: inset 0 1px #ffffff18;
}
.fxdiag-upload-icon svg { width: 26px; height: 26px; color: #dac5df; }
.fxdiag-drop strong { font-size: 14px; line-height: 1.4; font-weight: 550; }
.fxdiag-drop small { font-size: 12px; color: #a6b3c9; line-height: 1.5; }
.fxdiag-media-actions {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 7px;
  margin-top: 9px;
}
.fxdiag-media-button {
  appearance: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  border: 1px solid #ffffff12;
  border-radius: 10px;
  font: inherit;
  font-size: 10px;
  font-weight: 550;
  color: #d6e0ef;
  background: #ffffff03;
  padding: 8px 5px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.fxdiag-media-button svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.fxdiag-media-button:disabled {
  color: #8190a8;
  cursor: not-allowed;
  background: transparent;
}
.fxdiag-photo-status {
  min-height: 19px;
  margin: 9px 0 2px;
  color: #d1dccd;
  font-size: 10px;
  line-height: 1.6;
}
.fxdiag-photo-help {
  margin: 0;
  color: #98a9c2;
  font-size: 9px;
  line-height: 1.6;
}
.fxdiag-photo-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 8px;
}
.fxdiag-photo-details {
  color: #adbbd0;
  font-size: 11px;
  line-height: 1.5;
}
.fxdiag-photo-details summary {
  cursor: pointer;
  padding: 7px 0;
  color: #c2cfe1;
}
.fxdiag-photo-details[open] {
  flex-basis: 100%;
}
.fxdiag-photo-details p {
  margin: 5px 0;
}
.fxdiag-photo-details .fxdiag-privacy {
  font-size: inherit;
  line-height: inherit;
}
.fxdiag-media-well.has-photos {
  border-color: #bf9ec754;
  box-shadow:
    0 0 0 3px #bf9ec707,
    inset 0 1px 0 #ffdfc521;
}
.fxdiag-photo[data-state="selected"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 #ffffff38;
  background: linear-gradient(140deg, #ffffff08, transparent 36%);
}
.fxdiag-photos {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 5px;
}
.fxdiag-photos[data-count="1"] {
  grid-template-columns: 1fr;
}
.fxdiag-photos[data-count="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.fxdiag-photo {
  position: relative;
  min-width: 0;
  height: 100%;
  background: #0d1524;
  border-radius: 12px;
  overflow: hidden;
}
.fxdiag-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.fxdiag-photo button {
  display: grid;
  place-items: center;
  position: absolute;
  top: 3px;
  right: 3px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: #0b1425c9;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 22px;
}
.fxdiag-photo span {
  position: absolute;
  bottom: 8px;
  left: 8px;
  max-width: calc(100% - 16px);
  border-radius: 8px;
  background: #101c2be8;
  border: 1px solid #ffffff20;
  font-size: 10px;
  line-height: 1.4;
  padding: 5px 7px;
  color: #e2eddf;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.fxdiag-privacy {
  font-size: 10px;
  line-height: 1.6;
  color: #9cacc5;
  margin: 10px 0 0;
}
.fxdiag-consent-area {
  border-top: 1px solid var(--fd-line);
  margin-top: 20px;
  padding-top: 14px;
}
.fxdiag-consent {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  color: #d3ddec;
  font-size: 12px;
  line-height: 1.6;
  cursor: pointer;
}
.fxdiag-consent input {
  accent-color: #c88bae;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
}
.fxdiag-consent-details {
  margin-left: 30px;
  color: #a6b7ce;
  font-size: 11px;
  line-height: 1.7;
}
.fxdiag-consent-details summary {
  cursor: pointer;
  width: fit-content;
  padding: 7px 2px;
  color: #b9c8dd;
  font-size: 10px;
}
.fxdiag-consent-details p {
  margin: 8px 0;
}
.fxdiag-consent-details a {
  color: #ffccaa;
  text-underline-offset: 3px;
}
.fxdiag-disclaimer {
  font-size: 9px;
  line-height: 1.6;
  color: #96a6bf;
  margin: 9px 0 0;
}
.fxdiag-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 30px;
  border-top: 1px solid var(--fd-line);
  background: #101623f5;
  box-shadow: 0 -12px 25px #0a122212;
  flex: none;
}
.fxdiag-footer .fxdiag-button {
  min-width: 150px;
}
.fxdiag-footnote {
  font-size: 10px;
  color: #acbbd2;
  max-width: 310px;
  line-height: 1.5;
}
.fxdiag-error {
  color: #ffd5b7;
  background: #a2472626;
  border: 1px solid #b67b5140;
  border-radius: 11px;
  padding: 12px 15px;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 16px;
}
.fxdiag-hazards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.fxdiag-hazard {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 12px 14px;
  min-height: 56px;
  border: 1px solid #ffffff17;
  border-radius: 13px;
  background: #ffffff03;
  cursor: pointer;
  color: #ced8ea;
  font-size: 14px;
  line-height: 1.5;
}
.fxdiag-hazard:has(input:checked) {
  border-color: #ee9c66;
  background: #ff90440a;
  color: #ffe0c4;
}
.fxdiag-hazard input {
  accent-color: #ffa36e;
  width: 18px;
  height: 18px;
  margin: 0;
  flex: none;
}
.fxdiag-note {
  margin-top: 20px;
  border-radius: 12px;
  background: #202d44;
  padding: 15px 17px;
  font-size: 12px;
  color: #bac9df;
  line-height: 1.6;
}
.fxdiag-analyzing {
  padding: 45px 20px 50px;
  text-align: center;
}
.fxdiag-orbit {
  width: 83px;
  height: 83px;
  margin: 0 auto 28px;
  border: 1px solid #4c587350;
  border-radius: 25px;
  background: radial-gradient(circle, #fd9b6540, #c48cff09);
  display: grid;
  place-items: center;
  position: relative;
}
.fxdiag-orbit:after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid transparent;
  border-top-color: #ffab78;
  border-right-color: #8faef150;
  border-radius: 30px;
  animation: fxdiag-spin 3s linear infinite;
}
.fxdiag-orbit svg {
  width: 33px;
  height: 33px;
  stroke: #ffd1ad;
}
@keyframes fxdiag-spin {
  to {
    transform: rotate(360deg);
  }
}
.fxdiag-result-top {
  padding: 8px 0 24px;
  border: 0;
  background: transparent;
  margin-bottom: 8px;
}
.fxdiag-result-top h3 {
  font-size: clamp(28px, 4vw, 34px);
  font-weight: 650;
  line-height: 1.2;
  color: #f7f4fc;
  margin: 12px 0 8px;
  letter-spacing: -0.025em;
}
.fxdiag-result-top p {
  font-size: 14px;
  line-height: 1.65;
  color: #b8cbe0;
  margin: 0;
}
.fxdiag-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 20px;
  padding: 6px 10px;
  background: #ffffff08;
  border: 1px solid #ffffff19;
  font-size: 10px;
  color: #b0c1da;
  letter-spacing: 0.02em;
}
.fxdiag-tag.urgent {
  color: #ffd3a6;
  border-color: #dfab6b50;
  background: #ad651810;
}
.fxdiag-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.fxdiag-card {
  padding: 18px;
  border: 1px solid #ffffff10;
  border-radius: 14px;
  background: #ffffff03;
}
.fxdiag-card h3 {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a9bbd3;
  margin: 0 0 12px;
}
.fxdiag-card ul {
  margin: 0;
  padding-left: 17px;
  color: #d1dced;
  font-size: 13px;
  line-height: 1.7;
}
.fxdiag-card li + li {
  margin-top: 8px;
}
.fxdiag-source {
  display: block;
  font-size: 10px;
  color: #849bb9;
  margin-top: 2px;
}
.fxdiag-caution {
  border: 1px solid #ca845955;
  background: #a44d1915;
  padding: 20px;
  border-radius: 16px;
  color: #ffd8b9;
  margin-bottom: 16px;
  line-height: 1.7;
  font-size: 14px;
}
.fxdiag-caution h3 {
  color: #ffe6d1;
  margin: 0 0 10px;
  font-size: 17px;
}
.fxdiag-choice {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.fxdiag-choice label {
  border: 1px solid #52647d;
  border-radius: 11px;
  padding: 11px 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}
.fxdiag-choice label:has(input:checked) {
  border-color: #ffb281;
  background: #ff9c6912;
}
.fxdiag-choice input {
  accent-color: #ff9c69;
}
@media (max-width: 700px) {
  .fxdiag-section {
    padding: 32px 24px 40px;
  }
  .fxdiag-entry-content { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .fxdiag-signature h2 { font-size: 16px; }
  .fxdiag-signature h2 span { font-size: 30px; }
  .fxdiag-signature p.fxdiag-copy { font-size: 14px; line-height: 1.6; margin-top: 12px; }
  dialog.fxdiag-modal {
    position: fixed;
    inset: var(--fxdiag-panel-top, 0px) 0 auto;
    width: 100%;
    height: auto;
    max-height: var(--fxdiag-panel-height, 100dvh);
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  .fxdiag-shell {
    height: auto;
    max-height: var(--fxdiag-panel-height, 100dvh);
    min-height: 0;
    overflow: hidden;
  }
  .fxdiag-head {
    padding: 8px 20px;
    padding-top: max(5px, env(safe-area-inset-top));
  }
  .fxdiag-modal[data-site-header="true"] .fxdiag-head { padding-top: 8px; }
  .fxdiag-close {
    width: 44px;
    height: 44px;
  }
  .fxdiag-body {
    padding: 16px 20px 24px;
    scroll-padding-bottom: calc(12px + var(--fxdiag-actions-height, 88px));
    -webkit-overflow-scrolling: touch;
  }
  .fxdiag-field {
    scroll-margin-block: 12px;
  }
  .fxdiag-progress {
    gap: 6px;
    margin-bottom: 16px;
    font-size: 10px;
  }
  .fxdiag-progress li {
    gap: 5px;
  }
  .fxdiag-progress li:not(:last-child)::after {
    margin-left: 0;
  }
  .fxdiag-step-number {
    width: 20px;
    height: 20px;
    font-size: 8px;
  }
  .fxdiag-body h2 {
    font-size: 27px;
  }
  .fxdiag-intro {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
  }
  .fxdiag-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }
  .fxdiag-media-well {
    height: 124px;
  }
  .fxdiag-media-actions {
    margin-top: 8px;
  }
  .fxdiag-media-button {
    font-size: 11px;
    min-height: 44px;
  }
  .fxdiag-photo-status {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.5;
  }
  .fxdiag-photo-help {
    font-size: 11px;
    line-height: 1.5;
  }
  .fxdiag-photo-details {
    font-size: 12px;
  }
  .fxdiag-photo-details summary {
    font-size: 11px;
  }
  .fxdiag-field-help {
    font-size: 12px;
    line-height: 1.45;
    margin-top: 5px;
  }
  .fxdiag-privacy {
    font-size: 12px;
    line-height: 1.5;
  }
  .fxdiag-label,
  .fxdiag-label-row {
    font-size: 11px;
    margin-bottom: 7px;
  }
  .fxdiag-input {
    font-size: 16px; /* Prevent automatic input zoom in iOS Safari. */
    padding: 10px 12px;
  }
  textarea.fxdiag-input {
    min-height: 104px;
    height: 104px;
    max-height: 190px;
  }
  .fxdiag-field {
    margin-bottom: 11px;
  }
  #fxdiag-city {
    min-height: 44px;
    padding-block: 9px;
  }
  .fxdiag-outcome {
    display: none;
  }
  .fxdiag-consent-area {
    margin-top: 2px;
    padding-top: 10px;
  }
  .fxdiag-consent {
    font-size: 12px;
    min-height: 44px;
  }
  .fxdiag-consent-details {
    font-size: 12px;
    line-height: 1.5;
  }
  .fxdiag-consent-details summary {
    font-size: 11px;
    min-height: 36px;
    padding-top: 6px;
  }
  .fxdiag-disclaimer {
    font-size: 11px;
    margin-top: 6px;
  }
  .fxdiag-hazards {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .fxdiag-hazard {
    padding: 12px;
    font-size: 14px;
    min-height: 56px;
  }
  .fxdiag-footer {
    padding: 12px 20px;
    padding-bottom: calc(
      10px + var(--fxdiag-safe-bottom, env(safe-area-inset-bottom, 0px))
    );
    gap: 8px;
    flex-wrap: wrap;
  }
  .fxdiag-footer .fxdiag-button {
    flex: 1;
    min-width: 0;
    min-height: 48px;
    font-size: 12px;
  }
  .fxdiag-footer .fxdiag-button.quiet {
    flex: 0 0 auto;
  }
  .fxdiag-footnote {
    width: 100%;
    max-width: none;
    font-size: 10px;
    line-height: 1.3;
  }
  .fxdiag-cards {
    grid-template-columns: 1fr;
  }
  .fxdiag-analyzing {
    padding: 40px 8px;
  }
  .fxdiag-result-top { padding: 8px 0 24px; }
}
@media (max-width: 360px) {
  .fxdiag-body {
    padding-left: 16px;
    padding-right: 16px;
  }
  .fxdiag-progress {
    gap: 4px;
    font-size: 9px;
  }
  .fxdiag-progress li {
    gap: 3px;
  }
  .fxdiag-progress li:not(:last-child)::after {
    min-width: 3px;
  }
  .fxdiag-media-button {
    font-size: 10px;
  }
}
@media (max-height: 520px) and (max-width: 700px) {
  .fxdiag-head {
    padding-top: 2px;
    padding-bottom: 2px;
  }
  .fxdiag-footer {
    padding-top: 8px;
    padding-bottom: calc(
      8px + var(--fxdiag-safe-bottom, env(safe-area-inset-bottom, 0px))
    );
  }
  .fxdiag-footnote {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fxdiag-orbit:after {
    animation: none;
  }
  .fxdiag-section *,
  .fxdiag-modal * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Diagnostic qualification and canonical intervention confirmation. */
.fxdiag-modal .fxdiag-quick-answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}
.fxdiag-modal .fxdiag-quick-answer {
  min-height: 52px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  color: inherit;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.fxdiag-modal .fxdiag-quick-answer:hover,
.fxdiag-modal .fxdiag-quick-answer:active,
.fxdiag-modal .fxdiag-quick-answer[aria-pressed="true"] {
  background: linear-gradient(112deg, #c3542612, #c1347018 48%, #7443b71c);
  border-color: #c28aaf88;
}
.fxdiag-modal .fxdiag-quick-answer:focus-visible,
.fxdiag-modal .fxdiag-result-detail summary:focus-visible {
  outline: 2px solid #ffad79;
  outline-offset: 3px;
}
.fxdiag-modal .fxdiag-question-title {
  font-size: 20px;
  line-height: 1.4;
  margin: 12px 0;
}
.fxdiag-modal .fxdiag-result-level {
  color: #ffbd96;
  font-size: 14px;
  font-weight: 700;
}
.fxdiag-modal .fxdiag-result-detail {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.fxdiag-modal .fxdiag-result-detail summary {
  padding: 16px 2px;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
}
.fxdiag-modal .fxdiag-result-detail .fxdiag-card {
  background: transparent;
  border: 0;
  padding: 0 2px 16px;
}
.fxdiag-modal .fxdiag-result-detail .fxdiag-card h3 {
  display: none;
}
.fxdiag-modal .fxdiag-confirm-city {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0 24px;
  font-size: 14px;
}
.fxdiag-modal .fxdiag-lifecycle {
  list-style: none;
  padding: 8px 0;
  margin: 12px 0;
}
.fxdiag-modal .fxdiag-lifecycle li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  color: #aeb6c4;
  font-size: 14px;
}
.fxdiag-modal .fxdiag-lifecycle li > span {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
}
.fxdiag-modal .fxdiag-lifecycle li.done {
  color: #dcebe3;
}
.fxdiag-modal .fxdiag-lifecycle li.done > span {
  background: rgba(98, 198, 149, 0.15);
  color: #a0dfbc;
}
.fxdiag-modal .fxdiag-lifecycle li[aria-current="step"] {
  color: #ffd0b3;
}
.fxdiag-modal [hidden] {
  display: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .fxdiag-modal .fxdiag-quick-answer {
    transition: none;
  }
}


/* Guided input and result hierarchy; no decision or safety content changes. */
.fxdiag-city-field {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  align-items: center; gap: 12px;
}
.fxdiag-city-field .fxdiag-label { margin: 0; color: #aab4c7; font-size: 12px; }
.fxdiag-modal #fxdiag-city {
  min-width: 0; min-height: 44px; padding: 8px 10px;
  background: #ffffff03; border-color: #ffffff0f; border-radius: 12px;
}
.fxdiag-modal .fxdiag-field-help { color: #a1abc0; font-size: 12px; }
.fxdiag-modal .fxdiag-consent-details summary,
.fxdiag-modal .fxdiag-photo-details summary { min-height: 44px; display: list-item; padding-block: 12px; }
.fxdiag-modal .fxdiag-disclaimer { font-size: 11px; }
.fxdiag-modal[data-step="safety"] .fxdiag-note {
  border-left: 2px solid #e2aa74; background: #c9904812; color: #e1ccae;
}
.fxdiag-modal[data-step="questions"] #fxdiag-next {
  flex: 0 0 auto; min-width: 0; padding-inline: 16px;
  color: #d3ccdf; background: #ffffff06; border: 1px solid #ffffff17;
  box-shadow: none; font-weight: 550;
}
.fxdiag-result-top .fxdiag-tag {
  padding: 0; border: 0; border-radius: 0; background: none;
  color: #b7a9c4; font-size: 11px; line-height: 1.5;
}
.fxdiag-modal .fxdiag-result-detail summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  list-style: none; min-height: 56px;
}
.fxdiag-modal .fxdiag-result-detail summary::-webkit-details-marker { display: none; }
.fxdiag-modal .fxdiag-result-detail summary::after {
  content: ''; flex: 0 0 7px; width: 7px; height: 7px; margin-right: 4px;
  border-right: 1.5px solid #a8a1b8; border-bottom: 1.5px solid #a8a1b8;
  transform: rotate(45deg); transition: transform 200ms ease;
}
.fxdiag-modal .fxdiag-result-detail[open] summary::after { transform: rotate(225deg); }
.fxdiag-modal .fxdiag-result-detail[open] .fxdiag-card { animation: fxdiag-detail-enter 200ms ease-out; }
@keyframes fxdiag-detail-enter { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.fxdiag-modal .fxdiag-result-top, .fxdiag-modal .fxdiag-card { overflow-wrap: anywhere; }

/* Native opening, compact viewport and footer remain Diagnostic-only. */
dialog.fxdiag-modal[open] { animation: fxdiag-enter 220ms ease-out; }
dialog.fxdiag-modal[open]::backdrop { animation: fxdiag-backdrop-enter 200ms ease-out; }
@keyframes fxdiag-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fxdiag-backdrop-enter { from { opacity: 0; } to { opacity: 1; } }
.fxdiag-modal[data-compact-viewport="true"] .fxdiag-brand p { display: none; }
.fxdiag-modal[data-compact-viewport="true"] .fxdiag-head { padding-block: 2px; }
.fxdiag-modal[data-compact-viewport="true"] .fxdiag-footnote { display: none; }
.fxdiag-modal .fxdiag-footer .fxdiag-button > span[aria-hidden] { flex: none; }
@media (max-width: 350px) {
  .fxdiag-section { padding-inline: 16px; }
  .fxdiag-signature h2 span { font-size: 27px; }
  .fxdiag-head, .fxdiag-footer { padding-inline: 16px; }
  .fxdiag-footer .fxdiag-button { padding-inline: 12px; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  dialog.fxdiag-modal[open], dialog.fxdiag-modal[open]::backdrop,
  .fxdiag-modal * { animation: none !important; transition: none !important; }
  .fxdiag-button:not(:disabled):active { transform: none; }
}
