.hw-page { background: #fcfcf8; }
.hw-page mjx-container { max-width: 100%; overflow-x: auto; overflow-y: hidden; }
.hw-main { width: min(1200px, calc(100% - 64px)); padding-bottom: 72px; }
.hw-topline { display: flex; justify-content: space-between; align-items: center; padding: 24px 0 16px; gap: 16px; }
.hw-back { color: var(--muted); font-size: 13px; }
.hw-language { display: flex; border: 1px solid var(--line); border-radius: 6px; padding: 3px; background: white; }
.hw-language button { padding: 6px 11px; border: 0; background: none; border-radius: 4px; font-size: 12px; min-height: 34px; }
.hw-language button[aria-pressed="true"] { background: var(--green-soft); color: #42523c; }
.hw-heading { padding: 0 0 20px; }
.hw-heading .eyebrow { font-size: 11px; margin-bottom: 10px; }
.hw-heading h1 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 8px; letter-spacing: -.035em; }
.hw-heading h1 span { font-weight: 400; color: #687060; margin-left: 12px; }
.hw-heading > p:last-child { font-size: 14px; color: var(--muted); margin-bottom: 0; }
.hw-landing { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: white; }
.hw-welcome { background: #edf1e8; padding: 42px; display: flex; flex-direction: column; }
.hw-welcome h2 { font-size: 30px; max-width: 380px; margin-bottom: 24px; }
.hw-welcome p { color: #586251; font-size: 15px; max-width: 430px; }
.hw-numbers { display: flex; gap: 30px; margin: 20px 0 32px; }
.hw-numbers strong { display: block; color: #3b4935; font-size: 30px; font-weight: 500; line-height: 1.25; }
.hw-numbers span { font-size: 12px; color: #617056; }
.hw-walk { border-top: 1px solid #d3dccb; padding-top: 20px; color: #506048; display: grid; gap: 12px; font-size: 14px; }
.hw-walk p { margin: 0; }
.hw-form-wrap { padding: 36px 42px; }
.hw-form-wrap h2 { font-size: 23px; }
.hw-form { display: grid; gap: 17px; }
.hw-field { display: grid; gap: 6px; font-size: 13px; color: #535c4c; }
.hw-field input, .hw-field select, .hw-code { width: 100%; min-height: 46px; border: 1px solid #d4dacd; border-radius: 5px; padding: 9px 12px; background: white; color: var(--ink); }
.hw-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hw-small { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 10px 0; }
.hw-form .button { margin-top: 4px; }
.hw-recover { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 18px; font-size: 13px; }
.hw-recover summary { color: var(--green); }
.hw-recover form { margin-top: 16px; }
.hw-error { border: 1px solid #dcc0ac; background: #fbf0e8; padding: 16px 20px; margin-bottom: 20px; border-radius: 6px; font-size: 14px; }
.hw-error button { margin: 10px 10px 0 0; }
.hw-session { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; color: var(--muted); font-size: 12px; }
.hw-session-tools { display: flex; align-items: center; gap: 15px; }
.hw-text-button { border: 0; padding: 6px 0; font-size: 12px; background: transparent; color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.hw-resume-code { background: white; border: 1px solid var(--line); padding: 16px; border-radius: 6px; margin-bottom: 18px; }
.hw-resume-code .hw-code { max-width: 730px; font-size: 12px; font-family: monospace; }
.hw-progress { margin-bottom: 25px; }
.hw-progress-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); margin-bottom: 9px; }
.hw-progress progress { display: block; width: 100%; height: 5px; border: 0; border-radius: 5px; overflow: hidden; background: #e5e8e0; accent-color: #6c7e60; }
.hw-progress progress::-webkit-progress-bar { background: #e5e8e0; }
.hw-progress progress::-webkit-progress-value { background: #6c7e60; }
.hw-workspace { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr); align-items: start; gap: 28px; }
.hw-original { background: #f5f6f0; border: 1px solid #e2e6da; border-radius: 9px; padding: 28px; min-width: 0; position: sticky; top: 108px; max-height: calc(100vh - 132px); overflow: auto; }
.hw-original summary { list-style: none; }
.hw-original summary::-webkit-details-marker { display: none; }
.hw-original .hw-kicker { color: #6b785f; }
.hw-original h2 { font-size: 21px; margin: 6px 0 20px; }
.hw-stem { font-size: 15px; line-height: 1.85; }
.hw-stem p { margin-bottom: 16px; }
.hw-kicker { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.hw-original-choices { display: grid; gap: 11px; padding: 0; margin: 22px 0 0; list-style: none; }
.hw-original-choices li { display: flex; align-items: baseline; gap: 12px; font-size: 13px; line-height: 1.65; }
.hw-letter { font-family: ui-monospace, monospace; font-size: 12px; color: #6b755f; flex: 0 0 17px; }
.hw-diagram { margin: 18px 0; }
.hw-diagram img { display: block; width: 100%; height: auto; border-radius: 5px; }
.hw-part { padding: 14px 0; border-top: 1px solid #e0e5d8; font-size: 14px; line-height: 1.8; }
.hw-part.is-current { background: #e9eddf; margin: 0 -12px; padding: 14px 12px; border-radius: 4px; }
.hw-part strong { display: block; font-size: 12px; margin-bottom: 6px; color: #566447; }
.hw-part p { margin: 0; }
.hw-card { background: white; border: 1px solid var(--line); border-radius: 9px; padding: 30px; min-width: 0; }
.hw-card h2 { font-size: 25px; margin: 14px 0 12px; }
.hw-card h3 { font-size: 19px; }
.hw-step-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hw-chip { color: #647052; background: #f2f5ed; font-size: 11px; border-radius: 3px; padding: 3px 8px; letter-spacing: .025em; }
.hw-prompt { font-size: 20px; line-height: 1.65; margin: 24px 0; font-weight: 500; }
.hw-choices { padding: 0; border: 0; margin: 0 0 22px; min-width: 0; display: grid; gap: 10px; }
.hw-choice { display: flex; gap: 12px; align-items: flex-start; border: 1px solid #dde2d5; padding: 14px 15px; border-radius: 6px; cursor: pointer; min-height: 54px; font-size: 15px; line-height: 1.65; background: #fff; transition: border-color 120ms, background 120ms; }
.hw-choice:hover { background: #fafbf7; border-color: #9da991; }
.hw-choice:has(input:checked) { border-color: #6e805f; background: #f0f4e9; box-shadow: inset 3px 0 #6e805f; }
.hw-choice input { margin: 6px 0 0; flex: 0 0 15px; accent-color: #5e754b; }
.hw-choice:has(input:disabled) { cursor: default; }
.hw-choice.is-correct { border-color: #8fa77f; background: #f0f5eb; }
.hw-choice.is-wrong { border-color: #c29e86; background: #fcf5ef; }
.hw-choice.is-wrong:has(input:checked) { border-color: #bd967b; background: #fcf2e7; box-shadow: inset 3px 0 #bd967b; }
.hw-choice > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.hw-choice .hw-letter { padding-top: 1px; }
.hw-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 23px; }
.hw-actions .button { min-height: 46px; }
.hw-actions .button.primary, .hw-form .button.primary { background: #536548; border-color: #536548; }
.hw-actions .button.primary:hover, .hw-form .button.primary:hover { background: #405636; }
.button:disabled { opacity: .5; cursor: wait; }
.hw-feedback { margin-top: 22px; padding: 19px 21px; background: #f1f5ec; border-left: 3px solid #849c74; border-radius: 0 5px 5px 0; }
.hw-feedback.is-wrong { background: #fbf4ea; border-color: #b89c68; }
.hw-feedback h3 { font-size: 16px; margin-bottom: 10px; }
.hw-feedback p { font-size: 14px; line-height: 1.9; margin: 0; }
.hw-review { margin: 24px 0; }
.hw-review p { font-size: 16px; line-height: 1.95; }
.hw-pitfall { border-top: 1px solid var(--line); padding-top: 20px; color: #6d6047; }
.hw-pitfall strong { display: block; font-size: 12px; letter-spacing: .04em; margin-bottom: 8px; }
.hw-completion-title { color: #405b37; }
.hw-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 26px 0; }
.hw-metric { padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: #fafbf6; }
.hw-metric strong { display: block; font-size: 28px; font-weight: 500; line-height: 1.3; }
.hw-metric span { font-size: 11px; color: var(--muted); }
.hw-result-list { list-style: none; padding: 0; margin: 20px 0 0; }
.hw-result-list li { border-top: 1px solid var(--line); padding: 12px 0; display: flex; gap: 14px; justify-content: space-between; font-size: 13px; }
.hw-status { flex-shrink: 0; font-size: 11px; border-radius: 3px; padding: 2px 6px; align-self: start; background: #f0f4e9; color: #526946; }
.hw-status.unmastered { background: #f7eddb; color: #8b6334; }
.hw-status.in_progress, .hw-status.not_started { background: #f0f0ec; color: #73786b; }
.hw-report details { border-top: 1px solid var(--line); padding: 14px 0; }
.hw-report summary { font-size: 15px; font-weight: 500; }
.hw-save-note { color: var(--muted); font-size: 11px; margin-top: 18px; }
.hw-loading { padding: 42px 0; color: var(--muted); }
.hw-admin-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.hw-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: white; }
.hw-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 740px; }
.hw-table th, .hw-table td { text-align: left; border-bottom: 1px solid var(--line); padding: 13px 15px; white-space: nowrap; }
.hw-table th { font-weight: 500; color: var(--muted); background: #f5f7f0; }
.hw-table tr:last-child td { border-bottom: 0; }
.hw-admin-detail { margin-top: 28px; }
.hw-event { margin: 0 0 14px; padding: 12px 16px; border-left: 2px solid #d7dfce; background: #fafbf6; font-size: 13px; }
.hw-event p { margin-bottom: 5px; }
.hw-event small { color: var(--muted); }
.hw-share { font-size: 14px; overflow-wrap: anywhere; padding: 16px 20px; background: #edf2e6; border-radius: 6px; }
.hw-filter { max-width: 220px; }
@media (max-width: 820px) {
  .hw-main { width: min(660px, calc(100% - 32px)); }
  .hw-page .site-header { padding: 14px 16px; gap: 20px; }
  .hw-page .site-nav { gap: 17px; font-size: 12px; }
  .hw-page .brand { font-size: 14px; }
  .hw-page .brand-mark { width: 30px; height: 30px; }
  .hw-landing, .hw-workspace { grid-template-columns: 1fr; }
  .hw-welcome { padding: 28px; }
  .hw-form-wrap { padding: 28px; }
  .hw-welcome h2 { font-size: 25px; margin-bottom: 14px; }
  .hw-numbers { margin: 10px 0 20px; }
  .hw-original { position: static; max-height: none; padding: 22px; }
  .hw-original summary::after { content: 'Show / hide question'; display: block; font-size: 11px; color: var(--muted); margin-top: 8px; }
  .hw-original h2 { margin-bottom: 0; }
  .hw-original[open] summary { margin-bottom: 20px; }
  .hw-card { padding: 24px; }
  .hw-workspace { gap: 18px; }
  .hw-session { align-items: flex-start; flex-wrap: wrap; }
  .hw-prompt { font-size: 18px; }
}
@media (max-width: 440px) {
  .hw-heading h1 span { display: block; margin: 3px 0 0; }
  .hw-page .site-nav a[href="knowledge.html"] { display: none; }
  .hw-metrics { gap: 6px; }
  .hw-metric { padding: 10px; }
  .hw-metric strong { font-size: 25px; }
  .hw-card, .hw-original, .hw-form-wrap { padding: 20px; }
  .hw-actions { flex-direction: column; }
  .hw-actions .button { width: 100%; }
  .hw-progress-meta { flex-direction: column; gap: 3px; }
  .hw-choice { padding: 12px; gap: 9px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
