/* SUSA page layouts, independent of CDK's tool-specific styles. */
.md-typeset ol.susa-setup-steps {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .7rem;
  margin: 1.5rem 0;
  padding: 0 !important;
  list-style: none;
}
.md-typeset .susa-setup-steps li {
  position: relative;
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 4.1rem;
  margin: 0;
  padding: .8rem .9rem;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--md-accent-fg-color) 30%, var(--md-default-fg-color--lightest));
  border-radius: .75rem;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--md-accent-fg-color) 12%, var(--md-default-bg-color)),
    color-mix(in srgb, var(--md-code-bg-color) 82%, var(--md-default-bg-color)));
  box-shadow: 0 .45rem 1rem color-mix(in srgb, var(--md-accent-fg-color) 9%, transparent);
}
.md-typeset .susa-setup-steps li::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--md-accent-fg-color), #6fc7ff);
}
.md-typeset .susa-setup-steps li::after {
  content: "";
  position: absolute;
  right: -.9rem;
  bottom: -.9rem;
  width: 3.2rem;
  height: 3.2rem;
  border: 1px solid color-mix(in srgb, var(--md-accent-fg-color) 18%, transparent);
  border-radius: 50%;
}
.susa-setup-steps b {
  display: inline-flex;
  width: 2.15rem;
  height: 2.15rem;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: .6rem;
  color: #fff;
  background: linear-gradient(145deg, var(--md-accent-fg-color), #1269b0);
  box-shadow: 0 .35rem .8rem color-mix(in srgb, var(--md-accent-fg-color) 28%, transparent);
  font-size: .78rem;
}
.susa-setup-steps span {
  position: relative;
  z-index: 1;
  font-size: .88rem;
  font-weight: 750;
  letter-spacing: .01em;
}
.md-typeset .susa-setup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 1rem 1.5rem;
}
.md-typeset .susa-setup-card {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  min-width: 0;
  padding: 1.15rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: .65rem;
  color: var(--md-default-fg-color);
  background: var(--md-default-bg-color);
  text-decoration: none;
}
.susa-setup-card > * { display: block; }
.susa-setup-card__number { color: var(--md-accent-fg-color); font-weight: 700; }
.susa-setup-card > strong { font-size: 1rem; line-height: 1.3; }
.susa-setup-card > em { color: var(--md-default-fg-color--light); font-style: normal; }
.susa-setup-card > small { margin-top: auto; padding-top: .3rem; color: var(--md-accent-fg-color); }
.susa-setup-card:is(:hover, :focus-visible) { border-color: var(--md-accent-fg-color); }
.susa-setup-card:focus-visible,
.susa-toolkit-groups:focus-visible,
.susa-toolkit-controls button:focus-visible { outline: 2px solid var(--md-accent-fg-color); outline-offset: 3px; }
.susa-setup-next { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-block: 1.5rem; }
.susa-setup-next a { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* Learning-path choices are decisions, so keep their labels visually strong. */
.md-landing .md-path-picker__question button {
  font-weight: 750;
}

.susa-toolkit-controls { display: flex; align-items: center; gap: .5rem; margin-block: 1rem .6rem; }
.susa-toolkit-controls > span { flex: 1; color: #9ac8ed; font-size: .75rem; }
.susa-toolkit-controls button {
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #4986b5;
  border-radius: 50%;
  background: #071e31;
  color: #badeff;
  font-size: 1.1rem;
  cursor: pointer;
}
.susa-toolkit-controls button:disabled { opacity: .4; cursor: default; }
body.cdk-home-page .susa-toolkit-groups {
  display: flex;
  gap: 1rem;
  max-width: 100%;
  overflow-x: auto;
  padding-block: .25rem .85rem;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: #4b9fff #071e31;
}
body.cdk-home-page .susa-toolkit-group {
  box-sizing: border-box;
  flex: 0 0 calc((100% - 2rem) / 3);
  scroll-snap-align: start;
  grid-column: auto;
}
@media (max-width: 1088px) {
  body.cdk-home-page .susa-toolkit-group { flex-basis: calc((100% - 1rem) / 2); }
}
@media (max-width: 600px) {
  .md-typeset .susa-setup-grid { grid-template-columns: minmax(0, 1fr); }
  .md-typeset ol.susa-setup-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
  .md-typeset .susa-setup-steps li {
    min-height: 3.55rem;
    gap: .5rem;
    padding: .65rem .55rem;
  }
  .md-typeset .susa-setup-steps b {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: .5rem;
    font-size: .68rem;
  }
  .md-typeset .susa-setup-steps span {
    white-space: nowrap;
    overflow-wrap: normal;
    font-size: .72rem;
  }
  .md-typeset .susa-setup-card { padding: 1rem; }
  body.cdk-home-page .susa-toolkit-group { flex-basis: 88%; padding: 1.1rem; }
  .susa-toolkit-controls { flex-wrap: wrap; }
  .susa-toolkit-controls > span { flex-basis: calc(100% - 7rem); }
}

/* Longer About text needs its own space, including with reduced motion. */
.md-project-terms-landing .md-hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding-right: 0;
}
.md-project-terms-landing .md-hero-facts > span {
  display: grid;
  align-content: start;
  gap: .2rem;
  min-width: 0;
}
.md-project-terms-landing .md-hero-facts strong {
  white-space: nowrap;
  font-size: clamp(.95rem, 2vw, 1.35rem);
}
@media (max-width: 420px) {
  .md-project-terms-landing .md-hero-facts { grid-template-columns: 1fr; gap: .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  .cdk-hero__about {
    position: relative;
    inset: auto;
    width: min(52rem, 100%);
    margin-inline: auto;
    padding: 2rem 1.25rem;
    transform: none !important;
  }
}

/* Homepage polish shared across desktop, tablet and phone. */
body.cdk-home-page .cdk-home-intro .cdk-hero {
  background-color: transparent;
}
body.cdk-home-page .cdk-hero__logo {
  opacity: .84;
}
body.cdk-home-page .cdk-signal-icon svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.cdk-home-page .cdk-project-offerings .cdk-signal-icon {
  margin-right: 0;
}

/* Tablets show the practical guides in a compact, swipeable row. */
@media screen and (min-width: 601px) and (max-width: 1088px) {
  body.cdk-home-page .cdk-starting-grid {
    display: flex;
    align-items: stretch;
    gap: .8rem;
    overflow-x: auto;
    padding-bottom: .75rem;
    scroll-padding-inline: .1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }
  body.cdk-home-page .cdk-starting-grid > .cdk-lab-card {
    flex: 0 0 min(68vw, 19rem);
    scroll-snap-align: start;
  }
}

/* Phone hero alignment and swipeable workflow cards. */
@media screen and (max-width: 600px) {
  body.cdk-home-page .cdk-hero__logo {
    width: min(75vw, 17rem);
  }
  body.cdk-home-page .cdk-hero__content > p {
    width: var(--cdk-hero-action-width);
    max-width: var(--cdk-hero-action-width);
    margin-inline: auto;
  }
  body.cdk-home-page .cdk-project-coverage .cdk-project-signals {
    display: flex;
    align-items: stretch;
    gap: .7rem;
    overflow-x: auto;
    padding: 0 0 .7rem;
    scroll-padding-inline: .1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }
  body.cdk-home-page .cdk-project-coverage .cdk-project-signals > div {
    box-sizing: border-box;
    flex: 0 0 88%;
    scroll-snap-align: start;
  }
}

/* Shared chevron controls for every homepage row that can scroll sideways. */
body.cdk-home-page .susa-scroll-controls {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-block: 1rem .65rem;
}
body.cdk-home-page .susa-scroll-controls[hidden] { display: none; }
body.cdk-home-page .susa-scroll-controls > span {
  flex: 1;
  color: #9ac8ed;
  font-size: .72rem;
}
body.cdk-home-page .susa-scroll-controls button {
  display: inline-flex;
  width: 2.45rem;
  height: 2.45rem;
  flex: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #4986b5;
  border-radius: 50%;
  color: #badeff;
  background: #071e31;
  cursor: pointer;
}
body.cdk-home-page .susa-scroll-controls button:is(:hover, :focus-visible) {
  border-color: #6bb8f2;
  background: #0a2b47;
}
body.cdk-home-page .susa-scroll-controls button:disabled {
  opacity: .38;
  cursor: default;
}
body.cdk-home-page .susa-scroll-controls svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Use one continuous scale from compact landscape layouts through desktop. */
@media screen and (min-width: 705px) and (orientation: landscape) {
  body.cdk-home-page .cdk-hero__logo {
    width: clamp(14rem, calc(20vw + 7.5rem), 33rem);
  }
}
@media screen and (min-width: 601px) and (max-width: 1088px) and (orientation: portrait) {
  body.cdk-home-page .cdk-hero__logo {
    width: min(58vw, 40svh, 25rem);
  }
}

/* The shared video layer spans both hero panels on phones. */
@media screen and (max-width: 704px) {
  body.cdk-home-page .cdk-home-intro__sticky {
    isolation: isolate;
    background: #000;
  }
  body.cdk-home-page .cdk-hero__bg {
    position: sticky;
    top: 0;
    inset-inline: 0;
    z-index: -2;
    width: 100%;
    height: 100svh;
    margin-bottom: -100svh;
    overflow: hidden;
    filter: brightness(.58) !important;
    transform: none !important;
  }
  body.cdk-home-page .cdk-hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100svh;
    object-fit: cover;
    opacity: .5;
  }
  body.cdk-home-page .cdk-hero__shade {
    position: sticky;
    top: 0;
    inset-inline: 0;
    z-index: -1;
    width: 100%;
    height: 100svh;
    margin-bottom: -100svh;
    background: linear-gradient(to bottom,
      rgba(0, 8, 30, .12),
      rgba(0, 5, 20, .48) 48%,
      rgba(0, 0, 0, .7) 100%);
  }
  body.cdk-home-page .cdk-home-intro .cdk-hero,
  body.cdk-home-page .cdk-hero__about {
    background: transparent;
  }
  body.cdk-home-page .cdk-hero__about {
    text-shadow: 0 2px 10px #000;
  }
}

/* Scale the practical-guide card type with narrow phone viewports. */
@media screen and (max-width: 600px) {
  body.cdk-home-page .cdk-lab-card .cdk-tag,
  body.cdk-home-page .cdk-lab-card__level {
    font-size: clamp(.54rem, 2.55vw, .62rem);
    line-height: 1.3;
  }
  body.cdk-home-page .cdk-lab-card h3 {
    font-size: clamp(.86rem, 4.1vw, .98rem);
  }
  body.cdk-home-page .cdk-lab-card > p,
  body.cdk-home-page .cdk-lab-card > .cdk-lab-outcome {
    font-size: clamp(.64rem, 3vw, .72rem);
    line-height: 1.45;
  }
  body.cdk-home-page .cdk-lab-meta > span,
  body.cdk-home-page .cdk-lab-button {
    font-size: clamp(.58rem, 2.7vw, .66rem);
  }
  body.cdk-home-page .susa-scroll-controls > span {
    font-size: .64rem;
  }
}
