/* Quizzalo CSS Module: 05_articles_orders_coach.css - Study Notes Typography, KaTeX Math, Back-to-Top, Courier Tracking & Monthly Study Coach */

/* ==========================================================================
   PROFESSIONAL EDUTECH BLOG & ARTICLE TYPOGRAPHY STYLES
   ========================================================================== */

/* Article Container & Typography */
.article-body-text {
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--text-main);
  word-break: break-word;
}

.article-body-text .blog-p {
  margin-bottom: 1.25rem;
  line-height: 1.85;
  color: var(--text-main);
}

/* Headings */
.article-body-text .blog-h1 {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.3;
  margin: 2.25rem 0 1rem;
  color: var(--text-main);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.article-body-text .blog-h2 {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.35;
  margin: 2rem 0 0.85rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-body-text .blog-h3 {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.4;
  margin: 1.85rem 0 0.75rem;
  color: var(--text-main);
  border-left: 4px solid var(--primary);
  padding-left: 0.75rem;
}

.article-body-text .blog-h4 {
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1.45;
  margin: 1.6rem 0 0.65rem;
  color: var(--text-main);
  border-left: 3.5px solid #ca8a04;
  padding-left: 0.65rem;
}

.article-body-text .blog-h5 {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem;
  color: var(--text-main);
}

/* Divider */
.article-body-text .blog-divider {
  border: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-color), transparent);
  margin: 2.25rem 0;
}

/* Executive Overview / Highlights Box */
.blog-executive-box {
  background: linear-gradient(135deg, rgba(201, 24, 43, 0.05) 0%, rgba(234, 179, 8, 0.08) 100%);
  border: 1.5px solid rgba(201, 24, 43, 0.2);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.blog-executive-header {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.blog-executive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.blog-executive-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
}

.blog-executive-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.blog-executive-val {
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2px;
}

/* Beautiful Responsive Tables: Perfectly Fit Without Ugly Scrolling */
.blog-table-container {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0 2rem;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  background: var(--bg-card);
  -webkit-overflow-scrolling: touch;
}

.blog-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.90rem;
  table-layout: auto;
}

.blog-table thead tr {
  background: #0f172a;
  color: #f8fafc;
}

.blog-table th {
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid #334155;
  white-space: normal; /* Perfectly wrap headers to eliminate horizontal scroll */
  word-break: normal;
  overflow-wrap: break-word;
  vertical-align: middle;
  line-height: 1.35;
}

.blog-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: top;
  line-height: 1.55;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.blog-table tbody tr:last-child td {
  border-bottom: none;
}

.blog-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.02);
}

body.hotseat-mode .blog-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.blog-table tbody tr:hover {
  background: rgba(201, 24, 43, 0.04);
}

/* Mathematical Formula Cards (KaTeX & Semantics) */
.blog-math-block {
  margin: 1.35rem 0;
  padding: 1.1rem 1.4rem;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.06) 0%, rgba(15, 23, 42, 0.03) 100%);
  border: 1px solid rgba(2, 132, 199, 0.22);
  border-left: 4px solid #0284c7;
  border-radius: 10px;
  text-align: center;
  overflow-x: auto;
  font-size: 1.15rem;
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

body.hotseat-mode .blog-math-block {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border-color: rgba(56, 189, 248, 0.35);
  border-left-color: #38bdf8;
  color: #f1f5f9;
}

.blog-math-inline {
  display: inline-block;
  padding: 0 4px;
  font-size: 1.05em;
  color: #0369a1;
  font-weight: 600;
  vertical-align: baseline;
}

body.hotseat-mode .blog-math-inline {
  color: #38bdf8;
}

/* Fallback HTML Fraction Components */
.math-frac {
  display: inline-flex;
  flex-direction: column;
  vertical-align: -0.5em;
  text-align: center;
  padding: 0 3px;
  font-size: 0.92em;
  line-height: 1.05;
}

.math-num {
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 2px;
}

.math-den {
  padding-top: 2px;
}

