/* File Convert — conversion landing pages, the all-tools index and the 404.

   Layered over form.css and *under* theme.css. Every colour here is written
   against the semantic --t-* tokens theme.css owns, so light and dark come for
   free and nothing needs a hand-tuned override. The only light-on-dark literals
   left are the ones inside .vhero, which is dark in both themes by design. */

/* ------------------------------------------------------------------ *
 * Breadcrumbs — light page version (404, tools index)
 * ------------------------------------------------------------------ */

.crumbs {
    border-bottom: 1px solid var(--t-border);
    background: var(--t-surface);
}

.crumbs__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    font-size: 13px;
    color: var(--t-muted);
}

.crumbs__list li + li::before {
    content: "/";
    margin-right: 8px;
    color: var(--t-dimmed);
}

.crumbs__list a {
    color: var(--t-default);
}

.crumbs__list a:hover {
    color: var(--primary-500);
}

.crumbs__list [aria-current="page"] {
    color: var(--t-highlighted);
    font-weight: 500;
}

/* ------------------------------------------------------------------ *
 * Breadcrumbs inside the dark hero
 * ------------------------------------------------------------------ */

.vcrumbs {
    margin-bottom: 22px;
}

.vcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    letter-spacing: 0.02em;
    color: var(--hero-faint);
}

@media (min-width: 1024px) {
    .vcrumbs__list {
        justify-content: flex-start;
    }
}

.vcrumbs__list li + li::before {
    content: "/";
    margin-right: 6px;
    color: var(--n-600);
}

.vcrumbs__list a {
    color: var(--n-400);
    transition: color .15s ease;
}

.vcrumbs__list a:hover {
    color: var(--hero-ink);
}

.vcrumbs__list [aria-current="page"] {
    color: var(--n-200);
    font-weight: 500;
}

/* ------------------------------------------------------------------ *
 * Tool hero extras
 * ------------------------------------------------------------------ */

.vhero--tool {
    padding-bottom: 176px;
}

.vhero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 5px 13px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--n-200);
}

.vhero__eyebrow i {
    font-size: 12px;
    color: var(--primary-300);
}

.vhero__meta li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

/* The trio is decorative on this page: nothing in it is clickable. */
.fxtrio--static .fxcard {
    cursor: default;
}

/* ------------------------------------------------------------------ *
 * Lifted converter card
 * ------------------------------------------------------------------ */

.liftcard--tool {
    width: min(100% - 32px, 760px);
}

.liftcard__label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: var(--t-dimmed);
}

.liftcard__label i {
    font-size: 10px;
    color: var(--primary-500);
}

.liftcard .trust {
    margin-top: 22px;
    margin-bottom: 0;
    color: var(--t-muted);
}

.liftcard .trust i {
    color: var(--t-dimmed);
}

/* ------------------------------------------------------------------ *
 * Section rhythm on the pair pages
 * ------------------------------------------------------------------ */

.section--flush {
    padding: 8px 0 8px;
    border-top: 0;
}

.section--flush + .section--flush {
    padding-top: 0;
}

/* ------------------------------------------------------------------ *
 * Long-form copy
 * ------------------------------------------------------------------ */

.prose {
    max-width: 72ch;
    margin: 0 auto;
}

.prose p {
    margin-top: 16px;
    font-size: 16px;
    line-height: 1.75;
    color: var(--t-default);
}

.prose p:last-child {
    margin-bottom: 0;
}

.band .prose {
    margin-left: 0;
}

.section__title--left {
    text-align: left;
    margin-bottom: 22px;
}

.section__more {
    margin-top: 32px;
    text-align: center;
}

/* Numbered steps rendered as a band list. */
.banlist--steps {
    counter-reset: banstep;
    list-style: none;
}

.banlist--steps li {
    counter-increment: banstep;
}

.banlist--steps strong::before {
    content: counter(banstep) ". ";
    color: var(--primary-500);
}

/* ------------------------------------------------------------------ *
 * A secondary button form.css does not ship
 * ------------------------------------------------------------------ */

.btn--ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--t-border-strong);
    border-radius: var(--radius);
    background: var(--t-surface);
    color: var(--t-highlighted);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.btn--ghost:hover {
    border-color: var(--primary-500);
    color: var(--primary-600);
    background: var(--brand-tint);
}

