@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@400;500;600;700&family=Libre+Caslon+Display&display=swap');

:root {
  --ink: #17271f;
  --muted: #68716b;
  --paper: #f6f1e7;
  --surface: #fffdf8;
  --green: #236b4b;
  --green-dark: #174c36;
  --lime: #c9dc68;
  --coral: #e96f51;
  --line: #d9d6cb;
  --soft-green: #e8f0e7;
  --soft-coral: #f9e5de;
  --shadow: 0 18px 50px rgba(29, 46, 37, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans Thai", system-ui, sans-serif;
}
button, input, textarea { font: inherit; }
button { color: inherit; }
.paper-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .25;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
}
.topbar {
  height: 76px;
  border-bottom: 1px solid rgba(23, 39, 31, .15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 5vw, 72px);
  position: relative;
  z-index: 10;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--green);
  border-radius: 50% 50% 50% 8px;
  font-family: Georgia, serif;
  font-size: 22px;
  font-style: italic;
}
.brand strong, .brand small { display: block; line-height: 1.1; }
.brand strong { letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 4px; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.save-state { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #62a477; box-shadow: 0 0 0 4px rgba(98,164,119,.15); }
.icon-button {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.35);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: .2s;
}
.icon-button:hover { background: white; transform: rotate(15deg); }
.icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.screen { display: none; }
.screen.active { display: block; animation: reveal .45s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } }

