/* ── Reset & Base ────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html {
    max-width: 100%;
    overflow-x: clip;
}
:root {
    --bg: #0F1117;
    --card: #1A1D27;
    --surface: #151821;
    --border: #2D3348;
    --accent: #3B82F6;
    --accent-soft: rgba(59,130,246,0.12);
    --green: #22C55E;
    --red: #EF4444;
    --orange: #F59E0B;
    --purple: #8B5CF6;
    --cyan: #06B6D4;
    --text: #E2E8F0;
    --dim: #94A3B8;
    --radius: 12px;
    --radius-sm: 8px;
}
body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    max-width: 100%;
    overflow-x: clip;
}
#app {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-bar {
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-wrap: wrap;
    min-width: 0;
}
.user-bar-name {
    min-width: 0;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.app-refresh-btn,
.user-logout-btn {
    flex: 0 0 auto;
    padding: 4px 10px;
    font-size: 12px;
    white-space: nowrap;
}
.app-refresh-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

@media (max-width: 420px) {
    .user-bar {
        padding: 7px 10px;
        gap: 6px;
    }
    .user-bar-name {
        max-width: 96px;
    }
    .app-refresh-btn,
    .user-logout-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* ── Navigation ──────────────────────────────── */
#nav-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15,17,23,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
#nav-bar.nav-static-on-glossary {
    position: static;
}
.nav-inner {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.nav-inner::-webkit-scrollbar { display: none; }
.nav-item {
    flex: 0 0 auto;
    min-width: 56px;
    padding: 12px 8px 10px;
    text-align: center;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.nav-item.active {
    border-bottom-color: var(--accent);
}
.nav-item .nav-icon { font-size: 17px; display: block; }
.nav-item .nav-label {
    font-size: 10px;
    margin-top: 2px;
    font-weight: 600;
    color: var(--dim);
    display: block;
}
.nav-item.active .nav-label { color: var(--accent); }

.presence-status {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border));
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.10);
    color: var(--text);
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.presence-status[data-state="sleeping"] {
    border-color: color-mix(in srgb, var(--dim) 42%, var(--border));
    background: rgba(148, 163, 184, 0.12);
    color: var(--dim);
}

/* ── Page Content ────────────────────────────── */
#page-content {
    flex: 1;
    padding: 20px 16px 40px;
    min-width: 0;
    max-width: 100%;
}

/* ── Cards & Boxes ───────────────────────────── */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
    margin-bottom: 16px;
    min-width: 0;
    max-width: 100%;
}
.card-sm { padding: 16px; }
.card-accent {
    background: rgba(59,130,246,0.06);
    border-color: rgba(59,130,246,0.25);
}
.card-warn {
    background: rgba(239,68,68,0.06);
    border-color: rgba(239,68,68,0.25);
}

/* ── Glossary source-summary preview ─────────── */
.glossary-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}
.glossary-head .subtitle {
    margin-bottom: 0;
}
.glossary-preview-shell {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 860px;
    margin: 0 auto;
}
.glossary-preview-search {
    position: relative;
}
.glossary-preview-search span {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dim);
    font-size: 15px;
}
.glossary-preview-search .input {
    width: 100%;
    padding-left: 36px;
}
.glossary-preview-toolbar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 6px;
    scrollbar-width: none;
}
.glossary-preview-toolbar::-webkit-scrollbar {
    display: none;
}
.glossary-preview-filter {
    flex: 0 0 auto;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255,255,255,0.03);
    color: var(--dim);
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
}
.glossary-preview-filter.is-active {
    background: rgba(59,130,246,0.16);
    border-color: rgba(59,130,246,0.55);
    color: var(--text);
}
.glossary-preview-count {
    color: var(--dim);
    font-size: 12px;
}
.glossary-preview-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.glossary-preview-card,
.glossary-detail-card,
.glossary-section-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    min-width: 0;
    max-width: 100%;
}
.glossary-preview-card {
    width: 100%;
    color: var(--text);
    text-align: left;
    padding: 14px;
    cursor: pointer;
}
.glossary-preview-card:active {
    transform: translateY(1px);
}
.glossary-preview-card-top {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.glossary-level-badge,
.glossary-type-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}
.glossary-level-badge {
    background: rgba(16,185,129,0.14);
    color: #86efac;
}
.glossary-type-badge {
    background: rgba(148,163,184,0.14);
    color: #cbd5e1;
}
.glossary-preview-title {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 6px;
}
.glossary-preview-summary,
.glossary-detail-summary {
    color: var(--dim);
    font-size: 13px;
    line-height: 1.6;
    word-break: keep-all;
    overflow-wrap: anywhere;
}
.glossary-preview-meta {
    margin-top: 10px;
    font-size: 12px;
    color: var(--accent);
    font-weight: 700;
}
.glossary-preview-detail {
    max-width: 860px;
    margin: 0 auto;
}
.glossary-back-btn {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    color: var(--text);
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 12px;
}
.glossary-detail-card {
    padding: 16px;
}
.glossary-detail-title {
    margin: 0 0 8px;
    font-size: 21px;
    line-height: 1.3;
}
.glossary-rel-panel,
.glossary-formula-links {
    border: 1px solid rgba(148,163,184,0.18);
    background: rgba(255,255,255,0.025);
    border-radius: 12px;
    padding: 12px;
    margin-top: 14px;
}
.glossary-rel-title {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 10px;
}
.glossary-rel-group + .glossary-rel-group {
    margin-top: 10px;
}
.glossary-rel-label {
    color: var(--dim);
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 7px;
}
.glossary-rel-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.glossary-rel-chip,
.glossary-formula-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(59,130,246,0.35);
    border-radius: 999px;
    background: rgba(59,130,246,0.11);
    color: var(--text);
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 700;
    max-width: 100%;
    white-space: normal;
    cursor: pointer;
    transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.study-summary-root .study-summary-related button:hover {
    border-color: var(--study-summary-accent);
    background: color-mix(in srgb, var(--study-summary-chip-bg) 70%, var(--study-summary-panel));
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.study-summary-root .study-summary-related button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: none;
}

.study-summary-root .study-summary-related button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--study-summary-accent) 25%, transparent);
    outline-offset: 2px;
}
.glossary-rel-chip.is-disabled {
    border-color: rgba(148,163,184,0.18);
    background: rgba(148,163,184,0.08);
    color: var(--dim);
}
.glossary-formula-chip {
    border-color: rgba(245,158,11,0.35);
    background: rgba(245,158,11,0.12);
}
.glossary-section-card {
    padding: 14px;
    margin-top: 12px;
}
.glossary-section-card h4 {
    margin: 0 0 10px;
    font-size: 15px;
}
.glossary-section-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding-left: 18px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.65;
}
.glossary-mobile-table {
    display: grid;
    gap: 8px;
}
.glossary-row-card {
    border: 1px solid rgba(148,163,184,0.18);
    border-radius: 10px;
    padding: 11px;
    background: rgba(0,0,0,0.12);
}
.glossary-row-head {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 5px;
}
.glossary-row-body {
    color: var(--dim);
    font-size: 13px;
    line-height: 1.6;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

@media (min-width: 760px) {
    .glossary-preview-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 430px) {
    .glossary-head {
        align-items: stretch;
        flex-direction: column;
    }
    .glossary-head .btn {
        width: 100%;
        justify-content: center;
    }
    .glossary-detail-card,
    .glossary-section-card,
    .glossary-preview-card {
        border-radius: 10px;
    }
}

.question-stem {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
    white-space: pre-line;
    max-width: 100%;
}

.answer-blank {
    display: inline-block;
    min-width: 4.8em;
    padding: 0 0.35em;
    white-space: pre;
    letter-spacing: 0.08em;
    text-align: center;
}

.multi-match-box {
    display: grid;
    grid-template-columns: minmax(150px, 0.82fr) minmax(0, 1.18fr);
    gap: 12px;
}

.multi-match-left-list,
.multi-match-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.multi-match-left-list {
    flex-direction: column;
}

.multi-match-left,
.multi-match-option {
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    text-align: left;
}

.multi-match-left {
    padding: 12px 14px;
    min-height: 72px;
}

.multi-match-left.active,
.multi-match-option.active {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.multi-match-option.pending {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.22);
}

.multi-match-left-title,
.multi-match-pool-title {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}

.multi-match-left-values {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    min-height: 24px;
}

.multi-match-selected-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: auto;
    min-width: 28px;
    padding: 3px 7px;
    font-size: 0.8rem;
    font-weight: 800;
    text-align: center;
    border: 1px solid rgba(59,130,246,0.45);
    border-radius: 999px;
    color: var(--text);
    border-color: rgba(59,130,246,0.45);
    background: rgba(59,130,246,0.10);
}

.multi-match-selected-prefix {
    color: var(--dim);
    font-size: 0.82rem;
}

.multi-match-empty,
.multi-match-owner,
.multi-match-guide {
    color: var(--dim);
    font-size: 0.82rem;
}

.multi-match-pool {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    background: var(--surface);
}

.multi-match-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 9px 11px;
}

.multi-match-option.used:not(.active) {
    opacity: 0.62;
}

.multi-match-label {
    font-weight: 800;
    color: var(--accent);
}

.multi-match-guide {
    margin-top: 10px;
    text-align: center;
}

.matching-right-card {
    color: var(--text) !important;
    background: var(--surface) !important;
    border-color: var(--border) !important;
    opacity: 1 !important;
    cursor: pointer !important;
    box-shadow: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.matching-right-card.is-available {
    background: var(--surface) !important;
    border-color: var(--border) !important;
}

.matching-right-card.is-available:hover {
    background: var(--bg-1) !important;
    border-color: rgba(148, 163, 184, 0.7) !important;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

.matching-right-card.is-current {
    background: var(--surface) !important;
    border-color: rgba(148, 163, 184, 0.72) !important;
    color: var(--text) !important;
    opacity: 1 !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.matching-right-card.is-pending {
    background: var(--accent-soft) !important;
    border-color: var(--accent) !important;
    color: var(--text) !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.22);
}

.matching-right-card.is-used {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
    opacity: 1 !important;
}

@media (max-width: 560px) {
    .multi-match-box {
        grid-template-columns: 1fr;
    }

    .matching-right-card {
        min-height: 48px;
    }
}

.stem-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 14px 0;
}

.question-stem table {
    border-collapse: collapse;
    width: 100%;
    max-width: 100%;
    font-size: 0.95rem;
}

.question-stem th,
.question-stem td {
    border: 1px solid rgba(148, 163, 184, 0.35);
    padding: 8px 10px;
    vertical-align: middle;
}

.question-stem th {
    background: rgba(148, 163, 184, 0.14);
    font-weight: 700;
    text-align: center;
}

.question-stem td:first-child {
    text-align: left;
}

.question-stem td:not(:first-child) {
    text-align: right;
}

@media (max-width: 640px) {
    .question-stem table {
        min-width: 480px;
        width: max-content;
    }

    .question-stem th,
    .question-stem td {
        white-space: nowrap;
        padding: 7px 9px;
    }
}

/* ── Badge ───────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-green { background: rgba(34,197,94,0.12); color: var(--green); }
.badge-red { background: rgba(239,68,68,0.12); color: var(--red); }
.badge-orange { background: rgba(245,158,11,0.12); color: var(--orange); }
.badge-purple { background: rgba(139,92,246,0.12); color: var(--purple); }
.badge-dim { background: rgba(148,163,184,0.12); color: var(--dim); }

/* ── Progress Bar ────────────────────────────── */
.bar-track {
    background: var(--surface);
    border-radius: 4px;
    height: 8px;
    width: 100%;
}
.bar-fill {
    border-radius: 4px;
    height: 100%;
    transition: width 0.5s ease;
}
.bar-sm .bar-track { height: 6px; }
.bar-xs .bar-track { height: 4px; }

/* ── Buttons ─────────────────────────────────── */
.btn {
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    max-width: 100%;
    white-space: normal;
}
.btn:hover { opacity: 0.85; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-outline { background: transparent; color: var(--dim); border: 1px solid var(--border); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-full { width: 100%; }
.btn-gradient {
    background: linear-gradient(135deg, #3B82F6, #6366F1);
    color: #fff;
    border-radius: 16px;
    padding: 20px 0;
    font-size: 20px;
    font-weight: 800;
    box-shadow: 0 4px 24px rgba(59,130,246,0.25);
}

.session-submit-actions {
    align-items: stretch;
    position: relative;
}
.session-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}
.session-submit-btn > * {
    pointer-events: none;
}
.session-action-btn {
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
}
.session-validation-message {
    display: none;
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 1px solid rgba(245,158,11,0.35);
    border-radius: var(--radius-sm);
    background: rgba(245,158,11,0.08);
    color: var(--orange);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    pointer-events: none;
}
.session-validation-message.show {
    display: block;
}

/* ── Inputs ───────────────────────────────────── */
.input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    outline: none;
}
.input:focus { border-color: var(--accent); }
.input-search { padding-left: 36px; }

/* date picker: light popup + readable field (dark app theme) */
input[type="date"].input-date-exam {
    color-scheme: light;
    background: var(--bg-card, #1a1a2e);
    color: #fff;
}
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
  }

/* 홈 D-day: 동적 렌더 후에도 호버 스타일(CSS만 사용) */
.home-dday-block:hover {
    border-color: var(--orange) !important;
    background: rgba(245, 158, 11, 0.08);
}

/* ── Typography ──────────────────────────────── */
.title { font-size: 28px; font-weight: 800; }
.subtitle { font-size: 20px; font-weight: 800; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-dim { color: var(--dim); }
.text-accent { color: var(--accent); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-orange { color: var(--orange); }
.text-purple { color: var(--purple); }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

/* ── Layout Helpers ──────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.text-center { text-align: center; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.w-full { width: 100%; }

/* ── Grid ────────────────────────────────────── */
.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.home-card-head,
.session-card-head,
.session-action-row,
.home-action-row {
    min-width: 0;
    flex-wrap: wrap;
}

.segmented-control {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 100%;
}

.segmented-control .btn {
    flex: 1 1 132px;
    min-width: 0;
    white-space: normal;
}

.exam-start-summary,
.exam-mode-badge {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    min-width: 0;
    max-width: 100%;
}

.exam-start-summary .text-xs,
.exam-mode-badge .text-xs {
    min-width: 0;
    overflow-wrap: anywhere;
}

.exam-mode-badge.is-centered {
    justify-content: center;
}

.exam-sticky-head {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    justify-content: space-between;
    min-width: 0;
}

.session-primary-card {
    border-color: rgba(59,130,246,0.35);
    background: rgba(59,130,246,0.06);
}

.session-resume-card {
    padding: 16px;
    border-color: var(--accent);
}

.year-accordion {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    overflow: hidden;
}

.year-accordion + .year-accordion {
    margin-top: 8px;
}

.year-accordion-summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    justify-content: space-between;
    min-width: 0;
    padding: 12px 14px;
}

.round-button-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    max-width: 100%;
    padding: 0 12px 12px;
}

.round-btn {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    white-space: normal;
    width: 100%;
}

.round-btn-title,
.round-btn-meta {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
}

.round-btn-meta {
    color: var(--text-dim);
    font-size: 11px;
    line-height: 1.35;
    text-align: left;
}

.exam-structure-note {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    max-width: 100%;
    min-width: 0;
}

.exam-structure-note span {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* ── Tabs ─────────────────────────────────────── */
.tab-bar {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}
.tab-item {
    padding: 10px 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--dim);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.tab-item.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ── Pill Filters ────────────────────────────── */
.pill {
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border);
    color: var(--dim);
    background: transparent;
    transition: all 0.2s;
}
.pill.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.wrong-note-filter-row,
.wrong-note-actions,
.wrong-note-card-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.wrong-note-filter-row .pill {
    flex: 1 1 92px;
    min-width: 0;
    text-align: center;
}

.wrong-note-card-head {
    align-items: center;
    justify-content: space-between;
}

.wrong-note-actions .btn {
    flex: 1 1 132px;
    min-width: 0;
}

.wrong-note-stem {
    overflow-wrap: anywhere;
}

/* Developer review */
.dev-review-toolbar {
    position: sticky;
    top: 8px;
    z-index: 20;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
}
.dev-review-search {
    align-items: center;
    flex-wrap: wrap;
}
.dev-review-search .input {
    flex: 1;
    min-width: 180px;
}
.dev-review-sync-lock {
    border-top: 1px solid var(--border);
    padding-top: 10px;
}
.dev-review-sync-lock-main {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}
.dev-review-sync-lock-badge {
    border: 1px solid var(--border);
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    margin-left: 8px;
    padding: 2px 8px;
}
.dev-review-sync-lock-badge.is-unlocked {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.45);
    color: var(--green);
}
.dev-review-sync-lock-badge.is-locked {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.5);
    color: var(--orange);
}
.dev-review-sync-lock-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}
.dev-review-result {
    scroll-margin-top: 16px;
    max-width: 100%;
    min-width: 0;
}
.dev-review-subtabs {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}
.dev-review-subtab {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--dim);
    cursor: pointer;
    flex: 0 1 auto;
    font: inherit;
    font-weight: 700;
    min-height: 38px;
    padding: 8px 14px;
}
.dev-review-subtab.is-active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}
.dev-review-panel[hidden] {
    display: none;
}
.dev-review-question-card {
    border-color: rgba(99, 102, 241, 0.35);
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}
.dev-review-candidates-card {
    margin-top: 16px;
}
.dev-review-reports-card {
    margin-top: 16px;
}
.dev-review-candidate-head {
    gap: 12px;
}
.dev-review-order-controls {
    align-items: center;
    flex-wrap: wrap;
}
.dev-review-report-filter {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.dev-review-report-filter-btn.is-active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
}
.dev-review-order-controls .input-sm {
    min-width: 150px;
    padding: 6px 10px;
    font-size: 12px;
}
.dev-review-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
}
.dev-review-candidate {
    display: grid;
    grid-template-columns: auto auto minmax(80px, 130px) 1fr;
    gap: 8px;
    align-items: center;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    padding: 10px 12px;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.dev-review-candidate:hover {
    border-color: var(--accent);
}
.dev-review-candidate.is-selected {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.dev-review-list-count {
    color: var(--dim);
    font-size: 12px;
    margin-bottom: 8px;
}
.dev-review-card-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}
.dev-review-step-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.dev-review-nav-btn {
    min-width: 78px;
    min-height: 34px;
    padding: 6px 12px;
    font-weight: 700;
}
.dev-review-nav-btn:hover,
.dev-review-nav-btn:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
    outline: none;
}
.dev-review-nav-message {
    color: var(--orange);
    font-size: 12px;
    min-width: 140px;
}
.dev-review-selected-label {
    justify-self: end;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}
