/* Teamz Lab Tools — Tool-specific styles
   Built on top of the branding design system tokens */

/* ===== GLOBAL SAFETY: Design system enforcement ===== */

/* 1. NEVER use accent as text color — neon on light bg is unreadable.
   Forces any inline accent text to heading color. */
.tool-calculator [style*="color: var(--accent)"],
.tool-content [style*="color: var(--accent)"],
.site-main [style*="color: var(--accent)"] {
  color: var(--heading) !important;
}

/* 2. ALL buttons/links with accent background MUST have dark text.
   This catches .calc-btn, .btn-primary, .quiz-btn-next, etc.
   using accent bg — forces text to be readable. */
button[style*="background: var(--accent)"],
[class*="btn"][style*="background: var(--accent)"],
.site-main button[style*="background: var(--accent)"] {
  color: #000 !important;
}

/* 2b. ANY element with accent/neon background must have dark text.
   Neon (#D9FE06) is invisible with white/light text in BOTH modes.
   This catches badges, bars, chips, tags — not just buttons. */
[style*="background: var(--accent)"],
[style*="background:var(--accent)"] {
  color: var(--accent-text, #12151A) !important;
}

/* 3. Standard button patterns — use these, nothing else.
   Primary: heading bg + bg text (dark on light, light on dark)
   Secondary: surface bg + heading text + border */
.btn-primary, .calc-btn, .quiz-btn-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-size: var(--text-md);
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity 0.2s;
  background: var(--heading);
  color: var(--bg);
}
.btn-primary:hover, .calc-btn:hover, .quiz-btn-next:hover { opacity: 0.85; }

.btn-secondary, .quiz-btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: var(--text-md);
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity 0.2s;
  background: var(--surface);
  color: var(--heading);
}
.btn-secondary:hover, .quiz-btn-back:hover { opacity: 0.85; }

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

/* ===== Layout ===== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s, border-color 0.3s;
}

.header-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-h5);
  font-weight: 700;
  color: var(--heading);
  text-decoration: none;
  transition: color 0.2s;
}

.header-logo:hover {
  color: var(--accent);
}

.header-logo svg {
  stroke: var(--heading);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.site-main--wide {
  max-width: 1100px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 0;
  background: var(--surface);
  transition: background 0.3s, border-color 0.3s;
}

/* ===== Global Button Override (no neon, centered text) ===== */
.btn-pill {
  background: var(--heading);
  color: var(--bg);
  justify-content: center;
  text-align: center;
}

.btn-pill:hover {
  transform: none;
  box-shadow: none;
  opacity: 0.85;
}

.btn-pill-ghost {
  justify-content: center;
  text-align: center;
}

.btn-pill-ghost:hover {
  border-color: var(--heading);
  color: var(--heading);
}

/* ===== Footer CTA Override (no neon) ===== */
.build-cta {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding: 1.5rem;
}

.build-cta__icon {
  display: none;
}

.build-cta__text {
  flex: unset;
}

.footer-cta .build-cta__btn,
.build-cta .build-cta__btn {
  background: var(--heading);
  color: var(--bg);
  padding: 0.6rem 2rem;
  box-shadow: none;
  text-align: center;
  width: auto;
  min-width: 200px;
}

.footer-cta .build-cta__btn:hover,
.build-cta .build-cta__btn:hover {
  transform: none;
  box-shadow: none;
  opacity: 0.85;
}

.build-cta__stores {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.build-cta__store-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.build-cta__store-link:hover {
  border-color: var(--heading);
  color: var(--heading);
}

.build-cta__store-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ===== Footer ===== */
.footer-cta {
  padding: 2rem;
  border-bottom: 1px solid var(--border);
}

/* Engage / Lead-gen cards */
.footer-engage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding: 2rem;
  border-bottom: 1px solid var(--border);
}

.engage-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s;
}

.engage-card:hover {
  border-color: var(--accent);
}

.engage-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
}

.engage-card__text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.engage-card__text strong {
  font-size: var(--text-md);
  color: var(--heading);
}

.engage-card__text span {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.engage-card__btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.5rem 1.5rem;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}

.engage-card__btn:hover {
  opacity: 0.85;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  padding: 2rem;
}

