/* Thundera Shell v2 — landing kit. Requires tokens.css (+ shell.css for the bar/footer).
 * Hero, logo strip, features, bento, split media, metrics, steps, pricing, testimonial,
 * FAQ, CTA band, code, badges, buttons, cards, app cards, scroll reveal (ui.js).
 * Guide: https://thundera.eu/docs/shell#landing */

/* ── Layout ── */
.th-container { width: 100%; max-width: var(--th-container); margin-inline: auto; padding-inline: max(var(--th-gutter), env(safe-area-inset-left, 0px)); }
.th-container-wide { max-width: var(--th-container-wide); }
.th-container-narrow { max-width: var(--th-container-narrow); }
.th-section { position: relative; padding-block: var(--th-section-y); }
.th-section-tight { padding-block: calc(var(--th-section-y) * .6); }
.th-section-alt { background: var(--th-bg-2); border-block: 1px solid var(--th-border); }
.th-section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.th-section-head.th-center { margin-inline: auto; text-align: center; }
.th-stack > * + * { margin-top: var(--th-stack, var(--th-space-4)); }
.th-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--th-space-3); }
.th-center { text-align: center; }
.th-center .th-row, .th-center .th-hero-actions { justify-content: center; }

/* ── Type ── */
.th-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: var(--th-space-4);
  font: var(--th-fw-semibold) var(--th-fs-xs)/1 var(--th-font-mono); letter-spacing: var(--th-tracking-wide); text-transform: uppercase; color: var(--brand-accent);
}
.th-display { font-size: var(--th-fs-5xl); font-weight: var(--th-fw-black); line-height: var(--th-lh-tight); letter-spacing: var(--th-tracking-display); text-wrap: balance; }
.th-h1 { font-size: var(--th-fs-4xl); font-weight: var(--th-fw-black); line-height: 1.1; letter-spacing: var(--th-tracking-display); text-wrap: balance; }
.th-h2 { font-size: var(--th-fs-3xl); font-weight: var(--th-fw-bold); line-height: 1.15; letter-spacing: var(--th-tracking-tight); text-wrap: balance; }
.th-h3 { font-size: var(--th-fs-xl); font-weight: var(--th-fw-semibold); line-height: 1.3; letter-spacing: -.01em; }
.th-lede { font-size: var(--th-fs-lg); line-height: var(--th-lh-relaxed); color: var(--th-text-2); text-wrap: pretty; }
.th-section-head .th-lede { margin-top: var(--th-space-4); }
.th-muted { color: var(--th-text-2); }
.th-small { font-size: var(--th-fs-sm); }
.th-mono { font-family: var(--th-font-mono); }
.th-grad-text { background: var(--brand-grad-3); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.th-group-text { background: var(--th-group-grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }

/* ── Buttons ── */
.th-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px;
  border-radius: var(--th-radius-sm); border: 1px solid transparent; cursor: pointer; text-decoration: none !important;
  font: var(--th-fw-semibold) var(--th-fs-sm)/1 var(--th-font-sans); white-space: nowrap; -webkit-tap-highlight-color: transparent;
  transition: transform var(--th-dur-1) var(--th-ease), box-shadow var(--th-dur-2) var(--th-ease), background-color var(--th-dur-1), border-color var(--th-dur-1), color var(--th-dur-1);
}
.th-btn svg { width: 18px; height: 18px; flex: none; }
.th-btn:active { transform: translateY(1px) scale(.99); }
.th-btn-primary { background: var(--brand-accent); color: var(--brand-on); }
.th-btn-primary:hover { box-shadow: var(--brand-glow); transform: translateY(-1px); color: var(--brand-on); }
.th-btn-secondary { background: var(--th-surface-2); color: var(--th-text); border-color: var(--th-border-2); }
.th-btn-secondary:hover { background: var(--th-surface-3); border-color: var(--th-border-3); color: var(--th-text); }
.th-btn-ghost { background: transparent; color: var(--th-text); border-color: var(--th-border-2); }
.th-btn-ghost:hover { background: var(--th-hover); border-color: var(--th-border-3); color: var(--th-text); }
.th-btn-link { height: auto; padding: 0; background: none; color: var(--brand-accent); }
.th-btn-link:hover { text-decoration: underline !important; text-underline-offset: 3px; }
.th-btn-danger { background: var(--th-red); color: #fff; }
.th-btn-sm { height: 32px; padding: 0 12px; font-size: var(--th-fs-xs); }
.th-btn-lg { height: 48px; padding: 0 24px; font-size: var(--th-fs-base); border-radius: var(--th-radius-md); }
.th-btn-block { width: 100%; }
.th-btn:focus-visible { outline: none; box-shadow: var(--th-ring); }
.th-btn[disabled], .th-btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* ── Badges, pills, cards ── */
.th-badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--th-radius-full);
  font: var(--th-fw-semibold) var(--th-fs-2xs)/1 var(--th-font-sans); letter-spacing: .02em; white-space: nowrap;
  background: var(--th-surface-3); color: var(--th-text-2); border: 1px solid var(--th-border);
}
.th-badge-brand { background: var(--brand-soft); color: var(--brand-accent); border-color: var(--brand-line); }
.th-badge-success { background: var(--th-success-soft); color: var(--th-success-text); border-color: transparent; }
.th-badge-warning { background: var(--th-warning-soft); color: var(--th-warning-text); border-color: transparent; }
.th-badge-danger { background: var(--th-danger-soft); color: var(--th-danger-text); border-color: transparent; }
.th-badge-info { background: var(--th-info-soft); color: var(--th-info-text); border-color: transparent; }
.th-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.th-dot-live { position: relative; }
.th-dot-live::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1.5px solid currentColor; animation: th-ping 2s var(--th-ease) infinite; }
@keyframes th-ping { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.8); } }
.th-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; border-radius: var(--th-radius-full);
  background: var(--th-surface-1); border: 1px solid var(--th-border-2); color: var(--th-text-2); font-size: var(--th-fs-sm); text-decoration: none !important;
  transition: border-color var(--th-dur-1), background-color var(--th-dur-1);
}
.th-pill:hover { border-color: var(--brand-line); color: var(--th-text); }
.th-pill .th-badge { height: 22px; }
.th-card {
  position: relative; display: block; padding: clamp(20px, 2.4vw, 28px); border-radius: var(--th-radius-lg);
  background: var(--th-surface-1); border: 1px solid var(--th-border); color: var(--th-text);
}
a.th-card, .th-card-hover { text-decoration: none !important; transition: transform var(--th-dur-2) var(--th-ease), border-color var(--th-dur-2), box-shadow var(--th-dur-2); }
a.th-card:hover, .th-card-hover:hover { transform: translateY(-3px); border-color: var(--brand-line); box-shadow: var(--th-shadow-3); }
.th-card h3 { font-size: var(--th-fs-lg); font-weight: var(--th-fw-semibold); }
.th-card p { margin-top: var(--th-space-2); color: var(--th-text-2); line-height: var(--th-lh-relaxed); }
.th-card-glass { background: color-mix(in srgb, var(--th-surface-1) 70%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.th-icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; flex: none;
  background: var(--brand-soft); color: var(--brand-accent); border: 1px solid var(--brand-line);
}
.th-icon svg { width: 22px; height: 22px; }
.th-link-arrow { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--th-space-4); color: var(--brand-accent); font-weight: var(--th-fw-semibold); font-size: var(--th-fs-sm); }
.th-link-arrow svg { width: 16px; height: 16px; transition: transform var(--th-dur-2) var(--th-ease); }
a:hover > .th-link-arrow svg, .th-link-arrow:hover svg { transform: translateX(3px); }

