:root {
  --green-900: #273c38;
  --green-800: #314743;
  --green-700: #3f5351;
  --green-600: #526a65;
  --green-100: #e7efec;
  --canvas: #f4f7f6;
  --surface: #ffffff;
  --terracotta: #b95738;
  --terracotta-dark: #9f452d;
  --terracotta-soft: #f6e7e1;
  --graphite: #25302e;
  --muted: #6b7975;
  --line: #dfe7e4;
  --gold: #c9953f;
  --blue: #5683a4;
  --success: #40846f;
  --warning: #c8873b;
  --danger: #aa4f45;
  --shadow: 0 16px 40px rgba(45, 67, 62, 0.08);
  --radius: 20px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

.auth-shell { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 28px; padding: 32px 18px; background: radial-gradient(circle at 18% 12%, rgba(185,87,56,.18), transparent 30%), linear-gradient(145deg, var(--green-900), #1f302d); color: white; }
.auth-back-link { position: absolute; top: 24px; left: 28px; color: rgba(255,255,255,.76); text-decoration: none; font-size: 12px; font-weight: 700; }
.auth-back-link:hover { color: white; }
.auth-brand { display: flex; gap: 12px; align-items: center; }
.auth-brand > div:last-child { display: grid; line-height: 1; }
.auth-brand strong { font-family: Manrope, sans-serif; font-size: 24px; letter-spacing: .08em; }
.auth-brand span { color: #d9e6e2; font-size: 13px; margin-top: 7px; }
.auth-card { width: min(440px, 100%); padding: 34px; border-radius: 24px; background: white; color: var(--graphite); box-shadow: 0 28px 80px rgba(0,0,0,.24); }
.auth-card h1 { margin: 8px 0 10px; font: 800 28px/1.15 Manrope, sans-serif; }
.auth-card > p { color: var(--muted); margin-bottom: 22px; }
.auth-card form { display: grid; gap: 14px; }
.auth-card label { display: grid; gap: 7px; color: var(--green-800); font-size: 12px; font-weight: 700; }
.auth-card input { width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 12px 13px; color: var(--graphite); font: inherit; }
.auth-card input:focus { outline: 2px solid rgba(185,87,56,.25); border-color: var(--terracotta); }
.auth-card .btn { width: 100%; margin-top: 5px; }
.auth-toggle { display: block; margin: 17px auto 0; }
.auth-message { min-height: 20px; margin: 14px 0 0 !important; color: var(--danger) !important; font-size: 12px; text-align: center; }
.auth-shell > small { color: rgba(255,255,255,.68); text-align: center; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--graphite);
  background: var(--canvas);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 255px minmax(0, 1fr); }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 255px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: 26px 18px 20px;
  color: white;
  background:
    radial-gradient(circle at 0 0, rgba(255,255,255,.08), transparent 28%),
    linear-gradient(165deg, var(--green-700), var(--green-900));
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 28px; }
.brand-mark {
  width: 43px;
  height: 43px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 14px 14px 18px 18px;
  background: #f7ede7;
  box-shadow: inset 0 -3px 0 rgba(185,87,56,.15);
}
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; top: -4px; border: 8px solid transparent; border-bottom-color: #f7ede7; }
.brand-mark::before { left: 3px; transform: rotate(-35deg); }
.brand-mark::after { right: 3px; transform: rotate(35deg); }
.brand-eye { width: 7px; height: 7px; border-radius: 50%; background: var(--green-800); z-index: 1; }
.brand-beak { position: absolute; bottom: 9px; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 6px solid var(--terracotta); }
.brand strong { display: block; font: 800 18px/1 "Manrope", sans-serif; letter-spacing: .08em; }
.brand div > span { color: #d5e1de; font-size: 13px; }
.nav { display: flex; flex-direction: column; gap: 5px; }
.nav-label { margin: 22px 12px 7px; color: #9eb2ad; font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.nav-item {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  color: #dbe5e2;
  background: transparent;
  text-align: left;
  font-size: 14px;
  transition: .18s ease;
}
.nav-item > span { font-size: 18px; color: #a9bdb8; }
.nav-item b { min-width: 22px; padding: 3px 6px; color: #f4d8ce; background: rgba(185,87,56,.25); border-radius: 99px; text-align: center; font-size: 10px; }
.nav-item:hover { background: rgba(255,255,255,.07); color: white; }
.nav-item.active { color: white; background: rgba(255,255,255,.12); box-shadow: inset 3px 0 0 var(--terracotta); }
.nav-item.active > span { color: #f0b49f; }
.sidebar-note { margin-top: auto; padding: 14px; display: flex; align-items: center; gap: 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(0,0,0,.08); }
.sidebar-note strong, .sidebar-note small { display: block; }
.sidebar-note strong { font-size: 12px; }
.sidebar-note small { color: #aebfbb; margin-top: 3px; font-size: 10px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #8ed0af; box-shadow: 0 0 0 5px rgba(142,208,175,.12); }

.main-content { grid-column: 2; min-width: 0; padding: 0 34px 26px; }
.topbar { height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar h1 { margin: 3px 0 0; font: 700 22px/1.2 "Manrope", sans-serif; }
.eyebrow, .section-kicker { margin: 0; color: var(--terracotta); font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.mode-switch { display: flex; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.mode-switch button { padding: 8px 13px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 600; }
.mode-switch button.active { color: white; background: var(--green-700); }
.icon-button { width: 40px; height: 40px; position: relative; border: 1px solid var(--line); border-radius: 12px; color: var(--green-700); background: white; font-size: 18px; }
.icon-button span { position: absolute; right: 8px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--terracotta); }
.avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; color: white; background: var(--terracotta); font-size: 12px; font-weight: 700; }
.mobile-menu { display: none; border: 0; background: transparent; color: var(--green-700); font-size: 22px; }

.view { display: none; animation: fadeIn .25s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } }

.hero-card, .candidate-hero {
  min-height: 248px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  padding: 34px 42px;
  border-radius: 26px;
  color: white;
  background:
    radial-gradient(circle at 82% 30%, rgba(255,255,255,.13), transparent 18%),
    radial-gradient(circle at 95% 105%, rgba(185,87,56,.38), transparent 34%),
    linear-gradient(125deg, #304844, #3f5954 58%, #536c65);
  box-shadow: var(--shadow);
}
.hero-card::after, .candidate-hero::after { content: ""; position: absolute; right: -40px; top: -100px; width: 280px; height: 280px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 45px rgba(255,255,255,.025), 0 0 0 90px rgba(255,255,255,.02); }
.hero-copy { max-width: 650px; position: relative; z-index: 2; }
.pill { display: inline-flex; align-items: center; min-height: 26px; padding: 5px 10px; border-radius: 99px; color: var(--green-700); background: var(--green-100); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.pill-light { color: #f5e2da; background: rgba(255,255,255,.1); }
.hero-copy h2, .candidate-hero h2 { max-width: 620px; margin: 18px 0 10px; font: 800 clamp(28px, 4vw, 42px)/1.08 "Manrope", sans-serif; letter-spacing: -.03em; }
.hero-copy p, .candidate-hero > div > p { max-width: 620px; margin: 0; color: #d7e1de; line-height: 1.65; }
.hero-actions { display: flex; gap: 10px; margin-top: 24px; }
.btn { min-height: 42px; padding: 10px 17px; border: 0; border-radius: 11px; font-weight: 700; font-size: 13px; transition: .16s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-terracotta { color: white; background: var(--terracotta); box-shadow: 0 7px 20px rgba(185,87,56,.22); }
.btn-terracotta:hover { background: var(--terracotta-dark); }
.btn-ghost-light { color: white; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); }
.btn-secondary { color: var(--green-700); border: 1px solid var(--line); background: white; }
.score-orbit { width: 170px; height: 170px; flex: 0 0 auto; position: relative; z-index: 2; display: grid; place-items: center; margin-right: 42px; }
.score-orbit svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.score-orbit circle { fill: none; stroke-width: 8; }
.orbit-bg { stroke: rgba(255,255,255,.13); }
.orbit-value { stroke: #e8a78f; stroke-linecap: round; stroke-dasharray: 339; stroke-dashoffset: 122; }
.score-orbit div { text-align: center; }
.score-orbit strong { display: block; font: 800 32px/1 "Manrope", sans-serif; }
.score-orbit span { color: #cbd9d5; font-size: 11px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin: 18px 0; }
.stat-card { min-height: 120px; display: flex; align-items: center; gap: 15px; padding: 20px; border: 1px solid rgba(63,83,81,.06); border-radius: 17px; background: white; box-shadow: 0 8px 24px rgba(45,67,62,.04); }
.stat-icon { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; font-size: 20px; }
.stat-icon.green { color: var(--green-700); background: var(--green-100); }
.stat-icon.clay { color: var(--terracotta); background: var(--terracotta-soft); }
.stat-icon.gold { color: var(--gold); background: #faf0dc; }
.stat-icon.blue { color: var(--blue); background: #e8f0f6; }
.stat-card span, .stat-card strong, .stat-card small { display: block; }
.stat-card span { color: var(--muted); font-size: 11px; }
.stat-card strong { margin: 2px 0; font: 800 25px/1.2 "Manrope", sans-serif; }
.stat-card small { color: #87938f; font-size: 10px; }
.stat-card em { color: var(--success); font-style: normal; font-weight: 700; }

.dashboard-grid { display: grid; grid-template-columns: 1.5fr .9fr; gap: 18px; }
.panel { padding: 24px; border: 1px solid rgba(63,83,81,.07); border-radius: var(--radius); background: white; box-shadow: 0 8px 25px rgba(45,67,62,.04); }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.panel-header h3 { margin: 5px 0 0; font: 700 18px/1.25 "Manrope", sans-serif; }
.text-button { padding: 5px 0; border: 0; color: var(--terracotta); background: transparent; font-size: 11px; font-weight: 700; }
.coverage-list { display: grid; gap: 18px; margin-top: 25px; }
.coverage-label { display: flex; justify-content: space-between; margin-bottom: 7px; color: #52615e; font-size: 12px; }
.coverage-label strong { color: var(--graphite); }
.progress { height: 7px; overflow: hidden; border-radius: 99px; background: #e9efed; }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green-700), #78948d); }
.timeline { display: grid; gap: 0; margin-top: 20px; }
.timeline > div { position: relative; display: flex; gap: 12px; padding: 0 0 18px; }
.timeline > div:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 0; width: 1px; background: var(--line); }
.timeline-icon { width: 31px; height: 31px; z-index: 1; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: var(--green-700); background: var(--green-100); font-size: 13px; }
.timeline p { margin: 0; }
.timeline strong, .timeline small { display: block; }
.timeline strong { margin: 2px 0 3px; font-size: 12px; }
.timeline small { color: var(--muted); font-size: 10px; }
.official-strip { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 13px; margin-top: 18px; padding: 16px 19px; border: 1px solid #dfe9e6; border-radius: 15px; background: #edf4f2; }
.official-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green-700); font: 700 13px serif; }
.official-strip strong { font-size: 12px; }
.official-strip p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.official-strip > span { color: #7e8c88; font-size: 9px; }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 4px 0 22px; }
.section-heading h2 { margin: 5px 0; font: 800 27px/1.2 "Manrope", sans-serif; }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.toolbar { display: grid; grid-template-columns: 1fr 190px 170px; gap: 11px; margin-bottom: 14px; }
.search-field { position: relative; }
.search-field span { position: absolute; left: 15px; top: 12px; color: var(--muted); }
.search-field input { padding-left: 40px; }
input, select, textarea { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; outline: none; color: var(--graphite); background: white; transition: .16s ease; }
input:focus, select:focus, textarea:focus { border-color: #819b95; box-shadow: 0 0 0 3px rgba(63,83,81,.08); }
textarea { min-height: 94px; resize: vertical; }
.table-card { overflow-x: auto; border: 1px solid rgba(63,83,81,.08); border-radius: var(--radius); background: white; box-shadow: 0 8px 25px rgba(45,67,62,.04); }
table { width: 100%; border-collapse: collapse; min-width: 800px; }
th { padding: 14px 18px; color: #7b8885; background: #f8faf9; font-size: 9px; text-align: left; letter-spacing: .08em; text-transform: uppercase; }
td { padding: 16px 18px; border-top: 1px solid #edf1ef; font-size: 11px; vertical-align: middle; }
td strong { display: block; max-width: 330px; color: var(--graphite); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
td small { display: block; max-width: 330px; margin-top: 4px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { display: inline-flex; padding: 5px 8px; border-radius: 99px; font-size: 9px; font-weight: 700; }
.tag.published, .tag.active { color: #2d6c59; background: #e5f2ed; }
.tag.review { color: #946520; background: #fbf0d8; }
.tag.draft, .tag.expired { color: #7a6862; background: #eee9e7; }
.difficulty { display: flex; gap: 2px; align-items: flex-end; }
.difficulty i { width: 3px; background: #d2ddda; border-radius: 2px; }
.difficulty i:nth-child(1) { height: 7px; }
.difficulty i:nth-child(2) { height: 11px; }
.difficulty i:nth-child(3) { height: 15px; }
.difficulty.low i:nth-child(1), .difficulty.medium i:nth-child(-n+2), .difficulty.high i { background: var(--terracotta); }
.menu-dots { border: 0; color: var(--muted); background: transparent; font-weight: 700; }
.empty-state { padding: 50px; color: var(--muted); text-align: center; font-size: 13px; }

.material-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 17px; }
.chip { padding: 8px 13px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: white; font-size: 11px; }
.chip.active { color: white; border-color: var(--green-700); background: var(--green-700); }
.material-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.material-card { display: flex; flex-direction: column; min-height: 230px; padding: 21px; border: 1px solid rgba(63,83,81,.08); border-radius: 18px; background: white; box-shadow: 0 8px 24px rgba(45,67,62,.04); }
.material-card .material-top { display: flex; justify-content: space-between; align-items: flex-start; }
.material-type-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: var(--green-700); background: var(--green-100); }
.material-card h3 { margin: 18px 0 7px; font: 700 16px/1.3 "Manrope", sans-serif; }
.material-card p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 11px; }
.material-card footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 18px; color: #7d8a86; font-size: 9px; }
.material-card footer button { border: 0; color: var(--terracotta); background: transparent; font-weight: 700; }

.user-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 15px; }
.user-summary article { padding: 17px 19px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.user-summary strong, .user-summary span { display: block; }
.user-summary strong { font: 800 22px/1.2 "Manrope", sans-serif; }
.user-summary span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 33px; height: 33px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: var(--green-700); background: var(--green-100); font-weight: 700; }
.table-progress { min-width: 90px; }
.table-progress span { display: block; margin-bottom: 5px; font-size: 10px; }
.table-progress i { display: block; height: 5px; overflow: hidden; border-radius: 99px; background: #e6ecea; }
.table-progress b { display: block; height: 100%; background: var(--green-700); }

.candidate-hero { min-height: 220px; padding: 32px 38px; }
.candidate-hero h2 { font-size: 34px; }
.candidate-hero > div:first-child { position: relative; z-index: 2; }
.candidate-hero .btn { margin-top: 22px; }
.weekly-goal { z-index: 2; display: flex; align-items: center; gap: 18px; margin-right: 28px; }
.goal-ring { width: 108px; height: 108px; display: grid; place-content: center; text-align: center; border: 8px solid rgba(255,255,255,.11); border-top-color: #e8a78f; border-right-color: #e8a78f; border-radius: 50%; transform: rotate(-10deg); }
.goal-ring strong, .goal-ring span { transform: rotate(10deg); }
.goal-ring strong { font: 800 25px/1 "Manrope", sans-serif; }
.goal-ring span { margin-top: 4px; color: #cbd8d4; font-size: 9px; }
.weekly-goal p { margin: 0; }
.weekly-goal p strong, .weekly-goal p small { display: block; }
.weekly-goal p small { margin-top: 4px; color: #c7d5d1; }
.candidate-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 18px 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.candidate-toolbar label { color: var(--muted); font-size: 10px; }
.candidate-toolbar select { width: 310px; margin-top: 5px; min-height: 38px; }
.deadline { display: flex; align-items: center; gap: 10px; }
.deadline > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: var(--terracotta); background: var(--terracotta-soft); }
.deadline small, .deadline strong { display: block; }
.deadline small { color: var(--muted); font-size: 9px; }
.deadline strong { margin-top: 3px; font-size: 11px; }
.candidate-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 17px; }
.plan-date { padding: 6px 9px; border-radius: 8px; color: var(--green-700); background: var(--green-100); font-size: 10px; }
.study-list { display: grid; gap: 9px; margin-top: 18px; }
.study-item { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 13px; border: 1px solid #e9eeec; border-radius: 13px; background: #fbfcfc; text-align: left; }
.study-item > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); background: #ecf1ef; font-size: 10px; font-weight: 700; }
.study-item strong, .study-item small { display: block; }
.study-item strong { font-size: 12px; }
.study-item small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.study-item em { color: #7c8a87; font-size: 9px; font-style: normal; }
.study-item.done > span { color: white; background: var(--success); }
.study-item.current { border-color: #d4b0a2; background: #fff9f6; box-shadow: inset 3px 0 0 var(--terracotta); }
.study-item.current > span { color: white; background: var(--terracotta); }
.study-item.current em { color: var(--terracotta); font-weight: 700; }
.readiness-score { margin-top: 20px; }
.readiness-score strong { font: 800 56px/1 "Manrope", sans-serif; color: var(--green-700); }
.readiness-score span { color: var(--muted); }
.readiness-panel > p { color: var(--muted); font-size: 11px; line-height: 1.6; }
.mini-bars { display: grid; gap: 12px; margin-top: 20px; }
.mini-bars div { display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: 8px; }
.mini-bars span { color: var(--muted); font-size: 9px; }
.mini-bars i { height: 5px; overflow: hidden; border-radius: 9px; background: #e8eeec; }
.mini-bars b { display: block; height: 100%; border-radius: 9px; background: var(--green-700); }
.insight-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.insight-grid article { display: flex; gap: 12px; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.insight-icon { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: var(--green-700); background: var(--green-100); }
.insight-icon.warn { color: var(--warning); background: #fbf1dc; }
.insight-grid strong { font-size: 11px; }
.insight-grid p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }

.quiz-topline { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 16px; max-width: 920px; margin: 5px auto 18px; }
.quiz-progress { height: 6px; overflow: hidden; border-radius: 99px; background: #dde6e3; }
.quiz-progress i { display: block; width: 20%; height: 100%; border-radius: inherit; background: var(--terracotta); transition: width .2s ease; }
.quiz-topline > span { color: var(--muted); font-size: 10px; }
.timer { padding: 7px 10px; border-radius: 8px; color: var(--green-700) !important; background: var(--green-100); font-weight: 700; }
.quiz-card { max-width: 920px; margin: auto; padding: 38px 44px; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: var(--shadow); }
.quiz-meta { display: flex; gap: 8px; }
.quiz-meta span { padding: 6px 9px; border-radius: 8px; color: var(--green-700); background: var(--green-100); font-size: 9px; font-weight: 700; }
.quiz-card h2 { margin: 20px 0 10px; font: 800 27px/1.2 "Manrope", sans-serif; }
.case-text { padding: 18px; border-left: 3px solid var(--green-700); border-radius: 0 10px 10px 0; color: #4e5d59; background: #f5f8f7; font-size: 13px; line-height: 1.7; }
.question-text { margin: 24px 0 15px; font-weight: 700; line-height: 1.5; }
.option-list { display: grid; gap: 10px; }
.option-button { display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 11px; width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; color: var(--graphite); background: white; text-align: left; font-size: 12px; line-height: 1.45; }
.option-button span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); background: #f0f4f2; font-weight: 700; }
.option-button:hover { border-color: #a9bcb7; }
.option-button.selected { border-color: var(--terracotta); background: #fff9f6; box-shadow: 0 0 0 3px var(--terracotta-soft); }
.option-button.selected span { color: white; background: var(--terracotta); }
.quiz-actions { display: flex; justify-content: space-between; margin-top: 28px; }
.results-hero { max-width: 760px; margin: 0 auto 17px; padding: 34px; border-radius: 22px; text-align: center; color: white; background: linear-gradient(135deg, var(--green-800), var(--green-600)); }
.result-score { margin: 18px 0 5px; }
.result-score strong { font: 800 58px/1 "Manrope", sans-serif; }
.result-score span { color: #c7d5d1; }
.results-hero h2 { margin: 10px 0 4px; }
.results-hero p { margin: 0 0 22px; color: #d2dedb; }
.results-hero .btn-secondary { margin-left: 8px; color: white; border-color: rgba(255,255,255,.25); background: transparent; }
.results-list { max-width: 760px; display: grid; gap: 10px; margin: auto; }
.result-item { padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.result-item header { display: flex; justify-content: space-between; gap: 15px; }
.result-item header strong { font-size: 12px; }
.result-item p { margin: 10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.result-item.correct { border-left: 4px solid var(--success); }
.result-item.incorrect { border-left: 4px solid var(--danger); }

.app-footer { padding: 22px 10px 0; color: #87928f; text-align: center; font-size: 9px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(23,35,32,.64); backdrop-filter: blur(4px); }
.modal-backdrop.open { display: flex; }
.modal { width: min(760px, 100%); max-height: 92vh; overflow-y: auto; padding: 27px; border-radius: 22px; background: white; box-shadow: 0 28px 70px rgba(20,35,31,.25); }
.modal-small { width: min(520px, 100%); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.modal-header h2 { margin: 5px 0 0; font: 800 22px/1.2 "Manrope", sans-serif; }
.modal-close { width: 35px; height: 35px; border: 0; border-radius: 10px; color: var(--muted); background: var(--canvas); font-size: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid.single { grid-template-columns: 1fr; }
.form-grid label { color: #596762; font-size: 10px; font-weight: 700; }
.form-grid input, .form-grid select, .form-grid textarea { margin-top: 6px; font-size: 12px; font-weight: 400; }
.span-2 { grid-column: span 2; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 23px; padding-top: 18px; border-top: 1px solid var(--line); }
.toast { position: fixed; right: 25px; bottom: 25px; z-index: 200; min-width: 260px; padding: 14px 17px; border-radius: 12px; color: white; background: var(--green-800); box-shadow: var(--shadow); font-size: 11px; opacity: 0; transform: translateY(15px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #9b3e35; }

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .material-grid { grid-template-columns: repeat(2, 1fr); }
  .score-orbit { margin-right: 0; }
  .weekly-goal { margin-right: 0; }
}

@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 20px 0 50px rgba(20,35,31,.2); }
  .sidebar.open { transform: translateX(0); }
  .main-content { grid-column: 1; padding: 0 18px 22px; }
  .mobile-menu { display: block; }
  .topbar { height: 82px; }
  .mode-switch { display: none; }
  .hero-card, .candidate-hero { padding: 28px; }
  .score-orbit { width: 130px; height: 130px; }
  .dashboard-grid, .candidate-grid { grid-template-columns: 1fr; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: span 2; }
  .material-grid { grid-template-columns: repeat(2, 1fr); }
  .insight-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .topbar h1 { font-size: 18px; }
  .icon-button { display: none; }
  .hero-card, .candidate-hero { display: block; min-height: auto; padding: 25px 21px; }
  .hero-copy h2, .candidate-hero h2 { font-size: 29px; }
  .score-orbit { margin: 24px auto 0; }
  .stat-grid, .material-grid, .user-summary { grid-template-columns: 1fr; }
  .stat-card { min-height: 95px; }
  .official-strip { grid-template-columns: 35px 1fr; }
  .official-strip > span { display: none; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading .btn { width: 100%; }
  .toolbar { grid-template-columns: 1fr; }
  .search-field { grid-column: 1; }
  .candidate-toolbar { align-items: stretch; flex-direction: column; }
  .candidate-toolbar select { width: 100%; }
  .weekly-goal { margin-top: 24px; }
  .quiz-card { padding: 25px 19px; }
  .quiz-topline { grid-template-columns: auto 1fr auto; }
  .quiz-topline .timer { grid-column: 3; }
  .quiz-progress { grid-column: 1 / -1; grid-row: 2; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: 1; }
  .modal { padding: 21px 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
