:root {
    --primary: #5C6F5C;
    --primary-dark: #2d5f4d;
    --primary-light: rgba(92, 111, 92, 0.08);
    --primary-border: rgba(92, 111, 92, 0.15);
    --text-primary: #1A1816;
    --text-secondary: #3A3633;
    --text-muted: #9E9689;
    --border-primary: #E8E3DA;
    --bg-cream: #F7F4EF;
    --bg-white: #FEFEFE;
}

footer {
    display: none !important;
}

.celpip-practice-container {
    display: flex;
    min-height: calc(100vh - 64px);
    background: linear-gradient(135deg, var(--bg-cream) 0%, var(--bg-white) 100%);
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
}

.celpip-practice-sidebar {
    width: 275px;
    background: var(--bg-white);
    border-right: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.celpip-sidebar-header {
    padding: 2rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border-primary);
    background: linear-gradient(135deg, rgba(92, 111, 92, 0.04) 0%, rgba(92, 111, 92, 0.01) 100%);
}

.celpip-sidebar-kicker,
.celpip-eyebrow,
.celpip-pill,
.celpip-task-meta,
.celpip-header-card span,
.celpip-empty-state strong {
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.celpip-format-card {
    margin-top: 0.55rem;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    box-shadow: 0 4px 14px rgba(92, 111, 92, 0.18);
    color: white;
}

.celpip-format-name,
.celpip-format-meta {
    display: block;
}

.celpip-format-name {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.celpip-format-meta {
    margin-top: 0.2rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.78rem;
}

.celpip-sidebar-header p {
    margin: 0.9rem 0 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.5;
}

.celpip-sidebar-tabs {
    padding: 1rem 0;
    flex: 1;
}

.celpip-sidebar-tab {
    width: calc(100% - 2rem);
    margin: 0.25rem 1rem;
    padding: 1rem 1.5rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font: inherit;
    font-weight: 600;
    text-align: left;
    transition: all 0.2s ease;
}

.celpip-sidebar-tab:hover {
    background: var(--primary-light);
    border-color: var(--primary-border);
    transform: translateX(2px);
}

.celpip-sidebar-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(92, 111, 92, 0.15);
    color: white;
    transform: translateX(2px);
}

.celpip-tab-icon {
    color: var(--primary);
    flex-shrink: 0;
    height: 24px;
    width: 24px;
}

.celpip-sidebar-tab.active .celpip-tab-icon {
    color: white;
}

.celpip-tab-icon svg {
    height: 100%;
    width: 100%;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.celpip-main-content {
    flex: 1;
    min-width: 0;
    padding: 2rem;
}

.celpip-page-header {
    background: white;
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(26, 24, 22, 0.06);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: clamp(1.5rem, 3vw, 2.25rem);
}

.celpip-eyebrow {
    display: block;
    margin-bottom: 0.75rem;
}

.celpip-page-header h1 {
    color: var(--text-primary);
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2.6rem, 5vw, 4.8rem);
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 0.94;
    margin: 0;
}

.celpip-page-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.65;
    margin: 1rem 0 0;
    max-width: 720px;
}

.celpip-header-card {
    align-self: stretch;
    background: linear-gradient(135deg, rgba(92, 111, 92, 0.08) 0%, rgba(92, 111, 92, 0.03) 100%);
    border: 1px solid var(--primary-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.2rem;
}

.celpip-header-card strong {
    color: var(--text-primary);
    display: block;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-top: 0.3rem;
}

.celpip-header-card small {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.45;
    margin-top: 0.35rem;
}

.celpip-home-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    border-radius: 24px;
    box-shadow: 0 18px 38px rgba(45, 95, 77, 0.16);
    color: white;
    margin-bottom: 1.5rem;
    overflow: hidden;
    padding: clamp(1.8rem, 4vw, 3rem);
    position: relative;
}

.celpip-home-hero::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -90px;
    width: 240px;
    height: 240px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.celpip-home-hero h2 {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 1;
    margin: 0;
    max-width: 760px;
    position: relative;
    z-index: 1;
}

.celpip-home-hero p {
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.7;
    margin: 1rem 0 0;
    max-width: 760px;
    position: relative;
    z-index: 1;
}

.celpip-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.4rem;
    position: relative;
    z-index: 1;
}