.dev-review-report-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.08);
    color: var(--red);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 4px 7px;
    white-space: nowrap;
}
.dev-review-report-list {
    display: grid;
    gap: 8px;
}
.dev-review-main-list {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 2px;
}
.dev-review-report-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    display: grid;
    gap: 8px;
    line-height: 1.5;
    padding: 12px;
}
.dev-review-report-card[role="button"] {
    cursor: pointer;
}
.dev-review-report-card[role="button"]:hover,
.dev-review-report-card[role="button"]:focus-visible {
    border-color: var(--accent);
    outline: none;
}
.dev-review-report-head {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.dev-review-report-status {
    color: var(--dim);
    font-size: 12px;
    margin-left: auto;
}
.dev-review-report-status-open {
    color: var(--red);
    font-weight: 700;
}
.dev-review-report-status-resolved {
    color: var(--green);
    font-weight: 700;
}
.dev-review-report-status-dismissed {
    color: var(--dim);
    font-weight: 700;
}
.dev-review-report-meta {
    color: var(--dim);
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
    gap: 8px 12px;
}
.dev-review-report-memo {
    border-left: 3px solid rgba(239, 68, 68, 0.35);
    color: var(--text);
    overflow-wrap: anywhere;
    padding-left: 10px;
    white-space: pre-wrap;
}
.dev-review-report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.dev-review-report-delete-btn {
    border-color: rgba(239, 68, 68, 0.45);
    color: var(--red);
}
.dev-review-report-delete-btn:hover,
.dev-review-report-delete-btn:focus-visible {
    background: rgba(239, 68, 68, 0.08);
    border-color: var(--red);
}
.dev-review-reports-detail {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    padding: 12px;
}
.dev-review-choice-list,
.dev-review-match-grid {
    display: grid;
    gap: 10px;
}
.dev-review-match-grid {
    grid-template-columns: 1fr 1fr;
}
.dev-review-choice,
.dev-review-answer {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    padding: 10px 12px;
    line-height: 1.6;
    min-width: 0;
    overflow-wrap: anywhere;
}
.dev-review-answer {
    color: var(--dim);
    font-size: 12px;
}
.dev-review-answer-row {
    display: grid;
    grid-template-columns: minmax(90px, max-content) minmax(0, 1fr);
    gap: 6px 10px;
    align-items: start;
}
.dev-review-answer-row + .dev-review-answer-row {
    margin-top: 4px;
}
.dev-review-answer-row-value {
    min-width: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.choice-frac {
    display: inline-grid;
    grid-template-rows: auto 1px auto;
    align-items: center;
    justify-items: center;
    min-width: 2.4em;
    margin: 0 2px;
    vertical-align: middle;
    line-height: 1.05;
}
.choice-frac-num,
.choice-frac-den {
    display: block;
    padding: 0 0.2em;
    font-size: 0.95em;
    white-space: nowrap;
}
.choice-frac-line {
    display: block;
    width: 100%;
    min-width: 1.8em;
    border-top: 1.5px solid currentColor;
    margin: 0.08em 0;
}
.multi-short-answer-inputs {
    display: grid;
    gap: 10px;
}
.multi-short-answer-row {
    display: grid;
    grid-template-columns: minmax(52px, auto) 1fr;
    align-items: center;
    gap: 10px;
}
.multi-short-answer-label {
    color: var(--dim);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.dev-review-mode-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    margin: 0 0 16px;
    padding-bottom: 10px;
}
.dev-review-mode-btn {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 10px;
}
.dev-review-mode-btn.is-active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}
.dev-review-mode-panel {
    display: grid;
    gap: 16px;
}
.dev-review-edit-form,
.dev-review-edit-field {
    display: grid;
    gap: 10px;
}
.dev-review-edit-textarea,
.dev-review-choice-edit-input {
    width: 100%;
}
.dev-review-edit-textarea {
    line-height: 1.6;
    min-height: 160px;
    resize: vertical;
}
.dev-review-choice-edit-list {
    display: grid;
    gap: 8px;
}
.dev-review-choice-edit-row {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: 96px minmax(0, 1fr) auto;
}
.dev-review-choice-edit-index {
    color: var(--dim);
    font-size: 12px;
    line-height: 1.4;
}
.dev-review-answer-radio {
    align-items: center;
    display: inline-flex;
    gap: 6px;
    white-space: nowrap;
}
.dev-review-edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.dev-review-retail-section {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    display: grid;
    gap: 12px;
    padding: 14px;
}
.dev-review-retail-section + .dev-review-retail-section,
.dev-review-retail-section + .dev-review-edit-details {
    margin-top: 12px;
}
.dev-review-retail-section-head,
.dev-review-retail-section summary {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}
.dev-review-retail-section summary {
    cursor: pointer;
    list-style-position: inside;
}
.dev-review-section-kicker {
    color: var(--dim);
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.3;
    margin-bottom: 2px;
}
.dev-review-basic-edit-section {
    background: var(--surface);
}
.dev-review-edit-details {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    padding: 10px 12px;
}
.dev-review-edit-details summary {
    cursor: pointer;
    font-weight: 700;
}
.dev-review-unlock-panel {
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    display: grid;
    gap: 10px;
    padding: 12px;
}
.dev-review-lock-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.dev-review-lock-pill {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    color: var(--dim);
    font-size: 12px;
    padding: 4px 8px;
}
.dev-review-locked-values {
    display: grid;
    gap: 6px;
    margin-top: 10px;
    overflow-wrap: anywhere;
}
.dev-review-locked-value-row {
    align-items: start;
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(110px, max-content) minmax(0, 1fr);
}
.dev-review-locked-value-row code {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: block;
    max-height: 84px;
    overflow: auto;
    padding: 6px 8px;
    white-space: pre-wrap;
}
.dev-review-info-note,
.dev-review-log-path {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--dim);
    font-size: 13px;
    line-height: 1.6;
    padding: 10px 12px;
}
.dev-review-log-path {
    display: grid;
    gap: 6px;
}
.dev-review-log-path code {
    overflow-wrap: anywhere;
}
/* V2 manual edit UI */
.dev-review-db-scope-note {
    border-left: 3px solid var(--accent, #f59e0b);
    background: rgba(245, 158, 11, 0.08);
    font-weight: 600;
}
.dev-review-manual-edit-result {
    border: 1px solid var(--green, #22c55e);
    border-radius: var(--radius-sm);
    background: rgba(34, 197, 94, 0.06);
    padding: 12px;
    display: grid;
    gap: 8px;
    margin-top: 10px;
}
.dev-review-manual-edit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.dev-review-manual-edit-table th,
.dev-review-manual-edit-table td {
    border: 1px solid var(--border);
    padding: 4px 8px;
    text-align: left;
}
/* V3A scoring metadata edit UI */
.dev-review-scoring-edit-panel {
    background: rgba(245, 158, 11, 0.05);
}
.dev-review-scoring-edit-panel[open] {
    border-color: rgba(245, 158, 11, 0.55);
}
.dev-review-scoring-warning {
    border-left: 3px solid var(--accent, #f59e0b);
    background: rgba(245, 158, 11, 0.1);
    color: var(--text);
}
.dev-review-scoring-edit-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    display: grid;
    gap: 10px;
    padding: 12px;
}
.dev-review-scoring-json {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    max-height: 300px;
    overflow: auto;
}
.dev-review-scoring-preview {
    display: grid;
    gap: 8px;
    overflow-wrap: anywhere;
}
.dev-review-scoring-card-title {
    font-size: 14px;
    font-weight: 800;
}
.dev-review-scoring-chip-editor {
    display: grid;
    gap: 12px;
}
.dev-review-scoring-editor-head,
.dev-review-scoring-card-head {
    align-items: flex-start;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}
.dev-review-ak-groups,
.dev-review-ap-parts {
    display: grid;
    gap: 10px;
}
.dev-review-scoring-group-card,
.dev-review-scoring-part-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    display: grid;
    gap: 10px;
    padding: 10px;
}
.dev-review-scoring-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.dev-review-scoring-chip-row {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: inline-flex;
    gap: 6px;
    max-width: 100%;
    min-width: min(100%, 260px);
    padding: 6px;
}
.dev-review-scoring-chip-input {
    min-height: 32px;
    min-width: 180px;
    width: min(46vw, 420px);
}
.dev-review-scoring-remove-btn {
    color: var(--red);
    flex: 0 0 auto;
}
.dev-review-scoring-json-details {
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    padding: 8px 10px;
}
.dev-review-scoring-json-details summary {
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}
.dev-review-scoring-json[readonly] {
    background: color-mix(in srgb, var(--surface) 70%, var(--card));
    color: var(--dim);
}
.dev-review-scoring-locked-meta {
    color: var(--dim);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}
.dev-review-scoring-locked-meta code {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 2px 5px;
}
.dev-review-scoring-lock-badge {
    background: rgba(148, 163, 184, 0.14);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--dim);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
}
.dev-review-scoring-summary-list {
    margin: 8px 0 0 18px;
    padding: 0;
}
.dev-review-scoring-preview-warning {
    border-left: 3px solid var(--orange, #f59e0b);
    color: var(--text);
    margin-top: 8px;
    padding-left: 10px;
}
.dev-review-explanation-struct-editor {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    padding: 12px;
    display: grid;
    gap: 10px;
    margin-top: 12px;
}
.dev-review-edit-log-list {
    display: grid;
    gap: 10px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 4px;
}
.dev-review-edit-log-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    display: grid;
    gap: 6px;
    padding: 10px 12px;
}
.dev-review-edit-log-card code {
    overflow-wrap: anywhere;
}
.dev-review-log-filter,
.dev-review-log-file-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.dev-review-log-file-row code {
    min-width: 0;
}
.dev-review-log-delete-btn {
    min-width: 36px;
}
.dev-review-log-report-content {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
    line-height: 1.55;
    margin: 0;
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    overflow-wrap: anywhere;
    padding: 10px 12px;
    white-space: pre-wrap;
    word-break: break-word;
}
.dev-review-diff-stack {
    display: grid;
    gap: 10px;
}
.dev-review-diff-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    min-width: 0;
    padding: 12px;
}
.dev-review-new-explanation-card {
    background: var(--card);
}
.dev-review-diff-card pre {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.6;
    font-family: inherit;
}
.dev-review-answer-parts {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    padding: 12px;
    min-width: 0;
}
.dev-review-answer-parts table {
    border-collapse: collapse;
    width: 100%;
    min-width: 520px;
    font-size: 13px;
}
.dev-review-answer-parts th,
.dev-review-answer-parts td {
    border: 1px solid var(--border);
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.dev-review-answer-parts th {
    background: var(--accent-soft);
    font-weight: 700;
}
.dev-review-answer-parts td:nth-child(2) {
    text-align: right;
}
.dev-review-answer-parts-mobile {
    display: none;
}
.dev-review-answer-part-keyword {
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
    line-height: 1.5;
    margin-top: 4px;
    padding: 5px 7px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.dev-review-answer-part-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    display: grid;
    gap: 8px;
    padding: 10px;
}
.dev-review-answer-part-card + .dev-review-answer-part-card {
    margin-top: 10px;
}
.dev-review-answer-part-title {
    font-weight: 800;
}
.dev-review-answer-part-meta {
    color: var(--dim);
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
    gap: 6px 10px;
}
.dev-review-explanation-text {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    padding: 12px;
}
.dev-review-explanation-meta {
    color: var(--dim);
    font-size: 12px;
    margin-bottom: 10px;
    overflow-wrap: anywhere;
}
.dev-review-explanation-field {
    border-top: 1px solid var(--border);
    display: grid;
    gap: 6px;
    line-height: 1.65;
    padding: 10px 0;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.dev-review-explanation-field:first-of-type {
    border-top: 0;
}
.dev-review-explanation-list {
    margin: 0;
    padding-left: 20px;
}
.dev-review-explanation-list li + li {
    margin-top: 6px;
}
.dev-review-explanation-images {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    padding: 12px;
}
.dev-review-explanation-images-empty {
    padding: 10px 12px;
}
.dev-review-explanation-image-list {
    display: grid;
    gap: 12px;
}
.dev-review-explanation-image {
    margin: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    padding: 12px;
}
.dev-review-explanation-image-meta {
    display: grid;
    gap: 4px;
    margin-bottom: 10px;
}
.dev-review-explanation-image img {
    display: block;
    max-width: 100%;
    max-height: 560px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    box-sizing: border-box;
}
.dev-review-zoomable-image {
    cursor: zoom-in;
}
.dev-review-zoomable-image:hover,
.dev-review-zoomable-image:focus-visible {
    border-color: var(--accent);
}
.dev-review-explanation-image.is-missing img {
    display: none;
}

.question-images {
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.question-image-figure {
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.question-image-inline {
    display: block;
    max-width: 100%;
    max-height: min(68vh, 720px);
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center center;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    cursor: zoom-in;
    touch-action: manipulation;
}

@media (max-width: 640px) {
    #page-content {
        padding-left: 12px;
        padding-right: 12px;
    }
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .segmented-control .btn {
        flex-basis: calc(50% - 4px);
    }
    .home-action-row .btn,
    .session-action-row .btn {
        flex: 1 1 100%;
    }
    .round-button-grid {
        grid-template-columns: 1fr 1fr;
    }
    .dev-review-toolbar {
        top: 4px;
    }
    .dev-review,
    .dev-review * {
        min-width: 0;
    }
    .dev-review-result,
    .dev-review-question-card,
    .dev-review-mode-panel,
    .dev-review-explanation-edit,
    .dev-review-retail-section,
    .dev-review-scoring-edit-panel,
    .dev-review-scoring-edit-card,
    .dev-review-edit-form {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    .dev-review-question-card {
        padding: 14px !important;
    }
    .dev-review-question-head {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }
    .dev-review-search {
        flex-direction: column;
        align-items: stretch;
    }
    .dev-review-sync-lock-main,
    .dev-review-sync-lock-actions {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }
    .dev-review-subtabs {
        display: grid;
        grid-template-columns: 1fr;
    }
    .dev-review-subtab {
        width: 100%;
    }
    .dev-review-card-actions {
        display: grid;
        grid-template-columns: 1fr;
        justify-content: stretch;
        width: 100%;
    }
    .dev-review-card-actions > .btn,
    .dev-review-card-actions > button,
    .dev-review-card-actions > span {
        width: 100%;
    }
    .dev-review-mode-tabs,
    .dev-review-edit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .dev-review-retail-section-head,
    .dev-review-retail-section summary {
        align-items: flex-start;
        flex-direction: column;
    }
    .dev-review-mode-btn,
    .dev-review-edit-actions .btn {
        width: 100%;
    }
    .dev-review-scoring-editor-head,
    .dev-review-scoring-card-head {
        align-items: stretch;
        flex-direction: column;
    }
    .dev-review-scoring-chip-list,
    .dev-review-scoring-locked-meta {
        width: 100%;
    }
    .dev-review-scoring-chip-row {
        align-items: stretch;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        min-width: 0;
        width: 100%;
    }
    .dev-review-scoring-chip-input {
        min-width: 0;
        width: 100%;
    }
    .dev-review-scoring-json-details:not([open]) {
        display: block;
    }
    .dev-review-choice-edit-row {
        grid-template-columns: 1fr;
    }
    .dev-review-report-filter {
        justify-content: flex-start;
        width: 100%;
    }
    .dev-review-step-nav {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .dev-review-nav-btn {
        flex: 1;
        min-width: 96px;
        min-height: 40px;
    }
    .dev-review-nav-message {
        width: 100%;
    }
    .dev-review-candidate-head {
        align-items: stretch;
        flex-direction: column;
    }
    .dev-review-order-controls {
        align-items: stretch;
        flex-direction: column;
    }
    .dev-review-order-controls .input-sm {
        width: 100%;
    }
    .dev-review-candidate {
        grid-template-columns: auto auto;
    }
    .dev-review-report-status {
        margin-left: 0;
        width: 100%;
    }
    .dev-review-candidate .text-dim {
        grid-column: 1 / -1;
    }
    .dev-review-selected-label {
        justify-self: start;
    }
    .dev-review-match-grid {
        grid-template-columns: 1fr;
    }
    .dev-review-choice,
    .dev-review-answer,
    .dev-review-reports-detail,
    .dev-review-explanation-text,
    .dev-review-explanation-images,
    .dev-review-answer-parts,
    .dev-review-diff-card,
    .dev-review-retail-section,
    .dev-review-edit-details,
    .dev-review-info-note,
    .dev-review-log-path,
    .dev-review-edit-log-card {
        padding: 10px;
    }
    .question-stem,
    .question-stem *,
    .dev-review-choice,
    .dev-review-report-memo,
    .dev-review-explanation-field,
    .dev-review-log-path,
    .dev-review-edit-log-card,
    .dev-review-locked-values,
    .dev-review-answer-row-value {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .question-images,
    .question-image-figure {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    .question-image-inline,
    .dev-review-explanation-image img {
        width: auto !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 56vh;
        object-fit: contain;
    }
    .dev-review-answer-row {
        grid-template-columns: 1fr;
        border-top: 1px solid var(--border);
        padding-top: 6px;
    }
    .dev-review-answer-row:first-of-type {
        border-top: 0;
        padding-top: 0;
    }
    .dev-review-answer-parts-table {
        display: none;
    }
    .dev-review-answer-parts-mobile {
        display: block;
    }
    .dev-review-log-filter,
    .dev-review-log-file-row,
    .dev-review-report-actions,
    .dev-review-edit-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }
    .dev-review-log-filter .btn,
    .dev-review-report-actions .btn,
    .dev-review-edit-actions .btn {
        width: 100%;
    }
    .dev-review-log-report-content,
    .dev-review-diff-card pre {
        max-width: 100%;
        overflow-x: hidden;
        white-space: pre-wrap;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

/* ── Stat Number ─────────────────────────────── */
.stat-num {
    font-size: 24px;
    font-weight: 800;
}

/* ── Color Bar (side indicator) ──────────────── */
.color-bar {
    width: 4px;
    height: 24px;
    border-radius: 2px;
}

/* ── Toast ────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.toast.show { opacity: 1; }

/* ── Loading Spinner ─────────────────────────── */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--dim);
}
.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.spinner {
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* ── I-13: 공식 치트시트 ── */
.cheatsheet-page { padding: 0 0 24px; }
.cheatsheet-search { padding: 0 16px 12px; }
.cheatsheet-search .input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    background: var(--card);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}
.cheatsheet-search .input:focus {
    border-color: var(--accent);
}

.cs-category { padding: 0 16px 16px; }
.cs-category-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 10px;
    padding: 8px 0;
    border-bottom: 2px solid var(--accent);
    color: var(--text);
}

.cs-tag-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.cs-tag-card.expanded {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.cs-tag-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    cursor: pointer;
    user-select: none;
}
.cs-tag-header:active { opacity: 0.7; }

.cs-tag-info { display: flex; flex-direction: column; gap: 2px; }
.cs-tag-name { font-size: 14px; font-weight: 600; color: var(--text); }
.cs-tag-count { font-size: 11px; color: var(--dim); }

.cs-expand-icon {
    font-size: 14px;
    color: var(--dim);
    transition: transform 0.2s;
}
.cs-tag-card.expanded .cs-expand-icon { transform: rotate(180deg); }

.cs-tag-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 14px;
}
.cs-tag-card.expanded .cs-tag-body {
    max-height: 70vh;
    overflow-y: auto;
    padding: 0 14px 14px;
}
.cs-definition {
    font-size: 13px;
    color: var(--dim);
    margin: 0 0 10px;
    line-height: 1.5;
}

.cs-formulas { display: flex; flex-direction: column; gap: 6px; }
.cs-formula {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: 'Courier New', Consolas, monospace;
    color: var(--text);
    line-height: 1.5;
    word-break: break-all;
}

.cs-traps {
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(255, 170, 0, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(255, 170, 0, 0.2);
}
.cs-traps-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
}
.cs-trap-item {
    font-size: 13px;
    color: var(--dim);
    line-height: 1.5;
}

.cs-meta {
    margin-top: 8px;
    font-size: 11px;
    color: var(--dim);
    text-align: right;
}
/* 공식 블록 */
.cs-formula-block {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 10px;
}

.cs-legacy-formula-heading {
    margin: 4px 0 8px;
    padding: 12px 2px 0;
    border-top: 1px solid var(--border);
    color: var(--dim);
    font-size: 12px;
    font-weight: 700;
}

.legacy-formula-card {
    padding: 13px 14px;
    background: var(--card);
}

.cs-formula-expr {
    font-family: 'Courier New', monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.legacy-formula-expression {
    display: block;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
    letter-spacing: 0;
    overflow-wrap: anywhere;
    white-space: normal;
}

/* 단순 공식 (formula_details 없을 때) */
.cs-formula-simple {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--accent);
    padding: 8px 12px;
    background: var(--card);
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    margin-bottom: 8px;
}

/* 변수 테이블 */
.cs-var-table {
    border-top: 1px solid var(--border);
    padding-top: 8px;
    margin-top: 8px;
}

.legacy-variable-table {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    padding-top: 0;
    margin-top: 10px;
}

.cs-var-row {
    display: grid;
    grid-template-columns: 70px 110px 60px 1fr;
    gap: 8px;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--border-light, rgba(255,255,255,0.05));
}

.legacy-variable-row {
    grid-template-columns: 72px minmax(92px, 1fr) auto minmax(160px, 2fr);
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
}

.legacy-variable-row:last-child {
    border-bottom: 0;
}

.cs-var-symbol {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: var(--accent);
}

.cs-var-name {
    font-weight: 500;
    color: var(--text);
}

.cs-var-unit {
    color: var(--dim);
    font-size: 12px;
    text-align: center;
    background: var(--bg);
    border-radius: 4px;
    padding: 1px 6px;
}

.legacy-variable-row .cs-var-unit {
    justify-self: start;
    max-width: 100%;
    padding: 2px 7px;
    border: 1px solid var(--border);
    border-radius: 999px;
    white-space: normal;
    text-align: left;
    line-height: 1.35;
}

.cs-var-meaning {
    color: var(--dim);
    font-size: 12px;
    line-height: 1.4;
}

.formula-sheet-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.formula-sheet-expression {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--accent);
    font-family: 'Courier New', monospace;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.formula-sheet-expression.plain {
    font-size: 18px;
}

.formula-sheet-left,
.formula-sheet-equals,
.formula-sheet-expr-text {
    display: inline-flex;
    align-items: center;
}

.formula-frac {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 64px;
    text-align: center;
    vertical-align: middle;
}

.frac-top,
.frac-bottom {
    display: block;
    padding: 0 6px;
    line-height: 1.2;
}

.frac-line {
    display: block;
    height: 1px;
    margin: 2px 0;
    background: currentColor;
}

.formula-sheet-secondary,
.formula-sheet-unit-box,
.formula-sheet-notes,
.formula-sheet-chip-group {
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.formula-sheet-label {
    margin-bottom: 6px;
    color: var(--dim);
    font-size: 12px;
    font-weight: 700;
}

.formula-sheet-secondary-item,
.formula-sheet-unit-item {
    margin-top: 4px;
    color: var(--text);
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
}

.formula-sheet-var-table {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.formula-sheet-var-head,
.formula-sheet-var-row {
    display: grid;
    grid-template-columns: 80px 1.1fr 1fr 1.8fr;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
}

.formula-sheet-var-head {
    background: var(--bg);
    color: var(--dim);
    font-size: 12px;
    font-weight: 700;
}

.formula-sheet-var-row {
    border-top: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
    line-height: 1.4;
}

.formula-sheet-var-symbol {
    color: var(--accent);
    font-family: 'Courier New', monospace;
    font-weight: 700;
}

.formula-sheet-notes ul {
    margin: 0;
    padding-left: 18px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.6;
}

.formula-sheet-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.formula-sheet-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    color: var(--text);
    font-size: 12px;
    line-height: 1.2;
}

/* 원리 유도 */
.cs-derivation-wrap {
    margin-top: 10px;
}

.cs-deriv-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--dim);
    font-size: 12px;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.15s;
}

.cs-deriv-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.cs-derivation {
    margin-top: 8px;
    background: var(--bg);
    border-radius: 6px;
    padding: 10px 14px;
}

.cs-deriv-steps {
    margin: 0;
    padding-left: 18px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.8;
}

.cs-deriv-analogy {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    color: var(--accent-secondary, #f0a500);
    font-size: 13px;
}

/* 정의 / 비유 */
.cs-definition {
    color: var(--text);
    font-size: 14px;
    margin-bottom: 6px;
    line-height: 1.5;
}

.cs-analogy {
    color: var(--dim);
    font-size: 13px;
    margin-bottom: 10px;
    font-style: italic;
}

/* 뱃지 */
.cs-badge-detail {
    color: #4caf50;
    font-size: 11px;
    font-weight: 600;
}

/* 하단 푸터 (기출 수 + 연습 버튼) */
.cs-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.cs-meta {
    font-size: 12px;
    color: var(--dim);
}

.cs-practice-btn {
    font-size: 12px;
    padding: 4px 12px;
}

/* 반응형: 변수 테이블 좁은 화면 */
@media (max-width: 480px) {
    .cs-var-row {
        grid-template-columns: 60px 90px 50px 1fr;
        font-size: 12px;
        gap: 4px;
    }

    .legacy-formula-card {
        padding: 11px;
    }

    .legacy-formula-expression {
        padding: 10px;
        font-size: 13px;
        line-height: 1.6;
    }

    .legacy-variable-row {
        grid-template-columns: minmax(48px, auto) 1fr;
        gap: 4px 8px;
        padding: 9px 10px;
    }

    .legacy-variable-row .cs-var-symbol {
        grid-row: span 3;
    }

    .legacy-variable-row .cs-var-unit,
    .legacy-variable-row .cs-var-meaning {
        grid-column: 2;
    }

    .formula-sheet-expression {
        gap: 8px;
        font-size: 18px;
    }

    .formula-sheet-expression.plain {
        font-size: 15px;
    }

    .formula-frac {
        min-width: 54px;
    }

    .formula-sheet-var-head {
        display: none;
    }

    .formula-sheet-var-row {
        grid-template-columns: 1fr;
        gap: 3px;
        padding: 9px 10px;
    }
}

/* 오류 리포트 */
.btn-icon-report {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 6px;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.btn-icon-report:hover { opacity: 1; }

.report-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
}
.report-option:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.report-option input[type="radio"] { accent-color: var(--accent); }

.toast-report {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--green);
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    z-index: 2000;
    animation: toast-fade 2.5s ease forwards;
}
@keyframes toast-fade {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

.question-image-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    min-height: 100vh;
    min-height: 100dvh;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.86);
    box-sizing: border-box;
    cursor: zoom-out;
    overscroll-behavior: contain;
    touch-action: none;
}
.question-image-overlay.is-zoomed {
    cursor: grab;
}
body.question-image-open {
    overflow: hidden;
    overscroll-behavior: contain;
}

.answer-parts-inputs {
    display: grid;
    gap: 10px;
}
.answer-part-row {
    display: grid;
    grid-template-columns: minmax(96px, 150px) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}
.answer-part-label {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.answer-part-row .input {
    min-width: 0;
    width: 100%;
}
.answer-part-unit {
    min-width: 56px;
    color: var(--text-dim);
    font-size: 0.85rem;
}
.answer-part-results {
    margin-top: 12px;
}
.answer-summary-card {
    margin: -4px 0 16px;
    padding: 14px 16px;
    border: 1px solid rgba(59,130,246,0.24);
    border-radius: var(--radius-sm);
    background: rgba(59,130,246,0.06);
}
.answer-summary-title {
    margin-bottom: 10px;
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}
.answer-summary-row {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 7px 0;
    border-top: 1px solid rgba(148,163,184,0.14);
}
.answer-summary-row:first-of-type {
    border-top: 0;
}
.answer-summary-label {
    color: var(--dim);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.answer-summary-label.is-correct {
    color: var(--green);
}
.answer-summary-label.is-user {
    color: var(--orange);
}
.answer-summary-value {
    min-width: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.answer-part-result-row {
    display: grid;
    grid-template-columns: minmax(96px, 150px) 52px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid var(--border);
}
.answer-part-result-row:first-of-type {
    border-top: 0;
}
.answer-part-result-label {
    font-weight: 700;
}
.explanation-section {
    margin-bottom: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
}
.explanation-section.is-final-answer {
    border-color: rgba(34,197,94,0.28);
    background: rgba(34,197,94,0.06);
}
.explanation-section.is-caution {
    border-color: rgba(245,158,11,0.32);
    background: rgba(245,158,11,0.07);
}
.explanation-section-title {
    margin-bottom: 8px;
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}
.explanation-section-body {
    color: var(--text);
    font-size: 13px;
    line-height: 1.75;
}
.explanation-section-body p {
    margin: 0;
}
.explanation-list,
.explanation-bullets {
    margin: 0;
    padding-left: 20px;
}
.explanation-list li,
.explanation-bullets li {
    margin: 5px 0;
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    .answer-summary-card {
        padding: 12px;
    }
    .answer-summary-row {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 8px;
    }
    .answer-part-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .answer-part-unit {
        min-width: 0;
    }
    .answer-part-result-row {
        grid-template-columns: 1fr auto;
    }
    .answer-part-result-row .text-xs {
        grid-column: 1 / -1;
    }
    .explanation-section {
        padding: 12px;
    }
}
.question-image-full {
    display: block;
    max-width: calc(100vw - 48px);
    max-height: min(85vh, calc(100dvh - 72px));
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center center;
    box-sizing: border-box;
    border-radius: 8px;
    background: #111827;
    padding: 8px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    cursor: default;
    transform-origin: center center;
    transition: transform 120ms ease;
    will-change: transform;
    user-select: none;
    -webkit-user-drag: none;
    touch-action: none;
}
.question-image-full.is-zoomed {
    cursor: grab;
    transition: none;
}
.question-image-toolbar {
    position: fixed;
    left: 16px;
    top: 16px;
    z-index: 3002;
    display: flex;
    gap: 8px;
}
.question-image-tool {
    min-width: 48px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    touch-action: manipulation;
}
.question-image-close {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 3002;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
}

/* 계산기 오버레이 */
@media (max-width: 640px) {
    .question-image-overlay {
        padding: 12px;
    }
    .question-image-full {
        max-width: calc(100vw - 24px);
        max-height: calc(100dvh - 72px);
        padding: 4px;
    }
    .question-image-close {
        top: 10px;
        right: 10px;
        width: 46px;
        height: 46px;
    }
    .question-image-toolbar {
        top: 10px;
        left: 10px;
    }
    .question-image-tool {
        height: 38px;
        min-width: 46px;
        padding: 0 10px;
    }
}

#calc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: fit-content;
    max-height: calc(100dvh - 24px);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: 900;
    overflow: hidden;
    user-select: none;
    pointer-events: auto;
    transform: translate(var(--calc-x, 0px), var(--calc-y, 0px));
    will-change: transform;
    display: flex;
    flex-direction: column;
}
.calc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--surface);
    cursor: grab;
    font-size: 14px;
    font-weight: 700;
    touch-action: none;
    flex: 0 0 auto;
}
.calc-header:active { cursor: grabbing; }
.calc-header-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text);
    opacity: 0.8;
    transition: opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    touch-action: manipulation;
    position: relative;
    z-index: 2;
}
.calc-header-btn:hover { opacity: 1; }
.calc-main {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.calc-expr {
    padding: 6px 14px 0;
    text-align: right;
    font-size: 13px;
    color: var(--text-dim, #888);
    min-height: 20px;
    word-break: break-all;
}
.calc-display {
    padding: 4px 14px 8px;
    text-align: right;
    font-size: 28px;
    font-weight: 600;
    font-family: 'SF Mono', 'Consolas', monospace;
    min-height: 40px;
    word-break: break-all;
    border-bottom: 1px solid var(--border);
}
.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
}
.calc-btn {
    background: var(--bg);
    border: none;
    padding: 14px 0;
    font-size: 17px;
    cursor: pointer;
    color: var(--text);
    transition: background 0.1s;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}
.calc-btn:active { background: var(--surface); }
.calc-fn { color: var(--accent); font-weight: 600; }
.calc-op { color: var(--orange, #f59e0b); font-weight: 700; font-size: 19px; }
.calc-eq {
    grid-column: 1 / -1;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 19px;
    padding: 16px 0;
}
.calc-eq:active { opacity: 0.8; }
.calc-history-panel {
    border-top: 1px solid var(--border);
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.calc-history-item {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    text-align: right;
    transition: background 0.1s;
}
.calc-history-item:hover { background: var(--surface); }

@media (max-width: 600px) {
    #calc-overlay {
        width: min(76vw, 280px);
        max-width: calc(100vw - 16px);
        max-height: 58dvh;
        border-radius: 12px;
        box-shadow: 0 6px 22px rgba(0,0,0,0.28);
    }
    .calc-header {
        padding: 7px 10px;
        font-size: 12px;
        min-height: 36px;
    }
    .calc-header-btn {
        font-size: 14px;
        padding: 6px 9px;
        border-radius: 5px;
    }
    .calc-expr {
        padding: 4px 10px 0;
        font-size: 11px;
        min-height: 16px;
    }
    .calc-display {
        padding: 2px 10px 6px;
        font-size: 22px;
        min-height: 30px;
    }
    .calc-btn {
        padding: 9px 0;
        font-size: 15px;
        min-height: 38px;
    }
    .calc-op,
    .calc-eq {
        font-size: 16px;
    }
    .calc-eq {
        padding: 10px 0;
        min-height: 40px;
    }
    .calc-history-item {
        padding: 7px 10px;
    }
    .calc-history-scroll {
        max-height: calc(58dvh - 86px);
    }
}
/* Study summary glossary screen. Scoped to the study summary page only. */
.study-summary-root {
    --text: #111827;
    --dim: #64748b;
    --card: #ffffff;
    --surface: #f8fafc;
    --border: #e2e8f0;
    --accent: #2563eb;
    --study-summary-text: #111827;
    --study-summary-dim: #64748b;
    --study-summary-border: #e2e8f0;
    --study-summary-accent: #2563eb;
    --study-summary-bg: #f8fafc;
    --study-summary-page: #f5f7fb;
    --study-summary-panel: #ffffff;
    --study-summary-input: #ffffff;
    --study-summary-row-bg: #f8fafc;
    --study-summary-chip-bg: #eff6ff;
    --study-summary-chip-text: #1d4ed8;
    --study-summary-active-bg: #dbeafe;
    --study-summary-active-text: #1d4ed8;
    --study-summary-soft: #eef2ff;
    --study-summary-soft-text: #4f46e5;
    --study-summary-highlight: #eff6ff;
    --study-summary-shadow: 0 18px 38px rgba(15,23,42,0.08);
    --study-summary-article-shadow: 0 22px 50px rgba(15,23,42,0.09);
    width: min(calc(100vw - 48px), 1440px);
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
    padding: 18px;
    border-radius: 26px;
    background: var(--study-summary-page);
    color: var(--text);
    box-sizing: border-box;
}

.study-summary-root.study-summary-theme-light {
    --text: #111827;
    --dim: #64748b;
    --card: #ffffff;
    --surface: #f8fafc;
    --border: #e2e8f0;
    --accent: #2563eb;
    --study-summary-text: #111827;
    --study-summary-dim: #64748b;
    --study-summary-border: #e2e8f0;
    --study-summary-accent: #2563eb;
    --study-summary-bg: #f8fafc;
    --study-summary-page: #f5f7fb;
    --study-summary-panel: #ffffff;
    --study-summary-input: #ffffff;
    --study-summary-row-bg: #f8fafc;
    --study-summary-chip-bg: #eff6ff;
    --study-summary-chip-text: #1d4ed8;
    --study-summary-active-bg: #dbeafe;
    --study-summary-active-text: #1d4ed8;
    --study-summary-soft: #eef2ff;
    --study-summary-soft-text: #4f46e5;
    --study-summary-highlight: #eff6ff;
    --study-summary-shadow: 0 18px 38px rgba(15,23,42,0.08);
    --study-summary-article-shadow: 0 22px 50px rgba(15,23,42,0.09);
}

.study-summary-root.study-summary-theme-soft-dark {
    --text: #f3f4f6;
    --dim: #c0c8d6;
    --card: #303746;
    --surface: #252b38;
    --border: rgba(255,255,255,0.14);
    --accent: #93c5fd;
    --study-summary-text: #f3f4f6;
    --study-summary-dim: #c0c8d6;
    --study-summary-border: rgba(255,255,255,0.14);
    --study-summary-accent: #93c5fd;
    --study-summary-bg: #252b38;
    --study-summary-page: #202634;
    --study-summary-panel: #2b3242;
    --study-summary-input: #252b38;
    --study-summary-row-bg: #252b38;
    --study-summary-chip-bg: rgba(96,165,250,0.16);
    --study-summary-chip-text: #dbeafe;
    --study-summary-active-bg: rgba(96,165,250,0.22);
    --study-summary-active-text: #eff6ff;
    --study-summary-soft: rgba(129,140,248,0.16);
    --study-summary-soft-text: #e0e7ff;
    --study-summary-highlight: rgba(96,165,250,0.16);
    --study-summary-shadow: 0 18px 38px rgba(0,0,0,0.22);
    --study-summary-article-shadow: 0 22px 50px rgba(0,0,0,0.28);
}

.study-summary-root .study-summary-shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.study-summary-root .study-summary-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 15;
    margin: -2px 0 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: color-mix(in srgb, var(--study-summary-panel) 92%, transparent);
    padding: 10px 12px;
    box-shadow: var(--study-summary-shadow);
    backdrop-filter: blur(16px);
}

.study-summary-root .study-summary-topbar-title {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: baseline;
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
}

.study-summary-root .study-summary-topbar-category {
    color: var(--dim);
    font-size: 12px;
    font-weight: 800;
}

.study-summary-root .study-summary-topbar-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

.study-summary-root .study-summary-theme-control,
.study-summary-root .study-summary-font-size-control {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--study-summary-panel);
    padding: 4px;
    color: var(--dim);
    font-size: 11px;
    font-weight: 800;
    box-shadow: var(--study-summary-shadow);
}

.study-summary-root .study-summary-theme-control span,
.study-summary-root .study-summary-font-size-control span {
    padding: 0 6px 0 8px;
}

.study-summary-root .study-summary-sidebar {
    position: sticky;
    top: 12px;
    display: grid;
    gap: 18px;
    min-width: 0;
    max-height: calc(100vh - 24px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--study-summary-panel);
    box-shadow: var(--study-summary-shadow);
}

.study-summary-root .study-summary-sidebar-header h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.25;
    letter-spacing: 0;
}

