/* ASCEND site chrome — mirrors ascend2.space header/footer patterns (standalone tools) */

.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:root {
  /* Match ascend2.space main menu: white bar, black type, monochrome icons */
  --asc-header-bg: #ffffff;
  --asc-header-border: rgba(0, 0, 0, 0.08);
  --asc-text: #000000;
  --asc-muted: #5c5c5c;
  --asc-accent: #318fff;
  --asc-logo-font-size: 32px;
  --asc-logo-line-height: 1;
  --asc-logo-letter-spacing: 0.02em;
  --asc-header-height: 68px;
  --asc-header-pad-x: clamp(16px, 4vw, 40px);
  /* ascend2.space main nav link metrics */
  --asc-nav-font-size: 17px;
  --asc-nav-line-height: 17px;
  --asc-nav-letter-spacing: -0.34px;
  --asc-nav-font-weight: 600;
  --asc-nav-ease: cubic-bezier(0.25, 1, 0.33, 1);
  --asc-nav-duration: 0.45s;
  /* Nav pill padding / transition (ascend2.space computed) */
  --asc-nav-link-pad-y: 13.2222px;
  --asc-nav-link-pad-x: 23.8px;
  --asc-nav-link-transition-duration: 0.2s;
  --asc-nav-link-transition-timing: ease;
  --asc-icon-hit: 40px;
  --asc-icon-svg: 20px;
  --asc-drawer-bg: #ffffff;
  --asc-footer-bg: #000000;
}

/* --- Skip link --- */
.asc-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  padding: 12px 20px;
  background: var(--asc-accent);
  color: #fff;
  font-weight: 600;
  font-family: "Space Grotesk", system-ui, sans-serif;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}
.asc-skip:focus {
  left: 0;
  top: var(--asc-header-height);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Full-height column layout so the footer sits at the bottom (ascend2.space pattern) */
body.asc-has-chrome {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* --- Header (fixed: always reserves visual top band; main apps get margin-top below) --- */
.asc-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 10000;
  background: var(--asc-header-bg);
  border-bottom: 1px solid var(--asc-header-border);
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
}

/* Main fills space below fixed header */
body.asc-has-chrome #ascend-quiz-app,
body.asc-has-chrome #ascend-pathway-app {
  flex: 1 0 auto;
  margin-top: var(--asc-header-height);
}

html:has(body.asc-has-chrome) {
  scroll-padding-top: var(--asc-header-height);
}

.asc-header-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 var(--asc-header-pad-x);
  min-height: var(--asc-header-height);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: clamp(12px, 2vw, 32px);
}

.asc-logo {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  font-weight: 700;
  font-size: var(--asc-logo-font-size);
  line-height: var(--asc-logo-line-height);
  letter-spacing: var(--asc-logo-letter-spacing);
  text-transform: uppercase;
  color: var(--asc-text);
  text-decoration: none;
  flex-shrink: 0;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
.asc-logo:hover {
  opacity: 0.72;
}

.asc-nav {
  grid-column: 2;
  justify-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.asc-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0 4px;
}

.asc-nav-list > li {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}

/* Match ascend2.space: padding ~43px hit height, color 0.2s ease; grey hover / black = current */
.asc-nav-list .asc-nav-link {
  position: relative;
  z-index: 10;
  box-sizing: border-box;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  text-align: center;
  color: rgb(0, 0, 0);
  text-decoration: none;
  text-decoration-line: none;
  font-weight: var(--asc-nav-font-weight);
  font-size: var(--asc-nav-font-size);
  line-height: var(--asc-nav-line-height);
  letter-spacing: var(--asc-nav-letter-spacing);
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  font-feature-settings: normal;
  padding: var(--asc-nav-link-pad-y) var(--asc-nav-link-pad-x);
  border: none;
  outline: none;
  border-radius: 9999px;
  background: transparent;
  cursor: pointer;
  -webkit-font-smoothing: antialiased;
  transition:
    color var(--asc-nav-link-transition-duration) var(--asc-nav-link-transition-timing),
    background var(--asc-nav-link-transition-duration) var(--asc-nav-link-transition-timing);
  white-space: nowrap;
}
.asc-nav-list .asc-nav-link:hover {
  background: rgba(0, 0, 0, 0.07);
  color: rgb(0, 0, 0);
}
.asc-nav-list .asc-nav-link[aria-current="page"] {
  background: #000000;
  color: #ffffff;
}
.asc-nav-list .asc-nav-link[aria-current="page"]:hover {
  background: #1a1a1a;
  color: #ffffff;
}
.asc-nav-list .asc-nav-link:focus-visible {
  outline: 2px solid var(--asc-text);
  outline-offset: 2px;
}
.asc-nav-list .asc-nav-link[aria-current="page"]:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px #000000;
}

