:root {
  --bg: #f5f3eb;
  --paper: #fffdf7;
  --ink: #233e36;
  --muted: #66766a;
  --green: #173f36;
  --gold: #c49c51;
  --line: #dedfd1;
  --soft: #e9eddf;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    16px/1.9 Tahoma,
    Arial,
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
a {
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
a,
button {
  touch-action: manipulation;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(30px, 4vw, 57px);
  line-height: 1.5;
  letter-spacing: -1px;
}
h2 {
  font-size: 29px;
  line-height: 1.5;
}
h3 {
  font-size: 19px;
  line-height: 1.6;
}
p {
  margin-bottom: 18px;
}
small,
.muted {
  font-size: 13px;
  color: var(--muted);
}
img {
  max-width: 100%;
  height: auto;
}
.skip {
  position: fixed;
  right: 20px;
  top: 12px;
  transform: translateY(-200%);
  z-index: 20;
  background: var(--green);
  color: white;
  padding: 10px;
}
.skip:focus-visible {
  transform: none;
}
header {
  max-width: 1440px;
  margin: auto;
  padding: 18px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
}
.brand img {
  width: 44px;
  height: 44px;
  background: white;
  border-radius: 10px;
  object-fit: contain;
}
.brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}
.brand small {
  font-size: 11px;
}
nav {
  display: flex;
  gap: 23px;
  font-size: 13px;
}
nav a {
  text-decoration: none;
}
#accountNav {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12px;
}
main {
  max-width: 1440px;
  margin: auto;
  min-height: 70vh;
  padding: 0 5% 60px;
}
.button,
button.primary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  min-height: 46px;
  border: 1px solid var(--green);
  border-radius: 9px;
  background: var(--green);
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
}
.button.secondary,
button.secondary {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--green);
  border-radius: 9px;
  padding: 10px 16px;
  min-height: 44px;
}
.small {
  font-size: 12px !important;
  padding: 8px 14px !important;
}
.link {
  border: 0;
  background: none;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 6px;
  font-size: 13px;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5%;
  padding: 65px 0 45px;
  align-items: center;
}
.eyebrow {
  display: block;
  font-size: 12px;
  color: #527348;
  font-weight: bold;
  margin-bottom: 16px;
}
.eyebrow:before {
  content: "●";
  font-size: 10px;
  color: var(--gold);
  margin-left: 8px;
}
.hero p {
  max-width: 510px;
  color: var(--muted);
  line-height: 2;
}
.hero h1 span {
  color: #2f6651;
}
.hero-art {
  position: relative;
  padding: 15px 0 35px;
}
.hero-art img {
  width: 100%;
  border-radius: 24px;
  transform: rotate(-2deg);
}
.note-card {
  position: absolute;
  left: 20px;
  bottom: 0;
  background: var(--paper);
  padding: 16px 22px;
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: 0 8px 30px #173f3614;
  font-size: 13px;
  transform: rotate(2deg);
}
.note-card b {
  display: block;
  color: #2f6651;
  font-size: 17px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.tiny {
  font-size: 12px !important;
}
.hero-facts {
  display: flex;
  gap: 35px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 28px;
}
.hero-facts strong {
  font-size: 23px;
  display: block;
}
.section {
  padding: 35px 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 24px;
}
.section-head h2 {
  margin: 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.adventure {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.adventure.featured {
  border-color: #93a184;
}
.card-art {
  height: 140px;
  background: #e1e8d8;
  display: grid;
  place-items: center;
  font:
    56px Georgia,
    serif;
  color: var(--green);
}
.adventure:nth-child(2) .card-art {
  background: #eee3ca;
}
.adventure:nth-child(3) .card-art {
  background: #dce5e7;
}
.adventure:nth-child(4) .card-art {
  background: #e9dcd1;
}
.card-body {
  padding: 22px;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: start;
}
.card-body h3 {
  font-size: 18px;
  margin: 13px 0 10px;
}
.card-body p {
  font-size: 13px;
  color: var(--muted);
  flex: 1;
}
.card-body .button {
  width: 100%;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  line-height: 1.7;
  padding: 4px 10px;
  border: 1px solid #d4ddc9;
  border-radius: 30px;
  background: #edf1e6;
  color: #40624b;
  white-space: nowrap;
}
.tag.gray {
  background: #efeee9;
  color: #6c766b;
  border-color: #dedfd1;
}
.tag.gold {
  background: #f3e6c7;
  color: #7f6127;
  border-color: #dfcda7;
}
.steps {
  border-block: 1px solid var(--line);
  padding: 30px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.steps b {
  font:
    30px Georgia,
    serif;
  color: var(--gold);
  display: block;
  margin-bottom: 12px;
}
.steps h3 {
  font-size: 17px;
  margin-bottom: 7px;
}
.steps p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  background: var(--green);
  color: #fff9e8;
  padding: 38px 42px;
  border-radius: 17px;
}
.banner p {
  color: #ced8c6;
  max-width: 650px;
  margin: 0;
}
.banner h2 {
  margin-bottom: 12px;
}
.banner .button {
  background: #e6c780;
  color: var(--green);
  border-color: #e6c780;
  white-space: nowrap;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 35px 0 24px;
}
.page-head h1 {
  font-size: 33px;
  margin-bottom: 8px;
}
.page-head p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, 1fr);
  gap: 25px;
  align-items: start;
}
.panel {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 27px;
  box-shadow: 0 12px 45px #173f3606;
}
.panel h2 {
  font-size: 25px;
}
.auth {
  max-width: 530px;
  margin: 45px auto;
}
.auth h1 {
  font-size: 31px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 17px;
  font-size: 13px;
  font-weight: bold;
}
.field input,
.field textarea,
.field select,
.control {
  width: 100%;
  min-width: 0;
  min-height: 45px;
  padding: 11px 12px;
  border: 1px solid #c9cebe;
  background: white;
  color: var(--ink);
  border-radius: 8px;
  font-size: 15px;
  font-weight: normal;
}
.field textarea {
  min-height: 110px;
  resize: vertical;
}
.field small {
  font-weight: normal;
  font-size: 11px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  font-size: 13px;
}
.check input {
  accent-color: var(--green);
  width: 17px;
  height: 17px;
}
.notice {
  background: #f2e7cd;
  border: 1px solid #dfcda7;
  color: #755c2c;
  border-radius: 10px;
  padding: 15px 18px;
  margin: 0 0 20px;
  font-size: 13px;
}
.inline-note {
  background: #efeadc;
  border-radius: 9px;
  padding: 14px;
  font-size: 12px;
}
.dialogue {
  background: #e9f0e0;
  border-right: 4px solid #62815e;
  border-radius: 12px;
  padding: 21px;
  margin: 20px 0;
}
.dialogue b {
  font-size: 13px;
  display: block;
  margin-bottom: 9px;
}
.dialogue p {
  font-size: 17px;
  margin: 0;
  line-height: 2;
}
.scene {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin: 18px 0;
}
.scene img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: 50% 70%;
  display: block;
}
.scene span {
  position: absolute;
  top: 18px;
  right: 18px;
  background: #fffdf0e8;
  padding: 8px 17px;
  border: 1px solid #c0af87;
  border-radius: 5px;
  font-size: 13px;
}
.document {
  background: white;
  border: 1px solid #d8d6c4;
  border-radius: 7px;
  padding: 18px;
  margin-bottom: 15px;
}
.document:before {
  content: "مستند تعليمي · بيانات وهمية";
  font-size: 10px;
  color: #8a7f5b;
  display: block;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 7px;
  margin-bottom: 12px;
}
.document h3 {
  font-size: 15px;
}
.document p {
  font-size: 14px;
  white-space: pre-line;
  margin: 0;
}
.answer {
  border-top: 1px solid var(--line);
  padding-top: 23px;
  margin-top: 25px;
}
.option {
  display: flex;
  gap: 12px;
  align-items: start;
  padding: 15px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 10px;
  cursor: pointer;
  font-size: 14px;
}
.option input {
  margin-top: 7px;
  accent-color: var(--green);
}
.option:has(input:checked) {
  background: #e9f0e1;
  border-color: #72926b;
}
.journal-row {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr 28px;
  gap: 7px;
  margin: 10px 0;
  align-items: center;
}
.journal-row select,
.journal-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid #c9cebe;
  border-radius: 7px;
  padding: 10px 5px;
  background: white;
  color: var(--ink);
  font-size: 13px;
}
.remove {
  background: none;
  border: 0;
  color: #984c38;
  font-size: 22px;
  min-height: 43px;
}
.feedback {
  background: #e9f1dd;
  border: 1px solid #c8dbb6;
  border-radius: 12px;
  padding: 21px;
  margin-top: 20px;
  white-space: pre-line;
}
.feedback.bad {
  background: #f5ebdc;
  border-color: #dfc6aa;
}
.feedback p {
  font-size: 14px;
}
.hint {
  padding: 15px;
  border-radius: 9px;
  background: #f4ebd5;
  font-size: 14px;
  margin: 15px 0;
}
.chapter {
  margin: 0 0 18px;
}
.chapter summary {
  list-style: none;
  cursor: pointer;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.chapter summary::-webkit-details-marker {
  display: none;
}
.chapter h3 {
  margin: 0;
  font-size: 18px;
}
.chapter[open] summary {
  border-radius: 13px 13px 0 0;
  border-bottom: 0;
}
.chapter-body {
  padding: 0 20px 20px;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--paper);
  border-radius: 0 0 13px 13px;
}
.unit-title {
  font-size: 12px;
  color: var(--muted);
  font-weight: bold;
  padding: 18px 0 7px;
}
.mission-row {
  display: flex;
  align-items: center;
  gap: 13px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px;
  text-decoration: none;
  margin-top: 9px;
}
.mission-row .grow {
  flex: 1;
  font-size: 14px;
}
.mission-row small {
  font-size: 11px;
}
.mission-row.locked {
  background: #efeee8;
  color: #7d857a;
}
.mission-number {
  background: var(--soft);
  color: var(--green);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  flex-shrink: 0;
}
.mission-row.done .mission-number {
  background: var(--green);
  color: white;
}
progress {
  display: block;
  width: 100%;
  height: 7px;
  border: 0;
  border-radius: 10px;
  margin: 14px 0;
  accent-color: #2f6651;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.stat {
  padding: 18px;
  border-radius: 11px;
  background: var(--soft);
}
.stat strong {
  display: block;
  font:
    28px Georgia,
    Tahoma,
    serif;
  color: var(--green);
}
.stat small {
  font-size: 11px;
}
.course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.course {
  padding: 25px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: start;
}
.course h3 {
  margin: 15px 0 10px;
}
.course p {
  font-size: 14px;
  color: var(--muted);
  flex: 1;
}
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.tabs button {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--green);
  border-radius: 8px;
  padding: 10px 17px;
  font-size: 13px;
}
.tabs button.active {
  background: var(--green);
  color: white;
}
.admin-row {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin: 10px 0;
  background: white;
}
.admin-row b {
  font-size: 14px;
}
.admin-row .actions {
  margin: 0;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  min-width: 520px;
}
th,
td {
  text-align: right;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
th {
  background: var(--soft);
}
.repeat {
  background: var(--soft);
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 14px;
}
.repeat .field {
  margin-bottom: 10px;
}
.divider {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 24px;
}
.prose {
  max-width: 800px;
  margin: 35px auto;
}
.prose p {
  line-height: 2.1;
}
.empty {
  text-align: center;
  padding: 50px 15px;
  color: var(--muted);
}
footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  flex-wrap: wrap;
  padding: 26px 5% 140px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
footer a {
  text-decoration: none;
}
.floating {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 20px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 9px;
}
.floating button {
  background: var(--green);
  color: white;
  border: 1px solid #2d5547;
  border-radius: 30px;
  padding: 12px 19px;
  font-size: 13px;
  box-shadow: 0 6px 22px #173f3620;
}
.floating .invest {
  background: #e8ca84;
  border: 1px solid #ccac5e;
  color: var(--green);
  border-radius: 30px;
  padding: 11px 18px;
  text-decoration: none;
  font-size: 12px;
  font-weight: bold;
}
.floating #socialPanel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 10px;
  box-shadow: 0 8px 30px #173f3626;
  min-width: 180px;
  max-height: 50vh;
  overflow: auto;
}
#socialPanel a {
  display: block;
  text-decoration: none;
  padding: 9px 13px;
  font-size: 13px;
}
#socialPanel a:hover {
  background: var(--soft);
}
#toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  background: var(--green);
  color: white;
  padding: 14px 23px;
  border-radius: 10px;
  z-index: 40;
  box-shadow: 0 8px 30px #173f3620;
  font-size: 14px;
}
#toast.error {
  background: #8b4332;
}
.form-error {
  color: #8b4332;
  font-size: 13px;
  margin-top: 12px;
}
dialog {
  width: calc(100% - 30px);
  max-width: 780px;
  max-height: 88vh;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--paper);
  color: var(--ink);
  padding: 30px;
  box-shadow: 0 30px 90px #173f3644;
}
dialog::backdrop {
  background: #173f3677;
  backdrop-filter: blur(3px);
}
dialog h2 {
  padding-left: 30px;
}
.close {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--soft);
  color: var(--green);
  font-size: 23px;
}
.code {
  font: 13px/1.8 monospace !important;
  direction: ltr;
  text-align: left;
  min-height: 160px !important;
}
.subtle {
  margin-top: 18px;
}
.bank-question {
  border: 1px solid var(--line);
  background: white;
  padding: 18px;
  border-radius: 10px;
  margin: 13px 0;
}
.bank-question p {
  font-size: 14px;
  margin: 0 0 10px;
}
.bank-question details {
  font-size: 12px;
}
.danger {
  color: #984c38;
}
@media (max-width: 1050px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero h1 {
    font-size: 40px;
  }
  .course-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  nav {
    gap: 14px;
  }
  .grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(240px, 1fr);
  }
}
@media (max-width: 720px) {
  body {
    font-size: 15px;
  }
  header {
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 5%;
  }
  .brand b {
    font-size: 15px;
  }
  .brand img {
    width: 38px;
    height: 38px;
  }
  nav {
    order: 3;
    width: 100%;
    justify-content: center;
    border-top: 1px solid var(--line);
    padding-top: 12px;
    gap: 24px;
    font-size: 12px;
  }
  #accountNav .name {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    padding-top: 32px;
    gap: 25px;
  }
  .hero h1 {
    font-size: 36px;
  }
  .hero p {
    font-size: 15px;
  }
  .hero-art {
    padding: 0 8px 28px;
  }
  .hero-art img {
    max-height: 300px;
    object-fit: cover;
    object-position: 50% 70%;
  }
  .note-card {
    left: 20px;
    padding: 12px 17px;
  }
  .hero-facts {
    gap: 28px;
  }
  .hero-facts strong {
    font-size: 21px;
  }
  .section {
    padding: 25px 0;
  }
  .section-head {
    display: block;
  }
  .section-head p {
    margin-top: 10px;
  }
  .card-art {
    height: 110px;
  }
  .card-body {
    padding: 17px;
  }
  .card-body h3 {
    font-size: 16px;
  }
  .card-body p {
    font-size: 12px;
  }
  .card-body .button {
    font-size: 12px;
    padding: 9px;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 23px;
  }
  .steps > div {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 0 12px;
  }
  .steps b {
    grid-row: span 2;
    margin: 0;
  }
  .banner {
    display: block;
    padding: 26px;
  }
  .banner h2 {
    font-size: 25px;
  }
  .banner p {
    font-size: 14px;
  }
  .banner .button {
    margin-top: 22px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 20px;
  }
  .page-head {
    align-items: start;
    padding-top: 25px;
  }
  .page-head h1 {
    font-size: 27px;
  }
  .page-head .button {
    font-size: 11px;
    padding: 8px 12px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .auth {
    margin: 28px auto;
  }
  .auth h1 {
    font-size: 27px;
  }
  .dialogue p {
    font-size: 15px;
  }
  .scene img {
    height: 200px;
  }
  .chapter summary {
    padding: 17px;
  }
  .chapter-body {
    padding: 0 14px 17px;
  }
  .mission-row {
    padding: 12px;
    gap: 9px;
  }
  .mission-row .grow {
    font-size: 13px;
  }
  .mission-row .tag {
    font-size: 9px;
    padding: 4px 7px;
  }
  .journal-row {
    gap: 5px;
    grid-template-columns: 1.3fr 0.8fr 1fr 24px;
  }
  .journal-row input,
  .journal-row select {
    font-size: 12px;
    padding: 10px 4px;
  }
  .stats {
    gap: 8px;
  }
  .stat {
    padding: 13px;
  }
  .stat strong {
    font-size: 24px;
  }
  .stat small {
    font-size: 10px;
  }
  .course-grid {
    grid-template-columns: 1fr;
  }
  .tabs {
    gap: 6px;
  }
  .tabs button {
    font-size: 11px;
    padding: 9px 12px;
  }
  .floating {
    bottom: max(14px, env(safe-area-inset-bottom));
    left: 12px;
    gap: 7px;
  }
  .floating button {
    padding: 10px 15px;
    font-size: 12px;
  }
  .floating .invest {
    padding: 9px 14px;
    font-size: 11px;
  }
  dialog {
    padding: 25px 18px;
  }
  .admin-row {
    padding: 13px;
    gap: 8px;
  }
  .admin-row b {
    font-size: 13px;
  }
}
@media (max-width: 380px) {
  .cards {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 32px;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .journal-row {
    grid-template-columns: 1fr 1fr 25px;
    padding: 10px;
    border-radius: 8px;
    background: var(--soft);
  }
  .journal-row select:first-child {
    grid-column: 1/3;
  }
  .journal-row .remove {
    grid-column: 3;
    grid-row: 1/3;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
}

.progress-state {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.star {
  font:
    35px/1 Georgia,
    serif;
  color: #d6dccf;
}
.star.full {
  color: #b98a31;
}
.star.half {
  background: linear-gradient(to left, #b98a31 50%, #d6dccf 50%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.progress-state small {
  font-size: 10px;
}

/* Subject illustrations and day-to-day administration. */
.subject-cover {
  aspect-ratio: 16/9;
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  background-image: url("/assets/adventure-covers.png");
  background-size: 200% 200%;
  background-repeat: no-repeat;
  background-color: #e6e4d6;
  flex-shrink: 0;
}
.cover-financial {
  background-position: 0 0;
}
.cover-construction {
  background-position: 100% 0;
}
.cover-ifrs {
  background-position: 0 100%;
}
.cover-tax {
  background-position: 100% 100%;
}
.subject-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}
.adventure > .subject-cover {
  border-radius: 0;
  aspect-ratio: 16/9;
}
.subject-name {
  display: block;
  color: #756027;
  font-weight: 700;
  margin: 12px 0 6px;
  font-size: 14px;
}
.hero-cover {
  aspect-ratio: 1.15;
  min-height: 300px;
  background-size: 200% 200%;
}
.hero-art .hero-cover {
  aspect-ratio: 16/9;
  min-height: 0;
  border-radius: 24px;
}
.hero-art {
  min-width: 0;
}
.scene > .subject-cover {
  max-height: 330px;
  border-radius: 14px;
}
.scene .subject-cover img {
  position: static;
}
.scene > span {
  z-index: 1;
}
.panel > .subject-cover {
  margin-bottom: 18px;
}
.multi-picker {
  border: 1px solid var(--line, #d8ddce);
  border-radius: 14px;
  padding: 16px;
  margin: 12px 0;
  background: #fbfaf6;
}
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 10px;
  max-height: 340px;
  overflow: auto;
  padding: 4px;
}
.check-grid .check {
  align-items: flex-start;
  margin: 0;
  padding: 10px;
  background: white;
  border-radius: 8px;
}
.check-grid input {
  flex: 0 0 auto;
  margin-top: 5px;
  accent-color: #173f36;
}
.resume-card,
.preview-banner {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  background: #e8eedf;
  border: 1px solid #c7d3b7;
  border-radius: 18px;
  padding: 22px;
  margin: 20px 0;
}
.resume-card h2 {
  margin: 5px 0;
}
.preview-banner {
  background: #fff1d4;
  position: relative;
}
.preview-banner p {
  font-size: 13px;
  margin: 6px 0;
}
.crop-editor canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: #e9e7db;
}
.crop-editor input[type="range"] {
  padding: 0;
  min-height: 30px;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin: 15px 0;
}
.media-choice {
  padding: 0;
  border: 2px solid #c5d1b7;
  border-radius: 10px;
  overflow: hidden;
  background: white;
}
.media-choice img {
  aspect-ratio: 16/9;
  width: 100%;
  object-fit: cover;
  display: block;
}
.courses-banner {
  margin-bottom: 25px;
}
.install-cta {
  display: inline-block;
  margin-top: 16px;
  font-weight: 700;
}
.mission-stack > .mission-block {
  margin: 30px 0;
  padding-bottom: 25px;
  border-bottom: 2px dashed #d5dcc8;
  scroll-margin-top: 25px;
}
.mission-block .grid {
  margin-top: 18px;
}
.mission-block h2 {
  font-size: 26px;
}
.mission-block .feedback {
  scroll-margin-top: 30px;
}
.locked-question {
  background: #eceee6;
  border: 1px dashed #a8b995;
  border-radius: 15px;
  padding: 22px;
}
.unit-head {
  display: flex;
  gap: 20px;
  align-items: center;
}
.unit-head .subject-cover {
  width: 180px;
  flex: 0 0 180px;
}
.stat[type="button"],
button.stat {
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  color: inherit;
}
.table-wrap td {
  white-space: normal;
}
.admin-row > div {
  min-width: 0;
}
.check-grid label {
  overflow-wrap: anywhere;
}
input[type="checkbox"] {
  width: auto;
  min-height: 0;
}
.tabs {
  overflow-x: auto;
  flex-wrap: wrap;
}
@media (max-width: 650px) {
  .resume-card,
  .preview-banner,
  .unit-head {
    flex-direction: column;
    align-items: stretch;
  }
  .unit-head .subject-cover {
    width: 100%;
    flex: auto;
  }
  .resume-card .button {
    width: 100%;
  }
  .preview-banner .actions {
    flex-direction: column;
  }
  .mission-stack > .mission-block {
    margin: 22px 0;
  }
  .mission-block h2 {
    font-size: 22px;
  }
  .check-grid {
    grid-template-columns: 1fr;
  }
  .multi-picker {
    padding: 12px;
  }
  .scene > .subject-cover {
    max-height: 220px;
  }
  .hero-art .hero-cover {
    aspect-ratio: 16/10;
  }
  .admin-row {
    flex-wrap: wrap;
  }
  .table-wrap {
    max-width: 100%;
  }
}
.unit-progress {
  margin: 20px 0;
}
.unit-progress progress {
  width: 100%;
  height: 16px;
}
.unit-progress .toolbar {
  gap: 10px;
  flex-wrap: wrap;
}
.attempt-summary {
  padding: 18px;
  border: 1px solid #d0b77b;
  border-radius: 12px;
  background: #fff6df;
  margin-bottom: 18px;
}
.attempt-summary p {
  font-size: 13px;
}
.completed-note {
  background: #e9f1e0;
  border-color: #a9c58b;
}
.completed > h2:before {
  content: "✓ ";
  color: #40712e;
}
.retry-panel > summary {
  font-weight: 700;
  cursor: pointer;
  padding: 15px 0;
}
.history-attempt {
  border-bottom: 1px solid #d5dcc8;
  padding: 16px 0;
}
.history-attempt summary {
  cursor: pointer;
  font-weight: 700;
}
.second-account {
  font-size: 12px;
}
.calculator-launch {
  font-size: 13px !important;
  background: #f7f2df !important;
  color: #173f36 !important;
  border: 1px solid #d7c589 !important;
  min-height: 38px !important;
  padding: 8px 15px !important;
}
.calculator {
  position: fixed;
  left: 22px;
  bottom: 155px;
  z-index: 35;
  width: 300px;
  max-width: calc(100vw - 16px);
  background: #fffdf6;
  border: 1px solid #aebc9c;
  border-radius: 18px;
  box-shadow: 0 18px 60px #132a243b;
  padding: 14px;
  opacity: 0;
  transition: opacity 0.16s ease;
}
.calculator.is-open {
  opacity: 1;
}
.calculator-handle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
  touch-action: none;
  border-bottom: 1px solid #d7ddcd;
  padding-bottom: 10px;
  margin-bottom: 12px;
  font-weight: 700;
}
.calculator-handle div {
  display: flex;
  gap: 6px;
}
.calculator-handle button {
  border: 0;
  border-radius: 6px;
  background: #e8eddf;
  color: #173f36;
  font-size: 20px;
  padding: 0 10px;
}
.calculator-label {
  font-size: 12px;
  display: block;
}
.calculator input {
  display: block;
  width: 100%;
  font-size: 23px;
  padding: 12px;
  margin: 6px 0;
  border: 1px solid #b3c39f;
  border-radius: 8px;
  background: #f2f6e9;
}
.calculator-error {
  min-height: 24px;
  color: #97432a;
  font-size: 12px;
}
.calculator-keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  direction: ltr;
}
.calculator-keys button {
  padding: 10px;
  font-size: 20px;
  border: 1px solid #d2d9c7;
  border-radius: 8px;
  background: #edf1e5;
  color: #173f36;
}
.calculator-keys .equals {
  grid-column: 1/-1;
  background: #173f36;
  color: white;
}
.calculator small {
  display: block;
  font-size: 10px;
  margin-top: 10px;
  color: #64765d;
}
.calculator input:focus {
  outline: 2px solid #b79748;
}
.calculator[hidden] {
  display: none;
}
.calculator-handle span:focus-visible {
  outline: 2px solid #b79748;
}
@media (max-width: 500px) {
  .calculator {
    bottom: 150px;
    left: 8px;
    width: 280px;
  }
  .floating .calculator-launch {
    font-size: 11px !important;
    min-height: 30px !important;
    padding: 6px 10px !important;
  }
}