.footer-col h4 {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.75rem;
}

.footer-col a {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--heading);
}

.footer-trust {
  padding: 1rem 2rem;
  border-top: 1px solid var(--border);
}

.trust-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
}

.trust-badge svg {
  flex-shrink: 0;
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.footer-bottom a {
  color: var(--accent);
  text-decoration: none;
}

/* ===== Language Switcher ===== */
.lang-selector {
  position: relative;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  color: var(--text);
  font-size: var(--text-sm);
  font-family: var(--font);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s;
}

.lang-btn:hover {
  border-color: var(--heading);
}

.lang-btn svg {
  opacity: 0.6;
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem;
  max-height: 300px;
  overflow-y: auto;
  z-index: 200;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.lang-dropdown.open {
  display: block;
}

.lang-option {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0.4rem 0.75rem;
  font-size: var(--text-sm);
  font-family: var(--font);
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.lang-option:hover {
  background: var(--bg);
  color: var(--heading);
}

.lang-option--active {
  color: var(--heading);
  font-weight: 700;
}

/* Auto-detect language banner */
.lang-auto-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
  flex-wrap: wrap;
  position: relative;
  z-index: 100;
}
.lang-auto-banner span {
  font-weight: 500;
}
.lang-auto-banner__switch {
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--heading);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 0.15s;
}
.lang-auto-banner__switch:hover {
  border-color: var(--heading);
}
.lang-auto-banner__close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
@media print {
  .lang-auto-banner { display: none; }
}

/* Hide Google Translate bar */
.goog-te-banner-frame,
.skiptranslate,
#google_translate_element {
  display: none !important;
}

body {
  top: 0 !important;
}

/* ===== Breadcrumbs ===== */
.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  margin-right: 0.5rem;
  color: var(--text-muted);
  opacity: 0.5;
}

.breadcrumb-item a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

.breadcrumb-item.active {
  color: var(--text);
}

/* ===== Tool Page ===== */
.tool-hero {
  margin-bottom: 2rem;
}

.tool-hero h1 {
  font-size: var(--text-h1);
  font-weight: 800;
  color: var(--heading);
  margin: 0 0 0.75rem 0;
  line-height: 1.2;
}

.tool-hero .tool-description {
  font-size: var(--text-lg);
  color: var(--text-muted);
  line-height: var(--lh);
  margin: 0;
}

/* ===== Calculator Card ===== */
.tool-calculator {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  transition: background 0.3s, border-color 0.3s;
}

.tool-inputs {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tool-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tool-label {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text);
}

.tool-hint {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-muted);
}

.tool-input,
.tool-select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: var(--text-lg);
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, background 0.3s, color 0.3s;
  box-sizing: border-box;
}

.tool-input:focus,
.tool-select:focus {
  border-color: var(--heading);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
  outline: none;
}

.tool-input:focus-visible,
.tool-select:focus-visible {
  border-color: var(--heading);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
  outline: 2px solid transparent;
}

.tool-input--error,
.tool-input--error:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2);
}

.tool-input::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

.tool-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-md);
  color: var(--text);
  cursor: pointer;
}

.tool-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.tool-checkbox:focus-visible {
  outline: 2px solid var(--heading);
  outline-offset: 2px;
}

.tool-error {
  font-size: var(--text-sm);
  color: var(--danger);
}

/* ===== Actions ===== */
.tool-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.tool-actions .tool-calculate-btn {
  background: var(--heading);
  color: var(--bg);
  font-weight: 700;
  border: none;
  padding: 0.75rem 3rem;
  text-align: center;
  width: auto;
  min-width: 200px;
}

.tool-actions .tool-calculate-btn:hover {
  opacity: 0.85;
}

.tool-actions .tool-calculate-btn:focus-visible {
  outline: 2px solid var(--heading);
  outline-offset: 2px;
}

.tool-clear-btn {
  width: auto;
  min-width: 200px;
  text-align: center;
}

/* ===== Result ===== */
.tool-result {
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding: 1.5rem 0 0;
  margin-bottom: 1rem;
  transition: background 0.3s, border-color 0.3s;
  animation: fadeIn 0.3s ease;
}

