/* Free tools (/tools/) — follows the About/Contact page design (css/company-pages.css).
   Everything is scoped under .tl-page so it cannot affect other pages. */
.tl-page {
    --tl-blue: #0066ff;
    --tl-blue-dark: #0052cc;
    --tl-blue-soft: #eaf2ff;
    --tl-navy: #0b3d91;
    --tl-ink: #1a1a1a;
    --tl-body: #555f6b;
    --tl-muted: #6b7480;
    --tl-rule: #dce2e9;
    --tl-card-border: #e0e7f0;
    --tl-surface: #f7f9fc;
    --tl-good: #17703f;
    --tl-good-bg: #eaf7ef;
    --tl-warn: #8a5a00;
    --tl-warn-bg: #fff6e0;
    --tl-bad: #b42318;
    --tl-bad-bg: #fdecea;
    overflow: clip;
    color: var(--tl-ink);
}

body:has(.tl-page) footer [data-aos] {
    transform: none !important;
}

.tl-page h1,
.tl-page h2,
.tl-page h3,
.tl-page p {
    margin-top: 0;
}

.tl-page h1,
.tl-page h2,
.tl-page h3 {
    color: var(--tl-ink);
    letter-spacing: -.03em;
    line-height: 1.18;
}

.tl-page p,
.tl-page li {
    color: var(--tl-body);
    line-height: 1.7;
}

.tl-page a:focus-visible,
.tl-page button:focus-visible,
.tl-page input:focus-visible,
.tl-page select:focus-visible,
.tl-page textarea:focus-visible,
.tl-page summary:focus-visible {
    outline: 3px solid rgba(0, 102, 255, .35);
    outline-offset: 2px;
}

/* ---------- Breadcrumb, eyebrow, headings ---------- */
.tl-breadcrumb {
    padding-top: .9rem;
    padding-bottom: .9rem;
}

.tl-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: .82rem;
}

.tl-breadcrumb li {
    color: var(--tl-muted);
    line-height: 1.5;
}

.tl-breadcrumb li + li::before {
    content: "/";
    margin-right: .55rem;
    color: #a4acb5;
}

.tl-breadcrumb a {
    color: #445164;
    text-underline-offset: .2em;
}

.tl-eyebrow {
    margin-bottom: .8rem !important;
    color: var(--tl-blue) !important;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    line-height: 1.5 !important;
    text-transform: uppercase;
}

.tl-h2 {
    max-width: 680px;
    margin-bottom: 1rem;
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    font-weight: 750;
}

