.hero-actions {
  display: grid;
  gap: 10px;
  min-width: 220px;
}

.study-view {
  max-width: 980px;
  margin: auto;
}

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

.study-heading h1 {
  margin: 8px 0 10px;
  font: 500 clamp(42px, 6vw, 68px)/1 Georgia, serif;
  letter-spacing: -2px;
}

.study-heading .lead {
  margin: 0;
}

.study-grid,
.completion-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 16px;
}

.study-grid.single {
  grid-template-columns: 1fr;
}

.active-study-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  margin-bottom: 16px;
  padding: 18px 20px;
  border: 1px solid #79a997;
  border-radius: 14px;
  background: #e8f3ed;
  color: var(--forest);
  text-align: left;
}

.active-study-banner > span {
  display: grid;
  gap: 4px;
}

.active-study-banner small {
  color: #61746c;
}

.active-study-banner > b {
  white-space: nowrap;
}

.study-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 12px 40px #15362d0a;
}

.request-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 20px;
  padding: 30px;
}

.request-card h2,
.progress-card h2,
.gpt-guide h2,
.ready-card h2,
.study-session-head h2,
.study-card > h2,
.feedback-card h2 {
  margin: 7px 0 15px;
  font: 500 30px/1.12 Georgia, serif;
}

.step-number,
.content-index {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--forest);
  color: white;
  font-weight: 800;
}

.choice-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 11px;
  margin: 10px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  cursor: pointer;
}

.choice-row:has(input:checked) {
  border-color: #78a996;
  background: #eef6f1;
}

.choice-row input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  padding: 0;
}

.choice-row span {
  display: grid;
  gap: 4px;
}

.choice-row small,
.progress-card p,
.ready-card p,
.study-session-head p,
.test-summary p {
  color: #6a7872;
}

.special-topic {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  font-size: 13px;
  font-weight: 750;
}

.request-card .primary {
  width: 100%;
  margin-top: 12px;
}

.progress-card {
  padding: 28px;
}

.topic-progress-list {
  display: grid;
  gap: 0;
  margin-top: 20px;
}

.topic-progress-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.topic-progress-list b {
  color: var(--green);
  white-space: nowrap;
}

.section-head.compact {
  margin: 42px 0 17px;
}

.study-session-list {
  display: grid;
  gap: 10px;
}

.study-session-card {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
}

.study-session-card:hover {
  border-color: #8bb5a6;
}

.study-session-card > span:nth-child(2) {
  display: grid;
  gap: 4px;
}

.study-session-card small {
  color: #718079;
}

.study-session-card > b {
  color: var(--forest);
  font: 500 22px Georgia, serif;
}

.study-session-card > i {
  color: var(--green);
  font-style: normal;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #b5beb9;
}

.status-dot.completed {
  background: var(--green);
}

.status-dot.cancelled {
  background: #aeb5b1;
}

.study-session-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.study-session-head h2 {
  margin-bottom: 8px;
  font-size: clamp(30px, 5vw, 48px);
}

.study-session-head p {
  margin: 0;
}

.session-number {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: #617069;
  font-size: 12px;
  white-space: nowrap;
}

.study-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  margin-bottom: 28px;
}

.study-steps > div {
  display: grid;
  justify-items: center;
  gap: 7px;
  position: relative;
  color: #84908a;
  font-size: 11px;
  text-align: center;
}

.study-steps > div::before {
  position: absolute;
  top: 14px;
  right: 50%;
  left: -50%;
  height: 2px;
  background: #d9dfdb;
  content: '';
  z-index: -1;
}

.study-steps > div:first-child::before {
  display: none;
}

.study-steps b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e2e6e3;
  color: #75817b;
}

.study-steps .done b,
.study-steps .active b {
  background: var(--green);
  color: white;
}

.study-steps .done,
.study-steps .active {
  color: var(--forest);
  font-weight: 750;
}

.study-steps .done::before,
.study-steps .active::before {
  background: #7ead9d;
}

