/* ================================================================= */
/*  PRATICE — global stylesheet                                      */
/*  All modules consolidated. Replace file contents entirely.        */
/* ================================================================= */

/* ----------------------------------------------------------------- */
/*  1. Brand tokens & reset                                          */
/* ----------------------------------------------------------------- */
:root {
  --brand-red: #D80621;
  --brand-red-dark: #A80419;
  --brand-ink: #111;
  --brand-neutral: #F5F5F4;
  --max: 1100px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--brand-ink);
  background: #fff;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* ----------------------------------------------------------------- */
/*  2. Navigation & footer                                           */
/* ----------------------------------------------------------------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
  flex-wrap: wrap;
  gap: .5rem;
}

.brand-mark { font-weight: 800; letter-spacing: .06em; font-size: 1.15rem; }
.brand-c { color: var(--brand-red); }

.nav nav a { font-weight: 500; }
.nav nav a:hover { color: var(--brand-red); }

@media (min-width: 721px) {
  .nav nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .25rem 1rem;
  }
}

.footer {
  text-align: center;
  color: #666;
  padding: 2rem 1rem;
  border-top: 1px solid #eee;
  font-size: .9rem;
}

/* ----------------------------------------------------------------- */
/*  3. Buttons                                                       */
/* ----------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
}
.btn.primary { background: var(--brand-red); color: #fff; }
.btn.primary:hover { background: var(--brand-red-dark); }
.btn.ghost { border-color: #ccc; background: #fff; color: var(--brand-ink); }
.btn.ghost:hover { background: var(--brand-neutral); }
.btn.small { padding: .4rem .85rem; font-size: .85rem; }
.btn.pay-btn { width: 100%; max-width: 22rem; }

/* ----------------------------------------------------------------- */
/*  4. Landing page (index.php)                                      */
/* ----------------------------------------------------------------- */
.hero { text-align: center; padding: 4rem 0 2rem; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4rem); margin: 0; letter-spacing: -.02em; }
.tag { color: var(--brand-red); font-weight: 600; margin: .5rem 0 1rem; }
.sub { color: #444; max-width: 38rem; margin: 0 auto; }

.cta {
  display: flex;
  gap: .75rem;
  justify-content: center;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 3rem;
}

.card {
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 1.25rem;
  transition: .15s;
}
.card:hover { border-color: var(--brand-red); transform: translateY(-2px); }
.card h3 { margin: .25rem 0 .5rem; }

/* ----------------------------------------------------------------- */
/*  5. Practice list (practice.php)                                  */
/* ----------------------------------------------------------------- */
.practice h1 { margin-top: 1rem; }

.filters { display: flex; gap: .5rem; margin: 1.5rem 0; flex-wrap: wrap; }
.filters select { padding: .5rem .75rem; border-radius: 8px; border: 1px solid #ccc; }

.qa-list { list-style: none; padding: 0; }
.qa-list li { border-bottom: 1px solid #eee; }
.qa-list a { display: flex; gap: .5rem; align-items: center; padding: .85rem 0; }
.qa-list a:hover { color: var(--brand-red); }

.badge {
  font-size: .7rem;
  background: var(--brand-red);
  color: #fff;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
}
.badge.alt { background: #444; }

/* ----------------------------------------------------------------- */
/*  6. Auth pages (login, signup, forgot, reset)                     */
/* ----------------------------------------------------------------- */
.auth form { display: grid; gap: .9rem; max-width: 36rem; }
.auth label { display: grid; gap: .35rem; font-weight: 500; }
.auth input, .auth select, .auth textarea {
  padding: .65rem .75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
}

.agreement {
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: .75rem 1rem;
  background: #fafafa;
}
.agreement pre {
  white-space: pre-wrap;
  font: inherit;
  font-size: .9rem;
  color: #333;
  max-height: 18rem;
  overflow: auto;
}

.check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 500; }
.check input { margin-top: .25rem; }
.check a { color: var(--brand-red); text-decoration: underline; }

.error {
  background: #fde8ea;
  color: #8a0417;
  padding: .6rem .8rem;
  border-radius: 8px;
  font-weight: 600;
}

/* ----------------------------------------------------------------- */
/*  7. Booking page (book.php)                                       */
/* ----------------------------------------------------------------- */
.book { padding-top: 1rem; }
.book form { display: grid; gap: .9rem; max-width: 36rem; }
.book label { display: grid; gap: .35rem; font-weight: 500; }
.book input, .book select, .book textarea {
  padding: .65rem .75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
}

.book-head { text-align: left; margin-bottom: 1.5rem; }
.book-head h1 { margin: 0 0 .4rem; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.book-head .lead { color: #444; max-width: 42rem; margin: 0 0 .75rem; }
.book-head .badge-row { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0; }

.notice {
  border-radius: 12px;
  padding: .85rem 1rem;
  margin: 1rem 0;
  font-weight: 500;
  border: 1px solid transparent;
}
.notice.ok    { background: #eaf7ee; border-color: #bfe3c8; color: #14532d; }
.notice.warn  { background: #fff7e6; border-color: #f3dfa6; color: #7a4a04; }
.notice.error { background: #fde8ea; border-color: #f3b7bf; color: #8a0417; }

.pay-panel {
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 1.25rem 1.25rem 1.1rem;
  margin: 1.5rem 0;
  background: #fafafa;
}
.pay-panel h2 { margin-top: 0; }
.pay-panel .amount { font-size: 1.15rem; margin: .5rem 0 .9rem; }
.pay-panel .amount strong { color: var(--brand-red); }

.book-form-wrap { margin-top: 1.5rem; }
.book-form-wrap h2 { margin-top: 0; }

.hint { color: #666; font-size: .85rem; font-weight: 400; }

.pay { margin-top: 1rem; }

/* ----------------------------------------------------------------- */
/*  8. Dashboards (student, tutor, admin)                            */
/* ----------------------------------------------------------------- */
.dash-head { margin-bottom: 1.25rem; }
.dash-head h1 { margin: 0 0 .25rem; font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.dash-head p { color: #555; margin: 0; }

.dash-card {
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 1.25rem 1.25rem 1.1rem;
  margin: 1.25rem 0;
  background: #fff;
}
.dash-card h2 { margin-top: 0; font-size: 1.15rem; }

.muted { color: #666; }
.muted.small, .small { font-size: .875rem; }

.pill {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: .15rem .55rem;
  border-radius: 999px;
  background: #eee;
  color: #333;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.pill.pending   { background: #fff4d6; color: #7a4a04; }
.pill.confirmed { background: #e0f0ff; color: #0b3d73; }
.pill.completed { background: #e6f7ea; color: #14532d; }
.pill.cancelled,
.pill.failed,
.pill.no_show   { background: #fde8ea; color: #8a0417; }
.pill.paid      { background: #e6f7ea; color: #14532d; }
.pill.refunded  { background: #eee; color: #444; }
.pill.ok        { background: #e6f7ea; color: #14532d; }
.pill.warn      { background: #fff4d6; color: #7a4a04; }
.pill.approved  { background: #e6f7ea; color: #14532d; }
.pill.suspended { background: #fde8ea; color: #8a0417; }

.booking-list { list-style: none; padding: 0; margin: 0; }
.booking-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .5rem 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid #eee;
  align-items: center;
}
.booking-list.compact li { padding: .55rem 0; }
.booking-list .booking-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.data-table th, .data-table td {
  text-align: left;
  padding: .55rem .5rem;
  border-bottom: 1px solid #eee;
}
.data-table th { font-weight: 600; color: #444; }

.inline { display: inline-block; margin: 0 .25rem 0 0; }

/* ----------------------------------------------------------------- */
/*  9. Message thread                                                */
/* ----------------------------------------------------------------- */
.thread {
  max-height: 22rem;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: .75rem;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: .75rem;
}
.msg { max-width: 80%; padding: .5rem .75rem; border-radius: 12px; font-size: .95rem; }
.msg.me   { align-self: flex-end; background: var(--brand-red); color: #fff; }
.msg.them { align-self: flex-start; background: #fff; border: 1px solid #e5e5e5; }
.msg-body { white-space: normal; word-wrap: break-word; }
.msg-meta { font-size: .72rem; opacity: .75; margin-top: .25rem; }
.msg .flag { color: #ffb100; }

.msg-form { display: flex; gap: .5rem; align-items: flex-end; }
.msg-form textarea {
  flex: 1;
  padding: .6rem .75rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  font: inherit;
  resize: vertical;
  min-height: 2.5rem;
}

.thread.raw .msg.me   { background: #f2f2f2; color: #111; }
.thread.raw .msg.them { background: #fff; }
.thread.raw .msg-body strong { font-size: .78rem; color: #666; font-weight: 600; }

/* ----------------------------------------------------------------- */
/*  10. Tutor dashboard                                              */
/* ----------------------------------------------------------------- */
.avail-list { list-style: none; padding: 0; margin: .5rem 0 1rem; }
.avail-list li {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .45rem 0;
  border-bottom: 1px solid #eee;
  flex-wrap: wrap;
}
.avail-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.avail-form select,
.avail-form input[type="time"] {
  padding: .5rem .6rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
}

.no-solicit-card { border-color: #e5e5e5; }
.no-solicit-ok { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }

/* ----------------------------------------------------------------- */
/*  11. Admin                                                        */
/* ----------------------------------------------------------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .75rem;
  margin: 1rem 0;
}
.stat {
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  padding: .9rem 1rem;
  background: #fff;
}
.stat span {
  display: block;
  font-size: .8rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.stat strong { font-size: 1.5rem; }
.stat.warn { border-color: #f3dfa6; background: #fffcf3; }
.stat strong small { font-size: .85rem; font-weight: 500; }

.quick-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.quick-links .btn { text-decoration: none; }

.content-form { display: grid; gap: .75rem; max-width: 44rem; }
.content-form label { display: grid; gap: .3rem; font-weight: 500; }
.content-form input,
.content-form textarea,
.content-form select {
  padding: .6rem .75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
}
.content-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

/* ----------------------------------------------------------------- */
/*  12. Practice item                                                */
/* ----------------------------------------------------------------- */
.crumbs {
  font-size: .85rem;
  color: #666;
  margin: .5rem 0 1rem;
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
}
.crumbs a { color: var(--brand-red); }

.item-head h1 {
  margin: .5rem 0 1rem;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.25;
}
.item-head .badge-row { display: flex; gap: .4rem; flex-wrap: wrap; }

.try-box {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  background: #fafafa;
}
.try-box label { display: block; font-weight: 500; margin-bottom: .5rem; }
.try-box textarea {
  width: 100%;
  padding: .7rem .75rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  font: inherit;
  resize: vertical;
}
.try-actions {
  display: flex;
  gap: .5rem;
  align-items: center;
  margin-top: .6rem;
  flex-wrap: wrap;
}

.answer-block {
  margin: 1.5rem 0;
  padding: 1.25rem 1.25rem 1.1rem;
  border-left: 4px solid var(--brand-red);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
}
.answer-block h2 {
  margin: 0 0 .35rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #555;
}
.answer-block h2 + div { margin-bottom: 1rem; }
.answer-block .answer-body { font-size: 1.05rem; }
.answer-block .explanation-body { color: #333; }

.cta-inline {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 2rem 0;
  padding: 1.25rem;
  border-radius: 16px;
  background: #fff5f6;
  border: 1px solid #f3cfd3;
}
.cta-inline h2 { margin: 0 0 .25rem; font-size: 1.15rem; }
.cta-inline p  { margin: 0; color: #555; }

.related h2 { margin-top: 2rem; font-size: 1.1rem; }

/* ----------------------------------------------------------------- */
/*  13. Tutors page — hero, sections, steps, FAQ                     */
/* ----------------------------------------------------------------- */
.tutors-page { padding-top: 1rem; }

.tutors-hero { padding: 2rem 0 1rem; }
.tutors-hero h1 {
  margin: 0 0 .5rem;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -.02em;
}
.tutors-hero .lead {
  color: #444;
  max-width: 40rem;
  font-size: 1.1rem;
  margin: 0 0 1.5rem;
}

.tutors-section { margin: 2.5rem 0; }
.tutors-section h2 { font-size: 1.35rem; margin: 0 0 1rem; }

.tutor-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.tutor-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 1.15rem 1.25rem;
  background: #fff;
}
.tutor-card h3 { margin: 0 0 .4rem; font-size: 1.05rem; }
.tutor-card p  { margin: 0; color: #444; flex: 1; }

@media (max-width: 1000px) {
  .tutor-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .tutor-grid { grid-template-columns: 1fr; }
}

.steps { padding-left: 1.25rem; margin: 0; }
.steps li { margin-bottom: .65rem; color: #333; }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li {
  padding: .45rem 0 .45rem 1.5rem;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand-red);
  font-weight: 800;
}

.faq {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: .75rem 1rem;
  margin-bottom: .5rem;
  background: #fafafa;
}
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: .5rem 0 0; color: #444; }

.tutors-cta {
  margin: 3rem 0 2rem;
  padding: 1.75rem 1.5rem;
  border-radius: 16px;
  background: #fff5f6;
  border: 1px solid #f3cfd3;
  text-align: center;
}
.tutors-cta h2 { margin: 0 0 .4rem; }
.tutors-cta p { margin: 0 0 1rem; color: #555; }

/* ----------------------------------------------------------------- */
/*  14. Pricing (index.php section + pricing.php page)               */
/* ----------------------------------------------------------------- */
.pricing {
  margin: 4rem 0 2rem;
  padding-top: 2.5rem;
  border-top: 1px solid #eee;
}
.pricing-head {
  text-align: center;
  margin-bottom: 2rem;
}
.pricing-head h2 {
  margin: 0 0 .35rem;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
}
.pricing-head p {
  color: #555;
  max-width: 42rem;
  margin: 0 auto;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.price-card {
  position: relative;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 1.5rem 1.35rem 1.35rem;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.price-card h3 {
  margin: 0 0 .75rem;
  font-size: 1.15rem;
}
.price-card .price {
  margin: 0 0 .75rem;
  display: flex;
  align-items: baseline;
  gap: .5rem;
  flex-wrap: wrap;
}
.price-card .price .amount {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--brand-red);
  letter-spacing: -.02em;
}
.price-card .price .per {
  color: #666;
  font-size: .9rem;
}
.price-card .desc {
  color: #444;
  margin: 0 0 1rem;
  font-size: .95rem;
}
.price-card .price-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  flex: 1;
}
.price-card .price-list li {
  padding: .4rem 0 .4rem 1.5rem;
  position: relative;
  font-size: .92rem;
  border-bottom: 1px solid #f5f5f4;
}
.price-card .price-list li:last-child { border-bottom: 0; }
.price-card .price-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand-red);
  font-weight: 800;
}
.price-card .btn { align-self: flex-start; }
.price-card .pack-note {
  margin: 1rem 0 0;
  font-size: .85rem;
  color: #666;
}
.price-card.featured {
  border-color: var(--brand-red);
  border-width: 2px;
  box-shadow: 0 6px 24px -12px rgba(216,6,33,.25);
}
.price-card.featured .btn.primary {
  align-self: stretch;
  text-align: center;
}
.price-badge {
  position: absolute;
  top: -10px;
  right: 1rem;
  background: var(--brand-red);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .2rem .65rem;
  border-radius: 999px;
}

.pricing-footer {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  color: #555;
}
.pricing-footer p { margin: .35rem 0; }

.pricing-page { padding-top: 1rem; }
.pricing-hero { text-align: left; padding: 2rem 0 1.5rem; }
.pricing-hero h1 {
  margin: 0 0 .5rem;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -.02em;
}
.pricing-hero .lead {
  color: #444;
  max-width: 42rem;
  margin: 0;
  font-size: 1.05rem;
}
.pricing-section { margin: 3rem 0; }
.pricing-section h2 { font-size: 1.3rem; margin: 0 0 1rem; }

/* ----------------------------------------------------------------- */
/*  15. PWA — standalone tweaks                                      */
/* ----------------------------------------------------------------- */
@media (display-mode: standalone) {
  .nav { padding-top: env(safe-area-inset-top); }
}

/* ----------------------------------------------------------------- */
/*  16. Responsive                                                   */
/* ----------------------------------------------------------------- */
@media (max-width: 640px) {
  main { padding: 1.25rem .9rem 3rem; }
  .nav { padding: .75rem .9rem; }
  .hero { padding: 2.5rem 0 1.5rem; }
  .booking-list li { grid-template-columns: 1fr; }
  .msg { max-width: 92%; }
}

/* ----------------------------------------------------------------- */
/*  17. FAQ accordion (homepage + pricing.php)                       */
/* ----------------------------------------------------------------- */
.faq-section {
  margin: 4rem 0 2rem;
  padding: 3rem 1.25rem;
  background: #f5f5f4;
  border-radius: 20px;
}
.faq-section-head {
  text-align: center;
  margin-bottom: 2.5rem;
}
.faq-section-head h2 {
  margin: 0 0 .5rem;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -.02em;
}
.faq-section-head p {
  color: #555;
  max-width: 42rem;
  margin: 0 auto;
  font-size: 1rem;
}

.faq-accordion {
  max-width: 60rem;
  margin: 0 auto;
  display: grid;
  gap: .75rem;
}

.faq-item {
  border: 0;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
  transition: box-shadow .15s;
}
.faq-item[open] {
  box-shadow: 0 4px 16px -6px rgba(0,0,0,.08);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.15rem 1.5rem;
  font-weight: 600;
  font-size: 1.05rem;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
  color: #666;
  line-height: 1;
  flex: 0 0 auto;
  transition: transform .2s ease, color .2s ease;
}
.faq-item[open] summary::after {
  content: "−";
  color: var(--brand-red);
}
.faq-item summary:hover {
  background: #fafafa;
}
.faq-item .faq-body {
  padding: 0 1.5rem 1.35rem;
  color: #444;
  font-size: .97rem;
  line-height: 1.65;
}
.faq-item .faq-body p { margin: 0 0 .6rem; }
.faq-item .faq-body p:last-child { margin-bottom: 0; }
.faq-item .faq-body a {
  color: var(--brand-red);
  text-decoration: underline;
}

.faq-more {
  text-align: center;
  margin-top: 1.75rem;
}
.faq-more a {
  color: var(--brand-red);
  font-weight: 600;
}

@media (max-width: 640px) {
  .faq-section {
    padding: 2rem .9rem;
    border-radius: 16px;
  }
  .faq-item summary {
    padding: 1rem 1.15rem;
    font-size: .98rem;
  }
  .faq-item .faq-body {
    padding: 0 1.15rem 1.15rem;
    font-size: .93rem;
  }
}

/* ----------------------------------------------------------------- */
/*  18. Rich footer                                                  */
/* ----------------------------------------------------------------- */
.site-footer {
  background: #0e0e0e;
  color: #cfcfcf;
  margin-top: 4rem;
  padding: 3.5rem 1.25rem 1.5rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 2rem 2.5rem;
}

.footer-brand .footer-logo {
  display: inline-block;
  color: #fff;
  margin-bottom: .85rem;
}
.footer-brand .brand-mark {
  font-weight: 800;
  letter-spacing: .06em;
  font-size: 1.25rem;
}
.footer-brand .brand-c { color: var(--brand-red); }

.footer-tag {
  color: #a5a5a5;
  font-size: .92rem;
  line-height: 1.55;
  margin: 0 0 .75rem;
  max-width: 22rem;
}
.footer-contact {
  margin: 0 0 1rem;
  font-size: .92rem;
}
.footer-contact a {
  color: #fff;
  border-bottom: 1px solid transparent;
}
.footer-contact a:hover {
  border-bottom-color: var(--brand-red);
  color: #fff;
}

.footer-social {
  display: flex;
  gap: .5rem;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #1c1c1c;
  color: #cfcfcf;
  transition: background .15s, color .15s, transform .15s;
}
.footer-social a:hover {
  background: var(--brand-red);
  color: #fff;
  transform: translateY(-1px);
}

.footer-col h4 {
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 .9rem;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li { margin-bottom: .5rem; }
.footer-col a {
  color: #b5b5b5;
  font-size: .92rem;
  transition: color .15s;
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid #262626;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}
.footer-copy {
  color: #888;
  font-size: .85rem;
  margin: 0;
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.footer-legal a {
  color: #888;
  font-size: .85rem;
}
.footer-legal a:hover { color: #fff; }

@media (max-width: 960px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .site-footer { padding: 2.5rem 1rem 1.25rem; }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}

/* ----------------------------------------------------------------- */
/*  20. Nav — mobile toggle                                          */
/* ----------------------------------------------------------------- */

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  border-radius: 10px;
  flex: 0 0 auto;
}
.nav-toggle:hover { background: var(--brand-neutral); }
.nav-toggle:focus { outline: none; }
.nav-toggle:focus-visible {
  outline: 2px solid var(--brand-red);
  outline-offset: 2px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #111;
  margin: 4px auto;
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }

  .nav nav,
  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    order: 3;
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid #eee;
    gap: 0;
  }

  .nav nav.open,
  .nav-menu.open {
    display: flex;
  }

  .nav nav a,
  .nav-menu a {
    padding: .75rem .25rem;
    border-radius: 8px;
    font-size: 1rem;
  }

  .nav nav a:hover,
  .nav-menu a:hover {
    background: #fafafa;
    padding-left: .75rem;
    transition: padding-left .15s ease, background .15s ease;
  }
}

/* ----------------------------------------------------------------- */
/*  21. Homepage TEF/TCF section                                     */
/* ----------------------------------------------------------------- */
.tef-home {
  margin: 4rem 0 2rem;
  padding: 3rem 1.5rem;
  background: #fff5f6;
  border: 1px solid #f3cfd3;
  border-radius: 20px;
}
.tef-home-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2rem 3rem;
  align-items: start;
}

.tef-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand-red);
  margin-bottom: .75rem;
}

.tef-home-copy h2 {
  margin: 0 0 .75rem;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  letter-spacing: -.02em;
  line-height: 1.2;
}
.tef-home-copy p {
  color: #444;
  font-size: 1.02rem;
  margin: 0 0 1.25rem;
  max-width: 42rem;
}

.tef-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}
.tef-list li {
  padding: .5rem 0 .5rem 1.6rem;
  position: relative;
  color: #333;
  font-size: .95rem;
  line-height: 1.55;
  border-bottom: 1px solid #f3d9dd;
}
.tef-list li:last-child { border-bottom: 0; }
.tef-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: .5rem;
  color: var(--brand-red);
  font-weight: 800;
}

.tef-cta { display: flex; gap: .75rem; flex-wrap: wrap; }

.tef-home-side {
  display: grid;
  gap: .75rem;
}
.tef-stat-card {
  background: #fff;
  border: 1px solid #f3cfd3;
  border-radius: 14px;
  padding: 1.1rem 1.15rem;
}
.tef-stat-value {
  margin: 0 0 .15rem;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--brand-red);
  letter-spacing: -.02em;
}
.tef-stat-label {
  margin: 0;
  color: #555;
  font-size: .85rem;
}

@media (max-width: 780px) {
  .tef-home-inner { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------------- */
/*  22. TEF / TCF dedicated page                                     */
/* ----------------------------------------------------------------- */
.tef-page { padding-top: 1rem; }

.tef-hero {
  text-align: left;
  padding: 2rem 0 1rem;
}
.tef-hero h1 {
  margin: .35rem 0 .75rem;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -.02em;
  line-height: 1.15;
}
.tef-hero .lead {
  color: #444;
  font-size: 1.08rem;
  max-width: 42rem;
  margin: 0 0 1.5rem;
}

.tef-section { margin: 3.5rem 0; }
.tef-section h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin: 0 0 1.25rem;
}

.tef-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}
.tef-card {
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 1.25rem 1.25rem 1.15rem;
  background: #fff;
}
.tef-card h3 {
  margin: 0 0 .5rem;
  font-size: 1.05rem;
}
.tef-card p { margin: 0; color: #444; font-size: .95rem; }

.tef-skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.tef-skill {
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 1.25rem;
  background: #fff;
}
.tef-skill-head {
  display: flex;
  align-items: baseline;
  gap: .65rem;
  margin-bottom: .5rem;
}
.tef-skill-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--brand-red);
  letter-spacing: -.02em;
}
.tef-skill h3 {
  margin: 0;
  font-size: 1.05rem;
}
.tef-skill p { margin: 0; color: #444; font-size: .95rem; }

.tef-steps {
  padding-left: 1.25rem;
  margin: 0;
  max-width: 46rem;
}
.tef-steps li {
  margin-bottom: .85rem;
  color: #333;
  line-height: 1.6;
}

.tef-price-card {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  border: 2px solid var(--brand-red);
  border-radius: 20px;
  padding: 1.75rem 1.75rem 1.5rem;
  background: #fff;
  box-shadow: 0 6px 24px -12px rgba(216,6,33,.25);
}
.tef-price-left h3 {
  margin: 0 0 .35rem;
  font-size: 1.25rem;
}
.tef-price-desc {
  color: #555;
  margin: 0 0 1rem;
  font-size: .95rem;
}
.tef-price-left .price-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tef-price-left .price-list li {
  padding: .4rem 0 .4rem 1.5rem;
  position: relative;
  font-size: .93rem;
  border-bottom: 1px solid #f5f5f4;
}
.tef-price-left .price-list li:last-child { border-bottom: 0; }
.tef-price-left .price-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand-red);
  font-weight: 800;
}

.tef-price-right {
  border-left: 1px solid #eee;
  padding-left: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tef-price-right .price {
  margin: 0 0 1rem;
  display: flex;
  align-items: baseline;
  gap: .5rem;
  flex-wrap: wrap;
}
.tef-price-right .price .amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-red);
  letter-spacing: -.02em;
}
.tef-price-right .price .per {
  color: #666;
  font-size: .95rem;
}

@media (max-width: 720px) {
  .tef-price-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .tef-price-right {
    border-left: 0;
    border-top: 1px solid #eee;
    padding-left: 0;
    padding-top: 1.25rem;
  }
}

/* ----------------------------------------------------------------- */
/*  23. Homepage — hero refinement                                   */
/* ----------------------------------------------------------------- */
.hero-eyebrow {
  display: inline-block;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-red);
  background: #fff5f6;
  border: 1px solid #f3cfd3;
  padding: .35rem .85rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -.025em;
}
.hero-note {
  margin-top: 1rem;
  color: #666;
  font-size: .9rem;
}

/* ----------------------------------------------------------------- */
/*  24. Trust bar                                                    */
/* ----------------------------------------------------------------- */
.trust-bar {
  margin: 2.5rem 0 1rem;
  padding: 1rem 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}
.trust-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}
.trust-item strong {
  display: block;
  font-size: .95rem;
  color: #111;
  margin-bottom: .15rem;
}
.trust-item span {
  font-size: .85rem;
  color: #666;
}

/* ----------------------------------------------------------------- */
/*  25. Stats strip                                                  */
/* ----------------------------------------------------------------- */
.stats-strip {
  margin: 3rem 0;
  padding: 2.25rem 1.5rem;
  background: #111;
  color: #fff;
  border-radius: 20px;
}
.stats-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
}
.stat-item { text-align: center; }
.stat-value {
  margin: 0 0 .25rem;
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--brand-red);
  letter-spacing: -.02em;
}
.stat-label {
  margin: 0;
  color: #bbb;
  font-size: .88rem;
  line-height: 1.4;
}

/* ----------------------------------------------------------------- */
/*  26. Section headers (shared)                                     */
/* ----------------------------------------------------------------- */
.section-head {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-head h2 {
  margin: 0 0 .5rem;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  letter-spacing: -.02em;
}
.section-head p {
  color: #555;
  max-width: 42rem;
  margin: 0 auto;
  font-size: 1rem;
}

/* ----------------------------------------------------------------- */
/*  27. How it works                                                 */
/* ----------------------------------------------------------------- */
.how-section {
  margin: 4rem 0;
  padding: 3rem 1.5rem;
  background: #fafafa;
  border-radius: 20px;
}
.how-steps {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 1000px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  counter-reset: how;
}
.how-step {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 1.5rem 1.35rem;
  position: relative;
}
.how-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--brand-red);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: .85rem;
}
.how-step h3 {
  margin: 0 0 .35rem;
  font-size: 1.1rem;
}
.how-step p {
  margin: 0;
  color: #444;
  font-size: .95rem;
  line-height: 1.55;
}

/* ----------------------------------------------------------------- */
/*  28. Testimonials                                                 */
/* ----------------------------------------------------------------- */
.testimonials-section {
  margin: 4rem 0;
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.testimonial {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 1.5rem 1.35rem 1.25rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.testimonial blockquote {
  margin: 0;
  color: #333;
  font-size: .97rem;
  line-height: 1.65;
  flex: 1;
  position: relative;
  padding-top: .75rem;
}
.testimonial blockquote::before {
  content: "“";
  position: absolute;
  top: -1.35rem;
  left: -.25rem;
  font-size: 3.5rem;
  color: var(--brand-red);
  font-family: Georgia, serif;
  line-height: 1;
  opacity: .25;
}
.testimonial figcaption {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding-top: .85rem;
  border-top: 1px solid #f0f0f0;
}
.t-name {
  font-weight: 700;
  color: #111;
  font-size: .95rem;
}
.t-meta {
  color: #666;
  font-size: .82rem;
}
.testimonials-note {
  text-align: center;
  margin: 1.5rem 0 0;
}

/* ----------------------------------------------------------------- */
/*  29. Why Pratice                                                  */
/* ----------------------------------------------------------------- */
.why-section {
  margin: 4rem 0;
  padding: 3rem 1.5rem;
  background: #fff5f6;
  border: 1px solid #f3cfd3;
  border-radius: 20px;
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}
.why-card {
  background: #fff;
  border: 1px solid #f3cfd3;
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
}
.why-card h3 {
  margin: 0 0 .5rem;
  font-size: 1.05rem;
  color: #111;
}
.why-card p {
  margin: 0;
  color: #444;
  font-size: .93rem;
  line-height: 1.55;
}

/* ----------------------------------------------------------------- */
/*  30. Comparison table                                             */
/* ----------------------------------------------------------------- */
.compare-section {
  margin: 4rem 0;
}
.compare-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid #e5e5e5;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
  background: #fff;
  min-width: 560px;
}
.compare-table th,
.compare-table td {
  padding: .85rem 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}
.compare-table thead th {
  background: #fafafa;
  font-weight: 700;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #555;
}
.compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table td:first-child {
  color: #333;
  font-weight: 500;
}
.compare-us {
  background: #fff5f6;
  color: var(--brand-red) !important;
}
.compare-table .yes {
  color: var(--brand-red);
  font-weight: 800;
  text-align: center;
  font-size: 1.1rem;
}
.compare-table .no {
  color: #bbb;
  text-align: center;
  font-weight: 700;
}
.compare-table .partial {
  color: #999;
  text-align: center;
  font-style: italic;
  font-size: .85rem;
}

/* ----------------------------------------------------------------- */
/*  31. Final CTA                                                    */
/* ----------------------------------------------------------------- */
.final-cta {
  margin: 4rem 0 2rem;
  padding: 3rem 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, #111 0%, #2a2a2a 100%);
  border-radius: 20px;
  color: #fff;
}
.final-cta h2 {
  margin: 0 0 .5rem;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  letter-spacing: -.02em;
  color: #fff;
}
.final-cta p {
  margin: 0 auto 1.75rem;
  color: #bbb;
  max-width: 42rem;
  font-size: 1rem;
}
.final-cta .cta {
  justify-content: center;
}
.final-cta .btn.ghost {
  border-color: #555;
  background: transparent;
  color: #fff;
}
.final-cta .btn.ghost:hover {
  background: #222;
  border-color: #777;
}

/* ----------------------------------------------------------------- */
/*  32. Responsive tuning for new sections                           */
/* ----------------------------------------------------------------- */
@media (max-width: 720px) {
  .trust-bar { margin: 2rem 0 1rem; }
  .trust-inner { grid-template-columns: 1fr 1fr; gap: .85rem 1rem; }
  .stats-strip { padding: 1.75rem 1rem; border-radius: 16px; }
  .how-section, .why-section { padding: 2rem 1.15rem; border-radius: 16px; }
  .final-cta { padding: 2.5rem 1.15rem; border-radius: 16px; }
  .testimonial { padding: 1.35rem 1.15rem 1.15rem; }
}

/* ----------------------------------------------------------------- */
/*  33. Practice item — assessment / stars / verdict                 */
/* ----------------------------------------------------------------- */
.try-box label { display: block; font-weight: 500; margin-bottom: .5rem; line-height: 1.5; }
.try-box textarea {
  width: 100%;
  padding: .85rem .9rem;
  border: 1px solid #ccc;
  border-radius: 12px;
  font: inherit;
  font-size: 1rem;
  line-height: 1.55;
  resize: vertical;
  min-height: 6rem;
  transition: border-color .15s, box-shadow .15s;
}
.try-box textarea:focus {
  outline: none;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(216,6,33,.12);
}

.try-actions {
  display: flex;
  gap: .5rem;
  align-items: center;
  margin-top: .75rem;
  flex-wrap: wrap;
}

.result-panel {
  margin-top: 1.25rem;
  padding: 1.25rem 1.25rem 1.15rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
  animation: slideIn .25s ease-out;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}

.result-stars {
  display: inline-flex;
  gap: .15rem;
  font-size: 1.85rem;
  line-height: 1;
  letter-spacing: .02em;
}
.result-stars .star {
  color: #ddd;
  transition: color .2s ease, transform .2s ease;
}
.result-stars .star.on {
  color: #f5a623;
  text-shadow: 0 1px 0 rgba(0,0,0,.05);
  transform: scale(1.02);
}

.result-verdict {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
  flex: 1;
  min-width: 12rem;
}
.result-verdict.verdict-excellent { color: #14532d; }
.result-verdict.verdict-good      { color: #14532d; }
.result-verdict.verdict-ok        { color: #7a4a04; }
.result-verdict.verdict-partial   { color: #8a3d04; }
.result-verdict.verdict-weak      { color: #8a0417; }

.result-feedback {
  margin: 0 0 .35rem;
  color: #333;
  font-size: .95rem;
  line-height: 1.6;
}

.result-note {
  margin: 0;
  font-style: italic;
}

/* ----------------------------------------------------------------- */
/*  34. Practice assessment — enriched feedback blocks               */
/* ----------------------------------------------------------------- */
.result-block {
  margin: .35rem 0;
  font-size: .93rem;
  line-height: 1.55;
  color: #333;
}
.result-block.good strong { color: #14532d; }
.result-block.warn strong { color: #8a3d04; }
.result-block.warn { color: #6a4a04; }

.result-feedback {
  margin: .65rem 0 0;
  color: #222;
  font-size: .95rem;
  line-height: 1.6;
  padding-top: .65rem;
  border-top: 1px solid #f0f0f0;
}

/* ----------------------------------------------------------------- */
/*  36. Tutors page — highlighted tutor card                         */
/* ----------------------------------------------------------------- */
.tutor-card-highlight {
  border: 2px solid var(--brand-red);
  background: #fff5f6;
  box-shadow: 0 4px 20px -12px rgba(216,6,33,.25);
}
.tutor-card-highlight h3 {
  color: var(--brand-red);
}
.tutor-card-link {
  display: inline-block;
  margin-top: .85rem;
  font-weight: 700;
  color: var(--brand-red);
  font-size: .92rem;
  align-self: flex-start;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
.tutor-card-link:hover {
  border-bottom-color: var(--brand-red);
}

/* ----------------------------------------------------------------- */
/*  38. Anchor scroll offset for sticky nav                          */
/* ----------------------------------------------------------------- */
#how,
#pay,
#faq,
#no-solicit,
#apply,
#pricing,
#tef-tcf,
[id] {
  scroll-margin-top: 84px;
}

@media (max-width: 720px) {
  #how,
  #pay,
  #faq,
  #no-solicit,
  #apply,
  #pricing,
  #tef-tcf,
  [id] {
    scroll-margin-top: 72px;
  }
}

/* ----------------------------------------------------------------- */
/*  39. About page                                                   */
/* ----------------------------------------------------------------- */
.about-page { padding-top: 1rem; }

.about-hero {
  padding: 2rem 0 1rem;
  max-width: 46rem;
}
.about-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand-red);
  background: #fff5f6;
  border: 1px solid #f3cfd3;
  padding: .3rem .75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.about-hero h1 {
  margin: 0 0 .75rem;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -.02em;
  line-height: 1.15;
}
.about-hero .lead {
  color: #444;
  font-size: 1.08rem;
  line-height: 1.6;
  margin: 0;
}
.about-hero .lead em {
  font-style: italic;
  color: var(--brand-red);
}

.about-section {
  margin: 3.5rem 0;
}
.about-section h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin: 0 0 1rem;
  letter-spacing: -.01em;
}

.about-section > p,
.about-section > ul:not(.about-principles):not(.about-grid),
.about-section > ol {
  max-width: 46rem;
}

.about-section p {
  color: #333;
  line-height: 1.65;
  margin: 0 0 1rem;
}
.about-section p:last-child { margin-bottom: 0; }
.about-section a {
  color: var(--brand-red);
  text-decoration: underline;
}
.about-section a.btn {
  text-decoration: none;
  color: #fff;
}

.about-two-col {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 2.5rem 4rem;
  align-items: start;
  width: 100%;
}
.about-two-col h2 {
  margin-top: 0;
}
.about-two-col > div > p {
  max-width: 42rem;
}

.about-aside {
  display: grid;
  gap: .75rem;
  position: sticky;
  top: 5.5rem;
  width: 100%;
}
.about-stat {
  background: #fff5f6;
  border: 1px solid #f3cfd3;
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  width: 100%;
}
.about-stat-value {
  margin: 0 0 .3rem;
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--brand-red);
  letter-spacing: -.02em;
  line-height: 1;
}
.about-stat-label {
  margin: 0;
  color: #444;
  font-size: .9rem;
  line-height: 1.5;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.about-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 1.25rem 1.35rem 1.15rem;
  background: #fff;
}
.about-card h3 {
  margin: 0 0 .5rem;
  font-size: 1.05rem;
}
.about-card p {
  margin: 0;
  color: #444;
  font-size: .95rem;
  line-height: 1.6;
  flex: 1;
}

@media (max-width: 1100px) {
  .about-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .about-grid { grid-template-columns: 1fr; }
}

.about-principles {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .85rem;
  max-width: 46rem;
}
.about-principles li {
  padding: .85rem 1rem .85rem 2.5rem;
  position: relative;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fafafa;
  color: #333;
  line-height: 1.6;
  font-size: .95rem;
}
.about-principles li::before {
  content: "✓";
  position: absolute;
  left: 1rem;
  top: .85rem;
  color: var(--brand-red);
  font-weight: 800;
}
.about-principles li strong {
  color: #111;
}

@media (max-width: 780px) {
  .about-two-col {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .about-aside {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
  .about-stat-value { font-size: 1.4rem; }
}

/* ----------------------------------------------------------------- */
/*  40. Legal pages (terms, privacy, cookies, refunds)               */
/* ----------------------------------------------------------------- */
.legal {
  padding-top: 1rem;
}

.legal-hero {
  max-width: 46rem;
  padding: 2rem 0 1rem;
}
.legal-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand-red);
  background: #fff5f6;
  border: 1px solid #f3cfd3;
  padding: .3rem .75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.legal-hero h1 {
  margin: 0 0 .5rem;
  font-size: clamp(2rem, 5vw, 2.8rem);
  letter-spacing: -.02em;
  line-height: 1.15;
}
.legal-updated {
  color: #666;
  font-size: .9rem;
  margin: 0;
}

.legal-body {
  max-width: 46rem;
  padding-top: 1rem;
}

.legal-intro {
  font-size: 1.05rem;
  color: #333;
  line-height: 1.7;
  padding: 1.15rem 1.25rem;
  background: #fafafa;
  border-left: 4px solid var(--brand-red);
  border-radius: 8px;
  margin: 0 0 2rem;
}

.legal-body h2 {
  margin: 2.5rem 0 .75rem;
  font-size: 1.15rem;
  letter-spacing: -.01em;
  color: #111;
}

.legal-body p {
  margin: 0 0 1rem;
  color: #333;
  line-height: 1.7;
}

.legal-body ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}
.legal-body ul li {
  margin-bottom: .4rem;
  color: #333;
  line-height: 1.6;
}

.legal-body a {
  color: var(--brand-red);
  text-decoration: underline;
}

.legal-footnote {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
  font-style: italic;
}

/* ----------------------------------------------------------------- */
/*  41. Exam guides (tef-canada.php, tcf-canada.php)                 */
/* ----------------------------------------------------------------- */
.exam-page { padding-top: 1rem; }

.exam-hero {
  padding: 2rem 0 1rem;
  max-width: 46rem;
}
.exam-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand-red);
  background: #fff5f6;
  border: 1px solid #f3cfd3;
  padding: .3rem .75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.exam-hero h1 {
  margin: 0 0 .75rem;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -.02em;
  line-height: 1.15;
}
.exam-hero .lead {
  color: #444;
  font-size: 1.08rem;
  line-height: 1.6;
  margin: 0 0 .75rem;
}
.exam-meta { margin: 0 0 1.5rem; }

.exam-section {
  margin: 3.5rem 0;
}
.exam-section h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin: 0 0 1rem;
  letter-spacing: -.01em;
}
.exam-section > p,
.exam-section > ul,
.exam-section > .exam-list {
  max-width: 46rem;
}
.exam-section p {
  color: #333;
  line-height: 1.7;
  margin: 0 0 1rem;
}
.exam-section a {
  color: var(--brand-red);
  text-decoration: underline;
}
.exam-section a.btn {
  text-decoration: none;
  color: #fff;
}

.exam-highlight {
  padding: 1.75rem 1.75rem 1.5rem;
  background: #fff5f6;
  border: 1px solid #f3cfd3;
  border-radius: 16px;
  max-width: 46rem;
}
.exam-highlight h2 { margin-top: 0; }

.exam-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.exam-list li {
  padding: .45rem 0 .45rem 1.5rem;
  position: relative;
  color: #333;
  line-height: 1.6;
  border-bottom: 1px solid #f0f0f0;
}
.exam-list li:last-child { border-bottom: 0; }
.exam-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand-red);
  font-weight: 800;
}

.exam-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 46rem;
}
.exam-card {
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  background: #fff;
}
.exam-card h3 {
  margin: 0 0 .4rem;
  font-size: 1.05rem;
}
.exam-card p {
  margin: 0;
  color: #444;
  font-size: .93rem;
  line-height: 1.6;
}
@media (max-width: 620px) {
  .exam-grid { grid-template-columns: 1fr; }
}

.exam-table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid #e5e5e5;
  margin: 0 0 1rem;
}
.exam-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
  background: #fff;
  min-width: 520px;
}
.exam-table th,
.exam-table td {
  padding: .8rem 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}
.exam-table thead th {
  background: #fafafa;
  font-weight: 700;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #555;
}
.exam-table tbody tr:last-child td { border-bottom: 0; }
.exam-table td:first-child { color: #111; }
.exam-table td:nth-child(3) {
  color: var(--brand-red);
  font-weight: 700;
  white-space: nowrap;
}

/* ----------------------------------------------------------------- */
/*  42. TEF/TCF program page — guide link cards (hover)              */
/* ----------------------------------------------------------------- */
.tef-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.tef-card-link:hover {
  background: #fff5f6;
  border-color: var(--brand-red);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px -12px rgba(216,6,33,.28);
}
.tef-card-link:hover h3 {
  color: var(--brand-red);
}

/* ----------------------------------------------------------------- */
/*  43. Exam guides (tef-canada.php, tcf-canada.php) — card hover    */
/* ----------------------------------------------------------------- */
.exam-card {
  transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.exam-card:hover {
  background: #fff5f6;
  border-color: var(--brand-red);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px -12px rgba(216,6,33,.28);
}
.exam-card:hover h3 {
  color: var(--brand-red);
}

/* ----------------------------------------------------------------- */
/*  45. TEF/TCF page — "four skills" cards (hover)                   */
/* ----------------------------------------------------------------- */
.tef-skill {
  transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.tef-skill:hover {
  background: #fff5f6;
  border-color: var(--brand-red);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px -12px rgba(216,6,33,.28);
}
.tef-skill:hover h3 {
  color: var(--brand-red);
}

/* ----------------------------------------------------------------- */
/*  46. Auth pages — red links & required phone                      */
/* ----------------------------------------------------------------- */
.auth-alt {
  margin-top: 1.25rem;
  color: #555;
  font-size: .95rem;
}
.auth-alt a {
  color: var(--brand-red);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
.auth-alt a:hover {
  border-bottom-color: var(--brand-red);
}

.auth label input:required + small {
  color: #8a0417;
}

/* ----------------------------------------------------------------- */
/*  47. Password field — show / hide toggle                          */
/* ----------------------------------------------------------------- */
.pw-field {
  position: relative;
  display: block;
  width: 100%;
}

.pw-field input[type="password"],
.pw-field input[type="text"] {
  width: 100%;
  padding-right: 2.75rem;
}

.pw-toggle {
  position: absolute;
  top: 50%;
  right: .5rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #666;
  border-radius: 6px;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.pw-toggle:hover {
  color: var(--brand-red);
  background: #fff5f6;
}
.pw-toggle:focus {
  outline: 2px solid var(--brand-red);
  outline-offset: 1px;
}
.pw-toggle svg {
  display: block;
}

/* ----------------------------------------------------------------- */
/*  49. Dashboard — red inline links                                 */
/* ----------------------------------------------------------------- */
.dash-card a,
.dash-head a {
  color: var(--brand-red);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
.dash-card a:hover,
.dash-head a:hover {
  border-bottom-color: var(--brand-red);
}

/* ----------------------------------------------------------------- */
/*  50. Auth pages — red inline links (forgot, reset)                */
/* ----------------------------------------------------------------- */
.auth a:not(.btn) {
  color: var(--brand-red);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
.auth a:not(.btn):hover {
  border-bottom-color: var(--brand-red);
}

/* ----------------------------------------------------------------- */
/*  51. Book form — required marks, hints, summary                   */
/* ----------------------------------------------------------------- */
.book .req-mark {
  color: var(--brand-red);
  font-weight: 700;
  margin-left: 0;
  line-height: 1;
}

.book .field-hint {
  display: block;
  min-height: 1.05rem;
  margin-top: .25rem;
  font-size: .82rem;
  font-weight: 500;
  line-height: 1.35;
  transition: color .15s;
}
.book .field-hint.hint-ok   { color: #14532d; }
.book .field-hint.hint-warn { color: #7a4a04; }
.book .field-hint.hint-err  { color: #8a0417; }

.book label:has(.field-hint.hint-err) input:not(:focus),
.book label:has(.field-hint.hint-err) select:not(:focus) {
  border-color: #f3b7bf;
}
.book label:has(.field-hint.hint-ok) input:not(:focus),
.book label:has(.field-hint.hint-ok) select:not(:focus) {
  border-color: #bfe3c8;
}

#form-summary {
  margin: 0 0 1rem;
}
#form-summary strong { display: block; margin-bottom: .15rem; }

.book button[type="submit"][disabled] {
  opacity: .5;
  cursor: not-allowed;
}
.book button[type="submit"][disabled]:hover {
  background: var(--brand-red);
  opacity: .5;
}

/* ----------------------------------------------------------------- */
/*  52. Book form — keep label text + asterisk on one line           */
/* ----------------------------------------------------------------- */
.book .label-text,
.auth .label-text {
  display: inline-flex;
  align-items: baseline;
  gap: .2rem;
  flex-wrap: wrap;
}

.book .label-text .req-mark,
.auth .label-text .req-mark {
  margin-left: 0;
}

/* ----------------------------------------------------------------- */
/*  53. Admin — inline assignment form                               */
/* ----------------------------------------------------------------- */
.admin .assign-form {
  display: inline-flex;
  gap: .35rem;
  align-items: center;
  flex-wrap: nowrap;
}
.admin .assign-form select {
  padding: .35rem .5rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
  font-size: .85rem;
  background: #fff;
  max-width: 12rem;
}
.admin .assign-form .btn.small {
  padding: .35rem .7rem;
  font-size: .82rem;
}

/* ----------------------------------------------------------------- */
/*  54. Admin — form action row                                      */
/* ----------------------------------------------------------------- */
.form-actions {
  display: flex;
  gap: .6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: .35rem;
}

/* ----------------------------------------------------------------- */
/*  55. Admin layout — sidebar + main                                */
/* ----------------------------------------------------------------- */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: start;
}

.admin-nav {
  position: sticky;
  top: 5.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem .5rem 1rem 0;
  border-right: 1px solid #eee;
  min-height: calc(100vh - 6rem);
}

.admin-nav-brand {
  padding: 0 .75rem .85rem;
  margin-bottom: .5rem;
  border-bottom: 1px solid #f0f0f0;
}
.admin-nav-mark {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-red);
}

.admin-nav-list,
.admin-nav-footer {
  display: grid;
  gap: .15rem;
}
.admin-nav-footer {
  margin-top: auto;
  padding-top: .75rem;
  border-top: 1px solid #f0f0f0;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .75rem;
  border-radius: 10px;
  color: #444;
  font-weight: 500;
  font-size: .92rem;
  text-decoration: none;
  transition: background .12s, color .12s;
}
.admin-nav-link:hover {
  background: #fafafa;
  color: #111;
}
.admin-nav-link.is-active {
  background: #fff5f6;
  color: var(--brand-red);
  font-weight: 700;
}
.admin-nav-link.is-active .admin-nav-icon {
  color: var(--brand-red);
}

.admin-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: #888;
  flex: 0 0 auto;
}
.admin-nav-link:hover .admin-nav-icon { color: #333; }
.admin-nav-label { line-height: 1; }

.admin-layout > section.dash,
.admin-layout > .dash {
  min-width: 0;
}

@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .admin-nav {
    position: static;
    min-height: 0;
    padding: 0 0 .75rem;
    border-right: 0;
    border-bottom: 1px solid #eee;
  }
  .admin-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
  }
  .admin-nav-link {
    padding: .5rem .75rem;
    font-size: .85rem;
  }
  .admin-nav-brand,
  .admin-nav-footer { display: none; }
}

/* ----------------------------------------------------------------- */
/*  56. Login — resend verification box                              */
/* ----------------------------------------------------------------- */
.resend-box {
  margin-top: 1.5rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #fafafa;
}
.resend-title {
  margin: 0 0 .75rem;
  font-weight: 600;
  color: #111;
}
.resend-form {
  display: grid;
  gap: .5rem;
  max-width: 26rem;
}
.resend-form label {
  display: grid;
  gap: .25rem;
  font-weight: 500;
  font-size: .9rem;
}
.resend-form input {
  padding: .55rem .7rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
  font-size: .95rem;
}
.resend-form button {
  justify-self: start;
}

/* ----------------------------------------------------------------- */
/*  57. Shared dashboard sidebar (student + tutor)                   */
/* ----------------------------------------------------------------- */
.dash-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: start;
}

.dash-nav {
  position: sticky;
  top: 5.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem .5rem 1rem 0;
  border-right: 1px solid #eee;
  min-height: calc(100vh - 6rem);
}

.dash-nav-brand {
  padding: 0 .75rem .85rem;
  margin-bottom: .5rem;
  border-bottom: 1px solid #f0f0f0;
}
.dash-nav-mark {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-red);
}

.dash-nav-list,
.dash-nav-footer { display: grid; gap: .15rem; }
.dash-nav-footer {
  margin-top: auto;
  padding-top: .75rem;
  border-top: 1px solid #f0f0f0;
}

.dash-nav-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .75rem;
  border-radius: 10px;
  color: #444;
  font-weight: 500;
  font-size: .92rem;
  text-decoration: none;
  transition: background .12s, color .12s;
}
.dash-nav-link:hover { background: #fafafa; color: #111; }
.dash-nav-link.is-active {
  background: #fff5f6;
  color: var(--brand-red);
  font-weight: 700;
}
.dash-nav-link.is-active .dash-nav-icon { color: var(--brand-red); }

.dash-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: #888;
  flex: 0 0 auto;
}
.dash-nav-link:hover .dash-nav-icon { color: #333; }
.dash-nav-label { line-height: 1; }

.dash-layout > section.dash,
.dash-layout > .dash { min-width: 0; }

@media (max-width: 900px) {
  .dash-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .dash-nav {
    position: static;
    min-height: 0;
    padding: 0 0 .75rem;
    border-right: 0;
    border-bottom: 1px solid #eee;
  }
  .dash-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
  }
  .dash-nav-link {
    padding: .5rem .75rem;
    font-size: .85rem;
  }
  .dash-nav-brand,
  .dash-nav-footer { display: none; }
}

/* ----------------------------------------------------------------- */
/*  58. Daily cards — Word of the Day + Challenge                    */
/* ----------------------------------------------------------------- */
.daily-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}
@media (max-width: 720px) {
  .daily-grid { grid-template-columns: 1fr; }
}

.daily-card {
  border: 1px solid #f3cfd3;
  background: #fff5f6;
  border-radius: 16px;
  padding: 1.25rem 1.35rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.daily-label {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-red);
  margin: 0;
}
.daily-word {
  margin: 0;
  font-size: 1.35rem;
}
.daily-word strong { color: #111; }
.daily-example {
  margin: 0;
  font-style: italic;
  color: #555;
  font-size: .92rem;
}
.daily-prompt {
  margin: 0;
  color: #111;
  font-size: 1rem;
  line-height: 1.55;
}
.daily-answer {
  margin: .5rem 0 0;
  padding: .85rem 1rem;
  background: #fff;
  border-left: 4px solid var(--brand-red);
  border-radius: 8px;
  font-size: .95rem;
  line-height: 1.6;
}
.daily-card .btn { align-self: flex-start; }

/* ----------------------------------------------------------------- */
/*  59. Materials list                                               */
/* ----------------------------------------------------------------- */
.materials-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.materials-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid #eee;
  flex-wrap: wrap;
}
.materials-list li:last-child { border-bottom: 0; }
.materials-list-full li { align-items: flex-start; }

/* ----------------------------------------------------------------- */
/*  60. User menu (header)                                           */
/* ----------------------------------------------------------------- */
.user-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.user-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .65rem .35rem .35rem;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background .15s;
  line-height: 1;
}
.user-menu-toggle:hover {
  background: #fafafa;
}
.user-menu-toggle:focus {
  outline: none;
}
.user-menu-toggle:focus-visible {
  outline: 2px solid var(--brand-red);
  outline-offset: 2px;
}

.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--brand-red);
  color: #fff;
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .02em;
  flex: 0 0 auto;
}

.user-name {
  font-weight: 600;
  font-size: .92rem;
  color: #111;
  white-space: nowrap;
}

.user-caret {
  color: #888;
  transition: transform .15s;
  flex: 0 0 auto;
}
.user-menu.is-open .user-caret {
  transform: rotate(180deg);
}

/* Panel */
.user-menu-panel {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  box-shadow: 0 10px 30px -12px rgba(0,0,0,.18);
  padding: .5rem;
  z-index: 100;
  animation: userMenuIn .15s ease-out;
}
.user-menu-panel[hidden] {
  display: none !important;
}
@keyframes userMenuIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.user-menu-head {
  padding: .6rem .75rem .75rem;
  display: grid;
  gap: .15rem;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: .35rem;
}
.user-menu-head strong {
  font-size: .95rem;
  color: #111;
}
.user-menu-head .muted {
  font-size: .8rem;
  color: #666;
  word-break: break-all;
}

.user-menu-item {
  display: block;
  padding: .55rem .75rem;
  border-radius: 8px;
  color: #333;
  font-size: .92rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .12s, color .12s;
}
.user-menu-item:hover {
  background: #fafafa;
  color: #111;
}

.user-menu-sep {
  height: 1px;
  background: #f0f0f0;
  margin: .35rem 0;
}

.user-menu-logout {
  color: var(--brand-red);
  font-weight: 700;
}
.user-menu-logout:hover {
  background: #fff5f6;
  color: var(--brand-red);
}

@media (max-width: 720px) {
  .user-menu {
    display: block;
    width: 100%;
  }
  .user-menu-toggle {
    width: 100%;
    justify-content: flex-start;
    padding: .6rem .25rem;
    border: 0;
    border-radius: 8px;
  }
  .user-menu-toggle:hover { background: #fafafa; }

  .user-menu-panel {
    position: static;
    box-shadow: none;
    border: 0;
    border-radius: 8px;
    padding: 0;
    margin-top: .25rem;
    background: transparent;
    animation: none;
  }
  .user-menu-head {
    padding: .65rem .25rem .75rem;
    border-bottom: 1px solid #f0f0f0;
  }
  .user-menu-item {
    padding: .65rem .25rem;
  }
  .user-menu-sep { margin: .35rem .25rem; }
}
/* ----------------------------------------------------------------- */
/*  61. Upload modal                                                 */
/* ----------------------------------------------------------------- */
.upload-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.upload-modal[hidden] { display: none; }

.upload-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17,17,17,.45);
  backdrop-filter: blur(2px);
}

.upload-modal-card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 640px;
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.35);
  animation: uploadModalIn .2s ease-out;
  z-index: 1;
}
@keyframes uploadModalIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.upload-modal-close {
  position: absolute;
  top: .85rem;
  right: .85rem;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: #666;
  cursor: pointer;
  border-radius: 10px;
  transition: background .12s, color .12s;
}
.upload-modal-close:hover { background: #f2f2f2; color: #111; }

.upload-modal-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 1.5rem;
}

.upload-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #fff7e6;
  color: #7a4a04;
  flex: 0 0 auto;
}

.upload-modal-title {
  margin: 0 0 .15rem;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: #111;
}
.upload-modal-sub {
  margin: 0;
  color: #777;
  font-size: .95rem;
}

.upload-modal-body {
  display: grid;
  gap: 1rem;
}

/* Drop zone */
.upload-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 3rem 1.5rem;
  background: #fafafa;
  border: 2px dashed #d8d8d8;
  border-radius: 16px;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, background .15s;
}
.upload-drop:hover {
  border-color: var(--brand-red);
  background: #fff5f6;
}
.upload-drop.is-drag {
  border-color: var(--brand-red);
  background: #fff5f6;
  transform: scale(1.01);
}

.upload-drop-cloud {
  color: #333;
  margin-bottom: .5rem;
}

.upload-drop-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #111;
}
.upload-drop-sub {
  margin: 0;
  color: #888;
  font-size: .95rem;
}

.upload-modal-file {
  margin: 0;
  padding: .6rem .85rem;
  background: #eaf7ee;
  border: 1px solid #bfe3c8;
  color: #14532d;
  border-radius: 10px;
  font-size: .92rem;
  font-weight: 500;
}

/* ----------------------------------------------------------------- */
/*  62. Tutor daily — next-available-day picker                      */
/* ----------------------------------------------------------------- */
.daily-editor {
  display: grid;
  gap: 1.25rem;
}
.daily-card-form {
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 1.25rem 1.35rem 1.15rem;
  background: #fff;
  display: grid;
  gap: .75rem;
}
.daily-card-form h3 {
  margin: 0 0 .25rem;
  font-size: 1.1rem;
}
.daily-card-form .hint { color: #666; font-size: .85rem; }

/* Reserved-day pill grid */
.day-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: .5rem 0 .75rem;
}
.day-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  padding: .45rem .75rem;
  min-width: 4.5rem;
  border-radius: 10px;
  font-size: .8rem;
  font-weight: 600;
  border: 1px solid #e5e5e5;
  background: #fff;
  color: #333;
  cursor: pointer;
}
.day-pill .day-pill-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #888;
}
.day-pill.is-reserved {
  background: #fff5f6;
  border-color: #f3cfd3;
  color: #8a0417;
  cursor: not-allowed;
  opacity: .75;
}
.day-pill.is-next {
  background: #111;
  border-color: #111;
  color: #fff;
}
.day-pill.is-next .day-pill-label { color: #fff; opacity: .75; }

.day-reserved-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: .35rem;
}
.day-reserved-list li {
  display: flex;
  justify-content: space-between;
  padding: .35rem 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: .9rem;
  color: #333;
}
.day-reserved-list li:last-child { border-bottom: 0; }
.day-reserved-list strong { color: #111; }
/* ----------------------------------------------------------------- */
/*  63. Tutor materials — inline drop zone with live preview         */
/* ----------------------------------------------------------------- */
.material-form .field-block {
  display: grid;
  gap: .25rem;
}
.material-form .field-label {
  font-weight: 500;
  font-size: .95rem;
}

.material-form .drop-zone {
  display: block;
  position: relative;
  margin-top: .35rem;
}

/* --- Empty state --- */
.drop-zone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: 2rem 1.25rem;
  background: #fafafa;
  border: 2px dashed #d8d8d8;
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  color: #333;
  transition: border-color .15s, background .15s, transform .15s;
}
.drop-zone-inner:hover {
  border-color: var(--brand-red);
  background: #fff5f6;
}
.drop-zone.is-drag .drop-zone-inner {
  border-color: var(--brand-red);
  background: #fff5f6;
  transform: scale(1.005);
}

.drop-zone-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #111;
}
.drop-zone-sub {
  margin: 0;
  color: #888;
  font-size: .88rem;
}

/* --- Preview state ---
   When the drop zone has a file, hide the empty-state inner entirely
   and show only the preview. */
.drop-zone.has-file .drop-zone-inner {
  display: none !important;
}

.drop-preview {
  position: relative;
  display: block;
  padding: .85rem;
  background: #fff;
  border: 2px solid #bfe3c8;
  border-radius: 14px;
}

.drop-preview[hidden] {
  display: none !important;
}

.drop-clear {
  position: absolute;
  top: .6rem;
  right: .6rem;
  width: 30px;
  height: 30px;
  border: 0;
  background: #f2f2f2;
  color: #333;
  border-radius: 999px;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, color .12s;
  z-index: 2;
}
.drop-clear:hover { background: #fde8ea; color: #8a0417; }

.drop-preview-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-bottom: .65rem;
  min-height: 0;
}

.drop-preview-media img {
  max-width: 100%;
  max-height: 260px;
  border-radius: 10px;
  display: block;
  object-fit: contain;
}

.drop-preview-media video {
  width: 100%;
  max-height: 260px;
  border-radius: 10px;
  display: block;
  background: #000;
}

.drop-preview-media audio {
  width: 100%;
  max-width: 340px;
}

.drop-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 18px;
  background: #fafafa;
  border: 1px solid #eee;
  color: #444;
}
.drop-icon-pdf   { color: #8a0417; background: #fde8ea; border-color: #f3b7bf; }
.drop-icon-doc   { color: #0b3d73; background: #e0f0ff; border-color: #bfdcff; }
.drop-icon-ppt   { color: #7a4a04; background: #fff7e6; border-color: #f3dfa6; }
.drop-icon-zip   { color: #444;    background: #f2f2f2; border-color: #ddd; }
.drop-icon-audio { color: #7a4a04; background: #fff7e6; border-color: #f3dfa6; }
.drop-icon-video { color: #0b3d73; background: #e0f0ff; border-color: #bfdcff; }
.drop-icon-file  { color: #444;    background: #fafafa; border-color: #eee; }

.drop-preview-meta {
  display: grid;
  gap: .15rem;
  text-align: center;
  padding-bottom: .35rem;
}
.drop-preview-name {
  margin: 0;
  font-size: .95rem;
  font-weight: 700;
  color: #111;
  word-break: break-all;
}
.drop-preview-size {
  margin: 0;
  font-size: .78rem;
  color: #666;
  letter-spacing: .04em;
  text-transform: uppercase;
}
/* ----------------------------------------------------------------- */
/*  64. Tutor materials — media library grid                         */
/* ----------------------------------------------------------------- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.media-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  min-width: 0;              /* allow grid cell to shrink */
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.media-card:hover {
  border-color: var(--brand-red);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -14px rgba(216,6,33,.28);
}
.media-card.is-archived { opacity: .55; }

/* Fixed-aspect preview — the image cannot expand the card */
.media-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #fafafa;
  overflow: hidden;          /* clip anything that overflows */
  text-decoration: none;
  color: inherit;
}

/* Force the image to fit inside the aspect-box */
.media-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* When the image is the preview, the flex layout doesn't matter */
.media-preview > img:first-child:last-child { gap: 0; }

.media-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #eee;
  overflow: hidden;
}
.media-icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.media-icon-audio { color: #7a4a04; background: #fff7e6; border-color: #f3dfa6; }
.media-icon-video { color: #0b3d73; background: #e0f0ff; border-color: #bfdcff; }
.media-icon-pdf   { color: #8a0417; background: #fde8ea; border-color: #f3b7bf; }
.media-icon-doc   { color: #0b3d73; background: #e0f0ff; border-color: #bfdcff; }
.media-icon-ppt   { color: #7a4a04; background: #fff7e6; border-color: #f3dfa6; }
.media-icon-zip   { color: #444;    background: #f2f2f2; border-color: #ddd; }
.media-icon-link  { color: var(--brand-red); background: #fff5f6; border-color: #f3cfd3; }

.media-kind {
  position: relative;      /* sits above the absolute-positioned image */
  z-index: 2;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #666;
}

.media-status {
  position: absolute;
  top: .5rem;
  right: .5rem;
  z-index: 3;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: #111;
  color: #fff;
  padding: .15rem .5rem;
  border-radius: 999px;
}

.media-meta {
  padding: .85rem 1rem .5rem;
  flex: 1;
  min-width: 0;
}
.media-title {
  margin: 0 0 .35rem;
  font-size: .98rem;
  font-weight: 700;
  color: #111;
  line-height: 1.3;
  word-break: break-word;
}
.media-tags {
  display: flex;
  gap: .3rem;
  flex-wrap: wrap;
  margin: 0 0 .5rem;
}
.media-tags .badge {
  font-size: .65rem;
  padding: .1rem .45rem;
}
.media-desc {
  margin: 0 0 .35rem;
  line-height: 1.45;
}
.media-foot {
  margin: 0;
  font-size: .78rem;
}

.media-actions {
  display: flex;
  gap: .35rem;
  padding: .75rem 1rem 1rem;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
  flex-wrap: wrap;
}
.media-actions .btn { text-decoration: none; }

/* On narrow screens, use 2-per-row instead of 3+ */
@media (max-width: 560px) {
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
  }
  .media-meta { padding: .65rem .75rem .4rem; }
  .media-actions { padding: .6rem .75rem .75rem; }
}
/* ----------------------------------------------------------------- */
/*  65. Tutor materials — external URL preview                       */
/* ----------------------------------------------------------------- */
.url-preview {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: .5rem;
  padding: .6rem .75rem;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  background: #fafafa;
}

.url-preview[hidden] { display: none !important; }

.url-preview-favicon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #eee;
  flex: 0 0 auto;
  color: #666;
  overflow: hidden;
}
.url-preview-favicon img {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
}

.url-preview-meta {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: .1rem;
}
.url-preview-host {
  margin: 0;
  font-size: .9rem;
  font-weight: 700;
  color: #111;
  line-height: 1.2;
}
.url-preview-path {
  margin: 0;
  font-size: .78rem;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.url-preview-open {
  flex: 0 0 auto;
  font-size: .82rem;
  font-weight: 700;
  color: var(--brand-red);
  text-decoration: none;
  padding: .35rem .6rem;
  border-radius: 8px;
  transition: background .12s;
}
.url-preview-open:hover {
  background: #fff5f6;
}
/* ----------------------------------------------------------------- */
/*  66. Tutor daily — cleaner prompt layout                          */
/* ----------------------------------------------------------------- */
.daily-card-head {
  margin-bottom: .75rem;
}
.daily-card-head h3 {
  margin: 0 0 .15rem;
  font-size: 1.1rem;
}
.daily-card-lead {
  margin: 0;
  color: #666;
  font-size: .9rem;
  line-height: 1.5;
}

.daily-day-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  margin: .5rem 0 .5rem;
  flex-wrap: wrap;
}
.daily-day-title {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #111;
}
.daily-day-hint {
  font-size: .85rem;
  color: #666;
}
.daily-day-hint strong {
  color: #111;
}

.daily-subhead {
  margin: 1.5rem 0 .5rem;
  font-size: .95rem;
  font-weight: 700;
  color: #111;
}

.day-pill {
  transition: background .12s, color .12s, border-color .12s;
}
.day-pill:not(.is-reserved):hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
}

/* ----------------------------------------------------------------- */
/*  67. Tutor daily — row actions in scheduled list                  */
/* ----------------------------------------------------------------- */
.day-reserved-list li {
  gap: 1rem;
}
.day-row-actions {
  display: inline-flex;
  gap: .35rem;
  align-items: center;
  flex-shrink: 0;
}
.day-row-actions .btn.small {
  padding: .3rem .65rem;
  font-size: .78rem;
}
/* ----------------------------------------------------------------- */
/*  68. Auth signup — required asterisk on labels                    */
/* ----------------------------------------------------------------- */
.auth .label-text {
  display: inline-flex;
  align-items: baseline;
  gap: .2rem;
  flex-wrap: wrap;
  font-weight: 500;
}

.auth .req-mark {
  color: var(--brand-red);
  font-weight: 700;
  margin-left: 0;
  line-height: 1;
  font-size: 1em;
}

/* Required marker inside the checkbox label */
.auth .check .req-mark {
  color: var(--brand-red);
  font-weight: 700;
  margin-left: .15rem;
}
/* ----------------------------------------------------------------- */
/*  69. Auth signup — password strength + confirm feedback colours   */
/* ----------------------------------------------------------------- */

/* Hint text — force all three states to be distinctly coloured       */
.auth .field-hint {
  display: block;
  min-height: 1.1rem;
  margin-top: .3rem;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.35;
}

.auth .field-hint.hint-ok {
  color: #0f7a35;                /* strong green — clearly positive */
}
.auth .field-hint.hint-warn {
  color: #a15a04;                /* amber — needs improvement */
}
.auth .field-hint.hint-err {
  color: #b31224;                /* red — invalid */
}

/* Add a small leading icon per state */
.auth .field-hint.hint-ok::before {
  content: "✓ ";
  font-weight: 800;
}
.auth .field-hint.hint-warn::before {
  content: "! ";
  font-weight: 800;
}
.auth .field-hint.hint-err::before {
  content: "✕ ";
  font-weight: 800;
}

/* Input border reflects state, but not while focused */
.auth label:has(.field-hint.hint-err) input:not(:focus) {
  border-color: #f3b7bf;
}
.auth label:has(.field-hint.hint-ok) input:not(:focus) {
  border-color: #a8d5b3;
}
/* ----------------------------------------------------------------- */
/*  70. Admin settings — inputs                                   */
/* ----------------------------------------------------------------- */
.admin .content-form input[type="number"] {
  max-width: 12rem;
}
.admin .content-form .hint {
  color: #666;
  font-size: .82rem;
}
/* ----------------------------------------------------------------- */
/*  71. Admin — students list & detail                               */
/* ----------------------------------------------------------------- */
.student-filters {
  display: flex;
  align-items: flex-end;
  gap: .75rem;
  flex-wrap: wrap;
}
.student-filters label {
  display: grid;
  gap: .25rem;
  min-width: 0;
}
.student-filters label.student-search {
  flex: 1 1 220px;
}
.student-filters label:not(.student-search) {
  flex: 0 0 auto;
  min-width: 9rem;
}
.student-filters input,
.student-filters select {
  padding: .55rem .7rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
  font-size: .95rem;
  background: #fff;
  width: 100%;
}
.student-filter-actions {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex: 0 0 auto;
}
.student-filter-actions .btn { padding: .55rem 1.1rem; }

@media (max-width: 780px) {
  .student-filters {
    flex-direction: column;
    align-items: stretch;
  }
  .student-filters label,
  .student-filters label.student-search,
  .student-filters label:not(.student-search) {
    flex: 0 0 auto;
    width: 100%;
  }
  .student-filter-actions {
    width: 100%;
    justify-content: stretch;
  }
  .student-filter-actions .btn {
    flex: 1;
    text-align: center;
  }
}
/* ----------------------------------------------------------------- */
/*  72. Admin tables — full-width, no overlap, scroll on narrow      */
/* ----------------------------------------------------------------- */

/* The card that holds a table must clip its content and never let
   the table bleed outside. */
.admin .dash-card {
  overflow-x: auto;
  overflow-y: visible;
}

/* Give tables enough room so columns don't squash into each other. */
.admin .data-table {
  min-width: 760px;
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
}

/* Every header stays on one line — no more "No-" / "solicit" wraps. */
.admin .data-table th {
  white-space: nowrap;
}

/* Cells get a bit more breathing room and never let text overlap. */
.admin .data-table th,
.admin .data-table td {
  padding: .65rem .75rem;
  vertical-align: middle;
  overflow: hidden;
}

/* The action column shrinks to fit its content, never wraps, and
   sits flush right. The width:1% trick makes the browser give this
   column the minimum space needed to fit the buttons on one line. */
.admin .data-table th:last-child,
.admin .data-table td.row-actions {
  white-space: nowrap;
  width: 1%;
  text-align: right;
  padding-left: 1rem;
}

/* Buttons inside the action cell stay on one line, tight together. */
.admin .data-table td.row-actions > a,
.admin .data-table td.row-actions > form,
.admin .data-table td.row-actions > div > a,
.admin .data-table td.row-actions > div > form {
  display: inline-block;
  vertical-align: middle;
}

.admin .data-table td.row-actions .btn {
  white-space: nowrap;
  padding: .35rem .75rem;
  font-size: .82rem;
  margin: 0;
}

.admin .data-table td.row-actions form {
  margin: 0;
}

/* Consistent gap when the buttons are wrapped in a flex container. */
.admin .data-table td.row-actions > div {
  display: inline-flex;
  gap: .4rem;
  align-items: center;
  justify-content: flex-end;
}
/* --- Plan selection highlight --- */
.price-card.is-highlighted {
  position: relative;
  border-color: #D80621;
  box-shadow:
    0 0 0 2px rgba(216, 6, 33, 0.15),
    0 12px 30px rgba(216, 6, 33, 0.12);
  transform: translateY(-2px);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.price-card.is-highlighted .price-badge {
  background: #D80621;
  color: #fff;
}

/* On dark backgrounds, soften the ring a little */
@media (prefers-color-scheme: dark) {
  .price-card.is-highlighted {
    box-shadow:
      0 0 0 2px rgba(216, 6, 33, 0.35),
      0 12px 30px rgba(0, 0, 0, 0.5);
  }
}
/* --- Top nav active link --- */
.nav-menu .nav-link.is-active,
.nav-menu a.is-active {
  color: #D80621;
  font-weight: 600;
  position: relative;
}

/* Underline bar under the active link */
.nav-menu .nav-link.is-active::after,
.nav-menu a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: #D80621;
  border-radius: 2px;
}

/* Mobile: no underline, just color */
@media (max-width: 720px) {
  .nav-menu .nav-link.is-active::after,
  .nav-menu a.is-active::after {
    display: none;
  }

  .nav-menu .nav-link.is-active,
  .nav-menu a.is-active {
    background: rgba(216, 6, 33, 0.08);
    border-radius: 6px;
  }
}
