/* =============================================
   maji by majaco — Main Stylesheet
   Mobile-first responsive design
   ============================================= */

@import './variables.css';

/* TT Hoves Pro — majaco brand typeface */
@font-face {
  font-family: 'TT Hoves Pro';
  src: url('../assets/fonts/TT_Hoves_Pro_Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'TT Hoves Pro';
  src: url('../assets/fonts/TT_Hoves_Pro_Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'TT Hoves Pro';
  src: url('../assets/fonts/TT_Hoves_Pro_Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* =============================================
   RESET & BASE
   ============================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-light);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

h1, h2, h3 {
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-normal);
  letter-spacing: -0.02em;
}

h4 {
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-normal);
}

h5, h6 {
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-bold);
}

/* =============================================
   UTILITIES
   ============================================= */

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-green { color: var(--color-accent); }
.text-muted  { color: var(--color-text-muted); }
.text-center { text-align: center; }
.text-left   { text-align: left; }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   BUTTONS
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  border-radius: var(--radius-full);
  transition: background-color var(--transition-base),
              color var(--transition-base),
              box-shadow var(--transition-base),
              transform var(--transition-base);
  white-space: nowrap;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--color-accent);
  color: #001412;
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.btn-primary:hover {
  background-color: #c8de18;
  box-shadow: 0 4px 20px rgba(218, 241, 27, 0.30);
}

.btn-primary:hover::after {
  opacity: 1;
}

.btn-dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  border: 1px solid transparent;
}

.btn-dark:hover {
  background-color: var(--color-bg-dark-2);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  background-color: var(--color-primary-light);
}

.btn-outline-white {
  background-color: transparent;
  color: var(--color-text-light);
  border: 2px solid rgba(255,255,255,0.4);
}

.btn-outline-white:hover {
  background-color: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.8);
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: var(--font-size-lg);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: var(--font-size-sm);
}

/* =============================================
   NAVIGATION
   ============================================= */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background-color: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: box-shadow var(--transition-base);
}

.nav.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--nav-text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav__logo span {
  color: var(--color-primary);
}

.nav__logo img {
  height: 32px;
  width: auto;
}

.nav__logo-mark {
  width: 36px;
  height: 36px;
  background-color: var(--color-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-base);
  color: #FFFFFF;
}

.nav__links {
  display: none;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
}

.nav__links a {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--nav-link-color);
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width var(--transition-base);
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--nav-link-hover);
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

.nav__cta {
  display: none;
}

.nav__hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--nav-text);
  border-radius: var(--radius-full);
  transition: transform var(--transition-base),
              opacity var(--transition-base);
}

.nav__hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav__hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu */
.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background-color: var(--color-bg-dark);
  border-bottom: 1px solid var(--nav-border);
  padding: var(--space-lg) var(--container-padding) var(--space-xl);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: calc(var(--z-sticky) - 1);
  flex-direction: column;
  gap: var(--space-md);
}

.nav__mobile.open {
  display: flex;
}

.nav__mobile a {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  color: rgba(255, 255, 255, 0.85);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.nav__mobile a:last-child {
  border-bottom: none;
}

.nav__mobile .btn {
  margin-top: var(--space-sm);
  text-align: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .nav__links {
    display: flex;
  }

  .nav__cta {
    display: flex;
  }

  .nav__hamburger {
    display: none;
  }
}

/* =============================================
   HERO SECTION
   ============================================= */

.hero {
  padding-top: calc(var(--nav-height) + var(--space-4xl));
  padding-bottom: var(--space-4xl);
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle at 30% 40%, rgba(0, 100, 88, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(64, 145, 108, 0.08) 0%, transparent 50%);
  pointer-events: none;
  animation: heroGlow 8s ease-in-out infinite alternate;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 100, 88, 0.06) 0%, transparent 60%);
  pointer-events: none;
  animation: heroGlow 10s ease-in-out infinite alternate-reverse;
}

@keyframes heroGlow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.7; }
  100% { transform: scale(1.15) translate(20px, -10px); opacity: 1; }
}

/* Subtle grid overlay on hero */
.hero .container {
  position: relative;
  z-index: 1;
}

.hero__content {
  max-width: 760px;
}

.hero__content > * {
  animation: heroFadeUp 0.8s ease-out both;
}

.hero__content > :nth-child(1) { animation-delay: 0.1s; }
.hero__content > :nth-child(2) { animation-delay: 0.25s; }
.hero__content > :nth-child(3) { animation-delay: 0.4s; }
.hero__content > :nth-child(4) { animation-delay: 0.55s; }

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

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background-color: rgba(218, 241, 27, 0.12);
  color: var(--color-accent);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  padding: 0.375rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-xl);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero__eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background-color: var(--color-accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.hero__title {
  font-size: clamp(var(--font-size-4xl), 6vw, var(--font-size-5xl));
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-tight);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xl);
  color: var(--color-text-light);
}

.hero__title .highlight {
  color: var(--color-accent);
  -webkit-text-fill-color: var(--color-accent);
  position: relative;
}

