/* Shared notices and small helper text for forms and admin pages. */
.form-help,
.empty-state {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.notice-box {
  max-width: 900px;
  margin: 0 0 18px;
  padding: 13px 16px;
  border: 1px solid #806c32;
  border-radius: 8px;
  background: #1a1b24;
  color: #e5d7a8;
  font-size: 13px;
}
.notice-box strong {
  color: #ffe28a;
}
.admin-list:empty {
  min-height: 44px;
}
.admin-list:empty:after {
  content: "Nothing here yet.";
  display: block;
  padding: 12px 15px;
  color: var(--muted);
  font-size: 13px;
}
.admin-row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.admin-row button {
  flex-shrink: 0;
}
@media (max-width: 650px) {
  .notice-box {
    font-size: 12px;
  }
  .admin-row {
    padding: 11px;
  }
}

/* Python Learning Hub heading and progress indicator. */
.python-notes-page {
  max-width: 1120px;
  padding-top: 38px;
  padding-bottom: 38px;
}
.python-heading {
  padding: 30px 32px;
  margin-bottom: 18px;
  border: 1px solid #174258;
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 82% 20%, #0b433d 0, transparent 42%),
    linear-gradient(130deg, #0a1d31, #081828);
}
.python-heading h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.7px;
  margin: 12px 0 8px;
}
.python-heading h1 span {
  color: var(--green);
}
.python-heading p {
  max-width: 780px;
  color: var(--muted);
  margin: 0;
}
.progress-panel {
  padding: 17px 20px;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
}
.progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}
.progress-top > div {
  display: grid;
  gap: 2px;
}
.progress-top > div span {
  color: var(--muted);
  font-size: 12px;
}
.progress-top > strong:last-child {
  color: var(--green);
  font-size: 20px;
}
.progress-track {
  height: 10px;
  border-radius: 8px;
  overflow: hidden;
  background: #142b40;
}
#progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #20c88d, var(--green));
  transition: width 0.25s ease;
}

/* Lesson filters, navigation, and search controls. */
.level-jump-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}
.lesson-level-link {
  padding: 7px 11px;
  border: 1px solid #21516b;
  border-radius: 18px;
  background: #0a1b2c;
  color: #cfe0ee;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.lesson-level-link:hover {
  border-color: var(--green);
  color: var(--green);
}
.resource-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 16px 0;
  padding: 14px 17px;
  border: 1px solid #185546;
  border-radius: 9px;
  background: #091d29;
}
.resource-callout strong {
  color: var(--green);
}
.resource-callout p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.notes-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.65fr) minmax(185px, 0.85fr) auto;
  gap: 10px;
  align-items: end;
  margin: 20px 0 12px;
}
.search-control,
.filter-control {
  display: grid;
  gap: 5px;
  color: #cbd9e8;
  font-size: 12px;
}
.search-control {
  position: relative;
}
.search-control > span {
  position: absolute;
  left: 11px;
  bottom: 7px;
  font-size: 20px;
  color: var(--green);
}
.search-control input,
.filter-control select {
  height: 39px;
  width: 100%;
  border: 1px solid #27445d;
  border-radius: 6px;
  background: #071727;
  color: var(--text);
  padding: 8px 11px;
  font: inherit;
}
.search-control input {
  padding-left: 34px;
}
.search-control input:focus,
.filter-control select:focus {
  outline: 1px solid var(--green);
  border-color: var(--green);
}
.lesson-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
}
.lesson-summary > p {
  margin: 0;
}
.lesson-navigation {
  display: flex;
  gap: 8px;
}
.lesson-navigation .button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