:root[data-theme="dark"] .btn--ghost:hover {
    color: var(--primary-300);
}

/* ------------------------------------------------------------------ *
 * Format fact cards
 * ------------------------------------------------------------------ */

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

.factcard {
    padding: 22px;
    border: 1px solid var(--t-border);
    border-radius: var(--radius-xl);
    background: var(--t-surface);
    box-shadow: var(--shadow-sm);
}

.factcard--out {
    border-color: var(--brand-ring);
    background: var(--t-elevated);
}

.factcard .minilabel {
    margin-bottom: 10px;
}

.factcard__title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--t-highlighted);
}

.factcard__blurb {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--t-muted);
}

.factcard__list {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--t-border);
}

.factcard__list > div {
    display: grid;
    grid-template-columns: 108px 1fr;
    gap: 12px;
    padding: 7px 0;
    font-size: 13px;
}

.factcard__list > div + div {
    border-top: 1px solid var(--t-border);
}

.factcard__list dt {
    font-weight: 500;
    color: var(--t-dimmed);
}

.factcard__list dd {
    margin: 0;
    color: var(--t-default);
}

/* Legacy two-up wrapper kept for the pages that still use it. */
.factcards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.factcard__role {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--primary-500);
}

.factcard__ext {
    margin-left: 6px;
    font-size: 14px;
    font-weight: 400;
    color: var(--t-dimmed);
}

/* ------------------------------------------------------------------ *
 * Pair link grid (related converters)
 * ------------------------------------------------------------------ */

.pairgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 18px 32px;
    margin-top: 24px;
}

/* The grid supplies the rhythm, so drop the stacked-list margin. */
.pairgrid .pairlink + .pairlink {
    margin-top: 0;
}

/* Extension chips act as links here. */
.extgrid {
    margin-top: 4px;
}

a.extchip {
    border: 1px solid transparent;
}

a.extchip::before {
    content: ".";
    color: var(--t-dimmed);
}

a.extchip:hover {
    border-color: var(--brand-ring);
}

/* ------------------------------------------------------------------ *
 * Tool hero (legacy: the 404 and the tools index still use it)
 * ------------------------------------------------------------------ */

.hero--tool,
.hero--index,
.hero--error {
    padding-top: 40px;
}

.tool-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 5px 12px;
    border: 1px solid var(--t-border);
    border-radius: 999px;
    background: var(--t-elevated);
    font-size: 13px;
    font-weight: 500;
    color: var(--t-default);
}

.tool-eyebrow i {
    color: var(--primary-500);
}

.hero--error .tool-eyebrow {
    border-color: var(--brand-ring);
    background: var(--brand-tint);
    color: var(--primary-600);
}

:root[data-theme="dark"] .hero--error .tool-eyebrow {
    color: var(--primary-300);
}

.hero__sub {
    max-width: var(--column);
    margin: 26px auto 14px;
    font-size: 15px;
    color: var(--t-muted);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}

/* ------------------------------------------------------------------ *
 * All-tools index
 * ------------------------------------------------------------------ */

.toolsearch {
    position: relative;
    max-width: 560px;
    margin: 28px auto 0;
}

.toolsearch__icon {
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    color: var(--t-dimmed);
    pointer-events: none;
}

.toolsearch__input {
    width: 100%;
    padding: 14px 46px;
    border: 1px solid var(--t-border-strong);
    border-radius: 999px;
    background: var(--t-surface);
    box-shadow: var(--shadow-sm);
    font: inherit;
    font-size: 16px;
    color: var(--t-highlighted);
}

.toolsearch__input::placeholder {
    color: var(--t-dimmed);
}

.toolsearch__input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px var(--brand-ring);
}

.toolsearch__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.toolsearch__clear {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: var(--t-elevated);
    color: var(--t-muted);
    cursor: pointer;
}

.toolsearch__clear:hover {
    background: var(--brand-tint);
    color: var(--primary-500);
}

.toolsearch__status {
    margin-top: 12px;
    min-height: 20px;
    font-size: 14px;
    color: var(--t-muted);
}

.toolsearch__empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--t-muted);
}

