/* Target U Homepage: streamlined hero with curated constellations, compact editorial
   3-chart showcase, interactive PR-interval placement preview, and mobile-first flow.
   All shared tokens/controls remain owned by static/css/style.css (DESIGN.md v2.30). */

.home-page {
    --home-on-navy: var(--theme-color-surface);
    --home-on-navy-muted: oklch(0.855 0.026 255);
    --home-on-navy-line: oklch(0.52 0.055 255);
    --home-on-navy-hover: oklch(0.32 0.072 255);
    --home-ease: cubic-bezier(.16, 1, .3, 1);
    --home-t: 180ms;
    --home-nav-h: 4rem;
    color: var(--theme-color-foreground);
    background: var(--theme-color-background);
    font-family: var(--theme-font-sans);
}
.home-page *, .home-page *::before, .home-page *::after { box-sizing: border-box; }
:where(.home-page) :where(h1, h2, h3, h4, p, ul, ol) { margin: 0; }
.home-page ul, .home-page ol { padding: 0; list-style: none; }
:where(.home-page) a { color: inherit; text-decoration: none; }
.home-page [hidden] { display: none !important; }
:where([data-runtime-theme="target-u"]:not([data-focus-modality="pointer"])) .home-page :is(a, button):focus-visible {
    outline: var(--theme-focus-ring-width) solid var(--theme-color-focus);
    outline-offset: var(--theme-focus-ring-gap);
}
.home-shell {
    width: 100%;
    min-width: 0;
    max-width: var(--theme-shell-max-width);
    margin-inline: auto;
    padding-inline: var(--theme-shell-padding-inline);
}
.home-brand-mark { display: inline-flex; flex: 0 0 32px; width: 32px; height: 32px; margin-inline-end: var(--theme-spacing-sm); }
.home-brand-mark img { width: 32px; height: 32px; }
.home-brand-mark ~ .brand-wordmark { translate: 0 .5px; }
.home-sky ::selection, .home-close ::selection { background: var(--home-on-navy); color: var(--theme-color-primary); }
.home-search ::selection { background: var(--theme-color-primary); color: var(--theme-color-surface); }

/* ================= Scroll-snap & Section Heights =================
 * <768px & height >=700px: proximity snap (a flick settles on a section; nothing locks the touch scroll).
 * 768..1023px, or height <700px: natural vertical flow (no 100svh empty void, no touch lock-up).
 * >=1024px & height 700..759px: proximity snap.
 * >=1024px & height >=760px: mandatory snap.
 */
html { scroll-padding-top: var(--home-nav-h, 4rem); scroll-behavior: smooth; }
@media (min-width: 1024px) and (min-height: 700px) {
    html { scroll-snap-type: y proximity; }
    .home-sky, .home-promo, .home-close { scroll-snap-align: start; scroll-snap-stop: always; }
    .ui-footer { scroll-snap-align: end; }
    .home-sky { min-height: calc(100svh - var(--home-nav-h)); }
    .home-promo { min-height: calc(100svh - var(--home-nav-h)); display: flex; align-items: center; padding-block: 56px; }
    .home-close { min-height: calc(100svh - var(--home-nav-h) - var(--home-foot-h, 0px)); display: flex; align-items: center; }
}
@media (min-width: 1024px) and (min-height: 760px) {
    html { scroll-snap-type: y mandatory; }
}
@media (max-width: 1023px), (max-height: 699px) {
    html { scroll-snap-type: none; }
    .home-sky, .home-promo, .home-close { min-height: auto; }
    .home-promo { padding-block: 48px; }
}
@media (max-width: 767px) and (min-height: 700px) {
    html { scroll-snap-type: y proximity; }
    .home-sky, .home-promo { scroll-snap-align: start; }
    /* The closing block is shorter than a screen, so its top can never reach the top of the viewport.
       The page bottom is the stop instead; otherwise the section above could pull the scroll back. */
    .ui-footer { scroll-snap-align: end; }
}

/* ================= 1. Hero ================= */
.home-sky {
    position: relative;
    overflow: clip;
    isolation: isolate;
    background:
        radial-gradient(ellipse 52% 64% at 74% 46%, oklch(0.345 0.078 255 / .52), transparent 74%),
        radial-gradient(circle at 16% 18%, oklch(0.235 0.064 255 / .46), transparent 58%),
        var(--theme-color-primary);
    box-shadow: inset 0 -1px 0 oklch(0.997 0.002 255 / .12);
    color: var(--home-on-navy);
}
.home-sky__in { position: relative; z-index: 2; padding-block: 36px 36px; pointer-events: none; }
.home-sky__in > * { pointer-events: auto; }
@media (min-width: 768px) and (max-width: 1023px) { .home-sky__in { padding-block: 52px 48px; } }
@media (min-width: 1024px) {
    .home-sky__in {
        min-height: calc(100svh - var(--home-nav-h));
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding-block: 52px 60px;
    }
}
@media (min-width: 1024px) and (max-height: 699px) { .home-sky__in { min-height: auto; padding-block: 32px 36px; } }

.home-sky__copy { max-width: 580px; min-width: 0; }
@media (min-width: 1024px) and (max-width: 1179px) { .home-sky__copy { max-width: 495px; } }
@media (min-width: 1180px) and (max-width: 1279px) { .home-sky__copy { max-width: 545px; } }

.home-sky__eyebrow { color: var(--home-on-navy); font: 500 15px/1.5 var(--theme-font-sans); letter-spacing: .1em; }
.home-sky__eyebrow .brand-wordmark { margin-inline-end: .48em; }
@media (min-width: 768px) { .home-sky__eyebrow { font-size: 16px; } }
@media (min-width: 1180px) { .home-sky__eyebrow { font-size: 18px; } }
.home-sky h1 {
    margin-top: 14px;
    max-width: 15em;
    font: var(--theme-text-page-title--font-weight) 28px/1.36 var(--theme-font-serif);
    letter-spacing: .01em;
    color: var(--home-on-navy);
}
@media (min-width: 768px) { .home-sky h1 { font-size: 38px; line-height: 1.3; } }
@media (min-width: 1180px) { .home-sky h1 { font-size: 44px; line-height: 1.28; } }

/* ---- Hero console: one unified architectural surface with flush optical header tabs ---- */
.home-console {
    margin-top: 26px;
    max-width: 580px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    container: home-console / inline-size;
}
.home-console__surface {
    min-width: 0;
    background: var(--theme-color-surface);
    color: var(--theme-color-foreground);
    border: 1px solid oklch(0.997 0.002 255 / .18);
    box-shadow:
        0 24px 56px oklch(0.08 0.04 255 / .42),
        0 2px 10px oklch(0.08 0.04 255 / .18);
}
.home-console__tabs {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    background: var(--theme-color-surface-muted);
    border-bottom: 1px solid var(--theme-color-border);
}
.home-console__tabs::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50%;
    height: 2px;
    background: var(--theme-color-primary);
    transform: translateX(0);
    transition: transform 280ms var(--home-ease);
    pointer-events: none;
    z-index: 2;
}
.home-console__tabs[data-active-index="1"]::after { transform: translateX(100%); }
.home-console__body { min-width: 0; }
/* 校系探索 sits cleanly beneath the console on the dark sky. */
.home-console__explore {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 10px;
    color: var(--home-on-navy);
    font: 500 13px/1.5 var(--theme-font-sans);
}
.home-console__explore > span { color: var(--home-on-navy-muted); }
.home-console__explore a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    font: 600 14px/1.5 var(--theme-font-sans);
}
.home-console__route-arrow { transition: transform var(--home-t) var(--home-ease), color var(--home-t); }
@media (pointer: coarse) { .home-console__explore a { min-height: 44px; } }

.home-console__tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    padding: 0 20px;
    border: 0;
    background: transparent;
    color: var(--theme-color-muted);
    font: 500 15px/1.4 var(--theme-font-sans);
    letter-spacing: .04em;
    cursor: pointer;
    transition: background-color var(--home-t), color var(--home-t);
}
.home-console__tab + .home-console__tab { border-inline-start: 1px solid var(--theme-color-border); }
.home-console__tab-icon {
    width: 15px;
    height: 15px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .68;
    transition: opacity var(--home-t);
}
.home-console__tab:hover {
    background: color-mix(in oklch, var(--theme-color-surface) 55%, var(--theme-color-surface-muted));
    color: var(--theme-color-primary-light);
}
.home-console__tab[aria-selected="true"] {
    z-index: 1;
    background: var(--theme-color-surface);
    color: var(--theme-color-primary);
    font-weight: 600;
}
.home-console__tab[aria-selected="true"] .home-console__tab-icon { opacity: 1; }
.home-console__body {
    padding: 22px 24px 22px;
    background: var(--theme-color-surface);
    color: var(--theme-color-foreground);
}
.home-console__panel + .home-console__panel { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--theme-color-border); }
.home-js .home-console__panel { margin-top: 0; padding-top: 0; border-top: 0; }
/* Both panels share one grid cell once tabs run, so switching never changes the console height. */
.home-tabs-ready .home-console__body { display: grid; }
.home-tabs-ready .home-console__panel { grid-area: 1 / 1; min-width: 0; display: flex; flex-direction: column; }
.home-tabs-ready .home-console__panel[hidden] { display: flex !important; visibility: hidden; pointer-events: none; }
.home-console__lead { color: var(--theme-color-muted); font: 400 13px/1.5 var(--theme-font-sans); letter-spacing: .01em; }

/* Search inside the console: compact left-aligned track chips with square selection dot + crisp field */
.home-console .home-search { margin-top: 14px; max-width: none; border: 0; box-shadow: none; }
.home-console .home-search__tracks { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 0; background: none; }
.home-console .home-search__tracks label { flex: none; }
.home-console .home-search__tracks label + label { border-inline-start: 0; }
.home-console .home-search__tracks span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid var(--theme-color-border);
    background: var(--theme-color-surface);
    color: var(--theme-color-muted);
    font: 500 13.5px/1.4 var(--theme-font-sans);
    transition: background-color var(--home-t), border-color var(--home-t), color var(--home-t);
}
.home-console .home-search__tracks span::before {
    content: "";
    width: 6px;
    height: 6px;
    flex: none;
    border: 1px solid var(--theme-color-border-strong);
    background: transparent;
    transition: background-color var(--home-t), border-color var(--home-t);
}
.home-console .home-search__tracks small { opacity: .72; transition: opacity var(--home-t); }
.home-console .home-search__tracks label:hover span {
    background: var(--theme-color-surface-muted);
    border-color: var(--theme-color-border-strong);
    color: var(--theme-color-primary);
}
.home-console .home-search__tracks input:checked + span {
    background: var(--theme-color-surface-selected);
    border-color: color-mix(in oklch, var(--theme-color-primary) 26%, transparent);
    color: var(--theme-color-primary);
    font-weight: 600;
    box-shadow: none;
}
.home-console .home-search__tracks input:checked + span::before {
    border-color: var(--theme-color-primary);
    background: var(--theme-color-primary);
}
.home-console .home-search__tracks input:checked + span small { opacity: .92; }
@media (pointer: coarse) {
    .home-console .home-search__tracks span { min-height: 44px; }
}
.home-console .home-search__row { margin-top: 12px; }
/* The frame belongs to the field only, so the button runs to the row's outer edge instead of sitting inside the frame. */
.home-console .home-search__field {
    border: 1px solid var(--theme-color-border-strong);
    border-inline-end: 0;
    transition: border-color var(--home-t);
}
.home-console .home-search__field:hover { border-color: color-mix(in oklch, var(--theme-color-primary) 42%, var(--theme-color-border-strong)); }
.home-console .home-search__field:focus-within { border-color: var(--theme-color-primary); }
.home-console .home-search__tracks[hidden] + .home-search__row { margin-top: 0; }