/* Expandable lesson cards and their code examples. */
.lesson-list {
  display: grid;
  gap: 10px;
}
.lesson-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: linear-gradient(130deg, #091a2c, #081727);
  scroll-margin-top: 78px;
}
.lesson-card.is-complete {
  border-color: #177758;
}
.lesson-card details {
  min-width: 0;
}
.lesson-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 60px;
  cursor: pointer;
  list-style: none;
}
.lesson-card summary::-webkit-details-marker {
  display: none;
}
.lesson-card summary:after {
  content: "＋";
  color: var(--green);
  font-size: 19px;
  margin-left: auto;
}
.lesson-card details[open] > summary:after {
  content: "−";
}
.lesson-title {
  font-weight: 650;
  color: #e8f1fa;
}
.lesson-meta {
  color: #8eabc1;
  font-size: 11px;
  white-space: nowrap;
}
.complete-control {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 20px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}
.complete-control input {
  accent-color: var(--green);
  width: 15px;
  height: 15px;
}
.lesson-body {
  padding: 0 5px 17px 0;
}
.lesson-body h3 {
  margin: 15px 0 7px;
  color: var(--green);
  font-size: 13px;
}
.lesson-explanation,
.lesson-tip,
.challenge-question {
  margin: 0;
  color: #cedbe8;
  font-size: 13px;
}
.lesson-body pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow-x: auto;
  margin: 0;
  padding: 13px 15px;
  border: 1px solid #193650;
  border-radius: 7px;
  background: #04101d;
  color: #d9f3e8;
  font:
    12px/1.65 Consolas,
    "Courier New",
    monospace;
}
.lesson-body .numbered-code {
  display: block;
}
.lesson-body .code-line {
  position: relative;
  white-space: pre-wrap;
}
.lesson-body .code-line::before {
  display: inline-block;
  width: 2.5em;
  padding-right: 0.8em;
  margin-right: 0.8em;
  border-right: 1px solid #27445d;
  color: #7794ac;
  content: attr(data-line-number);
  text-align: right;
  user-select: none;
}
.lesson-body .expected-output {
  background: #071720;
  color: #b9e8d2;
}
.lesson-tip {
  padding-left: 11px;
  border-left: 2px solid #e6ad58;
}
.answer-toggle {
  margin-top: 10px;
}
.challenge-answer {
  margin-top: 9px !important;
}
.curriculum-footnote {
  margin: 20px 0 0;
  color: #829caf;
  font-size: 12px;
  text-align: center;
}
.storage-warning {
  padding: 10px 13px;
  border: 1px solid #806c32;
  border-radius: 7px;
  color: #ffe28a;
  font-size: 13px;
}

/* Images used inside skills and project cards. */
.skill-card .skill-image {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
}
.skill-card .skill-image-wide {
  width: 100%;
  height: 90px;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line);
  background: #071323;
}
.project-art img {
  width: 100%;
  height: 100%;
  padding: 8px;
  object-fit: contain;
  border-radius: inherit;
}

@media (max-width: 800px) {
  .notes-toolbar {
    grid-template-columns: 1fr 1fr;
  }
  .search-control {
    grid-column: span 2;
  }
  .notes-toolbar > .button {
    justify-self: start;
  }
}
@media (max-width: 580px) {
  .python-notes-page {
    padding-top: 22px;
  }
  .python-heading {
    padding: 22px 18px;
  }
  .resource-callout {
    align-items: flex-start;
    flex-direction: column;
  }
  .lesson-card {
    gap: 7px;
    padding: 0 11px;
  }
  .lesson-card summary {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 10px 0;
  }
  .lesson-card summary:after {
    position: absolute;
    right: 43px;
  }
  .lesson-title {
    font-size: 13px;
  }
  .lesson-meta {
    white-space: normal;
  }
  .complete-control {
    font-size: 10px;
  }
  .lesson-summary {
    align-items: flex-start;
    flex-direction: column;
  }
  .lesson-navigation {
    width: 100%;
    justify-content: space-between;
  }
  .lesson-navigation .button {
    padding: 8px 10px;
    font-size: 11px;
  }
  .notes-toolbar {
    grid-template-columns: 1fr;
  }
  .search-control {
    grid-column: auto;
  }
  .progress-panel {
    padding: 14px;
  }
  .level-jump-links {
    gap: 6px;
  }
  .lesson-level-link {
    font-size: 11px;
  }
}
.theme-toggle {
  white-space: nowrap;
  min-width: 76px;
  padding: 6px 10px;
}

/* Topic practice questions and quiz panels. */
.practice-section,
.quiz-panel {
  margin-top: 38px;
}
.practice-heading {
  margin-bottom: 16px;
}
.practice-topic-list {
  display: grid;
  gap: 10px;
}
.practice-topic {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  overflow: hidden;
}
.practice-topic > details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 17px;
  cursor: pointer;
  list-style: none;
}
.practice-topic > details > summary::-webkit-details-marker {
  display: none;
}
.practice-topic > details > summary:after {
  content: "＋";
  color: var(--green);
  font-size: 19px;
}
.practice-topic > details[open] > summary:after {
  content: "−";
}
.practice-topic .lesson-body {
  padding: 0 17px 18px;
}
.practice-questions {
  display: grid;
  gap: 13px;
  padding-left: 28px;
}
.practice-question {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #071727;
}
.practice-prompt {
  margin: 0 0 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.practice-hint,
.practice-io,
.answer-explanation {
  margin: 5px 0;
  color: var(--muted);
  font-size: 12px;
}
.practice-answer {
  margin-top: 9px;
}
.practice-answer[hidden] {
  display: none;
}
.answer-explanation {
  color: #b6dfcf;
}
.quiz-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
}
.quiz-best {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 650;
}

