:root {
  color-scheme: light;
  --ink: #17211f;
  --muted: #65716e;
  --line: #dbe5e0;
  --paper: #fbfcf9;
  --surface: #ffffff;
  --deep: #0e3b2f;
  --green: #168052;
  --mint: #dff3e9;
  --coral: #d85745;
  --amber: #c58a1d;
  --blue: #266a9f;
  --shadow: 0 18px 50px rgba(23, 33, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(22, 128, 82, 0.08), transparent 34%),
    linear-gradient(240deg, rgba(216, 87, 69, 0.07), transparent 30%),
    var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
select,
textarea,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 30px;
  height: 100vh;
  padding: 26px 18px;
  background: #102b25;
  color: #effaf4;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: linear-gradient(145deg, #2ea76c, #f4be57);
}

.brand-mark span {
  width: 22px;
  height: 27px;
  border: 3px solid #102b25;
  border-radius: 12px 12px 7px 7px;
  background: rgba(255, 255, 255, 0.78);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
}

.brand small,
.sidebar-footer small {
  color: rgba(239, 250, 244, 0.72);
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(239, 250, 244, 0.82);
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.main-content {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.topbar-actions {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.topbar h1 {
  max-width: 760px;
  margin: 4px 0 0;
  font-size: clamp(2rem, 5vw, 4.75rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.learner-card {
  display: grid;
  gap: 8px;
  min-width: 220px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(23, 33, 31, 0.06);
}

.logout-button {
  height: 100%;
  min-width: 96px;
  padding: 0 14px;
}

.learner-card label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

select,
textarea,
input[type="search"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

select {
  min-height: 40px;
  padding: 0 12px;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 24px;
  overflow: hidden;
  border-radius: 8px;
  background: #f5f8f2;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: clamp(24px, 5vw, 48px);
}

.hero-copy h2 {
  max-width: 780px;
  margin: 8px 0 14px;
  font-size: clamp(1.8rem, 3.4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy p:last-child {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.7;
}

.hero-visual {
  position: relative;
  min-height: 310px;
  background:
    linear-gradient(135deg, rgba(14, 59, 47, 0.92), rgba(38, 106, 159, 0.78)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 42px);
}

.privacy-orbit {
  position: absolute;
  inset: 22px;
  display: grid;
  place-items: center;
}

.shield {
  z-index: 3;
  display: grid;
  place-items: center;
  width: 132px;
  height: 156px;
  border: 2px solid rgba(255, 255, 255, 0.84);
  border-radius: 48% 48% 28% 28%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(223, 243, 233, 0.78));
  color: var(--deep);
  font-weight: 900;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.26);
}

.ring {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
}

.r-one {
  width: 250px;
  height: 250px;
}

.r-two {
  width: 340px;
  height: 188px;
  transform: rotate(-18deg);
}

.node {
  position: absolute;
  min-width: 68px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--deep);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.n-one {
  top: 30px;
  left: 36px;
}

.n-two {
  right: 26px;
  top: 82px;
}

.n-three {
  bottom: 44px;
  left: 58px;
}

.n-four {
  right: 72px;
  bottom: 26px;
}

.view {
  display: none;
}

.auth-page {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  min-height: 100vh;
}

.auth-hero {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(28px, 6vw, 72px);
  background:
    linear-gradient(135deg, rgba(16, 43, 37, 0.96), rgba(38, 106, 159, 0.82)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 44px);
  color: #effaf4;
}

.auth-brand {
  margin-bottom: 20px;
}

.auth-hero .eyebrow {
  color: #9ce0ba;
}

.auth-hero h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 0.98;
}

.auth-hero p:last-child {
  max-width: 580px;
  color: rgba(239, 250, 244, 0.8);
  font-size: 1.05rem;
  line-height: 1.7;
}

.auth-panel {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: clamp(20px, 5vw, 64px);
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.auth-form {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(23, 33, 31, 0.06);
}

.auth-form h2 {
  margin: 6px 0 0;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.auth-form .check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.84rem;
  line-height: 1.45;
}

.check-row input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.auth-form input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
}

.auth-form .check-row input {
  min-height: auto;
  padding: 0;
}

.notice {
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 800;
}

.notice.success {
  border: 1px solid rgba(22, 128, 82, 0.22);
  background: #e9f8ef;
  color: #0e5f39;
}

.notice.error {
  border: 1px solid rgba(216, 87, 69, 0.28);
  background: #fff1ee;
  color: #9f3324;
}

.privacy-panel,
.site-footer,
.owner-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(23, 33, 31, 0.05);
}

.privacy-panel {
  padding: 20px;
}

.privacy-panel h2,
.owner-panel h2 {
  margin: 6px 0 10px;
}

.privacy-panel p,
.privacy-panel li,
.site-footer span,
.owner-panel p {
  color: var(--muted);
  line-height: 1.6;
}

.privacy-panel ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
  padding: 16px 18px;
}

.site-footer div,
.auth-footer {
  display: grid;
  gap: 4px;
}

.auth-footer {
  margin-top: 0;
}

.owner-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 18px;
  background: #f8fbf7;
}

.owner-stats {
  display: grid;
  place-items: center;
  min-width: 150px;
  min-height: 100px;
  border-radius: 8px;
  background: var(--deep);
  color: #ffffff;
}

.owner-stats strong {
  font-size: 2rem;
}

.owner-stats span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 800;
}

.active-view {
  display: block;
}

.grid {
  display: grid;
  gap: 16px;
}

.dashboard-grid {
  grid-template-columns: repeat(12, 1fr);
}

.panel,
.metric,
.course-card,
.quiz-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(23, 33, 31, 0.05);
}

