* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}
body {
  margin: 0;
  background: #f5f6f1;
  color: #182f28;
  font:
    16px/1.55 "Segoe UI",
    Arial,
    sans-serif;
}
a {
  color: inherit;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
header {
  background: #fff;
  border-bottom: 1px solid #d7ded6;
}
.bar,
main,
footer {
  max-width: 1320px;
  margin: auto;
  padding: 0 clamp(16px, 4vw, 64px);
}
.bar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -1px;
  text-decoration: none;
}
.brand span {
  color: #25865a;
}
.mark {
  background: #176746;
  color: white;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  text-align: center;
  line-height: 32px;
  margin-right: 7px;
}
nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  font-weight: 600;
}
nav a {
  text-decoration: none;
}
nav a:hover,
.actions a:hover {
  text-decoration: underline;
}
.hero {
  margin: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 36px clamp(22px, 4vw, 56px);
  border-radius: 18px;
  background-color: #123d32;
  background-image: radial-gradient(#356153 1px, transparent 1px);
  background-size: 16px 16px;
  color: #fff;
  overflow: hidden;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font:
    700 11px/1.5 Consolas,
    monospace;
  letter-spacing: 1.6px;
  color: #4a725f;
}
.hero .eyebrow {
  color: #afe2a8;
}
.eyebrow i,
.filebar i {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #9bdd80;
  border-radius: 50%;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font:
    normal clamp(38px, 4.5vw, 70px)/1.12 Georgia,
    serif;
  letter-spacing: -2px;
  margin: 10px 0;
}
.hero p {
  color: #d8e4dc;
  max-width: 500px;
}
.meta {
  display: flex;
  gap: 12px;
  margin-top: 19px;
}
.meta span {
  font:
    12px Consolas,
    monospace;
  border: 1px solid #688477;
  padding: 5px 10px;
  border-radius: 5px;
}
.art {
  position: relative;
  flex: 0 0 258px;
  margin: 0 20px;
}
.sheet {
  background: #f3f6e9;
  color: #2c4837;
  transform: rotate(-6deg);
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 9px 12px 0 #092c234d;
}
.sheetbar {
  background: #c2e5a7;
  padding: 7px 12px;
  font-weight: 650;
  font-size: 12px;
}
.sheetgrid {
  display: grid;
  grid-template-columns: 24px 1.6fr 1fr 1fr;
}
.sheetgrid > * {
  text-align: center;
  border: 1px solid #d8dfcf;
  font:
    12px/24px Consolas,
    monospace;
}
.sheetgrid b {
  background: #e2ead9;
}
.formula {
  position: absolute;
  bottom: -12px;
  right: -24px;
  background: #fcf3c8;
  color: #344535;
  transform: rotate(3deg);
  font:
    13px Consolas,
    monospace;
  padding: 9px 14px;
  border-radius: 6px;
  box-shadow: 1px 4px 10px #0002;
}
.formula b {
  color: #528250;
  margin-right: 8px;
}
.studio {
  display: grid;
  grid-template-columns: minmax(220px, 26%) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
aside,
article,
.lab {
  background: white;
  border: 1px solid #d7ded6;
  border-radius: 14px;
  overflow: hidden;
}
.sidehead,
article,
.labhead {
  padding: 24px;
}
.sidehead h2,
.lab h2 {
  font-size: 24px;
  letter-spacing: -0.8px;
}
.sidehead input {
  margin-top: 15px;
  width: 100%;
  padding: 9px 12px;
  background: #f7f8f5;
  border: 1px solid #ced7cd;
  border-radius: 7px;
}
.sidehead {
  border-bottom: 1px solid #e0e4dd;
}
#list {
  max-height: 72vh;
  overflow: auto;
  padding: 8px;
}
.group,
.lesson {
  background: white;
  color: #294133;
  border: 0;
  text-align: left;
  width: 100%;
  padding: 10px;
  border-radius: 6px;
}
.group {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 650;
  font-size: 14px;
}
.group small {
  margin-left: auto;
  color: #657763;
}
.lesson {
  padding-left: 25px;
  font-size: 14px;
}
.lesson.active,
.lesson:hover,
.group:hover {
  background: #eaf3e5;
}
.active {
  font-weight: 650;
  color: #186a47;
}
.workspace {
  display: grid;
  gap: 18px;
}
article h2 {
  font:
    normal 36px/1.2 Georgia,
    serif;
  margin: 8px 0 14px;
}
#body {
  white-space: pre-line;
  color: #42544a;
  line-height: 1.7;
}
.actions,
.pager,
.labhead,
.filebar,
.outhead,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.actions {
  margin-top: 20px;
  font-size: 13px;
}
.actions a {
  color: #226e4a;
  font-weight: 650;
}
.actions button,
.pager button {
  border: 1px solid #ced8cf;
  background: #fff;
  border-radius: 6px;
  padding: 6px 12px;
  color: #26593e;
}
.labhead {
  padding-bottom: 6px;
}
#run {
  background: #b9e998;
  color: #193a25;
  border: 1px solid #a7cd8c;
  padding: 9px 15px;
  border-radius: 7px;
  font-weight: 700;
}
.hint {
  padding: 0 24px 16px;
  color: #617166;
  font-size: 13px;
}
.filebar,
.codebox {
  background: #132820;
  color: #dcebdc;
}
.filebar {
  padding: 8px 16px;
  background: #203a2e;
  font:
    12px Consolas,
    monospace;
}
.filebar i {
  margin-right: 6px;
}
.filebar button {
  background: transparent;
  border: 0;
  color: #d7e3d6;
  font-size: 12px;
}
.codebox {
  display: flex;
  height: 230px;
}
.codebox pre,
.codebox textarea {
  font:
    14px/23px Consolas,
    monospace;
  tab-size: 4;
  margin: 0;
  padding: 14px 8px;
  border: 0;
}
.codebox pre {
  width: 45px;
  text-align: right;
  color: #789487;
  overflow: hidden;
}
.codebox textarea {
  flex: 1;
  min-width: 0;
  resize: none;
  background: transparent;
  color: #d9edce;
}
.outhead {
  padding: 15px 22px 0;
  font-size: 14px;
}
.outhead span {
  font-size: 12px;
  color: #617166;
}
#result {
  margin: 0;
  padding: 10px 22px 18px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #354c3a;
}
#cells {
  overflow: auto;
}
table {
  margin: 0 22px 16px;
  border-collapse: collapse;
  font:
    13px Consolas,
    monospace;
}
td,
th {
  border: 1px solid #d3ded3;
  padding: 5px 9px;
}
.pager button {
  padding: 10px 14px;
}
footer {
  padding-top: 28px;
  padding-bottom: 24px;
  font-size: 13px;
  color: #5e7065;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #62aa83;
  outline-offset: -2px;
}
@media (max-width: 780px) {
  .art {
    display: none;
  }
  .studio {
    grid-template-columns: 1fr;
  }
  #list {
    max-height: 210px;
  }
  .hero {
    margin: 16px 0;
  }
  .bar {
    height: 60px;
  }
  nav {
    gap: 12px;
  }
  .studio {
    gap: 14px;
  }
  .sidehead {
    padding: 16px;
  }
  .sidehead h2 {
    display: inline;
  }
  .sidehead .eyebrow {
    display: none;
  }
  .sidehead input {
    margin-top: 8px;
  }
  article,
  .labhead {
    padding: 18px;
  }
  .labhead {
    padding-bottom: 6px;
  }
  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