/* Styled Code & Preformatted Containers */
.blog-code-container {
  margin: 1.25rem 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.blog-pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 1rem 1.25rem;
  margin: 0;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.88rem;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Styled Lists */
.article-body-text .blog-list {
  margin: 0.75rem 0 1.5rem 0;
  list-style-type: none;
  padding: 0;
}

.article-body-text .blog-list-item {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.65rem;
  line-height: 1.75;
}

.article-body-text .blog-list-item::before {
  content: "•";
  position: absolute;
  left: 0.2rem;
  top: -0.1rem;
  color: var(--primary);
  font-size: 1.45rem;
  line-height: 1.4;
  font-weight: 900;
}

.article-body-text .blog-ol-list {
  margin: 0.75rem 0 1.5rem 0;
  padding: 0;
  counter-reset: blog-ol-counter;
  list-style: none;
}

.article-body-text .blog-ol-item {
  counter-increment: blog-ol-counter;
  position: relative;
  padding-left: 2.2rem;
  margin-bottom: 0.75rem;
  line-height: 1.75;
}

.article-body-text .blog-ol-item::before {
  content: counter(blog-ol-counter);
  position: absolute;
  left: 0;
  top: 3px;
  width: 22px;
  height: 22px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 800;
  font-size: 0.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.hotseat-mode .article-body-text .blog-ol-item::before {
  background: rgba(201, 24, 43, 0.25);
  color: #fca5a5;
}

/* Callout Cards */
.blog-callout {
  border-radius: 12px;
  padding: 1.15rem 1.35rem;
  margin: 1.6rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  font-size: 0.98rem;
  line-height: 1.75;
}

.blog-callout .callout-badge {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.blog-callout .callout-content {
  color: var(--text-main);
}

.callout-mentor {
  background: rgba(234, 179, 8, 0.08);
  border-left: 4px solid #ca8a04;
}

.callout-mentor .callout-badge {
  color: #b45309;
}

.callout-trap {
  background: rgba(225, 29, 72, 0.08);
  border-left: 4px solid #e11d48;
}

.callout-trap .callout-badge {
  color: #be123c;
}

.callout-note {
  background: rgba(2, 132, 199, 0.08);
  border-left: 4px solid #0284c7;
}

.callout-note .callout-badge {
  color: #0369a1;
}

.callout-tip {
  background: rgba(16, 185, 129, 0.08);
  border-left: 4px solid #10b981;
}

.callout-tip .callout-badge {
  color: #047857;
}

.callout-important {
  background: rgba(147, 51, 234, 0.08);
  border-left: 4px solid #9333ea;
}

.callout-important .callout-badge {
  color: #7e22ce;
}

.blog-callout-p {
  margin: 0.35rem 0;
  line-height: 1.6;
}

.blog-callout-list {
  margin: 0.4rem 0 0.4rem 1.25rem;
  padding: 0;
  list-style-type: disc;
}

.blog-callout-list li {
  margin: 0.25rem 0;
  line-height: 1.5;
}

.blog-block-math {
  margin: 0.75rem 0;
  text-align: center;
  overflow-x: auto;
  padding: 0.4rem 0;
}

.blog-quote {
  border-left: 4px solid var(--border-color);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.02);
  border-radius: 0 8px 8px 0;
}

/* PYQ Interactive Challenge Cards */
.pyq-challenge-card {
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-card);
  padding: 1.35rem;
  margin: 1.75rem 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.pyq-challenge-card:hover {
  border-color: #38bdf8;
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.1);
}

.pyq-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pyq-badge {
  background: #fee2e2;
  color: #991b1b;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.hotseat-mode .pyq-badge {
  background: rgba(201, 24, 43, 0.25);
  color: #fca5a5;
}

.pyq-hotseat-tag {
  background: #fef3c7;
  color: #92400e;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

body.hotseat-mode .pyq-hotseat-tag {
  background: rgba(234, 179, 8, 0.2);
  color: #fde68a;
}

.pyq-question-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.pyq-options-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-bottom: 1.15rem;
}

@media (min-width: 640px) {
  .pyq-options-container {
    grid-template-columns: 1fr 1fr;
  }
}

.pyq-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 8px 12px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.92rem;
  transition: all 0.2s;
}

