:root {
    --km-blue: #0868f7;
    --km-blue-dark: #084fbd;
    --km-red: #ff5a45;
    --km-orange: #ee7c24;
    --km-ink: #111827;
    --km-muted: #67748a;
    --km-line: #dbe7f5;
    --km-paper: #fcfdff;
    --km-ice: #f3f8ff;
    --km-serif: 'Noto Serif SC', 'Songti SC', serif;
}

/* 首页主题切换：课程内容和跳转保持不变，只切换视觉主题。 */
.km-nav-actions {
    display: inline-flex;
    align-items: center;
    justify-self: end;
    gap: 10px;
}

.km-theme-toggle {
    position: relative;
    display: inline-flex;
    width: 54px;
    height: 32px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 99px;
    background: linear-gradient(135deg, #58aeff, #0868f7);
    font: inherit;
    cursor: pointer;
    box-shadow: 0 5px 16px rgba(8, 104, 247, 0.22), inset 0 1px 1px rgba(255, 255, 255, 0.34);
    transition: background 220ms ease, box-shadow 220ms ease, transform 180ms ease;
}

.km-theme-toggle::before {
    position: absolute;
    inset: 2px;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 50%);
    content: '';
    pointer-events: none;
}

.km-theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(8, 104, 247, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.34);
}

.km-theme-toggle-dot {
    position: absolute;
    z-index: 1;
    top: 2px;
    left: 2px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 2px 5px rgba(4, 42, 91, 0.24), 0 1px 1px rgba(255, 255, 255, 0.76) inset;
    transition: transform 260ms cubic-bezier(.34, 1.56, .64, 1), box-shadow 180ms ease;
}

.km-theme-toggle-dot::after {
    position: relative;
    display: block;
    width: 8px;
    height: 8px;
    margin: 9px;
    border-radius: 50%;
    background: #177cf8;
    box-shadow: 0 0 0 2px rgba(23, 124, 248, 0.12);
    content: '';
}

.km-theme-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.km-hero-theme-control {
    position: absolute;
    z-index: 6;
    top: 14px;
    right: clamp(22px, 3.2vw, 66px);
}

html {
    scroll-padding-top: 78px;
}