.gpt-guide {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 24px;
  padding: 32px;
  border-color: #9a89bf;
  background: linear-gradient(135deg, #fffdf8, #f3effb);
}

.gpt-mark {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: #3d315d;
  color: white;
  font: 800 17px Georgia, serif;
}

.gpt-guide p {
  color: #645e6e;
  line-height: 1.55;
}

.prompt-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 17px 0;
  padding: 12px 12px 12px 16px;
  border: 1px solid #cabee0;
  border-radius: 11px;
  background: white;
}

.prompt-box code {
  color: #342b4a;
  font-family: inherit;
  font-weight: 750;
}

.gpt-open {
  background: #3d315d;
}

.gpt-open:hover {
  background: #504173;
}

.gpt-missing {
  padding: 12px;
  border-radius: 9px;
  background: #eee8f6;
  color: #55476f;
  font-size: 13px;
}

.waiting-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 4px;
  color: #65746d;
  font-size: 13px;
}

.waiting-row .danger {
  margin-left: auto;
  color: var(--red);
}

.waiting-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 #d39a4266;
  animation: waiting 1.8s infinite;
}

@keyframes waiting {
  70% { box-shadow: 0 0 0 8px #d39a4200; }
  100% { box-shadow: 0 0 0 0 #d39a4200; }
}

.ready-card {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: start;
  gap: 24px;
  padding: 36px;
}

.ready-check,
.complete-banner > span {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--green);
  font-size: 30px;
  font-weight: 800;
}

.ready-card .primary {
  margin-top: 8px;
}

.syllabus-card {
  padding: 34px;
}

.syllabus-card > h2 {
  font-size: clamp(30px, 5vw, 44px);
}

.long-copy,
.submitted-answer {
  color: #394741;
  font-size: 16px;
  line-height: 1.75;
}

.key-points {
  display: grid;
  gap: 9px;
  margin: 24px 0;
  padding: 20px 20px 20px 42px;
  border-radius: 12px;
  background: #eef6f1;
  color: #24483c;
  line-height: 1.5;
}

.source-strip {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: #6c7973;
  font-size: 12px;
  line-height: 1.5;
}

.source-strip a,
.content-card small a,
.line-card small a {
  color: var(--green);
  font-weight: 750;
}

.study-section {
  margin-top: 48px;
}

.content-list {
  display: grid;
  gap: 11px;
}

.content-card {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.content-index {
  width: 36px;
  height: 36px;
  background: var(--mint);
  color: var(--green);
}

.content-card h3,
.line-card h3 {
  margin: 3px 0 8px;
  font: 500 21px Georgia, serif;
}

.content-card p {
  margin: 0 0 12px;
  color: #52615a;
  line-height: 1.6;
}

.content-card small,
.line-card small {
  color: #75817c;
  font-size: 11px;
}

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

.line-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.line-card > b {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--forest);
  color: white;
  font-size: 15px;
}

.line-card h3 {
  font-size: 17px;
}

.line-card ul {
  margin: 8px 0 12px;
  padding-left: 18px;
  color: #596861;
  font-size: 12px;
  line-height: 1.5;
}

.practical-section > .study-card {
  padding: 30px;
}

.practical-questions {
  display: grid;
  gap: 8px;
  padding: 18px 18px 18px 38px;
  border-radius: 11px;
  background: #f2efe7;
  line-height: 1.5;
}

#practicalForm {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

#practicalForm label {
  font-size: 14px;
  font-weight: 800;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid #b9c4be;
  border-radius: 11px;
  background: white;
  padding: 15px;
  color: var(--ink);
  font: inherit;
  line-height: 1.55;
}

textarea:focus,
select:focus,
input:focus {
  outline: 3px solid #1f725c22;
  border-color: var(--green);
}

.form-help {
  margin: 0 0 5px;
  color: #718079;
  font-size: 12px;
}

.test-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 25px 28px;
}

.test-summary h2 {
  margin: 5px 0;
  font: 500 32px Georgia, serif;
}

