/* Theme */
:root {
  --ink: #14213d;
  --muted: #667085;
  --paper: #fff;
  --bg: #f3f6fb;
  --blue: #2653d4;
  --blue2: #183a98;
  --cyan: #29b6c9;
  --line: #dce3ef;
  --ok: #157a55;
  --warn: #b66a10;
  --shadow: 0 16px 45px rgba(28, 46, 86, .11);
}

/* Base */
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: radial-gradient(circle at 12% 0, #e5f7fa 0, transparent 24rem), var(--bg); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.shell { max-width: 1120px; margin: auto; padding: 28px 20px 64px; }
.muted { color: var(--muted); }
.compact-title { margin: 3px 0; }
.section-title { margin-top: 0; }

/* Header */
header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.brand { display: flex; align-items: center; gap: 12px; }
.mark { width: 42px; height: 42px; border-radius: 13px; background: linear-gradient(135deg, var(--blue), var(--cyan)); display: grid; place-items: center; color: #fff; font-weight: 850; font-size: 20px; box-shadow: 0 8px 22px #2653d43d; }
.brand b { font-size: 19px; }
.brand small { display: block; color: var(--muted); }

/* Shared components */
.pill, .status { padding: 7px 11px; border-radius: 999px; background: #e9efff; color: var(--blue2); font-weight: 700; font-size: 12px; }
.card { background: var(--paper); border: 1px solid #fff; border-radius: 22px; box-shadow: var(--shadow); }
.btn { border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 800; background: var(--blue); color: #fff; box-shadow: 0 7px 16px #2653d42c; }
.btn:hover { background: var(--blue2); }
.btn.secondary { background: #edf1fa; color: var(--ink); box-shadow: none; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.metric { background: #f7f9fd; padding: 19px; border-radius: 16px; }
.metric b { display: block; font-size: 25px; }
.metric span { color: var(--muted); font-size: 13px; }

/* Welcome */
.hero { padding: 46px; display: grid; grid-template-columns: 1.35fr .65fr; gap: 40px; align-items: center; overflow: hidden; position: relative; }
.hero::after { content: ""; position: absolute; width: 250px; height: 250px; border-radius: 50%; right: -85px; top: -95px; background: linear-gradient(135deg, #2653d420, #29b6c920); }
h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.02; letter-spacing: -.045em; margin: 12px 0 18px; }
.lead { font-size: 18px; color: var(--muted); max-width: 650px; }
.field { display: grid; gap: 6px; margin: 14px 0; }
.field input { padding: 12px; border: 1px solid var(--line); border-radius: 11px; }
.footnote { color: var(--muted); font-size: 12px; margin-top: 20px; }

/* Assessment */
#test, #results, #professor { display: none; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.progress { height: 8px; background: #dde4f0; border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--cyan)); transition: .3s; }
.test-card { padding: 34px; margin-top: 14px; }
.section-label { color: var(--blue); font-weight: 850; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.question { font-size: 24px; line-height: 1.25; margin: 10px 0 24px; }
.options { display: grid; gap: 11px; }
.option { border: 1px solid var(--line); padding: 14px 16px; border-radius: 13px; display: flex; gap: 11px; align-items: center; transition: .15s; }
.option:hover { border-color: #9bb2ef; background: #f8faff; }
.option input { accent-color: var(--blue); }
textarea { width: 100%; min-height: 190px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; resize: vertical; outline: none; }
textarea:focus, input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #2653d418; }
.wordcount { color: var(--muted); font-size: 13px; margin-top: 6px; }
.test-actions { display: flex; justify-content: space-between; margin-top: 26px; }
.listenbox { padding: 18px; background: #f1f7ff; border-radius: 14px; margin-bottom: 20px; }
.listenbox button { border: 0; background: var(--ink); color: white; padding: 10px 14px; border-radius: 10px; font-weight: 700; }

/* Results */
.results-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 18px; margin-top: 18px; }
.scorebox { padding: 32px; text-align: center; }
.ring { width: 170px; height: 170px; margin: 10px auto 22px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--blue) var(--score), #e7ebf3 0); position: relative; }
.ring::after { content: ""; position: absolute; inset: 13px; background: #fff; border-radius: 50%; }
.ring strong { z-index: 1; font-size: 53px; letter-spacing: -.05em; }
.ring strong small { font-size: 18px; color: var(--muted); }
.recommend { background: #eaf8f3; color: var(--ok); padding: 12px; border-radius: 12px; font-weight: 800; }
.breakdown { padding: 30px; }
.skill { margin: 18px 0; }
.skilltop { display: flex; justify-content: space-between; font-weight: 750; }
.bar { height: 10px; background: #e8ecf3; border-radius: 50px; margin-top: 7px; overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); border-radius: 50px; }
.notice { margin-top: 18px; padding: 14px; border-left: 4px solid var(--warn); background: #fff7ea; color: #744106; }

/* Professor dashboard */
.dashboard { padding: 30px; margin-top: 18px; }
.dashboard-metrics { grid-template-columns: repeat(3, 1fr); margin-bottom: 24px; }
.table-wrap { overflow: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 13px 10px; border-bottom: 1px solid var(--line); }
.table th { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.flag { color: var(--warn); font-weight: 800; }
.ok { color: var(--ok); font-weight: 800; }
.empty-row { color: var(--muted); }

/* Responsive layout */
@media (max-width: 760px) {
  .hero, .results-grid { grid-template-columns: 1fr; }
  .hero { padding: 28px; }
  .metrics { margin-top: 10px; }
  .test-card { padding: 23px; }
  .question { font-size: 20px; }
  .table { font-size: 13px; }
}