/* ---- Track-aware search ---- */
.home-search {
    position: relative;
    margin-top: 22px;
    max-width: 580px;
    background: var(--theme-color-surface);
    color: var(--theme-color-foreground);
    border: 1px solid oklch(0.997 0.002 255 / .2);
    box-shadow: 0 18px 44px oklch(0.11 0.04 255 / .36);
}
.home-search__tracks { display: flex; margin: 0; padding: 0; min-width: 0; border: 0; border-bottom: 1px solid var(--theme-color-border); background: var(--theme-color-surface-muted); }
.home-search__tracks label { position: relative; flex: 1; min-width: 0; cursor: pointer; }
.home-search__tracks label + label { border-inline-start: 1px solid var(--theme-color-border); }
.home-search__tracks input { position: absolute; opacity: 0; pointer-events: none; }
.home-search__tracks span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 6px 10px;
    font: 500 13px/1.4 var(--theme-font-sans);
    letter-spacing: .01em;
    color: var(--theme-color-muted);
    transition: color var(--home-t), background-color var(--home-t);
}
.home-search__tracks small { font: 500 12px/1.4 var(--theme-font-data); font-variant-numeric: tabular-nums; }
.home-search__tracks label:hover span { color: var(--theme-color-primary); background: var(--theme-color-surface); }
.home-search__tracks input:checked + span {
    color: var(--theme-color-primary);
    background: var(--theme-color-surface-selected);
    box-shadow: inset 0 -2px 0 var(--theme-color-primary);
}
:where([data-runtime-theme="target-u"]:not([data-focus-modality="pointer"])) .home-search__tracks input:focus-visible + span {
    outline: var(--theme-focus-ring-width) solid var(--theme-color-focus);
    outline-offset: var(--theme-focus-ring-gap);
}
.home-search__row { display: flex; align-items: stretch; }
.home-search__field { position: relative; flex: 1; min-width: 0; border-inline-end: 1px solid var(--theme-color-border); }
.home-search__field::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 2px;
    background: var(--theme-color-primary);
    clip-path: inset(0 100% 0 0);
    transition: clip-path var(--home-t) var(--home-ease);
    pointer-events: none;
}
.home-search__field:focus-within::after { clip-path: inset(0); }
.home-search__field svg {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    fill: none;
    stroke: var(--theme-color-muted);
    stroke-width: 1.9;
    stroke-linecap: round;
    transition: stroke var(--home-t);
}
.home-search__field:focus-within svg { stroke: var(--theme-color-primary); }
.home-search__field input {
    width: 100%;
    height: 50px;
    padding: 0 12px 0 40px;
    border: 0;
    background: transparent;
    color: var(--theme-color-foreground);
    font: 500 15px/1.5 var(--theme-font-sans);
}
.home-search__field input::placeholder { color: color-mix(in oklch, var(--theme-color-muted) 84%, transparent); }
.home-search__field input:focus, .home-search__field input:focus-visible { outline: none; box-shadow: none; }
:where([data-runtime-theme="target-u"]:not([data-focus-modality="pointer"])) .home-search__field:focus-within {
    outline: var(--theme-focus-ring-width) solid var(--theme-color-focus);
    outline-offset: var(--theme-focus-ring-gap);
    z-index: 2;
}

/* ---- 搜尋 button: telescope → gold pole star on hover/focus ---- */
.home-scope {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 16px 0 20px;
    border: 0;
    background: var(--theme-color-primary);
    color: var(--theme-color-surface);
    font: 600 15px/1.5 var(--theme-font-sans);
    cursor: pointer;
    flex: none;
}
.home-scope__c { position: absolute; width: 12px; height: 12px; border: 0 solid var(--home-on-navy); opacity: 0; pointer-events: none; transition: transform 220ms var(--home-ease), opacity 160ms ease-out; }
.home-scope__c--tl { top: 6px; left: 6px; border-top-width: 1.5px; border-left-width: 1.5px; transform: translate(-6px, -6px); }
.home-scope__c--br { right: 6px; bottom: 6px; border-right-width: 1.5px; border-bottom-width: 1.5px; transform: translate(6px, 6px); }
.home-scope__icon { position: relative; display: inline-block; width: 28px; height: 28px; flex: none; }
.home-scope__icon svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.home-scope__tele { transition: transform 260ms var(--home-ease) 60ms, opacity 200ms ease-out 60ms; }
.home-scope__star { padding: 4px; transform: scale(.2) rotate(-45deg); opacity: 0; transition: transform 300ms var(--home-ease), opacity 180ms ease-out; }
.home-scope__star path { fill: var(--theme-color-decision); }
.home-scope:hover .home-scope__c, .home-scope:focus-visible .home-scope__c { opacity: 1; transform: none; }
.home-scope:hover .home-scope__tele, .home-scope:focus-visible .home-scope__tele { opacity: 0; transform: rotate(20deg) scale(.6); }
.home-scope:hover .home-scope__star, .home-scope:focus-visible .home-scope__star { opacity: 1; transform: none; transition-delay: 100ms, 100ms; }
@media (max-width: 479px) {
    .home-scope { width: 52px; padding: 0; }
    .home-scope__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---- 試試看: quiet editorial shortcut chips under the field ---- */
.home-tries {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--theme-color-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.home-tries > span { margin-right: 4px; color: var(--theme-color-muted); }
.home-tries button {
    min-height: 28px;
    padding: 2px 10px;
    border: 1px solid var(--theme-color-border);
    background: var(--theme-color-surface-muted);
    color: var(--theme-color-foreground);
    font: 500 12.5px/1.5 var(--theme-font-sans);
    cursor: pointer;
    transition: background-color var(--home-t), border-color var(--home-t), color var(--home-t);
}
.home-tries button:hover {
    background: var(--theme-color-surface-selected);
    border-color: color-mix(in oklch, var(--theme-color-primary) 26%, transparent);
    color: var(--theme-color-primary);
}
.home-tries button[aria-pressed="true"] {
    background: var(--theme-color-surface-selected);
    border-color: var(--theme-color-primary);
    color: var(--theme-color-primary);
}
@media (pointer: coarse) { .home-tries button { min-height: 44px; } }

/* ---- Console: editorial divided action list for 落點分析 (no nested bordered boxes) ---- */
.home-console__routes {
    margin-top: 14px;
    display: grid;
    gap: 0;
    border-top: 1px solid var(--theme-color-border);
}
.home-console__route {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 16px;
    padding: 15px 12px;
    border-bottom: 1px solid var(--theme-color-border);
    color: var(--theme-color-primary);
    transition: background-color var(--home-t), color var(--home-t);
}
.home-console__route::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--theme-color-primary);
    transform: scaleY(0);
    transition: transform 220ms var(--home-ease);
}
.home-console__route-title { font: 600 15.5px/1.4 var(--theme-font-sans); letter-spacing: .01em; }
.home-console__route-sub { grid-column: 1; margin-top: 3px; color: var(--theme-color-muted); font: 400 13px/1.45 var(--theme-font-sans); }
.home-console__route-arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--theme-color-primary);
}
.home-console__route-arrow svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.home-console__route:hover {
    background: color-mix(in oklch, var(--theme-color-primary-soft) 52%, var(--theme-color-surface));
    color: var(--theme-color-primary-light);
}
.home-console__route:hover::before { transform: scaleY(1); }
.home-console__route:hover .home-console__route-arrow { transform: translateX(4px); color: var(--theme-color-primary-light); }

/* Short laptop screens */
@media (min-width: 1024px) and (max-height: 780px) {
    .home-sky__in { padding-block: 24px 32px; }
    .home-sky h1 { font-size: 34px; line-height: 1.28; }
    .home-console { margin-top: 18px; gap: 12px; }
    .home-console__tab { min-height: 44px; }
    .home-console__body { padding-block: 18px; }
    .home-search { margin-top: 14px; }
    .home-console .home-search { margin-top: 12px; }
    .home-search__field input { height: 46px; }
    .home-tries { margin-top: 12px; padding-top: 10px; }
    .home-console__routes { margin-top: 12px; }
    .home-console__route { padding-block: 12px; }
    .home-cue { bottom: 6px; }
}
@media (max-width: 767px) {
    .home-console { margin-top: 24px; gap: 14px; }
    .home-console__surface { box-shadow: 0 14px 36px oklch(0.08 0.04 255 / .36); }
    .home-console__tab { min-width: 0; padding: 0 12px; min-height: 46px; font-size: 14px; gap: 6px; }
    .home-console__tab-icon { width: 14px; height: 14px; }
    .home-console__body { padding: 16px 16px 18px; }
    .home-search { margin-top: 16px; box-shadow: 0 8px 24px oklch(0.12 0.04 255 / .3); }
    .home-console .home-search { margin-top: 14px; }
    .home-console .home-search__tracks span { min-height: 40px; padding: 0 12px; font-size: 13px; }
    .home-console .home-search__row { margin-top: 14px; }
    .home-search__field input { height: 48px; font-size: 15px; }
    .home-scope__icon { width: 26px; height: 26px; }
    .home-scope__c--tl { top: 4px; left: 4px; }
    .home-scope__c--br { right: 4px; bottom: 4px; }
    .home-tries { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-block: 3px; }
    .home-tries::-webkit-scrollbar { display: none; }
    .home-tries > span, .home-tries button { flex: none; white-space: nowrap; }
    .home-tries button { min-height: 36px; }

    /* Phone: the navy block fills the screen, and the console keeps calm editorial breathing room. */
    .home-sky__in { min-height: calc(100svh - var(--home-nav-h, 4rem)); padding-block: clamp(44px, 11svh, 96px) 44px; }
    .home-sky__eyebrow { font-size: 13px; }
    .home-sky h1 { margin-top: 12px; font-size: var(--theme-text-page-title); line-height: 1.28; text-wrap: balance; }
    .home-console__lead { font-size: 12.5px; }
    .home-console__routes { margin-top: 10px; }
    .home-console__route { padding: 9px 6px; column-gap: 10px; }
    .home-console__route-title { font-size: 15px; }
    .home-console__route-sub { margin-top: 2px; font-size: 12px; }
    .home-console__route-arrow { width: 24px; height: 24px; }
    .home-console__route-arrow svg { width: 16px; height: 16px; }
}
/* No star chart below 1024px, so the 試試看 row has nothing to light up; both panels stay top-aligned so the lead copy never shifts when switching tabs. */
@media (max-width: 1023px) {
    .home-tries { display: none; }
}

