@scope (#original-content) {

/* ===== CORE RESET & SCOPE ===== */
#pac-page *, #pac-page *::before, #pac-page *::after { box-sizing: border-box; margin: 0; padding: 0; }
#pac-page {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #ffffff;
  color: #111827;
  line-height: 1.8;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px 60px;
}

/* ===== HERO HEADER ===== */
#pac-page .pac-header {
  text-align: center;
  padding: 52px 20px 40px;
  border-bottom: 4px solid #6366f1;
  margin-bottom: 40px;
}
#pac-page .pac-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  color: #1e1b4b;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 18px;
}
#pac-page .pac-header p.pac-subtitle {
  font-size: 1.15rem;
  color: #374151;
  font-weight: 700;
  max-width: 800px;
  margin: 0 auto 28px;
  line-height: 1.7;
}
#pac-page .pac-badge-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
#pac-page .pac-badge {
  background: #ede9fe;
  border: 1.5px solid #6366f1;
  color: #4338ca;
  font-size: 0.85rem;
  font-weight: 900;
  padding: 6px 18px;
  border-radius: 24px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== TABLE OF CONTENTS ===== */
#pac-page .pac-toc {
  background: #f5f3ff;
  border-left: 6px solid #6366f1;
  border-radius: 0 12px 12px 0;
  padding: 26px 30px;
  margin-bottom: 44px;
}
#pac-page .pac-toc h2 { font-size: 1.1rem; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; color: #1e1b4b; margin-bottom: 16px; }
#pac-page .pac-toc ol { padding-left: 22px; font-weight: 700; }
#pac-page .pac-toc li { margin-bottom: 9px; font-size: 1.05rem; }
#pac-page .pac-toc a { color: #4f46e5; text-decoration: none; transition: color 0.2s; }
#pac-page .pac-toc a:hover { text-decoration: underline; color: #3730a3; }

/* ===== SECTION FORMATTING ===== */
#pac-page .pac-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 38px;
  margin-bottom: 38px;
  box-shadow: 0 4px 14px rgba(99,102,241,0.05);
}
#pac-page .pac-section h2 {
  font-size: 1.85rem;
  font-weight: 900;
  color: #1e1b4b;
  border-bottom: 3px solid #a5b4fc;
  padding-bottom: 14px;
  margin-bottom: 26px;
}
#pac-page .pac-section h3 { font-size: 1.4rem; font-weight: 800; color: #4338ca; margin: 32px 0 16px; }
#pac-page .pac-section h4 { font-size: 1.2rem; font-weight: 800; color: #1f2937; margin: 24px 0 12px; }
#pac-page .pac-section p { font-size: 1.12rem; font-weight: 600; color: #1f2937; margin-bottom: 20px; line-height: 1.85; }
#pac-page .pac-section ul, #pac-page .pac-section ol { padding-left: 28px; margin-bottom: 20px; font-weight: 600; font-size: 1.1rem; color: #1f2937; }
#pac-page .pac-section li { margin-bottom: 13px; line-height: 1.75; }
#pac-page .pac-section strong { color: #111827; font-weight: 900; }

#pac-page .pac-info-box {
  background: #ede9fe;
  border-left: 5px solid #6366f1;
  border-radius: 0 10px 10px 0;
  padding: 20px 26px;
  margin: 26px 0;
  font-weight: 700;
  color: #1e1b4b;
  font-size: 1.08rem;
  line-height: 1.75;
}
#pac-page .pac-warn-box {
  background: #fff7ed;
  border-left: 5px solid #f97316;
  border-radius: 0 10px 10px 0;
  padding: 20px 26px;
  margin: 26px 0;
  font-weight: 700;
  color: #7c2d12;
  font-size: 1.08rem;
  line-height: 1.75;
}
#pac-page .pac-success-box {
  background: #f0fdf4;
  border-left: 5px solid #22c55e;
  border-radius: 0 10px 10px 0;
  padding: 20px 26px;
  margin: 26px 0;
  font-weight: 700;
  color: #14532d;
  font-size: 1.08rem;
  line-height: 1.75;
}

/* ===== MATH BLOCKS (MathJax rendered) ===== */
#pac-page .pac-math-block {
  background: #f8faff;
  border: 1.5px solid #c7d2fe;
  border-radius: 14px;
  padding: 28px 24px;
  margin: 28px 0;
  text-align: center;
  overflow-x: auto;
}
#pac-page .pac-math-block .pac-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 900;
  color: #6366f1;
  text-align: left;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}
