@import url('./base.css');

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  background: color-mix(in srgb, var(--accent) 9%, var(--paper));
  color: color-mix(in srgb, var(--accent) 75%, var(--ink));
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: clamp(1rem, 3vw, 1.6rem);
  box-shadow: var(--shadow);
}

.button, button {
  min-height: 2.75rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  padding: 0.65rem 1rem;
  cursor: pointer;
  font-weight: 750;
}

.button, button[type="submit"], .button-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.button-secondary, button[data-variant="secondary"] {
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink);
}

label { display: grid; gap: 0.4rem; color: var(--ink); font-weight: 700; }
input, select, textarea {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid #aeb5c0;
  border-radius: 0.7rem;
  background: white;
  padding: 0.65rem 0.75rem;
  color: var(--ink);
}

.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); gap: 1rem; }
.stack { display: grid; gap: 1rem; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; }
.muted { color: var(--muted); }
.eyebrow { color: var(--accent); font-weight: 850; letter-spacing: 0.09em; text-transform: uppercase; font-size: 0.78rem; }

[data-tone="error"] { color: var(--danger); }
[data-tone="success"] { color: var(--success); }
[data-tone="warning"] { color: var(--warning); }

.status {
  border-left: 4px solid currentColor;
  border-radius: 0.4rem;
  background: var(--paper);
  padding: 0.75rem 1rem;
}

