/* AksaMind HUD. Dark by design: the holographic look only works on black.
   Colour has meaning everywhere: cyan = taught / normal, violet = its own,
   green = verified, amber = needs the owner's attention. */

@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/chakra-petch-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/chakra-petch-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); }

:root {
  --bg: #05080d;
  --panel: rgba(9, 18, 29, 0.82);
  --panel-self: rgba(20, 14, 34, 0.82);
  --line: rgba(90, 200, 255, 0.14);
  --line-strong: rgba(90, 200, 255, 0.32);
  --text: #d8e7f2;
  --bright: #eef9ff;
  --soft: #b7cddd;
  --muted: #a9c0d1;
  --dim: #8fa6b8;
  --cyan: #46d2ff;
  --cyan-hi: #7cdcff;
  --violet: #b48cff;
  --violet-hi: #cdb4ff;
  --violet-text: #e4dafb;
  --green: #4be3a2;
  --amber: #ffb547;
  --amber-hi: #ffc46b;
  --danger: #ff7a7a;
  --head: 'Chakra Petch', 'Segoe UI', sans-serif;
  --body: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(70, 210, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 210, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--text);
  font: 14px/1.5 var(--body);
}

a { color: var(--cyan-hi); }
a:hover { color: #b9ecff; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- shared pieces ---------- */

.wordmark { margin: 0; font: 600 22px var(--head); letter-spacing: 0.32em; text-transform: uppercase; }
.wordmark.small { font-size: 17px; }

.btn {
  height: 44px;
  padding: 0 16px;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.btn.primary { background: var(--cyan); border: 0; color: #04121c; font: 600 14px var(--head); letter-spacing: 0.14em; padding: 0 22px; }
.btn.ghost { background: transparent; border: 1px solid var(--line-strong); color: #cfe6f5; }
.btn.icon, .btn.round { width: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--cyan-hi); }
.btn.round { border-radius: 50%; flex: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

input {
  height: 44px;
  padding: 0 14px;
  background: rgba(4, 10, 16, 0.85);
  border: 1px solid rgba(90, 200, 255, 0.28);
  border-radius: 6px;
  color: var(--bright);
  font: inherit;
  font-size: 15px;
}
input::placeholder { color: #7890a2; }
input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(70, 210, 255, 0.15); }

.panel { border: 1px solid var(--line); border-radius: 4px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }

/* HUD corner brackets, drawn as eight 1px gradient strokes. */
.frame, .frame-self, .frame-warn {
  --c: var(--cyan);
  background:
    linear-gradient(var(--c), var(--c)) left top / 12px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) left top / 1px 12px no-repeat,
    linear-gradient(var(--c), var(--c)) right top / 12px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) right top / 1px 12px no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / 12px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / 1px 12px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 12px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 1px 12px no-repeat,
    var(--panel);
}
.frame-self { --c: var(--violet); background-color: var(--panel-self); border-color: rgba(180, 140, 255, 0.24); }
.frame-warn { --c: var(--amber); border-color: rgba(255, 181, 71, 0.35); }

.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.panel-head h2 { margin: 0; font: 600 12px var(--head); letter-spacing: 0.24em; color: #9fbccf; }
.self .panel-head h2 { color: var(--violet-hi); }
.meta { font: 11px var(--mono); color: var(--dim); }
.self .meta { color: #b9a6d9; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.empty { margin: 0; color: var(--muted); font-size: 13px; }
.self .empty, .self p { color: var(--violet-text); }
.line { margin: 0; font-size: 13px; color: var(--muted); }
.mono { font-family: var(--mono); }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); flex: none; }
.dot.good { background: var(--green); }
.dot.warn { background: var(--amber); }
.dot.taught { background: var(--cyan); }
.dot.own { background: var(--violet); }

/* ---------- sign-in ---------- */

/* Auto margins centre the column but collapse when the window is shorter than
   it, so nothing is pushed above the top edge (plain centring would cut it off). */
.login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 32px 16px;
}
.login > :first-child { margin-top: auto; }
.login > :last-child { margin-bottom: auto; }
.login-core { width: min(260px, 70vw); }
.login-form { width: min(380px, 92vw); }
.login-form label { display: grid; gap: 6px; color: var(--muted); font: 600 11px var(--head); letter-spacing: 0.18em; }
.error { margin: 0; min-height: 1.5em; color: var(--danger); font-size: 13px; }

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 13, 0.88);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { color: var(--cyan); flex: none; }
.build { font: 11px var(--mono); color: var(--dim); padding: 3px 8px; border: 1px solid rgba(90, 200, 255, 0.2); border-radius: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(90, 200, 255, 0.18);
  border-radius: 999px;
  font: 11px var(--mono);
  letter-spacing: 0.06em;
  color: #cfe6f5;
}
.chip.warn { border-color: rgba(255, 181, 71, 0.5); color: var(--amber-hi); }
.chip svg { color: var(--cyan); }
.who { display: flex; align-items: center; gap: 12px; }
.clock { font: 13px var(--mono); color: #cfe6f5; font-variant-numeric: tabular-nums; }
.user { display: inline-flex; align-items: center; gap: 8px; }
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(70, 210, 255, 0.16);
  color: var(--cyan-hi);
  font: 600 14px var(--head);
}