.test-summary p {
  margin: 0;
}

.practical-review {
  margin-bottom: 14px;
  padding: 28px;
}

.submitted-answer {
  padding: 18px;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #f0f5f2;
}

.daily-result-notice {
  display: grid;
  gap: 5px;
  margin: 20px 0 0;
  padding: 16px;
  border: 1px solid #d3aa65;
  border-radius: 11px;
  background: #fbf4e7;
  color: #684b1f;
}

.complete-banner {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 22px;
  margin-bottom: 16px;
  padding: 30px;
  border-radius: 18px;
  background: var(--forest);
  color: white;
}

.complete-banner .eyebrow {
  color: #a9d6c5;
}

.complete-banner h2 {
  margin: 6px 0;
  font: 500 34px Georgia, serif;
}

.complete-banner p {
  margin: 0;
  color: #d5e5df;
}

.completion-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.completion-grid .study-card {
  padding: 28px;
}

.completion-score {
  margin-top: 8px;
  color: var(--forest);
  font: 500 64px Georgia, serif;
}

.completion-score small {
  font-size: 23px;
}

.feedback-card {
  margin-top: 16px;
  padding: 30px;
}

.feedback-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feedback-columns > div {
  padding: 18px;
  border-radius: 11px;
  background: #eef6f1;
}

.feedback-columns > div:last-child {
  background: #f8eee8;
}

.feedback-columns h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.feedback-columns ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 19px;
  font-size: 13px;
  line-height: 1.45;
}

.feedback-card details {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.feedback-card summary {
  cursor: pointer;
  color: var(--forest);
  font-weight: 800;
}

.feedback-card details .long-copy {
  margin-top: 16px;
  font-size: 14px;
}

.finish-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

@media (max-width: 760px) {
  .hero-actions {
    width: 100%;
    margin-top: 28px;
  }

  .study-heading {
    align-items: start;
  }

  .study-heading h1 {
    font-size: 45px;
  }

  .study-heading .lead {
    font-size: 16px;
  }

  .study-grid,
  .completion-grid,
  .feedback-columns,
  .line-grid {
    grid-template-columns: 1fr;
  }

  .request-card,
  .syllabus-card,
  .practical-section > .study-card,
  .feedback-card {
    padding: 22px 18px;
  }

  .request-card {
    grid-template-columns: 1fr;
  }

  .request-card .step-number {
    width: 36px;
    height: 36px;
  }

  .study-session-head {
    display: block;
  }

  .session-number {
    display: inline-block;
    margin-top: 12px;
  }

  .study-steps span {
    display: none;
  }

  .study-steps {
    margin-bottom: 20px;
  }

  .gpt-guide,
  .ready-card,
  .complete-banner {
    grid-template-columns: 1fr;
    padding: 24px 20px;
  }

  .gpt-mark {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    font-size: 14px;
  }

  .prompt-box {
    align-items: start;
  }

  .prompt-box code {
    font-size: 13px;
  }

  .waiting-row {
    align-items: start;
    flex-wrap: wrap;
  }

  .waiting-row .danger {
    width: 100%;
    margin-left: 18px;
    text-align: left;
  }

  .content-card {
    padding: 17px;
  }

  .line-card {
    grid-template-columns: 48px 1fr;
    padding: 15px;
  }

  .line-card > b {
    width: 46px;
    height: 46px;
  }

  .test-summary {
    align-items: start;
    flex-direction: column;
  }

  .completion-score {
    font-size: 54px;
  }

  .finish-actions {
    display: grid;
  }
}

@media (max-width: 420px) {
  header nav button {
    font-size: 11px;
    padding: 8px 5px;
  }

  header #logout {
    font-size: 11px;
    padding: 8px 4px;
  }

  .study-heading #refreshStudy {
    padding: 10px;
    font-size: 12px;
  }

  .study-session-card {
    grid-template-columns: 10px minmax(0, 1fr) 14px;
  }

  .study-session-card > b {
    display: none;
  }
}
