/* ==========================================================================
   UseTools.in - shared extras
   1) .ut-extra   : "How to use" + FAQ + related-tools block on every tool page
   2) .ut-footer-tools : tool links row inside the shared footer
   3) .hub-*      : home page (tools hub)
   Every rule is prefixed, so nothing here can leak into a page's own styles.
   ========================================================================== */

/* ---------- 1) Tool page content block ---------- */
.ut-extra { width: calc(100% - 32px); max-width: 750px; margin: 32px auto 0; padding: 30px; background: #fff; color: #334155; border: 1px solid #cbd5e1; border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,.05); box-sizing: border-box; font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: .95rem; line-height: 1.65; text-align: left; }
.ut-extra *, .ut-extra *::before, .ut-extra *::after { box-sizing: border-box; }
.ut-extra h2 { color: #0f172a; font-size: 1.4rem; font-weight: 800; line-height: 1.3; margin: 34px 0 12px; letter-spacing: -.01em; }
.ut-extra h2:first-child { margin-top: 0; }
.ut-extra h3 { color: #0f172a; font-size: 1.05rem; font-weight: 700; margin: 22px 0 8px; }
.ut-extra p { margin: 0 0 12px; color: #334155; }
.ut-extra ul { list-style: disc; padding-left: 1.3rem; margin: 8px 0 14px; }
.ut-extra ol { list-style: none; counter-reset: ut-step; padding: 0; margin: 10px 0 16px; display: flex; flex-direction: column; gap: 10px; }
.ut-extra ol > li { counter-increment: ut-step; position: relative; padding: 12px 14px 12px 52px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; margin: 0; }
.ut-extra ol > li::before { content: counter(ut-step); position: absolute; left: 14px; top: 12px; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; font-weight: 800; font-size: .82rem; display: flex; align-items: center; justify-content: center; }
.ut-extra ul > li { margin: 0 0 6px; }
.ut-extra strong { color: #0f172a; }
.ut-extra a { color: #4338ca; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ut-extra a:hover { color: #312e81; }
.ut-extra code { background: #eef2ff; color: #3730a3; padding: 1px 6px; border-radius: 5px; font-size: .88em; }
.ut-extra .ut-example { background: #f1f5f9; border-left: 4px solid #6366f1; border-radius: 8px; padding: 12px 14px; margin: 10px 0 16px; font-size: .9rem; }
.ut-extra .ut-example p:last-child { margin-bottom: 0; }

/* Partner / second-opinion callout */
.ut-extra .ut-note { background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 12px; padding: 16px 18px; margin: 20px 0 6px; }
.ut-extra .ut-note h3 { margin-top: 0; }
.ut-extra .ut-note p:last-child { margin-bottom: 0; }

/* Clickable FAQ */
.ut-extra .ut-faq { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.ut-extra .ut-faq details { border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; overflow: hidden; transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease; }
.ut-extra .ut-faq details[open] { background: #fff; border-color: #a5b4fc; box-shadow: 0 6px 18px rgba(99,102,241,.10); }
.ut-extra .ut-faq summary { cursor: pointer; list-style: none; padding: 14px 46px 14px 16px; font-weight: 700; font-size: .95rem; color: #0f172a; position: relative; line-height: 1.45; }
.ut-extra .ut-faq summary::-webkit-details-marker { display: none; }
.ut-extra .ut-faq summary::marker { content: ""; }
.ut-extra .ut-faq summary::after { content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; border-right: 2px solid #6366f1; border-bottom: 2px solid #6366f1; transform: translateY(-70%) rotate(45deg); transition: transform .2s ease; }
.ut-extra .ut-faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.ut-extra .ut-faq summary:hover { color: #4338ca; }
.ut-extra .ut-faq summary:focus-visible { outline: 2px solid #818cf8; outline-offset: -2px; border-radius: 12px; }
.ut-extra .ut-faq .ut-ans { padding: 0 16px 14px; }
.ut-extra .ut-faq .ut-ans p { margin: 0 0 8px; }
.ut-extra .ut-faq .ut-ans p:last-child { margin-bottom: 0; }

/* Related tools chips */
.ut-extra .ut-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 10px 0 0; }
.ut-extra .ut-chips li { margin: 0; }
.ut-extra .ut-chips a { display: inline-block; padding: 7px 14px; background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 999px; font-size: .84rem; text-decoration: none; }
.ut-extra .ut-chips a:hover { background: #e0e7ff; }

@media (max-width: 600px) {
  .ut-extra { padding: 20px 16px; width: calc(100% - 20px); }
  .ut-extra h2 { font-size: 1.2rem; }
  .ut-extra ol > li { padding-left: 48px; }
}

/* ---------- 2) Footer: tool links row ---------- */
.ut-footer-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; padding: 2px 0 10px; border-bottom: 1px solid rgba(255,255,255,.08); font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.ut-footer-tools strong { width: 100%; text-align: center; color: #fff; font-size: .8rem; font-weight: 700; margin-bottom: 2px; }
.ut-footer-tools a { color: #cbd5e1; text-decoration: none; font-size: .76rem; font-weight: 600; transition: color .2s ease; }
.ut-footer-tools a:hover { color: #fff; text-decoration: underline; }

/* ---------- 3) Home page (tools hub) ---------- */
.hub-wrap { max-width: 1100px; margin: 0 auto; }
.hub-hero { text-align: center; padding: 34px 20px 10px; }
.hub-hero h1 { color: #0f172a; font-size: 2.3rem; line-height: 1.2; font-weight: 800; letter-spacing: -.03em; margin: 0 0 12px; }
.hub-hero h1 span { background: linear-gradient(135deg, #6366f1, #4338ca); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hub-hero p { color: #475569; font-size: 1.05rem; max-width: 700px; margin: 0 auto 22px; line-height: 1.6; }
.hub-search { position: relative; max-width: 560px; margin: 0 auto 16px; }
.hub-search input { width: 100%; padding: 15px 18px 15px 48px; border-radius: 14px; border: 1.5px solid #cbd5e1; background: #fff; font: inherit; font-size: 1rem; color: #0f172a; box-shadow: 0 8px 24px rgba(15,23,42,.06); }
.hub-search input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99,102,241,.18); }
.hub-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: #94a3b8; pointer-events: none; }
.hub-filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 8px; }
.hub-filters button { font: inherit; font-size: .88rem; font-weight: 700; padding: 8px 16px; border-radius: 999px; border: 1px solid #c7d2fe; background: #fff; color: #4338ca; cursor: pointer; transition: all .15s ease; }
.hub-filters button:hover { background: #eef2ff; }
.hub-filters button[aria-pressed="true"] { background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(99,102,241,.3); }
.hub-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 18px 0 0; padding: 0; list-style: none; color: #475569; font-size: .88rem; font-weight: 600; }
.hub-trust li::before { content: "✓ "; color: #059669; font-weight: 800; }

.hub-section { margin-top: 44px; }
.hub-section > h2 { color: #0f172a; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; }
.hub-section > p.hub-lead { color: #64748b; margin: 0 0 20px; font-size: .98rem; }

.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.hub-card { position: relative; display: flex; flex-direction: column; gap: 10px; background: rgba(255,255,255,.98); border: 1px solid #e2e8f0; border-radius: 18px; padding: 22px; text-decoration: none; color: inherit; box-shadow: 0 6px 18px rgba(15,23,42,.05); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.hub-card:hover, .hub-card:focus-visible { transform: translateY(-4px); border-color: #a5b4fc; box-shadow: 0 16px 34px rgba(99,102,241,.18); outline: none; }
.hub-card .hub-ico { width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, rgba(99,102,241,.14), rgba(79,70,229,.24)); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.hub-card h3 { margin: 0; font-size: 1.1rem; font-weight: 800; color: #0f172a; }
.hub-card p { margin: 0; color: #475569; font-size: .9rem; line-height: 1.55; flex-grow: 1; }
.hub-card .hub-tag { align-self: flex-start; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #4338ca; background: #eef2ff; padding: 3px 10px; border-radius: 999px; }
.hub-card .hub-go { color: #4338ca; font-weight: 800; font-size: .9rem; }
.hub-card[hidden] { display: none; }
.hub-empty { display: none; text-align: center; padding: 30px; color: #64748b; font-weight: 600; background: #fff; border: 1px dashed #cbd5e1; border-radius: 14px; }

.hub-panel { background: rgba(255,255,255,.98); border: 1px solid #e2e8f0; border-radius: 20px; padding: 28px; box-shadow: 0 10px 30px rgba(15,23,42,.05); color: #334155; line-height: 1.65; font-size: .95rem; }
.hub-panel h3 { color: #0f172a; margin: 0 0 6px; font-size: 1.08rem; font-weight: 800; }
.hub-panel p { margin: 0 0 12px; }
.hub-panel a { color: #4338ca; font-weight: 600; text-underline-offset: 2px; }
.hub-panel a:hover { color: #312e81; }
.hub-panel ol, .hub-panel ul { margin: 6px 0 12px; padding-left: 1.3rem; }
.hub-panel li { margin-bottom: 5px; }
.hub-steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; list-style: none; padding: 0 !important; margin: 0 !important; counter-reset: hs; }
.hub-steps3 li { counter-increment: hs; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; padding: 16px 16px 16px 58px; position: relative; margin: 0 !important; }
.hub-steps3 li::before { content: counter(hs); position: absolute; left: 16px; top: 16px; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.hub-howto { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.hub-howto .hub-panel { padding: 22px; }
.hub-howto ol { padding-left: 1.2rem; font-size: .92rem; }
.hub-more { display: inline-block; margin-top: 4px; font-weight: 800; }

.hub-table-scroll { overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; }
.hub-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 520px; }
.hub-table th { background: #eef2ff; color: #0f172a; text-align: left; padding: 11px 14px; font-weight: 800; }
.hub-table td { padding: 11px 14px; border-top: 1px solid #e2e8f0; color: #475569; vertical-align: top; }
.hub-table td a { color: #4338ca; font-weight: 700; }

.hub-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; list-style: none; padding: 0 !important; margin: 0 !important; }
.hub-posts li { margin: 0 !important; }
.hub-posts a { display: block; height: 100%; padding: 14px 16px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; text-decoration: none; font-weight: 700; color: #0f172a; font-size: .9rem; line-height: 1.45; transition: border-color .15s ease, background-color .15s ease; }
.hub-posts a:hover { border-color: #a5b4fc; background: #eef2ff; color: #4338ca; }

.hub-faq { display: flex; flex-direction: column; gap: 10px; }
.hub-faq details { border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; overflow: hidden; transition: border-color .2s ease, background-color .2s ease; }
.hub-faq details[open] { background: #fff; border-color: #a5b4fc; box-shadow: 0 6px 18px rgba(99,102,241,.10); }
.hub-faq summary { cursor: pointer; list-style: none; padding: 15px 48px 15px 18px; font-weight: 700; font-size: .98rem; color: #0f172a; position: relative; line-height: 1.45; }
.hub-faq summary::-webkit-details-marker { display: none; }
.hub-faq summary::marker { content: ""; }
.hub-faq summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 8px; height: 8px; border-right: 2px solid #6366f1; border-bottom: 2px solid #6366f1; transform: translateY(-70%) rotate(45deg); transition: transform .2s ease; }
.hub-faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.hub-faq summary:hover { color: #4338ca; }
.hub-faq summary:focus-visible { outline: 2px solid #818cf8; outline-offset: -2px; border-radius: 12px; }
.hub-faq .hub-ans { padding: 0 18px 16px; color: #475569; font-size: .94rem; line-height: 1.65; }
.hub-faq .hub-ans p { margin: 0 0 8px; }
.hub-faq .hub-ans p:last-child { margin-bottom: 0; }
.hub-faq .hub-ans a { color: #4338ca; font-weight: 600; }

@media (max-width: 860px) {
  .hub-steps3, .hub-howto { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hub-hero h1 { font-size: 1.7rem; }
  .hub-hero p { font-size: .98rem; }
  .hub-section > h2 { font-size: 1.35rem; }
  .hub-panel { padding: 20px 16px; }
}
