/* ============================================================================
   WedMeWed — tools.css (Phase 2)
   Loaded only on /tools and /tools/{slug} via the layout's $extraCss hook.
   Deliberately lean: the invitation-card shell (.form-card / .promise-card),
   heroes (.page-hero), sections, buttons (.btn-wmw*), prose (.content-prose)
   and tokens (--wmw-*) all come from assets/css/style.css. This file only
   styles the pieces Phase 2 introduces: category filters, the calculator
   internals, the table of contents, the FAQ accordion skin and content lists.
   ============================================================================ */

/* --------------------------- Category / preset pills ---------------------- */
.tool-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin-bottom: 2rem;
}
.tool-filter {
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--wmw-sindoor);
  background: #fff;
  border: 1px solid var(--wmw-line);
  border-radius: var(--radius-btn);
  padding: 0.4rem 1.05rem;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out),
              border-color 0.2s var(--ease-out), transform 0.15s var(--ease-out);
}
.tool-filter:hover { border-color: var(--wmw-marigold-soft); transform: translateY(-1px); }
.tool-filter.is-active {
  background: var(--wmw-sindoor);
  border-color: var(--wmw-sindoor);
  color: var(--wmw-ivory);
}
.tool-filter:focus-visible { outline: 2px solid var(--wmw-marigold); outline-offset: 2px; }

/* --------------------------- Calculator: layout --------------------------- */
.wbc-field { margin-bottom: 1.4rem; }

.wbc-amount-wrap { position: relative; max-width: 22rem; }
.wbc-rupee {
  position: absolute; left: 0.95rem; top: 50%; transform: translateY(-50%);
  font-family: var(--font-display); font-size: 1.2rem; color: var(--wmw-marigold);
  pointer-events: none;
}
.wbc-amount-input {
  font-family: var(--font-display);
  font-size: 1.3rem;
  padding-left: 2.3rem;
}
.wbc-presets { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* --------------------------- Calculator: sliders -------------------------- */
.wbc-row { padding: 0.8rem 0; border-bottom: 1px dashed var(--wmw-line); }
.wbc-row:last-child { border-bottom: 0; }
.wbc-row-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; margin-bottom: 0.35rem;
}
.wbc-row-label { font-weight: 700; font-size: 0.92rem; color: var(--wmw-ink); margin: 0; }
.wbc-row-values { display: flex; align-items: baseline; gap: 0.7rem; white-space: nowrap; }
.wbc-row-amount { font-family: var(--font-display); color: var(--wmw-sindoor); font-size: 0.95rem; }
.wbc-row-pct { color: var(--wmw-ink-soft); font-size: 0.85rem; }
.wbc-pct-input {
  width: 3.3rem; text-align: right; font-size: 0.85rem;
  border: 1px solid var(--wmw-line); border-radius: 8px; padding: 0.15rem 0.35rem;
  color: var(--wmw-ink);
}
.wbc-pct-input:focus {
  outline: none; border-color: var(--wmw-marigold);
  box-shadow: 0 0 0 0.15rem rgba(198, 144, 43, 0.18);
}
.wbc-range { width: 100%; accent-color: var(--wmw-sindoor); height: 1.1rem; }

/* --------------------------- Calculator: results -------------------------- */
.wbc-results {
  background: var(--wmw-ivory);
  border: 1px solid var(--wmw-marigold-soft);
  border-radius: 14px;
  padding: 1.4rem;
  position: sticky;
  top: 5.5rem;
}
.wbc-results-title {
  font-family: var(--font-display); font-size: 1.15rem;
  color: var(--wmw-sindoor-deep); margin-bottom: 0.9rem;
}
.wbc-alloc { height: 10px; border-radius: var(--radius-btn); background: var(--wmw-blush); overflow: hidden; }
.wbc-alloc-fill {
  height: 100%; width: 100%; border-radius: var(--radius-btn);
  background: var(--wmw-marigold);
  transition: width 0.25s var(--ease-out), background-color 0.25s var(--ease-out);
}
.wbc-alloc.is-ok    .wbc-alloc-fill { background: #4C7A4F; }
.wbc-alloc.is-under .wbc-alloc-fill { background: var(--wmw-marigold); }
.wbc-alloc.is-over  .wbc-alloc-fill { background: var(--wmw-sindoor); }
.wbc-alloc-status { font-size: 0.85rem; color: var(--wmw-ink-soft); margin: 0.5rem 0 1rem; }

.wbc-table { margin-bottom: 0.5rem; }
.wbc-table th, .wbc-table td {
  background: transparent; border-color: var(--wmw-line);
  font-size: 0.9rem; color: var(--wmw-ink); padding: 0.5rem 0.25rem;
}
.wbc-table thead th {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--wmw-ink-soft);
}
.wbc-total-row th, .wbc-total-row td {
  font-family: var(--font-display); color: var(--wmw-sindoor-deep);
  border-top: 2px solid var(--wmw-marigold-soft);
}
.wbc-remaining-row th, .wbc-remaining-row td { color: var(--wmw-ink-soft); font-size: 0.85rem; }