/* ---- Focal-centered dynamic orbital star chart (preserves e437823c cursor avoidance) ---- */
.home-chart { position: absolute; inset: 0; z-index: 1; overflow: clip; }
.home-chart__astro { position: absolute; inset: 0; pointer-events: none; transition: opacity 360ms ease-out; }
.home-sky[data-searching="true"] .home-chart__astro { opacity: .45; }
.home-orbit { position: absolute; left: 0; top: 0; width: 640px; height: 640px; margin: -320px 0 0 -320px; overflow: visible; pointer-events: none; will-change: transform; }
.home-astro__arc { fill: none; stroke-width: 1.15; stroke-linecap: butt; vector-effect: non-scaling-stroke; }
.home-orbit__head { fill: var(--home-on-navy); opacity: .72; }
.home-js .home-astro__arc { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: home-draw-astro 860ms var(--home-ease) var(--arc-d, 80ms) forwards; }
.home-js .home-orbit__head { opacity: 0; animation: home-astro-fade 480ms ease-out 520ms forwards; --astro-alpha: .72; }
@keyframes home-draw-astro { to { stroke-dashoffset: 0; } }
@keyframes home-astro-fade { to { opacity: var(--astro-alpha, 1); } }

.home-chart__field { position: absolute; inset: 0; transform-origin: 77% 47%; transition: transform 920ms var(--home-ease); }
.home-chart__lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.home-chart__lines polyline {
    fill: none;
    stroke: var(--home-on-navy);
    stroke-width: 1.15;
    stroke-dasharray: var(--len, 0);
    stroke-dashoffset: var(--len, 0);
    opacity: .72;
    transition: stroke-dashoffset 680ms var(--home-ease);
}
.home-chart__lines polyline.is-drawn { stroke-dashoffset: 0; }
.home-star { position: absolute; transform: translate(-50%, -50%); pointer-events: none; }
.home-star i { display: block; width: var(--sz, 3px); height: var(--sz, 3px); margin: 0 auto; background: var(--home-on-navy); opacity: var(--base, .35); transition: opacity 240ms ease-out, transform 240ms ease-out, box-shadow 240ms ease-out; }
.home-star--twinkle i { animation: home-twinkle var(--tw-dur, 5.6s) ease-in-out var(--tw-delay, 1.2s) infinite; }
@keyframes home-twinkle { 0%, 100% { opacity: var(--base, .22); } 50% { opacity: calc(var(--base, .22) + .28); } }
.home-star b { position: absolute; left: 50%; top: 100%; margin-top: 6px; padding: 2px 6px; transform: translateX(-50%); background: oklch(0.2 0.055 255 / .88); white-space: nowrap; font: 500 12px/1.4 var(--theme-font-sans); letter-spacing: .02em; color: var(--home-on-navy); opacity: 0; transition: opacity 180ms ease-out, margin-top 220ms var(--home-ease); }
.home-star--edge b { left: auto; right: -4px; transform: none; }
/* Labelled stars are clickable on desktop: a 36px hit box, the label on hover, and the lens-highlighted star via the sky. */
@media (min-width: 1024px) {
    .home-star[data-term] { pointer-events: auto; cursor: pointer; }
    .home-star[data-term]::before { content: ""; position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; transform: translate(-50%, -50%); }
    .home-star[data-term] b { pointer-events: none; }
    .home-star[data-term]:hover { z-index: 1; }
    .home-star[data-term]:hover i { opacity: 1; transform: scale(1.85); box-shadow: 0 0 10px oklch(0.997 0.002 255 / .62); }
    .home-star[data-term]:hover b { opacity: 1; }
    .home-sky.is-star-near .home-chart { cursor: pointer; }
}
.home-star.is-glint i { opacity: .56; transform: scale(1.18); }
.home-star.is-near i { opacity: .8; transform: scale(1.4); }
.home-star.is-hit i { opacity: 1; transform: scale(1.85); box-shadow: 0 0 10px oklch(0.997 0.002 255 / .62); transition-delay: var(--match-delay, 0ms); }
.home-star.is-hit b { opacity: 1; transition-delay: var(--match-delay, 0ms); }
.home-star.is-primary i { opacity: 0; box-shadow: none; }
.home-star.is-primary b { margin-top: 13px; }
.home-star.is-dim i { opacity: .1; animation: none; }
.home-js .home-star { opacity: 0; animation: home-star-in 560ms var(--home-ease) forwards; animation-delay: var(--in, 0ms); }
@keyframes home-star-in { from { opacity: 0; transform: translate(-50%, -50%) scale(.35); } to { opacity: 1; transform: translate(-50%, -50%); } }

.home-lens { position: absolute; left: 0; top: 0; width: 148px; height: 148px; margin: -74px 0 0 -74px; pointer-events: none; will-change: transform; }
@media (min-width: 1024px) and (max-width: 1179px) { .home-lens { width: 132px; height: 132px; margin: -66px 0 0 -66px; } }
.home-lens::before { content: ""; position: absolute; inset: 0; border: 1px solid oklch(0.997 0.002 255 / .18); background: radial-gradient(closest-side, oklch(0.997 0.002 255 / .1), transparent 78%); transition: border-color 240ms ease-out, transform 480ms var(--home-ease); }
.home-lens__focus { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transition: transform 360ms var(--home-ease); }
.home-focus__ring { fill: none; stroke: var(--home-on-navy); stroke-width: 1; opacity: .24; transition: opacity 240ms ease-out; vector-effect: non-scaling-stroke; }
.home-focus__sweep { fill: none; stroke-width: 1.25; transform-origin: 0 0; animation: home-focus-spin 12s linear infinite; vector-effect: non-scaling-stroke; }
.home-focus__core { fill: none; stroke: var(--home-on-navy); stroke-width: 1; opacity: .42; transition: opacity 200ms ease-out; vector-effect: non-scaling-stroke; }
.home-focus__dot { fill: var(--home-on-navy); opacity: .82; transition: opacity 180ms ease-out; }
@keyframes home-focus-spin { to { transform: rotate(360deg); } }
.home-lens__c { position: absolute; width: 20px; height: 20px; border: 0 solid var(--home-on-navy); transition: transform 320ms var(--home-ease); }
.home-lens__c--tl { top: -5px; left: -5px; border-top-width: 2px; border-left-width: 2px; }
.home-lens__c--br { right: -5px; bottom: -5px; border-right-width: 2px; border-bottom-width: 2px; }
.home-lens.is-attentive::before { border-color: oklch(0.997 0.002 255 / .32); }
.home-lens.is-attentive .home-lens__focus { transform: scale(.94); }
.home-lens.is-attentive .home-focus__ring { opacity: .38; }
.home-lens.is-attentive .home-lens__c--tl { transform: translate(5px, 5px); }
.home-lens.is-attentive .home-lens__c--br { transform: translate(-5px, -5px); }
.home-lens.is-seeking .home-lens__c--tl { transform: translate(-2px, -2px); }
.home-lens.is-seeking .home-lens__c--br { transform: translate(2px, 2px); }
.home-lens.is-locked::before, .home-lens.is-locking::before { border-color: oklch(0.997 0.002 255 / .38); }
.home-lens.is-locked .home-lens__focus, .home-lens.is-locking .home-lens__focus { transform: scale(.86); }
.home-lens.is-locked .home-focus__ring, .home-lens.is-locking .home-focus__ring { opacity: .48; }
.home-lens.is-locked :is(.home-focus__core, .home-focus__dot) { opacity: 0; }
.home-lens.is-locked .home-lens__c--tl, .home-lens.is-locking .home-lens__c--tl { transform: translate(16px, 16px); }
.home-lens.is-locked .home-lens__c--br, .home-lens.is-locking .home-lens__c--br { transform: translate(-16px, -16px); }
.home-js .home-lens { opacity: 0; animation: home-fade 480ms var(--home-ease) 440ms forwards; }
.home-js .home-lens::before { animation: home-lens-scale 520ms var(--home-ease) 440ms both; }
@keyframes home-fade { to { opacity: 1; } }
@keyframes home-lens-scale { from { transform: scale(1.1); } to { transform: none; } }
.home-target { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; pointer-events: none; transform: scale(0) rotate(-45deg); transition: transform 420ms var(--home-ease); }
.home-target.is-on { transform: scale(1) rotate(0deg); }
.home-target path { fill: var(--theme-color-decision); }

/* Mobile/tablet: subtle static upper-right arcs + protective gradient, zero spin drain */
@media (max-width: 1023px) {
    .home-chart { opacity: .66; }
    .home-chart::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(112deg, var(--theme-color-primary) 28%, oklch(0.265 0.07 255 / .74) 68%, transparent);
        pointer-events: none;
    }
    .home-chart__field { left: -18%; }
    /* One ring cut by the bottom-right corner; the arcs ride it and drift on the compositor (no rAF). Lifted above the protective gradient. */
    .home-chart__astro { z-index: 1; --home-ring-r: min(56vw, 25svh); }
    .home-chart__astro::before {
        content: "";
        position: absolute;
        right: calc(14px - var(--home-ring-r));
        bottom: calc(22px - var(--home-ring-r));
        width: calc(var(--home-ring-r) * 2);
        height: calc(var(--home-ring-r) * 2);
        border: 1px solid oklch(0.997 0.002 255 / .3);
        border-radius: 50%;
    }
    .home-orbit { left: calc(100% - 14px); top: calc(100% - 22px); width: calc(var(--home-ring-r) * 2.353); height: calc(var(--home-ring-r) * 2.353); margin: calc(var(--home-ring-r) * -1.1765) 0 0 calc(var(--home-ring-r) * -1.1765); will-change: auto; animation: home-orbit-drift 84s linear infinite; }
    .home-orbit--mid { animation-duration: 60s; animation-direction: reverse; }
    .home-orbit--near { animation-duration: 42s; }
    .home-lens, .home-star b, .home-target { display: none; }
}
@keyframes home-orbit-drift { to { rotate: 360deg; } }
/* Phone focus mark: background-weight brackets + ring (84px, dimmed like the chart), centred on the upper edge of the headline's 志願 — deliberately off the glyphs. */
.home-focus-mark { display: none; }
@media (max-width: 767px) {
    .home-title__focus { position: relative; display: inline-block; }
    .home-focus-mark { display: block; position: absolute; left: 68%; top: 38%; z-index: -1; width: 84px; height: 84px; margin: -42px 0 0 -42px; opacity: .4; pointer-events: none; }
    .home-focus-mark i { position: absolute; inset: 14px; border: 1px solid oklch(0.997 0.002 255 / .26); border-radius: 50%; }
    .home-focus-mark i::before { content: ""; position: absolute; inset: -1px; border: 1.5px solid transparent; border-top-color: var(--home-on-navy); border-radius: 50%; animation: home-focus-spin 9s linear infinite; }
    .home-focus-mark i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; background: var(--home-on-navy); }
    .home-focus-mark .home-lens__c { width: 16px; height: 16px; animation: home-focus-seek 4.8s var(--home-ease) infinite alternate; }
    .home-focus-mark .home-lens__c--tl { top: 0; left: 0; }
    .home-focus-mark .home-lens__c--br { right: 0; bottom: 0; --seek: -7px; }
}
@keyframes home-focus-seek { 0%, 30% { transform: none; } 70%, 100% { transform: translate(var(--seek, 7px), var(--seek, 7px)); } }