body.knowledge-map-home {
    margin: 0;
    padding: 0 !important;
    background: var(--km-paper);
    color: var(--km-ink);
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.knowledge-map-home *,
.knowledge-map-home *::before,
.knowledge-map-home *::after {
    box-sizing: border-box;
}

.knowledge-map-home a {
    color: inherit;
    text-decoration: none;
}

.km-shell {
    width: min(1320px, calc(100% - 56px));
    margin: 0 auto;
}

.km-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(31, 62, 111, 0.09);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.km-nav-inner {
    min-height: 72px;
    display: grid;
    grid-template-columns: minmax(265px, 1fr) auto minmax(150px, 1fr);
    align-items: center;
    gap: 28px;
}

.km-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    font-size: 17px;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.km-brand img {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    object-fit: cover;
    box-shadow: 0 6px 18px rgba(23, 69, 126, 0.1);
}

.km-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.km-nav-links a {
    position: relative;
    padding: 24px 15px 22px;
    color: #4d5c70;
    font-size: 14px;
    font-weight: 650;
    white-space: nowrap;
    transition: color 180ms ease;
}

.km-nav-links a:hover,
.km-nav-links .is-active {
    color: var(--km-blue);
}

.km-nav-links .is-active::after {
    content: '';
    position: absolute;
    right: 15px;
    bottom: 15px;
    left: 15px;
    height: 2px;
    border-radius: 2px;
    background: var(--km-blue);
}

.km-button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    border: 1px solid var(--km-blue);
    border-radius: 10px;
    background: var(--km-blue);
    color: #fff !important;
    font-size: 15px;
    font-weight: 750;
    box-shadow: 0 12px 28px rgba(8, 104, 247, 0.2);
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.km-button:hover {
    transform: translateY(-2px);
    background: var(--km-blue-dark);
    box-shadow: 0 16px 34px rgba(8, 104, 247, 0.27);
}

.km-button:focus-visible,
.knowledge-map-home a:focus-visible {
    outline: 3px solid rgba(8, 104, 247, 0.3);
    outline-offset: 3px;
}

.km-button-small {
    min-height: 42px;
    justify-self: end;
    padding-inline: 21px;
    font-size: 14px;
}

.km-account-chip {
    min-height: 42px;
    max-width: 178px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 11px 6px 6px;
    overflow: hidden;
    border: 1px solid #d8e4f2;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 7px 18px rgba(24, 63, 108, 0.09);
    color: #244666 !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.km-account-chip:hover {
    transform: translateY(-1px);
    border-color: #a9c8ee;
    box-shadow: 0 10px 22px rgba(24, 63, 108, 0.14);
}

.km-account-avatar {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #2586ff, #075edb);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

.km-account-arrow {
    color: #82a0bd;
    font-size: 20px;
    font-weight: 400;
    line-height: 0.7;
}

.km-hero {
    position: relative;
    overflow: hidden;
    border: 0;
    background:
        radial-gradient(circle at 13% 24%, rgba(8, 104, 247, 0.045), transparent 28%),
        #ffffff;
}

.km-hero-grid {
    min-height: 520px;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(600px, 1.05fr);
    align-items: center;
    gap: 26px;
    padding-block: 20px;
}

.km-hero-copy {
    position: relative;
    z-index: 2;
    max-width: 620px;
}

.km-eyebrow,
.km-section-kicker {
    margin: 0 0 18px;
    color: var(--km-blue);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.km-eyebrow span {
    margin-inline: 8px;
    color: var(--km-red);
}

.km-hero h1 {
    margin: 0;
    font-family: var(--km-serif);
    font-size: clamp(46px, 4vw, 60px);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.055em;
}

.km-hero h1::after {
    content: '';
    display: block;
    width: 64px;
    height: 3px;
    margin-top: 25px;
    border-radius: 99px;
    background: var(--km-red);
}

.km-hero-lead {
    max-width: 590px;
    margin: 24px 0 0;
    color: var(--km-muted);
    font-size: 17px;
    line-height: 1.9;
}

.km-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px 22px;
    margin-top: 42px;
}

.km-text-link {
    color: var(--km-blue) !important;
    font-size: 14px;
    font-weight: 700;
    border-bottom: 1px solid transparent;
}

.km-text-link:hover {
    border-bottom-color: currentColor;
}

.km-stats {
    display: grid;
    grid-template-columns: repeat(4, 86px);
    gap: 0;
    width: fit-content;
    margin: 0;
    padding: 2px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.km-stats div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 5px 12px;
    border-left: 1px solid rgba(31, 80, 150, 0.12);
}

.km-stats div:first-child {
    border-left: 0;
}

.km-stats strong {
    color: var(--km-blue);
    font-size: 21px;
    line-height: 1;
}

.km-stats span {
    color: #78869a;
    font-size: 11px;
    white-space: nowrap;
}

.km-hero-visual {
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    --shift-x: 0px;
    --shift-y: 0px;
    position: relative;
    display: block !important;
    min-height: 480px;
    margin-left: -48px;
    transform: perspective(1000px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translate(var(--shift-x), var(--shift-y));
    transition: transform 220ms ease-out;
}

.km-hero-visual > img {
    position: absolute;
    inset: 0 auto auto -18px;
    width: calc(100% + 112px);
    max-width: none;
    max-height: 500px;
    height: auto;
    object-fit: contain;
    object-position: left top;
    display: block;
    border-radius: 0;
    mix-blend-mode: multiply;
}

.km-hero-hotspots {
    position: absolute;
    z-index: 3;
    inset: 0 auto auto -18px;
    width: calc(100% + 112px);
    aspect-ratio: 1656 / 950;
    max-height: 500px;
    margin: 0;
    padding: 0;
}

.km-hero-hotspot {
    position: absolute;
    cursor: pointer;
}

.km-hero-hotspot:focus-visible {
    outline: 3px solid rgba(8, 104, 247, 0.68);
    outline-offset: 5px;
    border-radius: 14px;
}

.km-hero-hotspot span { display: none; }

/* Small transparent hit areas map to the illustrations, not whole book sections. */
.km-hero-hotspot-start { left: 28%; top: 16%; width: 15%; height: 25%; }
.km-hero-hotspot-advanced { left: 53%; top: 15%; width: 15%; height: 26%; }
.km-hero-hotspot-matrix { left: 73%; top: 19%; width: 17%; height: 25%; }
.km-hero-hotspot-workflow { left: 18%; top: 51%; width: 15%; height: 27%; }
.km-hero-hotspot-practice { left: 36%; top: 51%; width: 15%; height: 27%; }
.km-hero-hotspot-cases { left: 54%; top: 52%; width: 16%; height: 27%; }
.km-hero-hotspot-coaching { left: 75%; top: 52%; width: 16%; height: 27%; }

/* 卷角已经直接烘进书本主图；这里只保留无视觉负担的点击热区。 */
.km-page-flip-control {
    position: absolute;
    z-index: 10;
    right: -2px;
    bottom: 88px;
    width: 46px;
    height: 47px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.km-page-flip-control:focus-visible {
    outline: 0;
}

.km-page-flip-control.km-mobile-theme-curl {
    /* The page curl is the only homepage theme control on every screen size. */
    display: block;
    top: var(--km-curl-top, 68%);
    left: var(--km-curl-left, 84%);
    right: auto;
    bottom: auto;
    width: var(--km-curl-width, 15%);
    height: var(--km-curl-height, 18%);
    min-width: 46px;
    min-height: 46px;
}

.km-map-index {
    position: relative;
    z-index: 3;
    padding: 0 0 30px;
    border: 0;
    background: transparent;
}

.km-shortcuts-shell {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    padding: 0;
}

.km-shortcuts-head {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.km-shortcuts-head > div {
    display: flex;
    align-items: center;
    min-height: 28px;
}

.km-shortcuts-head p {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
    color: var(--km-blue);
    background: transparent;
    font-size: 14px;
    font-weight: 850;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.km-shortcuts-head p::before {
    width: 10px;
    height: 10px;
    margin-right: 9px;
    border-radius: 50%;
    background: var(--km-red);
    content: '';
}

.km-shortcuts-head h2 {
    display: none;
}

.km-shortcuts-head span {
    display: none;
}

.km-shortcuts-rail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.km-shortcuts-all {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 0 0 18px;
    border-left: 1px solid #e3ebf7;
    color: var(--km-blue);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.km-shortcuts-all b {
    font-size: 16px;
    line-height: 1;
    transition: transform 180ms ease;
}

.km-shortcuts-all:hover b {
    transform: translateX(3px);
}

.km-shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    min-width: 0;
}

.km-shortcut {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    min-width: 0;
    min-height: 34px;
    padding: 0 18px;
    border: 0;
    border-left: 1px solid rgba(31, 80, 150, 0.11);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-decoration: none;
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
    grid-column: auto;
}

.km-shortcut-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #147cf5;
    background: #eaf4ff;
}

.km-shortcut-icon svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.km-shortcut-copy {
    display: block;
    min-width: 0;
}

.km-shortcut-copy strong {
    display: block;
    overflow: hidden;
    color: #1a2434;
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.km-shortcut-copy small {
    display: none;
}

.km-shortcut > i {
    display: none;
    color: #b0bfd1;
    font-size: 14px;
    font-style: normal;
    line-height: 1;
    transition: color 180ms ease, transform 180ms ease;
}

.km-shortcut:hover {
    border-left-color: var(--km-blue);
    background: transparent;
    box-shadow: none;
    transform: translateY(-1px);
}

.km-shortcut:hover > i {
    color: var(--km-blue);
    transform: translateX(3px);
}

.km-shortcut:focus-visible,
.km-shortcuts-all:focus-visible {
    outline: 3px solid rgba(8, 104, 247, 0.22);
    outline-offset: 2px;
}

/* Keep frequent tools as a standalone destination, not a second row in the hero. */
.km-section.km-quick-access {
    padding: 18px 0 64px;
    background: #fff;
}

.km-quick-access .km-map-index {
    padding: 0;
}

.km-quick-access .km-shortcuts-shell {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 28px;
}

.km-quick-access .km-shortcuts-head > div {
    display: block;
    min-height: 0;
}

.km-quick-access .km-shortcuts-head p {
    display: inline-flex;
    color: var(--km-blue);
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.km-quick-access .km-shortcuts-head h2 {
    display: block;
    margin: 10px 0 0;
    color: #111c2e;
    font-family: var(--km-serif);
    font-size: clamp(30px, 2.5vw, 40px);
    letter-spacing: -0.04em;
}

.km-quick-access .km-shortcuts-head span {
    display: block;
    margin-top: 10px;
    color: var(--km-muted);
    font-size: 15px;
}

.km-quick-access .km-shortcuts-rail {
    align-items: center;
    gap: 18px;
}

.km-quick-access .km-shortcuts-grid {
    gap: 12px;
}

.km-quick-access .km-shortcut {
    min-height: 94px;
    padding: 17px;
    border: 1px solid var(--km-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(28, 67, 116, 0.045);
}

.km-quick-access .km-shortcut-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
}

.km-quick-access .km-shortcut-icon svg {
    width: 17px;
    height: 17px;
}

.km-quick-access .km-shortcut-copy strong {
    padding-top: 1px;
    font-size: 14px;
}

.km-quick-access .km-shortcut-copy small {
    display: block;
    overflow: hidden;
    margin-top: 5px;
    color: #79879a;
    font-size: 11px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.km-quick-access .km-shortcut > i {
    display: block;
    margin-left: auto;
    color: #a9b8ca;
    font-size: 18px;
    line-height: 32px;
}

.km-quick-access .km-shortcut:hover {
    border-color: #b9d2f4;
    background: #f8fbff;
    box-shadow: 0 16px 32px rgba(28, 81, 150, 0.11);
    transform: translateY(-3px);
}

.km-quick-access .km-shortcuts-all {
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--km-line);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(28, 67, 116, 0.04);
    white-space: nowrap;
}

.km-quick-access .km-shortcuts-all:hover {
    border-color: #b9d2f4;
    background: #f8fbff;
    box-shadow: 0 12px 24px rgba(28, 81, 150, 0.1);
}

.km-section {
    padding: 82px 0;
}

.km-learning {
    padding-top: 72px;
    background:
        linear-gradient(rgba(230, 239, 251, 0.22) 1px, transparent 1px),
        linear-gradient(90deg, rgba(230, 239, 251, 0.22) 1px, transparent 1px),
        #fbfdff;
    background-size: 48px 48px;
}

.km-section-heading {
    margin-bottom: 38px;
}

/* Learning and tools are action areas, so their headings align with the entry cards. */
.km-learning .km-section-heading,
.km-tools .km-section-heading,
.km-resources .km-section-heading {
    max-width: 680px;
    text-align: left;
}

.km-section-heading h2,
.km-proof h2 {
    margin: 0;
    font-family: var(--km-serif);
    font-size: clamp(32px, 3vw, 46px);
    letter-spacing: -0.035em;
}

.km-section-heading > p:last-child {
    margin: 12px 0 0;
    color: var(--km-muted);
    font-size: 15px;
}

.km-path-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: minmax(340px, auto) minmax(236px, auto);
    gap: 18px;
}

.km-path-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--km-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(28, 67, 116, 0.065);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.km-path-card:hover {
    border-color: #b9d2f4;
    box-shadow: 0 20px 44px rgba(28, 67, 116, 0.11);
    transform: translateY(-4px);
}

.km-path-card[role="link"] {
    cursor: pointer;
}

.km-path-card[role="link"]:focus-visible {
    outline: 3px solid rgba(8, 104, 247, 0.28);
    outline-offset: 3px;
}

.km-path-card-start {
    grid-column: span 6;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(240px, 0.92fr);
    border-color: #cfe1f8;
    background: linear-gradient(120deg, #ffffff 0%, #f2f7ff 100%);
}

.km-path-card-start .km-path-body {
    position: relative;
    z-index: 2;
    align-self: center;
    padding: 34px 10px 32px 34px;
}

.km-path-card-start .km-path-art {
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
    object-position: 74% center;
}

/* The existing robot artwork now occupies the large start-card art position. */
.km-path-card-start-robot .km-path-art {
    object-fit: contain;
    object-position: center;
    padding: 12px 14px 8px 0;
}

.km-path-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 13px;
    border-radius: 999px;
    background: var(--km-red);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.km-path-card-top {
    grid-column: span 3;
    display: grid;
    grid-template-rows: 132px minmax(0, 1fr);
    padding: 16px 20px 20px;
}

.km-path-card-top .km-path-art {
    width: 100%;
    height: 132px;
    object-fit: contain;
    mix-blend-mode: normal;
}

.km-path-card-advanced {
    border-color: var(--km-line);
    background: #fff;
}

.km-path-card-matrix {
    border-color: var(--km-line);
    background: #fff;
}

.km-path-body {
    min-width: 0;
}

.km-path-body h3 {
    margin: 0;
    font-family: var(--km-serif);
    font-size: 24px;
    line-height: 1.3;
    letter-spacing: -0.03em;
}

.km-path-card-start .km-path-body h3 {
    margin-top: 19px;
    font-size: 34px;
}

.km-path-body > p {
    margin: 8px 0 0;
    color: var(--km-muted);
    font-size: 13px;
    line-height: 1.65;
}

.km-path-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.km-path-tags span {
    padding: 6px 9px;
    border-radius: 7px;
    background: rgba(8, 104, 247, 0.08);
    color: #235fae;
    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
}

.km-path-enter {
    position: absolute;
    right: 18px;
    bottom: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--km-blue);
    font-family: var(--km-serif);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    opacity: 0.72;
    transition: transform 160ms ease, color 160ms ease, opacity 160ms ease;
}

.km-path-enter::before {
    position: absolute;
    right: -18px;
    bottom: -12px;
    width: 100vw;
    height: 3px;
    background: var(--km-blue);
    content: '';
    opacity: 0.38;
    transition: height 160ms ease, opacity 160ms ease;
}

.km-path-enter::after {
    content: '↗';
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    transition: transform 160ms ease, color 160ms ease;
}

.km-path-card:hover .km-path-enter {
    opacity: 1;
    transform: translateX(-2px);
}

.km-path-card:hover .km-path-enter::before {
    height: 4px;
    opacity: 0.9;
}

.km-path-card:hover .km-path-enter::after {
    transform: translate(1px, -1px);
}

.km-path-card-small {
    grid-column: span 3;
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    align-items: stretch;
    gap: 14px;
    padding: 22px 18px;
}

.km-path-card-small .km-path-art {
    width: 104px;
    height: 104px;
    display: block;
    object-fit: contain;
    mix-blend-mode: normal;
}

.km-path-card-small .km-path-body h3 {
    align-self: start;
    font-size: 18px;
    line-height: 28px;
}

.km-path-card-small .km-path-body {
    display: grid;
    grid-template-rows: 28px 48px 58px;
    align-content: center;
    min-height: 0;
}

.km-path-card-small .km-path-body > p {
    align-self: start;
    min-height: 0;
    margin: 0;
    padding-top: 8px;
    font-size: 12px;
}

.km-path-card-small .km-path-tags {
    align-content: start;
    gap: 5px;
    min-height: 0;
    margin-top: 0;
    padding-top: 7px;
}

.km-path-card-small .km-path-tags span {
    padding: 5px 7px;
    font-size: 9px;
}

.km-path-card-ai,
.km-path-card-practice,
.km-path-card-cases,
.km-path-card-coaching { background: #fff; }

.km-proof {
    padding: 68px 0;
    border-block: 1px solid var(--km-line);
    background: #fbfdff;
}

.km-proof-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 30px;
}

.km-proof-head > p {
    margin: 0 0 5px;
    color: var(--km-muted);
    font-size: 14px;
}

.km-proof-viewport {
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.km-proof-grid {
    display: flex;
    gap: 0;
    width: max-content;
    padding: 4px 0 10px;
    animation: km-review-marquee 184s linear infinite;
}

.km-proof blockquote {
    box-sizing: border-box;
    flex: 0 0 278px;
    min-height: 168px;
    margin: 0 18px 0 0;
    padding: 20px;
    border: 1px solid var(--km-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(28, 67, 116, 0.05);
}

/* The feedback track moves continuously, so it must not inherit the page reveal state. */
.knowledge-map-home.motion-ready .km-proof .review-card {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
}

.km-proof-viewport:hover .km-proof-grid,
.km-proof-viewport:focus-within .km-proof-grid {
    animation-play-state: paused;
}

/* A separate card rail keeps the high-frequency tools visible without crowding the hero copy. */
.km-hero .km-section.km-quick-access {
    margin-top: -18px;
    padding: 0 0 50px;
    background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--km-blue) 3%, transparent));
}

.km-hero .km-shortcuts-shell {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    padding: 0;
}

.km-hero .km-shortcuts-shell::after {
    display: none;
}

.km-hero .km-shortcuts-head,
.km-hero .km-shortcuts-rail {
    position: relative;
    z-index: 1;
}

.km-hero .km-shortcuts-head > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: auto;
}

.km-hero .km-shortcuts-head p {
    display: inline-flex;
    align-items: center;
    margin: 0 0 5px;
    color: var(--km-blue);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
}

.km-hero .km-shortcuts-head p::before {
    display: none;
}

.km-hero .km-shortcuts-head h2,
.km-hero .km-shortcuts-head span {
    margin: 0;
}

.km-hero .km-shortcuts-head h2 {
    display: block;
    color: var(--km-ink);
    font-family: var(--km-serif);
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.1;
}

.km-hero .km-shortcuts-head span {
    display: none;
}

.km-hero .km-shortcuts-rail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.km-hero .km-shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.km-hero .km-shortcut {
    position: relative;
    min-height: 68px;
    padding: 0 14px;
    border: 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 9px 22px rgba(29, 69, 122, 0.07);
    backdrop-filter: blur(10px);
    transform: none;
    transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.km-hero .km-shortcut::after {
    display: none;
}

.km-hero .km-shortcut-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--km-blue) 9%, #fff);
}

.km-hero .km-shortcut-icon svg {
    width: 18px;
    height: 18px;
}

.km-hero .km-shortcut-copy strong {
    padding-top: 0;
    font-size: 14px;
}

.km-hero .km-shortcut-copy small {
    display: none;
}

.km-hero .km-shortcut > i {
    display: inline-grid;
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    place-items: center;
    margin-left: auto;
    border-radius: 50%;
    color: var(--km-blue);
    background: color-mix(in srgb, var(--km-blue) 8%, #fff);
    font-size: 15px;
    font-style: normal;
    line-height: 1;
    transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.km-hero .km-shortcut:hover {
    background: #fff;
    box-shadow: 0 15px 30px rgba(29, 69, 122, 0.13);
    transform: translateY(-3px);
}

.km-hero .km-shortcut:hover > i {
    color: #fff;
    background: var(--km-blue);
    transform: translateX(2px);
}

.km-hero .km-shortcuts-all {
    display: inline-flex;
    min-height: 64px;
    padding: 0 5px 0 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.km-hero .km-shortcuts-all b {
    display: inline-grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 50%;
    color: var(--km-blue);
    background: color-mix(in srgb, var(--km-blue) 8%, #fff);
    font-size: 15px;
    font-weight: 600;
}

.km-hero .km-shortcuts-all:hover {
    color: var(--km-ink);
}

.km-hero .km-shortcuts-all:hover b {
    color: #fff;
    background: var(--km-blue);
    transform: translateX(2px);
}

@media (max-width: 900px) {
    .km-hero .km-section.km-quick-access {
        margin-top: 0;
        padding-bottom: 24px;
    }

    .km-hero .km-shortcuts-shell {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 0 12px 18px;
    }

    .km-hero .km-shortcuts-shell::after {
        left: 12px;
    }

    .km-hero .km-shortcuts-head > div {
        min-height: auto;
    }

    .km-hero .km-shortcuts-rail {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .km-hero .km-shortcuts-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .km-hero .km-shortcuts-all {
        min-height: 32px;
        justify-self: start;
        padding: 0;
        border-left: 0;
    }
}

@media (max-width: 620px) {
    .km-hero .km-section.km-quick-access {
        padding-bottom: 20px;
    }

    .km-hero .km-shortcuts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .km-proof-viewport {
        overflow-x: auto;
        mask-image: none;
        -webkit-mask-image: none;
    }

    .km-proof-grid {
        animation: none;
    }
}

/* Coral-red book-map theme. Structure and destinations remain shared with the blue theme. */
html[data-home-theme="red"] {
    --km-blue: #e94752;
    --km-blue-dark: #c83342;
    --km-red: #ff685d;
    --km-orange: #f07a45;
    --km-line: #f2d9d5;
    --km-paper: #fffdfc;
    --km-ice: #fff5f3;
}

html[data-home-theme="red"] body.knowledge-map-home {
    background: #fffdfc;
}

html[data-home-theme="red"] .km-nav {
    border-bottom-color: rgba(210, 77, 75, 0.12);
    background: rgba(255, 255, 255, 0.93);
}

html[data-home-theme="red"] .km-nav-links a {
    color: #795f63;
}

html[data-home-theme="red"] .km-nav-links a:hover,
html[data-home-theme="red"] .km-nav-links .is-active {
    color: var(--km-blue);
}

html[data-home-theme="red"] .km-theme-toggle {
    background: linear-gradient(135deg, #ff7d72, #e63e4c);
    box-shadow: 0 5px 16px rgba(229, 62, 76, 0.24), inset 0 1px 1px rgba(255, 255, 255, 0.34);
}

html[data-home-theme="red"] .km-theme-toggle:hover {
    box-shadow: 0 8px 20px rgba(229, 62, 76, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.34);
}

html[data-home-theme="red"] .km-theme-toggle-dot {
    transform: translateX(24px);
    box-shadow: 0 2px 5px rgba(105, 29, 35, 0.26), 0 1px 1px rgba(255, 255, 255, 0.76) inset;
}

html[data-home-theme="red"] .km-theme-toggle-dot::after {
    background: #ef4b57;
    box-shadow: 0 0 0 2px rgba(239, 75, 87, 0.12);
}

html[data-home-theme="red"] .km-hero {
    /* Match the exported coral map canvas so its white margin does not read as a separate rectangle. */
    background: #fffafa;
}

html[data-home-theme="red"] .km-hero-visual > img {
    mix-blend-mode: normal;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.15) 8%, #000 19%, #000 100%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.15) 8%, #000 19%, #000 100%);
}

html[data-home-theme="red"] .km-hero-hotspot:focus-visible {
    outline-color: rgba(233, 71, 82, 0.72);
}

html[data-home-theme="red"] .km-button {
    border-color: var(--km-blue);
    background: linear-gradient(135deg, #ff675c, #df3f4e);
    box-shadow: 0 12px 28px rgba(223, 63, 78, 0.22);
}

html[data-home-theme="red"] .km-button:hover {
    background: linear-gradient(135deg, #f65750, #c83342);
    box-shadow: 0 16px 34px rgba(200, 51, 66, 0.27);
}

html[data-home-theme="red"] .km-map-index {
    background: transparent;
}

html[data-home-theme="red"] .km-shortcut {
    border-left-color: #f1d9d5;
}

html[data-home-theme="red"] .km-shortcuts-head p {
    color: #df4450;
}

html[data-home-theme="red"] .km-shortcut:hover {
    border-left-color: #df4450;
    background: transparent;
    box-shadow: none;
}

html[data-home-theme="red"] .km-shortcut-icon {
    color: #df4450;
    background: #fff0ed;
}

html[data-home-theme="red"] .km-shortcuts-all {
    color: #df4450;
}

html[data-home-theme="red"] .km-quick-access {
    background: #fffdfc;
}

html[data-home-theme="red"] .km-quick-access .km-shortcut {
    border-color: #f1d9d5;
    background: #fffdfc;
    box-shadow: 0 10px 26px rgba(151, 67, 66, 0.045);
}

html[data-home-theme="red"] .km-quick-access .km-shortcut:hover {
    border-color: #eaa69e;
    background: #fff7f5;
    box-shadow: 0 16px 32px rgba(185, 67, 75, 0.11);
}

html[data-home-theme="red"] .km-quick-access .km-shortcuts-all {
    border-color: #f1d9d5;
    background: #fffdfc;
}

html[data-home-theme="red"] .km-quick-access .km-shortcuts-all:hover {
    border-color: #eaa69e;
    background: #fff7f5;
    box-shadow: 0 12px 24px rgba(185, 67, 75, 0.1);
}

html[data-home-theme="red"] .km-shortcut:focus-visible,
html[data-home-theme="red"] .km-shortcuts-all:focus-visible {
    outline-color: rgba(223, 68, 80, 0.23);
}

html[data-home-theme="red"] .km-learning {
    background:
        linear-gradient(rgba(248, 224, 218, 0.42) 1px, transparent 1px),
        linear-gradient(90deg, rgba(248, 224, 218, 0.42) 1px, transparent 1px),
        #fffdfc;
    background-size: 48px 48px;
}

html[data-home-theme="red"] .km-path-card {
    border-color: #f1d9d5;
    box-shadow: 0 14px 36px rgba(151, 67, 66, 0.065);
}

html[data-home-theme="red"] .km-path-card:hover {
    border-color: #ebaaa4;
    box-shadow: 0 20px 44px rgba(185, 67, 75, 0.12);
}

html[data-home-theme="red"] .km-path-card[role="link"]:focus-visible {
    outline-color: rgba(228, 62, 76, 0.28);
}

html[data-home-theme="red"] .km-path-card-start {
    border-color: #f1cec9;
    background: linear-gradient(120deg, #ffffff 0%, #fff3f1 100%);
}

html[data-home-theme="red"] .km-path-tags span {
    background: rgba(233, 71, 82, 0.08);
    color: #b9444b;
}

html[data-home-theme="red"] .km-proof {
    background: #fff8f6;
}

html[data-home-theme="red"] .km-proof blockquote {
    border-color: #f1d9d5;
    box-shadow: 0 12px 28px rgba(172, 78, 72, 0.055);
}

html[data-home-theme="red"] .km-tools,
html[data-home-theme="red"] .km-resources {
    background: #fffdfc;
}

html[data-home-theme="red"] .tool-card,
html[data-home-theme="red"] .km-resource {
    border-color: #f1d9d5;
    border-top-color: #e75a62;
}

html[data-home-theme="red"] .km-resource > span {
    background: rgba(231, 90, 98, 0.1);
}

/* Resource cards used to retain their blue default gradient in red mode. */
html[data-home-theme="red"] .km-resource-green,
html[data-home-theme="red"] .km-resource-blue,
html[data-home-theme="red"] .km-resource-orange {
    color: #cf4650;
    background: linear-gradient(125deg, #ffffff 0%, #fff5f2 100%);
}

html[data-home-theme="red"] .km-resource p {
    color: #927176;
}

html[data-home-theme="red"] .tool-card:hover,
html[data-home-theme="red"] .km-resource:hover {
    border-color: #eaa69e;
    box-shadow: 0 18px 38px rgba(192, 74, 79, 0.1);
}

html[data-home-theme="red"] .km-final-cta-inner {
    border: 0;
    background: transparent;
    box-shadow: none;
}

html[data-home-theme="red"] .km-final-cta {
    border-top: 1px solid rgba(231, 71, 82, 0.1);
    border-bottom: 1px solid rgba(231, 71, 82, 0.08);
    background:
        radial-gradient(circle at 84% 35%, rgba(244, 93, 105, 0.15), transparent 23rem),
        linear-gradient(115deg, #fffafa 0%, #fff3f0 100%);
}

html[data-home-theme="red"] .km-final-cta-inner > img {
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 28px rgba(177, 59, 70, 0.12);
}

html[data-home-theme="red"] .km-footer {
    border-top-color: #f1d9d5;
    background: #fffaf9;
}

@media (max-width: 700px) {
    .km-nav-actions {
        gap: 6px;
    }

    .km-theme-toggle {
        width: 52px;
        height: 32px;
        min-height: 0;
        padding: 0;
    }
}

@keyframes km-review-marquee {
    to { transform: translateX(-50%); }
}

.km-proof blockquote p {
    margin: 0;
    color: #354257;
    font-family: var(--km-serif);
    font-size: 14px;
    line-height: 1.7;
}

.km-proof blockquote footer {
    margin-top: 18px;
    color: #8794a8;
    font-size: 12px;
    letter-spacing: 0;
}

.km-tools {
    background: #fff;
}

.km-tool-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 62px;
    border-top: 1px solid var(--km-line);
}

.km-tool-list .tool-card {
    min-height: 118px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 18px 4px;
    border: 0;
    border-bottom: 1px solid var(--km-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.km-tool-list .tool-card:hover {
    padding-inline: 12px;
    background: var(--km-ice);
    transform: none;
}

.km-tool-index {
    color: #9cb5d7;
    font-family: var(--km-serif);
    font-size: 21px;
    font-weight: 800;
}

.km-tool-list h3 {
    margin: 0;
    color: var(--km-ink);
    font-size: 17px;
}

.km-tool-list p {
    margin: 6px 0 0;
    color: var(--km-muted);
    font-size: 13px;
}

.km-tool-list b {
    color: var(--km-blue);
    font-size: 12px;
    white-space: nowrap;
}

.km-resources {
    border-top: 1px solid var(--km-line);
    background: #f7faff;
}

.km-resource-shelf {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.km-resource {
    position: relative;
    min-height: 172px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 16px;
    overflow: hidden;
    padding: 25px 54px 23px 24px;
    border: 1px solid rgba(31, 94, 193, 0.16);
    border-top: 3px solid currentColor;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(31, 70, 120, 0.06);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.km-resource:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 42px rgba(31, 70, 120, 0.11);
}

.km-resource-green,
.km-resource-blue,
.km-resource-orange { color: #1b5ec1; background: linear-gradient(120deg, #ffffff, #f1f7ff); }

.km-resource > span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    background: rgba(27, 94, 193, 0.09);
    font-family: var(--km-serif);
    font-size: 16px;
    font-weight: 800;
    opacity: 1;
}

.km-resource::after {
    position: absolute;
    top: 22px;
    right: 23px;
    color: currentColor;
    content: '↗';
    font-size: 20px;
    font-weight: 700;
    transition: transform 180ms ease;
}

.km-resource:hover::after {
    transform: translate(2px, -2px);
}

.km-resource h3 {
    margin: 0;
    font-family: var(--km-serif);
    font-size: 21px;
    line-height: 1.3;
}

.km-resource p {
    min-height: 0;
    margin: 8px 0 15px;
    color: #627086;
    font-size: 13px;
    line-height: 1.6;
}

.km-resource b {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: currentColor;
    font-size: 13px;
}

.km-resource b::after {
    content: '进入';
    font-size: 11px;
    font-weight: 600;
}

.km-final-cta {
    padding: 42px 0 48px;
    border-top: 1px solid rgba(23, 104, 239, 0.08);
    border-bottom: 1px solid rgba(23, 104, 239, 0.06);
    background:
        radial-gradient(circle at 84% 35%, rgba(47, 128, 237, 0.13), transparent 23rem),
        linear-gradient(115deg, #fbfdff 0%, #f1f6ff 100%);
}

.km-final-cta-inner {
    min-height: 118px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 22px;
    padding: 12px 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.km-final-cta-inner > img {
    width: 64px;
    height: 64px;
    padding: 6px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 28px rgba(30, 71, 124, 0.1);
}

.km-final-cta-inner p {
    margin: 0;
    font-family: var(--km-serif);
    font-size: clamp(23px, 2.4vw, 34px);
    font-weight: 800;
}

.km-final-cta-inner span {
    display: block;
    margin-top: 6px;
    color: var(--km-muted);
    font-size: 14px;
}

.km-footer {
    padding: 42px 0;
    border-top: 1px solid var(--km-line);
    background: #fff;
}

.km-footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr auto;
    align-items: center;
    gap: 36px;
}

.km-footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.km-footer-brand img {
    border-radius: 9px;
}

.km-footer-brand div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.km-footer-brand strong {
    font-size: 14px;
}

.km-footer-brand span,
.km-footer-grid > p {
    margin: 0;
    color: #8491a3;
    font-size: 11px;
}

.km-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 22px;
}

.km-footer-links a {
    color: #536176;
    font-size: 12px;
}

.motion-ready .km-path-card,
.motion-ready .km-tool-list .tool-card,
.motion-ready .km-resource,
.motion-ready .km-section-heading {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 560ms ease var(--reveal-delay, 0ms), transform 560ms ease var(--reveal-delay, 0ms);
}

.motion-ready .km-path-card.visible,
.motion-ready .km-tool-list .tool-card.visible,
.motion-ready .km-resource.visible,
.motion-ready .km-section-heading.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1180px) {
    .km-nav-inner {
        grid-template-columns: 1fr auto;
    }

    .km-nav-links {
        display: none;
    }

    .km-hero-grid {
        grid-template-columns: minmax(0, 0.92fr) minmax(440px, 1.08fr);
    }

    .km-hero h1 {
        font-size: 50px;
    }

    .km-hero-visual {
        min-height: 480px;
        margin-left: 0;
    }

    .km-path-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto;
    }

    .km-path-card {
        grid-column: auto;
    }

    .km-path-card-start {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .km-shell {
        width: min(100% - 36px, 760px);
    }

    .km-hero-grid {
        min-height: auto;
        grid-template-columns: 1fr;
        padding-block: 64px 38px;
    }

    .km-hero-copy {
        max-width: none;
    }

    .km-hero-visual {
        min-height: 460px;
    }

    .km-hero-visual > img {
        inset: 0 -30px auto -30px;
        width: calc(100% + 60px);
    }

    .km-hero-hotspots {
        display: none;
    }

    .km-shortcuts-shell {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .km-shortcuts-head {
        position: static;
    }

    .km-shortcuts-head > div {
        min-height: 24px;
    }

    .km-shortcuts-rail {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .km-shortcuts-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .km-shortcut {
        min-height: 42px;
        padding-inline: 12px;
    }

    .km-shortcuts-all {
        min-height: 32px;
        justify-self: start;
        padding: 0;
        border-left: 0;
    }

    .km-section.km-quick-access {
        padding: 28px 0 56px;
    }

    .km-quick-access .km-shortcuts-shell {
        gap: 24px;
    }

    .km-quick-access .km-shortcuts-rail {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .km-quick-access .km-shortcuts-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .km-quick-access .km-shortcut {
        min-height: 88px;
        padding: 16px;
    }

    .km-quick-access .km-shortcuts-all {
        min-height: 42px;
        justify-self: start;
        padding: 0 14px;
        border: 1px solid var(--km-line);
    }

    .km-path-card-start {
        grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.9fr);
    }

    .km-path-card-small {
        grid-template-columns: 92px minmax(0, 1fr);
        padding: 20px 16px;
    }

    .km-path-card-small .km-path-art {
        width: 92px;
        height: 92px;
    }

    .km-proof-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .km-resource-shelf {
        grid-template-columns: 1fr;
    }

    .km-proof blockquote {
        flex-basis: 330px;
    }

    .km-tool-list {
        grid-template-columns: 1fr;
        column-gap: 0;
    }

    .km-final-cta-inner {
        grid-template-columns: auto 1fr;
    }

    .km-final-cta-inner .km-button {
        grid-column: 1 / -1;
    }

    .km-footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    html {
        scroll-padding-top: 65px;
    }

    .km-shell {
        width: min(100% - 28px, 520px);
    }

    .km-nav-inner {
        min-height: 64px;
        gap: 12px;
    }

    .km-nav-actions {
        gap: 8px;
    }

    /* The visual switch is the book's page curl, so the mobile header stays clean. */
    .km-nav-actions .km-theme-toggle {
        display: none;
    }

    .km-brand {
        gap: 8px;
        font-size: 13px;
    }

    .km-brand img {
        width: 36px;
        height: 36px;
    }

    .km-button-small {
        min-height: 38px;
        padding-inline: 14px;
        font-size: 12px;
    }

    .km-account-chip {
        min-height: 38px;
        max-width: 130px;
        gap: 6px;
        padding: 5px 9px 5px 5px;
        font-size: 12px;
    }

    .km-account-avatar {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
        font-size: 12px;
    }

    .km-account-arrow {
        font-size: 17px;
    }

    .km-hero-grid {
        padding-top: 48px;
    }

    .km-page-flip-control {
        right: 0;
        bottom: 34px;
        width: 38px;
        height: 39px;
    }

    /* Keep the curl target comfortable to tap on phones. */
    .km-page-flip-control.km-mobile-theme-curl {
        width: var(--km-curl-width, 16%);
        height: var(--km-curl-height, 19%);
        min-width: 46px;
        min-height: 46px;
    }

    .km-hero h1 {
        font-size: clamp(36px, 11vw, 48px);
        line-height: 1.24;
    }

    .km-hero-lead {
        font-size: 15px;
        line-height: 1.8;
    }

    .km-hero-actions {
        align-items: flex-start;
    }

    .km-hero-actions .km-button {
        width: 100%;
    }

    .km-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px 0;
    }

    .km-stats div:nth-child(3) {
        padding-left: 0;
        border-left: 0;
    }

    .km-hero-visual {
        min-height: 300px;
    }

    .km-hero-visual > img {
        inset: 6px -18px auto -18px;
        width: calc(100% + 36px);
        border-radius: 16px;
    }

    .km-shortcuts-shell {
        gap: 8px;
    }

    .km-shortcuts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .km-shortcut {
        min-height: 42px;
        padding: 0 11px;
    }

    .km-section.km-quick-access {
        padding: 24px 0 52px;
    }

    .km-quick-access .km-shortcuts-shell {
        gap: 20px;
    }

    .km-quick-access .km-shortcuts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .km-quick-access .km-shortcut {
        min-height: 86px;
        padding: 14px;
    }

    .km-quick-access .km-shortcut-copy small {
        white-space: normal;
    }

    /* On phones this is a quiet text exit, not an extra outlined card. */
    .km-quick-access .km-shortcuts-all {
        min-height: 36px;
        padding: 0 2px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        text-decoration: none;
    }

    .km-quick-access .km-shortcuts-all b {
        width: 28px;
        height: 28px;
    }

    /* The hero card body is shorter on mobile, so keep its entry label lower. */
    .km-path-card-start .km-path-enter {
        bottom: -2px;
    }

    .km-section {
        padding: 68px 0;
    }

    .km-learning {
        padding: 52px 0 60px;
    }

    .km-learning .km-section-heading {
        margin-bottom: 28px;
    }

    .km-section-heading h2,
    .km-proof h2 {
        font-size: 32px;
    }

    .km-proof blockquote {
        flex-basis: min(82vw, 320px);
        min-height: 176px;
        padding: 22px;
    }

    .km-proof blockquote p {
        font-size: 15px;
    }

    .km-path-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .km-path-card {
        grid-column: auto;
    }

    .km-path-card-start {
        grid-column: auto;
        min-height: 276px;
        grid-template-columns: minmax(0, 1fr) 132px;
    }

    .km-path-card-start .km-path-body {
        padding: 24px 0 24px 20px;
    }

    .km-path-card-start .km-path-body h3 {
        font-size: 30px;
    }

    .km-path-card-start .km-path-art {
        min-height: 0;
        max-height: none;
        height: 100%;
        object-position: 72% center;
    }

    .km-path-card-top,
    .km-path-card-small {
        display: grid;
        grid-template-columns: 92px minmax(0, 1fr);
        grid-template-rows: none;
        align-items: center;
        gap: 14px;
        padding: 18px 16px;
    }

    .km-path-card-top .km-path-art,
    .km-path-card-small .km-path-art {
        width: 92px;
        height: 92px;
        object-fit: contain;
    }

    .km-path-card-small .km-path-body > p {
        min-height: 0;
    }

    .km-path-body h3,
    .km-path-card-small .km-path-body h3 {
        font-size: 19px;
    }

    .km-path-tags {
        margin-top: 10px;
    }

    .km-proof {
        padding: 58px 0;
    }


    .km-tool-list .tool-card {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 12px;
    }

    .km-tool-list .tool-card > b {
        grid-column: 2;
    }

    .km-resource {
        min-height: 0;
        grid-template-columns: 42px 1fr;
        padding: 26px 22px;
    }

    .km-resource h3 {
        font-size: 20px;
    }

    .km-final-cta-inner {
        grid-template-columns: 1fr;
        padding: 26px 22px;
    }

    .km-final-cta-inner > img {
        width: 58px;
        height: 58px;
    }

    .km-final-cta-inner p {
        font-size: 24px;
        line-height: 1.45;
    }
}

@media (prefers-reduced-motion: reduce) {
    .knowledge-map-home *,
    .knowledge-map-home *::before,
    .knowledge-map-home *::after {
        scroll-behavior: auto !important;
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}
