:root {
  --ink: #14201c;
  --ink-soft: #3a4a43;
  --muted: #6b7a72;
  --paper: #f3f0e8;
  --paper-2: #e8efe9;
  --brand: #0b3d2e;
  --brand-2: #1a5c45;
  --accent: #c4a35a;
  --accent-soft: rgba(196, 163, 90, 0.18);
  --line: rgba(20, 32, 28, 0.12);
  --ok: #1f6b45;
  --bad: #9b2c2c;
  --shadow: 0 18px 50px rgba(11, 61, 46, 0.12);
  --radius: 18px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(26, 92, 69, 0.16), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(196, 163, 90, 0.18), transparent 50%),
    linear-gradient(180deg, #f7f4ec 0%, var(--paper) 45%, #e7efe9 100%);
  line-height: 1.55;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.app {
  max-width: 860px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 0 16px calc(28px + var(--safe-bottom));
}

.boot {
  padding: 4rem 1rem;
  text-align: center;
  color: var(--muted);
}

/* Login */
.login-page {
  display: grid;
  place-items: center;
  padding: 24px 16px calc(24px + var(--safe-bottom));
}

.login-shell {
  width: min(100%, 420px);
  padding: 2rem 1.5rem 1.75rem;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.login-brand .eyebrow,
.topbar .eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-2);
  font-weight: 600;
}

.login-brand h1,
.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 5vw, 2.25rem);
  line-height: 1.15;
  color: var(--brand);
}

.lede {
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.login-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.6rem;
}

.login-form label {
  display: grid;
  gap: 0.35rem;
}

.login-form label span {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.login-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  background: #fff;
  color: var(--ink);
}

.login-form input:focus {
  outline: 2px solid rgba(11, 61, 46, 0.28);
  border-color: var(--brand-2);
}

.form-error {
  margin: 0;
  color: var(--bad);
  font-size: 0.92rem;
  font-weight: 600;
}

.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #f7f4ec;
}

.btn-secondary {
  background: transparent;
  color: var(--brand);
  border: 1px solid rgba(11, 61, 46, 0.22);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  padding: 0.45rem 0.7rem;
  font-weight: 600;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Top bar / home */
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0 0.5rem;
}

.topbar-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.hero {
  padding: 0.4rem 0 1.25rem;
}

.hero p {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
  max-width: 38ch;
}

.progress-summary {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.1rem;
}

.progress-ring {
  --p: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background:
    conic-gradient(var(--brand-2) calc(var(--p) * 1%), rgba(11, 61, 46, 0.12) 0);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.progress-ring span {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--paper);
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand);
}

.progress-copy {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.progress-copy strong {
  color: var(--ink);
}

.section-list {
  display: grid;
  gap: 0.7rem;
  padding-bottom: 1rem;
}

.section-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1rem 1rem 0.9rem;
  background: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.section-item:hover:not(:disabled) {
  border-color: rgba(11, 61, 46, 0.35);
  background: rgba(255, 255, 255, 0.9);
}

.section-item:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.section-num {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--brand);
}

.section-item.is-done .section-num {
  background: rgba(31, 107, 69, 0.16);
  color: var(--ok);
}

.section-meta h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 700;
}

.section-meta p {
  margin: 0.2rem 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.section-status {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-2);
  white-space: nowrap;
}

.section-item:disabled .section-status {
  color: var(--muted);
}

.section-item.is-done .section-status {
  background: rgba(31, 107, 69, 0.15);
  color: var(--ok);
}

.section-item.is-mastered {
  border-color: rgba(31, 107, 69, 0.35);
}

/* Multi-test picker */
.test-picker-head {
  margin-bottom: 1rem;
}

.test-picker-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--brand);
}

.test-picker-sub {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.test-grid {
  display: grid;
  gap: 0.7rem;
}

.test-card {
  display: grid;
  gap: 0.25rem;
  text-align: left;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  color: var(--ink);
}

.test-card strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--brand);
}

.test-card span {
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 600;
}