.study-summary-root .study-summary-sidebar-title-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 8px;
}

.study-summary-root .study-summary-sidebar-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}

.study-summary-root .study-summary-sidebar-header p,
.study-summary-root .study-summary-subtitle {
    margin: 0;
    color: var(--dim);
    font-size: 14px;
    line-height: 1.65;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.study-summary-root .study-summary-kicker {
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
}

.study-summary-root .study-summary-search {
    display: grid;
    gap: 7px;
}

.study-summary-root .study-summary-theme-button,
.study-summary-root .study-summary-font-size-button {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--study-summary-panel);
    color: var(--study-summary-text);
    padding: 5px 8px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.study-summary-root .study-summary-theme-button.is-active,
.study-summary-root .study-summary-font-size-button.is-active {
    border-color: rgba(37,99,235,0.42);
    background: var(--study-summary-active-bg);
    color: var(--study-summary-active-text);
}

.study-summary-root .study-summary-scroll-top-button {
    border: 1px solid rgba(37,99,235,0.36);
    border-radius: 999px;
    background: var(--study-summary-active-bg);
    color: var(--study-summary-active-text);
    padding: 8px 11px;
    font-size: 11px;
    font-weight: 900;
    box-shadow: none;
}

.study-summary-root .study-summary-inline-mode-button,
.study-summary-root .study-summary-theme-button,
.study-summary-root .study-summary-font-size-button,
.study-summary-root .study-summary-scroll-top-button {
    opacity: 1;
    text-shadow: none;
    cursor: pointer;
    transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.study-summary-root.study-summary-theme-light .study-summary-inline-mode-button,
.study-summary-root.study-summary-theme-light .study-summary-theme-button,
.study-summary-root.study-summary-theme-light .study-summary-font-size-button,
.study-summary-root.study-summary-theme-light .study-summary-scroll-top-button,
.study-summary-root.study-summary-theme-light .study-summary-editor-actions button {
    border-color: #bfdbfe;
    background: #ffffff;
    color: #1e3a8a;
}

.study-summary-root.study-summary-theme-light .study-summary-inline-mode-button.is-active,
.study-summary-root.study-summary-theme-light .study-summary-theme-button.is-active,
.study-summary-root.study-summary-theme-light .study-summary-font-size-button.is-active,
.study-summary-root.study-summary-theme-light .study-summary-scroll-top-button,
.study-summary-root.study-summary-theme-light .study-summary-editor-actions button:first-child {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.study-summary-root.study-summary-theme-soft-dark .study-summary-inline-mode-button,
.study-summary-root.study-summary-theme-soft-dark .study-summary-theme-button,
.study-summary-root.study-summary-theme-soft-dark .study-summary-font-size-button,
.study-summary-root.study-summary-theme-soft-dark .study-summary-scroll-top-button,
.study-summary-root.study-summary-theme-soft-dark .study-summary-editor-actions button {
    border-color: rgba(147,197,253,0.34);
    background: #303746;
    color: #dbeafe;
}

.study-summary-root.study-summary-theme-soft-dark .study-summary-inline-mode-button.is-active,
.study-summary-root.study-summary-theme-soft-dark .study-summary-theme-button.is-active,
.study-summary-root.study-summary-theme-soft-dark .study-summary-font-size-button.is-active,
.study-summary-root.study-summary-theme-soft-dark .study-summary-scroll-top-button,
.study-summary-root.study-summary-theme-soft-dark .study-summary-editor-actions button:first-child {
    border-color: #93c5fd;
    background: #60a5fa;
    color: #0f172a;
}

.study-summary-root .study-summary-scroll-top-button:hover,
.study-summary-root .study-summary-theme-button:hover,
.study-summary-root .study-summary-font-size-button:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
    transform: translateY(-1px);
}

.study-summary-root .study-summary-scroll-top-button:active,
.study-summary-root .study-summary-theme-button:active,
.study-summary-root .study-summary-font-size-button:active,
.study-summary-root .study-summary-inline-mode-button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: none;
}

.study-summary-root .study-summary-scroll-top-button:focus-visible,
.study-summary-root .study-summary-theme-button:focus-visible,
.study-summary-root .study-summary-font-size-button:focus-visible,
.study-summary-root .study-summary-inline-mode-button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--study-summary-accent) 25%, transparent);
    outline-offset: 2px;
}

