.theme-blue {
    --ink: #162d4c;
    --muted: #51627a;
    --green: #215ccd;
    --green-dark: #16429b;
    --mint: #e8f0ff;
    --paper: #f5f8fc;
    --line: #d4e0f1;
}
.theme-slate {
    --ink: #172c42;
    --muted: #4b6276;
    --green: #274963;
    --green-dark: #1b384f;
    --mint: #e0edf2;
    --paper: #f3f7fa;
    --line: #d2e1e8;
}
.brand-icon img { border-radius: inherit; object-fit: cover; width: 100%; height: 100%; }
.site-header .header-menu nav { flex-wrap: wrap; gap: .75rem 1.4rem; }
:focus-visible { outline-color: var(--green); }
.list-home { max-width: 1080px; }
.home-intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.4rem;
    padding: clamp(1.25rem, 4vw, 2.7rem);
    border: 1px solid var(--line);
    background: linear-gradient(135deg, var(--mint), #fff 88%);
    border-radius: 22px;
}
.home-intro p { max-width: 57ch; margin-top: .6rem; color: var(--muted); }
.home-intro h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
.home-intro > a { flex: none; }
.home-list-section { margin-top: clamp(1.5rem, 4vw, 2.5rem); }
.home-list-section .heading-row { margin-bottom: .75rem; }
.home-list-section .heading-row a { font-size: .9rem; text-align: right; flex: none; }
.section-copy { margin-bottom: .6rem; color: var(--muted); }
.home-feed { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: white; }
.home-feed > li + li { border-top: 1px solid var(--line); }
.home-feed .test-card, .public-list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(.5rem, 2vw, .9rem);
    padding: .85rem clamp(.7rem, 2vw, 1.15rem);
    border: 0;
    min-height: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}
