/* Applied in the document head only on the Run 7 polish routes. */
body[data-r7-page] {
  --r7-space-1: .25rem;
  --r7-space-2: .5rem;
  --r7-space-3: .75rem;
  --r7-space-4: 1rem;
  --r7-space-5: 1.5rem;
  --r7-space-6: 2rem;
  --r7-ink: #f6f2ea;
  --r7-muted: #c6c1b8;
  --r7-accent: #f2ae72;
  --r7-line: #504c46;
  --r7-panel: #18191a;
  --r7-surface: #101112;
  --r7-radius: .75rem;
  --r7-gutter: clamp(1rem, 3vw, 2rem);
  --r7-width: 72rem;
  --r7-section: clamp(2.5rem, 5vw, 4.5rem);
  color-scheme: dark;
}

/* The server header and the two published footer structures share an edge. */
html:root body[data-r7-page] header.sticky {
  background: #0d0e0f !important;
  border-color: #333432 !important;
}
body[data-r7-page] header.sticky > div:first-child,
body[data-r7-page] footer.border-t > div,
body[data-r7-page] footer.fy-footer .fy-footer__inner {
  width: 100%; max-width: var(--r7-width); margin-inline: auto;
  box-sizing: border-box; padding-inline: var(--r7-gutter);
}
body[data-r7-page] header.sticky > div:first-child { height: 4rem; }
body[data-r7-page] header.sticky :is(summary, a) { min-width: 44px; min-height: 44px; align-items: center; }
body[data-r7-page] header.sticky a { display: inline-flex; }
html:root:root:root body[data-r7-page] header.sticky nav a,
html:root:root:root body[data-r7-page] header.sticky a[href="/topup/"] {
  color: var(--r7-ink) !important;
}
html:root:root:root body[data-r7-page] header.sticky a:is([href="/account"],[href="/account/"]):not(nav a) {
  background: #302e2a !important; color: var(--r7-ink) !important;
  border: 1px solid #676056; border-radius: 999px; padding-inline: 1rem;
}
html:root:root:root body[data-r7-page] header.sticky a:is([href="/account"],[href="/account/"]):not(nav a) * {
  color: inherit !important;
}
html:root:root:root body[data-r7-page] #mobile-navigation { background: var(--r7-surface) !important; }
body[data-r7-page] #mobile-navigation nav a { display: flex; min-height: 44px; padding-inline: .5rem; }
html:root:root:root body[data-r7-page] :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible {
  outline: 3px solid #ffbf86 !important; outline-offset: 2px !important;
  scroll-margin-block: 5rem 1rem;
}
body[data-r7-page] footer { background: #101112; border-top: 1px solid #333432; }
body[data-r7-page] footer nav > :is(p,h2,h3),
body[data-r7-page] footer .fy-footer__col > :first-child {
  color: var(--r7-muted); line-height: 1.5; letter-spacing: .1em;
}
html:root:root:root body[data-r7-page] footer :is(nav a,.fx-foot-end a,a[href^="mailto:"]) {
  display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; color: var(--r7-ink) !important;
  text-underline-offset: .2em;
}
body[data-r7-page] footer.border-t nav li { margin-block: 0 !important; }
body[data-r7-page] footer.border-t > .grid { gap: var(--r7-space-6); padding-block: var(--r7-section); }

/* The existing home illustration keeps its reserved aspect ratio. */
body[data-r7-page="home"] #home-quote-entry,
body[data-r7-page="home"] #home-render-path,
body[data-r7-page="home"] #home-proof {
  width: min(calc(100% - 2 * var(--r7-gutter)), calc(var(--r7-width) - 2 * var(--r7-gutter)));
}
body[data-r7-page="home"] #home-quote-entry {
  gap: clamp(1.5rem, 4vw, 3.75rem); padding-block: var(--r7-section);
}
body[data-r7-page="home"] #home-title {
  max-width: 13ch; margin-block: .65rem 1.1rem; font-size: clamp(2.75rem, 5.6vw, 5.125rem);
  line-height: 1.025; letter-spacing: -.05em;
}
body[data-r7-page="home"] #home-quote-entry figure { margin: 0; }
/* Reserve both wrapped status lines and the email link’s 44px hit area before the runtime status resolves. */
body[data-r7-page="home"] #home-quote-entry > div > p[aria-live="polite"] { min-block-size: calc(2lh + 44px); }
body[data-r7-page="home"] #home-quote-entry picture,
body[data-r7-page="home"] #home-proof { border-radius: var(--r7-radius); border-color: var(--r7-line); }
body[data-r7-page="home"] #home-quote-entry .r10-cta-wrap { gap: .5rem .75rem; }
body[data-r7-page="home"] #home-quote-entry .r10-cta-wrap a { padding-inline: 1rem; min-height: 48px; }
body[data-r7-page="home"] #home-render-path ol { gap: clamp(1rem, 2.5vw, 2rem); }
body[data-r7-page="home"] #main-content > section.mx-auto {
  max-width: var(--r7-width); padding: var(--r7-section) var(--r7-gutter);
}
body[data-r7-page="home"] #main-content article.rounded-2xl {
  padding: clamp(1.15rem, 2vw, 1.65rem); border-color: var(--r7-line);
  border-radius: var(--r7-radius); background: var(--r7-panel);
}
body[data-r7-page="home"] #main-content article a,
body[data-r7-page="home"] #home-quote-entry figcaption a {
  display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: .2em;
}

