/* ============ MockSquare — GRE-style UI ============ */
:root {
  --navy: #16324f;
  --navy-light: #21476e;
  --accent: #2f6fb2;
  --accent-dark: #245a93;
  --bg: #ececf1;
  --panel: #ffffff;
  --border: #c9c9d1;
  --text: #1d1d24;
  --muted: #66676e;
  --green: #1e7d4f;
  --green-bg: #e3f3ea;
  --red: #b3372f;
  --red-bg: #fbe9e7;
  --amber: #9a6b00;
  --amber-bg: #fff5d6;
  --radius: 8px;
  font-size: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex; flex-direction: column;
  min-height: 100vh; height: auto;
}
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- site header ---------- */
.site-header {
  background: var(--navy); color: #fff;
  display: flex; align-items: center; gap: 18px;
  padding: 0 22px; height: 54px; flex: 0 0 auto;
  box-shadow: 0 2px 6px rgba(0,0,0,.25); z-index: 20;
}
.site-header .logo { font-size: 1.15rem; font-weight: 700; letter-spacing: .3px; color:#fff; cursor: pointer; }
.site-header .logo span { color: #8fc1ff; }
.site-header nav { display: flex; gap: 4px; margin-left: 12px; }
.site-header nav a {
  color: #d5e4f5; padding: 6px 12px; border-radius: 6px; font-size: .92rem;
}
.site-header nav a:hover, .site-header nav a.active { background: var(--navy-light); color:#fff; text-decoration:none; }
.site-header .spacer { flex: 1; }
.ai-badge {
  font-size: .75rem; background: var(--navy-light); border: 1px solid #3d6390;
  padding: 3px 10px; border-radius: 20px; color: #bcd7f5;
}
.ai-badge.real { background: #144f38; border-color: #2e8b62; color: #a9e8c8; }
.lang-select {
  background: var(--navy-light); color: #fff; border: 1px solid #3d6390;
  border-radius: 6px; padding: 4px 8px;
}
.user-chip { display:flex; align-items:center; gap:10px; font-size:.9rem; }
.user-chip button {
  background: transparent; color: #d5e4f5; border: 1px solid #3d6390;
  border-radius: 6px; padding: 4px 12px;
}
.user-chip button:hover { background: var(--navy-light); }

#app { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.loading-screen { margin: auto; color: var(--muted); font-size: 1.1rem; }

/* ---------- auth ---------- */
.auth-wrap { margin: auto; width: 400px; max-width: 92vw; padding: 30px 0; }
.auth-card { background: var(--panel); border-radius: 12px; padding: 34px 36px; box-shadow: 0 8px 30px rgba(10,30,60,.12); }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 4px; color: var(--navy); }
.auth-card .tagline { color: var(--muted); font-size: .9rem; margin-bottom: 22px; }
.auth-card label { display: block; font-size: .85rem; font-weight: 600; margin: 14px 0 5px; }
.auth-card input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 6px; font-size: .95rem;
}
.auth-card input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.auth-card .btn-primary { width: 100%; margin-top: 22px; padding: 11px; font-size: 1rem; }
.auth-switch { margin-top: 16px; text-align: center; font-size: .88rem; color: var(--muted); }
.auth-error {
  background: var(--red-bg); color: var(--red); border: 1px solid #e5b6b2;
  padding: 9px 12px; border-radius: 6px; margin-top: 16px; font-size: .88rem;
}
.brand-hero { text-align: center; margin-bottom: 22px; }
.brand-hero .logo-big { font-size: 2rem; font-weight: 800; color: var(--navy); }
.brand-hero .logo-big span { color: var(--accent); }
.brand-hero p { color: var(--muted); font-size: .92rem; margin-top: 6px; }

/* ---------- buttons ---------- */
.btn-primary {
  background: var(--accent); color: #fff; border: none; border-radius: 6px;
  padding: 9px 22px; font-weight: 600;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { background: #9db8d2; cursor: not-allowed; }
.btn-ghost {
  background: transparent; border: 1px solid var(--border); border-radius: 6px;
  padding: 8px 18px; color: var(--text);
}
.btn-ghost:hover { background: #f0f0f4; }
.btn-danger { background: var(--red); color: #fff; border: none; border-radius: 6px; padding: 7px 14px; }

/* GRE-style nav buttons (like the real ETS interface) */
.gre-btn {
  background: linear-gradient(#fdfdfd, #e6e6ea);
  border: 1px solid #9a9aa2; border-radius: 5px;
  padding: 7px 20px; font-size: .92rem; color: #1d1d24; min-width: 92px;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.gre-btn:hover:not(:disabled) { background: linear-gradient(#fff, #dcdce2); }
.gre-btn:disabled { color: #9a9aa2; background: #f2f2f4; cursor: not-allowed; }
.gre-btn.on { background: linear-gradient(#dcebfa, #c3d9f0); border-color: var(--accent); color: var(--navy); }

/* ---------- dashboard ---------- */
.page { max-width: 1080px; margin: 0 auto; padding: 28px 20px 60px; width: 100%; }
.hero {
  background: linear-gradient(120deg, var(--navy) 0%, #29517f 60%, #3570ad 100%);
  color: #fff; border-radius: 14px; padding: 34px 38px; margin-bottom: 26px;
}
.hero h1 { font-size: 1.7rem; margin-bottom: 8px; }
.hero p { color: #cfe2f5; max-width: 640px; line-height: 1.55; }
.section-title { font-size: 1.15rem; font-weight: 700; color: var(--navy); margin: 26px 0 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 22px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 2px 8px rgba(10,30,60,.05);
}
.card h3 { color: var(--navy); font-size: 1.08rem; }
.card .desc { color: var(--muted); font-size: .88rem; line-height: 1.5; flex: 1; }
.card .meta { display: flex; gap: 14px; font-size: .82rem; color: var(--muted); }
.card .actions { display: flex; gap: 10px; margin-top: 6px; }

table.data { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: 10px; overflow: hidden; }
table.data th, table.data td { padding: 11px 14px; text-align: left; font-size: .9rem; border-bottom: 1px solid #eeeef2; }
table.data th { background: #f4f5f8; color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .4px; }
table.data tr:last-child td { border-bottom: none; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.pill.green { background: var(--green-bg); color: var(--green); }
.pill.amber { background: var(--amber-bg); color: var(--amber); }
.empty-state { background: var(--panel); border: 1px dashed var(--border); border-radius: 10px; padding: 34px; text-align: center; color: var(--muted); }

/* ---------- exam chrome (ETS-like) ---------- */
body.exam-mode { background: #d7d7dd; }
body.exam-mode .site-header { display: none; }
.exam-shell { display: flex; flex-direction: column; height: 100vh; }
.exam-topbar {
  background: #f7f7f9; border-bottom: 1px solid #b9b9c1;
  display: flex; align-items: center; padding: 0 16px; height: 52px; flex: 0 0 auto; gap: 14px;
}
.exam-topbar .test-name { font-weight: 700; color: var(--navy); font-size: .95rem; }
.exam-topbar .section-name { color: var(--muted); font-size: .88rem; }
.exam-topbar .center { position: absolute; left: 50%; transform: translateX(-50%); font-weight: 600; font-size: .95rem; }
.exam-topbar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.exam-timer {
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1rem;
  background: #fff; border: 1px solid #b9b9c1; border-radius: 5px; padding: 4px 12px;
  cursor: pointer; min-width: 86px; text-align: center;
}
.exam-timer.low { color: var(--red); border-color: var(--red); }
.exam-body { flex: 1; overflow: hidden; display: flex; min-height: 0; }
.exam-footer {
  background: #f7f7f9; border-top: 1px solid #b9b9c1; height: 58px; flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px; padding: 0 16px;
}
.exam-footer .grow { flex: 1; }
.mark-flag { font-size: 1rem; }

/* instructions screen */
.instr-screen { max-width: 860px; margin: 40px auto; background: #fff; border: 1px solid #b9b9c1; border-radius: 4px; padding: 36px 44px; overflow-y: auto; }
.instr-screen h1 { font-size: 1.35rem; color: var(--navy); margin-bottom: 18px; }
.instr-screen h2 { font-size: 1rem; margin: 18px 0 8px; color: var(--navy); }
.instr-screen p, .instr-screen li { line-height: 1.65; font-size: .95rem; }
.instr-screen ul { padding-left: 22px; }
.instr-screen .actions { margin-top: 28px; display: flex; gap: 12px; justify-content: flex-end; }

/* question area */
.q-scroll { flex: 1; overflow-y: auto; }
.q-stage { max-width: 1180px; margin: 0 auto; padding: 22px 26px 30px; min-height: 100%; }
.q-panel { background: #fff; border: 1px solid #b9b9c1; border-radius: 4px; padding: 26px 30px; }
.split-view { display: grid; grid-template-columns: 1fr 1fr; gap: 0; height: 100%; }
.split-view .passage-pane {
  border-right: 1px solid #d6d6dc; padding: 26px 30px; overflow-y: auto;
  line-height: 1.75; font-size: .98rem; background: #fdfdfd;
}
.split-view .question-pane { padding: 26px 30px; overflow-y: auto; }
.passage-text { white-space: pre-wrap; line-height: 1.8; }
.q-instruction { font-size: .85rem; color: var(--muted); font-style: italic; margin-bottom: 12px; }
.q-text { font-size: 1.02rem; line-height: 1.7; margin-bottom: 18px; white-space: pre-wrap; }
.q-info {
  background: #f4f5f8; border: 1px solid var(--border); border-radius: 6px;
  padding: 14px 18px; margin-bottom: 18px; line-height: 1.6; white-space: pre-wrap;
}
.di-table { border-collapse: collapse; margin: 0 0 18px; }
.di-table td, .di-table th { border: 1px solid #b9b9c1; padding: 6px 16px; font-size: .92rem; text-align: center; }
.di-table th { background: #f4f5f8; }

.options { display: flex; flex-direction: column; gap: 10px; }
.option {
  display: flex; align-items: flex-start; gap: 11px; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: 6px; cursor: pointer; line-height: 1.5;
}
.option:hover { background: #f4f8fd; border-color: #a9c6e4; }
.option.selected { background: #e8f1fb; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.option input { margin-top: 3px; flex: 0 0 auto; }
.option .opt-letter { font-weight: 700; color: var(--muted); flex: 0 0 20px; }
.option.correct { background: var(--green-bg); border-color: var(--green); }
.option.wrong { background: var(--red-bg); border-color: var(--red); }

/* text completion */
.tc-text { font-size: 1.05rem; line-height: 2.1; margin-bottom: 22px; white-space: pre-wrap; }
.tc-blank-slot {
  display: inline-block; min-width: 120px; border-bottom: 2px solid var(--navy);
  text-align: center; color: var(--accent-dark); font-weight: 600; padding: 0 8px;
}
.tc-columns { display: flex; gap: 34px; flex-wrap: wrap; }
.tc-col { min-width: 200px; }
.tc-col h4 { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }

/* quantitative comparison */
.qc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; margin-bottom: 20px; }
.qc-grid .qc-cell { padding: 18px 22px; line-height: 1.7; white-space: pre-wrap; }
.qc-grid .qc-head { background: #f4f5f8; font-weight: 700; text-align: center; font-size: .9rem; padding: 10px; }
.qc-grid .qc-cell + .qc-cell, .qc-grid .qc-head + .qc-head { border-left: 1px solid var(--border); }
.qc-grid .qc-head { border-bottom: 1px solid var(--border); }

/* numeric entry */
.ne-input { width: 220px; padding: 10px 14px; font-size: 1.05rem; border: 1px solid var(--border); border-radius: 6px; }
.ne-input:focus { outline: 2px solid var(--accent); }
.ne-hint { color: var(--muted); font-size: .84rem; margin-top: 8px; }

/* review screen (like the real GRE review page) */
.review-panel { max-width: 860px; margin: 34px auto; background: #fff; border: 1px solid #b9b9c1; border-radius: 4px; padding: 26px 30px; }
.review-panel h1 { font-size: 1.2rem; color: var(--navy); margin-bottom: 6px; }
.review-panel .sub { color: var(--muted); font-size: .88rem; margin-bottom: 18px; }
table.review-grid { width: 100%; border-collapse: collapse; }
table.review-grid th, table.review-grid td { border-bottom: 1px solid #e6e6ea; padding: 9px 12px; text-align: left; font-size: .93rem; }
table.review-grid th { background: #f4f5f8; font-size: .8rem; text-transform: uppercase; color: var(--muted); }
table.review-grid tbody tr { cursor: pointer; }
table.review-grid tbody tr:hover { background: #f0f6fd; }
.status-ok { color: var(--green); font-weight: 600; }
.status-no { color: var(--muted); }
.marked-flag { color: var(--accent-dark); }

/* writing editor */
.writing-layout { display: flex; flex-direction: column; height: 100%; }
.writing-prompt { background: #fdfdfd; border-bottom: 1px solid #d6d6dc; padding: 20px 30px; overflow-y: auto; max-height: 42%; }
.writing-prompt h3 { color: var(--navy); font-size: .95rem; margin-bottom: 8px; }
.writing-prompt p { line-height: 1.7; font-size: .97rem; margin-bottom: 8px; }
.essay-area { flex: 1; display: flex; flex-direction: column; padding: 14px 30px 10px; background: #fff; }
.essay-area textarea {
  flex: 1; resize: none; border: 1px solid var(--border); border-radius: 6px;
  padding: 16px; font-size: 1rem; line-height: 1.7; font-family: inherit;
}
.essay-area textarea:focus { outline: 2px solid var(--accent); }
.essay-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .85rem; padding: 8px 2px; }

/* calculator */
.calc {
  position: fixed; right: 26px; bottom: 76px; width: 250px; z-index: 60;
  background: #f4f4f6; border: 1px solid #8d8d96; border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.3); padding: 10px;
}
.calc h4 { font-size: .78rem; color: var(--muted); text-align: center; margin-bottom: 6px; }
.calc-display {
  background: #fff; border: 1px solid #9a9aa2; border-radius: 4px; height: 44px;
  display: flex; align-items: center; justify-content: flex-end; padding: 0 12px;
  font-size: 1.3rem; font-variant-numeric: tabular-nums; overflow: hidden; margin-bottom: 8px;
}
.calc-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.calc-grid button {
  background: linear-gradient(#fff, #e4e4e8); border: 1px solid #9a9aa2; border-radius: 4px;
  padding: 9px 0; font-size: .9rem;
}
.calc-grid button:hover { background: #fff; }
.calc-grid button.op { background: linear-gradient(#e8f0fa, #cfdfef); }
.calc-grid button.eq { background: var(--accent); color: #fff; grid-column: span 2; }
.calc .close { position: absolute; top: 6px; right: 8px; border: none; background: none; font-size: 1rem; color: var(--muted); }

/* modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,25,40,.45); z-index: 100;
  display: flex; align-items: center; justify-content: center;
}
.modal {
  background: #fff; border-radius: 10px; padding: 28px 32px; width: 480px; max-width: 92vw;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.modal h2 { color: var(--navy); font-size: 1.15rem; margin-bottom: 12px; }
.modal p { line-height: 1.6; font-size: .93rem; margin-bottom: 8px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* spinner overlay */
.scoring-overlay {
  position: fixed; inset: 0; background: rgba(255,255,255,.92); z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}
.spinner {
  width: 54px; height: 54px; border: 5px solid #d5e4f5; border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- results ---------- */
.score-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; margin-bottom: 24px; }
.score-card { background: var(--panel); border-radius: 12px; padding: 24px; text-align: center; border: 1px solid var(--border); position: relative; }
.score-card .label { color: var(--muted); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.score-card .big { font-size: 2.6rem; font-weight: 800; color: var(--navy); margin: 8px 0 2px; }
.score-card .scale { color: var(--muted); font-size: .8rem; }
.score-card .raw { color: var(--muted); font-size: .85rem; margin-top: 6px; }
.score-card .ai-tag { position: absolute; top: 12px; right: 12px; font-size: .7rem; background: var(--navy); color: #fff; padding: 2px 8px; border-radius: 12px; }
.rubric-bars { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.rubric-bar { display: grid; grid-template-columns: 150px 1fr 40px; align-items: center; gap: 12px; font-size: .88rem; }
.rubric-bar .track { background: #e8e8ee; border-radius: 6px; height: 12px; overflow: hidden; }
.rubric-bar .fill { background: linear-gradient(90deg, #4d8fd0, var(--navy)); height: 100%; border-radius: 6px; }
.feedback-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 18px; }
.feedback-box { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; }
.feedback-box h4 { font-size: .9rem; margin-bottom: 10px; }
.feedback-box.green h4 { color: var(--green); }
.feedback-box.red h4 { color: var(--red); }
.feedback-box.amber h4 { color: var(--amber); }
.feedback-box li { font-size: .88rem; line-height: 1.55; margin-bottom: 8px; margin-left: 18px; }

/* ---------- review page ---------- */
.review-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.review-toolbar select { padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; }
.review-q { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 22px 26px; margin-bottom: 18px; }
.review-q .q-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.chip { font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 12px; background: #eef1f6; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.chip.ok { background: var(--green-bg); color: var(--green); }
.chip.bad { background: var(--red-bg); color: var(--red); }
.chip.star { background: var(--amber-bg); color: var(--amber); cursor: pointer; border: none; font-size: .8rem; }
.explanation {
  margin-top: 16px; background: #f4f8fd; border-left: 4px solid var(--accent);
  padding: 14px 18px; border-radius: 0 8px 8px 0; line-height: 1.65; font-size: .92rem;
}
.explanation h5 { color: var(--navy); margin-bottom: 6px; font-size: .82rem; text-transform: uppercase; letter-spacing: .5px; }
.note-box { margin-top: 14px; }
.note-box label { font-size: .82rem; font-weight: 700; color: var(--muted); display: block; margin-bottom: 6px; }
.note-box textarea {
  width: 100%; min-height: 64px; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; font-size: .9rem; resize: vertical; background: #fffdf5;
}
.note-status { font-size: .76rem; color: var(--green); margin-top: 4px; min-height: 1em; }
.answer-line { font-size: .88rem; margin-top: 12px; color: var(--muted); }
.answer-line b { color: var(--text); }

/* favorites */
.fav-q .fav-meta { font-size: .8rem; color: var(--muted); margin-bottom: 10px; }

/* toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--navy); color: #fff; padding: 10px 22px; border-radius: 24px;
  font-size: .9rem; z-index: 300; box-shadow: 0 6px 20px rgba(0,0,0,.3);
  animation: toast-in .25s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 900px) {
  .split-view { grid-template-columns: 1fr; }
  .split-view .passage-pane { border-right: none; border-bottom: 1px solid #d6d6dc; max-height: 40%; }
  .exam-topbar .center { position: static; transform: none; }
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: 48px; padding: 22px 20px 30px; text-align: center;
  color: var(--muted); font-size: .78rem; border-top: 1px solid var(--border);
}
.site-footer .footer-links { margin-bottom: 6px; }
.site-footer .footer-links a { color: var(--accent); font-weight: 600; }
.site-footer .footer-links .dot { margin: 0 8px; color: var(--border); }
.site-footer .footer-line { max-width: 720px; margin: 0 auto; line-height: 1.6; }
body.exam-mode .site-footer { display: none; }

/* ---------- legal page ---------- */
.legal { max-width: 820px; }
.legal-sec { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 18px 22px; margin-bottom: 14px; }
.legal-sec h3 { font-size: .95rem; color: var(--navy); margin-bottom: 8px; }
.legal-sec p { font-size: .88rem; line-height: 1.7; color: var(--text); }
.score-note { font-size: .8rem; color: var(--muted); margin: 4px 0 18px; }
.score-note a { color: var(--accent); }

/* ---------- donate page ---------- */
.donate { max-width: 900px; }
.donate-intro p { line-height: 1.75; font-size: .95rem; }
.donate-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.donate-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 22px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.donate-card .donate-name { font-weight: 700; color: var(--navy); font-size: 1rem; }
.donate-card .donate-qr { width: 180px; height: 180px; object-fit: contain; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.donate-card .donate-note { font-size: .82rem; color: var(--muted); line-height: 1.5; }
.donate-card .donate-hint { font-size: .74rem; color: var(--muted); }
.donate-card .donate-link { display: inline-block; padding: 9px 22px; border-radius: 8px; text-decoration: none; margin-top: 6px; }

/* ---------- landing page ---------- */
.landing { max-width: 1080px; margin: 0 auto; padding: 0 20px 40px; width: 100%; }
.land-nav { display: flex; align-items: center; gap: 12px; padding: 18px 0; }
.land-nav .logo { font-size: 1.25rem; font-weight: 800; color: var(--navy); }
.land-nav .logo span { color: var(--accent); }
.land-nav .spacer { flex: 1; }
.land-nav .lang-select { background: #fff; color: var(--text); border-color: var(--border); }
.land-nav a.btn-primary, .land-nav a.btn-ghost { text-decoration: none; }
.land-hero {
  background: linear-gradient(125deg, var(--navy) 0%, #29517f 55%, #3a7ec2 100%);
  color: #fff; border-radius: 18px; padding: 56px 48px 42px; text-align: center;
}
.land-badge {
  display: inline-block; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35);
  padding: 4px 16px; border-radius: 20px; font-size: .8rem; margin-bottom: 18px; color: #dcebff;
}
.land-hero h1 { font-size: 2.3rem; max-width: 720px; margin: 0 auto 14px; line-height: 1.25; }
.land-sub { color: #cfe2f5; max-width: 640px; margin: 0 auto 26px; line-height: 1.65; }
.land-cta { display: flex; gap: 14px; justify-content: center; margin-bottom: 34px; }
.btn-primary.big, .btn-ghost.big { padding: 13px 30px; font-size: 1rem; border-radius: 8px; }
.land-cta .btn-ghost.big { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.5); color: #fff; text-decoration: none; }
.land-cta .btn-primary.big { background: #fff; color: var(--navy); text-decoration: none; }
.land-cta .btn-primary.big:hover { background: #e8f1fb; }
.land-stats { display: flex; gap: 44px; justify-content: center; }
.land-stat { display: flex; flex-direction: column; }
.land-stat b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.land-stat span { font-size: .78rem; color: #b9d2ec; text-transform: uppercase; letter-spacing: .5px; }

.land-ticker {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  margin-top: 22px; padding: 14px 0 10px; overflow: hidden;
}
.ticker-head { font-weight: 700; color: var(--navy); font-size: .9rem; padding: 0 22px 8px; }
.ticker-viewport { height: 168px; overflow: hidden; position: relative; }
.ticker-list { display: flex; flex-direction: column; animation: ticker-scroll linear infinite; }
@keyframes ticker-scroll { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.ticker-item {
  display: flex; align-items: baseline; gap: 10px; padding: 7px 22px;
  font-size: .88rem; height: 28px; overflow: hidden; white-space: nowrap; flex: 0 0 auto;
}
.ticker-user { font-weight: 700; color: var(--accent-dark); }
.ticker-text { color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.ticker-when { margin-left: auto; color: var(--muted); font-size: .76rem; flex: 0 0 auto; }

.land-section { margin-top: 46px; }
.land-section h2 { color: var(--navy); font-size: 1.4rem; text-align: center; margin-bottom: 8px; }
.land-sec-sub { text-align: center; color: var(--muted); margin-bottom: 22px; font-size: .92rem; }
.land-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-top: 18px; }
.land-feat { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 24px 22px; }
.land-feat-icon { font-size: 1.7rem; margin-bottom: 10px; }
.land-feat h3 { color: var(--navy); font-size: 1rem; margin-bottom: 8px; }
.land-feat p { color: var(--muted); font-size: .86rem; line-height: 1.6; }
.land-exams { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.land-exam { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.land-exam.soon { opacity: .75; }
.land-exam-name { font-weight: 800; font-size: 1.25rem; color: var(--navy); }
.land-exam p { color: var(--muted); font-size: .86rem; line-height: 1.55; flex: 1; }
.land-exam-note { font-size: .78rem; color: var(--accent-dark); font-weight: 600; }
.land-final { text-align: center; padding: 30px 0 10px; }
.land-final p { color: var(--muted); margin: 10px 0 20px; }
.land-final .btn-primary.big { text-decoration: none; display: inline-block; }
.land-legal-note { margin-top: 22px; font-size: .8rem; }

/* ---------- dashboard exam groups ---------- */
.exam-group { border-left: 5px solid var(--accent); padding-left: 12px; }
.exam-chip { background: #e3ecf7; color: var(--navy); margin-right: 2px; }

/* ---------- tabs (favorites page) ---------- */
.fav-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.fav-toolbar .grow { flex: 1; }
.tabs { display: flex; gap: 6px; background: #e6e6ec; padding: 4px; border-radius: 10px; }
.tabs .tab {
  border: none; background: transparent; padding: 8px 18px; border-radius: 8px;
  font-weight: 600; color: var(--muted); font-size: .9rem;
}
.tabs .tab.active { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.note-snippet {
  font-size: .85rem; color: var(--muted); background: #f6f6f9; border-radius: 6px;
  padding: 8px 12px; margin-bottom: 8px; line-height: 1.5;
}

/* ---------- diagnostic report ---------- */
.report-cta p { color: var(--muted); line-height: 1.6; margin-bottom: 14px; }
.report-loading { display: flex; align-items: center; gap: 16px; padding: 26px; color: var(--muted); }
.report-loading .spinner { width: 30px; height: 30px; border-width: 3px; }
.report-card { gap: 14px; }
.report-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.report-head h3 { flex: 1; min-width: 240px; font-size: 1.15rem; }
.report-summary { line-height: 1.7; font-size: .95rem; }
.report-percentile {
  background: #e8f1fb; color: var(--navy); font-weight: 700; border-radius: 8px;
  padding: 10px 16px; font-size: .95rem;
}
.report-areas h4, .report-plan h4 { color: var(--navy); font-size: .92rem; margin-bottom: 10px; }
.area-row { display: grid; grid-template-columns: minmax(150px, 260px) 1fr 46px auto; align-items: center; gap: 10px; margin-bottom: 8px; }
.area-name { font-size: .85rem; }
.area-row .track { background: #e8e8ee; border-radius: 6px; height: 12px; overflow: hidden; }
.area-row .fill { height: 100%; border-radius: 6px; background: #d9a13b; }
.area-row .fill.strong { background: var(--green); }
.area-row .fill.ok { background: #d9a13b; }
.area-row .fill.weak { background: var(--red); }
.area-pct { font-size: .82rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip.level-strong { background: var(--green-bg); color: var(--green); }
.chip.level-ok { background: var(--amber-bg); color: var(--amber); }
.chip.level-weak { background: var(--red-bg); color: var(--red); }
.report-plan ol { margin-left: 20px; }
.report-plan li { font-size: .9rem; line-height: 1.6; margin-bottom: 6px; }
.report-enc {
  background: var(--green-bg); border-left: 4px solid var(--green); border-radius: 0 8px 8px 0;
  padding: 14px 18px; line-height: 1.7; font-size: .93rem;
}
.report-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.score-card.total { background: linear-gradient(135deg, var(--navy), #3570ad); }
.score-card.total .label, .score-card.total .scale { color: #cfe2f5; }
.score-card.total .big { color: #fff; font-size: 3rem; }

/* ---------- GMAT question types ---------- */
.ds-statements { margin: 4px 0 16px; }
.ds-stmt {
  background: #f4f5f8; border: 1px solid var(--border); border-radius: 6px;
  padding: 10px 16px; margin-bottom: 8px; line-height: 1.6; font-size: .95rem;
}
.ta-table { border-collapse: collapse; width: 100%; margin-top: 6px; }
.ta-table th, .ta-table td { border: 1px solid #b9b9c1; padding: 10px 14px; font-size: .92rem; }
.ta-table th { background: #f4f5f8; }
.ta-stmt { line-height: 1.55; }
.ta-cell { text-align: center; width: 110px; }
.ta-cell label { display: block; cursor: pointer; }
.ta-cell.selected { background: #e8f1fb; box-shadow: inset 0 0 0 2px var(--accent); }
.ta-cell.correct { background: var(--green-bg); box-shadow: inset 0 0 0 2px var(--green); }
.ta-cell.wrong { background: var(--red-bg); box-shadow: inset 0 0 0 2px var(--red); }
.tp-table .ta-cell { width: 150px; }

/* ---------- donate: costs & map ---------- */
.donate-cost-intro { color: var(--muted); font-size: .9rem; line-height: 1.6; margin-bottom: 12px; }
.cost-table td:last-child, .cost-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.cost-total td { background: #f4f5f8; }
.per-user-box {
  margin-top: 16px; text-align: center; background: #fff8e6; border: 1px dashed var(--amber);
  border-radius: 10px; padding: 16px;
}
.per-user-num { font-size: 1.7rem; font-weight: 800; color: var(--amber); }
.per-user-label { font-size: .85rem; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.donate-note { font-size: .8rem; color: var(--muted); margin-top: 12px; line-height: 1.5; }
.map-stats { display: flex; gap: 26px; font-size: .9rem; color: var(--muted); margin-bottom: 12px; }
.map-stats b { color: var(--navy); font-variant-numeric: tabular-nums; }
.map-box { position: relative; }
.world-map { width: 100%; height: auto; display: block; }
.world-map path { fill: #e3e4ea; stroke: #ffffff; stroke-width: .5; transition: fill .2s; }
.world-map path[data-cc]:hover { stroke: var(--navy); stroke-width: 1; }
.map-tooltip {
  position: absolute; z-index: 5; pointer-events: none; background: var(--navy); color: #fff;
  font-size: .78rem; padding: 5px 10px; border-radius: 6px; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.map-note { font-size: .76rem; color: var(--muted); margin-top: 10px; }

@media (max-width: 760px) {
  .land-hero { padding: 36px 22px 30px; }
  .land-hero h1 { font-size: 1.6rem; }
  .land-stats { gap: 22px; }
  .area-row { grid-template-columns: 1fr 46px; }
  .area-row .track { grid-column: 1 / -1; }
}

/* ---- account settings ---- */
.card.danger { border: 1px solid var(--red); }
.card.danger h3 { color: var(--red); }
.acct-hint { color: var(--muted); font-size: .9rem; margin: 6px 0 4px; }
.page .card label { display: block; font-size: .85rem; font-weight: 600; margin: 12px 0 5px; }
.page .card input {
  width: 100%; max-width: 420px; padding: 9px 11px; border: 1px solid var(--border);
  border-radius: 6px; font-size: .95rem; box-sizing: border-box;
}
.page .card input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.acct-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.acct-ok { color: var(--green); font-size: .9rem; }
