:root {
  --navy: #123056;
  --navy-dark: #0b1e36;
  --teal: #1c8c80;
  --teal-dark: #147068;
  --teal-soft: #e7f5f2;
  --teal-glow: rgba(28, 140, 128, 0.25);
  --sand: #f5f0e8;
  --sand-2: #ebe3d5;
  --card: #ffffff;
  --text: #152033;
  --muted: #5c6b7a;
  --line: #e6ddd0;
  --ok: #067647;
  --ok-bg: #e8f8f0;
  --warn: #b54708;
  --warn-bg: #fff6e8;
  --bad: #b42318;
  --bad-bg: #fdecea;
  --shadow: 0 10px 28px rgba(18, 36, 63, 0.08);
  --shadow-lg: 0 22px 50px rgba(18, 36, 63, 0.12);
  --shadow-xl: 0 32px 64px rgba(18, 36, 63, 0.14);
  --radius: 18px;
  --header-h: 4.5rem;
  --tabbar-h: 4.4rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body.myexam {
  font-family: "Assistant", "Segoe UI", Tahoma, sans-serif;
  background:
    radial-gradient(900px 420px at 100% -8%, rgba(28, 140, 128, 0.16), transparent 55%),
    radial-gradient(800px 380px at -10% 0%, rgba(18, 48, 86, 0.08), transparent 50%),
    linear-gradient(180deg, #f8f5ef 0%, var(--sand) 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.65;
}

body.doctor-app {
  background:
    radial-gradient(900px 380px at 100% -12%, rgba(28, 140, 128, 0.12), transparent 50%),
    linear-gradient(180deg, #f4f7f8 0%, #eef3f5 100%);
  padding-bottom: 0;
}

.skip-link {
  position: absolute;
  right: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.6rem;
}

.wrap {
  width: min(1080px, calc(100% - 2rem));
  margin-inline: auto;
}

.doctor-app .wrap {
  width: min(1040px, calc(100% - 2rem));
}

.header-bar {
  width: calc(100% - 2.5rem);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
  position: relative;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  background: #fff;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.doctor-app .site-header {
  background: #fff;
}

.header-exit {
  display: none;
}

.header-tools {
  display: none;
}

.site-header.is-stuck {
  box-shadow: 0 8px 24px rgba(18, 36, 63, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.7rem;
  background: linear-gradient(145deg, var(--navy) 0%, #1a4a6e 55%, var(--teal) 130%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 14px rgba(18, 48, 86, 0.22);
}

.brand-name {
  line-height: 1;
}

.nav-links {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  align-items: center;
}

.nav-toggle {
  display: none;
  font: inherit;
  font-weight: 700;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 0;
  border-radius: 999px;
  padding: 0.62rem 1.2rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  line-height: 1.3;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn[hidden],
[hidden] {
  display: none !important;
}

.btn-primary {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 8px 18px rgba(28, 140, 128, 0.22);
}

.btn-primary:hover {
  background: var(--teal-dark);
}

.btn-ghost {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: #cfc5b4;
  background: #fffcf7;
}

.btn-danger {
  background: var(--bad);
  color: #fff;
}

.hero {
  padding: 3.5rem 1rem 2.5rem;
  position: relative;
  overflow: hidden;
  margin-inline: calc(-50vw + 50%);
  padding-inline: calc(50vw - 50%);
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.hero-blob-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(28, 140, 128, 0.2) 0%, transparent 70%);
  top: -200px;
  left: -100px;
  animation: blob-float 8s ease-in-out infinite;
}

.hero-blob-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(18, 48, 86, 0.12) 0%, transparent 70%);
  bottom: -150px;
  right: -80px;
  animation: blob-float 10s ease-in-out infinite reverse;
}

@keyframes blob-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -30px) scale(1.05); }
}