.hero {
  min-height: calc(100vh - 190px);
  max-width: 1280px;
  margin: auto;
  padding: clamp(54px, 8vw, 105px) clamp(22px, 5vw, 70px) 70px;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  align-items: center;
  gap: clamp(50px, 8vw, 120px);
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 11px;
  letter-spacing: .18em;
  font-weight: 700;
}
.hero-copy h1 {
  margin: 0;
  font-family: "Libre Caslon Display", Georgia, serif;
  font-size: clamp(66px, 8vw, 116px);
  line-height: .87;
  letter-spacing: -.055em;
  font-weight: 400;
}
.hero-copy h1 em { color: var(--green); font-weight: 400; }
.hero-lead {
  max-width: 530px;
  color: #4e5b54;
  font-size: 18px;
  line-height: 1.75;
  margin: 35px 0 28px;
}
.framework-row { display: flex; gap: 9px; }
.framework-row span {
  border: 1px solid var(--ink);
  border-radius: 99px;
  min-width: 66px;
  padding: 8px 16px;
  font-size: 13px;
  text-align: center;
}
.framework-row b { color: var(--coral); }
.setup-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--shadow);
  position: relative;
}
.setup-card::before {
  content: "";
  position: absolute;
  width: 92px;
  height: 13px;
  background: rgba(201, 220, 104, .7);
  top: -7px;
  left: 50%;
  transform: translateX(-50%) rotate(-1.5deg);
}
.card-kicker { color: var(--coral); font-weight: 700; font-size: 12px; }
.setup-card h2, .dialog-card h2 { font-family: Georgia, serif; font-size: 35px; margin: 6px 0 26px; font-weight: 500; }
.field { display: block; margin-bottom: 17px; }
.field > span, legend { display: block; font-size: 12px; font-weight: 600; margin-bottom: 7px; }
.field i { color: var(--coral); font-style: normal; }
.field input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fbfaf5;
  border-radius: 4px;
  padding: 12px 14px;
  outline: none;
  transition: .2s;
}
.field input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(35,107,75,.1); }
fieldset { border: 0; padding: 0; margin: 24px 0; }
.category-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.category-option input { position: absolute; opacity: 0; }
.category-card {
  border: 1px solid var(--line);
  background: #fbfaf5;
  display: grid;
  grid-template-columns: 35px 1fr;
  column-gap: 9px;
  padding: 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: .2s;
}
.category-card:hover { border-color: #9aafa2; }
.category-option input:checked + .category-card { border-color: var(--green); background: var(--soft-green); box-shadow: inset 3px 0 0 var(--green); }
.category-icon {
  grid-row: span 2;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: var(--paper);
  display: grid;
  place-items: center;
  color: var(--green);
  font-family: Georgia, serif;
  font-weight: bold;
}
.category-card strong { font-size: 13px; align-self: end; }
.category-card small { color: var(--muted); font-size: 9px; }
.primary-button, .secondary-button {
  border: 0;
  min-height: 49px;
  padding: 0 20px;
  border-radius: 3px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s, background .2s, opacity .2s;
}
.primary-button { width: 100%; background: var(--green); color: white; display: flex; justify-content: center; align-items: center; gap: 15px; }
.primary-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.primary-button span { font-size: 20px; }
.primary-button.compact { width: auto; min-width: 184px; }
.secondary-button { background: transparent; border: 1px solid var(--line); }
.secondary-button:hover { background: white; }
.secondary-button:disabled { opacity: .35; cursor: default; }
.setup-note { text-align: center; font-size: 10px; color: var(--muted); margin: 12px 0 0; }
.method-strip {
  border-top: 1px solid rgba(23,39,31,.15);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1280px;
  margin: auto;
}
.method-strip > div { padding: 28px clamp(22px, 5vw, 70px); position: relative; border-right: 1px solid rgba(23,39,31,.15); display: grid; grid-template-columns: 28px 1fr; }
.method-strip > div:last-child { border-right: 0; }
.method-strip span { grid-row: span 2; color: var(--coral); font-family: Georgia, serif; font-size: 17px; }
.method-strip strong { font-size: 13px; }
.method-strip small { color: var(--muted); font-size: 10px; }

.quiz-shell { min-height: calc(100vh - 76px); display: grid; grid-template-columns: 285px 1fr; }
.quiz-sidebar {
  border-right: 1px solid var(--line);
  padding: 48px 34px 36px;
  display: flex;
  flex-direction: column;
}
.quiz-sidebar h2 { font-family: Georgia, serif; font-size: 25px; font-weight: 500; margin: 0; }
.student-code { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.question-nav { margin: 58px 0; display: grid; gap: 13px; }
.nav-question {
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  display: grid;
  grid-template-columns: 29px 1fr 16px;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--muted);
}
.nav-question > span:first-child { width: 29px; height: 29px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 11px; }
.nav-question strong { font-size: 12px; font-weight: 500; }
.nav-question i { width: 7px; height: 7px; border-radius: 50%; background: transparent; }
.nav-question.active { color: var(--ink); }
.nav-question.active > span:first-child { background: var(--ink); color: white; border-color: var(--ink); }
.nav-question.answered i { background: var(--lime); box-shadow: 0 0 0 3px rgba(201,220,104,.25); }
.sidebar-tip { margin-top: auto; border-top: 1px solid var(--line); padding-top: 20px; }
.tip-label { color: var(--coral); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.sidebar-tip p { color: var(--muted); font-size: 11px; line-height: 1.7; }
.quiz-main { padding: 40px clamp(28px, 7vw, 105px); max-width: 1050px; width: 100%; margin: 0 auto; }
.quiz-head { display: flex; justify-content: space-between; align-items: center; }
.question-count { font-size: 12px; font-weight: 600; }
.category-pill { font-size: 10px; background: var(--soft-green); color: var(--green); padding: 5px 10px; border-radius: 99px; margin-left: 9px; }
.progress-copy { font-size: 10px; color: var(--muted); }
.progress-copy b { color: var(--green); font-size: 13px; }
.progress-track { height: 2px; background: var(--line); margin: 16px 0 42px; }
.progress-track span { display: block; height: 100%; background: var(--green); transition: width .4s; }
.question-panel { max-width: 800px; }
.question-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; }
.framework-badge { font-family: Georgia, serif; font-size: 13px; font-weight: bold; color: var(--coral); border: 1px solid #dfa997; padding: 5px 11px; border-radius: 99px; }
.question-panel h1 { font-family: Georgia, "IBM Plex Sans Thai", serif; font-weight: 500; font-size: clamp(31px, 4vw, 45px); letter-spacing: -.02em; line-height: 1.25; margin: 18px 0 12px; }
.question-panel > p { color: #536159; line-height: 1.75; margin: 0; font-size: 15px; }
.brief-box { border-left: 3px solid var(--lime); margin: 24px 0 28px; padding: 5px 0 5px 15px; }
.brief-box span { font-size: 9px; font-weight: bold; color: var(--green); letter-spacing: .1em; }
.brief-box p { margin: 3px 0; font-size: 13px; }
.prompt-label { display: block; font-weight: 600; font-size: 12px; margin-bottom: 8px; }
.textarea-wrap { border: 1px solid var(--line); background: var(--surface); border-radius: 4px; transition: .2s; }
.textarea-wrap:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(35,107,75,.08); }
textarea { width: 100%; border: 0; resize: vertical; outline: none; background: transparent; padding: 18px; min-height: 190px; line-height: 1.7; color: var(--ink); }
.textarea-footer { border-top: 1px solid #ebe9e0; display: flex; justify-content: space-between; padding: 8px 13px; font-size: 9px; color: var(--muted); }
.textarea-footer span:first-child { display: flex; align-items: center; gap: 6px; }
.textarea-footer i { width: 6px; height: 6px; background: #babdb8; border-radius: 50%; }
.textarea-footer .good-signal i { background: #55a16d; }
.textarea-footer .medium-signal i { background: #d4a24d; }
.framework-hint { margin-top: 13px; border: 1px dashed #c6c2b5; border-radius: 4px; padding: 11px 14px; color: var(--muted); font-size: 11px; }
.framework-hint summary { cursor: pointer; font-weight: 500; color: var(--green); }
.framework-hint ul { margin: 12px 0 2px; padding-left: 19px; display: grid; gap: 6px; }
.quiz-actions { max-width: 800px; display: flex; justify-content: space-between; margin-top: 24px; }

.result-wrap { max-width: 1120px; margin: auto; padding: 60px 30px 90px; }
.result-hero { display: flex; align-items: center; gap: 55px; border-bottom: 1px solid var(--line); padding-bottom: 50px; }
.score-orbit { width: 180px; height: 180px; position: relative; flex: 0 0 auto; }
.score-orbit svg { width: 100%; transform: rotate(-90deg); }
.score-orbit circle { fill: none; stroke-width: 8; }
.score-bg { stroke: #e0ddd3; }
.score-ring { stroke: var(--green); stroke-linecap: round; stroke-dasharray: 478; stroke-dashoffset: 478; transition: stroke-dashoffset 1s ease .2s; }
.score-orbit > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.score-orbit strong { font-family: Georgia, serif; font-size: 62px; line-height: .9; }
.score-orbit span { color: var(--muted); font-size: 13px; }
.result-copy h1 { font-family: Georgia, serif; font-size: clamp(38px, 6vw, 64px); font-weight: 400; margin: 0 0 12px; }
.result-copy > p:not(.eyebrow) { color: var(--muted); line-height: 1.7; max-width: 650px; }
.result-tags { display: flex; gap: 8px; margin-top: 18px; }
.result-tags span { border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; font-size: 10px; }
.result-grid { display: grid; grid-template-columns: 1.45fr .75fr; gap: 20px; margin-top: 24px; }
.result-summary-card, .strength-card { border: 1px solid var(--line); background: var(--surface); padding: 28px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 26px; }
.section-heading h2, .strength-card h2 { font-family: Georgia, serif; font-size: 27px; font-weight: 500; margin: 0; }
.section-heading > span { color: var(--muted); font-size: 10px; }
.score-bars { display: grid; gap: 15px; }
.score-bar-row { display: grid; grid-template-columns: 31px 1fr 34px; align-items: center; gap: 10px; }
.score-bar-row > span:first-child { width: 26px; height: 26px; background: var(--paper); border-radius: 50%; display: grid; place-items: center; font-size: 10px; }
.score-bar { height: 7px; background: #e6e3da; border-radius: 99px; overflow: hidden; }
.score-bar i { height: 100%; display: block; background: var(--green); border-radius: 99px; width: 0; transition: width .8s ease; }
.score-bar-row b { font-family: Georgia, serif; font-size: 14px; }
.strength-card { background: var(--green); color: white; }
.strength-card .eyebrow { color: var(--lime); }
.next-focus { margin-top: 24px; }
.next-focus strong { display: block; font-size: 17px; color: var(--lime); margin-bottom: 8px; }
.next-focus p { font-size: 12px; line-height: 1.8; color: rgba(255,255,255,.76); }
.feedback-section { margin-top: 55px; }
.feedback-list { display: grid; gap: 10px; }
.feedback-card { border: 1px solid var(--line); background: var(--surface); }
.feedback-toggle { width: 100%; background: transparent; border: 0; display: grid; grid-template-columns: 36px 1fr auto 20px; gap: 12px; align-items: center; text-align: left; padding: 17px 20px; cursor: pointer; }
.feedback-number { width: 30px; height: 30px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; font-size: 11px; }
.feedback-title { font-weight: 600; font-size: 13px; }
.feedback-score { font-family: Georgia, serif; color: var(--green); font-weight: bold; }
.chevron { transition: transform .2s; }
.feedback-card.open .chevron { transform: rotate(180deg); }
.feedback-body { display: none; padding: 0 20px 22px 68px; }
.feedback-card.open .feedback-body { display: block; }
.answer-quote { background: var(--paper); border-left: 2px solid var(--line); padding: 12px 15px; font-size: 11px; color: var(--muted); line-height: 1.65; margin-bottom: 15px; white-space: pre-wrap; }
.criteria-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.criteria-chips span { font-size: 9px; padding: 5px 9px; border-radius: 99px; background: var(--soft-coral); color: #a64731; }
.criteria-chips span.met { background: var(--soft-green); color: var(--green); }
.advice-box { font-size: 12px; line-height: 1.7; }
.advice-box strong { color: var(--coral); }
.result-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 30px; }

dialog { border: 0; padding: 0; background: transparent; width: min(520px, calc(100vw - 30px)); }
dialog::backdrop { background: rgba(15, 28, 21, .6); backdrop-filter: blur(3px); }
.dialog-card { background: var(--surface); padding: 38px; position: relative; box-shadow: var(--shadow); }
.dialog-close { position: absolute; right: 18px; top: 14px; border: 0; background: none; font-size: 28px; cursor: pointer; }
.dialog-card > p:not(.eyebrow) { color: var(--muted); font-size: 13px; line-height: 1.65; }
.connection-status { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.connection-status span { width: 7px; height: 7px; border-radius: 50%; background: #b8b8b3; }
.connection-status.connected span { background: #55a16d; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 25px; }
.setup-link { display: block; color: var(--green); font-size: 11px; text-align: center; margin-top: 20px; }

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; padding-top: 60px; }
  .hero-copy { text-align: center; }
  .hero-lead { margin-inline: auto; }
  .framework-row { justify-content: center; }
  .method-strip { grid-template-columns: 1fr; }
  .method-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .quiz-shell { grid-template-columns: 1fr; }
  .quiz-sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding: 22px; display: block; }
  .quiz-sidebar > div:first-child, .sidebar-tip { display: none; }
  .question-nav { margin: 0; display: flex; justify-content: center; }
  .nav-question { display: block; }
  .nav-question strong, .nav-question i { display: none; }
  .quiz-main { padding: 28px 22px 60px; }
  .result-grid { grid-template-columns: 1fr; }
}
@media (max-width: 570px) {
  .save-state { display: none; }
  .hero-copy h1 { font-size: 64px; }
  .category-grid { grid-template-columns: 1fr; }
  .setup-card { padding: 27px 20px; }
  .result-hero { flex-direction: column; text-align: center; gap: 25px; }
  .result-tags { justify-content: center; }
  .feedback-body { padding-left: 20px; }
  .quiz-actions { gap: 8px; }
  .quiz-actions .primary-button, .quiz-actions .secondary-button { min-width: 0; font-size: 12px; }
}
@media print {
  .topbar, .result-actions, .paper-noise { display: none !important; }
  body { background: white; }
  .result-wrap { padding: 20px; }
  .feedback-card .feedback-body { display: block; }
}

/* 2026 vivid professional refresh */
:root {
  --ink: #17142f;
  --muted: #5e5a72;
  --paper: #f7f5ff;
  --surface: #ffffff;
  --green: #6041d9;
  --green-dark: #4527b9;
  --lime: #ffd84d;
  --coral: #ff6b4a;
  --line: #ded9ef;
  --soft-green: #eeeaff;
  --soft-coral: #fff0ec;
  --violet: #6c45e8;
  --blue: #2389ee;
  --mint: #29b982;
  --shadow: 0 22px 60px rgba(64, 45, 131, .14);
}
body {
  background:
    radial-gradient(circle at 5% 7%, rgba(255, 216, 77, .22), transparent 24rem),
    radial-gradient(circle at 92% 12%, rgba(73, 191, 255, .18), transparent 28rem),
    var(--paper);
  font-size: 16px;
}
.paper-noise { opacity: .12; }
.topbar {
  height: 84px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  box-shadow: 0 8px 30px rgba(54, 38, 112, .06);
}
.brand-mark {
  width: 46px;
  height: 46px;
  background: linear-gradient(145deg, #7858f1, #4a2bc5);
  box-shadow: 0 8px 18px rgba(96,65,217,.26);
}
.brand strong { font-size: 18px; }
.brand small { font-size: 13px; color: #514d63; }
.save-state { font-size: 14px; color: #4f4a62; }
.teacher-button {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  color: white;
  background: linear-gradient(135deg, var(--violet), #4a2bc5);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(96,65,217,.24);
}
.teacher-button:hover { transform: translateY(-1px); }
.hero {
  max-width: 1380px;
  padding-top: clamp(45px, 5vw, 75px);
  gap: clamp(38px, 6vw, 85px);
}
.hero-copy h1 {
  font-family: "IBM Plex Sans Thai", system-ui, sans-serif;
  font-size: clamp(58px, 6.4vw, 96px);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.06em;
}
.hero-copy h1 em {
  font-style: normal;
  color: transparent;
  background: linear-gradient(90deg, #6c45e8, #218fea, #26b77f);
  background-clip: text;
}
.eyebrow { color: #5633c9; font-size: 13px; }
.hero-lead { color: #48435f; font-size: 20px; line-height: 1.7; margin: 26px 0 22px; }
.framework-row span { border: 0; background: white; box-shadow: 0 6px 18px rgba(63,44,127,.09); font-size: 15px; font-weight: 700; padding: 10px 20px; }
.framework-row b { color: #ff6545; }
.hero-visual {
  position: relative;
  margin-top: 30px;
  border-radius: 26px;
  overflow: visible;
  filter: drop-shadow(0 22px 32px rgba(68,43,145,.18));
}
.hero-visual img {
  display: block;
  width: 100%;
  border-radius: 26px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.floating-note {
  position: absolute;
  background: white;
  border: 1px solid rgba(108,69,232,.12);
  border-radius: 99px;
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(55,38,117,.18);
}
.note-one { left: -15px; top: 22px; color: #16855e; }
.note-two { right: -12px; bottom: 20px; color: #e65a3c; }
.setup-card {
  border: 1px solid rgba(108,69,232,.14);
  border-radius: 24px;
  padding: clamp(30px, 4vw, 46px);
  box-shadow: var(--shadow);
}
.setup-card::before { width: 105px; height: 10px; background: linear-gradient(90deg, #ffd84d, #ff8e59); border-radius: 10px; }
.card-kicker { color: #ec5b3e; font-size: 14px; }
.setup-card h2, .dialog-card h2 { font-family: "IBM Plex Sans Thai", system-ui, sans-serif; font-size: 34px; font-weight: 700; }
.field > span, legend { font-size: 15px; color: #2e2943; }
.field input, .dashboard-filters input, .dashboard-filters select {
  min-height: 50px;
  border: 1.5px solid #d8d2ec;
  background: #fbfaff;
  border-radius: 12px;
  font-size: 16px;
}
.category-grid { gap: 12px; }
.category-card {
  min-height: 76px;
  border: 1.5px solid #ded9ef;
  border-radius: 14px;
  padding: 13px;
  background: #fbfaff;
  grid-template-columns: 42px 1fr;
}
.category-card:hover { border-color: #8a70e9; transform: translateY(-2px); box-shadow: 0 9px 22px rgba(76,52,159,.1); }
.category-option input:checked + .category-card {
  border-color: #6c45e8;
  background: linear-gradient(135deg, #f0ecff, #e9f4ff);
  box-shadow: 0 0 0 3px rgba(108,69,232,.12);
}
.category-icon { width: 40px; height: 40px; background: white; color: #6240d5; box-shadow: 0 5px 12px rgba(73,48,157,.1); }
.category-card strong { font-size: 16px; }
.category-card small { font-size: 12px; color: #5e5872; line-height: 1.35; }
.primary-button, .secondary-button { min-height: 52px; border-radius: 12px; font-size: 16px; }
.primary-button { background: linear-gradient(135deg, #6c45e8, #4b2ac6); box-shadow: 0 10px 22px rgba(96,65,217,.22); }
.primary-button:hover { background: linear-gradient(135deg, #5d39dd, #3f20b2); }
.secondary-button { border: 1.5px solid #d8d2ec; background: white; }
.setup-note { font-size: 13px; color: #5d5870; }
.method-strip { max-width: 1380px; margin-bottom: 30px; border: 0; gap: 12px; padding: 0 clamp(22px, 5vw, 70px); }
.method-strip > div { background: white; border: 1px solid var(--line) !important; border-radius: 16px; padding: 22px; box-shadow: 0 8px 22px rgba(65,45,128,.06); }
.method-strip span { color: #6c45e8; font-size: 20px; }
.method-strip strong { font-size: 16px; }
.method-strip small { font-size: 13px; color: #5e5872; }

.quiz-sidebar { background: linear-gradient(180deg, #6041d9, #4324b2); color: white; border: 0; }
.quiz-sidebar .eyebrow, .quiz-sidebar .student-code, .quiz-sidebar .sidebar-tip p { color: rgba(255,255,255,.75); }
.quiz-sidebar h2 { font-family: "IBM Plex Sans Thai", sans-serif; font-size: 28px; font-weight: 700; }
.nav-question { color: rgba(255,255,255,.72); }
.nav-question strong { font-size: 14px; }
.nav-question > span:first-child { width: 36px; height: 36px; font-size: 14px; border-color: rgba(255,255,255,.3); }
.nav-question.active { color: white; }
.nav-question.active > span:first-child { background: white; color: #5433ce; }
.sidebar-tip { border-color: rgba(255,255,255,.24); }
.tip-label { color: #ffe26a; font-size: 13px; }
.sidebar-tip p { font-size: 14px; }
.quiz-main { max-width: 1120px; }
.question-count { font-size: 15px; }
.category-pill { font-size: 13px; background: #eeeaff; color: #5131c0; padding: 7px 13px; }
.progress-copy { font-size: 13px; }
.progress-copy b { font-size: 16px; color: #5a38cc; }
.progress-track { height: 7px; border-radius: 99px; overflow: hidden; }
.progress-track span { background: linear-gradient(90deg, #6c45e8, #23a4ec, #2bc38a); }
.question-meta { font-size: 14px; }
.framework-badge { font-size: 15px; color: #e85437; border-color: #ffae9e; background: #fff1ed; }
.question-panel h1 { font-family: "IBM Plex Sans Thai", sans-serif; font-size: clamp(32px, 4vw, 47px); font-weight: 700; color: #1c1736; }
.question-panel > p { font-size: 18px; color: #4f4964; }
.brief-box { border: 0; border-radius: 14px; padding: 16px 18px; background: linear-gradient(135deg, #fff6cf, #fff0e8); }
.brief-box span { font-size: 12px; color: #b8472d; }
.brief-box p { font-size: 16px; }
.prompt-label { font-size: 16px; }
.textarea-wrap { border: 1.5px solid #d8d2ec; border-radius: 15px; }
textarea { font-size: 17px; min-height: 220px; }
.textarea-footer { font-size: 13px; }
.framework-hint { font-size: 14px; padding: 14px 17px; border-color: #9e8ae4; background: #f7f4ff; }
.beginner-starter {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: -14px 0 25px;
  padding: 14px 17px;
  border: 1px solid #cde9de;
  border-radius: 14px;
  background: #effbf6;
}
.beginner-starter span { flex: 0 0 auto; color: #147457; font-size: 14px; font-weight: 700; }
.beginner-starter p { margin: 0; color: #285a49; font-size: 15px; line-height: 1.6; }
.developer-credit {
  max-width: 820px;
  margin: 36px auto 55px;
  padding: 24px 30px;
  text-align: center;
  border: 1px solid rgba(108,69,232,.16);
  border-radius: 20px;
  background: rgba(255,255,255,.75);
  box-shadow: 0 10px 28px rgba(67,43,142,.07);
}
.developer-credit span { display: block; color: #6b6580; font-size: 14px; }
.developer-credit strong { display: block; margin: 5px 0 2px; color: #4f2bc2; font-size: 21px; }
.developer-credit p { margin: 0; color: #343047; font-size: 16px; }

.result-summary-card, .strength-card, .feedback-card { border-radius: 18px; }
.strength-card { background: linear-gradient(145deg, #6041d9, #3f22ac); }
.section-heading h2, .strength-card h2 { font-family: "IBM Plex Sans Thai", sans-serif; font-weight: 700; }
.section-heading > span, .result-tags span { font-size: 13px; }
.next-focus strong { font-size: 20px; color: #ffe16a; }
.next-focus p, .advice-box { font-size: 15px; }
.feedback-title { font-size: 16px; }
.answer-quote { font-size: 15px; color: #4e485f; }
.criteria-chips span { font-size: 12px; padding: 7px 11px; }

/* Teacher dashboard */
.teacher-shell { max-width: 1360px; margin: auto; padding: 55px clamp(20px, 5vw, 70px) 90px; }
.teacher-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 32px; }
.teacher-heading h1 { margin: 0; font-size: clamp(38px, 5vw, 58px); letter-spacing: -.04em; }
.teacher-heading > div > p:last-child { color: var(--muted); font-size: 16px; }
.teacher-head-actions { display: flex; gap: 10px; }
.dashboard-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat-card { position: relative; overflow: hidden; min-height: 155px; padding: 24px; color: white; border-radius: 20px; box-shadow: var(--shadow); }
.stat-card::after { content: ""; position: absolute; width: 110px; height: 110px; border-radius: 50%; background: rgba(255,255,255,.13); right: -30px; top: -30px; }
.stat-card.purple { background: linear-gradient(135deg, #7655ec, #5433ce); }
.stat-card.orange { background: linear-gradient(135deg, #ff8b4a, #ec5c3d); }
.stat-card.green { background: linear-gradient(135deg, #36c896, #168966); }
.stat-card.blue { background: linear-gradient(135deg, #3ca9f4, #237bd8); }
.stat-card span { display: block; font-size: 15px; font-weight: 600; }
.stat-card strong { font-size: 52px; line-height: 1.15; display: inline-block; margin-top: 13px; }
.stat-card small { font-size: 14px; margin-left: 6px; opacity: .82; }
.dashboard-panel { background: white; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 14px 40px rgba(54,37,119,.08); overflow: hidden; }
.dashboard-toolbar { padding: 25px 28px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); }
.dashboard-toolbar h2 { margin: 0; font-size: 24px; }
.dashboard-toolbar p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.dashboard-filters { display: flex; gap: 10px; }
.dashboard-filters input { width: 260px; padding: 0 15px; }
.dashboard-filters select { padding: 0 36px 0 13px; color: var(--ink); }
.table-scroll { overflow-x: auto; position: relative; min-height: 240px; }
.score-table { width: 100%; border-collapse: collapse; min-width: 850px; }
.score-table th { background: #f6f3ff; color: #5d5672; font-size: 13px; text-align: left; padding: 14px 20px; }
.score-table td { padding: 17px 20px; border-top: 1px solid #eeeaf7; font-size: 15px; }
.score-table tbody tr { cursor: pointer; transition: .15s; }
.score-table tbody tr:hover { background: #faf8ff; }
.table-category { background: #eeeaff; color: #5131bd; border-radius: 99px; padding: 6px 10px; font-size: 13px; }
.table-score { display: inline-grid; place-items: center; min-width: 48px; padding: 6px 9px; border-radius: 9px; font-weight: 800; }
.table-score.excellent { background: #ddf7eb; color: #147452; }
.table-score.pass { background: #fff1c8; color: #8a5f00; }
.table-score.develop { background: #ffe5df; color: #aa3f28; }
.row-view-button { background: none; border: 0; color: #6041d9; font-weight: 700; cursor: pointer; }
.empty-state { min-height: 240px; display: grid; place-content: center; text-align: center; color: var(--muted); }
.empty-state span { color: #6c45e8; font-size: 35px; }
.empty-state strong { color: var(--ink); font-size: 19px; margin-top: 8px; }
.empty-state p { margin: 5px 0; }

.login-card { text-align: center; border-radius: 24px; }
.login-card .field { text-align: left; margin-top: 25px; }
.login-icon { margin: auto auto 16px; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 18px; color: white; background: linear-gradient(135deg, #7351e9, #4324b6); font-size: 25px; box-shadow: 0 12px 26px rgba(83,50,195,.24); }
.login-error { min-height: 22px; color: #c4382c !important; font-weight: 600; }
.show-password { display: flex; align-items: center; gap: 8px; width: fit-content; font-size: 14px; color: var(--muted); cursor: pointer; }
.show-password input { width: 17px; height: 17px; accent-color: var(--violet); }
.submission-dialog-card { width: min(920px, calc(100vw - 30px)); max-height: 88vh; overflow-y: auto; border-radius: 22px; }
#submissionDialog { width: min(920px, calc(100vw - 30px)); }
.submission-person { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 22px; }
.submission-person h2 { margin: 0; }
.submission-person p { color: var(--muted); margin: 4px 0; }
.submission-person > strong { font-size: 40px; color: #6041d9; }
.submission-person small { font-size: 14px; color: var(--muted); }
.submission-answers { display: grid; gap: 14px; margin-top: 20px; }
.submission-answers article { border: 1px solid var(--line); border-radius: 15px; padding: 18px; }
.submission-question-head { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; }
.submission-question-head > span { width: 34px; height: 34px; border-radius: 10px; background: #eeeaff; color: #5634c8; display: grid; place-items: center; font-weight: 800; }
.submission-question-head small { color: #e5573a; font-weight: 800; }
.submission-question-head h3 { margin: 0; font-size: 17px; }
.submission-question-head b { color: #6041d9; }
.submission-answer { white-space: pre-wrap; background: #f8f6ff; border-radius: 10px; padding: 14px; margin: 14px 0; color: #464056; line-height: 1.7; }
.submission-advice { font-size: 14px; color: #4f4962; }
.submission-advice strong { color: #e5573a; }

@media (max-width: 1000px) {
  .dashboard-stats { grid-template-columns: 1fr 1fr; }
  .dashboard-toolbar, .teacher-heading { align-items: stretch; flex-direction: column; }
  .dashboard-filters { width: 100%; }
  .dashboard-filters input { flex: 1; width: auto; }
}
@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { text-align: left; }
  .framework-row { justify-content: flex-start; }
  .hero-lead { margin-inline: 0; }
  .method-strip { padding: 0 22px; }
  .quiz-sidebar { background: #5433ce; }
}
@media (max-width: 620px) {
  .topbar { height: 72px; }
  .brand small, .save-state, .teacher-button span { display: none; }
  .teacher-button { font-size: 13px; padding: 10px 12px; }
  .hero-copy h1 { font-size: 54px; }
  .hero-lead { font-size: 17px; }
  .floating-note { font-size: 11px; }
  .dashboard-stats { grid-template-columns: 1fr; }
  .dashboard-filters, .teacher-head-actions { flex-direction: column; }
  .dashboard-filters input, .dashboard-filters select, .teacher-head-actions button { width: 100%; }
  .stat-card { min-height: 125px; }
  .beginner-starter { display: block; }
  .beginner-starter span { display: block; margin-bottom: 5px; }
  .developer-credit { margin: 28px 22px 40px; padding: 21px 16px; }
  .developer-credit strong { font-size: 18px; }
  .developer-credit p { font-size: 14px; }
}