.study-summary-root .study-summary-search-label {
    color: var(--dim);
    font-size: 11px;
    font-weight: 800;
}

.study-summary-root .study-summary-search-input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--study-summary-input);
    color: var(--text);
    padding: 0 13px;
    font-size: 14px;
    box-sizing: border-box;
}

.study-summary-root .study-summary-search-input:focus {
    outline: none;
    border-color: var(--accent);
}

.study-summary-root .study-summary-count,
.study-summary-root .study-summary-result-meta {
    color: var(--dim);
    font-size: 12px;
}

.study-summary-root .study-summary-category-list {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.study-summary-root .study-summary-category-section,
.study-summary-root .study-summary-secondary-category-list {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.study-summary-root .study-summary-category-section-title {
    color: var(--dim);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
}

.study-summary-root .study-summary-secondary-categories {
    min-width: 0;
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

.study-summary-root .study-summary-secondary-categories summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 34px;
    color: var(--study-summary-text);
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    list-style: none;
}

.study-summary-root .study-summary-secondary-categories summary::-webkit-details-marker {
    display: none;
}

.study-summary-root .study-summary-secondary-categories summary::before {
    content: '+';
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--accent);
    font-size: 13px;
    line-height: 1;
}

.study-summary-root .study-summary-secondary-categories[open] summary::before {
    content: '-';
}

.study-summary-root .study-summary-secondary-categories summary span {
    flex: 1 1 auto;
}

.study-summary-root .study-summary-secondary-categories summary small {
    flex: 0 0 auto;
    color: var(--dim);
    font-size: 11px;
    font-weight: 900;
}

.study-summary-root .study-summary-secondary-category-list {
    margin-top: 8px;
}

.study-summary-root .study-summary-category-button {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--study-summary-panel);
    color: var(--text);
    padding: 11px 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    min-width: 0;
    width: 100%;
    transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease, color 0.14s ease;
}

.study-summary-root .study-summary-category-button span {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.study-summary-root .study-summary-category-button.is-secondary {
    border-radius: 10px;
    padding: 9px 10px;
    font-size: 12px;
    font-weight: 800;
    background: color-mix(in srgb, var(--study-summary-panel) 84%, var(--study-summary-soft));
}

.study-summary-root .study-summary-category-button:hover {
    border-color: color-mix(in srgb, var(--study-summary-accent) 52%, var(--study-summary-border));
    background: color-mix(in srgb, var(--study-summary-active-bg) 48%, var(--study-summary-panel));
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.study-summary-root .study-summary-category-button:active {
    transform: translateY(0) scale(0.99);
    box-shadow: none;
}

.study-summary-root .study-summary-category-button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--study-summary-accent) 28%, transparent);
    outline-offset: 2px;
}

.study-summary-root .study-summary-category-button small {
    color: var(--dim);
    font-size: 11px;
    font-weight: 800;
}

.study-summary-root .study-summary-category-button.is-active {
    border-color: rgba(37,99,235,0.42);
    background: var(--study-summary-active-bg);
    color: var(--study-summary-active-text);
}

.study-summary-root .study-summary-main {
    min-width: 0;
}

.study-summary-root .study-summary-article,
.study-summary-root .study-summary-search-results {
    max-width: none;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--card);
    padding: 34px 42px;
    box-shadow: var(--study-summary-article-shadow);
}

.study-summary-root .study-summary-title {
    padding-bottom: 24px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.study-summary-root .study-summary-title h1 {
    margin: 6px 0 12px;
    font-size: 34px;
    line-height: 1.22;
    letter-spacing: 0;
}

.study-summary-root .study-summary-tags,
.study-summary-root .study-summary-related {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.study-summary-root .study-summary-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.study-summary-root .study-summary-tags {
    margin-top: 16px;
}

.study-summary-root .study-summary-header-actions .study-summary-tags {
    flex: 0 1 auto;
    margin-top: 0;
}

.study-summary-root .study-summary-header-actions .article-concept-question-button {
    margin: 0;
}

.study-summary-root .study-summary-tag {
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    padding: 6px 9px;
    background: var(--study-summary-soft);
    color: var(--study-summary-soft-text);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.study-summary-root button.study-summary-tag:hover {
    border-color: var(--study-summary-accent);
    background: color-mix(in srgb, var(--study-summary-soft) 70%, var(--study-summary-panel));
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.study-summary-root button.study-summary-tag:active {
    transform: translateY(0) scale(0.98);
    box-shadow: none;
}

.study-summary-root button.study-summary-tag:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--study-summary-accent) 25%, transparent);
    outline-offset: 2px;
}

.study-summary-root .study-summary-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    margin-top: 16px;
    color: var(--dim);
    font-size: 12px;
    line-height: 1.5;
}

.study-summary-root .study-summary-toc span {
    font-weight: 800;
}

.study-summary-root .study-summary-toc a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.study-summary-root .study-summary-toc a:hover {
    border-bottom-color: var(--accent);
}

.study-summary-root .study-summary-highlight {
    margin-top: 16px;
    border-left: 3px solid var(--accent);
    padding: 10px 12px;
    color: var(--text);
    background: var(--study-summary-highlight);
    font-size: 13px;
    line-height: 1.65;
}

.study-summary-root .study-summary-section {
    margin: 0 0 42px;
}

.study-summary-root .study-summary-section:last-child {
    margin-bottom: 0;
}

.study-summary-root .study-summary-section > h2 {
    margin: 0 0 18px;
    color: var(--text);
    font-size: 24px;
    line-height: 1.34;
    letter-spacing: 0;
}

.study-summary-root {
    --study-summary-saved-h2-size: 25px;
    --study-summary-saved-h3-size: 18px;
    --study-summary-saved-h4-size: 17px;
    --study-summary-saved-paragraph-size: 16px;
    --study-summary-saved-list-size: 15px;
    --study-summary-saved-preformatted-size: 14.5px;
    --study-summary-saved-row-size: 14px;
    --study-summary-saved-caption-size: 15px;
}

.study-summary-root[data-study-summary-font-size="large"] {
    --study-summary-saved-h2-size: 28px;
    --study-summary-saved-h3-size: 22px;
    --study-summary-saved-h4-size: 20px;
    --study-summary-saved-paragraph-size: 20px;
    --study-summary-saved-list-size: 19px;
    --study-summary-saved-preformatted-size: 18.5px;
    --study-summary-saved-row-size: 18px;
    --study-summary-saved-caption-size: 17px;
}

.study-summary-root .study-summary-saved-article .study-summary-article-body {
    display: grid;
    gap: 16px;
}

.study-summary-root .study-summary-saved-article .study-summary-section {
    margin: 0;
}

.study-summary-root .study-summary-saved-article .study-summary-section > h2 {
    margin: 34px 0 4px;
    padding: 0 0 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--study-summary-accent) 28%, var(--study-summary-border));
    color: var(--study-summary-text);
    font-size: var(--study-summary-saved-h2-size);
    line-height: 1.32;
    letter-spacing: 0;
}

.study-summary-root .study-summary-saved-article .study-summary-article-body > .study-summary-section:first-child > h2 {
    margin-top: 0;
}

.study-summary-root .study-summary-saved-article .study-summary-section > h3 {
    margin: 18px 0 0;
    border-left: 4px solid color-mix(in srgb, var(--study-summary-accent) 54%, var(--study-summary-border));
    border-radius: 8px;
    padding: 9px 12px;
    background: color-mix(in srgb, var(--study-summary-active-bg) 26%, var(--study-summary-panel));
    color: var(--study-summary-text);
    font-size: var(--study-summary-saved-h3-size);
    line-height: 1.36;
    letter-spacing: 0;
}

.study-summary-root .study-summary-saved-article .study-summary-section > h4 {
    margin: 12px 0 0;
    color: var(--study-summary-text);
    font-size: var(--study-summary-saved-h4-size);
    line-height: 1.42;
    letter-spacing: 0;
}

.study-summary-root .study-summary-saved-article .study-summary-section > h2,
.study-summary-root .study-summary-saved-article .study-summary-section > h3,
.study-summary-root .study-summary-saved-article .study-summary-section > h4 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.study-summary-root .study-summary-heading-text {
    min-width: 0;
    flex: 1 1 auto;
}

.study-summary-root .concept-question-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 5px 8px;
    border: 1px solid color-mix(in srgb, var(--study-summary-accent) 42%, var(--study-summary-border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--study-summary-accent) 12%, var(--study-summary-panel));
    color: var(--study-summary-accent);
    font: inherit;
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: 0;
    cursor: pointer;
}

.study-summary-root .article-concept-question-button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin: 4px 0 2px;
    padding: 9px 13px;
    border: 1px solid color-mix(in srgb, var(--study-summary-accent) 48%, var(--study-summary-border));
    border-radius: 8px;
    background: color-mix(in srgb, var(--study-summary-accent) 13%, var(--study-summary-panel));
    color: var(--study-summary-accent);
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.2;
    letter-spacing: 0;
    white-space: nowrap;
    cursor: pointer;
}

.study-summary-root .article-concept-question-button:hover,
.study-summary-root .article-concept-question-button:focus-visible {
    border-color: var(--study-summary-accent);
    background: color-mix(in srgb, var(--study-summary-accent) 18%, var(--study-summary-panel));
    outline: none;
}

.study-summary-root .hide-recall-controls {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.study-summary-root .hide-recall-sidebar-panel {
    display: grid;
    gap: 12px;
    min-width: 0;
    border-top: 1px solid var(--study-summary-border);
    padding-top: 12px;
}

.study-summary-root .hide-recall-sidebar-section {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.study-summary-root .hide-recall-sidebar-title {
    color: var(--study-summary-dim);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
}

.study-summary-root .hide-recall-sidebar-panel .hide-recall-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
    min-width: 0;
}

.study-summary-root .hide-recall-sidebar-panel .hide-recall-mode-picker {
    min-width: 0;
}

.study-summary-root .hide-recall-sidebar-panel .hide-recall-control-button {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 7px 8px;
    font-size: 11px;
    white-space: normal;
}

.study-summary-root .hide-recall-sidebar-panel .hide-recall-mode-picker {
    grid-column: 1 / -1;
}

.study-summary-root .hide-recall-sidebar-panel .hide-recall-mode-options {
    width: 100%;
    box-sizing: border-box;
}

.study-summary-root .hide-recall-sidebar-panel .hide-recall-message {
    font-size: 11px;
}

.study-summary-root .hide-recall-admin-editor {
    min-width: 0;
}

.study-summary-root .hide-recall-admin-editor > .hide-recall-control-button {
    width: 100%;
}

.study-summary-root .hide-recall-admin-list {
    display: grid;
    gap: 6px;
    border: 1px solid color-mix(in srgb, var(--study-summary-accent) 22%, var(--study-summary-border));
    border-radius: 8px;
    background: color-mix(in srgb, var(--study-summary-panel) 92%, var(--study-summary-active-bg));
    padding: 6px;
}

.study-summary-root .hide-recall-admin-list > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    color: var(--study-summary-text);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
    cursor: pointer;
    list-style: none;
}

.study-summary-root .hide-recall-admin-list > summary::-webkit-details-marker {
    display: none;
}

.study-summary-root .hide-recall-admin-list > summary::after {
    content: "▾";
    color: var(--study-summary-dim);
    font-size: 10px;
}

.study-summary-root .hide-recall-admin-list[open] > summary::after {
    transform: rotate(180deg);
}

.study-summary-root .hide-recall-admin-list > summary small {
    margin-left: auto;
    color: var(--study-summary-dim);
    font-size: 10px;
    font-weight: 850;
}

.study-summary-root .hide-recall-admin-list-body {
    display: grid;
    gap: 6px;
    max-height: 220px;
    overflow: auto;
    padding-top: 6px;
}

.study-summary-root .hide-recall-admin-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 6px;
    align-items: center;
    min-width: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--study-summary-border) 58%, transparent);
    padding: 0 0 6px;
}

.study-summary-root .hide-recall-admin-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.study-summary-root .hide-recall-admin-text {
    min-width: 0;
    overflow: hidden;
    color: var(--study-summary-text);
    font-size: 12px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.study-summary-root .hide-recall-admin-row small,
.study-summary-root .hide-recall-admin-empty {
    color: var(--study-summary-dim);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.25;
}

.study-summary-root .hide-recall-admin-row small {
    grid-column: 1 / 2;
}

.study-summary-root .hide-recall-admin-row button {
    grid-row: 1 / span 2;
    grid-column: 2;
    border: 1px solid var(--study-summary-border);
    border-radius: 7px;
    background: var(--study-summary-panel);
    color: var(--study-summary-text);
    padding: 5px 7px;
    font: inherit;
    font-size: 11px;
    font-weight: 850;
    cursor: pointer;
}

.study-summary-root .hide-recall-admin-row button:hover,
.study-summary-root .hide-recall-admin-row button:focus-visible {
    border-color: #dc2626;
    color: #dc2626;
    outline: none;
}

.study-summary-root .hide-recall-mobile-admin-dock {
    display: none;
}

.study-summary-root .hide-recall-mode-picker {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
}

.study-summary-root .hide-recall-mode-options {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    left: 0;
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
    width: max-content;
    padding: 6px;
    border: 1px solid color-mix(in srgb, var(--study-summary-accent) 34%, var(--study-summary-border));
    border-radius: 10px;
    background: var(--study-summary-panel);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16);
    white-space: nowrap;
}

.study-summary-root .hide-recall-message {
    color: var(--study-summary-dim);
    font-size: 11px;
    font-weight: 800;
}

.study-summary-root .hide-recall-message {
    flex: 1 1 100%;
}

.study-summary-root .hide-recall-control-button {
    min-height: 38px;
    border: 1px solid color-mix(in srgb, var(--study-summary-accent) 34%, var(--study-summary-border));
    border-radius: 8px;
    background: var(--study-summary-panel);
    color: var(--study-summary-text);
    padding: 8px 11px;
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.2;
    letter-spacing: 0;
    cursor: pointer;
}

.study-summary-root .hide-recall-control-button:hover,
.study-summary-root .hide-recall-control-button:focus-visible {
    border-color: var(--study-summary-accent);
    background: color-mix(in srgb, var(--study-summary-accent) 10%, var(--study-summary-panel));
    outline: none;
}

.study-summary-root .hide-recall-control-button.is-active {
    border-color: var(--study-summary-accent);
    background: var(--study-summary-active-bg);
    color: var(--study-summary-active-text);
}

.study-summary-root .hide-recall-mask {
    display: inline-block;
    min-width: 2.2em;
    max-width: 100%;
    border: 1px solid color-mix(in srgb, var(--study-summary-accent) 38%, var(--study-summary-border));
    border-radius: 6px;
    background: color-mix(in srgb, var(--study-summary-accent) 14%, var(--study-summary-panel));
    padding: 0 0.18em;
    color: var(--study-summary-text);
    line-height: 1.35;
    vertical-align: baseline;
    cursor: pointer;
}

.study-summary-root .hide-recall-mask.has-dismiss {
    display: inline-flex;
    align-items: center;
    gap: 0.16em;
}

.study-summary-root .hide-recall-mask-dismiss {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 1.08em;
    height: 1.08em;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--study-summary-accent) 12%, var(--study-summary-panel));
    color: color-mix(in srgb, var(--study-summary-active-text) 82%, var(--study-summary-text));
    padding: 0;
    font: inherit;
    font-size: 0.78em;
    font-weight: 950;
    line-height: 1;
    cursor: pointer;
}

.study-summary-root .hide-recall-mask-dismiss:hover,
.study-summary-root .hide-recall-mask-dismiss:focus-visible {
    background: color-mix(in srgb, #dc2626 14%, var(--study-summary-panel));
    color: #dc2626;
    outline: 2px solid color-mix(in srgb, #dc2626 26%, transparent);
    outline-offset: 1px;
}

.study-summary-root .hide-recall-mask:not(.is-revealed) {
    color: transparent;
    text-shadow: none;
}

.study-summary-root .hide-recall-mask:not(.is-revealed) .hide-recall-mask-text {
    opacity: 0;
}

.study-summary-root .hide-recall-mask.is-revealed {
    background: color-mix(in srgb, var(--study-summary-panel) 82%, var(--study-summary-active-bg));
}

.study-summary-root .hide-recall-mask.is-full {
    min-width: min(100%, 8em);
    padding-inline: 0.35em;
}

.study-summary-root .hide-recall-mask.is-full.is-revealed {
    border-color: transparent;
    background: transparent;
    padding-inline: 0;
}

.study-summary-root .hide-recall-mask:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--study-summary-accent) 28%, transparent);
    outline-offset: 2px;
}

.study-summary-root .concept-question-chip:hover,
.study-summary-root .concept-question-chip:focus-visible {
    border-color: var(--study-summary-accent);
    background: color-mix(in srgb, var(--study-summary-accent) 18%, var(--study-summary-panel));
    outline: none;
}

html.concept-question-panel-open,
body.concept-question-panel-open {
    overflow: hidden;
    overscroll-behavior: none;
}

.concept-question-panel-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9400;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: clamp(16px, 3dvh, 32px);
    background: rgba(15, 23, 42, 0.42);
    overflow: hidden;
    overscroll-behavior: contain;
}