.hero h1,
.page-title {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.18;
  color: var(--navy);
  margin: 0 0 0.9rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.hero-gradient {
  background: linear-gradient(135deg, var(--teal) 0%, #2ba89a 50%, var(--navy) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p,
.lead {
  font-size: 1.18rem;
  color: var(--muted);
  max-width: 38rem;
  line-height: 1.7;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin: 0 0 0.65rem;
}

.kicker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

.hero-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.8rem;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.8rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.trust-avatars {
  display: flex;
}

.trust-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-soft) 0%, var(--teal) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  margin-inline-start: -0.5rem;
}

.trust-avatar:first-child {
  margin-inline-start: 0;
}

.trust-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.hero-visual {
  position: relative;
}

.hero-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.4rem 1.4rem 1.25rem;
  box-shadow: var(--shadow-xl);
}

.hero-card-float {
  transform: rotate(-1.5deg);
  animation: card-float 6s ease-in-out infinite;
}

@keyframes card-float {
  0%, 100% { transform: rotate(-1.5deg) translateY(0); }
  50% { transform: rotate(-1.5deg) translateY(-8px); }
}

.hero-card-accent {
  position: absolute;
  bottom: -1rem;
  left: -1rem;
  background: var(--ok-bg);
  border: 1px solid #b7e0cb;
  border-radius: 14px;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ok);
  box-shadow: var(--shadow);
  animation: accent-pop 6s ease-in-out infinite;
  animation-delay: 3s;
}

.accent-check {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
}

@keyframes accent-pop {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.03) translateY(-4px); }
}

.hero-card .pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: 999px;
  padding: 0.22rem 0.7rem;
  margin-bottom: 0.75rem;
}

.hero-card p {
  margin: 0 0 0.9rem;
  color: var(--navy);
  font-weight: 600;
  font-size: 1.05rem;
  max-width: none;
}

.hero-opts {
  display: grid;
  gap: 0.5rem;
}

.hero-opt {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.8rem;
  font-size: 0.92rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.hero-opt.is-right {
  background: var(--ok-bg);
  border-color: #b7e0cb;
}

/* Stats bar */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 1.6rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: -0.5rem auto 2.5rem;
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  text-align: center;
}

.stat-number {
  font-family: "Inter", "Assistant", sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
}

.stat-desc {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.stat-divider {
  width: 1px;
  height: 2.5rem;
  background: var(--line);
}

/* Buttons - sizes */
.btn-lg {
  padding: 0.78rem 1.6rem;
  font-size: 1.02rem;
}

.btn-block {
  width: 100%;
}

.btn-cta {
  background: linear-gradient(135deg, var(--teal) 0%, #2ba89a 100%);
  color: #fff;
  box-shadow: 0 8px 24px var(--teal-glow);
}

.btn-cta:hover {
  background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal) 100%);
  box-shadow: 0 12px 32px var(--teal-glow);
}

.btn-ghost-light {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.section {
  padding: 2rem 0 3rem;
}

.section-head {
  margin-bottom: 1.5rem;
}

.section-head-center {
  text-align: center;
}

.section-head-center .muted {
  max-width: 36rem;
  margin-inline: auto;
}

.section-kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin: 0 0 0.4rem;
}

.section-head h2,
.section-title {
  color: var(--navy);
  font-size: clamp(1.4rem, 3vw, 1.7rem);
  margin: 0 0 0.45rem;
  font-weight: 800;
}

.section-title {
  margin: 2rem 0 0.85rem;
}

.cards,
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 0.5rem;
}

.cards {
  max-width: 720px;
  margin-inline: auto;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.35rem;
  box-shadow: var(--shadow);
}

.card h2,
.card h3 {
  margin: 0 0 0.4rem;
  color: var(--navy);
}

.feature-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--teal-soft);
}

.feature-ico {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 0.9rem;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--teal-soft) 0%, rgba(28, 140, 128, 0.15) 100%);
  color: var(--teal-dark);
  font-weight: 800;
  margin-bottom: 0.9rem;
}

.feature-ico svg {
  width: 1.4rem;
  height: 1.4rem;
}

