/* CodeLANG design system
   Calm neutral surfaces, one indigo accent, hairline borders, light + dark themes. */
:root {
  --bg: #0a0c10;
  --bg-2: #0e1117;
  --surface: #12151c;
  --surface-2: #181c25;
  --surface-3: #1f2430;
  --border: #232936;
  --border-strong: #323a4d;
  --text: #e7e9ef;
  --text-2: #b5bbc9;
  --muted: #838ca2;
  --accent: #6d7dff;
  --accent-hover: #8794ff;
  --accent-soft: rgba(109, 125, 255, .14);
  --accent-2: #38bdf8;
  --on-accent: #ffffff;
  --good: #3ecf8e;
  --good-soft: rgba(62, 207, 142, .13);
  --warn: #f5b546;
  --warn-soft: rgba(245, 181, 70, .13);
  --bad: #f4717f;
  --bad-soft: rgba(244, 113, 127, .13);
  --code-bg: #0b0d12;
  --nav-bg: rgba(10, 12, 16, .82);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 32px rgba(0, 0, 0, .28);
  --ring: 0 0 0 3px rgba(109, 125, 255, .3);
  --glow: radial-gradient(900px 420px at 85% -10%, rgba(109, 125, 255, .16), transparent 70%),
          radial-gradient(700px 360px at 0% 0%, rgba(56, 189, 248, .08), transparent 70%);
  --font: Inter, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f6fa;
  --bg-2: #eef0f6;
  --surface: #ffffff;
  --surface-2: #f6f7fb;
  --surface-3: #eceef5;
  --border: #e1e4ed;
  --border-strong: #cdd2e0;
  --text: #141824;
  --text-2: #3d4558;
  --muted: #667089;
  --accent: #4f5bd5;
  --accent-hover: #3f4abd;
  --accent-soft: rgba(79, 91, 213, .1);
  --accent-2: #0891b2;
  --good: #12935f;
  --good-soft: rgba(18, 147, 95, .1);
  --warn: #b7791f;
  --warn-soft: rgba(183, 121, 31, .12);
  --bad: #d23a4d;
  --bad-soft: rgba(210, 58, 77, .09);
  --code-bg: #f3f5fa;
  --nav-bg: rgba(255, 255, 255, .85);
  --shadow: 0 1px 2px rgba(20, 24, 36, .06), 0 10px 28px rgba(20, 24, 36, .07);
  --ring: 0 0 0 3px rgba(79, 91, 213, .22);
  --glow: radial-gradient(900px 420px at 85% -10%, rgba(79, 91, 213, .1), transparent 70%),
          radial-gradient(700px 360px at 0% 0%, rgba(8, 145, 178, .06), transparent 70%);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14.5px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; font-weight: 650; }
