/* ═══════════════════════════════════════════════════════════════
   TRAXIUM — Platform hub + detail pages (index, platform-*, plans)
   Depends on: theme.css → shared.css → styles.css → site-shell.css → home.css
═══════════════════════════════════════════════════════════════ */

.tx-p {
  --p-surface: var(--tx-card);
  --p-raised: var(--tx-row-alt);
  --p-border: var(--tx-line);
  --p-text: var(--tx-text);
  --p-muted: var(--tx-text);
  --p-accent: var(--tx-numbers);
  --p-accent-soft: var(--tx-sage);
  --p-shadow: 0 10px 28px -18px rgba(15, 79, 75, 0.35);
  --p-teal: var(--tx-side-bg, #0F4F4B);
  --v1: #12B886; --v1-ink: #0B8A63; --v1-soft: rgba(18, 184, 134, 0.13);
  --v2: #F7882F; --v2-ink: #C2600F; --v2-soft: rgba(247, 136, 47, 0.14);
  --v3: #F0506E; --v3-ink: #CC2D4C; --v3-soft: rgba(240, 80, 110, 0.12);
  --v4: #7B61FF; --v4-ink: #5A3FE0; --v4-soft: rgba(123, 97, 255, 0.12);
}
:root[data-theme="dark"] .tx-p, body.dark-mode.tx-p {
  --v1-ink: #6FDDB8; --v2-ink: #FBB57A; --v3-ink: #F68FA2; --v4-ink: #B0A1FF;
}
/* Rotating vibrant accent, shared by chips, check marks, and cards. */
.tx-flow li:nth-child(4n+1), .tx-checks li:nth-child(4n+1), .tx-qa-card:nth-child(4n+1), .tx-defs div:nth-child(4n+1), .tx-tier:nth-child(4n+1) { --c: var(--v1); --c-ink: var(--v1-ink); --c-soft: var(--v1-soft); }
.tx-flow li:nth-child(4n+2), .tx-checks li:nth-child(4n+2), .tx-qa-card:nth-child(4n+2), .tx-defs div:nth-child(4n+2), .tx-tier:nth-child(4n+2) { --c: var(--v2); --c-ink: var(--v2-ink); --c-soft: var(--v2-soft); }
.tx-flow li:nth-child(4n+3), .tx-checks li:nth-child(4n+3), .tx-qa-card:nth-child(4n+3), .tx-defs div:nth-child(4n+3), .tx-tier:nth-child(4n+3) { --c: var(--v3); --c-ink: var(--v3-ink); --c-soft: var(--v3-soft); }
.tx-flow li:nth-child(4n+4), .tx-checks li:nth-child(4n+4), .tx-qa-card:nth-child(4n+4), .tx-defs div:nth-child(4n+4), .tx-tier:nth-child(4n+4) { --c: var(--v4); --c-ink: var(--v4-ink); --c-soft: var(--v4-soft); }

/* ── Sidebar group labels ── */
.site-nav-label {
  margin: 14px 14px 4px; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted);
}
/* Declared before traxium-app.css so these !important rules outrank its layer. */
@layer tx-platform-shell {
  body.tx-p .site-nav-label { color: var(--tx-side-text, var(--text-muted)) !important; opacity: 0.72; }
  body.tx-p .site-sidebar a.site-nav-item { min-height: 44px !important; gap: 12px !important; }
  body.tx-p .site-nav-item > svg {
    width: 38px !important; height: 38px !important; flex: 0 0 38px !important; padding: 8px !important;
  }
  @media (max-width: 480px) {
    body.tx-p .site-topbar-left { flex: none !important; }
    body.tx-p .site-topbar-right .theme-toggle-btn { display: none !important; }
    body.tx-p .site-topbar-right :is(.btn-ghost-sm, .btn-cyan-sm) { padding: 0 16px !important; }
  }
}

/* ── Shared type ── */
.tx-eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 7px 16px 7px 12px;
  border-radius: 999px; background: var(--tx-sage); color: var(--tx-on-sage); font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.tx-eyebrow::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--tx-apricot); box-shadow: 0 0 0 4px rgba(242, 166, 90, 0.25); }