.table-scroll { overflow-x: auto; border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { border-bottom: 1px solid var(--line); padding: 0.75rem; text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }

/* ==========================================================================
   Shared Monetization / Ad Slots (CLS-Safe)
   ========================================================================== */
.ad-slot {
  margin-block: clamp(1.75rem, 4vw, 3rem);
  width: 100%;
  min-height: 90px;
}

.ad-slot[hidden],
.ad-slot:empty {
  display: none !important;
  min-height: 0;
  margin: 0;
}

.ad-container {
  position: relative;
  border: 1px dashed color-mix(in srgb, var(--accent, #f26b38) 35%, var(--line, #e2e8f0));
  border-radius: var(--radius-sm, 0.75rem);
  background: color-mix(in srgb, var(--accent, #f26b38) 4%, var(--paper, #ffffff));
  padding: 0.85rem 1.25rem;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ad-container:hover {
  border-color: var(--accent, #f26b38);
  background: color-mix(in srgb, var(--accent, #f26b38) 8%, var(--paper, #ffffff));
}

.ad-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
  background: rgba(0, 0, 0, 0.06);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-grow: 1;
  gap: 1rem;
  flex-wrap: wrap;
}

.ad-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink, #0f172a);
}

.ad-cta {
  font-size: 0.88rem;
  font-weight: 750;
  color: var(--accent, #f26b38);
  white-space: nowrap;
}

/* Shared Transparency & Disclosure Footer */
.site-footer {
  margin-top: 2rem;
  padding-block: 1.5rem 2.25rem;
  border-top: 1px solid var(--line, #e2e8f0);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--muted, #64748b);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--accent, #f26b38);
  font-weight: 700;
}

.site-footer__bar a {
  color: var(--ink, #132035);
  text-decoration: none;
}

.site-footer__bar a:hover {
  text-decoration: underline;
}

.site-footer__bar:not(:first-child) {
  padding-top: 0.75rem;
  border-top: 1px solid color-mix(in srgb, var(--line, #e2e8f0) 65%, transparent);
}

/* ==========================================================================
   Shared Breadcrumb / In-Hero Back-to-Menu Navigation
   ========================================================================== */
.tool-back-nav {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.back-to-menu-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent, #f26b38) 35%, var(--line, #e2e8f0));
  background: color-mix(in srgb, var(--accent, #f26b38) 8%, var(--paper, #ffffff));
  color: var(--ink, #0f172a);
  font-size: 0.85rem;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.back-to-menu-link:hover, .back-to-menu-link:focus-visible {
  border-color: var(--accent, #f26b38);
  background: color-mix(in srgb, var(--accent, #f26b38) 16%, var(--paper, #ffffff));
  color: var(--accent, #f26b38);
  transform: translateX(-2px);
}

/* ==========================================================================
   Shared Educational & SEO Content Template Styling (Task 4)
   ========================================================================== */
.content-section {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  max-width: 56rem;
  margin-inline: auto;
}

.content-section h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin-bottom: 0.85rem;
  letter-spacing: -0.01em;
  color: var(--ink, #0f172a);
}

.content-section h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  margin-bottom: 0.5rem;
  color: var(--ink, #0f172a);
}

.content-section p {
  line-height: 1.7;
  color: var(--ink, #334155);
  margin-bottom: 1rem;
}

.step-guide-list {
  padding-left: 1.25rem;
  display: grid;
  gap: 0.85rem;
  line-height: 1.65;
}

.use-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.use-case-card, .example-card, .formula-box {
  border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--radius, 0.85rem);
  background: var(--paper, #ffffff);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.formula-box {
  background: color-mix(in srgb, var(--accent, #f26b38) 4%, var(--paper, #ffffff));
  border-color: color-mix(in srgb, var(--accent, #f26b38) 25%, var(--line, #e2e8f0));
}

.formula-box code, .example-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.95em;
  background: rgba(0, 0, 0, 0.05);
  padding: 0.15rem 0.4rem;
  border-radius: 0.3rem;
}

.faq-accordion {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.faq-item {
  border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--radius-sm, 0.65rem);
  background: var(--paper, #ffffff);
  padding: 0.25rem 1.25rem;
  transition: border-color 0.2s ease;
}

.faq-item[open] {
  border-color: var(--accent, #f26b38);
}

.faq-item summary {
  padding-block: 0.85rem;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink, #0f172a);
  outline: none;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--accent, #f26b38);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding-bottom: 1rem;
  color: var(--ink, #334155);
  line-height: 1.65;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.related-card {
  display: block;
  text-decoration: none;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--radius, 0.85rem);
  background: var(--paper, #ffffff);
  padding: 1.25rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.related-card:hover, .related-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent, #f26b38);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.related-card h3 {
  margin: 0 0 0.35rem;
  color: var(--ink, #0f172a);
}

.related-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted, #64748b);
  line-height: 1.5;
}

/* ==========================================================================
   SahayaDesk Mobile UI Skill — Shared Android-First Ergonomics & Overflow Guard
   ========================================================================== */
.faq-item summary {
  min-height: 44px;
  gap: 0.75rem;
}

@media (max-width: 48rem) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea {
    font-size: max(1rem, 16px);
    min-height: 44px;
  }

  button,
  .button,
  [role="button"],
  [role="tab"] {
    min-height: 44px;
    touch-action: manipulation;
  }

  .table-scroll,
  .table-responsive,
  .table-container,
  .compare-matrix-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 38rem) {
  .panel {
    padding: 0.9rem;
    border-radius: var(--radius-sm, 0.75rem);
  }
  .stack {
    gap: 0.75rem;
  }
}

@media (max-width: 30rem) {
  .field-grid,
  .two-up,
  .two-col-inputs,
  .form-row-2,
  .entry-fields {
    grid-template-columns: 1fr !important;
  }

  .use-case-card,
  .example-card,
  .formula-box,
  .related-card {
    padding: 1rem 1.1rem;
  }
}

/* ============================================================================
   UNIVERSAL MOBILE HERO, HEADER & CONTAINER ALIGNMENT (ALL 15 UTILITIES)
   Enforces compact titles (1-2 lines), 0px overflow, and unified left alignment.
   ============================================================================ */
@media (max-width: 48rem) {
  main {
    width: min(100% - 1.25rem, 1160px) !important;
    padding-top: 0.75rem !important;
    padding-inline: 0 !important;
    box-sizing: border-box !important;
  }

  .tool-back-nav {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 0.35rem !important;
    margin-bottom: 0.65rem !important;
    font-size: 0.78rem !important;
    padding-inline: 0 !important;
    width: 100% !important;
  }

  .hero {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
    padding-bottom: 0.85rem !important;
    margin-block: 0.5rem 0.85rem !important;
  }

  .hero > div,
  .hero__copy {
    max-width: 100% !important;
    width: 100% !important;
  }

  .hero h1,
  .hero__copy h1,
  h1#page-title,
  main h1 {
    font-size: clamp(1.25rem, 5vw, 1.55rem) !important;
    line-height: 1.22 !important;
    letter-spacing: -0.025em !important;
    max-width: 100% !important;
    margin-bottom: 0.35rem !important;
    text-wrap: pretty !important;
  }

  .hero h1 em {
    font-size: inherit !important;
    line-height: inherit !important;
  }

  .hero p,
  .hero__lede,
  .hero-copy,
  .hero > p {
    font-size: 0.86rem !important;
    line-height: 1.45 !important;
    margin-bottom: 0.5rem !important;
    max-width: 100% !important;
  }

  .hero__top-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.35rem !important;
    margin-bottom: 0.4rem !important;
  }

  .hero .lang-switcher {
    display: none !important;
  }

  .eyebrow {
    font-size: 0.68rem !important;
    letter-spacing: 0.08em !important;
    line-height: 1.35 !important;
    margin-bottom: 0.25rem !important;
  }

  .trust-row {
    gap: 0.35rem !important;
    margin-top: 0.35rem !important;
  }

  .trust-row span {
    font-size: 0.72rem !important;
    padding: 0.25rem 0.55rem !important;
  }
}

/* ----------------------------------------------------
   LAST UPDATED METADATA BAR & OUTDATED WARNING
   ---------------------------------------------------- */
.last-updated-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted, #64748b);
  background: var(--paper, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 999px;
  padding: 6px 14px;
  margin: 10px 0 16px 0;
  max-width: 100%;
  box-sizing: border-box;
}

.last-updated-bar.is-outdated {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(254, 242, 242, 0.65);
}

.last-updated-bar.is-fresh {
  border-color: rgba(16, 185, 129, 0.35);
}

.last-updated-bar .update-datetime {
  color: var(--ink, #0f172a);
  font-weight: 600;
}

.last-updated-bar .update-source em {
  font-style: normal;
  color: var(--ink, #0f172a);
  font-weight: 500;
}

.last-updated-bar .source-separator {
  color: var(--line, #cbd5e1);
}

.badge-outdated {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #dc2626;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.badge-fresh {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #059669;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

@media (max-width: 480px) {
  .last-updated-bar {
    font-size: 0.75rem;
    padding: 6px 10px;
    gap: 6px;
    border-radius: 8px;
  }
}




