:root {
  --ink: #061225;
  --muted: #3b5578;
  --paper: #dfeeff;
  --panel: rgba(226, 239, 255, 0.9);
  --line: rgba(31, 105, 205, 0.34);
  --moss: #0d63d8;
  --moss-dark: #062f77;
  --sun: #36d4ff;
  --clay: #176fe5;
  --rose: #b42a63;
  --sky: #05a9e9;
  --gold: #ffbc42;
  --mint: #39d6ad;
  --violet: #7157ff;
  --soft-card: rgba(235, 246, 255, 0.88);
  --soft-card-strong: rgba(211, 231, 252, 0.92);
  --shadow: 0 26px 76px rgba(2, 16, 43, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 10% 8%, rgba(54, 212, 255, 0.5), transparent 24rem),
    radial-gradient(circle at 88% 16%, rgba(113, 87, 255, 0.32), transparent 26rem),
    radial-gradient(circle at 74% 84%, rgba(255, 188, 66, 0.22), transparent 24rem),
    linear-gradient(135deg, #092046 0%, #406f9f 46%, #0b315f 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.22), transparent 34rem);
  background-size: 34px 34px, 34px 34px, auto;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 88%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
  border: 1px solid rgba(170, 223, 255, 0.36);
  border-radius: 30px;
  background:
    radial-gradient(circle at 8% 15%, rgba(54, 212, 255, 0.32), transparent 18rem),
    radial-gradient(circle at 85% 22%, rgba(255, 188, 66, 0.22), transparent 16rem),
    linear-gradient(122deg, rgba(5, 20, 48, 0.96), rgba(9, 69, 145, 0.92) 52%, rgba(4, 29, 70, 0.96)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 14px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 8px;
  color: #f4fbff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 6vw, 5.7rem);
  line-height: 0.88;
  letter-spacing: -0.07em;
  text-shadow: 0 16px 34px rgba(0, 0, 0, 0.32);
}

.hero-copy {
  max-width: 720px;
  margin-bottom: 0;
  color: #cde8ff;
  font-size: 1.04rem;
  line-height: 1.55;
}

.hero-actions,
.import-actions,
.nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary,
.ghost,
.reveal {
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 900;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.primary,
.reveal {
  color: #fffdf5;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, #0a5bd1, #147dff 55%, #08b7f0);
  box-shadow: 0 16px 34px rgba(5, 60, 154, 0.36);
}

.primary:hover,
.reveal:hover,
.ghost:hover {
  transform: translateY(-1px);
}

.ghost {
  color: var(--moss-dark);
  border: 1px solid rgba(58, 139, 230, 0.38);
  background: linear-gradient(135deg, rgba(248, 252, 255, 0.92), rgba(210, 232, 255, 0.78));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.danger {
  color: var(--rose);
}

.tabs {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

.tab {
  padding: 12px 18px;
  color: #dff4ff;
  border: 1px solid rgba(170, 223, 255, 0.22);
  border-radius: 999px;
  background: rgba(5, 22, 50, 0.42);
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(0, 12, 36, 0.18);
}

.tab.active {
  color: #03142f;
  background: linear-gradient(135deg, var(--gold), #fff0a8);
  border-color: rgba(255, 240, 168, 0.64);
}

.layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 20px;
}

.panel {
  border: 1px solid rgba(172, 221, 255, 0.38);
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(54, 212, 255, 0.16), transparent 13rem),
    linear-gradient(145deg, rgba(236, 247, 255, 0.92), rgba(205, 226, 249, 0.9));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(16px);
}

.sidebar {
  align-self: start;
  padding: 20px;
}

.sidebar section + section {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.section-title,
.card-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-title h2,
.card-toolbar h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.04em;
}

.section-title span,
.muted {
  color: var(--muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.stat {
  padding: 14px;
  border: 1px solid rgba(64, 140, 225, 0.34);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(249, 253, 255, 0.9), rgba(217, 235, 255, 0.76));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.stat strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.stat.done {
  background: linear-gradient(145deg, rgba(57, 214, 173, 0.28), rgba(206, 246, 237, 0.84));
}

.stat.not-done {
  background: linear-gradient(145deg, rgba(54, 212, 255, 0.28), rgba(219, 243, 255, 0.86));
}

.profile-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.profile-controls .ghost {
  min-height: 46px;
  padding-inline: 16px;
}

.profile-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.35;
}

.small-copy {
  margin: 10px 0 0;
  font-size: 0.84rem;
  line-height: 1.35;
}

.chapter-score-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  margin-top: 12px;
  padding-right: 4px;
  overflow: auto;
}

.chapter-score-item {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid rgba(47, 122, 214, 0.32);
  border-radius: 16px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(251, 254, 255, 0.9), rgba(218, 237, 255, 0.82));
  text-align: left;
  box-shadow: 0 6px 15px rgba(7, 40, 91, 0.08);
}

.chapter-score-item.done {
  border-color: rgba(31, 171, 203, 0.48);
  background:
    linear-gradient(135deg, rgba(57, 214, 173, 0.3), rgba(198, 235, 255, 0.86));
}

.chapter-score-item.started {
  border-color: rgba(255, 188, 66, 0.54);
  background:
    linear-gradient(135deg, rgba(255, 188, 66, 0.24), rgba(221, 239, 255, 0.86));
}

.chapter-score-item strong,
.chapter-score-item small {
  display: block;
}

.chapter-score-item strong {
  color: var(--moss-dark);
  font-size: 0.88rem;
  font-weight: 900;
}

.chapter-score-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.3;
}

.chapter-attempts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chapter-attempts span {
  padding: 4px 7px;
  border-radius: 999px;
  color: #04285c;
  background: linear-gradient(135deg, rgba(54, 212, 255, 0.34), rgba(255, 255, 255, 0.86));
  font-size: 0.72rem;
  font-weight: 900;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--moss-dark);
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(47, 122, 214, 0.36);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(248, 252, 255, 0.78);
  outline: none;
}

input,
select {
  min-height: 46px;
  padding: 0 14px;
}

textarea {
  min-height: 340px;
  padding: 16px;
  line-height: 1.5;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
.question-card:focus {
  border-color: rgba(5, 169, 233, 0.8);
  box-shadow: 0 0 0 4px rgba(54, 212, 255, 0.2);
}

.switches {
  display: grid;
  gap: 10px;
}

.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

.switch input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--moss);
}