.concept-question-panel {
    width: clamp(360px, 48vw, 720px);
    max-width: calc(100vw - 32px);
    height: min(720px, calc(100vh - 36px));
    height: min(720px, calc(100dvh - 36px));
    max-height: calc(100vh - 36px);
    max-height: calc(100dvh - 36px);
    min-height: min(420px, calc(100dvh - 36px));
    display: flex;
    flex-direction: column;
    border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
    border-radius: 16px;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
    overflow: hidden;
    overscroll-behavior: contain;
}

.concept-question-panel-handle {
    width: 42px;
    height: 4px;
    margin: 10px auto 4px;
    border-radius: 999px;
    background: var(--border);
}

.concept-question-panel-head {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px 14px;
    border-bottom: 1px solid var(--border);
}

.concept-question-panel-kicker {
    margin-bottom: 4px;
    color: var(--dim);
    font-size: 12px;
    font-weight: 800;
}

.concept-question-panel h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    font-weight: 850;
    line-height: 1.35;
    letter-spacing: 0;
}

.concept-question-panel-close {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-1);
    color: var(--text);
    font: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.concept-question-panel-close:hover,
.concept-question-panel-close:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
    outline: none;
}

.concept-question-panel-list {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 14px 18px 18px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.concept-question-panel-actions {
    flex: 0 0 auto;
    padding: 12px 18px 0;
}

.concept-question-sequence-button {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
}

.concept-question-panel-groups {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 14px 18px 18px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.concept-question-group {
    display: grid;
    gap: 8px;
}

.concept-question-group-title {
    color: var(--dim);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.35;
}

.concept-question-group .concept-question-panel-list {
    padding: 0;
    overflow: visible;
}

.concept-question-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    width: 100%;
    min-height: 52px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-1);
    color: var(--text);
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.concept-question-item:hover,
.concept-question-item:focus-visible {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 8%, var(--bg-1));
    outline: none;
}

.concept-question-qid {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 5px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 12%, var(--surface));
    color: var(--accent);
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
}

.concept-question-preview {
    min-width: 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

html.study-summary-question-preview-open,
body.study-summary-question-preview-open {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

body.study-summary-question-preview-open #page-content {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.study-summary-question-preview-shell {
    box-sizing: border-box;
    width: min(980px, 100%);
    height: calc(100vh - 20px);
    height: calc(100dvh - 20px);
    margin: 0 auto;
    padding: 0 0 28px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.study-summary-return-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: -2px 0 14px;
}

.study-summary-return-button,
.study-summary-next-question-button {
    min-height: 34px;
    border-radius: 8px;
    padding: 8px 11px;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
}

.study-summary-return-button {
    border: 1px solid var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

.study-summary-next-question-button {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

.study-summary-root .study-summary-saved-article .study-summary-block-paragraph {
    margin: 0;
    color: var(--study-summary-text);
    font-size: var(--study-summary-saved-paragraph-size);
    line-height: 1.72;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.study-summary-root .study-summary-saved-article .study-summary-block-paragraph.study-summary-empty-paragraph {
    min-height: 1.82em;
}

.study-summary-root .study-summary-saved-article .study-summary-preformatted {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    margin: 0 0 6px;
    padding: 14px 16px;
    overflow-x: auto;
    border: 1px solid var(--study-summary-border);
    border-radius: 8px;
    background: var(--study-summary-surface-muted);
    color: var(--study-summary-text);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: var(--study-summary-saved-preformatted-size);
    line-height: 1.64;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    letter-spacing: 0;
    tab-size: 4;
}

.study-summary-root .study-summary-saved-article .study-summary-fraction {
    display: inline-grid;
    grid-template-rows: auto 1px auto;
    align-items: center;
    justify-items: center;
    min-width: 2.4em;
    margin: 0 0.18em;
    vertical-align: middle;
    line-height: 1.15;
    max-width: 100%;
    white-space: normal;
}

.study-summary-root .study-summary-saved-article .study-summary-fraction-num,
.study-summary-root .study-summary-saved-article .study-summary-fraction-den {
    display: block;
    max-width: 100%;
    padding: 0 0.18em;
    font-size: 0.92em;
    text-align: center;
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.study-summary-root .study-summary-saved-article .study-summary-fraction .study-summary-fraction {
    min-width: 2em;
    margin: 0 0.12em;
    font-size: 0.88em;
}

.study-summary-root .study-summary-saved-article .study-summary-fraction-bar {
    display: block;
    width: 100%;
    border-top: 1px solid currentColor;
    opacity: 0.86;
}

.study-summary-root .study-summary-saved-article .study-summary-display-formula {
    display: grid;
    grid-template-columns: minmax(0, max-content) auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    max-width: 100%;
    min-width: 0;
    margin: 4px 0 8px;
    border-left: 3px solid color-mix(in srgb, var(--study-summary-accent) 60%, var(--study-summary-border));
    border-radius: 8px;
    background: color-mix(in srgb, var(--study-summary-active-bg) 16%, var(--study-summary-panel));
    padding: 10px 12px;
    color: var(--study-summary-text);
    line-height: 1.58;
    overflow-wrap: anywhere;
}

.study-summary-root .study-summary-saved-article .study-summary-display-formula-label {
    color: var(--study-summary-active-text);
    font-weight: 850;
    word-break: keep-all;
}

.study-summary-root .study-summary-saved-article .study-summary-display-formula-equals {
    color: var(--study-summary-muted);
    font-weight: 850;
}

.study-summary-root .study-summary-saved-article .study-summary-display-formula-expression {
    min-width: 0;
    overflow-wrap: anywhere;
}

.study-summary-root .study-summary-saved-article .study-summary-block-list {
    display: grid;
    gap: 8px;
    margin: 0 0 6px;
    padding: 0 0 0 20px;
    color: var(--study-summary-text);
    font-size: var(--study-summary-saved-list-size);
    line-height: 1.66;
}

.study-summary-root .study-summary-saved-article .study-summary-block-list li {
    padding-left: 2px;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.study-summary-root .study-summary-saved-article .study-summary-block-list li::marker {
    color: var(--study-summary-accent);
}

.study-summary-root .study-summary-saved-article .study-summary-structured-paragraph {
    display: block;
}

.study-summary-root .study-summary-saved-article .study-summary-circled-paragraph-group {
    display: grid;
    gap: 8px;
    margin: 0 0 4px;
}

.study-summary-root .study-summary-saved-article .study-summary-circled-paragraph-title {
    color: var(--study-summary-text);
    font-weight: 850;
    line-height: 1.48;
}

.study-summary-root .study-summary-saved-article .study-summary-enum-block {
    display: grid;
    gap: 8px;
    max-width: 100%;
    min-width: 0;
}

.study-summary-root .study-summary-saved-article .study-summary-enum-title {
    color: var(--study-summary-active-text);
    font-weight: 850;
}

.study-summary-root .study-summary-saved-article .study-summary-enum-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding-left: 24px;
}

.study-summary-root .study-summary-saved-article .study-summary-inline-numbered-list {
    display: grid;
    gap: 8px;
    max-width: 100%;
    min-width: 0;
}

.study-summary-root .study-summary-saved-article .study-summary-inline-numbered-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: start;
}

.study-summary-root .study-summary-saved-article .study-summary-inline-numbered-marker {
    color: var(--study-summary-active-text);
    font-weight: 900;
}

.study-summary-root .study-summary-saved-article .study-summary-inline-numbered-text {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.study-summary-root .study-summary-saved-article .study-summary-list-continuation {
    display: block;
    margin-top: 2px;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.study-summary-root .study-summary-saved-article .study-summary-row > div {
    font-size: var(--study-summary-saved-row-size);
    line-height: 1.62;
}

.study-summary-root .study-summary-saved-article .study-summary-definition-row {
    font-size: var(--study-summary-saved-row-size);
    line-height: 1.62;
}

.study-summary-root .study-summary-saved-article .study-summary-real-table th,
.study-summary-root .study-summary-saved-article .study-summary-real-table td {
    font-size: var(--study-summary-saved-row-size);
    line-height: 1.58;
}

.study-summary-root .study-summary-saved-article .study-summary-media-caption {
    font-size: var(--study-summary-saved-caption-size);
    line-height: 1.55;
}

.study-summary-root .study-summary-saved-article-refrigerator,
.study-summary-root .study-summary-saved-article-cooling-cycle {
    --study-summary-saved-rule: color-mix(in srgb, var(--study-summary-accent) 32%, var(--study-summary-border));
}

.study-summary-root .study-summary-saved-article-refrigerator .study-summary-article-body,
.study-summary-root .study-summary-saved-article-cooling-cycle .study-summary-article-body {
    display: grid;
    gap: 14px;
}

.study-summary-root .study-summary-saved-article-refrigerator .study-summary-section,
.study-summary-root .study-summary-saved-article-cooling-cycle .study-summary-section {
    margin: 0;
}

.study-summary-root .study-summary-saved-article-refrigerator .study-summary-section > h2,
.study-summary-root .study-summary-saved-article-cooling-cycle .study-summary-section > h2 {
    margin: 32px 0 4px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--study-summary-saved-rule);
    color: var(--study-summary-text);
    font-size: 25px;
    line-height: 1.32;
}

.study-summary-root .study-summary-saved-article-refrigerator .study-summary-article-body > .study-summary-section:first-child > h2,
.study-summary-root .study-summary-saved-article-cooling-cycle .study-summary-article-body > .study-summary-section:first-child > h2 {
    margin-top: 0;
}

.study-summary-root .study-summary-saved-article-refrigerator .study-summary-section > h3,
.study-summary-root .study-summary-saved-article-cooling-cycle .study-summary-section > h3 {
    margin: 18px 0 0;
    border-left: 4px solid color-mix(in srgb, var(--study-summary-accent) 58%, var(--study-summary-border));
    border-radius: 8px;
    padding: 9px 12px;
    background: color-mix(in srgb, var(--study-summary-active-bg) 32%, var(--study-summary-panel));
    color: var(--study-summary-text);
    font-size: 18px;
    line-height: 1.36;
    letter-spacing: 0;
}

.study-summary-root .study-summary-saved-article-refrigerator .study-summary-block-paragraph,
.study-summary-root .study-summary-saved-article-cooling-cycle .study-summary-block-paragraph {
    margin: 0;
    color: var(--study-summary-text);
    font-size: 15px;
    line-height: 1.8;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.study-summary-root .study-summary-saved-article-refrigerator .study-summary-block-list,
.study-summary-root .study-summary-saved-article-cooling-cycle .study-summary-block-list {
    display: grid;
    gap: 8px;
    margin: 0 0 6px;
    padding: 0 0 0 20px;
    color: var(--study-summary-text);
    font-size: 14px;
    line-height: 1.74;
}

.study-summary-root .study-summary-saved-article-refrigerator .study-summary-block-list li,
.study-summary-root .study-summary-saved-article-cooling-cycle .study-summary-block-list li {
    padding-left: 2px;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.study-summary-root .study-summary-saved-article-refrigerator .study-summary-block-list li::marker,
.study-summary-root .study-summary-saved-article-cooling-cycle .study-summary-block-list li::marker {
    color: var(--study-summary-accent);
}

.study-summary-root .study-summary-saved-article-refrigerator .study-summary-list-label,
.study-summary-root .study-summary-saved-article-cooling-cycle .study-summary-list-label {
    display: inline-block;
    margin-right: 4px;
    color: var(--study-summary-active-text);
    font-weight: 900;
}

.study-summary-root .study-summary-saved-article-ncs5 {
    --study-summary-ncs5-rule: color-mix(in srgb, var(--study-summary-accent) 34%, var(--study-summary-border));
    --study-summary-ncs5-muted-bg: color-mix(in srgb, var(--study-summary-active-bg) 18%, var(--study-summary-panel));
}

.study-summary-root .study-summary-saved-article-ncs5 .study-summary-article-body {
    display: grid;
    gap: 16px;
}

.study-summary-root .study-summary-saved-article-ncs5 .study-summary-section {
    margin: 0;
}

.study-summary-root .study-summary-saved-article-ncs5 .study-summary-section > h2 {
    margin: 38px 0 6px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--study-summary-ncs5-rule);
    color: var(--study-summary-text);
    font-size: 26px;
    line-height: 1.32;
    letter-spacing: 0;
}

.study-summary-root .study-summary-saved-article-ncs5 .study-summary-article-body > .study-summary-section:first-child > h2 {
    margin-top: 0;
}

.study-summary-root .study-summary-saved-article-ncs5 .study-summary-section > h3 {
    margin: 20px 0 2px;
    border-left: 4px solid color-mix(in srgb, var(--study-summary-accent) 62%, var(--study-summary-border));
    border-radius: 8px;
    padding: 10px 13px;
    background: var(--study-summary-ncs5-muted-bg);
    color: var(--study-summary-text);
    font-size: 19px;
    line-height: 1.36;
    letter-spacing: 0;
}

.study-summary-root .study-summary-saved-article-ncs5 .study-summary-block-paragraph {
    margin: 0;
    color: var(--study-summary-text);
    font-size: 15.5px;
    line-height: 1.9;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.study-summary-root .study-summary-saved-article-ncs5 .study-summary-block-list {
    display: grid;
    gap: 9px;
    margin: 0 0 8px;
    padding: 0 0 0 22px;
    color: var(--study-summary-text);
    font-size: 14.5px;
    line-height: 1.82;
}

.study-summary-root .study-summary-saved-article-ncs5 .study-summary-block-list li {
    padding-left: 3px;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.study-summary-root .study-summary-saved-article-ncs5 .study-summary-block-list li::marker {
    color: var(--study-summary-accent);
    font-size: 1.05em;
}

.study-summary-root .study-summary-saved-article-ncs5 .study-summary-list-label {
    display: inline-block;
    margin-right: 5px;
    color: var(--study-summary-active-text);
    font-weight: 900;
}

.study-summary-root .study-summary-saved-article-ncs5 .study-summary-real-table-block {
    margin: 26px 0 30px;
    border-color: color-mix(in srgb, var(--study-summary-accent) 36%, var(--study-summary-border));
    border-radius: 14px;
    background: color-mix(in srgb, var(--study-summary-panel) 86%, var(--study-summary-active-bg));
    padding: 16px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.study-summary-root .study-summary-saved-article-ncs5 .study-summary-real-table-kicker {
    font-size: 12px;
}

.study-summary-root .study-summary-saved-article-ncs5 .study-summary-real-table-header h4 {
    font-size: 17px;
    line-height: 1.42;
}

.study-summary-root .study-summary-saved-article-ncs5 .study-summary-real-table-toggle {
    padding: 9px 13px;
    font-size: 12.5px;
}

.study-summary-root .study-summary-topic {
    padding: 0 0 26px;
    margin: 0 0 28px;
    border-bottom: 1px solid var(--border);
}

.study-summary-root .study-summary-topic:last-child {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 0;
}

.study-summary-root .study-summary-topic-title {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.35;
    letter-spacing: 0;
}

.study-summary-root .study-summary-topic-body p {
    margin: 0 0 16px;
    color: var(--text);
    font-size: 15px;
    line-height: 1.88;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.study-summary-root .study-summary-question {
    margin-top: 17px;
}

.study-summary-root .study-summary-question h4 {
    margin: 0 0 9px;
    font-size: 15px;
    line-height: 1.45;
}

.study-summary-root .study-summary-question ul {
    display: grid;
    gap: 7px;
    margin: 0;
    padding-left: 18px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.78;
}

.study-summary-root .study-summary-table {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    max-width: 100%;
}

.study-summary-root .study-summary-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.75fr) minmax(180px, 1.25fr);
    border: 1px solid var(--border);
    border-radius: 11px;
    overflow: hidden;
    background: var(--study-summary-row-bg);
}

.study-summary-root .study-summary-row > div {
    padding: 10px 12px;
    border-right: 1px solid var(--border);
    font-size: 13px;
    line-height: 1.58;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.study-summary-root .study-summary-row > div:last-child {
    border-right: 0;
}

.study-summary-root .study-summary-table.is-wide {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.study-summary-root .study-summary-table.is-wide .study-summary-row {
    width: max-content;
    min-width: 100%;
}

.study-summary-root .study-summary-table.is-wide .study-summary-row > div {
    min-width: 92px;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
}

.study-summary-root .study-summary-definition-list {
    display: grid;
    gap: 8px;
    margin: 12px 0 16px;
}

.study-summary-root .study-summary-definition-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.34fr) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    border-left: 3px solid color-mix(in srgb, var(--study-summary-accent) 34%, var(--study-summary-border));
    background: color-mix(in srgb, var(--study-summary-panel) 88%, var(--study-summary-row-bg));
    border-radius: 10px;
    padding: 9px 11px;
    color: var(--study-summary-text);
    line-height: 1.55;
}

.study-summary-root .study-summary-definition-term {
    color: var(--study-summary-text);
    font-weight: 850;
}

.study-summary-root .study-summary-definition-desc {
    color: var(--study-summary-dim);
}

.study-summary-root .study-summary-real-table-block {
    margin: 20px 0 24px;
    border: 1px solid var(--study-summary-border);
    border-radius: 16px;
    background: color-mix(in srgb, var(--study-summary-panel) 92%, var(--study-summary-row-bg));
    padding: 14px;
}

.study-summary-root .study-summary-real-table-header {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
}

.study-summary-root .study-summary-real-table-kicker {
    margin-bottom: 4px;
    color: var(--study-summary-accent);
    font-size: 11px;
    font-weight: 900;
}

.study-summary-root .study-summary-real-table-header h4 {
    margin: 0;
    color: var(--study-summary-text);
    font-size: 16px;
    line-height: 1.45;
    letter-spacing: 0;
}

.study-summary-root .study-summary-real-table-toggle {
    flex: 0 0 auto;
    border: 1px solid color-mix(in srgb, var(--study-summary-accent) 48%, var(--study-summary-border));
    border-radius: 999px;
    background: var(--study-summary-active-bg);
    color: var(--study-summary-active-text);
    padding: 8px 11px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.study-summary-root .study-summary-real-table-toggle:hover {
    border-color: var(--study-summary-accent);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
    transform: translateY(-1px);
}

.study-summary-root .study-summary-real-table-toggle:active {
    transform: translateY(0) scale(0.98);
    box-shadow: none;
}

.study-summary-root .study-summary-real-table-toggle:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--study-summary-accent) 28%, transparent);
    outline-offset: 2px;
}

.study-summary-root .study-summary-real-table-scroll {
    margin-top: 14px;
    overflow-x: auto;
    border: 1px solid var(--study-summary-border);
    border-radius: 12px;
    background: var(--study-summary-panel);
}

.study-summary-root .study-summary-real-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    color: var(--study-summary-text);
    font-size: 13px;
    line-height: 1.5;
}

.study-summary-root .study-summary-real-table th,
.study-summary-root .study-summary-real-table td {
    border: 1px solid var(--study-summary-border);
    padding: 10px 11px;
    text-align: center;
    vertical-align: middle;
    word-break: keep-all;
}

.study-summary-root .study-summary-real-table thead th {
    background: color-mix(in srgb, var(--study-summary-active-bg) 70%, var(--study-summary-panel));
    color: var(--study-summary-active-text);
    font-weight: 900;
}

.study-summary-root .study-summary-real-table tbody th {
    background: color-mix(in srgb, var(--study-summary-row-bg) 82%, var(--study-summary-panel));
    font-weight: 850;
}

.study-summary-root .study-summary-real-table tbody th.study-summary-real-table-group-cell {
    background: color-mix(in srgb, var(--study-summary-active-bg) 48%, var(--study-summary-row-bg));
    color: var(--study-summary-active-text);
    font-weight: 900;
}

.study-summary-root .study-summary-real-table tbody td {
    background: var(--study-summary-panel);
}

.study-summary-root .study-summary-real-table-notes {
    margin-top: 10px;
    color: var(--study-summary-dim);
    font-size: 12px;
    line-height: 1.5;
}

.study-summary-root .study-summary-real-table-notes p {
    margin: 0;
}

.study-summary-root.study-summary-theme-soft-dark .study-summary-real-table thead th {
    background: rgba(96,165,250,0.22);
    color: #eff6ff;
}

@media (max-width: 520px) {
    .study-summary-root .study-summary-real-table-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .study-summary-root .study-summary-real-table-toggle {
        width: 100%;
    }
}

.study-summary-root .study-summary-related {
    margin-top: 14px;
    align-items: center;
}

.study-summary-root .study-summary-related span {
    color: var(--dim);
    font-size: 12px;
    font-weight: 800;
}

.study-summary-root .study-summary-related button {
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: var(--study-summary-chip-bg);
    color: var(--study-summary-chip-text);
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 700;
    max-width: 100%;
    white-space: normal;
}

.study-summary-root .study-summary-media {
    width: min(100%, var(--study-summary-image-width, 100%));
    margin: 16px auto 20px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    padding: 0;
    overflow: visible;
}

.study-summary-root .study-summary-media-image {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: min(360px, 70vh);
    height: auto;
    object-fit: contain;
    margin: 0 auto;
    border-radius: 12px;
    background: var(--study-summary-panel);
}

.study-summary-root .study-summary-media-image[data-study-summary-zoomable="true"] {
    cursor: zoom-in;
}

.study-summary-root .study-summary-media-image[data-study-summary-zoomable="true"]:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--study-summary-accent) 34%, transparent);
    outline-offset: 4px;
}

.study-summary-root .study-summary-media-caption {
    display: block;
    margin-top: 8px;
    color: var(--study-summary-dim);
    font-size: 14px;
    line-height: 1.6;
    font-weight: 500;
    text-align: center;
}

.study-summary-root .study-summary-media[data-study-summary-caption-deduped="true"] {
    margin-bottom: 18px;
}

body.study-summary-image-zoom-open {
    overflow: hidden;
}

.study-summary-image-zoom-overlay {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: grid;
    grid-template-rows: 1fr;
    background: rgba(15, 23, 42, 0.86);
    color: #f8fafc;
}

.study-summary-image-zoom-scroll {
    min-width: 0;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 82px 24px 32px;
    touch-action: pan-x pan-y;
}

.study-summary-image-zoom-figure {
    width: max-content;
    max-width: none;
    margin: 0 auto;
}

.study-summary-image-zoom-img {
    display: block;
    width: min(100%, 960px);
    max-width: none;
    max-height: none;
    height: auto;
    margin: 0 auto;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.study-summary-image-zoom-figure figcaption {
    max-width: min(92vw, 960px);
    margin: 14px auto 0;
    color: rgba(248, 250, 252, 0.88);
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

.study-summary-image-zoom-toolbar {
    position: fixed;
    top: 16px;
    left: 50%;
    z-index: 2501;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    padding: 6px;
    transform: translateX(-50%);
    backdrop-filter: blur(10px);
}

.study-summary-image-zoom-toolbar button {
    min-width: 38px;
    min-height: 34px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    color: #fff;
    padding: 6px 10px;
    font: inherit;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.study-summary-image-zoom-toolbar button:disabled {
    cursor: default;
    opacity: 0.42;
}

.study-summary-image-zoom-toolbar button:not(:disabled):hover,
.study-summary-image-zoom-toolbar button:not(:disabled):focus-visible {
    background: rgba(255, 255, 255, 0.24);
    outline: none;
}

.study-summary-image-zoom-toolbar span {
    min-width: 46px;
    color: rgba(248, 250, 252, 0.9);
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.study-summary-image-zoom-close {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 2501;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.study-summary-image-zoom-close:hover,
.study-summary-image-zoom-close:focus-visible {
    border-color: rgba(255, 255, 255, 0.74);
    background: rgba(30, 41, 59, 0.95);
    outline: none;
}

@media (max-width: 640px) {
    .study-summary-image-zoom-scroll {
        padding: 72px 10px 22px;
    }

    .study-summary-image-zoom-toolbar {
        top: 10px;
        left: 10px;
        max-width: calc(100vw - 70px);
        transform: none;
    }

    .study-summary-image-zoom-toolbar button {
        min-width: 34px;
        min-height: 32px;
        padding: 5px 8px;
        font-size: 13px;
    }

    .study-summary-image-zoom-toolbar span {
        min-width: 40px;
        font-size: 11px;
    }

    .study-summary-image-zoom-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
}

.study-summary-root .study-summary-media-source {
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
}

.study-summary-root .study-summary-media-placeholder {
    display: none;
}

.study-summary-root .study-summary-media-manager {
    display: grid;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    background: var(--study-summary-row-bg);
}

.study-summary-root .study-summary-media-manager-title {
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.study-summary-root .study-summary-media-manager label {
    display: grid;
    gap: 5px;
    color: var(--dim);
    font-size: 11px;
    font-weight: 800;
}

.study-summary-root .study-summary-media-manager input,
.study-summary-root .study-summary-media-manager select {
    width: 100%;
    min-height: 34px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--card);
    color: var(--text);
    font-size: 12px;
    box-sizing: border-box;
}

.study-summary-root .study-summary-media-manager input {
    padding: 0 9px;
}

.study-summary-root .study-summary-media-paste-zone {
    display: grid;
    gap: 8px;
    min-height: 72px;
    border: 1px dashed rgba(37,99,235,0.42);
    border-radius: 12px;
    padding: 10px;
    color: var(--dim);
    background: var(--card);
    font-size: 12px;
    line-height: 1.5;
    cursor: text;
}

.study-summary-root .study-summary-media-paste-zone:focus {
    outline: 2px solid rgba(37,99,235,0.22);
    outline-offset: 2px;
}

.study-summary-root .study-summary-media-preview img {
    display: block;
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    border-radius: 10px;
}

.study-summary-root .study-summary-media-manager-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.study-summary-root .study-summary-media-manager-actions button {
    border: 1px solid rgba(37,99,235,0.36);
    border-radius: 999px;
    padding: 7px 10px;
    background: var(--study-summary-active-bg);
    color: var(--study-summary-active-text);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.study-summary-root .study-summary-media-manager-actions button:hover {
    border-color: var(--accent);
}

.study-summary-root .study-summary-media-message {
    min-height: 16px;
    color: var(--dim);
    font-size: 11px;
    line-height: 1.45;
}

.study-summary-root .study-summary-media-message[data-tone="success"] {
    color: #16a34a;
}

.study-summary-root .study-summary-media-message[data-tone="warning"] {
    color: #d97706;
}

.study-summary-root .study-summary-media-message[data-tone="error"] {
    color: #dc2626;
}

.study-summary-root .study-summary-inline-mode-button {
    border: 1px solid var(--study-summary-border);
    background: var(--study-summary-panel);
    color: var(--study-summary-text);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.study-summary-root .study-summary-inline-mode-button.is-active {
    background: var(--study-summary-accent);
    border-color: var(--study-summary-accent);
    color: #fff;
}

.study-summary-root .study-summary-insert-slot {
    display: none;
    margin: 12px 0 18px;
}

.study-summary-root .study-summary-inline-mode-button.is-active,
.study-summary-root .study-summary-insert-slot.is-selected {
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.16);
}

.study-summary-root .study-summary-insert-slot button {
    border: 1px dashed var(--study-summary-border);
    background: color-mix(in srgb, var(--study-summary-accent) 7%, var(--study-summary-panel));
    color: var(--study-summary-accent);
    border-radius: 10px;
    padding: 8px 11px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.study-summary-root .study-summary-insert-slot.is-selected {
    display: block;
}

.study-summary-root .study-summary-root-insert-mode .study-summary-insert-slot,
.study-summary-root .study-summary-insert-slot {
    display: block;
}

.study-summary-root .study-summary-inline-editor {
    margin-top: 10px;
    border: 1px solid var(--study-summary-border);
    background: color-mix(in srgb, var(--study-summary-panel) 94%, var(--study-summary-accent));
    border-radius: 14px;
    padding: 14px;
}

.study-summary-root .study-summary-inline-editor-help {
    border: 1px dashed var(--study-summary-border);
    background: var(--study-summary-bg);
    color: var(--study-summary-dim);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    font-size: 13px;
    outline: none;
}

.study-summary-root .study-summary-inline-editor-help:focus {
    border-color: var(--study-summary-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--study-summary-accent) 20%, transparent);
}

.study-summary-root .study-summary-inline-preview img {
    display: block;
    max-width: 100%;
    max-height: 360px;
    object-fit: contain;
    margin: 12px auto 0;
    border-radius: 12px;
    border: 1px solid var(--study-summary-border);
    background: #fff;
}

.study-summary-root .study-summary-inline-editor label {
    display: grid;
    gap: 6px;
    margin-top: 10px;
    color: var(--study-summary-dim);
    font-size: 12px;
    font-weight: 700;
}

.study-summary-root .study-summary-inline-editor input {
    width: 100%;
    border: 1px solid var(--study-summary-border);
    background: var(--study-summary-panel);
    color: var(--study-summary-text);
    border-radius: 10px;
    padding: 9px 10px;
    font-size: 13px;
}

.study-summary-root .study-summary-inline-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.study-summary-root .study-summary-inline-actions button {
    border: 1px solid var(--study-summary-border);
    background: var(--study-summary-panel);
    color: var(--study-summary-text);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.study-summary-root .study-summary-inline-actions button:first-child {
    background: var(--study-summary-accent);
    border-color: var(--study-summary-accent);
    color: #fff;
}

.study-summary-root .study-summary-inline-message {
    min-height: 18px;
    margin-top: 10px;
    color: var(--study-summary-dim);
    font-size: 12px;
}

.study-summary-root .study-summary-inline-message[data-tone="success"] {
    color: #16a34a;
}

.study-summary-root .study-summary-inline-message[data-tone="warning"] {
    color: #d97706;
}

.study-summary-root .study-summary-inline-message[data-tone="error"] {
    color: #dc2626;
}

.study-summary-root .study-summary-editor {
    display: block;
}

.study-summary-root .study-summary-editor-head {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: space-between;
    border-bottom: 1px solid var(--study-summary-border);
    background: color-mix(in srgb, var(--study-summary-panel) 96%, transparent);
    padding-bottom: 24px;
    z-index: 18;
}

.study-summary-root .study-summary-editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    justify-content: flex-end;
    max-width: 560px;
}

.study-summary-root .study-summary-document-toolbar {
    display: flex;
    flex: 1 1 420px;
    align-items: center;
    justify-content: flex-end;
    max-width: 720px;
}

.study-summary-root .study-summary-document-toolbar-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    border: 1px solid color-mix(in srgb, var(--study-summary-border) 72%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--study-summary-panel) 88%, transparent);
    padding: 6px;
}

.study-summary-root .study-summary-document-toolbar-status {
    color: var(--study-summary-dim);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.study-summary-root .study-summary-document-heading-select {
    min-height: 28px;
    border: 1px solid var(--study-summary-border);
    border-radius: 999px;
    background: var(--study-summary-panel);
    color: var(--study-summary-text);
    padding: 0 9px;
    font-size: 12px;
    font-weight: 750;
    outline: none;
}

.study-summary-root .study-summary-editor-actions button {
    border: 1px solid var(--study-summary-border);
    background: var(--study-summary-panel);
    color: var(--study-summary-text);
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
    cursor: pointer;
}

.study-summary-root .study-summary-editor-actions button:first-child {
    background: var(--study-summary-accent);
    border-color: var(--study-summary-accent);
    color: #fff;
}

.study-summary-root .study-summary-editor-actions button.study-summary-save-button {
    background: var(--study-summary-accent);
    border-color: var(--study-summary-accent);
    color: #fff;
}

.study-summary-root.study-summary-theme-soft-dark .study-summary-editor-actions button.study-summary-save-button {
    background: #60a5fa;
    border-color: #93c5fd;
    color: #0f172a;
}

.study-summary-root .study-summary-editor-actions button.study-summary-cancel-button {
    background: var(--study-summary-panel);
    border-color: var(--study-summary-border);
    color: var(--study-summary-dim);
}

.study-summary-root .study-summary-editor-actions button.study-summary-preview-toggle.is-active,
.study-summary-root .study-summary-editor-actions button.study-summary-preview-toggle[aria-pressed="true"] {
    border-color: var(--study-summary-accent);
    background: var(--study-summary-accent);
    color: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--study-summary-accent) 20%, transparent);
}

.study-summary-root .study-summary-preview-notice {
    margin: 12px 0 0;
    border: 1px solid color-mix(in srgb, var(--study-summary-accent) 42%, var(--study-summary-border));
    border-radius: 12px;
    background: color-mix(in srgb, var(--study-summary-active-bg) 68%, var(--study-summary-panel));
    color: var(--study-summary-active-text);
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.5;
}

.study-summary-root .study-summary-editor-preview-body {
    cursor: default;
}

@media (min-width: 981px) {
    .study-summary-root .study-summary-editor-head {
        position: sticky;
        top: 10px;
        margin: -12px -12px 0;
        border-radius: 16px;
        padding: 12px 12px 18px;
        box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
        backdrop-filter: blur(14px);
    }
}

.study-summary-root .study-summary-editor-actions button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.study-summary-root .study-summary-editor-message {
    margin: 14px 0 0;
    border: 1px solid var(--study-summary-border);
    border-radius: 12px;
    padding: 10px 12px;
    background: var(--study-summary-row-bg);
    color: var(--study-summary-dim);
    font-size: 13px;
}

.study-summary-root .study-summary-editor-message[data-tone="success"] {
    color: #16a34a;
}

.study-summary-root .study-summary-editor-message[data-tone="warning"] {
    color: #d97706;
}

.study-summary-root .study-summary-editor-message[data-tone="error"] {
    color: #dc2626;
}

.study-summary-root .study-summary-editor-document {
    margin-top: 0;
    position: relative;
}

.study-summary-root .study-summary-editor-message + .study-summary-editor-document {
    margin-top: 14px;
}

.study-summary-root .study-summary-editing-block {
    position: relative;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    min-width: 0;
}

.study-summary-root .study-summary-editing-block:last-child {
    border-bottom: 0;
}

.study-summary-root .study-summary-editing-block:focus {
    outline: none;
}

.study-summary-root .study-summary-editing-block:focus-within {
    outline: none;
}

.study-summary-root .study-summary-editing-block.study-summary-new-paragraph {
    outline: none;
    background: transparent;
}

.study-summary-root .study-summary-editing-block.is-selected {
    outline: none;
}

.study-summary-root .study-summary-editing-block.is-selected::before,
.study-summary-root .study-summary-editing-block.study-summary-new-paragraph::before {
    content: "";
    position: absolute;
    top: 0.35em;
    bottom: 0.35em;
    left: -14px;
    width: 2px;
    min-height: 14px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--study-summary-accent) 46%, transparent);
    pointer-events: none;
}

.study-summary-root .study-summary-editing-block.study-summary-new-paragraph::before {
    background: color-mix(in srgb, var(--study-summary-accent) 32%, transparent);
}

.study-summary-root .study-summary-editor-actions button:hover {
    border-color: var(--study-summary-accent);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

.study-summary-root .study-summary-editor-actions button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: none;
}

.study-summary-root .study-summary-editor-actions button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--study-summary-accent) 25%, transparent);
    outline-offset: 2px;
}