.toolsearch__empty strong {
    color: var(--t-highlighted);
}

/* Family jump nav */

.famnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--t-border);
}

.famnav__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--t-border);
    border-radius: 999px;
    background: var(--t-surface);
    font-size: 14px;
    font-weight: 500;
    color: var(--t-default);
    transition: border-color .15s ease, color .15s ease;
}

.famnav__link:hover {
    border-color: var(--primary-500);
    color: var(--primary-500);
}

.famnav__link i {
    color: var(--t-dimmed);
}

.famnav__link:hover i {
    color: var(--primary-500);
}

.famnav__count {
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--t-elevated);
    font-size: 12px;
    color: var(--t-muted);
}

/* Family blocks and the dense link grid */

.famblock {
    margin-bottom: 48px;
    scroll-margin-top: calc(var(--header-h) + 20px);
}

.famblock__head {
    margin-bottom: 18px;
}

.famblock__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--t-highlighted);
}

.famblock__icon {
    color: var(--primary-500);
}

.famblock__blurb {
    margin-top: 4px;
    font-size: 15px;
    color: var(--t-muted);
}

.toolgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 8px;
}

.toolgrid__link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 10px;
    border: 1px solid var(--t-border);
    border-radius: var(--radius);
    background: var(--t-surface);
    font-size: 14px;
    font-weight: 500;
    color: var(--t-highlighted);
    white-space: nowrap;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.toolgrid__link:hover {
    border-color: var(--primary-500);
    background: var(--brand-tint);
    color: var(--primary-600);
}

:root[data-theme="dark"] .toolgrid__link:hover {
    color: var(--primary-300);
}

.toolgrid__arrow {
    font-size: 11px;
    color: var(--t-dimmed);
}

.toolgrid__link:hover .toolgrid__arrow {
    color: var(--primary-500);
}

.toolgrid__item.is-hidden {
    display: none;
}

.famblock.is-hidden {
    display: none;
}

/* Centred variant of form.css's popular-conversion grid, for the 404. */
.convgrid--centred {
    justify-content: center;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* ------------------------------------------------------------------ *
 * Narrow screens — nothing may push the body sideways at 360px
 * ------------------------------------------------------------------ */

@media (max-width: 720px) {
    .vhero--tool {
        padding: 56px 0 148px;
    }

    .factcard {
        padding: 18px;
    }

    .factcard__list > div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .prose p {
        font-size: 15px;
    }

    .pairgrid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px 20px;
    }

    .toolgrid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .famnav {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 16px;
        margin-bottom: 28px;
        -webkit-overflow-scrolling: touch;
    }

    .famnav__link {
        flex: 0 0 auto;
    }

    .crumbs__list {
        font-size: 12px;
    }
}

@media (max-width: 420px) {
    .vhero__inner,
    .band {
        width: min(100% - 32px, 1240px);
    }

    .vcrumbs__list {
        font-size: 11px;
    }

    .liftcard--tool {
        padding: 24px 16px;
    }
}

/* ------------------------------------------------------------------ *
 * Reduced motion
 *
 * Every transition in this file is colour-only, so none of it is the kind of
 * movement that causes vestibular trouble — this block is here for
 * consistency with the other sheets rather than to fix a real problem, and so
 * that a future transform/position transition added here is covered from the
 * start instead of being the one that slips through.
 * ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
    .crumbs a,
    .extchip,
    .pairlink,
    .factcard,
    .toolgrid a {
        transition: none !important;
    }
}

/* ------------------------------------------------------------------ *
 * Dark mode, OS-preference half
 *
 * The three [data-theme="dark"] rules above were added without their
 * media-query twin, so a visitor running OS dark mode who never touched the
 * toggle kept the light-mode colour: --primary-600 on the dark brand tint is
 * 2.90:1, under the 4.5:1 floor. Every dark override needs both halves —
 * the attribute for an explicit choice, the media query for the OS default.
 * ------------------------------------------------------------------ */

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .btn--ghost:hover,
    :root:not([data-theme="light"]) .hero--error .tool-eyebrow,
    :root:not([data-theme="light"]) .toolgrid__link:hover {
        color: var(--primary-300);
    }
}