.hero__subtitle {
  font-size: clamp(var(--font-size-lg), 2.5vw, var(--font-size-2xl));
  color: rgba(255, 255, 255, 0.65);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-2xl);
  max-width: 600px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-3xl);
  padding-top: var(--space-3xl);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  max-width: 500px;
}

.hero__stat-number {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
  line-height: 1;
}

.hero__stat-label {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.5);
  margin-top: var(--space-xs);
  line-height: var(--line-height-snug);
}

.hero__stats > div {
  animation: heroFadeUp 0.8s ease-out both;
}
.hero__stats > div:nth-child(1) { animation-delay: 0.7s; }
.hero__stats > div:nth-child(2) { animation-delay: 0.85s; }
.hero__stats > div:nth-child(3) { animation-delay: 1.0s; }

/* =============================================
   SECTION BASE
   ============================================= */

.section {
  padding-block: var(--section-padding-y);
}

.section--alt {
  background-color: var(--color-bg-alt);
}

.section--dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
}

.section__header {
  margin-bottom: var(--space-3xl);
}

.section__header.text-center {
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: var(--space-3xl);
}

.section__eyebrow {
  display: inline-block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

.section__title {
  font-size: clamp(var(--font-size-3xl), 4vw, var(--font-size-4xl));
  font-weight: var(--font-weight-normal);
  letter-spacing: -0.02em;
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-lg);
}

.section--dark .section__title {
  color: var(--color-text-light);
}

.section__description {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
}

.section--dark .section__description {
  color: rgba(255, 255, 255, 0.65);
}

/* =============================================
   WHAT IS MAJI (about intro)
   ============================================= */

.about-intro {
  display: grid;
  gap: var(--space-3xl);
  align-items: center;
}

.about-intro__content .label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

.about-intro__content h2 {
  font-size: clamp(var(--font-size-3xl), 4vw, var(--font-size-4xl));
  font-weight: var(--font-weight-normal);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xl);
}

.about-intro__content p {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-xl);
}

@media (min-width: 1024px) {
  .about-intro {
    grid-template-columns: 1fr 1fr;
  }
}

/* =============================================
   PROBLEM FRAMEWORK
   ============================================= */

.problem-grid {
  display: grid;
  gap: var(--space-xl);
}

.problem-card {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.problem-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: rgba(0, 100, 88, 0.25);
}

.problem-card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.problem-card__body {
  padding: var(--space-xl) var(--space-2xl) var(--space-2xl);
}

/* Cards without .problem-card__body get padding directly */
.problem-card__number {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.problem-card__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-md);
}

.problem-card__text {
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
}

/* Fallback: cards without images get left accent + padding */
.problem-card--text-only {
  padding: var(--space-2xl);
}

.problem-card--text-only::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--color-primary);
  border-radius: var(--radius-full) 0 0 var(--radius-full);
}

@media (min-width: 768px) {
  .problem-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =============================================
   FEATURES / TOOLS GRID
   ============================================= */

.tools-grid {
  display: grid;
  gap: var(--space-xl);
}

.tool-card {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.tool-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: rgba(0, 100, 88, 0.3);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card__icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, rgba(0, 100, 88, 0.08) 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.tool-card:hover .tool-card__icon {
  transform: scale(1.08);
}

.tool-card__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-snug);
}

.tool-card__description {
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
  flex: 1;
}

.tool-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  margin-top: var(--space-sm);
  transition: gap var(--transition-fast);
}

.tool-card__link::after {
  content: '→';
  transition: transform var(--transition-fast);
}

.tool-card:hover .tool-card__link {
  gap: var(--space-sm);
}

.tool-card:hover .tool-card__link::after {
  transform: translateX(4px);
}

@media (min-width: 640px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.locked-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

@media (max-width: 700px) {
  .locked-grid {
    grid-template-columns: 1fr;
  }
}

a.tool-card--locked {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-top: var(--space-xl);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-xl);
  transition: box-shadow 0.3s ease, border-color 0.2s ease;
}

.locked-grid a.tool-card--locked {
  margin-top: 0;
}

a.tool-card--locked:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.tool-card--locked__inner {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.tool-card--locked__content {
  flex: 1;
}

.tool-card--locked .tool-card__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-xs);
}

.tool-card--locked .tool-card__description {
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-sm);
}

.tool-card--locked .tool-card__icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  font-size: 1.5rem;
}

.tool-card--locked .tool-card__link {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

/* =============================================
   CTA BANNER
   ============================================= */

.cta-banner {
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  text-align: center;
  padding-block: var(--space-4xl);
}

.cta-banner__title {
  font-size: clamp(var(--font-size-3xl), 5vw, var(--font-size-4xl));
  font-weight: var(--font-weight-normal);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
}

.cta-banner__title .highlight {
  color: var(--color-accent);
  -webkit-text-fill-color: var(--color-accent);
}

.cta-banner__subtitle {
  font-size: var(--font-size-lg);
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: var(--space-2xl);
  max-width: 500px;
  margin-inline: auto;
}

/* =============================================
   CONTACT FORM
   ============================================= */

.contact-section {
  background-color: var(--color-bg-alt);
}

.contact-grid {
  display: grid;
  gap: var(--space-3xl);
  align-items: start;
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr 1.4fr;
  }
}

.contact-info__title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-normal);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
}