/* ---------- Hero (kept short so the tool sits near the top) ---------- */
.tl-hero {
    padding: clamp(1.4rem, 3vw, 2.4rem) 0 clamp(1.2rem, 2.5vw, 1.8rem);
    background: radial-gradient(ellipse at 85% 10%, #edf5ff 0, transparent 40%), #fff;
}

.tl-hero h1 {
    max-width: 820px;
    margin-bottom: .8rem;
    font-size: clamp(1.9rem, 3.4vw, 2.9rem);
    font-weight: 750;
    line-height: 1.12;
}

.tl-lead {
    max-width: 760px;
    margin-bottom: .9rem;
    font-size: 1.04rem;
}

.tl-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tl-badges li {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: #344356;
    font-size: .86rem;
    font-weight: 600;
}

.tl-badges i {
    color: var(--tl-good);
}

/* ---------- Tool workspace ---------- */
.tl-workspace {
    padding: 0 0 clamp(2.5rem, 5vw, 4rem);
    background: #fff;
}

.tl-card {
    min-width: 0;
    padding: clamp(1.1rem, 2.6vw, 1.8rem);
    border: 1px solid var(--tl-card-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(24, 42, 64, .06);
}

.tl-card + .tl-card {
    margin-top: 1.25rem;
}

.tl-card-title {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .35rem;
    font-size: 1.15rem;
    font-weight: 750;
}

.tl-step-num {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 50%;
    background: var(--tl-blue-soft);
    color: var(--tl-blue);
    font-size: .85rem;
    font-weight: 800;
    letter-spacing: 0;
}

.tl-card-intro {
    margin-bottom: 1.1rem;
    font-size: .93rem;
}

.tl-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}

.tl-field {
    min-width: 0;
}

.tl-field.is-wide {
    grid-column: 1 / -1;
}

.tl-page .tl-field label,
.tl-page .tl-label {
    display: block;
    margin-bottom: .35rem;
    color: #263241;
    font-size: .9rem;
    font-weight: 700;
}

.tl-optional {
    color: var(--tl-muted);
    font-weight: 500;
}

.tl-req {
    color: var(--tl-bad);
}

.tl-page .form-control,
.tl-page .form-select {
    min-height: 46px;
    border: 1px solid #c9d3df;
    border-radius: 6px;
    color: var(--tl-ink);
    font-size: .95rem;
}

.tl-page textarea.form-control {
    min-height: 96px;
    line-height: 1.55;
}

.tl-page .form-control:focus,
.tl-page .form-select:focus {
    border-color: var(--tl-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, .15);
}

.tl-page .form-control[aria-invalid="true"] {
    border-color: var(--tl-bad);
}

.tl-hint {
    display: block;
    margin-top: .3rem;
    color: var(--tl-muted);
    font-size: .8rem;
    line-height: 1.45;
}

.tl-error {
    display: block;
    margin-top: .3rem;
    color: var(--tl-bad);
    font-size: .82rem;
    font-weight: 600;
}

.tl-error:empty {
    display: none;
}

.tl-settings {
    grid-column: 1 / -1;
    border: 1px solid var(--tl-card-border);
    border-radius: 8px;
    background: var(--tl-surface);
}

.tl-settings summary {
    padding: .7rem 1rem;
    color: #344356;
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
}

.tl-settings-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
    padding: 0 1rem 1rem;
}

.tl-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    margin-top: 1.25rem;
}

.tl-page .btn {
    min-height: 44px;
    padding: .65rem 1.15rem;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 700;
}

.tl-page .btn-primary {
    border: 1px solid var(--tl-blue);
    background: var(--tl-blue);
    box-shadow: none;
}

.tl-page .btn-primary:hover {
    border-color: var(--tl-blue-dark);
    background: var(--tl-blue-dark);
}

.tl-page .btn-outline-primary {
    border-color: #b9cdea;
    color: #174b91;
    background: #fff;
}

.tl-page .btn-outline-primary:hover {
    border-color: var(--tl-blue);
    background: #f4f8ff;
    color: var(--tl-blue-dark);
}

.tl-page .btn-sm {
    min-height: 36px;
    padding: .35rem .8rem;
    font-size: .82rem;
}

.tl-link-btn {
    border: 0;
    padding: 0;
    background: none;
    color: #344356;
    font-size: .88rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: .2em;
}

.tl-link-btn:hover {
    color: var(--tl-blue-dark);
}

/* ---------- Suggestions ---------- */
.tl-empty {
    margin: 0;
    padding: 1.1rem;
    border: 1px dashed #c9d3df;
    border-radius: 8px;
    background: var(--tl-surface);
    color: var(--tl-muted);
    font-size: .92rem;
    text-align: center;
}

.tl-suggest-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.tl-suggest-col {
    min-width: 0;
}

.tl-suggest-col h3 {
    margin-bottom: .6rem;
    font-size: .95rem;
    font-weight: 750;
}

.tl-suggest-list {
    display: grid;
    gap: .6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tl-suggest-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: .4rem .8rem;
    padding: .75rem .85rem;
    border: 1px solid var(--tl-card-border);
    border-radius: 8px;
    background: #fff;
}

.tl-suggest-item.is-selected {
    border-color: var(--tl-blue);
    background: #f6faff;
}

.tl-suggest-text {
    margin: 0;
    color: var(--tl-ink) !important;
    font-size: .92rem;
    line-height: 1.5 !important;
    overflow-wrap: anywhere;
}