.celpip-usage-banner,
.celpip-progress-overview {
    background: white;
    border: 1px solid var(--border-primary);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(26, 24, 22, 0.05);
    margin-bottom: 1.5rem;
}

.celpip-usage-banner {
    align-items: center;
    color: var(--text-secondary);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.25rem;
}

.celpip-usage-banner.depleted {
    border-color: rgba(156, 86, 68, 0.28);
}

.celpip-usage-banner.muted {
    color: var(--text-muted);
}

.celpip-usage-banner strong,
.celpip-usage-banner span {
    display: block;
}

.celpip-usage-banner strong {
    color: var(--text-primary);
    font-size: 0.92rem;
}

.celpip-usage-banner span {
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

.celpip-usage-banner a {
    color: var(--primary-dark);
    font-weight: 700;
}

.celpip-usage-meter {
    background: rgba(92, 111, 92, 0.12);
    border-radius: 999px;
    flex: 0 0 180px;
    height: 0.55rem;
    overflow: hidden;
}

.celpip-usage-meter span {
    background: var(--primary);
    border-radius: inherit;
    display: block;
    height: 100%;
    margin: 0;
}

.celpip-progress-overview {
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
}

.celpip-progress-stat {
    background: linear-gradient(180deg, rgba(92, 111, 92, 0.04) 0%, white 100%);
    padding: 1.1rem;
}

.celpip-progress-stat span {
    color: var(--text-muted);
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.celpip-progress-stat strong {
    color: var(--text-primary);
    display: block;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-top: 0.35rem;
}

.celpip-btn {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    justify-content: center;
    padding: 0.82rem 1.15rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.celpip-btn-primary {
    background: white;
    color: var(--primary-dark);
}

.celpip-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.28);
    color: white;
}

.celpip-btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.celpip-section-grid,
.celpip-task-grid {
    display: grid;
    gap: 1rem;
}

.celpip-section-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.celpip-section-card,
.celpip-task-card,
.celpip-empty-state {
    background: white;
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(26, 24, 22, 0.04);
}

.celpip-section-card {
    cursor: pointer;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.celpip-section-card:hover {
    border-color: var(--primary-border);
    box-shadow: 0 10px 26px rgba(92, 111, 92, 0.12);
    transform: translateY(-2px);
}

.celpip-section-card h2,
.celpip-task-card h2 {
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
}

.celpip-section-card p,
.celpip-task-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.65;
    margin: 0.65rem 0 0;
}

.celpip-content-block {
    margin-top: 1.5rem;
}

.celpip-content-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.celpip-content-header h2 {
    color: var(--text-primary);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.celpip-pill {
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
}

.celpip-task-card {
    padding: 1.25rem;
}

.celpip-task-top {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.celpip-task-meta {
    color: var(--text-muted);
    margin-top: 1rem;
}

.celpip-empty-state {
    background: linear-gradient(180deg, rgba(92, 111, 92, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
}

.celpip-card-status {
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.celpip-content-header p {
    color: var(--text-secondary);
    margin: 0.25rem 0 0;
}

.celpip-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.celpip-filter-chip {
    background: white;
    border: 1px solid var(--border-primary);
    border-radius: 999px;
    color: var(--text-secondary);
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.55rem 0.85rem;
}

.celpip-filter-chip.active,
.celpip-filter-chip:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.celpip-item-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.celpip-item-card,
.celpip-practice-panel,
.celpip-results-card {
    background: white;
    border: 1px solid var(--border-primary);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(26, 24, 22, 0.05);
}

.celpip-item-card {
    padding: 1.25rem;
}

.celpip-item-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.65;
    margin: 0.7rem 0 0;
}

.celpip-content-block .celpip-btn-primary,
.celpip-practice-panel .celpip-btn-primary,
.celpip-results-card .celpip-btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.celpip-content-block .celpip-btn-secondary,
.celpip-practice-panel .celpip-btn-secondary,
.celpip-results-card .celpip-btn-secondary {
    background: white;
    border-color: var(--border-primary);
    color: var(--text-primary);
}

.celpip-practice-panel {
    padding: clamp(1rem, 2vw, 1.5rem);
}

.celpip-practice-topbar {
    align-items: center;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: -0.2rem 0 1.25rem;
    padding-bottom: 1rem;
}

.celpip-back-link {
    background: transparent;
    border: 0;
    color: var(--primary);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    padding: 0;
}

.celpip-reading-layout,
.celpip-listening-layout {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
}

.celpip-reading-passage,
.celpip-question-panel,
.celpip-listening-card,
.celpip-listening-replay {
    background: var(--bg-cream);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 1.2rem;
}

.celpip-reading-label,
.celpip-question-kicker {
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.celpip-reading-passage h2,
.celpip-listening-card h2,
.celpip-question-header h2,
.celpip-question-block h3 {
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin: 0.35rem 0 0;
}

.celpip-passage-html {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.75;
    margin-top: 1rem;
}

.celpip-passage-html p:first-child {
    margin-top: 0;
}

.celpip-diagram {
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    display: block;
    margin: 1rem 0;
    max-width: 100%;
}

.celpip-question-panel.wide {
    max-width: 860px;
    margin: 0 auto;
    width: 100%;
}

.celpip-question-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.celpip-question-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.celpip-q-dot {
    background: white;
    border: 1px solid var(--border-primary);
    border-radius: 999px;
    color: var(--text-secondary);
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    height: 32px;
    width: 32px;
}

.celpip-q-dot.answered {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.celpip-question-block {
    background: white;
    border: 1px solid var(--border-primary);
    border-radius: 14px;
    margin-bottom: 1rem;
    padding: 1rem;
}

.celpip-option-list {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.9rem;
}

.celpip-option {
    align-items: flex-start;
    background: var(--bg-white);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem;
}

.celpip-option.selected,
.celpip-option:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(92, 111, 92, 0.1);
}

.celpip-option input {
    position: absolute;
    opacity: 0;
}

.celpip-option-letter {
    align-items: center;
    background: var(--primary-light);
    border-radius: 999px;
    color: var(--primary);
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 800;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.celpip-submit-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.celpip-listening-stage {
    display: grid;
    place-items: center;
    padding: 1rem;
}

.celpip-listening-card {
    max-width: 720px;
    width: 100%;
}

.celpip-listening-card p {
    color: var(--text-secondary);
    line-height: 1.65;
}

.celpip-listening-card audio,
.celpip-listening-replay audio {
    display: block;
    margin: 1rem 0;
    width: 100%;
}

.celpip-listening-replay {
    align-items: center;
    display: grid;
    gap: 1rem;
    grid-template-columns: 150px minmax(0, 1fr);
    margin-bottom: 1rem;
}

.celpip-writing-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
}

.celpip-writing-prompt-card,
.celpip-writing-editor-card,
.celpip-writing-latest,
.celpip-writing-info-box,
.celpip-writing-requirements,
.celpip-writing-requirements article {
    background: var(--bg-cream);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
}

.celpip-writing-prompt-card,
.celpip-writing-editor-card,
.celpip-writing-latest {
    padding: 1.2rem;
}

.celpip-writing-prompt-card h2,
.celpip-writing-editor-header h3,
.celpip-writing-requirements h3 {
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin: 0.75rem 0 0;
}

.celpip-writing-prompt-card p,
.celpip-writing-latest p,
.celpip-writing-requirements li,
.celpip-writing-requirements span,
.celpip-writing-submit-row small {
    color: var(--text-secondary);
    line-height: 1.65;
}

.celpip-writing-info-box,
.celpip-writing-requirements {
    margin-top: 1rem;
    padding: 1rem;
}

.celpip-writing-info-box strong,
.celpip-writing-info-box span,
.celpip-writing-requirements article strong,
.celpip-writing-requirements article span {
    display: block;
}

.celpip-writing-info-box div {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.7rem;
}

.celpip-writing-requirements ul {
    margin: 0.75rem 0 0;
    padding-left: 1.1rem;
}

.celpip-writing-requirements article {
    background: white;
    margin-top: 0.75rem;
    padding: 0.9rem;
}

.celpip-writing-requirements article span {
    font-size: 0.86rem;
    margin-top: 0.25rem;
}

.celpip-writing-editor-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.celpip-writing-count {
    background: white;
    border: 1px solid var(--border-primary);
    border-radius: 999px;
    color: var(--text-secondary);
    flex: 0 0 auto;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 0.45rem 0.75rem;
}

.celpip-writing-count.in-range {
    background: var(--primary-light);
    border-color: var(--primary-border);
    color: var(--primary);
}

.celpip-writing-count.out-of-range {
    border-color: rgba(180, 83, 9, 0.35);
    color: #92400e;
}

.celpip-writing-textarea {
    background: white;
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    color: var(--text-primary);
    font: inherit;
    line-height: 1.7;
    min-height: 420px;
    padding: 1rem;
    resize: vertical;
    width: 100%;
}

.celpip-writing-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

.celpip-writing-submit-row {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 1rem;
}

.celpip-writing-latest {
    grid-column: 1 / -1;
}

.celpip-writing-latest strong {
    color: var(--primary);
    display: block;
    font-size: 1.8rem;
    margin-top: 0.75rem;
}

.celpip-speaking-panel {
    overflow: hidden;
}

.celpip-speaking-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.75fr);
}

.celpip-speaking-prompt-card,
.celpip-speaking-stage,
.celpip-speaking-latest,
.celpip-speaking-transcript,
.celpip-speaking-feedback-grid article,
.celpip-speaking-dimension,
.celpip-speaking-image-fallback,
.celpip-speaking-focus,
.celpip-speaking-options {
    background: var(--bg-cream);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
}

.celpip-speaking-prompt-card,
.celpip-speaking-stage,
.celpip-speaking-latest {
    padding: 1.2rem;
}

.celpip-speaking-prompt-card h2,
.celpip-speaking-stage h3,
.celpip-speaking-transcript h3,
.celpip-speaking-feedback-grid h3 {
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin: 0.75rem 0 0;
}

.celpip-speaking-prompt-card p,
.celpip-speaking-stage p,
.celpip-speaking-latest p,
.celpip-speaking-transcript p,
.celpip-speaking-feedback-grid li {
    color: var(--text-secondary);
    line-height: 1.65;
}

.celpip-speaking-figure {
    margin: 1rem 0 0;
}

.celpip-speaking-figure img {
    border: 1px solid var(--border-primary);
    border-radius: 14px;
    display: block;
    width: 100%;
}

.celpip-speaking-figure figcaption,
.celpip-speaking-image-fallback p,
.celpip-speaking-option small {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

.celpip-speaking-image-fallback,
.celpip-speaking-focus,
.celpip-speaking-options {
    margin-top: 1rem;
    padding: 1rem;
}

.celpip-speaking-focus ul,
.celpip-speaking-feedback-grid ul {
    margin: 0.75rem 0 0;
    padding-left: 1.1rem;
}

.celpip-speaking-options {
    display: grid;
    gap: 0.75rem;
}

.celpip-speaking-option {
    align-items: flex-start;
    background: white;
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    gap: 0.75rem;
    padding: 0.9rem;
}

.celpip-speaking-option.selected,
.celpip-speaking-option:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(92, 111, 92, 0.1);
}

.celpip-speaking-option input {
    margin-top: 0.2rem;
}

.celpip-speaking-option strong,
.celpip-speaking-option small {
    display: block;
}

.celpip-speaking-stage-card {
    background: white;
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 1.1rem;
}

.celpip-speaking-timing-grid,
.celpip-speaking-dimension-grid,
.celpip-speaking-feedback-grid {
    display: grid;
    gap: 0.8rem;
}

.celpip-speaking-timing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 1rem 0;
}

.celpip-speaking-timing-grid div,
.celpip-speaking-dimension {
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    border-radius: 14px;
    padding: 0.9rem;
}

.celpip-speaking-timing-grid strong,
.celpip-speaking-timing-grid span,
.celpip-speaking-dimension strong,
.celpip-speaking-dimension span,
.celpip-speaking-dimension small {
    display: block;
}

.celpip-speaking-timing-grid strong,
.celpip-speaking-dimension strong {
    color: var(--primary);
    font-size: 1.45rem;
    font-weight: 800;
}

.celpip-speaking-countdown {
    color: var(--primary);
    font-size: clamp(3.2rem, 9vw, 6rem);
    font-weight: 800;
    letter-spacing: -0.08em;
    line-height: 1;
    margin: 0.75rem 0;
}

.celpip-speaking-stage-card.recording {
    background: linear-gradient(135deg, rgba(92, 111, 92, 0.1) 0%, white 100%);
}

.celpip-speaking-meter {
    align-items: end;
    display: flex;
    gap: 0.35rem;
    height: 42px;
    margin: 1rem 0;
}

.celpip-speaking-meter span {
    animation: celpip-meter-pulse 0.9s ease-in-out infinite alternate;
    background: var(--primary);
    border-radius: 999px;
    flex: 1;
    min-height: 16px;
}

.celpip-speaking-meter span:nth-child(2) {
    animation-delay: 0.1s;
}

.celpip-speaking-meter span:nth-child(3) {
    animation-delay: 0.2s;
}

.celpip-speaking-meter span:nth-child(4) {
    animation-delay: 0.3s;
}

.celpip-speaking-meter span:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes celpip-meter-pulse {
    from {
        height: 18px;
        opacity: 0.45;
    }
    to {
        height: 42px;
        opacity: 1;
    }
}

.celpip-speaking-progress {
    background: rgba(92, 111, 92, 0.12);
    border-radius: 999px;
    height: 10px;
    margin-top: 1rem;
    overflow: hidden;
}

.celpip-speaking-progress span {
    animation: celpip-progress 2.4s ease-in-out infinite;
    background: var(--primary);
    border-radius: inherit;
    display: block;
    height: 100%;
    width: 45%;
}

@keyframes celpip-progress {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(240%);
    }
}

.celpip-speaking-latest {
    grid-column: 1 / -1;
}

.celpip-speaking-latest strong {
    color: var(--primary);
    display: block;
    font-size: 1.8rem;
    margin-top: 0.75rem;
}

.celpip-speaking-results .celpip-results-headline {
    margin-bottom: 1rem;
}

.celpip-speaking-result-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.1rem;
}

.celpip-speaking-result-header h2 {
    color: var(--text-primary);
    font-size: 1.6rem;
    letter-spacing: -0.03em;
    margin: 0.75rem 0 0;
}

.celpip-speaking-result-header p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0.45rem 0 0;
}

