/* ==========================================================================
   Tool pages: hero, tool card, SEO content, related tools
   Colors come from the --ms-* variables of landing.css (light + dark).
   ========================================================================== */

.tl-page { color: var(--ms-text); }
.tl-page h1, .tl-page h2, .tl-page h3 { color: var(--ms-ink); letter-spacing: -.015em; }

/* Hero */
.tl-hero {
    position: relative; overflow: hidden;
    padding: 1.75rem 0 4.5rem;
    background:
        radial-gradient(520px 300px at 8% 0%, rgba(239, 43, 75, .10), transparent 70%),
        radial-gradient(520px 320px at 95% 20%, rgba(109, 93, 252, .12), transparent 70%),
        var(--ms-bg-pink);
    border-bottom: 1px solid var(--ms-line);
}
.tl-breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; padding: 0; margin: 0 0 1.4rem; list-style: none; font-size: .85rem; font-weight: 500; }
.tl-breadcrumbs li { display: flex; align-items: center; color: var(--ms-ink); }
.tl-breadcrumbs li + li::before { content: "/"; margin-right: .35rem; color: var(--ms-muted); }
.tl-breadcrumbs a { color: var(--ms-muted); text-decoration: none; }
.tl-breadcrumbs a:hover { color: var(--ms-red); }

.tl-hero-main { display: flex; align-items: flex-start; gap: 1.25rem; }
.tl-hero-icon {
    width: 64px; height: 64px; flex-shrink: 0; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--ms-red), var(--ms-orange)); color: #fff;
    box-shadow: 0 12px 28px rgba(239, 43, 75, .28);
}
.tl-hero-icon svg { width: 28px; height: 28px; }
.tl-hero h1 { font-size: 2.25rem; font-weight: 600; line-height: 1.15; margin: .1rem 0 .5rem; }
.tl-hero-lead { font-size: 1.05rem; max-width: 44rem; margin: 0 0 1rem; }

.tl-badges { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.tl-badge {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .3rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 500;
    background: var(--ms-card); color: var(--ms-text); border: 1px solid var(--ms-line);
}
.tl-badge svg { width: 10px; height: 10px; color: var(--ms-green); }
.tl-badge-category { background: var(--ms-red-soft); color: var(--ms-red); border-color: transparent; font-weight: 600; }

/* Tool card, pulled up into the hero */
.tl-tool { position: relative; margin-top: -3rem; }
.tl-tool .card, .tl-tool #tool-result .card {
    border-radius: 16px !important; overflow: hidden;
    border: 1px solid var(--ms-line) !important;
    box-shadow: var(--ms-shadow) !important;
}
.tl-tool > .card { box-shadow: var(--ms-shadow-lg) !important; }
.tl-tool .card-header { background: transparent; border-bottom: 1px solid var(--ms-line); padding: .9rem 1.5rem; }
.tl-tool .card-body { padding: 1.5rem; }
.tl-tool .form-control, .tl-tool .custom-select { border-radius: 10px; }
.tl-tool textarea.form-control { min-height: 140px; }
.tl-tool .btn { border-radius: 10px; }
.tl-tool .btn-danger:not(.btn-sm) { padding-left: 1.5rem; padding-right: 1.5rem; font-weight: 600; }

/* Loading state for the submit buttons */
.tl-loading { position: relative; pointer-events: none; opacity: .85; }
.tl-loading::before {
    content: ""; display: inline-block; width: 1em; height: 1em; margin-right: .5rem; vertical-align: -.15em;
    border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
    animation: tl-spin .7s linear infinite;
}
@keyframes tl-spin { to { transform: rotate(360deg); } }
#tool-result { scroll-margin-top: 90px; }
#tool-result.tl-fade > * { animation: tl-fade-in .25s ease; }
@keyframes tl-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* SEO content */
.tl-content { margin-top: 3rem; }
.tl-section { margin-bottom: 2.5rem; }
.tl-section h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: 1rem; }
.tl-section p { line-height: 1.75; }

.tl-steps { counter-reset: none; padding: 0; margin: 0; list-style: none; display: grid; gap: .75rem; }
.tl-steps li {
    display: flex; align-items: center; gap: 1rem; padding: .9rem 1.1rem;
    background: var(--ms-card); border: 1px solid var(--ms-line); border-radius: 12px;
}
.tl-step-number {
    width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--ms-red-soft); color: var(--ms-red); font-weight: 700; font-size: .9rem;
}