.home-cue {
    position: absolute;
    left: 50%;
    bottom: 14px;
    z-index: 3;
    transform: translateX(-50%);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-height: 44px;
    padding: 4px 12px;
    color: var(--home-on-navy-muted);
    font: 500 12px/1.5 var(--theme-font-sans);
    letter-spacing: .04em;
    transition: color var(--home-t);
}
.home-cue::before { content: ""; width: 1px; height: 10px; background: currentColor; opacity: .45; }
.home-cue:hover { color: var(--home-on-navy); }
.home-cue svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; animation: home-nudge 1.8s var(--home-ease) infinite; }
.home-cue:hover svg { animation-play-state: paused; }
@keyframes home-nudge { 0%, 100% { transform: translateY(0); opacity: .6; } 50% { transform: translateY(5px); opacity: 1; } }
@media (min-width: 768px) and (max-width: 1023px), (max-height: 699px) { .home-cue { display: none; } }
:is(.home-sky.is-offscreen, .home-page.is-motion-paused) :is(.home-star--twinkle i, .home-cue svg, .home-focus__sweep, .home-orbit, .home-focus-mark i::before, .home-focus-mark .home-lens__c) { animation-play-state: paused; }

/* ================= 2–4. Promotion Sections ================= */
.home-promo { border-bottom: 1px solid var(--theme-color-border); }
.home-promo--surface { background: var(--theme-color-surface); }
.home-promo__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    align-items: center;
}
.home-promo__grid > * { min-width: 0; }
@media (min-width: 1024px) {
    .home-promo__grid { grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); gap: 64px; }
    .home-promo__grid--flip { grid-template-columns: minmax(0, 1.14fr) minmax(0, .86fr); }
    .home-promo__grid--flip > :first-child { order: 2; }
}
.home-promo__index {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--theme-color-muted);
    font: 500 13px/1.4 var(--theme-font-data);
    font-variant-numeric: tabular-nums;
    letter-spacing: .06em;
}
.home-promo__index::after { content: ""; width: 24px; height: 1px; background: var(--theme-color-border-strong); }
.home-promo h2 { font: var(--theme-text-page-title--font-weight) var(--theme-text-section-title)/1.35 var(--theme-font-serif); color: var(--theme-color-primary); }
@media (min-width: 768px) { .home-promo h2 { font-size: 34px; } }
.home-promo__lede { margin-top: 12px; max-width: 28em; color: var(--theme-color-muted); font-size: var(--theme-text-body); line-height: 1.68; }
.home-promo__actions { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.home-promo__subnote {
    margin-top: 14px;
    font: 400 13px/1.6 var(--theme-font-sans);
    color: var(--theme-color-muted);
}
.home-promo__subnote strong { color: var(--theme-color-primary); font-weight: 600; }

.home-btn-commit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    background: var(--theme-color-primary);
    color: var(--theme-color-surface);
    font: 600 14px/1.4 var(--theme-font-sans);
    transition: background-color var(--home-t);
}
.home-btn-commit:hover { background: var(--theme-color-primary-hover); }

.home-js .home-promo [data-home-in] { opacity: 0; transform: translateY(12px); transition: opacity 540ms var(--home-ease), transform 540ms var(--home-ease); transition-delay: calc(var(--i, 0) * 70ms); }
.home-js .home-promo.is-in [data-home-in] { opacity: 1; transform: none; }

/* FOUC prevention before home.js sets .home-tabs-ready; no-JS sees all panels stacked */
.home-js:not(.home-tabs-ready) [data-home-panel]:not([data-home-panel-default]) { display: none; }

/* ================= 2. Editorial 3-Chart Showcase (#home-sources) ================= */
.home-sources-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}
.home-sources-grid > * { min-width: 0; }
@media (max-width: 767px) {
    #home-sources { min-height: calc(100svh - var(--home-nav-h, 4rem)); display: flex; align-items: center; padding-block: 24px; }
    #home-sources .home-sources-grid { gap: 16px; }
}
@media (max-width: 379px) {
    #home-sources { padding-block: 16px; }
    #home-sources .home-sources-grid { gap: 12px; }
    #home-sources > .home-shell { width: 100%; }
}
@media (min-width: 1024px) {
    .home-sources-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-rows: auto auto;
        grid-template-areas:
            "copy card"
            "nav  card";
        gap: 24px 80px;
        align-items: center;
    }
    .home-sources-copy { grid-area: copy; align-self: end; }
    .home-chart-nav { grid-area: nav; align-self: start; }
    .home-brief { grid-area: card; }
}

/* Chart switcher: frameless segment group (DESIGN.md Segmented anatomy).
   Selected = surface-selected + Navy ink only; no side stripe, no underline. */
.home-chart-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
}
.home-chart-nav__btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    min-height: 52px;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    color: var(--theme-color-foreground);
    text-align: start;
    cursor: pointer;
    transition: color var(--home-t), background-color var(--home-t);
}
.home-chart-nav__label { font: 600 13px/1.35 var(--theme-font-sans); color: inherit; }
.home-chart-nav__page { font: 400 12px/1.35 var(--theme-font-sans); color: var(--theme-color-muted); transition: color var(--home-t); }
@media (hover: hover) {
    .home-chart-nav__btn:hover { background: var(--theme-color-surface-muted); color: var(--theme-color-primary); }
}
.home-chart-nav__btn[aria-selected="true"] { background: var(--theme-color-surface-selected); color: var(--theme-color-primary); }
.home-chart-nav__btn[aria-selected="true"] .home-chart-nav__page { color: var(--theme-color-primary); }

@media (min-width: 1024px) {
    .home-chart-nav { grid-template-columns: minmax(0, 1fr); max-width: 28rem; }
    .home-chart-nav__btn {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 14px;
    }
    .home-chart-nav__label { font-size: 15px; }
    .home-chart-nav__page { font-size: 13px; white-space: nowrap; }
}
@media (max-width: 479px) {
    .home-chart-nav__btn { padding-inline: 6px; }
    .home-chart-nav__label { font-size: 12px; }
    .home-chart-nav__page { font-size: 11px; }
}

/* Compact, airy visual canvas (zero heavy gray header/footer chrome) */
.home-brief { background: var(--theme-color-surface); border: 1px solid var(--theme-color-border-strong); min-width: 0; }
.home-brief__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--theme-color-border);
}
.home-brief__id { display: flex; flex-wrap: wrap; align-items: flex-end; align-items: last baseline; gap: 2px 10px; min-width: 0; }
/* Same identity hierarchy as the product's Entity card: muted school line over the Navy department name. */
.home-brief__name { display: grid; min-width: 0; }
.home-brief__school { color: var(--theme-color-muted); font: 500 14px/1.5 var(--theme-font-sans); }
.home-brief__dept { color: var(--theme-color-primary); font: var(--theme-text-entity-title--font-weight) var(--theme-text-entity-title)/var(--theme-text-entity-title--line-height) var(--theme-font-sans); }
.home-brief__more {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    font: 600 13px/1.4 var(--theme-font-sans);
    color: var(--theme-color-primary);
    transition: color var(--home-t) var(--home-ease);
}
/* Text guide (DESIGN.md), shared by the homepage's arrow links: unlined at rest; on hover a 1px rule is revealed
   under the text only and the arrow moves on its own. On light surfaces the ink also lightens. */
.home-guide__label { position: relative; }
.home-guide__label::after {
    content: "";
    position: absolute;
    inset: auto 0 -3px;
    border-block-start: 1px solid currentColor;
    clip-path: inset(0 100% 0 0);
    transition: clip-path var(--home-t) var(--home-ease);
}
.home-guide__arrow { transition: transform var(--home-t) var(--home-ease); }
a:hover > .home-guide__label::after { clip-path: inset(0); }
a:hover > .home-guide__arrow { transform: translateX(5px); }
.home-brief__more:hover, .home-lens-card__links a:hover { color: var(--theme-color-primary-light); }
@media (pointer: coarse) { .home-brief__more { min-height: 44px; } }

.home-brief__viewport { min-width: 0; }
@media (min-width: 1024px) {
    .home-js .home-brief__viewport { display: grid; min-height: 356px; }
}
.home-brief__panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
    padding: 16px 20px 18px;
    border-bottom: 1px solid var(--theme-color-border);
}
.home-brief__panel:last-child { border-bottom: 0; }
.home-js .home-brief__panel { border-bottom: 0; }
@media (max-width: 1023px) {
    .home-tabs-ready .home-brief__viewport { display: grid; }
    .home-tabs-ready .home-brief__panel { grid-area: 1 / 1; }
    .home-tabs-ready .home-brief__panel[hidden] { display: grid !important; visibility: hidden; }
    /* SVG marks carry their own visibility attribute; keep them from showing through. */
    .home-tabs-ready .home-brief__panel[hidden] * { visibility: hidden; }
}
.home-brief__panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
}
/* Which product page the chart comes from, read as "page ／ chart". */
.home-brief__from { font: 400 14px/1.4 var(--theme-font-sans); color: var(--theme-color-muted); }
.home-brief__from::after { content: "／"; margin-inline-start: 8px; color: var(--theme-color-border-strong); }
.home-brief__k { font: 600 14px/1.4 var(--theme-font-sans); color: var(--theme-color-primary); }
.home-brief__hint { margin-inline-start: auto; color: var(--theme-color-muted); }
@media (prefers-reduced-motion: no-preference) {
    .home-tabs-ready .home-brief__panel:not([hidden]) { animation: home-panel-in 220ms var(--home-ease); }
}
@keyframes home-panel-in { from { opacity: 0; } }

