/* ==========================================================================
   FRACTAL DESIGN SYSTEM: BRUTALIST UI COMPONENTS
   Copyright (c) 2026 FRACTAL LABS LLC. All rights reserved.
   Strict Zero Emojis Standard.
   ========================================================================== */

/* Control Buttons & Top Strip Components */
button,
.ctrl-btn,
.tier-btn,
.replay-btn,
.nav-cta,
.hero-cta-primary,
.hero-cta-secondary {
  font-family: var(--font-fa-display), inherit;
}

.ctrl-label {
  opacity: 0.75;
  font-weight: 700;
}

.ctrl-btn {
  background: transparent;
  border: 1px solid var(--color-grid-hairline);
  color: inherit;
  padding: 3px 8px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 100ms linear, color 100ms linear;
}

.ctrl-btn.active,
.ctrl-btn:hover {
  background: var(--color-ink-block);
  color: var(--color-text-on-ink);
  border-color: var(--color-ink-block);
}

[data-theme="obsidian-term"] .ctrl-btn.active {
  background: var(--color-accent-signal);
  color: #050608;
  border-color: var(--color-accent-signal);
}

/* Orientation Header Badges */
.ctx-tag {
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-accent-signal);
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
}

/* Hotkey Indicator Pill */
.hotkey-pill {
  font-family: inherit;
  font-size: 9px;
  padding: 1px 4px;
  background: rgba(7, 9, 12, 0.12);
  border: 1px solid var(--color-grid-hairline);
  color: inherit;
  font-weight: 700;
}

[data-theme="obsidian-term"] .hotkey-pill {
  background: rgba(230, 237, 243, 0.12);
}

/* Nav CTA Button */
.nav-cta {
  background-color: var(--color-ink-block);
  color: var(--color-text-on-ink);
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid var(--color-ink-block);
  cursor: pointer;
  transition: background 120ms linear, color 120ms linear;
}

.nav-cta:hover {
  background-color: transparent;
  color: inherit;
}

/* Chart Canvas Sliced Tiles */
.cell-chart-tile {
  cursor: crosshair;
  background-color: var(--color-canvas);
}

.cell-chart-tile canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.tile-coord-badge {
  position: relative;
  z-index: 2;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  color: var(--color-ink-block);
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  opacity: 0.82;
}

[data-theme="obsidian-term"] .tile-coord-badge {
  color: var(--color-text-on-ink);
}

/* Solid Ink Anchor Cells (Nachtschicht Proportions) */
.cell-ink {
  background-color: var(--color-ink-block);
  color: var(--color-text-on-ink);
  padding: 20px;
  z-index: 3;
}

[data-theme="obsidian-term"] .cell-ink {
  border: 1px solid var(--color-grid-hairline);
}

.hero-headline {
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

html[lang="en"] .hero-headline {
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero-subcopy {
  font-size: 0.84rem;
  line-height: 1.6;
  opacity: 0.86;
  margin-top: 14px;
}

.big-metric {
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.5rem, 4.2vw, 3.8rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--color-text-on-ink);
}

.metric-title {
  font-size: 0.95rem;
  font-weight: 800;
  margin-top: 8px;
  text-transform: uppercase;
  color: var(--color-accent-signal);
}

.metric-footnote {
  font-size: 0.78rem;
  opacity: 0.8;
  line-height: 1.45;
}

/* Fractal Triangle Analyzer Component */
.fractal-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14); /* taste-skill-ignore */
  padding-bottom: 10px;
}

.tf-pills {
  display: flex;
  gap: 4px;
  direction: ltr;
}

.tf-pill {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-on-ink);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  font-family: inherit;
  font-size: 10px;
  cursor: pointer;
}

.tf-pill.active {
  background: var(--color-accent-signal);
  color: #050608;
  border-color: var(--color-accent-signal);
  font-weight: 800;
}

.fractal-svg-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
}

.fractal-svg-stage svg {
  width: 100%;
  max-height: 255px;
  overflow: visible;
}

.fractal-sub-tri {
  cursor: pointer;
  transition: fill-opacity 120ms linear, stroke 120ms linear;
}

.fractal-sub-tri:hover {
  stroke: var(--color-accent-signal);
}