.study-summary-root .study-summary-editable {
    outline: none;
    min-height: 1.35em;
}

.study-summary-root .study-summary-empty-placeholder:empty::before {
    content: attr(data-placeholder);
    color: var(--study-summary-dim);
    opacity: 0;
    font-weight: 400;
    pointer-events: none;
    transition: opacity 0.12s ease;
}

.study-summary-root .study-summary-editing-block:hover .study-summary-empty-placeholder:empty::before,
.study-summary-root .study-summary-editing-block:focus-within .study-summary-empty-placeholder:empty::before,
.study-summary-root .study-summary-editing-block.is-selected .study-summary-empty-placeholder:empty::before,
.study-summary-root .study-summary-editing-block.study-summary-new-paragraph .study-summary-empty-placeholder:empty::before {
    opacity: 0.28;
}

.study-summary-root .study-summary-editable:focus,
.study-summary-root .study-summary-editable-list li:focus,
.study-summary-root .study-summary-editable-table [contenteditable]:focus {
    background: transparent;
    box-shadow: none;
}

.study-summary-root .study-summary-editable-heading {
    min-height: 1.2em;
}

.study-summary-root .study-summary-editable-paragraph {
    min-height: 1.7em;
}

.study-summary-root .study-summary-editable-table-note {
    margin-top: 6px;
    color: var(--study-summary-dim);
    font-size: 13px;
    line-height: 1.6;
}

.study-summary-root .study-summary-editable-list {
    min-height: 1.7em;
}

.study-summary-root .study-summary-editable-list li {
    outline: none;
}

.study-summary-root .study-summary-editable-table {
    position: relative;
}

.study-summary-root .study-summary-table-editor {
    display: grid;
    gap: 7px;
    margin: 12px 0 18px;
}

.study-summary-root .study-summary-table-editor .study-summary-table,
.study-summary-root .study-summary-table-editor .study-summary-definition-list {
    margin: 0;
}

.study-summary-root .study-summary-table-editor .study-summary-table.is-grid {
    overflow-x: auto;
    gap: 0;
    padding-bottom: 0;
    border: 1px solid var(--study-summary-border);
    border-radius: 10px;
    background: var(--study-summary-panel);
}

.study-summary-root .study-summary-table-editor-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    border: 1px solid var(--study-summary-border);
    border-radius: 8px;
    background: color-mix(in srgb, var(--study-summary-panel) 92%, var(--study-summary-row-bg));
    padding: 5px 6px;
    color: var(--study-summary-dim);
    font-size: 12px;
    line-height: 1.4;
}

.study-summary-root .study-summary-table-editor-controls strong {
    color: var(--study-summary-text);
    font-size: 13px;
}

.study-summary-root .study-summary-table-editor-limit {
    border: 1px solid var(--study-summary-border);
    border-radius: 999px;
    padding: 4px 8px;
    background: var(--study-summary-row-bg);
}

.study-summary-root .study-summary-table-editor-limit.is-limit {
    border-color: color-mix(in srgb, var(--study-summary-accent) 44%, var(--study-summary-border));
    background: color-mix(in srgb, var(--study-summary-active-bg) 42%, var(--study-summary-panel));
    color: var(--study-summary-active-text);
}

.study-summary-root .study-summary-table-editor-controls button,
.study-summary-root .study-summary-table-row-delete-button {
    border: 1px solid var(--study-summary-border);
    border-radius: 8px;
    background: var(--study-summary-panel);
    color: var(--study-summary-text);
    cursor: pointer;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
}

.study-summary-root .study-summary-table-editor-controls button {
    padding: 4px 8px;
}

.study-summary-root .study-summary-table-row-delete-button {
    align-self: start;
    padding: 7px 9px;
}

.study-summary-root .study-summary-table-editor-controls button:hover,
.study-summary-root .study-summary-table-row-delete-button:hover {
    border-color: var(--study-summary-accent);
}

.study-summary-root .study-summary-table-editor-controls button:focus-visible,
.study-summary-root .study-summary-table-row-delete-button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--study-summary-accent) 25%, transparent);
    outline-offset: 2px;
}

.study-summary-root .study-summary-table-editor-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
}

.study-summary-root .study-summary-table-editor .study-summary-table.is-grid .study-summary-table-editor-row {
    grid-template-columns: minmax(max-content, 1fr) auto;
    gap: 0;
    min-width: max-content;
    border-bottom: 1px solid color-mix(in srgb, var(--study-summary-border) 88%, var(--study-summary-text));
}

.study-summary-root .study-summary-table-editor .study-summary-table.is-grid .study-summary-table-editor-row:last-child {
    border-bottom: 0;
}

