/* Mobile layout; shared brand tokens and components live in home-design.css. */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 84px;
  }

  body.page-home {
    --gutter-left: max(18px, env(safe-area-inset-left, 0px));
    --gutter-right: max(18px, env(safe-area-inset-right, 0px));
    color: #26384a;
    background: var(--paper);
    font-size: 14px;
    line-height: 1.85;
  }

  .page-home .wrap {
    padding-left: var(--gutter-left);
    padding-right: var(--gutter-right);
  }

  .page-home .header {
    background: rgb(252 252 250 / 96%);
    border-bottom: 1px solid rgb(223 231 239 / 70%);
    backdrop-filter: blur(12px);
  }

  .page-home .header.is-scrolled {
    box-shadow: 0 4px 18px rgb(24 59 91 / 5%);
  }

  .page-home .header-inner {
    min-height: 64px;
    gap: 16px;
  }

  .page-home .brand {
    min-height: 44px;
    padding: 0;
    border-radius: 0;
  }

  .page-home .brand img {
    width: 104px;
    height: auto;
  }

  .page-home .login-link {
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: 24px;
    color: var(--ink);
    background: #f7fafd;
    font-size: 12px;
    font-weight: 500;
  }

  .page-home .login-link span {
    margin-left: 0;
    font-size: 15px;
  }

  .page-home .hero {
    padding: 30px 0 0;
    background: var(--paper);
    isolation: isolate;
  }

  .page-home .hero::before,
  .page-home .hero::after {
    content: none;
  }

  .page-home .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .page-home .hero-copy {
    position: relative;
    z-index: 2;
    max-width: none;
    padding-bottom: 28px;
  }

  .page-home .eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--blue);
    background: none;
    box-shadow: none;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 1.3px;
  }

  .page-home .hero .eyebrow {
    color: #59748b;
    font-size: 11px;
    letter-spacing: 1px;
  }

  .page-home .eyebrow > span {
    width: 5px;
    height: 5px;
    background: var(--gold);
    box-shadow: none;
  }

  .page-home .hero-copy h1 {
    position: relative;
    max-width: none;
    margin: 20px 0 18px;
    color: var(--ink);
    font-size: 34px;
    font-weight: 700;
    line-height: 1.38;
    letter-spacing: -0.5px;
    text-wrap: initial;
  }

  .page-home h1 em {
    color: var(--blue);
    background: none;
    font-family: inherit;
    font-style: normal;
    font-weight: 700;
  }

  .page-home h1 em::after {
    content: none;
  }

  .page-home .hero-intro {
    max-width: 470px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.9;
    letter-spacing: 0;
  }

  .page-home .hero-art {
    position: absolute;
    z-index: 1;
    inset: 28px -54px auto auto;
    display: block;
    width: 280px;
    min-height: 0;
    height: 176px;
    overflow: hidden;
    padding: 0;
    opacity: 0.82;
    pointer-events: none;
    mix-blend-mode: multiply;
    mask-image: linear-gradient(90deg, transparent, #000 24%, #000 90%, transparent),
      linear-gradient(180deg, #000 55%, transparent);
    mask-composite: intersect;
  }

  .page-home .hero-icon-wrap {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }

  .page-home .hero-icon-wrap picture {
    mask-image: none;
  }

  .page-home .hero-community-icon {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1036 / 864;
    border-radius: 0;
    object-fit: contain;
    filter: none;
    mix-blend-mode: normal;
  }

  .page-home .hero-icon-caption {
    display: none;
  }

  .page-home .hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
  }

  .page-home .button {
    flex: 0 1 auto;
    gap: 16px;
    min-height: 44px;
    padding: 0 21px;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: none;
  }

  .page-home .button.primary {
    border-color: var(--ink);
    background: var(--ink);
  }

  .page-home .button.ghost {
    padding-inline: 14px;
    border-color: transparent;
    color: var(--ink);
    background: transparent;
    box-shadow: none;
  }

  .page-home .app-quick {
    position: relative;
    z-index: 3;
    display: block;
    margin: 0 calc(-1 * var(--gutter-right)) 0 calc(-1 * var(--gutter-left));
    padding: 20px var(--gutter-right) 20px var(--gutter-left);
    border-block: 1px solid #e8eef5;
    background: #f2f6fb;
  }

  .page-home .app-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 7px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .page-home .app-grid a:nth-child(n) {
    grid-column: auto;
    display: flex;
    min-width: 0;
    min-height: 90px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 9px 1px;
    border: 1px solid #e2eaf3;
    border-radius: var(--radius-card);
    color: var(--ink);
    background: #fff;
    box-shadow: var(--shadow-card);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0;
    white-space: nowrap;
    transition: background 220ms ease, transform 220ms ease, border-color 220ms ease;
  }

  .page-home .app-grid a:nth-child(n) .ag-icon {
    display: grid;
    width: var(--icon-size);
    height: var(--icon-size);
    place-items: center;
    border: 0;
    border-radius: var(--radius-icon);
    color: var(--blue);
    background: var(--blue-soft);
    box-shadow: none;
  }

  .page-home .app-grid a:nth-child(n) .ag-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: var(--icon-stroke);
  }

  .page-home .app-grid a:active {
    transform: scale(0.97);
    border-color: #bdd5ea;
    background: var(--blue-soft);
  }

  .page-home .section {
    padding-block: 42px;
  }

  .page-home .section-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 22px;
  }

  .page-home .section-heading h2 {
    margin-top: 10px;
    color: var(--ink);
    font-size: clamp(22px, 5.8vw, 26px);
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: -0.5px;
    text-wrap: initial;
  }

  .page-home .cohorts {
    background: #f8fafc;
  }

  .page-home .cohort-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .page-home .cohort-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-feature);
    background: #fff;
    box-shadow: var(--mobile-shadow);
  }

  .page-home .cohort-visual {
    aspect-ratio: 16 / 9;
  }

  .page-home .cohort-season .cohort-visual::before,
  .page-home .cohort-season .cohort-visual::after,
  .page-home .cohort-number,
  .page-home .cohort-badge {
    display: none;
  }

  .page-home .cohort-copy {
    gap: 0;
    padding: 20px 20px 14px;
  }

  .page-home .cohort-label {
    color: var(--label);
    font-size: 10px;
    font-weight: 500;
    line-height: 1.6;
    letter-spacing: 1.6px;
  }

  .page-home .cohort-copy h3 {
    margin-top: 8px;
    color: var(--ink);
    font-size: 21px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: -0.3px;
    text-wrap: initial;
  }

  .page-home .cohort-copy > p:not(.cohort-label) {
    display: block;
    margin-top: 8px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.8;
  }

  .page-home .cohort-link {
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    margin-top: 16px;
    padding-top: 5px;
    border-top: 1px solid #edf1f5;
    color: var(--blue);
    font-size: 13px;
    font-weight: 500;
  }

  .page-home .cohort-link > span {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    font-size: 15px;
  }

  .page-home .about-learning {
    padding-top: 44px;
    padding-bottom: 0;
    background: var(--tint);
  }

  .page-home .about-learning::before {
    content: none;
  }

  .page-home .learning-hub-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .page-home .about-column {
    padding: 0;
  }

  .page-home .about-column h2 {
    margin-top: 14px;
    color: var(--ink);
    font-size: clamp(25px, 6.8vw, 30px);
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: -0.7px;
    text-wrap: initial;
  }

  .page-home .about-column h2 em {
    color: var(--blue);
    background: none;
  }

  .page-home .about-learning .about-lead {
    margin-top: 17px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.95;
  }

  .page-home .about-points {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-top: 26px;
    padding: 0;
    border: 0;
  }

  .page-home .about-points > div {
    display: grid;
    grid-template-columns: var(--icon-size) minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    min-height: 88px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: #fff;
    box-shadow: var(--shadow-card);
  }

  .page-home .about-points svg {
    width: var(--icon-size);
    height: var(--icon-size);
    padding: 10px;
    border-radius: var(--radius-icon);
    background: var(--blue-soft);
    stroke-width: var(--icon-stroke);
  }

  .page-home .about-points strong {
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.6;
  }

  .page-home .about-points small {
    margin-top: 3px;
    color: var(--text);
    font-size: 12px;
    line-height: 1.6;
  }

  .page-home .learning-hub-courses {
    margin: 40px calc(-1 * var(--gutter-right)) 0 calc(-1 * var(--gutter-left));
    padding: 40px var(--gutter-right) 42px var(--gutter-left);
    border-top: 1px solid #e7edf3;
    background: var(--paper);
  }

  .page-home .learning-merged-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 22px;
    padding: 0;
    border: 0;
  }

  .page-home .learning-merged-head h3 {
    max-width: 12em;
    margin-top: 12px;
    color: var(--ink);
    font-size: clamp(24px, 6.5vw, 28px);
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: -0.5px;
    text-wrap: initial;
  }

  .page-home .learning-hub-note {
    max-width: 470px;
    margin-top: 14px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.9;
  }

  .page-home .learning-title-line {
    display: block;
  }

  .page-home .learning-merged-head .heading-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 0;
    color: var(--blue);
    font-size: 12px;
    font-weight: 500;
  }

  .page-home .learning-column .learning-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .page-home .learning-column .learning-card {
    display: flex;
    min-width: 0;
    min-height: 190px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 17px 46px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: #f5f8fc;
    box-shadow: var(--shadow-card);
  }

  .page-home .learning-card-icon {
    width: var(--icon-size);
    height: var(--icon-size);
    border: 0;
    border-radius: var(--radius-icon);
    background: var(--blue-soft);
    box-shadow: none;
  }

  .page-home .learning-card-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: var(--icon-stroke);
  }

  .page-home .learning-card-index {
    top: 19px;
    right: 16px;
    color: #c7d6e4;
    font-family: inherit;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: -1px;
  }

  .page-home .learning-column .learning-grid strong {
    color: var(--ink);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0;
  }

  .page-home .learning-column .learning-grid small {
    margin-top: 6px;
    color: var(--text);
    font-size: 12px;
    line-height: 1.75;
    letter-spacing: 0;
    overflow-wrap: anywhere;
  }

  .page-home .learning-column .learning-grid .go {
    right: 15px;
    bottom: 15px;
    width: 28px;
    height: 28px;
    border-color: #d5e2ee;
    color: var(--blue);
    background: #fff;
    font-size: 16px;
  }

  .page-home .learning-card:active,
  .page-home .cohort-card:active {
    transform: translateY(1px);
    box-shadow: none;
  }

  .page-home footer {
    padding: 20px 0 calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .page-home .footer-inner {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 0 16px;
  }

  .page-home .f-logo.f-logo-light img {
    width: 104px;
  }

  .page-home .f-links {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    width: 100%;
    margin: 4px 0 8px;
    font-size: 12px;
  }

  .page-home .f-links a + a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 10px;
    background: rgb(255 255 255 / 18%);
    transform: translateY(-50%);
  }

  .page-home .back-top {
    grid-column: 2;
    grid-row: 1;
  }

  .page-home .f-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    padding-top: 10px;
    font-size: 10.5px;
    line-height: 1.7;
  }

  .page-home .f-meta-row {
    gap: 0 14px;
  }

  .page-home .f-meta-row a {
    min-height: 28px;
  }

  .page-home .f-meta-row > a {
    white-space: nowrap;
  }
}

