/* =================================================================
   Scouq - Calculator Tool Page
   ================================================================= */

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0a0a0a;
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* -----------------------------------------------------------------
   Skip link
   ----------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #ffffff;
  color: #0a0a0a;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  z-index: 100;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  transition: top 150ms ease;
}
.skip-link:focus {
  top: 0;
}

/* -----------------------------------------------------------------
   Header / Nav
   ----------------------------------------------------------------- */
.calc-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.calc-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.8px;
  color: #ffffff;
  text-decoration: none;
}

.calc-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.calc-nav-link {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 150ms ease, background 150ms ease;
  letter-spacing: -0.2px;
}
.calc-nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.calc-nav-cta {
  font-size: 14px;
  font-weight: 500;
  color: #0a0a0a;
  background: #ffffff;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background 150ms ease, transform 100ms ease;
  letter-spacing: -0.2px;
}
.calc-nav-cta:hover {
  background: #f0f0f0;
}
.calc-nav-cta:active {
  transform: scale(0.97);
}

/* -----------------------------------------------------------------
   Hero
   ----------------------------------------------------------------- */
.calc-hero {
  text-align: center;
  padding: 56px 24px 32px;
}

.calc-title {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.12;
  margin-bottom: 10px;
}

.calc-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: -0.2px;
}

/* -----------------------------------------------------------------
   Tabs
   ----------------------------------------------------------------- */
.calc-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.calc-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 4px;
  width: fit-content;
  margin-bottom: 28px;
}

.calc-tab {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.2px;
  color: rgba(255, 255, 255, 0.45);
  background: transparent;
  border: none;
  border-radius: 7px;
  padding: 8px 20px;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
}
.calc-tab:hover {
  color: rgba(255, 255, 255, 0.8);
}
.calc-tab--active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* -----------------------------------------------------------------
   Panel
   ----------------------------------------------------------------- */
.calc-panel {
  display: none;
}
.calc-panel--active {
  display: block;
}

/* -----------------------------------------------------------------
   Grid layout: inputs | outputs
   ----------------------------------------------------------------- */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

/* -----------------------------------------------------------------
   Section label
   ----------------------------------------------------------------- */
.calc-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 14px;
}

/* -----------------------------------------------------------------
   Input fields
   ----------------------------------------------------------------- */
.calc-inputs {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.calc-label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: -0.1px;
}

.calc-input-wrap {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 150ms ease;
}
.calc-input-wrap:focus-within {
  border-color: rgba(255, 255, 255, 0.3);
}

.calc-prefix,
.calc-suffix {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.3);
  padding: 0 10px;
  user-select: none;
  flex-shrink: 0;
}

.calc-input {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  background: transparent;
  border: none;
  outline: none;
  padding: 9px 10px 9px 0;
  width: 100%;
  min-width: 0;
  letter-spacing: -0.1px;
}
.calc-input--no-prefix {
  padding-left: 12px;
}

/* -----------------------------------------------------------------
   Output cards
   ----------------------------------------------------------------- */
.calc-outputs {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 80px;
}

.calc-result-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calc-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.calc-result-row--full {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.calc-result-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: -0.1px;
  flex-shrink: 0;
}

.calc-result-value {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.3px;
  text-align: right;
}
.calc-result-value--big {
  font-size: 22px;
  letter-spacing: -0.6px;
}

.calc-result-value--positive {
  color: #fff;
}
.calc-result-value--negative {
  color: #f87171;
}
.calc-result-value--pass {
  color: #fff;
}
.calc-result-value--fail {
  color: #f87171;
}

/* -----------------------------------------------------------------
   Action buttons
   ----------------------------------------------------------------- */
.calc-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.calc-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.2px;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 150ms ease, transform 100ms ease, opacity 150ms ease;
}
.calc-btn:active {
  transform: scale(0.97);
}

.calc-btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.calc-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.calc-btn--primary {
  background: #ffffff;
  color: #0a0a0a;
  flex: 1;
  justify-content: center;
}
.calc-btn--primary:hover {
  background: #f0f0f0;
}

/* Share toast */
.calc-share-toast {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  height: 20px;
  opacity: 0;
  transition: opacity 300ms ease;
}
.calc-share-toast--visible {
  opacity: 1;
}

/* -----------------------------------------------------------------
   FAQ section
   ----------------------------------------------------------------- */
.calc-faq {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 72px 24px 80px;
}

.calc-faq-inner {
  max-width: 700px;
  margin: 0 auto;
}

.calc-faq-heading {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.8px;
  margin-bottom: 36px;
}

.calc-faq-item {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 24px 0;
}
.calc-faq-item:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.calc-faq-q {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: #ffffff;
  margin-bottom: 10px;
}

.calc-faq-a {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: -0.1px;
}

/* -----------------------------------------------------------------
   Footer
   ----------------------------------------------------------------- */
.calc-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 24px 32px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  letter-spacing: -0.1px;
}

.calc-footer a {
  color: rgba(255, 255, 255, 0.3);
  text-decoration: none;
  transition: color 150ms ease;
}
.calc-footer a:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* -----------------------------------------------------------------
   Mobile
   ----------------------------------------------------------------- */
@media (max-width: 700px) {
  .calc-header {
    padding: 16px 20px;
  }

  .calc-nav-link {
    display: none;
  }

  .calc-grid {
    grid-template-columns: 1fr;
  }

  .calc-outputs {
    position: static;
  }

  .calc-btn--primary {
    flex: none;
    width: 100%;
  }

  .calc-actions {
    flex-direction: column;
  }

  .calc-wrap {
    padding: 0 16px 60px;
  }

  .calc-hero {
    padding: 40px 20px 24px;
  }
}

@media (max-width: 480px) {
  .calc-result-value--big {
    font-size: 18px;
  }
}

/* Fix 8: Share button min tap target */
@media (max-width: 1024px) {
  .calc-btn--secondary {
    min-height: 44px;
  }
}

/* -----------------------------------------------------------------
   Print
   ----------------------------------------------------------------- */
@media print {
  .calc-header,
  .calc-tabs,
  .calc-actions,
  .calc-share-toast,
  .calc-footer,
  .skip-link {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .calc-hero {
    padding: 16px 0 12px;
  }
  .calc-title,
  .calc-subtitle {
    color: #000000;
  }
  .calc-subtitle {
    color: #555555;
  }

  .calc-panel {
    display: block !important;
  }

  .calc-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .calc-inputs,
  .calc-result-card {
    background: #f8f8f8;
    border: 1px solid #dddddd;
    border-radius: 8px;
    break-inside: avoid;
  }

  .calc-label,
  .calc-result-label {
    color: #555555;
  }

  .calc-input,
  .calc-result-value {
    color: #000000;
  }

  .calc-prefix,
  .calc-suffix {
    color: #888888;
  }

  .calc-section-label {
    color: #888888;
  }

  .calc-input-wrap {
    background: #eeeeee;
    border-color: #cccccc;
  }

  .calc-faq {
    border-top: 1px solid #dddddd;
    padding: 32px 0;
  }
  .calc-faq-q {
    color: #000000;
  }
  .calc-faq-a {
    color: #555555;
  }
  .calc-faq-item {
    border-top-color: #dddddd;
  }
  .calc-faq-item:last-child {
    border-bottom-color: #dddddd;
  }

  .calc-result-value--positive { color: #166534; }
  .calc-result-value--negative { color: #991b1b; }
  .calc-result-value--pass { color: #166534; }
  .calc-result-value--fail { color: #991b1b; }

  .calc-outputs {
    position: static;
  }
}
