:root {
  color-scheme: light;
  --paper: #faf8f3;
  --white: #fff;
  --ink: #15303b;
  --muted: #54656b;
  --teal: #137c74;
  --teal-dark: #0b625c;
  --focus: #9a5729;
  --line: #e4e1d9;
  --lavender: #eee9fb;
  --apricot: #f8e4d2;
  --mint: #e2f1eb;
  --danger: #a83232;
  --success: #176a4b;
  --shadow: 0 18px 52px rgb(21 48 59 / 8%);
  --radius: 22px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); line-height: 1.55; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
a { color: var(--teal-dark); text-underline-offset: .2em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { color: var(--ink); background: #f8d4b7; }

.skip-link { position: fixed; z-index: 30; top: 10px; left: 10px; padding: 12px 16px; transform: translateY(-160%); border-radius: 12px; color: var(--white); background: var(--ink); }
.skip-link:focus { transform: translateY(0); }
.site-header { position: sticky; z-index: 10; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 78px; padding: 12px clamp(20px, 5vw, 76px); border-bottom: 1px solid rgb(21 48 59 / 8%); background: rgb(250 248 243 / 94%); backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: center; gap: 13px; min-width: max-content; color: var(--ink); text-decoration: none; }
.brand img { display: block; width: clamp(108px, 11vw, 142px); height: auto; }
.brand-divider { width: 1px; height: 27px; background: #c8ceca; }
.brand-name { font-weight: 650; letter-spacing: .01em; }
.brand-subtitle { display: block; font-size: .67rem; font-weight: 400; color: var(--muted); }
.main-nav, .header-actions { display: flex; align-items: center; gap: clamp(12px, 2.7vw, 34px); }
.main-nav a { color: var(--ink); font-size: .94rem; text-decoration: none; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--teal); }
.main-nav .admin-nav { color: #657278; font-size: .84rem; }
.header-actions { gap: 10px; }
.header-user { color: var(--muted); font-size: .9rem; }

.app-shell { width: min(1260px, calc(100% - 48px)); min-height: calc(100vh - 156px); margin: 0 auto; padding: 38px 0 84px; }
.loading-state, .empty-state { display: grid; place-items: center; gap: 14px; min-height: 42vh; color: var(--muted); text-align: center; }
.loading-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 7px #dcece6; animation: pulse 1.25s ease-in-out infinite alternate; }
@keyframes pulse { to { box-shadow: 0 0 0 12px #dcece6; opacity: .7; } }
.eyebrow { margin: 0 0 12px; color: var(--teal-dark); font-size: .77rem; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.16; letter-spacing: -.035em; }
h1 { max-width: 920px; margin-bottom: 20px; font-size: clamp(2.5rem, 6.5vw, 5.4rem); font-weight: 650; }
h2 { font-size: clamp(1.8rem, 3.4vw, 3rem); font-weight: 650; }
h3 { font-size: 1.3rem; font-weight: 650; }
.muted { color: var(--muted); }
.lead { max-width: 700px; color: #45585e; font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.55; }
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.3fr .7fr; align-items: center; gap: 28px; min-height: 250px; margin: 0 0 28px; padding: clamp(24px, 3vw, 38px); border: 1px solid #eee9dd; border-radius: 26px; background: linear-gradient(120deg, #fff 0%, #fffdf7 52%, #f0eee7 100%); box-shadow: var(--shadow); }
.hero h1 { max-width: 680px; font-size: clamp(2rem, 3.8vw, 3.2rem); margin-bottom: 14px; }
.hero .lead { font-size: 1.05rem; }
.catalog-progress { font-size: .86rem; font-weight: 600; }
#course-catalog { scroll-margin-top: 120px; }
.term { position: relative; cursor: help; border-bottom: 1px dotted var(--teal); }
.term-tip { display: none; position: absolute; z-index: 12; bottom: 100%; left: 0; width: 220px; max-width: 70vw; padding: 10px 12px; border-radius: 9px; color: white; background: var(--ink); font-size: .82rem; font-weight: 400; }
.term:hover .term-tip, .term:focus .term-tip { display: block; }
.hero::before { position: absolute; top: -100px; right: -95px; width: 340px; height: 340px; border: 1px solid rgb(19 124 116 / 14%); border-radius: 50%; content: ""; }
.hero-copy { position: relative; z-index: 1; }
.hero-art { position: relative; z-index: 1; display: grid; min-width: 0; place-items: center; }
.hero-art img { display: block; width: min(100%, 350px); height: auto; max-height: 210px; object-fit: contain; }
.hero-note { position: absolute; right: 0; bottom: 5px; padding: 11px 16px; border: 1px solid #e4ddd1; border-radius: 14px; background: #fff9f0; color: var(--ink); font-size: .85rem; box-shadow: 0 8px 25px rgb(21 48 59 / 8%); }
.catalog-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 0 0 24px; }
.catalog-heading h2 { margin: 0; }
.catalog-heading p { max-width: 420px; margin: 0; color: var(--muted); }
.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.course-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid #e8e5dc; border-radius: var(--radius); background: var(--white); box-shadow: 0 9px 30px rgb(21 48 59 / 5%); transition: transform .2s ease, box-shadow .2s ease; }
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.course-cover { display: grid; min-height: 206px; padding: 20px; place-items: center; background: var(--mint); }
.course-card:nth-child(2) .course-cover { background: var(--lavender); }
.course-card:nth-child(3) .course-cover { background: var(--apricot); }
.course-cover img { display: block; width: 100%; max-width: 360px; height: 190px; object-fit: contain; }
.course-card-content { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 24px; }
.course-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; color: var(--muted); font-size: .78rem; }
.meta-pill { padding: 4px 10px; border-radius: 99px; background: #f1f3f1; }
.course-card h3 { margin-bottom: 10px; }
.course-card p { color: var(--muted); }
.course-card .button { width: 100%; margin-top: auto; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 9px; padding: 11px 18px; border: 1px solid transparent; border-radius: 12px; color: #fff; background: var(--teal); cursor: pointer; font-weight: 650; text-align: center; text-decoration: none; transition: background .15s ease, transform .15s ease; }
.button:hover { color: #fff; background: var(--teal-dark); transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .6; transform: none; }
.button-secondary { border-color: #c9d8d3; color: var(--teal-dark); background: #f7fbf9; }
.button-secondary:hover { color: var(--teal-dark); background: #e8f3ee; }
.button-quiet { min-height: 44px; padding-inline: 12px; border-color: var(--line); color: var(--ink); background: transparent; }
.button-quiet:hover { color: var(--ink); background: #f0eee8; }
.button-danger { border-color: #edceca; color: var(--danger); background: #fff8f6; }
.button-small { min-height: 42px; padding: 8px 13px; font-size: .9rem; }

.login-wrap { display: grid; min-height: 66vh; place-items: center; }
.login-card { width: min(100%, 510px); padding: clamp(26px, 6vw, 48px); border: 1px solid #ebe6dc; border-radius: 26px; background: var(--white); box-shadow: var(--shadow); }
.login-mark { display: grid; width: 58px; height: 58px; margin-bottom: 24px; place-items: center; border-radius: 18px; background: var(--mint); color: var(--teal-dark); font-size: 1.5rem; }
.login-card h1 { margin-bottom: 12px; font-size: clamp(2rem, 5vw, 3.1rem); }
.form-field { display: grid; gap: 8px; margin: 18px 0; }
.form-field label, .field-label { color: var(--ink); font-size: .94rem; font-weight: 650; }
.text-input, .text-area, .select-input { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #71877d; border-radius: 10px; color: var(--ink); background: #fff; }
.text-input:focus, .text-area:focus, .select-input:focus { border-color: var(--teal); outline: 3px solid rgb(19 124 116 / 16%); }
.text-input:focus-visible, .text-area:focus-visible, .select-input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.text-area { min-height: 110px; resize: vertical; }
.field-help, .field-error { margin: 0; color: var(--muted); font-size: .87rem; }
.field-error, .error-banner { color: var(--danger); }
.error-banner:empty { display: none; }
.error-banner, .success-banner, .notice-banner { padding: 13px 15px; border: 1px solid #efcbc7; border-radius: 12px; background: #fff5f3; }
.success-banner { border-color: #c5e0d0; color: var(--success); background: #f1faf5; }
.notice-banner { border-color: #e8dcb9; color: #644d1e; background: #fffaf0; }
.remaining-note { margin: 14px 0 0; color: var(--muted); font-size: .86rem; }
.login-card .button { width: 100%; }

.course-layout { display: grid; grid-template-columns: 255px minmax(0, 1fr); align-items: start; gap: clamp(24px, 4vw, 52px); }
.course-sidebar { position: sticky; top: 100px; max-height: calc(100vh - 125px); overflow: auto; padding: 20px 16px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.sidebar-title { margin: 0 0 16px; font-size: .83rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.step-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.step-link { display: grid; grid-template-columns: 29px 1fr; align-items: center; gap: 10px; width: 100%; padding: 9px 8px; border: 0; border-radius: 10px; color: var(--ink); background: transparent; cursor: pointer; text-align: left; }
.step-link:hover { background: #f4f7f4; }
.step-link[aria-current="step"] { color: var(--teal-dark); background: #e9f4ef; font-weight: 650; }
.step-index { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid #cfd8d4; border-radius: 50%; color: var(--muted); font-size: .79rem; }
.step-link.is-complete .step-index { border-color: var(--teal); color: #fff; background: var(--teal); }
.step-label { font-size: .9rem; line-height: 1.3; }
.sidebar-progress { height: 7px; overflow: hidden; margin: 18px 2px 9px; border-radius: 99px; background: #e8ece9; }
.sidebar-progress span { display: block; height: 100%; border-radius: inherit; background: var(--teal); transition: width .3s ease; }
.sidebar-progress-label { margin: 0 2px 16px; color: var(--muted); font-size: .78rem; }
.course-content { min-width: 0; }
.course-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.course-topline a { font-size: .9rem; }
.course-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, .55fr); align-items: center; gap: 26px; margin-bottom: 30px; padding: clamp(24px, 4vw, 42px); border-radius: 24px; background: linear-gradient(130deg, #fff 0%, #f1f6f0 100%); }
.course-heading:nth-child(2) { border: 1px solid var(--line); }
.course-heading h1 { margin-bottom: 12px; font-size: clamp(2.1rem, 4.4vw, 4rem); }
.course-heading img { display: block; width: 100%; height: auto; max-height: 230px; object-fit: contain; }
.course-subtitle { margin: 0; color: var(--muted); font-size: 1.05rem; }
.course-stat-row { display: flex; flex-wrap: wrap; gap: 9px; margin: 18px 0 0; }
.step-card, .assessment-card, .feedback-card, .resource-card, .admin-panel { padding: clamp(22px, 4vw, 38px); border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 12px 38px rgb(21 48 59 / 4%); }
.step-kicker { margin-bottom: 9px; color: var(--teal-dark); font-size: .8rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.step-card h2 { margin-bottom: 12px; }
.step-goal { margin-bottom: 24px; color: var(--muted); font-size: 1.05rem; }
.step-body { max-width: 780px; font-size: 1.03rem; }
.action-block { margin: 24px 0; padding: 18px 20px; border-left: 4px solid var(--teal); border-radius: 0 12px 12px 0; background: #eff7f2; }
.action-block h3 { margin-bottom: 8px; font-size: 1rem; }
.action-block ul, .check-list { margin-bottom: 0; padding-left: 1.35rem; }
.action-block li + li, .check-list li + li { margin-top: 7px; }
.step-visual { margin: 26px 0; padding: 20px; border-radius: 18px; background: #f5f3ed; text-align: center; }
.step-visual img { display: block; width: auto; max-width: 100%; max-height: 440px; height: auto; margin: auto; object-fit: contain; }
.step-visual figcaption { margin-top: 12px; color: var(--muted); font-size: .83rem; }
@media (min-width: 901px) {
  .step-visual-reconcile { margin-block: 20px; padding: 12px; }
  .step-visual-reconcile img { max-height: 360px; }
}
.screenshot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; margin: 26px 0; }
.screenshot-figure { min-width: 0; margin: 0; }
.screenshot-button { display: block; width: 100%; padding: 9px; border: 1px solid #dedbd3; border-radius: 14px; background: #f7f5ef; cursor: zoom-in; text-align: left; }
.screenshot-image-wrap { position: relative; display: block; width: 100%; line-height: 0; }
.screenshot-image-wrap > img { display: block; width: 100%; height: auto; }
.screenshot-annotations { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.annotation-arrow { fill: none; stroke: #d95732; stroke-width: .75; stroke-linecap: round; filter: drop-shadow(0 1px 1px rgb(255 255 255 / 95%)); }
.annotation-badge { fill: #fff; stroke: #15303b; stroke-width: .75; filter: drop-shadow(0 1px 1px rgb(21 48 59 / 25%)); }
.annotation-number { fill: #15303b; font: 700 4px "Segoe UI", Arial, sans-serif; }
.screenshot-caption { display: block; padding: 9px 5px 2px; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.screenshot-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 8px 5px 0; padding: 0; list-style: none; }
.screenshot-legend li { display: flex; align-items: center; gap: 7px; color: #34484d; font-size: .82rem; line-height: 1.4; }
.legend-number { display: inline-grid; width: 23px; height: 23px; flex: 0 0 23px; place-items: center; border: 1px solid #15303b; border-radius: 50%; color: #15303b; background: #fff; font-size: .76rem; font-weight: 750; }
.prompt-block { margin: 22px 0; overflow: hidden; border: 1px solid #d5dcd8; border-radius: 14px; background: #f5f7f5; }
.prompt-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; border-bottom: 1px solid #d5dcd8; color: #506167; font-size: .85rem; }
.prompt-code { display: block; overflow-x: auto; padding: 18px; color: #21373d; font-family: Consolas, "SFMono-Regular", monospace; font-size: .92rem; line-height: 1.62; white-space: pre-wrap; overflow-wrap: anywhere; }
.copy-status { min-height: 1.3em; padding: 0 16px 12px; color: var(--success); font-size: .83rem; }
.check-panel { margin: 24px 0; padding: 20px; border-radius: 15px; background: #fbf7ed; }
.check-row { display: flex; align-items: flex-start; gap: 12px; padding: 7px 0; cursor: pointer; }
.check-row input, .quiz-option input, .feedback-option input { width: 21px; height: 21px; flex: 0 0 21px; margin: 2px 0 0; accent-color: var(--teal); }
.check-summary { margin: 15px 0 0; color: var(--muted); font-size: .88rem; }
.complete-control { display: flex; align-items: flex-start; gap: 14px; margin: 26px 0; padding: 18px; border: 1px solid #dedbd3; border-radius: 14px; background: #fcfbf8; cursor: pointer; }
.complete-control input { width: 24px; height: 24px; flex: 0 0 24px; margin: 2px 0 0; accent-color: var(--teal); }
.complete-control strong { display: block; }
.complete-control span span { display: block; margin-top: 3px; color: var(--muted); font-size: .87rem; }
.step-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; }
.step-controls > div { display: flex; flex-wrap: wrap; gap: 10px; }
.duration-note { color: var(--muted); font-size: .87rem; }
.resource-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 13px; margin: 22px 0; }
.resource-card { display: block; padding: 17px; color: var(--ink); text-decoration: none; box-shadow: none; }
.resource-card strong { display: block; margin-bottom: 5px; }
.resource-card span { display: block; color: var(--muted); font-size: .87rem; }
.course-end-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 30px; }

.section-heading { margin: 50px 0 18px; }
.section-heading p { max-width: 680px; color: var(--muted); }
.quiz-question, .feedback-question { margin: 20px 0; padding: 20px; border: 1px solid #e2e5df; border-radius: 15px; background: #fcfcfa; }
.quiz-question legend, .feedback-question legend { max-width: 100%; padding: 0 5px; font-weight: 650; }
.question-number { display: block; margin-bottom: 5px; color: var(--teal-dark); font-size: .76rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.quiz-options, .feedback-options { display: grid; gap: 8px; margin-top: 12px; }
.quiz-option, .feedback-option { display: flex; min-height: 44px; align-items: flex-start; gap: 11px; padding: 10px 12px; border: 1px solid #e1e5e1; border-radius: 10px; background: #fff; cursor: pointer; }
.quiz-option:hover, .feedback-option:hover { border-color: #8bb8a8; background: #f7fbf8; }
.quiz-question.has-error, .feedback-question.has-error { border-color: #d1776f; background: #fff8f7; }
.quiz-question.is-correct { border-color: #88c4a3; background: #f4fbf6; }
.quiz-question.is-incorrect { border-color: #e3a49c; background: #fff8f7; }
.question-error { margin: 10px 0 0; color: var(--danger); font-size: .86rem; }
.explanation { margin: 12px 0 0; padding: 12px; border-radius: 10px; color: #344d53; background: #edf3ef; font-size: .9rem; }
.result-summary { margin: 18px 0; padding: 17px; border-radius: 13px; font-weight: 650; }
.result-summary.pass { color: var(--success); background: #ecf7f0; }
.result-summary.fail { color: #823b2f; background: #fff0eb; }
.feedback-card { margin-top: 28px; }
.feedback-card h2, .assessment-card h2 { margin-bottom: 8px; }
.feedback-name { max-width: 510px; }
.other-answer { display: none; margin: 8px 0 3px 32px; }
.other-answer.is-visible { display: block; }
.receipt-card { padding: 22px; border: 1px solid #b9dcc7; border-radius: 16px; color: var(--success); background: #f1faf5; }
.receipt-id { display: block; margin-top: 8px; color: #395d4b; font-family: Consolas, monospace; font-size: .86rem; overflow-wrap: anywhere; }

.admin-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.admin-head h1 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.6rem); }
.admin-shell { padding-top: 24px; }
.admin-shell .admin-panel { padding: clamp(18px, 2.5vw, 28px); }
.admin-panel > h2 { margin-bottom: 10px; font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.admin-panel > .muted { margin-bottom: 12px; }
.admin-head .eyebrow { margin-bottom: 7px; }
.course-support { width: 100%; }
.course-support summary { cursor: pointer; color: var(--teal-dark); font-weight: 600; }
.course-support p { margin: 10px 0 0; max-width: 850px; overflow-wrap: anywhere; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.admin-tab { min-height: 44px; padding: 9px 14px; border: 1px solid transparent; border-radius: 10px; color: var(--ink); background: transparent; cursor: pointer; }
.admin-tab[aria-selected="true"] { border-color: #b9d8cf; color: var(--teal-dark); background: #eaf4ef; font-weight: 650; }
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 20px; }
.admin-toolbar .form-field { min-width: min(100%, 240px); margin: 0; }
.feedback-list { display: grid; gap: 14px; }
.feedback-item { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.feedback-item-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; margin-bottom: 12px; }
.feedback-item h3 { margin: 0; font-size: 1.05rem; }
.feedback-item time { color: var(--muted); font-size: .83rem; }
.feedback-answer { margin: 10px 0 0; color: #34484d; }
.feedback-answer strong { display: block; margin-bottom: 2px; color: var(--ink); font-size: .88rem; }
.feedback-answer { overflow-wrap: anywhere; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.editor-course { max-width: 360px; margin-bottom: 20px; }
.editor-question { margin: 18px 0; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.editor-question h3 { margin-bottom: 14px; }
.editor-question .form-field { margin: 12px 0; }
.editor-choice-row { display: grid; grid-template-columns: 25px minmax(0, 1fr); align-items: center; gap: 8px; margin: 8px 0; }
.editor-choice-row input[type="radio"] { width: 21px; height: 21px; accent-color: var(--teal); }
.editor-choice-row label { color: var(--muted); font-size: .83rem; }
.editor-choice-row .text-input { grid-column: 2; }
.editor-savebar { position: sticky; bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding: 14px; border: 1px solid #d9ded8; border-radius: 15px; background: rgb(255 255 255 / 96%); box-shadow: var(--shadow); }
.device-list { display: grid; gap: 12px; }
.device-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.device-item p { margin: 3px 0 0; color: var(--muted); font-size: .86rem; }
.device-id { font-family: Consolas, monospace; overflow-wrap: anywhere; }
.admin-login { max-width: 510px; margin: 50px auto; }
.admin-login .login-card { width: 100%; }
.admin-login .login-card h1 { max-width: 100%; font-size: clamp(1.6rem, 4vw, 2.4rem); }
.access-note { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; line-height: 1.6; }
.admin-subtabs { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.admin-subtab { min-height: 42px; padding: 8px 13px; border: 1px solid transparent; border-radius: 10px; color: var(--ink); background: transparent; cursor: pointer; }
.admin-subtab[aria-selected="true"] { border-color: #c9d8d3; color: var(--teal-dark); background: #f0f7f3; font-weight: 650; }
.participant-add-form, .access-settings-form, .invite-result, .profile-panel form { margin: 20px 0; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #fbfaf7; }
.participant-add-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.participant-add-form h3, .participant-add-form > .field-error, .participant-add-form > .button { grid-column: 1 / -1; }
.participant-add-form h3 { margin: 0 0 4px; }
.participant-list { display: grid; gap: 14px; margin-top: 16px; }
.participant-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.participant-identity { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.participant-identity h3 { margin: 0; font-size: 1.05rem; }
.participant-identity p { margin: 4px 0 0; overflow-wrap: anywhere; }
.participant-courses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 15px; }
.participant-course { display: grid; align-content: start; gap: 5px; min-width: 0; padding: 12px; border-radius: 12px; background: #f7f6f1; color: #4b5c60; font-size: .82rem; overflow-wrap: anywhere; }
.participant-course strong { color: var(--ink); }
.participant-card > .button { max-width: 100%; }
.invite-result { border-color: #b9d8cf; background: #f5faf7; }
.invite-result h3 { margin-top: 0; }
.invite-url { width: 100%; }
.invite-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.invite-result .muted:last-child { margin-bottom: 0; }
.access-settings-form .course-pin-list { display: grid; gap: 12px; margin: 18px 0; }
.course-pin-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, .5fr); align-items: end; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.course-pin-row > div { min-width: 0; }
.course-pin-row > div > label { display: block; margin-bottom: 7px; font-weight: 650; }
.course-pin-row .check-row { margin-bottom: 6px; }
.device-settings { margin-top: 24px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: #fbfaf7; }
.device-settings summary { cursor: pointer; font-weight: 650; }
.device-settings .device-list { margin-top: 14px; }
.profile-panel { margin: 28px 0 8px; }
.profile-panel form { max-width: 680px; }
.profile-panel form h2 { margin-top: 0; }
.profile-panel .button { margin-top: 4px; }
.profile-hint { max-width: 680px; margin-top: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.profile-hint h2 { margin-top: 0; }
.admin-course-preview { margin: 8px 0 20px; padding: 14px 17px; border: 1px solid var(--line); border-radius: 14px; background: #fbfaf7; }
.admin-course-preview > summary { min-height: 30px; padding: 5px 0; cursor: pointer; color: var(--teal-dark); font-weight: 650; }
.admin-course-preview > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.admin-preview-body { padding-top: 10px; }
.admin-preview-step { margin: 16px 0; padding: clamp(16px, 3vw, 25px); border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.admin-preview-step h4 { margin: 0 0 12px; font-size: 1.1rem; }
.admin-preview-step h5 { margin: 18px 0 6px; font-size: .93rem; }
.admin-preview-step li { margin: 6px 0; }
.content-step { padding: 20px; }
.content-prompt { margin: 14px 0; padding: 14px; border-radius: 12px; background: #f7f6f1; }
.prompt-editor { min-height: 120px; }
.access-settings-form .button { margin-top: 4px; }
.admin-tab:focus-visible, .admin-subtab:focus-visible { outline-offset: 3px; }

dialog.image-dialog { width: min(1100px, calc(100vw - 28px)); max-width: 1100px; max-height: calc(100vh - 30px); padding: 14px; border: 1px solid #d6d8d3; border-radius: 18px; background: #fff; box-shadow: 0 25px 90px rgb(12 30 35 / 35%); }
dialog.image-dialog::backdrop { background: rgb(17 32 37 / 68%); }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 4px 2px 12px; }
.dialog-top p { margin: 0; color: var(--muted); }
.dialog-image { display: block; width: auto; max-width: 100%; max-height: calc(100vh - 120px); height: auto; margin: auto; object-fit: contain; }
.dialog-image-wrap { display: block; width: fit-content; max-width: 100%; max-height: calc(100vh - 120px); margin: auto; }
.dialog-image-wrap > .dialog-image { max-height: calc(100vh - 120px); }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 20px clamp(24px, 5vw, 76px); border-top: 1px solid var(--line); color: #657278; font-size: .82rem; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(1px, 1px, 1px, 1px) !important; white-space: nowrap !important; clip-path: inset(50%) !important; }
.toast-region { position: fixed; z-index: 40; right: 18px; bottom: 18px; display: grid; gap: 9px; width: min(360px, calc(100vw - 36px)); }
.toast { padding: 14px 16px; border: 1px solid #c2ded0; border-radius: 12px; color: var(--success); background: #f3fbf5; box-shadow: var(--shadow); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr .72fr; }
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-layout { grid-template-columns: 205px minmax(0, 1fr); gap: 20px; }
  .course-sidebar { padding: 16px 11px; }
  .course-heading { grid-template-columns: 1fr .45fr; }
}
@media (max-width: 680px) {
  .site-header { min-height: 68px; flex-wrap: wrap; gap: 8px 12px; padding: 10px 18px; }
  .brand { gap: 8px; }
  .brand img { width: 98px; }
  .brand-divider { height: 23px; }
  .brand-name { font-size: .9rem; }
  .main-nav { order: 3; width: 100%; justify-content: space-between; gap: 12px; padding: 4px 2px 1px; }
  .header-actions { margin-left: auto; }
  .app-shell { width: min(100% - 28px, 620px); padding-top: 23px; }
  .hero { grid-template-columns: 1fr; gap: 14px; min-height: 0; margin-bottom: 24px; padding: 24px; }
  .hero-art { display: none; }
  .header-user { display: none; }
  .hero-note { right: 3px; bottom: 0; }
  .catalog-heading { display: block; }
  .catalog-heading p { margin-top: 10px; }
  .course-grid { grid-template-columns: 1fr; gap: 16px; }
  .course-cover { min-height: 180px; }
  .course-cover img { height: 165px; }
  .course-card-content { padding: 20px; }
  .course-layout { display: block; }
  .course-sidebar { position: static; max-height: none; margin-bottom: 19px; padding: 13px; }
  .sidebar-title { margin: 0 0 10px; }
  .step-list { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; scroll-snap-type: x mandatory; }
  .step-list li { flex: 0 0 auto; scroll-snap-align: start; }
  .step-link { grid-template-columns: 27px 1fr; max-width: 205px; min-height: 44px; padding: 7px; }
  .step-label { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: .8rem; }
  .sidebar-progress { margin-top: 9px; }
  .course-heading { grid-template-columns: 1fr; gap: 10px; padding: 24px; }
  .course-heading img { max-height: 165px; }
  .course-topline { align-items: flex-start; }
  .step-card, .assessment-card, .feedback-card, .resource-card, .admin-panel { padding: 21px; }
  .course-end-grid { grid-template-columns: 1fr; }
  .step-controls { align-items: stretch; }
  .step-controls > div { width: 100%; }
  .step-controls .button { flex: 1; }
  .duration-note { width: 100%; order: -1; }
  .prompt-top { align-items: flex-start; }
  .admin-head { display: block; }
  .admin-head .button { margin-top: 15px; }
  .admin-toolbar { align-items: stretch; }
  .admin-toolbar .form-field { width: 100%; }
  .editor-savebar { align-items: stretch; flex-direction: column; }
  .editor-savebar .button { width: 100%; }
  .participant-add-form { grid-template-columns: 1fr; }
  .participant-add-form > * { grid-column: 1; }
  .participant-courses { grid-template-columns: 1fr; }
  .course-pin-row { grid-template-columns: 1fr; align-items: start; }
  .invite-actions { flex-direction: column; }
  .invite-actions .button { width: 100%; }
  .participant-identity { display: block; }
  .participant-identity .meta-pill { display: inline-block; margin-top: 8px; }
  .participant-card > .button { width: 100%; }
  .site-footer { padding: 18px 22px; }
}
@media (max-width: 390px) {
  .main-nav a { font-size: .87rem; }
  .main-nav .admin-nav { font-size: .8rem; }
  .app-shell { width: calc(100% - 22px); }
  .hero { padding: 26px 19px; }
  .step-controls > div { flex-direction: column; }
  .step-controls .button { width: 100%; }
  .check-panel, .quiz-question, .feedback-question { padding: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
