:root {
  --bg: #ffffff;
  --bg-soft: #f7f7f5;
  --bg-warm: #fbf8f4;
  --ink: #111111;
  --ink-2: #292929;
  --muted: #666666;
  --muted-2: #8c8c8c;
  --line: #e7e7e3;
  --line-strong: #d6d6d0;
  --accent: #e85d04;
  --accent-2: #ff7a1a;
  --accent-soft: #fff1e8;
  --accent-dark: #b44700;
  --green: #217a5b;
  --red: #b93b2e;
  --dark: #101010;
  --dark-2: #181818;
  --dark-line: #2c2c2c;
  --white: #ffffff;
  --radius: 20px;
  --radius-sm: 12px;
  --max: 1200px;
  --font: "PingFang SC", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --serif: "Songti SC", "Noto Serif SC", "STSong", serif;
  --shadow: 0 24px 70px rgba(17, 17, 17, .1);
  --shadow-soft: 0 10px 30px rgba(17, 17, 17, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.nav-open,
body.assistant-drawer-open { overflow: hidden; }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: rgba(232, 93, 4, .2); }
[hidden] { display: none !important; }

.shell { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 400; padding: 10px 16px; background: var(--ink); color: var(--white); border-radius: 8px; font-weight: 700; transition: top .2s; }
.skip-link:focus { top: 16px; }
.reading-progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 250; background: transparent; }
.reading-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 20px; border: 1px solid transparent; border-radius: 9px;
  font-size: 14px; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s, transform .2s, opacity .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-accent { background: var(--accent); color: var(--white); border-color: var(--accent); }
.btn-accent:hover { background: #d45100; border-color: #d45100; }
.btn-outline { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-outline:hover { border-color: var(--ink); background: var(--bg-soft); }
.btn-ghost { border-color: rgba(255,255,255,.2); color: rgba(255,255,255,.82); background: rgba(255,255,255,.04); }
.btn-ghost:hover { border-color: rgba(255,255,255,.38); color: var(--white); }
.btn-text { background: transparent; color: var(--muted); border-color: transparent; padding: 8px 10px; }
.btn-text:hover { color: var(--ink); background: var(--bg-soft); }
.btn-quiet { background: transparent; border-color: var(--line); color: var(--muted); }
.btn-quiet:hover { color: var(--ink); border-color: var(--line-strong); }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 200;
  background: rgba(255,255,255,.92); backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 8px 24px rgba(17,17,17,.04); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  background: var(--ink); color: var(--white); font-family: var(--serif); font-size: 19px; font-weight: 700;
  box-shadow: inset 0 -3px 0 var(--accent);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
.brand-copy strong { font-size: 17px; font-weight: 650; letter-spacing: .04em; }
.brand-copy small { margin-top: 5px; color: var(--muted-2); font-size: 8px; letter-spacing: .24em; }
.site-nav { display: flex; align-items: center; gap: 26px; color: var(--muted); font-size: 13px; }
.site-nav a { position: relative; padding: 10px 0; white-space: nowrap; transition: color .2s; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 3px; height: 1px; background: var(--accent); transition: right .22s; }
.site-nav a:hover, .site-nav a.is-active { color: var(--ink); }
.site-nav a:hover::after, .site-nav a.is-active::after { right: 0; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--ink); }

/* Hero */
.hero { position: relative; padding: 142px 0 46px; background: var(--bg-warm); overflow: hidden; }
.hero-grid {
  position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(rgba(17,17,17,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(17,17,17,.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}
.hero::after {
  content: ""; position: absolute; width: 640px; height: 640px; right: -220px; top: -260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,93,4,.13), transparent 68%); pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.03fr .97fr; gap: 64px; align-items: center; }
.eyebrow, .kicker { display: inline-flex; align-items: center; gap: 9px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow { color: var(--accent-dark); font-weight: 600; }
.eyebrow-mark { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(232,93,4,.1); }
.hero h1 { margin-top: 22px; font-size: clamp(46px, 6.1vw, 82px); line-height: 1.08; letter-spacing: -.055em; font-weight: 600; }
.hero h1 .accent { color: var(--accent); }
.hero-subtitle { margin-top: 24px; max-width: 640px; color: var(--ink-2); font-size: 17px; font-weight: 600; line-height: 1.6; }
.hero-desc { margin-top: 14px; max-width: 620px; color: var(--muted); font-size: 15px; line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.hero-meta span { padding: 6px 11px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font-size: 11px; background: rgba(255,255,255,.6); }

.hero-panel { position: relative; }
.panel-window {
  position: relative; border: 1px solid var(--line-strong); border-radius: 22px; background: var(--white);
  box-shadow: var(--shadow); overflow: hidden;
}
.panel-bar { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.panel-dots { display: flex; gap: 5px; }
.panel-dots i { width: 7px; height: 7px; border-radius: 50%; background: #deded8; }
.panel-dots i:first-child { background: var(--accent); }
.panel-live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--accent-dark); font-weight: 700; }
.panel-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(232,93,4,.12); animation: pulse 2.4s infinite; }
.panel-body { padding: 22px; }
.panel-model { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg-soft); }
.model-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(33,122,91,.1); }
.panel-model strong { display: block; font-size: 12px; }
.panel-model small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 10px; }
.panel-message { margin-top: 16px; font-size: 12px; line-height: 1.7; }
.panel-message.is-user { margin-left: 52px; padding: 12px 14px; border-radius: 14px 14px 4px 14px; background: var(--ink); color: var(--white); }
.panel-message.is-ai { display: grid; grid-template-columns: 30px 1fr; gap: 10px; }
.ai-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-dark); font-family: var(--serif); font-size: 13px; font-weight: 700; }
.panel-message.is-ai > div { padding: 11px 13px; border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; background: var(--white); color: var(--ink-2); }
.panel-tags { display: flex; gap: 5px; margin-top: 9px; }
.panel-tags span { padding: 3px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 9px; }
.panel-input { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 10px 10px 10px 14px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--muted-2); font-size: 11px; }
.panel-input span { flex: 1; }
.panel-input button { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: var(--accent); color: var(--white); }
.panel-input button .icon { width: 16px; height: 16px; }
.panel-foot { padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 9px; letter-spacing: .03em; }
.hero-float {
  position: absolute; left: -26px; bottom: 28px; display: flex; align-items: center; gap: 11px;
  padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: var(--shadow-soft);
}
.float-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-dark); }
.hero-float strong { display: block; font-size: 11px; }
.hero-float span:not(.float-icon) { display: block; margin-top: 2px; color: var(--muted-2); font-size: 9px; }

.hero-strip { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 130px) 1fr; gap: 18px; align-items: center; margin-top: 58px; padding-top: 22px; border-top: 1px solid var(--line-strong); }
.hero-strip > div { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 9px; align-items: center; }
.hero-strip strong { grid-row: 1 / span 2; font-size: 30px; font-weight: 600; letter-spacing: -.04em; color: var(--accent); line-height: 1; }
.hero-strip span { font-size: 11px; color: var(--ink); }
.hero-strip small { font-size: 9px; color: var(--muted-2); }
.hero-quote { display: flex; align-items: flex-start; gap: 10px; justify-self: end; max-width: 430px; color: var(--muted); font-family: var(--serif); font-size: 13px; line-height: 1.7; }
.hero-quote .icon { width: 17px; height: 17px; margin-top: 2px; color: var(--accent); }