.tl-suggest-meta {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

/* ---------- Status pills & meters ---------- */
.tl-pill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .12rem .55rem;
    border-radius: 999px;
    background: #eef2f6;
    color: #3f4b5a;
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.6;
    white-space: nowrap;
}

.tl-pill.is-good { background: var(--tl-good-bg); color: var(--tl-good); }
.tl-pill.is-warn { background: var(--tl-warn-bg); color: var(--tl-warn); }
.tl-pill.is-bad { background: var(--tl-bad-bg); color: var(--tl-bad); }

.tl-meter {
    margin-top: .5rem;
}

.tl-meter-bar {
    position: relative;
    height: 6px;
    overflow: hidden;
    border-radius: 3px;
    background: #e7edf4;
}

.tl-meter-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 3px;
    background: var(--tl-good);
    transition: width .15s ease;
}

.tl-meter-fill.is-warn { background: #d99a00; }
.tl-meter-fill.is-bad { background: var(--tl-bad); }

.tl-meter-text {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .6rem;
    margin-top: .4rem;
    color: var(--tl-muted);
    font-size: .8rem;
}

.tl-meter-text strong {
    color: #344356;
    font-weight: 700;
}

/* ---------- Editor + preview ---------- */
/* Single column so the preview always gets Google's ~600px result width on desktop. */
.tl-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.tl-editor-grid > * {
    min-width: 0;
}

.tl-editor-grid .tl-field + .tl-field {
    margin-top: 1.1rem;
}

.tl-preview-wrap {
    padding: 1rem;
    border: 1px solid var(--tl-card-border);
    border-radius: 10px;
    background: var(--tl-surface);
}

.tl-preview-label {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .4rem;
    margin-bottom: .6rem;
    color: #344356;
    font-size: .82rem;
    font-weight: 700;
}

/* Google-style result snippet (an approximation, not Google's exact rendering) */
.tl-serp {
    max-width: calc(600px + 2.2rem); /* 600px of content, matching the title width check */
    padding: 1rem 1.1rem;
    border-radius: 8px;
    background: #fff;
    font-family: Arial, "Liberation Sans", Helvetica, sans-serif;
    overflow-wrap: anywhere;
}

.tl-serp-site {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: .35rem;
}

.tl-serp-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 28px;
    height: 28px;
    border: 1px solid #dadce0;
    border-radius: 50%;
    background: #f1f3f4;
    color: #5f6368;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.tl-serp-name {
    display: block;
    color: #202124;
    font-size: 14px;
    line-height: 20px;
}

.tl-serp-url {
    display: block;
    color: #4d5156;
    font-size: 12px;
    line-height: 18px;
}

.tl-page .tl-serp-title {
    margin: 0 0 .2rem;
    color: #1a0dab;
    font-family: inherit;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 26px;
}

.tl-page .tl-serp-desc {
    margin: 0;
    color: #4d5156;
    font-size: 14px;
    line-height: 22px;
}

.tl-page .tl-serp-desc b {
    color: #474747;
    font-weight: 700;
}

.tl-page .tl-serp-placeholder {
    color: #9aa0a6;
}

/* Mobile result: narrower card, title may wrap onto two lines */
.tl-serp.is-mobile {
    max-width: calc(330px + 2.2rem);
    border-radius: 14px;
}

.tl-page .tl-serp.is-mobile .tl-serp-title {
    font-size: 18px;
    line-height: 24px;
}

/* Keeps the desktop preview at full width on small screens (scrolls inside its box) */
.tl-serp-scroll {
    overflow-x: auto;
    padding-bottom: 2px;
}

.tl-serp-scroll .tl-serp:not(.is-mobile) {
    width: calc(600px + 2.2rem);
    max-width: none;
}

/* Desktop / mobile switch */
.tl-segmented {
    display: inline-flex;
    padding: 3px;
    border: 1px solid #c9d3df;
    border-radius: 8px;
    background: #fff;
}

.tl-segmented button {
    min-height: 36px;
    padding: .3rem .9rem;
    border: 0;
    border-radius: 6px;
    background: none;
    color: #344356;
    font-size: .85rem;
    font-weight: 700;
}

