.muted { color: var(--muted); }
button.text-link { background: transparent; padding: 0; min-height: 36px; }
.account-link { display: inline-flex; gap: 8px; align-items: center; flex-shrink: 0; color: var(--navy); font-size: 14px; font-weight: 600; min-height: 44px; }
.account-link .icon { width: 18px; height: 18px; }
.topbar { gap: 18px; }
.search-box { min-width: 180px; }
.resource-progress { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 7px 15px; }
.resource-progress > div { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.track-button { background: transparent; color: var(--blue); padding: 7px 0; min-height: 40px; text-align: left; font-size: 13px; font-weight: 600; }
.track-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.pack-card > [data-progress-resource] > .track-button { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; width: 100%; }
.progress-mini { display: block; font-size: 13px; padding-top: 12px; }
.status-pill, .revisit-pill { font-size: 12px; line-height: 1.5; padding: 3px 8px; border-radius: 5px; color: #566579; background: #eef1f5; white-space: nowrap; }
.status-pill.completed { background: #e4f1eb; color: #205d4a; }
.status-pill.in_progress { background: #e7effa; color: #2b537f; }
.revisit-pill { color: #77551e; background: #faf0d9; }
.score-mini { font-size: 13px; color: var(--muted); }
.score-mini b { color: var(--ink); font-weight: 600; }
.paper-links [data-progress-resource] .resource-progress { margin-top: 10px; padding-top: 9px; }
.paper-links > [data-progress-resource] > .track-button { padding-bottom: 0; }
.progress-welcome { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 42px; max-width: 820px; margin-top: 6px; }
.progress-welcome-icon { background: var(--soft); color: var(--blue); border-radius: 12px; display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 22px; }
.progress-welcome-icon .icon { width: 28px; height: 28px; }
.progress-welcome h2 { font-size: 28px; letter-spacing: -.6px; line-height: 1.3; margin: 0 0 12px; color: var(--navy); }
.progress-welcome > p { color: var(--muted); max-width: 570px; }
.progress-benefits { display: flex; flex-wrap: wrap; gap: 14px 22px; margin: 25px 0 28px; font-size: 14px; }
.progress-benefits div { display: flex; align-items: center; gap: 8px; }
.progress-benefits .icon { color: var(--teal); width: 18px; height: 18px; }
.account-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.progress-welcome > .text-link { margin-top: 24px; }
.progress-page-heading { display: flex; gap: 16px; align-items: start; justify-content: space-between; }
.progress-page-heading > .text-link { margin-top: 12px; white-space: nowrap; }
.progress-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.progress-summary article { background: white; border: 1px solid var(--line); border-radius: 10px; padding: 19px 20px; }
.progress-summary article > span { display: block; color: var(--muted); font-size: 13px; font-weight: 550; }
.progress-summary article > strong { display: block; color: var(--navy); font-size: 34px; line-height: 1.4; margin: 9px 0 4px; letter-spacing: -.9px; font-weight: 700; font-variant-numeric: tabular-nums; }
.progress-summary small { font-size: 18px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.progress-summary p { font-size: 12px; color: var(--muted); margin: 0; }
.progress-summary .text-link { min-height: auto; font-size: 12px; text-align: left; }
.progress-explainer { color: var(--muted); font-size: 12px; margin: 12px 0 28px; }
.chapter-progress-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.chapter-progress-card { border: 1px solid var(--line); border-radius: 9px; background: white; padding: 18px 20px; }
.chapter-progress-card:hover { border-color: #8ea8ca; }
.chapter-progress-card > div { display: flex; align-items: baseline; gap: 12px; justify-content: space-between; }
.chapter-progress-card h3 { margin: 0 0 14px; font-size: 17px; font-weight: 650; }
.chapter-progress-card span { font-size: 13px; color: var(--muted); white-space: nowrap; }
.chapter-progress-card progress { appearance: none; border: 0; border-radius: 10px; overflow: hidden; height: 6px; width: 100%; display: block; background: #e7edf4; }
.chapter-progress-card progress::-webkit-progress-bar { background: #e7edf4; }
.chapter-progress-card progress::-webkit-progress-value { background: #39806e; border-radius: 10px; }
.chapter-progress-card progress::-moz-progress-bar { background: #39806e; }
.chapter-progress-card p { margin: 11px 0 0; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.chapter-progress-card p .icon { width: 15px; height: 15px; color: var(--blue); }
.progress-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 15px; align-items: center; margin: 18px 0; }
.progress-filter { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.progress-filter select { min-height: 44px; border: 1px solid #becde0; background: white; border-radius: 6px; padding: 8px 10px; color: var(--ink); }
.progress-resource-list, .attempt-list { border: 1px solid var(--line); border-radius: 10px; background: white; overflow: hidden; }
.progress-resource { display: flex; gap: 20px; align-items: center; padding: 20px; border-bottom: 1px solid var(--line); }
.progress-resource:last-child, .attempt-row:last-child { border-bottom: 0; }
.progress-resource-info { flex: 1; min-width: 0; }
.progress-resource-info h3 { margin: 0 0 4px; font-size: 16px; font-weight: 650; line-height: 1.5; }
.progress-resource-info a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.progress-resource-info p { margin: 0; font-size: 13px; color: var(--muted); }
.progress-labels { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.resource-scores { display: flex; flex-shrink: 0; gap: 22px; text-align: center; }
.resource-scores > span { min-width: 60px; font-size: 11px; color: var(--muted); }
.resource-scores strong { display: block; font-size: 20px; color: var(--navy); font-weight: 650; line-height: 1.4; }
.resource-scores small { font-size: 11px; display: block; }
.progress-resource > .pack-button { font-size: 13px; min-width: 120px; }
.progress-sync { font-size: 12px; color: var(--muted); margin-top: 18px; }
.progress-empty { padding: 35px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.progress-empty h2 { font-size: 20px; margin: 0 0 6px; }
.progress-empty p { color: var(--muted); margin: 0; }
.progress-error { padding: 14px 16px; border: 1px solid #e5b9b4; background: #fff4f2; color: #8c3930; border-radius: 7px; margin-bottom: 20px; font-size: 14px; }
.progress-error button { color: #8c3930; text-decoration: underline; margin-left: 5px; }
.progress-toast { position: fixed; z-index: 100; bottom: 24px; left: calc(50% + var(--sidebar) / 2); transform: translateX(-50%); background: var(--navy); color: white; padding: 13px 22px; border-radius: 8px; box-shadow: 0 6px 28px #13274033; max-width: calc(100vw - 32px); width: max-content; font-size: 14px; }
.account-layout { display: grid; grid-template-columns: 1fr minmax(320px,430px); gap: 45px; align-items: start; max-width: 1040px; margin: 28px auto; }
.account-intro { padding-top: 18px; }
.account-intro h1 { font-size: 38px; letter-spacing: -1.1px; line-height: 1.2; color: var(--navy); margin: 0 0 16px; }
.account-intro > p { color: var(--muted); margin: 0; max-width: 370px; }
.account-intro-note { display: flex; gap: 12px; align-items: start; margin-top: 32px; font-size: 13px; color: var(--muted); line-height: 1.8; }
.account-intro-note .icon { color: var(--teal); margin-top: 3px; }
.account-card { padding: 30px; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 3px 15px #25385008; max-width: 540px; }
.account-card h2 { color: var(--navy); font-size: 25px; margin: 14px 0 8px; }
.account-avatar { display: grid; place-items: center; width: 50px; height: 50px; color: var(--blue); background: var(--soft); border-radius: 50%; }
.account-avatar .icon { width: 25px; height: 25px; }
.account-email { color: var(--muted); overflow-wrap: anywhere; margin: 0 0 22px; }
.account-card label, .score-dialog form > label, .form-grid > label, .completion-details label { display: block; font-size: 14px; font-weight: 550; color: var(--ink); margin-bottom: 16px; }
.account-card input, .score-dialog input:not([type="checkbox"]), .score-dialog textarea, .score-dialog select { width: 100%; color: var(--ink); border: 1px solid #bacadd; border-radius: 6px; background: #fcfdff; padding: 11px 12px; min-height: 46px; font-size: 15px; display: block; margin-top: 6px; font-weight: 400; }
.score-dialog textarea { resize: vertical; font: inherit; line-height: 1.6; }
.account-card input:focus-visible, .score-dialog input:focus-visible, .score-dialog textarea:focus-visible, .score-dialog select:focus-visible { outline: 2px solid #4c79af; outline-offset: 2px; }
.account-notice { color: #235a4d; background: #ecf6f1; border: 1px solid #c3dfd3; border-radius: 7px; padding: 14px 16px; font-size: 14px; margin: 0 0 20px; }
.account-privacy { font-size: 12px; color: var(--muted); line-height: 1.8; padding-top: 20px; border-top: 1px solid var(--line); margin: 22px 0 0; }
.account-bottom-actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px 20px; }
.auth-submit { width: 100%; margin-top: 4px; }
.auth-footer { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 7px; font-size: 13px; margin-top: 23px; color: var(--muted); }
.auth-footer .text-link { font-size: 13px; }
.forgot-password { flex-basis: 100%; justify-content: center; margin-top: 10px; }
.field-hint { color: var(--muted); font-size: 12px; margin: -9px 0 16px; }
.google-button { min-height: 46px; display: flex; justify-content: center; align-items: center; gap: 12px; font-size: 14px; font-weight: 550; color: var(--ink); background: white; border: 1px solid #bdcadd; border-radius: 6px; width: 100%; }
.google-button:hover { background: var(--subtle); }
.google-button svg { width: 19px; height: 19px; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 23px 0; }
.auth-divider::before, .auth-divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }
.form-feedback { color: #973c31; font-size: 14px; margin: 12px 0; }
.form-feedback:empty { display: none; }
.score-dialog { padding: 0; width: min(700px,calc(100% - 32px)); max-height: calc(100dvh - 48px); border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: white; box-shadow: 0 12px 65px #10223d45; }
.score-dialog::backdrop { background: #172d4a80; backdrop-filter: blur(2px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; padding: 26px 28px 15px; }
.dialog-heading .eyebrow { font-size: 11px; letter-spacing: .5px; }
.dialog-heading h2 { margin: 7px 0 0; font-size: 25px; color: var(--navy); letter-spacing: -.5px; line-height: 1.3; }
.dialog-close { background: var(--subtle); color: var(--muted); border-radius: 6px; width: 40px; height: 40px; font-size: 27px; line-height: 1; flex-shrink: 0; }
.dialog-pdf-links { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0 28px 20px; border-bottom: 1px solid var(--line); }
.dialog-pdf-links .text-link { font-size: 13px; min-height: 32px; }
.score-dialog-body { padding: 23px 28px 28px; }
.score-dialog-body h3 { font-size: 17px; margin: 0; }
.form-description { font-size: 13px; margin: 5px 0 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid > label { min-width: 0; margin: 0; }
.marks-input { display: flex; border: 1px solid #bacadd; border-radius: 6px; background: #fcfdff; margin-top: 6px; align-items: center; padding-right: 12px; }
.marks-input input { border: 0 !important; background: transparent !important; margin-top: 0 !important; width: 100%; min-width: 0; }
.marks-input span { font-weight: 400; color: var(--muted); white-space: nowrap; font-size: 15px; }
.score-preview { font-size: 13px; color: var(--blue); margin: 7px 0 18px; min-height: 21px; }
.optional { font-weight: 400; color: var(--muted); font-size: 12px; }
.score-dialog label.check-label { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 400; margin: 17px 0; }
.check-label input { width: 18px; height: 18px; accent-color: var(--navy); flex-shrink: 0; }
.completion-details { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; margin-top: 25px; }
.completion-details summary { cursor: pointer; color: var(--blue); font-size: 13px; min-height: 24px; }
.completion-details form { margin-top: 18px; }
.dialog-history .section-title { margin: 22px 0 12px; align-items: baseline; }
.attempt-row { display: flex; gap: 16px; padding: 18px 20px; align-items: start; border-bottom: 1px solid var(--line); }
.attempt-row > div:first-child { flex: 1; min-width: 0; }
.attempt-row h3 { font-size: 15px; margin: 0 0 4px; line-height: 1.5; font-weight: 600; }
.attempt-row p { font-size: 12px; color: var(--muted); margin: 0; }
.attempt-row p.attempt-note { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; margin-top: 8px; color: var(--ink); }
.attempt-score { white-space: nowrap; text-align: right; font-size: 16px; color: var(--navy); }
.attempt-score b { font-weight: 650; }
.attempt-score > span { display: block; font-size: 12px; color: var(--muted); }
.attempt-actions { display: flex; gap: 7px 13px; flex-wrap: wrap; }
.attempt-actions .text-link { min-height: 32px; font-size: 12px; }
.delete-link { color: #93483e; }
.delete-confirm { width: 100%; }
.delete-confirm p { margin-bottom: 12px; font-size: 14px; color: var(--ink); }
.delete-confirm button { font-size: 13px; margin-right: 8px; }
.danger-button { background: #8f3e35; border-color: #8f3e35; }
.danger-button:hover { background: #753229; }
@media (max-width: 1150px) {
  .topbar { flex-wrap: wrap; gap: 10px 18px; }
  .breadcrumb { flex: 1; }
  .search-box { order: 3; max-width: none; width: 100%; }
  .progress-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .account-layout { grid-template-columns: 1fr; gap: 25px; max-width: 540px; margin: 0 auto; }
  .account-intro { padding-top: 0; }
  .account-intro > p { max-width: none; }
  .account-intro-note { margin-top: 16px; }
  .account-card { max-width: none; }
  .progress-resource { flex-wrap: wrap; gap: 14px; }
  .progress-resource-info { flex-basis: calc(100% - 200px); }
  .progress-resource > .pack-button { margin-left: auto; }
}
@media (max-width: 800px) {
  .mobile-brand { margin-right: auto; }
  .search-box { order: 3; }
  .account-link { margin-left: auto; }
  .mobile-nav { justify-content: flex-start; gap: 4px; }
  .mobile-nav a { padding-inline: 10px; }
}
@media (max-width: 600px) {
  .progress-welcome { padding: 26px; }
  .progress-welcome h2 { font-size: 25px; }
  .progress-benefits { flex-direction: column; gap: 12px; }
  .progress-page-heading { flex-wrap: wrap; }
  .progress-page-heading > .text-link { margin-top: 0; }
  .progress-summary { gap: 10px; }
  .progress-summary article { padding: 15px; }
  .progress-summary article > span { font-size: 12px; }
  .progress-summary article > strong { font-size: 31px; }
  .progress-summary p, .progress-summary .text-link { font-size: 11px; }
  .chapter-progress-grid { grid-template-columns: 1fr; }
  .progress-toolbar .segmented { width: 100%; }
  .progress-toolbar .segmented button { flex: 1; padding-inline: 7px; font-size: 12px; }
  .progress-filter { width: 100%; }
  .progress-filter select { flex: 1; }
  .progress-resource { padding: 18px 16px; }
  .progress-resource-info { flex-basis: 100%; }
  .resource-scores { gap: 20px; text-align: left; }
  .resource-scores > span { min-width: 50px; }
  .progress-resource > .pack-button { min-width: auto; }
  .progress-sync { font-size: 11px; }
  .progress-empty { padding: 25px; }
  .account-intro h1 { font-size: 32px; }
  .account-intro-note { font-size: 12px; }
  .account-card { padding: 24px; }
  .score-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 24px); }
  .dialog-heading { padding: 22px 20px 12px; gap: 10px; }
  .dialog-heading h2 { font-size: 22px; }
  .dialog-pdf-links { padding-inline: 20px; gap: 5px 16px; }
  .score-dialog-body { padding: 20px; }
  .form-grid { grid-template-columns: 1fr; gap: 15px; }
  .score-preview { margin-top: 9px; }
  .score-dialog input:not([type="checkbox"]), .score-dialog textarea, .score-dialog select, .account-card input { font-size: 16px; }
  .attempt-row { flex-wrap: wrap; padding: 16px; gap: 9px 12px; }
  .attempt-actions { flex-basis: 100%; justify-content: end; }
  .attempt-actions .text-link { min-height: 36px; font-size: 13px; }
  .progress-toast { bottom: 18px; font-size: 13px; padding: 12px 16px; }
}