/* ── Hero ── */
.th-hero { position: relative; overflow: hidden; padding-block: clamp(56px, 9vw, 120px) clamp(56px, 8vw, 112px); isolation: isolate; }
.th-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.th-hero-center { text-align: center; }
.th-hero-center .th-hero-copy { margin-inline: auto; max-width: 880px; }
.th-hero-copy .th-lede { margin-top: var(--th-space-6); max-width: 60ch; }
.th-hero-center .th-lede { margin-inline: auto; }
.th-hero-actions { display: flex; flex-wrap: wrap; gap: var(--th-space-3); margin-top: var(--th-space-8); }
.th-hero-center .th-hero-actions { justify-content: center; }
.th-hero-note { margin-top: var(--th-space-4); font-size: var(--th-fs-sm); color: var(--th-text-3); }
.th-hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.th-hero-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--th-border) 1px, transparent 1px), linear-gradient(90deg, var(--th-border) 1px, transparent 1px);
  background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}
.th-hero-bg::after {
  content: ""; position: absolute; left: 50%; top: -20%; width: min(1100px, 140vw); aspect-ratio: 2 / 1; transform: translateX(-50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand-1) 26%, transparent), transparent 70%), radial-gradient(closest-side at 70% 60%, color-mix(in srgb, var(--brand-2) 18%, transparent), transparent 70%);
  filter: blur(10px);
}
/* Animated brand-mark slot: put the app's generated animated SVG inside. */
.th-hero-mark { position: relative; display: grid; place-items: center; width: min(420px, 80vw); aspect-ratio: 1; margin-inline: auto; }
.th-hero-mark > img, .th-hero-mark > svg { position: relative; z-index: 1; width: 52%; height: auto; filter: drop-shadow(0 20px 60px color-mix(in srgb, var(--brand-1) 45%, transparent)); }
.th-hero-mark::before, .th-hero-mark::after { content: ""; position: absolute; border-radius: 50%; }
.th-hero-mark::before { inset: 8%; background: radial-gradient(circle, color-mix(in srgb, var(--brand-1) 22%, transparent), transparent 68%); }
.th-hero-mark::after { inset: 0; border: 1px dashed var(--brand-line); animation: th-spin 60s linear infinite; }
.th-orbit { position: absolute; inset: 14%; border-radius: 50%; border: 1px solid var(--th-border-2); animation: th-spin 24s linear infinite reverse; }
.th-orbit::before { content: ""; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 16px var(--brand-2); }
@keyframes th-spin { to { transform: rotate(360deg); } }