.tl-segmented button[aria-pressed="true"] {
    background: var(--tl-blue);
    color: #fff;
}

/* Fit summary table */
.tl-fit {
    width: 100%;
    margin-top: 1rem;
    border-collapse: collapse;
    font-size: .88rem;
}

.tl-fit th,
.tl-fit td {
    padding: .55rem .6rem;
    border-bottom: 1px solid #edf1f6;
    text-align: left;
    vertical-align: middle;
}

.tl-fit thead th {
    color: var(--tl-muted);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.tl-fit tbody th {
    color: #263241;
    font-weight: 700;
}

.tl-model {
    width: 100%;
    margin: 1rem 0;
    border-collapse: collapse;
    font-size: .9rem;
}

.tl-model th,
.tl-model td {
    padding: .6rem .7rem;
    border: 1px solid var(--tl-rule);
    text-align: left;
    vertical-align: top;
}

.tl-model thead th {
    background: var(--tl-surface);
    color: #263241;
}

.tl-table-scroll {
    overflow-x: auto;
}

.tl-mono {
    font-family: Consolas, "SFMono-Regular", Menlo, monospace;
    font-size: .82rem;
    overflow-wrap: anywhere;
}

.tl-fit td,
.tl-fit th {
    overflow-wrap: break-word;
}

.tl-fit td:first-child:not([id]) {
    white-space: nowrap;
}

/* Summary statistics */
.tl-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: .75rem;
    margin: 0;
}

.tl-stat {
    min-width: 0;
    padding: .8rem .9rem;
    border: 1px solid var(--tl-card-border);
    border-radius: 8px;
    background: var(--tl-surface);
}

.tl-stat dt {
    color: var(--tl-muted);
    font-size: .76rem;
    font-weight: 700;
}

.tl-stat dd {
    margin: .15rem 0 0;
    color: var(--tl-ink);
    font-size: 1.25rem;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.tl-stats.is-compact .tl-stat {
    background: #fff;
}

.tl-kw {
    margin-top: 1.25rem;
    padding: 1rem;
    border: 1px solid #b9cdea;
    border-radius: 10px;
    background: #f6faff;
}

.tl-page .tl-kw-title {
    margin-bottom: .75rem;
    font-size: 1rem;
    font-weight: 750;
}

.tl-context {
    max-height: 320px;
    margin: .6rem 0 0;
    padding: 1rem;
    overflow: auto;
    border: 1px solid var(--tl-card-border);
    border-radius: 8px;
    background: #fff;
    color: var(--tl-body);
    font-size: .92rem;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.tl-context.is-static {
    max-height: none;
    margin: 0;
}

.tl-context mark {
    padding: 0 .1em;
    border-radius: 3px;
    background: #ffe58a;
    color: var(--tl-ink);
}

.tl-page textarea.tl-big {
    min-height: 260px;
}

.tl-counter {
    display: block;
    margin-top: .35rem;
    color: #344356;
    font-size: .82rem;
    font-weight: 600;
}

.tl-page .tl-subhead {
    margin: 1.5rem 0 .6rem;
    font-size: .95rem;
    font-weight: 750;
}

/* Robots.txt groups and rules */
.tl-templates {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tl-template {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    width: 100%;
    height: 100%;
    padding: .85rem .95rem;
    border: 1px solid var(--tl-card-border);
    border-radius: 10px;
    background: #fff;
    text-align: left;
}

.tl-template:hover {
    border-color: #9ab9e8;
    background: #f7faff;
}

.tl-template strong {
    color: var(--tl-ink);
    font-size: .92rem;
}

.tl-template span {
    color: var(--tl-body);
    font-size: .8rem;
    line-height: 1.45;
}

.tl-group {
    position: relative;
    min-width: 0;
    margin: 0 0 1rem;
    padding: 1rem 1.1rem 1.1rem;
    border: 1px solid var(--tl-card-border);
    border-radius: 10px;
    background: var(--tl-surface);
}

.tl-group-title {
    float: none;
    width: auto;
    margin: 0 0 .6rem;
    padding: 0;
    color: var(--tl-ink);
    font-size: 1rem;
    font-weight: 750;
}

.tl-group-remove {
    position: absolute;
    top: 1rem;
    right: 1.1rem;
    color: var(--tl-bad);
}

.tl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 0 0 .6rem;
    padding: 0;
    list-style: none;
}

.tl-tag {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    padding: .15rem .25rem .15rem .65rem;
    border: 1px solid #b9cdea;
    border-radius: 999px;
    background: #fff;
}

.tl-tag-remove {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: #5b6675;
    font-size: 1.05rem;
    line-height: 1;
}

.tl-tag-remove:hover,
.tl-icon-btn:hover {
    background: var(--tl-bad-bg);
    color: var(--tl-bad);
}

.tl-inline {
    display: flex;
    gap: .5rem;
    max-width: 460px;
}

.tl-inline .form-control {
    min-width: 0;
}

.tl-inline .btn {
    flex: none;
}

.tl-rules {
    display: grid;
    gap: .5rem;
    margin: 0 0 .75rem;
    padding: 0;
    list-style: none;
}

.tl-rule {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr) 44px;
    gap: .5rem;
    align-items: center;
}

.tl-rule.is-crumb {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) 44px;
}

