@scope (#original-content) {

/* ===== CORE RESET & SCOPE ===== */
#cdc-page *, #cdc-page *::before, #cdc-page *::after { box-sizing: border-box; margin: 0; padding: 0; }
#cdc-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 ===== */
#cdc-page .cdc-header {
  text-align: center;
  padding: 52px 20px 40px;
  border-bottom: 4px solid #8b5cf6;
  margin-bottom: 40px;
}
#cdc-page .cdc-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  color: #4c1d95;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 18px;
}
#cdc-page .cdc-header p.cdc-subtitle {
  font-size: 1.15rem;
  color: #374151;
  font-weight: 700;
  max-width: 800px;
  margin: 0 auto 28px;
  line-height: 1.7;
}
#cdc-page .cdc-badge-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
#cdc-page .cdc-badge {
  background: #ede9fe;
  border: 1.5px solid #8b5cf6;
  color: #5b21b6;
  font-size: 0.85rem;
  font-weight: 900;
  padding: 6px 18px;
  border-radius: 24px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

/* ===== SECTIONS ===== */
#cdc-page .cdc-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 38px;
  margin-bottom: 38px;
  box-shadow: 0 4px 14px rgba(139,92,246,0.05);
}
#cdc-page .cdc-section h2 {
  font-size: 1.85rem;
  font-weight: 900;
  color: #4c1d95;
  border-bottom: 3px solid #c4b5fd;
  padding-bottom: 14px;
  margin-bottom: 26px;
}
#cdc-page .cdc-section h3 { font-size: 1.4rem; font-weight: 800; color: #6d28d9; margin: 32px 0 16px; }
#cdc-page .cdc-section h4 { font-size: 1.2rem; font-weight: 800; color: #1f2937; margin: 24px 0 12px; }
#cdc-page .cdc-section p { font-size: 1.12rem; font-weight: 600; color: #1f2937; margin-bottom: 20px; line-height: 1.85; }
#cdc-page .cdc-section ul, #cdc-page .cdc-section ol { padding-left: 28px; margin-bottom: 20px; font-weight: 600; font-size: 1.1rem; color: #1f2937; }
#cdc-page .cdc-section li { margin-bottom: 13px; line-height: 1.75; }
#cdc-page .cdc-section strong { color: #111827; font-weight: 900; }

#cdc-page .cdc-info-box    { background: #ede9fe; border-left: 5px solid #8b5cf6; border-radius: 0 10px 10px 0; padding: 20px 26px; margin: 26px 0; font-weight: 700; color: #4c1d95; font-size: 1.08rem; line-height: 1.75; }
#cdc-page .cdc-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; }
#cdc-page .cdc-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; }
#cdc-page .cdc-blue-box    { background: #eff6ff; border-left: 5px solid #3b82f6; border-radius: 0 10px 10px 0; padding: 20px 26px; margin: 26px 0; font-weight: 700; color: #1e3a8a; font-size: 1.08rem; line-height: 1.75; }

/* ===== MATH BLOCKS ===== */
#cdc-page .cdc-math-block {
  background: #f5f3ff;
  border: 1.5px solid #c4b5fd;
  border-radius: 14px;
  padding: 28px 24px;
  margin: 28px 0;
  text-align: center;
  overflow-x: auto;
}
#cdc-page .cdc-math-block .cdc-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 900;
  color: #8b5cf6;
  text-align: left;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}
#cdc-page .cdc-math-block .cdc-formula-desc {
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
  margin-top: 16px;
  text-align: left;
  line-height: 1.7;
}
#cdc-page .MathJax { font-size: 1.35em !important; }
#cdc-page mjx-container { overflow-x: auto; max-width: 100%; }

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

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

/* ===== CALCULATOR WIDGET ===== */
#cdc-page .cdc-widget-container {
  background: #f5f3ff;
  border: 1.5px solid #c4b5fd;
  border-radius: 16px;
  padding: 36px 30px;
  margin-bottom: 28px;
}
#cdc-page .cdc-tabs { display: flex; gap: 0; border-bottom: 2px solid #c4b5fd; margin-bottom: 28px; flex-wrap: wrap; }
#cdc-page .cdc-tab {
  padding: 11px 20px; font-weight: 800; font-size: 0.92rem;
  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;
}
#cdc-page .cdc-tab.active { color: #6d28d9; border-bottom-color: #8b5cf6; background: #ede9fe; }
#cdc-page .cdc-tab-panel { display: none; }
#cdc-page .cdc-tab-panel.active { display: block; }

#cdc-page .cdc-input-group { margin-bottom: 8px; }
#cdc-page .cdc-input-label { display: block; font-weight: 900; font-size: 1.05rem; color: #4c1d95; margin-bottom: 10px; }
#cdc-page .cdc-input-sub { font-size: 0.88rem; font-weight: 700; color: #6b7280; display: block; margin-top: 4px; }
#cdc-page .cdc-input-field {
  width: 100%; max-width: 440px;
  padding: 14px 16px;
  border: 2px solid #c4b5fd; border-radius: 10px;
  font-size: 1.15rem; font-weight: 800; color: #0f172a;
  background: #fff; transition: all 0.2s; display: block;
}
#cdc-page .cdc-input-field:focus { border-color: #8b5cf6; outline: none; box-shadow: 0 0 0 3px rgba(139,92,246,0.18); }