.pyq-option .opt-label {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border-color);
  color: var(--text-main);
  font-weight: 800;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pyq-option .opt-text {
  flex-grow: 1;
}

.pyq-option.is-correct {
  background: rgba(34, 197, 94, 0.08);
  border-color: #22c55e;
}

.pyq-option.is-correct .opt-label {
  background: #22c55e;
  color: #ffffff;
}

.pyq-option .correct-badge {
  font-size: 0.72rem;
  background: #22c55e;
  color: #ffffff;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 800;
}

.pyq-solution-box {
  background: rgba(34, 197, 94, 0.06);
  border-left: 3.5px solid #22c55e;
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  font-size: 0.92rem;
  line-height: 1.65;
}

.pyq-solution-header {
  color: #15803d;
  font-weight: 700;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

body.hotseat-mode .pyq-solution-header {
  color: #4ade80;
}

.pyq-solution-body {
  color: var(--text-main);
}


/* Hide duplicate MathML elements so KaTeX only displays visual HTML */
.katex-mathml {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
}

/* Prevent KaTeX stretchy SVG arrows/rules from drawing infinite lines or forcing scrollbars */
.katex .x-arrow,
.katex .stretchy {
  max-width: 120px !important;
  overflow: hidden !important;
}

.katex .stretchy svg {
  max-width: 100% !important;
}

.blog-callout {
  max-width: 100%;
  overflow-x: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.blog-callout .katex-display {
  overflow-x: hidden;
  max-width: 100%;
}

.katex-display {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0.85rem 0;
  padding: 0.25rem 0;
  -webkit-overflow-scrolling: touch;
}


/* ======================================================== */
/* BACK TO TOP FLOATING BUTTON (SMOOTH & EASE DECELERATION)  */
/* ======================================================== */
html {
  scroll-behavior: smooth;
}

.back-to-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 6px 20px rgba(201, 24, 43, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px) scale(0.88);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.3s,
              background 0.2s,
              box-shadow 0.2s;
  outline: none !important;
  user-select: none;
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.back-to-top-btn:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  transform: translateY(-2.5px) scale(1.06);
  box-shadow: 0 8px 25px rgba(201, 24, 43, 0.65);
}

.back-to-top-btn:active {
  transform: translateY(0) scale(0.94);
  box-shadow: 0 2px 10px rgba(201, 24, 43, 0.4);
}

.back-to-top-btn:focus,
.back-to-top-btn:focus-visible {
  outline: none !important;
  outline-offset: 0 !important;
}

/* Mobile Responsiveness: Clear Mobile Bottom Nav Bar (65px) */
@media (max-width: 768px) {
  .back-to-top-btn {
    bottom: 4.6rem;
    right: 0.65rem;
    width: 36px;
    height: 36px;
    opacity: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  }
  .back-to-top-btn.visible {
    opacity: 0.72;
  }
  .back-to-top-btn.visible:active,
  .back-to-top-btn.visible:hover {
    opacity: 1;
    transform: scale(1.05);
  }
}

/* Hide during active full-screen tests, CBT mock exam sessions & open modals */
body.hotseat-gameplay-active .back-to-top-btn,
body.cbt-exam-active .back-to-top-btn,
body.modal-open .back-to-top-btn,
body:has(.modal-overlay.active) .back-to-top-btn,
body:has(#exam-intelligence-modal:not([style*="none"])) .back-to-top-btn,
body:has(#mock-guidelines-modal:not([style*="none"])) .back-to-top-btn {
  display: none !important;
}


/* ======================================================== */
/* ENHANCED STUDENT ORDERS & COURIER TRACKING SYSTEM        */
/* ======================================================== */

.orders-filter-bar {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.15rem;
}

.orders-tab-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1.5px solid #334155;
  color: #94a3b8;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.orders-tab-btn:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #f8fafc;
  border-color: #64748b;
}

.orders-tab-btn.active {
  background: linear-gradient(135deg, #ca8a04 0%, #a16207 100%);
  color: #ffffff;
  border-color: #eab308;
  box-shadow: 0 4px 12px rgba(202, 138, 4, 0.35);
}

/* 4-Stage Shipment Stepper */
.courier-stepper-container {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(51, 65, 85, 0.85);
  border-radius: 12px;
  padding: 1.1rem 0.85rem 0.9rem;
  margin: 0.85rem 0;
}

.courier-stepper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  width: 100%;
}

.courier-stepper-line {
  position: absolute;
  top: 16px;
  left: 36px;
  right: 36px;
  height: 3px;
  background: #334155;
  z-index: 1;
}

.courier-stepper-fill {
  position: absolute;
  top: 16px;
  left: 36px;
  height: 3px;
  background: linear-gradient(90deg, #10b981 0%, #38bdf8 100%);
  z-index: 2;
  transition: width 0.4s ease;
}

.courier-step-node {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  min-width: 0;
}

.courier-step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 0.45rem;
  border: 2px solid #334155;
  background: #0f172a;
  color: #64748b;
  transition: all 0.3s ease;
}

.courier-step-node.completed .courier-step-dot {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.45);
}

