/**
 * Tool Content Section — SEO knowledge content below tool forms
 * Uses --tool-accent-main from parent cosmos wrapper for per-tool theming
 * Mobile-first, matches MYSTIC IMPERIAL FUSION design language
 *
 * @package SoiMenh
 * @since 7.3.0
 */

/* ═══ Variables ═══ */
.tc-section {
  --tc-accent: var(--tool-accent-main, #c9a96e);
  --tc-bg: rgba(12,12,10,0.85);
  --tc-bg-card: color-mix(in srgb, var(--tc-accent) 6%, #0e0e0c);
  --tc-border: color-mix(in srgb, var(--tc-accent) 30%, transparent);
  --tc-border-subtle: color-mix(in srgb, var(--tc-accent) 12%, transparent);
  --tc-text: #e8e0d0;
  --tc-text-dim: rgba(232,224,208,0.65);
  --tc-radius: 4px;
  --tc-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.25);
  --tc-inner-glow: inset 0 1px 0 color-mix(in srgb, var(--tc-accent) 8%, transparent);

  padding: 40px 16px 32px;
  position: relative;
  z-index: 1;
}

/* Lead paragraph injected after H1 by tool-loader for Google snippet extraction */
.tc-lead-inject {
  max-width: 680px;
  margin: 8px auto 16px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(232,224,208,0.6);
  text-align: center;
  font-family: 'Be Vietnam Pro', sans-serif;
}

/* Hide on results page — PHP adds class on deep-link, JS adds on form submit */
.tc-section--hidden {
  display: none !important;
}

/* ═══ Section divider — meander-inspired ═══ */
.tc-section::before {
  content: '';
  display: block;
  width: 120px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--tc-accent), transparent);
  margin: 0 auto 32px;
  opacity: .4;
}

/* ═══ Blocks (shared) ═══ */
.tc-block {
  margin-bottom: 24px;
}
.tc-block:last-child {
  margin-bottom: 0;
}

/* ═══ Universal card wrapper — every section gets a card ═══ */
.tc-card,
.tc-origins,
.tc-deep,
.tc-algorithm,
.tc-diff,
.tc-usecases,
.tc-faq {
  position: relative;
  background: var(--tc-bg-card);
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius);
  padding: 28px 20px;
  box-shadow: var(--tc-shadow), var(--tc-inner-glow);
}

/* ═══ L-bracket corners — reusable pattern ═══ */
.tc-brk {
  position: absolute; width: 16px; height: 16px;
  border-color: var(--tc-accent); border-style: solid; border-width: 0;
  opacity: .3; pointer-events: none; z-index: 1;
}
.tc-brk--tl { top: 6px; left: 6px; border-top-width: 1.5px; border-left-width: 1.5px; }
.tc-brk--tr { top: 6px; right: 6px; border-top-width: 1.5px; border-right-width: 1.5px; }
.tc-brk--bl { bottom: 6px; left: 6px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.tc-brk--br { bottom: 6px; right: 6px; border-bottom-width: 1.5px; border-right-width: 1.5px; }

/* Auto L-brackets for card sections (not intro — it has manual brackets) */
.tc-origins::before,
.tc-origins::after,
.tc-deep::before,
.tc-deep::after,
.tc-algorithm::before,
.tc-algorithm::after,
.tc-diff::before,
.tc-diff::after,
.tc-usecases::before,
.tc-usecases::after,
.tc-faq::before,
.tc-faq::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border-color: var(--tc-accent);
  border-style: solid;
  border-width: 0;
  opacity: .25;
  pointer-events: none;
  z-index: 1;
}
.tc-origins::before, .tc-deep::before, .tc-algorithm::before, .tc-diff::before,
.tc-usecases::before, .tc-faq::before {
  top: 6px; left: 6px;
  border-top-width: 1.5px; border-left-width: 1.5px;
}
.tc-origins::after, .tc-deep::after, .tc-algorithm::after, .tc-diff::after,
.tc-usecases::after, .tc-faq::after {
  bottom: 6px; right: 6px;
  border-bottom-width: 1.5px; border-right-width: 1.5px;
}