.feature-card h3 {
  font-size: 1.1rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.steps {
  display: flex;
  align-items: stretch;
  gap: 0;
  justify-content: center;
}

.step {
  flex: 1;
  max-width: 280px;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.step:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.step-number {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy) 0%, #1a4a6e 100%);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  display: inline-grid;
  place-items: center;
  margin-bottom: 0.85rem;
  box-shadow: 0 4px 12px rgba(18, 48, 86, 0.2);
}

.step-connector {
  width: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-connector::after {
  content: "";
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--line) 0%, var(--teal) 50%, var(--line) 100%);
  border-radius: 2px;
}

.step h3 {
  font-size: 1.05rem;
}

.price-tag {
  font-family: "Inter", "Assistant", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--teal);
  margin: 0.6rem 0 0.2rem;
}

.pkg-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pkg-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pkg-card .muted {
  flex: 1;
}

.pkg-card:not(.is-featured) h3 {
  margin-top: 1.85rem;
}

.pkg-card.is-featured {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(28, 140, 128, 0.16), var(--shadow-lg);
  position: relative;
}

.featured-badge,
.upgrade-badge {
  display: inline-block;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0.16rem 0.65rem;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.pkg-perks {
  list-style: none;
  padding: 0;
  margin: 0.65rem 0 0.5rem;
  display: grid;
  gap: 0.45rem;
  flex: 1;
}

.pkg-perks li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.pkg-perks li::before {
  content: "✓";
  font-weight: 800;
  color: var(--teal);
  font-size: 0.85rem;
}

.muted {
  color: var(--muted);
}

/* CTA section */
.cta-section {
  padding: 1rem 0 3rem;
  margin-inline: calc(-50vw + 50%);
  padding-inline: calc(50vw - 50%);
}

.cta-inner {
  background: linear-gradient(135deg, var(--navy) 0%, #1a4a6e 40%, var(--navy-dark) 100%);
  border-radius: 24px;
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at 30% 20%, rgba(28, 140, 128, 0.2), transparent 60%);
  pointer-events: none;
}

.cta-inner h2 {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.5rem;
  font-weight: 800;
  position: relative;
}

.cta-inner p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.05rem;
  margin: 0 0 1.5rem;
  position: relative;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  position: relative;
}

.site-footer {
  padding: 2.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.92rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin-top: 0;
}

.admin-link {
  color: #8a8178;
  text-decoration: none;
  font-size: 0.85rem;
}

.admin-link:hover {
  text-decoration: underline;
}

.auth-box {
  width: min(440px, 100%);
  margin: 1.6rem auto 2.6rem;
}

.auth-box-wide {
  width: min(920px, 100%);
}

.contact-page {
  margin-top: 1.2rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 1.25rem;
  align-items: start;
}

.contact-info-card h1,
.contact-form-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.55rem;
  color: var(--navy);
}

.contact-intro {
  margin: 0 0 1rem;
  color: var(--text);
  line-height: 1.6;
}