.courier-step-node.active .courier-step-dot {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.6);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(56, 189, 248, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

.courier-step-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: #94a3b8;
  line-height: 1.25;
  white-space: normal;
  max-width: 95px;
}

.courier-step-node.completed .courier-step-title {
  color: #34d399;
}

.courier-step-node.active .courier-step-title {
  color: #38bdf8;
}

.courier-step-time {
  font-size: 0.66rem;
  color: #64748b;
  margin-top: 2px;
}

/* Shipment Detailed Timeline Log */
.shipment-milestone-drawer {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 1rem 1.15rem;
  margin-top: 0.75rem;
}

.milestone-timeline-item {
  position: relative;
  padding-left: 26px;
  padding-bottom: 1rem;
}

.milestone-timeline-item:last-child {
  padding-bottom: 0;
}

.milestone-timeline-item::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 14px;
  bottom: 0;
  width: 2px;
  background: #334155;
}

.milestone-timeline-item:last-child::before {
  display: none;
}

.milestone-pin {
  position: absolute;
  left: 0;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #334155;
  background: #0f172a;
}

.milestone-timeline-item.completed .milestone-pin {
  border-color: #10b981;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

.milestone-timeline-item.in_progress .milestone-pin {
  border-color: #38bdf8;
  background: #0284c7;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .courier-stepper-line, .courier-stepper-fill {
    left: 20px;
    right: 20px;
  }
  .courier-step-dot {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }
  .courier-step-title {
    font-size: 0.68rem;
    max-width: 70px;
  }
}

/* =============================================================
   SELF-ASSESSMENT, MONTHLY ANALYTICS & STUDY COACH (PROFILE)
   ============================================================= */
.perf-coach-shell {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 18px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 2.25rem;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}

body.hotseat-mode .perf-coach-shell {
  background: #0f172a;
  border-color: #1e293b;
}

.perf-coach-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.perf-coach-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.perf-goal-pill,
.perf-readiness-pill {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0.36rem 0.75rem;
  border-radius: 9999px;
}

.perf-goal-pill {
  background: rgba(202, 138, 4, 0.14);
  color: #a16207;
  border: 1px solid rgba(202, 138, 4, 0.35);
}

body.hotseat-mode .perf-goal-pill {
  color: #fde047;
  background: rgba(202, 138, 4, 0.2);
}

.perf-readiness-pill {
  background: rgba(2, 132, 199, 0.12);
  color: #0369a1;
  border: 1px solid rgba(2, 132, 199, 0.3);
}

body.hotseat-mode .perf-readiness-pill {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.16);
}

.perf-month-select {
  padding: 0.38rem 0.75rem;
  border-radius: 9px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-main);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.perf-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.perf-kpi-item {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
}