/* ── Logo strip ── */
.th-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(20px, 4vw, 48px); color: var(--th-text-3); }
.th-logos > * { display: inline-flex; align-items: center; gap: 10px; font-weight: var(--th-fw-semibold); opacity: .85; transition: opacity var(--th-dur-1), color var(--th-dur-1); }
.th-logos > *:hover { opacity: 1; color: var(--th-text); }
.th-logos img { width: 28px; height: 28px; }
.th-logos-label { width: 100%; text-align: center; margin-bottom: var(--th-space-6); font: var(--th-fw-medium) var(--th-fs-xs)/1 var(--th-font-mono); letter-spacing: var(--th-tracking-wide); text-transform: uppercase; color: var(--th-text-3); }

/* ── Feature grid + bento ── */
.th-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--th-space-4); }
.th-feature { padding: clamp(20px, 2.4vw, 28px); border-radius: var(--th-radius-lg); background: var(--th-surface-1); border: 1px solid var(--th-border); }
.th-feature .th-icon { margin-bottom: var(--th-space-5); }
.th-feature h3 { font-size: var(--th-fs-md); font-weight: var(--th-fw-semibold); }
.th-feature p { margin-top: var(--th-space-2); color: var(--th-text-2); line-height: var(--th-lh-relaxed); font-size: var(--th-fs-sm); }
.th-features-plain .th-feature { background: none; border: 0; padding: 0; }
.th-bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: minmax(180px, auto); gap: var(--th-space-4); }
.th-bento > * { grid-column: span 2; position: relative; overflow: hidden; border-radius: var(--th-radius-xl); background: var(--th-surface-1); border: 1px solid var(--th-border); padding: clamp(20px, 2.6vw, 32px); }
.th-bento .th-span-3 { grid-column: span 3; }
.th-bento .th-span-4 { grid-column: span 4; }
.th-bento .th-span-6 { grid-column: span 6; }
.th-bento .th-row-2 { grid-row: span 2; }
.th-bento-glow::before { content: ""; position: absolute; inset: auto -20% -50% auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, var(--brand-soft), transparent); pointer-events: none; }
@media (max-width: 899.98px) { .th-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } .th-bento > *, .th-bento .th-span-3, .th-bento .th-span-4, .th-bento .th-span-6 { grid-column: span 2; } .th-bento .th-row-2 { grid-row: auto; } }

