body {
  direction: ltr;
}

html[dir="rtl"] body {
  direction: rtl;
}

.kh-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 132px 24px 72px;
}

.kh-eyebrow {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.kh-title {
  color: var(--text);
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.08;
  margin: 0;
  max-width: 820px;
}

.kh-lede {
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.8;
  max-width: 760px;
  margin: 22px 0 0;
}

.kh-meta {
  color: var(--text-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 0.86rem;
  margin-top: 24px;
}

.kh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 48px;
}

.kh-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
}

.kh-card h2,
.kh-card h3 {
  color: var(--text);
  font-size: 1.12rem;
  line-height: 1.35;
  margin: 0 0 10px;
}

.kh-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.7;
  margin: 0 0 16px;
}

.kh-card a,
.kh-inline-link {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.kh-card a:hover,
.kh-inline-link:hover {
  text-decoration: underline;
}

.kh-topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.kh-topic {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 5px 10px;
}

.kh-section {
  border-top: 1px solid var(--border);
  max-width: 1120px;
  margin: 0 auto;
  padding: 58px 24px;
}

.kh-section h2 {
  color: var(--text);
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1.2;
  margin: 0 0 18px;
}

.kh-section h3 {
  color: var(--text);
  font-size: 1.08rem;
  margin: 28px 0 10px;
}

.kh-section p,
.kh-section li {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.78;
}

.kh-section p {
  max-width: 820px;
  margin: 0 0 18px;
}

.kh-answer {
  background: rgba(212,175,55,0.045);
  border: 1px solid rgba(212,175,55,0.16);
  border-inline-start: 3px solid var(--blue);
  border-radius: 8px;
  padding: 22px 24px;
  margin-top: 28px;
  max-width: 900px;
}

.kh-answer p {
  color: var(--text);
  margin: 0;
}

.kh-definition {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 24px;
  max-width: 900px;
  padding: 22px 24px;
}

.kh-definition strong {
  color: var(--text);
}

.kh-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.kh-table {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 24px;
  overflow: hidden;
}

.kh-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr 1.1fr;
}

.kh-row > div {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  padding: 14px 16px;
}

.kh-row:first-child > div {
  border-top: 0;
  color: var(--text);
  font-weight: 800;
}

.kh-row > div + div {
  border-inline-start: 1px solid var(--border);
}

.kh-steps {
  counter-reset: khstep;
  display: grid;
  gap: 14px;
  margin: 24px 0 0;
  padding: 0;
}

.kh-steps li {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  list-style: none;
  padding: 18px 20px;
  padding-inline-start: 54px;
  position: relative;
}

.kh-steps li::before {
  counter-increment: khstep;
  content: counter(khstep);
  color: #080808;
  background: var(--blue);
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 900;
  height: 26px;
  inset-inline-start: 18px;
  line-height: 26px;
  position: absolute;
  text-align: center;
  top: 19px;
  width: 26px;
}

.kh-insight {
  border-inline-start: 3px solid var(--blue);
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-top: 28px;
  max-width: 860px;
  padding-inline-start: 20px;
}

.kh-faq {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.kh-faq details {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
}

.kh-faq summary {
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.kh-faq p {
  margin: 12px 0 0;
}

.kh-cta {
  background: var(--bg2);
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: 8px;
  max-width: 1120px;
  margin: 0 auto 70px;
  padding: 34px 24px;
  text-align: center;
}

.kh-cta h2 {
  color: var(--text);
  margin: 0 0 10px;
}

.kh-cta p {
  color: var(--text-muted);
  margin: 0 auto 22px;
  max-width: 680px;
}

.kh-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  display: block;
  font-size: 0.86rem;
  padding: 28px 24px;
  text-align: center;
}

.kh-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.kh-footer a:hover {
  color: var(--blue);
}

@media (max-width: 760px) {
  .kh-shell {
    padding-top: 116px;
  }

  .kh-two,
  .kh-row {
    grid-template-columns: 1fr;
  }

  .kh-row > div + div {
    border-inline-start: 0;
  }
}

/* ── RTL overrides ─────────────────────────────────────────────────── */
/*
 * Physical border/padding/position properties in the base rules above have
 * been replaced with logical equivalents (border-inline-start, padding-inline-start,
 * inset-inline-start).  Those flip automatically when html[dir="rtl"] is set.
 * The rules below add explicit text-align and direction for all remaining sections.
 */

/* Breadcrumb */
html[dir="rtl"] .sp-breadcrumb,
html[dir="rtl"] .sp-breadcrumb-list {
  direction: rtl;
}

/* Article header */
html[dir="rtl"] .kh-eyebrow,
html[dir="rtl"] .kh-title,
html[dir="rtl"] .kh-lede {
  text-align: start;
}

/* Answer / Definition */
html[dir="rtl"] .kh-answer p,
html[dir="rtl"] .kh-definition p {
  text-align: start;
}

/* Topic tags — flex auto-reverses; no override needed */

/* Sections — headings and body text */
html[dir="rtl"] .kh-section h2,
html[dir="rtl"] .kh-section h3,
html[dir="rtl"] .kh-section p,
html[dir="rtl"] .kh-section li {
  text-align: start;
}

/* Cards */
html[dir="rtl"] .kh-card h3,
html[dir="rtl"] .kh-card p {
  text-align: start;
}

/* Table — border-inline-start in base rule handles column dividers automatically */

/* Ordered list / Insight — inset-inline-start + padding-inline-start handle it */

/* FAQ */
html[dir="rtl"] .kh-faq summary {
  text-align: start;
  direction: rtl;
}
html[dir="rtl"] .kh-faq p {
  text-align: start;
}

/* CTA */
html[dir="rtl"] .kh-cta h2,
html[dir="rtl"] .kh-cta p {
  direction: rtl;
}

/* Footer */
html[dir="rtl"] .kh-footer {
  direction: rtl;
}
