:root {
  --ink: #183c35;
  --muted: #62716b;
  --paper: #f8f8f2;
  --green: #1d6651;
  --line: #dfe5db;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 3px solid #b05a22;
  outline-offset: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  padding: 10px;
  background: white;
  z-index: 10;
}

.skip-link:focus {
  top: 10px;
}

.site-header,
main,
.site-footer {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 36px;
}

.site-header {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -.5px;
}

.brand strong {
  color: var(--green);
}

.brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 1.9px;
  color: var(--muted);
  margin-top: 2px;
}

.brand-icon {
  width: 43px;
  height: 45px;
  border-radius: 13px 13px 13px 3px;
  background: var(--green);
  color: #f2f8d9;
  display: grid;
  place-content: center;
  font: 29px Georgia, serif;
  position: relative;
}

.brand-icon span {
  position: absolute;
  right: 7px;
  bottom: 5px;
  font-size: 15px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  font-size: 12px;
  font-weight: 600;
}

nav a:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}

nav a:last-child {
  color: var(--green);
}

.hero {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 45px;
  align-items: center;
  padding-block: 70px 52px;
}

.eyebrow {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1.7px;
  margin: 0 0 18px;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  margin-right: 6px;
}

h1 {
  font-size: clamp(36px, 4vw, 53px);
  line-height: 1.23;
  letter-spacing: -2px;
  font-weight: 650;
  margin: 0 0 24px;
}

h1 em {
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.hero-description {
  max-width: 470px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  justify-content: space-between;
  gap: 32px;
  padding: 14px 21px;
  background: var(--green);
  color: white;
  font-size: 12px;
  font-weight: 650;
  border-radius: 7px;
}

.button:hover {
  background: #164f3f;
}

.button span {
  font-size: 17px;
  line-height: 1;
}

.release-note {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
}

.release-note strong {
  font-weight: 500;
  color: var(--ink);
}

.science-art {
  position: relative;
  min-height: 365px;
  overflow: hidden;
  border: 1px solid #dce6ce;
  border-radius: 20px;
  background: radial-gradient(ellipse at 50% 50%, #e0edce, #edf2e3 60%, #e9efde);
}

.art-topline {
  display: flex;
  justify-content: space-between;
  position: absolute;
  inset: 20px 22px auto;
  font-size: 9px;
  color: #4c6a56;
  letter-spacing: 1px;
}

.art-topline span:last-child {
  letter-spacing: 0;
}

.ph-sphere {
  position: absolute;
  width: 180px;
  height: 180px;
  top: 70px;
  left: calc(50% - 90px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 23%, #fcffe9, #d6e994 48%, #9fcf65 80%, #83b760);
  box-shadow: inset -9px -14px 24px #629a4b38, 0 22px 38px #527a4130;
}

.ph-sphere>span {
  font-size: 9px;
  letter-spacing: 3px;
}

.ph-sphere strong {
  font-family: Georgia, serif;
  font-size: 73px;
  font-weight: 400;
  line-height: 1.1;
}

.ph-sphere strong span {
  font-size: 43px;
}

.ph-sphere small {
  font-size: 10px;
}

.orbit {
  position: absolute;
  top: 91px;
  left: calc(50% - 142px);
  width: 284px;
  height: 140px;
  border: 1px solid #6e966c40;
  border-radius: 50%;
  transform: rotate(-32deg);
}

.orbit-two {
  transform: rotate(40deg);
}

.molecule {
  position: absolute;
  border: 1px solid #b9ccb0;
  background: #f6faed;
  font-family: Georgia, serif;
  padding: 6px 11px;
  border-radius: 50%;
  font-size: 18px;
}

.molecule-one {
  left: 15%;
  top: 100px;
}

.molecule-two {
  right: 13%;
  top: 210px;
}

.ph-legend {
  position: absolute;
  bottom: 40px;
  left: 13%;
  width: 74%;
}

.ph-bar {
  height: 7px;
  border-radius: 6px;
  background: linear-gradient(90deg, #dc765d, #e9b765, #d4cb6b, #85ad76, #5b9b95, #7584bb);
}

.ph-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 9px;
}

.art-caption {
  position: absolute;
  inset: auto 0 8px;
  text-align: center;
  font-size: 7px;
  letter-spacing: 1px;
  color: #516949;
}

.notice {
  display: flex;
  gap: 20px;
  align-items: center;
  border-block: 1px solid var(--line);
  padding: 16px 0;
}

.notice-label {
  flex-shrink: 0;
  font-size: 9px;
  letter-spacing: 1px;
  font-weight: 750;
}

.notice p {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}

.topic-section,
.journey-section {
  padding-top: 52px;
}

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

.section-heading .eyebrow {
  margin-bottom: 8px;
  color: var(--green);
}

h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.75px;
}

.subject-tag {
  border: 1px solid #c6d5c5;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 9px;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.topic-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.topic-card {
  background: #e9eee3;
  padding: 28px 30px;
  border-radius: 12px;
}

.card-index {
  font-size: 9px;
  letter-spacing: 2px;
  color: #577052;
}

.topic-card h3 {
  font-family: Georgia, serif;
  font-size: 38px;
  line-height: 1.25;
  font-weight: 400;
  margin: 15px 0;
}

.topic-card h3 span {
  color: var(--green);
}

.topic-card p,
.reading-card>p:not(.eyebrow) {
  font-size: 12px;
  color: var(--muted);
}

.term-tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-block: 18px;
}

.term-tags span {
  border: 1px solid #cad6c2;
  border-radius: 5px;
  padding: 3px 10px;
  font-size: 11px;
}

.planned-label {
  font-size: 10px;
  color: #5c685e;
}

.reading-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 30px;
  background: #fffefa;
}