.tool-result-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tool-result-title {
  font-size: var(--text-h4);
  font-weight: 800;
  color: var(--heading);
  margin: 0;
}

.tool-result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.tool-result-row:last-of-type {
  border-bottom: none;
}

.tool-result-label {
  font-size: var(--text-md);
  color: var(--text-muted);
}

.tool-result-value {
  font-size: var(--text-h5);
  font-weight: 700;
  color: var(--heading);
  text-align: right;
}

.tool-result-summary {
  font-size: var(--text-md);
  color: var(--text-muted);
  line-height: var(--lh);
  padding: 1rem;
  background: var(--bg);
  border-radius: 8px;
  margin-top: 0.5rem;
}

.tool-result-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.tool-copy-btn,
.tool-print-btn {
  font-size: var(--text-sm) !important;
  padding: 0.4rem 1rem !important;
}

/* ===== Result CTA ===== */
.tool-result-cta {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.tool-result-cta a {
  color: var(--heading);
  text-decoration: underline;
  font-weight: 600;
}

.tool-result-cta a:hover {
  text-decoration: underline;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  .tool-result {
    animation: none;
  }
  .tool-card:hover .card {
    transform: none;
  }
  .related-tool-card:hover {
    transform: none;
  }
}

/* ===== Content Sections ===== */
.section-title {
  font-size: var(--text-h3);
  font-weight: 800;
  color: var(--heading);
  margin: 2.5rem 0 1rem 0;
}

.tool-content {
  font-size: var(--text-lg);
  color: var(--text);
  line-height: var(--lh);
}

.tool-content h2 {
  font-size: var(--text-h3);
  font-weight: 800;
  color: var(--heading);
  margin: 2rem 0 0.75rem 0;
}

.tool-content h3 {
  font-size: var(--text-h4);
  font-weight: 700;
  color: var(--heading);
  margin: 1.5rem 0 0.5rem 0;
}

.tool-content p {
  margin: 0 0 1rem 0;
}

.tool-content ul,
.tool-content ol {
  margin: 0 0 1rem 0;
  padding-left: 1.5rem;
}

.tool-content li {
  margin-bottom: 0.4rem;
}

.tool-content code {
  font-family: var(--font-code);
  font-size: var(--text-md);
  background: var(--code-bg);
  color: var(--code-text);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.formula-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  font-family: var(--font-code);
  font-size: var(--text-md);
  color: var(--text);
  margin: 1rem 0;
  overflow-x: auto;
}

/* ===== FAQ ===== */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item[open] {
  border-color: var(--heading);
}

.faq-question {
  padding: 1rem 1.25rem;
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--heading);
  cursor: pointer;
  list-style: none;
  transition: background 0.2s;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::before {
  content: '+';
  display: inline-block;
  width: 1.5rem;
  font-weight: 700;
  color: var(--heading);
}

.faq-item[open] .faq-question::before {
  content: '−';
}

.faq-question:hover {
  background: var(--bg);
}

.faq-answer {
  padding: 0 1.25rem 1rem 2.75rem;
  font-size: var(--text-md);
  color: var(--text-muted);
  line-height: var(--lh);
}

/* ===== Related Tools Grid ===== */
.related-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.related-tool-card {
  text-decoration: none;
  padding: 1.25rem;
}

.related-tool-card h3 {
  font-size: var(--text-h6);
  font-weight: 700;
  color: var(--heading);
  margin: 0 0 0.4rem 0;
}

.related-tool-card p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0;
  line-height: var(--lh);
}

/* ===== Homepage ===== */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.hero h1 {
  font-size: var(--text-h1);
  font-weight: 800;
  color: var(--heading);
  margin: 0 0 1.25rem 0;
  line-height: 1.3;
}