.tx-kicker { margin: 0 0 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tx-numbers); }
.tx-h1, .tx-h2, .tx-cta-title, .tx-tier-name {
  font-family: var(--font-display); font-weight: 800; color: var(--p-text); letter-spacing: -0.025em; margin: 0;
}
.tx-h1 { font-size: clamp(36px, 4vw, 56px); line-height: 1.04; letter-spacing: -0.035em; }
.tx-h1::after {
  content: ''; display: block; width: 96px; height: 8px; margin-top: 16px; border-radius: 999px;
  background: linear-gradient(90deg, var(--tx-apricot), var(--v2));
}
.tx-h2 { font-size: clamp(26px, 2.6vw, 36px); line-height: 1.12; margin-bottom: 14px; }
.tx-sub, .tx-lead, .tx-cta-sub, .tx-tier-blurb {
  color: var(--p-muted); font-size: 17px; line-height: 1.55; margin: 0 0 16px;
}
.tx-sub { max-width: 760px; margin: 16px 0 0; }

/* ── Workflow chain ── */
.tx-flow { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 6px; padding: 0; margin: 6px 0 20px; }
.tx-flow li { display: inline-flex; align-items: center; gap: 6px; }
.tx-flow li + li::before {
  content: ''; width: 16px; height: 16px; background: var(--tx-apricot);
  -webkit-mask: var(--tx-arrow) center / contain no-repeat; mask: var(--tx-arrow) center / contain no-repeat;
}
.tx-flow span, .tx-flow a {
  display: inline-block; padding: 7px 14px; border-radius: 999px; font-weight: 800;
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); background: var(--c-soft); color: var(--c-ink);
}
.tx-flow a:hover { background: var(--c); color: #fff; }
.tx-statement {
  position: relative; overflow: hidden; padding: 18px 22px 18px 24px; border-radius: 20px;
  background: var(--p-teal); color: #fff; font-size: 17px; font-weight: 700; line-height: 1.5;
  border-left: 6px solid var(--tx-apricot);
}
.tx-statement::after { content: ''; position: absolute; width: 160px; height: 160px; right: -60px; top: -80px; border-radius: 50%; border: 26px solid rgba(124, 196, 181, 0.14); }
:root { --tx-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E"); }

.tx-cta-buttons { display: flex; gap: 14px; flex-wrap: wrap; }
.tx-page-icon {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--p-teal); color: var(--tx-apricot);
}
.tx-page-icon svg { width: 20px; height: 20px; }
.tx-chip {
  font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--p-raised);
  color: var(--p-muted); border: 1px solid transparent;
}

/* ── Detail page ── */
.tx-page { padding: clamp(32px, 4vw, 56px) 28px 24px; }
.tx-page-head { display: flex; gap: 24px; align-items: flex-start; margin-bottom: 32px; }
.tx-page-icon {
  flex-shrink: 0; width: 76px; height: 76px; border-radius: 22px; margin-top: 4px;
  box-shadow: 0 16px 30px -16px rgba(15, 79, 75, 0.6); transform: rotate(-4deg);
}
.tx-page-icon svg { width: 40px; height: 40px; }
.tx-tabs {
  position: relative; display: flex; gap: 6px; overflow-x: auto; padding: 6px; margin-bottom: 22px;
  background: var(--tx-sage); border-radius: 999px; scrollbar-width: none;
}
.tx-ptab {
  flex-shrink: 0; padding: 10px 20px; border-radius: 999px; font-weight: 800;
  color: var(--tx-on-sage); white-space: nowrap; transition: background .15s, color .15s;
}
.tx-ptab:hover { background: rgba(255, 255, 255, 0.45); }
.tx-ptab[aria-selected="true"] { background: var(--p-teal); color: #fff; box-shadow: 0 8px 18px -10px rgba(15, 79, 75, 0.7); }
.tx-ptab[aria-selected="true"]::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--tx-apricot); vertical-align: middle; }
.tx-ptab:focus-visible { outline: 2px solid var(--tx-apricot); outline-offset: 2px; }
.tx-panel {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 3vw, 44px);
  background: var(--p-surface); border: 1px solid var(--p-border); border-radius: 28px;
  padding: clamp(24px, 3vw, 40px); box-shadow: 0 30px 60px -36px rgba(15, 79, 75, 0.45);
}
.tx-panel[hidden] { display: none; }
.tx-panel:focus { outline: none; }
.tx-panel--wide { grid-template-columns: 1fr; gap: 20px; }
.tx-list-block + .tx-list-block { margin-top: 24px; }
.tx-list-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tx-numbers); }
.tx-list-title::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--tx-apricot); }
.tx-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: var(--p-text); }
.tx-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tx-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tx-checks li {
  position: relative; display: flex; align-items: center; min-height: 48px; padding: 10px 14px 10px 50px; line-height: 1.3;
  border-radius: 14px; background: var(--p-raised); border: 1px solid transparent; font-weight: 600; transition: transform .15s, border-color .15s, background .15s;
}
.tx-checks li:hover { transform: translateY(-2px); background: var(--c-soft); border-color: color-mix(in srgb, var(--c) 35%, transparent); }
.tx-checks li::before {
  content: ''; position: absolute; left: 12px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 8px;
  background: var(--c) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 16px no-repeat;
  box-shadow: 0 6px 12px -6px var(--c);
}