.reading-card .eyebrow {
  color: var(--muted);
  font-size: 9px;
}

blockquote {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 26px;
  line-height: 1.5;
  color: var(--green);
}

.source-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 16px;
}

.source-note>span {
  padding: 1px 6px;
  background: #f2e5cd;
  color: #775020;
  font-size: 8px;
  letter-spacing: 1px;
  border-radius: 3px;
}

.source-note p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.muted {
  color: var(--muted);
  font-size: 10px;
}

.journey-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.journey-grid article {
  padding: 26px;
}

.journey-grid article+article {
  border-left: 1px solid var(--line);
}

.step-number {
  font-family: Georgia, serif;
  font-size: 23px;
  color: #7a8e71;
}

.journey-grid h3 {
  font-size: 15px;
  font-weight: 600;
  margin-block: 15px 8px;
}

.journey-grid p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
}

.progress-section {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 60px;
  margin-block: 55px;
  padding: 32px;
  background: #eff1e9;
  border-radius: 12px;
}

.progress-section .eyebrow {
  margin-bottom: 10px;
}

.progress-section h2 {
  font-size: 23px;
}

.progress-section p:not(.eyebrow) {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 0;
}

.progress-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.progress-list li {
  display: grid;
  grid-template-columns: 113px 1fr;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  font-size: 11px;
}

.progress-list li+li {
  border-top: 1px solid #dce2d6;
}

.state {
  font-size: 9px;
  font-weight: 650;
}

.ready {
  color: #24654e;
}

.next {
  color: #71522a;
}

.pending {
  color: #667267;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 22px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 10px;
  color: var(--muted);
}

.site-footer span span {
  padding-inline: 6px;
}

@media (max-width: 850px) {

  .site-header,
  main,
  .site-footer {
    padding-inline: 24px;
  }

  .site-header {
    min-height: 100px;
    flex-wrap: wrap;
    padding-block: 18px;
    gap: 18px;
  }

  nav {
    gap: 20px;
  }

  .hero {
    gap: 24px;
    padding-top: 40px;
  }

  h1 {
    font-size: 37px;
  }

  .science-art {
    min-height: 340px;
  }

  .hero-actions {
    gap: 12px;
    flex-wrap: wrap;
  }

  .progress-section {
    gap: 24px;
  }
}