/* ═══ Accent top-line for card sections ═══ */
.tc-origins,
.tc-deep,
.tc-algorithm,
.tc-diff,
.tc-usecases,
.tc-faq {
  border-top: 1px solid color-mix(in srgb, var(--tc-accent) 35%, transparent);
}

/* ═══ Eyebrow + Title ═══ */
.tc-eyebrow {
  font-size: .72rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--tc-accent); margin: 0 0 8px; opacity: .7;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 500;
}
.tc-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem; font-weight: 700;
  color: var(--tc-accent);
  margin: 0 0 16px; letter-spacing: .02em;
  line-height: 1.4;
  position: relative;
  padding-bottom: 12px;
}
.tc-title::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 50px; height: 1.5px;
  background: linear-gradient(90deg, var(--tc-accent), transparent);
}

/* ═══ Prose ═══ */
.tc-prose {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: .92rem; line-height: 1.8;
  color: var(--tc-text);
  margin: 0 0 12px;
}
.tc-prose:last-child { margin-bottom: 0; }
.tc-prose a {
  color: var(--tc-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--tc-accent) 35%, transparent);
  transition: text-decoration-color .2s, opacity .2s;
}
.tc-prose a:hover {
  text-decoration-color: var(--tc-accent);
  opacity: .85;
}

/* ═══ Intro card — special styling ═══ */
.tc-intro .tc-card {
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--tc-accent) 8%, #100f0d),
    color-mix(in srgb, var(--tc-accent) 4%, #0c0c0a));
  border-color: color-mix(in srgb, var(--tc-accent) 35%, transparent);
}

/* ═══ Origins section ═══ */
.tc-origins {
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--tc-accent) 7%, #100f0d),
    color-mix(in srgb, var(--tc-accent) 4%, #0c0c0a));
}

/* Origins table */
.tc-table-wrap {
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius);
  background: rgba(8,8,6,0.5);
}
.tc-table {
  width: 100%; border-collapse: collapse;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: .82rem;
}
.tc-table thead {
  background: color-mix(in srgb, var(--tc-accent) 6%, transparent);
}
.tc-table th {
  padding: 10px 12px;
  color: var(--tc-accent);
  font-weight: 600;
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  text-align: left;
  border-bottom: 1px solid color-mix(in srgb, var(--tc-accent) 25%, transparent);
  white-space: nowrap;
}
.tc-table td {
  padding: 10px 12px;
  color: var(--tc-text);
  border-bottom: 1px solid color-mix(in srgb, var(--tc-accent) 6%, transparent);
  vertical-align: top;
}
.tc-table tr:last-child td { border-bottom: none; }
.tc-table tbody tr {
  transition: background .2s;
}
.tc-table tbody tr:hover {
  background: color-mix(in srgb, var(--tc-accent) 5%, transparent);
}
.tc-td--name {
  font-weight: 500;
  color: var(--tc-accent);
}
.tc-td--note {
  color: var(--tc-text-dim);
  font-size: .8rem;
  display: none; /* show on tablet+ */
}

/* ═══ Tool Highlight box ═══ */
.tc-highlight-box {
  display: flex; align-items: flex-start; gap: 14px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--tc-accent) 12%, transparent),
    color-mix(in srgb, var(--tc-accent) 5%, transparent));
  border: 1px solid color-mix(in srgb, var(--tc-accent) 25%, transparent);
  border-left: 3px solid var(--tc-accent);
  border-radius: var(--tc-radius);
  padding: 20px 22px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35), inset 0 1px 0 color-mix(in srgb, var(--tc-accent) 8%, transparent);
  position: relative;
}
.tc-highlight-box::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; width: 60px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--tc-accent) 3%, transparent));
  pointer-events: none;
  border-radius: 0 var(--tc-radius) var(--tc-radius) 0;
}
.tc-highlight-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  min-width: 22px; min-height: 22px;
  max-width: 22px; max-height: 22px;
  color: var(--tc-accent);
  margin-top: 2px;
  display: block;
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--tc-accent) 30%, transparent));
}
.tc-highlight .tc-prose {
  font-size: .9rem;
  line-height: 1.75;
}