/* Principles */
.principles { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.principles-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.principles article { padding: 28px 26px; border-right: 1px solid var(--line); }
.principles article:last-child { border-right: 0; }
.principles span { color: var(--accent); font-size: 10px; letter-spacing: .16em; }
.principles h3 { margin: 7px 0 7px; font-size: 17px; font-weight: 600; }
.principles p { color: var(--muted); font-size: 12px; line-height: 1.75; }

/* Sections */
.section { padding: 108px 0; }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--dark); color: var(--white); }
.section-head { max-width: 780px; margin-bottom: 48px; }
.section-head-split { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; max-width: none; }
.section-head-split > div:first-child { max-width: 760px; }
.kicker { color: var(--accent-dark); font-weight: 600; }
.section-dark .kicker { color: var(--accent-2); }
.section-head h2 { margin-top: 14px; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.24; letter-spacing: -.035em; font-weight: 600; }
.section-head .lead { margin-top: 18px; color: var(--muted); font-size: 15px; line-height: 1.9; }
.section-dark .section-head .lead { color: rgba(255,255,255,.6); }
.section-footnote { margin-top: 22px; color: var(--muted-2); font-size: 11px; line-height: 1.75; }
.section-dark .section-footnote { color: rgba(255,255,255,.38); }
.head-badge { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); flex: 0 0 auto; }
.head-badge strong { display: block; font-size: 11px; }
.head-badge small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 9px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(33,122,91,.1); flex: 0 0 auto; }
.mini-label { color: var(--muted-2); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 9px; font-weight: 700; letter-spacing: .05em; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-pill-light { background: rgba(232,93,4,.16); color: var(--accent-2); }

/* Overview */
.overview-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 52px; align-items: start; }
.shift-list article { padding: 23px 0; border-top: 1px solid var(--line); }
.shift-list article:last-child { border-bottom: 1px solid var(--line); }
.shift-no { color: var(--accent-dark); font-size: 10px; letter-spacing: .14em; }
.shift-list h3 { margin: 7px 0 8px; font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.shift-list p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.equation { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 26px; padding: 15px 16px; border-radius: 12px; background: var(--bg-soft); font-size: 11px; }
.equation span { padding: 4px 8px; border-radius: 6px; background: var(--white); border: 1px solid var(--line); }
.equation i { color: var(--muted-2); font-style: normal; }
.equation b, .equation strong { color: var(--accent-dark); }
.system-map { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-soft); position: sticky; top: 96px; }
.system-map-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.map-layer { border-radius: 12px; padding: 14px; }
.layer-core { display: flex; align-items: center; gap: 12px; background: var(--dark); color: var(--white); }
.map-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: rgba(232,93,4,.18); color: var(--accent-2); }
.layer-core strong { display: block; font-size: 15px; font-weight: 600; }
.layer-core small { display: block; margin-top: 3px; color: rgba(255,255,255,.45); font-size: 9px; }
.map-connector { width: 1px; height: 16px; margin: 0 auto; background: var(--line); }
.layer-tools, .layer-flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: var(--bg-soft); }
.layer-tools span, .layer-flow span { display: block; font-size: 11px; font-weight: 600; }
.layer-tools small, .layer-flow small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.layer-flow { background: #f1f7f3; }
.layer-flow span { color: var(--green); }
.map-note { margin-top: 16px; color: var(--muted); font-size: 10px; line-height: 1.7; }

/* Flow */
.flow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.flow-card { padding: 26px 24px 22px; border: 1px solid var(--dark-line); border-radius: var(--radius); background: var(--dark-2); }
.flow-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flow-no { color: rgba(255,255,255,.24); font-size: 28px; font-weight: 500; line-height: 1; }
.flow-tag { color: var(--accent-2); font-size: 10px; letter-spacing: .08em; }
.flow-card h3 { margin: 22px 0 10px; font-size: 21px; font-weight: 600; line-height: 1.4; }
.flow-card > p { color: rgba(255,255,255,.58); font-size: 12px; line-height: 1.8; }
.flow-card ul { display: grid; gap: 8px; margin-top: 16px; }
.flow-card li { position: relative; padding-left: 13px; color: rgba(255,255,255,.56); font-size: 11px; line-height: 1.7; }
.flow-card li::before { content: ""; position: absolute; left: 0; top: .75em; width: 4px; height: 4px; border-radius: 50%; background: var(--accent-2); }
.flow-card strong { color: rgba(255,255,255,.84); font-weight: 600; }
.flow-evidence { display: inline-block; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--dark-line); color: rgba(255,255,255,.32); font-size: 9px; letter-spacing: .04em; }
.loop-bar { display: flex; align-items: center; gap: 18px; margin-top: 28px; padding: 15px 20px; border: 1px solid var(--dark-line); border-radius: 999px; background: rgba(255,255,255,.03); }
.loop-label { color: var(--accent-2); font-size: 10px; letter-spacing: .12em; white-space: nowrap; }
.loop-steps { display: flex; align-items: center; gap: 10px; flex: 1; }
.loop-steps span { color: rgba(255,255,255,.68); font-size: 11px; white-space: nowrap; }
.loop-steps i { flex: 1; height: 1px; min-width: 14px; background: linear-gradient(90deg, rgba(232,93,4,.55), rgba(255,255,255,.16)); }
.loop-note { color: rgba(255,255,255,.34); font-size: 9px; white-space: nowrap; }