#cdc-page .cdc-btn-group { display: flex; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
#cdc-page .cdc-btn { padding: 15px 34px; font-size: 1.1rem; font-weight: 900; border: none; border-radius: 10px; cursor: pointer; transition: transform 0.12s, background 0.2s; min-width: 160px; }
#cdc-page .cdc-btn-primary { background: #8b5cf6; color: #fff; box-shadow: 0 4px 14px rgba(139,92,246,0.3); }
#cdc-page .cdc-btn-primary:hover { background: #7c3aed; transform: translateY(-2px); }
#cdc-page .cdc-btn-secondary { background: #e5e7eb; color: #374151; }
#cdc-page .cdc-btn-secondary:hover { background: #d1d5db; }

/* Results */
#cdc-page .cdc-res-grid { display: none; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 18px; margin-top: 30px; }
#cdc-page .cdc-res-card { padding: 26px 16px; border-radius: 12px; border-top: 5px solid; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.06); text-align: center; }
#cdc-page .cdc-res-diam { border-color: #8b5cf6; }
#cdc-page .cdc-res-rad  { border-color: #ec4899; }
#cdc-page .cdc-res-circ { border-color: #10b981; }
#cdc-page .cdc-res-area { border-color: #f59e0b; }
#cdc-page .cdc-res-card .cdc-res-title { font-size: 0.95rem; font-weight: 900; color: #374151; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.4px; }
#cdc-page .cdc-res-card .cdc-res-val   { font-size: 2.3rem; font-weight: 900; line-height: 1.15; }
#cdc-page .cdc-res-card .cdc-res-unit  { font-size: 0.88rem; font-weight: 800; color: #6b7280; margin-top: 4px; }
#cdc-page .c-diam { color: #7c3aed; }
#cdc-page .c-rad  { color: #db2777; }
#cdc-page .c-circ { color: #059669; }
#cdc-page .c-area { color: #d97706; }

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

/* ===== SVG DIAGRAM ===== */
#cdc-page .cdc-shape-visual { text-align: center; margin: 28px 0; padding: 24px; background: #f5f3ff; border: 1px solid #c4b5fd; border-radius: 14px; }
#cdc-page .cdc-shape-visual svg { max-width: 100%; height: auto; }

/* ===== EXAMPLE CARDS ===== */
#cdc-page .cdc-example-card { background: #fafafa; border: 1.5px solid #d1d5db; border-radius: 14px; padding: 28px 30px; margin-bottom: 24px; }
#cdc-page .cdc-example-card h4 { font-size: 1.15rem; font-weight: 900; color: #6d28d9; margin-bottom: 16px; }
#cdc-page .cdc-example-steps { padding-left: 0; list-style: none; margin: 0; }
#cdc-page .cdc-example-steps li { padding: 10px 0 10px 22px; border-left: 3px solid #c4b5fd; margin-bottom: 12px; font-weight: 700; font-size: 1.05rem; color: #1f2937; line-height: 1.7; }
#cdc-page .cdc-example-answer { background: #ede9fe; border-radius: 10px; padding: 14px 18px; font-weight: 900; font-size: 1.1rem; color: #4c1d95; margin-top: 14px; text-align: center; }

/* ===== THALES CARD ===== */
#cdc-page .cdc-thales-card {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border: 1.5px solid #8b5cf6;
  border-radius: 14px;
  padding: 28px 30px;
  margin: 28px 0;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}
#cdc-page .cdc-thales-icon { font-size: 3rem; flex-shrink: 0; }
#cdc-page .cdc-thales-text h4 { font-size: 1.15rem; font-weight: 900; color: #4c1d95; margin-bottom: 12px; }
#cdc-page .cdc-thales-text p  { font-size: 1rem; font-weight: 700; color: #374151; margin: 0; line-height: 1.7; }

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

/* ===== FOOTER ===== */
#cdc-page .cdc-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; }
#cdc-page .cdc-footer a { color: #8b5cf6; text-decoration: none; font-weight: 900; }
#cdc-page .cdc-footer a:hover { text-decoration: underline; }

/* ===== RESPONSIVE ===== */
@media (max-width: 680px) {
  #cdc-page .cdc-section { padding: 24px 16px; }
  #cdc-page .cdc-widget-container { padding: 24px 16px; }
  #cdc-page .cdc-btn-group { flex-direction: column; }
  #cdc-page .cdc-btn { min-width: 100%; }
  #cdc-page .cdc-input-field { max-width: 100%; }
  #cdc-page .cdc-res-val { font-size: 1.9rem; }
  #cdc-page .cdc-steps li { padding-left: 66px; }
  #cdc-page .cdc-thales-card { flex-direction: column; gap: 12px; }
}

}