.mini-plan {
  color: var(--muted);
  line-height: 1.45;
}

.workspace {
  min-height: 720px;
  padding: 24px;
  border-color: rgba(172, 221, 255, 0.5);
  background:
    radial-gradient(circle at 96% 8%, rgba(54, 212, 255, 0.28), transparent 24rem),
    radial-gradient(circle at 0% 38%, rgba(113, 87, 255, 0.12), transparent 22rem),
    linear-gradient(145deg, rgba(236, 248, 255, 0.97), rgba(205, 227, 252, 0.94));
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: rise 260ms ease both;
}

.pill {
  flex: 0 0 auto;
  padding: 9px 14px;
  border-radius: 999px;
  color: #03265a;
  background: linear-gradient(135deg, rgba(54, 212, 255, 0.52), rgba(255, 255, 255, 0.7));
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(5, 91, 177, 0.16);
}

.question-card {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  margin: 16px 0;
  padding: clamp(16px, 2.4vw, 28px);
  border: 1px solid rgba(3, 125, 221, 0.62);
  border-radius: 28px;
  background:
    radial-gradient(circle at 91% 14%, rgba(54, 212, 255, 0.42), transparent 16rem),
    radial-gradient(circle at 14% 94%, rgba(255, 188, 66, 0.14), transparent 16rem),
    linear-gradient(145deg, rgba(251, 254, 255, 0.99), rgba(222, 241, 255, 0.96) 46%, rgba(197, 226, 253, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 20px 44px rgba(4, 33, 84, 0.2);
}

.question-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: linear-gradient(90deg, var(--gold), var(--sun), var(--violet));
}

.question-card > * {
  position: relative;
  z-index: 1;
}

.empty-state {
  display: grid;
  min-height: 320px;
  place-content: center;
  text-align: center;
}

.empty-state h3,
.question-content h3 {
  margin-bottom: 14px;
  color: #061633;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  line-height: 1.18;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.62);
}

.empty-state p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.55;
}

