@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&display=swap");
.flow-svg {
  display: block;
  width: 100%;
  height: auto;
}
.flow-links summary {
  cursor: pointer;
  margin: 0;
}
.lesson-panel {
  min-width: 0;
}
:root {
  font-family: "DM Sans", Arial, sans-serif;
  color: #263b32;
  background: #f7f9f7;
  font-synthesis: none;
  --green: #215d46;
  --muted: #69796f;
  --line: #e0e7e1;
  --mint: #edf5ed;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  border: 0;
  background: none;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #66a886;
  outline-offset: 4px;
}
a {
  color: inherit;
  text-decoration: none;
}
p {
  line-height: 1.65;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
.topbar {
  height: 84px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  background: #fff;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -1.3px;
}
.brand-icon {
  width: 37px;
  height: 37px;
  border-radius: 11px;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-style: italic;
}
.brand-caption {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
  border-left: 1px solid var(--line);
  margin-left: 12px;
  padding-left: 22px;
}
.topbar nav {
  display: flex;
  align-items: center;
  gap: 23px;
}
.text-button {
  font-size: 13px;
  font-weight: 550;
  padding: 9px 0;
}
.text-button:hover {
  color: #248154;
}
.button {
  background: var(--green);
  color: white;
  padding: 15px 20px;
  border-radius: 7px;
  font-weight: 550;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 23px;
  transition: background 0.15s;
}
.button:hover {
  background: #144a35;
}
.button.small {
  padding: 11px 17px;
  font-size: 13px;
}
main {
  max-width: 1440px;
  padding: 45px 5% 0;
  margin: auto;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 35px;
}
.eyebrow,
.section-label {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 1.35px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow {
  margin-bottom: 17px;
}
.live-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  background: #5c9970;
  border-radius: 50%;
  margin-right: 4px;
}
h1 {
  font-weight: 450;
  font-size: 44px;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 15px;
}
h1 em {
  font-family: Georgia, serif;
  font-weight: 400;
  color: var(--green);
}
.intro > div > p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.intro-note {
  padding-right: 48px;
  transform: rotate(-3deg);
}
.intro-note p {
  font-size: 12px !important;
  line-height: 1.8 !important;
}
.note-drawing {
  font-family: Georgia, serif;
  font-size: 33px;
  letter-spacing: 6px;
  display: block;
  color: #749581;
  margin-bottom: 9px;
}
.workspace {
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 5px 26px #263b3203;
}
.problem-panel {
  padding: 28px 25px;
  background: #fcfdfb;
  border-right: 1px solid var(--line);
}
.number-label {
  color: #859388;
  letter-spacing: 0;
  font-size: 10px;
}
.problem-panel h2 {
  font-size: 20px;
  letter-spacing: -0.5px;
  margin: 23px 0 10px;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.problem-panel > .muted {
  font-size: 12px;
  margin-bottom: 24px;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 550;
  margin: 18px 0 8px;
}
input,
select,
textarea {
  border: 1px solid #dbe3dc;
  border-radius: 6px;
  background: white;
  color: #263b32;
  padding: 12px;
  width: 100%;
  font-size: 13px;
}
textarea {
  resize: vertical;
  min-height: 230px;
  line-height: 1.65;
  font-size: 12px;
}
textarea::placeholder {
  color: #8a958d;
}
.input-meta {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #829086;
  margin: 6px 0 24px;
}
.generate {
  width: 100%;
  font-size: 12px;
  margin-top: 22px;
  padding: 14px 9px;
  gap: 15px;
}
.small-copy {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin: 10px 0;
}
.try-example {
  border-top: 1px solid var(--line);
  margin-top: 25px;
  padding-top: 23px;
}
.try-example > button {
  display: flex;
  justify-content: space-between;
  padding: 13px 0 0;
  width: 100%;
  font-size: 13px;
  font-weight: 550;
}
.try-example .section-label {
  font-size: 9px;
  color: #7a887e;
}
.learning-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 35px;
}
.learning-note > span {
  font-size: 23px;
  color: #679274;
}
.learning-note p {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}
.learning-note strong {
  color: #4c6555;
  font-weight: 550;
}
.lesson-heading {
  display: flex;
  justify-content: space-between;
  padding: 28px 33px 23px;
  align-items: center;
}
.sample-badge {
  font-size: 8px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  letter-spacing: 0.7px;
  color: #7a887e;
}
.lesson-heading h2 {
  font-size: 29px;
  margin: 20px 0 10px;
  letter-spacing: -0.8px;
  font-weight: 550;
}
.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tag {
  font-size: 10px;
  padding: 4px 8px;
  background: #f2f4f1;
  color: #627064;
  border-radius: 4px;
}
.tag:first-child {
  background: #eaf5ec;
  color: #387648;
  text-transform: capitalize;
}
.tag.model-tag {
  background: #f0f3f7;
  color: #5b6b7a;
}
.lesson-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.danger {
  color: #ae3f31;
}
.danger:hover {
  color: #8c2f24;
}
.icon-button {
  font-size: 23px;
  color: #6a7d70;
  padding: 6px 12px;
  border-radius: 6px;
}
.icon-button:hover {
  background: var(--mint);
}
.tabs {
  display: flex;
  border-top: 1px solid #eef1ed;
  border-bottom: 1px solid var(--line);
  padding: 0 33px;
  gap: 25px;
  overflow-x: auto;
  white-space: nowrap;
}
.tabs button {
  font-size: 11px;
  padding: 17px 0 15px;
  color: #7a867e;
  border-bottom: 2px solid transparent;
}
.tabs button[aria-selected="true"] {
  color: var(--green);
  font-weight: 650;
  border-color: var(--green);
}
#lesson-content {
  padding: 29px 33px;
  min-height: 475px;
}
#lesson-content > p {
  font-size: 13px;
  color: var(--muted);
  max-width: 660px;
}
.content-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #7b887e;
  margin: 0 0 18px;
  font-weight: 600;
}
.principle {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 11px;
  margin: 21px 0;
}
.principle-index {
  border: 1px solid var(--line);
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  font-size: 10px;
  border-radius: 50%;
  color: #73917b;
}
.principle h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 3px 0 7px;
}
.principle p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.75;
}
.insight {
  background: var(--mint);
  border-radius: 7px;
  padding: 20px 23px;
  margin-top: 27px;
}
.insight .content-label {
  color: #64816c;
  font-size: 9px;
  margin-bottom: 10px;
}
.insight h3 {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.4px;
  margin-bottom: 9px;
}
.insight p {
  font-size: 12px;
  color: #5c7563;
  margin: 0;
}
.analogy {
  border-left: 2px solid #afc8b4;
  padding-left: 14px;
  margin-top: 15px !important;
}
.lesson-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 33px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  gap: 12px;
}
.lesson-footer > span {
  font-size: 9px;
  color: #89948d;
}
.lesson-footer button {
  font-size: 11px;
  color: var(--green);
}
.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 10px;
  color: #8a958e;
  padding: 24px 0 30px;
}
.notice {
  font-size: 12px;
  border-left: 3px solid #b49960;
  background: #fbf6e9;
  padding: 13px 18px;
  margin-bottom: 20px;
  line-height: 1.6;
}
.map-root {
  background: var(--green);
  color: white;
  border-radius: 8px;
  padding: 17px 22px;
  width: max-content;
  max-width: 100%;
  margin: 20px auto 30px;
  font-size: 18px;
}
.map-branches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 23px;
  position: relative;
}
.map-branches:before {
  content: "";
  position: absolute;
  left: 50%;
  top: -30px;
  height: 20px;
  width: 1px;
  background: #a9c2ad;
}
.map-branch {
  border-left: 2px solid #a9c2ad;
  padding-left: 17px;
  position: relative;
}
.map-branch:before {
  content: "";
  position: absolute;
  left: -2px;
  top: 0;
  width: 15px;
  height: 2px;
  background: #a9c2ad;
}
.map-branch summary {
  font-size: 13px;
  font-weight: 600;
  padding: 10px;
  background: var(--mint);
  border-radius: 5px;
  cursor: pointer;
}
.map-branch ul {
  padding-left: 23px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.map-branch li {
  padding: 6px 0;
}
.map-caption {
  text-align: center;
  font-size: 11px !important;
  margin: 25px auto !important;
}
.flow-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.flow-nodes {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.flow-node {
  border: 1px solid #d5e1d8;
  border-radius: 7px;
  padding: 12px 15px;
  font-size: 12px;
  background: #f8fbf7;
  text-align: left;
}
.flow-node strong {
  display: block;
  font-size: 9px;
  color: #819286;
  margin-bottom: 6px;
  font-weight: 400;
}
.flow-node.decision {
  background: #faf4e4;
  border-color: #e3d4aa;
}
.flow-node.start,
.flow-node.end {
  border-radius: 24px;
  background: #edf5ee;
}
.flow-node.active {
  outline: 2px solid #54866a;
}
.flow-links {
  padding: 13px;
  background: #f6f8f5;
  margin-top: 18px;
  border-radius: 6px;
}
.flow-links p {
  font-size: 11px;
  margin: 7px 0;
  color: #607264;
}
.trace {
  position: sticky;
  top: 20px;
  height: max-content;
}
.trace h3 {
  font-size: 15px;
}
.trace p {
  font-size: 12px;
  color: var(--muted);
}
pre {
  background: #213c30;
  color: #e9f3ea;
  border-radius: 7px;
  padding: 20px;
  font-size: 12px;
  line-height: 1.9;
  overflow-x: auto;
  white-space: pre;
  tab-size: 4;
}
.trace pre {
  font-size: 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.trace-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}
.trace-controls button {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px 11px;
  font-size: 12px;
}
.trace-controls span {
  font-size: 11px;
  color: var(--muted);
}
.complexity-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin: 24px 0;
}
.complexity-metrics article {
  border-top: 2px solid #78a085;
  padding-top: 17px;
}
.complexity-metrics strong {
  font-family: Georgia, serif;
  font-size: 36px;
  font-weight: 400;
  display: block;
  margin-bottom: 10px;
}
.complexity-metrics p {
  font-size: 12px;
  color: var(--muted);
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th,
td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
}
th {
  font-size: 10px;
  color: #77847b;
  font-weight: 500;
}
.bar {
  height: 5px;
  background: #7caa8b;
  border-radius: 4px;
  margin-top: 6px;
  min-width: 2px;
}
.comparison {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  padding: 16px 0;
}
.code-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.code-top .content-label {
  margin: 0;
}
.recall-question {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.recall-question summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}
.recall-question p {
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0 0;
}
.edge-list {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  padding-left: 18px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  width: 440px;
  max-width: calc(100vw - 32px);
  color: #263b32;
  box-shadow: 0 20px 90px #102e3029;
}
dialog::backdrop {
  background: #18332666;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font-size: 25px;
  letter-spacing: -0.8px;
  margin: 23px 0 10px;
}
.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.full {
  width: 100%;
  margin-top: 18px;
}
.error {
  color: #ae3f31;
  font-size: 12px;
  line-height: 1.5;
}
.library-item {
  width: 100%;
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.library-open {
  flex: 1;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
}
.library-item span {
  font-size: 11px;
  color: var(--muted);
}
.library-delete {
  font-size: 11px;
  color: #ae3f31;
  padding: 8px 4px;
  flex-shrink: 0;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #214e3a;
  color: #fff;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 10;
  max-width: 90vw;
}
body.busy .lesson-panel {
  opacity: 0.55;
}
body.busy .lesson-panel button {
  pointer-events: none;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1000px) {
  .workspace {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .problem-panel {
    padding: 25px 20px;
  }
  .tabs {
    gap: 20px;
    padding: 0 22px;
  }
  #lesson-content,
  .lesson-heading {
    padding-left: 22px;
    padding-right: 22px;
  }
  .lesson-footer {
    margin: 0 22px;
  }
  .intro-note {
    padding-right: 0;
  }
  .flow-layout {
    grid-template-columns: 1fr;
  }
  .trace {
    position: static;
  }
  .brand-caption {
    display: none;
  }
}
@media (max-width: 700px) {
  .topbar {
    height: 68px;
    padding: 0 20px;
  }
  .brand {
    font-size: 24px;
  }
  .topbar nav {
    gap: 13px;
  }
  .topbar .text-button {
    font-size: 10px;
  }
  .button.small {
    font-size: 11px;
    padding: 9px 12px;
    gap: 9px;
  }
  .brand-icon {
    width: 29px;
    height: 29px;
  }
  .intro {
    margin-bottom: 25px;
  }
  .intro-note {
    display: none;
  }
  main {
    padding: 30px 18px 0;
  }
  h1 {
    font-size: 36px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .intro > div > p {
    font-size: 12px;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .problem-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 25px 22px;
  }
  .problem-panel h2 {
    margin-top: 17px;
  }
  .problem-panel > .muted {
    margin-bottom: 15px;
  }
  textarea {
    min-height: 150px;
  }
  .input-meta {
    margin-bottom: 12px;
  }
  .try-example {
    padding-top: 17px;
    margin-top: 17px;
  }
  .learning-note {
    display: none;
  }
  .lesson-heading {
    padding-top: 26px;
  }
  .lesson-heading .section-label {
    flex-wrap: wrap;
    font-size: 9px;
  }
  .sample-badge {
    font-size: 7px;
  }
  .tabs {
    gap: 23px;
  }
  .tabs button {
    font-size: 11px;
  }
  #lesson-content {
    padding: 25px 22px;
    min-height: 0;
  }
  .map-branches {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .lesson-footer {
    align-items: flex-start;
  }
  .lesson-footer > span {
    max-width: 160px;
    line-height: 1.6;
  }
  .page-footer {
    flex-direction: column;
    font-size: 9px;
    gap: 8px;
  }
  .complexity-metrics {
    gap: 16px;
  }
  .complexity-metrics strong {
    font-size: 30px;
  }
  dialog {
    padding: 23px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .topbar,
  .intro,
  .problem-panel,
  .tabs,
  .lesson-footer,
  .page-footer,
  .notice,
  dialog,
  .icon-button {
    display: none !important;
  }
  .workspace {
    display: block;
    border: 0;
  }
  main {
    padding: 0;
  }
  .lesson-panel {
    width: 100%;
  }
  pre {
    white-space: pre-wrap;
  }
  .insight {
    break-inside: avoid;
  }
}
