/**
 * RC105F clean single-post shell.
 * Scope: regular WordPress posts only via single-post.php/body.tt-rc105f-single-post.
 */
body.tt-rc105f-single-post {
  margin: 0;
  background: #f8fafc;
  color: #172033;
  font-family: Cairo, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] body.tt-rc105f-single-post,
html[data-tt-theme="dark"] body.tt-rc105f-single-post,
html.tt-dark-mode body.tt-rc105f-single-post,
body.dark.tt-rc105f-single-post,
body.dark-mode.tt-rc105f-single-post {
  background: #06111f;
  color: #f8fafc;
}

.tt-single-post-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, .16), transparent 34%),
    radial-gradient(circle at bottom left, rgba(249, 115, 22, .10), transparent 30%),
    linear-gradient(180deg, #f8fafc, #eef4fb);
}

html[data-theme="dark"] .tt-single-post-shell,
html[data-tt-theme="dark"] .tt-single-post-shell,
html.tt-dark-mode .tt-single-post-shell,
body.dark .tt-single-post-shell,
body.dark-mode .tt-single-post-shell {
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, .14), transparent 35%),
    radial-gradient(circle at bottom left, rgba(249, 115, 22, .12), transparent 32%),
    linear-gradient(180deg, #06111f, #0b1324 45%, #060b14);
}

.tt-single-post-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 56px);
  background: rgba(255, 255, 255, .82);
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  backdrop-filter: blur(16px);
}

html[data-theme="dark"] .tt-single-post-topbar,
html[data-tt-theme="dark"] .tt-single-post-topbar,
html.tt-dark-mode .tt-single-post-topbar,
body.dark .tt-single-post-topbar,
body.dark-mode .tt-single-post-topbar {
  background: rgba(5, 12, 24, .82);
  border-bottom-color: rgba(148, 163, 184, .18);
}

.tt-single-post-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: .01em;
}

.tt-single-post-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 12px;
}

.tt-single-post-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.tt-single-post-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, .10);
  background: rgba(255, 255, 255, .70);
  color: #0f172a;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

html[data-theme="dark"] .tt-single-post-actions a,
html[data-tt-theme="dark"] .tt-single-post-actions a,
html.tt-dark-mode .tt-single-post-actions a,
body.dark .tt-single-post-actions a,
body.dark-mode .tt-single-post-actions a {
  border-color: rgba(148, 163, 184, .28);
  background: rgba(15, 23, 42, .78);
  color: #f8fafc;
}

.tt-single-post-wrap {
  width: min(1080px, calc(100% - 28px));
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) 0;
}

.tt-single-post-card {
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: clamp(22px, 3vw, 34px);
  background: rgba(255, 255, 255, .90);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .12);
}

html[data-theme="dark"] .tt-single-post-card,
html[data-tt-theme="dark"] .tt-single-post-card,
html.tt-dark-mode .tt-single-post-card,
body.dark .tt-single-post-card,
body.dark-mode .tt-single-post-card {
  border-color: rgba(148, 163, 184, .20);
  background: rgba(15, 23, 42, .82);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .36);
}

.tt-single-post-hero {
  padding: clamp(26px, 5vw, 58px) clamp(20px, 5vw, 72px) clamp(18px, 4vw, 34px);
  text-align: center;
}

.tt-single-post-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(249, 115, 22, .12);
  color: #c2410c;
  font-size: 13px;
  font-weight: 900;
}

html[data-theme="dark"] .tt-single-post-kicker,
html[data-tt-theme="dark"] .tt-single-post-kicker,
html.tt-dark-mode .tt-single-post-kicker,
body.dark .tt-single-post-kicker,
body.dark-mode .tt-single-post-kicker {
  background: rgba(249, 115, 22, .16);
  color: #fed7aa;
}

.tt-single-post-title {
  margin: 18px auto 0;
  max-width: 900px;
  color: #111827;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -.04em;
}

html[data-theme="dark"] .tt-single-post-title,
html[data-tt-theme="dark"] .tt-single-post-title,
html.tt-dark-mode .tt-single-post-title,
body.dark .tt-single-post-title,
body.dark-mode .tt-single-post-title {
  color: #f8fafc;
}

.tt-single-post-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 18px;
  color: #64748b;
  font-weight: 700;
}

html[data-theme="dark"] .tt-single-post-meta,
html[data-tt-theme="dark"] .tt-single-post-meta,
html.tt-dark-mode .tt-single-post-meta,
body.dark .tt-single-post-meta,
body.dark-mode .tt-single-post-meta {
  color: #cbd5e1;
}

.tt-single-post-featured img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: cover;
}

.tt-single-post-content {
  padding: clamp(24px, 5vw, 68px);
  color: #1f2937;
  font-size: clamp(18px, 1.65vw, 21px);
  line-height: 1.9;
}

html[data-theme="dark"] .tt-single-post-content,
html[data-tt-theme="dark"] .tt-single-post-content,
html.tt-dark-mode .tt-single-post-content,
body.dark .tt-single-post-content,
body.dark-mode .tt-single-post-content {
  color: #e2e8f0;
}

.tt-single-post-content :where(h2,h3,h4) {
  margin: 1.8em 0 .65em;
  color: #0f172a;
  line-height: 1.25;
}