.contact-info__text {
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-2xl);
}

.contact-info__locations {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.location-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.location-item__city {
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
}

.location-item__address {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-snug);
}

.location-item__phone a {
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  text-decoration: none;
}

.location-item__phone a:hover {
  color: var(--color-primary);
}

.contact-form-card {
  background-color: var(--color-bg);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-lg);
}

.cta-simple {
  background-color: var(--color-bg);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.cta-simple h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.cta-simple p {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.form-group label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

.form-group label .required {
  color: var(--color-primary);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: var(--font-size-base);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-bg);
  color: var(--color-text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 100, 88, 0.15);
}

.form-control::placeholder {
  color: var(--color-text-subtle);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.form-checkbox span {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: var(--line-height-normal);
}

.form-checkbox a {
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
  text-decoration: underline;
}

.form-submit {
  width: 100%;
  justify-content: center;
}

.form-message {
  display: none;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  margin-top: var(--space-md);
}

.form-message.success {
  display: block;
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.form-message.error {
  display: block;
  background-color: #FEE2E2;
  color: #991B1B;
}

/* =============================================
   TOOL PAGE LAYOUT
   ============================================= */

.tool-page {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-4xl);
  min-height: auto;
}

.tool-page__header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-3xl);
}

.tool-page__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background-color: rgba(0, 100, 88, 0.1);
  color: var(--color-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  padding: 0.375rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-lg);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tool-page__title {
  font-size: clamp(var(--font-size-3xl), 5vw, var(--font-size-4xl));
  font-weight: var(--font-weight-normal);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
}

.tool-page__description {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
}

.tool-disclaimer {
  background-color: var(--color-bg-alt);
  border: none;
  border-top: 2px solid var(--color-border);
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2xl);
  line-height: 1.5;
}

.tool-disclaimer::before {
  float: left;
  margin-right: var(--space-sm);
}

.tool-disclaimer::before {
  content: '\2139\FE0F';
  font-size: var(--font-size-base);
  flex-shrink: 0;
  line-height: 1.4;
}

.content-card {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  margin-bottom: var(--space-xl);
}

.container--wide {
  max-width: 1800px;
}

.content-card--wide .cascade-scroll {
  overflow-x: auto;
}

.content-card h2 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}

.content-card h3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.content-card p {
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-md);
}

.content-card p:last-child {
  margin-bottom: 0;
}

.content-card ul,
.content-card ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.content-card ul li,
.content-card ol li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
}

.content-card ul li::before {
  content: '▸';
  color: var(--color-primary);
  font-size: var(--font-size-xs);
  position: absolute;
  left: 0;
  top: 4px;
}

.content-card ol {
  counter-reset: list-counter;
}

.content-card ol li {
  counter-increment: list-counter;
}

.content-card ol li::before {
  content: counter(list-counter) '.';
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  position: absolute;
  left: 0;
  top: 0;
}

/* =============================================
   TABLE STYLES
   ============================================= */

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

thead {
  background-color: var(--color-bg-alt);
}

th {
  text-align: left;
  padding: var(--space-md) var(--space-lg);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}

td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
  line-height: var(--line-height-snug);
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background-color: var(--color-bg-alt);
}

/* =============================================
   FORMULA / CODE DISPLAY
   ============================================= */

.formula {
  font-family: var(--font-mono);
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  font-size: var(--font-size-sm);
  color: var(--color-text);
  overflow-x: auto;
  margin-block: var(--space-md);
}

.formula .equals  { color: #7C3AED; }
.formula .op      { color: #D97706; }
.formula .var     { color: #0891B2; }

/* =============================================
   PHASE STEPS
   ============================================= */

.phase-steps {
  display: grid;
  gap: var(--space-xl);
}

.phase-step {
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
}

.phase-step__number {
  width: 48px;
  height: 48px;
  background-color: var(--color-primary);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
  flex-shrink: 0;
}

.phase-step__content h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-sm);
}

.phase-step__content p {
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
}

/* =============================================
   PSYCHOLOGY PITFALLS LIST
   ============================================= */

.pitfalls-list {
  display: grid;
  gap: var(--space-xl);
}

.pitfall-item {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
  transition: box-shadow var(--transition-base);
}

.pitfall-item:hover {
  box-shadow: var(--shadow-lg);
}

.pitfall-item__num {
  width: 42px;
  height: 42px;
  background-color: var(--color-primary);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-base);
  flex-shrink: 0;
}

.pitfall-item__body h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-md);
}

.pitfall-item__body p {
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
}

/* =============================================
   FOOTER
   ============================================= */

.footer {
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  padding-top: var(--space-4xl);
  padding-bottom: var(--space-2xl);
}

.footer__top {
  display: grid;
  gap: var(--space-3xl);
  padding-bottom: var(--space-3xl);
  border-bottom: 1px solid var(--color-border-dark);
}

@media (min-width: 768px) {
  .footer__top {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .footer__top {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer__brand {
  max-width: 300px;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-light);
  text-decoration: none;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
}

.footer__logo img {
  height: 40px;
  width: auto;
}

.footer__logo-mark {
  width: 36px;
  height: 36px;
  background-color: var(--color-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-base);
  color: #FFFFFF;
}

.footer__tagline {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.5);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-xl);
}