.home-feed .test-card:hover, .public-list-row:hover { background: var(--paper); }
.public-list-row > span { min-width: 0; }
.public-list-row.has-cover { grid-template-columns: auto minmax(0, 1fr) auto; }
.public-row-cover { display: block; width: clamp(3.5rem, 16vw, 8rem); aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.public-row-copy { display: grid; gap: .12rem; overflow-wrap: anywhere; }
.row-action { font-size: .88rem; color: var(--green-dark); text-decoration: underline; text-underline-offset: .25em; font-weight: 720; }
.home-feed .meta { margin-top: .15rem; }
.home-feed .button { min-height: 42px; }
.shared-list-design { --home-item-title-size: 1.15rem; }
.shared-list-design :is(.home-section h2, .page-heading h1), .shared-list-design.category-section > h2 {
    font-size: min(calc(clamp(1.45rem, 2.5vw, 2rem) * var(--shared-heading-scale, 1)), 12vw);
    font-weight: 780;
    line-height: 1.15;
}
.shared-list-design .home-feed :is(.test-card h3, .public-row-copy strong) {
    font-size: min(calc(var(--home-item-title-size) * var(--home-item-title-scale, 1)), 8vw);
    font-weight: 750;
    line-height: 1.15;
    letter-spacing: -.035em;
    overflow-wrap: anywhere;
}
.shared-list-design .public-row-copy { display: block; }
.shared-list-design .public-row-copy :is(strong, small) { display: block; }
.shared-list-design .public-row-copy small { margin-top: 4px; }
.collection-page .home-feed:is(.exam-archive-months, .exam-archive-tests) .public-list-row {
    gap: .55rem;
    min-height: 48px;
    padding-block: .55rem;
}
.ad-slot { display: block; margin: 1rem auto; width: min(100% - 2rem, 960px); text-align: center; }
.ad-slot small { display: block; }
.ad-slot img { display: block; margin: auto; width: min(100%, 720px); height: auto; max-height: 160px; object-fit: contain; }
.ad-mobile { display: none; }
.reading-content { max-width: 850px; }
.reading-content p, .reading-content h2, .reading-content h3, .reading-content h4, .reading-content h5, .reading-content h6 { margin: 1rem 0; }
.article-cover { display: block; width: min(100%, 650px); max-height: 340px; object-fit: contain; border-radius: 14px; margin-bottom: 1rem; }
.article-cover.blog-cover { width: 100%; height: auto; aspect-ratio: 16 / 9; max-height: none; object-fit: cover; }
.contact-form { max-width: 700px; }
.question-media video, .question-media iframe { display: block; width: min(100%, 540px); max-height: 330px; }
.question-media iframe { aspect-ratio: 16 / 9; border: 0; }
.option-picture { display: block; width: auto; max-width: min(100%, 250px); max-height: 180px; object-fit: contain; margin-top: .4rem; }
.brand > .brand-text { max-width: min(44vw, 250px); overflow: hidden; text-overflow: ellipsis; }
.question-tools { display: flex; gap: .25rem; flex-wrap: wrap; }
#confirm-choice { margin-top: .7rem; }
.question-panel h2 { scroll-margin-top: 100px; }
.sheet-filter { display: grid; gap: .25rem; margin: .55rem 0; color: var(--muted); font-size: .9rem; }
.sheet-filter select { height: 2.5rem; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; padding: 0 .5rem; }
.answer-cell.is-marked { box-shadow: inset 0 -3px #ae720c; }
.answer-cell:disabled { opacity: .6; }
.result-page { max-width: 1040px; }
.result-heading { border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.score-card meter { width: min(13rem, 100%); height: 1rem; }
.result-actions { margin-top: .85rem; }
.result-actions form { display: flex; }
.breakdown th, .breakdown td { overflow-wrap: anywhere; }

.studio {
    --studio-ink: #12233d;
    --studio-muted: #536782;
    --studio-line: #dbe4ef;
    --studio-blue: #2459c5;
    --ink: var(--studio-ink);
    --muted: var(--studio-muted);
    --line: var(--studio-line);
    --green: var(--studio-blue);
    --green-dark: #174092;
    --mint: #e9f0ff;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    color: var(--studio-ink);
    background: #f3f6fb;
}
.studio-aside {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100dvh;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #11243f;
    color: #f2f7ff;
}
.studio-brand { display: flex; align-items: center; gap: .7rem; padding: 1.25rem 1rem; border-bottom: 1px solid #33445b; }
.studio-brand-mark { display: grid; place-items: center; flex: none; width: 42px; height: 42px; }
.studio-brand strong { font-size: 1.1rem; overflow-wrap: anywhere; }
.studio-aside-foot small { display: block; color: #b9cce4; }
.studio-links { min-height: 0; overflow-y: auto; padding: .7rem; scrollbar-color: #537294 transparent; }
.studio-group { margin: 0 0 .85rem; }
.studio-group p { margin: .3rem .6rem; color: #bdcfe4; font-size: .82rem; font-weight: 720; }
.studio-group a { display: block; padding: .52rem .65rem; border-radius: 8px; font-size: .92rem; }
.studio-group a:hover { background: #223954; }
.studio-group a[aria-current] { background: #284b82; color: white; font-weight: 720; }
.studio-aside :focus-visible { outline-color: #fff; }
.studio-aside-foot { margin-top: auto; border-top: 1px solid #33445b; padding: .85rem 1rem; }
.studio-bar { min-height: 67px; display: flex; align-items: center; justify-content: flex-end; gap: .65rem; padding: .6rem clamp(.75rem, 3vw, 2rem); border-bottom: 1px solid var(--line); background: white; }
.studio-menu { display: none; }
.studio-home { margin-right: auto; }
.studio-main { width: min(100%, 1320px); margin-inline: auto; padding: clamp(.75rem, 3vw, 2rem); }
.studio-title { display: flex; justify-content: space-between; align-items: end; gap: .75rem; margin: .35rem 0 1.35rem; }
.studio-title h1 { font-size: clamp(1.7rem, 3.5vw, 2.65rem); }
.studio-title p { color: var(--muted); margin-top: .35rem; }
.studio-title > a { flex: none; }
.studio .panel { border-color: var(--line); box-shadow: 0 6px 18px #11243f08; }
.studio .button-outline { border-color: #b8cbe3; }
.studio .button-outline:hover, .studio .button-quiet:hover { background: #eff5ff; }
.studio .form-grid input:not([type="checkbox"]), .studio .form-grid select, .studio .form-grid textarea { border-color: #aabdd2; background: #fcfdff; }
.studio .admin-form { max-width: 100%; margin-bottom: 1rem; }
.studio h2 { font-size: clamp(1.25rem, 3vw, 1.55rem); }
.studio-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.studio-metric { padding: .95rem; display: flex; align-items: start; gap: .65rem; }
.studio-metric-icon { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; color: #1c51b0; background: #eaf1ff; border-radius: 10px; flex: none; }
.studio-metric div > span { display: block; color: var(--muted); font-size: .88rem; }
.studio-metric strong { display: block; font-size: 1.68rem; line-height: 1.2; }
.studio-dashboard-grid { display: grid; grid-template-columns: 1.12fr 1fr; gap: .75rem; margin-top: .85rem; }
.studio-report, .studio-table { padding: clamp(.8rem, 2vw, 1.35rem); margin-bottom: .85rem; }
.studio-report h2, .studio-report h3 { margin-bottom: .5rem; }
.studio-report h3:not(:first-child) { margin-top: .9rem; }
.studio-report-list { list-style: none; margin: .55rem 0; padding: 0; }
.studio-report-list li { display: flex; justify-content: space-between; align-items: start; gap: .5rem; padding: .65rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.studio-report-list li span { min-width: 0; }
.studio-report-list li small { display: block; }
.studio-report-list time { color: var(--muted); text-align: right; white-space: nowrap; font-size: .9rem; }
.studio-field-grid, .admin-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem 1rem; }
.admin-filters { grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr)); align-items: end; margin: .85rem 0; }
.field-wide, .studio-field-grid .check { grid-column: 1 / -1; }
.studio-table-head, .studio-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.studio-table-head { background: #eef4fd; color: #354c6c; font-weight: 700; border-radius: 8px; padding: .5rem .75rem; }
.studio-row { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.studio-row-copy { display: flex; align-items: start; min-width: 0; gap: .55rem; overflow-wrap: anywhere; }
.studio-row-copy input { width: 1.15rem; height: 1.15rem; flex: none; accent-color: var(--green); }
.studio-row-actions { flex: 0 0 auto; gap: .35rem; }
.studio-record-link:hover { text-decoration: underline; text-underline-offset: .2em; }
.studio-record-link { font-weight: 720; }
.studio-status { margin-left: .25rem; display: inline-block; border-radius: 99px; padding: .1rem .45rem; background: #eef2f7; color: #485a70; font-size: .8rem; font-weight: 690; }
.studio-status.published { background: #e6f5ea; color: #236143; }
.studio-pagination { margin-top: .8rem; justify-content: center; }
.studio-bulk, .studio-contact { margin: .55rem 0; padding: .55rem .75rem; background: #f0f5fd; border: 1px solid var(--line); border-radius: 9px; }
.studio-bulk summary, .studio-contact summary { cursor: pointer; font-weight: 700; }
.studio-contact p { margin: .5rem 0; overflow-wrap: anywhere; }
.studio-login { padding-block: clamp(2rem, 12vw, 8rem); }
.studio-login section { margin-inline: auto; padding: clamp(1rem, 4vw, 2rem); }
.studio-login h1 { margin: 1rem 0 .4rem; font-size: 2rem; }
.studio-login form { margin: 1.1rem 0; }
.studio .notice { margin: .6rem 0 1rem; }
.upload-area { border: 2px dashed #96b4df; border-radius: 12px; background: #f1f6ff; padding: 1.2rem; margin-top: .6rem; }
.upload-area.is-dragging { border-color: #2253a9; background: #e6f0ff; }
.editor-tools { display: flex; flex-wrap: wrap; gap: .3rem; }
.schema-preview { white-space: pre-wrap; overflow-wrap: anywhere; background: #edf4fd; padding: .85rem; border-radius: 9px; }
.report-form { margin-top: .8rem; }
@media (max-width: 1160px) {
    .studio { grid-template-columns: 215px minmax(0, 1fr); }
    .studio-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .studio-row-actions { max-width: 46%; justify-content: flex-end; }
}
@media (max-width: 800px) {
    .studio { display: flex; flex-direction: column; }
    .studio-aside { order: 0; position: static; height: auto; width: 100%; }
    .studio-aside-foot { display: none; }
    .studio-brand { padding: .65rem .9rem; }
    .studio-brand-mark { width: 36px; height: 36px; }
    .studio-links { max-height: 50vh; }
    .studio-links:not(.is-open) { display: none; }
    .studio-menu { display: inline-flex; }
    .studio-dashboard-grid { grid-template-columns: 1fr; }
    .studio-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .studio-bar { min-height: 56px; }
}
@media (max-width: 520px) {
    .list-home { width: min(100% - 1.25rem, 1080px); }
    .shared-list-design { --home-item-title-size: 1rem; }
    .home-intro { align-items: start; flex-direction: column; }
    .home-feed .test-card h3 { font-size: 1rem; }
    .home-feed .button { padding-inline: .5rem; width: min-content; }
    .row-action { max-width: 5rem; text-align: right; }
    .ad-mobile { display: block; }
    .studio-title { align-items: start; flex-direction: column; }
    .studio-form-grid, .studio-field-grid { grid-template-columns: 1fr; }
    .studio-row { align-items: start; flex-direction: column; }
    .studio-row-actions { max-width: 100%; justify-content: start; }
    .studio-metric { padding: .65rem; gap: .4rem; }
    .studio-metric-icon { width: 1.8rem; height: 1.8rem; }
    .studio-metric strong { font-size: 1.35rem; }
    .exam-header .brand .brand-text { white-space: normal; max-width: 115px; line-height: 1.1; overflow-wrap: anywhere; }
}
@media print {
    .exam-header, .result-actions, #review-filters, .skip { display: none !important; }
    .result-page { width: 100%; }
    .panel { box-shadow: none !important; }
}
.drag-handle { cursor: grab; color: var(--green-dark); font-size: 1.25rem; line-height: 1; }
#sort-home-form { margin-top: .75rem; }

.theme-ocean {
    --ink: #173342;
    --muted: #46616d;
    --green: #006981;
    --green-dark: #005267;
    --mint: #e2f2f6;
    --paper: #f2f8fa;
    --line: #cbe2e8;
}
.theme-lavender {
    --ink: #32264c;
    --muted: #5d5274;
    --green: #62449b;
    --green-dark: #4d327f;
    --mint: #efeafa;
    --paper: #f8f5fc;
    --line: #ded4ef;
}
.theme-coral {
    --ink: #432b29;
    --muted: #6e514e;
    --green: #aa483a;
    --green-dark: #853225;
    --mint: #f8e9e4;
    --paper: #fdf7f5;
    --line: #eed6ce;
}
.question-explanation { margin-top: .28rem; }
.question-explanation summary { cursor: pointer; font-size: .93rem; }
#feedback.is-wrong { background: #f9ebee; border-color: #e7bbc4; color: #7e2533; }
.success-note { color: #176544; }
[data-exam-audio-toggle][aria-pressed="false"] { opacity: .72; }
.studio-links .studio-dashboard-link {
    display: block;
    padding: .6rem .7rem;
    margin-bottom: .45rem;
    border-radius: 8px;
    font-weight: 720;
}
.studio-links .studio-dashboard-link[aria-current], .studio-links .studio-dashboard-link:hover { background: #284b82; color: white; }
.studio-section-search {
    width: 100%;
    padding: .54rem .65rem;
    margin-bottom: .55rem;
    border: 1px solid #456384;
    border-radius: 8px;
    color: #f2f7ff;
    background: #172d4b;
    font: inherit;
    font-size: .9rem;
}
.studio-section-search::placeholder { color: #bacce3; }
.studio-group { margin-bottom: .26rem; }
.studio-group summary {
    padding: .53rem .62rem;
    border-radius: 8px;
    color: #dce9fa;
    cursor: pointer;
    font-size: .92rem;
    font-weight: 720;
}
.studio-group summary:hover, .studio-group[open] > summary { background: #203956; }
.studio-group > a { margin: .14rem 0 .14rem .45rem; }
.studio-no-sections { margin: .6rem; color: #dce9fa; }
.studio-shortcuts { margin: 0 0 1rem; gap: .5rem; }
.studio-form-fold { padding: .65rem .85rem; border: 1px solid var(--line); border-radius: 10px; }
.studio-form-fold > summary { cursor: pointer; font-weight: 720; }
.studio-form-fold[open] > :not(summary) { margin-top: .65rem; }