.hero p {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.hero a,
.static-page a,
.tool-content a,
.tool-hero a {
  color: var(--heading);
  text-decoration: underline;
}

.tools-section {
  margin-bottom: 3rem;
}

.tools-section h2 {
  font-size: var(--text-h3);
  font-weight: 800;
  color: var(--heading);
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.tool-card {
  text-decoration: none;
  display: block;
}

.tool-card .card {
  height: 100%;
  transition: transform 0.2s, border-color 0.2s;
}

.tool-card:hover .card {
  transform: translateY(-2px);
  border-color: var(--heading);
}

.tool-card h3 {
  font-size: var(--text-h6);
  font-weight: 700;
  color: var(--heading);
  margin: 0 0 0.4rem 0;
}

.tool-card p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0;
  line-height: var(--lh);
}

/* ===== Ad Space ===== */
.ad-slot {
  display: block;
  overflow: hidden;
  min-height: 0;
  /* Fully collapsed by default — no space at all */
  font-size: 0;
  color: transparent;
  border: none;
  opacity: 0;
  height: 0;
  margin: 0;
  padding: 0;
  transition: opacity 0.3s, height 0.3s, margin 0.3s;
}

/* When AdSense fills the slot, show it with spacing */
.ad-slot:has(.adsbygoogle) {
  opacity: 1;
  height: auto;
  min-height: 90px;
  margin: 2rem 0;
}

/* Collapse unfilled ad slots (AdSense sets data-ad-status="unfilled") */
.ad-slot:has(ins[data-ad-status="unfilled"]) {
  min-height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* ===== Static Pages ===== */
.static-page {
  max-width: 700px;
}

.static-page h1 {
  font-size: var(--text-h1);
  font-weight: 800;
  color: var(--heading);
  margin: 0 0 1rem 0;
}

.static-page h2 {
  font-size: var(--text-h3);
  font-weight: 700;
  color: var(--heading);
  margin: 2rem 0 0.75rem 0;
}

.static-page p {
  font-size: var(--text-lg);
  color: var(--text);
  line-height: var(--lh);
  margin: 0 0 1rem 0;
}

.static-page ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.static-page li {
  margin-bottom: 0.4rem;
  color: var(--text);
  line-height: var(--lh);
}

.static-page a {
  color: var(--accent);
}

/* ===== Contact Form ===== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.contact-form .tool-input,
.contact-form .tool-select,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: var(--text-lg);
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

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

.contact-form .tool-input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
}

/* ===== Floating CTA Bar ===== */
.floating-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 0.6rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.3s, border-color 0.3s;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.floating-cta__close {
  position: absolute;
  top: 0.3rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.2rem 0.4rem;
  line-height: 1;
  z-index: 1;
}
.floating-cta__close:hover {
  color: var(--heading);
}
}

.floating-cta__text {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
}

.floating-cta__text strong {
  color: var(--heading);
  font-weight: 700;
}

.floating-cta__text span {
  display: none;
}

.floating-cta__btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--heading);
  color: var(--bg);
  font-weight: 700;
  font-size: var(--text-md);
  font-family: var(--font);
  border-radius: 22px;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.floating-cta__btn:hover {
  opacity: 0.85;
}

.floating-cta__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
}

.floating-cta__btn {
  flex: 0 1 auto;
  max-width: 250px;
}

.floating-cta__store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}

.floating-cta__store svg {
  width: 20px;
  height: 20px;
}

.floating-cta__store:hover {
  border-color: var(--heading);
  color: var(--heading);
}

/* Add bottom padding to body so floating CTA doesn't overlap content */
body {
  padding-bottom: 60px;
}

@media (max-width: 700px) {
  .floating-cta {
    padding: 0.6rem 1rem;
    gap: 0.75rem;
  }

  .floating-cta__text {
    font-size: var(--text-sm);
  }

  .floating-cta__text span {
    display: none;
  }

  .floating-cta__btn {
    font-size: var(--text-sm);
    padding: 0.45rem 1rem;
  }
}

@media (max-width: 480px) {
  .floating-cta {
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    text-align: center;
  }

  .floating-cta__text {
    white-space: normal;
    font-size: var(--text-xs);
  }

  .floating-cta__btn {
    width: 100%;
    text-align: center;
  }

  body {
    padding-bottom: 80px;
  }
}

/* ===== Print ===== */
@media print {
  .site-header,
  .site-footer,
  .tool-actions,
  .tool-result-actions,
  .tool-result-cta,
  .floating-cta,
  .ad-slot,
  #theme-toggle,
  #related-tools,
  #tool-faqs {
    display: none !important;
  }

  .tool-result {
    border: 2px solid #333;
    break-inside: avoid;
    animation: none;
  }

  .tool-calculator {
    break-inside: avoid;
  }

  body {
    background: white;
    color: black;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }

  .header-logo a::after,
  .footer-col a::after,
  .breadcrumb-item a::after {
    content: none;
  }
}

