/* simonacozma.eu — app styles. Warm light theme, dark via prefers-color-scheme.
   Accent: the red of the portrait's sweater. Mobile-first; side menu goes
   off-canvas under 900px. */
:root {
  --bg: #faf6f4; --bg-2: #ffffff; --bg-3: #f3ecea; --bg-4: #ebe2df;
  --line: #e7dcd8; --line-2: #d9cbc6;
  --text: #241a1a; --text-dim: #6f5f5c; --text-mute: #9a8a86;
  --accent: #b3261e; --accent-hi: #d2372d; --accent-soft: #fbe9e7; --accent-ink: #fff;
  --ok: #2e7d4f; --ok-soft: #e4f3ea; --warn: #b26a00; --warn-soft: #fff1dc; --bad: #b3261e; --bad-soft: #fbe9e7;
  --side-w: 236px; --topbar-h: 58px; --radius: 14px; --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(60, 20, 15, .08);
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151112; --bg-2: #1e1819; --bg-3: #261f20; --bg-4: #302728;
    --line: #342a2b; --line-2: #45383a;
    --text: #f3ecea; --text-dim: #b7a8a5; --text-mute: #867875;
    --accent: #ef6a5e; --accent-hi: #ff7f73; --accent-soft: #3a1f1d; --accent-ink: #1a0b0a;
    --ok: #7fd9a8; --ok-soft: #1c3328; --warn: #f0b860; --warn-soft: #3a2c14; --bad: #ff8a80; --bad-soft: #3c1f1d;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .sc-mono { font-family: var(--mono); font-size: .92em; }
code { background: var(--bg-3); padding: 1px 6px; border-radius: 6px; }
pre { background: var(--bg-3); padding: 12px; border-radius: var(--radius-sm); overflow: auto; }
h1, h2, h3 { margin: 0 0 10px; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; font-weight: 800; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* auth */
.sc-auth-body { display: grid; place-items: center; padding: 16px; }
.sc-auth { width: 100%; max-width: 400px; }
.sc-auth-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: 22px; padding: 32px 28px; box-shadow: var(--shadow); }
.sc-auth-logo { display: block; margin: 0 auto 20px; border-radius: 50%; object-fit: cover; }

/* shell */
.sc-side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--bg-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 30; transition: transform .2s ease; padding-top: env(safe-area-inset-top, 0px); }
.sc-side-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); min-height: var(--topbar-h); }
.sc-avatar { border-radius: 50%; }
.sc-brand { font-weight: 800; letter-spacing: -.01em; }
.sc-nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
.sc-nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; margin-bottom: 2px; border-radius: var(--radius-sm); color: var(--text-dim); font-weight: 600; font-size: .93rem; }
.sc-nav-item:hover { background: var(--bg-3); color: var(--text); text-decoration: none; }
.sc-nav-item.active { background: var(--accent-soft); color: var(--accent); }
.sc-side-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.sc-user { font-weight: 700; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-user small { display: block; color: var(--text-mute); font-weight: 500; }
.sc-version { color: var(--text-mute); font-size: .72rem; }
.sc-side-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 25; }
.sc-main { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
.sc-topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; min-height: var(--topbar-h); padding: env(safe-area-inset-top, 0px) 18px 0; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.sc-title { font-size: 1.15rem; font-weight: 800; flex: 1; margin: 0; }
.sc-topbar-right { display: flex; gap: 8px; align-items: center; }
.sc-burger { display: none; width: 38px; height: 38px; border: 0; background: none; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; padding: 8px; }
.sc-burger span { display: block; height: 2px; background: var(--text); border-radius: 2px; }
.sc-iconbtn { width: 36px; height: 36px; border: 1px solid var(--line); background: var(--bg-2); border-radius: 50%; color: var(--text-dim); cursor: pointer; display: grid; place-items: center; }
.sc-iconbtn:hover { color: var(--text); }
.sc-content { padding: 20px 18px calc(24px + env(safe-area-inset-bottom, 0px)); max-width: 1180px; width: 100%; }
@media (max-width: 900px) {
  .sc-side { transform: translateX(-100%); }
  .sc-side.open { transform: translateX(0); }
  .sc-side-overlay.open { display: block; }
  .sc-main { margin-left: 0; }
  .sc-burger { display: flex; }
}

/* components */
.sc-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px; margin-bottom: 16px; }
.sc-center { text-align: center; padding: 40px 20px; }
.sc-grid { display: grid; gap: 16px; }
.sc-grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.sc-grid .sc-card { margin-bottom: 0; }
.sc-muted { color: var(--text-dim); }
.sc-small { font-size: .85rem; }
.sc-bad { color: var(--bad); font-weight: 700; }
.sc-ok { color: var(--ok); font-weight: 700; }
.sc-hello { font-size: 1.05rem; color: var(--text-dim); margin: 0 0 14px; }
.sc-tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.sc-tile { display: block; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; color: inherit; transition: transform .12s ease, box-shadow .12s ease; }
.sc-tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.sc-tile-top { display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-weight: 700; font-size: .85rem; }
.sc-tile-value { font-size: 1.9rem; font-weight: 800; margin: 8px 0 2px; letter-spacing: -.02em; }
.sc-tile-hint { color: var(--text-mute); font-size: .8rem; }
.sc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); padding: 9px 16px; border-radius: 999px; font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer; white-space: nowrap; }
.sc-btn:hover { text-decoration: none; background: var(--bg-3); }
.sc-btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.sc-btn-primary:hover { background: var(--accent-hi); }
.sc-btn-ghost { background: transparent; }
.sc-btn-sm { padding: 5px 11px; font-size: .82rem; }
.sc-btn-lg { padding: 12px 18px; font-size: 1rem; width: 100%; }
.sc-btn[disabled] { opacity: .5; cursor: default; }
.sc-btn[hidden] { display: none; }
.sc-form { display: grid; gap: 12px; }
.sc-form label { display: grid; gap: 5px; font-size: .85rem; font-weight: 700; color: var(--text-dim); }
.sc-form input, .sc-form select, .sc-form textarea { font: inherit; font-size: .97rem; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--bg); color: var(--text); width: 100%; }
.sc-form input:focus, .sc-form select:focus, .sc-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.sc-form-inline { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }
.sc-form-inline button { height: 42px; }
.sc-alert { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-weight: 600; font-size: .92rem; }
.sc-alert-ok { background: var(--ok-soft); color: var(--ok); }
.sc-alert-err { background: var(--bad-soft); color: var(--bad); }
.sc-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.sc-table th, .sc-table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.sc-table th { color: var(--text-mute); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.sc-table tr[data-href] { cursor: pointer; }
.sc-table tr[data-href]:hover td { background: var(--bg-3); }
.sc-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.sc-actions form { display: inline; }
.sc-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: .92rem; }
.sc-dl dt { color: var(--text-mute); font-weight: 700; }
.sc-dl dd { margin: 0; overflow-wrap: anywhere; }
.sc-details summary { cursor: pointer; font-weight: 700; margin: 14px 0 10px; color: var(--text-dim); }
.sc-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.sc-pill { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: .82rem; font-weight: 700; color: var(--text-dim); background: var(--bg-2); }
.sc-pill.active { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.sc-pill:hover { text-decoration: none; }
.sc-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.sc-badge-open { background: var(--accent-soft); color: var(--accent); }
.sc-badge-in_progress { background: var(--warn-soft); color: var(--warn); }
.sc-badge-resolved { background: var(--ok-soft); color: var(--ok); }
.sc-badge-high { background: var(--bad-soft); color: var(--bad); }
.sc-badge-medium { background: var(--bg-3); color: var(--text-dim); }
.sc-badge-low { background: var(--bg-3); color: var(--text-mute); }
.sc-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.sc-toolbar form { display: flex; gap: 8px; flex: 1; min-width: 200px; }
.sc-toolbar input[type=search] { flex: 1; font: inherit; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); }
.sc-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 999px; display: flex; gap: 12px; align-items: center; z-index: 60; box-shadow: var(--shadow); }
.sc-toast[hidden] { display: none; }
.sc-empty { text-align: center; color: var(--text-mute); padding: 30px 10px; }
.sc-rich p { margin: 0 0 8px; } .sc-rich ul, .sc-rich ol { margin: 0 0 8px; padding-left: 22px; }