/* Agents */
.agents-layout { display: grid; grid-template-columns: 1.04fr .96fr; gap: 24px; align-items: start; }
.agent-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.agent-card {
  position: relative; display: grid; grid-template-columns: 42px 1fr auto; grid-template-rows: auto auto;
  column-gap: 12px; align-items: center; text-align: left; padding: 17px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--white); color: var(--ink); transition: border-color .2s, background .2s, transform .2s;
}
.agent-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.agent-card.is-active { border-color: var(--accent); background: var(--accent-soft); }
.agent-icon { grid-row: 1 / span 2; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--bg-soft); color: var(--ink-2); }
.agent-card:nth-child(1) { grid-column: span 2; }
.agent-card:nth-child(1) .agent-icon { background: var(--ink); color: var(--accent-2); }
.agent-card.is-active .agent-icon { background: var(--accent); color: var(--white); }
.agent-name { font-size: 16px; font-weight: 600; }
.agent-role { grid-column: 2; color: var(--muted); font-size: 10px; }
.agent-arrow { grid-column: 3; grid-row: 1 / span 2; width: 16px; height: 16px; color: var(--muted-2); }
.agent-detail { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); position: sticky; top: 96px; }
.detail-head { display: flex; align-items: center; gap: 12px; }
.detail-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; background: var(--ink); color: var(--accent-2); }
.detail-head h3 { margin-top: 2px; font-size: 21px; font-weight: 600; line-height: 1.35; }
.detail-head .status-pill { margin-left: auto; }
.detail-lead { margin-top: 18px; color: var(--muted); font-size: 13px; line-height: 1.85; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.detail-grid ul { display: grid; gap: 6px; margin-top: 8px; }
.detail-grid li { position: relative; padding-left: 12px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.detail-grid li::before { content: ""; position: absolute; left: 0; top: .72em; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.boundary { display: flex; gap: 9px; align-items: flex-start; margin-top: 20px; padding: 12px 13px; border-radius: 10px; background: var(--bg-soft); color: var(--muted); font-size: 11px; line-height: 1.65; }
.boundary .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--green); }
.boundary strong { color: var(--ink); }

/* Assistant */
.assistant-section { background: var(--white); }
.assistant-app {
  display: grid; grid-template-columns: 258px minmax(0, 1fr); min-height: 720px;
  border: 1px solid var(--line-strong); border-radius: 24px; background: var(--white);
  box-shadow: var(--shadow); overflow: hidden;
}
.sidebar-backdrop { display: none; }
.chat-sidebar { display: flex; flex-direction: column; min-width: 0; background: var(--bg-soft); border-right: 1px solid var(--line); }
.sidebar-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 20px 16px 14px; }
.sidebar-top strong { display: block; margin-top: 3px; font-size: 18px; font-weight: 600; }
.btn-sidebar { display: inline-flex; align-items: center; gap: 4px; padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--white); color: var(--ink); font-size: 10px; }
.btn-sidebar .icon { width: 14px; height: 14px; }
.conversation-list { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.conversation-row { position: relative; display: flex; align-items: stretch; border-radius: 10px; margin-bottom: 3px; }
.conversation-row:hover { background: rgba(17,17,17,.045); }
.conversation-row.is-active { background: var(--ink); color: var(--white); }
.conversation-select { flex: 1; min-width: 0; display: grid; gap: 2px; padding: 11px 10px; border: 0; background: transparent; text-align: left; color: inherit; }
.conversation-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; }
.conversation-snippet { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 9px; }
.conversation-row.is-active .conversation-snippet { color: rgba(255,255,255,.5); }
.conversation-time { color: var(--muted-2); font-size: 8px; }
.conversation-row.is-active .conversation-time { color: rgba(255,255,255,.38); }
.conversation-delete { width: 26px; border: 0; background: transparent; color: var(--muted-2); font-size: 16px; opacity: 0; }
.conversation-row:hover .conversation-delete { opacity: 1; }
.conversation-row.is-active .conversation-delete { color: rgba(255,255,255,.5); }
.sidebar-bottom { padding: 14px 16px 18px; border-top: 1px solid var(--line); }
.sidebar-model { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; line-height: 1.5; word-break: break-all; }
.sidebar-config { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 8px 0; border: 0; background: transparent; color: var(--ink); font-size: 11px; font-weight: 600; }
.sidebar-config .icon { width: 15px; height: 15px; }
.sidebar-bottom p { margin-top: 6px; color: var(--muted-2); font-size: 8px; line-height: 1.6; }

