/* The audit and the transition into the guide sit above its reading columns. */
.mf-guide[data-seo-guide] .mf-reading-layout {
  grid-template-areas: "intro intro" "widget widget" "continuation continuation" "content outline";
}
.mf-guide[data-seo-guide] :is(.mf-reading-intro, .mf-reading-continuation) {
  width: 100%;
  max-width: 76ch;
  justify-self: start;
}
.mf-guide[data-seo-guide] .mf-reading-intro .mf-editorial-intro { margin-bottom: clamp(20px, 3vw, 28px); }
.mf-guide[data-seo-guide] .mf-reading-continuation {
  grid-area: continuation;
  min-width: 0;
  margin: 0 0 clamp(28px, 4vw, 38px);
}
.mf-reading-continuation > p {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.85;
  text-wrap: pretty;
}

.sa-audit {
  --sa-accent: light-dark(#8b3c26, #ffc2a0);
  --sa-hero-title: light-dark(#341e19, #fff1e8);
  --sa-hero-muted: light-dark(#6a4c43, #d8bcb1);
  --sa-material-start: light-dark(#f5d9cc, #382421);
  --sa-material-end: light-dark(#fff5eb, #20191c);
  --sa-halo: light-dark(#fffaf0cc, #f197602e);
  --sa-edge: light-dark(#d9ad9a, #705043);
  --sa-field: light-dark(#fffaf7, #292024);
  --sa-field-edge: light-dark(#dbb7aa, #76554d);
  --sa-submit-start: light-dark(#a4482d, #ffc3a0);
  --sa-submit-end: light-dark(#7c321f, #ee996d);
  --sa-submit-text: light-dark(#fff9f4, #361c14);
  --sa-error: light-dark(#a42b47, #ff9aad);
  --sa-radius: clamp(17px, 2.7vw, 24px);
  grid-area: widget;
  min-width: 0;
  margin: 0 0 clamp(27px, 4vw, 43px);
  scroll-margin-block-start: var(--mf-anchor-offset, 112px);
}

.sa-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: clamp(285px, 33vw, 348px);
  padding: clamp(28px, 5vw, 54px) clamp(19px, 4.5vw, 44px);
  border: 1px solid var(--sa-edge);
  border-radius: var(--sa-radius);
  background:
    radial-gradient(ellipse 70% 95% at 18% -4%, var(--sa-halo), transparent 80%),
    linear-gradient(132deg, var(--sa-material-start), var(--sa-material-end));
  color: var(--sa-hero-title);
  box-shadow: 0 14px 38px light-dark(#7a3b2011, #0003), inset 0 1px 0 #ffffff18;
}

/* Use the simulator’s particle tracks with the audit’s copper colors. */
.sa-hero > .mv-preview-dust {
  --rp-dust-purple: light-dark(#b8614294, #ffd3ae9e);
  --rp-dust-pink: light-dark(#c276678e, #f1a799a1);
  --rp-dust-cyan: light-dark(#b883658e, #ffc7a2a1);
  --rp-dust-orange: light-dark(#ba6b4294, #ffad779e);
  --rp-dust-green: light-dark(#9b694491, #edb885a1);
  --rp-dust-far-opacity: .72;
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
}
.sa-mark {
  display: block;
  width: clamp(35px, 5vw, 46px);
  height: auto;
  margin: 0 auto 13px;
  color: var(--sa-accent);
  filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--sa-accent) 24%, transparent));
}
.sa-mark svg { display: block; width: 100%; height: auto; }
.sa-heading { min-width: 0; margin: 0 0 21px; text-align: center; }
.sa-heading h2 {
  margin: 0;
  color: var(--sa-hero-title);
  font-size: clamp(29px, 4.2vw, 46px);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.sa-heading p {
  max-width: 49ch;
  margin: 9px auto 0;
  color: var(--sa-hero-muted);
  font-size: 15px;
  line-height: 1.65;
  text-wrap: pretty;
}
.sa-form {
  width: min(100%, 610px);
  min-width: 0;
}
.sa-form > label {
  display: block;
  margin: 0 0 7px;
  color: var(--sa-hero-title);
  font-size: 13px;
  font-weight: 660;
}
.sa-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 9px;
}
.sa-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 54px;
  padding: 0 15px;
  border: 1px solid var(--sa-field-edge);
  border-radius: 13px;
  background: var(--sa-field);
  box-shadow: 0 4px 16px light-dark(#6e301a12, #1009083f), inset 0 1px 0 #ffffff26;
}
.sa-field:focus-within {
  border-color: var(--sa-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sa-accent) 20%, transparent);
}
.sa-field:has([aria-invalid="true"]) { border-color: var(--sa-error); }
.sa-field svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: var(--sa-accent);
}
.sa-field input {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  margin: 0;
  padding: 0;
  appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--sa-hero-title);
  font: inherit;
  font-size: 16px;
  text-overflow: ellipsis;
}
.sa-field input::placeholder { color: var(--sa-hero-muted); }
.sa-audit .sa-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 54px;
  padding: 10px 19px;
  border: 1px solid color-mix(in srgb, var(--sa-submit-end) 77%, var(--sa-edge));
  border-radius: 13px;
  background: linear-gradient(135deg, var(--sa-submit-start), var(--sa-submit-end));
  box-shadow: 0 6px 17px light-dark(#81311d35, #08050473), inset 0 1px 0 #ffffff3c;
  color: var(--sa-submit-text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
}
.sa-audit .sa-submit:hover:not(:disabled) {
  box-shadow: 0 8px 20px light-dark(#81311d49, #08050498), inset 0 1px 0 #ffffff52;
}
.sa-audit .sa-submit:active:not(:disabled) { transform: translateY(1px); }
.sa-audit .sa-submit:disabled { opacity: .72; box-shadow: none; cursor: default; }
.sa-submit svg { width: 16px; height: 16px; flex: 0 0 16px; }
.sa-audit .sa-submit:focus-visible {
  outline: 2px solid var(--sa-accent);
  outline-offset: 3px;
}
.sa-status {
  width: min(100%, 610px);
  margin: 10px 0 0;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, currentColor 19%, transparent);
  border-radius: 8px;
  background: var(--sa-field);
  color: var(--sa-hero-muted);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.sa-status:empty {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}
.sa-status[data-sa-status] { color: var(--sa-error); }
@media (prefers-reduced-motion: no-preference) {
  .sa-field, .sa-submit { transition: border-color .2s ease, box-shadow .2s ease, opacity .2s ease; }
}

@media (max-width: 470px) {
  .sa-entry { grid-template-columns: minmax(0, 1fr); }
  .sa-hero { min-height: 0; }
  .sa-heading { margin-bottom: 17px; }
}
@media (forced-colors: active) {
  .sa-hero > .mv-preview-dust { display: none; }
  .sa-field:focus-within { outline: 2px solid Highlight; outline-offset: 2px; }
}