.panel {
  padding: 20px;
}

.metric {
  grid-column: span 3;
  min-height: 128px;
  padding: 18px;
}

.metric strong {
  display: block;
  margin-top: 14px;
  font-size: 2rem;
}

.metric small {
  color: var(--muted);
}

.wide {
  grid-column: span 8;
}

.side {
  grid-column: span 4;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-head h2,
.panel h2,
.quiz-panel h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.section-head p,
.panel p {
  color: var(--muted);
  line-height: 1.6;
}

.progress-track {
  position: relative;
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #e8eee9;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber));
  transition: width 220ms ease;
}

.exam-blueprint {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.blueprint-item {
  display: grid;
  gap: 8px;
  min-height: 120px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf7;
}

.blueprint-item strong {
  color: var(--deep);
}

.blueprint-item span {
  font-weight: 900;
}

.blueprint-item small {
  color: var(--muted);
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 14px;
}

.course-card {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 260px;
  padding: 18px;
}

.course-status {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 14px;
  height: 14px;
  border: 2px solid #d8e3de;
  border-radius: 50%;
}

.course-status.done {
  border-color: var(--green);
  background: var(--green);
}

.course-card h3 {
  margin: 10px 36px 8px 0;
  font-size: 1.15rem;
}

.course-summary {
  color: var(--muted);
  line-height: 1.55;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag {
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--deep);
  font-size: 0.76rem;
  font-weight: 800;
}

.course-open,
.primary-button,
.secondary-button,
.danger-button {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 850;
}

.course-open,
.primary-button {
  border: 0;
  background: var(--deep);
  color: #ffffff;
}

.secondary-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.danger-button {
  border: 1px solid rgba(216, 87, 69, 0.35);
  background: #fff3ef;
  color: #9f3324;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-item:last-child {
  border-bottom: 0;
}

.week {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #eef6f1;
  color: var(--deep);
  font-weight: 900;
}

.resource-list,
.lesson-list,
.score-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.resource-list a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.resource-list a:hover {
  text-decoration: underline;
}

dialog {
  width: min(900px, calc(100vw - 24px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(13, 28, 25, 0.58);
}

.dialog-inner {
  max-height: min(82vh, 900px);
  overflow: auto;
  padding: 22px;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.dialog-head h2 {
  margin: 6px 0 0;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 1.45rem;
  line-height: 1;
}

.lesson-block {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.lesson-block:last-child {
  border-bottom: 0;
}

.lesson-block h3 {
  margin: 0 0 8px;
}

.lesson-block p,
.lesson-block li {
  color: var(--muted);
  line-height: 1.62;
}

.lesson-block ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.quiz-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 16px;
}

.quiz-panel {
  padding: 18px;
}

.topic-button {
  width: 100%;
  min-height: 46px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  padding: 10px 12px;
  font-weight: 800;
}

.topic-button.active {
  border-color: rgba(22, 128, 82, 0.42);
  background: var(--mint);
}

.question-card {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.question-card:last-child {
  border-bottom: 0;
}

.question-card fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.question-card legend {
  margin-bottom: 10px;
  font-weight: 900;
  line-height: 1.42;
}

.question-hint {
  margin: -2px 0 8px;
  color: var(--amber);
  font-size: 0.86rem;
  font-weight: 850;
}

.option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 0;
  color: var(--muted);
  line-height: 1.45;
}

.result-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  background: #f3f7f5;
}

.exam-section {
  padding: 18px 0;
  border-top: 2px solid var(--line);
}

.exam-section h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.exam-section > p {
  margin: 0 0 12px;
  color: var(--muted);
}

.case-study {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid rgba(38, 106, 159, 0.24);
  border-radius: 8px;
  background: #f5f9fb;
}

.case-study h4 {
  margin: 0 0 8px;
}

.case-study > p {
  color: var(--muted);
  line-height: 1.65;
}

.mock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.timer {
  min-width: 86px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff4dd;
  color: #865e12;
  font-weight: 900;
  text-align: center;
}

textarea {
  min-height: 320px;
  padding: 14px;
  resize: vertical;
  line-height: 1.55;
}

.note-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
}

.flash-card {
  min-height: 120px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbf7;
}

.flash-card strong {
  display: block;
  margin-bottom: 8px;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    overflow: hidden;
  }

  .nav-list {
    display: flex;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-item {
    flex: 0 0 auto;
    min-width: 132px;
  }

  .sidebar-footer {
    display: none;
  }

  .hero-panel,
  .quiz-layout,
  .note-grid,
  .exam-blueprint {
    grid-template-columns: 1fr;
  }

  .metric,
  .wide,
  .side {
    grid-column: span 12;
  }
}

@media (max-width: 680px) {
  body {
    overflow-x: hidden;
  }

  .main-content {
    padding: 18px 14px;
    overflow: hidden;
  }

  .topbar {
    display: grid;
  }

  .topbar-actions {
    display: grid;
  }

  .site-footer,
  .owner-panel {
    display: grid;
  }

  .learner-card {
    min-width: 0;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-right: 0;
    overflow: visible;
  }

  .nav-item {
    min-width: 0;
    width: 100%;
  }

  .hero-visual {
    min-height: 245px;
  }

  .privacy-orbit {
    inset: 14px;
    transform: scale(0.82);
  }

  .r-two {
    width: 280px;
  }

  .node {
    transform: scale(0.9);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .metric,
  .wide,
  .side {
    grid-column: auto;
  }
}

@media (max-width: 860px) {
  .auth-page,
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    min-height: 42vh;
  }
}