.footer__social {
  display: flex;
  gap: var(--space-md);
}

.footer__social a {
  width: 36px;
  height: 36px;
  background-color: rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.footer__social a img {
  width: 18px;
  height: 18px;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}

.footer__social a:hover {
  background-color: var(--color-primary);
  color: #FFFFFF;
}

.footer__social a:hover img {
  opacity: 1;
}

.footer__col-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: var(--space-lg);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__links a {
  font-size: var(--font-size-sm);
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color var(--transition-fast);
  line-height: var(--line-height-snug);
}

.footer__links a:hover {
  color: var(--color-primary);
}

.footer__address {
  font-size: var(--font-size-sm);
  color: rgba(255,255,255,0.5);
  line-height: var(--line-height-relaxed);
}

.footer__address strong {
  display: block;
  color: rgba(255,255,255,0.8);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-xs);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer__address a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer__address a:hover {
  color: var(--color-primary);
}

.footer__bottom {
  padding-top: var(--space-xl);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  justify-content: space-between;
}

.footer__copyright {
  font-size: var(--font-size-xs);
  color: rgba(255,255,255,0.35);
}

.footer__legal {
  display: flex;
  gap: var(--space-lg);
}

.footer__legal a {
  font-size: var(--font-size-xs);
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer__legal a:hover {
  color: rgba(255,255,255,0.7);
}

/* =============================================
   PAGE HERO (inner pages)
   ============================================= */

.page-hero {
  padding-top: calc(var(--nav-height) + var(--space-2xl));
  padding-bottom: var(--space-2xl);
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.page-hero__eyebrow {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
  display: inline-block;
}

.page-hero__title {
  font-size: clamp(var(--font-size-3xl), 5vw, var(--font-size-4xl));
  font-weight: var(--font-weight-normal);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
  color: var(--color-text-light);
}

.page-hero__subtitle {
  font-size: var(--font-size-lg);
  color: rgba(255, 255, 255, 0.65);
  max-width: 680px;
  line-height: var(--line-height-relaxed);
}

/* =============================================
   BREADCRUMB
   ============================================= */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: var(--space-lg);
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

.breadcrumb__sep {
  color: rgba(255, 255, 255, 0.25);
}

/* =============================================
   PRIVACY / LEGAL PAGE
   ============================================= */

.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding-block: var(--space-4xl);
}

.legal-content h2 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-lg);
}

.legal-content p {
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-lg);
}

.legal-content ul {
  list-style: disc;
  padding-left: var(--space-xl);
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-lg);
}

.legal-content ul li {
  margin-bottom: var(--space-sm);
}

/* =============================================
   SCROLL TO TOP
   ============================================= */

.scroll-top {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 44px;
  height: 44px;
  background-color: var(--color-primary);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base), transform var(--transition-base);
  box-shadow: var(--shadow-md);
  z-index: var(--z-sticky);
  border: none;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-green);
}

/* =============================================
   RESPONSIVE HELPERS
   ============================================= */

@media (max-width: 639px) {
  .hide-mobile { display: none !important; }

  .hero {
    min-height: 80vh;
    padding-top: calc(var(--nav-height) + var(--space-3xl));
    padding-bottom: var(--space-3xl);
  }

  .hero__stats {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
  }

  .hero__stat-number {
    font-size: var(--font-size-2xl);
  }

  .section {
    padding-block: var(--section-padding-y-sm);
  }

  .section__header {
    margin-bottom: var(--space-2xl);
  }

  .pitfall-item {
    flex-direction: column;
    gap: var(--space-md);
  }

  .phase-step {
    flex-direction: column;
    gap: var(--space-md);
  }

  .cta-banner {
    padding-block: var(--space-3xl);
  }
}

@media (min-width: 640px) {
  .show-mobile-only { display: none !important; }
}

/* =============================================
   DARK HERO ADJUSTMENTS
   ============================================= */

/* Smooth transition between dark page-hero and white content */
.page-hero + main,
.page-hero + .tool-page,
.page-hero + .section {
  border-top: none;
}

/* Legal content page adjustments */
.legal-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content a:hover {
  color: var(--color-primary-dark);
}

/* =============================================
   PRINT
   ============================================= */

@media print {
  .nav, .footer, .scroll-top, .cta-banner {
    display: none !important;
  }
  body {
    font-size: 12pt;
  }
}

/* =============================================
   CALCULATOR SHARED STYLES
   ============================================= */

.calc-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.calc-grid h3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-xs);
}

.calc-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
}

.calc-row label {
  flex: 1;
  min-width: 180px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}

.calc-row input[type="number"] {
  width: 160px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  transition: border-color var(--transition-fast);
}

.calc-row input[type="number"]:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.2);
}

@media (max-width: 639px) {
  .calc-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }
  .calc-row input[type="number"] {
    width: 100%;
  }
}

/* Result grid */
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
}

.result-item {
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.result-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.result-value {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}

/* =============================================
   SPEED-DOWNTIME SLIDERS
   ============================================= */

.slider-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.slider-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-xs) 0;
}

