/* ==============================================================================
   kalkulatortiktok.com - Core Stylesheet
   Modern, zero-dependency, ultra-fast, mobile-first SaaS design
   ============================================================================== */

:root {
  /* Color Palette - Light Mode */
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-input: #ffffff;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --border-color: #e2e8f0;
  --border-focus: #00f2fe;

  /* Brand Accents */
  --brand-cyan: #00f2fe;
  --brand-pink: #fe2c55;
  --brand-gradient: linear-gradient(135deg, #00f2fe 0%, #fe2c55 100%);
  --brand-gradient-hover: linear-gradient(135deg, #00d2de 0%, #e0264b 100%);
  --brand-primary: #0f172a;
  --brand-primary-hover: #1e293b;

  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --success-text: #065f46;
  --success-accent: #10b981;

  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --warning-text: #92400e;

  --error-bg: #fef2f2;
  --error-border: #fecaca;
  --error-text: #991b1b;
  --error-accent: #ef4444;

  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 12px 24px -4px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --header-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --max-w-content: 1200px;
  --max-w-prose: 800px;
}

[data-theme="dark"] {
  --bg-primary: #090d16;
  --bg-surface: #111827;
  --bg-surface-elevated: #1f2937;
  --bg-subtle: #1e293b;
  --bg-input: #1f2937;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;

  --border-color: #334155;
  --border-focus: #00f2fe;

  --brand-primary: #00f2fe;
  --brand-primary-hover: #38bdf8;

  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
  --card-shadow-hover: 0 12px 24px -4px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --header-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4);

  --success-bg: rgba(16, 185, 129, 0.1);
  --success-border: rgba(16, 185, 129, 0.3);
  --success-text: #34d399;

  --warning-bg: rgba(245, 158, 11, 0.1);
  --warning-border: rgba(245, 158, 11, 0.3);
  --warning-text: #fbbf24;

  --error-bg: rgba(239, 68, 68, 0.1);
  --error-border: rgba(239, 68, 68, 0.3);
  --error-text: #f87171;
}

/* ==============================================================================
   Reset & Base Styles
   ============================================================================== */

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

html {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

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

/* ==============================================================================
   Layout Container
   ============================================================================== */

.container {
  width: 100%;
  max-width: var(--max-w-content);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

@media (max-width: 640px) {
  .container {
    padding-left: 0.875rem;
    padding-right: 0.875rem;
  }
}

.container-narrow {
  max-width: 860px;
}

/* ==============================================================================
   Header & Navigation (Fully Mobile Responsive)
   ============================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--header-shadow);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  gap: 0.5rem;
}

@media (max-width: 640px) {
  .header-inner {
    height: 3.75rem;
  }
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  flex-shrink: 1;
  min-width: 0;
  user-select: none;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  border-radius: var(--radius-md);
  background: var(--brand-gradient);
  color: #ffffff;
  font-weight: 900;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(254, 44, 85, 0.25);
}

@media (max-width: 480px) {
  .brand-badge {
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
  }
  .brand-text {
    font-size: 1.05rem;
    white-space: nowrap;
  }
}

@media (max-width: 360px) {
  .brand-text {
    font-size: 0.95rem;
  }
}

.brand-text span {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .nav-actions {
    gap: 0.35rem;
  }
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.25rem;
}

@media (min-width: 960px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  padding: 0.5rem 0.25rem;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--brand-gradient);
  border-radius: var(--radius-full);
}

.lang-select-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang-select {
  appearance: none;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.45rem 1.75rem 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
  max-width: 140px;
}

@media (max-width: 640px) {
  .lang-select {
    padding: 0.35rem 1.3rem 0.35rem 0.45rem;
    font-size: 0.75rem;
    max-width: 88px;
  }
}

@media (max-width: 360px) {
  .lang-select {
    max-width: 78px;
    padding-right: 1.1rem;
  }
}

.lang-select:hover, .lang-select:focus {
  border-color: var(--border-focus);
}

.lang-select-icon {
  position: absolute;
  right: 0.5rem;
  pointer-events: none;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.375rem;
  height: 2.375rem;
  min-width: 2.375rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

@media (max-width: 640px) {
  .btn-icon {
    width: 2.15rem;
    height: 2.15rem;
    min-width: 2.15rem;
  }
}

.btn-icon:hover {
  color: var(--text-primary);
  background-color: var(--border-color);
}

/* Mobile Hamburger Button */
.mobile-menu-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 100000;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mobile-menu-btn svg {
  pointer-events: none;
}

@media (min-width: 960px) {
  .mobile-menu-btn {
    display: none !important;
  }
}

.icon-hamburger, .icon-close {
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.mobile-menu-btn .icon-close {
  display: none !important;
}

.mobile-menu-btn.active .icon-hamburger {
  display: none !important;
}

.mobile-menu-btn.active .icon-close {
  display: block !important;
}

/* Mobile Drawer */
.mobile-nav {
  position: fixed;
  top: 4rem;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: calc(100vh - 4rem);
  height: calc(100dvh - 4rem);
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 1.25rem 1rem 3.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 99999;
  display: none;
}

@media (max-width: 640px) {
  .mobile-nav {
    top: 3.75rem;
    height: calc(100vh - 3.75rem);
    height: calc(100dvh - 3.75rem);
  }
}

.mobile-nav.open {
  display: block !important;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 3rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  min-height: 50px;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  color: #ffffff;
  background: var(--brand-gradient);
  border-color: transparent;
}

/* ==============================================================================
   Hero Section
   ============================================================================== */

.hero-section {
  padding: 2.5rem 0 1.5rem;
  text-align: center;
}

@media (max-width: 640px) {
  .hero-section {
    padding: 1.75rem 0 1rem;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-cyan);
}

.hero-title {
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 2.625rem;
  }
}

.hero-title span {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 1.0625rem;
  }
}

/* ==============================================================================
   Calculator Box & UI
   ============================================================================== */

.calculator-wrapper {
  margin: 1.25rem 0 3rem;
}

.calc-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 1.25rem;
  transition: var(--transition);
}

@media (min-width: 768px) {
  .calc-card {
    padding: 2.25rem;
  }
}

.calc-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.calc-title-group h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.calc-title-group p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.125rem;
  margin-bottom: 1.75rem;
}

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

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix, .input-suffix {
  position: absolute;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  pointer-events: none;
}

