/* Application workspace: LUMINA's violet palette with explicit status colours. */
.app-main { padding: 36px 0 64px; }
.app-main h1 { font-size: clamp(2rem, 3.8vw, 3.4rem); letter-spacing: -.035em; line-height: 1.15; margin: 0 0 16px; }
.app-main h2 { font-size: 1.55rem; line-height: 1.3; margin: 0 0 14px; }
.app-main h3 { font-size: 1.05rem; line-height: 1.4; margin: 0 0 10px; }
.app-main p { margin-top: 0; }
.app-main .eyebrow { margin-bottom: 12px; }
.app-lead { color: var(--muted); max-width: 770px; margin: 0; }
.overview-heading, .workspace-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; }
.overview-count { border-left: 1px solid var(--line); padding-left: 28px; min-width: 190px; color: var(--muted); }
.overview-count strong { display: block; color: var(--accent); font-size: 4rem; line-height: 1; font-weight: 400; }
.overview-count span { display: block; font-size: .875rem; margin-top: 10px; }
.build-badge { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; color: #FFE1A0; background: #4A3219; border: 1px solid #A77D3A; border-radius: 6px; padding: 5px 10px; font-size: .875rem; font-weight: 600; }
.development-bar { display: flex; align-items: center; gap: 18px; padding: 16px 20px; margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.development-bar p { margin: 0; color: var(--muted); }
.access-line { display: flex; gap: 10px; margin: 18px 0 34px; color: var(--muted); font-size: .875rem; }
.access-line p { margin: 0; }
.methodology-list { list-style: none; padding: 0; margin: 0; }
.method-stage { display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 24px; position: relative; padding-bottom: 22px; }
.method-stage::before { content: ''; position: absolute; width: 1px; background: var(--line); top: 54px; bottom: 0; left: 27px; }
.method-stage:last-child::before { display: none; }
.stage-number { width: 56px; height: 56px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); background: var(--surface-deep); font-size: 1.25rem; }
.method-stage article { min-width: 0; padding: 25px 28px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; }
.method-stage.available article { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.stage-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.stage-heading h2, .stage-heading h3 { margin: 0; }
.method-stage article > p, .substage > p { color: var(--muted); }
.stage-output { margin-bottom: 0; }
.stage-output strong { color: var(--accent); margin-right: 8px; font-weight: 600; }
.substage { padding: 20px; background: var(--surface-deep); border: 1px solid var(--line); border-left: 3px solid var(--accent); margin-top: 22px; border-radius: 6px; }
.stage-action { margin-top: 22px; }
.availability { color: var(--muted); font-size: .875rem; }
.app-button, .app-secondary, .app-quiet { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border-radius: 6px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.app-button { background: var(--accent); color: var(--surface-deep); border: 1px solid var(--accent); }
.app-button:hover { color: var(--surface-deep); background: var(--accent-hover); }
.app-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.app-secondary:hover { border-color: var(--accent); color: var(--text); }
.app-quiet { background: transparent; color: var(--accent); border: 1px solid transparent; padding-inline: 6px; }
.app-quiet:hover { text-decoration: underline; }
.app-main button:disabled { opacity: .45; cursor: not-allowed; }
.app-main button, .app-main a { touch-action: manipulation; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; color: var(--muted); font-size: .875rem; margin-bottom: 22px; }
.breadcrumb a { min-height: 30px; display: inline-flex; align-items: center; }
.workspace-heading h1 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); }
.workspace-note { color: var(--muted); font-size: .875rem; margin: 14px 0 24px; }
.stepper { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); list-style: none; margin: 0 0 24px; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.stepper li { min-width: 0; }
.stepper button { display: flex; align-items: center; gap: 9px; width: 100%; height: 100%; text-align: left; min-height: 72px; padding: 14px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: .875rem; cursor: pointer; }
.stepper li:last-child button { border-right: 0; }
.stepper button[aria-current='step'] { color: var(--text); background: #48226F; box-shadow: inset 0 -3px var(--accent); }
.stepper .step-index { flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; width: 26px; height: 26px; border: 1px solid var(--line); color: var(--accent); }
.stepper .complete .step-index { color: #C0F5D9; border-color: #70B79B; }
.workspace-grid { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 24px; align-items: start; }
.work-panel, .study-panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 26px; scroll-margin-top: 126px; }
.study-panel { position: sticky; top: 126px; padding: 22px; }
.study-panel h2 { font-size: 1.15rem; }
.study-panel .summary-main { font-size: 1.15rem; color: var(--text); line-height: 1.5; }
.study-panel .summary-label { font-size: .875rem; color: var(--accent); margin: 18px 0 6px; }
.study-panel ul { padding-left: 18px; color: var(--muted); margin: 6px 0; }
.study-panel li { margin-bottom: 6px; overflow-wrap: anywhere; }
.study-panel .storage-note { border-top: 1px solid var(--line); padding-top: 16px; margin: 20px 0 0; font-size: .875rem; color: var(--muted); }
.panel-intro { color: var(--muted); margin-bottom: 24px; }
.app-main label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 7px; }
.app-main input:not([type='checkbox']), .app-main textarea, .app-main select { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 6px; background: var(--surface-deep); font-size: 1rem; }
.app-main textarea { resize: vertical; line-height: 1.55; min-height: 88px; }
.app-main .field { min-width: 0; margin-bottom: 20px; }
.field-help { color: var(--muted); font-size: .875rem; margin: 6px 0 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.topic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 22px; }
.topic-card { min-width: 0; display: block; padding: 18px; text-align: left; border: 1px solid var(--line); background: var(--surface-deep); border-radius: 7px; color: var(--text); cursor: pointer; font: inherit; }
.topic-card:hover, .topic-card[aria-pressed='true'] { border-color: var(--accent); background: #38205A; }
.topic-card strong { display: block; font-size: 1rem; margin: 4px 0 8px; }
.topic-card span { display: block; color: var(--muted); font-size: .875rem; }
.topic-card .topic-field { color: var(--accent); font-size: .875rem; }
.chosen-main { padding: 20px; border: 1px solid var(--accent); border-radius: 7px; margin-top: 20px; background: var(--surface-deep); }
.chosen-main .field { margin-bottom: 0; }
.chosen-main .meaning { margin-top: 12px; }
.step-actions { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 28px; }
.topic-editor, .vocab-group { border: 1px solid var(--line); background: var(--surface-deep); border-radius: 7px; padding: 20px; margin-bottom: 18px; }
.topic-editor .field-row { grid-template-columns: minmax(0,1fr) 150px; }
.topic-editor .field { margin-bottom: 10px; }
.topic-editor .editor-actions { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.check-label { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: 1rem !important; margin: 16px 0 0 !important; cursor: pointer; }
.check-label input { margin: 5px 0 0; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--accent); }
.vocab-group .group-header { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 18px; }
.vocab-group .group-header h3 { margin: 0; font-size: 1.15rem; }
.small-label { font-size: .875rem; color: var(--accent); }
.notice, .inline-error, .saved-notice { padding: 16px 18px; border-radius: 6px; margin-bottom: 20px; background: var(--surface-deep); border: 1px solid var(--line); color: var(--muted); }
.inline-error { color: #FFD5DD; background: #542238; border-color: #D2819C; }
.saved-notice { color: #CBF6DE; background: #153F36; border-color: #70B79B; }
.saved-notice p:last-child, .notice p:last-child { margin-bottom: 0; }
.notice.warning { background: #44301D; border-color: #A77D3A; color: #FFE1A0; }
.status-message:empty { display: none; }
.review-group { padding: 18px 0; border-top: 1px solid var(--line); }
.review-group h3 { font-size: 1.1rem; }
.review-group dl { margin: 0; }
.review-group dt { color: var(--accent); font-size: .875rem; margin-top: 12px; }
.review-group dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.review-message-list { padding-left: 20px; margin-bottom: 0; }
.final-consent { padding: 18px; border: 1px solid var(--accent); border-radius: 6px; background: var(--surface-deep); margin-top: 20px !important; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.resume-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.resume-bar p { margin: 0; color: var(--muted); }
.empty-catalogue { grid-column: 1 / -1; }
[hidden] { display: none !important; }
@media (max-width: 1100px) { .workspace-grid { grid-template-columns: minmax(0,1fr) 240px; gap: 18px; } .workspace-heading { display: block; } .workspace-heading .build-badge { margin-top: 14px; } }
@media (max-width: 850px) { .workspace-grid { grid-template-columns: 1fr; } .study-panel { position: static; } .stepper button { display: block; padding: 12px 9px; } .stepper .step-index { margin-bottom: 6px; } .overview-count { display: none; } }
@media (max-width: 600px) {
  .app-main { padding-top: 25px; } .stage-heading { flex-direction: column; gap: 12px; }
  .development-bar { display: block; } .development-bar p { margin-top: 12px; }
  .method-stage { grid-template-columns: 36px minmax(0,1fr); gap: 12px; } .stage-number { width: 36px; height: 36px; font-size: 1rem; } .method-stage::before { left: 17px; top: 36px; }
  .method-stage article { padding: 20px 16px; } .substage { padding: 16px; }
  .work-panel, .study-panel { padding: 20px 16px; } .topic-grid, .field-row, .topic-editor .field-row { grid-template-columns: 1fr; }
  .stepper { grid-template-columns: repeat(5,minmax(0,1fr)); } .stepper button { font-size: .875rem; padding: 10px 5px; overflow-wrap: anywhere; min-height: 94px; }
  .topic-editor, .vocab-group { padding: 16px; } .topic-editor .editor-actions { flex-wrap: wrap; } .step-actions > .app-button { flex: 1; }
}