/* Panel 1: Compact PR trend */
.home-trend { container: home-trend / inline-size; display: grid; gap: 6px; min-width: 0; }
.home-js .home-trend { grid-template-rows: minmax(168px, 1fr) auto auto; }
@media (max-width: 767px) {
    .home-js .home-trend { grid-template-rows: minmax(124px, 1fr) auto auto; }
    /* Phones: the legend sits left, midway between the title line and the chart (its top axis label).
       The plot keeps 22px of empty headroom above the top gridline, so the chart is pulled up into it. */
    .home-trend__legend { flex-basis: 100%; margin-inline-start: 0; }
    #home-panel-trend .home-brief__panel-head { row-gap: 9px; }
    .home-js #home-panel-trend .home-trend { margin-top: -17px; }
}
/* Legend key: a small and a large dot, since dot size encodes the quota. */
.home-trend__legend { display: inline-flex; align-items: center; gap: 6px; }
.home-trend__key { display: inline-flex; align-items: center; gap: 2px; }
.home-trend__key::before, .home-trend__key::after { content: ""; border-radius: 50%; background: var(--theme-color-primary-light); }
.home-trend__key::before { width: 5px; height: 5px; }
.home-trend__key::after { width: 9px; height: 9px; }
.home-trend__plot { position: relative; min-width: 0; }
.home-trend__plot svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: visible; }
.home-trend__grid { stroke: var(--theme-color-border); stroke-width: 1; stroke-opacity: .6; }
.home-trend__gradient stop { stop-color: var(--theme-color-primary); }
.home-trend__average { stroke: var(--theme-color-muted); stroke-width: 1.5; stroke-dasharray: 4 3; stroke-opacity: .65; }
.home-trend__average-label { fill: var(--theme-color-muted); font: 12px var(--theme-font-sans); paint-order: stroke; stroke: var(--theme-color-surface); stroke-width: 2; pointer-events: none; }
.home-trend__line { fill: none; stroke: var(--theme-color-primary); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.home-trend__axis { fill: var(--theme-color-muted); font: 12px var(--theme-font-sans); font-variant-numeric: tabular-nums; }
.home-trend__value { visibility: hidden; fill: var(--theme-color-primary); font: var(--theme-text-data--font-weight) var(--theme-text-data) var(--theme-font-data); font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--theme-color-surface); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.home-trend__value--active { visibility: visible; }
.home-trend__target { cursor: pointer; }
.home-trend__point { fill: var(--theme-color-primary-light); stroke: var(--theme-color-surface); stroke-width: 2; cursor: pointer; }
.home-trend__point--active { fill: var(--theme-color-primary); }
.home-trend__selection-ring { fill: var(--theme-color-primary-soft); stroke: var(--theme-color-primary); stroke-width: 1.5; pointer-events: none; }
.home-trend__cursor { stroke: var(--theme-color-primary); stroke-width: 1; stroke-opacity: .25; pointer-events: none; }
.home-trend__years { display: flex; justify-content: space-between; padding-inline: clamp(0px, calc(100% - 222px), 34px) 2px; }
.home-trend__year { min-height: 36px; width: 44px; flex: 0 0 44px; border: 0; background: transparent; color: var(--theme-color-primary); font: var(--theme-text-dense-label--font-weight) var(--theme-text-dense-label) var(--theme-font-sans); cursor: pointer; }
@media (pointer: coarse) { .home-trend__year { min-height: 44px; } }
.home-trend__year:hover { background: var(--theme-color-surface-muted); }
.home-trend__year[aria-pressed="true"] { background: var(--theme-color-surface-selected); }
.home-trend__readout {
    display: grid;
    grid-template-columns: minmax(0, .7fr) minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1.15fr);
    margin: 0;
    padding: 8px 0 0;
    border-top: 1px solid var(--theme-color-border);
    text-align: end;
}
.home-trend__readout > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-inline: 10px; }
.home-trend__readout > div:first-child { padding-inline-start: 0; text-align: start; }
.home-trend__readout > div:last-child { padding-inline-end: 0; }
.home-trend__readout > div + div { border-inline-start: 1px solid var(--theme-color-border); }
.home-trend__readout dt { color: var(--theme-color-muted); font-size: 12px; }
.home-trend__readout dd { margin: 0; font: var(--theme-text-data--font-weight) var(--theme-text-data)/1.35 var(--theme-font-data); font-variant-numeric: tabular-nums; }
@container home-trend (max-width: 340px) {
    .home-trend__years { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding-inline: 0; }
    .home-trend__year { width: 100%; min-width: 0; }
    /* One row at every width. Cells drop out instead of stacking: first 歷年平均 PR, then 年度. */
    .home-trend__readout { grid-template-columns: minmax(0, .55fr) minmax(0, .9fr) minmax(0, 1.2fr) minmax(0, 1.2fr); }
    .home-trend__readout > div { padding-inline: 8px; }
    .home-trend__readout dt { font-size: 11px; white-space: nowrap; }
    .home-trend__readout dd { font-size: 14px; white-space: nowrap; }
}
@container home-trend (max-width: 279px) {
    .home-trend__readout { grid-template-columns: minmax(0, .6fr) minmax(0, 1fr) minmax(0, 1.3fr); }
    .home-trend__readout > div:nth-child(4) { display: none; }
    .home-trend__readout > div:nth-child(3) { padding-inline-end: 0; }
}
@container home-trend (max-width: 199px) {
    .home-trend__readout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-trend__readout > div:first-child { display: none; }
    .home-trend__readout > div:nth-child(2) { padding-inline-start: 0; border-inline-start: 0; text-align: start; }
}

/* Panel 2: Compact Program reference ranking */
.home-brief__ranking { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 14px; min-width: 0; }
/* Rows sit close together at the foot of the panel; the room above them goes to the 校系 PR note. */
.home-brief__ranking .program-rank-list { align-content: end; gap: var(--theme-spacing-sm); }
.home-brief__ranking .program-rank { align-content: end; }
.home-brief__rank-summary { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; margin-top: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--theme-color-border); }
.home-brief__rank-summary .ui-type-supporting { color: var(--theme-color-muted); }
.home-brief__pr-note { flex: 1 1 15em; min-width: 0; display: grid; gap: 4px; }
.home-brief__pr-q { font: 600 14px/1.4 var(--theme-font-sans); color: var(--theme-color-primary); }
.home-brief__pr-a { font: 400 13px/1.65 var(--theme-font-sans); color: var(--theme-color-foreground); text-wrap: pretty; }
.home-brief__pr-value { flex: none; display: grid; justify-items: end; gap: 2px; margin-inline-start: auto; text-align: end; }

/* Phones: the three rank rows become small dials (arc from 後段 to 前段, needle at the rank position)
   and sit beside the average PR, so the note keeps its full width and the panel stays short. */
@media (max-width: 767px) {
    .home-brief__ranking {
        grid-template-columns: minmax(0, 1fr) auto;
        /* Spare height is shared out as three spacer rows: a little above the note, a little more
           between the divider and the dials, and the largest share kept below. */
        grid-template-rows: minmax(4px, .8fr) auto minmax(14px, 1.2fr) auto minmax(0, 2.2fr);
        grid-template-areas: ". ." "note note" ". ." "dials value" ". .";
        gap: 0 12px;
    }
    .home-brief__rank-summary { display: contents; }
    .home-brief__pr-note { grid-area: note; margin-top: 0; padding-bottom: 14px; border-bottom: 1px solid var(--theme-color-border); }
    .home-brief__pr-value { grid-area: value; align-self: center; margin: 0; }
    .home-brief__ranking .program-rank-list { grid-area: dials; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: center; align-items: start; gap: 4px; }
    .home-brief__ranking .program-rank-axis { display: none; }
    .home-brief__ranking .program-rank {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "dial" "value" "label";
        justify-items: center;
        align-content: start;
        gap: 2px;
        text-align: center;
    }
    .home-brief__ranking .program-rank__label { grid-area: label; color: var(--theme-color-muted); font-size: 11px; font-weight: 400; line-height: 1.35; text-wrap: balance; }
    .home-brief__ranking .program-rank__value { grid-area: value; justify-items: center; text-align: center; }
    .home-brief__ranking .program-rank__value .ui-type-data { font-size: 14px; white-space: nowrap; }
    .home-brief__ranking .program-rank__value .ui-type-supporting { display: none; }
    .home-brief__ranking .program-rank__track {
        --dial-angle: calc(var(--rank-turn, .5) * 180deg);
        grid-area: dial;
        width: 54px;
        height: 27px;
        margin-bottom: 4px;
    }
    .home-brief__ranking .program-rank__track::before { display: none; }
    /* The arc: grey up to the needle, gold ink from the needle to the 前段 end. */
    .home-brief__ranking .program-rank__fill {
        inset: 0;
        height: auto;
        opacity: 1;
        background: conic-gradient(from 270deg at 50% 100%, var(--theme-color-border-strong) 0 var(--dial-angle), color-mix(in oklch, var(--theme-color-decision-ink) 55%, transparent) var(--dial-angle) 180deg, transparent 180deg);
        -webkit-mask: radial-gradient(circle at 50% 100%, transparent 0 20px, #000 20.5px 27px, transparent 27.5px);
        mask: radial-gradient(circle at 50% 100%, transparent 0 20px, #000 20.5px 27px, transparent 27.5px);
    }
    .home-brief__ranking .program-rank__mark {
        inset-block: auto 0;
        inset-inline-start: calc(50% - 1px);
        height: 25px;
        transform-origin: 50% 100%;
        transform: rotate(calc(var(--dial-angle) - 90deg));
    }
    .home-brief__ranking .program-rank__track::after {
        content: "";
        position: absolute;
        inset-block-end: -3px;
        inset-inline-start: calc(50% - 3px);
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--theme-color-decision-ink);
    }
}

/* Panel 3: Streamlined Gate rail with dedicated home-gate container query */
#home-panel-gate { row-gap: var(--theme-spacing-xl); }
.home-gate-card { container: home-gate / inline-size; min-width: 0; }
.home-gate-card.analysis-gate-card { align-content: space-between; padding: 0 0 4px; border: 0; gap: 20px; }
.home-gate-card .analysis-gate-card__identity h4 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.4; }
.home-gate-card .analysis-gate-glance__panel {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) var(--verdict-width, 68px);
    column-gap: var(--theme-spacing-md);
}
.home-gate-card .analysis-gate-glance__row,
.home-gate-card .analysis-gate-glance__axis {
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    column-gap: inherit;
}
.home-gate-card .analysis-gate-glance__row--you { position: relative; }
.home-gate-card .analysis-gate-glance__row--you .analysis-gate-glance__label {
    position: absolute;
    inset-inline-start: 0;
    z-index: 1;
    white-space: nowrap;
    padding-inline-end: var(--theme-spacing-xs);
    background: var(--theme-color-surface);
}
.home-gate-card .analysis-gate-glance__row--you .analysis-gate-rail { grid-column: 2; }
@container home-gate (max-width: 460px) {
    .home-gate-card .analysis-gate-glance__panel {
        --verdict-width: 58px;
        column-gap: var(--theme-spacing-sm);
    }
    .home-gate-card .analysis-gate-glance__verdict { font-size: 12px; }
}
@media (max-width: 479px) {
    .home-brief__bar { padding: 11px 14px; }
    .home-brief__panel { padding: 14px; }
    /* Keeps the four-subject gate title on one line at 360px, so the gate chart (the tallest) stays short. */
    .home-gate-card .analysis-gate-card__identity h4 { font-size: 15px; }
}

/* ================= 3. How the placement analysis works (#home-gap) ================= */
/* DOM order is copy → switcher → card → actions, so the switcher sits directly above the card on phones. */
.home-gap-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}
.home-gap-grid > * { min-width: 0; }
.home-gap-cta .home-promo__actions { margin-top: 0; }
@media (min-width: 1024px) {
    .home-gap-grid {
        grid-template-columns: minmax(0, 1.14fr) minmax(0, .86fr);
        /* The two flexible rows keep the copy, switcher and actions together, centred against the card. */
        grid-template-rows: minmax(0, 1fr) auto auto auto minmax(0, 1fr);
        grid-template-areas: "card ." "card copy" "card nav" "card cta" "card .";
        gap: 0 64px;
    }
    .home-gap-copy { grid-area: copy; }
    .home-gap-nav { margin-top: 24px; }
    .home-method { align-self: center; }
    /* Stack the three figures in one cell: the card takes the tallest one, so switching never moves it. */
    .home-tabs-ready .home-method .home-brief__panel { grid-area: 1 / 1; }
    .home-tabs-ready .home-method .home-brief__panel[hidden] { display: grid !important; visibility: hidden; }
    .home-tabs-ready .home-method .home-brief__panel[hidden] * { visibility: hidden; }
    .home-gap-cta { grid-area: cta; margin-top: 24px; }
}

