*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

:root {
  --color-brand: #0891b2;
  --color-cta: #f97316;
  --text-muted: #777;
  --border: #ddd;
  --font-main: 'Trebuchet MS', Helvetica, sans-serif;
}

* {
  font-family: var(--font-main);
}

body {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  margin: 0;
  padding: 0;
  background-color: #fff;
}

img,
video,
iframe,
svg,
canvas {
  max-width: 100%;
  height: auto;
}

p {
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  margin: 0 0 20px;
  color: #333;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.6;
  margin: 0 0 16px;
  overflow-wrap: break-word;
}

ul,
ol {
  margin: 0 0 24px;
  padding-left: 24px;
}

li {
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  margin-bottom: 10px;
  color: #333;
}

a {
  color: #0891b2;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus {
  outline: 3px solid #0891b2;
  outline-offset: 2px;
}

strong {
  font-weight: 700;
}

em {
  font-style: italic;
}

.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: #0891b2;
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  font-weight: 700;
  z-index: 9999;
}

.skip-to-content:focus {
  top: 0;
}

.article-hero {
  background-color: #0891b2;
  padding: 64px 0 48px;
}

.article-hero h1 {
  color: #fff;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.6;
  margin: 0 0 20px;
}

.article-hero p {
  color: #fff;
}

.article-hero .hero-meta {
  color: #fff;
}

.article-hero .hero-meta span,
.article-hero .hero-meta time {
  color: #fff;
}

.hero-inner {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-intro {
  font-size: 18px;
  line-height: 1.6;
  max-width: 720px;
  opacity: 0.92;
  margin: 0 0 28px;
}

.hero-meta {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 400;
}

.hero-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-layout {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 0 64px;
}

.prose-section {
  margin-bottom: 48px;
}

.prose-section p {
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  margin: 0 0 20px;
  color: #333;
}

.prose-section h2 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.6;
  color: #0891b2;
  margin: 48px 0 20px;
  padding-top: 8px;
  border-top: 3px solid #0891b2;
}

.prose-section h2:first-child {
  margin-top: 0;
}

.prose-section h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.6;
  color: #222;
  margin: 32px 0 14px;
}

.prose-section ul,
.prose-section ol {
  margin: 0 0 24px;
  padding-left: 24px;
}

.prose-section li {
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  margin-bottom: 10px;
  color: #333;
}

.step-block {
  background-color: #f4fbfd;
  border-left: 5px solid #0891b2;
  padding: 28px 32px;
  margin: 32px 0;
  border-radius: 0 8px 8px 0;
}

.step-block .step-number {
  font-size: 13px;
  font-weight: 700;
  color: #0891b2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.step-block h3 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.6;
  color: #0891b2;
  margin: 0 0 14px;
}

.step-block p,
.step-block li {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: #333;
  margin-bottom: 10px;
}

.step-block ul {
  padding-left: 20px;
  margin: 12px 0 0;
}

.step-block strong {
  color: #0891b2;
}

.step-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin: 20px 0 0;
}

.pullquote {
  border-top: 3px solid #0891b2;
  border-bottom: 3px solid #0891b2;
  padding: 28px 0;
  margin: 40px 0;
  text-align: center;
}

.pullquote p {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.6;
  color: #0891b2;
  margin: 0;
}

.warning-box {
  background-color: #fff8f4;
  border: 2px solid #f97316;
  border-radius: 8px;
  padding: 24px 28px;
  margin: 32px 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.warning-box svg {
  flex-shrink: 0;
  color: #f97316;
  margin-top: 2px;
}

.warning-box p {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  margin: 0;
}

.warning-box strong {
  color: #c05a0a;
}

.info-box {
  background-color: #eef9fc;
  border: 2px solid #0891b2;
  border-radius: 8px;
  padding: 24px 28px;
  margin: 32px 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.info-box svg {
  flex-shrink: 0;
  color: #0891b2;
  margin-top: 2px;
}

.info-box p {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  margin: 0;
}

.info-box strong {
  color: #0891b2;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 28px 0;
}

.tool-card {
  background-color: #fff;
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: border-color 0.2s;
}

.tool-card:hover {
  border-color: #0891b2;
}

.tool-card svg {
  color: #0891b2;
  display: block;
  margin: 0 auto 10px;
}

.tool-card strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #222;
  margin-bottom: 6px;
}

.tool-card span {
  font-size: 14px;
  color: #777;
  line-height: 1.6;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 20px 0 28px;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #ddd;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: #333;
  margin-bottom: 0;
}

.checklist li:last-child {
  border-bottom: none;
}

.checklist li svg {
  flex-shrink: 0;
  color: #0891b2;
  margin-top: 2px;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 28px 0;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 0;
}

.data-table th {
  background-color: #0891b2;
  color: #fff;
  font-weight: 700;
  padding: 14px 16px;
  text-align: left;
  font-size: 15px;
  line-height: 1.6;
}

.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid #ddd;
  color: #333;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:nth-child(even) td {
  background-color: #f4fbfd;
}

