@font-face {
  font-family: Onest;
  src: url("/onest.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Unbounded;
  src: url("/unbounded.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #191a1e;
  --muted: #626570;
  --blue: #1742d7;
  --dark: #141517;
  --border: #dedee1;
  --paper: #f5f5f4;
  --surface: #fff;
  --blue-soft: #e9efff;
  --radius: 18px;
  --sans: Onest, system-ui, sans-serif;
  --display: Unbounded, var(--sans);
  --mono: "SFMono-Regular", "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 var(--sans); }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button, summary { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, h4, h5, p, pre, dl, dd { margin: 0; }
h1, h2, h3, h4, h5 { line-height: 1.08; letter-spacing: -.043em; font-weight: 590; }
h1 { font-size: clamp(37px, 5vw, 72px); }
h2 { font-size: clamp(22px, 2.45vw, 33px); }
h3 { font-size: 20px; }
p { overflow-wrap: anywhere; }
pre, code, .mono { font-family: var(--mono); }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
svg { flex: none; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.loading, .empty { padding: 21px 3px; color: var(--muted); }
#app > .loading { padding: 32px; }
.kicker { font-size: 11px; font-weight: 650; letter-spacing: .10em; text-transform: uppercase; color: var(--muted); }
.muted, .page-title > p:not(.kicker) { color: var(--muted); }
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 620;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}
.primary { background: var(--blue); color: white; }
.primary:hover { background: #1034ba; }
.secondary, .file-link { background: #f7f7f8; color: var(--ink); border-color: var(--border); }
.secondary:hover, .file-link:hover { background: var(--blue-soft); }
.hero-button { background: #fff; color: #191a1e; }
.hero-button:hover { background: #e7edff; }
.text-link, .back { color: var(--blue); text-decoration: none; font-weight: 620; }
.text-link:hover, .back:hover { text-decoration: underline; text-underline-offset: 4px; }
.back { display: inline-block; margin-bottom: 21px; font-size: 13px; }

.app-header { position: sticky; top: 0; z-index: 5; background: #fbfbfa; border-bottom: 1px solid var(--border); }
.app-bar, .staff-nav, #main { width: min(100%, 1330px); margin: 0 auto; padding-inline: clamp(18px, 4vw, 54px); }
.app-bar { min-height: 66px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(12px, 3vw, 38px); }
.brand { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 740; letter-spacing: -.06em; text-decoration: none; line-height: 1; white-space: nowrap; }
.brand img { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; background: white; }
.main-nav, .staff-nav { display: flex; gap: 3px; align-items: center; }
.main-nav { justify-content: center; }
.main-nav a, .staff-nav a {
  display: inline-flex;
  flex: none;
  gap: 6px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 8px;
  color: #525560;
  font-size: 13px;
  font-weight: 540;
  white-space: nowrap;
  text-decoration: none;
}
.main-nav svg, .staff-nav svg { width: 15px; height: 15px; }
.main-nav a[aria-current=page], .staff-nav a[aria-current=page] { color: var(--blue); background: var(--blue-soft); }
.main-nav a:hover, .staff-nav a:hover { color: var(--blue); }
.staff-bar { border-top: 1px solid #e8e8e9; background: #f2f2f2; }
.staff-nav { min-height: 43px; }
.staff-label { font: 600 11px/1.2 var(--mono); color: var(--muted); padding-right: 11px; }
.account-menu { display: flex; align-items: center; gap: 8px; }
.account, .logout { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; text-decoration: none; }
.account { background: #e9ecf4; color: #283866; font-size: 14px; font-weight: 700; }
.logout { background: transparent; color: #626570; }
.logout:hover { background: #ebebef; }
#main { min-width: 0; padding-block: clamp(24px, 4.1vw, 53px) 58px; }
.page-title { margin-bottom: clamp(22px, 3vw, 34px); }
.page-title .kicker { margin-bottom: 8px; }
.page-title h1 { overflow-wrap: anywhere; }
.page-title > p:not(.kicker) { max-width: 650px; margin-top: 11px; }
.home-title { display: flex; justify-content: space-between; gap: 12px; align-items: end; }
.judge-state { flex: none; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.judge-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #8d9099; }
.judge-state.online::before { background: #248663; }
.tech-label, .count-tag { padding: 4px 7px; border-radius: 5px; background: #eeeff1; color: #4a4e59; font: 600 11px/1.4 var(--mono); white-space: nowrap; }

.dashboard-hero, .login-banner, .studio-banner {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--dark);
  color: #f9f9fa;
  border-radius: var(--radius);
}
.feature-art {
  position: absolute;
  z-index: -1;
  right: 0;
  top: 0;
  width: 68%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  mask-image: linear-gradient(to right, transparent 0, #000 28%);
}
.dashboard-hero .kicker, .login-banner .kicker, .studio-banner .kicker { color: #c7cbda; margin-bottom: 8px; }
.dashboard-hero p:not(.kicker), .login-banner p:not(.kicker), .studio-banner p:not(.kicker) { color: #d0d1d7; margin-top: 10px; max-width: 560px; }
.dashboard-hero { min-height: 306px; display: grid; align-items: end; padding: clamp(24px, 3.4vw, 42px); }
.dashboard-hero h2 { font-size: clamp(33px, 4.3vw, 63px); max-width: 12ch; letter-spacing: -.06em; }
.hero-content { position: relative; z-index: 1; max-width: 65%; }
.dashboard-hero .button { margin-top: 19px; }

.home-overview, .home-content { display: grid; grid-template-columns: minmax(0, 1.95fr) minmax(0, 1fr); gap: 14px; }
.home-content { margin-top: 34px; align-items: start; }
.home-progress { border: 1px solid var(--border); border-radius: var(--radius); background: #fcfcfb; padding: clamp(19px, 2.7vw, 32px); }
.home-progress h2 { font-size: 25px; margin-top: 4px; }
.progress-lead { display: flex; align-items: center; gap: 12px; margin: 20px 0 12px; }
.progress-lead strong { font: 520 clamp(48px, 6vw, 78px)/1 var(--display); letter-spacing: -.08em; color: var(--blue); }
.progress-lead span { color: var(--muted); font-size: 13px; line-height: 1.35; }
.home-progress progress { display: block; width: 100%; height: 5px; border: 0; border-radius: 20px; accent-color: var(--blue); overflow: hidden; background: #e5e5e8; }
.home-progress progress::-webkit-progress-bar { background: #e5e5e8; }
.home-progress progress::-webkit-progress-value { background: var(--blue); border-radius: 20px; }
.home-progress progress::-moz-progress-bar { background: var(--blue); border-radius: 20px; }
.home-progress dl { margin-top: 16px; }
.home-progress dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-top: 1px solid var(--border); padding: 8px 0; }
.home-progress dt { font-size: 13px; color: var(--muted); }
.home-progress dd { font: 650 12px/1.4 var(--mono); }
.home-side { display: grid; gap: 9px; min-width: 0; }
.home-side .card { margin: 0; }
.home-side .latest h2 { font-size: 24px; }
.home-side .history-row > svg { display: none; }
.home-shortcut { display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--border); border-radius: 11px; background: #fcfcfb; text-decoration: none; }
.home-shortcut > span:nth-child(2) { flex: 1; display: grid; }
.home-shortcut strong { font-weight: 610; }
.home-shortcut small { color: var(--muted); font-size: 12px; }
.home-shortcut:hover { border-color: #a5b6fc; }
.shortcut-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); flex: none; }

.module-track { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border); }
.module-track li { border-bottom: 1px solid var(--border); }
.module-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 15px; min-height: 88px; padding: 11px 6px; text-decoration: none; }
a.module-row:hover { background: #e9eeff; }
.module-number { color: #838793; font: 440 21px/1.15 var(--display); letter-spacing: -.06em; }
.module-open .module-number { color: var(--blue); }
.module-info { display: grid; gap: 2px; min-width: 0; }
.module-info strong { font-size: clamp(17px, 2vw, 25px); line-height: 1.16; letter-spacing: -.035em; font-weight: 590; overflow-wrap: anywhere; }
.module-range, .module-info small { color: var(--muted); font-size: 11px; }
.module-range { font-weight: 620; letter-spacing: .06em; text-transform: uppercase; }
.module-arrow { color: var(--muted); }
.module-open .module-arrow { color: var(--blue); }

.card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: clamp(15px, 2.7vw, 25px); min-width: 0; margin-bottom: 14px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.section-title .kicker { margin-bottom: 4px; }
.task-row, .history-row { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #eaeaec; padding: 12px 4px; text-decoration: none; min-width: 0; }
.task-row:last-child, .history-row:last-child { border-bottom: 0; }
a.task-row:hover, a.history-row:hover { background: #f5f7ff; }
.task-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 7px; background: var(--blue-soft); color: #2844a7; flex: none; font: 650 14px var(--mono); }
.task-icon.solved { background: #e0f2e9; color: #21644e; }
.locked-row .task-icon { background: #f0f0f2; color: #717583; }
.task-text { display: grid; gap: 2px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.task-text strong { font-weight: 620; }
.task-text small, .serial { font-size: 11px; color: var(--muted); }
.task-end { color: var(--blue); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 650; line-height: 1.25; text-align: center; }
.pill svg { width: 13px; height: 13px; }
.pill.ok { background: #e2f3ea; color: #215943; }
.pill.bad { background: #fce8e9; color: #8e283d; }
.pill.warn { background: #fff0d8; color: #724219; }
.pill.pending { background: #edf0f7; color: #475271; }

.studio-banner { display: flex; align-items: center; justify-content: space-between; gap: 17px; padding: clamp(20px, 3vw, 35px); margin-bottom: 18px; }
.studio-banner h1 { font-size: clamp(28px, 4.5vw, 55px); }
.round-tabs { display: flex; flex-wrap: wrap; gap: 15px; margin: 0 0 16px; border-bottom: 1px solid var(--border); }
.round-tabs a { padding: 11px 4px; border-bottom: 2px solid transparent; color: #4c505b; text-decoration: none; font-weight: 620; }
.round-tabs a:hover, .round-tabs a[aria-current=page] { color: var(--blue); border-bottom-color: var(--blue); }
.round-score { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0 10px; }
.round-score > div { display: grid; gap: 3px; padding: 12px 15px; background: var(--blue-soft); color: #2844a7; border-radius: 9px; }
.round-score > div:nth-child(2) { background: #e7f4ed; color: #245745; }
.round-score strong { font: 550 22px var(--display); }
.round-score span { font-size: 12px; }
.material-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 15px; }
.material-card { background: #f3f4f6; border-radius: 10px; padding: 15px; }
.material-card:nth-child(2) { background: var(--blue-soft); }
.material-card h3 { margin: 5px 0 8px; }
.material-card p:not(.kicker) { font-size: 13px; color: var(--muted); }
.material-card .text-link { display: inline-block; margin-top: 7px; font-size: 13px; }
.material-card video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; background: var(--dark); }

.workspace { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 16px; align-items: start; }
.limits { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 15px; }
.limits span { background: #eef0f4; color: #4b5262; font: 600 11px/1.4 var(--mono); border-radius: 5px; padding: 5px 7px; }
.statement h3, .result-card h3 { margin-top: 20px; margin-bottom: 8px; }
.statement p { margin-top: 8px; white-space: pre-wrap; }
.statement summary { font-weight: 650; }
.statement code { padding: 1px 4px; background: #eef0f5; border-radius: 4px; }
.statement ul { padding-left: 22px; }
#statement-body { border-top: 1px solid var(--border); margin-top: 13px; padding-top: 14px; }
#statement-body .limits { margin: 10px 0; }
.example { padding: 12px; border: 1px solid var(--border); border-radius: 9px; margin: 9px 0; background: #f9f9f8; }
.example h4 { font-size: 13px; letter-spacing: 0; }
.example > div, .test-detail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.example h5 { font-size: 11px; color: var(--muted); letter-spacing: 0; margin-bottom: 5px; }
.example pre, .test-detail pre { background: #eeeff2; padding: 9px; border-radius: 5px; font-size: 12px; max-height: 180px; overflow: auto; }
.hint, .source-review { margin-top: 14px; }
.hint summary, .source-review summary { color: var(--blue); font-weight: 650; }
.editor { overflow: hidden; border-radius: var(--radius); border: 1px solid #292a30; background: #202127; color: #f0f2fb; }
.editor-head, .editor-meta, .editor-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 15px; }
.editor-head { background: #28292e; border-bottom: 1px solid #3b3d45; }
.editor-head > div { display: flex; align-items: center; gap: 8px; }
.editor-head h2 { font: 650 13px var(--mono); letter-spacing: 0; }
.editor-dot { width: 7px; height: 7px; border-radius: 50%; background: #80a1fb; }
.editor .tech-label { background: #393b44; color: #e6e8f1; }
.code-area { display: grid; grid-template-columns: auto minmax(0, 1fr); background: #18191e; }
.code-area pre, .code-area textarea { font: 14px/1.65 var(--mono); padding: 14px 10px; white-space: pre; height: 340px; margin: 0; }
.code-area pre { min-width: 42px; overflow: hidden; color: #9295a3; text-align: right; user-select: none; border-right: 1px solid #34353c; }
.code-area textarea#source { display: block; border: 0; border-radius: 0; resize: vertical; min-height: 220px; color: #e8efff; background: transparent; tab-size: 4; overflow: auto; }
.code-area textarea:focus-visible { outline-offset: -3px; }
.editor-meta, .editor-keys { color: #c3c5d0; font-size: 11px; }
.editor-keys { padding: 0 15px 10px; }
.editor-actions { justify-content: flex-end; flex-wrap: wrap; padding-top: 0; }
.editor .form-message { padding: 0 15px 8px; color: #ffc7d2; }
.progress-count { margin: 12px 0; color: var(--blue); }
.diagnostic, .source-review pre { margin-top: 10px; background: #23242a; color: #e7edff; border-radius: 8px; padding: 14px; font-size: 12px; max-height: 340px; overflow: auto; }
.test-result { border: 1px solid var(--border); border-radius: 9px; margin-top: 8px; padding: 10px; }
.test-result summary { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; cursor: pointer; }
.test-result summary small { color: var(--muted); font-size: 11px; }
.test-result p { margin-top: 8px; color: var(--muted); font-size: 13px; }
.test-detail { grid-template-columns: repeat(3, minmax(0, 1fr)); font-size: 12px; }
.test-detail > .diagnostic { grid-column: 1/-1; }

.form-card label, .login-panel label { display: grid; gap: 6px; color: #3a3d47; font-size: 13px; font-weight: 620; }
.form-card h2 { margin-bottom: 13px; }
.form-card .section-title h2 { margin-bottom: 0; }
.form-card > label, .form-grid, .login-panel label { margin-bottom: 12px; }
.form-card p { font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.limits-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
input:not([type=checkbox]):not([type=file]), textarea, select { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid var(--border); border-radius: 8px; background: #fafaf9; color: var(--ink); }
textarea { resize: vertical; min-height: 65px; }
.file-link { position: relative; display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 7px; padding: 7px 10px; font-size: 12px; font-weight: 620; cursor: pointer; }
.file-link:focus-within { outline: 2px solid var(--blue); outline-offset: 3px; }
.file-link input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.form-message { font-size: 13px; color: #276355; margin-top: 8px; }
.form-message:empty { display: none; }
.bad-text { color: #982945; }
.test-edit { border: 1px solid var(--border); border-radius: 10px; min-width: 0; margin: 12px 0; padding: 10px 12px; }
.test-edit legend { padding: 0 5px; font-weight: 630; }
.test-edit .form-grid { margin-bottom: 0; }
.test-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
label.check { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 620; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--blue); }
.subtle-button { background: none; border: 0; color: #99304e; font-size: 12px; }
.save-bar > div { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.credentials { padding: 14px; margin-top: 13px; background: #e2f3ea; border-radius: 9px; color: #20513f; }
.credentials code { display: block; margin-top: 8px; overflow-wrap: anywhere; }
#course-start .muted, .material-dates { margin-bottom: 13px; }

.contest-banner { min-height: 164px; }
.contest-banner .feature-art { width: 47%; opacity: .56; }
.contest-list-hero .feature-art { width: 42%; opacity: .64; }
.contest-timer {
  width: 130px;
  height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: none;
  gap: 4px;
  border: 3px solid #6f8bf1;
  border-right-color: #33406c;
  border-bottom-color: #33406c;
  border-radius: 50%;
  background: #18191e;
}
.contest-timer span, .contest-task-clock strong { font: 600 19px var(--mono); font-variant-numeric: tabular-nums; }
.contest-timer small { color: #d2d7e8; font-size: 11px; }
.contest-timer progress { width: 64px; height: 5px; margin-top: 5px; accent-color: #a9baff; }
.contest-workspace, .contest-editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, .31fr); align-items: start; gap: 14px; }
.contest-progress { padding: 20px; border-radius: var(--radius); background: #1a1b20; color: #f5f5f7; }
.contest-progress .kicker { color: #b9bfd4; }
.contest-progress h2 { font-size: 24px; margin-top: 6px; }
.contest-progress p:not(.kicker) { color: #d7daea; }
.contest-progress .contest-score { font: 450 clamp(23px, 3vw, 35px)/1.3 var(--display); margin-top: 11px; }
.contest-score strong { color: #aebfff; font-weight: 550; }
.contest-progress ol { padding: 0; margin: 15px 0 0; list-style: none; display: flex; flex-wrap: wrap; gap: 7px; }
.contest-progress li { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #79829f; border-radius: 50%; font: 650 12px var(--mono); }
.contest-progress li.done { background: #a9f1d1; color: #143c32; border-color: #a9f1d1; }
.contest-lobby p { margin: 9px 0; white-space: pre-wrap; }
.contest-lobby form { margin-top: 15px; }
.contest-task-clock { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--blue-soft); border-left: 4px solid var(--blue); border-radius: 8px; padding: 10px 14px; margin: 0 0 12px; color: #2844a7; }
.table-scroll { overflow-x: auto; }
.standings-table { width: 100%; border-collapse: collapse; text-align: left; }
.standings-table th, .standings-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); }
.standings-table thead th { font-size: 12px; color: var(--muted); }
.standings-table .own-score { background: #e5f7ef; }
.contest-editor-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.contest-pick { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.pick-points { width: 66px; }
.pick-controls { display: flex; flex-wrap: wrap; gap: 3px; }
.pick-controls button { min-width: 25px; min-height: 30px; padding: 0 4px; background: #f0f2f6; border: 1px solid var(--border); border-radius: 5px; color: #3d4967; }
.contest-picker { display: flex; gap: 8px; align-items: end; margin: 14px 0 8px; }
.contest-picker label { min-width: 0; flex: 1; }
.contest-settings { border: 0; padding: 0; margin: 0; min-width: 0; }
.contest-settings label { margin-bottom: 9px; }
.contest-save, .studio-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.contest-save .form-message { flex: 1 0 100%; }

.login-layout { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); max-width: 1230px; margin: clamp(16px, 6.6vw, 82px) auto; min-height: 610px; padding: 0 18px; }
.login-banner { padding: clamp(23px, 3.4vw, 46px); display: flex; flex-direction: column; justify-content: space-between; gap: 35px; border-radius: var(--radius) 0 0 var(--radius); }
.login-banner h1 { font-size: clamp(36px, 4.5vw, 68px); }
.login-banner .feature-art { width: 100%; top: 14%; height: 87%; opacity: .68; object-position: right center; mask-image: linear-gradient(100deg, transparent, #000 56%); }
.hero-stamp { font: 550 10px var(--mono); color: #d0d3df; letter-spacing: .07em; }
.login-panel { padding: clamp(23px, 4vw, 55px); border: 1px solid var(--border); border-radius: 0 var(--radius) var(--radius) 0; background: #fff; display: flex; flex-direction: column; justify-content: center; }
.login-panel h2 { font-size: clamp(31px, 3.5vw, 47px); margin: 8px 0; }
.login-panel > p:not(.kicker) { color: var(--muted); margin-bottom: 18px; }
.login-panel form > .button { width: 100%; }
.demo-entry { border-top: 1px solid var(--border); margin-top: 17px; padding-top: 13px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.demo-entry > span { grid-column: 1/-1; font-size: 10px; font-weight: 700; letter-spacing: .09em; color: var(--muted); }
.demo-entry .button { font-size: 12px; }

@media (max-width: 960px) {
  .app-bar { gap: 12px; }
  .main-nav a { padding-inline: 7px; }
  .main-nav svg { display: none; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .app-header { position: static; }
  .app-bar { min-height: 0; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; padding-block: 10px; }
  .main-nav { grid-column: 1/-1; grid-row: 2; justify-content: space-between; }
  .main-nav a { flex-direction: column; gap: 3px; }
  .main-nav svg { display: block; }
  .staff-nav { overflow-x: auto; scrollbar-width: thin; }
  .main-nav a, .staff-nav a { padding: 7px 8px; font-size: 12px; }
  .staff-label { display: none; }
  .home-overview, .home-content, .contest-editor-grid, .contest-workspace { grid-template-columns: minmax(0, 1fr); }
  .home-progress { padding: 20px; }
  .progress-lead { margin-top: 14px; }
  .home-content { margin-top: 26px; }
  .contest-progress { grid-row: 1; }
  .login-layout { grid-template-columns: minmax(0, 1fr); max-width: 570px; }
  .login-banner { min-height: 300px; border-radius: var(--radius) var(--radius) 0 0; }
  .login-panel { border-radius: 0 0 var(--radius) var(--radius); }
}
@media (max-width: 490px) {
  .main-nav { gap: 1px; }
  .main-nav a { padding: 5px 3px; font-size: clamp(9px, 2.75vw, 11px); }
  .dashboard-hero { min-height: 270px; padding: 22px; }
  .dashboard-hero .feature-art { width: 83%; opacity: .56; object-position: 61% center; }
  .hero-content { max-width: 100%; }
  .dashboard-hero h2 { max-width: 13ch; }
  .judge-state { font-size: 11px; }
  .section-title { align-items: flex-start; flex-wrap: wrap; }
  .module-row { grid-template-columns: 35px minmax(0, 1fr) auto; gap: 9px; }
  .module-number { font-size: 16px; }
  .round-tabs { gap: 9px; }
  .round-tabs a { font-size: 13px; }
  .form-grid, .test-detail, .material-grid { grid-template-columns: minmax(0, 1fr); }
  .limits-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-row, .task-row { gap: 8px; }
  .history-row > svg { display: none; }
  .task-icon { width: 33px; height: 33px; }
  .test-result summary { gap: 7px; font-size: 12px; }
  .contest-timer { width: 92px; height: 92px; }
  .contest-timer span { font-size: 14px; }
  .contest-timer progress { width: 45px; }
  .contest-pick { grid-template-columns: auto minmax(0, 1fr) auto; }
  .pick-controls { grid-column: 2 / -1; }
}

.author-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}
.author-aside { min-width: 0; }
.author-aside .statement { background: #fbfbfa; }
.author-aside .statement summary { color: var(--blue); }
.author-aside .form-card .kicker, .contest-editor-grid .form-card .kicker { margin-bottom: 5px; }
.contest-save { justify-content: flex-end; margin-bottom: 14px; }
.contest-save:not(:has(button)) { display: none; }
.contest-save .form-message { text-align: right; }
@media (max-width: 760px) {
  .author-workspace { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .contest-save { justify-content: flex-start; }
  .contest-save .form-message { text-align: left; }
}
