@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Serif+Display&display=swap");

:root {
  --ink: #203b34;
  --ink-soft: #536861;
  --muted: #78867f;
  --paper: #f4f3ed;
  --card: #fffefa;
  --line: #e4e5db;
  --leaf: #d7ef71;
  --leaf-dark: #698334;
  --mint: #edf4e5;
  --peach: #f8e7da;
  --peach-dark: #9b6042;
  --shadow: 0 18px 60px rgba(31, 59, 50, .08);
  font-family: "DM Sans", "Avenir Next", Avenir, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #a9cb3c; outline-offset: 2px; }
a { color: inherit; }
.loading-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); }
.brand-mark { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 13px 13px 13px 4px; background: var(--leaf); color: var(--ink); font-family: Georgia, serif; font-size: 21px; font-weight: 700; }

.landing-shell { width: min(1120px, calc(100% - 48px)); margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 86px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(32,59,52,.1); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-copy { display: flex; flex-direction: column; gap: 2px; }
.brand-name { font-size: 13px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.brand-subtitle { font-size: 11px; color: var(--muted); }
.topbar-note { color: var(--muted); font-size: 12px; }
.landing-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); gap: clamp(42px, 9vw, 116px); align-items: center; padding: 50px 0 70px; }
.hero-copy { position: relative; padding: 24px 0 36px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 22px; color: var(--leaf-dark); font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--leaf-dark); }
h1, h2, h3, p { margin-top: 0; }
.hero-copy h1 { max-width: 590px; margin-bottom: 22px; font-family: "DM Serif Display", Georgia, serif; font-size: clamp(46px, 5.8vw, 72px); font-weight: 400; line-height: .99; letter-spacing: -.035em; }
.hero-copy h1 em { color: #829c3f; font-style: normal; }
.hero-lede { max-width: 465px; color: var(--ink-soft); font-size: 16px; line-height: 1.75; }
.stats-row { display: flex; gap: 34px; margin-top: 35px; }
.stat { display: grid; gap: 3px; }
.stat strong { font-family: "DM Serif Display", Georgia, serif; font-size: 25px; font-weight: 400; }
.stat span { color: var(--muted); font-size: 11px; letter-spacing: .02em; }
.orbit { position: absolute; right: 3%; top: 2%; width: 174px; height: 174px; border: 1px solid rgba(112,145,57,.18); border-radius: 50%; pointer-events: none; }
.orbit::before, .orbit::after { content: ""; position: absolute; border: 1px solid rgba(112,145,57,.17); border-radius: 50%; }
.orbit::before { inset: 20px; }
.orbit::after { inset: 43px; background: radial-gradient(circle, rgba(215,239,113,.48), transparent 66%); border-color: transparent; }
.room-card { position: relative; z-index: 1; overflow: hidden; padding: 32px; border: 1px solid rgba(32,59,52,.09); border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.room-card::after { content: ""; position: absolute; width: 130px; height: 130px; right: -67px; bottom: -75px; border-radius: 50%; background: var(--mint); pointer-events: none; }
.room-card h2 { margin: 0 0 8px; font-family: "DM Serif Display", Georgia, serif; font-size: 29px; font-weight: 400; letter-spacing: -.02em; }
.room-card .card-intro { margin-bottom: 24px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.field-label { display: block; margin: 16px 0 7px; color: #66776f; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.text-field { width: 100%; min-height: 47px; border: 1px solid var(--line); border-radius: 10px; padding: 0 13px; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
.text-field::placeholder { color: #a0aaa2; }
.text-field:focus { border-color: #9db94c; box-shadow: 0 0 0 3px rgba(169,203,60,.14); outline: none; }
.primary-button, .secondary-button, .quiet-button, .verdict-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 45px; border: 0; border-radius: 10px; padding: 0 17px; font-size: 13px; font-weight: 700; transition: transform .15s, background .15s, border-color .15s; }
.primary-button { color: #213324; background: var(--leaf); }
.primary-button:hover { background: #c9e558; transform: translateY(-1px); }
.secondary-button { border: 1px solid var(--line); color: var(--ink); background: white; }
.secondary-button:hover { border-color: #a9b88a; background: #fbfcf6; }
.quiet-button { min-height: 36px; padding: 0 12px; color: var(--ink-soft); background: transparent; }
.quiet-button:hover { background: var(--mint); }
.full-width { width: 100%; margin-top: 14px; }
.form-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 4px; color: #a0aaa2; font-size: 11px; }
.form-divider::before, .form-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.code-field { text-transform: uppercase; letter-spacing: .19em; font-weight: 700; }
.error-message, .toast { color: #9c4f3c; font-size: 12px; line-height: 1.45; }
.error-message { min-height: 18px; margin: 12px 0 0; }
.landing-foot { border-top: 1px solid rgba(32,59,52,.1); padding: 18px 0; color: var(--muted); font-size: 11px; }

.workspace { min-height: 100vh; display: grid; grid-template-rows: 70px 1fr; }
.workspace-topbar { position: sticky; top: 0; z-index: 10; height: 70px; display: flex; align-items: center; justify-content: space-between; padding: 0 27px; border-bottom: 1px solid var(--line); background: rgba(250,249,244,.94); backdrop-filter: blur(14px); }
.workspace-brand .brand-mark { width: 32px; height: 32px; border-radius: 10px 10px 10px 3px; font-size: 18px; }
.workspace-brand .brand-name { font-size: 11px; }
.header-right { display: flex; align-items: center; gap: 18px; }
.room-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink-soft); font-size: 11px; }
.room-chip strong { color: var(--ink); letter-spacing: .14em; }
.link-button { border: 0; padding: 0; color: var(--leaf-dark); background: transparent; font-size: 11px; font-weight: 700; }
.link-button:hover { text-decoration: underline; }
.workspace-grid { width: 100%; max-width: 1580px; margin: 0 auto; padding: 27px 24px 40px; display: grid; grid-template-columns: 258px minmax(0, 1fr) 308px; gap: 20px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.sidebar { overflow: hidden; position: sticky; top: 89px; max-height: calc(100vh - 110px); display: flex; flex-direction: column; }
.sidebar-top { padding: 19px 17px 14px; border-bottom: 1px solid var(--line); }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.sidebar-heading h2 { margin: 0; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; }
.progress-mini { color: var(--muted); font-size: 10px; }
.search-wrap { position: relative; }
.search-wrap::before { content: "⌕"; position: absolute; left: 10px; top: 6px; color: #829087; font-size: 18px; }
.search-input { width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px 0 30px; color: var(--ink); background: #fbfbf7; font-size: 11px; }
.search-input:focus { border-color: #a9bd78; outline: none; }
.level-select { width: 100%; height: 34px; margin-top: 9px; border: 0; border-radius: 7px; padding: 0 9px; color: var(--ink-soft); background: #f0f2e9; font-size: 10px; }
.topic-list { overflow-y: auto; padding: 7px 10px 15px; }
.theme-label { margin: 15px 8px 6px; color: #8a958c; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.topic-button { width: 100%; min-height: 39px; display: flex; align-items: center; gap: 9px; border: 0; border-radius: 8px; padding: 0 9px; color: var(--ink-soft); background: transparent; text-align: left; }
.topic-button:hover { color: var(--ink); background: #f4f6ed; }
.topic-button.active { color: var(--ink); background: var(--mint); }
.topic-code { width: 36px; color: #91a36a; font-size: 10px; font-weight: 700; }
.topic-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; }
.topic-count { min-width: 23px; color: #909a92; font-size: 9px; text-align: right; }
.search-results { padding: 8px 2px; }
.search-result { width: 100%; display: block; margin: 2px 0; border: 0; border-radius: 8px; padding: 9px 10px; color: var(--ink); background: transparent; text-align: left; }
.search-result:hover { background: var(--mint); }
.search-result strong { display: block; margin-bottom: 4px; color: var(--leaf-dark); font-size: 9px; }
.search-result span { display: block; font-size: 10px; line-height: 1.4; }
.search-empty { padding: 14px 10px; color: var(--muted); font-size: 11px; line-height: 1.5; }

.lesson-column { min-width: 0; }
.lesson-topline { display: flex; align-items: center; justify-content: space-between; margin: 2px 2px 12px; }
.breadcrumb { color: var(--muted); font-size: 11px; }
.breadcrumb strong { color: var(--ink-soft); font-weight: 600; }
.level-pill { border: 1px solid #dce4c4; border-radius: 99px; padding: 6px 9px; color: var(--leaf-dark); background: #f5f8e8; font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.outcome-card { overflow: hidden; position: relative; padding: clamp(23px, 3vw, 37px); }
.outcome-card::before { content: ""; position: absolute; top: -75px; right: -50px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(215,239,113,.23), rgba(215,239,113,0)); pointer-events: none; }
.outcome-meta { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; margin-bottom: 21px; }
.outcome-id { color: #788f42; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.meta-dot { width: 3px; height: 3px; border-radius: 50%; background: #b5beb1; }
.outcome-seq { color: #87938b; font-size: 10px; }
.outcome-card h1 { position: relative; z-index: 1; max-width: 900px; margin: 0 0 24px; font-family: "DM Serif Display", Georgia, serif; font-size: clamp(29px, 3.3vw, 43px); font-weight: 400; line-height: 1.16; letter-spacing: -.025em; }
.practice-question { position: relative; z-index: 1; margin: 0 0 17px; border: 1px solid #dfe8c6; border-left: 4px solid #9db94c; border-radius: 12px; padding: 17px 19px 18px; background: #f7faed; }
.question-kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--leaf-dark); font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.question-kicker span { font-size: 14px; }
.practice-question p { max-width: 850px; margin: 0; color: var(--ink); font-family: "DM Serif Display", Georgia, serif; font-size: clamp(17px, 1.8vw, 21px); line-height: 1.42; }
.guide-notes { position: relative; z-index: 1; margin-bottom: 22px; border-radius: 11px; background: #f5f6ef; }
.guide-notes summary { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 14px; color: var(--ink-soft); cursor: pointer; list-style: none; font-size: 10px; font-weight: 700; }
.guide-notes summary::-webkit-details-marker { display: none; }
.guide-notes summary::before { content: "+"; color: var(--leaf-dark); font-size: 16px; font-weight: 500; }
.guide-notes[open] summary::before { content: "−"; }
.guide-notes p { margin: 0; padding: 0 14px 14px 36px; color: #65756c; font-size: 11px; line-height: 1.65; }
.slide-content { position: relative; z-index: 1; margin: -7px 0 23px; border-left: 2px solid #dce5ca; border-radius: 9px; background: #fafaf6; }
.slide-content summary { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 14px; color: #7c8a70; cursor: pointer; list-style: none; font-size: 9px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.slide-content summary::-webkit-details-marker { display: none; }
.slide-content summary::before { content: "+"; color: var(--leaf-dark); font-size: 16px; font-weight: 500; }
.slide-content[open] summary::before { content: "−"; }
.slide-content p { max-width: 850px; margin: 0; padding: 0 14px 14px 36px; color: #66736a; font-size: 12px; line-height: 1.7; }
.answer-label-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.answer-label-row label { color: var(--ink); font-size: 12px; font-weight: 700; }
.answer-hint { color: #98a198; font-size: 10px; }
.answer-box { width: 100%; min-height: 190px; resize: vertical; border: 1px solid var(--line); border-radius: 12px; padding: 15px; color: var(--ink); background: #fff; font-size: 12px; line-height: 1.7; }
.answer-box::placeholder { color: #a7b0a8; }
.answer-box:focus { border-color: #a3b96b; outline: none; box-shadow: 0 0 0 3px rgba(169,203,60,.12); }
.answer-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 11px; margin-top: 13px; }
.answer-actions-left, .answer-actions-right { display: flex; align-items: center; gap: 8px; }
.answer-actions .primary-button, .answer-actions .secondary-button { min-height: 40px; font-size: 11px; }
.mark-done { color: var(--leaf-dark); border-color: #dce6c5; }
.mark-done.is-done { color: #fff; background: #617843; border-color: #617843; }
.save-status { min-height: 15px; margin: 10px 1px 0; color: #77866f; font-size: 10px; }
.navigation-row { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; }
.nav-step { min-height: 37px; padding: 0 12px; font-size: 10px; }
.nav-step:disabled { cursor: default; opacity: .4; }
.keyboard-hint { color: #9ba49c; font-size: 9px; }

.group-column { position: sticky; top: 89px; display: grid; gap: 14px; }
.people-card { padding: 17px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.card-heading h2 { margin: 0; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
.people-count { color: var(--muted); font-size: 10px; }
.person-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.person-avatar { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #536c3e; background: #edf4d9; font-size: 10px; font-weight: 700; }
.person-avatar:nth-child(3n) { color: #8b5b43; background: #f8e7da; }
.person-copy { min-width: 0; flex: 1; }
.person-copy strong { display: block; overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.person-copy span { color: var(--muted); font-size: 9px; }
.person-state { color: #a0a99e; font-size: 9px; }
.room-progress { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.progress-labels { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--muted); font-size: 9px; }
.progress-track { height: 5px; overflow: hidden; border-radius: 9px; background: #e9ebdf; }
.progress-fill { height: 100%; border-radius: inherit; background: #a8c94b; transition: width .25s ease; }
.answers-card { overflow: hidden; }
.answers-card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.answers-card-head h2 { margin: 0; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
.answer-count { color: var(--muted); font-size: 9px; }
.peer-list { padding: 4px 12px 12px; }
.peer-empty { padding: 14px 5px 17px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.peer-answer { padding: 12px 4px 13px; border-bottom: 1px solid #eef0e8; }
.peer-answer:last-child { border-bottom: 0; }
.peer-answer-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.peer-answer-header .person-avatar { width: 25px; height: 25px; flex-basis: 25px; font-size: 9px; }
.peer-answer-header strong { font-size: 10px; }
.peer-time { margin-left: auto; color: #9aa39a; font-size: 8px; }
.peer-answer-text { margin: 0 0 11px; color: #596b62; font-size: 10px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.review-note { width: 100%; min-height: 54px; resize: vertical; border: 1px solid var(--line); border-radius: 8px; padding: 8px; color: var(--ink); background: #fcfcf8; font-size: 9px; line-height: 1.4; }
.review-note::placeholder { color: #a3aca4; }
.review-actions { display: flex; gap: 6px; margin-top: 7px; }
.verdict-button { flex: 1; min-height: 30px; border: 1px solid var(--line); border-radius: 7px; padding: 0 6px; color: #617148; background: #fff; font-size: 9px; }
.verdict-button:hover { background: var(--mint); }
.verdict-button.needs { color: var(--peach-dark); }
.review-list { display: grid; gap: 6px; margin-top: 9px; }
.review-item { padding: 8px; border-radius: 7px; color: #66756c; background: #f4f6ef; font-size: 9px; line-height: 1.5; }
.review-item strong { color: var(--ink-soft); }
.review-item.needs-work { background: #fbf1e9; }
.room-footer { padding: 0 2px; color: #9aa39a; font-size: 9px; line-height: 1.5; }
.toast { position: fixed; z-index: 30; right: 22px; bottom: 22px; max-width: min(360px, calc(100vw - 44px)); padding: 11px 14px; border: 1px solid #d7e0c1; border-radius: 10px; color: #4f6631; background: #f8fbe9; box-shadow: var(--shadow); }
.toast.error { border-color: #f0d3c2; color: #9c4f3c; background: #fff8f3; }

@media (max-width: 1180px) {
  .workspace-grid { grid-template-columns: 230px minmax(0, 1fr); }
  .group-column { position: static; grid-column: 2; grid-template-columns: minmax(210px, .8fr) minmax(280px, 1.2fr); }
  .room-footer { align-self: center; }
}
@media (max-width: 760px) {
  .landing-shell { width: min(100% - 32px, 560px); }
  .topbar { height: 68px; }
  .landing-grid { grid-template-columns: 1fr; gap: 10px; padding: 27px 0 40px; }
  .hero-copy { padding: 19px 0 10px; }
  .hero-copy h1 { max-width: 470px; font-size: clamp(43px, 12vw, 61px); }
  .hero-lede { font-size: 14px; }
  .orbit { top: 4%; right: 0; width: 125px; height: 125px; opacity: .7; }
  .stats-row { margin-top: 25px; }
  .room-card { padding: 25px 21px; }
  .workspace { grid-template-rows: 62px 1fr; }
  .workspace-topbar { height: 62px; padding: 0 15px; }
  .workspace-grid { display: flex; flex-direction: column; padding: 14px 12px 30px; gap: 12px; }
  .sidebar { position: static; width: 100%; max-height: none; }
  .sidebar-top { padding: 13px; }
  .topic-list { max-height: 196px; }
  .theme-label { margin-top: 9px; }
  .lesson-column, .group-column { width: 100%; }
  .group-column { display: flex; flex-direction: column; }
  .outcome-card { padding: 22px 17px; }
  .outcome-card h1 { font-size: 30px; }
  .answer-box { min-height: 160px; }
  .answer-actions { align-items: flex-start; }
  .answer-actions-left { flex-wrap: wrap; }
  .room-chip { font-size: 9px; }
  .header-right { gap: 10px; }
  .workspace-brand .brand-name { display: none; }
  .keyboard-hint { display: none; }
}