h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 20px; }
h3 { font-size: 15px; }
p { margin: 0 0 .8em; }
pre, code { font-family: var(--mono); }
pre {
  background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; overflow: auto; margin: 0; white-space: pre-wrap; word-break: break-word;
  font-size: 13px; line-height: 1.6; color: var(--text);
}
::selection { background: var(--accent-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { flex-shrink: 0; }

/* ---------- navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 14px;
  height: 56px; padding: 0 24px; background: var(--nav-bg); backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 17px; letter-spacing: -.02em; color: var(--text); }
.brand b { color: var(--accent); font-weight: 750; }
.brand:hover { color: var(--text); }
.logo-mark {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 2px 10px rgba(109, 125, 255, .35);
}
.nav-links { display: flex; gap: 2px; margin-left: 14px; }
.nav-links a { color: var(--muted); padding: 6px 12px; border-radius: var(--radius-sm); font-weight: 550; font-size: 14px; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--text); background: var(--surface-3); }
.nav-spacer { flex: 1; }
.nav-user { color: var(--muted); font-size: 13px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; text-transform: uppercase;
  border: 1px solid var(--border-strong);
}
.icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center; cursor: pointer; border-radius: var(--radius-sm);
  background: transparent; border: 1px solid var(--border); color: var(--text-2); transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.icon-btn .sun { display: none; }
:root[data-theme="light"] .icon-btn .sun { display: block; }
:root[data-theme="light"] .icon-btn .moon { display: none; }

/* ---------- layout ---------- */
.page { max-width: 1120px; margin: 0 auto; padding: 36px 24px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0 0 4px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; gap: 16px; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.muted { color: var(--muted); }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-title h3 { margin: 0; font-size: 15px; }

/* ---------- buttons / inputs ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center; cursor: pointer; white-space: nowrap;
  height: 36px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface-2);
  color: var(--text); font: inherit; font-weight: 600; font-size: 14px; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
}
.btn:hover { background: var(--surface-3); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn.good { background: var(--good); border-color: var(--good); color: #05190f; }
.btn.good:hover { filter: brightness(1.08); color: #05190f; }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.btn.danger:hover { background: var(--bad); color: #fff; }
.btn.sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn.lg { height: 44px; padding: 0 22px; font-size: 15px; }
.btn.block { width: 100%; }

label { display: block; margin-bottom: 6px; color: var(--text-2); font-size: 13px; font-weight: 600; }
input[type=text], input[type=password], input[type=search], select, textarea {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 0 12px; height: 40px; font: inherit; outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .75; }
textarea { font-family: var(--mono); font-size: 13px; line-height: 1.55; padding: 10px 12px; height: auto; resize: vertical; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a93a8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: var(--ring); }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
.field { margin-bottom: 16px; }
.field .hint { margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.input-wrap { position: relative; }
.input-wrap input { padding-right: 56px; }
.input-wrap .reveal {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer;
  color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 6px;
}
.input-wrap .reveal:hover { color: var(--text); background: var(--surface-3); }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; line-height: 1.6; background: var(--surface-3); color: var(--muted); }
.badge.easy, .badge.AC { color: var(--good); background: var(--good-soft); }
.badge.medium, .badge.TLE, .badge.SE { color: var(--warn); background: var(--warn-soft); }
.badge.hard, .badge.WA, .badge.RE, .badge.CE, .badge.OLE { color: var(--bad); background: var(--bad-soft); }

/* ---------- toasts ---------- */
.toasts { position: fixed; top: 68px; right: 20px; z-index: 100; display: grid; gap: 10px; }
.toast {
  min-width: 260px; max-width: 380px; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--border-strong);
  border-left-width: 3px; background: var(--surface-2); box-shadow: var(--shadow); font-size: 14px;
  animation: slidein .3s ease, fadeout .4s ease 4.6s forwards;
}
.toast.error { border-left-color: var(--bad); }
.toast.success { border-left-color: var(--good); }
.toast.info { border-left-color: var(--accent); }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeout { to { opacity: 0; visibility: hidden; } }

/* ---------- landing ---------- */
.landing { background: var(--glow), var(--bg); background-repeat: no-repeat; }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; padding: 72px 0 56px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 8px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 550; margin-bottom: 20px; }
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px var(--good-soft); }
.hero h1 { font-size: clamp(36px, 5.2vw, 56px); line-height: 1.08; letter-spacing: -.035em; font-weight: 750; margin-bottom: 18px; }
.grad-text { background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: var(--text-2); font-size: 17px; max-width: 520px; margin-bottom: 28px; }
.hero-stats { display: flex; gap: 32px; margin-top: 36px; flex-wrap: wrap; }
.hero-stats b { display: block; font-size: 22px; letter-spacing: -.02em; }
.hero-stats span { color: var(--muted); font-size: 13px; }
.code-window { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.cw-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.cw-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.cw-bar i:nth-child(1) { background: #ff5f57; } .cw-bar i:nth-child(2) { background: #febc2e; } .cw-bar i:nth-child(3) { background: #28c840; }
.cw-bar span { margin-left: 10px; color: var(--muted); font: 12px var(--mono); }
.cw-body { padding: 16px 18px; font: 13.5px/1.75 var(--mono); min-height: 190px; background: var(--code-bg); white-space: pre; overflow: hidden; }
.cw-body .k { color: #c792ea; } .cw-body .f { color: #82aaff; } .cw-body .s { color: #c3e88d; } .cw-body .n { color: #f78c6c; } .cw-body .c { color: var(--muted); }
:root[data-theme="light"] .cw-body .k { color: #8a3ffc; } :root[data-theme="light"] .cw-body .f { color: #1d4ed8; }
:root[data-theme="light"] .cw-body .s { color: #15803d; } :root[data-theme="light"] .cw-body .n { color: #c2410c; }
.cw-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 13px; opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s; }
.cw-foot.show { opacity: 1; transform: none; }
.cw-foot .ok { display: inline-flex; align-items: center; gap: 8px; color: var(--good); font-weight: 650; }
.cw-foot .cases { display: flex; gap: 5px; }
.cw-foot .cases i { width: 22px; height: 22px; border-radius: 6px; background: var(--good-soft); color: var(--good); display: grid; place-items: center; font: 700 11px var(--font); font-style: normal; }
.cursor::after { content: ""; display: inline-block; width: 7px; height: 1.1em; vertical-align: -.15em; margin-left: 2px; background: var(--accent); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; padding-bottom: 20px; }
.feature { transition: border-color .2s, transform .2s; }
.feature:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.feature .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.feature h3 { margin-bottom: 6px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- auth ---------- */
.auth-split { min-height: calc(100vh - 56px); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-aside { position: relative; overflow: hidden; padding: 64px 56px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--border); background: var(--glow), var(--bg-2); }
.auth-aside h2 { font-size: 32px; letter-spacing: -.03em; line-height: 1.15; margin-bottom: 12px; max-width: 440px; }
.auth-aside > p { color: var(--text-2); max-width: 420px; margin-bottom: 28px; }
.points { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 12px; }
.points li { display: flex; align-items: center; gap: 12px; color: var(--text-2); }
.points .tick { width: 22px; height: 22px; border-radius: 50%; background: var(--good-soft); color: var(--good); display: grid; place-items: center; }
.auth-aside .code-window { max-width: 430px; transform: rotate(-1.2deg); }
.auth-aside .cw-body { min-height: 0; font-size: 12.5px; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 380px; animation: rise .45s ease both; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.auth-card h2 { font-size: 26px; letter-spacing: -.025em; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 28px; }
.auth-alt { margin-top: 22px; color: var(--muted); font-size: 14px; display: grid; gap: 8px; }
.divider-text { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 22px 0 0; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.tag-employee { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 650; margin-bottom: 14px; }

/* ---------- stats ---------- */
.stat { display: flex; align-items: center; gap: 16px; }
.stat .ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.stat .ico.green { background: var(--good-soft); color: var(--good); }
.stat .ico.amber { background: var(--warn-soft); color: var(--warn); }
.stat .num { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.stat .lbl { color: var(--muted); font-size: 13px; margin-top: 2px; }
.ring { --p: 0; --size: 56px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: conic-gradient(var(--good) calc(var(--p) * 1%), var(--surface-3) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.ring span { position: relative; font-size: 12px; font-weight: 700; }
.progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 10px; }
.progress > i { display: block; height: 100%; background: var(--good); border-radius: 99px; transition: width .8s ease; }

/* ---------- table ---------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .02em; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--border); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--surface-2); }
.table a.title { color: var(--text); font-weight: 600; }
.table a.title:hover { color: var(--accent); }
.status-dot { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-strong); color: transparent; font-size: 11px; font-weight: 800; }
.status-dot.solved { background: var(--good); border-color: var(--good); color: #04180e; }
.status-dot.solved::after { content: "\2713"; }
.status-dot.attempted { border-color: var(--warn); background: linear-gradient(90deg, var(--warn) 50%, transparent 50%); }
.toolbar { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.toolbar .search { position: relative; flex: 1; min-width: 220px; }
.toolbar .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.toolbar .search input { padding-left: 36px; }
.pills { display: flex; gap: 4px; padding: 3px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; }
.pill { cursor: pointer; padding: 5px 14px; border-radius: 7px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; }
.pill:hover { color: var(--text); }
.pill.on { background: var(--surface-3); color: var(--text); }

/* ---------- problem workspace ---------- */
.ws-body { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
.ws-top { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 16px; border-bottom: 1px solid var(--border); background: var(--bg); flex-shrink: 0; }
.ws-top .crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 550; padding: 5px 8px; border-radius: 6px; }
.ws-top .crumb:hover { background: var(--surface-2); color: var(--text); }
.ws-top .sep { color: var(--border-strong); }
.ws-top h1 { font-size: 15px; margin: 0; font-weight: 650; max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws { flex: 1; display: grid; grid-template-columns: var(--left, 45%) 8px 1fr; min-height: 0; }
.pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--surface); }
.pane + .divider + .pane { background: var(--bg); }
.divider { position: relative; cursor: col-resize; z-index: 5; }
.divider::after { content: ""; position: absolute; left: 3px; top: 0; bottom: 0; width: 2px; background: var(--border); transition: background .15s; }
.divider:hover::after, .divider.drag::after { background: var(--accent); }
.tabs { display: flex; align-items: center; gap: 2px; padding: 0 12px; height: 42px; border-bottom: 1px solid var(--border); flex-shrink: 0; background: var(--surface); }
.tab { height: 100%; padding: 0 12px; cursor: pointer; color: var(--muted); border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs .hint { margin-left: auto; color: var(--muted); font-size: 12px; }
.tab-body { flex: 1; overflow: auto; padding: 20px 24px; }
.prose h2 { font-size: 22px; letter-spacing: -.02em; margin-bottom: 10px; }
.prose .meta { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.prose p { white-space: pre-line; color: var(--text-2); }
.prose h3 { margin: 26px 0 10px; font-size: 14px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.prose h3::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--accent); }
.sample { margin: 10px 0 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sample .box { min-width: 0; background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.sample .box-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 600; }
.sample .box pre { border: 0; border-radius: 0; background: transparent; }
.copy { height: 24px; padding: 0 8px; font-size: 12px; border-radius: 6px; background: transparent; border-color: transparent; color: var(--muted); }
.copy:hover { background: var(--surface-3); color: var(--text); }

.editor-bar { display: flex; align-items: center; gap: 10px; padding: 0 12px; height: 46px; border-bottom: 1px solid var(--border); background: var(--surface); flex-shrink: 0; }
.editor-bar select { width: auto; height: 30px; padding-left: 10px; font-size: 13px; font-weight: 600; min-width: 108px; }
.editor-bar .saved { font-size: 12px; color: var(--muted); }
#editor { flex: 1; min-height: 160px; }
#code-fallback { flex: 1; border-radius: 0; border: 0; min-height: 160px; display: none; background: var(--code-bg); font-size: 14px; }
.console { border-top: 1px solid var(--border); height: 36%; min-height: 150px; display: flex; flex-direction: column; background: var(--surface); flex-shrink: 0; }
.console .tab-body { padding: 12px 16px; }
.console textarea { height: 100%; min-height: 70px; resize: none; background: var(--code-bg); }
.console pre { min-height: 100%; }
.spinner { width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; display: none; }
.btn[disabled] .spinner { display: inline-block; }
.btn[disabled] .ico-play { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.status { color: var(--muted); font-size: 12.5px; min-width: 0; }

.verdict { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); margin-bottom: 12px; animation: pop .35s cubic-bezier(.2, 1.3, .4, 1); border: 1px solid var(--border); background: var(--surface-2); }
.verdict .vi { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.verdict.AC { background: var(--good-soft); border-color: rgba(62, 207, 142, .35); } .verdict.AC .vi { background: var(--good); color: #05190f; }
.verdict.TLE, .verdict.SE { background: var(--warn-soft); border-color: rgba(245, 181, 70, .35); } .verdict.TLE .vi, .verdict.SE .vi { background: var(--warn); color: #231600; }
.verdict.WA, .verdict.RE, .verdict.CE, .verdict.OLE { background: var(--bad-soft); border-color: rgba(244, 113, 127, .35); } .verdict.WA .vi, .verdict.RE .vi, .verdict.CE .vi, .verdict.OLE .vi { background: var(--bad); color: #fff; }
.verdict .big { font-size: 18px; font-weight: 750; letter-spacing: -.01em; line-height: 1.2; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.case-pills { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.case-pill { min-width: 32px; height: 28px; padding: 0 8px; border-radius: 7px; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; animation: pop .3s both; }
.case-pill.AC { background: var(--good-soft); color: var(--good); }
.case-pill.bad { background: var(--bad-soft); color: var(--bad); }
.confetti { position: fixed; top: -10px; width: 8px; height: 13px; z-index: 200; pointer-events: none; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: .8; } }

/* ---------- misc ---------- */
.kbd { font: 11px var(--mono); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; color: var(--text-2); background: var(--surface-2); }
.empty { text-align: center; color: var(--muted); padding: 32px; }
.sidebar-admin { display: grid; grid-template-columns: 210px 1fr; gap: 24px; align-items: start; }
.side-links { display: grid; gap: 2px; align-content: start; position: sticky; top: 76px; }
.side-links a { padding: 9px 12px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 600; cursor: pointer; }
.side-links a:hover { background: var(--surface-2); color: var(--text); }
.side-links a.on { background: var(--accent-soft); color: var(--accent); }
.admin-section { display: none; }
.admin-section.on { display: block; animation: rise .25s ease; }
.case-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.example { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0; }
.example .box b { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.code-block-head { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 10px; }
.code-block-head h3 { margin: 0; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 44px; }
  .auth-split { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
}
@media (max-width: 820px) {
  .ws-body { height: auto; overflow: visible; }
  .ws { grid-template-columns: 1fr; grid-template-rows: auto 8px 90vh; }
  .divider { display: none; }
  .sample, .example { grid-template-columns: 1fr; }
  .sidebar-admin { grid-template-columns: 1fr; }
  .side-links { position: static; grid-auto-flow: column; overflow-x: auto; }
  .nav { padding: 0 14px; } .nav-user { display: none; }
  .ws-top h1 { max-width: 40vw; }
  .tabs .hint { display: none; }
}
@media (max-width: 1100px) { .tabs .hint { display: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