#outline {
  margin-top: 18px;
  font-size: 14px;
  color: #376849;
}
summary {
  cursor: pointer;
}
#outline ul {
  padding-left: 22px;
}
#outline a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
#practice {
  margin-top: 18px;
  border-top: 1px solid #e3e9e1;
  padding-top: 14px;
  font-size: 14px;
  color: #376849;
}
#practice p {
  color: #42544a;
}
#practice pre {
  background: #f1f5ed;
  padding: 12px;
  overflow: auto;
  border-radius: 6px;
}

/* ---------- Branding ---------- */
.brand small {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #5d7366;
  text-transform: uppercase;
}
.hero .sub {
  font:
    italic 20px/1.4 Georgia,
    serif;
  color: #c2e5a7;
  margin: -4px 0 12px;
}
[hidden] {
  display: none !important;
}

/* ---------- Ilustrasi materi ---------- */
#figure {
  margin: 4px 0 20px;
}
#figsvg svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid #dbe4d8;
}
#figure figcaption {
  margin-top: 8px;
  font-size: 12.5px;
  color: #617166;
  font-style: italic;
}

/* ---------- Kuis ---------- */
.actions .cta {
  background: #176746;
  color: #fff;
  border-color: #176746;
  font-weight: 650;
}
.actions .cta:hover {
  background: #0f5236;
}
.lesson.quizlink {
  color: #176746;
  font-weight: 650;
  background: #f1f7ec;
  margin: 2px 0 4px;
}
.lesson.quizlink.passed::after {
  content: "  ✓ Lulus";
  color: #25865a;
  font-size: 12px;
}
.quiz {
  background: #fff;
  border: 1px solid #d7ded6;
  border-radius: 14px;
  padding: 24px;
}
.quizhead h2 {
  font:
    normal 30px/1.2 Georgia,
    serif;
  margin: 6px 0 14px;
}
.qbar {
  height: 8px;
  background: #e8efe4;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 18px;
}
.qbar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #25865a, #9bdd80);
  transition: width 0.3s;
}
.qcount {
  font:
    700 12px Consolas,
    monospace;
  color: #4a725f;
  letter-spacing: 1px;
}
.qtext {
  font-size: 19px;
  font-weight: 600;
  margin: 6px 0 16px !important;
}
.qopts {
  display: grid;
  gap: 10px;
}
.qopt {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  background: #fbfcfa;
  border: 1.5px solid #d3ddd1;
  border-radius: 10px;
  padding: 12px 14px;
  color: #182f28;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.qopt:not(:disabled):hover {
  border-color: #25865a;
  background: #f1f8ec;
}
.qopt:disabled {
  opacity: 1;
}
.qkey {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  background: #e4ecdf;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}
.qopt.correct {
  border-color: #25865a;
  background: #e5f5dc;
}
.qopt.correct .qkey {
  background: #25865a;
  color: #fff;
}
.qopt.wrong {
  border-color: #d9534f;
  background: #fdecea;
}
.qopt.wrong .qkey {
  background: #d9534f;
  color: #fff;
}
.qfeedback {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14.5px;
  line-height: 1.6;
}
.qfeedback.ok {
  background: #eaf6e2;
  color: #1d4d33;
}
.qfeedback.no {
  background: #fdf1ef;
  color: #6b2621;
}
.qactions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.qactions button {
  border: 1px solid #ced8cf;
  background: #fff;
  border-radius: 8px;
  padding: 10px 16px;
  color: #26593e;
  font-weight: 600;
}
.qactions .primary {
  background: #176746;
  border-color: #176746;
  color: #fff;
}
.qresult {
  text-align: center;
  padding: 22px;
  border-radius: 14px;
  margin-bottom: 16px;
}
.qresult.pass {
  background: #e5f5dc;
}
.qresult.fail {
  background: #fdf3e2;
}
.qscore {
  font:
    700 54px/1 Georgia,
    serif;
  color: #176746;
}
.qresult.fail .qscore {
  color: #b7791f;
}
.qresult h3 {
  margin: 10px 0 6px;
}
.qreview {
  padding-left: 22px;
  font-size: 14px;
  display: grid;
  gap: 8px;
}
.qreview li b {
  display: block;
  font-weight: 600;
}
.qreview li.ok span {
  color: #25865a;
}
.qreview li.no span {
  color: #c0392b;
}
@media (max-width: 780px) {
  .quiz {
    padding: 18px;
  }
  .quizhead h2 {
    font-size: 24px;
  }
  .qtext {
    font-size: 17px;
  }
}

/* ---------- Academy: dompet, gerbang, akun, pembayaran ---------- */
.wallet {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 13px;
}
.wl-link {
  font-weight: 600;
  text-decoration: none;
}
.chip {
  border: 1px solid #d3ddd1;
  background: #f7f9f5;
  border-radius: 99px;
  padding: 5px 11px;
  font-size: 12.5px;
  font-weight: 600;
  color: #294133;
  white-space: nowrap;
}
.chip.on {
  background: #e5f5dc;
  border-color: #b7dca3;
  color: #176746;
}
.chip.off {
  color: #8a5a12;
  background: #fdf6e6;
  border-color: #efdcb0;
}
.chip.go {
  background: #176746;
  border-color: #176746;
  color: #fff;
  cursor: pointer;
  animation: pulse 2.2s ease-in-out infinite;
}
.chip.go:hover {
  background: #0f5236;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 #25865a66; }
  50% { box-shadow: 0 0 0 6px #25865a00; }
}
.startbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin: -6px 0 22px;
  padding: 16px 20px;
  background: #e5f5dc;
  border: 1px solid #b7dca3;
  border-left: 5px solid #176746;
  border-radius: 12px;
}
.sb-txt {
  display: grid;
  gap: 2px;
  font-size: 14px;
  color: #2c4434;
  flex: 1 1 320px;
}
.sb-txt b {
  font-size: 16px;
  color: #123d2b;
}
.sb-act {
  display: flex;
  align-items: center;
  gap: 10px 16px;
  flex-wrap: wrap;
}
.sb-act button {
  border: 1px solid #ced8cf;
  background: #fff;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 650;
  color: #26593e;
}
.sb-act .primary,
.dlg .primary {
  background: #176746;
  border: 1px solid #176746;
  color: #fff;
  border-radius: 8px;
  padding: 11px 18px;
  font-weight: 650;
  font-size: 15px;
}
.sb-auto {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #42544a;
  cursor: pointer;
}
.dlg.center {
  text-align: center;
  justify-items: center;
}
.dlg .big {
  font-size: 17px !important;
  padding: 14px 22px !important;
}
.dlg .link {
  background: none !important;
  border: 0;
  color: #617166;
  font-size: 14px !important;
  text-decoration: underline;
}
.chip.bal b {
  color: #176746;
}
.usermenu {
  position: relative;
}
.usermenu summary {
  list-style: none;
  cursor: pointer;
  font-weight: 650;
  padding: 5px 8px;
}
.usermenu summary::-webkit-details-marker {
  display: none;
}
.usermenu > div {
  position: absolute;
  right: 0;
  top: 34px;
  z-index: 20;
  width: 260px;
  background: #fff;
  border: 1px solid #d7ded6;
  border-radius: 10px;
  box-shadow: 0 10px 30px #0002;
  padding: 10px;
  display: grid;
  gap: 4px;
}
.usermenu small {
  color: #617166;
  padding: 4px 6px;
  overflow-wrap: anywhere;
}
.usermenu button,
.usermenu a {
  text-align: left;
  background: none;
  border: 0;
  padding: 7px 6px;
  border-radius: 6px;
  text-decoration: none;
  color: #193b2c;
  font-size: 13.5px;
}
.usermenu button:hover,
.usermenu a:hover {
  background: #eef5ea;
}
.usermenu .auto {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12.5px;
  padding: 7px 6px;
  color: #42544a;
}
.screen {
  margin-bottom: 28px;
}
.authbox {
  max-width: 460px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #d7ded6;
  border-radius: 14px;
  padding: 28px;
  display: grid;
  gap: 12px;
}
.authbox h2 {
  font:
    normal 28px/1.2 Georgia,
    serif;
}
.authbox form {
  display: grid;
  gap: 10px;
}
.authbox label,
.custom label {
  display: grid;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #42544a;
}
.authbox input,
.custom input {
  padding: 10px 12px;
  border: 1px solid #ced7cd;
  border-radius: 8px;
  background: #f9fbf8;
  font-weight: 400;
}
.authbox .primary,
.gatebox .primary {
  background: #176746;
  color: #fff;
  border: 1px solid #176746;
  border-radius: 8px;
  padding: 11px 16px;
  font-weight: 650;
}
.muted {
  color: #617166;
}
.small {
  font-size: 12.5px;
}
.warn {
  background: #fdf1ef;
  color: #7a2c24;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13.5px;
}
.gateicon {
  font-size: 34px;
}
#gate {
  margin: 4px 0 18px;
}
.gatebox {
  border: 1.5px dashed #b7dca3;
  background: #f6fbf2;
  border-radius: 14px;
  padding: 26px;
  text-align: center;
  display: grid;
  gap: 12px;
  justify-items: center;
}
.gatebox p {
  max-width: 560px;
  color: #42544a;
}
.gatebtns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.gatebtns button {
  border: 1px solid #ced8cf;
  background: #fff;
  border-radius: 8px;
  padding: 11px 16px;
  font-weight: 600;
  color: #26593e;
}
.gatenote {
  font-size: 13px;
}
.lesson.locked {
  color: #7d8c82;
}
dialog#payDialog {
  width: min(560px, 94vw);
  max-height: 88vh;
  overflow: auto;
  padding: 0;
}
.dlg {
  padding: 22px;
  display: grid;
  gap: 10px;
}
.dlghead {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dlghead h3 {
  margin: 0;
  font:
    normal 24px Georgia,
    serif;
}
.dlg h4 {
  margin: 8px 0 0;
}
.pkgs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.pkg {
  display: grid;
  gap: 3px;
  text-align: left;
  background: #fbfcfa !important;
  border: 1.5px solid #d3ddd1 !important;
  border-radius: 10px !important;
  padding: 12px !important;
  font-size: 13px !important;
  color: #193b2c;
}
.pkg:hover {
  border-color: #25865a !important;
}
.pkg b {
  font-size: 17px;
}
.pkg em {
  color: #25865a;
  font-style: normal;
  font-weight: 650;
}
.pkg small {
  color: #617166;
}
.custom {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.custom label {
  flex: 1;
}
.custom button {
  background: #176746 !important;
  color: #fff;
  font-size: 14px !important;
  padding: 10px 16px !important;
}
.tw {
  overflow: auto;
}
.dlg table {
  margin: 0;
  width: 100%;
  font: 12.5px "Segoe UI", Arial, sans-serif;
}
.dlg td small {
  color: #617166;
}
.dlg .neg {
  color: #b23b2e;
}
.dlg .pos {
  color: #25865a;
}
.st.paid {
  color: #25865a;
  font-weight: 650;
}
.st.failed {
  color: #b23b2e;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: #132820;
  color: #e5f5dc;
  padding: 12px 18px;
  border-radius: 10px;
  max-width: min(520px, 92vw);
  box-shadow: 0 8px 30px #0004;
  z-index: 50;
  font-size: 14px;
}
@media (max-width: 780px) {
  .bar {
    height: auto;
    min-height: 60px;
    padding-top: 8px;
    padding-bottom: 8px;
    gap: 8px;
  }
  .wallet .chip {
    font-size: 11.5px;
    padding: 4px 9px;
  }
  .authbox {
    padding: 20px;
  }
}

nav button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
}
dialog {
  width: min(450px, 92vw);
  color: #193b2c;
  border: 1px solid #cdd8ce;
  border-radius: 14px;
  padding: 22px;
}
dialog::backdrop {
  background: #10291ec2;
}
dialog .outhead {
  padding: 0;
}
dialog button {
  background: #eef3ed;
  border: 0;
  border-radius: 6px;
  font-size: 20px;
  padding: 2px 10px;
}
dialog ul {
  padding-left: 22px;
}
dialog li {
  padding: 3px;
}
dialog > a {
  font-size: 13px;
}
@media (max-width: 450px) {
  .brand {
    font-size: 19px;
  }
  .bar {
    padding: 0 10px;
  }
  nav {
    gap: 9px;
    font-size: 13px;
  }
  .mark {
    width: 28px;
    height: 28px;
    line-height: 27px;
    margin-right: 2px;
  }
}