#pac-page .pac-math-block .pac-formula-desc {
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
  margin-top: 16px;
  text-align: left;
  line-height: 1.7;
}

/* MathJax override so WP doesn't break it */
#pac-page .MathJax { font-size: 1.35em !important; }
#pac-page mjx-container { overflow-x: auto; max-width: 100%; }

/* ===== TABLES ===== */
#pac-page .pac-table-wrap { overflow-x: auto; margin: 28px 0; border: 1px solid #e5e7eb; border-radius: 12px; }
#pac-page .pac-table { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
#pac-page .pac-table th { background: #ede9fe; color: #1e1b4b; padding: 16px 20px; text-align: left; font-weight: 900; border-bottom: 2px solid #6366f1; }
#pac-page .pac-table td { padding: 14px 20px; border-bottom: 1px solid #e5e7eb; font-weight: 600; color: #1f2937; vertical-align: top; }
#pac-page .pac-table tr:nth-child(even) td { background: #f9f8ff; }

/* ===== STEP CARDS ===== */
#pac-page .pac-steps { counter-reset: step-counter; padding-left: 0; list-style: none; }
#pac-page .pac-steps li {
  counter-increment: step-counter;
  position: relative;
  padding: 22px 24px 22px 80px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 18px;
  background: #fafafa;
  font-weight: 600;
  font-size: 1.08rem;
  line-height: 1.75;
}
#pac-page .pac-steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: #6366f1;
  color: #fff;
  font-weight: 900;
  font-size: 1.2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== CALCULATOR WIDGET ===== */
#pac-page .pac-widget-container {
  background: #f5f3ff;
  border: 1.5px solid #c7d2fe;
  border-radius: 16px;
  padding: 38px 32px;
  margin-bottom: 28px;
}
#pac-page .pac-tabs { display: flex; gap: 0; border-bottom: 2px solid #c7d2fe; margin-bottom: 30px; }
#pac-page .pac-tab {
  padding: 12px 24px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #6b7280;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  border-radius: 8px 8px 0 0;
}
#pac-page .pac-tab.active { color: #4338ca; border-bottom-color: #6366f1; background: #ede9fe; }
#pac-page .pac-tab-panel { display: none; }
#pac-page .pac-tab-panel.active { display: block; }

#pac-page .pac-input-row { display: flex; flex-wrap: wrap; gap: 24px; }
#pac-page .pac-input-group { flex: 1; min-width: 220px; margin-bottom: 8px; }
#pac-page .pac-input-label { display: block; font-weight: 900; font-size: 1.05rem; color: #1e1b4b; margin-bottom: 10px; }
#pac-page .pac-input-sub { font-size: 0.88rem; font-weight: 700; color: #6b7280; display: block; margin-top: 4px; }
#pac-page .pac-input-field {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #c7d2fe;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  background: #fff;
  transition: all 0.2s;
}
#pac-page .pac-input-field:focus { border-color: #6366f1; outline: none; box-shadow: 0 0 0 3px rgba(99,102,241,0.18); }

#pac-page .pac-btn-group { display: flex; gap: 18px; margin-top: 28px; justify-content: center; flex-wrap: wrap; }
#pac-page .pac-btn {
  padding: 16px 36px;
  font-size: 1.1rem;
  font-weight: 900;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.12s, background 0.2s;
  min-width: 180px;
}
#pac-page .pac-btn-primary { background: #6366f1; color: #fff; box-shadow: 0 4px 14px rgba(99,102,241,0.3); }
#pac-page .pac-btn-primary:hover { background: #4338ca; transform: translateY(-2px); }
#pac-page .pac-btn-secondary { background: #e5e7eb; color: #374151; }
#pac-page .pac-btn-secondary:hover { background: #d1d5db; }