.test-card em {
  font-style: normal;
  font-size: 0.86rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.test-card.is-selected {
  border-color: var(--brand-2);
  background: rgba(26, 92, 69, 0.08);
}

.test-card.is-passed {
  border-color: rgba(31, 107, 69, 0.4);
}

.test-card.is-passed em {
  color: var(--ok);
}

.active-test-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.active-test-bar strong {
  color: var(--brand);
  font-family: var(--font-display);
}

.pass-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(31, 107, 69, 0.14);
  color: var(--ok);
  font-weight: 700;
  font-size: 0.85rem;
}

.fail-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(155, 44, 44, 0.12);
  color: var(--bad);
  font-weight: 700;
  font-size: 0.85rem;
}

.section-item.is-done .section-status {
  background: rgba(31, 107, 69, 0.15);
  color: var(--ok);
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}

.section-item.is-mastered {
  border-color: rgba(31, 107, 69, 0.35);
}

/* Multi-test picker */
.test-picker-head {
  margin-bottom: 1rem;
}

.test-picker-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--brand);
}

.test-picker-sub {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.test-grid {
  display: grid;
  gap: 0.7rem;
}

.test-card {
  display: grid;
  gap: 0.25rem;
  text-align: left;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  color: var(--ink);
}

.test-card strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--brand);
}

.test-card span {
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 600;
}

.test-card em {
  font-style: normal;
  font-size: 0.86rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.test-card.is-selected {
  border-color: var(--brand-2);
  background: rgba(26, 92, 69, 0.08);
}

.test-card.is-passed {
  border-color: rgba(31, 107, 69, 0.4);
}

.test-card.is-passed em {
  color: var(--ok);
}

.active-test-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.active-test-bar strong {
  color: var(--brand);
  font-family: var(--font-display);
}

.pass-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(31, 107, 69, 0.14);
  color: var(--ok);
  font-weight: 700;
  font-size: 0.85rem;
}

.fail-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(155, 44, 44, 0.12);
  color: var(--bad);
  font-weight: 700;
  font-size: 0.85rem;
}

/* Chapter view */
.chapter {
  padding-bottom: 1rem;
  animation: rise 0.35s ease;
}

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

.chapter-head {
  padding: 0.85rem 0 1rem;
}

.chapter-head h1 {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4.4vw, 1.85rem);
  line-height: 1.2;
  color: var(--brand);
}

.tabs {
  display: flex;
  gap: 0.4rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  margin-bottom: 1rem;
  position: sticky;
  top: 0.5rem;
  z-index: 5;
  backdrop-filter: blur(8px);
}

.tab {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 0.7rem 0.4rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink-soft);
  cursor: pointer;
}

.tab.is-active {
  background: var(--brand);
  color: #f7f4ec;
}

.panel {
  display: none;
}

.panel.is-active {
  display: block;
  animation: rise 0.3s ease;
}

.study-tip {
  margin: 0 0 1rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: rgba(26, 92, 69, 0.1);
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.note-figure {
  margin: 0.85rem 0 1.1rem;
  padding: 0;
}

.note-figure-link {
  display: block;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 24px rgba(11, 61, 46, 0.08);
}

.note-figure img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.note-figure figcaption {
  margin-top: 0.45rem;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.45;
}

.note-block .note-figure {
  margin-top: 1rem;
}

.outcomes {
  margin: 0 0 1.1rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(210, 232, 210, 0.45);
  border-radius: 0 16px 16px 0;
}

.outcomes summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--brand);
  list-style: none;
}

.outcomes summary::-webkit-details-marker {
  display: none;
}

.outcomes ul {
  margin: 0.7rem 0 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.outcomes li + li {
  margin-top: 0.35rem;
}

.note-toc {
  display: grid;
  gap: 0.4rem;
  margin: 0 0 1.2rem;
}

.note-toc a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  text-decoration: none;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.note-toc a span {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--brand);
  font-size: 0.78rem;
}

.note-block {
  padding: 1.25rem 0 1.4rem;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 4.5rem;
}

.note-block:last-child {
  border-bottom: none;
}

.note-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brand-2);
  margin-bottom: 0.25rem;
}

.note-block h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.18rem;
  color: var(--brand);
}

.note-body {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.65;
}

.note-body .body-p {
  margin: 0 0 0.85rem;
}

.note-body .body-p:last-child {
  margin-bottom: 0;
}

.flash-a .body-p,
.qa-item .answer .body-p {
  margin: 0 0 0.55rem;
}