/* ── Split media ── */
.th-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 88px); align-items: center; }
.th-split + .th-split { margin-top: var(--th-section-y); }
.th-split-reverse > :first-child { order: 2; }
.th-split .th-lede { margin-top: var(--th-space-4); }
.th-checks { list-style: none; margin: var(--th-space-6) 0 0; padding: 0; display: grid; gap: var(--th-space-3); }
.th-checks li { position: relative; padding-left: 30px; color: var(--th-text-2); }
.th-checks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-line); }
.th-checks li::after { content: ""; position: absolute; left: 7px; top: 6px; width: 6px; height: 10px; border: solid var(--brand-accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.th-media { position: relative; border-radius: var(--th-radius-xl); overflow: hidden; background: var(--th-surface-1); border: 1px solid var(--th-border-2); box-shadow: var(--th-shadow-4); }
.th-media > img, .th-media > video { display: block; width: 100%; height: auto; }
.th-window-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; background: var(--th-surface-2); border-bottom: 1px solid var(--th-border); }
.th-window-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--th-surface-4); }
.th-window-bar span { margin-left: 10px; font: var(--th-fs-xs) var(--th-font-mono); color: var(--th-text-3); }
@media (max-width: 899.98px) { .th-hero-grid, .th-split { grid-template-columns: 1fr; } .th-split-reverse > :first-child { order: 0; } }

/* ── Metrics band ── */
.th-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 1px; border-radius: var(--th-radius-xl); overflow: hidden; background: var(--th-border); border: 1px solid var(--th-border); }
.th-metric { padding: clamp(20px, 3vw, 32px); background: var(--th-surface-1); }
.th-metric-value { font: var(--th-fw-black) var(--th-fs-3xl)/1 var(--th-font-display); letter-spacing: var(--th-tracking-display); font-variant-numeric: tabular-nums; }
.th-metric-label { margin-top: var(--th-space-2); color: var(--th-text-2); font-size: var(--th-fs-sm); }

/* ── Steps ── */
.th-steps { list-style: none; margin: 0; padding: 0; counter-reset: th-step; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--th-space-6); }
.th-steps > li { counter-increment: th-step; position: relative; padding-top: 56px; }
.th-steps > li::before { content: counter(th-step, decimal-leading-zero); position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font: var(--th-fw-bold) var(--th-fs-sm)/1 var(--th-font-mono); color: var(--brand-accent); background: var(--brand-soft); border: 1px solid var(--brand-line); }
.th-steps > li::after { content: ""; position: absolute; top: 20px; left: 52px; right: -12px; height: 1px; background: linear-gradient(90deg, var(--brand-line), transparent); }
.th-steps > li:last-child::after { display: none; }
.th-steps h3 { font-size: var(--th-fs-md); font-weight: var(--th-fw-semibold); }
.th-steps p { margin-top: var(--th-space-2); color: var(--th-text-2); font-size: var(--th-fs-sm); line-height: var(--th-lh-relaxed); }

/* ── Pricing ── */
.th-pricing-toggle { display: inline-flex; padding: 3px; margin: 0 auto var(--th-space-8); border-radius: var(--th-radius-full); background: var(--th-surface-2); border: 1px solid var(--th-border); }
.th-pricing-toggle button { height: 34px; padding: 0 16px; border: 0; border-radius: var(--th-radius-full); background: none; color: var(--th-text-2); font: var(--th-fw-semibold) var(--th-fs-sm) var(--th-font-sans); cursor: pointer; }
.th-pricing-toggle button[aria-pressed="true"] { background: var(--th-surface-4); color: var(--th-text); box-shadow: var(--th-shadow-1); }
.th-pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--th-space-4); align-items: stretch; }
.th-plan { position: relative; display: flex; flex-direction: column; padding: clamp(22px, 2.6vw, 30px); border-radius: var(--th-radius-xl); background: var(--th-surface-1); border: 1px solid var(--th-border); }
.th-plan-popular { border-color: var(--brand-line); box-shadow: var(--brand-glow); background: linear-gradient(180deg, var(--brand-soft), var(--th-surface-1) 40%); }
.th-plan-popular::before { content: attr(data-th-ribbon); position: absolute; top: -12px; left: 50%; transform: translateX(-50%); height: 24px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: var(--th-radius-full); background: var(--brand-accent); color: var(--brand-on); font: var(--th-fw-bold) var(--th-fs-2xs)/1 var(--th-font-sans); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.th-plan h3 { font-size: var(--th-fs-lg); font-weight: var(--th-fw-semibold); }
.th-plan-tagline { margin-top: var(--th-space-1); color: var(--th-text-2); font-size: var(--th-fs-sm); min-height: 2.6em; }
.th-price { display: flex; align-items: baseline; gap: 6px; margin: var(--th-space-5) 0; }
.th-price strong { font: var(--th-fw-black) var(--th-fs-3xl)/1 var(--th-font-display); letter-spacing: var(--th-tracking-display); font-variant-numeric: tabular-nums; }
.th-price span { color: var(--th-text-3); font-size: var(--th-fs-sm); }
.th-plan ul { list-style: none; margin: 0 0 var(--th-space-6); padding: 0; display: grid; align-content: start; gap: 10px; flex: 1; font-size: var(--th-fs-sm); color: var(--th-text-2); }
.th-plan li { position: relative; padding-left: 26px; }
.th-plan li::before { content: ""; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-line); }
.th-plan li::after { content: ""; position: absolute; left: 5px; top: 6px; width: 6px; height: 8px; border: solid var(--brand-accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.th-pricing-note { margin-top: var(--th-space-6); text-align: center; color: var(--th-text-3); font-size: var(--th-fs-sm); }
.th-skeleton { position: relative; overflow: hidden; background: var(--th-surface-2); border-radius: var(--th-radius-sm); }
.th-skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--th-hover), transparent); animation: th-shimmer 1.4s infinite; }
@keyframes th-shimmer { to { transform: translateX(100%); } }