/* ===== Responsive ===== */
@media (max-width: 700px) {
  .site-header {
    padding: 0.75rem 1rem;
  }

  .header-logo span {
    font-size: var(--text-h6);
  }

  .header-nav {
    gap: 0.5rem;
  }

  .header-nav .nav-link:not(.nav-link--icon) {
    display: none;
  }

  .site-main {
    padding: 1.5rem 1rem 3rem;
  }

  .tool-hero h1 {
    font-size: var(--text-h2);
  }

  .tool-calculator {
    padding: 1.25rem;
  }

  .tool-result {
    padding: 1.25rem;
  }

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

  .tool-result-row {
    flex-direction: column;
    gap: 0.25rem;
  }

  .tool-result-value {
    text-align: left;
  }

  .footer-engage {
    grid-template-columns: 1fr;
    padding: 1.5rem 1rem;
    gap: 1rem;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem 1rem;
  }

  .hero h1 {
    font-size: var(--text-h2);
  }

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

  .related-tools-grid {
    grid-template-columns: 1fr;
  }
}

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }

  .tool-result-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .tool-result-cta {
    font-size: var(--text-xs);
  }

  .section-title {
    font-size: var(--text-h4);
  }

  .faq-question {
    font-size: var(--text-md);
    padding: 0.75rem 1rem;
  }

  .faq-answer {
    padding: 0 1rem 0.75rem 2rem;
    font-size: var(--text-sm);
  }

  .formula-box {
    font-size: var(--text-sm);
    padding: 1rem;
  }

  .build-cta {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
  }

  .build-cta__btn,
  .footer-cta .build-cta__btn,
  .build-cta .build-cta__btn {
    width: auto;
    min-width: 200px;
    text-align: center;
  }

  .build-cta__stores {
    justify-content: center;
  }

  .ad-slot:has(.adsbygoogle) {
    min-height: 60px;
    margin: 1.5rem 0;
  }

  .breadcrumb-list {
    font-size: var(--text-xs);
    flex-wrap: wrap;
  }

  .tool-input,
  .tool-select {
    font-size: 16px; /* prevents iOS zoom on focus */
  }

  /* === CENTRAL MOBILE FIX — applies to ALL tool pages === */
  .tool-content h2 {
    font-size: var(--text-xl);
    margin: 1.5rem 0 0.5rem 0;
  }

  .tool-content h3 {
    font-size: var(--text-lg);
  }

  .tool-content {
    font-size: var(--text-md);
  }

  /* FAQ section */
  .faq-item h3,
  .tool-content .faq-question {
    font-size: var(--text-md);
  }

  /* Related tools grid */
  .related-tools {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .tool-hero h1 {
    font-size: var(--text-h3);
  }

  .hero h1 {
    font-size: var(--text-h3);
  }

  .hero p {
    font-size: var(--text-md);
  }

  .tool-content h2 {
    font-size: var(--text-lg);
  }

  .tool-content h3 {
    font-size: var(--text-md);
  }

  .site-main {
    padding: 1rem 0.75rem 2rem;
  }

  .tool-calculator {
    padding: 1rem;
    border-radius: 8px;
  }

  .tool-result {
    padding: 1rem;
    border-radius: 8px;
  }

  .tool-label {
    font-size: var(--text-sm);
  }

  .footer-links {
    grid-template-columns: 1fr;
  }

  .footer-cta {
    padding: 1rem;
  }

  .footer-engage {
    padding: 1rem;
    gap: 0.75rem;
  }

  .engage-card {
    padding: 1rem;
  }

  .footer-bottom {
    padding: 1rem;
    font-size: var(--text-xs);
  }
}