/* ═══ Deep Knowledge ═══ */
.tc-deep {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--tc-accent) 7%, #100f0d),
    color-mix(in srgb, var(--tc-accent) 4%, #0c0c0a));
}
.tc-deep .tc-section-title {
  font-family: 'Lexend Deca', sans-serif;
  font-size: 1.08rem; font-weight: 600;
  color: var(--tc-accent);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin: 0 0 18px; padding-bottom: 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--tc-accent) 20%, transparent);
  line-height: 1.35;
}
.tc-deep .tc-subtitle {
  font-family: 'Playfair Display', serif;
  font-size: 1.02rem; font-weight: 600;
  color: var(--tc-accent);
  margin: 24px 0 12px;
  padding-left: 14px;
  border-left: 2px solid color-mix(in srgb, var(--tc-accent) 35%, transparent);
  line-height: 1.35;
}
.tc-deep .tc-subtitle:first-child { margin-top: 0; }
.tc-deep .tc-prose {
  padding-left: 0;
}

/* ═══ Figure + Caption — wraps diagrams & tables ═══ */
.tc-figure {
  margin: 0;
  padding: 0;
}
.tc-caption {
  margin-top: 10px;
  padding: 0 4px;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: .78rem;
  line-height: 1.6;
  color: var(--tc-text-dim);
  text-align: center;
  font-style: italic;
  letter-spacing: .01em;
}

/* ═══ SVG Diagrams — centered, premium frame ═══ */
.tc-figure .tc-diagram {
  margin-bottom: 0;
}
.tc-diagram {
  margin: 24px 0;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: rgba(10,10,8,0.6);
  border: 1px solid color-mix(in srgb, var(--tc-accent) 18%, transparent);
  border-radius: var(--tc-radius);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.25);
}
.tc-diagram svg {
  display: block;
  max-width: 500px;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

/* ═══ Algorithm / Steps ═══ */
.tc-algorithm {
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--tc-accent) 7%, #100f0d),
    color-mix(in srgb, var(--tc-accent) 4%, #0c0c0a));
}
.tc-steps {
  list-style: none; margin: 0; padding: 0;
  counter-reset: tc-step;
}
.tc-step {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--tc-border-subtle);
  position: relative;
}
.tc-step:last-child { border-bottom: none; }
.tc-step-num {
  flex-shrink: 0;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--tc-accent) 18%, transparent),
    color-mix(in srgb, var(--tc-accent) 8%, transparent));
  border: 1px solid color-mix(in srgb, var(--tc-accent) 30%, transparent);
  border-radius: 50%;
  font-family: 'Lexend Deca', sans-serif;
  font-size: .8rem; font-weight: 700;
  color: var(--tc-accent);
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.tc-step-text {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: .9rem; line-height: 1.7;
  color: var(--tc-text);
  padding-top: 4px;
}
.tc-step-text a {
  color: var(--tc-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: color-mix(in srgb, var(--tc-accent) 35%, transparent);
}

/* ═══ Example callout ═══ */
.tc-example-box {
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--tc-accent) 8%, #100f0d),
    color-mix(in srgb, var(--tc-accent) 4%, #0c0c0a));
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius);
  padding: 22px 22px 20px;
  position: relative;
  box-shadow: var(--tc-shadow);
}
.tc-example-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 10%, var(--tc-accent) 50%, transparent 90%);
  opacity: .3;
  border-radius: var(--tc-radius) var(--tc-radius) 0 0;
}
.tc-example-title {
  font-family: 'Playfair Display', serif;
  font-size: .9rem; font-weight: 600;
  color: var(--tc-accent);
  margin: 0 0 12px;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tc-example-title::before {
  content: '💡';
  font-size: .85rem;
}
.tc-example-body {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: .9rem; line-height: 1.8;
  color: var(--tc-text);
}
.tc-example-body a {
  color: var(--tc-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: color-mix(in srgb, var(--tc-accent) 35%, transparent);
}
/* ═══ Demo result link CTA ═══ */
a.tc-demo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  padding: 16px 32px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--tc-accent) 18%, #0c0c0a) 0%,
    color-mix(in srgb, var(--tc-accent) 8%, #0c0c0a) 100%);
  border: 1px solid color-mix(in srgb, var(--tc-accent) 45%, transparent);
  border-radius: 4px;
  color: var(--tc-accent);
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: .03em;
  position: relative;
  overflow: hidden;
  transition: all .3s ease;
}
a.tc-demo-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--tc-accent) 12%, transparent), transparent);
  opacity: 0;
  transition: opacity .3s ease;
}
a.tc-demo-link::after {
  content: '→';
  font-size: 1.1rem;
  transition: transform .3s ease;
}
a.tc-demo-link:hover {
  border-color: color-mix(in srgb, var(--tc-accent) 60%, transparent);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--tc-accent) 25%, #0c0c0a) 0%,
    color-mix(in srgb, var(--tc-accent) 14%, #0c0c0a) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 24px color-mix(in srgb, var(--tc-accent) 18%, transparent);
  text-decoration: none;
}
a.tc-demo-link:hover::before { opacity: 1; }
a.tc-demo-link:hover::after { transform: translateX(4px); }
a.tc-demo-link:active { transform: translateY(0); }
@media (max-width: 480px) {
  a.tc-demo-link { padding: 14px 20px; font-size: .95rem; }
}