.question-label,
.answer-label {
  margin-bottom: 8px;
  color: #075fd4;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.choices {
  display: grid;
  gap: 7px;
  margin: 12px 0 16px;
  padding-left: 22px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10pt;
}

.choices li {
  padding: 8px 10px;
  border: 1px solid rgba(47, 122, 214, 0.48);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(228, 244, 255, 0.93));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 6px 14px rgba(9, 38, 80, 0.09);
  transition:
    border-color 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

.choices li:hover {
  border-color: rgba(5, 169, 233, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 10px 22px rgba(5, 77, 160, 0.14);
  transform: translateY(-1px);
}

.choice-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 10px;
}

.choice-item.correct {
  border-color: rgba(12, 103, 206, 0.72);
  background:
    linear-gradient(90deg, rgba(207, 235, 255, 0.98), rgba(181, 224, 255, 0.85));
}

.choice-item.incorrect {
  border-color: rgba(181, 49, 92, 0.7);
  background:
    linear-gradient(90deg, rgba(255, 231, 238, 0.96), rgba(246, 204, 219, 0.72));
}

.choice-text {
  line-height: 1.28;
}

.tf-controls,
.test-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tf-btn {
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(46, 103, 181, 0.45);
  border-radius: 999px;
  color: var(--moss-dark);
  background: rgba(250, 253, 255, 0.92);
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(8, 38, 83, 0.08);
}

.tf-btn.true.selected {
  color: #fffdf5;
  background: linear-gradient(135deg, #0658c7, #0c7dff);
}

.tf-btn.false.selected {
  color: #fffdf5;
  background: linear-gradient(135deg, #9b204f, #d43a75);
}

.correct-value {
  color: var(--moss-dark);
  font-size: 0.72rem;
  font-weight: 900;
}

.test-actions {
  margin: -2px 0 16px;
}

.test-feedback {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.test-feedback.good {
  color: var(--moss-dark);
}

.test-feedback.needs-work {
  color: var(--rose);
}

.answer {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(47, 122, 214, 0.34);
  border-left: 7px solid var(--sun);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(54, 212, 255, 0.24), transparent 12rem),
    linear-gradient(145deg, rgba(237, 249, 255, 0.98), rgba(207, 232, 255, 0.9));
  box-shadow: 0 14px 30px rgba(5, 55, 125, 0.14);
  animation: pop 180ms ease both;
}

.answer h4 {
  margin-bottom: 10px;
  color: #063a90;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
}

.answer div {
  color: #102947;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10pt;
  line-height: 1.45;
}

.answer-source {
  margin-bottom: 12px;
  color: #36537a;
  font-size: 0.92rem;
  font-weight: 900;
}

.explanation-grid {
  display: grid;
  gap: 8px;
}

.explanation-card {
  padding: 10px 12px;
  border: 1px solid rgba(50, 122, 207, 0.32);
  border-radius: 16px;
  background: rgba(250, 253, 255, 0.86);
  box-shadow: 0 8px 18px rgba(8, 46, 99, 0.08);
}

.explanation-card.true {
  border-left: 6px solid #0d63d8;
}

.explanation-card.false {
  border-left: 6px solid var(--rose);
}

.explanation-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.explanation-head strong {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  color: #fffdf5;
  background: linear-gradient(135deg, #061225, #145dbf);
}

.explanation-head span {
  color: var(--moss-dark);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.explanation-card.false .explanation-head span {
  color: var(--rose);
}

.explanation-card h5 {
  margin: 0 0 5px;
  font-size: 10pt;
  line-height: 1.32;
}

.explanation-card p,
.teaching-notes p {
  margin: 0;
  white-space: pre-wrap;
}

.teaching-notes {
  margin-top: 10px;
  padding: 12px;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(54, 212, 255, 0.16), rgba(255, 255, 255, 0.62));
}

.teaching-notes p + p {
  margin-top: 10px;
}

.nav-row {
  justify-content: space-between;
  margin-top: 16px;
}

.chapter-summary {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(5, 169, 233, 0.46);
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 18%, rgba(54, 212, 255, 0.34), transparent 13rem),
    radial-gradient(circle at 4% 100%, rgba(255, 188, 66, 0.16), transparent 14rem),
    linear-gradient(145deg, rgba(243, 251, 255, 0.97), rgba(204, 231, 255, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 14px 34px rgba(5, 55, 125, 0.12);
}

.chapter-summary h3 {
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.04em;
}

.chapter-summary-copy {
  margin-bottom: 10px;
  color: var(--moss-dark);
  font-weight: 800;
  line-height: 1.45;
}

.chapter-summary-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chapter-summary-metrics span {
  padding: 8px 12px;
  border: 1px solid rgba(46, 103, 181, 0.42);
  border-radius: 999px;
  color: var(--moss-dark);
  background: rgba(242, 249, 255, 0.9);
  font-size: 0.92rem;
  font-weight: 800;
}

.chapter-summary-note {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.chapter-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.final-score-button {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, #ffbc42, #36d4ff 48%, #7157ff);
  box-shadow:
    0 18px 36px rgba(5, 91, 177, 0.24),
    0 0 0 4px rgba(255, 188, 66, 0.16);
}

.final-score-button::after {
  content: "";
  position: absolute;
  inset: -60% auto -60% -35%;
  width: 38%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.62), transparent);
  animation: shine 2.4s ease-in-out infinite;
}

.chapter-summary-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(54, 212, 255, 0.38);
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 22%, rgba(54, 212, 255, 0.28), transparent 11rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(208, 234, 255, 0.88));
}

.chapter-summary-celebration {
  border-color: rgba(255, 188, 66, 0.7);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 188, 66, 0.34), transparent 10rem),
    radial-gradient(circle at 90% 24%, rgba(54, 212, 255, 0.36), transparent 12rem),
    linear-gradient(135deg, rgba(255, 251, 229, 0.97), rgba(214, 241, 255, 0.94));
  animation: finishPop 360ms ease both;
}