.data-table td:first-child {
  font-weight: 700;
  color: #0891b2;
}

.tabs-wrapper {
  margin: 40px 0;
}

.tabs-wrapper input[type="radio"] {
  display: none;
}

.tabs-nav {
  display: flex;
  gap: 4px;
  border-bottom: 3px solid #0891b2;
  flex-wrap: wrap;
}

.tabs-nav label {
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 700;
  color: #777;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  border: 2px solid transparent;
  border-bottom: none;
  transition: background-color 0.2s, color 0.2s;
  background-color: #f4f4f4;
  line-height: 1.6;
}

.tabs-nav label:hover {
  color: #0891b2;
  background-color: #eef9fc;
}

#tab1:checked ~ .tabs-nav label[for="tab1"],
#tab2:checked ~ .tabs-nav label[for="tab2"],
#tab3:checked ~ .tabs-nav label[for="tab3"] {
  color: #fff;
  background-color: #0891b2;
  border-color: #0891b2;
}

.tabs-content {
  border: 2px solid #0891b2;
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 28px;
}

.tab-panel {
  display: none;
}

#tab1:checked ~ .tabs-content .tab-panel-1,
#tab2:checked ~ .tabs-content .tab-panel-2,
#tab3:checked ~ .tabs-content .tab-panel-3 {
  display: block;
}

.tab-panel h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.6;
  color: #0891b2;
  margin: 0 0 16px;
}

.tab-panel p {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: #333;
  margin: 0 0 14px;
}

.tab-panel ul {
  padding-left: 20px;
  margin: 0 0 14px;
}

.tab-panel li {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: #333;
  margin-bottom: 8px;
}

.tab-panel strong {
  font-weight: 700;
  color: #0891b2;
}

.calculator-block {
  background-color: #0891b2;
  border-radius: 8px;
  padding: 36px;
  margin: 40px 0;
}

.calculator-block h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.6;
  color: #fff;
  margin: 0 0 8px;
  border-top: none;
  padding-top: 0;
}

.calculator-block p {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: #fff;
  margin: 0 0 28px;
  opacity: 0.9;
}

.calculator-block h3,
.calculator-block span,
.calculator-block label,
.calculator-block strong {
  color: #fff;
}

.calculator-block td,
.calculator-block th {
  color: #fff;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.calc-field label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  opacity: 0.9;
  line-height: 1.6;
}

.calc-field select,
.calc-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 6px;
  border: 2px solid rgba(255,255,255,0.3);
  background-color: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 15px;
  font-family: var(--font-main);
  box-sizing: border-box;
}

.calc-field select option {
  color: #222;
  background: #fff;
}

.calc-cta {
  display: inline-block;
  background-color: #f97316;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 32px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-family: var(--font-main);
  line-height: 1.6;
}

.calc-cta:hover {
  background-color: #ea6c0a;
}

.calc-result {
  margin-top: 24px;
  background-color: rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 20px 24px;
  display: none;
}

.calc-result.visible {
  display: block;
}

.calc-result strong {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  display: block;
  margin-bottom: 6px;
}

.calc-result p {
  margin: 0;
  font-size: 15px;
  color: #fff;
  opacity: 0.88;
}

.conversion-block {
  background-color: #fff;
  border: 2px solid #0891b2;
  border-radius: 8px;
  padding: 32px;
  margin: 40px 0;
}

.conversion-block h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.6;
  color: #0891b2;
  margin: 0 0 8px;
}

.conversion-block p {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: #555;
  margin: 0 0 24px;
}

.conv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.conv-field label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #444;
  margin-bottom: 7px;
  line-height: 1.6;
}

.conv-field input,
.conv-field select {
  width: 100%;
  padding: 11px 14px;
  border-radius: 6px;
  border: 2px solid #ddd;
  font-size: 15px;
  font-family: var(--font-main);
  color: #333;
  box-sizing: border-box;
  transition: border-color 0.2s;
  line-height: 1.6;
}

.conv-field input:focus,
.conv-field select:focus {
  outline: none;
  border-color: #0891b2;
}

.conv-btn {
  display: inline-block;
  background-color: #f97316;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 28px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-main);
  transition: background-color 0.2s;
  line-height: 1.6;
}

.conv-btn:hover {
  background-color: #ea6c0a;
}

.conv-result {
  margin-top: 18px;
  padding: 16px 20px;
  background-color: #eef9fc;
  border-radius: 6px;
  font-size: 16px;
  color: #0891b2;
  font-weight: 700;
  display: none;
  line-height: 1.6;
}

.conv-result.visible {
  display: block;
}

.faq-section {
  margin: 48px 0;
}

.faq-section h2 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.6;
  color: #0891b2;
  border-top: 3px solid #0891b2;
  padding-top: 8px;
  margin: 0 0 28px;
}