.input-prefix {
  left: 0.875rem;
}

.input-suffix {
  right: 0.875rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 0.875rem;
  background-color: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1rem; /* 16px to prevent mobile iOS auto-zoom */
  font-weight: 500;
  outline: none;
  transition: var(--transition);
}

.has-prefix .form-input {
  padding-left: 2.75rem;
}

.has-suffix .form-input {
  padding-right: 2.75rem;
}

.form-input:focus {
  border-color: #00f2fe;
  box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.15);
}

.calc-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .calc-btn-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .calc-btn-group .btn-primary {
    grid-column: 1 / -1;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  user-select: none;
  min-height: 44px; /* Touch friendly */
}

.btn-primary {
  background: var(--brand-gradient);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(254, 44, 85, 0.25);
  position: relative;
}

.btn-primary:hover {
  box-shadow: 0 6px 16px rgba(254, 44, 85, 0.35);
  transform: translateY(-1px);
}

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

.btn-secondary {
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--border-color);
}

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

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

/* Spinner Animation for Search / Calculation */
@keyframes ktSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.btn-spinner {
  display: inline-block;
  animation: ktSpin 0.6s linear infinite;
}

.btn.is-loading {
  opacity: 0.9;
  cursor: wait;
  pointer-events: none;
}

/* ==============================================================================
   Results Section & Metric Cards
   ============================================================================== */

.results-wrapper {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1.25rem;
  position: relative;
  transition: var(--transition);
}

@media (min-width: 768px) {
  .results-wrapper {
    padding: 1.5rem;
  }
}

.results-wrapper.is-calculating::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-gradient);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  animation: scanProgress 0.5s ease-in-out infinite alternate;
}

@keyframes scanProgress {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.125rem;
}

.results-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
}

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

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

.metric-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.metric-card:hover {
  border-color: #00f2fe;
}

.metric-card.highlight {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.08) 0%, rgba(254, 44, 85, 0.08) 100%);
  border-color: rgba(254, 44, 85, 0.3);
}

@keyframes resultPop {
  0% { transform: scale(0.97); opacity: 0.7; }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); opacity: 1; }
}

.results-updated .metric-card {
  animation: resultPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.metric-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.metric-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  word-break: break-word;
}