.home-method__body {
    display: grid;
    align-content: space-between;
    gap: 12px;
    min-width: 0;
}
.home-method__sub { font: 400 13px/1.55 var(--theme-font-sans); color: var(--theme-color-muted); }
.home-method__point { font: 400 14px/1.65 var(--theme-font-sans); color: var(--theme-color-foreground); }
.home-method__point strong { color: var(--theme-color-primary); font-weight: 600; }
.home-method__source { color: var(--theme-color-muted); }

/* Panel 1: two real cases, each one score in two years, drawn on the thin rank rails of the result page. */
.home-method__cases { display: grid; gap: 14px; }
.home-method__case {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    column-gap: var(--theme-spacing-md);
    row-gap: 2px;
    align-items: center;
}
.home-method__case + .home-method__case { padding-top: 14px; border-top: 1px solid var(--theme-color-border); }
.home-method__case-k {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 12px;
    margin-bottom: 10px;
    font: 600 14px/1.5 var(--theme-font-sans);
    color: var(--theme-color-foreground);
}
.home-method__case-k small { margin-right: 8px; font: 500 12px/1.5 var(--theme-font-sans); color: var(--theme-color-muted); }
.home-method__case-k em { font: 600 13px/1.5 var(--theme-font-sans); color: var(--theme-color-primary); }
.home-method__case-k .is-back,
.home-method__shift--back { color: var(--theme-color-risk-hard-text); }
.home-method__case-k .is-ahead,
.home-method__shift--ahead { color: var(--theme-color-risk-safe-text); }
/* Between the two years' rails: dashed guides at both ends of the gap, and an arrow toward the later year. */
.home-method__gap { grid-column: 2; position: relative; height: 10px; }
.home-method__shift {
    position: absolute;
    top: -14px;
    bottom: -14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-inline: 1px dashed currentColor;
    font: 600 11px/1 var(--theme-font-sans);
    white-space: nowrap;
}
.home-method__shift::before {
    content: "";
    position: absolute;
    inset: calc(50% - 1px) 0 auto;
    height: 2px;
    background: currentColor;
}
.home-method__shift::after {
    content: "";
    position: absolute;
    top: calc(50% - 5px);
    border-block: 5px solid transparent;
}
.home-method__shift--back::after { left: 0; border-right: 7px solid currentColor; }
.home-method__shift--ahead::after { right: 0; border-left: 7px solid currentColor; }
.home-method__shift span { position: relative; padding-inline: 4px; background: var(--theme-color-surface); }
@media (max-width: 479px) {
    /* Too narrow for the label; the case heading already says it. */
    .home-method__shift span { display: none; }
    /* Both cases put the shift on its own line, whether or not the title leaves room beside it. */
    .home-method__case-k em { flex-basis: 100%; }
}
.home-method__year-label { grid-column: 1; }
.home-method__year-label,
.home-method__year-value {
    font: 500 13px/1.4 var(--theme-font-data);
    font-variant-numeric: tabular-nums;
    color: var(--theme-color-muted);
    white-space: nowrap;
}
.home-method__year-value { color: var(--theme-color-foreground); text-align: end; }

/* Panel 2: the three gates, in screening order */
.home-method__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    font: 400 12px/1.4 var(--theme-font-sans);
    color: var(--theme-color-muted);
}
.home-method__legend span { display: inline-flex; align-items: center; gap: 6px; }
.home-method__key { display: block; width: 16px; height: 7px; background: var(--theme-color-muted); }
.home-method__key--you {
    height: 12px;
    background: var(--theme-color-primary-soft);
    box-shadow: inset 1px 0 0 var(--theme-color-primary), inset -1px 0 0 var(--theme-color-primary);
}
.home-method__key--clear { background: var(--theme-color-primary-soft); }
.home-method__key--kept { background: var(--theme-color-primary); }
.home-method__key--out { background: var(--theme-color-risk-hard-text); }
.home-method__step .home-method__legend { margin-top: 4px; }
/* The three required standards, each ticked. */
.home-method__checks { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.home-method__checks li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 1px 8px;
    border: 1px solid var(--theme-color-border);
    font: 500 12px/1.6 var(--theme-font-sans);
    color: var(--theme-color-foreground);
}
.home-method__checks li::after {
    content: "";
    width: 9px;
    height: 5px;
    margin-top: -3px;
    border-left: 2px solid var(--theme-color-safe-text);
    border-bottom: 2px solid var(--theme-color-safe-text);
    transform: rotate(-45deg);
}
/* All outcomes of the last gate: only the on-the-line share meets the tie-break, and only part of that is cut. */
.home-method__split { display: flex; height: 9px; margin-top: 8px; }
.home-method__split i { display: block; }
/* Figure 2: spare height is shared equally by its five blocks (three steps, result, scale), each centred in its
   share. The title stays put, nothing piles up at the bottom, and the space around every divider stays even. */
.home-method__body--steps { display: flex; flex-direction: column; gap: 0; }
.home-method__body--steps > * { flex: 1 0 auto; }
.home-method__body--steps > .home-method__steps { flex-grow: 3; }
.home-method__body--steps .home-method__step { align-content: center; }
.home-method__body--steps > .home-method__tiers { align-content: center; padding-top: 12px; }
/* Figure 3: the five years take the spare height between them, so they stay equal rows. */
.home-method__body--rules { display: flex; flex-direction: column; }
.home-method__body--rules > .home-method__rules { flex: 1 0 auto; }
.home-method__steps { display: grid; }
.home-method__step {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) max-content;
    column-gap: 12px;
    align-items: start;
    padding-block: 10px;
    border-top: 1px solid var(--theme-color-border);
}
.home-method__step:first-child { padding-top: 0; border-top: 0; }
.home-method__n {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--theme-color-border-strong);
    font: 600 13px/1 var(--theme-font-data);
    color: var(--theme-color-primary);
}
.home-method__step-t { font: 600 14px/1.7 var(--theme-font-sans); color: var(--theme-color-foreground); }
.home-method__step-t span { margin-left: 8px; font-weight: 400; font-size: 13px; color: var(--theme-color-muted); }
/* Number, one line of text and the verdict share a row; the step's figure spans the row below. */
.home-method__step > :nth-child(n + 4) { grid-column: 2 / -1; }
.home-method__step .analysis-gate-rail { margin-top: 4px; }
.home-method__state { font: 600 13px/24px var(--theme-font-sans); white-space: nowrap; }
.home-method__result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px 14px;
    padding-top: 12px;
    border-top: 1px solid var(--theme-color-border-strong);
}
.home-method__result-k { font: 600 14px/1.5 var(--theme-font-sans); color: var(--theme-color-foreground); }
.home-method__result-k span { display: block; font-weight: 400; font-size: 12px; color: var(--theme-color-muted); }
/* The group badge sits at the upper left of the probability; the pair never wraps under the label. */
.home-method__result-k { min-width: 0; }
.home-method__result-v { flex: none; display: inline-flex; align-items: flex-start; gap: 8px; }
.home-method__result-v .ui-badge { margin-top: 7px; }
.home-method__tiers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.home-method__tiers li {
    display: grid;
    justify-items: center;
    padding: 3px 4px;
    border: 1px solid var(--theme-color-border);
    font: 500 12px/1.4 var(--theme-font-sans);
    color: var(--theme-color-muted);
    text-align: center;
}
.home-method__tiers em { font: 500 11px/1.4 var(--theme-font-data); font-variant-numeric: tabular-nums; }
.home-method__tiers .is-current {
    background: var(--theme-color-realistic-bg);
    border-color: var(--theme-color-realistic-text);
    color: var(--theme-color-realistic-text);
    font-weight: 600;
}

/* Panel 3: which earlier years still measure with the same ruler */
.home-method__rules {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    column-gap: 14px;
}
.home-method__rule {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    align-items: center;
    /* Every year takes the height of a two-line row, so the list reads as five equal rows. */
    min-height: 49px;
    padding-block: 5px;
    border-top: 1px solid var(--theme-color-border);
}
.home-method__rule--now { border-top: 0; border-bottom: 1px solid var(--theme-color-border-strong); }
.home-method__rule--now + .home-method__rule { border-top: 0; }
.home-method__rule-year { font: 500 13px/1.4 var(--theme-font-data); font-variant-numeric: tabular-nums; color: var(--theme-color-muted); }
.home-method__rule-set { font: 500 14px/1.45 var(--theme-font-sans); color: var(--theme-color-foreground); }
.home-method__rule-set span { display: block; font-weight: 400; font-size: 12px; color: var(--theme-color-muted); }
.home-method__rule-set b { font-weight: 600; color: var(--theme-color-risk-hard-text); }
.home-method__rule--now .home-method__rule-year,
.home-method__rule--now .home-method__rule-set { color: var(--theme-color-primary); font-weight: 600; }
.home-method__rule-use {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: 600 13px/1.4 var(--theme-font-sans);
    color: var(--theme-color-primary);
    white-space: nowrap;
}
.home-method__rule-use::before { content: ""; width: 10px; height: 10px; background: var(--theme-color-primary); }
.home-method__rule--off .home-method__rule-set,
.home-method__rule--off .home-method__rule-use { color: var(--theme-color-muted); }
.home-method__rule--off .home-method__rule-use::before { background: transparent; border: 1px dashed var(--theme-color-muted); }
/* Sits close under the last year; its heading stands a little apart from the four cases. */
.home-method__handling { display: grid; gap: 8px; margin-top: -4px; padding-top: 10px; border-top: 1px solid var(--theme-color-border-strong); }
.home-method__handling-k { font: 600 13px/1.5 var(--theme-font-sans); color: var(--theme-color-foreground); }
.home-method__handling dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 20px; margin: 0; }
.home-method__handling dl div { display: flex; flex-wrap: wrap; gap: 0 8px; font: 400 13px/1.6 var(--theme-font-sans); }
.home-method__handling dt { font-weight: 600; color: var(--theme-color-primary); }
.home-method__handling dd { margin: 0; color: var(--theme-color-muted); }
@media (max-width: 479px) {
    /* Still two by two on phones; the columns take their own widths so each pair stays on one line. */
    .home-method__handling dl { grid-template-columns: repeat(2, auto); justify-content: start; column-gap: 16px; }
    .home-method__handling dl div { gap: 0 4px; }
}