.asc-social-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.asc-header-tools {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  flex-shrink: 0;
}

.asc-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--asc-icon-hit);
  height: var(--asc-icon-hit);
  border: none;
  background: transparent;
  color: var(--asc-text);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
  flex-shrink: 0;
}
.asc-icon-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}
.asc-icon-btn svg {
  width: var(--asc-icon-svg);
  height: var(--asc-icon-svg);
}

a.asc-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--asc-icon-hit);
  height: var(--asc-icon-hit);
  color: var(--asc-text);
  border-radius: 8px;
  transition: background 0.15s ease, opacity 0.15s ease;
  flex-shrink: 0;
}
a.asc-social:hover {
  background: rgba(0, 0, 0, 0.06);
}
a.asc-social svg {
  width: calc(var(--asc-icon-svg) - 1px);
  height: calc(var(--asc-icon-svg) - 1px);
}

.asc-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: var(--asc-icon-hit);
  height: var(--asc-icon-hit);
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
}
.asc-nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--asc-text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
body.asc-mobile-open .asc-nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
body.asc-mobile-open .asc-nav-toggle span:nth-child(2) {
  opacity: 0;
}
body.asc-mobile-open .asc-nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Search overlay --- */
.asc-search-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.asc-search-open .asc-search-backdrop {
  opacity: 1;
  visibility: visible;
}

.asc-search-panel {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  background: #ffffff;
  border-bottom: 1px solid var(--asc-header-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  z-index: 10002;
  padding: 24px clamp(16px, 4vw, 40px) 28px;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}
.asc-search-open .asc-search-panel {
  transform: translateY(0);
}

.asc-search-panel form {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  align-items: center;
}
.asc-search-panel input[type="search"],
.asc-search-panel input[type="text"] {
  flex: 1;
  padding: 14px 18px;
  font-size: 16px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  font-family: inherit;
}
.asc-search-panel input:focus {
  outline: none;
  border-color: var(--asc-accent);
  box-shadow: 0 0 0 3px rgba(49, 143, 255, 0.2);
}

.asc-search-close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: none;
  background: #e8e8e8;
  border-radius: 8px;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: #333;
}
.asc-search-close:hover {
  background: #ddd;
}

/* --- Mobile drawer --- */
.asc-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 10003;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
body.asc-mobile-open .asc-drawer-backdrop {
  opacity: 1;
  visibility: visible;
}

.asc-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 88vw);
  height: 100%;
  background: var(--asc-drawer-bg);
  z-index: 10004;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 32px rgba(0, 0, 0, 0.12);
  border-left: 1px solid var(--asc-header-border);
}
body.asc-mobile-open .asc-drawer {
  transform: translateX(0);
}

.asc-drawer-header {
  display: flex;
  justify-content: flex-end;
  padding: 16px;
  border-bottom: 1px solid var(--asc-header-border);
}

.asc-drawer-close {
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  color: var(--asc-text);
  border-radius: 8px;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}
.asc-drawer-close:hover {
  background: rgba(0, 0, 0, 0.1);
}

.asc-drawer-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0 16px;
}
.asc-drawer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.asc-drawer-nav .asc-nav-link {
  display: block;
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 0 auto;
  padding: var(--asc-nav-link-pad-y) var(--asc-nav-link-pad-x);
  border-radius: 9999px;
  color: var(--asc-text);
  text-decoration: none;
  text-decoration-line: none;
  font-weight: var(--asc-nav-font-weight);
  font-size: var(--asc-nav-font-size);
  line-height: var(--asc-nav-line-height);
  letter-spacing: var(--asc-nav-letter-spacing);
  text-align: center;
  cursor: pointer;
  -webkit-font-smoothing: antialiased;
  transition:
    color var(--asc-nav-link-transition-duration) var(--asc-nav-link-transition-timing),
    background var(--asc-nav-link-transition-duration) var(--asc-nav-link-transition-timing);
}
.asc-drawer-nav .asc-nav-link:hover {
  background: rgba(0, 0, 0, 0.07);
}
.asc-drawer-nav .asc-nav-link[aria-current="page"] {
  background: #000000;
  color: #ffffff;
  font-weight: 600;
}
.asc-drawer-nav .asc-nav-link[aria-current="page"]:hover {
  background: #1a1a1a;
  color: #ffffff;
}
.asc-drawer-nav .asc-nav-link:focus-visible {
  outline: 2px solid var(--asc-text);
  outline-offset: 2px;
}
.asc-drawer-nav .asc-nav-link[aria-current="page"]:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px #000000;
}