.study-summary-root .study-summary-table-editor .study-summary-table.is-grid .study-summary-row {
    min-width: max-content;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.study-summary-root .study-summary-table-editor .study-summary-table.is-grid [data-study-summary-table-cell] {
    min-width: 112px;
    border-right: 1px solid color-mix(in srgb, var(--study-summary-border) 88%, var(--study-summary-text));
    background: var(--study-summary-panel);
    padding: 10px 11px;
    color: var(--study-summary-text);
    line-height: 1.5;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.study-summary-root .study-summary-table-editor .study-summary-table.is-grid [data-study-summary-table-cell]:focus {
    background: color-mix(in srgb, var(--study-summary-panel) 88%, var(--study-summary-active-bg));
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--study-summary-accent) 32%, transparent);
}

.study-summary-root .study-summary-table-editor .study-summary-table.is-grid .study-summary-table-row-delete-button {
    align-self: stretch;
    border-width: 0 0 0 1px;
    border-color: color-mix(in srgb, var(--study-summary-border) 88%, var(--study-summary-text));
    border-radius: 0;
    background: color-mix(in srgb, var(--study-summary-panel) 88%, var(--study-summary-row-bg));
    padding: 0 10px;
}

.study-summary-root .study-summary-table-editor .study-summary-definition-list {
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--study-summary-border);
    border-radius: 10px;
    background: var(--study-summary-panel);
}

.study-summary-root .study-summary-table-editor .study-summary-definition-list .study-summary-table-editor-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--study-summary-border) 88%, var(--study-summary-text));
}

.study-summary-root .study-summary-table-editor .study-summary-definition-list .study-summary-table-editor-row:last-child {
    border-bottom: 0;
}

.study-summary-root .study-summary-table-editor .study-summary-definition-row {
    gap: 0;
    border-left: 0;
    border-radius: 0;
    background: var(--study-summary-panel);
    padding: 0;
}

.study-summary-root .study-summary-table-editor .study-summary-definition-row [data-study-summary-table-cell] {
    min-height: 26px;
    border-right: 1px solid color-mix(in srgb, var(--study-summary-border) 88%, var(--study-summary-text));
    padding: 10px 11px;
    color: var(--study-summary-text);
    line-height: 1.5;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.study-summary-root .study-summary-table-editor .study-summary-definition-row [data-study-summary-table-cell]:focus {
    background: color-mix(in srgb, var(--study-summary-panel) 88%, var(--study-summary-active-bg));
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--study-summary-accent) 32%, transparent);
}

.study-summary-root .study-summary-table-editor .study-summary-definition-list .study-summary-table-row-delete-button {
    align-self: stretch;
    border-width: 0 0 0 1px;
    border-color: color-mix(in srgb, var(--study-summary-border) 88%, var(--study-summary-text));
    border-radius: 0;
    background: color-mix(in srgb, var(--study-summary-panel) 88%, var(--study-summary-row-bg));
    padding: 0 10px;
}

.study-summary-root .study-summary-editable-table [contenteditable] {
    outline: none;
    min-height: 24px;
    padding: 1px 3px;
}

.study-summary-root .study-summary-editable-table [data-study-summary-table-cell] {
    padding: 10px 11px;
}

.study-summary-root .study-summary-editor-error-block {
    border-color: color-mix(in srgb, var(--red) 72%, var(--study-summary-border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 18%, transparent);
}

.study-summary-root .study-summary-editor-error-row {
    background: color-mix(in srgb, var(--red) 10%, transparent);
}

.study-summary-root .study-summary-editor-error-cell {
    background: color-mix(in srgb, var(--red) 18%, transparent);
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--red) 64%, transparent);
}

.study-summary-root .study-summary-editor-image-drop {
    display: grid;
    gap: 7px;
    position: relative;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
    color: var(--study-summary-dim);
    padding: 2px 0 4px;
    text-align: center;
    font-size: 13px;
}

.study-summary-root .study-summary-editor-image-drop:focus {
    outline: none;
}

.study-summary-root .study-summary-inline-preview {
    min-height: 96px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px dashed var(--study-summary-border);
    background: color-mix(in srgb, var(--study-summary-panel) 72%, var(--study-summary-row-bg));
}

.study-summary-root .study-summary-image-inline-meta {
    display: grid;
    gap: 4px;
    margin-top: 2px;
    text-align: center;
}

.study-summary-root .study-summary-image-inline-meta label {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    color: var(--study-summary-dim);
    font-size: 13px;
    line-height: 1.5;
}

.study-summary-root .study-summary-image-inline-meta label span {
    font-weight: 850;
}

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

.study-summary-root .study-summary-image-inline-meta input {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--study-summary-border);
    border-radius: 0;
    background: transparent;
    color: var(--study-summary-dim);
    padding: 5px 2px;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
    box-sizing: border-box;
}

.study-summary-root .study-summary-image-inline-meta input:focus {
    border-bottom-color: var(--study-summary-accent);
    outline: none;
}

.study-summary-root .study-summary-editor-image-frame {
    position: relative;
    border-radius: 12px;
    outline: 1px solid transparent;
    outline-offset: 3px;
    transition: outline-color 0.14s ease, box-shadow 0.14s ease;
}

.study-summary-root .study-summary-editing-image.is-selected .study-summary-editor-image-frame,
.study-summary-root .study-summary-editor-image-drop:focus-within .study-summary-editor-image-frame,
.study-summary-root .study-summary-editor-image-drop:hover .study-summary-editor-image-frame,
.study-summary-root .study-summary-editor-image-drop.is-resizing .study-summary-editor-image-frame {
    outline-color: color-mix(in srgb, var(--study-summary-accent) 28%, transparent);
}

.study-summary-root .study-summary-image-size-control {
    display: none;
}

.study-summary-root .study-summary-image-resize-handle {
    position: absolute;
    right: 5px;
    bottom: 5px;
    z-index: 3;
    width: 22px;
    height: 22px;
    border: 1px solid color-mix(in srgb, var(--study-summary-border) 76%, transparent);
    border-radius: 7px;
    background:
        linear-gradient(135deg, transparent 52%, color-mix(in srgb, var(--study-summary-dim) 62%, var(--study-summary-border)) 53% 58%, transparent 59%),
        linear-gradient(135deg, transparent 66%, color-mix(in srgb, var(--study-summary-dim) 62%, var(--study-summary-border)) 67% 72%, transparent 73%),
        color-mix(in srgb, var(--study-summary-panel) 88%, transparent);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
    cursor: nwse-resize;
    opacity: 0;
    pointer-events: none;
    touch-action: none;
    transition: opacity 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.study-summary-root .study-summary-editor-image-drop:hover .study-summary-image-resize-handle,
.study-summary-root .study-summary-editor-image-drop:focus-within .study-summary-image-resize-handle,
.study-summary-root .study-summary-editing-image.is-selected .study-summary-image-resize-handle,
.study-summary-root .study-summary-editor-image-drop.is-resizing .study-summary-image-resize-handle {
    opacity: 0.82;
    pointer-events: auto;
}

.study-summary-root .study-summary-image-resize-handle:hover {
    border-color: color-mix(in srgb, var(--study-summary-accent) 42%, var(--study-summary-border));
    opacity: 1;
}

.study-summary-root .study-summary-image-resize-handle:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--study-summary-accent) 28%, transparent);
    outline-offset: 2px;
    opacity: 1;
}

.study-summary-root .study-summary-editor-preview-mode .study-summary-image-resize-handle {
    display: none;
}

body.study-summary-image-resizing,
body.study-summary-image-resizing * {
    user-select: none;
    cursor: nwse-resize !important;
}

.study-summary-root .study-summary-image-delete-button {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid color-mix(in srgb, var(--study-summary-border) 70%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--study-summary-panel) 92%, transparent);
    color: var(--study-summary-text);
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
    transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.study-summary-root .study-summary-image-delete-button:hover {
    border-color: #ef4444;
    background: #fee2e2;
    color: #991b1b;
    transform: translateY(-1px);
}

.study-summary-root .study-summary-image-delete-button:active {
    transform: scale(0.96);
}

.study-summary-root .study-summary-image-delete-button:focus-visible {
    outline: 3px solid color-mix(in srgb, #ef4444 28%, transparent);
    outline-offset: 2px;
}

.study-summary-root .study-summary-editor-image-drop img,
.study-summary-root .study-summary-editor-image-drop .study-summary-media-image {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: min(320px, 65vh);
    height: auto;
    object-fit: contain;
    margin: 0 auto;
    border-radius: 12px;
    border: 0;
    background: var(--study-summary-panel);
}

.study-summary-root .study-summary-doc-pilot-button {
    border-style: dashed;
}

.study-summary-root .study-summary-doc-pilot-panel {
    margin: 28px 0 0;
    padding: 22px;
    border: 1px solid rgba(91, 111, 132, 0.28);
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.96);
    color: #253241;
    scroll-margin-top: 18px;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.study-summary-root .study-summary-doc-pilot-panel.is-opened {
    border-color: rgba(39, 117, 182, 0.55);
    box-shadow: 0 0 0 4px rgba(39, 117, 182, 0.12), 0 10px 28px rgba(27, 39, 51, 0.08);
}

.study-summary-root .study-summary-doc-pilot-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.study-summary-root .study-summary-doc-pilot-head h2 {
    margin: 2px 0 4px;
    font-size: 22px;
    line-height: 1.35;
}

.study-summary-root .study-summary-doc-pilot-head p,
.study-summary-root .study-summary-doc-pilot-note {
    margin: 0;
    color: #5f6f82;
    font-size: 14px;
    line-height: 1.6;
}

.study-summary-root .study-summary-doc-pilot-kicker {
    display: block;
    color: #6a7584;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
}

.study-summary-root .study-summary-doc-pilot-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.study-summary-root .study-summary-doc-pilot-actions button,
.study-summary-root .study-summary-doc-pilot-head > button {
    padding: 7px 10px;
    border: 1px solid #b9c4d1;
    border-radius: 6px;
    background: #fff;
    color: #253241;
    font-size: 13px;
    cursor: pointer;
}

.study-summary-root .study-summary-doc-pilot-actions button:hover,
.study-summary-root .study-summary-doc-pilot-head > button:hover {
    border-color: #718096;
    background: #f3f6f9;
}

.study-summary-root .study-summary-doc-pilot-error {
    margin: 0;
    color: #a23b3b;
    font-size: 14px;
    line-height: 1.6;
}

.study-summary-root .study-summary-doc-pilot-check {
    margin: 0 0 16px;
    padding: 14px;
    border: 1px solid #d5dde7;
    border-radius: 8px;
    background: #fff;
}

.study-summary-root .study-summary-doc-pilot-check.is-save-ready {
    border-color: #86c5a2;
    background: #f4fbf7;
}

.study-summary-root .study-summary-doc-pilot-check.is-needs-review {
    border-color: #f4c36b;
    background: #fffaf0;
}

.study-summary-root .study-summary-doc-pilot-check.is-blocked {
    border-color: #e59b9b;
    background: #fff5f5;
}

.study-summary-root .study-summary-doc-pilot-check-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 8px;
}

.study-summary-root .study-summary-doc-pilot-check-head strong {
    color: #1f2937;
    font-size: 15px;
    font-weight: 800;
}

.study-summary-root .study-summary-doc-pilot-check-head span {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef2f7;
    color: #1f2937;
    font-size: 13px;
    font-weight: 800;
}

.study-summary-root .study-summary-doc-pilot-check.is-save-ready .study-summary-doc-pilot-check-head span {
    background: #dff4e7;
    color: #166534;
}

.study-summary-root .study-summary-doc-pilot-check.is-needs-review .study-summary-doc-pilot-check-head span {
    background: #ffedc2;
    color: #92400e;
}

.study-summary-root .study-summary-doc-pilot-check.is-blocked .study-summary-doc-pilot-check-head span {
    background: #fde2e2;
    color: #991b1b;
}

.study-summary-root .study-summary-doc-pilot-check > p {
    margin: 0 0 12px;
    color: #344054;
    font-size: 14px;
    line-height: 1.55;
}

.study-summary-root .study-summary-doc-pilot-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 16px;
}

.study-summary-root .study-summary-doc-pilot-summary div {
    min-width: 0;
    padding: 10px;
    border: 1px solid #d5dde7;
    border-radius: 6px;
    background: #fff;
}

.study-summary-root .study-summary-doc-pilot-summary strong,
.study-summary-root .study-summary-doc-pilot-summary span {
    display: block;
}

.study-summary-root .study-summary-doc-pilot-summary strong {
    color: #667085;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.study-summary-root .study-summary-doc-pilot-summary span {
    margin-top: 5px;
    color: #1f2937;
    font-size: 14px;
    font-weight: 700;
}

.study-summary-root .study-summary-doc-pilot-check-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.study-summary-root .study-summary-doc-pilot-check-grid > div {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #e1e7ee;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.78);
}

.study-summary-root .study-summary-doc-pilot-check-grid h3 {
    margin: 0 0 8px;
    color: #1f2937;
    font-size: 13px;
    font-weight: 800;
}

.study-summary-root .study-summary-doc-pilot-check-grid ul {
    margin: 0;
    padding-left: 18px;
    color: #344054;
    font-size: 13px;
    line-height: 1.55;
}

.study-summary-root .study-summary-doc-pilot-check-grid li + li {
    margin-top: 4px;
}

.study-summary-root .study-summary-doc-pilot-report {
    margin: 0 0 18px;
    border: 1px solid #d5dde7;
    border-radius: 6px;
    background: #fff;
}

.study-summary-root .study-summary-doc-pilot-report summary {
    padding: 10px 12px;
    color: #344054;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

.study-summary-root .study-summary-doc-pilot-report pre {
    max-height: 300px;
    margin: 0;
    padding: 12px;
    overflow: auto;
    border-top: 1px solid #e1e7ee;
    color: #263445;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.study-summary-root .study-summary-doc-pilot-notice {
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 13px;
    line-height: 1.45;
}

.study-summary-root .study-summary-doc-pilot-document,
.study-summary-root .study-summary-doc-pilot-probe {
    padding: 22px;
    border: 1px solid #d5dde7;
    border-radius: 8px;
    background: #fff;
}

.study-summary-root .study-summary-doc-pilot-text-surface {
    cursor: text;
    caret-color: #111827;
    outline: none;
}

.study-summary-root .study-summary-doc-pilot-document,
.study-summary-root .study-summary-doc-pilot-document * {
    user-select: text;
    -webkit-user-select: text;
}

.study-summary-root .study-summary-doc-pilot-text-surface ::selection {
    background: rgba(96, 165, 250, 0.32);
}

.study-summary-root .study-summary-doc-pilot-text-surface:focus {
    outline: none;
}

.study-summary-root .study-summary-doc-pilot-probe {
    margin-top: 14px;
}

.study-summary-root .study-summary-doc-pilot-probe h3 {
    margin: 0 0 12px;
    color: #344054;
    font-size: 15px;
    line-height: 1.35;
}

.study-summary-root .study-summary-doc-pilot-document h2,
.study-summary-root .study-summary-doc-pilot-document h3,
.study-summary-root .study-summary-doc-pilot-document h4,
.study-summary-root .study-summary-doc-pilot-probe h2,
.study-summary-root .study-summary-doc-pilot-probe h3,
.study-summary-root .study-summary-doc-pilot-probe h4 {
    display: inline;
    margin: 0;
    color: #111827;
    line-height: 1.35;
}

.study-summary-root .study-summary-doc-pilot-document .study-summary-doc-pilot-section {
    margin: 1.25em 0 0.55em;
}

.study-summary-root .study-summary-doc-pilot-document .study-summary-doc-pilot-section:first-child {
    margin-top: 0;
}

.study-summary-root .study-summary-doc-pilot-document .study-summary-doc-pilot-section:first-child h2,
.study-summary-root .study-summary-doc-pilot-document .study-summary-doc-pilot-section:first-child h3,
.study-summary-root .study-summary-doc-pilot-document .study-summary-doc-pilot-section:first-child h4 {
    margin-top: 0;
}

.study-summary-root .study-summary-doc-pilot-paragraph {
    margin: 0.78em 0;
    color: #253241;
    line-height: 1.78;
}

.study-summary-root .study-summary-doc-pilot-editable {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    caret-color: #111827;
    outline: 0;
    white-space: pre-wrap;
}

.study-summary-root .study-summary-doc-pilot-editable:hover,
.study-summary-root .study-summary-doc-pilot-editable:focus {
    background: transparent;
    box-shadow: none;
}

.study-summary-root .study-summary-doc-pilot-editable:focus-visible {
    outline: none;
}

.study-summary-root .study-summary-doc-pilot-soft-break-caret {
    display: inline-block;
    min-width: 0;
    width: 0;
}

.study-summary-root .study-summary-doc-pilot-editable.is-empty::before {
    content: "";
    display: inline-block;
    width: 0;
    pointer-events: none;
}

.study-summary-root .study-summary-doc-pilot-paragraph.study-summary-doc-pilot-editable.is-empty {
    min-height: 1.2em;
    margin: 0.35em 0;
}

.study-summary-root .study-summary-doc-pilot-list-item.study-summary-doc-pilot-editable.is-empty {
    min-height: 1.15em;
}

.study-summary-root .study-summary-doc-pilot-empty {
    display: grid;
    gap: 4px;
    padding: 18px 0;
    color: #667085;
    line-height: 1.55;
}

.study-summary-root .study-summary-doc-pilot-empty strong {
    color: #344054;
    font-size: 14px;
}

.study-summary-root .study-summary-doc-pilot-empty span {
    font-size: 13px;
}

.study-summary-root .study-summary-doc-pilot-list {
    margin: 0.8em 0 1.15em;
    padding-left: 1.35em;
    color: #253241;
    line-height: 1.68;
}

.study-summary-root .study-summary-doc-pilot-list li + li {
    margin-top: 0.35em;
}

.study-summary-root .study-summary-doc-pilot-atomic {
    user-select: text;
    -webkit-user-select: text;
}

.study-summary-root .study-summary-doc-pilot-table {
    width: 100%;
    margin: 1.25em 0;
    border-collapse: collapse;
    color: #253241;
    font-size: 14px;
    line-height: 1.55;
}

.study-summary-root .study-summary-doc-pilot-table th,
.study-summary-root .study-summary-doc-pilot-table td {
    border: 1px solid #cbd5e1;
    padding: 9px 11px;
    text-align: left;
    vertical-align: top;
}

.study-summary-root .study-summary-doc-pilot-table .study-summary-doc-pilot-editable-cell {
    min-width: 64px;
    outline: 0;
}

.study-summary-root .study-summary-doc-pilot-table .study-summary-doc-pilot-editable-cell:hover,
.study-summary-root .study-summary-doc-pilot-table .study-summary-doc-pilot-editable-cell:focus {
    background: #f8fbff;
    box-shadow: inset 0 0 0 2px #9fb2c7;
}

.study-summary-root .study-summary-doc-pilot-table th {
    background: #f1f5f9;
    color: #1f2937;
    font-weight: 700;
}

.study-summary-root .study-summary-doc-pilot-image {
    position: relative;
    width: var(--study-summary-doc-pilot-image-width, 100%);
    max-width: 100%;
    margin: 1.35em auto;
    outline: 1px solid transparent;
    outline-offset: 4px;
    transition: outline-color 0.14s ease, box-shadow 0.14s ease;
}

.study-summary-root .study-summary-doc-pilot-image.is-align-left {
    margin-left: 0;
    margin-right: auto;
}

.study-summary-root .study-summary-doc-pilot-image.is-align-center {
    margin-left: auto;
    margin-right: auto;
}

.study-summary-root .study-summary-doc-pilot-image.is-align-right {
    margin-left: auto;
    margin-right: 0;
}

.study-summary-root .study-summary-doc-pilot-image.is-selected,
.study-summary-root .study-summary-doc-pilot-image.is-resizing,
.study-summary-root .study-summary-doc-pilot-image:focus-visible {
    outline-color: color-mix(in srgb, var(--study-summary-accent) 36%, transparent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--study-summary-accent) 10%, transparent);
}