/* Like #home-sources: below tablet width the section fills one screen and centres what it holds. */
@media (max-width: 767px) {
    #home-gap { min-height: calc(100svh - var(--home-nav-h, 4rem)); display: flex; align-items: center; }
}
/* Phones: the section has to fit one screen, so it keeps the title, the switcher, one figure and the action. */
@media (max-width: 479px) {
    #home-gap { padding-block: 20px; }
    .home-gap-grid { gap: 10px; }
    .home-method__body { gap: 10px; }
    .home-method__handling { padding-top: 8px; }
    .home-method__handling dl div { font-size: 12px; line-height: 1.5; }
    .home-gap-copy .home-promo__lede,
    .home-gap-cta .home-promo__subnote,
    .home-method__cases ~ .home-method__source,
    .home-method__point-lead,
    .home-method__step-t span { display: none; }
    .home-method__step { padding-block: 8px; }
    .home-method__step > :nth-child(n + 4) { grid-column: 1 / -1; }
    .home-method__sub { font-size: 12px; }
    .home-method__rule { min-height: 45px; padding-block: 3px; }
}

/* ================= 4. Two Admission Tracks (#home-tracks) ================= */
.home-lenses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; min-width: 0; }
.home-lens-card {
    background: var(--theme-color-surface);
    border: 1px solid var(--theme-color-border-strong);
    padding: 20px;
    display: grid;
    gap: 14px;
    align-content: start;
    min-width: 0;
}
.home-lens-card__h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.home-lens-card__title { font: 600 var(--theme-text-entity-title)/1.4 var(--theme-font-sans); color: var(--theme-color-primary); }
.home-lens-card ul { display: grid; gap: 6px; }
.home-lens-card li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; background: var(--theme-color-surface-muted); font: 500 14px/1.5 var(--theme-font-sans); }
.home-lens-card li em { font: 500 13px/1.5 var(--theme-font-sans); font-style: normal; color: var(--theme-color-muted); }
.home-lens-card__f { font: 500 12px/1.5 var(--theme-font-sans); color: var(--theme-color-muted); }
/* Wide enough for the first sentence to stay on one line beside the cards. */
#home-tracks .home-promo__lede { max-width: 30em; }
/* The two ways into a track share the row half and half; the row sits closer to the card's lower edge. */
.home-lens-card__links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 14px;
    margin-bottom: -10px;
    padding-top: 4px;
    border-top: 1px solid var(--theme-color-border);
}
.home-lens-card__links a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    transition: color var(--home-t) var(--home-ease);
    font: 600 13px/1.4 var(--theme-font-sans);
    color: var(--theme-color-primary);
}
@media (pointer: coarse) { .home-lens-card__links a { min-height: 44px; } }
.home-lens-link__short { display: none; }
/* Phones keep the two tracks side by side, in a compact card. The full link labels would not fit two up there,
   so they shorten and drop the arrow instead of stacking. */
@media (max-width: 639px) {
    .home-lenses { gap: 8px; }
    .home-lens-card { padding: 12px; gap: 10px; }
    .home-lens-card__title { font-size: 16px; }
    .home-lens-card li { gap: 6px; padding: 6px 8px; font-size: 13px; white-space: nowrap; }
    .home-lens-card li em { font-size: 12px; }
    .home-lens-card__links { column-gap: 8px; margin-bottom: -6px; }
    .home-lens-link__full, .home-lens-card__links .home-guide__arrow { display: none; }
    .home-lens-link__short { display: inline; }
}
/* Like #home-sources and #home-gap: below tablet width the section fills one screen and centres what it holds. */
@media (max-width: 767px) {
    #home-tracks { min-height: calc(100svh - var(--home-nav-h, 4rem)); display: flex; align-items: center; padding-block: 24px; }
}