.celpip-speaking-level-badge,
.celpip-speaking-radar-score {
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    border-radius: 16px;
    min-width: 130px;
    padding: 1rem;
    text-align: center;
}

.celpip-speaking-level-badge strong,
.celpip-speaking-radar-score strong {
    color: var(--primary);
    display: block;
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 1;
}

.celpip-speaking-level-badge span,
.celpip-speaking-radar-score span {
    color: var(--text-secondary);
    display: block;
    font-size: 0.78rem;
    margin-top: 0.25rem;
}

.celpip-speaking-result-tabs {
    background: var(--bg-cream);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.45rem;
}

.celpip-speaking-result-tab {
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    flex: 1 1 150px;
    font: inherit;
    font-weight: 800;
    padding: 0.8rem 1rem;
    text-align: center;
}

.celpip-speaking-result-tab.active,
.celpip-speaking-result-tab:hover {
    background: white;
    border-bottom-color: var(--primary);
    box-shadow: 0 4px 12px rgba(26, 24, 22, 0.06);
    color: var(--primary);
}

.celpip-speaking-result-panel[hidden] {
    display: none;
}

.celpip-speaking-overview-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1fr);
}

.celpip-speaking-radar-card,
.celpip-speaking-priority,
.celpip-speaking-metric {
    background: var(--bg-cream);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
}