.tl-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.tl-feature {
    display: flex; gap: .9rem; padding: 1.1rem; border-radius: 12px;
    background: var(--ms-card); border: 1px solid var(--ms-line);
}
.tl-feature h3 { font-size: 1rem; font-weight: 600; margin: 0 0 .3rem; }
.tl-feature p { font-size: .92rem; margin: 0; line-height: 1.6; }
.tl-feature-icon {
    width: 28px; height: 28px; flex-shrink: 0; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(22, 163, 74, .12); color: var(--ms-green);
}
.tl-feature-icon svg { width: 12px; height: 12px; }

.tl-faq { display: grid; gap: .75rem; }
.tl-faq details { background: var(--ms-card); border: 1px solid var(--ms-line); border-radius: 12px; overflow: hidden; }
.tl-faq summary {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 1.2rem; cursor: pointer; list-style: none; font-weight: 600; color: var(--ms-ink);
}
.tl-faq summary::-webkit-details-marker { display: none; }
.tl-faq summary svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--ms-muted); transition: transform .2s; }
.tl-faq details[open] summary svg { transform: rotate(180deg); }
.tl-faq details p { padding: 0 1.2rem 1.1rem; margin: 0; line-height: 1.7; }

/* Sidebar */
.tl-aside { position: sticky; top: 90px; display: grid; gap: 1rem; }
.tl-card { padding: 1.3rem; border-radius: 14px; background: var(--ms-card); border: 1px solid var(--ms-line); }
.tl-card-title { font-size: 1.05rem !important; font-weight: 600; margin: 0 0 .8rem; }
.tl-facts { margin: 0; }
.tl-facts div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-top: 1px solid var(--ms-line); font-size: .9rem; }
.tl-facts div:first-child { border-top: 0; padding-top: 0; }
.tl-facts dt { font-weight: 400; color: var(--ms-muted); }
.tl-facts dd { margin: 0; font-weight: 600; color: var(--ms-ink); text-align: right; }
.tl-cta { background: linear-gradient(160deg, var(--ms-red-soft), var(--ms-card) 70%); }
.tl-cta p { font-size: .9rem; margin-bottom: .8rem; }
.tl-cta .form-control, .tl-cta .btn { border-radius: 10px; }

/* Related tools */
.tl-related { margin-top: 1rem; padding-top: 2.5rem; border-top: 1px solid var(--ms-line); }
.tl-related-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.tl-related-head h2 { font-size: 1.5rem; font-weight: 600; margin: 0; }
.tl-link { display: inline-flex; align-items: center; gap: .3rem; color: var(--ms-red); font-weight: 600; text-decoration: none; white-space: nowrap; }
.tl-link svg { width: 10px; height: 10px; }
.tl-link:hover { color: var(--ms-red-dark); text-decoration: none; }

.tl-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.tl-related-item {
    display: flex; align-items: flex-start; gap: .9rem; padding: 1.1rem;
    border-radius: 14px; background: var(--ms-card); border: 1px solid var(--ms-line);
    text-decoration: none !important; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.tl-related-item:hover { transform: translateY(-3px); box-shadow: var(--ms-shadow); border-color: rgba(239, 43, 75, .35); }
.tl-related-icon {
    width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--ms-red-soft); color: var(--ms-red);
}
.tl-related-icon svg { width: 18px; height: 18px; }
.tl-related-text { display: flex; flex-direction: column; min-width: 0; }
.tl-related-name { font-weight: 600; color: var(--ms-ink); margin-bottom: .2rem; }
.tl-related-description { font-size: .85rem; color: var(--ms-text); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Responsive */
@media (max-width: 991.98px) {
    .tl-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tl-aside { position: static; margin-bottom: 2rem; }
}
@media (max-width: 767.98px) {
    .tl-hero { padding-bottom: 4rem; }
    .tl-hero h1 { font-size: 1.7rem; }
    .tl-hero-main { flex-direction: column; gap: .9rem; }
    .tl-hero-icon { width: 52px; height: 52px; border-radius: 14px; }
    .tl-features, .tl-related-grid { grid-template-columns: minmax(0, 1fr); }
    .tl-tool .card-body { padding: 1.1rem; }
    .tl-related-head { flex-direction: column; align-items: flex-start; }
}