.tl-rule.is-hours {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) 44px;
}

.tl-page textarea.tl-code-input {
    min-height: 320px;
    font-family: Consolas, "SFMono-Regular", Menlo, monospace;
    font-size: .84rem;
    line-height: 1.55;
    white-space: pre;
}

.tl-icon-btn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid #c9d3df;
    border-radius: 6px;
    background: #fff;
    color: #5b6675;
}

.tl-issues {
    display: grid;
    gap: .45rem;
    margin: .75rem 0 0;
    padding: 0;
    list-style: none;
}

.tl-issue {
    display: grid;
    grid-template-columns: 1.2rem minmax(0, 1fr);
    gap: .5rem;
    padding: .55rem .75rem;
    border-radius: 8px;
    font-size: .86rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.tl-issue i { margin-top: .1rem; }
.tl-issue.is-error { background: var(--tl-bad-bg); color: #7a1a12; }
.tl-issue.is-warning { background: var(--tl-warn-bg); color: #5c4300; }
.tl-issue.is-info { background: var(--tl-blue-soft); color: #23395b; }

.tl-test-result {
    margin: .75rem 0 0;
    font-size: .92rem;
    overflow-wrap: anywhere;
}

.tl-test-result:empty {
    display: none;
}

.tl-test-result.is-allowed,
.tl-test-result.is-blocked {
    padding: .65rem .85rem;
    border-radius: 8px;
}

.tl-test-result.is-allowed { background: var(--tl-good-bg); color: #0f5530 !important; }
.tl-test-result.is-blocked { background: var(--tl-bad-bg); color: #7a1a12 !important; }

@media (max-width: 991.98px) {
    .tl-templates {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .tl-templates {
        grid-template-columns: 1fr;
    }

    /* Type + delete on one row, the path gets the full width below */
    .tl-rule {
        grid-template-columns: minmax(0, 1fr) 44px;
        padding-bottom: .5rem;
        border-bottom: 1px solid var(--tl-card-border);
    }

    .tl-rule .form-select {
        grid-column: 1;
        grid-row: 1;
    }

    .tl-rule .tl-icon-btn {
        grid-column: 2;
        grid-row: 1;
    }

    .tl-rule input {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    /* Breadcrumb rows: name + delete, then URL */
    .tl-rule.is-crumb {
        grid-template-columns: minmax(0, 1fr) 44px;
    }

    .tl-rule.is-crumb input:first-child {
        grid-column: 1;
        grid-row: 1;
    }

    /* Opening hours rows: days + delete, then opens / closes side by side */
    .tl-rule.is-hours {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px;
    }

    .tl-rule.is-hours .form-select {
        grid-column: 1 / 3;
    }

    .tl-rule.is-hours .tl-icon-btn {
        grid-column: 3;
    }

    .tl-rule.is-hours input {
        grid-column: auto;
    }

    .tl-rule.is-hours input:nth-of-type(1) { grid-column: 1; }
    .tl-rule.is-hours input:nth-of-type(2) { grid-column: 2 / 4; }

    .tl-group-remove {
        position: static;
        margin-bottom: .5rem;
    }
}

/* Quick-fill chips */
.tl-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tl-chip {
    min-height: 36px;
    padding: .3rem .8rem;
    border: 1px solid #c9d3df;
    border-radius: 999px;
    background: #fff;
    color: #344356;
    font-size: .82rem;
    font-weight: 700;
}

.tl-chip:hover {
    border-color: var(--tl-blue);
    background: #f4f8ff;
    color: var(--tl-blue-dark);
}

.tl-result {
    margin: 0;
    padding: 1rem;
    border: 1px solid #b9cdea;
    border-radius: 8px;
    background: #f6faff;
    color: var(--tl-ink);
    font-family: Consolas, "SFMono-Regular", Menlo, monospace;
    font-size: .9rem;
    line-height: 1.6;
    word-break: break-all; /* URLs: fill each line instead of breaking only at "?" or "&" */
    white-space: pre-wrap;
}

.tl-info {
    margin: .9rem 0 0;
    padding: .7rem .9rem;
    border-radius: 8px;
    background: var(--tl-blue-soft);
    color: #263241 !important;
    font-size: .88rem;
}

.tl-info:empty {
    display: none;
}

.tl-callout.is-compact {
    margin-top: 1rem;
    padding: .8rem 1rem;
}

.tl-callout.is-compact h3 {
    font-size: .92rem;
}

.tl-note {
    margin: .7rem 0 0;
    color: var(--tl-muted) !important;
    font-size: .8rem;
    line-height: 1.5 !important;
}

/* ---------- Code output ---------- */
.tl-output-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin: 1.4rem 0 .6rem;
}

.tl-output-head.is-top {
    margin: 0 0 1rem;
}

.tl-output-head h3 {
    margin: 0;
    font-size: .95rem;
    font-weight: 750;
}

.tl-code {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    border-radius: 8px;
    background: #0f1b2d;
    color: #e6edf6;
    font-family: Consolas, "SFMono-Regular", Menlo, monospace;
    font-size: .82rem;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* Long code output (e.g. XML): keep lines intact and scroll instead of wrapping */
.tl-code.tl-scroll {
    max-height: 420px;
    overflow: auto;
    white-space: pre;
    overflow-wrap: normal;
}

.tl-copy-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.tl-status {
    min-height: 1.4em;
    margin: .6rem 0 0;
    color: var(--tl-good) !important;
    font-size: .85rem;
    font-weight: 600;
}

/* ---------- Content sections ---------- */
.tl-section {
    padding: clamp(3rem, 6vw, 4.8rem) 0;
    background: #fff;
}

.tl-section.is-alt {
    background: var(--tl-surface);
}

.tl-prose {
    max-width: 780px;
}

.tl-prose h3 {
    margin: 1.6rem 0 .5rem;
    font-size: 1.15rem;
    font-weight: 750;
}

.tl-prose ul,
.tl-prose ol {
    padding-left: 1.2rem;
}

.tl-prose li + li {
    margin-top: .35rem;
}

.tl-prose a,
.tl-example a {
    color: var(--tl-blue-dark);
    text-underline-offset: .2em;
}

.tl-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
    counter-reset: tl-step;
}

.tl-steps li {
    min-width: 0;
    padding: 1.2rem;
    border: 1px solid var(--tl-card-border);
    border-radius: 12px;
    background: #fff;
    counter-increment: tl-step;
}

.tl-steps li::before {
    content: counter(tl-step, decimal-leading-zero);
    display: block;
    margin-bottom: .5rem;
    color: var(--tl-blue);
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .08em;
}

.tl-steps strong {
    display: block;
    margin-bottom: .3rem;
    color: var(--tl-ink);
    font-size: .98rem;
}

.tl-steps p {
    margin: 0;
    font-size: .9rem;
}

.tl-example {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.tl-example > * {
    min-width: 0;
}

.tl-example .tl-card + .tl-card {
    margin-top: 0;
}

.tl-dl {
    margin: 0;
}

.tl-dl div {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: .6rem;
    padding: .55rem 0;
    border-bottom: 1px solid #edf1f6;
}

.tl-dl dt {
    color: #344356;
    font-size: .86rem;
    font-weight: 700;
}

.tl-dl dd {
    margin: 0;
    color: var(--tl-body);
    font-size: .9rem;
    overflow-wrap: anywhere;
}

.tl-callout {
    margin-top: 1.5rem;
    padding: 1.1rem 1.25rem;
    border-left: 4px solid #d99a00;
    border-radius: 0 8px 8px 0;
    background: var(--tl-warn-bg);
}

.tl-callout h3 {
    margin: 0 0 .4rem;
    font-size: 1rem;
    font-weight: 750;
}

.tl-callout ul {
    margin: 0;
    padding-left: 1.1rem;
}

.tl-callout li {
    color: #4a4030;
    font-size: .9rem;
}

/* ---------- Tool cards (hub + related tools) ---------- */
.tl-tool-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.tl-tool-card {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    min-width: 0;
    padding: 1.3rem;
    border: 1px solid var(--tl-card-border);
    border-radius: 12px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.tl-tool-card:hover {
    border-color: #9ab9e8;
    box-shadow: 0 10px 26px rgba(24, 42, 64, .08);
    transform: translateY(-2px);
}

.tl-tool-card i {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 8px;
    background: var(--tl-blue-soft);
    color: var(--tl-blue);
    font-size: 1.15rem;
}

.tl-tool-card strong {
    color: var(--tl-ink);
    font-size: 1.02rem;
}

.tl-tool-card span {
    color: var(--tl-body);
    font-size: .9rem;
    line-height: 1.6;
}

.tl-tool-card .tl-card-link {
    margin-top: auto;
    padding-top: .4rem;
    color: var(--tl-blue);
    font-weight: 700;
}

.tl-principles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

.tl-principles li {
    min-width: 0;
}

.tl-principles strong {
    display: block;
    margin-bottom: .3rem;
    color: var(--tl-ink);
}

/* ---------- CTA ---------- */
.tl-cta {
    padding: clamp(3rem, 6vw, 4.6rem) 0;
    background: #fff;
}

.tl-cta-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2rem;
    padding: clamp(1.7rem, 4vw, 2.7rem);
    border-radius: 12px;
    background: linear-gradient(120deg, var(--tl-navy), var(--tl-blue));
}

.tl-cta-inner .tl-eyebrow {
    color: #bfe0ff !important;
}

.tl-cta-inner h2 {
    max-width: 560px;
    margin-bottom: .45rem;
    color: #fff;
    font-size: clamp(1.45rem, 2.5vw, 2rem);
    font-weight: 750;
}

.tl-cta-inner p {
    max-width: 560px;
    margin: 0;
    color: rgba(255, 255, 255, .88);
}

.tl-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
}

.tl-cta-actions .btn-light {
    color: var(--tl-navy);
}

.tl-cta-actions .btn-outline-light:hover {
    color: var(--tl-navy);
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .tl-editor-grid,
    .tl-example {
        grid-template-columns: 1fr;
    }

    .tl-steps,
    .tl-tool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tl-principles {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .tl-fields,
    .tl-settings-body,
    .tl-suggest-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .tl-steps,
    .tl-tool-grid {
        grid-template-columns: 1fr;
    }

    .tl-actions .btn-primary,
    .tl-cta-actions .btn {
        width: 100%;
    }

    .tl-dl div {
        grid-template-columns: 1fr;
        gap: .1rem;
    }

    .tl-serp {
        padding: .85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tl-tool-card,
    .tl-meter-fill {
        transition: none;
    }

    .tl-tool-card:hover {
        transform: none;
    }
}