.slider-row label {
  min-width: 160px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.slider-row input[type="range"] {
  flex: 1;
  min-width: 120px;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--color-border);
  border-radius: var(--radius-full);
  outline: none;
}

.slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--color-primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.slider-row input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.slider-row input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--color-primary);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.slider-value {
  min-width: 110px;
  text-align: right;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}

@media (max-width: 639px) {
  .slider-row {
    flex-wrap: wrap;
  }
  .slider-row label {
    min-width: 100%;
  }
}

/* =============================================
   TIME HIERARCHY CASCADE
   ============================================= */

.th-row {
  display: flex;
  gap: 8px;
}

.th-row > .th-block {
  flex: 1;
}

.th-block {
  border-radius: var(--radius-md);
  padding: var(--space-md);
  position: relative;
  transition: box-shadow 0.3s ease;
}

.th-block__inner {
  position: relative;
}

.th-block .block-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  margin-bottom: 4px;
}

.th-block .block-desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.th-block .block-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.65rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(0,0,0,0.06);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
}

.th-block .expand-icon {
  position: absolute;
  top: 0;
  right: 0;
  width: 22px;
  height: 22px;
  background: rgba(0,0,0,0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
  color: var(--color-text);
}

.th-block.expandable {
  cursor: pointer;
}

.th-block.expandable:hover {
  box-shadow: var(--shadow-md);
}

/* Block types */
.th-root {
  background: linear-gradient(135deg, #004a40, #006458);
  color: #fff;
}

.th-root .block-desc,
.th-root .block-badge {
  color: rgba(255,255,255,0.7);
}

.th-root .expand-icon {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.th-primary {
  background: var(--color-primary-light);
  border: 1px solid var(--color-border);
}

.th-subtracted {
  background: #F3F4F6;
  border: 1px solid var(--color-border);
}

.th-loss {
  background: #FEF9C3;
  border: 1px solid #FDE68A;
}

/* Highlight animations */
.highlight-numerator {
  box-shadow: 0 0 0 3px #22C55E, 0 0 16px rgba(34, 197, 94, 0.4) !important;
  transition: box-shadow 0.3s ease;
}

.highlight-denominator {
  box-shadow: 0 0 0 3px #3B82F6, 0 0 16px rgba(59, 130, 246, 0.4) !important;
  transition: box-shadow 0.3s ease;
}

/* Legend */
.legend-box {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.legend-swatch {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
}

/* =============================================
   SPLIT SOLVER TOOL
   ============================================= */

.ss-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: var(--space-lg);
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0;
}

.ss-tab {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.ss-tab:hover {
  color: var(--color-text);
}

.ss-tab--active {
  color: var(--color-text);
  border-bottom-color: var(--color-primary);
}

.ss-phase h2 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-lg);
}

.ss-phase h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-sm);
  margin-top: var(--space-md);
}

.ss-form-group {
  margin-bottom: var(--space-md);
}

.ss-form-group label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-xs);
  color: var(--color-text);
}

.ss-form-group input[type="text"],
.ss-form-group input[type="number"],
.ss-form-group textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-family: inherit;
  transition: border-color var(--transition-fast);
}

.ss-form-group input:focus,
.ss-form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.2);
}

.ss-row {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-end;
  flex-wrap: wrap;
}

.ss-flex-1 {
  flex: 1;
}

.ss-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  justify-content: flex-end;
  flex-wrap: wrap;
}

.ss-review {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

/* Tree */
.ss-tree {
  margin-bottom: var(--space-lg);
}

.ss-node {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  flex-wrap: wrap;
  transition: border-color var(--transition-fast);
}

.ss-node--ok {
  border-color: var(--color-border);
  background: var(--color-bg-alt);
}

.ss-node--cause {
  border-color: #FECACA;
  background: #FEF2F2;
}

.ss-node--unknown {
  border-color: var(--color-border);
  background: var(--color-bg);
}

.ss-node__header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 1;
  min-width: 0;
  font-size: var(--font-size-sm);
}

.ss-node__values {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.ss-node__actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.ss-node__actions .btn {
  padding: 2px 8px;
  font-size: var(--font-size-xs);
}

.ss-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
}

.ss-status--ok {
  background: #22C55E;
  color: #fff;
}

.ss-status--cause {
  background: #EF4444;
  color: #fff;
}

.ss-status--unknown {
  background: var(--color-border);
  color: var(--color-text-muted);
}

.ss-equation {
  font-family: var(--font-mono);
}

/* Split form */
.ss-split-form {
  margin-left: 28px;
  margin-bottom: 8px;
}

.ss-split-form__inner {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.ss-split-form__inner h4 {
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-sm);
}

.ss-split-row {
  margin-bottom: 4px;
}

.ss-split-row input {
  padding: 4px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-family: inherit;
}

.ss-split-row input:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Phase 3 */
.ss-cause-card {
  border: 1px solid #FECACA;
  border-radius: var(--radius-md);
  background: #FEF2F2;
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.ss-cause-card__header {
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-sm);
}

.ss-cause-card label {
  display: block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-xs);
  color: var(--color-text-muted);
}

.ss-cause-card textarea {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-family: inherit;
}