.contact-details {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.contact-details li {
  display: grid;
  gap: 0.2rem;
}

.contact-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact-details a {
  color: var(--teal);
  font-weight: 700;
  text-decoration: none;
}

.contact-details a:hover {
  text-decoration: underline;
}

.contact-fallback {
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.footer-link {
  color: var(--muted);
  text-decoration: none;
}

.footer-link:hover {
  color: var(--teal);
  text-decoration: underline;
}

.auth-box .btn-primary {
  width: 100%;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 0.85rem;
}

.auth-box h1 {
  margin: 0 0 0.35rem;
  font-size: 1.55rem;
  color: var(--navy);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.form-field label {
  font-weight: 700;
  color: var(--navy);
}

.form-field input,
.form-field select,
.form-field textarea {
  font: inherit;
  padding: 0.72rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid rgba(28, 140, 128, 0.35);
  border-color: var(--teal);
}

.form-field textarea {
  min-height: 4.5rem;
  resize: vertical;
}

.alert {
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.alert-error {
  background: var(--bad-bg);
  color: #8a1f11;
}

.alert-info {
  background: var(--teal-soft);
  color: var(--navy);
}

.alert-ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.center-note {
  text-align: center;
  margin-top: 1.25rem;
}

.center-note a {
  color: var(--navy);
  font-weight: 700;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.checkout-confirm form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.empty-state {
  margin: 1.5rem 0 2.5rem;
  text-align: center;
}

.empty-state p:first-child {
  margin-top: 0;
}

.status-card {
  text-align: center;
  padding: 1.8rem 1.4rem;
}

.status-card h2 {
  margin-top: 0.35rem;
}

.status-badge {
  display: inline-block;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 0.22rem 0.75rem;
  border-radius: 999px;
  margin: 0 0 0.5rem;
}

.status-paid {
  background: var(--ok-bg);
  color: var(--ok);
}

.status-pending {
  background: var(--warn-bg);
  color: var(--warn);
}

.status-failed {
  background: var(--bad-bg);
  color: var(--bad);
}

.status-none {
  background: #f3f1ec;
  color: var(--muted);
}

.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 680px;
  margin-inline: auto;
}

.faq-item {
  padding: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item[open] {
  border-color: var(--teal-soft);
  box-shadow: 0 6px 20px rgba(28, 140, 128, 0.08);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
  padding: 1.1rem 1.3rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
  position: relative;
  transition: transform 0.3s ease;
}

.faq-chevron::before,
.faq-chevron::after {
  content: "";
  position: absolute;
  background: var(--navy);
  border-radius: 2px;
  top: 50%;
  left: 50%;
}

.faq-chevron::before {
  width: 12px;
  height: 2px;
  transform: translate(-50%, -50%);
}

.faq-chevron::after {
  width: 2px;
  height: 12px;
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.faq-item[open] .faq-chevron::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.faq-item p {
  margin: 0;
  padding: 0 1.3rem 1.2rem;
  color: var(--muted);
  line-height: 1.7;
}

.sample-card {
  max-width: 680px;
  margin-inline: auto;
}

.sample-card .question-body {
  margin-top: 0.4rem;
}

.doctor-nav .btn.is-active,
.nav-links .btn.is-active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.doctor-nav .btn.is-on,
.btn.is-on {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--navy);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.85rem;
  margin: 1.25rem 0 0.5rem;
}

.stat-card {
  padding: 1.05rem 1.1rem;
}

.stat-card .stat-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.stat-card .stat-value {
  margin: 0.2rem 0 0;
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.15;
}

.dash-ctas {
  margin: 1.25rem 0 0.5rem;
}

.dash-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: start;
}

.pkg-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy);
}

.upgrade-cta {
  margin: 0.45rem 0 0.75rem;
  font-size: 0.92rem;
}

.upgrade-cta a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.card.is-upgrade {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(28, 140, 128, 0.18), var(--shadow);
}

.card.is-owned {
  opacity: 0.72;
}

.category-progress {
  display: grid;
  gap: 0.75rem;
}

.progress-row {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.progress-row:hover {
  border-color: var(--teal);
  transform: translateY(-1px);
}

.progress-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.progress-row-head strong {
  flex: 1;
  min-width: 0;
}

.progress-track {
  height: 8px;
  background: var(--sand-2);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), #3bb8a8);
  border-radius: 999px;
}

.study-hero {
  padding-bottom: 0.35rem;
}

.study-filters {
  margin-bottom: 1.25rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem 1rem;
}

.study-question {
  padding: 1.45rem 1.4rem 1.25rem;
}

.study-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  margin-bottom: 0.85rem;
  font-size: 0.88rem;
}

.meta-pill {
  background: var(--sand);
  border-radius: 999px;
  padding: 0.12rem 0.65rem;
  font-weight: 700;
  color: var(--navy);
}

.question-body {
  font-size: 1.16rem;
  color: var(--navy);
  margin-bottom: 1.1rem;
  font-weight: 600;
  line-height: 1.55;
}

.question-body p:first-child {
  margin-top: 0;
}

.study-options {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.study-option {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem 0.95rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.study-option:hover {
  border-color: #cfc5b4;
}

.study-option input {
  margin-top: 0.35rem;
  flex-shrink: 0;
  accent-color: var(--teal);
}

.study-option.is-selected,
.study-option:has(input:checked) {
  border-color: var(--teal);
  background: #f3fbf9;
  box-shadow: 0 0 0 1px rgba(28, 140, 128, 0.2);
}

.option-letter {
  font-weight: 800;
  color: var(--teal);
  min-width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  background: var(--teal-soft);
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.option-text {
  flex: 1;
}

.study-options.is-revealed .study-option {
  cursor: default;
}

.study-option.is-correct {
  background: var(--ok-bg);
  border-color: #b7e0cb;
}

.study-option.is-wrong {
  background: var(--bad-bg);
  border-color: #e3b4ad;
}

.study-option.is-missed {
  box-shadow: inset 0 0 0 2px var(--teal);
}

.study-feedback {
  font-weight: 800;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  margin: 0 0 1rem;
}

.study-feedback.ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.study-feedback.partial {
  background: var(--warn-bg);
  color: var(--warn);
}

.study-feedback.bad {
  background: var(--bad-bg);
  color: var(--bad);
}

.study-explain {
  background: #faf8f4;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin-top: 0.9rem;
}

.study-explain h2 {
  font-size: 1.02rem;
  margin: 0 0 0.35rem;
}

.study-ref {
  margin-top: 0.75rem;
}

.study-attempt-history {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #faf8f4;
  padding: 0.65rem 0.85rem;
}

.study-attempt-history summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
  list-style: none;
}

.study-attempt-history summary::-webkit-details-marker {
  display: none;
}

.study-attempt-history summary::before {
  content: "▸";
  display: inline-block;
  margin-left: 0.35rem;
  transition: transform 0.15s ease;
}

.study-attempt-history[open] summary::before {
  transform: rotate(-90deg);
}

.attempt-history-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.attempt-history-item {
  display: grid;
  gap: 0.3rem 0.65rem;
  padding: 0.55rem 0.7rem;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 0.88rem;
}

@media (min-width: 560px) {
  .attempt-history-item {
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
  }
}

.attempt-history-when {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.attempt-history-mode {
  font-size: 0.78rem;
}

.attempt-history-selected {
  color: var(--navy);
}

.attempt-history-result {
  font-weight: 700;
}

.attempt-history-item--ok .attempt-history-result {
  color: var(--ok);
}

.attempt-history-item--partial .attempt-history-result {
  color: var(--warn);
}

.attempt-history-item--bad .attempt-history-result {
  color: var(--bad);
}

.attempt-history-exam-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--teal);
  text-decoration: none;
}

.attempt-history-exam-link:hover {
  text-decoration: underline;
}

.bookmark-aside {
  margin-top: 0.75rem;
}

.question-report {
  margin: 1rem 0 2rem;
  padding: 0.15rem 0.15rem 0.2rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #faf9f6;
}

.question-report summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
  padding: 0.7rem 0.9rem;
}

.question-report .form-field {
  margin: 0.35rem 0.9rem 0.55rem;
}

.question-report .card-actions {
  margin: 0.2rem 0.9rem 0.85rem;
}

.flag-list,
.exam-list {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.flag-item,
.exam-list-item {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.flag-item:hover,
.exam-list-item:hover {
  border-color: var(--teal);
  transform: translateY(-1px);
}

.flag-snippet {
  display: block;
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.exam-cats-fieldset {
  border: 0;
  margin: 0 0 1rem;
  padding: 0;
}

.exam-cats-fieldset legend {
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 0.65rem;
}

.exam-cats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.5rem;
}

.exam-cat {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.exam-cat:has(input:checked) {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.exam-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.exam-progress {
  margin: 0.35rem 0 0.4rem;
}

.exam-progress-track {
  margin-bottom: 1.1rem;
}

.exam-resume .card-actions {
  margin-top: 0.5rem;
}

.exam-take-actions {
  margin-top: 1rem;
}

.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 0;
}

.error-page .error-code {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 0.9;
  margin: 0 0 0.6rem;
}

.doctor-tabbar {
  display: none;
}

/* Study AJAX / UX */
.study-filters-wrap {
  margin-bottom: 1.1rem;
}

.study-filters-summary {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font: inherit;
  font-weight: 700;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.7rem 1rem;
  cursor: pointer;
  text-align: start;
  margin-bottom: 0.65rem;
}

.study-filters-wrap[data-collapsed="1"] .study-filters-summary,
.study-filters-wrap:not([data-collapsed="1"]) .study-filters-summary {
  display: flex;
}

.study-filters-toggle-label {
  color: var(--teal-dark);
  font-size: 0.88rem;
  white-space: nowrap;
}

[data-study-mount].is-loading .study-question,
.study-question.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.55;
}

[data-study-mount].is-loading .study-question::after,
.study-question.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 45%,
    transparent 100%
  );
  animation: study-shimmer 1.1s ease-in-out infinite;
}

@keyframes study-shimmer {
  0% {
    transform: translateX(30%);
    opacity: 0.35;
  }
  100% {
    transform: translateX(-30%);
    opacity: 0.8;
  }
}

[data-study-mount].is-swapping {
  opacity: 0.35;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.study-fade-in {
  animation: study-fade-in 0.28s ease;
}

@keyframes study-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.study-feedback {
  animation: study-feedback-in 0.28s ease;
}

@keyframes study-feedback-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.progress-fill {
  transition: width 0.35s ease;
}

.study-kbd-hint {
  margin-top: 0.85rem;
  font-size: 0.82rem;
}

.btn-sm {
  padding: 0.28rem 0.7rem;
  font-size: 0.85rem;
  margin-inline-start: 0.35rem;
}

/* Exam map / timer / dialog */
.exam-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.35rem 0 0.65rem;
}

.exam-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.exam-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.85rem;
  font-size: 0.95rem;
}