/* editor (tickets) */
.sc-editor { border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--bg); }
.sc-editor-bar { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sc-editor-bar button { border: 0; background: none; width: 32px; height: 30px; border-radius: 6px; cursor: pointer; color: var(--text-dim); font-weight: 800; font-family: var(--mono); }
.sc-editor-bar button:hover, .sc-editor-bar button.on { background: var(--bg-3); color: var(--text); }
.sc-editor-field { min-height: 140px; padding: 12px; outline: none; }
.sc-editor-field:empty::before { content: attr(data-placeholder); color: var(--text-mute); }
.sc-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 10px; }
.sc-photos a img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); display: block; }
.sc-thread { display: grid; gap: 12px; }
.sc-event { display: flex; gap: 10px; }
.sc-event-dot { width: 10px; height: 10px; margin-top: 8px; border-radius: 50%; background: var(--line-2); flex: none; }
.sc-event-body { flex: 1; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; }
.sc-event-meta { font-size: .8rem; color: var(--text-mute); margin-bottom: 4px; }
.sc-event.sys .sc-event-body { background: transparent; border: 0; padding: 4px 0; color: var(--text-dim); font-size: .9rem; }

/* ai chat */
.sc-ai { display: grid; grid-template-columns: 260px 1fr; gap: 16px; min-height: calc(100vh - var(--topbar-h) - 60px); }
.sc-ai-list { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: calc(100vh - var(--topbar-h) - 60px); }
.sc-ai-conv { padding: 9px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: .88rem; display: flex; gap: 8px; align-items: center; }
.sc-ai-conv:hover { background: var(--bg-3); } .sc-ai-conv.active { background: var(--accent-soft); color: var(--accent); }
.sc-ai-conv .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-prov { font-size: .68rem; font-weight: 800; padding: 2px 6px; border-radius: 6px; text-transform: uppercase; background: var(--bg-3); color: var(--text-dim); flex: none; }
.sc-prov-claude { background: #f6e7dd; color: #a0522d; } .sc-prov-codex { background: #e3f0ea; color: #1f6f4a; }
@media (prefers-color-scheme: dark) { .sc-prov-claude { background: #3d2a20; color: #f0b08a; } .sc-prov-codex { background: #1f3429; color: #86d6ad; } }
.sc-ai-pane { display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sc-ai-head { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .88rem; flex-wrap: wrap; }
.sc-ai-head .grow { flex: 1; font-weight: 700; }
.sc-meter { font-size: .75rem; color: var(--text-mute); }
.sc-ai-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.sc-msg { max-width: 80ch; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .95rem; line-height: 1.5; }
.sc-msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.sc-msg.assistant { align-self: flex-start; background: var(--bg-3); border-bottom-left-radius: 4px; }
.sc-msg.event { align-self: flex-start; font-family: var(--mono); font-size: .78rem; color: var(--text-mute); background: transparent; border: 1px dashed var(--line-2); }
.sc-msg.error { align-self: flex-start; background: var(--bad-soft); color: var(--bad); }
.sc-ai-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.sc-ai-input textarea { flex: 1; font: inherit; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--bg); color: var(--text); resize: vertical; min-height: 44px; }
.sc-ai-empty { margin: auto; text-align: center; color: var(--text-mute); max-width: 420px; }
@media (max-width: 900px) { .sc-ai { grid-template-columns: 1fr; } .sc-ai-list { max-height: 180px; } }

/* console */
.sc-term-wrap { background: #0d1117; border-radius: var(--radius); padding: 6px; height: calc(100vh - var(--topbar-h) - 70px); min-height: 360px; }
.sc-term-wrap .xterm .xterm-viewport { background: #0d1117 !important; }

/* auth: Google */
.sc-auth-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; color: var(--text-mute); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.sc-auth-or::before, .sc-auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sc-btn-google { width: 100%; gap: 10px; }
.sc-google-g { width: 20px; height: 20px; }

/* examene */
.sc-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px 12px; padding: 0 4px; }
.sc-ex-subjects { display: grid; gap: 14px; }
.sc-ex-subject-link { display: block; color: inherit; }
.sc-ex-subject-link:hover { text-decoration: none; }
.sc-ex-subject-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.sc-ex-subject-actions .sc-btn { flex: 1; min-width: 130px; }
.sc-ex-progress { height: 8px; border-radius: 999px; background: var(--bg-4); overflow: hidden; margin: 12px 0 6px; }
.sc-ex-progress span { display: block; height: 100%; background: var(--ok); border-radius: 999px; transition: width .3s ease; }
.sc-ex-progress-sm { height: 5px; margin: 0; flex: 1; }
.sc-ex-progress-text { font-size: .85rem; color: var(--text-dim); }
.sc-ex-chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.sc-ex-chip-learned { background: var(--ok-soft); color: var(--ok); }
.sc-ex-chip-review { background: var(--warn-soft); color: var(--warn); }
.sc-ex-head h2 { font-size: 1.25rem; }
.sc-ex-toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
.sc-ex-toolbar input[type=search] { width: 100%; font-size: 1rem; padding: 11px 14px; }
.sc-ex-pills { margin: 0; }
.sc-ex-pills .sc-pill { cursor: pointer; font: inherit; font-size: .82rem; font-weight: 700; }
.sc-ex-list-card { padding: 8px 0 4px; }
.sc-ex-list-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-mute); margin: 8px 18px 6px; }
.sc-ex-list { list-style: none; margin: 0; padding: 0; }
.sc-ex-item a { display: flex; align-items: center; gap: 12px; padding: 13px 14px 13px 16px; color: inherit; border-top: 1px solid var(--line); min-height: 58px; }
.sc-ex-item a:hover { background: var(--bg-3); text-decoration: none; }
.sc-ex-item a:active { background: var(--bg-4); }
.sc-ex-item-title { flex: 1; font-weight: 700; font-size: 1rem; line-height: 1.3; }
.sc-ex-num { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-3); color: var(--text-dim); font-weight: 800; font-size: .9rem; }
.sc-ex-num.is-learned { background: var(--ok); color: #fff; }
.sc-ex-num.is-review { background: var(--warn); color: #fff; }
.sc-ex-num-extra svg { width: 18px; height: 18px; }
.sc-ex-chev { flex: none; color: var(--text-mute); }
.sc-ex-admin { margin-top: 10px; text-align: right; }
.sc-ex-crumb { color: inherit; font-weight: 800; display: inline-flex; align-items: center; gap: 2px; } .sc-ex-crumb svg { width: 20px; height: 20px; margin-left: -6px; }
.sc-ex-article { padding: 20px 18px 24px; }
.sc-ex-article-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sc-ex-title { font-size: 1.5rem; line-height: 1.2; margin: 0 0 6px; }
.sc-ex-body { font-size: 1.02rem; line-height: 1.65; }
.sc-ex-body h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); margin: 24px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.sc-ex-body h4 { font-size: 1rem; margin: 16px 0 6px; }
.sc-ex-body p { margin: 0 0 10px; }
.sc-ex-body ul, .sc-ex-body ol { margin: 0 0 12px; padding-left: 22px; }
.sc-ex-body li { margin-bottom: 5px; }
.sc-ex-body li::marker { color: var(--text-mute); }
.sc-ex-body pre { font-size: .88rem; line-height: 1.55; padding: 12px 14px; border-left: 4px solid var(--accent); background: var(--accent-soft); color: var(--text); border-radius: var(--radius-sm); white-space: pre-wrap; overflow-wrap: anywhere; }
.sc-ex-body strong { font-weight: 800; }
.sc-ex-table { font-size: .9rem; min-width: 420px; }
.sc-ex-table th, .sc-ex-table td { padding: 8px 8px; vertical-align: top; }
.sc-ex-table th { text-transform: none; font-size: .8rem; letter-spacing: 0; }
.sc-ex-bar { position: sticky; bottom: 0; z-index: 15; display: flex; gap: 8px; align-items: center; margin: 0 -18px -24px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.sc-ex-bar-nav { flex: none; padding: 9px 12px; }
.sc-ex-bar-nav svg { width: 18px; height: 18px; }
.sc-ex-bar-status { flex: 1; display: flex; gap: 8px; justify-content: center; }
.sc-ex-bar-status[hidden], .sc-ex-card-wrap[hidden], .sc-ex-test-setup[hidden] { display: none; }
.sc-ex-bar-status .sc-btn { flex: 1; min-width: 0; padding: 10px 8px; }
.sc-ex-btn-learned.is-on, .sc-ex-btn-learned:hover { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.sc-ex-btn-review.is-on, .sc-ex-btn-review:hover { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
@media (max-width: 480px) { .sc-ex-bar-nav span { display: none; } .sc-ex-bar-nav { padding: 10px; } }
.sc-ex-editor { font-family: var(--mono); font-size: .88rem; line-height: 1.5; min-height: 60vh; }
.sc-ex-test { max-width: 640px; }
.sc-ex-test-stats { display: flex; gap: 10px; margin: 14px 0; }
.sc-ex-test-stats div { flex: 1; text-align: center; background: var(--bg-3); border-radius: var(--radius-sm); padding: 10px 6px; }
.sc-ex-test-stats b { display: block; font-size: 1.5rem; }
.sc-ex-test-stats span { font-size: .78rem; color: var(--text-mute); }
.sc-ex-test-actions { display: grid; gap: 8px; margin-top: 12px; }
.sc-ex-test-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sc-ex-test-pos { font-weight: 800; color: var(--text-dim); font-size: .9rem; white-space: nowrap; }
.sc-ex-flash { min-height: 46vh; display: flex; flex-direction: column; justify-content: center; cursor: pointer; border-width: 2px; transition: border-color .2s ease; }
.sc-ex-flash.is-flipped { cursor: default; border-color: var(--accent); justify-content: flex-start; }
.sc-ex-flash-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-mute); font-weight: 800; }
.sc-ex-flash-title { font-size: 1.7rem; line-height: 1.2; margin: 6px 0 10px; }
.sc-ex-flash.is-flipped .sc-ex-flash-title { font-size: 1.25rem; }
.sc-ex-flash.is-flipped #sc-ex-flash-prompt { display: none; }
.sc-ex-flash-back { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.sc-ex-flash-back h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); margin: 12px 0 6px; }
.sc-ex-flash-back pre { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: 10px 12px; font-size: .86rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.sc-ex-flash-more { display: inline-block; margin-top: 10px; font-weight: 700; }
.sc-ex-bar-test { margin: 12px 0 0; border: 0; background: transparent; backdrop-filter: none; padding: 0; position: static; }
.sc-ex-bar-test > .sc-btn-primary { flex: 1; }
.sc-ex-bar-test .sc-ex-bar-status .sc-btn { padding: 12px 8px; font-size: 1rem; }

/* examene: reading mode */
.sc-ex-toc { position: sticky; top: calc(var(--topbar-h) + 8px); z-index: 14; padding: 0; overflow: hidden; }
.sc-ex-toc summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 16px; font-weight: 800; cursor: pointer; }
.sc-ex-toc summary::-webkit-details-marker { display: none; }
.sc-ex-toc summary::before { content: "☰"; margin-right: 8px; color: var(--text-mute); }
.sc-ex-toc[open] summary { border-bottom: 1px solid var(--line); }
.sc-ex-toc-list { list-style: none; margin: 0; padding: 6px 8px 8px; max-height: 60vh; overflow-y: auto; }
.sc-ex-toc-list a { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: var(--radius-sm); color: inherit; font-weight: 700; font-size: .95rem; }
.sc-ex-toc-list a:hover { background: var(--bg-3); text-decoration: none; }
.sc-ex-toc-list .sc-ex-num { width: 28px; height: 28px; font-size: .8rem; }
.sc-ex-read { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.sc-ex-read-article { scroll-margin-top: calc(var(--topbar-h) + 64px); margin-bottom: 0; min-width: 0; overflow-wrap: anywhere; }
.sc-ex-read-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.sc-ex-read-status { display: flex; gap: 8px; flex: 1; }
.sc-ex-read-status .sc-btn { flex: 1; }
.sc-ex-totop { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: var(--shadow); z-index: 16; }
.sc-ex-totop:hover { background: var(--accent-hi); text-decoration: none; }
.sc-ex-totop svg { width: 22px; height: 22px; }

/* pull-to-refresh */
.sc-ptr { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); left: 50%; transform: translate(-50%, calc(var(--pull, 0px) - 60px)); z-index: 70; display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: .85rem; font-weight: 700; color: var(--text-dim); white-space: nowrap; pointer-events: none; }
.sc-ptr[hidden] { display: none; }
.sc-ptr.ready { color: var(--accent); border-color: var(--accent); }
.sc-ptr-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); }
.sc-ptr.busy .sc-ptr-spin { animation: sc-spin .8s linear infinite; }
@keyframes sc-spin { to { transform: rotate(360deg); } }
body { overscroll-behavior-y: contain; }