/* ═══ Differentiator ═══ */
.tc-diff {
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--tc-accent) 7%, #100f0d),
    color-mix(in srgb, var(--tc-accent) 4%, #0c0c0a));
}
.tc-diff-list {
  list-style: none; margin: 0; padding: 0;
}
.tc-diff-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: .9rem; line-height: 1.7;
  color: var(--tc-text);
  border-bottom: 1px solid var(--tc-border-subtle);
  transition: background .2s;
}
.tc-diff-item:last-child { border-bottom: none; }
.tc-diff-item:hover {
  background: color-mix(in srgb, var(--tc-accent) 4%, transparent);
}
.tc-diff-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  min-width: 22px; min-height: 22px;
  max-width: 22px; max-height: 22px;
  margin-top: 2px;
  color: var(--tc-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--tc-accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--tc-accent) 15%, transparent);
  border-radius: 50%;
  padding: 3px;
}
.tc-diff-icon svg {
  width: 10px; height: 10px;
}
.tc-diff-item span {
  flex: 1;
}
.tc-diff-item span a {
  color: var(--tc-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: color-mix(in srgb, var(--tc-accent) 35%, transparent);
}

/* ═══ Use cases ═══ */
.tc-usecases {
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--tc-accent) 7%, #100f0d),
    color-mix(in srgb, var(--tc-accent) 4%, #0c0c0a));
}
.tc-use-list {
  list-style: none; margin: 0; padding: 0;
}
.tc-use-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: .9rem; line-height: 1.7;
  color: var(--tc-text);
  border-bottom: 1px solid var(--tc-border-subtle);
  transition: background .2s;
}
.tc-use-item:last-child { border-bottom: none; }
.tc-use-item:hover {
  background: color-mix(in srgb, var(--tc-accent) 4%, transparent);
}
.tc-use-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  min-width: 22px; min-height: 22px;
  max-width: 22px; max-height: 22px;
  margin-top: 2px;
  color: var(--tc-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--tc-accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--tc-accent) 15%, transparent);
  border-radius: 50%;
  padding: 3px;
}
.tc-use-icon svg {
  width: 11px; height: 11px;
}
.tc-use-item span {
  flex: 1;
}
.tc-use-item span a {
  color: var(--tc-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: color-mix(in srgb, var(--tc-accent) 35%, transparent);
}

/* ═══ FAQ accordion ═══ */
.tc-faq {
  padding: 0; /* faq has its own internal padding via items */
  overflow: hidden;
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--tc-accent) 7%, #100f0d),
    color-mix(in srgb, var(--tc-accent) 4%, #0c0c0a));
}
.tc-faq .tc-eyebrow {
  padding: 22px 20px 0;
}
.tc-faq-list {
  /* inside the card, no extra border needed */
}
.tc-faq-item {
  border-bottom: 1px solid var(--tc-border-subtle);
}
.tc-faq-item:last-child { border-bottom: none; }
.tc-faq-q {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer; user-select: none;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: .9rem; font-weight: 500;
  color: var(--tc-text);
  background: transparent;
  transition: background .2s, color .2s;
  list-style: none;
}
.tc-faq-q::-webkit-details-marker { display: none; }
.tc-faq-q::marker { display: none; content: ''; }
.tc-faq-q:hover {
  background: color-mix(in srgb, var(--tc-accent) 6%, transparent);
  color: var(--tc-accent);
}
.tc-faq-arrow {
  flex-shrink: 0;
  color: var(--tc-accent);
  font-size: .7rem;
  transition: transform .3s;
  opacity: .5;
}
details[open] > .tc-faq-q {
  color: var(--tc-accent);
  background: color-mix(in srgb, var(--tc-accent) 6%, transparent);
}
details[open] > .tc-faq-q .tc-faq-arrow {
  transform: rotate(180deg);
}
.tc-faq-a {
  padding: 0 20px 16px;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: .88rem; line-height: 1.8;
  color: var(--tc-text-dim);
}
.tc-faq-a p { margin: 0; }
.tc-faq-a a {
  color: var(--tc-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: color-mix(in srgb, var(--tc-accent) 35%, transparent);
}

/* ═══ CTA — Scroll to tool ═══ */
.tc-cta-wrap {
  text-align: center;
  padding-top: 8px;
}
.tc-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--tc-accent) 15%, transparent) 0%,
    color-mix(in srgb, var(--tc-accent) 6%, transparent) 100%);
  border: 1px solid color-mix(in srgb, var(--tc-accent) 30%, transparent);
  border-radius: var(--tc-radius);
  color: var(--tc-accent);
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.tc-cta-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tc-accent) 10%, transparent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.tc-cta-btn:hover {
  border-color: color-mix(in srgb, var(--tc-accent) 50%, transparent);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--tc-accent) 22%, transparent) 0%,
    color-mix(in srgb, var(--tc-accent) 10%, transparent) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px color-mix(in srgb, var(--tc-accent) 12%, transparent);
}
.tc-cta-btn:hover::before { opacity: 1; }
.tc-cta-btn:active { transform: translateY(0); }
.tc-cta-icon {
  flex-shrink: 0;
  animation: tc-cta-bounce 2s ease-in-out infinite;
}
@keyframes tc-cta-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* ═══ Entrance animation — staggered reveal ═══ */
.tc-block {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.tc-block.tc-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══ Responsive — tablet ═══ */
@media (min-width: 768px) {
  .tc-section { padding: 48px 24px 40px; }
  .tc-card,
  .tc-origins,
  .tc-deep,
  .tc-algorithm,
  .tc-diff,
  .tc-usecases { padding: 32px 28px; }
  .tc-title { font-size: 1.35rem; }
  .tc-td--note { display: table-cell; }
  .tc-faq-q { padding: 16px 28px; }
  .tc-faq-a { padding: 0 28px 18px; }
  .tc-faq .tc-eyebrow { padding: 28px 28px 0; }
  .tc-highlight-box { padding: 22px 26px; }
  .tc-example-box { padding: 24px 26px 22px; }
  .tc-step-num { width: 36px; height: 36px; font-size: .84rem; }
  .tc-diff-icon, .tc-use-icon { width: 24px; height: 24px; min-width: 24px; min-height: 24px; max-width: 24px; max-height: 24px; }
}

/* ═══ Responsive — desktop ═══ */
@media (min-width: 1025px) {
  .tc-section { padding: 56px 32px 48px; max-width: 900px; margin: 0 auto; }
  .tc-card,
  .tc-origins,
  .tc-deep,
  .tc-algorithm,
  .tc-diff,
  .tc-usecases { padding: 36px 36px; }
  .tc-diagram svg { max-width: 500px; }
  .tc-section::before { width: 160px; margin-bottom: 40px; }
  .tc-faq-q { padding: 18px 32px; }
  .tc-faq-a { padding: 0 32px 20px; }
  .tc-faq .tc-eyebrow { padding: 32px 32px 0; }
}

/* ═══ Mobile small ═══ */
@media (max-width: 480px) {
  .tc-section { padding: 28px 12px 24px; }
  .tc-section::before { width: 80px; margin-bottom: 24px; }
  .tc-card,
  .tc-origins,
  .tc-deep,
  .tc-algorithm,
  .tc-diff,
  .tc-usecases { padding: 20px 14px; }
  .tc-title { font-size: 1.05rem; }
  .tc-table { font-size: .75rem; }
  .tc-table th, .tc-table td { padding: 8px 8px; }
  .tc-td--note { display: none; }
  .tc-step { gap: 10px; }
  .tc-step-num { width: 28px; height: 28px; font-size: .72rem; }
  .tc-faq .tc-eyebrow { padding: 16px 14px 0; }
  .tc-faq-q { padding: 12px 14px; font-size: .85rem; }
  .tc-faq-a { padding: 0 14px 12px; font-size: .82rem; }
  .tc-highlight-box { padding: 14px 14px; gap: 10px; }
  .tc-example-box { padding: 16px 14px 14px; }
  .tc-deep .tc-subtitle { font-size: .92rem; }
  .tc-diagram { padding: 10px; }
  .tc-diagram svg { max-width: 100%; }
  .tc-cta-btn { padding: 12px 24px; font-size: .95rem; }
  .tc-diff-icon, .tc-use-icon { width: 20px; height: 20px; min-width: 20px; min-height: 20px; max-width: 20px; max-height: 20px; }
  .tc-accordion-toggle { padding: 14px 16px; font-size: .92rem; }
}

/* ═══ Accordion (collapsible sections) ═══ */
details.tc-accordion {
  max-width: 780px;
  margin: 0 auto 12px !important;
  border: 1px solid color-mix(in srgb, var(--tc-accent, #c9a96e) 20%, transparent) !important;
  border-radius: 4px !important;
  background: color-mix(in srgb, var(--tc-accent, #c9a96e) 4%, #0e0e0c) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3) !important;
  overflow: hidden;
  padding: 0 !important;
}

details.tc-accordion > summary.tc-accordion-toggle {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px !important;
  margin: 0 !important;
  cursor: pointer;
  list-style: none !important;
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--tc-accent, #c9a96e);
  border: none !important;
  border-bottom: 1px solid transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: border-color 0.3s;
  user-select: none;
}

details.tc-accordion > summary.tc-accordion-toggle::-webkit-details-marker { display: none !important; }
details.tc-accordion > summary.tc-accordion-toggle::marker { display: none !important; content: '' !important; }

.tc-accordion-label {
  margin: 0 !important;
  padding: 0 !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
  font-family: inherit !important;
  line-height: inherit !important;
  border: none !important;
  background: transparent !important;
}

details.tc-accordion[open] > summary.tc-accordion-toggle {
  border-bottom-color: color-mix(in srgb, var(--tc-accent, #c9a96e) 15%, transparent) !important;
}

.tc-accordion-arrow {
  font-size: 0.8rem;
  color: rgba(232,224,208,0.7);
  transition: transform 0.3s;
}

details.tc-accordion[open] > summary.tc-accordion-toggle .tc-accordion-arrow {
  transform: rotate(180deg);
}

details.tc-accordion > .tc-accordion-body {
  padding: 0;
  animation: tcAccordionOpen 0.3s ease;
}

/* Inside accordion: kill all inner card styling */
details.tc-accordion .tc-block {
  margin: 0 !important;
  opacity: 1 !important;
  transform: none !important;
}
details.tc-accordion .tc-card,
details.tc-accordion .tc-origins,
details.tc-accordion .tc-deep,
details.tc-accordion .tc-algorithm,
details.tc-accordion .tc-diff,
details.tc-accordion .tc-usecases,
details.tc-accordion .tc-faq {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
}
/* Hide duplicate titles + eyebrows inside accordion */
details.tc-accordion .tc-title,
details.tc-accordion .tc-eyebrow {
  display: none !important;
}
/* Hide L-bracket corners */
details.tc-accordion .tc-brk {
  display: none !important;
}
/* Hide auto L-bracket pseudo-elements */
details.tc-accordion .tc-origins::before,
details.tc-accordion .tc-origins::after,
details.tc-accordion .tc-deep::before,
details.tc-accordion .tc-deep::after,
details.tc-accordion .tc-algorithm::before,
details.tc-accordion .tc-algorithm::after,
details.tc-accordion .tc-diff::before,
details.tc-accordion .tc-diff::after,
details.tc-accordion .tc-usecases::before,
details.tc-accordion .tc-usecases::after,
details.tc-accordion .tc-faq::before,
details.tc-accordion .tc-faq::after {
  display: none !important;
}
/* Hide intro special gradient border */
details.tc-accordion .tc-intro .tc-card {
  border: none !important;
  background: transparent !important;
}

@keyframes tcAccordionOpen {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.tc-section p a,
.tc-section li a {
  text-decoration: underline;
  text-decoration-color: rgba(201,169,110,.4);
  text-underline-offset: 2px;
  transition: text-decoration-color .2s;
}
.tc-section p a:hover,
.tc-section li a:hover {
  text-decoration-color: #c9a96e;
}

/* ═══ Fallback: browsers without color-mix() (Chrome <111, Safari <16.2, Firefox <113, Samsung Internet <21) ═══ */
@supports not (color: color-mix(in srgb, red, blue)) {
  .tc-section {
    --tc-bg-card: rgba(16, 15, 13, 0.95);
    --tc-border: rgba(201, 169, 110, 0.30);
    --tc-border-subtle: rgba(201, 169, 110, 0.12);
    --tc-inner-glow: inset 0 1px 0 rgba(201, 169, 110, 0.08);
  }
  .tc-card,
  .tc-origins,
  .tc-deep,
  .tc-algorithm,
  .tc-diff,
  .tc-usecases,
  .tc-faq {
    background: rgba(16, 15, 13, 0.95);
    border-color: rgba(201, 169, 110, 0.25);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.25), inset 0 1px 0 rgba(201, 169, 110, 0.08);
  }
  .tc-cta-wrapper {
    border-top-color: rgba(201, 169, 110, 0.35);
  }
  .tc-article-card {
    border-color: rgba(201, 169, 110, 0.18);
  }
  .tc-faq-item {
    background: linear-gradient(135deg, rgba(201, 169, 110, 0.05), rgba(12, 12, 10, 1));
    border-color: rgba(201, 169, 110, 0.30);
  }
  .tc-faq-item[open] {
    border-color: rgba(201, 169, 110, 0.45);
    background: linear-gradient(135deg, rgba(201, 169, 110, 0.08), rgba(12, 12, 10, 1));
  }
  .tc-accordion-header,
  .tc-deep-header,
  .tc-diff-header {
    background: linear-gradient(135deg, rgba(201, 169, 110, 0.06), rgba(16, 15, 13, 1));
  }
  .tc-step {
    background: rgba(201, 169, 110, 0.04);
  }
  .tc-code-block {
    background: rgba(201, 169, 110, 0.06);
    border-color: rgba(201, 169, 110, 0.15);
  }
  .tc-table th {
    background: rgba(201, 169, 110, 0.06);
    border-bottom-color: rgba(201, 169, 110, 0.25);
  }
  .tc-table td {
    border-bottom-color: rgba(201, 169, 110, 0.06);
  }
  .tc-section p a,
  .tc-section li a {
    text-decoration-color: rgba(201, 169, 110, 0.35);
  }
}