/* ---------- layout ---------- */

.hud { min-height: 100vh; display: flex; flex-direction: column; }

.grid {
  flex: 1;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px 24px;
}
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.center { display: flex; flex-direction: column; align-items: center; gap: 16px; min-width: 0; }

@media (max-width: 1180px) {
  .grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .center { grid-column: 1 / -1; order: -1; }
}
@media (max-width: 760px) {
  .grid { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .topbar { padding: 10px 16px; }
  .activity { padding: 12px 16px; }
  .build, #username { display: none; }
  .core-wrap { max-width: 280px; }
  .btn.primary { padding: 0 16px; }
}

/* ---------- school / exam / teacher ---------- */

.classes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.class { display: flex; align-items: center; gap: 12px; }
.class svg { flex: none; }
.class .name { font-weight: 500; color: #e2f1fb; }
.class .status { font: 11.5px var(--mono); color: var(--dim); }
.class.passed .status { color: var(--green); }
.class.current .status { color: var(--cyan-hi); }
.class.locked .name { color: var(--muted); }
.ring-track { stroke: rgba(90, 200, 255, 0.14); }
.class.passed .ring-fill { stroke: var(--green); }
.class.passed .ring-num { color: var(--green); }
.class.current .ring-fill { stroke: var(--cyan); }
.class.current .ring-num { color: var(--cyan); }
.class.locked .ring-num { color: var(--dim); }
.ring-num { fill: currentColor; font: 600 13px var(--head); }
.class.current .ring-spin { transform-box: view-box; transform-origin: 20px 20px; animation: am-spin 6s linear infinite; }

.score { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.score strong { font: 600 34px/1 var(--head); color: var(--green); }
.score.failed strong { color: var(--amber); }
.bar { height: 6px; border-radius: 3px; background: rgba(90, 200, 255, 0.12); position: relative; overflow: hidden; }
.bar .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--green); border-radius: 3px; }
.score.failed + .bar .fill { background: var(--amber); }
.bar .mark { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--amber-hi); }

.channel { display: flex; align-items: center; gap: 8px; font: 13px var(--mono); }
.channel small { color: var(--dim); font-size: 11.5px; margin-left: auto; }