/* Legal navigation and reading measure. */
body:is([data-r7-page="terms"],[data-r7-page="files"]) #main-content > .grid {
  max-width: var(--r7-width); padding: var(--r7-section) var(--r7-gutter);
  gap: clamp(1.5rem, 5vw, 4.5rem); align-items: start;
}
body:is([data-r7-page="terms"],[data-r7-page="files"]) #main-content aside {
  padding: 1rem; border: 1px solid var(--r7-line); border-radius: var(--r7-radius); background: var(--r7-surface);
}
body:is([data-r7-page="terms"],[data-r7-page="files"]) #main-content aside nav { gap: .125rem; }
body:is([data-r7-page="terms"],[data-r7-page="files"]) #main-content aside nav a {
  display: flex; align-items: center; min-height: 44px; padding-inline: .7rem;
  border-radius: .4rem; color: var(--r7-ink) !important;
}
body:is([data-r7-page="terms"],[data-r7-page="files"]) #main-content aside nav a:is([aria-current="page"],:hover) {
  background: #30302d; text-decoration: underline; text-underline-offset: .2em;
}
body:is([data-r7-page="terms"],[data-r7-page="files"]) #main-content .prose {
  width: 100%; max-width: 71ch; color: var(--r7-ink); font-size: 1rem; line-height: 1.67;
}
body:is([data-r7-page="terms"],[data-r7-page="files"]) #main-content .prose h1,
body:is([data-r7-page="signup"],[data-r7-page="signin"]) #main-content h1,
body[data-r7-page="showcase"] #showcase-title {
  max-width: 23ch; margin-block: .4rem 1rem; color: var(--r7-ink) !important;
  font-size: clamp(2.25rem, 4.45vw, 3.8rem); font-weight: 550; line-height: 1.07;
  letter-spacing: -.045em; text-wrap: balance;
}
body:is([data-r7-page="terms"],[data-r7-page="files"]) #main-content .prose h2,
body[data-r7-page="showcase"] #main-content .legal-section h2 {
  margin-block: 2rem .65rem; color: var(--r7-ink); font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  line-height: 1.2; letter-spacing: -.023em; scroll-margin-top: 5rem;
}
body:is([data-r7-page="terms"],[data-r7-page="files"]) #main-content .prose :is(p,li) { color: var(--r7-muted); }