.chapter-summary-status {
  margin: 0 0 6px;
  color: #0a62d0;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.chapter-summary-result h4 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.05em;
}

.chapter-summary-result-copy {
  margin: 8px 0 0;
  color: var(--moss-dark);
  font-weight: 800;
  line-height: 1.45;
}

.chapter-summary-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.import-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 20px;
}

.drop-zone {
  display: grid;
  min-height: 360px;
  place-items: center;
  align-content: center;
  padding: 28px;
  border: 2px dashed rgba(20, 87, 184, 0.28);
  border-radius: 26px;
  text-align: center;
  background: rgba(208, 224, 240, 0.62);
}

.drop-zone.dragging {
  border-color: var(--moss);
  background: rgba(20, 87, 184, 0.16);
}

.drop-zone input {
  display: none;
}

.drop-zone h3 {
  margin-bottom: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.drop-zone p {
  max-width: 330px;
  color: var(--muted);
  line-height: 1.55;
}

.format-help {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(208, 224, 240, 0.62);
}

code {
  display: block;
  overflow-x: auto;
  padding: 14px;
  border-radius: 14px;
  color: #fffdf5;
  background: var(--ink);
}

.library-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.library-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(211, 225, 241, 0.7);
}

.library-item h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.library-item p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.badge {
  align-self: start;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fffdf5;
  background: var(--sky);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.badge.done {
  background: var(--moss);
}

.badge.not-done {
  color: var(--ink);
  background: var(--sun);
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  max-width: min(420px, calc(100% - 32px));
  padding: 14px 18px;
  border-radius: 18px;
  color: #fffdf5;
  background: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shine {
  0% {
    transform: translateX(0) rotate(18deg);
  }

  55%,
  100% {
    transform: translateX(440%) rotate(18deg);
  }
}

@keyframes finishPop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 920px) {
  .hero {
    align-items: stretch;
    flex-direction: column;
  }

  .layout,
  .import-grid {
    grid-template-columns: 1fr;
  }

  .workspace {
    min-height: auto;
  }

  .chapter-summary-result {
    align-items: stretch;
    flex-direction: column;
  }

  .chapter-summary-button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 20px, 1400px);
    padding-top: 10px;
  }

  .hero,
  .workspace,
  .sidebar {
    border-radius: 22px;
    padding: 18px;
  }

  .tabs {
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .section-title,
  .card-toolbar,
  .library-item {
    align-items: start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .choice-item {
    grid-template-columns: 1fr;
  }

  .primary,
  .ghost,
  .reveal {
    width: 100%;
  }
}