/* ── Testimonial ── */
.th-quote { margin: 0; padding: clamp(24px, 4vw, 48px); border-radius: var(--th-radius-xl); background: var(--th-surface-1); border: 1px solid var(--th-border); }
.th-quote blockquote { margin: 0; font-size: var(--th-fs-xl); line-height: 1.5; letter-spacing: -.01em; text-wrap: pretty; }
.th-quote blockquote::before { content: "“"; display: block; height: .55em; font: var(--th-fw-black) 3.5em/1 Georgia, serif; color: var(--brand-accent); }
.th-quote figcaption { display: flex; align-items: center; gap: 12px; margin-top: var(--th-space-6); color: var(--th-text-2); font-size: var(--th-fs-sm); }
.th-quote figcaption img { width: 40px; height: 40px; border-radius: 50%; }
.th-quote figcaption strong { display: block; color: var(--th-text); }

/* ── FAQ (details/summary) ── */
.th-faq { display: grid; gap: var(--th-space-2); }
.th-faq details { border-radius: var(--th-radius-md); background: var(--th-surface-1); border: 1px solid var(--th-border); transition: border-color var(--th-dur-2); }
.th-faq details[open] { border-color: var(--th-border-2); }
.th-faq summary { position: relative; display: block; padding: 18px 52px 18px 20px; cursor: pointer; list-style: none; font-weight: var(--th-fw-semibold); }
.th-faq summary::-webkit-details-marker { display: none; }
.th-faq summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; border: solid var(--th-text-3); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); transition: transform var(--th-dur-2) var(--th-ease); }
.th-faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.th-faq summary:focus-visible { outline: none; box-shadow: var(--th-ring); border-radius: var(--th-radius-md); }
.th-faq details > :not(summary) { padding: 0 20px 18px; color: var(--th-text-2); line-height: var(--th-lh-relaxed); }

/* ── CTA band ── */
.th-cta { position: relative; overflow: hidden; isolation: isolate; padding: clamp(40px, 6vw, 80px) clamp(24px, 5vw, 64px); border-radius: var(--th-radius-2xl); text-align: center; background: var(--th-surface-1); border: 1px solid var(--brand-line); }
.th-cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 120% at 50% 0%, color-mix(in srgb, var(--brand-1) 24%, transparent), transparent 70%), radial-gradient(40% 80% at 90% 100%, color-mix(in srgb, var(--brand-2) 16%, transparent), transparent 70%); }
.th-cta .th-lede { max-width: 56ch; margin: var(--th-space-4) auto 0; }
.th-cta .th-hero-actions { justify-content: center; }