.exam-map-toggle {
  display: none;
}

.exam-map {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(2.4rem, 1fr));
  gap: 0.35rem;
  margin: 0 0 1.1rem;
  padding: 0.85rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.exam-map-cell {
  display: grid;
  place-items: center;
  min-height: 2.4rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f7f5f1;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.82rem;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.exam-map-cell.is-answered {
  background: var(--teal-soft);
  border-color: #b7ddd6;
  color: var(--teal-dark);
}

.exam-map-cell.is-current {
  border-color: var(--navy);
  color: #fff;
  background: var(--navy);
  box-shadow: 0 0 0 2px rgba(18, 48, 86, 0.18);
}

.exam-map-drawer {
  display: none;
}

.exam-confirm-dialog {
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  max-width: min(420px, calc(100% - 2rem));
  box-shadow: var(--shadow-lg);
  background: transparent;
}

.exam-confirm-dialog::backdrop {
  background: rgba(18, 36, 63, 0.45);
}

.exam-confirm-dialog .card {
  margin: 0;
}

.exam-confirm-dialog h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

.tab-ico svg {
  width: 1.2rem;
  height: 1.2rem;
  display: block;
}

.tab-ico svg path,
.tab-ico svg rect,
.tab-ico svg circle {
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.today-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  margin: 1rem 0 0.35rem;
}

.today-ring {
  --pct: 0;
  width: 4.2rem;
  height: 4.2rem;
  border-radius: 50%;
  background: conic-gradient(var(--teal) calc(var(--pct) * 1%), var(--sand-2) 0);
  display: grid;
  place-items: center;
}

.today-ring-inner {
  width: 3.15rem;
  height: 3.15rem;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--navy);
  font-size: 0.95rem;
}