@media (max-width: 620px) {

  .site-header,
  main,
  .site-footer {
    padding-inline: 20px;
  }

  nav {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    font-size: 10px;
  }

  .hero,
  .topic-layout,
  .progress-section {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-block: 36px 28px;
    gap: 30px;
  }

  h1 {
    font-size: 39px;
  }

  .hero-description {
    font-size: 13px;
  }

  .science-art {
    min-height: 355px;
  }

  .notice {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  h2 {
    font-size: 23px;
  }

  .topic-section,
  .journey-section {
    padding-top: 36px;
  }

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

  .journey-grid article+article {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .progress-section {
    margin-block: 36px;
    padding: 24px;
  }

  .progress-list li {
    grid-template-columns: 100px 1fr;
  }

  .site-footer {
    flex-direction: column;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Màn hình học và quản trị dùng cùng màu, form và thẻ nội dung. */
button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button.button {
  border: 0;
  line-height: 1.6;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #b05a22;
  outline-offset: 3px;
}

nav {
  gap: 18px;
}

.site-header {
  gap: 16px;
}

main {
  min-height: 65vh;
  padding-bottom: 32px;
}

.page-heading {
  padding-block: 44px 25px;
}

.page-heading h1 {
  font-size: clamp(30px, 4vw, 44px);
  margin-bottom: 14px;
}

.page-heading p:not(.eyebrow) {
  color: var(--muted);
  max-width: 800px;
  font-size: 14px;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  background: #e5eee3;
  border-radius: 4px;
  font-size: 10px;
  color: #375938;
}

.badge.builtin {
  background: #f6e7cd;
  color: #765124;
}

.badge.good {
  background: #dcefd9;
}

.badge.wrong {
  background: #f6ded8;
  color: #933729;
}

.content-card {
  padding: 28px;
  background: #fffefa;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 22px;
  overflow-wrap: anywhere;
}

.content-card h2 {
  margin-block: 12px;
  font-size: 23px;
}

h2 small {
  font-family: system-ui, sans-serif;
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

.content-card p {
  font-size: 13px;
}

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

.cards-grid .content-card {
  margin: 0;
}

.example {
  font-size: 19px;
  border-left: 2px solid #bdd0ac;
  padding-left: 14px;
  margin-block: 20px;
}

.subtle-link,
td a,
.muted a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 12px;
}

label {
  display: block;
  font-size: 12px;
  margin: 16px 0 6px;
  font-weight: 600;
}

input:not([type=radio]):not([type=checkbox]):not([type=hidden]):not([type=range]),
textarea,
select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #bdc9b9;
  border-radius: 6px;
  background: white;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

form>.button {
  margin-top: 18px;
}

.inline {
  display: flex;
  gap: 12px;
}

.inline input {
  flex: 1;
  min-width: 0;
}

.inline .button {
  flex-shrink: 0;
  align-items: center;
}

.search-form {
  max-width: 600px;
}

.toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-block: 22px;
}

.toolbar form {
  margin: 0;
}

.toolbar form>.button {
  margin: 0;
}

.button.secondary {
  color: var(--green);
  background: #e9eee3;
  border: 1px solid #cad7bf;
}

.button.danger {
  color: #873c2b;
  background: #f5e3d9;
}

.text-button {
  padding: 4px;
  background: none;
  color: var(--green);
  border: 0;
  text-decoration: underline;
  font-size: 12px;
}

.flash {
  margin-block: 18px;
  border: 1px solid #bbd2ad;
  background: #e8f0e0;
  padding: 15px 20px;
  border-radius: 8px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.flash.error {
  border-color: #dfb7a6;
  background: #faece4;
  color: #873f2b;
}

.teacher-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

.teacher-bar a {
  text-decoration: underline;
}

.narrow {
  max-width: 520px;
}

.empty {
  padding: 28px;
  color: var(--muted);
  border: 1px dashed #c5cfbd;
  border-radius: 10px;
  margin-block: 22px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-block: 24px;
}

.stats-grid>div {
  padding: 20px;
  border: 1px solid var(--line);
  background: #f0f3e9;
  border-radius: 10px;
}

.stats-grid strong {
  font-size: 30px;
  font-weight: 500;
  display: block;
}

.stats-grid span {
  font-size: 11px;
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tabs a {
  padding: 9px 14px;
  font-size: 12px;
  border: 1px solid #d3dccb;
  border-radius: 6px;
}

.tabs a[aria-current=page] {
  background: #e1ecd5;
  font-weight: 650;
}

.review-row {
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-block: 24px;
}

.review-number {
  font-size: 26px;
  font-family: Georgia, serif;
  color: #718367;
}

.review-body {
  flex: 1;
}

.review-body h2 {
  font-size: 24px;
}

.review-body p {
  margin: 6px 0;
  font-size: 12px;
}

.quiz-question {
  min-width: 0;
}

.quiz-question legend {
  padding-inline: 10px;
  font-size: 12px;
  font-weight: 700;
}

.question-text {
  font-size: 21px !important;
  font-family: Georgia, serif;
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.options label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

.options label:has(input:checked) {
  background: #e2edd9;
  border-color: #6d9457;
}

.option-letter {
  color: var(--muted);
  font-size: 11px;
}

.reading-text {
  font-family: Georgia, serif;
  font-size: 23px;
  line-height: 1.9;
  white-space: pre-wrap;
}

.term-button {
  padding: 1px 4px;
  border: 0;
  border-bottom: 1px dotted var(--green);
  background: #edf1d8;
  color: var(--green);
  font: inherit;
}

.definition {
  padding: 15px;
  background: #eef2e5;
  border-radius: 7px;
  min-height: 50px;
}

summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

details[open] summary {
  margin-bottom: 20px;
}

.lab-layout,
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.ph-vessel {
  width: 210px;
  height: 240px;
  border: 3px solid #678167;
  border-top: 0;
  border-radius: 12px 12px 70px 70px;
  margin: 15px auto 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #c4df9d;
}

.ph-vessel span {
  font-size: 9px;
  letter-spacing: 2px;
}

.ph-vessel strong {
  font: 72px Georgia, serif;
}

.ph-vessel small {
  font-size: 12px;
}

input[type=range] {
  width: 100%;
  accent-color: var(--green);
  min-height: 40px;
}

.section-title {
  margin-block: 36px 18px;
}

.table-scroll {
  overflow-x: auto;
  margin-block: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
  background: #fffefa;
}

th {
  background: #eaf0e3;
  font-weight: 650;
}

td,
th {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

td {
  min-width: 95px;
  max-width: 440px;
  overflow-wrap: anywhere;
}

caption {
  text-align: left;
  padding: 12px;
  font-size: 12px;
}

.check-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
}

.check-label input {
  margin-top: 4px;
}

.data-banner {
  padding: 18px;
  border: 1px solid #96b78c;
  background: #e2efdc;
  border-radius: 8px;
  font-size: 13px;
}

.practice-banner {
  border-color: #dcbf8a;
  background: #f8ebcf;
  color: #795420;
}

.chart-legend {
  display: flex;
  gap: 20px;
  font-size: 12px;
}

.chart-legend span:first-child {
  color: #5b7052;
}

.chart-legend span:last-child {
  color: var(--green);
}

.chart-group {
  margin-top: 24px;
}

.chart-line {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  font-size: 11px;
}

.chart-track {
  height: 23px;
  background: #eef0e7;
  border-radius: 4px;
  overflow: hidden;
}

.chart-bar {
  height: 100%;
  background: #b3c5a4;
}

.chart-bar.post {
  background: var(--green);
}

pre {
  background: #eef1e7;
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 12px;
}

@media (max-width: 850px) {
  .site-header {
    flex-wrap: wrap;
    padding-block: 20px;
  }
}

@media (max-width: 620px) {
  nav {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 12px 20px;
  }

  .cards-grid,
  .lab-layout,
  .form-grid,
  .options {
    grid-template-columns: 1fr;
  }

  .content-card {
    padding: 21px;
  }

  .stats-grid {
    gap: 8px;
  }

  .stats-grid>div {
    padding: 12px;
  }

  .stats-grid strong {
    font-size: 24px;
  }

  .review-row {
    flex-wrap: wrap;
    gap: 14px;
  }

  .review-body {
    min-width: 70%;
  }

  .review-row>form {
    margin-left: 30px;
  }

  .review-body h2 small {
    display: block;
  }

  .teacher-bar {
    gap: 10px;
  }

  .reading-text {
    font-size: 21px;
  }

  .notice code {
    white-space: normal;
  }
}

/* Nhãn chỉ dành cho trình đọc màn hình (ô đổi tên học viên trong bảng lớp). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
