:root {
  color-scheme: light;
  --ink: #121f36;
  --muted: #596881;
  --line: #dfe6ef;
  --surface: #fff;
  --background: #f4f7fb;
  --navy: #0c1831;
  --blue: #2549e8;
  --blue-dark: #1d38bf;
  --pale: #edf1ff;
  --mint: #a5f3d6;
  --radius: 18px;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--background);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
input, textarea, select, button { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .56; cursor: wait; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(32px, 5vw, 54px); letter-spacing: -.05em; line-height: 1.07; font-weight: 750; }
h2 { font-size: 22px; letter-spacing: -.025em; line-height: 1.2; }
h3 { font-size: 17px; letter-spacing: -.015em; }
:focus-visible { outline: 3px solid #7086ff; outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.subtle { color: var(--muted); line-height: 1.6; font-size: 15px; }
.small { color: var(--muted); line-height: 1.55; font-size: 13px; }
.button { border: 1px solid transparent; min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 16px; border-radius: 10px; white-space: normal; font-size: 14px; font-weight: 680; line-height: 1.3; }
.button.primary { background: var(--blue); color: white; box-shadow: 0 2px 4px #2549e82c; }
.button.primary:hover { background: var(--blue-dark); }
.button.ghost { background: white; border-color: var(--line); color: var(--ink); }
.button.ghost:hover { background: #f2f5ff; border-color: #bec9f6; }
.button.mint { background: var(--mint); color: #072a23; }
.button.mint:hover { background: #c7fae9; }
.button.fill { width: 100%; }
.text-button { border: 0; background: transparent; padding: 0; color: var(--blue-dark); font-weight: 660; text-align: left; display: inline-flex; align-items: center; gap: 6px; }
.text-button:hover { text-decoration: underline; }
.error { background: #fff0ef; border: 1px solid #f2c9c6; color: #8c241e; border-radius: 9px; padding: 11px 13px; font-size: 14px; line-height: 1.45; }
.loading { margin: 5rem auto; max-width: 1000px; padding: 1rem; }
.toast { position: fixed; z-index: 15; right: 24px; bottom: 24px; max-width: min(480px, calc(100% - 48px)); padding: 13px 17px; background: var(--navy); color: white; border-radius: 10px; box-shadow: 0 8px 26px #13223a38; font-size: 14px; }

/* Shared marks and icons */
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 780; font-size: 25px; letter-spacing: -.055em; white-space: nowrap; width: fit-content; }
.brand-point { color: var(--blue); }
.brand-mark { width: 35px; height: 35px; border-radius: 10px; background: var(--blue); display: inline-flex; justify-content: center; align-items: flex-end; padding-bottom: 9px; gap: 3px; box-shadow: 0 3px 8px #2549e830; transform: rotate(-5deg); }
.brand-mark i { display: block; width: 4px; background: #fff; border-radius: 3px; }
.brand-mark i:nth-child(1) { height: 8px; }
.brand-mark i:nth-child(2) { height: 13px; }
.brand-mark i:nth-child(3) { height: 18px; background: var(--mint); }
.icon { display: inline-block; position: relative; width: 17px; height: 17px; flex: 0 0 17px; color: inherit; vertical-align: middle; }
.icon::before, .icon::after { position: absolute; content: ""; display: block; }
.i-arrow::before { width: 11px; height: 1.5px; background: currentColor; top: 8px; left: 2px; }
.i-arrow::after { width: 7px; height: 7px; border-block-start: 1.5px solid; border-inline-end: 1.5px solid; transform: rotate(45deg); top: 5px; right: 3px; }
.i-plus::before, .i-plus::after { background: currentColor; top: 8px; left: 3px; width: 11px; height: 1.5px; }
.i-plus::after { transform: rotate(90deg); }
.i-grid::before { width: 6px; height: 6px; border-radius: 1.5px; background: currentColor; top: 1px; left: 1px; box-shadow: 9px 0, 0 9px, 9px 9px; }
.i-chart::before { width: 3px; height: 7px; bottom: 2px; left: 2px; border-radius: 1px; background: currentColor; }
.i-chart::after { width: 3px; height: 14px; bottom: 2px; right: 2px; border-radius: 1px; background: currentColor; box-shadow: -5px 3px 0 -0.1px currentColor; clip-path: polygon(-200% 23%, 0 23%, 0 0, 100% 0, 100% 100%, -200% 100%); }
.i-code::before, .i-code::after { width: 7px; height: 7px; border: solid currentColor; border-width: 0 0 1.7px 1.7px; top: 5px; left: 2px; border-radius: 1px; transform: rotate(45deg); }
.i-code::after { left: auto; right: 2px; transform: rotate(225deg); }
.i-scan::before { inset: 1px; background:
  linear-gradient(currentColor, currentColor) left top / 5px 1.5px,
  linear-gradient(currentColor, currentColor) right top / 5px 1.5px,
  linear-gradient(currentColor, currentColor) left bottom / 5px 1.5px,
  linear-gradient(currentColor, currentColor) right bottom / 5px 1.5px,
  linear-gradient(currentColor, currentColor) left top / 1.5px 5px,
  linear-gradient(currentColor, currentColor) right top / 1.5px 5px,
  linear-gradient(currentColor, currentColor) left bottom / 1.5px 5px,
  linear-gradient(currentColor, currentColor) right bottom / 1.5px 5px;
  background-repeat: no-repeat; }
.i-scan::after { width: 9px; height: 1.5px; background: currentColor; left: 4px; top: 8px; }
.i-lock::before { width: 12px; height: 8px; border: 1.5px solid currentColor; border-radius: 2px; top: 7px; left: 2.5px; }
.i-lock::after { width: 7px; height: 6px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 5px 5px 0 0; top: 2px; left: 5px; }
.i-search::before { width: 10px; height: 10px; border: 1.5px solid; border-radius: 50%; top: 1px; left: 1px; }
.i-search::after { width: 6px; height: 1.5px; background: currentColor; transform: rotate(45deg); top: 11px; left: 8px; }
.i-upload::before { width: 11px; height: 6px; border: 1.5px solid; border-top: 0; border-radius: 0 0 2px 2px; left: 3px; bottom: 1px; }
.i-upload::after { width: 7px; height: 7px; border: 1.5px solid; border-width: 1.5px 0 0 1.5px; transform: rotate(45deg); top: 3px; left: 5px; }
.chevron { display: inline-block; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); width: 7px; height: 7px; margin-inline: 2px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #344a76; letter-spacing: .13em; font-size: 10px; font-weight: 770; }
.eyebrow > span, .portal-aside-foot > span { width: 6px; height: 6px; border-radius: 50%; background: #4c68f5; display: inline-block; }

/* Entry and participant */
.portal { max-width: 1420px; padding: 0 52px; margin: 0 auto; min-height: 100svh; display: flex; flex-direction: column; }
.portal-header { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.portal-header .ghost { background: transparent; }
.portal-grid { display: grid; grid-template-columns: minmax(0, .91fr) minmax(0, 1.09fr); align-items: stretch; flex: 1; min-height: 600px; max-height: 800px; background: white; border-radius: 24px; border: 1px solid var(--line); box-shadow: 0 10px 30px #1524420a; overflow: hidden; }
.portal-form { align-self: center; padding: clamp(30px, 5vw, 76px); max-width: 565px; width: 100%; margin: auto; }
.portal-form h1 { font-size: clamp(30px, 4vw, 47px); margin: 15px 0 12px; }
.form-symbol { display: inline-grid; place-items: center; width: 49px; height: 49px; background: var(--pale); color: var(--blue-dark); border-radius: 14px; font-weight: 730; }
.form-symbol .icon { transform: scale(1.18); }
.stack-form { display: grid; gap: 15px; margin-top: 25px; }
label { display: grid; gap: 7px; color: var(--ink); font-size: 14px; font-weight: 650; min-width: 0; }
input:not([type="radio"]), textarea, select { display: block; width: 100%; min-height: 43px; background: white; border: 1px solid #d5ddeb; border-radius: 9px; padding: 10px 12px; color: var(--ink); font-weight: 450; font-size: 15px; }
input:not([type="radio"])::placeholder, textarea::placeholder { color: #69758a; }
textarea { resize: vertical; line-height: 1.55; }
input[type="radio"] { accent-color: var(--blue); width: 17px; height: 17px; margin: 0; }
.stack-form input { min-height: 47px; }
input.code-input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.help-text { color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 20px; font-size: 12px; line-height: 1.5; }
.portal-aside { position: relative; overflow: hidden; background: radial-gradient(ellipse at 90% 62%, #234478, transparent 69%), var(--navy); color: #fff; display: flex; flex-direction: column; padding: clamp(30px, 5vw, 64px); isolation: isolate; }
.portal-aside::before, .hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(#a6b9ff62 1px, transparent 1px); background-size: 23px 23px; mask-image: linear-gradient(130deg, transparent 12%, black 84%); }
.portal-aside .eyebrow { color: #c5d4f2; }
.portal-aside .eyebrow > span, .portal-aside-foot > span { background: var(--mint); }
.portal-message > p { position: relative; z-index: 2; margin-top: 15px; font-size: clamp(35px, 5vw, 68px); font-weight: 760; letter-spacing: -.06em; line-height: .99; }
.portal-message > p > span { color: var(--mint); }
.portal-caption { position: relative; z-index: 2; color: #c5d4f2; margin-top: 16px; line-height: 1.55; max-width: 255px; }
.portal-aside .art { position: absolute; right: clamp(32px, 9vw, 132px); bottom: 78px; transform: scale(1.25); }
.portal-aside-foot { position: relative; z-index: 2; margin-top: auto; font-size: 12px; color: #c5d4f2; display: flex; align-items: center; gap: 8px; }
.portal-footer { min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }
.student-header { padding: 0 max(24px, calc((100vw - 1140px) / 2)); background: white; border-bottom: 1px solid var(--line); }
.student-page.container { max-width: 810px; }
.student-page h1 { margin-top: 12px; }
.student-question { margin: 18px 0; min-width: 0; }
.student-question legend { background: var(--pale); border: 1px solid #d8e0ff; border-radius: 7px; color: var(--blue-dark); font-size: 12px; font-weight: 700; padding: 5px 9px; }
.student-prompt { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 17px; font-weight: 650; margin-bottom: 14px; line-height: 1.55; }
.student-options { display: grid; gap: 8px; }
.student-options label { display: flex; gap: 11px; align-items: center; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; overflow-wrap: anywhere; }
.student-options input { flex: 0 0 17px; }
.student-options label:has(input:checked) { border-color: #8da1ff; background: var(--pale); }
.progress-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.progress-line progress { max-width: 55%; width: 240px; height: 10px; accent-color: var(--blue); }
.submitted { display: grid; justify-items: start; gap: 12px; }

/* Teacher workspace */
.topbar { background: white; border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1240px; margin: auto; min-height: 68px; padding: 0 28px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 26px; }
.tabs { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.tab { min-height: 37px; border: 0; border-radius: 8px; padding: 8px 12px; display: flex; align-items: center; justify-content: center; gap: 7px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 650; white-space: nowrap; }
.tab:hover, .tab.current { background: var(--pale); color: var(--blue-dark); }
.tab .icon { transform: scale(.87); }
.profile { display: flex; align-items: center; gap: 18px; }
.join-link { display: flex; gap: 4px; align-items: center; color: var(--blue-dark); font-size: 13px; font-weight: 650; white-space: nowrap; }
.join-link:hover { text-decoration: underline; }
.profile-menu { position: relative; }
.profile-menu summary { display: flex; align-items: center; gap: 8px; color: var(--muted); cursor: pointer; list-style: none; }
.profile-name { max-width: 135px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
summary::-webkit-details-marker { display: none; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #e7edff; color: var(--blue-dark); font-size: 12px; font-weight: 760; }
.profile-popup { position: absolute; z-index: 5; right: 0; top: calc(100% + 12px); min-width: 190px; max-width: 250px; border: 1px solid var(--line); border-radius: 12px; background: white; display: grid; gap: 10px; padding: 14px; box-shadow: 0 10px 25px #1524421a; }
.profile-popup span { font-size: 12px; overflow-wrap: anywhere; }
.container { width: min(100%, 1196px); padding: 34px 28px 40px; margin: auto; }
.dashboard-intro { margin-bottom: 22px; }
.dashboard-intro h1, .page-heading h1 { margin: 9px 0 7px; }
.dashboard-intro h1 { font-size: clamp(37px, 5vw, 50px); }
.page-heading { margin-bottom: 22px; }
.hero { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius); background: radial-gradient(ellipse at 90% 64%, #23487d, transparent 78%), var(--navy); color: white; min-height: 206px; padding: 29px 32px; display: flex; align-items: center; }
.hero-content { position: relative; z-index: 3; max-width: 420px; }
.hero h2 { font-size: clamp(27px, 5vw, 38px); letter-spacing: -.045em; }
.hero p { margin-top: 8px; margin-bottom: 17px; color: #d1dbef; line-height: 1.54; }
.hero .art { position: absolute; right: 94px; top: calc(50% - 83px); }
.art { width: 220px; height: 170px; filter: drop-shadow(0 11px 13px #07142a45); }
.art-orbit { position: absolute; width: 243px; height: 143px; left: -12px; top: 16px; border-radius: 50%; border: 1px solid #a9c4ff66; transform: rotate(-18deg); }
.art-orbit::before { content: ""; position: absolute; inset: 13px; border: 1px solid #a9c4ff47; border-radius: 50%; }
.sheet, .sheet-back { position: absolute; width: 112px; height: 139px; border-radius: 12px; top: 16px; left: 52px; }
.sheet-back { border: 1px solid #a3bdff80; background: #48679b; transform: translate(22px, -6px) rotate(18deg); }
.sheet { padding: 16px 13px; background: #f6f8ff; transform: rotate(-10deg); }
.sheet-title, .sheet-subtitle { border-radius: 4px; background: #3651a0; width: 67%; height: 7px; }
.sheet-subtitle { background: #b6c1de; width: 88%; height: 4px; margin: 6px 0 12px; }
.sheet-row { height: 22px; display: flex; align-items: center; gap: 7px; }
.sheet-row span { width: 12px; height: 12px; border: 1px solid #9aabd1; border-radius: 4px; }
.sheet-row i { width: 62%; height: 4px; background: #c2cde4; border-radius: 4px; }
.sheet-row.good span { background: #bbf5e0; color: #127455; border: 0; font-size: 9px; text-align: center; font-weight: 800; }
.sheet-row.good i { background: #83bfb0; width: 74%; }
.art-tick { width: 41px; height: 41px; border-radius: 12px; display: grid; place-items: center; background: var(--mint); color: #184e44; font-size: 24px; font-weight: 800; position: absolute; right: 30px; bottom: 24px; transform: rotate(11deg); box-shadow: 0 6px 13px #07142a40; }
.art-glint { position: absolute; right: 8px; top: 19px; color: #c3d3ff; font-size: 23px; }
.art-dot { width: 6px; height: 6px; border-radius: 50%; background: #a0edd7; position: absolute; left: 18px; bottom: 31px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 16px 0 20px; }
.stat { display: flex; align-items: center; gap: 13px; padding: 15px; border: 1px solid var(--line); background: white; border-radius: 13px; }
.stat-icon, .upload-icon, .empty-icon { background: var(--pale); color: var(--blue-dark); display: grid; place-items: center; border-radius: 11px; width: 40px; height: 40px; flex: 0 0 40px; }
.stat:nth-child(2) .stat-icon { background: #e0f8ef; color: #166849; }
.stat:nth-child(3) .stat-icon { background: #eee8fb; color: #6a41a0; }
.stat p { color: var(--muted); font-size: 12px; }
.stat strong { display: block; font-size: 24px; line-height: 1.2; font-weight: 750; margin-top: 1px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: white; min-width: 0; box-shadow: 0 2px 5px #15244205; }
.padded { padding: 22px; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 19px 22px; }
.list-head.no-padding { padding: 0 0 14px; }
.list-head p, .empty p, .empty-label { color: var(--muted); font-size: 13px; margin-top: 5px; line-height: 1.5; }
.empty { padding: 23px 16px 27px; text-align: center; display: grid; justify-items: center; }
.empty-icon { margin-bottom: 10px; }
.list-filters { display: grid; grid-template-columns: minmax(0, 320px) auto; justify-content: start; gap: 10px; padding: 0 22px 12px; }
.search { position: relative; color: var(--muted); }
.search .icon { position: absolute; top: 13px; left: 12px; }
.search input { padding-left: 38px; }
.table-scroll { overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th { color: var(--muted); background: #f6f8fc; font-weight: 650; }
th, td { padding: 12px 15px; border-top: 1px solid #ebeff5; }
th:first-child, td:first-child { padding-left: 22px; }
th:last-child, td:last-child { padding-right: 22px; }
.work-name { display: block; overflow-wrap: anywhere; max-width: 350px; color: var(--ink); font-size: 14px; }
.cell-sub { display: block; margin-top: 4px; color: var(--muted); max-width: 350px; overflow-wrap: anywhere; font-size: 12px; }
.chip { display: inline-flex; width: fit-content; align-items: center; gap: 6px; border-radius: 7px; padding: 5px 8px; color: #354866; background: #eef2f8; font-size: 11px; font-weight: 690; white-space: nowrap; }
.chip i { width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.chip.open { background: #dcf7eb; color: #166548; }
.chip.type-test { background: #e9efff; color: #2a44aa; }
.chip.type-control { background: #f1ebfa; color: #6b3ca0; }
.chip.type-exam { background: #fcefe3; color: #884e23; }
.chip.type-credit { background: #e0f7f5; color: #216a68; }
.code-text { border: 0; background: transparent; color: var(--blue-dark); padding: 0; font: 700 13px ui-monospace, Consolas, monospace; white-space: nowrap; }
.code-text:hover { text-decoration: underline; }
.main-footer { color: var(--muted); font-size: 12px; width: min(100%, 1196px); padding: 0 28px 22px; margin: auto; }

/* Import, editor, and review */
.import-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
.drop-zone { margin-top: 14px; min-height: 152px; border: 1px dashed #97a9ed; border-radius: 13px; padding: 16px; background: #f7f9ff; color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center; position: relative; cursor: pointer; }
.drop-zone:hover, .drop-zone.drag, .drop-zone:focus-within { background: var(--pale); border-color: var(--blue); }
.drop-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-zone span:last-child { color: var(--muted); font-weight: 450; font-size: 12px; }
.drop-zone strong { overflow-wrap: anywhere; max-width: 100%; }
.form-actions { margin-top: 12px; display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.import-note { background: #edf2ff; border-color: #dce5ff; display: grid; align-content: start; gap: 10px; }
.import-note p { color: #405374; font-size: 14px; line-height: 1.6; }
.import-note .text-button { margin-top: 3px; }
.source-panel, .import-result { margin-top: 16px; }
.source-panel h2, .import-result h2 { margin-bottom: 6px; }
.source-panel textarea, .source-panel .error, .import-result .error { margin-top: 12px; }
.preview-list { padding-inline-start: 20px; }
.preview-list li { padding: 9px 4px; border-bottom: 1px solid var(--line); }
.preview-list li > div { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.preview-list p, .preview-list strong { overflow-wrap: anywhere; }
.preview-list p { margin-top: 5px; color: var(--muted); font-size: 13px; }
.back { margin-bottom: 10px; }
.editor-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(235px, .42fr); gap: 16px; align-items: start; }
.editor-form { display: grid; gap: 16px; min-width: 0; }
.editor-form h2 { margin-bottom: 12px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.publish-box { position: sticky; top: 14px; display: grid; gap: 11px; }
.publish-box p { color: var(--muted); line-height: 1.55; font-size: 14px; }
.publish-box .small { font-size: 12px; }
.large-code { border: 1px dashed #8599f3; padding: 13px 8px; border-radius: 10px; width: 100%; font: 700 clamp(19px, 4vw, 27px) ui-monospace, Consolas, monospace; letter-spacing: .12em; color: var(--blue-dark); background: var(--pale); }
.large-code:hover { background: #e1e8ff; }
.close-copy { font-size: 13px; color: #952e2a; width: fit-content; }
.result-shortcut { margin-top: 4px; font-size: 13px; }
.question-section { display: grid; gap: 11px; }
.section-title { display: flex; align-items: center; gap: 8px; }
.section-title h2 { margin: 0; }
.question { display: grid; gap: 12px; }
.question-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 9px; }
.question-num { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: var(--pale); color: var(--blue-dark); font-size: 13px; font-weight: 700; }
.points { display: flex; align-items: center; }
.points input { width: 66px; }
.icon-button { padding: 5px; min-height: 32px; height: 32px; width: 32px; background: #f3f5fa; font-size: 20px; color: #5c6381; }
.icon-button:hover { background: #fff0ef; color: #952e2a; }
.option-list { display: grid; gap: 7px; }
.option-editor { display: flex; align-items: center; gap: 9px; }
.option-editor > input[type="radio"] { flex: 0 0 17px; }
.option-list .text-button { margin-top: 4px; font-size: 13px; }
.editor-actions { display: flex; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.results-list h2 { margin-bottom: 12px; }
.result-row { width: 100%; min-height: 56px; text-align: left; border: 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: white; color: var(--ink); padding: 10px 7px; }
.result-row:hover { background: #f6f8ff; }
.result-row strong, .attempt-details strong { overflow-wrap: anywhere; }
.result-row small, .attempt-details small { display: block; color: var(--muted); margin-top: 4px; font-size: 12px; }
.run + .run { margin-top: 16px; }
.attempt-details summary { display: grid; grid-template-columns: 1fr auto auto; gap: 11px; align-items: center; cursor: pointer; list-style: none; border-top: 1px solid var(--line); padding: 11px 4px; }
.attempt-details[open] summary .chevron { transform: rotate(225deg); }
.attempt-score { font-size: 14px; font-weight: 670; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.answers-list { padding-inline-start: 25px; }
.answers-list li { color: var(--ink); padding: 6px 4px 11px; overflow-wrap: anywhere; }
.answers-list li + li { border-top: 1px solid var(--line); }
.answers-list li p { white-space: pre-wrap; margin: 4px 0 6px; color: var(--muted); font-size: 14px; }
.grade-form { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.grade-form input { width: 95px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; align-items: start; }
.admin-stack { display: grid; gap: 16px; }
.admin-form { margin-top: 17px; }
.invite-issued { background: #effaf6; border-color: #caeadf; display: grid; gap: 10px; }
.invite-issued .button { justify-self: start; }
.invite-issued input { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.account-list { list-style: none; padding: 0; margin: 14px 0 0; }
.account-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px 14px; border-top: 1px solid var(--line); padding: 12px 0; }
.account-list li > div { min-width: 0; display: grid; justify-items: start; gap: 4px; overflow-wrap: anywhere; }
.account-list li > div > span:not(.chip) { font-size: 13px; color: var(--muted); }
.account-list .button { flex-shrink: 0; }
.admin-back { margin-top: 16px; }

@media (max-width: 950px) {
  .profile-name, .join-link { display: none; }
  .portal { padding: 0 30px; }
  .portal-aside .art { right: 42px; transform: scale(1.07); }
  .hero .art { right: 57px; }
}
@media (max-width: 720px) {
  .portal { padding: 0 18px; }
  .portal-header { min-height: 68px; }
  .portal-grid { display: flex; flex-direction: column; min-height: 0; max-height: none; border-radius: 17px; }
  .portal-form { padding: 27px 20px; }
  .portal-aside { min-height: 245px; padding: 22px 20px; }
  .portal-message > p { font-size: clamp(31px, 8vw, 48px); }
  .portal-caption { font-size: 13px; max-width: 160px; }
  .portal-aside .art { right: -10px; bottom: 17px; transform: scale(.67); }
  .portal-footer { min-height: 50px; }
  .top-inner { grid-template-columns: 1fr auto; gap: 7px 12px; padding: 10px 18px 4px; }
  .profile { grid-column: 2; grid-row: 1; }
  .tabs { grid-column: 1 / -1; grid-row: 2; justify-content: start; gap: 3px; }
  .tab { padding: 8px; font-size: 12px; }
  .container { padding: 25px 17px 30px; }
  .hero { min-height: 190px; padding: 20px; }
  .hero-content { max-width: min(100%, 330px); }
  .hero p { font-size: 14px; }
  .hero .art { opacity: .35; right: -24px; transform: scale(.8); }
  .stat-grid { gap: 7px; }
  .stat { padding: 8px; gap: 6px; }
  .stat p { font-size: 11px; }
  .stat .stat-icon { width: 30px; height: 30px; flex-basis: 30px; }
  .stat .stat-icon .icon { transform: scale(.8); }
  .list-head { padding: 14px; }
  .list-filters { padding: 0 14px 12px; }
  .table-scroll table, .table-scroll tbody { display: block; }
  .table-scroll thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .table-scroll tr { display: grid; grid-template-columns: repeat(4, auto); align-items: center; justify-content: start; gap: 8px 13px; padding: 12px 14px; border-top: 1px solid var(--line); }
  .table-scroll td, .table-scroll td:first-child, .table-scroll td:last-child { padding: 0; border: 0; }
  .table-scroll td:first-child { grid-column: 1 / -1; }
  .table-scroll td:last-child { color: var(--muted); font-size: 12px; }
  .import-grid, .editor-grid, .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .publish-box { position: static; }
  .padded { padding: 15px; }
}
@media (max-width: 420px) {
  .brand { font-size: 21px; gap: 7px; }
  .brand-mark { width: 31px; height: 31px; padding-bottom: 7px; }
  .portal-header .button { font-size: 12px; padding: 7px 8px; min-height: 36px; }
  .portal-aside .art { opacity: .6; right: -35px; }
  .stat { display: grid; align-content: start; }
  .stat strong { font-size: 20px; }
  .list-head { align-items: start; flex-wrap: wrap; }
  .list-filters { grid-template-columns: minmax(0, 1fr); justify-content: stretch; }
  .table-scroll tr { grid-template-columns: auto auto; }
  .editor-heading { flex-wrap: wrap; }
  .question-head { grid-template-columns: auto 1fr auto; }
  .question-head .points { grid-row: 2; grid-column: 2; }
  .question-head .icon-button { grid-column: 3; grid-row: 1; }
}