.pass-banner {
  font-weight: 800;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  margin: 0.5rem 0 1rem;
  text-align: center;
}

.pass-banner.is-pass {
  background: var(--ok-bg);
  color: var(--ok);
}

.pass-banner.is-fail {
  background: var(--warn-bg);
  color: var(--warn);
}

.exam-cat-bars {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.exam-cat-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4.5rem;
  gap: 0.75rem;
  align-items: center;
}

.exam-cat-bar-track {
  height: 1.35rem;
  background: var(--sand-2);
  border-radius: 999px;
  overflow: hidden;
}

.exam-cat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), #3bb8a8);
  border-radius: 999px;
  min-width: 0;
  transition: width 0.4s ease;
}

.exam-cat-bar-label {
  font-weight: 800;
  color: var(--navy);
  text-align: end;
}

.flag-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.flag-count-badge {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--navy);
}

.flag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.flag-chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.flag-chip.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.progress-pct {
  font-weight: 800;
  color: var(--teal-dark);
  font-size: 0.88rem;
  min-width: 2.5rem;
  text-align: end;
}

/* Scroll reveal animations */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal]:nth-child(2) { transition-delay: 0.1s; }
[data-reveal]:nth-child(3) { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-card-float { animation: none; }
  .hero-card-accent { animation: none; }
  .hero-blob { animation: none; }
  .kicker-dot { animation: none; }
}