/* Quiz answer choices, feedback, and score controls. */
.quiz-question {
  min-width: 0;
  margin: 10px 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.quiz-question legend {
  padding: 0 6px;
  font-size: 13px;
  font-weight: 650;
}
.quiz-choice {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.quiz-choice input {
  accent-color: var(--green);
}
.quiz-feedback {
  min-height: 18px;
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 650;
}
.quiz-correct {
  border-color: #168566;
}
.quiz-correct .quiz-feedback {
  color: var(--green);
}
.quiz-incorrect {
  border-color: #89505a;
}
.quiz-incorrect .quiz-feedback {
  color: #ffb5b5;
}
.quiz-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.quiz-actions strong {
  color: var(--green);
}

/* Colors for the optional light theme. */
html[data-theme="light"] {
  --bg: #f4f7fb;
  --panel: #fff;
  --panel2: #edf3f8;
  --line: #cbd8e5;
  --text: #14283a;
  --muted: #526a80;
}
html[data-theme="light"] body {
  background: var(--bg);
  color: var(--text);
}
html[data-theme="light"] .site-header {
  background: #ffffffed;
  border-bottom-color: var(--line);
}
html[data-theme="light"] .navigation a {
  color: #294157;
}
html[data-theme="light"] .brand {
  color: #14283a;
}
html[data-theme="light"] .python-heading {
  background:
    radial-gradient(ellipse at 82% 20%, #c9f1e4 0, transparent 42%),
    linear-gradient(130deg, #fff, #edf4fa);
}
html[data-theme="light"] .progress-track {
  background: #dce7ef;
}
html[data-theme="light"] .lesson-level-link {
  background: #fff;
  color: #294157;
  border-color: #bdd0df;
}
html[data-theme="light"] .resource-callout {
  background: #f1faf6;
  border-color: #a9d8c6;
}
html[data-theme="light"] .search-control input,
html[data-theme="light"] .filter-control select {
  background: #fff;
  color: var(--text);
  border-color: #bdcddd;
}
html[data-theme="light"] .lesson-card,
html[data-theme="light"] .practice-topic {
  background: #fff;
}
html[data-theme="light"] .lesson-title,
html[data-theme="light"] .practice-prompt {
  color: var(--text);
}
html[data-theme="light"] .lesson-explanation,
html[data-theme="light"] .lesson-tip,
html[data-theme="light"] .challenge-question {
  color: #334d63;
}
html[data-theme="light"] .lesson-body pre {
  background: #f0f5f8;
  color: #18344b;
  border-color: #d1dee8;
}
html[data-theme="light"] .lesson-body .code-line::before {
  border-right-color: #bdcddd;
  color: #647d92;
}
html[data-theme="light"] .lesson-body .expected-output {
  background: #e9f5ef;
  color: #254f3d;
}
html[data-theme="light"] .practice-question {
  background: #f6f9fc;
}
html[data-theme="light"] .quiz-panel {
  background: #fff;
}
html[data-theme="light"] .quiz-choice {
  color: #334d63;
}
html[data-theme="light"] .calc-utility {
  background: #eaf3f7;
  color: #126447;
}
@media (max-width: 650px) {
  .theme-toggle {
    min-width: auto;
    padding: 6px 8px;
    font-size: 11px;
  }
  .practice-topic > details > summary {
    align-items: flex-start;
  }
  .quiz-panel {
    padding: 13px;
  }
  .practice-questions {
    padding-left: 22px;
  }
  .practice-question {
    padding: 10px;
  }
}

/* Certificate gallery and Python theory questions. */
.certificate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 18px;
}
.certificate-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(145deg, var(--panel), #071424);
}
.certificate-image-link {
  display: block;
  padding: 12px;
  background: #fff;
}
.certificate-image-link img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: contain;
}
.certificate-info {
  padding: 15px;
}
.certificate-info h3 {
  margin: 0 0 5px;
  font-size: 17px;
}
.certificate-info p {
  min-height: 42px;
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 13px;
}
.theory-section {
  margin-top: 38px;
}
.theory-search {
  max-width: 620px;
  margin: 12px 0;
}
.theory-list {
  display: grid;
  gap: 9px;
}
.theory-group,
.theory-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}
.theory-group > summary {
  padding: 13px 16px;
  color: var(--green);
  font-weight: 700;
  cursor: pointer;
  list-style-position: inside;
}
.theory-questions {
  display: grid;
  gap: 7px;
  padding: 0 12px 12px;
}
.theory-item {
  background: #071727;
}
.theory-item > summary {
  padding: 10px 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.theory-item > p {
  margin: 0;
  padding: 0 12px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.theory-count {
  margin: 9px 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}
.lesson-rules {
  display: grid;
  gap: 7px;
  margin: 8px 0 14px;
  padding-left: 22px;
  color: #cedbe8;
  font-size: 13px;
}
html[data-theme="light"] .theory-item {
  background: #f6f9fc;
}
html[data-theme="light"] .theory-item > summary {
  color: var(--text);
}
html[data-theme="light"] .lesson-rules {
  color: #334d63;
}