#pac-page .pac-res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 32px; display: none; }
#pac-page .pac-res-card { padding: 28px 20px; border-radius: 12px; border-top: 5px solid; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.06); text-align: center; }
#pac-page .pac-res-area { border-color: #6366f1; }
#pac-page .pac-res-per  { border-color: #06b6d4; }
#pac-page .pac-res-diag { border-color: #f59e0b; }
#pac-page .pac-res-card .pac-res-title { font-size: 1.05rem; font-weight: 900; color: #374151; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.4px; }
#pac-page .pac-res-card .pac-res-val  { font-size: 2.5rem; font-weight: 900; line-height: 1.15; }
#pac-page .pac-res-card .pac-res-unit { font-size: 0.95rem; font-weight: 800; color: #6b7280; margin-top: 4px; }
#pac-page .c-area { color: #6366f1; }
#pac-page .c-per  { color: #0891b2; }
#pac-page .c-diag { color: #d97706; }

#pac-page .pac-error { background: #fef2f2; border: 1.5px solid #fca5a5; border-radius: 10px; padding: 16px 20px; font-weight: 800; color: #b91c1c; font-size: 1rem; margin-top: 20px; display: none; }

/* ===== FAQ ACCORDION ===== */
#pac-page .pac-faq-item { border: 1.5px solid #e5e7eb; border-radius: 12px; margin-bottom: 16px; overflow: hidden; transition: border-color 0.2s; }
#pac-page .pac-faq-item.open { border-color: #6366f1; }
#pac-page .pac-faq-q {
  background: #f9f8ff;
  padding: 20px 26px;
  font-weight: 900;
  font-size: 1.1rem;
  color: #1e1b4b;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: background 0.2s;
}
#pac-page .pac-faq-q:hover { background: #ede9fe; }
#pac-page .pac-faq-icon { font-size: 1.5rem; font-weight: 900; color: #6366f1; flex-shrink: 0; margin-left: 16px; transition: transform 0.25s; }
#pac-page .pac-faq-item.open .pac-faq-icon { transform: rotate(45deg); }
#pac-page .pac-faq-a { display: none; padding: 24px 26px; font-size: 1.08rem; font-weight: 600; color: #374151; border-top: 1px solid #e5e7eb; background: #fff; line-height: 1.8; }
#pac-page .pac-faq-item.open .pac-faq-a { display: block; }

/* ===== WORKED EXAMPLE ===== */
#pac-page .pac-example-card {
  background: #fafafa;
  border: 1.5px solid #d1d5db;
  border-radius: 14px;
  padding: 28px 30px;
  margin-bottom: 24px;
}
#pac-page .pac-example-card h4 {
  font-size: 1.15rem;
  font-weight: 900;
  color: #4338ca;
  margin-bottom: 16px;
}
#pac-page .pac-example-steps { padding-left: 0; list-style: none; margin: 0; }
#pac-page .pac-example-steps li {
  padding: 10px 0 10px 24px;
  border-left: 3px solid #c7d2fe;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  color: #1f2937;
  line-height: 1.7;
}
#pac-page .pac-example-answer {
  background: #ede9fe;
  border-radius: 10px;
  padding: 16px 20px;
  font-weight: 900;
  font-size: 1.1rem;
  color: #1e1b4b;
  margin-top: 14px;
  text-align: center;
}

/* ===== SHAPE VISUAL ===== */
#pac-page .pac-shape-visual {
  text-align: center;
  margin: 28px 0;
  padding: 24px;
  background: #f8faff;
  border: 1px solid #c7d2fe;
  border-radius: 14px;
}
#pac-page .pac-shape-visual svg { max-width: 100%; height: auto; }

/* ===== FOOTER ===== */
#pac-page .pac-footer {
  text-align: center;
  padding: 36px 20px;
  border-top: 1.5px solid #e5e7eb;
  margin-top: 48px;
  font-size: 1.05rem;
  color: #6b7280;
  font-weight: 700;
}
#pac-page .pac-footer a { color: #6366f1; text-decoration: none; font-weight: 900; }
#pac-page .pac-footer a:hover { text-decoration: underline; }

/* ===== RESPONSIVE ===== */
@media (max-width: 680px) {
  #pac-page .pac-section { padding: 26px 18px; }
  #pac-page .pac-widget-container { padding: 26px 18px; }
  #pac-page .pac-input-row { flex-direction: column; gap: 16px; }
  #pac-page .pac-btn-group { flex-direction: column; align-items: stretch; }
  #pac-page .pac-btn { min-width: 100%; }
  #pac-page .pac-res-val { font-size: 2rem; }
  #pac-page .pac-steps li { padding-left: 70px; }
  #pac-page .pac-tabs { flex-wrap: wrap; }
}

}