/* ── Q&A grid, definitions, chips, comparison ── */
.tx-qa { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tx-qa-card { background: var(--c-soft); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); border-top: 6px solid var(--c); border-radius: 20px; padding: 18px 20px; }
.tx-qa-card h3 { margin: 0 0 10px; font-family: var(--font-display); color: var(--c-ink); }
.tx-qa-card ul { margin: 0; padding-left: 18px; color: var(--p-muted); line-height: 1.6; }
.tx-qa-card li::marker { color: var(--c); }
.tx-defs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.tx-defs div { background: var(--c-soft); border-left: 5px solid var(--c); border-radius: 14px; padding: 14px 16px; }
.tx-defs dt { font-family: var(--font-display); font-weight: 800; color: var(--c-ink); }
.tx-defs dd { margin: 4px 0 0; color: var(--p-muted); }
.tx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tx-chip { padding: 8px 14px; font-weight: 700; color: var(--p-text); background: var(--tx-pending-bg); border-color: rgba(242, 166, 90, 0.35); }
.tx-chip--strike { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: rgba(184, 50, 42, 0.6); color: var(--tx-problem-text); background: var(--tx-problem-bg); border-color: transparent; }
.tx-int-group + .tx-int-group { margin-top: 22px; }
.tx-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tx-compare-col { border-radius: 24px; padding: 24px 26px; background: var(--tx-problem-bg); }
.tx-compare-col h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-family: var(--font-display); color: var(--tx-problem-text); }
.tx-compare-col h3::before { content: '✕'; display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--tx-problem-text); color: #fff; font-weight: 900; }
.tx-compare-col ul { margin: 0; padding-left: 18px; color: var(--p-muted); line-height: 1.7; }
.tx-compare-col--with { position: relative; overflow: hidden; background: var(--p-teal); box-shadow: 0 24px 44px -26px rgba(15, 79, 75, 0.7); }
.tx-compare-col--with h3 { color: #fff; }
.tx-compare-col--with h3::before { content: '✓'; background: var(--tx-apricot); color: var(--tx-on-apricot); }
.tx-compare-col--with li::marker { color: var(--tx-apricot); }
.tx-compare-sum { color: var(--p-text); font-size: 17px; line-height: 1.6; margin: 0 0 12px; }
.tx-compare-result { margin: 0; font-family: var(--font-display); font-weight: 800; color: var(--tx-numbers); }

/* ── Integrations: reuse the home network graphic below the panel ── */
.tx-p .home-network { margin-top: 22px; padding: 0; }
.tx-p .home-network-intro { margin-bottom: 12px; }

/* ── Pricing ── */
.tx-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.tx-tier {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 28px;
  background: var(--p-surface); border: 1px solid var(--p-border); border-top: 6px solid var(--c); border-radius: 28px;
  box-shadow: 0 24px 44px -30px rgba(15, 79, 75, 0.45); transition: transform .2s;
}
.tx-tier:hover { transform: translateY(-4px); }
.tx-tier--featured { padding-top: 40px; background: var(--p-teal); border-color: transparent; border-top-color: var(--tx-apricot); box-shadow: 0 30px 60px -28px rgba(15, 79, 75, 0.75); }
.tx-tier-badge {
  position: absolute; top: -14px; left: 28px; padding: 5px 14px; border-radius: 999px;
  background: var(--tx-apricot); color: var(--tx-on-apricot); font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  box-shadow: 0 8px 16px -8px rgba(242, 166, 90, 0.9);
}
.tx-tier-price { margin: 0; color: var(--p-muted); }
.tx-tier-price strong { font-family: var(--tx-font-numbers); font-weight: 800; color: var(--c-ink); letter-spacing: -0.03em; }
.tx-tier--featured .tx-tier-price strong { color: var(--tx-apricot); }
.tx-tier-blurb { margin: 0; }
.tx-tier-btn { justify-content: center; text-align: center; }
.tx-tier-more summary { cursor: pointer; font-weight: 800; color: var(--tx-numbers); margin-bottom: 12px; }
.tx-tier--featured .tx-tier-more summary { color: var(--tx-apricot); }
.tx-tier-more .tx-checks { gap: 8px; }
.tx-tier--featured .tx-checks li { background: rgba(255, 255, 255, 0.08); }
.tx-stack {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px 32px; align-items: center;
  margin-top: 24px; padding: clamp(24px, 3vw, 40px); border-radius: 28px; background: var(--tx-pending-bg);
}
.tx-stack .tx-h2 { margin: 0; }
.tx-stack-result { grid-column: 1 / -1; margin: 0; color: var(--p-text); font-size: 18px; font-weight: 700; }

/* ── Closing band ── */
.tx-cta {
  position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap;
  margin: 16px auto 48px; padding: clamp(32px, 4vw, 52px); border-radius: 28px; background: var(--p-teal); color: #fff;
}
.tx-cta::after { content: ''; position: absolute; width: 360px; height: 360px; left: -120px; bottom: -220px; border-radius: 50%; border: 50px solid rgba(242, 166, 90, 0.14); pointer-events: none; }
.tx-cta::before { content: ''; position: absolute; width: 300px; height: 300px; right: -100px; top: -170px; border-radius: 50%; border: 44px solid rgba(124, 196, 181, 0.12); pointer-events: none; }
.tx-cta > * { position: relative; z-index: 1; }
.tx-cta-sub { margin: 10px 0 0; }
.tx-p .tx-cta.container { --tx-gutter: clamp(16px, 3vw, 40px); width: auto; margin-inline: max(var(--tx-gutter), calc((100% - 1240px) / 2 + var(--tx-gutter))); }

/* ── Overrides for traxium-app.css !important rules ── */
@layer tx-platform-shell {
  body.tx-p .tx-h1 { font-size: clamp(36px, 4vw, 56px) !important; font-weight: 800 !important; }
  body.tx-p :is(.tx-h2, .tx-cta-title) { font-size: clamp(26px, 2.6vw, 36px) !important; font-weight: 800 !important; letter-spacing: -0.025em !important; }
  body.tx-p .tx-tier-name { font-size: 24px !important; font-weight: 800 !important; }
  body.tx-p .tx-tier-price strong { font-size: 44px !important; }
  body.tx-p :is(.tx-qa-card h3, .tx-compare-col h3) { font-size: 20px !important; }
  body.tx-p :is(.tx-sub, .tx-lead, .tx-cta-sub) { font-size: clamp(17px, 1.3vw, 20px) !important; }
  body.tx-p :is(.tx-kicker, .tx-list-title, .tx-eyebrow) { font-size: 15px !important; }
  body.tx-p .tx-statement, body.tx-p .tx-statement * { color: #fff !important; font-size: 17px !important; }
  body.tx-p :is(.tx-cta, .tx-compare-col--with, .tx-tier--featured) :is(h2, h3, p, li, span, summary):not(.tx-tier-badge) { color: #fff !important; }
  body.tx-p .tx-tier--featured .tx-tier-price strong { color: var(--tx-apricot) !important; }
  body.tx-p .tx-tier--featured .tx-tier-more summary { color: var(--tx-apricot) !important; }
  body.tx-p .tx-qa-card h3 { color: var(--c-ink) !important; }
  body.tx-p .tx-compare-col--without h3 { color: var(--tx-problem-text) !important; }
  body.tx-p .tx-cta .btn-cyan, body.tx-p .tx-tier--featured .btn-cyan {
    min-height: 56px !important; padding: 0 30px !important; font-size: 18px !important;
    background: var(--tx-apricot) !important; color: var(--tx-on-apricot) !important; border-color: transparent !important;
  }
  body.tx-p :is(.tx-cta, .tx-tier--featured) .btn-ghost {
    min-height: 56px !important; padding: 0 30px !important; font-size: 18px !important;
    background: transparent !important; color: #fff !important; border-color: rgba(255, 255, 255, 0.6) !important;
  }
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .tx-qa { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .tx-panel, .tx-tiers, .tx-stack, .tx-compare { grid-template-columns: 1fr; }
  .tx-panel { gap: 18px; padding: 22px; }
}
@media (max-width: 600px) {
  .tx-page-head { flex-direction: column; gap: 16px; }
  .tx-page-icon { width: 60px; height: 60px; border-radius: 18px; }
  .tx-qa, .tx-defs, .tx-cols-2 { grid-template-columns: 1fr; }
  .tx-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tx-page { padding-left: 18px; padding-right: 18px; }
}