.fractal-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14); /* taste-skill-ignore */
  padding-top: 10px;
  opacity: 0.9;
}

/* Replay Controller Buttons */
.replay-controls {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.replay-btn {
  background: var(--color-accent-signal);
  color: #06080A;
  border: none;
  padding: 9px 14px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 100ms linear;
}

.replay-btn.secondary {
  background: transparent;
  color: var(--color-text-on-ink);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.replay-btn:hover {
  opacity: 0.85;
}

/* Output Matrix Cells */
.matrix-cell {
  padding: 32px 28px;
  background: rgba(7, 9, 12, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  transition: background-color 120ms linear, color 120ms linear;
}

[data-theme="obsidian-term"] .matrix-cell {
  background: rgba(230, 237, 243, 0.04);
}

.matrix-cell:hover {
  background-color: var(--color-ink-block);
  color: var(--color-text-on-ink);
}

.matrix-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 800;
}

.matrix-cell:hover .matrix-index {
  color: var(--color-accent-signal);
}

.cell-title {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 8px;
}

.cell-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  opacity: 0.88;
}

.cell-telemetry-tag {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 12px;
  margin-top: 16px;
  background: rgba(7, 9, 12, 0.08);
  color: var(--color-ink-block);
  border-inline-start: 3px solid var(--color-ink-block);
  transition: background 120ms linear, color 120ms linear, border-color 120ms linear;
}

[data-theme="obsidian-term"] .cell-telemetry-tag {
  background: rgba(230, 237, 243, 0.08);
  color: var(--color-accent-signal);
  border-inline-start-color: var(--color-accent-signal);
}

.matrix-cell:hover .cell-telemetry-tag {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-accent-signal);
  border-inline-start-color: var(--color-accent-signal);
}

/* Pricing Tiers */
.tier-cell {
  padding: 32px 28px;
  background: rgba(7, 9, 12, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

[data-theme="obsidian-term"] .tier-cell {
  background: rgba(230, 237, 243, 0.04);
}

.tier-cell.featured {
  background-color: var(--color-ink-block);
  color: var(--color-text-on-ink);
}

.tier-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tier-name {
  font-size: 1.15rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tier-badge {
  background: var(--color-accent-signal);
  color: #050608;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
}


.tier-price {
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  font-size: 2.2rem;
  font-weight: 800;
  margin: 10px 0 4px;
}

.tier-specs {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.tier-specs li {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.tier-btn {
  width: 100%;
  padding: 12px 16px;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid var(--color-ink-block);
  background: var(--color-ink-block);
  color: var(--color-text-on-ink);
  text-align: center;
  transition: opacity 120ms linear;
}

.tier-cell.featured .tier-btn {
  background: var(--color-accent-signal);
  color: #050608;
  border-color: var(--color-accent-signal);
}

/* Technical FAQ Accordion */
.faq-item {
  border-bottom: 2px solid var(--color-grid-hairline);
}

.faq-trigger {
  width: 100%;
  background: transparent;
  border: none;
  color: inherit;
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  text-align: start;
}

.faq-answer {
  display: none;
  padding-bottom: 16px;
  font-size: 0.86rem;
  line-height: 1.7;
  opacity: 0.86;
}

.faq-item.open .faq-answer {
  display: block;
}

/* Non-Intrusive Execution Toasts */
.toast-container {
  position: fixed;
  bottom: 24px;
  inset-inline-end: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast-card {
  pointer-events: auto;
  background-color: var(--color-ink-block);
  color: var(--color-text-on-ink);
  border: 1px solid var(--color-accent-signal);
  padding: 12px 18px;
  min-width: 280px;
  max-width: 380px;
  font-family: inherit;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: toastFadeIn 180ms ease-out;
}

@keyframes toastFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Cheatsheet Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: var(--color-canvas);
  color: var(--color-ink-block);
  border: 2px solid var(--color-ink-block);
  max-width: 520px;
  width: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

[data-theme="obsidian-term"] .modal-card {
  background: #0D1117;
  color: var(--color-text-on-ink);
  border-color: var(--color-accent-signal);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid currentColor;
  padding-bottom: 8px;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 900;
  text-transform: uppercase;
}

.modal-close-btn {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}

.hotkey-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