.celpip-speaking-radar-card,
.celpip-speaking-priority {
    padding: 1rem;
}

.celpip-speaking-radar-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.celpip-speaking-radar-header h3 {
    color: var(--text-primary);
    margin: 0.75rem 0 0;
}

.celpip-speaking-radar-wrap {
    display: flex;
    justify-content: center;
    overflow-x: auto;
}

.celpip-speaking-radar {
    height: auto;
    max-width: 100%;
}

.celpip-speaking-radar-label {
    fill: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 700;
}

.celpip-speaking-radar-value {
    fill: var(--primary);
    font-size: 0.7rem;
    font-weight: 800;
}

.celpip-speaking-dimension-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.celpip-speaking-dimension span,
.celpip-speaking-dimension small {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.celpip-speaking-transcript {
    margin: 1rem 0;
    padding: 1rem;
}

.celpip-speaking-feedback-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.celpip-speaking-feedback-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.celpip-speaking-feedback-grid article {
    padding: 1rem;
}

.celpip-speaking-delivery-grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.celpip-speaking-metric {
    padding: 1rem;
}

.celpip-speaking-metric span {
    color: var(--text-secondary);
    display: block;
    font-size: 0.82rem;
}

.celpip-speaking-metric strong {
    color: var(--primary);
    display: block;
    font-size: 1.7rem;
    margin-top: 0.25rem;
}

.celpip-speaking-priority {
    margin-bottom: 1rem;
}

.celpip-speaking-priority p {
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.6;
    margin: 0.75rem 0 0;
}

.celpip-results-card {
    padding: clamp(1.25rem, 3vw, 2rem);
}

.celpip-results-headline {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    grid-template-columns: 190px minmax(0, 1fr);
    margin-bottom: 1.25rem;
}

.celpip-results-level-block,
.celpip-results-score-block,
.celpip-kpi,
.celpip-focus-card,
.celpip-review-row {
    background: var(--bg-cream);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
}

.celpip-results-level-block {
    padding: 1.2rem;
    text-align: center;
}

.celpip-results-level-value {
    color: var(--primary);
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 1;
}

.celpip-results-level-label,
.celpip-results-score-subtext,
.celpip-kpi span,
.celpip-review-answer-grid small {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.celpip-results-score-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.2rem;
}

.celpip-results-score-text {
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 800;
}

.celpip-results-score-track {
    background: rgba(92, 111, 92, 0.12);
    border-radius: 999px;
    height: 10px;
    margin: 0.9rem 0;
    overflow: hidden;
}

.celpip-results-score-fill {
    background: var(--primary);
    height: 100%;
}

.celpip-review-tab-header {
    background: var(--bg-cream);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0.45rem;
}

.celpip-review-tab-btn {
    background: transparent;
    border: 0;
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    padding: 0.8rem;
    text-align: left;
}

.celpip-review-tab-btn span,
.celpip-review-tab-btn small {
    display: block;
}

.celpip-review-tab-btn small {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.15rem;
}

.celpip-review-tab-btn.active {
    background: white;
    box-shadow: 0 4px 12px rgba(26, 24, 22, 0.06);
    color: var(--primary);
}

.celpip-review-tab-panel {
    display: none;
    padding-top: 1rem;
}

.celpip-review-tab-panel.active {
    display: block;
}

.celpip-kpi-grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.celpip-kpi {
    padding: 1rem;
}

.celpip-kpi strong {
    color: var(--text-primary);
    display: block;
    font-size: 1.6rem;
}

.celpip-results-note {
    color: var(--text-secondary);
    line-height: 1.65;
}

.celpip-breakdown-table {
    border-collapse: collapse;
    margin-top: 1rem;
    width: 100%;
}

.celpip-breakdown-table th,
.celpip-breakdown-table td {
    border-bottom: 1px solid var(--border-primary);
    padding: 0.75rem;
    text-align: left;
}

.celpip-review-row {
    margin-bottom: 0.85rem;
    padding: 1rem;
}

.celpip-review-row.correct {
    border-color: rgba(34, 139, 85, 0.25);
}

.celpip-review-row.incorrect,
.celpip-review-row.unanswered {
    border-color: rgba(180, 83, 9, 0.25);
}

.celpip-review-row-top,
.celpip-review-answer-grid,
.celpip-results-actions {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.celpip-review-answer-grid {
    align-items: stretch;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.celpip-review-answer-grid div {
    background: white;
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 0.8rem;
}

.celpip-review-answer-grid strong {
    display: block;
    margin-top: 0.2rem;
}

.celpip-explanation {
    color: var(--text-secondary);
    line-height: 1.6;
}

.celpip-focus-list {
    display: grid;
    gap: 0.8rem;
}

.celpip-focus-card {
    padding: 1rem;
}

.celpip-focus-card h3 {
    margin: 0.75rem 0 0.35rem;
}

.celpip-focus-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.celpip-results-actions {
    justify-content: flex-start;
    margin-top: 1.25rem;
}

#essay-loading-overlay {
    align-items: center;
    animation: fadeIn 0.2s ease-out;
    backdrop-filter: blur(4px);
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    inset: 0;
    justify-content: center;
    position: fixed;
    z-index: 9999;
}

.grading-modal-content {
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin: 0 1rem;
    max-width: 28rem;
    padding: 2rem;
    text-align: center;
}

.grading-modal-icon {
    align-items: center;
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(92, 111, 92, 0.05) 100%);
    border: 2px solid var(--primary-border);
    border-radius: 50%;
    color: var(--primary);
    display: flex;
    height: 4rem;
    justify-content: center;
    margin: 0 auto 1rem;
    width: 4rem;
}

.grading-modal-title {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    text-align: center;
}

.grading-modal-description {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0 0 1.5rem;
    text-align: center;
}

.grading-progress-container {
    margin-bottom: 1.5rem;
}

.grading-progress-circle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.grading-progress-circle {
    height: 4rem;
    position: relative;
    width: 4rem;
}

.grading-progress-circle svg {
    height: 100%;
    transform: rotate(-90deg);
    width: 100%;
}

.grading-progress-circle .progress-bg {
    fill: none;
    stroke: var(--border-primary);
    stroke-width: 4;
}

.grading-progress-circle .progress-fill {
    fill: none;
    stroke: var(--primary);
    stroke-dasharray: 175.93;
    stroke-dashoffset: 175.93;
    stroke-width: 4;
    transition: all 0.5s ease-out;
}

.grading-progress-icon {
    align-items: center;
    color: var(--primary);
    display: flex;
    font-size: 0.78rem;
    font-weight: 800;
    inset: 0;
    justify-content: center;
    position: absolute;
}

.grading-countdown-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.grading-progress-bar-container {
    margin-top: 0.5rem;
}

.grading-progress-bar-bg {
    background: var(--bg-cream);
    border: 1px solid var(--border-primary);
    border-radius: 9999px;
    height: 0.5rem;
    overflow: hidden;
}

.grading-progress-bar-fill {
    background: var(--primary);
    border-radius: 9999px;
    height: 100%;
    transition: all 0.5s ease-out;
    width: 0;
}

.grading-info-box {
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    border-radius: 12px;
    padding: 1rem;
}

.grading-info-content {
    color: var(--primary);
    font-size: 0.875rem;
    line-height: 1.5;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.celpip-mobile-tabs {
    display: none;
}

@media (max-width: 1024px) {
    .celpip-practice-container {
        display: block;
    }

    .celpip-practice-sidebar {
        display: none;
    }

    .celpip-main-content {
        padding: 1rem 1rem 5.25rem;
    }

    .celpip-page-header {
        grid-template-columns: 1fr;
    }

    .celpip-section-grid,
    .celpip-task-grid,
    .celpip-progress-overview,
    .celpip-item-grid,
    .celpip-reading-layout,
    .celpip-writing-layout,
    .celpip-listening-layout,
    .celpip-speaking-layout,
    .celpip-results-headline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .celpip-reading-layout,
    .celpip-writing-layout,
    .celpip-listening-layout,
    .celpip-speaking-layout,
    .celpip-speaking-overview-grid,
    .celpip-results-headline {
        grid-template-columns: 1fr;
    }

    .celpip-mobile-tabs {
        background: white;
        border-top: 1px solid var(--border-primary);
        bottom: 0;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        left: 0;
        position: fixed;
        right: 0;
        z-index: 90;
    }

    .celpip-mobile-tab {
        background: transparent;
        border: 0;
        color: var(--text-secondary);
        cursor: pointer;
        font: inherit;
        font-size: 0.72rem;
        font-weight: 700;
        padding: 0.9rem 0.35rem;
    }

    .celpip-mobile-tab.active {
        background: var(--primary-light);
        color: var(--primary);
    }
}

@media (max-width: 680px) {
    .celpip-section-grid,
    .celpip-task-grid,
    .celpip-item-grid,
    .celpip-kpi-grid,
    .celpip-review-tab-header,
    .celpip-review-answer-grid,
    .celpip-speaking-timing-grid,
    .celpip-speaking-dimension-grid,
    .celpip-speaking-feedback-grid,
    .celpip-speaking-feedback-grid.two,
    .celpip-speaking-delivery-grid,
    .celpip-progress-overview,
    .celpip-listening-replay {
        grid-template-columns: 1fr;
    }

    .celpip-speaking-result-header,
    .celpip-speaking-radar-header,
    .celpip-writing-editor-header,
    .celpip-writing-submit-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .celpip-content-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .celpip-actions {
        flex-direction: column;
    }

    .celpip-actions .celpip-btn {
        width: 100%;
    }

    .celpip-usage-banner {
        align-items: flex-start;
        flex-direction: column;
    }

    .celpip-usage-meter {
        flex-basis: auto;
        width: 100%;
    }

    .celpip-practice-topbar,
    .celpip-question-header,
    .celpip-results-actions {
        align-items: flex-start;
        flex-direction: column;
    }
}