.study-summary-root .study-summary-doc-pilot-image-align-controls {
    position: absolute;
    left: 50%;
    top: 7px;
    z-index: 5;
    display: inline-flex;
    gap: 3px;
    padding: 3px;
    border: 1px solid color-mix(in srgb, #cbd5e1 78%, transparent);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
    transform: translateX(-50%);
}

.study-summary-root .study-summary-doc-pilot-image-align-controls button {
    min-width: 44px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #334155;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 7px 8px;
}

.study-summary-root .study-summary-doc-pilot-image-align-controls button:hover,
.study-summary-root .study-summary-doc-pilot-image-align-controls button:focus-visible,
.study-summary-root .study-summary-doc-pilot-image-align-controls button.is-active {
    background: color-mix(in srgb, var(--study-summary-accent) 16%, white);
    color: #1e293b;
    outline: none;
}

.study-summary-root .study-summary-doc-pilot-image-box {
    min-height: 168px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #f4f7fb;
    color: #536273;
    font-size: 14px;
}

.study-summary-root .study-summary-doc-pilot-image img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.study-summary-root .study-summary-doc-pilot-image figcaption {
    margin-top: 7px;
    color: #667085;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.study-summary-root .study-summary-doc-pilot-image-resize-handle {
    position: absolute;
    right: 5px;
    bottom: 5px;
    z-index: 4;
    width: 22px;
    height: 22px;
    border: 1px solid color-mix(in srgb, #cbd5e1 76%, transparent);
    border-radius: 7px;
    background:
        linear-gradient(135deg, transparent 52%, #64748b 53% 58%, transparent 59%),
        linear-gradient(135deg, transparent 66%, #64748b 67% 72%, transparent 73%),
        rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.16);
    cursor: nwse-resize;
    opacity: 0;
    pointer-events: none;
    touch-action: none;
    transition: opacity 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.study-summary-root .study-summary-doc-pilot-image.is-selected .study-summary-doc-pilot-image-resize-handle,
.study-summary-root .study-summary-doc-pilot-image.is-resizing .study-summary-doc-pilot-image-resize-handle,
.study-summary-root .study-summary-doc-pilot-image:focus-visible .study-summary-doc-pilot-image-resize-handle {
    opacity: 0.88;
    pointer-events: auto;
}

.study-summary-root .study-summary-doc-pilot-image-resize-handle:hover,
.study-summary-root .study-summary-doc-pilot-image-resize-handle:focus-visible {
    border-color: color-mix(in srgb, var(--study-summary-accent) 54%, #cbd5e1);
    opacity: 1;
    outline: none;
}

.study-summary-root .study-summary-doc-pilot-readonly {
    margin: 1.1em 0;
    padding: 10px 12px;
    border-left: 3px solid #8a98a8;
    background: #f6f8fb;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.55;
}

@media (max-width: 900px) {
    .study-summary-root .study-summary-doc-pilot-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .study-summary-root .study-summary-doc-pilot-check-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .study-summary-root .study-summary-category-list {
        display: grid;
        gap: 10px;
        overflow: visible;
        padding-bottom: 0;
    }

    .study-summary-root .study-summary-category-section,
    .study-summary-root .study-summary-secondary-categories {
        min-width: 0;
        width: 100%;
    }

    .study-summary-root .study-summary-secondary-categories {
        padding-top: 8px;
    }

    .study-summary-root .study-summary-secondary-categories summary {
        min-height: 30px;
        gap: 6px;
        font-size: 11px;
    }

    .study-summary-root .study-summary-secondary-categories summary::before {
        width: 16px;
        height: 16px;
        font-size: 12px;
    }

    .study-summary-root .study-summary-secondary-categories summary small {
        font-size: 10px;
    }

    .study-summary-root .study-summary-secondary-category-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        margin-top: 7px;
    }

    .study-summary-root .study-summary-category-button.is-secondary {
        min-width: 0;
        min-height: 46px;
        border-radius: 9px;
        padding: 7px 8px;
        gap: 4px;
        font-size: 11px;
        line-height: 1.25;
    }

    .study-summary-root .study-summary-category-button.is-secondary small {
        font-size: 10px;
    }

    .study-summary-root.study-summary-mobile-admin-dock-visible {
        padding-bottom: 318px;
    }

    .study-summary-root.study-summary-mobile-admin-dock-visible .study-summary-main {
        padding-bottom: 300px;
    }

    .study-summary-root .hide-recall-mobile-admin-dock {
        position: fixed;
        z-index: 90;
        right: max(10px, env(safe-area-inset-right));
        bottom: calc(240px + env(safe-area-inset-bottom));
        left: max(10px, env(safe-area-inset-left));
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 7px 10px;
        align-items: center;
        box-sizing: border-box;
        max-width: 620px;
        margin: 0 auto;
        border: 1px solid color-mix(in srgb, var(--study-summary-accent) 36%, var(--study-summary-border));
        border-radius: 12px;
        background: color-mix(in srgb, var(--study-summary-panel) 94%, transparent);
        box-shadow: 0 14px 34px rgba(15, 23, 42, 0.22);
        padding: 9px 10px;
        backdrop-filter: blur(10px);
        opacity: 0;
        pointer-events: none;
        transform: translateY(12px);
        transition: opacity 160ms ease, transform 160ms ease;
    }

    .study-summary-root .hide-recall-mobile-admin-dock.is-visible {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .study-summary-root .hide-recall-mobile-admin-meta {
        display: grid;
        gap: 2px;
        min-width: 0;
    }

    .study-summary-root .hide-recall-mobile-admin-meta span {
        color: var(--study-summary-text);
        font-size: 12px;
        font-weight: 900;
        line-height: 1.2;
    }

    .study-summary-root .hide-recall-mobile-admin-meta small {
        overflow: hidden;
        color: var(--study-summary-dim);
        font-size: 11px;
        font-weight: 800;
        line-height: 1.25;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .study-summary-root .hide-recall-mobile-admin-add {
        min-width: 92px;
        min-height: 42px;
        border: 1px solid var(--study-summary-accent);
        border-radius: 10px;
        background: var(--study-summary-active-bg);
        color: var(--study-summary-active-text);
        padding: 9px 12px;
        font: inherit;
        font-size: 13px;
        font-weight: 900;
        line-height: 1.1;
    }

    .study-summary-root .hide-recall-mobile-admin-add:disabled {
        border-color: var(--study-summary-border);
        background: var(--study-summary-row-bg);
        color: var(--study-summary-dim);
    }

    .study-summary-root .hide-recall-mobile-admin-count {
        grid-column: 1 / -1;
        color: var(--study-summary-dim);
        font-size: 10px;
        font-weight: 850;
        line-height: 1;
    }

    .study-summary-root .study-summary-doc-pilot-panel {
        padding: 16px;
    }

    .study-summary-root .study-summary-doc-pilot-head {
        display: block;
    }

    .study-summary-root .study-summary-doc-pilot-actions {
        justify-content: flex-start;
        margin-top: 12px;
    }

    .study-summary-root .study-summary-doc-pilot-check-head {
        display: block;
    }

    .study-summary-root .study-summary-doc-pilot-check-head span {
        display: inline-block;
        margin-top: 8px;
    }

    .study-summary-root .study-summary-doc-pilot-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .study-summary-root .study-summary-doc-pilot-document,
    .study-summary-root .study-summary-doc-pilot-probe {
        padding: 16px;
    }
}

.study-summary-root .study-summary-back {
    margin-bottom: 18px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: var(--study-summary-chip-bg);
    color: var(--study-summary-chip-text);
    padding: 8px 11px;
    font-size: 12px;
    font-weight: 800;
}

.study-summary-root .study-summary-result-list {
    display: grid;
    gap: 12px;
}

.study-summary-root .study-summary-result {
    display: grid;
    gap: 8px;
    width: 100%;
    border: 1px solid var(--study-summary-border);
    border-radius: 14px;
    background: var(--study-summary-panel);
    color: var(--study-summary-text);
    padding: 16px 18px;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
    transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.study-summary-root .study-summary-result:hover {
    border-color: color-mix(in srgb, var(--study-summary-accent) 52%, var(--study-summary-border));
    background: color-mix(in srgb, var(--study-summary-active-bg) 34%, var(--study-summary-panel));
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
    transform: translateY(-1px);
}

.study-summary-root .study-summary-result:active {
    transform: translateY(0) scale(0.99);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.study-summary-root .study-summary-result:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--study-summary-accent) 28%, transparent);
    outline-offset: 2px;
}

.study-summary-root .study-summary-result-title {
    color: var(--study-summary-text);
    font-size: 18px;
    font-weight: 850;
    line-height: 1.35;
}

.study-summary-root .study-summary-result-summary {
    color: var(--study-summary-dim);
    font-size: 14px;
    line-height: 1.65;
}

.study-summary-root .study-summary-result-meta {
    color: var(--accent);
    font-weight: 800;
}

@media (max-width: 980px) {
    .study-summary-root {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-left: 0;
        transform: none;
        overflow-x: hidden;
    }

    .study-summary-root .study-summary-topbar {
        position: relative;
        align-items: flex-start;
        flex-direction: column;
        justify-content: flex-start;
    }

    .study-summary-root .study-summary-topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .study-summary-root .study-summary-editor-head {
        align-items: stretch;
        flex-direction: column;
    }

    .study-summary-root .study-summary-document-toolbar {
        justify-content: flex-start;
        max-width: none;
        width: 100%;
    }

    .study-summary-root .study-summary-document-toolbar-group {
        max-width: 100%;
    }

    .study-summary-root .study-summary-theme-control,
    .study-summary-root .study-summary-font-size-control {
        max-width: 100%;
        flex-wrap: wrap;
    }

    .study-summary-root .study-summary-shell {
        grid-template-columns: 1fr;
        max-width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    .study-summary-root .study-summary-sidebar {
        position: static;
        max-height: none;
        max-width: 100%;
        min-width: 0;
    }

    .study-summary-root .study-summary-main,
    .study-summary-root .study-summary-article,
    .study-summary-root .study-summary-search-results,
    .study-summary-root .study-summary-topic,
    .study-summary-root .study-summary-topic-body,
    .study-summary-root .study-summary-section,
    .study-summary-root .study-summary-article-body,
    .study-summary-root .study-summary-question,
    .study-summary-root .study-summary-result,
    .study-summary-root .study-summary-media,
    .study-summary-root .study-summary-real-table-block {
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .study-summary-root .study-summary-topic-body,
    .study-summary-root .study-summary-section,
    .study-summary-root .study-summary-question,
    .study-summary-root .study-summary-title,
    .study-summary-root .study-summary-result,
    .study-summary-root .study-summary-result-title,
    .study-summary-root .study-summary-result-summary,
    .study-summary-root .study-summary-related,
    .study-summary-root .study-summary-related button,
    .study-summary-root .study-summary-toc,
    .study-summary-root .study-summary-toc a,
    .study-summary-root .study-summary-block-paragraph,
    .study-summary-root .study-summary-block-list,
    .study-summary-root .study-summary-block-list li,
    .study-summary-root .study-summary-topic-body p,
    .study-summary-root .study-summary-question li,
    .study-summary-root .study-summary-definition-row,
    .study-summary-root .study-summary-definition-term,
    .study-summary-root .study-summary-definition-desc,
    .study-summary-root .study-summary-row,
    .study-summary-root .study-summary-row > div {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .study-summary-root .study-summary-category-list {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 8px;
        scrollbar-width: none;
    }

    .study-summary-root .study-summary-category-list::-webkit-scrollbar {
        display: none;
    }

    .study-summary-root .study-summary-category-button {
        min-width: 176px;
    }

    .study-summary-root .study-summary-definition-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .study-summary-root .study-summary-table,
    .study-summary-root .study-summary-definition-list,
    .study-summary-root .study-summary-real-table-scroll {
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .study-summary-root .study-summary-table {
        overflow-x: auto;
    }

    .study-summary-root .study-summary-row {
        max-width: 100%;
        min-width: 0;
    }

    .study-summary-root .study-summary-row > div {
        min-width: 0;
    }

    .study-summary-root .study-summary-table.is-wide .study-summary-row {
        max-width: none;
        min-width: max-content;
    }

    .study-summary-root .study-summary-table.is-wide .study-summary-row > div {
        min-width: 92px;
        white-space: nowrap;
        overflow-wrap: normal;
        word-break: keep-all;
    }

    .study-summary-root .study-summary-real-table-block {
        overflow: hidden;
    }

    .study-summary-root .study-summary-real-table {
        width: max-content;
        max-width: none;
    }

    .study-summary-root .study-summary-table-editor-row {
        grid-template-columns: 1fr;
    }

    .study-summary-root .study-summary-table-editor .study-summary-table.is-grid .study-summary-table-editor-row,
    .study-summary-root .study-summary-table-editor .study-summary-definition-list .study-summary-table-editor-row {
        grid-template-columns: minmax(max-content, 1fr) auto;
    }

    .study-summary-root .study-summary-table-row-delete-button {
        justify-self: start;
    }

    .study-summary-root .study-summary-table-editor .study-summary-table.is-grid .study-summary-table-row-delete-button,
    .study-summary-root .study-summary-table-editor .study-summary-definition-list .study-summary-table-row-delete-button {
        justify-self: stretch;
    }

    .concept-question-panel-backdrop {
        align-items: flex-end;
        padding: 10px;
    }

    .concept-question-panel {
        width: 100%;
        max-width: 100%;
        height: min(86vh, calc(100vh - 20px));
        height: min(86dvh, calc(100dvh - 20px));
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
        min-height: 0;
        border-radius: 18px 18px 12px 12px;
    }

    .concept-question-item {
        grid-template-columns: 1fr;
    }

    .concept-question-qid {
        justify-self: start;
    }
}

@media (max-width: 430px) {
    .study-summary-root {
        width: 100%;
        max-width: 100%;
        padding: 10px;
        border-radius: 18px;
        --study-summary-saved-h2-size: 22px;
        --study-summary-saved-h3-size: 17px;
        --study-summary-saved-h4-size: 16px;
        --study-summary-saved-paragraph-size: 16px;
        --study-summary-saved-list-size: 15px;
        --study-summary-saved-preformatted-size: 14.5px;
        --study-summary-saved-row-size: 14.5px;
        --study-summary-saved-caption-size: 14px;
    }

    .study-summary-root[data-study-summary-font-size="large"] {
        --study-summary-saved-h2-size: 25px;
        --study-summary-saved-h3-size: 20px;
        --study-summary-saved-h4-size: 18px;
        --study-summary-saved-paragraph-size: 18px;
        --study-summary-saved-list-size: 17px;
        --study-summary-saved-preformatted-size: 16px;
        --study-summary-saved-row-size: 16px;
        --study-summary-saved-caption-size: 15.5px;
    }

    .study-summary-root .study-summary-sidebar,
    .study-summary-root .study-summary-article,
    .study-summary-root .study-summary-search-results {
        border-radius: 14px;
        max-width: 100%;
        min-width: 0;
        padding: 16px 12px;
    }

    .study-summary-root .study-summary-title h1 {
        font-size: 27px;
    }

    .study-summary-root .study-summary-section > h2 {
        font-size: 21px;
    }

    .study-summary-root .study-summary-saved-article .study-summary-article-body {
        gap: 13px;
    }

    .study-summary-root .study-summary-saved-article .study-summary-section > h2 {
        margin-top: 28px;
        font-size: var(--study-summary-saved-h2-size);
    }

    .study-summary-root .study-summary-saved-article .study-summary-section > h3 {
        margin-top: 15px;
        padding: 8px 10px;
        font-size: var(--study-summary-saved-h3-size);
    }

    .study-summary-root .study-summary-saved-article .study-summary-block-paragraph {
        font-size: var(--study-summary-saved-paragraph-size);
        line-height: 1.7;
    }

    .study-summary-root .study-summary-saved-article .study-summary-block-list {
        font-size: var(--study-summary-saved-list-size);
        line-height: 1.62;
    }

    .study-summary-root .study-summary-saved-article .study-summary-preformatted {
        font-size: var(--study-summary-saved-preformatted-size);
        line-height: 1.58;
        padding: 12px 13px;
    }

    .study-summary-root .study-summary-saved-article .study-summary-row > div,
    .study-summary-root .study-summary-saved-article .study-summary-definition-row,
    .study-summary-root .study-summary-saved-article .study-summary-real-table th,
    .study-summary-root .study-summary-saved-article .study-summary-real-table td {
        font-size: var(--study-summary-saved-row-size);
        line-height: 1.55;
    }

    .study-summary-root .study-summary-saved-article .study-summary-inline-numbered-item {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 7px;
    }

    .study-summary-root .study-summary-saved-article .study-summary-display-formula {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
        padding: 9px 10px;
    }

    .study-summary-root .study-summary-saved-article .study-summary-display-formula-equals {
        display: none;
    }

    .study-summary-root .study-summary-saved-article-refrigerator .study-summary-article-body,
    .study-summary-root .study-summary-saved-article-cooling-cycle .study-summary-article-body {
        gap: 12px;
    }

    .study-summary-root .study-summary-saved-article-refrigerator .study-summary-section > h2,
    .study-summary-root .study-summary-saved-article-cooling-cycle .study-summary-section > h2 {
        margin-top: 26px;
        font-size: 21px;
    }

    .study-summary-root .study-summary-saved-article-refrigerator .study-summary-section > h3,
    .study-summary-root .study-summary-saved-article-cooling-cycle .study-summary-section > h3 {
        margin-top: 14px;
        padding: 8px 10px;
        font-size: 17px;
    }

    .study-summary-root .study-summary-saved-article-refrigerator .study-summary-block-list,
    .study-summary-root .study-summary-saved-article-cooling-cycle .study-summary-block-list {
        gap: 7px;
        padding-left: 18px;
        font-size: 13.5px;
        line-height: 1.68;
    }

    .study-summary-root .study-summary-saved-article-ncs5 .study-summary-article-body {
        gap: 13px;
    }

    .study-summary-root .study-summary-saved-article-ncs5 .study-summary-section > h2 {
        margin-top: 28px;
        font-size: 22px;
    }

    .study-summary-root .study-summary-saved-article-ncs5 .study-summary-section > h3 {
        margin-top: 15px;
        padding: 8px 10px;
        font-size: 17px;
    }

    .study-summary-root .study-summary-saved-article-ncs5 .study-summary-block-paragraph {
        font-size: 14.5px;
        line-height: 1.78;
    }

    .study-summary-root .study-summary-saved-article-ncs5 .study-summary-block-list {
        gap: 7px;
        padding-left: 18px;
        font-size: 13.75px;
        line-height: 1.7;
    }

    .study-summary-root .study-summary-topic-title {
        font-size: 18px;
    }

    .study-summary-root .study-summary-sidebar-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .study-summary-root .study-summary-sidebar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .study-summary-root .study-summary-category-list {
        display: grid;
        gap: 10px;
        overflow: visible;
        padding-bottom: 0;
    }

    .study-summary-root .study-summary-category-section,
    .study-summary-root .study-summary-secondary-categories {
        min-width: 0;
        width: 100%;
    }

    .study-summary-root .study-summary-category-button {
        min-width: 0;
    }

    .study-summary-root .study-summary-secondary-category-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .study-summary-root .study-summary-row {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .study-summary-root .study-summary-row > div {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .study-summary-root .study-summary-row > div:last-child {
        border-bottom: 0;
    }
}
