:root {
    --hsk-blue: #c6dbf8;
    --hsk-blue-strong: #73a6eb;
    --hsk-blue-deep: #285b9b;
    --hsk-blue-soft: #f2f7fe;
    --hsk-ink: #111722;
    --hsk-muted: #667085;
    --hsk-line: #dce4ef;
    --hsk-surface: #ffffff;
    --hsk-shadow: 0 20px 60px rgba(40, 91, 155, 0.14);
}

.hsk-page {
    background: #fff;
    color: var(--hsk-ink);
    font-family: 'Poppins', sans-serif;
}

.hsk-page main {
    overflow: hidden;
    padding: 0;
}

.hsk-page .app-layout > header {
    background: linear-gradient(180deg, #fff 0%, #f2f7fe 100%);
}

.hsk-page h1,
.hsk-page h2,
.hsk-page h3,
.hsk-page p,
.hsk-page ul {
    margin-top: 0;
}

.hsk-page h1,
.hsk-page h2,
.hsk-page h3 {
    color: var(--hsk-ink);
    letter-spacing: -0.035em;
}

.hsk-page button,
.hsk-page input,
.hsk-page select {
    font: inherit;
}

.hsk-hero {
    background: linear-gradient(180deg, #f2f7fe 0%, #f8fbff 100%);
    padding: clamp(1rem, 2vw, 1.75rem) 0 clamp(2rem, 3.5vw, 3rem);
    position: relative;
}

.hsk-hero::before {
    content: none;
}

.hsk-hero-grid {
    align-items: center;
    display: grid;
    gap: clamp(3rem, 7vw, 7rem);
    grid-template-columns: minmax(0, 1.12fr) minmax(330px, 0.88fr);
    position: relative;
}

.hsk-hero-compact {
    align-self: center;
}

.hsk-eyebrow,
.hsk-control-label {
    color: var(--hsk-blue-deep);
    font-size: 0.77rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.hsk-hero h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 600;
    letter-spacing: -0.045em;
    line-height: 1.12;
    margin: 0 0 clamp(1.75rem, 3vw, 2.5rem);
    max-width: 980px;
}

.hsk-hero h1 span {
    background: none;
}

.hsk-hero-lede {
    color: #475467;
    font-size: clamp(1.02rem, 1.5vw, 1.22rem);
    line-height: 1.75;
    max-width: 690px;
}

.hsk-hero-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin: 2rem 0 2.75rem;
}

.hsk-primary-button {
    background: var(--hsk-ink);
    border: 1px solid var(--hsk-ink);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 0.95rem;
    font-weight: 600;
    justify-content: center;
    padding: 0.9rem 1.4rem;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.hsk-primary-button:hover {
    background: var(--hsk-blue-deep);
    border-color: var(--hsk-blue-deep);
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}

.hsk-primary-button-small {
    flex: 0 0 auto;
    padding: 0.75rem 1.2rem;
}

.hsk-text-link {
    color: var(--hsk-ink);
    font-size: 0.93rem;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--hsk-blue-strong);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.hsk-text-link:hover {
    color: var(--hsk-blue-deep);
}

.hsk-hero-stats {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    margin: 0;
    width: fit-content;
}

.hsk-hero-stats div {
    display: flex;
    flex-direction: column;
    padding: 0 clamp(1.5rem, 3vw, 2.75rem);
}

.hsk-hero-stats div:first-child {
    padding-left: 0;
}

.hsk-hero-stats div + div {
    border-left: 1px solid var(--hsk-line);
}

.hsk-hero-stats dt {
    font-size: clamp(1.4rem, 2.3vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.04em;
}

.hsk-hero-stats dd {
    color: var(--hsk-muted);
    font-size: 0.76rem;
    margin: 0;
}

.hsk-hero-preview {
    min-height: 490px;
    position: relative;
}

.hsk-hero-preview::before {
    content: none;
}

.hsk-hero-preview::after {
    background-image: radial-gradient(circle, rgba(115, 166, 235, 0.25) 1.5px, transparent 1.6px);
    background-size: 36px 36px;
    content: '';
    height: 190px;
    pointer-events: none;
    position: absolute;
    right: -3.5rem;
    top: -2.5rem;
    width: 245px;
    z-index: 0;
}

.hsk-demo-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(115, 166, 235, 0.32);
    border-radius: 28px;
    box-shadow: var(--hsk-shadow);
    left: 50%;
    max-width: 350px;
    padding: 1.4rem 1.55rem 1.6rem;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -52%) rotate(2deg);
    width: calc(100% - 2rem);
    z-index: 2;
}

.hsk-demo-card::before {
    background: var(--hsk-blue);
    border-radius: 28px;
    content: '';
    inset: 16px -18px -18px 18px;
    position: absolute;
    transform: rotate(-5deg);
    z-index: -1;
}

.hsk-demo-card-topline {
    align-items: center;
    color: var(--hsk-blue-deep);
    display: flex;
    font-size: 0.72rem;
    font-weight: 700;
    justify-content: space-between;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hsk-demo-audio {
    align-items: center;
    background: var(--hsk-blue-soft);
    border-radius: 50%;
    display: inline-flex;
    font-size: 1rem;
    height: 2.1rem;
    justify-content: center;
    width: 2.1rem;
}

.hsk-demo-character-grid,
.hsk-character-cell {
    background-color: #fff;
    background-image:
        linear-gradient(rgba(115, 166, 235, 0.35) 1px, transparent 1px),
        linear-gradient(90deg, rgba(115, 166, 235, 0.35) 1px, transparent 1px),
        linear-gradient(45deg, transparent 49.4%, rgba(115, 166, 235, 0.24) 49.5%, rgba(115, 166, 235, 0.24) 50.5%, transparent 50.6%),
        linear-gradient(-45deg, transparent 49.4%, rgba(115, 166, 235, 0.24) 49.5%, rgba(115, 166, 235, 0.24) 50.5%, transparent 50.6%);
    background-size: 50% 50%, 50% 50%, 100% 100%, 100% 100%;
    border: 1px solid rgba(115, 166, 235, 0.46);
}

.hsk-demo-character-grid {
    align-items: center;
    display: flex;
    height: 168px;
    justify-content: center;
    margin: 1.2rem auto 0.8rem;
    width: 168px;
}

.hsk-demo-character-grid span {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 6.7rem;
    font-weight: 500;
    line-height: 1;
}

.hsk-demo-pinyin {
    font-size: 1.2rem;
    margin-bottom: 0.15rem;
    text-align: center;
}

.hsk-demo-meaning {
    color: var(--hsk-muted);
    margin-bottom: 0;
    text-align: center;
}

.hsk-demo-divider {
    background: var(--hsk-line);
    height: 1px;
    margin: 1.25rem 0;
}

.hsk-demo-sentence {
    color: #475467;
    font-size: 0.84rem;
    margin: 0;
}

.hsk-demo-sentence span {
    color: var(--hsk-ink);
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-right: 0.35rem;
}

.hsk-preview-note {
    align-items: center;
    background: var(--hsk-ink);
    border-radius: 999px;
    bottom: 17px;
    box-shadow: 0 12px 30px rgba(17, 23, 34, 0.18);
    color: #fff;
    display: flex;
    font-size: 0.76rem;
    font-weight: 500;
    gap: 0.55rem;
    left: 50%;
    padding: 0.75rem 1rem;
    position: absolute;
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 3;
}

.hsk-check {
    align-items: center;
    background: var(--hsk-blue);
    border-radius: 50%;
    color: var(--hsk-ink);
    display: inline-flex;
    height: 1.3rem;
    justify-content: center;
    width: 1.3rem;
}

.hsk-preview-orbit {
    align-items: center;
    background: #fff;
    border: 1px solid var(--hsk-line);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(40, 91, 155, 0.1);
    color: var(--hsk-blue-deep);
    display: flex;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 2rem;
    height: 74px;
    justify-content: center;
    position: absolute;
    width: 74px;
    z-index: 4;
}

.hsk-preview-orbit-one {
    left: 2%;
    top: 11%;
    transform: rotate(-10deg);
}

.hsk-preview-orbit-two {
    bottom: 24%;
    right: 0;
    transform: rotate(12deg);
}

.hsk-level-section {
    background: #f8fbff;
    border-bottom: 1px solid var(--hsk-line);
    padding: 0 0 clamp(3rem, 5vw, 4.5rem);
}

.hsk-level-section h2 {
    font-size: clamp(1.3rem, 2.2vw, 1.7rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin: 0 0 1.25rem;
}

.hsk-level-tabs {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.hsk-level-tab {
    align-items: center;
    appearance: none;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--hsk-line);
    border-radius: 14px;
    color: var(--hsk-ink);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    min-height: 58px;
    padding: 0.75rem 0.7rem;
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
    white-space: nowrap;
}

.hsk-level-tab span {
    line-height: 1.1;
}

.hsk-level-tab small {
    color: var(--hsk-muted);
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.1;
    margin-top: 0.35rem;
}

.hsk-level-tab:not(.is-active):hover,
.hsk-level-tab:not(.is-active):focus-visible {
    background: var(--hsk-blue-soft);
    border-color: var(--hsk-blue-strong);
    box-shadow: 0 10px 24px rgba(40, 91, 155, 0.1);
    outline: none;
    transform: translateY(-2px);
}

.hsk-level-tab.is-active {
    background: var(--hsk-ink);
    border-color: var(--hsk-ink);
    box-shadow: 0 10px 24px rgba(17, 23, 34, 0.14);
    color: #fff;
}

.hsk-level-tab.is-active small {
    color: rgba(255, 255, 255, 0.72);
}

.hsk-level-tab.is-active:focus-visible {
    box-shadow: 0 0 0 3px var(--hsk-blue), 0 10px 24px rgba(17, 23, 34, 0.14);
    outline: none;
}

.hsk-section-heading {
    margin-bottom: 3.3rem;
    max-width: 760px;
}

.hsk-section-heading h2,
.hsk-detail-heading h2,
.hsk-word-list-heading h2,
.hsk-bottom-cta h2 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 600;
    line-height: 1.12;
    margin-bottom: 1rem;
}

.hsk-section-heading > p:last-child,
.hsk-detail-heading > div > p:last-child,
.hsk-word-list-heading > div > p:last-child,
.hsk-bottom-cta p {
    color: var(--hsk-muted);
}

.hsk-stage-group + .hsk-stage-group {
    margin-top: 4rem;
}

.hsk-stage-heading {
    align-items: center;
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.hsk-stage-heading h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.15rem;
}

.hsk-stage-heading p {
    color: var(--hsk-muted);
    font-size: 0.82rem;
    margin: 0;
}

.hsk-stage-number {
    color: var(--hsk-blue-strong);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.hsk-level-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hsk-level-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

.hsk-level-card {
    background: var(--hsk-surface);
    border: 1px solid var(--hsk-line);
    border-radius: 18px;
    color: var(--hsk-ink);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 220px;
    padding: 1.45rem;
    text-align: left;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.hsk-level-card:hover,
.hsk-level-card:focus-visible,
.hsk-level-card.is-active {
    border-color: var(--hsk-blue-strong);
    box-shadow: 0 15px 38px rgba(40, 91, 155, 0.12);
    outline: none;
    transform: translateY(-4px);
}

.hsk-level-card.is-active {
    background: var(--hsk-blue-soft);
}

.hsk-level-card-wide {
    min-height: 180px;
}

.hsk-level-card-top {
    align-items: baseline;
    display: flex;
    font-size: 0.8rem;
    font-weight: 600;
    gap: 0.55rem;
    letter-spacing: 0.08em;
}

.hsk-level-card-top strong {
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: -0.06em;
}

.hsk-level-count {
    color: var(--hsk-muted);
    font-size: 0.83rem;
}

.hsk-level-samples {
    color: var(--hsk-blue-deep);
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 1rem;
    margin-top: 1.35rem;
}

.hsk-level-open {
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: auto;
    padding-top: 1.4rem;
}

.hsk-detail-section {
    background: #f8fafc;
    border-top: 1px solid var(--hsk-line);
    padding: clamp(4.5rem, 8vw, 7.5rem) 0;
}

.hsk-detail-section:focus {
    outline: none;
}

.hsk-detail-heading {
    align-items: flex-end;
    display: flex;
    gap: 2rem;
    justify-content: space-between;
    margin-bottom: 2.4rem;
}

.hsk-detail-heading > div {
    max-width: 780px;
}

.hsk-detail-heading h2 {
    margin-bottom: 0.7rem;
}

.hsk-detail-heading p {
    margin-bottom: 0;
}

.hsk-detail-total {
    background: var(--hsk-blue);
    border-radius: 999px;
    color: var(--hsk-ink);
    flex: 0 0 auto;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    padding: 0.55rem 0.9rem;
}

.hsk-category-block {
    background: #fff;
    border: 1px solid var(--hsk-line);
    border-radius: 20px;
    margin-bottom: 1.5rem;
    padding: 1.3rem;
}

.hsk-category-heading {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.hsk-category-heading .hsk-control-label {
    display: block;
    margin-bottom: 0.3rem;
}

.hsk-category-heading p {
    color: var(--hsk-muted);
    font-size: 0.8rem;
    margin: 0;
}

.hsk-category-select-wrap {
    display: none;
}

.hsk-category-select-wrap select {
    background: #fff;
    border: 1px solid var(--hsk-line);
    border-radius: 10px;
    color: var(--hsk-ink);
    max-width: 100%;
    padding: 0.75rem 2.2rem 0.75rem 0.85rem;
}

.hsk-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.hsk-category-tab {
    background: #fff;
    border: 1px solid var(--hsk-line);
    border-radius: 999px;
    color: #475467;
    cursor: pointer;
    font-size: 0.74rem;
    padding: 0.57rem 0.82rem;
}

.hsk-category-tab:hover,
.hsk-category-tab:focus-visible,
.hsk-category-tab.is-active {
    background: var(--hsk-ink);
    border-color: var(--hsk-ink);
    color: #fff;
    outline: none;
}

.hsk-deck-layout {
    align-items: start;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.9fr);
}

.hsk-deck-column,
.hsk-card-preview-panel {
    background: #fff;
    border: 1px solid var(--hsk-line);
    border-radius: 24px;
    padding: clamp(1.25rem, 2.5vw, 2rem);
}

.hsk-deck-column-heading h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
}

.hsk-deck-column-heading p {
    color: var(--hsk-muted);
    font-size: 0.85rem;
    margin-bottom: 1.4rem;
}

.hsk-deck-list {
    display: grid;
    gap: 0.75rem;
}

.hsk-deck-code-card {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--hsk-line);
    border-radius: 15px;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 1rem;
}

.hsk-deck-code-card h4 {
    color: var(--hsk-ink);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin: 0 0 0.2rem;
}

.hsk-deck-code-card p {
    color: var(--hsk-muted);
    font-size: 0.73rem;
    margin: 0;
}

.hsk-code-control {
    align-items: stretch;
    display: flex;
}

.hsk-code-value {
    align-items: center;
    background: #fff;
    border: 1px solid var(--hsk-line);
    border-radius: 9px 0 0 9px;
    color: var(--hsk-blue-deep);
    display: inline-flex;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.65rem 0.72rem;
}

.hsk-copy-button {
    background: var(--hsk-blue);
    border: 1px solid var(--hsk-blue);
    border-radius: 0 9px 9px 0;
    color: var(--hsk-ink);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.65rem 0.78rem;
}

.hsk-copy-button:hover,
.hsk-copy-button:focus-visible {
    background: var(--hsk-blue-strong);
    border-color: var(--hsk-blue-strong);
    outline: none;
}

.hsk-preview-panel-heading {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.hsk-preview-panel-heading .hsk-control-label {
    display: block;
    margin-bottom: 0.2rem;
}

.hsk-preview-panel-heading p {
    color: var(--hsk-muted);
    font-size: 0.76rem;
    margin: 0;
}

.hsk-preview-flip-button {
    background: transparent;
    border: 0;
    color: var(--hsk-blue-deep);
    cursor: pointer;
    font-size: 0.73rem;
    font-weight: 600;
    padding: 0.15rem 0;
}

.hsk-preview-flip-button:hover,
.hsk-preview-flip-button:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hsk-flip-card {
    background: transparent;
    border: 0;
    cursor: pointer;
    display: block;
    height: 320px;
    padding: 0;
    perspective: 1000px;
    width: 100%;
}

.hsk-flip-card:focus-visible {
    border-radius: 19px;
    outline: 3px solid rgba(115, 166, 235, 0.55);
    outline-offset: 3px;
}

.hsk-flip-card-inner {
    display: block;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 520ms cubic-bezier(0.2, 0.75, 0.25, 1);
    width: 100%;
}

.hsk-flip-card.is-flipped .hsk-flip-card-inner {
    transform: rotateY(180deg);
}

.hsk-flip-face {
    align-items: center;
    backface-visibility: hidden;
    background: linear-gradient(145deg, #fff, var(--hsk-blue-soft));
    border: 1px solid rgba(115, 166, 235, 0.38);
    border-radius: 19px;
    display: flex;
    flex-direction: column;
    height: 100%;
    inset: 0;
    justify-content: center;
    padding: 1.35rem;
    position: absolute;
    width: 100%;
}

.hsk-flip-back {
    transform: rotateY(180deg);
}

.hsk-flip-kicker {
    color: var(--hsk-blue-deep);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

.hsk-flip-grid {
    display: flex;
    gap: 0.45rem;
    justify-content: center;
    max-width: 100%;
}

.hsk-character-cell {
    align-items: center;
    display: inline-flex;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: clamp(2.35rem, 4.7vw, 4rem);
    height: clamp(70px, 8vw, 94px);
    justify-content: center;
    width: clamp(70px, 8vw, 94px);
}

.hsk-flip-pinyin {
    color: #344054;
    font-size: 1.05rem;
    margin-top: 0.8rem;
}

.hsk-flip-hint {
    color: var(--hsk-muted);
    font-size: 0.7rem;
    margin-top: 0.55rem;
}

.hsk-flip-meaning {
    font-size: clamp(1.45rem, 2.6vw, 2rem);
    font-weight: 600;
    margin-bottom: 1.35rem;
    text-align: center;
}

.hsk-flip-example {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: clamp(1.1rem, 2.2vw, 1.45rem);
    font-weight: 600;
    text-align: center;
}

.hsk-flip-example-pinyin {
    color: #475467;
    font-size: 0.78rem;
    margin-top: 0.35rem;
    text-align: center;
}

.hsk-flip-example-translation {
    color: var(--hsk-muted);
    font-size: 0.76rem;
    margin-top: 0.8rem;
    text-align: center;
}

.hsk-feature-list {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    list-style: none;
    margin: 1rem 0 0;
}

.hsk-feature-list li {
    align-items: center;
    color: #475467;
    display: flex;
    font-size: 0.7rem;
    gap: 0.45rem;
}

.hsk-feature-list li span {
    align-items: center;
    background: var(--hsk-blue);
    border-radius: 50%;
    color: var(--hsk-blue-deep);
    display: inline-flex;
    flex: 0 0 auto;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 0.62rem;
    height: 1.4rem;
    justify-content: center;
    width: 1.4rem;
}

.hsk-import-callout {
    align-items: center;
    background: var(--hsk-blue);
    border-radius: 22px;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin: 1.5rem 0 clamp(4rem, 7vw, 6.5rem);
    padding: 1.35rem 1.5rem;
}

.hsk-import-icon {
    align-items: center;
    background: #fff;
    border-radius: 50%;
    display: flex;
    font-size: 1.3rem;
    height: 3.2rem;
    justify-content: center;
    width: 3.2rem;
}

.hsk-import-callout .hsk-control-label {
    color: var(--hsk-blue-deep);
    display: block;
    margin-bottom: 0.25rem;
}

.hsk-import-callout h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
}

.hsk-import-callout p {
    color: #344054;
    font-size: 0.78rem;
    margin: 0;
}

.hsk-import-callout > a {
    color: var(--hsk-ink);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.hsk-word-list-section {
    scroll-margin-top: 110px;
}

.hsk-word-list-heading {
    align-items: end;
    display: flex;
    gap: 2rem;
    justify-content: space-between;
    margin-bottom: 1.4rem;
}

.hsk-word-list-heading > div {
    max-width: 720px;
}

.hsk-word-list-heading h2 {
    font-size: clamp(1.9rem, 3.5vw, 2.8rem);
    margin-bottom: 0.5rem;
}

.hsk-word-list-heading p {
    font-size: 0.86rem;
    margin-bottom: 0;
}

.hsk-word-search-wrap {
    align-items: center;
    background: #fff;
    border: 1px solid var(--hsk-line);
    border-radius: 12px;
    display: flex;
    flex: 0 1 330px;
    gap: 0.45rem;
    padding: 0 0.8rem;
}

.hsk-word-search-wrap:focus-within {
    border-color: var(--hsk-blue-strong);
    box-shadow: 0 0 0 3px rgba(115, 166, 235, 0.15);
}

.hsk-word-search-wrap > span {
    color: var(--hsk-muted);
}

.hsk-word-search-wrap input {
    background: transparent;
    border: 0;
    color: var(--hsk-ink);
    font-size: 0.78rem;
    min-width: 0;
    outline: 0;
    padding: 0.85rem 0;
    width: 100%;
}

.hsk-word-table-wrap {
    background: #fff;
    border: 1px solid var(--hsk-line);
    border-radius: 18px;
    overflow: hidden;
}

.hsk-word-table {
    border-collapse: collapse;
    width: 100%;
}

.hsk-word-table th {
    background: var(--hsk-blue-soft);
    color: #475467;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.85rem 1rem;
    text-align: left;
    text-transform: uppercase;
}

.hsk-word-table td {
    border-top: 1px solid var(--hsk-line);
    color: #475467;
    font-size: 0.78rem;
    line-height: 1.45;
    padding: 0.9rem 1rem;
    vertical-align: top;
}

.hsk-word-table td:first-child {
    color: var(--hsk-ink);
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
}

.hsk-table-example strong {
    color: var(--hsk-ink);
    display: block;
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 500;
}

.hsk-table-example small {
    color: var(--hsk-muted);
    display: block;
    font-size: 0.69rem;
    margin-top: 0.18rem;
}

.hsk-empty-state {
    color: var(--hsk-muted);
    margin: 0;
    padding: 2.5rem 1rem;
    text-align: center;
}

.hsk-word-list-footnote {
    align-items: center;
    background: #fff;
    border: 1px solid var(--hsk-line);
    border-radius: 16px;
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    margin-top: 1rem;
    padding: 1rem 1.2rem;
}

.hsk-word-list-footnote p {
    color: var(--hsk-muted);
    font-size: 0.75rem;
    margin: 0;
    max-width: 800px;
}

.hsk-word-list-footnote strong {
    color: var(--hsk-ink);
}

.hsk-bottom-cta {
    background: var(--hsk-ink);
    color: #fff;
    padding: clamp(4rem, 7vw, 6rem) 0;
}

.hsk-bottom-cta-inner {
    align-items: center;
    display: flex;
    gap: 3rem;
    justify-content: space-between;
}

.hsk-bottom-cta-inner > div:first-child {
    max-width: 680px;
}

.hsk-bottom-cta h2 {
    color: #fff;
    margin-bottom: 0.7rem;
}

.hsk-bottom-cta .hsk-eyebrow {
    color: var(--hsk-blue);
}

.hsk-bottom-cta p {
    color: #b8c1cf;
    margin-bottom: 0;
}

.hsk-store-links {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 0.8rem;
}

.hsk-store-links img {
    display: block;
    height: 48px;
    width: auto;
}

.hsk-footer {
    background: var(--hsk-blue);
    margin-top: 0;
}

.hsk-footer .container {
    gap: 1.5rem;
}

.hsk-footer-brand {
    color: var(--hsk-ink);
    font-size: 1.35rem;
    font-weight: 600;
}

.hsk-footer p {
    font-size: 0.8rem;
    margin: 0 auto 0 0;
}

.hsk-copy-toast {
    background: var(--hsk-ink);
    border-radius: 999px;
    bottom: 1.25rem;
    color: #fff;
    font-size: 0.76rem;
    left: 50%;
    opacity: 0;
    padding: 0.75rem 1rem;
    pointer-events: none;
    position: fixed;
    transform: translate(-50%, 20px);
    transition: opacity 180ms ease, transform 180ms ease;
    z-index: 100;
}

.hsk-copy-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.sr-only {
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

@media (max-width: 960px) {
    .hsk-hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(290px, 0.7fr);
    }

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

    .hsk-level-grid .hsk-level-card:last-child:nth-child(odd) {
        grid-column: span 2;
    }

    .hsk-level-grid-single {
        grid-template-columns: minmax(0, 1fr);
    }

    .hsk-level-grid-single .hsk-level-card:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .hsk-deck-layout {
        grid-template-columns: 1fr;
    }

    .hsk-card-preview-panel {
        display: grid;
        gap: 1rem 1.5rem;
        grid-template-columns: minmax(280px, 0.85fr) minmax(300px, 1.15fr);
    }

    .hsk-preview-panel-heading,
    .hsk-feature-list {
        grid-column: 2;
    }

    .hsk-preview-panel-heading {
        grid-row: 1;
    }

    .hsk-flip-card {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    .hsk-feature-list {
        align-content: start;
        grid-row: 2;
    }

    .hsk-import-callout {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .hsk-import-callout > a {
        grid-column: 2;
    }

    .hsk-bottom-cta-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 760px) {
    .hsk-hero-grid {
        grid-template-columns: 1fr;
    }

    .hsk-level-tabs {
        display: flex;
        overflow-x: auto;
        padding: 0.15rem 0 0.65rem;
        scroll-snap-type: x proximity;
        scrollbar-width: thin;
    }

    .hsk-level-tab {
        flex: 0 0 104px;
        scroll-snap-align: start;
    }

    .hsk-hero-preview {
        min-height: 450px;
    }

    .hsk-preview-orbit-one {
        left: 8%;
    }

    .hsk-preview-orbit-two {
        right: 6%;
    }

    .hsk-detail-heading,
    .hsk-word-list-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }

    .hsk-word-search-wrap {
        flex-basis: auto;
        width: 100%;
    }

    .hsk-category-tabs {
        display: none;
    }

    .hsk-category-select-wrap {
        display: block;
        margin-top: 0.85rem;
        width: 100%;
    }

    .hsk-category-select-wrap select {
        width: 100%;
    }

    .hsk-category-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .hsk-card-preview-panel {
        display: block;
    }

    .hsk-feature-list {
        margin-top: 1rem;
    }

    .hsk-import-callout {
        align-items: flex-start;
        grid-template-columns: 1fr;
    }

    .hsk-import-callout > a {
        grid-column: 1;
    }

    .hsk-import-icon {
        height: 2.7rem;
        width: 2.7rem;
    }

    .hsk-word-table-wrap {
        overflow-x: auto;
    }

    .hsk-word-table {
        min-width: 720px;
    }

    .hsk-word-list-footnote {
        align-items: flex-start;
        flex-direction: column;
    }

    .hsk-store-links {
        flex-wrap: wrap;
    }

    .hsk-footer .container {
        align-items: center;
        flex-direction: column;
        text-align: center;
    }

    .hsk-footer p {
        margin: 0;
    }

    .hsk-footer .footer-nav {
        margin-top: 0;
    }
}

@media (max-width: 560px) {
    .hsk-page .container {
        padding-left: 18px;
        padding-right: 18px;
    }

    .hsk-hero {
        padding: 2.75rem 0 1.75rem;
    }

    .hsk-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .hsk-text-link {
        align-self: center;
    }

    .hsk-hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .hsk-hero-stats div {
        padding: 0 0.85rem;
    }

    .hsk-hero-stats div:first-child {
        padding-left: 0;
    }

    .hsk-hero-stats dt {
        font-size: 1.45rem;
    }

    .hsk-hero-stats dd {
        max-width: 80px;
    }

    .hsk-level-section {
        padding-bottom: 2.75rem;
    }

    .hsk-level-grid {
        grid-template-columns: 1fr;
    }

    .hsk-level-grid .hsk-level-card:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .hsk-level-card {
        min-height: 190px;
    }

    .hsk-deck-column,
    .hsk-card-preview-panel {
        border-radius: 18px;
        padding: 1rem;
    }

    .hsk-deck-code-card {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .hsk-code-control {
        width: 100%;
    }

    .hsk-code-value {
        flex: 1;
    }

    .hsk-flip-card {
        height: 300px;
    }

    .hsk-character-cell {
        height: 64px;
        width: 64px;
    }

    .hsk-feature-list {
        grid-template-columns: 1fr;
    }

    .hsk-bottom-cta {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hsk-level-card,
    .hsk-level-tab,
    .hsk-primary-button,
    .hsk-flip-card-inner,
    .hsk-copy-toast {
        scroll-behavior: auto;
        transition: none;
    }
}

/* Level-by-level resource directory */
.hsk-secondary-button {
    align-items: center;
    background: #fff;
    border: 1px solid var(--hsk-blue-strong);
    border-radius: 999px;
    color: var(--hsk-blue-deep);
    display: inline-flex;
    font-size: 0.95rem;
    font-weight: 600;
    justify-content: center;
    padding: 0.9rem 1.4rem;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.hsk-secondary-button:hover {
    background: var(--hsk-blue-soft);
    color: var(--hsk-blue-deep);
    text-decoration: none;
    transform: translateY(-2px);
}

.hsk-resource-directory {
    background: #f8fafc;
    border-top: 1px solid var(--hsk-line);
    padding: clamp(4rem, 7vw, 7rem) 0;
}

.hsk-resource-directory:focus {
    outline: none;
}

.hsk-resource-directory .hsk-import-callout {
    margin-bottom: 1.5rem;
    margin-top: 0;
}

.hsk-source-banner {
    align-items: center;
    background: #fff;
    border: 1px solid var(--hsk-line);
    border-radius: 24px;
    display: flex;
    gap: 2rem;
    justify-content: space-between;
    margin-bottom: clamp(3.5rem, 7vw, 6rem);
    padding: clamp(1.4rem, 3vw, 2.2rem);
}

.hsk-source-banner > div:first-child {
    max-width: 760px;
}

.hsk-source-banner .hsk-control-label {
    display: block;
    margin-bottom: 0.35rem;
}

.hsk-source-banner h2 {
    font-size: clamp(1.55rem, 3vw, 2.3rem);
    font-weight: 600;
    margin-bottom: 0.55rem;
}

.hsk-source-banner p {
    color: var(--hsk-muted);
    font-size: 0.82rem;
    line-height: 1.65;
    margin: 0;
}

.hsk-source-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 0.9rem;
}

.hsk-level-resources {
    display: grid;
    gap: clamp(4rem, 9vw, 8rem);
}

.hsk-level-resource {
    scroll-margin-top: 108px;
}

.hsk-resource-header {
    align-items: flex-end;
    display: flex;
    gap: 2rem;
    justify-content: space-between;
    margin-bottom: 1.35rem;
}

.hsk-resource-header > div:first-child {
    max-width: 770px;
}

.hsk-resource-header .hsk-eyebrow {
    margin-bottom: 0.45rem;
}

.hsk-resource-header h2 {
    font-size: clamp(2.2rem, 4.7vw, 3.8rem);
    font-weight: 600;
    margin-bottom: 0.65rem;
}

.hsk-resource-header p:last-child {
    color: var(--hsk-muted);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.hsk-resource-header-actions {
    align-items: flex-end;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 0.65rem;
}

.hsk-download-button {
    align-items: center;
    background: var(--hsk-ink);
    border-radius: 15px;
    color: #fff;
    display: inline-flex;
    gap: 0.7rem;
    min-width: 190px;
    padding: 0.8rem 1rem;
}

.hsk-download-button:hover {
    background: var(--hsk-blue-deep);
    color: #fff;
    text-decoration: none;
}

.hsk-download-button > span:first-child {
    align-items: center;
    background: rgba(255, 255, 255, 0.13);
    border-radius: 50%;
    display: inline-flex;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.hsk-download-button > span:last-child {
    display: flex;
    flex-direction: column;
}

.hsk-download-button strong {
    font-size: 0.82rem;
}

.hsk-download-button small {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.64rem;
    margin-top: 0.08rem;
}

.hsk-resource-decks {
    align-items: stretch;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
}

.hsk-resource-deck-main,
.hsk-mini-preview,
.hsk-complete-word-list {
    background: #fff;
    border: 1px solid var(--hsk-line);
    border-radius: 24px;
}

.hsk-resource-deck-main {
    padding: clamp(1.25rem, 2.8vw, 2rem);
}

.hsk-resource-subheading {
    align-items: flex-end;
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    margin-bottom: 1.35rem;
}

.hsk-resource-subheading .hsk-control-label {
    display: block;
    margin-bottom: 0.25rem;
}

.hsk-resource-subheading h3,
.hsk-complete-word-list h3 {
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.hsk-resource-subheading p {
    color: var(--hsk-muted);
    font-size: 0.78rem;
    margin: 0;
}

.hsk-inline-category-select {
    flex: 0 1 330px;
}

.hsk-inline-category-select > span {
    color: var(--hsk-muted);
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.hsk-inline-category-select select {
    background: #fff;
    border: 1px solid var(--hsk-line);
    border-radius: 11px;
    color: var(--hsk-ink);
    font-size: 0.73rem;
    max-width: 100%;
    padding: 0.7rem 2.1rem 0.7rem 0.75rem;
    width: 100%;
}

.hsk-deck-category-group {
    display: grid;
    gap: 0.65rem;
}

.hsk-deck-category-group + .hsk-deck-category-group {
    border-top: 1px solid var(--hsk-line);
    margin-top: 0.4rem;
    padding-top: 1.05rem;
}

.hsk-deck-category-title h4 {
    font-size: 0.92rem;
    font-weight: 600;
    margin: 0 0 0.2rem;
}

.hsk-deck-category-title p,
.hsk-category-note {
    color: var(--hsk-muted);
    font-size: 0.7rem;
    line-height: 1.5;
    margin: 0;
}

.hsk-category-note {
    border-top: 1px solid var(--hsk-line);
    margin-top: 1rem;
    padding-top: 0.85rem;
}

.hsk-mini-preview {
    background: linear-gradient(155deg, #fff, var(--hsk-blue-soft));
    display: flex;
    flex-direction: column;
    padding: clamp(1.25rem, 2.6vw, 1.8rem);
}

.hsk-mini-preview-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.hsk-mini-preview-heading .hsk-control-label {
    margin: 0;
}

.hsk-mini-preview-heading > span:last-child {
    color: var(--hsk-blue-deep);
    font-size: 0.7rem;
    font-weight: 700;
}

.hsk-mini-character {
    color: var(--hsk-ink);
    font-family: 'Noto Sans SC', sans-serif;
    font-size: clamp(3.4rem, 6vw, 5rem);
    font-weight: 500;
    line-height: 1.1;
    margin-top: 1.4rem;
    text-align: center;
}

.hsk-mini-pinyin {
    font-size: 0.95rem;
    margin: 0.4rem 0 0;
    text-align: center;
}

.hsk-mini-meaning {
    color: var(--hsk-muted);
    font-size: 0.8rem;
    margin: 0.15rem 0 1.2rem;
    text-align: center;
}

.hsk-mini-example {
    border-bottom: 1px solid var(--hsk-line);
    border-top: 1px solid var(--hsk-line);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.85rem 0;
}

.hsk-mini-example strong {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 0.9rem;
}

.hsk-mini-example span {
    color: var(--hsk-muted);
    font-size: 0.68rem;
}

.hsk-mini-features {
    display: grid;
    gap: 0.55rem;
    list-style: none;
    margin: auto 0 0;
    padding-top: 1.2rem;
}

.hsk-mini-features li {
    align-items: center;
    color: #475467;
    display: flex;
    font-size: 0.68rem;
    gap: 0.5rem;
}

.hsk-mini-features li span {
    align-items: center;
    background: var(--hsk-blue);
    border-radius: 50%;
    color: var(--hsk-blue-deep);
    display: inline-flex;
    flex: 0 0 auto;
    font-family: 'Noto Sans SC', sans-serif;
    height: 1.45rem;
    justify-content: center;
    width: 1.45rem;
}

.hsk-complete-word-list {
    margin-top: 1.25rem;
    overflow: hidden;
    padding: clamp(1.25rem, 2.8vw, 2rem);
}

.hsk-complete-word-list .hsk-word-list-heading {
    margin-bottom: 1.2rem;
}

.hsk-complete-word-list .hsk-word-list-heading p:last-child {
    color: var(--hsk-muted);
}

.hsk-level-resource .hsk-word-table td:first-child {
    color: var(--hsk-muted);
    font-family: 'Poppins', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    width: 9%;
}

.hsk-level-resource .hsk-word-table td:nth-child(2) {
    color: var(--hsk-ink);
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    width: 23%;
}

.hsk-level-resource .hsk-word-table td:nth-child(3) {
    width: 38%;
}

.hsk-word-list-actions {
    align-items: center;
    display: flex;
    gap: 1.25rem;
    justify-content: space-between;
    margin-top: 1rem;
}

.hsk-word-list-actions > a {
    color: var(--hsk-blue-deep);
    font-size: 0.75rem;
    font-weight: 600;
}

.hsk-show-more-button {
    background: var(--hsk-ink);
    border: 0;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.75rem 1.1rem;
}

.hsk-show-more-button:hover,
.hsk-show-more-button:focus-visible {
    background: var(--hsk-blue-deep);
    outline: none;
}

.hsk-complete-word-list.has-load-error .hsk-word-table-wrap,
.hsk-complete-word-list.has-load-error .hsk-word-search-wrap,
.hsk-complete-word-list.has-load-error .hsk-show-more-button {
    display: none;
}

@media (max-width: 980px) {
    .hsk-source-banner,
    .hsk-resource-header,
    .hsk-resource-subheading {
        align-items: flex-start;
        flex-direction: column;
    }

    .hsk-source-actions {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .hsk-resource-header-actions {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .hsk-resource-decks {
        grid-template-columns: 1fr;
    }

    .hsk-mini-features {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-top: 1rem;
    }

    .hsk-inline-category-select {
        flex-basis: auto;
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 700px) {
    .hsk-source-actions,
    .hsk-resource-header-actions,
    .hsk-word-list-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .hsk-download-button {
        justify-content: center;
        width: 100%;
    }

    .hsk-mini-features {
        grid-template-columns: 1fr;
    }

    .hsk-level-resource .hsk-word-table {
        min-width: 620px;
    }

    .hsk-word-list-actions > a {
        text-align: center;
    }
}

/* Real Creator Tools-format flashcard previews */
.hsk-hero-preview {
    min-height: 600px;
}

@media (min-width: 761px) {
    .hsk-hero-grid {
        align-items: start;
    }

    .hsk-hero-compact {
        align-self: start;
        padding-top: clamp(3.25rem, 5vw, 5rem);
    }

    .hsk-hero-preview {
        min-height: 500px;
    }
}

.hsk-hero-preview > .hsk-interactive-preview-host {
    left: 50%;
    max-width: 360px;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 1rem);
    z-index: 3;
}

.hsk-live-preview {
    width: 100%;
}

.hsk-live-preview-heading {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.hsk-live-preview-heading > div {
    display: grid;
    gap: 0.12rem;
}

.hsk-live-preview-heading .hsk-control-label {
    margin: 0;
}

.hsk-live-preview-heading strong {
    color: var(--hsk-ink);
    font-size: 0.9rem;
    font-weight: 600;
}

.hsk-live-badge {
    align-items: center;
    background: #e7f7ef;
    border: 1px solid #a7dfc1;
    border-radius: 999px;
    color: #177044;
    display: inline-flex;
    font-size: 0.64rem;
    font-weight: 700;
    gap: 0.3rem;
    padding: 0.35rem 0.55rem;
    text-transform: uppercase;
}

.hsk-live-badge::before {
    background: #28a867;
    border-radius: 50%;
    content: '';
    height: 0.42rem;
    width: 0.42rem;
}

.hsk-live-preview-controls {
    align-items: center;
    display: flex;
    gap: 0.45rem;
}

.hsk-live-flip-control {
    background: transparent;
    border: 0;
    color: var(--hsk-blue-deep);
    cursor: pointer;
    font-size: 0.66rem;
    font-weight: 700;
    padding: 0.25rem 0;
    text-decoration: underline;
    text-decoration-color: var(--hsk-blue-strong);
    text-underline-offset: 3px;
    white-space: nowrap;
}

.hsk-live-flip-control:hover,
.hsk-live-flip-control:focus-visible {
    color: var(--hsk-ink);
    outline: none;
}

.hsk-live-preview-hint {
    color: var(--hsk-muted);
    font-size: 0.68rem;
    margin: 0 0 0.55rem;
}

.hsk-live-flip-card {
    max-width: 330px;
    outline: none;
    position: relative;
}

.hsk-live-flip-card:focus-visible {
    border-radius: 14px;
    box-shadow: 0 0 0 4px rgba(115, 166, 235, 0.3);
}

.hsk-live-card-face {
    border-color: rgba(115, 166, 235, 0.35);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(40, 91, 155, 0.18);
    max-width: none;
    width: 100%;
}

.hsk-live-card-face[data-side='front'] {
    background: linear-gradient(155deg, #fff 0%, #f2f7fe 100%);
}

.hsk-live-flip-card[data-flipped='false'] .affiliate-template-flip-face-back,
.hsk-live-flip-card[data-flipped='true'] .affiliate-template-flip-face:not(.affiliate-template-flip-face-back) {
    pointer-events: none;
}

.hsk-live-front-content {
    gap: 0.75rem;
}

.hsk-live-front-pinyin {
    color: var(--hsk-muted);
    font-size: 1rem;
}

.hsk-live-front-label {
    margin-top: 0.25rem;
}

.hsk-live-stroke .affiliate-template-stroke-tile {
    border-radius: 9px;
    height: 72px;
    padding: 4px;
    width: 72px;
}

.hsk-live-stroke .affiliate-template-stroke-glyph {
    font-size: 1.7rem;
}

.hsk-preview-audio-button {
    appearance: none;
    background: rgba(255, 255, 255, 0.94);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    padding: 4px 0 4px 8px;
    pointer-events: none;
    position: absolute;
    transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease, opacity 140ms ease, visibility 0s linear 140ms;
    visibility: hidden;
    z-index: 12;
}

.hsk-preview-audio-word-front {
    position: static;
}

.hsk-preview-audio-word-back {
    right: 7%;
    top: 6%;
}

.hsk-preview-audio-example-back {
    right: 7%;
    top: 72%;
}

.hsk-live-flip-card[data-flipped='false'] [data-audio-face='front'],
.hsk-live-flip-card[data-flipped='true'] [data-audio-face='back'] {
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s, 0s, 0s, 720ms, 720ms;
    visibility: visible;
}

.hsk-preview-audio-button:hover,
.hsk-preview-audio-button:focus-visible {
    background: rgba(115, 166, 235, 0.14);
    box-shadow: 0 0 0 3px rgba(115, 166, 235, 0.14);
    outline: none;
}

.hsk-preview-audio-button:active {
    transform: scale(0.92);
}

.hsk-preview-audio-button.is-playing {
    animation: hsk-audio-pulse 900ms ease-in-out infinite alternate;
    background: var(--hsk-blue);
}

.hsk-live-preview-status {
    color: var(--hsk-muted);
    font-size: 0.72rem;
    line-height: 1.4;
    margin: 0;
    min-height: 1.4em;
    padding-top: 0.85rem;
    text-align: center;
}

.hsk-mini-preview.hsk-interactive-preview-host {
    background: #fff;
    display: block;
    padding: clamp(1rem, 2.4vw, 1.4rem);
}

.hsk-live-preview-compact .affiliate-template-flip-card {
    max-width: 280px;
}

.hsk-live-preview-compact .hsk-live-preview-heading strong {
    font-size: 0.78rem;
}

.hsk-live-preview-compact .hsk-live-card-face {
    border-radius: 16px;
    padding: 0.65rem;
}

.hsk-live-preview-compact .affiliate-template-preview-field-chinese {
    font-size: 1.8rem;
}

.hsk-live-preview-compact .affiliate-template-phone-card[data-side='back'] .affiliate-template-preview-field-chinese {
    font-size: 1.55rem;
}

.hsk-live-preview-compact .affiliate-template-phone-card[data-side='back'] .affiliate-template-preview-field-translation {
    font-size: 1rem;
}

.hsk-live-preview-compact .affiliate-template-phone-card[data-side='back'] .affiliate-template-preview-field-sentence {
    font-size: 0.92rem;
}

.hsk-live-preview-compact .affiliate-template-phone-card[data-side='back'] .affiliate-template-preview-field-pinyin,
.hsk-live-preview-compact .affiliate-template-phone-card[data-side='back'] .affiliate-template-preview-field-id-exampleTranslation {
    font-size: 0.78rem;
}

.hsk-live-preview-compact .affiliate-template-preview-section-label {
    font-size: 0.68rem;
    margin-top: 0.25rem;
}

.hsk-live-preview-compact .affiliate-template-preview-divider {
    margin: 0.12rem 0 0.32rem;
}

.hsk-live-preview-compact .hsk-live-stroke .affiliate-template-stroke-tile {
    border-radius: 6px;
    height: 46px;
    padding: 3px;
    width: 46px;
}

.hsk-live-preview-compact .hsk-live-stroke .affiliate-template-stroke-glyph {
    font-size: 1.05rem;
}

.hsk-live-preview-compact .affiliate-template-preview-explain {
    font-size: 0.68rem;
    margin-top: 0.35rem;
    padding: 0.3rem 0.55rem;
}

.hsk-live-preview-compact .affiliate-template-preview-explain-icon {
    height: 16px;
    width: 16px;
}

@keyframes hsk-audio-pulse {
    from {
        box-shadow: 0 0 0 0 rgba(115, 166, 235, 0.25);
    }
    to {
        box-shadow: 0 0 0 7px rgba(115, 166, 235, 0.05);
    }
}

@media (max-width: 980px) {
    .hsk-mini-preview.hsk-interactive-preview-host {
        max-width: 420px;
        width: 100%;
    }
}

@media (max-width: 760px) {
    .hsk-hero-preview {
        min-height: 570px;
    }

    .hsk-hero-preview > .hsk-interactive-preview-host {
        max-width: 335px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hsk-live-flip-card .affiliate-template-flip-inner,
    .hsk-preview-audio-button {
        transition: none;
    }

    .hsk-preview-audio-button.is-playing {
        animation: none;
    }
}

/* One selected level at a time: import code first, word list second. */
.hsk-resource-directory {
    padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(4rem, 7vw, 6rem);
}

.hsk-level-resources {
    display: block;
}

.hsk-level-resource-simple[hidden] {
    display: none;
}

.hsk-simple-deck-block,
.hsk-level-resource-simple .hsk-complete-word-list {
    background: #fff;
    border: 1px solid var(--hsk-line);
    border-radius: 20px;
}

.hsk-simple-deck-block {
    --hsk-deck-block-padding: clamp(1.1rem, 2.5vw, 1.6rem);
    margin-bottom: 1rem;
    overflow: hidden;
    padding: var(--hsk-deck-block-padding) var(--hsk-deck-block-padding) 0;
}

.hsk-simple-deck-heading {
    align-items: flex-end;
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}

.hsk-simple-deck-heading .hsk-control-label {
    display: block;
    margin-bottom: 0.25rem;
}

.hsk-simple-deck-heading h2,
.hsk-level-resource-simple .hsk-word-list-heading h2 {
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
    font-weight: 600;
    margin: 0;
}

.hsk-level-resource-simple .hsk-deck-list {
    background: var(--hsk-blue-soft);
    border-top: 1px solid rgba(115, 166, 235, 0.28);
    display: grid;
    gap: 1.25rem 1rem;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    justify-content: start;
    margin: 0 calc(0px - var(--hsk-deck-block-padding));
    padding: 1rem var(--hsk-deck-block-padding) var(--hsk-deck-block-padding);
}

.hsk-simple-code-item {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    justify-content: space-between;
    min-width: 0;
}

.hsk-simple-deck-title {
    color: var(--hsk-ink);
    font-size: 0.76rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.45;
    margin: 0;
}

.hsk-simple-deck-title strong {
    font-weight: 600;
}

.hsk-simple-code-item .hsk-code-control {
    margin: 0;
    white-space: nowrap;
}

.hsk-simple-import-link {
    color: var(--hsk-blue-deep);
    display: inline-block;
    font-size: 0.84rem;
    font-weight: 600;
    margin: 0 0 1.25rem;
}

.hsk-level-resource-simple .hsk-complete-word-list {
    margin-top: 0;
}

.hsk-level-resource-simple .hsk-word-list-heading {
    align-items: center;
    display: flex;
    gap: 1.25rem;
    justify-content: space-between;
}

.hsk-word-list-tools {
    align-items: center;
    display: flex;
    gap: 0.7rem;
}

.hsk-word-list-tools .hsk-word-search-wrap {
    flex: 0 0 380px;
    min-width: 380px;
}

.hsk-simple-pdf-link {
    align-items: center;
    border: 1px solid var(--hsk-line);
    border-radius: 999px;
    color: var(--hsk-blue-deep);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.7rem;
    font-weight: 600;
    min-height: 2.65rem;
    padding: 0.55rem 0.85rem;
}

.hsk-simple-pdf-link:hover {
    background: var(--hsk-blue-soft);
    text-decoration: none;
}

.hsk-level-resource-simple .hsk-word-list-actions {
    justify-content: flex-start;
}

@media (max-width: 700px) {
    .hsk-simple-deck-heading,
    .hsk-level-resource-simple .hsk-word-list-heading,
    .hsk-word-list-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .hsk-word-list-tools {
        width: 100%;
    }

    .hsk-word-list-tools .hsk-word-search-wrap {
        flex-basis: auto;
        min-width: 0;
        width: 100%;
    }

    .hsk-simple-pdf-link {
        align-self: flex-start;
    }

    .hsk-level-resource-simple .hsk-deck-list {
        grid-template-columns: 1fr;
    }

    .hsk-simple-deck-title {
        min-height: 0;
    }
}