.asc-drawer-social {
  display: flex;
  gap: 8px;
  padding: 20px 24px 28px;
  border-top: 1px solid var(--asc-header-border);
}
.asc-drawer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--asc-text);
  background: rgba(0, 0, 0, 0.06);
  border-radius: 8px;
}
.asc-drawer-social a:hover {
  background: rgba(0, 0, 0, 0.1);
}

@media (max-width: 999px) {
  .asc-header-inner {
    grid-template-columns: auto 1fr;
  }
  .asc-nav {
    display: none;
  }
  .asc-header-tools {
    grid-column: 2;
    justify-self: end;
  }
  .asc-header-tools .asc-social-wrap {
    display: none;
  }
  .asc-nav-toggle {
    display: flex;
  }
}

@media (min-width: 1000px) {
  .asc-drawer-backdrop,
  .asc-drawer {
    display: none !important;
  }
}

/* --- Footer (matches ascend2.space before-footer: black band, 6-2-2-2 columns) --- */
.asc-footer {
  flex-shrink: 0;
  background: var(--asc-footer-bg);
  color: #ffffff;
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.asc-footer-main {
  padding: clamp(48px, 10vw, 140px) clamp(16px, 6vw, 96px);
}

.asc-footer-inner {
  max-width: 1300px;
  margin: 0 auto;
}

.asc-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(36px, 6vw, 52px);
  align-items: start;
}

@media (min-width: 900px) {
  .asc-footer-grid {
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(20px, 3vw, 48px);
    row-gap: 0;
  }

  /* CAA column has no heading on the live site — nudge logo down to align with DfT block */
  .asc-footer-col--caa {
    padding-top: 2.75rem;
  }
}

.asc-footer-col {
  margin: 0;
  min-width: 0;
}

.asc-footer-title {
  margin: 0 0 clamp(16px, 2vw, 24px);
  font-size: clamp(1.85rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #ffffff;
}

/* Subscribe CTA: pill shape, ASCEND orange (matches quiz / ascend2.space apps) */
.asc-footer-subscribe {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65em;
  margin: 0 0 clamp(20px, 3vw, 28px);
  padding: 1em 2em;
  background: linear-gradient(
    135deg,
    var(--aq-orange, #ff6b3d) 0%,
    var(--aq-orange-dark, #e55a2d) 100%
  );
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.2;
  border-radius: 9999px;
  box-shadow: 0 4px 20px rgba(255, 107, 61, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.asc-footer-subscribe:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(255, 107, 61, 0.45);
  filter: brightness(1.05);
}
.asc-footer-subscribe svg {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  stroke: currentColor;
}

.asc-footer-copy {
  margin: 0;
  max-width: 36rem;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
}
.asc-footer-copy a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.asc-footer-copy a:hover {
  color: rgba(255, 255, 255, 0.85);
}

.asc-footer-kicker {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.72);
}

.asc-footer-logo-link {
  display: inline-block;
  line-height: 0;
  max-width: 100%;
}
.asc-footer-logo-link:hover .asc-footer-funder-img {
  opacity: 1;
}

.asc-footer-funder-img {
  display: block;
  height: auto;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  opacity: 0.95;
  transition: opacity 0.2s ease;
}

.asc-footer-funder-img--dft {
  max-height: 72px;
}

.asc-footer-funder-img--caa {
  max-height: 100px;
}

/* Underlined contact lines (nectar underline / h4 scale) */
.asc-footer-col--links .asc-footer-kicker {
  margin-bottom: 12px;
}

.asc-footer-inline-link {
  display: block;
  margin-top: 10px;
  width: fit-content;
  max-width: 100%;
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 600;
  line-height: 1.35;
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.asc-footer-inline-link:hover {
  color: #ffffff;
  opacity: 0.8;
}

/* Quiz: progress bar below site header when chrome present */
body.asc-has-chrome #ascend-quiz-app .aq-progress {
  top: var(--asc-header-height);
}

#ascend-quiz-app:focus-visible,
#ascend-pathway-app:focus-visible {
  outline: 2px solid var(--asc-accent);
  outline-offset: 4px;
}

/* Pathway mindmap full-bleed: keep below header */
body.asc-has-chrome #ascend-pathway-app #ap-mindmap-section.ap-section.ap-active {
  min-height: calc(100dvh - var(--asc-header-height));
  min-height: calc(100vh - var(--asc-header-height));
}
