:root {
  color-scheme: light;
  --ink: #192f38;
  --muted: #52656c;
  --teal: #08675f;
  --line: #d6e3e4;
  --paper: #fff;
  --wash: #f3f7f7;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--wash);
  line-height: 1.65;
}
* { box-sizing: border-box; }
body { margin: 0; }
.wrap { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }
a { color: var(--teal); }
.top { background: #123039; color: white; }
.top-inner { min-height: 62px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.brand { color: white; font-weight: 750; letter-spacing: .04em; text-decoration: none; }
.top nav { display: flex; gap: 23px; flex-wrap: wrap; }
.top nav a { color: #d4eeeb; text-decoration: none; }
.top nav a:hover, .brand:hover { text-decoration: underline; }
.hero { padding: 39px 0 27px; border-bottom: 1px solid var(--line); }
.course { color: var(--teal); font-weight: 700; margin: 0 0 7px; letter-spacing: .03em; }
h1 { margin: 0; font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1.24; letter-spacing: -.025em; }
.limits { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 19px 0 0; }
.limits div { display: flex; align-items: baseline; gap: 7px; font-size: .92rem; }
dt { color: var(--muted); }
dd { font-weight: 700; margin: 0; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.44fr) minmax(0, 1fr); align-items: start; gap: 24px; padding-block: 24px 52px; }
.statement, .panel { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: clamp(20px, 3vw, 33px); }
.panel { position: sticky; top: 18px; }
h2 { margin: 0 0 12px; font-size: 1.35rem; line-height: 1.3; }
h3 { margin: 0 0 8px; font-size: 1rem; }
p { margin: 0 0 12px; }
.statement section + section { border-top: 1px solid var(--line); padding-top: 23px; margin-top: 24px; }
.statement section > :last-child { margin-bottom: 0; }
.statement ul { padding-left: 1.45em; margin: 0 0 12px; }
.statement li + li { margin-top: 7px; }
code, pre, textarea { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
var { font-style: normal; }
pre { background: #f2f7f7; border-radius: 7px; margin: 14px 0; padding: 14px 16px; overflow: auto; font-size: .9rem; }
p code, li code { background: #edf4f3; padding: 1px 4px; border-radius: 3px; }
.sample-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 19px; }
.sample { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.sample-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.sample-head button { min-height: 32px; padding: 2px 8px; }
.sample pre { max-height: 290px; min-height: 155px; margin: 0; border-radius: 0; }
.credentials { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; }
.secret { display: flex; gap: 6px; margin-top: 5px; }
.secret input { margin: 0; min-width: 0; }
.secret button { flex: 0 0 auto; padding-inline: 8px; }
label { display: block; font-weight: 650; font-size: .93rem; }
input, select, textarea { display: block; width: 100%; border: 1px solid #a8c0c3; border-radius: 7px; font-size: 1rem; }
input, select { margin-top: 5px; padding: 9px 10px; color: var(--ink); background: white; }
.language { margin-top: 15px; }
.code-caption { display: flex; justify-content: space-between; gap: 8px; margin: 15px 0 6px; }
.code-caption span + span { color: var(--muted); font-weight: 400; }
textarea { min-height: 245px; resize: vertical; padding: 13px; color: #e7f5f4; background: #122b35; tab-size: 4; }
textarea::placeholder { color: #b1c5cc; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 13px; }
button { min-height: 40px; padding: 5px 13px; border: 1px solid #a8c0c3; border-radius: 7px; color: var(--ink); background: white; cursor: pointer; font: inherit; font-size: .9rem; font-weight: 650; }
button:hover { background: #eaf5f3; }
button.primary { background: var(--teal); color: white; border-color: var(--teal); }
button.primary:hover { background: #07574e; }
button:disabled { opacity: .64; cursor: wait; }
:focus-visible { outline: 3px solid #1d9485; outline-offset: 2px; }
.results { margin-top: 25px; padding-top: 19px; border-top: 1px solid var(--line); }
#feedback { color: var(--muted); font-size: .91rem; }
#public-name { color: var(--muted); font-size: .9rem; }
#history { list-style: none; margin: 0; padding: 0; max-height: 275px; overflow-y: auto; }
#history li { padding: 9px 0; border-bottom: 1px solid var(--line); }
#history p { margin: 0; font-size: .9rem; }
#history time { color: var(--muted); }
#history pre { margin: 4px 0; max-height: 180px; white-space: pre-wrap; overflow-wrap: anywhere; }
.status-ac { color: #075e42; }
.status-failed { color: #9b362b; }
.table-panel { margin-block: 24px 52px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: clamp(15px, 3vw, 28px); }
.table-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.table-tools p { color: var(--muted); margin: 0; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 12px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
thead th { background: var(--wash); }
tbody tr:last-child td { border-bottom: 0; }
.table-score { text-align: right; }
@media (max-width: 880px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .panel { position: static; }
}
@media (max-width: 500px) {
  .wrap { width: calc(100% - 28px); }
  .hero { padding-block: 27px 21px; }
  .credentials { grid-template-columns: 1fr; }
  .top-inner { flex-wrap: wrap; gap: 4px 12px; padding-block: 8px; }
  .top nav { gap: 14px; }
  .workspace { padding-top: 15px; gap: 15px; }
}