.lessons { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lesson { display: flex; align-items: center; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.lesson > div { flex: 1; min-width: 0; }
.lesson .title { font-size: 13px; color: #e2f1fb; overflow-wrap: anywhere; }
.lesson .meta { display: block; }
.lesson.reverted .title, .lesson.rejected .title { color: var(--dim); text-decoration: line-through; }
.lesson .actions { display: flex; gap: 6px; flex: none; }
.btn.small { height: 44px; padding: 0 12px; font-size: 12px; }
#library > label.btn { align-self: flex-start; display: inline-flex; align-items: center; cursor: pointer; }
#library > input:focus-visible + label { outline: 2px solid var(--cyan); outline-offset: 2px; }
.lesson > svg { flex: none; color: var(--cyan); }

/* ---------- centre: core, caption, result, question ---------- */

.core-wrap { width: 100%; max-width: 460px; aspect-ratio: 1 / 1; border-radius: 50%; background: radial-gradient(circle, #08131e 0%, var(--bg) 72%); }
.caption { margin: 0; font: 12px var(--mono); letter-spacing: 0.1em; color: #9fbccf; text-align: center; min-height: 1.5em; }
.result { width: 100%; max-width: 760px; }
.result:empty { display: none; }
.result .panel { padding: 20px; }
.result-text { margin: 0; font-size: 17px; line-height: 1.55; color: var(--bright); }

/* An answer in paragraphs, headed sections and its picture (owner, 2026-11-27). */
.answer-body { display: flow-root; }
.answer-body .result-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.answer-body > .result-text + .result-text { margin-top: 12px; }
.answer-figure { float: right; width: min(42%, 300px); margin: 4px 0 12px 20px; }
.answer-figure img {
  display: block; width: 100%; height: auto; max-height: 320px; object-fit: contain;
  border: 1px solid var(--line-strong); border-radius: 4px; background: #02070c;
}
.answer-figure figcaption { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; font-size: 12px; line-height: 1.4; color: var(--dim); }
.answer-caption { color: #cfe6f5; }
.answer-credit a { color: var(--dim); text-decoration: underline; text-underline-offset: 2px; }
.answer-credit a:hover { color: var(--bright); }
.answer-section { display: flow-root; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.answer-section h3 { margin: 0 0 8px; font: 600 12px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: #9fbccf; }
.answer-section p { margin: 0; line-height: 1.55; color: #dbeefa; }
.answer-section ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; line-height: 1.5; color: #dbeefa; }
.answer-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.answer-chip { font: 13px var(--mono); padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 999px; color: #cfe6f5; }
@media (max-width: 560px) {
  .answer-figure { float: none; width: 100%; margin: 0 0 14px; }
  .answer-figure img { max-height: 260px; }
}
.tag { font: 500 12px var(--mono); padding: 3px 9px; border-radius: 999px; background: var(--cyan); color: #04121c; }
.frame-warn .tag { background: var(--amber); color: #241500; }
.frame-warn .panel-head h2 { color: var(--amber-hi); }
.kind { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; }
.kind strong { font: 600 20px var(--head); letter-spacing: 0.06em; color: var(--cyan-hi); }
.frame-warn .kind strong { color: var(--amber-hi); }
.kind .meta { font-size: 12px; }
.sources { display: flex; flex-direction: column; gap: 8px; }
.source {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(90, 200, 255, 0.16);
  border-radius: 6px;
  color: #cfe6f5;
  text-decoration: none;
  font-size: 13px;
}
.source svg { color: var(--cyan); flex: none; }
.feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.feedback .line { margin-right: 4px; }
.feedback.speech { padding-top: 10px; }
.feedback.speech .meta { flex-basis: 100%; }

/* now learning: what it does on its own, refreshed every few seconds */
.now-status { display: flex; align-items: center; gap: 8px; margin: 0; font: 12px var(--mono); color: var(--dim); }
.now-status.live { color: #bff5dc; }
.dot.pulse { animation: am-pulse 1.6s ease-in-out infinite; }
@keyframes am-pulse { 50% { opacity: 0.3; } }
.now-current { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; }
.now-current.failed { border-color: rgba(255, 181, 71, 0.45); }
.now-step { font: 600 11px var(--head); letter-spacing: 0.14em; color: var(--cyan-hi); }
.now-current.failed .now-step { color: var(--amber-hi); }
.now-detail { font-size: 13px; color: #e2f1fb; overflow-wrap: anywhere; }
.bar { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--cyan); transition: width 0.6s ease; }
.now-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.now-list li { display: flex; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); overflow-wrap: anywhere; }
.now-list li.failed { color: var(--amber-hi); }
.now-list .when { flex: none; white-space: nowrap; font: 11px var(--mono); }
.btn.yes { border-color: rgba(75, 227, 162, 0.45); color: #bff5dc; display: inline-flex; align-items: center; gap: 6px; }
.btn.no { border-color: rgba(255, 181, 71, 0.45); color: #ffd9a0; display: inline-flex; align-items: center; gap: 6px; }
select {
  height: 44px;
  padding: 0 10px;
  background: rgba(4, 10, 16, 0.85);
  border: 1px solid rgba(90, 200, 255, 0.28);
  border-radius: 6px;
  color: var(--bright);
  font: inherit;
  font-size: 14px;
}
.ask { width: 100%; max-width: 760px; display: flex; flex-wrap: wrap; gap: 10px; }
.question { flex: 1 1 160px; min-width: 0; display: flex; position: relative; }
.question input { flex: 1; min-width: 0; }

/* ---------- line of thought / mind / self-analysis ---------- */

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.steps:empty { display: none; }
.step { display: flex; gap: 12px; animation: am-rise 0.3s ease-out; }
.step .num {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cyan);
  color: #04121c;
}
.step-title { font: 600 13px var(--head); letter-spacing: 0.08em; color: var(--text); }
.step-detail { font: 12px var(--mono); color: var(--soft); overflow-wrap: anywhere; }

.legend { display: inline-flex; gap: 12px; font: 11px var(--mono); color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.stat strong { display: block; font: 600 26px/1.1 var(--head); color: var(--bright); }
.stat span { display: block; font-size: 12.5px; color: var(--muted); }
.stat small { display: block; font: 11px var(--mono); color: var(--violet-hi); }

/* ---------- activity ---------- */

.activity {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 24px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: rgba(5, 8, 13, 0.88);
  font: 12px var(--mono);
  color: var(--muted);
}
.activity .label { font: 600 12px var(--head); letter-spacing: 0.24em; color: #9fbccf; }
.activity ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 28px; }
.activity time { color: var(--cyan-hi); margin-right: 6px; }
.activity li.good time { color: var(--green); }
.activity li.warn { color: var(--amber-hi); }

/* ---------- the core ---------- */

.am-core { display: block; width: 100%; height: auto; overflow: visible; color: var(--cyan); }
.am-core[data-phase="listening"] { color: #7cf3ff; }
.am-core[data-phase="reflecting"] { color: var(--violet); }
.am-core[data-phase="untaught"], .am-core[data-phase="unsure"], .am-core[data-phase="stuck"] { color: var(--amber); }

.am-core .spin, .am-core .heart, .am-core .ripple { transform-box: view-box; transform-origin: 200px 200px; }
.am-core .ticks { animation: am-spin 140s linear infinite; }
.am-core .ring-a { animation: am-spin 48s linear infinite; }
.am-core .ring-b { animation: am-spin-rev 70s linear infinite; }
.am-core .nodes { animation: am-spin 110s linear infinite; }
.am-core .scan-a { animation: am-spin 2.2s linear infinite; }
.am-core .scan-b { animation: am-spin-rev 3.4s linear infinite; }
.am-core .heart { animation: am-pulse 4s ease-in-out infinite; }
.am-core .flow { stroke-dasharray: 6 10; animation: am-flow 0.9s linear infinite; }
.am-core .ripple { animation: am-ripple 1.8s ease-out infinite; }
.am-core .ripple.late { animation-delay: 0.9s; }

.am-core[data-phase="thinking"] .ticks { animation-duration: 35s; }
.am-core[data-phase="thinking"] .ring-a { animation-duration: 12s; }
.am-core[data-phase="thinking"] .ring-b { animation-duration: 17.5s; }
.am-core[data-phase="thinking"] .nodes { animation-duration: 27.5s; }
.am-core[data-phase="thinking"] .heart { animation-duration: 0.9s; }
.am-core[data-phase="listening"] .heart { animation-duration: 1.4s; }
.am-core[data-phase="answering"] .heart { animation-duration: 3s; }
.am-core[data-phase="untaught"] .heart, .am-core[data-phase="unsure"] .heart { animation-duration: 2.4s; }
.am-core[data-phase="understood"] .heart { animation-duration: 3s; }
.am-core[data-phase="reflecting"] .ring-a { animation-duration: 68s; }
.am-core[data-phase="reflecting"] .heart { animation-duration: 5s; }

.am-core .only-thinking, .am-core .only-reflecting, .am-core .only-listening { display: none; }
.am-core[data-phase="thinking"] .only-thinking,
.am-core[data-phase="reflecting"] .only-reflecting,
.am-core[data-phase="listening"] .only-listening { display: inline; }

.core-label { fill: #eef9ff; stroke: var(--bg); stroke-width: 5px; paint-order: stroke; font: 600 15px var(--head); letter-spacing: 3.5px; }
.core-sub { fill: #9fbccf; stroke: var(--bg); stroke-width: 4px; paint-order: stroke; font: 10.5px var(--mono); letter-spacing: 1px; }

@keyframes am-spin { to { transform: rotate(360deg); } }
@keyframes am-spin-rev { to { transform: rotate(-360deg); } }
@keyframes am-pulse { 0%, 100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.12); opacity: 1; } }
@keyframes am-flow { to { stroke-dashoffset: -32; } }
@keyframes am-ripple { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(2.7); opacity: 0; } }
@keyframes am-rise { from { opacity: 0; transform: translateY(4px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}
.now-controls { display: flex; gap: 8px; }
.now-controls .btn { height: 32px; padding: 0 16px; font-size: 13px; }

/* Panels: closed, half open (a short window, newest first, that scrolls) or fully open. */
.panel-head h2[role="button"] { cursor: pointer; }
.panel-head h2[role="button"]:focus-visible { outline: 1px solid var(--cyan); outline-offset: 4px; }
.panel-toggle { display: inline-flex; gap: 2px; align-self: center; }
.panel-toggle button {
  width: 26px; height: 22px; padding: 0; border: 1px solid transparent; border-radius: 3px;
  background: transparent; color: var(--dim); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.panel-toggle button:hover { color: var(--bright); border-color: var(--line-strong); }
.panel-toggle button[aria-pressed="true"] { color: var(--cyan-hi); border-color: var(--line-strong); background: rgba(70, 210, 255, 0.08); }
.self .panel-toggle button[aria-pressed="true"] { color: var(--violet-hi); border-color: rgba(180, 140, 255, 0.4); background: rgba(180, 140, 255, 0.1); }
.panel-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel[data-state="half"] .panel-body {
  max-height: 300px; overflow-y: auto; overscroll-behavior: contain; padding-right: 6px;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.panel[data-state="closed"] { gap: 0; }
.panel[data-state="closed"] .panel-body { display: none; }
.panel-head { align-items: center; flex-wrap: wrap; justify-content: flex-start; }
.panel-head > h2 + * { margin-left: auto; }
.constitution summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.constitution[open] summary { margin-bottom: 4px; }

/* Class 18: knowledge status, the answer evaluation, the understanding tally, the owner's guidance. */
.kstatus {
  display: inline-flex; align-items: center; flex: none; padding: 2px 8px; border-radius: 999px;
  font: 600 10.5px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid currentColor;
}
.kstatus.known { color: var(--green); }
.kstatus.partially_known { color: var(--amber-hi); }
.kstatus.unknown { color: var(--dim); }
.kstatus.conflicted { color: var(--danger); }
.evaluation { border-top: 1px solid var(--line); padding-top: 10px; font-size: 13px; }
.evaluation summary { cursor: pointer; display: flex; align-items: center; gap: 8px; color: var(--soft); }
.evaluation dl { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 6px 12px; margin: 10px 0 0; }
.evaluation dt { color: var(--dim); font: 11px var(--mono); }
.evaluation dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
@media (max-width: 560px) { .evaluation dl { grid-template-columns: 1fr; } .evaluation dd { margin-bottom: 4px; } }
.tally { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.tally-cell { display: flex; flex-direction: column; padding: 6px 8px; border: 1px solid rgba(180, 140, 255, 0.24); border-radius: 4px; }
.tally-cell strong { font: 600 16px var(--head); color: var(--violet-text); }
.tally-cell small { font-size: 11px; color: #b9a6d9; }
.tally-cell.conflicted strong { color: var(--danger); }
.self .lesson .title { color: var(--violet-text); }
.note-form, .guidance-form { display: flex; flex-direction: column; gap: 8px; }
.guidance-form { border-top: 1px solid var(--line); padding-top: 10px; }
.guidance-form .field { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.note-form select, .note-form textarea, .guidance-form textarea {
  width: 100%; background: rgba(4, 10, 18, 0.7); color: var(--text); border: 1px solid var(--line-strong);
  border-radius: 4px; padding: 8px 10px; font: 13px var(--body); resize: vertical;
}
.note-form select { height: 40px; }
.note-form textarea:focus, .guidance-form textarea:focus, .note-form select:focus { outline: none; border-color: var(--cyan); }
.note-form .btn, .guidance-form .btn { align-self: flex-start; }
.meta.reply { display: block; color: var(--soft); margin-top: 2px; }
.line.distrust { color: var(--amber-hi); }
.meta.hypothesis { display: block; margin-top: 3px; color: var(--violet-text); white-space: normal; }
.meta.hypothesis.rejected { color: var(--amber-hi); }
.meta.hypothesis.confirmed { color: var(--green); }
