:root {
    --ink: #20252b;
    --muted: #6b737c;
    --soft: #f6f8f9;
    --line: #e3e8eb;
    --green: #2f7661;
    --green-dark: #245b4b;
    --green-soft: #e8f3ef;
    --amber: #986d2a;
    --amber-soft: #fff5df;
    --shadow: 0 10px 32px rgba(24, 42, 53, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #fbfcfc; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.coaching-page--login { min-height: 100vh; background: linear-gradient(140deg, #f8fbfa 0%, #fff 65%); }
.login-shell { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.login-card { width: min(100%, 440px); padding: 42px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.brand-mark { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 13px; color: #fff; background: var(--green); font-family: Georgia, serif; font-size: 27px; font-style: italic; }
.brand-mark--small { width: 36px; height: 36px; border-radius: 10px; font-size: 22px; }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: 11px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 11px; font-size: clamp(28px, 3vw, 38px); letter-spacing: -.035em; line-height: 1.1; }
h2 { margin-bottom: 4px; font-size: 22px; letter-spacing: -.02em; line-height: 1.2; }
h3 { margin: 8px 0 0; font-size: 18px; line-height: 1.3; }
.login-card .brand-mark { margin-bottom: 25px; }
.login-intro, .login-footnote { color: var(--muted); }
.login-intro { margin-bottom: 28px; }
.login-footnote { margin: 23px 0 0; font-size: 12px; line-height: 1.5; text-align: center; }

.app-shell { min-height: 100vh; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 0 clamp(20px, 4vw, 58px); border-bottom: 1px solid var(--line); background: #fff; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 11px; }
.topbar-actions, .publish-form, .editor-footer, .document-card-top, .page-heading, .section-heading, .document-status-row, .comparison-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.environment-note { color: var(--muted); font-size: 12px; }
.status-dot, .pill-dot { display: inline-block; width: 7px; height: 7px; border-radius: 99px; background: #68a58d; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 16px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 700; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.button:hover { transform: translateY(-1px); }
.button--primary { color: #fff; background: var(--green); }
.button--primary:hover { background: var(--green-dark); }
.button--secondary { color: var(--green-dark); border-color: #bed9ce; background: #f5faf8; }
.button--secondary:hover { background: var(--green-soft); }
.button--quiet { min-height: 32px; padding: 5px 9px; color: var(--muted); background: transparent; }
.button--quiet:hover { color: var(--ink); background: var(--soft); }
.button--full { width: 100%; }
.workspace { display: grid; grid-template-columns: 228px minmax(0, 1fr); max-width: 1500px; margin: 0 auto; }
.sidebar { min-height: calc(100vh - 73px); padding: 35px 18px; border-right: 1px solid var(--line); background: #fff; }
.sidebar-label { margin: 0 13px 12px; color: #9aa2a8; font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.main-nav { display: grid; gap: 3px; }
.nav-item { display: flex; align-items: center; gap: 11px; min-height: 41px; padding: 0 12px; border-radius: 8px; color: #59636a; font-size: 13px; font-weight: 650; }
.nav-item--active { color: var(--green-dark); background: var(--green-soft); }
.nav-item--disabled { cursor: default; opacity: .62; }
.nav-item em { margin-left: auto; color: #a8afb4; font-size: 9px; font-style: normal; font-weight: 650; }
.nav-icon { display: inline-grid; width: 18px; place-items: center; color: currentColor; font-size: 16px; font-weight: 400; }
.sidebar-note { margin: 54px 7px 0; padding: 15px; border: 1px solid #e5eee9; border-radius: 10px; background: #fbfdfc; color: var(--muted); font-size: 11px; line-height: 1.55; }
.sidebar-note p { margin-bottom: 0; }
.sidebar-note-title { margin-bottom: 6px !important; color: var(--ink); font-size: 11px; font-weight: 750; }
.content { width: min(100%, 1040px); padding: 51px clamp(22px, 5vw, 72px) 80px; }
.page-heading { align-items: flex-end; margin-bottom: 35px; }
.heading-copy { max-width: 620px; margin-bottom: 0; color: var(--muted); }
.status-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 48px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 3px 14px rgba(33, 49, 56, .03); }
.status-item { display: flex; align-items: center; gap: 11px; min-height: 64px; padding: 0 18px; border-right: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.status-item:last-child { border: 0; }
.status-number { color: var(--ink); font-size: 22px; font-weight: 750; }
.status-number--muted { color: var(--amber); }
.status-number--green { color: var(--green); }
.section-heading { align-items: flex-end; margin-bottom: 15px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.document-list { display: grid; gap: 15px; }
.document-card, .editor-card { border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 3px 15px rgba(33, 49, 56, .025); }
.document-card { padding: 24px; }
.document-status-row { justify-content: flex-start; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 5px; font-size: 10px; font-weight: 750; letter-spacing: .01em; }
.pill--published { color: var(--green-dark); background: var(--green-soft); }
.pill--draft { color: var(--amber); background: var(--amber-soft); }
.pill--draft .pill-dot { background: #c7963f; }
.text-button { color: var(--green-dark); font-size: 12px; font-weight: 750; white-space: nowrap; }
.text-button:hover { text-decoration: underline; }
.document-updated { margin: 8px 0 17px; color: #9aa1a6; font-size: 11px; }
.document-body { white-space: pre-wrap; color: #4d565d; font-size: 14px; line-height: 1.65; }
.comparison-box { margin-top: 20px; padding: 16px 18px; border-left: 3px solid var(--green); background: #f7fbf9; }
.comparison-heading { align-items: flex-start; }
.comparison-heading strong { display: block; margin-top: 2px; font-size: 13px; }
.comparison-label { color: var(--green); font-size: 10px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.comparison-label--draft { color: var(--amber); }
.comparison-box p { margin: 12px 0 0; white-space: pre-wrap; color: #56615c; font-size: 13px; }
.draft-callout { margin-top: 19px; padding: 11px 13px; border-radius: 6px; color: #876426; background: #fffaf0; font-size: 12px; }
.draft-callout strong { color: #775519; }
.publish-row { margin-top: 17px; padding-top: 16px; border-top: 1px solid var(--line); }
.publish-form { justify-content: flex-end; flex-wrap: wrap; }
.check-label { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.check-label input { margin: 2px 0 0; accent-color: var(--green); }
.empty-state { padding: 58px 26px; border: 1px dashed #cadbd4; border-radius: 12px; background: #fcfefd; text-align: center; }
.empty-icon { display: grid; width: 40px; height: 40px; place-items: center; margin: 0 auto 16px; border-radius: 50%; color: var(--green); background: var(--green-soft); font-size: 24px; font-weight: 300; }
.empty-state h3 { margin-bottom: 7px; }
.empty-state p { max-width: 430px; margin: 0 auto 20px; color: var(--muted); font-size: 13px; }
.editor-card { margin-top: 48px; padding: 26px; }
.section-heading--editor { align-items: flex-start; margin-bottom: 25px; }
.editor-form { display: grid; gap: 20px; }
.field { display: grid; gap: 7px; }
.field-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field-heading span { color: #9aa1a6; font-size: 10px; }
label { color: #384249; font-size: 12px; font-weight: 750; }
input[type="email"], input[type="password"], input[type="text"], textarea { width: 100%; padding: 11px 12px; border: 1px solid #d7dfe2; border-radius: 7px; outline: 0; color: var(--ink); background: #fff; font-size: 13px; transition: border-color .15s ease, box-shadow .15s ease; }
input:focus, textarea:focus { border-color: #78aa98; box-shadow: 0 0 0 3px rgba(78, 143, 117, .12); }
textarea { min-height: 160px; resize: vertical; line-height: 1.6; }
.editor-footer { align-items: center; padding-top: 2px; }
.editor-footer p { max-width: 620px; margin: 0; color: var(--muted); font-size: 11px; }
.info-icon { display: inline-grid; width: 15px; height: 15px; place-items: center; margin-right: 4px; border: 1px solid #9cbbae; border-radius: 50%; color: var(--green); font-size: 10px; font-weight: 750; }
.notice { margin-bottom: 22px; padding: 13px 15px; border-radius: 8px; font-size: 13px; }
.notice ul { margin: 7px 0 0; padding-left: 20px; }
.notice--success { border: 1px solid #cce4da; color: #27654f; background: #f0faf5; }
.notice--error { border: 1px solid #edd3d0; color: #93493f; background: #fff7f5; }
.stack-form { display: grid; gap: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.playground-content { max-width: 1180px; }
.back-link { display: inline-block; margin-bottom: 22px; color: var(--green-dark); font-size: 12px; font-weight: 750; }
.back-link:hover { text-decoration: underline; }
.playground-heading { align-items: flex-start; margin-bottom: 27px; }
.safe-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #cce4da; border-radius: 6px; color: var(--green-dark); background: #f5fbf8; font-size: 11px; font-weight: 700; white-space: nowrap; }
.playground-question, .correction-card { margin-bottom: 38px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 3px 15px rgba(33, 49, 56, .025); }
.playground-form { display: grid; gap: 14px; }
.playground-form textarea { min-height: 112px; }
.character-hint { color: #9aa1a6; font-size: 10px; }
.playground-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.form-note { max-width: 560px; margin: 0; color: var(--muted); font-size: 11px; }
.button-group { display: flex; flex-wrap: wrap; gap: 8px; }
.button:disabled { cursor: wait; opacity: .58; transform: none; }
.answer-section { margin-bottom: 38px; }
.answer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.answer-card { min-height: 245px; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.answer-card--draft { border-color: #eadfca; background: #fffdfa; }
.answer-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.answer-card h3 { margin-top: 3px; font-size: 17px; }
.answer-kicker { color: var(--green); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.answer-kicker--draft { color: var(--amber); }
.answer-state { color: #a0a7ab; font-size: 10px; font-weight: 700; text-align: right; }
.answer-state--loading { color: var(--amber); }
.answer-state--success { color: var(--green); }
.answer-state--error { color: #a14d42; }
.answer-content { padding: 19px 0 3px; }
.answer-placeholder, .answer-error { margin: 0; color: var(--muted); font-size: 13px; }
.answer-error { color: #a14d42; }
.answer-text { margin: 0; white-space: pre-wrap; color: #3f484e; font-size: 14px; line-height: 1.65; }
.source-block { padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.source-label { display: block; margin-bottom: 5px; color: #7c878d; font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.source-label--usage { margin-top: 12px; }
.source-block ul { margin: 0; padding-left: 17px; }
.source-block li { margin: 2px 0; }
.correction-card { border-color: #d7e7e0; background: #fbfefd; }
.correction-card[hidden] { display: none; }

@media (max-width: 780px) {
    .topbar { min-height: 64px; padding: 0 18px; }
    .environment-note { display: none; }
    .workspace { display: block; }
    .sidebar { min-height: auto; padding: 13px 13px 0; border-right: 0; border-bottom: 1px solid var(--line); }
    .sidebar-label, .sidebar-note { display: none; }
    .main-nav { display: flex; overflow-x: auto; gap: 3px; padding-bottom: 12px; }
    .nav-item { flex: 0 0 auto; min-height: 36px; padding: 0 10px; }
    .nav-item--disabled em { display: none; }
    .content { padding: 35px 18px 58px; }
    .page-heading { display: block; }
    .page-heading .button { margin-top: 19px; }
    .status-strip { grid-template-columns: 1fr; }
    .status-item { min-height: 52px; border-right: 0; border-bottom: 1px solid var(--line); }
    .status-item:last-child { border-bottom: 0; }
    .document-card, .editor-card { padding: 19px; }
    .document-card-top { align-items: flex-start; }
    .editor-footer, .publish-form { align-items: stretch; flex-direction: column; }
    .editor-footer .button, .publish-form .button { width: 100%; }
    .playground-actions { align-items: stretch; flex-direction: column; }
    .button-group { display: grid; grid-template-columns: 1fr; }
    .button-group .button { width: 100%; }
    .answer-grid { grid-template-columns: 1fr; }
    .safe-badge { margin-top: 17px; }
    .login-card { padding: 31px 24px; }
}