/* Inline resource links keep a full hit area at either viewport width. */
body:is([data-r7-page="terms"],[data-r7-page="files"]) #main-content .prose a,
body[data-r7-page="showcase"] #main-content .legal-section p a,
body[data-r7-page="home"] #main-content :is(p,li,figcaption) a {
  display: inline-flex; align-items: center; vertical-align: middle;
  min-width: 44px; min-height: 44px; padding-block: 0; margin-block: 0;
  text-underline-offset: .2em;
}

/* Account entry pages retain their Google and secondary links. */
body:is([data-r7-page="signup"],[data-r7-page="signin"]) #main-content {
  padding: var(--r7-section) var(--r7-gutter);
}
body:is([data-r7-page="signup"],[data-r7-page="signin"]) #main-content > div {
  max-width: 47rem; margin-inline: auto; padding: clamp(1.25rem, 4vw, 3rem);
  background: var(--r7-panel); border: 1px solid var(--r7-line); border-radius: var(--r7-radius);
}
body:is([data-r7-page="signup"],[data-r7-page="signin"]) #main-content p {
  max-width: 60ch; line-height: 1.6; color: var(--r7-muted);
}
body:is([data-r7-page="signup"],[data-r7-page="signin"]) #main-content .flex {
  gap: .75rem; margin-block: 1.5rem;
}
body:is([data-r7-page="signup"],[data-r7-page="signin"]) #main-content .flex a {
  justify-content: center; min-height: 48px; padding-inline: 1.125rem;
  border: 1px solid var(--r7-line); border-radius: .5rem;
  color: var(--r7-ink) !important; background: #292a29 !important; font-weight: 600;
}
body:is([data-r7-page="signup"],[data-r7-page="signin"]) #main-content .flex a:first-child {
  color: #191610 !important; background: var(--r7-accent) !important; border-color: var(--r7-accent);
}

/* Showcase sections and the existing submission form. */
body[data-r7-page="showcase"] #main-content.showcase-page { padding-top: 0 !important; }
body[data-r7-page="showcase"] #main-content .showcase-simple {
  width: 100%; max-width: 55rem; padding: var(--r7-section) var(--r7-gutter); margin-inline: auto;
}
body[data-r7-page="showcase"] #main-content .showcase-simple-head { margin-bottom: 2rem; }
body[data-r7-page="showcase"] #main-content .legal-section {
  padding-block: clamp(1.25rem, 2.5vw, 2rem); border-top: 1px solid var(--r7-line);
}
body[data-r7-page="showcase"] #main-content .legal-section h2 { margin-top: 0; }
body[data-r7-page="showcase"] #main-content :is(.legal-section,.showcase-simple-head) p {
  max-width: 67ch; color: var(--r7-muted); line-height: 1.6;
}
body[data-r7-page="showcase"] #main-content .showcase-form {
  padding: clamp(1rem, 2.5vw, 2rem); background: var(--r7-panel);
  border: 1px solid var(--r7-line); border-radius: var(--r7-radius);
}
body[data-r7-page="showcase"] #main-content .showcase-fields { display: grid; gap: 1.25rem; }
body[data-r7-page="showcase"] #main-content .showcase-fields label { display: grid; gap: .5rem; color: var(--r7-ink) !important; }
body[data-r7-page="showcase"] #main-content .showcase-fields :is(input:not([type="checkbox"]),select,textarea) {
  min-width: 0; width: 100%; min-height: 48px; padding: .65rem .8rem; font: inherit;
  border: 1px solid #80796f; border-radius: .5rem; color: var(--r7-ink) !important; background: var(--r7-surface) !important;
}
body[data-r7-page="showcase"] #main-content .showcase-fields input::placeholder { color: #aaa398; opacity: 1; }
body[data-r7-page="showcase"] #main-content .showcase-check {
  grid-template-columns: 44px minmax(0,1fr); align-items: center; gap: .75rem; min-height: 44px; cursor: pointer;
}
body[data-r7-page="showcase"] #main-content .showcase-check input {
  appearance: none; display: grid; place-content: center; cursor: pointer;
  width: 44px !important; height: 44px !important; margin: 0; padding: 0;
  border: 0; background: transparent; color: var(--r7-ink);
}
body[data-r7-page="showcase"] #main-content .showcase-check input::before {
  content: ""; grid-area: 1 / 1; width: 1.25rem; height: 1.25rem;
  border: 2px solid #a59e92; border-radius: 4px;
}
body[data-r7-page="showcase"] #main-content .showcase-check input:checked::before {
  background: var(--r7-accent); border-color: var(--r7-accent);
}
body[data-r7-page="showcase"] #main-content .showcase-check input:checked::after {
  content: ""; grid-area: 1 / 1; place-self: center; width: .4rem; height: .7rem;
  border: solid #17140f; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg);
}
body[data-r7-page="showcase"] #main-content .showcase-submit {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-top: 1.25rem;
}
body[data-r7-page="showcase"] #main-content .showcase-submit a {
  display: inline-flex; align-items: center; min-height: 48px; padding-inline: 1.125rem; border-radius: .5rem;
  color: #191610 !important; background: var(--r7-accent) !important;
}
body[data-r7-page="showcase"] #main-content .showcase-submit a[aria-disabled="true"] {
  opacity: 1 !important; color: #d2ccc1 !important; background: #323332 !important; border: 1px dashed #787367;
}