/* ── Code ── */
.th-code { position: relative; border-radius: var(--th-radius-lg); background: var(--th-code-bg); border: 1px solid var(--th-border-2); color: #e6edf3; overflow: hidden; }
.th-code-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 40px; padding: 0 8px 0 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); font: var(--th-fs-xs) var(--th-font-mono); color: #8b97a8; }
.th-code pre { margin: 0; padding: 16px 18px; overflow: auto; font: 13px/1.65 var(--th-font-mono); tab-size: 2; }
.th-code code { font: inherit; color: inherit; background: none; padding: 0; }
.th-copy { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .04); color: #c9d1d9; font: var(--th-fw-medium) 12px var(--th-font-sans); cursor: pointer; }
.th-copy:hover { background: rgba(255, 255, 255, .1); }
.th-copy[data-copied] { color: #4ade80; }
.th-code > .th-copy { position: absolute; top: 8px; right: 8px; opacity: 0; transition: opacity var(--th-dur-1); }
.th-code:hover > .th-copy, .th-code > .th-copy:focus-visible { opacity: 1; }
.th-tok-c { color: #7d8799; } .th-tok-k { color: #ff7b72; } .th-tok-s { color: #a5d6ff; } .th-tok-n { color: #79c0ff; } .th-tok-f { color: #d2a8ff; }
:where(.th) :not(pre) > code { padding: .12em .4em; border-radius: 5px; background: var(--th-surface-3); border: 1px solid var(--th-border); font-size: .88em; }

/* ── App cards (ecosystem grids; add data-brand="<slug>" per card) ── */
.th-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--th-space-4); }
.th-app-card { position: relative; display: flex; flex-direction: column; gap: var(--th-space-3); padding: 24px; border-radius: var(--th-radius-xl); background: var(--th-surface-1); border: 1px solid var(--th-border); color: var(--th-text); text-decoration: none !important; overflow: hidden; isolation: isolate; transition: transform var(--th-dur-2) var(--th-ease), border-color var(--th-dur-2), box-shadow var(--th-dur-2); }
.th-app-card::before { content: ""; position: absolute; inset: -1px -1px auto; height: 120px; z-index: -1; background: radial-gradient(80% 100% at 20% 0%, var(--brand-soft), transparent 70%); opacity: .7; transition: opacity var(--th-dur-2); }
.th-app-card:hover { transform: translateY(-4px); border-color: var(--brand-line); box-shadow: var(--th-shadow-3), var(--brand-glow); }
.th-app-card:hover::before { opacity: 1; }
.th-app-card-top { display: flex; align-items: center; gap: 14px; }
.th-app-card-mark { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--th-surface-2); border: 1px solid var(--th-border-2); flex: none; }
.th-app-card-mark img { width: 38px; height: 38px; }
.th-app-card h3 { font-size: var(--th-fs-lg); font-weight: var(--th-fw-bold); letter-spacing: -.01em; }
.th-app-card p { color: var(--th-text-2); font-size: var(--th-fs-sm); line-height: var(--th-lh-relaxed); flex: 1; }
.th-app-card .th-link-arrow { margin-top: 0; }

/* ── Alerts (shared by landing, system and docs pages) ── */
.th-alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--th-radius-md); border: 1px solid var(--th-border-2); background: var(--th-surface-2); font-size: var(--th-fs-sm); }
.th-alert::before { content: ""; flex: none; width: 4px; border-radius: 4px; background: var(--th-sky); }
.th-alert strong { display: block; margin-bottom: 2px; }
.th-alert-success { background: var(--th-success-soft); border-color: transparent; } .th-alert-success::before { background: var(--th-green); }
.th-alert-warning { background: var(--th-warning-soft); border-color: transparent; } .th-alert-warning::before { background: var(--th-amber); }
.th-alert-danger { background: var(--th-danger-soft); border-color: transparent; } .th-alert-danger::before { background: var(--th-red); }
.th-alert-info { background: var(--th-info-soft); border-color: transparent; }

/* ── Utilities ── */
.th-grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--th-space-4); }
.th-mt-2 { margin-top: var(--th-space-2) !important; } .th-mt-4 { margin-top: var(--th-space-4) !important; } .th-mt-6 { margin-top: var(--th-space-6) !important; } .th-mt-8 { margin-top: var(--th-space-8) !important; } .th-mt-12 { margin-top: var(--th-space-12) !important; }
.th-media > .th-code { border: 0; border-radius: 0; }
.th-plan.th-skeleton { min-height: 420px; }
.th-quote figcaption .th-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand-grad); color: #fff; font-weight: var(--th-fw-bold); }

/* ── Scroll reveal (ui.js adds .th-reveal-on to <html>; skipped under reduced motion) ── */
.th-reveal-on [data-th-reveal]:not(.th-in) { opacity: 0; transform: translateY(18px); }
.th-reveal-on [data-th-reveal] { transition: opacity var(--th-dur-4) var(--th-ease), transform var(--th-dur-4) var(--th-ease); transition-delay: calc(var(--th-i, 0) * 70ms); }

@media (prefers-reduced-motion: reduce) {
  .th-hero-mark::after, .th-orbit, .th-dot-live::after, .th-skeleton::after { animation: none; }
  .th-btn:hover, a.th-card:hover, .th-app-card:hover { transform: none; }
}
.th-apps[data-th-apps] .th-app-card > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