/* ===== Star Rating Widget ===== */
.tool-rating {
  text-align: center;
  padding: 1.5rem 0;
  margin: 1.5rem 0;
  border-top: 1px solid var(--border);
}
.rating-label {
  font-size: var(--text-md);
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}
.rating-stars {
  display: inline-flex;
  gap: 0.25rem;
}
.rating-star {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--border);
  cursor: pointer;
  padding: 0.1rem;
  transition: color 0.15s, transform 0.15s;
  line-height: 1;
}
.rating-star:hover:not(:disabled),
.rating-star.hover {
  color: var(--accent);
  transform: scale(1.15);
}
.rating-star.active {
  color: var(--accent);
}
.rating-star:disabled {
  cursor: default;
  opacity: 0.9;
}

/* ===== Feedback Widget ===== */
.tool-feedback {
  text-align: center;
  padding: 1.25rem 0;
  margin: 0.5rem 0 1.5rem;
}
.feedback-question {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--heading);
  margin: 0 0 0.75rem;
}
.feedback-reactions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.1s;
}
.feedback-btn:hover {
  border-color: var(--heading);
  transform: scale(1.05);
}
.feedback-btn.selected {
  border-color: var(--heading);
  background: var(--heading);
  color: var(--bg);
  font-weight: 600;
}
.feedback-followup {
  margin-top: 1rem;
}
.feedback-followup-q {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}
.feedback-tags {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.feedback-tag {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
}
.feedback-tag:hover { border-color: var(--heading); color: var(--text); }
.feedback-tag.selected {
  border-color: var(--heading);
  background: var(--heading);
  color: var(--bg);
}
.feedback-submit {
  margin-top: 0.5rem;
}
.feedback-thanks {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0;
  font-style: italic;
}
@media (max-width: 600px) {
  .feedback-reactions { gap: 0.35rem; }
  .feedback-btn { font-size: var(--text-xs); padding: 0.4rem 0.75rem; }
}

/* ===== In-App Browser Overlay ===== */
.inapp-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  padding: 1.5rem;
}
.inapp-overlay__card {
  max-width: 420px;
  width: 100%;
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.inapp-overlay__icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}
.inapp-overlay__title {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--heading);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}
.inapp-overlay__desc {
  font-size: var(--text-base);
  color: var(--text);
  line-height: 1.5;
  margin: 0 0 1.25rem;
}
.inapp-overlay__steps {
  text-align: left;
  margin: 0 auto 1.5rem;
  max-width: 320px;
  padding: 0;
  list-style: none;
}
.inapp-overlay__steps li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--text-sm);
  color: var(--text);
  line-height: 1.4;
}
.inapp-overlay__steps li:last-child { border-bottom: none; }
.inapp-overlay__step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--heading);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.inapp-overlay__btn {
  display: block;
  width: 100%;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  background: var(--heading);
  color: var(--bg);
  cursor: pointer;
  font-family: var(--font);
  margin-bottom: 0.75rem;
  transition: opacity 0.2s;
}
.inapp-overlay__btn:active { opacity: 0.85; }
.inapp-overlay__skip {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--text-sm);
  cursor: pointer;
  font-family: var(--font);
  padding: 0.4rem;
  text-decoration: underline;
}
.inapp-overlay__skip:hover { color: var(--text); }
.inapp-overlay__note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  line-height: 1.4;
}
/* Legacy banner class (kept for backward compat with individual tool pages) */
.inapp-browser-banner { display: none; }

/* ===== Offline Banner ===== */
.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--accent);
  color: var(--accent-text);
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font);
}

/* ===== SHARE BAR ===== */
.teamz-share-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  flex-wrap: wrap;
}

.share-bar__label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 0;
}

.share-btn:hover {
  background: var(--surface);
  border-color: var(--heading);
  transform: scale(1.08);
}