.chat-main { display: flex; flex-direction: column; min-width: 0; background: var(--white); }
.chat-topbar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); min-height: 64px; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); }
.chat-sidebar-toggle { display: none; }
.chat-title { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--ink); font-size: 14px; font-weight: 600; outline: none; }
.chat-title:hover, .chat-title:focus { border-color: var(--line); background: var(--bg-soft); }
.chat-top-actions { display: flex; align-items: center; gap: 4px; }
.icon-text { display: inline-flex; align-items: center; gap: 5px; padding: 7px 8px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 10px; }
.icon-text:hover { background: var(--bg-soft); color: var(--ink); }
.icon-text .icon { width: 14px; height: 14px; }
.chat-config-button { color: var(--accent-dark); }
.chat-scroll { flex: 1; min-height: 430px; max-height: 590px; overflow-y: auto; scroll-behavior: smooth; }
.chat-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100%; padding: 52px 24px 36px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-dark); }
.empty-icon .icon { width: 24px; height: 24px; }
.chat-empty h3 { margin-top: 16px; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.chat-empty > p { max-width: 440px; margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.empty-model { margin-top: 12px; padding: 4px 9px; border-radius: 999px; background: var(--bg-soft); color: var(--muted-2); font-size: 9px; }
.chat-empty .btn { margin-top: 14px; }
.empty-prompts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: min(560px, 100%); margin-top: 28px; }
.empty-prompt { display: grid; gap: 3px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); text-align: left; color: var(--ink); transition: border-color .2s, background .2s; }
.empty-prompt:hover { border-color: var(--accent); background: var(--accent-soft); }
.empty-prompt strong { font-size: 11px; font-weight: 600; }
.empty-prompt span { color: var(--muted); font-size: 9px; }
.chat-messages { width: min(820px, calc(100% - 40px)); margin: 0 auto; padding: 24px 0 30px; }
.chat-message { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; margin-bottom: 24px; }
.chat-message.is-user { grid-template-columns: minmax(0, 1fr) 30px; margin-left: 60px; }
.chat-message.is-user .message-avatar { grid-column: 2; grid-row: 1; }
.chat-message.is-user .message-content { grid-column: 1; grid-row: 1; align-items: flex-end; }
.message-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-dark); font-size: 11px; font-weight: 700; }
.chat-message.is-user .message-avatar { background: var(--ink); color: var(--white); }
.message-content { display: flex; flex-direction: column; min-width: 0; }
.message-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; color: var(--muted-2); font-size: 9px; }
.message-meta strong { color: var(--ink); font-size: 11px; font-weight: 600; }
.chat-message.is-user .message-meta { justify-content: flex-end; }
.message-plain, .markdown { color: var(--ink-2); font-size: 13px; line-height: 1.85; word-break: break-word; }
.chat-message.is-user .message-plain { padding: 11px 14px; border-radius: 14px 4px 14px 14px; background: var(--bg-soft); }
.message-plain p:first-child, .markdown p:first-child { margin-top: 0; }
.message-plain p:last-child, .markdown p:last-child { margin-bottom: 0; }
.message-plain p, .markdown p { margin: 0 0 10px; }
.markdown h2, .markdown h3, .markdown h4 { margin: 18px 0 8px; font-size: 15px; font-weight: 600; line-height: 1.5; }
.markdown h2 { font-size: 17px; }
.markdown ul, .markdown ol { display: grid; gap: 5px; margin: 8px 0 12px; padding-left: 20px; }
.markdown ul { list-style: disc; }
.markdown ol { list-style: decimal; }
.markdown li { padding-left: 2px; }
.markdown blockquote { margin: 10px 0; padding: 8px 12px; border-left: 2px solid var(--accent); background: var(--bg-soft); color: var(--muted); }
.markdown pre { margin: 12px 0; padding: 13px 14px; border-radius: 9px; background: #161616; color: #f4f4f2; overflow-x: auto; font-size: 11px; line-height: 1.7; }
.markdown code { padding: 1px 5px; border-radius: 4px; background: var(--bg-soft); color: var(--accent-dark); font-family: "SFMono-Regular", Consolas, monospace; font-size: .92em; }
.markdown pre code { padding: 0; background: transparent; color: inherit; font-size: inherit; }
.markdown a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 2px; }
.markdown hr { margin: 16px 0; border: 0; border-top: 1px solid var(--line); }
.markdown .table-wrap { margin: 12px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.markdown table { width: 100%; border-collapse: collapse; font-size: 11px; }
.markdown th, .markdown td { padding: 7px 9px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: left; }
.markdown th:last-child, .markdown td:last-child { border-right: 0; }
.markdown tr:last-child td { border-bottom: 0; }
.markdown th { background: var(--bg-soft); font-weight: 600; }
.markdown .align-center { text-align: center; }
.markdown .align-right { text-align: right; }
.message-actions { display: flex; gap: 4px; margin-top: 7px; opacity: 0; transition: opacity .2s; }
.chat-message:hover .message-actions, .message-actions:focus-within { opacity: 1; }
.message-actions button { padding: 3px 6px; border: 0; border-radius: 4px; background: transparent; color: var(--muted-2); font-size: 9px; }
.message-actions button:hover { background: var(--bg-soft); color: var(--ink); }
.chat-message.is-user .message-actions { justify-content: flex-end; }
.reasoning { margin: 6px 0 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-soft); }
.reasoning summary { padding: 7px 10px; color: var(--muted); font-size: 10px; cursor: pointer; }
.reasoning .markdown { padding: 0 10px 9px; color: var(--muted); font-size: 11px; }
.message-error { margin-top: 8px; padding: 10px 12px; border: 1px solid rgba(185,59,46,.25); border-radius: 9px; background: rgba(185,59,46,.05); color: var(--red); font-size: 11px; line-height: 1.7; }
.message-error strong { display: block; font-size: 11px; }
.message-error p { margin-top: 3px; }
.message-error small { display: block; margin-top: 4px; color: #8d5f59; font-size: 9px; }
.message-error .error-hint { color: var(--muted); }
.message-error button { margin-top: 7px; padding: 3px 8px; border: 1px solid rgba(185,59,46,.3); border-radius: 5px; background: transparent; color: var(--red); font-size: 9px; }
.message-stopped { margin-top: 6px; color: var(--muted-2); font-size: 9px; }
.chat-message.is-streaming .markdown::after { content: ""; display: inline-block; width: 5px; height: 1em; margin-left: 3px; background: var(--accent); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
.chat-composer { border-top: 1px solid var(--line); padding: 10px 18px 12px; }
.quick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: 7px; }
.quick-row > span { color: var(--muted-2); font-size: 9px; }
.quick-prompt { padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--muted); font-size: 9px; transition: border-color .2s, color .2s; }
.quick-prompt:hover { border-color: var(--accent); color: var(--accent-dark); }
.composer-form { border: 1px solid var(--line-strong); border-radius: 12px; background: var(--white); transition: border-color .2s, box-shadow .2s; }
.composer-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,93,4,.08); }
#chat-input { display: block; width: 100%; min-height: 48px; max-height: 180px; padding: 12px 13px 4px; border: 0; background: transparent; color: var(--ink); font-size: 13px; line-height: 1.65; resize: none; outline: none; }
#chat-input::placeholder { color: var(--muted-2); }
.composer-bar { display: flex; align-items: center; gap: 8px; padding: 4px 7px 7px 13px; }
.chat-status { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-2); font-size: 9px; }
.chat-status[data-tone="ok"] { color: var(--green); }
.chat-status[data-tone="error"] { color: var(--red); }
.composer-model { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-2); font-size: 9px; }
.btn-stop { min-height: 30px; padding: 4px 9px; border-color: var(--line-strong); background: var(--white); color: var(--muted); font-size: 10px; }
.btn-stop .icon { width: 13px; height: 13px; }
.btn-send { min-height: 32px; padding: 5px 12px; font-size: 11px; }
.btn-send .icon { width: 14px; height: 14px; }
.composer-note { margin-top: 7px; color: var(--muted-2); font-size: 8px; line-height: 1.6; }
.assistant-support { display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; margin-top: 28px; padding: 22px 0 0; border-top: 1px solid var(--line); }
.support-block .mini-label { display: block; margin-bottom: 9px; }
.provider-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.provider-chips span { padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 9px; background: var(--white); }
.security-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.security-grid > div { padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.security-grid .icon { width: 17px; height: 17px; color: var(--accent-dark); margin-bottom: 7px; }
.security-grid strong { display: block; font-size: 10px; font-weight: 600; }
.security-grid span { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; line-height: 1.55; }

/* Settings dialog */
.settings-dialog { width: min(760px, calc(100vw - 32px)); max-height: 92vh; padding: 0; border: 0; border-radius: 20px; background: transparent; color: var(--ink); box-shadow: 0 30px 100px rgba(0,0,0,.24); }
.settings-dialog::backdrop { background: rgba(17,17,17,.45); backdrop-filter: blur(3px); }
.settings-panel { max-height: 92vh; overflow-y: auto; padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); }
.settings-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.settings-head h2 { margin-top: 4px; font-size: 24px; font-weight: 600; letter-spacing: -.03em; }
.settings-head p { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 18px; }
.field { display: grid; gap: 6px; min-width: 0; color: var(--ink); font-size: 11px; font-weight: 600; }
.field-wide { grid-column: 1 / -1; }
.field > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field em { color: var(--muted-2); font-size: 9px; font-style: normal; font-weight: 400; }
.field em[data-state="set"] { color: var(--green); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 11px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--white); color: var(--ink); font-size: 12px; font-weight: 400; outline: none;
}
.field input, .field select { min-height: 42px; }
.field textarea { resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,93,4,.08); }
.key-row, .url-row, .model-row { display: flex; gap: 6px; }
.key-row input, .url-row input, .model-row input { flex: 1; min-width: 0; }
.key-row button, .url-row button, .model-row button { flex: 0 0 auto; min-width: 58px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg-soft); color: var(--muted); font-size: 10px; font-weight: 500; }
.key-row button:hover, .url-row button:hover, .model-row button:hover { border-color: var(--accent); color: var(--accent-dark); }
.provider-links { grid-column: 1 / -1; display: flex; gap: 16px; }
.provider-links a { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-dark); font-size: 10px; }
.provider-links .icon { width: 12px; height: 12px; }
.provider-notes { display: grid; gap: 7px; padding: 12px 13px; border-radius: 9px; background: var(--bg-soft); }
.provider-notes p { color: var(--muted); font-size: 10px; line-height: 1.7; }
.cors-note { padding-left: 10px; border-left: 2px solid var(--line-strong); }
.cors-note[data-status="ok"] { border-left-color: var(--green); }
.cors-note[data-status="check"] { border-left-color: #c58a1a; }
.cors-note[data-status="proxy"] { border-left-color: var(--red); }
.cors-note[data-status="local"] { border-left-color: #4c6f9a; }
.field-reset { justify-self: start; padding: 3px 0; border: 0; background: transparent; color: var(--muted-2); font-size: 9px; font-weight: 400; }
.field-reset:hover { color: var(--accent-dark); }
.settings-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.settings-actions .btn-quiet { margin-right: auto; }
.test-status { margin-top: 10px; padding: 8px 10px; border-radius: 7px; background: var(--bg-soft); color: var(--muted); font-size: 10px; line-height: 1.7; }
.test-status:empty { display: none; }
.test-status[data-tone="ok"] { background: rgba(33,122,91,.08); color: var(--green); }
.test-status[data-tone="error"] { background: rgba(185,59,46,.07); color: var(--red); }
.test-status[data-tone="pending"] { background: var(--accent-soft); color: var(--accent-dark); }
.settings-privacy { display: flex; gap: 7px; margin-top: 12px; color: var(--muted-2); font-size: 9px; line-height: 1.7; }
.settings-privacy .icon { width: 14px; height: 14px; margin-top: 1px; flex: 0 0 auto; color: var(--green); }

/* MAIC */
.maic-section { position: relative; overflow: hidden; }
.maic-section::before { content: ""; position: absolute; width: 760px; height: 760px; right: -320px; top: 80px; border-radius: 50%; background: radial-gradient(circle, rgba(232,93,4,.13), transparent 66%); pointer-events: none; }
.scenario-tabs { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.scenario-tab { padding: 8px 13px; border: 1px solid var(--dark-line); border-radius: 999px; background: transparent; color: rgba(255,255,255,.56); font-size: 11px; transition: .2s; }
.scenario-tab:hover { border-color: rgba(232,93,4,.5); color: var(--white); }
.scenario-tab.is-active { background: var(--accent); border-color: var(--accent); color: var(--white); font-weight: 600; }
.maic-shell { position: relative; z-index: 2; border: 1px solid var(--dark-line); border-radius: 20px; background: #141414; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.maic-topbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 16px; border-bottom: 1px solid var(--dark-line); color: rgba(255,255,255,.46); font-size: 9px; letter-spacing: .06em; }
.maic-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 4px rgba(232,93,4,.12); }
.mode-switch { display: flex; gap: 2px; margin-left: 8px; padding: 2px; border: 1px solid var(--dark-line); border-radius: 7px; background: #101010; }
.mode-switch button { padding: 4px 9px; border: 0; border-radius: 5px; background: transparent; color: rgba(255,255,255,.45); font-size: 9px; }
.mode-switch button.is-active { background: rgba(255,255,255,.12); color: var(--white); }
.maic-mode { margin-left: auto; color: rgba(255,255,255,.3); }
.maic-layout { display: grid; grid-template-columns: .7fr 1.3fr; min-height: 560px; }
.issue-card { padding: 26px; border-right: 1px solid var(--dark-line); background: #111111; }
.issue-card h3 { margin: 9px 0 9px; font-size: 23px; font-weight: 600; line-height: 1.4; letter-spacing: -.02em; }
.issue-card > p { color: rgba(255,255,255,.62); font-size: 12px; line-height: 1.8; }
.issue-block { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--dark-line); }
.issue-block p { margin-top: 6px; color: rgba(255,255,255,.72); font-size: 11px; line-height: 1.75; }
.issue-brief { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--dark-line); }
.issue-brief p { margin-top: 6px; color: rgba(255,255,255,.46); font-size: 10px; line-height: 1.7; white-space: pre-line; }
.issue-meta { display: grid; gap: 7px; margin-top: 18px; }
.issue-meta div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 7px; border-bottom: 1px dashed rgba(255,255,255,.09); }
.issue-meta span { color: rgba(255,255,255,.34); font-size: 9px; }
.issue-meta strong { color: rgba(255,255,255,.76); font-size: 10px; text-align: right; }
.issue-note { display: flex; gap: 7px; margin-top: 18px; color: rgba(255,255,255,.38); font-family: var(--serif); font-size: 11px; line-height: 1.7; }
.issue-note .icon { width: 15px; height: 15px; margin-top: 2px; color: var(--accent-2); }
.maic-live-note { margin-top: 14px; padding: 9px 10px; border: 1px solid rgba(232,93,4,.24); border-radius: 7px; background: rgba(232,93,4,.08); color: rgba(255,255,255,.62); font-size: 9px; line-height: 1.65; }
.stage-card { display: flex; flex-direction: column; min-width: 0; padding: 22px; background: #161616; }
.stage-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--dark-line); }
.stage-head h4 { margin-top: 3px; font-size: 17px; font-weight: 600; }
.stage-progress { min-width: 130px; text-align: right; }
.stage-progress > span { color: rgba(255,255,255,.36); font-size: 9px; letter-spacing: .08em; }
.progress-track { height: 2px; margin-top: 7px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.progress-track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .35s ease; }
.message-stream { flex: 1; display: flex; flex-direction: column; gap: 9px; padding: 16px 0; min-height: 300px; max-height: 440px; overflow-y: auto; }
.message { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 9px; opacity: 0; transform: translateY(6px); animation: message-in .3s ease forwards; }
.message-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.08); color: var(--accent-2); font-size: 10px; font-weight: 700; }
.message-body { padding: 9px 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 2px 10px 10px 10px; background: rgba(255,255,255,.045); min-width: 0; }
.message-head { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 3px; }
.message-head strong { color: rgba(255,255,255,.82); font-size: 10px; font-weight: 600; }
.message-head span { color: rgba(255,255,255,.3); font-size: 8px; }
.live-badge { padding: 2px 5px; border: 1px solid rgba(232,93,4,.3); border-radius: 4px; color: var(--accent-2) !important; font-size: 7px !important; letter-spacing: .04em; }
.message-text { color: rgba(255,255,255,.66); font-size: 11px; line-height: 1.75; word-break: break-word; }
.message-text p { margin: 0 0 6px; }
.message-text p:last-child { margin-bottom: 0; }
.message-text ul, .message-text ol { display: grid; gap: 3px; margin: 6px 0; padding-left: 16px; }
.message-text ul { list-style: disc; }
.message-text ol { list-style: decimal; }
.message-text strong { color: rgba(255,255,255,.86); }
.message.is-teacher .message-avatar { background: rgba(232,93,4,.16); color: var(--accent-2); }
.message.is-evidence .message-avatar { background: rgba(33,122,91,.22); color: #76c7a8; }
.message.is-student .message-avatar { background: rgba(255,255,255,.1); color: rgba(255,255,255,.7); }
.message-error { margin-top: 6px; padding: 7px 8px; border: 1px solid rgba(185,59,46,.35); border-radius: 6px; background: rgba(185,59,46,.1); color: #ffb4a9; font-size: 9px; line-height: 1.6; }
.message-error strong { display: block; }
.message-error small { display: block; margin-top: 3px; color: rgba(255,255,255,.44); }
.message-error .error-retry { color: #ffb4a9; }
.message.is-streaming .message-text::after { content: ""; display: inline-block; width: 4px; height: .9em; margin-left: 3px; background: var(--accent-2); vertical-align: -1px; animation: blink 1s steps(1) infinite; }
.message-stopped { margin-top: 5px; color: rgba(255,255,255,.32); font-size: 8px; }
.message-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; min-height: 260px; padding: 24px; border: 1px dashed rgba(255,255,255,.13); border-radius: 11px; color: rgba(255,255,255,.36); text-align: center; }
.message-placeholder .icon { width: 26px; height: 26px; color: rgba(232,93,4,.6); }
.message-placeholder p { max-width: 350px; font-size: 10px; line-height: 1.8; }
.stage-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid var(--dark-line); }
.stage-actions .btn { min-height: 36px; padding: 7px 13px; font-size: 10px; }
.stage-hint { color: rgba(255,255,255,.32); font-size: 9px; line-height: 1.6; }
.maic-question { display: grid; gap: 5px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--dark-line); }
.maic-question label { color: rgba(255,255,255,.34); font-size: 9px; }
.maic-question > div { display: flex; gap: 6px; }
.maic-question input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--dark-line); border-radius: 7px; background: #101010; color: var(--white); font-size: 10px; outline: none; }
.maic-question input:focus { border-color: var(--accent); }
.maic-question .btn { min-height: 32px; padding: 5px 10px; font-size: 10px; border-color: var(--dark-line); color: rgba(255,255,255,.72); }
.maic-question .btn:hover { border-color: var(--accent); background: rgba(232,93,4,.08); }
.evidence-panel { padding: 22px; border-top: 1px solid var(--dark-line); background: rgba(232,93,4,.035); }
.evidence-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.evidence-head h3 { margin-top: 3px; font-size: 19px; font-weight: 600; }
.evidence-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.evidence-grid > div { padding: 13px; border: 1px solid rgba(255,255,255,.09); border-radius: 9px; background: rgba(255,255,255,.03); }
.evidence-no { color: var(--accent-2); font-size: 9px; letter-spacing: .1em; }
.evidence-grid h4 { margin: 4px 0 5px; font-size: 13px; font-weight: 600; }
.evidence-grid p { color: rgba(255,255,255,.48); font-size: 10px; line-height: 1.7; }
.teacher-callout { display: flex; gap: 9px; align-items: flex-start; margin-top: 14px; padding: 12px 13px; border: 1px solid rgba(232,93,4,.24); border-radius: 8px; background: rgba(232,93,4,.06); color: rgba(255,255,255,.58); font-size: 10px; line-height: 1.7; }
.teacher-callout .icon { width: 16px; height: 16px; margin-top: 1px; color: var(--accent-2); }
.teacher-callout strong { color: var(--accent-2); }
.evidence-source { margin-top: 10px; color: rgba(255,255,255,.3); font-size: 8px; line-height: 1.6; }