.wbc-actions { margin-top: 1rem; }
.wbc-feedback { min-height: 1.2rem; font-size: 0.85rem; color: #4C7A4F; margin: 0.6rem 0 0; }
.wbc-privacy { font-size: 0.78rem; color: var(--wmw-ink-soft); margin: 0.7rem 0 0; }

/* --------------------------- Table of contents ---------------------------- */
.tool-toc-wrap { position: sticky; top: 5.5rem; }
.tool-toc {
  background: #fff;
  border: 1px solid var(--wmw-line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 1.3rem 1.4rem;
}
.tool-toc-title {
  font-family: var(--font-display); font-size: 1rem;
  color: var(--wmw-sindoor-deep); margin-bottom: 0.7rem;
}
.tool-toc-list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.tool-toc-list li + li { margin-top: 0.4rem; }
.tool-toc-list a {
  display: block; font-size: 0.9rem; color: var(--wmw-ink-soft);
  text-decoration: none; padding-left: 1.1rem; position: relative;
  transition: color 0.2s var(--ease-out);
}
.tool-toc-list a::before {
  content: "\2726"; position: absolute; left: 0; top: 0.12rem;
  color: var(--wmw-marigold-soft); font-size: 0.7rem;
}
.tool-toc-list a:hover, .tool-toc-list a:focus-visible { color: var(--wmw-sindoor); }

/* --------------------------- Long-form article ---------------------------- */
.tool-article-section { scroll-margin-top: 5.5rem; }
.tool-article-section + .tool-article-section { margin-top: 1.4rem; }

/* Content lists produced by Tool::formatContent() */
.tool-list { list-style: none; padding-left: 0; margin: 0.6rem 0 1rem; }
ol.tool-list { counter-reset: wmw-step; }
.tool-list li { position: relative; padding-left: 1.7rem; margin-bottom: 0.55rem; line-height: 1.7; color: var(--wmw-ink); }
ul.tool-list li::before {
  content: "\2726"; position: absolute; left: 0; top: 0.15rem;
  color: var(--wmw-marigold); font-size: 0.8rem;
}
ol.tool-list li::before {
  counter-increment: wmw-step; content: counter(wmw-step);
  position: absolute; left: 0; top: 0.1rem;
  width: 1.2rem; height: 1.2rem; border-radius: 50%;
  background: var(--wmw-blush); color: var(--wmw-sindoor);
  font-size: 0.72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* --------------------------- FAQ accordion skin --------------------------- */
.faq-accordion { --bs-accordion-border-color: transparent; }
.faq-item {
  background: #fff;
  border: 1px solid var(--wmw-line) !important;
  border-radius: 14px !important;
  overflow: hidden;
  margin-bottom: 0.7rem;
  box-shadow: var(--shadow-soft);
}
.faq-question {
  font-family: var(--font-body); font-weight: 700; font-size: 0.95rem;
  color: var(--wmw-ink); background: #fff; box-shadow: none !important;
}
.faq-question:not(.collapsed) { color: var(--wmw-sindoor); background: var(--wmw-ivory); }
.faq-question:focus-visible { outline: 2px solid var(--wmw-marigold); outline-offset: -2px; }
.faq-answer { color: var(--wmw-ink-soft); line-height: 1.7; font-size: 0.92rem; border-top: 1px solid var(--wmw-line); }

/* --------------------------- Responsive / motion -------------------------- */
@media (max-width: 991.98px) {
  .wbc-results { position: static; top: auto; }
  .tool-toc-wrap { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  .tool-filter, .wbc-alloc-fill, .tool-toc-list a { transition: none; }
  .tool-filter:hover { transform: none; }
}
