.ai-tutor-page { background: var(--paper); }
.ai-tutor-main { padding-top: 26px; scroll-margin-top: 112px; }
.at-course-tabs { display: flex; gap: 8px; padding: 5px; margin-bottom: 34px; background: #f0f2eb; border: 1px solid var(--line); border-radius: 8px; width: fit-content; max-width: 100%; }
.at-course-tabs button { padding: 11px 26px; min-height: 46px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--muted); font-size: 14px; }
.at-course-tabs button[aria-selected="true"] { background: var(--white); border-color: #dce1d5; color: var(--green); font-weight: 600; box-shadow: 0 2px 5px #24272405; }
.at-course-tabs button:hover { color: var(--ink); }
#tutor-app { outline: none; scroll-margin-top: 110px; }
.at-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px 0 30px; }
.at-kicker { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; color: var(--green); font-size: 12px; letter-spacing: .12em; }
.at-kicker span { padding: 3px 9px; border: 1px solid #d4dfca; border-radius: 4px; background: var(--green-soft); letter-spacing: .01em; }
.at-hero h1 { margin: 0 0 16px; font-size: clamp(32px, 4vw, 46px); font-weight: 500; }
.at-hero h1 em { color: var(--green); font-style: normal; }
.at-hero p { margin: 0; color: var(--muted); max-width: 640px; }
.at-orbit { flex-shrink: 0; width: 184px; height: 144px; }
.at-stats { display: flex; gap: 42px; padding: 21px 0 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.at-stats div { display: flex; align-items: baseline; gap: 9px; }
.at-stats strong { font-size: 22px; color: var(--green); font-weight: 500; }
.at-stats span { color: var(--muted); font-size: 13px; }
.at-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.at-section-heading h2 { margin: 0; font-size: 21px; font-weight: 500; }
.at-section-heading p { margin: 0; font-size: 13px; color: var(--muted); }
.at-unit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.at-unit-card { display: flex; flex-direction: column; align-items: stretch; min-height: 230px; padding: 24px; border: 1px solid #dee3d7; border-radius: 8px; background: var(--white); text-align: left; transition: border-color 160ms ease, transform 160ms ease; }
.at-unit-card:hover { border-color: #9aaa8c; transform: translateY(-2px); }
.at-unit-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 19px; }
.at-unit-number { color: var(--green); font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.at-unit-arrow { display: grid; place-items: center; width: 29px; height: 29px; color: var(--green); background: var(--green-soft); border-radius: 50%; font-size: 19px; }
.at-unit-card h3 { margin: 0 0 6px; font-size: 21px; font-weight: 500; }
.at-unit-english { color: var(--muted); font-size: 12px; line-height: 1.5; margin-bottom: 22px; }
.at-unit-count { margin-top: auto; font-size: 12px; color: var(--muted); }
.at-unit-progress { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--green); font-size: 12px; }
.at-unit-progress progress { width: 65px; height: 4px; accent-color: #809571; }
.at-unit-progress progress::-webkit-progress-bar { border-radius: 3px; background: #e9ede4; }
.at-unit-progress progress::-webkit-progress-value { border-radius: 3px; background: #809571; }
.at-supplement { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; margin-top: 18px; padding: 22px 24px; border: 1px dashed #cbd5c1; border-radius: 8px; background: #f3f5ee; text-align: left; }
.at-supplement strong { display: block; font-size: 17px; font-weight: 500; margin: 5px 0; }
.at-supplement p { margin: 0; color: var(--muted); font-size: 12px; }
.at-resume { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 16px 20px; margin-bottom: 26px; border: 1px solid #dce4d2; border-radius: 6px; background: var(--green-soft); font-size: 14px; }
.at-text-button { border: 0; padding: 3px 0; background: transparent; color: var(--green); font-size: 14px; text-align: left; }
.at-text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.at-breadcrumb { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.at-breadcrumb span { color: var(--muted); font-size: 12px; }
.at-unit-heading { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.at-unit-heading h1 { margin: 4px 0 9px; font-size: clamp(25px, 3vw, 34px); font-weight: 500; }
.at-unit-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.at-point-layout { display: grid; grid-template-columns: 285px minmax(0, 1fr); gap: 28px; align-items: start; }
.at-point-sidebar { position: sticky; top: 115px; min-width: 0; }
.at-sidebar-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.at-sidebar-heading h2 { margin: 0; font-size: 15px; font-weight: 500; }
.at-sidebar-heading span { color: var(--muted); font-size: 12px; }
.at-point-list { max-height: min(690px, calc(100vh - 180px)); overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; }
.at-lesson-label { margin: 20px 0 8px; padding: 0 10px; color: var(--muted); font-size: 11px; font-weight: 500; }
.at-lesson-label:first-child { margin-top: 0; }
.at-point-link { display: grid; grid-template-columns: 25px minmax(0, 1fr) 7px; align-items: start; gap: 7px; width: 100%; padding: 10px; border: 1px solid transparent; border-radius: 5px; background: transparent; text-align: left; line-height: 1.5; font-size: 13px; }
.at-point-link[aria-current="step"] { background: var(--green-soft); border-color: #d3ddc9; color: #4f6344; }
.at-point-link:hover { background: #eef1e8; }
.at-point-link .at-point-code { color: var(--muted); font-size: 10px; padding-top: 2px; }
.at-dot { width: 6px; height: 6px; margin-top: 6px; background: #d5dacd; border-radius: 50%; }
.at-dot.passed { background: #809e6e; }.at-dot.review { background: #bd9862; }.at-dot.progress { background: #95a7a2; }
.at-point-picker { display: none; }
.at-workspace { min-width: 0; scroll-margin-top: 115px; }
.at-panel { padding: 30px; border: 1px solid #dce3d5; border-radius: 8px; background: var(--white); min-width: 0; }
.at-point-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; font-size: 12px; color: var(--muted); }
.at-point-meta span:first-child { color: var(--green); }
.at-panel h2 { margin: 0 0 23px; font-size: clamp(21px, 2.5vw, 26px); font-weight: 500; line-height: 1.45; }
.at-panel h3 { margin: 0 0 13px; font-size: 15px; font-weight: 600; }
.at-procedure { margin: 0 0 28px; padding-left: 23px; line-height: 1.85; font-size: 15px; }
.at-procedure li { padding-left: 4px; margin-bottom: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.at-procedure li::marker { color: var(--green); }
.at-errors { padding: 20px; margin: 0 0 24px; border: 1px solid #e7ddbd; border-radius: 6px; background: var(--yellow-soft); }
.at-errors h3 { color: #857347; }
.at-error-item + .at-error-item { margin-top: 15px; padding-top: 15px; border-top: 1px solid #e7ddbd; }
.at-error-item strong { display: block; margin-bottom: 4px; font-size: 14px; font-weight: 500; }
.at-error-item p { margin: 0; color: #796e57; font-size: 13px; line-height: 1.8; white-space: pre-wrap; }
.at-errors > p { margin: 0; color: #796e57; font-size: 13px; }
.at-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 23px; }
.at-quiz-count { font-size: 12px; color: var(--muted); }
.at-status { display: inline-block; padding: 3px 8px; border-radius: 4px; background: #eef1e9; color: #69765f; font-size: 11px; }
.at-status.review { color: #917342; background: var(--yellow-soft); }
.at-status.passed { color: #5a734d; background: #e9f1e2; }
.at-next-point { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 17px; padding: 0 2px; }
.at-next-point button { font-size: 12px; max-width: 48%; }
.at-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.at-quiz-progress { display: block; width: 100%; height: 4px; accent-color: #809571; margin: 0 0 22px; }
.at-quiz-progress::-webkit-progress-bar { background: #ecf0e6; border-radius: 4px; }.at-quiz-progress::-webkit-progress-value { background: #809571; border-radius: 4px; }
.at-stem { margin: 0 0 24px; font-size: 18px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.at-choices { display: grid; gap: 10px; }
.at-choice { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border: 1px solid #dee3d7; border-radius: 5px; font-size: 15px; line-height: 1.8; cursor: pointer; }
.at-choice:hover, .at-choice:has(input:checked) { border-color: #91a382; background: #f1f5ec; }
.at-choice input { flex: none; margin: 7px 0 0; accent-color: var(--green); width: 16px; height: 16px; }
.at-choice-letter { flex: none; color: var(--green); font-size: 13px; min-width: 13px; padding-top: 2px; }
.at-choice-text { min-width: 0; flex: 1; white-space: pre-wrap; overflow-wrap: anywhere; }
.at-choice-note { display: block; font-size: 12px; color: var(--green); margin-top: 4px; }
.at-choice.correct { border-color: #8ca67b; background: #edf3e7; cursor: default; }
.at-choice.wrong { border-color: #c3a370; background: #f9f2e6; cursor: default; }
.at-form fieldset:disabled .at-choice { cursor: default; }
.at-feedback { margin-top: 22px; padding: 18px 20px; border-left: 3px solid #8ca67b; border-radius: 4px; background: #edf3e7; }
.at-feedback.wrong, .at-feedback.skipped { background: var(--yellow-soft); border-color: #c3a370; }
.at-feedback h3 { margin-bottom: 8px; font-size: 15px; }.at-feedback p { margin: 8px 0 0; font-size: 14px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.at-feedback .at-repeat { font-size: 12px; color: var(--muted); }
.at-score { display: flex; align-items: baseline; gap: 13px; margin-bottom: 15px; }
.at-score strong { font-size: 48px; line-height: 1.3; font-weight: 500; color: var(--green); }
.at-score span { color: var(--muted); font-size: 14px; }
.at-result-note { color: var(--muted); font-size: 14px; margin: 0 0 20px; line-height: 1.85; }
.at-result-list { display: grid; gap: 10px; list-style: none; padding: 0; margin: 24px 0; }
.at-result-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.at-result-list li span:first-child { min-width: 0; }.at-result-list li span:last-child { flex-shrink: 0; color: var(--green); }
.at-result-list li.wrong span:last-child { color: #917342; }
.at-loading { padding: 80px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.at-empty { margin: 45px 0 85px; padding: 45px 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.at-empty h1 { font-size: 32px; margin: 14px 0; font-weight: 500; }.at-empty p { color: var(--muted); max-width: 570px; }
.at-error { padding: 16px 20px; margin: 0 0 20px; background: var(--yellow-soft); color: #826740; border: 1px solid #e3d6b4; border-radius: 5px; font-size: 14px; }
.at-storage-note { padding: 12px 16px; margin: 0 0 20px; border-radius: 5px; background: var(--yellow-soft); color: #826740; font-size: 13px; }
.at-footnote { margin: 36px 0 0; padding: 22px 0 0; text-align: center; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
@media (max-width: 1000px) {
  .at-point-layout { grid-template-columns: 245px minmax(0, 1fr); gap: 20px; }
  .at-unit-card { padding: 21px; }.at-panel { padding: 25px; }
}
@media (max-width: 760px) {
  .ai-tutor-main { padding-top: 18px; scroll-margin-top: 175px; }
  .at-course-tabs { width: 100%; gap: 3px; margin-bottom: 24px; }.at-course-tabs button { flex: 1; min-width: 0; padding: 9px 5px; font-size: 12px; }
  .at-hero { padding: 10px 0 25px; }.at-hero h1 { font-size: 31px; }.at-hero p { font-size: 14px; }.at-orbit { display: none; }
  .at-stats { gap: 0; justify-content: space-between; margin-bottom: 26px; }.at-stats div { flex-direction: column; gap: 2px; }.at-stats strong { font-size: 20px; }.at-stats span { font-size: 11px; }
  .at-section-heading { align-items: flex-start; flex-direction: column; gap: 7px; }.at-section-heading h2 { font-size: 19px; }
  .at-unit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }.at-unit-card { min-height: 220px; padding: 18px; }.at-unit-card h3 { font-size: 18px; }
  .at-unit-english { font-size: 11px; }.at-unit-number { font-size: 12px; }.at-unit-count { font-size: 11px; }
  .at-unit-progress { flex-wrap: wrap; gap: 7px; font-size: 11px; }.at-unit-progress progress { width: 100%; }
  .at-supplement { padding: 19px; }.at-supplement strong { font-size: 16px; }
  .at-point-layout { display: block; }.at-point-sidebar { position: static; margin-bottom: 17px; }.at-point-list, .at-sidebar-heading { display: none; }
  .at-point-picker { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }.at-point-picker select { width: 100%; min-width: 0; min-height: 46px; padding: 10px; border: 1px solid #d5decc; border-radius: 5px; background: var(--white); color: var(--ink); font-size: 14px; }
  .at-unit-heading { margin-bottom: 21px; }.at-unit-heading h1 { font-size: 25px; }.at-panel { padding: 23px 20px; }.at-panel h2 { font-size: 22px; }
  .at-stem { font-size: 17px; }.at-choice { padding: 12px; gap: 9px; font-size: 14px; }.at-errors { padding: 17px; }
  .at-next-point { align-items: flex-start; }.at-next-point button { font-size: 12px; }
  .at-breadcrumb { margin-bottom: 21px; }.at-resume { padding: 15px 17px; font-size: 13px; }
  .at-workspace, #tutor-app { scroll-margin-top: 170px; }
  .at-empty { padding: 29px 23px; }.at-empty h1 { font-size: 27px; }.at-empty p { font-size: 14px; }
}
@media (max-width: 390px) { .at-unit-grid { grid-template-columns: 1fr; }.at-unit-card { min-height: 195px; } }
@media (prefers-reduced-motion: reduce) { .at-unit-card { transition: none; }.at-unit-card:hover { transform: none; } }
.at-track-tabs { display:flex; flex-wrap:wrap; gap:.5rem; margin:0 0 1.25rem; }
.at-track-tabs[hidden] { display:none; }
.at-track-tabs button { border:1px solid #cbd4c4; border-radius:999px; padding:.55rem 1rem; background:#fff; color:#43533d; font:inherit; cursor:pointer; }
.at-track-tabs button[aria-pressed="true"] { background:#e5eddf; border-color:#718665; color:#243c20; font-weight:650; }
.at-track-tabs button:focus-visible { outline:2px solid #526e45; outline-offset:3px; }