@media (max-width: 900px) {
  .hero-split,
  .dash-split {
    grid-template-columns: 1fr;
  }

  .steps {
    flex-direction: column;
    align-items: center;
  }

  .step {
    max-width: 100%;
  }

  .step-connector {
    width: auto;
    height: 2rem;
  }

  .step-connector::after {
    width: 2px;
    height: 100%;
  }

  .hero-visual {
    display: none;
  }

  .stats-bar {
    gap: 1.2rem;
    padding: 1.2rem 1rem;
  }

  .stat-number {
    font-size: 1.4rem;
  }
}

@media (max-width: 720px) {
  .hero {
    padding-block: 2rem 1.5rem;
  }

  .hero h1 {
    font-size: 1.85rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .stats-bar {
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    justify-content: space-around;
  }

  .stat-divider {
    display: none;
  }

  .cta-inner {
    padding: 2rem 1.2rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-header .nav-links {
    display: none;
    position: absolute;
    top: calc(100% - 0.2rem);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0.7rem;
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    align-items: stretch;
  }

  .site-header .nav-links.is-open {
    display: flex;
  }

  .site-header {
    position: sticky;
  }

  .wrap {
    position: relative;
  }

  body.doctor-app {
    padding-bottom: calc(var(--tabbar-h) + 0.6rem);
  }

  .doctor-tabbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding: 0.4rem 0.35rem calc(0.4rem + env(safe-area-inset-bottom));
    z-index: 50;
  }

  .doctor-tabbar a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.25rem 0.1rem;
    border-radius: 10px;
  }

  .doctor-tabbar a.is-active {
    color: var(--navy);
    background: var(--teal-soft);
  }

  .doctor-tabbar .tab-ico {
    font-size: 1.05rem;
    line-height: 1;
  }

  .doctor-nav {
    display: none;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .header-tools {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-inline-start: auto;
  }

  .header-exit {
    display: inline-flex;
  }

  .has-tabbar .nav-toggle {
    display: none;
  }

  .study-option {
    padding: 1rem 1.05rem;
    min-height: 3.1rem;
  }

  .exam-list-item,
  .flag-item {
    padding: 1.15rem 1.2rem;
  }

  .exam-map-toggle {
    display: inline-flex;
  }

  .exam-map-desktop {
    display: none;
  }

  .exam-map-drawer {
    display: none;
    position: fixed;
    inset: auto 0 0 0;
    z-index: 60;
    background: #fff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 40px rgba(18, 36, 63, 0.18);
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
    max-height: min(70vh, 520px);
    overflow: auto;
  }

  .exam-map-drawer.is-open {
    display: block;
  }

  .exam-map-drawer .exam-map {
    border: 0;
    padding: 0.35rem 0 0;
    margin: 0;
  }

  .study-kbd-hint {
    display: none;
  }
}