.ss-cause-card textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Button variants for split solver */
.ss-btn-ok { color: #22C55E !important; }
.ss-btn-cause { color: #EF4444 !important; }

/* =============================================
   INTERACTIVE TOOLS — ENHANCED STYLES
   Green/Pine color scheme + animations
   ============================================= */

/* CSS Custom Properties for tools (brand-aligned) */
:root {
  --pine-primary: #006458;
  --pine-dark: #004a40;
  --pine-accent: #006458;
  --pine-light: #d0f0ea;
  --pine-dark-bg: #001412;
  --pine-primary-rgb: 0, 100, 88;
}

/* =============================================
   TIME HIERARCHY — CSS Grid Cascade (matches majiai.co)
   ============================================= */

/* ---- Controls bar ---- */
.nth-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}

.nth-controls__sep {
  width: 1px;
  height: 24px;
  background: var(--color-border);
  margin: 0 0.25rem;
}

/* ---- Legend ---- */
.nth-legend {
  display: inline-flex;
  gap: 20px;
  margin-top: 10px;
  font-size: 0.85em;
  margin-bottom: 0.5rem;
}

.nth-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nth-legend__swatch {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.nth-legend__swatch--root       { background: linear-gradient(135deg, var(--color-dark, #004a40), var(--color-primary, #006458)); }
.nth-legend__swatch--productive { background: #DAF11B; }
.nth-legend__swatch--loss       { background: #e8e8e8; }
.nth-legend__swatch--amber      { background: #fff3cd; }
.nth-legend__swatch--outcome    { background: #DAF11B; }

/* ---- Cascade scroll wrapper ---- */
.cascade-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 40px 20px;
  background: #f5f5f5;
  border-radius: var(--radius-lg);
  position: relative;
}

/* ---- CSS Grid cascade container ---- */
.cascade-container {
  display: grid;
  grid-template-columns: repeat(100, 1fr);
  grid-template-rows: repeat(7, auto);
  gap: 6px;
  min-width: 0;
  width: 100%;
  padding: 8px;
}

/* ---- Block base ---- */
.block {
  border-radius: 8px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 50px;
  position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
}

.block.expandable {
  cursor: pointer;
}

.block.expandable:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ---- Expand icon ---- */
.expand-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2em;
  color: var(--color-primary, #006458);
}

/* ---- Row hidden ---- */
.row-hidden {
  display: none;
}

/* ---- Collapse/Reset button ---- */
.collapse-all {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--color-primary, #006458);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9em;
  z-index: 100;
}

.collapse-all:hover {
  background: var(--color-dark, #004a40);
}

/* ---- Block text elements ---- */
.block-title {
  font-size: 0.82em;
  font-weight: 700;
  margin-bottom: 4px;
}

.block-desc {
  font-size: 0.68em;
  opacity: 0.9;
  margin-top: 4px;
}

.block-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.62em;
  margin-top: 4px;
  font-weight: 600;
}

.sub-list {
  font-size: 0.62em;
  margin-top: 6px;
  display: none;
}
.block:hover .sub-list,
.block.expanded .sub-list {
  display: block;
}
.block.subtracted .block-desc,
.block.loss .block-desc {
  display: none;
}
.block.subtracted:hover .block-desc,
.block.loss:hover .block-desc {
  display: block;
}

.sub-list div {
  margin: 2px 0;
}

/* ---- Block color variants ---- */
.block.root {
  background: linear-gradient(135deg, var(--color-dark, #004a40), var(--color-primary, #006458));
  color: white;
}

.block.primary {
  background: #DAF11B;
  color: #000;
}

.block.subtracted {
  background: #e8e8e8;
  color: #000;
}

.block.subtracted .block-badge {
  background: #666;
  color: white;
}

.block.loss {
  background: #fff3cd;
  color: #000;
}

.block.loss .block-badge {
  background: #d39e00;
  color: white;
}

.block.plan {
  background: white;
  border: 3px dashed var(--color-primary, #006458);
  color: #000;
}

.block.plan .block-badge {
  background: #DAF11B;
  color: #000;
}

.block.actuals {
  background: white;
  border: 3px dashed #4CAF50;
  color: #000;
}

.block.actuals .block-badge {
  background: #4CAF50;
  color: white;
}

/* ---- Highlight animations ---- */
.highlight-numerator {
  box-shadow: 0 0 0 4px #4CAF50 inset;
  animation: pulse-numerator 1s ease-in-out 3;
}

.highlight-denominator {
  box-shadow: 0 0 0 4px #2196F3 inset;
  animation: pulse-denominator 1s ease-in-out 3;
}

@keyframes pulse-numerator {
  0%, 100% { box-shadow: 0 0 0 4px #4CAF50 inset; }
  50%      { box-shadow: 0 0 0 8px #4CAF50 inset; }
}

@keyframes pulse-denominator {
  0%, 100% { box-shadow: 0 0 0 4px #2196F3 inset; }
  50%      { box-shadow: 0 0 0 8px #2196F3 inset; }
}

/* ---- Show Me buttons ---- */
.show-me-btn {
  background: var(--color-primary, #006458);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85em;
  font-weight: 600;
  margin-left: 10px;
}

.show-me-btn:hover {
  background: var(--color-dark, #004a40);
}

/* ---- Legend for formula sections ---- */
.legend-box {
  display: inline-flex;
  gap: 20px;
  margin-top: 10px;
  font-size: 0.85em;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .cascade-scroll {
    overflow-x: auto;
  }
  .cascade-container {
    min-width: 700px;
  }
}

/* =============================================
   STOCK CALCULATOR — ENHANCED STYLES
   ============================================= */

.calc-grid .calc-row input[type="number"] {
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.15s ease;
}

.calc-grid .calc-row input[type="number"]:focus {
  border-color: var(--pine-primary);
  box-shadow: 0 0 0 3px rgba(var(--pine-primary-rgb), 0.15);
  transform: translateY(-1px);
}

/* Animated results */
.result-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.4s ease;
}

.result-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.result-item.result-animate-in {
  animation: resultSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* Chart tooltip */
.chart-tooltip {
  position: fixed;
  z-index: 1000;
  background: var(--pine-dark-bg);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  white-space: nowrap;
}

.chart-tooltip.visible {
  opacity: 1;
}

.chart-tooltip__row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.chart-tooltip__swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Result indicator colors */
.result-item.result-optimal {
  border-left: 3px solid var(--pine-primary);
  background: linear-gradient(135deg, var(--pine-light), #fff);
}

.result-item.result-warning {
  border-left: 3px solid #F59E0B;
  background: linear-gradient(135deg, #FEF3C7, #fff);
}

.result-item.result-danger {
  border-left: 3px solid #EF4444;
  background: linear-gradient(135deg, #FEE2E2, #fff);
}

.result-total-highlight {
  font-weight: 700 !important;
  color: var(--pine-dark) !important;
  font-size: var(--font-size-2xl) !important;
}

/* =============================================
   SPEED-DOWNTIME — ENHANCED SLIDERS
   ============================================= */

.slider-row input[type="range"] {
  --slider-fill: var(--pine-primary);
  background: linear-gradient(to right, var(--slider-fill) 0%, var(--slider-fill) var(--fill-pct, 50%), var(--color-border) var(--fill-pct, 50%), var(--color-border) 100%);
  transition: background 0.1s ease;
  height: 8px;
}

.slider-row input[type="range"]::-webkit-slider-thumb {
  background: var(--pine-primary);
  width: 22px;
  height: 22px;
  box-shadow: 0 2px 8px rgba(var(--pine-primary-rgb), 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.slider-row input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(var(--pine-primary-rgb), 0.4);
}

.slider-row input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.1);
}

.slider-row input[type="range"]::-moz-range-thumb {
  background: var(--pine-primary);
  width: 22px;
  height: 22px;
  box-shadow: 0 2px 8px rgba(var(--pine-primary-rgb), 0.3);
}

.slider-row input[type="range"]::-moz-range-progress {
  background: var(--pine-primary);
  border-radius: var(--radius-full);
  height: 8px;
}

.slider-value {
  background: var(--pine-light);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  color: var(--pine-dark);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-xs);
  min-width: 120px;
  text-align: center;
  transition: background 0.3s ease, transform 0.15s ease;
}

.slider-value.slider-value--changed {
  animation: sliderPop 0.3s ease;
}

@keyframes sliderPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); background: var(--pine-accent); color: #fff; }
  100% { transform: scale(1); }
}

/* Optimal point marker animation */
@keyframes pulseGreen {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 100, 88, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(0, 100, 88, 0);
    transform: scale(1.1);
  }
}

/* Speed-downtime comparison cards */
.sd-comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-md);
  align-items: center;
  margin-top: var(--space-md);
}

.sd-comparison__vs {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-muted);
  text-align: center;
}

.sd-comparison__card {
  text-align: center;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  transition: transform 0.3s ease;
}

.sd-comparison__card:hover {
  transform: translateY(-2px);
}

.sd-comparison__card.sd-card--you {
  background: var(--color-bg-alt);
  border: 2px solid var(--color-border);
}

.sd-comparison__card.sd-card--optimal {
  background: var(--pine-light);
  border: 2px solid var(--pine-accent);
}

.sd-comparison__card .sd-card__label {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}

.sd-comparison__card .sd-card__value {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
}

.sd-card--optimal .sd-card__value {
  color: var(--pine-primary);
}

.sd-card--you .sd-card__value {
  color: var(--color-text);
}

.sd-comparison__card .sd-card__sub {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* =============================================
   SPLIT SOLVER — ENHANCED STYLES
   ============================================= */

/* Phase progress indicator */
.ss-progress {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-xl);
  position: relative;
}

.ss-progress__step {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 1;
  position: relative;
  cursor: pointer;
  padding: var(--space-sm) 0;
  transition: opacity 0.3s ease;
}

.ss-progress__step:not(.ss-progress__step--active):not(.ss-progress__step--done) {
  opacity: 0.4;
}

.ss-progress__step:hover {
  opacity: 0.8;
}

.ss-progress__step--active {
  opacity: 1;
}

.ss-progress__step--done {
  opacity: 0.7;
}

.ss-progress__num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  flex-shrink: 0;
  transition: all 0.3s ease;
  background: var(--color-border);
  color: var(--color-text-muted);
}

.ss-progress__step--active .ss-progress__num {
  background: var(--pine-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(var(--pine-primary-rgb), 0.3);
}

.ss-progress__step--done .ss-progress__num {
  background: var(--pine-light);
  color: var(--pine-primary);
}

.ss-progress__label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
}

.ss-progress__step--active .ss-progress__label {
  color: var(--color-text);
}

.ss-progress__line {
  flex: 1;
  height: 2px;
  background: var(--color-border);
  margin: 0 var(--space-sm);
  position: relative;
  overflow: hidden;
}

.ss-progress__line--filled {
  background: var(--pine-primary);
}

.ss-progress__line--filled::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: lineShimmer 2s infinite;
}

@keyframes lineShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Enhanced Split Tree */
.ss-tree-v2 {
  margin-bottom: var(--space-lg);
  position: relative;
}

.ss-tree-v2 .ss-node {
  position: relative;
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: 8px;
  transition: all 0.3s ease;
  border-width: 2px;
}

.ss-tree-v2 .ss-node:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

/* Tree connector lines */
.ss-tree-connector {
  position: relative;
  margin-left: 10px;
  padding-left: 18px;
}

.ss-tree-connector::before {
  content: '';
  position: absolute;
  left: 0;
  top: -4px;
  bottom: 4px;
  width: 2px;
  background: var(--color-border);
}

.ss-tree-connector .ss-node::before {
  content: '';
  position: absolute;
  left: -18px;
  top: 50%;
  width: 16px;
  height: 2px;
  background: var(--color-border);
}

.ss-tree-connector .ss-node--ok::before {
  background: #22C55E;
}

.ss-tree-connector .ss-node--cause::before {
  background: #EF4444;
}

/* Enhanced node animations */
.ss-node-enter {
  animation: nodeSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes nodeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Phase transition */
.ss-phase-enter {
  animation: phaseSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes phaseSlideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Enhanced tabs as pill buttons */
.ss-tabs {
  display: flex;
  gap: 0;
  margin-bottom: var(--space-xl);
  border-bottom: none;
  background: var(--color-bg-alt);
  border-radius: var(--radius-full);
  padding: 4px;
  width: fit-content;
}

.ss-tab {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-full);
  border-bottom: none;
  margin-bottom: 0;
  transition: all 0.3s ease;
}

.ss-tab:hover {
  color: var(--color-text);
  background: rgba(0,0,0,0.04);
}

.ss-tab--active {
  color: #fff;
  background: var(--pine-primary);
  box-shadow: 0 2px 8px rgba(var(--pine-primary-rgb), 0.3);
  border-bottom-color: transparent;
}

.ss-tab--active:hover {
  color: #fff;
  background: var(--pine-primary);
}

/* Split form enhanced */
.ss-split-form {
  margin-left: 28px;
  margin-bottom: 8px;
  animation: nodeSlideIn 0.3s ease;
}

.ss-split-form__inner {
  background: linear-gradient(135deg, var(--pine-light), #fff);
  border: 2px solid var(--pine-accent);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: 0 4px 16px rgba(var(--pine-primary-rgb), 0.1);
}

/* Enhanced status badges */
.ss-status {
  transition: transform 0.2s ease;
}

.ss-status:hover {
  transform: scale(1.15);
}

.ss-status--ok {
  background: var(--pine-primary);
}

.ss-status--cause {
  background: #EF4444;
  animation: causeGlow 2s ease infinite;
}

@keyframes causeGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3); }
  50% { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0); }
}

/* =============================================
   GENERAL TOOL ENHANCEMENTS
   ============================================= */

/* Content card hover enhancement */
.content-card {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.content-card:hover {
  box-shadow: var(--shadow-lg);
}

/* H2 border uses pine green */
.content-card h2 {
  border-bottom-color: var(--pine-primary);
}

/* Button enhancements */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  transition: width 0.4s ease, height 0.4s ease;
  transform: translate(-50%, -50%);
}

.btn-primary:hover::after {
  width: 300px;
  height: 300px;
}

/* Enhanced formula boxes */
.formula {
  position: relative;
  border-left: 3px solid var(--pine-primary);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.formula:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

/* Animated number counter */
.counter-animate {
  display: inline-block;
  transition: all 0.3s ease;
}

/* tool-disclaimer: styles defined in tool-page section above */

/* Chart canvas container */
.chart-container {
  position: relative;
  width: 100%;
  overflow-x: auto;
}

.chart-container canvas {
  display: block;
}

/* Responsive for mobile */
@media (max-width: 639px) {
  .nth-box__children {
    flex-direction: column;
  }
  .nth-box__children .nth-box {
    width: 100% !important;
  }

  .sd-comparison {
    grid-template-columns: 1fr;
  }

  .sd-comparison__vs {
    display: none;
  }

  .ss-progress {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }

  .ss-progress__line {
    display: none;
  }

  .ss-tabs {
    width: 100%;
  }

  .ss-tab {
    flex: 1;
    text-align: center;
    padding: var(--space-sm) var(--space-sm);
    font-size: var(--font-size-xs);
  }
}
