:root { --ink: #1f2925; --muted: #6a756f; --line: #dce3dd; --paper: #f5f7f2; --card: #fffefb; --green: #247b58; --accent: #e1703e; --shadow: 0 20px 60px rgba(32, 47, 39, .08); }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: 'DM Sans', system-ui, sans-serif; font-size: 16px; line-height: 1.5; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.page-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 24px 0; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: white; background: var(--green); border-radius: 9px; font-size: 12px; }
.course-tag, .label, .eyebrow, .message-label, .live-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.course-tag { color: var(--muted); }
main { flex: 1; }
.auth-layout { width: min(1180px, calc(100% - 48px)); margin: 0 auto; min-height: calc(100vh - 147px); display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 100px; padding: 64px 0 80px; }
.eyebrow { color: var(--green); margin: 0 0 18px; }
h1, h2 { font-family: 'Space Grotesk', sans-serif; letter-spacing: -.05em; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(44px, 6vw, 76px); }
h1 em { color: var(--accent); font-style: normal; }
.intro-copy { max-width: 500px; margin: 28px 0 40px; color: var(--muted); font-size: 18px; }
.rule-list { display: grid; gap: 12px; max-width: 420px; }
.rule-list div { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.rule-number { color: var(--green); font-family: 'Space Grotesk', sans-serif; font-weight: 700; }
.auth-card, .request-slot { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.auth-card { padding: 34px; }
.card-heading { display: flex; align-items: center; gap: 8px; color: var(--green); font-size: 12px; font-weight: 700; margin-bottom: 42px; }
.status-dot, .live-dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; display: inline-block; }
.auth-card h2 { font-size: 30px; margin-bottom: 10px; }
.muted { color: var(--muted); font-size: 14px; }
.form-stack { margin-top: 28px; }
label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 9px; }
.input-row { display: flex; gap: 8px; }
input, textarea { width: 100%; color: var(--ink); background: #fafbf8; border: 1px solid var(--line); border-radius: 9px; outline: none; transition: border-color .2s, box-shadow .2s; }
input { min-width: 0; height: 48px; padding: 0 14px; }
textarea { min-height: 180px; padding: 15px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(36, 123, 88, .13); }
input[readonly] { color: #53645b; background: #edf2ed; cursor: default; }
.auth-card .form-stack { display: grid; gap: 9px; }
.auth-card .form-stack label:not(:first-child) { margin-top: 9px; }
.login-button { width: 100%; margin-top: 12px; }
.auth-card .code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.auth-card .code-row .button { padding: 0 12px; font-size: 13px; }
.button { border: 0; border-radius: 9px; min-height: 44px; padding: 0 18px; font-weight: 700; white-space: nowrap; transition: transform .2s, background .2s; }
.button:hover { transform: translateY(-1px); }.button:active { transform: translateY(0); }
.button-dark { color: white; background: var(--ink); }.button-dark:hover { background: #35413b; }
.button-accent { color: white; background: #b54c24; }.button-accent:hover { background: #923d1d; }
.button-ghost { color: var(--ink); background: transparent; border: 1px solid var(--line); }.button-ghost:hover { background: white; }
.form-message { min-height: 22px; margin: 8px 0 0; font-size: 13px; }.error { color: #b83e34; }.form-hint { margin: 9px 0 0; color: var(--green); font-size: 13px; }.text-button { margin-top: 16px; padding: 0; border: 0; color: var(--muted); background: none; text-decoration: underline; font-size: 13px; }
.hidden { display: none !important; }
.app-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.request-slots { display: grid; gap: 24px; }
.request-slot { padding: 38px; min-width: 0; }
.request-slot.is-complete { border-color: #c8ddce; }
.slot-pending .eyebrow { font-size: 13px; margin: 0 0 16px; }
.slot-pending h2 { font-size: 30px; line-height: 1.15; }
.slot-record-title { font-size: 30px; line-height: 1.15; margin-top: 12px; }
.slot-description { color: var(--muted); margin: 12px 0 28px; }
.request-form { max-width: 760px; }
.slot-locked { color: var(--green); font-size: 13px; margin: 12px 0 0; }
.request-slot textarea:disabled { background: #f0f3ef; color: var(--muted); cursor: not-allowed; }
.request-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 24px; }
.request-title { margin: 0; font-size: 20px; }
.protocol-note { color: var(--muted); font-size: 14px; margin: 24px 0 0; }
.auth-layout > *, .app-header > *, .identity-strip > div, .message-row > div { min-width: 0; }
.app-layout { width: min(960px, calc(100% - 48px)); margin: 0 auto; padding: 64px 0 90px; }
.app-header { display: flex; align-items: end; justify-content: space-between; margin-bottom: 36px; }.app-header h1 { font-size: 48px; }.app-header .eyebrow { margin-bottom: 14px; }
.identity-strip { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 20px; padding: 20px 24px; background: #e7eee8; border-radius: 12px; margin-bottom: 24px; }.identity-strip > div { display: flex; flex-direction: column; gap: 4px; }.identity-strip strong { font-size: 15px; }.identity-strip .quota { text-align: right; }.identity-strip .quota strong { color: var(--green); }
.empty-icon { display: grid; place-items: center; width: 40px; height: 40px; color: white; background: var(--green); border-radius: 50%; font-family: 'Space Grotesk', sans-serif; font-size: 22px; margin-bottom: 22px; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; }.form-footer span { color: var(--muted); font-size: 12px; }
.live-label { display: flex; align-items: center; gap: 8px; color: var(--green); }.conversation { display: grid; gap: 28px; }.message-row { display: grid; grid-template-columns: 34px 1fr; gap: 14px; }.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--green); background: #e4f0e7; font-family: 'Space Grotesk', sans-serif; font-weight: 700; }.avatar-accent { color: white; background: var(--accent); }.message-label { display: block; color: var(--muted); margin: 3px 0 8px; }.message-row p { margin: 0; font-size: 16px; }.reply-row { padding-top: 26px; border-top: 1px solid var(--line); }.record-note { color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); padding-top: 20px; margin: 32px 0 0; }
footer { width: min(1180px, calc(100% - 48px)); margin: auto; padding: 20px 0; display: flex; justify-content: space-between; color: #8c9690; font-size: 12px; border-top: 1px solid var(--line); }
.toast { position: fixed; right: 24px; bottom: 24px; padding: 12px 16px; color: white; background: var(--ink); border-radius: 8px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s; font-size: 13px; }.toast.show { opacity: 1; transform: translateY(0); }
button:focus-visible, a:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }
button:disabled { opacity: .6; cursor: wait; transform: none; }
.identity-strip strong { overflow-wrap: anywhere; }
.message-row p { white-space: pre-wrap; overflow-wrap: anywhere; }
.label { color: #53645b; }
.text-button { min-height: 44px; }
footer { color: #64736a; }
dialog { color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 32px; width: min(520px, calc(100% - 32px)); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(22, 35, 27, .5); }
dialog h2 { font-size: 28px; line-height: 1.25; }
dialog p { color: var(--muted); }
.quota-warning { color: #b42318; font-weight: 700; margin: 16px 0 8px; }
dialog blockquote { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 200px; overflow: auto; margin: 24px 0; padding: 16px; border-left: 3px solid var(--green); background: #e7eee8; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; }
@media (max-width: 980px) and (min-width: 761px) { .auth-layout { grid-template-columns: minmax(0, 1fr); max-width: 620px; gap: 40px; }.auth-card { width: 100%; } }
@media (max-width: 760px) { .topbar, footer { width: min(100% - 32px, 560px); }.course-tag { display: none; }.auth-layout { width: min(100% - 32px, 560px); grid-template-columns: 1fr; gap: 40px; padding: 48px 0 64px; }.intro-copy { font-size: 16px; margin: 22px 0 28px; }.auth-card { padding: 26px; }.input-row { flex-direction: column; }.input-row .button { width: 100%; }.app-layout { width: min(100% - 32px, 560px); padding: 44px 0 64px; }.app-header { align-items: start; gap: 20px; }.app-header h1 { font-size: 38px; }.identity-strip { grid-template-columns: 1fr 1fr; }.identity-strip .quota { grid-column: 1 / -1; text-align: left; }.request-slot { padding: 26px 20px; }.form-footer { align-items: stretch; flex-direction: column; }.form-footer .button { width: 100%; } footer { gap: 10px; flex-direction: column; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
@media (max-width: 760px) {
  .topbar { padding: 16px 0; }
  .auth-layout { padding: 24px 0 40px; gap: 32px; min-height: auto; }
  .auth-card { order: -1; padding: 24px 20px; }
  .card-heading { margin-bottom: 20px; }
  .auth-card h2 { font-size: 28px; line-height: 1.15; }
  .auth-card .form-stack { margin-top: 20px; gap: 6px; }
  .auth-card .form-stack label { margin-bottom: 4px; }
  .auth-card .code-row { grid-template-columns: minmax(0, 1fr) 104px; }
  .auth-card .code-row .button { min-height: 48px; font-size: 14px; padding: 0 12px; }
  .intro-panel h1 { font-size: 36px; }
  .intro-copy { margin: 16px 0 24px; }
  .app-layout { padding: 28px 0 48px; }
  .app-header { flex-direction: column; align-items: stretch; gap: 20px; margin-bottom: 24px; }
  .app-header h1 { font-size: 36px; }
  .app-actions { justify-content: flex-start; }
  .app-actions .button { flex: 1; min-height: 48px; }
  .identity-strip { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 20px; }
  .identity-strip > div:first-child { order: 1; }
  .identity-strip > div:nth-child(2) { grid-column: 1 / -1; order: 3; }
  .identity-strip .quota { grid-column: auto; text-align: right; order: 2; }
  .label, .message-label, .live-label { font-size: 12px; letter-spacing: .06em; }
  .slot-pending h2, .slot-record-title { font-size: 28px; }
  input, textarea { font-size: 16px; }
  .form-footer .button { min-height: 48px; }
  dialog { padding: 24px 20px; max-height: calc(100dvh - 32px); overflow-y: auto; }
  .dialog-actions { flex-direction: column-reverse; gap: 8px; }
  .dialog-actions .button { width: 100%; min-height: 48px; }
  .toast { left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); text-align: center; }
}