.flash-a .body-p:last-child,
.qa-item .answer .body-p:last-child {
  margin-bottom: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
}

.chip {
  display: inline-flex;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(11, 61, 46, 0.08);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 700;
}

.chip-soft {
  background: rgba(196, 163, 90, 0.2);
  color: #6a5420;
}

.aid-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-2);
  margin-bottom: 0.45rem;
}

.mnemonic-list {
  margin-top: 0.95rem;
  display: grid;
  gap: 0.45rem;
}

.mnemonic {
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  background: #fff8e8;
  border: 1px solid rgba(196, 163, 90, 0.35);
}

.mnemonic-code {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--brand);
  font-size: 1.05rem;
}

.mnemonic-exp {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.table-wrap {
  margin-top: 1rem;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  font-size: 0.88rem;
}

th,
td {
  padding: 0.7rem 0.8rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}

th {
  background: rgba(11, 61, 46, 0.08);
  color: var(--brand);
  font-weight: 700;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: none;
}

.key-box {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(26, 92, 69, 0.1);
}

.key-box ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.94rem;
}

.key-box li + li {
  margin-top: 0.35rem;
}

/* QA flashcards */
.qa-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  font-size: 0.9rem;
}

.flashcard {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  padding: 1.2rem 1.15rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}

.flashcard:active {
  transform: scale(0.995);
}

.flash-label {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-2);
}

.flash-q p,
.flash-a p {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.45;
  color: var(--ink);
  font-weight: 600;
}

.flash-a {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
}

.flash-a p {
  font-weight: 500;
  color: var(--ink-soft);
}

.flash-hint {
  margin-top: 0.75rem !important;
  font-size: 0.92rem !important;
  font-weight: 500 !important;
  color: var(--muted) !important;
}

.flash-tap {
  margin-top: 1rem !important;
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  color: var(--brand-2) !important;
}

.qa-all {
  margin-top: 1.4rem;
}

.qa-all > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 0.75rem;
}

.qa-list {
  display: grid;
  gap: 0.75rem;
}

.qa-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.65);
  overflow: hidden;
}

.qa-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.qa-item summary::-webkit-details-marker {
  display: none;
}

.qa-num {
  display: inline-grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  margin-right: 0.35rem;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--brand);
  font-size: 0.78rem;
}

.qa-item .answer {
  padding: 0 1.05rem 1.05rem;
  color: var(--ink-soft);
  border-top: 1px dashed var(--line);
  margin-top: 0;
  padding-top: 0.85rem;
}

/* Quiz */
.quiz-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(11, 61, 46, 0.12);
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.quiz-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: inherit;
  transition: width 0.25s ease;
}

.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.quiz-question {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--brand);
}

.options {
  display: grid;
  gap: 0.55rem;
}

.option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  cursor: pointer;
  font-weight: 600;
}

.opt-letter {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(11, 61, 46, 0.1);
  color: var(--brand);
  font-size: 0.82rem;
  flex-shrink: 0;
}

.option.is-selected {
  border-color: var(--brand-2);
  background: rgba(26, 92, 69, 0.08);
}

.option.is-correct {
  border-color: var(--ok);
  background: rgba(31, 107, 69, 0.12);
}

.option.is-correct .opt-letter {
  background: var(--ok);
  color: #fff;
}

.option.is-wrong {
  border-color: var(--bad);
  background: rgba(155, 44, 44, 0.1);
}

.option.is-wrong .opt-letter {
  background: var(--bad);
  color: #fff;
}

.option:disabled {
  cursor: default;
}

.review-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.2rem;
}

.review-item {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  text-align: left;
}

.review-item.ok {
  border-color: rgba(31, 107, 69, 0.35);
}

.review-item.bad {
  border-color: rgba(155, 44, 44, 0.35);
}

.review-item p {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.review-exp {
  font-size: 0.88rem !important;
}

.feedback {
  margin-top: 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  font-size: 0.94rem;
}

.feedback.ok {
  background: rgba(31, 107, 69, 0.12);
  color: var(--ok);
}

.feedback.bad {
  background: rgba(155, 44, 44, 0.1);
  color: var(--bad);
}

.quiz-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}

.quiz-result {
  text-align: center;
  padding: 1.5rem 0.5rem 0.5rem;
}