.faq-item {
  border: 2px solid #ddd;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item input[type="checkbox"] {
  display: none;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  cursor: pointer;
  background-color: #fff;
  font-size: 16px;
  font-weight: 700;
  color: #222;
  transition: background-color 0.2s;
  gap: 12px;
  line-height: 1.6;
}

.faq-question:hover {
  background-color: #eef9fc;
}

.faq-arrow {
  flex-shrink: 0;
  color: #0891b2;
  transition: transform 0.2s;
}

.faq-toggle:checked ~ .faq-question .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 22px;
}

.faq-toggle:checked ~ .faq-answer {
  max-height: 400px;
  padding: 0 22px 18px;
}

.faq-answer p {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: #444;
  margin: 14px 0 0;
}

.cta-block {
  background-color: #0891b2;
  border-radius: 8px;
  padding: 40px;
  margin: 48px 0;
  text-align: center;
}

.cta-block h2 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.6;
  color: #fff;
  margin: 0 0 12px;
  border-top: none;
  padding-top: 0;
}

.cta-block p {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: #fff;
  opacity: 0.9;
  margin: 0 auto 24px;
  max-width: 600px;
}

.btn-cta {
  display: inline-block;
  background-color: #f97316;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  padding: 16px 36px;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.2s;
  line-height: 1.6;
}

.btn-cta:hover {
  background-color: #ea6c0a;
  text-decoration: none;
}

.btn-cta:focus {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.disclaimer-article {
  background-color: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 18px 22px;
  margin: 40px 0 0;
  font-size: 13px;
  color: #777;
  line-height: 1.6;
  font-weight: 400;
}

input[type="radio"],
input[type="checkbox"].faq-toggle,
input[type="checkbox"].menu-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 768px) {
  .article-hero {
    padding: 40px 0 32px;
  }

  .article-hero h1 {
    font-size: 26px;
  }

  .hero-intro {
    font-size: 16px;
  }

  .hero-meta {
    gap: 14px;
    font-size: 13px;
  }

  .article-layout {
    width: 92%;
    padding: 32px 0 40px;
  }

  .prose-section h2 {
    font-size: 22px;
    margin-top: 36px;
  }

  .prose-section h3 {
    font-size: 18px;
  }

  .prose-section p,
  .prose-section li {
    font-size: 16px;
  }

  .step-block {
    padding: 20px 18px;
  }

  .step-block h3 {
    font-size: 19px;
  }

  .tool-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .calculator-block {
    padding: 24px 20px;
  }

  .calc-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .conversion-block {
    padding: 22px 18px;
  }

  .conv-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .tabs-nav label {
    padding: 10px 14px;
    font-size: 14px;
  }

  .tabs-content {
    padding: 20px 16px;
  }

  .cta-block {
    padding: 28px 20px;
  }

  .cta-block h2 {
    font-size: 22px;
  }

  .data-table {
    font-size: 13px;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
  }

  .pullquote p {
    font-size: 18px;
  }

  .warning-box,
  .info-box {
    padding: 18px 16px;
  }

  .faq-question {
    font-size: 15px;
    padding: 15px 16px;
  }
}

@media (max-width: 480px) {
  .article-hero h1 {
    font-size: 22px;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .tabs-nav {
    flex-direction: column;
    border-bottom: none;
    gap: 4px;
  }

  .tabs-nav label {
    border-radius: 6px;
    border: 2px solid #ddd;
    margin-bottom: 0;
  }

  #tab1:checked ~ .tabs-nav label[for="tab1"],
  #tab2:checked ~ .tabs-nav label[for="tab2"],
  #tab3:checked ~ .tabs-nav label[for="tab3"] {
    border-color: #0891b2;
  }

  .tabs-content {
    border-top: 2px solid #0891b2;
    border-radius: 8px;
    margin-top: 4px;
  }

  .warning-box,
  .info-box {
    flex-direction: column;
    gap: 10px;
  }

  .pullquote p {
    font-size: 17px;
  }

  .calc-cta,
  .conv-btn,
  .btn-cta {
    width: 100%;
    text-align: center;
    display: block;
  }

  .prose-section h2 {
    font-size: 20px;
  }

  .step-block h3 {
    font-size: 17px;
  }
}

/* ===== TYPOGRAPHY SPACING FIX (APS_ARTICLE_TYPO_REQUIRED_v2) ===== */
/* Defensive guard against universal * { margin: 0 } reset in global.css. */
/* body-scoped via :where() so specificity stays at 0,0,0,1 — beats * but
   loses to any component rule like .tip-box p / .faq-item p. */
body :where(p)              { margin-bottom: 1.1rem; }
body :where(h2)             { margin-top: 2.5rem; margin-bottom: 1rem; }
body :where(h3)             { margin-top: 1.75rem; margin-bottom: 0.75rem; }
body :where(h4)             { margin-top: 1.25rem; margin-bottom: 0.5rem; }
body :where(ul, ol)         { margin-bottom: 1.1rem; padding-left: 1.5rem; }
body :where(li)             { margin-bottom: 0.4rem; }
body :where(blockquote)     { margin: 1.5rem 0; }