.share-btn--wa:hover { color: #25D366; border-color: #25D366; }
.share-btn--tw:hover { color: var(--heading); border-color: var(--heading); }
.share-btn--fb:hover { color: #1877F2; border-color: #1877F2; }

.share-btn--copied {
  background: var(--heading);
  color: var(--bg);
  border-color: var(--heading);
}

.share-btn--native {
  width: auto;
  border-radius: var(--radius);
  padding: 0 0.75rem;
  font-weight: 600;
  background: var(--heading);
  color: var(--bg);
  border-color: var(--heading);
}

.share-btn--native:hover {
  opacity: 0.9;
  transform: scale(1.03);
}

.share-btn--embed {
  margin-left: auto;
}

@media (max-width: 600px) {
  .teamz-share-bar {
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem;
  }
  .share-bar__label { display: none; }
  .share-btn--embed { margin-left: 0; }

  /* On mobile with Web Share API, hide individual social buttons */
  .teamz-share-bar:has(.share-btn--native) .share-btn--wa,
  .teamz-share-bar:has(.share-btn--native) .share-btn--tw,
  .teamz-share-bar:has(.share-btn--native) .share-btn--fb {
    display: none;
  }
}

/* ===== SHARED / VIRAL BANNER ===== */
.teamz-shared-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  flex-wrap: wrap;
}

.shared-banner__text {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--heading);
  flex: 1;
  min-width: 200px;
}

.shared-banner__cta {
  padding: 0.5rem 1.25rem;
  background: var(--heading);
  color: var(--bg);
  border-radius: 8px;
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.shared-banner__cta:hover {
  opacity: 0.85;
}

@media (max-width: 480px) {
  .teamz-shared-banner {
    flex-direction: column;
    text-align: center;
  }
  .shared-banner__cta {
    width: 100%;
    text-align: center;
  }
}

/* ===== EMBED MODAL ===== */
.teamz-embed-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.embed-modal__content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.embed-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.embed-modal__header h3 {
  margin: 0;
  font-size: var(--text-lg);
  color: var(--heading);
}

.embed-modal__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  line-height: 1;
}

.embed-modal__close:hover {
  color: var(--heading);
}

.embed-modal__content p {
  margin: 0.5rem 0;
  font-size: var(--text-sm);
  color: var(--text);
}

.embed-modal__code {
  width: 100%;
  padding: 0.75rem;
  font-family: monospace;
  font-size: 0.8rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  resize: vertical;
  margin: 0.5rem 0;
}

.embed-modal__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.embed-modal__copy {
  padding: 0.5rem 1.25rem;
  background: var(--heading);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.embed-modal__copy:hover {
  opacity: 0.9;
}

.embed-modal__note {
  color: var(--text-muted) !important;
  font-size: 0.75rem !important;
  margin-top: 0.75rem !important;
}

/* ===== PWA INSTALL BANNER ===== */
.pwa-install-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  position: relative;
}

.pwa-install-banner__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--heading);
}

.pwa-install-banner__text {
  flex: 1;
  min-width: 0;
}

.pwa-install-banner__text strong {
  display: block;
  font-size: var(--text-md);
  color: var(--heading);
  margin-bottom: 0.1rem;
}

.pwa-install-banner__text span {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.pwa-install-banner__btn {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  background: var(--heading);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
  transition: opacity 0.15s;
}

.pwa-install-banner__btn:hover {
  opacity: 0.9;
}

.pwa-install-banner__close {
  position: absolute;
  top: 0.25rem;
  right: 0.4rem;
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.1rem 0.3rem;
  line-height: 1;
}

.pwa-install-banner__close:hover {
  color: var(--heading);
}

@media (max-width: 640px) {
  .pwa-install-banner {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    padding-right: 1.5rem;
  }
  .pwa-install-banner__text span {
    display: none;
  }
  .pwa-install-banner__btn {
    width: 100%;
    text-align: center;
    padding: 0.6rem;
  }
}

/* ===== iOS INSTALL MODAL ===== */
.pwa-ios-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}

.pwa-ios-modal__content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  padding: 1.5rem;
  width: 100%;
  max-width: 400px;
  position: relative;
}

.pwa-ios-modal__content h3 {
  margin: 0 0 1rem;
  font-size: var(--text-lg);
  color: var(--heading);
}

.pwa-ios-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  line-height: 1;
}

.pwa-ios-modal__close:hover {
  color: var(--heading);
}

.pwa-ios-steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pwa-ios-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.pwa-ios-step__num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--heading);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-sm);
}

.pwa-ios-step__text {
  font-size: var(--text-md);
  color: var(--text);
  padding-top: 0.15rem;
}

@media print {
  .pwa-install-banner,
  .pwa-ios-modal {
    display: none !important;
  }
}