/* Co-play */
.workbench { display: grid; grid-template-columns: .8fr 1.2fr; gap: 20px; align-items: start; }
.workbench-form { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); position: sticky; top: 96px; }
.form-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.workbench-form > label { display: grid; gap: 6px; margin-top: 14px; font-size: 11px; font-weight: 600; }
.workbench-form select { width: 100%; padding: 10px 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--white); color: var(--ink); font-size: 11px; outline: none; }
.workbench-form select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,93,4,.08); }
.check-group { display: flex; flex-wrap: wrap; gap: 9px 14px; margin: 16px 0 18px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; }
.check-group legend { padding: 0 5px; color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.check-group label { display: inline-flex; align-items: center; gap: 5px; margin: 0; color: var(--muted); font-size: 10px; font-weight: 500; }
.check-group input { accent-color: var(--accent); }
.form-note { margin-top: 10px; color: var(--muted-2); font-size: 9px; line-height: 1.6; }
.blueprint { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); min-height: 480px; }
.blueprint-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.blueprint-head h3 { margin-top: 3px; font-size: 21px; font-weight: 600; }
.bp-status { padding: 4px 8px; border-radius: 999px; background: var(--bg-soft); color: var(--muted); font-size: 9px; font-weight: 600; }
.bp-status.is-ready { background: rgba(33,122,91,.1); color: var(--green); }
.bp-status.is-review { background: rgba(197,138,26,.12); color: #8a5c0d; }
.blueprint-meta { margin-top: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.7; }
.blueprint-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.bp-no { color: var(--accent-dark); font-size: 9px; letter-spacing: .1em; }
.bp-column h4 { margin: 4px 0 8px; font-size: 13px; font-weight: 600; }
.bp-column ul { display: grid; gap: 6px; }
.bp-column li { position: relative; padding: 8px 9px 8px 22px; border-radius: 7px; background: var(--bg-soft); color: var(--muted); font-size: 10px; line-height: 1.65; }
.bp-column li::before { content: ""; position: absolute; left: 9px; top: 13px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.bp-column li.is-teacher::before { background: var(--green); }
.bp-column li b { color: var(--ink); }
.bp-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; padding-top: 13px; border-top: 1px solid var(--line); }
.bp-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.bp-tags span { padding: 3px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 8px; }
.bp-note { color: var(--muted-2); font-size: 9px; }
.blueprint.is-fresh { animation: blueprint-in .4s ease; }

/* Teachers */
.teacher-layout { display: grid; grid-template-columns: .62fr 1.38fr; gap: 20px; align-items: start; }
.tier-tabs { display: grid; gap: 8px; }
.tier-tab { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 11px; text-align: left; padding: 15px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); transition: .2s; }
.tier-tab span { grid-row: 1 / span 2; align-self: center; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--bg-soft); color: var(--accent-dark); font-size: 8px; font-weight: 700; }
.tier-tab strong { font-size: 17px; font-weight: 600; }
.tier-tab small { color: var(--muted); font-size: 9px; }
.tier-tab:hover { border-color: var(--line-strong); }
.tier-tab.is-active { background: var(--ink); border-color: var(--ink); color: var(--white); }
.tier-tab.is-active small { color: rgba(255,255,255,.5); }
.tier-tab.is-active span { background: rgba(232,93,4,.2); color: var(--accent-2); }
.tier-detail { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.incentive-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 20px; }
.incentive-grid article { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.incentive-grid .icon { width: 20px; height: 20px; color: var(--accent-dark); margin-bottom: 10px; }
.incentive-grid h3 { font-size: 14px; font-weight: 600; }
.incentive-grid p { margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.7; }

/* Values */
.values-layout { display: grid; grid-template-columns: .78fr 1.22fr; gap: 20px; align-items: start; }
.value-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.value-card { display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; column-gap: 9px; text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); color: var(--ink); transition: .2s; }
.value-card .icon { grid-row: 1 / span 2; align-self: center; width: 20px; height: 20px; color: var(--accent-dark); }
.value-card strong { font-size: 14px; font-weight: 600; }
.value-card small { color: var(--muted); font-size: 8px; line-height: 1.5; }
.value-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.value-card.is-active { border-color: var(--accent); background: var(--accent-soft); }
.value-detail { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.ethics-strip { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; margin-top: 22px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.ethics-title { display: flex; align-items: center; gap: 10px; }
.ethics-title > .icon { width: 27px; height: 27px; color: var(--accent-dark); }
.ethics-title h3 { margin-top: 2px; font-size: 17px; font-weight: 600; }
.ethics-items { display: flex; flex-wrap: wrap; gap: 7px 16px; }
.ethics-items span { color: var(--muted); font-size: 10px; }
.ethics-items b { color: var(--ink); }
.ethics-note { max-width: 220px; color: var(--muted-2); font-size: 9px; line-height: 1.6; text-align: right; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 12px; }
.about-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.about-main { border-color: rgba(232,93,4,.3); background: linear-gradient(150deg, var(--accent-soft), var(--white) 60%); }
.about-badge { display: inline-block; padding: 4px 8px; border-radius: 999px; background: rgba(232,93,4,.12); color: var(--accent-dark); font-size: 9px; letter-spacing: .06em; }
.about-card h3 { margin: 11px 0 9px; font-size: 19px; font-weight: 600; line-height: 1.45; }
.about-card p { color: var(--muted); font-size: 11px; line-height: 1.8; }
.about-checks { display: grid; gap: 6px; margin-top: 14px; }
.about-checks span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.about-checks .icon { width: 13px; height: 13px; color: var(--green); }
.about-list { display: grid; gap: 6px; margin-top: 10px; }
.about-list li { position: relative; padding-left: 12px; color: var(--muted); font-size: 11px; }
.about-list li::before { content: ""; position: absolute; left: 0; top: .72em; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.path-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.path-chips span { padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 9px; }
.about-small { margin-top: 10px; color: var(--muted-2) !important; font-size: 9px !important; }
.case-info { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.case-info div { padding: 14px 16px; border-right: 1px solid var(--line); }
.case-info div:last-child { border-right: 0; }
.case-info span { display: block; color: var(--muted-2); font-size: 9px; letter-spacing: .08em; }
.case-info strong { display: block; margin-top: 4px; font-size: 13px; font-weight: 600; }
.tech-note { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 24px; }
.tech-note > div { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.tech-note h3 { margin: 5px 0 7px; font-size: 16px; font-weight: 600; }
.tech-note p { color: var(--muted); font-size: 10px; line-height: 1.75; }

/* Footer */
.site-footer { padding: 28px 0; border-top: 1px solid var(--line); background: var(--white); }
.footer-inner { display: flex; align-items: center; gap: 22px; }
.footer-brand { display: flex; align-items: center; gap: 9px; }
.footer-brand .brand-mark { width: 30px; height: 30px; font-size: 17px; border-radius: 7px; }
.footer-brand strong { display: block; font-size: 13px; font-weight: 600; }
.footer-brand small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 8px; }
.footer-inner > p { flex: 1; color: var(--muted-2); font-size: 9px; line-height: 1.6; }
.footer-links { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 10px; }
.footer-links a { display: inline-flex; align-items: center; gap: 4px; }
.footer-links a:hover { color: var(--accent-dark); }
.footer-links .icon { width: 12px; height: 12px; }
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--ink); box-shadow: var(--shadow-soft); opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s; }
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.noscript { position: fixed; left: 16px; bottom: 16px; z-index: 300; max-width: 420px; padding: 12px 16px; border-radius: 9px; background: #fff4d6; color: #5f4600; font-size: 12px; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .65s ease, transform .65s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* Animations */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes message-in { to { opacity: 1; transform: none; } }
@keyframes blueprint-in { from { opacity: .5; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* Focus */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2 { text-wrap: balance; }
section[id] { scroll-margin-top: 88px; }

/* Responsive */
@media (max-width: 1120px) {
  .site-nav { gap: 16px; font-size: 12px; }
  .hero-inner { gap: 40px; }
  .hero-strip { grid-template-columns: repeat(3, 1fr); }
  .hero-quote { grid-column: 1 / -1; justify-self: start; max-width: none; padding-top: 14px; border-top: 1px solid var(--line); }
  .assistant-app { grid-template-columns: 232px minmax(0, 1fr); }
  .chat-message.is-user { margin-left: 30px; }
}

@media (max-width: 940px) {
  .shell { width: min(var(--max), calc(100% - 32px)); }
  .menu-toggle { display: grid; }
  .site-nav {
    position: fixed; inset: 72px 0 auto 0; display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 10px 16px 18px; background: rgba(255,255,255,.98); border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 13px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
  .site-nav a::after { display: none; }
  .header-actions .btn-text { display: none; }
  .hero { padding-top: 124px; }
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero-panel { max-width: 600px; }
  .hero-float { left: auto; right: 14px; bottom: -18px; }
  .principles-grid { grid-template-columns: 1fr 1fr; }
  .principles article:nth-child(2) { border-right: 0; }
  .principles article:nth-child(3), .principles article:nth-child(4) { border-top: 1px solid var(--line); }
  .overview-grid, .agents-layout, .workbench, .teacher-layout, .values-layout { grid-template-columns: 1fr; }
  .system-map, .agent-detail, .workbench-form { position: static; }
  .flow-grid { grid-template-columns: 1fr; }
  .loop-bar { border-radius: 14px; flex-wrap: wrap; }
  .loop-note { width: 100%; }
  .assistant-app { grid-template-columns: 1fr; min-height: 680px; position: relative; }
  .chat-sidebar {
    position: absolute; inset: 0 auto 0 0; z-index: 30; width: min(300px, 86vw);
    transform: translateX(-102%); transition: transform .25s ease; box-shadow: 20px 0 60px rgba(0,0,0,.12);
  }
  .chat-sidebar.is-open { transform: none; }
  .sidebar-backdrop { display: none; position: absolute; inset: 0; z-index: 20; background: rgba(17,17,17,.32); }
  .sidebar-backdrop.is-open { display: block; }
  .chat-sidebar-toggle { display: grid; }
  .chat-scroll { max-height: none; }
  .assistant-support { grid-template-columns: 1fr; }
  .maic-layout { grid-template-columns: 1fr; }
  .issue-card { border-right: 0; border-bottom: 1px solid var(--dark-line); }
  .evidence-grid { grid-template-columns: 1fr; }
  .blueprint-grid { grid-template-columns: 1fr; }
  .incentive-grid { grid-template-columns: 1fr 1fr; }
  .ethics-strip { grid-template-columns: 1fr; gap: 12px; }
  .ethics-note { max-width: none; text-align: left; }
  .about-grid { grid-template-columns: 1fr 1fr; }
  .about-main { grid-column: 1 / -1; }
  .case-info { grid-template-columns: 1fr 1fr; }
  .case-info div:nth-child(2) { border-right: 0; }
  .case-info div:nth-child(3), .case-info div:nth-child(4) { border-top: 1px solid var(--line); }
  .footer-inner { flex-wrap: wrap; }
  .footer-inner > p { flex: 1 1 100%; order: 3; }
}

@media (max-width: 680px) {
  body { font-size: 15px; }
  .shell { width: calc(100% - 28px); }
  .hero { padding-top: 112px; }
  .hero h1 { font-size: clamp(40px, 12vw, 56px); }
  .hero-subtitle { font-size: 15px; }
  .hero-desc { font-size: 13px; }
  .hero-actions .btn { width: 100%; }
  .hero-meta { gap: 6px; }
  .hero-meta span { font-size: 10px; }
  .panel-body { padding: 16px; }
  .hero-float { position: static; margin-top: 12px; }
  .hero-strip { grid-template-columns: 1fr; gap: 12px; margin-top: 34px; }
  .hero-quote { border-top: 0; padding-top: 0; }
  .principles-grid { grid-template-columns: 1fr; }
  .principles article { border-right: 0; border-top: 1px solid var(--line); }
  .principles article:first-child { border-top: 0; }
  .section { padding: 76px 0; }
  .section-head { margin-bottom: 30px; }
  .section-head h2 { font-size: 30px; }
  .section-head .lead { font-size: 13px; }
  .section-head-split { flex-direction: column; align-items: flex-start; }
  .head-badge { align-self: flex-start; }
  .agent-grid { grid-template-columns: 1fr; }
  .agent-card:nth-child(1) { grid-column: auto; }
  .detail-grid { grid-template-columns: 1fr; }
  .assistant-app { border-radius: 16px; min-height: 620px; }
  .chat-topbar { padding: 10px; gap: 6px; }
  .chat-title { font-size: 12px; }
  .chat-top-actions .icon-text { padding: 6px; }
  .chat-top-actions .icon-text .icon { width: 15px; height: 15px; }
  .chat-top-actions .icon-text { font-size: 0; gap: 0; }
  .chat-config-button { display: none; }
  .chat-messages { width: calc(100% - 24px); padding-top: 18px; }
  .chat-message.is-user { margin-left: 0; }
  .chat-message { grid-template-columns: 26px minmax(0, 1fr); gap: 9px; }
  .message-avatar { width: 26px; height: 26px; }
  .empty-prompts { grid-template-columns: 1fr; }
  .chat-empty { padding: 36px 16px 26px; }
  .chat-empty h3 { font-size: 19px; }
  .composer-model { display: none; }
  .quick-row { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .quick-prompt { white-space: nowrap; }
  .security-grid { grid-template-columns: 1fr; }
  .settings-panel { padding: 18px; }
  .settings-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .settings-actions { justify-content: stretch; }
  .settings-actions .btn { flex: 1 1 auto; }
  .settings-actions .btn-quiet { margin-right: 0; }
  .maic-topbar { align-items: flex-start; }
  .maic-mode { width: 100%; margin-left: 0; }
  .issue-card, .stage-card { padding: 17px; }
  .stage-head { flex-direction: column; }
  .stage-progress { text-align: left; width: 100%; }
  .stage-actions .btn { flex: 1 1 auto; }
  .stage-hint { width: 100%; }
  .evidence-grid { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: 1fr; }
  .incentive-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-main { grid-column: auto; }
  .tech-note { grid-template-columns: 1fr; }
  .case-info { grid-template-columns: 1fr; }
  .case-info div { border-right: 0; border-top: 1px solid var(--line); }
  .case-info div:first-child { border-top: 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-links { flex-wrap: wrap; }
  .loop-steps { flex-wrap: wrap; }
  .loop-steps i { min-width: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Classroom entry and participant-specific tasks */
.role-gate, .participant-desk { position: relative; z-index: 2; }
.role-gate { padding: 32px; border: 1px solid #deded8; border-radius: 16px; background: var(--bg-soft); color: var(--ink); }
.role-gate-heading, .participant-bar { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.role-gate-heading h3 { margin-top: 5px; font-size: 26px; font-weight: 600; }
.role-gate .mini-label { color: var(--accent-dark); }
.role-gate-heading > span { color: var(--muted); font-size: 12px; }
.role-options { border: 0; padding: 0; margin: 25px 0 0; min-width: 0; }
#maic-role-options { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.classroom-role { position: relative; grid-column: span 2; cursor: pointer; min-width: 0; }
.classroom-role:nth-child(-n+2) { grid-column: span 3; }
.classroom-role input { position: absolute; right: 18px; top: 20px; width: 17px; height: 17px; accent-color: var(--accent); }
.classroom-role-body { display: grid; gap: 10px; height: 100%; padding: 22px; border: 1px solid var(--line-strong); border-radius: 10px; background: white; transition: border-color .15s, background .15s; }
.classroom-role-body .icon { width: 25px; height: 25px; color: var(--accent-dark); }
.classroom-role-body strong { font-size: 19px; font-weight: 600; }
.classroom-role-body > span { color: var(--muted); font-size: 13px; }
.classroom-role-body small { margin-top: 7px; color: var(--muted); font-size: 11px; }
.classroom-role input:checked + .classroom-role-body { background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.classroom-role input:focus-visible + .classroom-role-body { outline: 3px solid var(--accent); outline-offset: 3px; }
.classroom-role:hover .classroom-role-body { border-color: var(--accent); }
.role-preview { margin-top: 20px; padding: 20px; border-left: 3px solid var(--accent); background: white; }
.role-preview h4 { font-size: 16px; }
.role-preview p { color: var(--muted); margin-top: 5px; font-size: 13px; }
.role-preview ol { display: flex; flex-wrap: wrap; gap: 10px 32px; list-style: decimal; padding-left: 20px; margin-top: 12px; font-size: 13px; }
.role-gate-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 24px; }
.role-gate-actions p, .role-boundary { font-size: 12px; color: var(--muted); }
.role-boundary { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.role-gate .btn-ghost { color: var(--ink); }
#maic-workspace, .role-gate { scroll-margin-top: 100px; }
.participant-bar { position: relative; z-index: 2; padding-bottom: 20px; }
.participant-bar h3 { margin-top: 5px; font-size: 26px; }
.participant-bar p { margin-top: 6px; font-size: 13px; color: #c0c0c0; }
.participant-bar .btn { flex-shrink: 0; color: white; border-color: #555; }
.participant-desk { padding: 24px; margin-bottom: 24px; border: 1px solid #393939; border-radius: 12px; background: #191919; }
.participant-tasks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.participant-tasks li { display: flex; align-items: flex-start; gap: 12px; }
.participant-tasks li > span { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border: 1px solid #555; border-radius: 50%; color: #ddd; font-size: 12px; }
.participant-tasks strong { display: block; font-size: 13px; font-weight: 500; }
.participant-tasks small { display: block; color: #aaa; font-size: 11px; margin-top: 3px; }
.participant-tasks .is-done > span { background: #173f30; border-color: #39765b; color: #a7e2c7; }
.participation-form { display: grid; gap: 12px; padding-top: 20px; margin-top: 20px; border-top: 1px solid #393939; }
.participation-hint { font-size: 12px; color: #c5c5c5; }
.participation-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.participation-form label { display: grid; gap: 8px; color: #ddd; font-size: 13px; }
.participation-form textarea { display: block; width: 100%; min-height: 96px; padding: 12px; resize: vertical; border: 1px solid #555; border-radius: 6px; background: #111; color: #fff; font-size: 13px; line-height: 1.7; }
.participation-form textarea::placeholder { color: #999; }
.participation-form textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.participation-form .btn { justify-self: start; }
.participation-saved { margin-top: 18px; padding: 12px 14px; border-left: 2px solid #75bb99; background: rgba(70,130,100,.12); color: #c9e5d6; font-size: 12px; }
.message.is-human .message-body { border-color: #8a4b20; background: #302115; }
.message.is-human .message-text { white-space: pre-wrap; color: #eee; }
.message.is-human .live-badge { color: #ffbd8d; }
.maic-question label { color: #bbb; font-size: 12px; }
.maic-question input { font-size: 12px; }
#maic [tabindex="-1"]:focus { outline: none; }
@media (max-width: 768px) {
  .role-gate { padding: 22px; }
  .role-gate-heading, .participant-bar { align-items: flex-start; }
  .role-gate-heading { flex-direction: column; gap: 10px; }
  #maic-role-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .classroom-role, .classroom-role:nth-child(-n+2) { grid-column: auto; }
  .classroom-role:last-child { grid-column: 1 / -1; }
  .participant-tasks { grid-template-columns: 1fr; gap: 14px; }
  .participation-fields { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .role-gate { padding: 18px; }
  #maic-role-options { grid-template-columns: 1fr; }
  .classroom-role-body { padding: 18px; gap: 6px; }
  .classroom-role-body .icon { width: 22px; height: 22px; }
  .role-gate-heading h3, .participant-bar h3 { font-size: 23px; }
  .participant-bar { flex-direction: column; gap: 14px; }
  .participant-desk { padding: 18px; }
  .role-gate-actions { align-items: stretch; }
  .role-gate-actions .btn { width: 100%; }
}