html[data-theme="dark"] .tt-single-post-content :where(h2,h3,h4),
html[data-tt-theme="dark"] .tt-single-post-content :where(h2,h3,h4),
html.tt-dark-mode .tt-single-post-content :where(h2,h3,h4),
body.dark .tt-single-post-content :where(h2,h3,h4),
body.dark-mode .tt-single-post-content :where(h2,h3,h4) {
  color: #ffffff;
}

.tt-single-post-content a {
  color: #ea580c;
  font-weight: 800;
  text-underline-offset: 4px;
}

html[data-theme="dark"] .tt-single-post-content a,
html[data-tt-theme="dark"] .tt-single-post-content a,
html.tt-dark-mode .tt-single-post-content a,
body.dark .tt-single-post-content a,
body.dark-mode .tt-single-post-content a {
  color: #fbbf24;
}

.tt-single-post-content img,
.tt-single-post-content iframe {
  max-width: 100%;
}

.tt-single-post-footer {
  display: flex;
  justify-content: center;
  padding: 0 clamp(20px, 5vw, 72px) clamp(28px, 5vw, 58px);
}

.tt-single-post-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444, #f97316 72%, #fbbf24);
  color: #fff !important;
  text-decoration: none;
  font-weight: 900;
  box-shadow: 0 18px 38px rgba(249, 115, 22, .24);
}

body.tt-rc105f-single-post #masthead,
body.tt-rc105f-single-post .site-header,
body.tt-rc105f-single-post #site-navigation,
body.tt-rc105f-single-post .main-navigation,
body.tt-rc105f-single-post .wp-block-navigation,
body.tt-rc105f-single-post .wp-block-page-list,
body.tt-rc105f-single-post header.wp-block-template-part {
  display: none !important;
}

@media (max-width: 720px) {
  .tt-single-post-topbar {
    position: relative;
    align-items: flex-start;
    flex-direction: column;
  }
  .tt-single-post-actions {
    justify-content: flex-start;
  }
  .tt-single-post-title {
    font-size: clamp(30px, 10vw, 44px);
  }
}


/* RC105G: AI-generated article tables must stay readable in dark mode. */
.tt-single-post-content .wp-block-table,
.tt-single-post-content figure.wp-block-table {
  width: 100%;
  max-width: 100%;
  margin: 1.65em 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tt-single-post-content table {
  width: 100%;
  min-width: 680px;
  margin: 1.65em 0;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
}

.tt-single-post-content table th,
.tt-single-post-content table td {
  padding: 16px 18px;
  border-inline-end: 1px solid rgba(15, 23, 42, .10);
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  color: #172033;
  vertical-align: top;
  text-align: inherit;
}

.tt-single-post-content table th:last-child,
.tt-single-post-content table td:last-child {
  border-inline-end: 0;
}

.tt-single-post-content table tr:last-child td,
.tt-single-post-content table tr:last-child th {
  border-bottom: 0;
}

.tt-single-post-content table thead th,
.tt-single-post-content table tr:first-child th {
  background: #eaf2fb;
  color: #0f172a !important;
  font-weight: 950;
}

.tt-single-post-content table tbody th {
  color: #0f172a !important;
  font-weight: 950;
}

html[data-theme="dark"] .tt-single-post-content table,
html[data-tt-theme="dark"] .tt-single-post-content table,
html.tt-dark-mode .tt-single-post-content table,
body.dark .tt-single-post-content table,
body.dark-mode .tt-single-post-content table {
  border-color: rgba(148, 163, 184, .22);
  background: #0b1324;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] .tt-single-post-content table th,
html[data-theme="dark"] .tt-single-post-content table td,
html[data-tt-theme="dark"] .tt-single-post-content table th,
html[data-tt-theme="dark"] .tt-single-post-content table td,
html.tt-dark-mode .tt-single-post-content table th,
html.tt-dark-mode .tt-single-post-content table td,
body.dark .tt-single-post-content table th,
body.dark .tt-single-post-content table td,
body.dark-mode .tt-single-post-content table th,
body.dark-mode .tt-single-post-content table td {
  border-color: rgba(148, 163, 184, .14);
  color: #e5eefb !important;
  background: rgba(15, 23, 42, .64);
}

html[data-theme="dark"] .tt-single-post-content table thead th,
html[data-theme="dark"] .tt-single-post-content table tr:first-child th,
html[data-tt-theme="dark"] .tt-single-post-content table thead th,
html[data-tt-theme="dark"] .tt-single-post-content table tr:first-child th,
html.tt-dark-mode .tt-single-post-content table thead th,
html.tt-dark-mode .tt-single-post-content table tr:first-child th,
body.dark .tt-single-post-content table thead th,
body.dark .tt-single-post-content table tr:first-child th,
body.dark-mode .tt-single-post-content table thead th,
body.dark-mode .tt-single-post-content table tr:first-child th {
  background: #1e293b !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] .tt-single-post-content table tbody th,
html[data-tt-theme="dark"] .tt-single-post-content table tbody th,
html.tt-dark-mode .tt-single-post-content table tbody th,
body.dark .tt-single-post-content table tbody th,
body.dark-mode .tt-single-post-content table tbody th {
  background: rgba(15, 23, 42, .86) !important;
  color: #ffffff !important;
}

@media (max-width: 780px) {
  .tt-single-post-content table {
    min-width: 620px;
    font-size: 15px;
  }
  .tt-single-post-content table th,
  .tt-single-post-content table td {
    padding: 13px 14px;
  }
}