.quiz-result .score {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--brand);
  margin: 0.3rem 0;
}

.quiz-result p {
  color: var(--ink-soft);
}

.empty-state {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
}

/* Deneme sınavı */
.exam-section {
  margin: 0 0 1.25rem;
}

.exam-section-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--brand);
}

.exam-section-sub {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.exam-list {
  display: grid;
  gap: 0.75rem;
}

.exam-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(196, 163, 90, 0.45);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(196, 163, 90, 0.12));
  box-shadow: var(--shadow);
  cursor: pointer;
  color: inherit;
}

.exam-item:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.exam-badge {
  display: inline-grid;
  place-items: center;
  min-width: 3.2rem;
  padding: 0.45rem 0.55rem;
  border-radius: 12px;
  background: var(--brand);
  color: #f7f4ec;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.exam-meta-line {
  margin: 0.35rem 0 0 !important;
  color: var(--brand-2) !important;
  font-size: 0.88rem !important;
  font-weight: 600;
}

.exam-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.85rem;
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 0.55rem 0;
  background: linear-gradient(180deg, rgba(247, 244, 236, 0.96), rgba(247, 244, 236, 0.88));
  backdrop-filter: blur(8px);
}

.exam-head-mid {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.exam-head-mid strong {
  font-size: 0.95rem;
  color: var(--brand);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exam-head-mid span {
  font-size: 0.8rem;
  color: var(--muted);
}

.exam-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.45rem 0.7rem;
  border-radius: 12px;
  background: rgba(11, 61, 46, 0.1);
  color: var(--brand);
  min-width: 4.5rem;
  text-align: center;
}

.exam-timer.is-warn {
  background: rgba(196, 163, 90, 0.28);
  color: #6a4e12;
}

.exam-timer.is-critical {
  background: rgba(155, 44, 44, 0.16);
  color: var(--bad);
  animation: exam-pulse 1s ease infinite;
}

@keyframes exam-pulse {
  50% {
    opacity: 0.72;
  }
}

.exam-nav {
  margin-top: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.55);
}

.exam-nav summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand);
}

.exam-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(2.4rem, 1fr));
  gap: 0.4rem;
  margin: 0.75rem 0;
}

.exam-nav-dot {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.exam-nav-dot.is-answered {
  background: rgba(26, 92, 69, 0.14);
  border-color: rgba(26, 92, 69, 0.35);
  color: var(--brand);
}

.exam-nav-dot.is-current {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.exam-submit-inline {
  width: 100%;
  margin-bottom: 0.35rem;
}

.exam-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  transform: translateX(-50%) translateY(20px);
  background: var(--brand);
  color: #f7f4ec;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 40;
  box-shadow: var(--shadow);
}

.exam-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.review-your {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.25rem 0;
}

@media (min-width: 720px) {
  .app {
    padding-left: 24px;
    padding-right: 24px;
  }

  .section-item {
    padding: 1.15rem 1.2rem;
  }
}

/* Admin panel */
.admin-page {
  padding: 0 16px calc(28px + var(--safe-bottom));
}

.admin-shell {
  max-width: 960px;
  margin: 0 auto;
}

.admin-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5vw, 2.25rem);
  color: var(--brand);
}

.admin-hero p {
  margin: 0.6rem 0 0;
  color: var(--ink-soft);
}

.admin-card {
  margin: 1.25rem 0;
  padding: 1.25rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.admin-card h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  color: var(--brand);
}

.admin-form {
  display: grid;
  gap: 0.85rem;
  max-width: 420px;
}

.admin-form label {
  display: grid;
  gap: 0.3rem;
}

.admin-form label span {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.admin-form input[type="text"],
.admin-form input[type="password"],
.admin-form input[type="date"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  background: #fff;
}

.admin-check {
  display: flex !important;
  align-items: center;
  gap: 0.55rem;
  grid-template-columns: none !important;
}

.admin-check input {
  width: auto;
}

.admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.form-ok {
  margin: 0.5rem 0;
  color: var(--ok);
  font-weight: 600;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.admin-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-row-actions {
  white-space: nowrap;
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.inline-form {
  display: inline;
  margin: 0;
}

.admin-pill {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.btn-danger {
  color: var(--bad) !important;
}

