/*
 * Free Tools — shared stylesheet
 *
 * Uses the blog design tokens (blog-standalone.css must be loaded first).
 * Scoped to .tool-page and .tools-hub body classes to avoid leaking.
 */

/* ==========================================================================
   Shared layout: hero, breadcrumbs, section rhythm
   ========================================================================== */

.tools-hub,
.tool-page {
    background: var(--bg-surface-primary, #0B0A15);
    color: var(--fg-primary-rest, #ebebee);
}

.tools-hero {
    position: relative;
    isolation: isolate;
    padding: 140px 0 60px;
    overflow: hidden;
}

.tools-hero::before,
.tools-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.28;
    z-index: -1;
    pointer-events: none;
}

.tools-hero::before {
    width: 480px; height: 480px;
    background: linear-gradient(135deg, var(--colors-violet-300, #c4b5ff), var(--colors-peach-300, #ffbfb5));
    top: -120px; right: -140px;
}

.tools-hero::after {
    width: 360px; height: 360px;
    background: linear-gradient(135deg, var(--colors-blue-200, #b5bfff), var(--colors-violet-300, #c4b5ff));
    bottom: -160px; left: -120px;
}

.tools-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
    padding: 0 var(--spacing-24, 24px);
}

.tools-hero-eyebrow {
    display: inline-block;
    font-family: var(--font-family-inter-tight);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--colors-violet-300, #c4b5ff);
    padding: 6px 14px;
    border: 1px solid rgba(196, 181, 255, 0.35);
    border-radius: 999px;
    background: rgba(196, 181, 255, 0.08);
    margin-bottom: 22px;
}

.tools-hero h1 {
    font-family: "Gilroy-Bold", var(--font-family-inter-tight);
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.01em;
    margin: 0 0 18px;
    color: #fff;
}

.tools-hero h1 .accent {
    background: var(--gradient-button-outline);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.tools-hero p.tools-hero-sub {
    font-family: var(--font-family-inter-tight);
    font-size: clamp(15px, 1.8vw, 19px);
    line-height: 1.55;
    color: rgba(235, 235, 238, 0.75);
    margin: 0 auto;
    max-width: 640px;
}

/* Breadcrumbs */
.tools-breadcrumbs {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-24, 24px);
    padding-top: 110px;
}

.tools-breadcrumbs ol {
    display: flex; flex-wrap: wrap; gap: 8px;
    list-style: none; margin: 0; padding: 0;
    font-family: var(--font-family-inter-tight);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.tools-breadcrumbs li { display: flex; align-items: center; gap: 8px; }
.tools-breadcrumbs li + li::before {
    content: '/';
    color: rgba(255, 255, 255, 0.3);
}

.tools-breadcrumbs a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}
.tools-breadcrumbs a:hover { color: var(--colors-violet-300, #c4b5ff); }

/* ==========================================================================
   Hub: tools grid
   ========================================================================== */

.tools-grid-section {
    padding: 40px 0 80px;
}

.tools-grid-section .container { max-width: 1200px; }

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

.tool-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    min-height: 260px;
}

.tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(138.91deg, rgba(255, 191, 181, 0) 0%, rgba(196, 181, 255, 0.5) 50%, rgba(181, 191, 255, 0) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.tool-card:hover {
    transform: translateY(-3px);
    border-color: rgba(196, 181, 255, 0.25);
    background: rgba(255, 255, 255, 0.05);
}
.tool-card:hover::before { opacity: 1; }

.tool-card__audience {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-family-inter-tight);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--colors-violet-300, #c4b5ff);
    margin-bottom: 18px;
}

.tool-card__audience::before {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--colors-violet-300, #c4b5ff);
    box-shadow: 0 0 8px rgba(196, 181, 255, 0.5);
}

.tool-card__title {
    font-family: "Gilroy-Bold", var(--font-family-inter-tight);
    font-size: 22px;
    line-height: 1.2;
    margin: 0 0 10px;
    color: #fff;
}

.tool-card__tagline {
    font-family: var(--font-family-inter-tight);
    font-size: 15px;
    color: rgba(235, 235, 238, 0.75);
    margin: 0 0 18px;
}

.tool-card__desc {
    font-family: var(--font-family-inter-tight);
    font-size: 14px;
    line-height: 1.55;
    color: rgba(235, 235, 238, 0.55);
    margin: 0 0 24px;
    flex: 1;
}

.tool-card__link {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-family-inter-tight);
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    letter-spacing: 0.02em;
}
.tool-card__link::after {
    content: '→';
    transition: transform 0.2s ease;
}
.tool-card:hover .tool-card__link::after { transform: translateX(4px); }

/* Audience filter pills */
.tools-filter {
    display: flex; gap: 8px; flex-wrap: wrap;
    justify-content: center;
    margin: 0 0 32px;
}
.tools-filter__pill {
    font-family: var(--font-family-inter-tight);
    font-size: 13px;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
}
.tools-filter__pill:hover,
.tools-filter__pill[aria-pressed="true"] {
    border-color: rgba(196, 181, 255, 0.4);
    color: #fff;
    background: rgba(196, 181, 255, 0.08);
}

/* ==========================================================================
   Tool page layout: sticky tool + explainer grid
   ========================================================================== */

.tool-section {
    padding: 20px 0 60px;
}
.tool-section .container { max-width: 1200px; }

.tool-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

@media (min-width: 1024px) {
    .tool-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
    }
    .tool-layout__aside { position: sticky; top: 120px; }
}

.tool-card-outer {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.tool-card-outer::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(138.91deg, rgba(255, 191, 181, 0.25) 0%, rgba(196, 181, 255, 0.35) 50%, rgba(181, 191, 255, 0.25) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

@media (max-width: 640px) {
    .tool-card-outer { padding: 22px; border-radius: 18px; }
}

.tool-card-title {
    font-family: "Gilroy-Bold", var(--font-family-inter-tight);
    font-size: 22px;
    color: #fff;
    margin: 0 0 6px;
}

.tool-card-subtitle {
    font-family: var(--font-family-inter-tight);
    font-size: 14px;
    color: rgba(235, 235, 238, 0.65);
    margin: 0 0 24px;
}

/* Form primitives */
.tool-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

@media (min-width: 600px) {
    .tool-form.grid-2 { grid-template-columns: 1fr 1fr; }
}

.tool-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tool-field label {
    font-family: var(--font-family-inter-tight);
    font-size: 13px;
    font-weight: 500;
    color: rgba(235, 235, 238, 0.85);
    letter-spacing: 0.01em;
}

.tool-field .hint {
    font-family: var(--font-family-inter-tight);
    font-size: 12px;
    color: rgba(235, 235, 238, 0.45);
    margin-top: 2px;
}

.tool-input,
.tool-select {
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 12px 14px;
    font-family: var(--font-family-inter-tight);
    font-size: 15px;
    color: #fff;
    transition: border-color 0.2s ease, background 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.tool-input:focus,
.tool-select:focus {
    outline: none;
    border-color: rgba(196, 181, 255, 0.55);
    background: rgba(255, 255, 255, 0.06);
}

.tool-input::placeholder { color: rgba(235, 235, 238, 0.35); }

.tool-select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1l5 5 5-5' stroke='%23c4b5ff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.tool-input-inline {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
}
.tool-input-inline input {
    border: none; background: transparent; padding: 12px 14px;
    color: #fff; font-family: var(--font-family-inter-tight); font-size: 15px;
}
.tool-input-inline input:focus { outline: none; }
.tool-input-inline .suffix {
    display: flex; align-items: center;
    padding: 0 14px;
    color: rgba(235, 235, 238, 0.55);
    font-family: var(--font-family-inter-tight);
    font-size: 13px;
    background: rgba(255, 255, 255, 0.03);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

/* Primary CTA inside a tool (uses blog's gradient button) */
.tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 22px;
    border-radius: 999px;
    background: var(--gradient-button-outline);
    color: rgba(11, 10, 21, 0.9);
    font-family: var(--font-family-inter-tight);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 24px rgba(196, 181, 255, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.tool-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 32px rgba(196, 181, 255, 0.35); }
.tool-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.tool-btn--ghost {
    background: transparent;
    color: transparent;
    background-image: var(--gradient-button-outline);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    box-shadow: none;
    position: relative;
    z-index: 1;
    padding: 14px 22px;
}
.tool-btn--ghost::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: var(--gradient-button-outline);
    z-index: -1;
    padding: 1px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
}
.tool-btn--ghost:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

/* Results panel */
.tool-results {
    margin-top: 28px;
    padding: 24px;
    border-radius: 18px;
    background: rgba(196, 181, 255, 0.06);
    border: 1px solid rgba(196, 181, 255, 0.18);
    animation: toolFadeIn 0.35s ease both;
}
.tool-results[hidden] { display: none; }

@keyframes toolFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.tool-results__headline {
    font-family: "Gilroy-Bold", var(--font-family-inter-tight);
    font-size: 22px;
    color: #fff;
    margin: 0 0 4px;
}
.tool-results__sub {
    font-family: var(--font-family-inter-tight);
    font-size: 14px;
    color: rgba(235, 235, 238, 0.7);
    margin: 0 0 20px;
}

/* Key/value grid */
.tool-kv {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 0 0 16px;
}
.tool-kv__item {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.tool-kv__label {
    display: block;
    font-family: var(--font-family-inter-tight);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(235, 235, 238, 0.5);
    margin-bottom: 4px;
}
.tool-kv__value {
    font-family: "Gilroy-Bold", var(--font-family-inter-tight);
    font-size: 22px;
    color: #fff;
}

/* Gauge / progress / pacing traffic-light */
.tool-gauge {
    position: relative;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin: 12px 0 4px;
}
.tool-gauge__fill {
    position: absolute;
    inset: 0 auto 0 0;
    background: var(--gradient-button-outline);
    border-radius: inherit;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
}
.tool-gauge__marker {
    position: absolute;
    top: -4px; bottom: -4px;
    width: 2px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 1px;
    transform: translateX(-1px);
}
.tool-gauge__labels {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-family-inter-tight);
    font-size: 11px;
    color: rgba(235, 235, 238, 0.5);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tool-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    font-family: var(--font-family-inter-tight);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.tool-status__dot {
    width: 8px; height: 8px; border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}
.tool-status--ahead { background: rgba(104, 211, 145, 0.12); color: #68d391; border: 1px solid rgba(104, 211, 145, 0.3); }
.tool-status--on    { background: rgba(196, 181, 255, 0.12); color: #c4b5ff; border: 1px solid rgba(196, 181, 255, 0.3); }
.tool-status--soft  { background: rgba(255, 191, 181, 0.12); color: #ffbfb5; border: 1px solid rgba(255, 191, 181, 0.3); }
.tool-status--behind{ background: rgba(251, 113, 133, 0.12); color: #fb7185; border: 1px solid rgba(251, 113, 133, 0.3); }

/* Recommendation list */
.tool-recs {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    display: grid;
    gap: 10px;
}
.tool-recs li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-family: var(--font-family-inter-tight);
    font-size: 14px;
    color: rgba(235, 235, 238, 0.8);
    line-height: 1.5;
}
.tool-recs li::before {
    content: '';
    flex-shrink: 0;
    margin-top: 7px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--colors-violet-300, #c4b5ff);
    box-shadow: 0 0 6px rgba(196, 181, 255, 0.6);
}

/* ==========================================================================
   Aside: email capture + cross-sell
   ========================================================================== */

.tool-aside-card {
    padding: 22px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 16px;
}

.tool-aside-card h3 {
    font-family: "Gilroy-Bold", var(--font-family-inter-tight);
    font-size: 16px;
    color: #fff;
    margin: 0 0 6px;
}
.tool-aside-card p {
    font-family: var(--font-family-inter-tight);
    font-size: 13px;
    color: rgba(235, 235, 238, 0.65);
    margin: 0 0 14px;
    line-height: 1.5;
}

.tool-capture-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tool-capture-form .tool-input { padding: 10px 12px; font-size: 14px; }
.tool-capture-form button { font-size: 13px; padding: 12px 18px; }

.tool-capture-msg {
    font-family: var(--font-family-inter-tight);
    font-size: 12px;
    margin-top: 4px;
}
.tool-capture-msg.success { color: #68d391; }
.tool-capture-msg.error { color: #fb7185; }

/* Aside CTA to core product */
.tool-cross-sell {
    padding: 22px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(196, 181, 255, 0.12), rgba(255, 191, 181, 0.06));
    border: 1px solid rgba(196, 181, 255, 0.22);
}
.tool-cross-sell h3 {
    font-family: "Gilroy-Bold", var(--font-family-inter-tight);
    font-size: 16px;
    color: #fff;
    margin: 0 0 6px;
}
.tool-cross-sell p {
    font-family: var(--font-family-inter-tight);
    font-size: 13px;
    color: rgba(235, 235, 238, 0.75);
    margin: 0 0 14px;
    line-height: 1.5;
}

/* Related tools */
.tool-related {
    padding: 22px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.tool-related h3 {
    font-family: "Gilroy-Bold", var(--font-family-inter-tight);
    font-size: 16px;
    color: #fff;
    margin: 0 0 12px;
}
.tool-related ul {
    list-style: none; margin: 0; padding: 0;
    display: grid;
    gap: 12px;
}
.tool-related a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    text-decoration: none;
    transition: all 0.2s ease;
}
.tool-related a:hover {
    border-color: rgba(196, 181, 255, 0.28);
    background: rgba(196, 181, 255, 0.05);
}
.tool-related__name {
    display: block;
    font-family: var(--font-family-inter-tight);
    font-weight: 500;
    font-size: 14px;
    color: #fff;
    margin-bottom: 2px;
}
.tool-related__desc {
    font-family: var(--font-family-inter-tight);
    font-size: 12px;
    color: rgba(235, 235, 238, 0.55);
    line-height: 1.4;
}

/* ==========================================================================
   Explainer: methodology + FAQ
   ========================================================================== */

.tool-explainer {
    padding: 60px 0;
}
.tool-explainer .container { max-width: 860px; }

.tool-explainer h2 {
    font-family: "Gilroy-Bold", var(--font-family-inter-tight);
    font-size: clamp(24px, 3vw, 34px);
    color: #fff;
    margin: 40px 0 16px;
    line-height: 1.15;
}
.tool-explainer h2:first-of-type { margin-top: 0; }
.tool-explainer h3 {
    font-family: "Gilroy-Bold", var(--font-family-inter-tight);
    font-size: clamp(18px, 2vw, 22px);
    color: #fff;
    margin: 28px 0 10px;
}
.tool-explainer p,
.tool-explainer li {
    font-family: var(--font-family-inter-tight);
    font-size: 16px;
    line-height: 1.65;
    color: rgba(235, 235, 238, 0.8);
}
.tool-explainer p { margin: 0 0 16px; }
.tool-explainer ul,
.tool-explainer ol { padding-left: 22px; margin: 0 0 18px; }
.tool-explainer li { margin-bottom: 8px; }
.tool-explainer strong { color: #fff; font-weight: 600; }
.tool-explainer a {
    color: var(--colors-violet-300, #c4b5ff);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(196, 181, 255, 0.35);
    transition: text-decoration-color 0.2s ease;
}
.tool-explainer a:hover { text-decoration-color: var(--colors-violet-300, #c4b5ff); }

/* TL;DR / key-takeaways callout — featured-snippet bait */
.tool-tldr {
    margin: 0 0 36px;
    padding: 22px 24px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(196, 181, 255, 0.10), rgba(255, 191, 181, 0.04));
    border: 1px solid rgba(196, 181, 255, 0.22);
}
.tool-tldr__label {
    display: inline-block;
    font-family: var(--font-family-inter-tight);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--colors-violet-300, #c4b5ff);
    margin-bottom: 12px;
}
.tool-tldr p,
.tool-tldr li {
    font-size: 15px;
    color: rgba(235, 235, 238, 0.92);
    line-height: 1.55;
}
.tool-tldr p { margin: 0 0 10px; }
.tool-tldr p:last-child { margin-bottom: 0; }
.tool-tldr ul { margin: 0; padding-left: 20px; }

/* Worked example — distinct background, feels like a case study box */
.tool-example {
    margin: 28px 0;
    padding: 24px 26px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
    border-left: 3px solid var(--colors-violet-300, #c4b5ff);
}
.tool-example__label {
    display: block;
    font-family: var(--font-family-inter-tight);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--colors-violet-300, #c4b5ff);
    margin-bottom: 8px;
}
.tool-example h4 {
    font-family: "Gilroy-Bold", var(--font-family-inter-tight);
    font-size: 18px;
    color: #fff;
    margin: 0 0 10px;
}
.tool-example p { margin-bottom: 10px; }

/* Numbered "common mistakes" list — each item styled as a definition entry */
.tool-mistakes {
    counter-reset: mistake;
    list-style: none !important;
    padding-left: 0 !important;
}
.tool-mistakes > li {
    counter-increment: mistake;
    padding: 14px 0 14px 52px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.tool-mistakes > li:last-child { border-bottom: none; }
.tool-mistakes > li::before {
    content: counter(mistake);
    position: absolute;
    left: 0; top: 12px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(196, 181, 255, 0.1);
    border: 1px solid rgba(196, 181, 255, 0.3);
    color: var(--colors-violet-300, #c4b5ff);
    font-family: "Gilroy-Bold", var(--font-family-inter-tight);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tool-mistakes > li strong {
    display: block;
    color: #fff;
    font-family: "Gilroy-Bold", var(--font-family-inter-tight);
    font-size: 16px;
    margin-bottom: 4px;
}

/* Citations / further reading */
.tool-citations {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.tool-citations h3 { margin-top: 0; font-size: 16px; color: rgba(235, 235, 238, 0.7); font-family: var(--font-family-inter-tight); font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; }
.tool-citations ul { list-style: none; padding: 0; margin: 0; }
.tool-citations li {
    font-size: 14px;
    color: rgba(235, 235, 238, 0.6);
    margin-bottom: 6px;
    padding-left: 14px;
    position: relative;
}
.tool-citations li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: rgba(196, 181, 255, 0.5);
}
.tool-citations a {
    color: rgba(235, 235, 238, 0.8);
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.25);
}
.tool-citations a:hover {
    color: var(--colors-violet-300, #c4b5ff);
    border-bottom-color: var(--colors-violet-300, #c4b5ff);
}

/* Last-updated + institutional author microcopy */
.tool-last-updated {
    font-family: var(--font-family-inter-tight);
    font-size: 12px;
    color: rgba(235, 235, 238, 0.45);
    text-align: center;
    padding: 20px 0 0;
    letter-spacing: 0.02em;
}
.tool-last-updated a { color: rgba(235, 235, 238, 0.6); text-decoration: underline; text-decoration-color: rgba(255,255,255,0.15); }
.tool-last-updated a:hover { color: var(--colors-violet-300, #c4b5ff); }

/* Comparison reference table (above-the-fold of fee comparison etc.) */
.tool-reftable {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-family-inter-tight);
    font-size: 13px;
    color: rgba(235, 235, 238, 0.85);
    margin: 0 0 20px;
}
.tool-reftable thead {
    color: rgba(235, 235, 238, 0.5);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.1em;
}
.tool-reftable th,
.tool-reftable td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* FAQ */
.tool-faq {
    padding: 20px 0 60px;
}
.tool-faq .container { max-width: 860px; }
.tool-faq h2 {
    font-family: "Gilroy-Bold", var(--font-family-inter-tight);
    font-size: clamp(24px, 3vw, 34px);
    color: #fff;
    margin: 0 0 24px;
}

.tool-faq details {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 0;
}
.tool-faq details[open] summary::after { transform: rotate(45deg); }
.tool-faq summary {
    list-style: none;
    cursor: pointer;
    font-family: "Gilroy-Bold", var(--font-family-inter-tight);
    font-size: 17px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.tool-faq summary::-webkit-details-marker { display: none; }
.tool-faq summary::after {
    content: '+';
    font-family: var(--font-family-inter-tight);
    font-size: 22px;
    color: var(--colors-violet-300, #c4b5ff);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.tool-faq .answer {
    font-family: var(--font-family-inter-tight);
    font-size: 15px;
    color: rgba(235, 235, 238, 0.75);
    line-height: 1.65;
    margin: 12px 0 0;
}

/* ==========================================================================
   Final CTA band
   ========================================================================== */

.tool-final-cta {
    position: relative;
    isolation: isolate;
    padding: 80px 0 100px;
    overflow: hidden;
}

.tool-final-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(196, 181, 255, 0.15), transparent 55%),
                radial-gradient(circle at 80% 40%, rgba(255, 191, 181, 0.12), transparent 55%);
    z-index: -1;
}

.tool-final-cta .container { max-width: 860px; text-align: center; }

.tool-final-cta h2 {
    font-family: "Gilroy-Bold", var(--font-family-inter-tight);
    font-size: clamp(26px, 3.2vw, 38px);
    color: #fff;
    margin: 0 0 14px;
    line-height: 1.15;
}
.tool-final-cta p {
    font-family: var(--font-family-inter-tight);
    font-size: 17px;
    color: rgba(235, 235, 238, 0.78);
    max-width: 560px;
    margin: 0 auto 28px;
    line-height: 1.55;
}

.tool-final-cta__buttons {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* ==========================================================================
   Utility: zone add/remove rows for festival capacity
   ========================================================================== */

.tool-rows {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.tool-row {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr auto;
    gap: 8px;
    align-items: end;
}

@media (max-width: 720px) {
    .tool-row {
        grid-template-columns: 1fr 1fr;
    }
    .tool-row .tool-row__remove {
        grid-column: 1 / -1;
        justify-self: end;
    }
}

.tool-row__remove {
    width: 42px; height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(235, 235, 238, 0.7);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.tool-row__remove:hover {
    border-color: #fb7185;
    color: #fb7185;
    background: rgba(251, 113, 133, 0.05);
}

.tool-row__add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px dashed rgba(196, 181, 255, 0.4);
    background: transparent;
    color: var(--colors-violet-300, #c4b5ff);
    font-family: var(--font-family-inter-tight);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.tool-row__add:hover {
    background: rgba(196, 181, 255, 0.08);
    border-style: solid;
}

/* ==========================================================================
   Embed mode — strip site chrome, compact spacing, keep design tokens
   ========================================================================== */

body.tool-embed {
    background: var(--bg-surface-primary, #0B0A15);
    color: var(--fg-primary-rest, #ebebee);
    overflow-x: hidden;
}

/* Hide all chrome sections not part of the calculator. */
body.tool-embed header,
body.tool-embed .tool-layout__aside,
body.tool-embed .tool-explainer,
body.tool-embed .tool-faq,
body.tool-embed .tool-final-cta,
body.tool-embed .tool-last-updated,
body.tool-embed .blog-footer {
    display: none !important;
}

body.tool-embed .tool-section { padding: 16px 0 8px; }
body.tool-embed .tool-section .container,
body.tool-embed .container { padding: 0 16px; max-width: none; }

/* Collapse two-column layout to single column. */
body.tool-embed .tool-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0;
}

body.tool-embed .tool-card-outer {
    padding: 22px;
    border-radius: 16px;
    margin-bottom: 16px;
}
body.tool-embed .tool-card-title { font-size: 18px; }
body.tool-embed .tool-card-subtitle { font-size: 13px; margin-bottom: 18px; }

/* Embed attribution bar. */
.tool-embed-attrib {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px 16px;
    font-family: var(--font-family-inter-tight, "Inter Tight", sans-serif);
    font-size: 12px;
    color: rgba(235, 235, 238, 0.6);
    flex-wrap: wrap;
}
.tool-embed-attrib a {
    color: var(--colors-violet-300, #c4b5ff);
    text-decoration: none;
    font-weight: 500;
}
.tool-embed-attrib a:hover { text-decoration: underline; }
.tool-embed-attrib .tool-embed-brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tool-embed-attrib .tool-embed-brand::before {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--gradient-button-outline);
}

/* ==========================================================================
   Responsive tweaks
   ========================================================================== */

@media (max-width: 640px) {
    .tools-breadcrumbs { padding-top: 100px; }
    .tools-hero { padding: 60px 0 40px; }
    .tool-layout { gap: 20px; }
    .tool-layout__aside { order: 2; }
}
