:root {
  color-scheme: light;
  --ink: #17201d;
  --muted: #65706c;
  --paper: #f4f5f1;
  --card: #ffffff;
  --line: #dce1dc;
  --green: #176b52;
  --green-dark: #0d4938;
  --amber: #b96b19;
  --red: #a53a3a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); min-height: 100vh; }
button, input, select, textarea { font: inherit; }
.topbar { height: 68px; padding: 0 max(24px, calc((100vw - 1120px)/2)); display: flex; align-items: center; justify-content: space-between; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -.03em; }
.brand span { margin-left: 7px; color: var(--green); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.account { display: flex; gap: 14px; align-items: center; font-size: 14px; }
main { width: min(1120px, calc(100% - 32px)); margin: 42px auto 80px; }
.auth-card { width: min(460px, 100%); margin: 70px auto; padding: 36px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 18px 55px rgba(24, 38, 32, .08); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -.04em; margin-bottom: 10px; }
h2 { letter-spacing: -.025em; }
.eyebrow { color: var(--green); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; margin-bottom: 9px; }
.muted { color: var(--muted); line-height: 1.5; }
.stack { display: grid; gap: 16px; }
label { display: grid; gap: 7px; color: #3c4743; font-size: 14px; font-weight: 650; }
input, select, textarea { width: 100%; border: 1px solid #cbd2cc; border-radius: 10px; padding: 11px 12px; background: #fff; color: var(--ink); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23,107,82,.12); }
textarea { min-height: 150px; resize: vertical; line-height: 1.45; }
button { border: 0; border-radius: 10px; padding: 10px 15px; cursor: pointer; font-weight: 750; }
button:disabled { opacity: .55; cursor: wait; }
.primary { color: white; background: var(--green); }
.primary:hover { background: var(--green-dark); }
.ghost { background: #e9ede9; color: var(--ink); }
.danger { color: var(--red); background: #f9eaea; }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 24px; }
.metric, .panel, .item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.metric { padding: 17px; }
.metric strong { display: block; font-size: 26px; letter-spacing: -.03em; margin-bottom: 4px; }
.metric span { color: var(--muted); font-size: 13px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.panel { padding: 22px; margin-bottom: 18px; }
.panel-head, .item { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.panel-head { margin-bottom: 16px; }
.panel-head h2 { margin: 0; font-size: 20px; }
.list { display: grid; gap: 10px; }
.item { padding: 14px 15px; }
.item h3 { font-size: 15px; margin-bottom: 4px; }
.item p { margin: 0; color: var(--muted); font-size: 13px; }
.item-actions { display: flex; gap: 8px; flex-shrink: 0; }
.choice-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; font-weight: 600; background: #fafbf9; }
.choice input { width: auto; margin: 0; }
.password-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.password-row input { min-width: 0; }
details.options { border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; }
details.options summary { cursor: pointer; font-weight: 750; }
details.options .choice-grid { margin-top: 12px; max-height: 230px; overflow: auto; }
.profile-link { color: var(--green); background: #e5f1ec; }
.combobox { position: relative; }
.combobox-list { position: absolute; z-index: 20; top: calc(100% + 5px); left: 0; right: 0; max-height: 230px; overflow: auto; background: white; border: 1px solid #cbd2cc; border-radius: 10px; box-shadow: 0 14px 35px rgba(20,35,29,.14); padding: 5px; }
.combo-option { width: 100%; text-align: left; background: white; color: var(--ink); padding: 10px; }
.combo-option:hover, .combo-option.active { background: #e8f1ed; }
.combo-option small { display: block; color: var(--muted); margin-top: 2px; }
fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
fieldset legend { margin-bottom: 8px; color: #3c4743; font-size: 14px; font-weight: 650; }
fieldset.disabled { opacity: .42; filter: grayscale(1); }
.mode-switch { border: 1px solid var(--green); background: #edf5f1; }
.custom-config { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fafbf9; }
.badge { display: inline-block; padding: 4px 8px; border-radius: 999px; background: #edf2ee; color: #52605a; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.badge.completed { background: #e0f2eb; color: var(--green); }
.badge.in_progress { background: #fff0d9; color: var(--amber); }
.question { max-width: 820px; margin: 0 auto; }
.question-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.prompt { font-size: 22px; line-height: 1.4; }
.feedback { padding: 16px; border-radius: 12px; margin-top: 14px; background: #edf5f1; }
.feedback.wrong { background: #fbebeb; }
.answers { white-space: pre-wrap; font-family: inherit; font-size: 13px; }
.feedback-next { display: block; margin-top: 22px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
dialog { border: 0; border-radius: 18px; padding: 28px; width: min(430px, calc(100% - 32px)); box-shadow: 0 30px 90px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(10,20,16,.55); }
code { display: block; padding: 16px; border-radius: 10px; background: #eef1ee; font-size: 18px; overflow-wrap: anywhere; user-select: all; }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: 380px; padding: 13px 17px; background: #1d2924; color: white; border-radius: 10px; box-shadow: 0 12px 35px rgba(0,0,0,.2); }
.hidden { display: none !important; }
@media (max-width: 820px) { .metrics { grid-template-columns: repeat(2, 1fr); } .grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { main { margin-top: 24px; } .auth-card { margin: 30px auto; padding: 24px; } .hero, .item { align-items: flex-start; } .item { flex-direction: column; } .item-actions { width: 100%; } .item-actions button { flex: 1; } .account span { display: none; } }