.perf-kpi-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.4px;
}

.perf-kpi-val {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text-main);
  margin: 0.2rem 0 0.15rem 0;
  line-height: 1.25;
}

.perf-kpi-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
}

.perf-split-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 1.25rem;
}

.perf-sub-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 0.75rem 0;
}

.perf-subjects-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.perf-subj-card {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
}

.perf-subj-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.perf-subj-title {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text-main);
}

.perf-tier-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
}

.perf-tier-badge.tier-best { background: rgba(22, 163, 74, 0.15); color: #15803d; }
.perf-tier-badge.tier-average { background: rgba(217, 119, 6, 0.15); color: #b45309; }
.perf-tier-badge.tier-weak { background: rgba(220, 38, 38, 0.15); color: #b91c1c; }
.perf-tier-badge.tier-starter { background: rgba(148, 163, 184, 0.2); color: #475569; }

body.hotseat-mode .perf-tier-badge.tier-best { color: #4ade80; }
body.hotseat-mode .perf-tier-badge.tier-average { color: #fbbf24; }
body.hotseat-mode .perf-tier-badge.tier-weak { color: #f87171; }
body.hotseat-mode .perf-tier-badge.tier-starter { color: #cbd5e1; }

.perf-bar-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.42rem;
}

.perf-bar-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
  overflow: hidden;
}

.perf-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.perf-bar-fill.tier-best { background: linear-gradient(90deg, #22c55e, #16a34a); }
.perf-bar-fill.tier-average { background: linear-gradient(90deg, #f59e0b, #d97706); }
.perf-bar-fill.tier-weak { background: linear-gradient(90deg, #ef4444, #dc2626); }
.perf-bar-fill.tier-starter { background: #94a3b8; }

.perf-acc-num {
  font-size: 0.85rem;
  min-width: 3rem;
  text-align: right;
  color: var(--text-main);
}

.perf-subj-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
}

.perf-delta { font-weight: 800; }
.perf-delta.delta-up { color: #16a34a; }
.perf-delta.delta-down { color: #dc2626; }

.perf-mistake-pill {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  font-weight: 700;
}

body.hotseat-mode .perf-mistake-pill { color: #fca5a5; }

.perf-mini-practice-btn {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 7px;
  padding: 0.18rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.perf-mini-practice-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.perf-coach-insights {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.perf-insight-card {
  background: var(--bg-main);
  border: 1.5px solid var(--border-color);
  border-left-width: 4px;
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
}

.perf-insight-card.tone-weak { border-left-color: #dc2626; }
.perf-insight-card.tone-warning { border-left-color: #d97706; }
.perf-insight-card.tone-best { border-left-color: #16a34a; }
.perf-insight-card.tone-info { border-left-color: #0284c7; }

.perf-insight-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.perf-insight-badge {
  font-size: 0.68rem;
  font-weight: 900;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.perf-cta-btn {
  font-size: 0.72rem !important;
  padding: 0.24rem 0.6rem !important;
  font-weight: 800 !important;
}

.perf-insight-title {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text-main);
  margin-bottom: 0.22rem;
}

.perf-insight-detail {
  font-size: 0.79rem;
  color: var(--text-muted);
  line-height: 1.48;
}

.perf-empty-box {
  background: var(--bg-main);
  border: 1.5px dashed var(--border-color);
  border-radius: 12px;
  padding: 1.4rem 1rem;
  text-align: center;
}

.perf-recommended-notes {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.perf-notes-heading {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.6rem;
}

.perf-notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.perf-article-pill {
  text-align: left;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.perf-article-pill:hover {
  border-color: #ca8a04;
  transform: translateY(-1px);
}

.perf-art-cat {
  font-size: 0.66rem;
  font-weight: 900;
  color: #ca8a04;
}

.perf-art-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.perf-art-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

@media (max-width: 900px) {
  .perf-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .perf-split-layout { grid-template-columns: 1fr; }
  .perf-notes-grid { grid-template-columns: 1fr; }
}