@media (min-width: 520px) and (max-width: 768px) {
  .page-home .footer-inner {
    grid-template-columns: minmax(104px, 1fr) auto 44px;
    row-gap: 12px;
  }

  .page-home .f-links {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: repeat(4, max-content);
    gap: 16px;
    margin: 0;
    font-size: 11px;
  }

  .page-home .f-links a + a::before {
    content: none;
  }

  .page-home .back-top {
    grid-column: 3;
  }
}

@media (min-width: 520px) and (max-width: 768px) {
  .page-home .hero {
    padding-top: 42px;
  }

  .page-home .hero-copy h1 {
    font-size: 40px;
  }

  .page-home .hero-art {
    top: 5px;
    right: -28px;
    width: 380px;
    height: 250px;
  }

  .page-home .hero-intro {
    max-width: 80%;
  }

  .page-home .app-grid {
    gap: 12px;
  }

  .page-home .cohort-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .page-home .cohort-copy {
    padding: 20px 17px 12px;
  }

  .page-home .cohort-copy h3 {
    font-size: 19px;
  }

  .page-home .learning-column .learning-card {
    min-height: 200px;
    padding-inline: 22px;
  }
}

@media (max-width: 359px) {
  .page-home .hero-copy h1 {
    font-size: 31px;
  }

  .page-home .hero-art {
    right: -90px;
    opacity: 0.72;
  }

  .page-home .app-grid {
    gap: 8px 5px;
  }

  .page-home .learning-column .learning-card {
    padding-inline: 13px;
  }

}

@media (prefers-reduced-motion: reduce) and (max-width: 768px) {
  .page-home .app-grid a,
  .page-home .cohort-card,
  .page-home .learning-card {
    transition: none;
  }
}