/* ================= 5. Closing (#home-start) ================= */
.home-close {
    position: relative;
    overflow: clip;
    isolation: isolate;
    background:
        radial-gradient(ellipse 56% 80% at 78% 50%, oklch(0.34 0.075 255 / .48), transparent 72%),
        var(--theme-color-primary);
    color: var(--home-on-navy);
}
.home-close__astro { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.home-close__astro path { fill: none; stroke-width: 1.15; vector-effect: non-scaling-stroke; }
.home-close__astro rect { fill: var(--home-on-navy); opacity: .62; }
.home-close__in { position: relative; z-index: 1; padding-block: 56px 52px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.home-close__in > * { min-width: 0; }
@media (min-width: 1024px) {
    /* Title and links stack in the left column; the search box sits beside them, centred on the pair. */
    .home-close__in {
        padding-block: 72px;
        grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
        grid-template-areas: "title search" "links search";
        align-content: center;
        gap: 14px 60px;
    }
    .home-close h2 { grid-area: title; }
    .home-close__search { grid-area: search; align-self: center; }
    .home-close__links { grid-area: links; }
}
.home-close h2 { font: var(--theme-text-page-title--font-weight) var(--theme-text-section-title)/1.35 var(--theme-font-serif); color: var(--home-on-navy); }
@media (min-width: 768px) { .home-close h2 { font-size: 32px; } }
.home-close .home-search { margin-top: 0; box-shadow: 0 16px 40px oklch(0.11 0.04 255 / .3); }
.home-close__links { display: flex; flex-wrap: wrap; gap: 0 18px; }
/* The two analysis entries share a line; explore sits on the next one. */
.home-close__break { flex-basis: 100%; height: 0; }
.home-close__links a { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font: 600 14px/1.4 var(--theme-font-sans); color: var(--home-on-navy); }
@media (pointer: coarse) { .home-close__links a { min-height: 44px; } }
.home-js .home-close .home-shell > * { opacity: 0; transform: translateY(14px); transition: opacity 640ms var(--home-ease), transform 640ms var(--home-ease); }
.home-js .home-close.is-in .home-shell > * { opacity: 1; transform: none; }
.home-js .home-close.is-in .home-shell > :nth-child(2) { transition-delay: 100ms; }
.home-js .home-close.is-in .home-shell > :nth-child(3) { transition-delay: 180ms; }

/* ================= Precision Entrance & Data Motion =================
 * Optical editorial choreography: restrained, purposeful data reveals that guide
 * reading order without clutter, bounce, or layout shift. Strictly gated on
 * .home-js and prefers-reduced-motion: no-preference. */
@media (prefers-reduced-motion: no-preference) {
    /* Section index hairline rule draws left-to-right like an optical gauge. */
    .home-js .home-promo__index::after {
        transform-origin: left center;
        transform: scaleX(0);
        transition: transform 560ms var(--home-ease) 120ms;
    }
    .home-js .home-promo.is-in .home-promo__index::after { transform: scaleX(1); }

    /* Initial hidden/pre-sweep state on chart cards before .is-data-in arrives,
       so first-tab data visuals always animate cleanly in full view once scrolled onto. */
    .home-js .home-brief { --data-d: 220ms; }
    .home-tabs-ready .home-brief__panel.is-panel-enter { --data-d: 0ms; }

    .home-js #home-sources .home-brief:not(.is-data-in) #home-panel-rank .home-brief__pr-value { opacity: 0; transform: translateY(8px); }
    @media (min-width: 768px) {
        .home-js #home-sources .home-brief:not(.is-data-in) #home-panel-rank .program-rank__fill { transform: scaleX(0); transform-origin: left center; }
        .home-js #home-sources .home-brief:not(.is-data-in) #home-panel-rank .program-rank__mark { opacity: 0; transform: translateX(-28px); }
    }
    @media (max-width: 767px) {
        .home-js #home-sources .home-brief:not(.is-data-in) #home-panel-rank .program-rank__mark { transform: rotate(-90deg); }
    }
    .home-js #home-gap .home-brief:not(.is-data-in) #home-method-panel-rank .analysis-gate-rail > i,
    .home-js #home-gap .home-brief:not(.is-data-in) #home-method-panel-rank .home-method__shift--ahead { clip-path: inset(0 100% 0 0); }
    .home-js #home-gap .home-brief:not(.is-data-in) #home-method-panel-rank .home-method__shift--back { clip-path: inset(0 0 0 100%); }

    /* 01 Panel 1 — Program reference ranking: gold bars & needles calibrate into place. */
    .home-js #home-sources .home-brief.is-data-in #home-panel-rank:not([hidden]) .home-brief__pr-value,
    .home-tabs-ready #home-panel-rank.is-panel-enter .home-brief__pr-value {
        animation: home-soft-rise 560ms var(--home-ease) var(--data-d, 220ms) both;
    }
    @media (min-width: 768px) {
        .home-js #home-sources .home-brief.is-data-in #home-panel-rank:not([hidden]) .program-rank__fill,
        .home-tabs-ready #home-panel-rank.is-panel-enter .program-rank__fill {
            transform-origin: left center;
            animation: home-scale-x 620ms var(--home-ease) calc(var(--data-d, 220ms) + 60ms + var(--r, 0) * 95ms) both;
        }
        .home-js #home-sources .home-brief.is-data-in #home-panel-rank:not([hidden]) .program-rank__mark,
        .home-tabs-ready #home-panel-rank.is-panel-enter .program-rank__mark {
            animation: home-mark-in 620ms var(--home-ease) calc(var(--data-d, 220ms) + 60ms + var(--r, 0) * 95ms) both;
        }
    }
    @media (max-width: 767px) {
        .home-js #home-sources .home-brief.is-data-in #home-panel-rank:not([hidden]) .program-rank__mark,
        .home-tabs-ready #home-panel-rank.is-panel-enter .program-rank__mark {
            animation: home-dial-sweep 740ms var(--home-ease) calc(var(--data-d, 220ms) + 60ms + var(--r, 0) * 100ms) both;
        }
    }
    #home-panel-rank .program-rank:nth-child(1) { --r: 0; }
    #home-panel-rank .program-rank:nth-child(2) { --r: 1; }
    #home-panel-rank .program-rank:nth-child(3) { --r: 2; }
    @keyframes home-scale-x {
        from { transform: scaleX(0); }
        to { transform: scaleX(1); }
    }
    @keyframes home-mark-in {
        from { opacity: 0; transform: translateX(-28px); }
        to { opacity: 1; transform: translateX(-1px); }
    }
    @keyframes home-dial-sweep {
        from { transform: rotate(-90deg); }
        to { transform: rotate(calc(var(--dial-angle) - 90deg)); }
    }

    /* 01 Panel 2 — PR trend SVG draws its polyline smoothly, then reveals fill & points. */
    .home-trend__plot svg.is-trend-animated .home-trend__line {
        stroke-dasharray: var(--trend-len, 600);
        stroke-dashoffset: var(--trend-len, 600);
        animation: home-trend-draw 740ms var(--home-ease) 40ms forwards;
    }
    .home-trend__plot svg.is-trend-animated .home-trend__area {
        opacity: 0;
        animation: home-fade-in 480ms ease-out 240ms forwards;
    }
    .home-trend__plot svg.is-trend-animated .home-trend__average,
    .home-trend__plot svg.is-trend-animated .home-trend__average-label {
        opacity: 0;
        animation: home-fade-in 380ms ease-out 300ms forwards;
    }
    .home-trend__plot svg.is-trend-animated .home-trend__target {
        opacity: 0;
        animation: home-fade-in 320ms ease-out calc(200ms + var(--p, 0) * 65ms) forwards;
    }
    @keyframes home-trend-draw { to { stroke-dashoffset: 0; } }
    @keyframes home-fade-in { to { opacity: 1; } }

    /* 01 Panel 3 — Screening gate rails sweep cleanly left-to-right per year. */
    .home-js #home-sources .home-brief.is-data-in #home-panel-gate:not([hidden]) .analysis-gate-rail > i:not(.analysis-gate-rail__tick),
    .home-tabs-ready #home-panel-gate.is-panel-enter .analysis-gate-rail > i:not(.analysis-gate-rail__tick) {
        animation: home-clip-right 520ms var(--home-ease) calc(var(--data-d, 220ms) + 40ms + var(--row, 0) * 55ms) both;
    }
    .home-js #home-sources .home-brief.is-data-in #home-panel-gate:not([hidden]) .analysis-gate-glance__verdict,
    .home-tabs-ready #home-panel-gate.is-panel-enter .analysis-gate-glance__verdict {
        animation: home-fade-only 380ms ease-out calc(var(--data-d, 220ms) + 180ms + var(--row, 0) * 55ms) both;
    }
    #home-panel-gate .analysis-gate-glance__row:nth-child(1) { --row: 0; }
    #home-panel-gate .analysis-gate-glance__row:nth-child(2) { --row: 1; }
    #home-panel-gate .analysis-gate-glance__row:nth-child(3) { --row: 2; }
    #home-panel-gate .analysis-gate-glance__row:nth-child(4) { --row: 3; }
    #home-panel-gate .analysis-gate-glance__row:nth-child(5) { --row: 4; }
    #home-panel-gate .analysis-gate-glance__row:nth-child(6) { --row: 5; }

    /* 02 Panel 1 — Rank shift cases: bars reveal, then directional shift arrows sweep along the actual direction. */
    .home-js #home-gap .home-brief.is-data-in #home-method-panel-rank:not([hidden]) .analysis-gate-rail > i,
    .home-tabs-ready #home-method-panel-rank.is-panel-enter .analysis-gate-rail > i {
        animation: home-clip-right 560ms var(--home-ease) calc(var(--data-d, 220ms) + 40ms + var(--case, 0) * 180ms) both;
    }
    .home-js #home-gap .home-brief.is-data-in #home-method-panel-rank:not([hidden]) .home-method__shift--back,
    .home-tabs-ready #home-method-panel-rank.is-panel-enter .home-method__shift--back {
        animation: home-clip-left 640ms var(--home-ease) calc(var(--data-d, 220ms) + 300ms) both;
    }
    .home-js #home-gap .home-brief.is-data-in #home-method-panel-rank:not([hidden]) .home-method__shift--ahead,
    .home-tabs-ready #home-method-panel-rank.is-panel-enter .home-method__shift--ahead {
        animation: home-clip-right 640ms var(--home-ease) calc(var(--data-d, 220ms) + 480ms) both;
    }
    #home-method-panel-rank .home-method__case:nth-child(1) { --case: 0; }
    #home-method-panel-rank .home-method__case:nth-child(2) { --case: 1; }

    /* 02 Panel 2 — Three screening stages step down sequentially, then settle on 80% + tier scale. */
    .home-js #home-gap .home-brief.is-data-in #home-method-panel-gates:not([hidden]) .home-method__step,
    .home-tabs-ready #home-method-panel-gates.is-panel-enter .home-method__step {
        animation: home-soft-rise 460ms var(--home-ease) calc(var(--data-d, 220ms) + 30ms + var(--s, 0) * 95ms) both;
    }
    #home-method-panel-gates .home-method__step:nth-child(1) { --s: 0; }
    #home-method-panel-gates .home-method__step:nth-child(2) { --s: 1; }
    #home-method-panel-gates .home-method__step:nth-child(3) { --s: 2; }
    .home-js #home-gap .home-brief.is-data-in #home-method-panel-gates:not([hidden]) .home-method__split i,
    .home-tabs-ready #home-method-panel-gates.is-panel-enter .home-method__split i {
        transform-origin: left center;
        animation: home-scale-x 480ms var(--home-ease) calc(var(--data-d, 220ms) + 250ms + var(--seg, 0) * 80ms) both;
    }
    #home-method-panel-gates .home-method__split i:nth-child(1) { --seg: 0; }
    #home-method-panel-gates .home-method__split i:nth-child(2) { --seg: 1; }
    #home-method-panel-gates .home-method__split i:nth-child(3) { --seg: 2; }
    .home-js #home-gap .home-brief.is-data-in #home-method-panel-gates:not([hidden]) .home-method__result,
    .home-tabs-ready #home-method-panel-gates.is-panel-enter .home-method__result {
        animation: home-soft-rise 460ms var(--home-ease) calc(var(--data-d, 220ms) + 300ms) both;
    }
    .home-js #home-gap .home-brief.is-data-in #home-method-panel-gates:not([hidden]) .home-method__tiers,
    .home-tabs-ready #home-method-panel-gates.is-panel-enter .home-method__tiers {
        animation: home-fade-only 420ms ease-out calc(var(--data-d, 220ms) + 380ms) both;
    }

    /* 02 Panel 3 — Five years filter smoothly top-to-bottom, followed by rule handling summary. */
    .home-js #home-gap .home-brief.is-data-in #home-method-panel-rules:not([hidden]) .home-method__rule,
    .home-tabs-ready #home-method-panel-rules.is-panel-enter .home-method__rule {
        animation: home-soft-rise 420ms var(--home-ease) calc(var(--data-d, 220ms) + 30ms + var(--y, 0) * 55ms) both;
    }
    #home-method-panel-rules .home-method__rule:nth-child(1) { --y: 0; }
    #home-method-panel-rules .home-method__rule:nth-child(2) { --y: 1; }
    #home-method-panel-rules .home-method__rule:nth-child(3) { --y: 2; }
    #home-method-panel-rules .home-method__rule:nth-child(4) { --y: 3; }
    #home-method-panel-rules .home-method__rule:nth-child(5) { --y: 4; }
    .home-js #home-gap .home-brief.is-data-in #home-method-panel-rules:not([hidden]) .home-method__handling,
    .home-tabs-ready #home-method-panel-rules.is-panel-enter .home-method__handling {
        animation: home-fade-only 420ms ease-out calc(var(--data-d, 220ms) + 310ms) both;
    }

    /* 03 Two admission track cards: staggered pair + internal exam rows once the cards enter view. */
    .home-js #home-tracks .home-lens-card {
        opacity: 0;
        transform: translateY(14px);
        transition: opacity 560ms var(--home-ease), transform 560ms var(--home-ease);
    }
    .home-js #home-tracks .home-lens-card:nth-child(2) { transition-delay: 110ms; }
    .home-js #home-tracks .home-lenses.is-data-in .home-lens-card { opacity: 1; transform: none; }
    .home-js #home-tracks .home-lenses:not(.is-data-in) .home-lens-card li { opacity: 0; transform: translateY(8px); }
    .home-js #home-tracks .home-lenses.is-data-in .home-lens-card li {
        animation: home-soft-rise 440ms var(--home-ease) calc(200ms + var(--li, 0) * 65ms) both;
    }
    #home-tracks .home-lens-card li:nth-child(1) { --li: 0; }
    #home-tracks .home-lens-card li:nth-child(2) { --li: 1; }
    #home-tracks .home-lens-card li:nth-child(3) { --li: 2; }

    /* 04 Closing star arcs draw on scroll arrival, echoing the hero observatory. */
    .home-js .home-close__astro path { stroke-dasharray: 1000; stroke-dashoffset: 1000; }
    .home-js .home-close.is-in .home-close__astro path {
        animation: home-draw-astro 820ms var(--home-ease) var(--arc-d, 60ms) forwards;
    }
    .home-js .home-close__astro rect { opacity: 0; }
    .home-js .home-close.is-in .home-close__astro rect {
        --astro-alpha: .62;
        animation: home-astro-fade 420ms ease-out var(--dot-d, 460ms) forwards;
    }

    @keyframes home-soft-rise {
        from { opacity: 0; transform: translateY(8px); }
        to { opacity: 1; transform: none; }
    }
    @keyframes home-fade-only {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    @keyframes home-clip-right {
        from { clip-path: inset(0 100% 0 0); }
        to { clip-path: inset(0 0 0 0); }
    }
    @keyframes home-clip-left {
        from { clip-path: inset(0 0 0 100%); }
        to { clip-path: inset(0 0 0 0); }
    }
}

/* ================= Desktop Page Indicator (hidden <1024px) ================= */
.home-pager { position: fixed; right: 20px; top: 50%; z-index: 40; transform: translateY(-50%); display: grid; gap: 2px; color: var(--theme-color-primary); }
.home-pager::before { content: ""; position: absolute; left: 50%; top: 16px; bottom: 16px; width: 1px; margin-left: -.5px; background: currentColor; opacity: .18; pointer-events: none; transition: color 240ms ease-out; }
.home-pager button { position: relative; width: 44px; height: 32px; border: 0; background: none; cursor: pointer; color: inherit; }
/* The frame around the current page is the marker's own outline, so the two stay concentric at any display scale
   (two separately snapped boxes drift apart by a device pixel at 125% or 150%). */
.home-pager button::before { content: ""; box-sizing: border-box; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border: 1px solid currentColor; background: var(--theme-color-surface); outline: 1px solid transparent; outline-offset: 0; transition: transform 300ms var(--home-ease), background-color 300ms, outline-color 240ms ease-out, outline-offset 240ms var(--home-ease); }
.home-pager button[aria-current="true"]::before { background: currentColor; transform: scale(1.15); outline-color: color-mix(in oklch, currentColor 48%, transparent); outline-offset: 2px; }
:where([data-runtime-theme="target-u"]:not([data-focus-modality="pointer"])) .home-pager button:focus-visible { outline: var(--theme-focus-ring-width) solid var(--theme-color-focus); outline-offset: var(--theme-focus-ring-gap); }
.home-pager[data-tone="dark"] { color: var(--home-on-navy, #fff); }
.home-pager[data-tone="dark"] button::before { background: var(--theme-color-primary); }
.home-pager[data-tone="dark"] button[aria-current="true"]::before { background: currentColor; }
@media (max-width: 1023px) { .home-pager { display: none; } }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .home-cue svg, .home-star--twinkle i, .home-focus__sweep, .home-orbit, .home-focus-mark i::before, .home-focus-mark .home-lens__c { animation: none; }
    .home-js .home-star, .home-js .home-lens, .home-js .home-lens::before, .home-js .home-promo [data-home-in], .home-js .home-close .home-shell > *, .home-js #home-tracks .home-lens-card { opacity: 1; transform: none; clip-path: none; animation: none; }
    .home-js .home-astro__arc, .home-js .home-close__astro path { stroke-dashoffset: 0; animation: none; }
    .home-js .home-orbit__head { opacity: .72; animation: none; }
    .home-js .home-close__astro rect { opacity: .62; animation: none; }
    .home-js .home-star { transform: translate(-50%, -50%); }
    .home-chart__astro, .home-chart__field, .home-lens::before, .home-lens__focus, .home-lens__c, .home-target, .home-chart__lines polyline,
    .home-scope__c, .home-scope__tele, .home-scope__star, .home-search__field::after, .home-pager button::before,
    .home-console__tabs::after, .home-console__route::before,
    .home-console__route-arrow, .home-brief__more, .home-lens-card__links a, .home-guide__label::after, .home-guide__arrow { transition: none; }
}