@media (min-width: 640px) {
  .metric-value {
    font-size: 1.5rem;
  }
}

.metric-card.highlight .metric-value {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.formula-box {
  margin-top: 1.25rem;
  padding: 0.875rem 1.125rem;
  background-color: var(--bg-surface);
  border-left: 3px solid #00f2fe;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.formula-box strong {
  color: var(--text-primary);
}

/* Toast Notice */
.toast-msg {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--text-primary);
  color: var(--bg-surface);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 200;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

@media (max-width: 480px) {
  .toast-msg {
    left: 1rem;
    right: 1rem;
    bottom: 1.5rem;
    text-align: center;
  }
}

.toast-msg.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==============================================================================
   Rich SEO Content Section
   ============================================================================== */

.seo-article {
  max-width: var(--max-w-prose);
  margin: 3rem auto;
  line-height: 1.8;
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  .seo-article {
    margin: 2rem auto;
    font-size: 0.95rem;
  }
}

.seo-article h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 2.25rem 0 1rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .seo-article h2 {
    font-size: 1.625rem;
  }
}

.seo-article h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1.75rem 0 0.75rem;
}

.seo-article p {
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.seo-article ul, .seo-article ol {
  margin: 1rem 0 1.5rem 1.25rem;
}

.seo-article li {
  margin-bottom: 0.5rem;
}

.seo-article strong {
  color: var(--text-primary);
}

.seo-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
}

.seo-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
  min-width: 480px;
}

.seo-table th, .seo-table td {
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid var(--border-color);
}

.seo-table th {
  background-color: var(--bg-subtle);
  font-weight: 700;
  color: var(--text-primary);
}

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

.callout-box {
  margin: 1.5rem 0;
  padding: 1.125rem;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--brand-pink);
  background-color: var(--bg-subtle);
}

/* ==============================================================================
   FAQ Accordion Section
   ============================================================================== */

.faq-section {
  max-width: var(--max-w-prose);
  margin: 3.5rem auto;
}

@media (max-width: 640px) {
  .faq-section {
    margin: 2.5rem auto;
  }
}

.faq-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.faq-header h2 {
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.faq-header p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--text-muted);
}

.faq-question {
  width: 100%;
  padding: 1rem 1.125rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: none;
  border: none;
  text-align: left;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  cursor: pointer;
  min-height: 48px;
}

.faq-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.25s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
  background-color: var(--bg-surface);
}

.faq-item.active .faq-answer {
  max-height: 1000px;
  transition: max-height 0.5s ease-in-out;
}

.faq-answer-inner {
  padding: 0 1.125rem 1.125rem;
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.7;
}

/* ==============================================================================
   Related Calculators Section (3-Column Feature Cards)
   ============================================================================== */

.related-section {
  padding: 3.5rem 0;
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-top: 3.5rem;
}

@media (max-width: 640px) {
  .related-section {
    padding: 2.5rem 0;
    margin-top: 2.5rem;
  }
}

.related-header {
  text-align: center;
  margin-bottom: 2rem;
}

.related-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.related-header p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.125rem;
}

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

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

.feature-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  position: relative;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
  border-color: #00f2fe;
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin-bottom: 0.875rem;
}

.card-icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  flex-shrink: 0;
  font-size: 1.2rem;
}

.feature-card:hover .card-icon-box {
  background: var(--brand-gradient);
  color: #ffffff;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

.feature-card:hover .card-link {
  color: #fe2c55;
}

/* ==============================================================================
   Disclaimer Box
   ============================================================================== */

.disclaimer-section {
  max-width: var(--max-w-prose);
  margin: 2.5rem auto 1.5rem;
  padding: 1.125rem 1.35rem;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.disclaimer-section strong {
  color: var(--text-secondary);
}

/* ==============================================================================
   Footer
   ============================================================================== */

.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

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

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

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 0.65rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ==============================================================================
   Print Styles
   ============================================================================== */

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .site-header, .site-footer, .nav-actions, .mobile-nav,
  .calc-btn-group, .calc-actions, .related-section, .faq-section,
  .toast-msg {
    display: none !important;
  }

  .calc-card, .results-wrapper {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    background: #ffffff !important;
  }

  .metric-value {
    color: #000000 !important;
    -webkit-text-fill-color: initial !important;
  }
}
