:root {
  font-family: Arial, sans-serif;
  color: #163e48;
  background: #f5f8f7;
  line-height: 1.75;
  --ink: #15495b;
  --teal: #207980;
  --yellow: #f5cb54;
  --border: #dce8e7;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--ink); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .button, input, select { min-height: 46px; }
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem max(calc((100vw - 1200px) / 2), 1.5rem);
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: .75rem; direction: ltr; font-weight: 700; line-height: 1.25; font-size: 1.15rem; }
.brand span { display: block; color: var(--teal); font-size: .85rem; margin-top: .3rem; }
.brand-mark { display: grid; gap: 4px; width: 35px; }
.brand-mark i { display: block; height: 9px; border-radius: 2px; background: #7ec8cc; }
.brand-mark i:nth-child(2) { background: var(--yellow); transform: translateX(5px); }
.brand-mark i:nth-child(3) { background: var(--ink); }
nav, .actions { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
nav a { padding: .45rem .65rem; border-radius: 8px; }
nav a:hover, nav a[aria-current="page"] { background: #edf6f5; color: #12616a; }
nav button { background: #edf4f3; color: var(--ink); box-shadow: none; }
main { max-width: 1200px; margin: auto; padding: 2.8rem 1.5rem 4rem; min-height: 78vh; }
main > h1 { margin-top: 1rem; }
h1, h2, h3, p { margin: 0 0 1rem; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.3; letter-spacing: -.025em; }
h2 { font-size: 1.3rem; line-height: 1.5; }
p { color: #526b72; overflow-wrap: anywhere; }
.card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: clamp(1.25rem, 3vw, 2rem); box-shadow: 0 8px 24px #153f4d04; min-width: 0; }
.narrow { max-width: 620px; margin: 1rem auto; }
.narrow h1 { font-size: 2rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1.25rem; margin: 1.5rem 0; }
.button, button {
  display: inline-flex; justify-content: center; align-items: center; gap: .5rem;
  padding: .65rem 1.2rem; border: 1px solid transparent; border-radius: 10px;
  background: var(--ink); color: white; cursor: pointer; font-weight: 700; line-height: 1.4;
  transition: background .15s, box-shadow .15s;
}
.button:hover, button:hover { background: #206477; box-shadow: 0 5px 12px #163e4814; }
.secondary { background: #f8e4a4; color: #493c16; }
.secondary:hover { background: #f3d57e; }
button:disabled { opacity: .55; cursor: wait; box-shadow: none; }
label { display: block; margin: 1rem 0; color: #294e58; font-weight: 600; }
input:not([type="radio"]):not([type="checkbox"]), select, textarea {
  display: block; width: 100%; padding: .7rem .85rem; margin-top: .4rem;
  border: 1px solid #ccdcd9; border-radius: 9px; background: #fbfdfc; color: #183f49;
}
input[type="radio"], input[type="checkbox"] { accent-color: var(--teal); margin-inline-end: .6rem; }
input[readonly] { background: #eef3f2 !important; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--border); border-radius: 12px; margin: 1.25rem 0; padding: 1rem; min-width: 0; }
legend { padding: 0 .5rem; font-weight: 700; }
fieldset label { font-weight: 400; padding: .55rem; border-radius: 8px; margin: .3rem 0; }
fieldset label:has(input:checked) { background: #e8f4f2; }
[role="alert"]:empty, [role="status"]:empty { display: none; }
[role="alert"] { color: #a7352f; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #daa61e; outline-offset: 3px; }
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center; padding: clamp(1.5rem, 5vw, 4rem); background: #e6f3f2; border: 1px solid #d3e7e5; border-radius: 24px; }
.hero h1 { font-size: clamp(2.4rem, 4.6vw, 4.1rem); max-width: 12ch; }
.hero p { max-width: 40ch; }
.hero .actions { margin-top: 1.7rem; }
.hero img { width: 100%; border-radius: 16px; border: 8px solid #ffffff80; box-shadow: 0 22px 40px #174e6410; }
.eyebrow { color: #287b80; font-weight: 700; font-size: .95rem; }
.journey { margin-block: 3rem 0; }
.journey ol { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; padding: 0; gap: 1rem; counter-reset: journey; }
.journey li { counter-increment: journey; padding: 1.5rem; border: 1px solid var(--border); background: #fff; border-radius: 14px; }
.journey li::before { content: counter(journey, decimal-leading-zero); display: block; color: var(--teal); font-weight: 700; margin-bottom: .7rem; }
.journey a { font-weight: 700; text-decoration: underline; text-underline-offset: 5px; }
.badge { display: inline-block; color: #226369; background: #edf6f4; padding: .2rem .7rem; border-radius: 20px; font-size: .85rem; margin-bottom: .7rem; }
.notice, .reply-notice { padding: 1rem; border-radius: 10px; background: #fff4d1; color: #655221; border: 1px solid #f1dfa6; }
.reply-notice { max-width: 1152px; margin: 1rem auto 0; }
.reply-notice a { text-decoration: underline; }
.reply-count { background: var(--teal); color: #fff; border-radius: 1rem; padding: .1rem .4rem; font-size: .8rem; }
.learning-path { display: grid; gap: 1rem; margin: 1.8rem 0 0; border-inline-start: 3px solid #cee3e0; padding-inline-start: 1.2rem; }
.learning-path .card { position: relative; }
.learning-path .card::before { content: ''; position: absolute; inset-inline-start: -1.7rem; top: 2rem; width: 13px; height: 13px; background: #8dbab4; border: 3px solid #f5f8f7; border-radius: 50%; }
.learning-path summary { cursor: pointer; font-weight: 700; font-size: 1.15rem; }
.learning-path summary + p { margin-top: .75rem; }
.learning-path .current-level { border-color: #78b6af; background: #f0f8f6; }
.learning-path .current-level::before { background: var(--teal); }
.learning-path li { padding: .45rem; }
.learning-path a { text-decoration: underline; text-underline-offset: 4px; }
.table-scroll { overflow: auto; border: 1px solid var(--border); border-radius: 14px; background: white; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 1rem; border-bottom: 1px solid #e8efed; text-align: start; white-space: nowrap; }
th { color: #5b7478; font-size: .9rem; background: #f0f6f4; }
tbody tr:hover { background: #f6faf8; }
td a { font-weight: 700; text-decoration: underline; }
#course-levels, #uploaded { padding: 0; list-style: none; }
#course-levels > li, #uploaded > li, #student-profile .card { margin-bottom: 1.25rem; }
#uploaded > li { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 1.25rem; }
#uploaded > li > a { font-weight: 700; font-size: 1.1rem; text-decoration: underline; }
.lesson-settings { gap: 1rem; align-items: end; }
.lesson-settings label { flex: 1; min-width: 110px; }
.lesson-settings label:first-child { flex: 2; }
.replace-video { padding-top: .5rem; border-top: 1px solid var(--border); }
video { display: block; width: 100%; max-height: 70vh; background: #102c35; border-radius: 12px; margin-block: 1.2rem; }
.conversation { padding: 0; list-style: none; }
.conversation li { padding: 1rem; margin: .8rem 0; background: #edf6f4; border-radius: 12px; }
.conversation p { white-space: pre-wrap; margin: .3rem 0 0; }
progress { width: 100%; height: .6rem; accent-color: var(--teal); }
#quiz-editor .card { margin-bottom: 1rem; }
footer { border-top: 1px solid var(--border); background: #fff; padding: 1.5rem; text-align: center; color: #6d8387; font-size: .9rem; }
[hidden] { display: none !important; }
@media (max-width: 900px) {
  header { flex-direction: column; align-items: stretch; }
  .brand { align-self: flex-end; }
  nav { justify-content: center; }
  .hero { gap: 1.5rem; }
  .journey ol { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  header { padding: 1rem; gap: 1rem; }
  .brand { align-self: center; }
  nav, nav .actions { gap: .25rem; justify-content: center; }
  nav a, nav button { font-size: .9rem; padding: .5rem .6rem; }
  main { padding: 1.5rem 1rem 3rem; }
  .hero { grid-template-columns: 1fr; padding: 1.5rem; }
  .hero h1 { max-width: none; }
  .hero img { max-height: 170px; object-fit: cover; }
  .hero .actions { align-items: stretch; flex-direction: column; }
  .journey { margin-top: 2rem; }
  .journey ol { grid-template-columns: 1fr; }
  .journey li { display: flex; gap: 1rem; align-items: center; padding: 1rem; }
  .journey li::before { margin: 0; }
  .narrow { margin: 0; }
  .card { padding: 1.25rem; }
  .learning-path { padding-inline-start: .8rem; }
  .learning-path .card::before { inset-inline-start: -1.3rem; }
  .lesson-settings { display: block; }
  .table-scroll { margin-inline: 0; }
  .reply-notice { margin: 1rem; }
  input[type="date"] { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.page-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin: 1rem 0 1.5rem; }
.page-heading h1 { margin: 0; }
.content-create > summary { cursor: pointer; font-weight: 700; font-size: 1.1rem; }
.content-create form { max-width: 680px; margin-top: 1rem; }
.video-filter { max-width: 420px; }
.level-settings .secondary { margin-inline-start: .5rem; }
@media(max-width:600px) { .page-heading { align-items: stretch; flex-direction: column; } .level-settings .secondary { margin: .6rem 0 0; display: flex; } }
.danger{background:#fff0ed;color:#9c352e;border-color:#efcbc5}.danger:hover{background:#fce1db}#uploaded details{margin-top:1rem}#uploaded summary{cursor:pointer;color:var(--teal);font-weight:700}.restore-video{margin-top:1rem}
.login-help a{display:inline-block;padding:.4rem 0;text-decoration:underline;text-underline-offset:4px;font-weight:700}
.student-welcome { margin: .5rem 0 1.7rem; }
.student-welcome h1 { margin-bottom: .5rem; }
.subscription-banner { display:flex; justify-content:space-between; align-items:center; gap:1.5rem; width:100%; padding:1.8rem 2rem; border-radius:18px; background:var(--ink); color:white; margin-bottom:1.5rem; }
.subscription-banner h2 { color:white; margin-bottom:.4rem; }
.subscription-banner p { color:#d3e7e9; margin-bottom:0; }
.subscription-banner .eyebrow { color:#f5db88; margin-bottom:.5rem; }
.learning-feature { display:flex; align-items:center; justify-content:space-between; gap:1.5rem; background:#eaf5f1; border-color:#c8e0d7; }
.learning-feature p:last-child { margin-bottom:0; }
.shortcut-card { display:block; transition:border-color .15s,box-shadow .15s; }
.shortcut-card:hover { border-color:var(--teal); box-shadow:0 8px 24px #153f4d0c; }
.shortcut-card span { display:block; font-weight:700; color:var(--teal); margin-top:1.3rem; }
@media(max-width:600px) {
 .subscription-banner,.learning-feature { flex-direction:column; align-items:stretch; padding:1.3rem; }
 .student-shortcuts { grid-template-columns:1fr; }
}
.page-navigation { max-width:1200px; margin:1.3rem auto 0; padding:0 1.5rem; display:flex; align-items:center; gap:1.1rem; }
.navigation-back { background:white; color:var(--ink); border-color:#c4dcd7; min-width:110px; }
.navigation-back:hover { background:#e8f4f1; color:var(--ink); }
.page-navigation:not([hidden]) + main { padding-top:1.4rem; }
@media(max-width:600px) { .page-navigation { padding-inline:1rem; } }
.language-picker{margin:0;font-size:.8rem}.language-picker span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.language-picker select{margin:0;min-width:100px}html[dir="ltr"] .hero h1{max-width:15ch}html[dir="ltr"] .student-welcome h1{letter-spacing:-.03em}
.admin-inbox-section{margin-top:2rem}.admin-inbox-section h2{margin-bottom:.75rem}

/* Shared spacing, typography and responsive workspaces. */
:root {
  --ink: #173f4b;
  --teal: #1b7477;
  --border: #dfe8e5;
  color: #173f4b;
  background: #f4f7f6;
  font-size: 16px;
  line-height: 1.65;
}
body { background: radial-gradient(ellipse at 100% 0, #e4f1ed 0, transparent 40rem), #f4f7f6; }
header { gap: 1rem; padding-block: .95rem; box-shadow: 0 3px 18px #183d4705; }
.brand { font-size: 1.05rem; }
header nav { gap: .2rem; }
header nav .actions { gap: .2rem; }
nav a, nav button { font-size: .9rem; }
main { max-width: 1180px; padding-top: 2rem; }
h1 { font-size: clamp(1.7rem, 3.1vw, 2.5rem); line-height: 1.3; letter-spacing: -.02em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
p { font-size: .97rem; line-height: 1.8; }
.eyebrow { font-size: .8rem; letter-spacing: .02em; margin-bottom: .55rem; }
.card { border-radius: 16px; padding: 1.5rem; box-shadow: 0 4px 16px #193f4904; }
.grid { gap: 1rem; }
.narrow { max-width: 540px; padding: 2rem; margin-block: 1rem; }
.narrow > h1 { font-size: 1.8rem; margin-bottom: 1.5rem; }
label { font-size: .9rem; margin-block: .85rem; line-height: 1.5; }
input:not([type="radio"]):not([type="checkbox"]), select, textarea {
  font-size: 1rem; border-radius: 9px; padding: .65rem .8rem;
  min-height: 46px; background: #fcfdfd; border-color: #cfdcd8;
  transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: #8daea4; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px #1b747712; }
button, .button { font-size: .9rem; border-radius: 9px; min-height: 44px; padding: .65rem 1.1rem; }
button:not(:disabled):active, .button:active { transform: translateY(1px); }
.narrow form > button { width: 100%; margin-top: .4rem; }
fieldset { background: #fff; }
.hero { background: #e7f2ee; border-color: #d4e5de; border-radius: 22px; }
.hero h1 { font-size: clamp(2.3rem, 4.5vw, 3.8rem); }
.hero img { border-color: #ffffffb3; }
.journey li { border-radius: 12px; font-size: .95rem; }
.journey li::before { color: #638d7e; font-size: .85rem; }
.page-navigation { max-width: 1180px; margin-top: 1rem; }
.navigation-back { min-width: 95px; min-height: 40px; }
.page-heading { margin-block: 1.1rem 1.4rem; }
.workspace-title { margin-bottom: 1.7rem; }
.workspace-title h1 { margin-bottom: .55rem; }
.admin-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.tool-card { display: flex; flex-direction: column; align-items: flex-start; transition: border-color .2s, box-shadow .2s; }
.tool-card:hover { border-color: #83b4a8; box-shadow: 0 9px 26px #1b494b0a; }
.tool-symbol { width: 42px; height: 42px; display: grid; place-items: center; background: #e9f4ef; color: #216b64; border-radius: 11px; font-size: 1.3rem; font-weight: 700; margin-bottom: 1.2rem; }
.tool-card:nth-child(2n) .tool-symbol { background: #fbf1d4; color: #816b27; }
.tool-card h2 { margin-bottom: .4rem; }
.tool-card p { font-size: .9rem; margin-bottom: 1.1rem; }
.tool-open { font-size: .85rem; font-weight: 700; color: var(--teal); margin-top: auto; }
.content-create { margin-block: 1rem 1.4rem; }
.content-create > summary { font-size: 1rem; }
#upload { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.2rem; max-width: none; }
#upload label:first-child, #upload label:has(input[type="file"]), #upload [role="alert"] { grid-column: 1 / -1; }
#upload > button { justify-self: start; }
#course-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#course-levels > li { background: white; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; margin: 0; }
#course-levels .level-settings { border: 0; box-shadow: none; margin: 0; }
#course-levels .delete-level { border-top: 1px solid #edf1ef; padding: 1rem 1.5rem; }
#uploaded > li { padding: 1.4rem; }
#uploaded > li > a { font-size: 1rem; }
#uploaded details { border: 1px solid #e6ede9; border-radius: 10px; padding: .8rem 1rem; }
#uploaded summary { font-size: .9rem; }
.lesson-settings { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 1rem; }
.lesson-settings label { min-width: 0; }
.lesson-settings [role="status"] { grid-column: 1 / -1; }
.trash-video { margin-top: 1rem; }
.trash-video button { font-size: .85rem; }
.delete-level [role="status"] { margin-bottom: .6rem; }
.subscription-banner { padding: 1.5rem 1.8rem; border-radius: 16px; background: linear-gradient(115deg, #214c58, #173e49); }
.subscription-banner h2 { font-size: 1.4rem; }
.learning-feature { padding: 1.6rem 1.8rem; }
.student-shortcuts .card { padding: 1.5rem; }
.student-shortcuts p { font-size: .9rem; }
.score-result { font-size: 3.2rem; color: var(--teal); font-weight: 700; direction: ltr; text-align: center; background: #edf6f1; border-radius: 14px; padding: .65rem; }
.score-result small { font-size: 1.1rem; color: #5b7878; }
th, td { padding: .85rem 1rem; font-size: .92rem; }
.table-scroll { box-shadow: 0 4px 16px #193f4904; }
.menu-toggle { display: none; }

@media(min-width:901px) and (max-width:1200px) {
  header { padding-inline: 1.25rem; flex-wrap: wrap; }
  header nav { margin-inline-start: auto; }
}
@media(max-width:900px) {
  header { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; }
  .brand { align-self: auto; }
  .menu-toggle { display: inline-flex; background: #edf4f1; color: var(--ink); gap: .5rem; }
  header #site-menu { display: none; flex-basis: 100%; padding-top: .8rem; border-top: 1px solid var(--border); justify-content: flex-start; align-items: stretch; gap: .6rem; }
  header #site-menu.menu-open { display: flex; }
  header #account-nav { flex-basis: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem; }
  header #account-nav a, header #account-nav button { padding: .65rem; background: #f3f7f5; text-align: center; min-height: 44px; }
  header #account-nav .button { color: var(--ink); }
  .admin-tools { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lesson-settings { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px) {
  main { padding-inline: 1rem; }
  header { padding: .9rem 1rem; }
  .brand { font-size: .95rem; }
  .brand-mark { width: 29px; }
  .brand span { font-size: .75rem; }
  .menu-toggle { font-size: .85rem; }
  .card, .narrow { padding: 1.25rem; border-radius: 14px; }
  .narrow > h1 { font-size: 1.6rem; }
  .hero { padding: 1.5rem; gap: 1.6rem; }
  .hero h1 { font-size: 2.25rem; }
  #upload, #course-levels { grid-template-columns: 1fr; }
  #upload > button { width: 100%; }
  .page-heading .button { align-self: start; }
  .admin-tools { gap: .7rem; }
  .tool-card { padding: 1rem; }
  .tool-card h2 { font-size: 1.02rem; }
  .tool-card p { font-size: .82rem; }
  .tool-symbol { width: 36px; height: 36px; margin-bottom: .85rem; }
  .learning-feature, .subscription-banner { padding: 1.3rem; }
  .student-shortcuts { gap: .85rem; }
  #uploaded > li { padding: 1rem; }
  .lesson-settings { grid-template-columns: 1fr; gap: .2rem; }
  #uploaded details { padding: .7rem; }
  #course-levels .delete-level { padding-inline: 1.25rem; }
  .actions > label { max-width: 100%; }
}
@media(max-width:360px) { .admin-tools { grid-template-columns:1fr; } }
.menu-toggle:hover,.menu-toggle[aria-expanded="true"]{background:#dcece5;color:#173f4b}input[type="file"]{max-width:100%;font-size:.9rem}#app > a:first-child{display:inline-block;font-size:.85rem;color:#58736d;margin-bottom:.5rem}

.welcome-visual { min-width: 0; background: #173f4b; border: 1px solid #29525b; border-radius: 20px; overflow: hidden; box-shadow: 0 18px 40px #173f4b17; }
.welcome-video-frame { background: #0c171c; padding: .7rem; }
.welcome-video { width: 100%; aspect-ratio: 1; object-fit: contain; margin: 0; max-height: none; border-radius: 11px; display: block; }
.welcome-caption { padding: 1.2rem 1.4rem; }
.welcome-caption .eyebrow { color: #f5d273; display: block; margin: 0 0 .35rem; }
.welcome-caption h2 { color: white; font-size: 1.25rem; margin-bottom: .35rem; }
.welcome-caption p { color: #d4e4e5; font-size: .9rem; margin: 0; }
.hero:has(.welcome-visual) { padding: 2.5rem; gap: 3rem; grid-template-columns: 1.15fr 1fr; }
.auth-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; max-width: 1000px; margin: 1rem auto; }
.auth-layout .narrow { width: 100%; max-width: none; margin: 0; padding: 2rem; }
.auth-layout .welcome-visual { max-width: 410px; width: 100%; justify-self: center; }
.auth-layout .welcome-caption { padding: 1.1rem 1.25rem; }
.welcome-visual { animation: welcome-enter .5s ease-out both; }
@keyframes welcome-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media(max-width:800px) {
  .hero:has(.welcome-visual) { grid-template-columns: 1fr; padding: 1.5rem; gap: 1.6rem; }
  .hero .welcome-visual { width: 100%; max-width: 440px; justify-self: center; }
  .auth-layout { grid-template-columns: 1fr; gap: 1.5rem; max-width: 540px; }
  .auth-layout .narrow { padding: 1.5rem; }
  .auth-layout .welcome-visual { max-width: 100%; }
  .auth-layout .welcome-video-frame { padding: .5rem; }
}
@media(prefers-reduced-motion:reduce) { .welcome-visual { animation:none; } }
 .contact-us { display: flex; justify-content: center; padding: 20px; }