/* tickets: list cards, layout, photo picker */
.sc-tk-list-card { padding: 6px 0; }
.sc-tk-list { list-style: none; margin: 0; padding: 0; }
.sc-tk-item a { display: block; padding: 13px 16px; color: inherit; border-top: 1px solid var(--line); }
.sc-tk-item:first-child a { border-top: 0; }
.sc-tk-item a:hover { background: var(--bg-3); text-decoration: none; }
.sc-tk-item.is-resolved .sc-tk-subject { color: var(--text-dim); }
.sc-tk-row { display: flex; align-items: center; gap: 10px; }
.sc-tk-id { font-family: var(--mono); color: var(--text-mute); font-size: .85rem; flex: none; }
.sc-tk-subject { flex: 1; font-weight: 700; font-size: 1rem; line-height: 1.3; min-width: 0; }
.sc-tk-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; color: var(--text-mute); font-size: .8rem; }
.sc-tk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .sc-tk-layout { grid-template-columns: minmax(0, 1fr); } }
.sc-tk-head { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin-bottom: 6px; }
.sc-tk-title { font-size: 1.3rem; line-height: 1.25; margin: 0; }
.sc-tk-quick { display: inline; }
.sc-photo-picker { display: grid; gap: 10px; }
.sc-photo-btn { justify-content: flex-start; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px dashed var(--line-2); background: var(--bg); width: 100%; text-align: left; }
.sc-photo-btn svg { width: 26px; height: 26px; color: var(--accent); flex: none; }
.sc-photo-btn small { display: block; font-weight: 500; color: var(--text-mute); font-size: .78rem; }
.sc-photo-btn > span { display: flex; flex-direction: column; }
.sc-photo-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.sc-photo-previews:empty { display: none; }
.sc-photo-preview { position: relative; }
.sc-photo-preview img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); display: block; }
.sc-photo-rm { position: absolute; top: -6px; right: -6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--text); color: var(--bg); font-size: 1rem; line-height: 1; cursor: pointer; }
.sc-badge-open { background: var(--accent-soft); color: var(--accent); }
.sc-tk-single { max-width: 820px; }

/* attachments: non-image files */
.sc-files { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.sc-file-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: inherit; min-width: 0; }
.sc-file-chip:hover { background: var(--bg-3); text-decoration: none; }
.sc-file-chip b { flex: none; font-size: .68rem; letter-spacing: .04em; padding: 4px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.sc-file-chip span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9rem; }
.sc-file-chip small { flex: none; color: var(--text-mute); font-size: .78rem; }
.sc-photo-preview.is-file { grid-column: 1 / -1; }
.sc-photo-preview.is-file .sc-file-chip { padding-right: 34px; }
.sc-photo-btn { white-space: normal; min-width: 0; }
.sc-photo-btn > span { min-width: 0; flex: 1; }
.sc-photo-btn small { white-space: normal; line-height: 1.3; }
.sc-tk-quick .sc-btn { white-space: nowrap; }
.sc-photo-btn > span > b { font-weight: 800; }