@media (min-width: 1024px) {
  /* Reserve the same desktop slot for the account link and the resolved identity. */
  body[data-r7-page] header.sticky .ml-auto > a:is([href="/account"],[href="/account/"]) {
    box-sizing: border-box; flex: none; width: 17.5rem; max-width: 17.5rem;
    justify-content: center; white-space: nowrap;
  }
  body:is([data-r7-page="terms"],[data-r7-page="files"]) #main-content > .grid {
    grid-template-columns: minmax(12rem, 15rem) minmax(0,1fr);
  }
}
/* At phone widths where the labels fit, keep Run 4’s two actions on one row. */
@media (min-width: 360px) and (max-width: 767px) {
  body[data-r7-page="home"] #home-quote-entry .r10-cta-wrap {
    display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: .5rem;
  }
  body[data-r7-page="home"] #home-quote-entry #home-primary { min-width: 0; padding-inline: .65rem; }
  body[data-r7-page="home"] #home-quote-entry #home-returns { padding-inline: .4rem; }
}
@media (max-width: 767px) {
  body[data-r7-page] footer.border-t > div.grid {
    grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.5rem .875rem;
  }
  body[data-r7-page="home"] #home-quote-entry { padding-block: 2rem; gap: 1.25rem; }
  body[data-r7-page="home"] #home-render-path ol { gap: 1rem; }
  body:is([data-r7-page="terms"],[data-r7-page="files"]) #main-content aside nav {
    display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .4rem;
  }
  body:is([data-r7-page="terms"],[data-r7-page="files"]) #main-content aside nav a {
    justify-content: center; min-width: 0; padding: .4rem; border: 1px solid var(--r7-line);
    font-size: .875rem; text-align: center; line-height: 1.3;
  }
  body:is([data-r7-page="signup"],[data-r7-page="signin"]) #main-content .flex {
    display: grid; grid-template-columns: 1fr;
  }
  body[data-r7-page="showcase"] #main-content .showcase-fields { grid-template-columns: 1fr; gap: 1rem; }
}
@media (forced-colors: active) {
  body[data-r7-page="showcase"] #main-content .showcase-check input { appearance: auto; }
  body[data-r7-page="showcase"] #main-content .showcase-check input::before,
  body[data-r7-page="showcase"] #main-content .showcase-check input::after { content: none; }
  html:root:root:root body[data-r7-page] :focus-visible { outline-color: Highlight !important; }
}
