/* Free SEO tools (/free-tools, /free-tools/<slug>). Behaviour: assets/js/seo-tools.js. Uses the site colour variables from style.css. */
.st { --st-border: var(--color-border, #e2e8f0); --st-primary: var(--color-primary, #1d4ed8); --st-muted: var(--color-text-muted, #64748b); --st-ok: #16a34a; --st-warn: #d97706; --st-bad: #dc2626; }
.st [hidden], .st-out [hidden] { display: none !important; }
.st .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.st-trust { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; justify-content: center; margin: 1.25rem 0 0; padding: 0; list-style: none; font-size: .95rem; }
.st-trust li::before { content: "\2713"; color: #16a34a; font-weight: 700; margin-right: .4rem; }
.st-noscript { background: #fef2f2; color: #b91c1c; padding: 1rem; border-radius: 10px; text-align: center; }

/* ---- hub and cards ---- */
.st-group { margin-bottom: 2.75rem; }
.st-group__title { margin: 0 0 .25rem; font-size: 1.5rem; }
.st-group__text { margin: 0 0 1.25rem; color: var(--st-muted); }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.1rem; }
.st-grid--small { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.st-card { display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem; background: #fff; border: 1px solid var(--st-border, #e2e8f0); border-radius: 16px; text-decoration: none; color: inherit; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.st-card:hover, .st-card:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-md, 0 8px 30px rgba(15,23,42,.1)); border-color: #93c5fd; }
.st-card__icon { display: inline-flex; width: 2.75rem; height: 2.75rem; align-items: center; justify-content: center; border-radius: 12px; background: var(--color-primary-light, #eff6ff); color: var(--color-primary, #1d4ed8); }
.st-card__title { margin: .25rem 0 0; font-size: 1.1rem; }
.st-card__text { margin: 0; color: var(--color-text-muted, #64748b); font-size: .95rem; line-height: 1.5; flex: 1; }
.st-card__go { color: var(--color-primary, #1d4ed8); font-weight: 600; font-size: .92rem; }
.st-prose { max-width: 760px; margin: 0 auto; }
.st-prose h2 { margin-top: 0; }
.st-prose p { line-height: 1.7; color: #334155; }
.st-cta { max-width: 760px; margin: 0 auto; text-align: center; }
.st-cta .btn { margin: .35rem; }

/* ---- forms ---- */
.st-app { max-width: 1040px; margin: 0 auto; }
.st-form { background: #fff; border: 1px solid var(--st-border); border-radius: 20px; padding: 1.5rem; box-shadow: var(--shadow-sm, 0 2px 8px rgba(15,23,42,.06)); }
.st-form--one { max-width: 640px; margin-left: auto; margin-right: auto; }
.st-form__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 1.25rem; }
.st-field { margin-bottom: 1rem; min-width: 0; }
.st-label { display: block; font-weight: 600; font-size: .92rem; margin: 0 0 .35rem; color: var(--color-text, #0f172a); }
.st-opt { font-weight: 400; color: var(--st-muted); }
.st-input { width: 100%; padding: .7rem .85rem; font: inherit; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: inherit; box-sizing: border-box; }
select.st-input { appearance: auto; }
textarea.st-input { resize: vertical; min-height: 5rem; line-height: 1.5; }
.st-input:focus, .st-btn:focus-visible, .st-chip:focus-visible { outline: 3px solid rgba(29,78,216,.35); outline-offset: 1px; border-color: var(--st-primary); }
.st-input[aria-invalid="true"] { border-color: var(--st-bad); }
.st-hint { margin: .3rem 0 0; font-size: .85rem; color: var(--st-muted); }
.st-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-top: .5rem; }
.st-note { color: var(--st-muted); font-size: .9rem; }
.st-form__error { margin: .9rem 0 0; padding: .75rem 1rem; background: #fef2f2; color: #b91c1c; border-radius: 10px; font-size: .95rem; }
.st-seg { border: 0; padding: 0; margin: 0 0 .5rem; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; }
.st-seg legend { margin-right: .5rem; float: left; padding: 0; }
.st-seg label { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; }

/* ---- shared result pieces ---- */
.st-out { margin-top: 1.75rem; scroll-margin-top: 110px; }
.st-out:focus { outline: none; }
.st-loading { display: flex; align-items: center; gap: .75rem; justify-content: center; padding: 1.5rem; color: var(--st-muted); }
.st-spin { width: 1.4rem; height: 1.4rem; border: 3px solid #cbd5e1; border-top-color: var(--st-primary); border-radius: 50%; animation: st-spin .8s linear infinite; }
@keyframes st-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .st-spin { animation-duration: 2s; } .st-card { transition: none; } }
.st-panel { background: #fff; border: 1px solid var(--st-border); border-radius: 16px; padding: 1.25rem; margin-bottom: 1.1rem; }
.st-panel__title { margin: 0 0 .75rem; font-size: 1.15rem; }
.st-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0 0 1rem; }
.st-bar__sp { flex: 1; }
.st-count { color: var(--st-muted); font-size: .92rem; }
.st-btn { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .9rem; font: inherit; font-size: .88rem; font-weight: 600; background: #fff; color: var(--st-primary); border: 1px solid #bfdbfe; border-radius: 10px; cursor: pointer; }
.st-btn:hover { background: var(--color-primary-light, #eff6ff); }
.st-btn.is-done { background: #dcfce7; color: #166534; border-color: #86efac; }
.st-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.st-chip { padding: .35rem .8rem; font: inherit; font-size: .85rem; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; color: #334155; cursor: pointer; }
.st-chip[aria-pressed="true"] { background: var(--st-primary); border-color: var(--st-primary); color: #fff; }
.st-chip small { opacity: .75; margin-left: .25rem; }
.st-search { max-width: 260px; padding: .45rem .75rem; }
.st-warnbox { background: #fffbeb; border: 1px solid #fde68a; color: #78350f; padding: .8rem 1rem; border-radius: 12px; font-size: .92rem; line-height: 1.55; margin: 0 0 1.1rem; }
.st-infobox { background: var(--color-primary-light, #eff6ff); border: 1px solid #bfdbfe; color: #1e3a8a; padding: .8rem 1rem; border-radius: 12px; font-size: .92rem; line-height: 1.55; margin: 0 0 1.1rem; }

/* pills */
.st-pill { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.st-pill--pass { background: #dcfce7; color: #166534; }
.st-pill--warn { background: #fef3c7; color: #92400e; }
.st-pill--fail { background: #fee2e2; color: #991b1b; }
.st-pill--info { background: #e2e8f0; color: #334155; }

/* ---- generated lists (titles, keywords) ---- */
.st-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.st-item { display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem; background: #fff; border: 1px solid var(--st-border); border-radius: 12px; }
.st-item__main { flex: 1; min-width: 0; }
.st-item__text { font-weight: 600; overflow-wrap: anywhere; }
.st-item__meta { display: block; font-size: .8rem; color: var(--st-muted); margin-top: .1rem; }
.st-item__meta .ok { color: var(--st-ok); } .st-item__meta .long { color: var(--st-warn); }
.st-kwgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .4rem .8rem; }
.st-kwgrid li { padding: .35rem .6rem; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 8px; font-size: .92rem; overflow-wrap: anywhere; }
.st-group-h { margin: 1.25rem 0 .5rem; font-size: 1rem; }
.st-group-h small { color: var(--st-muted); font-weight: 400; }

/* ---- meta description options ---- */
.st-opt-card { background: #fff; border: 1px solid var(--st-border); border-radius: 14px; padding: 1rem; margin-bottom: .9rem; }
.st-opt-card textarea { margin-bottom: .6rem; }
.st-opt-card__row { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.st-meter { flex: 1 1 160px; min-width: 0; }
.st-meter__lab { display: flex; justify-content: space-between; font-size: .8rem; color: var(--st-muted); margin-bottom: .2rem; gap: .5rem; }
.st-meter__track { height: 8px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.st-meter__fill { display: block; height: 100%; width: 0; background: var(--st-ok); border-radius: 999px; transition: width .15s ease; }
.st-meter--warn .st-meter__fill { background: var(--st-warn); } .st-meter--bad .st-meter__fill { background: var(--st-bad); }

/* ---- outline editor ---- */
.st-outline { background: #fff; border: 1px solid var(--st-border); border-radius: 16px; padding: 1.25rem; }
.st-ol__title { font-weight: 700; font-size: 1.15rem; }
.st-ol__sec { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px dashed #cbd5e1; }
.st-ol__tag { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .04em; color: var(--st-primary); margin-right: .4rem; }
.st-ol__row { display: flex; align-items: center; gap: .5rem; margin: .35rem 0; }
.st-ol__row .st-input { padding: .45rem .7rem; }
.st-ol__row--h .st-input { font-weight: 700; }
.st-ol__row--p { padding-left: 1.6rem; }
.st-ol__words { font-size: .78rem; color: var(--st-muted); white-space: nowrap; }

/* ---- SERP simulator ---- */
.st-serp { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 1.5rem; align-items: start; }
.st-serp .st-form { margin: 0; }
.st-preview { background: #fff; border: 1px solid var(--st-border); border-radius: 16px; padding: 1.25rem; overflow-x: auto; }
.st-preview:not(.st-preview--mobile) .st-snip { min-width: 600px; }
.st-preview:not(.st-preview--mobile) .st-snip__title { white-space: nowrap; }
.st-preview--mobile .st-snip { max-width: 360px; margin: 0 auto; }
.st-snip { font-family: Arial, sans-serif; }
.st-snip__top { display: flex; align-items: center; gap: .6rem; margin-bottom: .35rem; }
.st-snip__fav { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #f1f3f4; color: #5f6368; display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; }
.st-snip__site { font-size: 14px; color: #202124; line-height: 1.3; }
.st-snip__url { font-size: 12px; color: #4d5156; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-snip__title { margin: 0; font: 400 20px/1.3 Arial, sans-serif; color: #1a0dab; }
.st-snip__desc { margin: .25rem 0 0; font-size: 14px; line-height: 1.58; color: #4d5156; overflow-wrap: anywhere; }
.st-snip--empty { opacity: .55; }
.st-meters { display: grid; gap: .8rem; margin: 1rem 0; }
.st-meters .st-meter__track { height: 10px; }
.st-meters .st-meter__msg { font-size: .85rem; color: #475569; margin: .3rem 0 0; }

/* ---- score ring and check lists ---- */
.st-score { display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; align-items: center; }
.st-ring { position: relative; width: 130px; height: 130px; flex: none; }
.st-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.st-ring__bg { fill: none; stroke: #e2e8f0; stroke-width: 11; }
.st-ring__fg { fill: none; stroke-width: 11; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.st-ring__num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800; line-height: 1; }
.st-ring__num small { font-size: .72rem; font-weight: 600; color: var(--st-muted); margin-top: .2rem; }
.st-score__meta { flex: 1 1 260px; min-width: 0; }
.st-score__meta h3 { margin: 0 0 .35rem; font-size: 1.25rem; overflow-wrap: anywhere; }
.st-score__meta p { margin: 0 0 .5rem; color: #475569; overflow-wrap: anywhere; }
.st-tally { display: flex; flex-wrap: wrap; gap: .5rem; }
.st-checks { list-style: none; margin: 0; padding: 0; }
.st-check { display: grid; grid-template-columns: auto 1fr; gap: .15rem .75rem; padding: .7rem 0; border-top: 1px solid #eef2f7; }
.st-check:first-child { border-top: 0; }
.st-check__lab { font-weight: 600; }
.st-check__val { grid-column: 2; color: #475569; font-size: .92rem; overflow-wrap: anywhere; }
.st-check__adv { grid-column: 2; color: #1e3a8a; font-size: .9rem; background: #f1f5f9; border-radius: 8px; padding: .4rem .6rem; margin-top: .25rem; }
.st-check .st-pill { align-self: start; margin-top: .15rem; min-width: 3.4rem; text-align: center; }

/* ---- tables ---- */
.st-tablewrap { overflow-x: auto; border: 1px solid var(--st-border); border-radius: 14px; background: #fff; -webkit-overflow-scrolling: touch; }
.st-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.st-table th, .st-table td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid #eef2f7; vertical-align: top; }
.st-table thead th { background: #f8fafc; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: #475569; white-space: nowrap; }
.st-table tbody tr:last-child td, .st-table tbody tr:last-child th { border-bottom: 0; }
.st-table th[scope="row"] { font-weight: 600; background: #fcfdff; white-space: nowrap; }
.st-table .best { background: #f0fdf4; font-weight: 700; }
.st-table .you { color: var(--st-primary); }
.st-table td.num { font-variant-numeric: tabular-nums; }
.st-table .ellip { min-width: 170px; max-width: 320px; overflow-wrap: anywhere; word-break: break-word; }

/* ---- result cards ---- */
.st-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .9rem; margin-bottom: 1.1rem; }
.st-fact { background: #fff; border: 1px solid var(--st-border); border-radius: 14px; padding: 1rem; }
.st-fact__lab { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--st-muted); font-weight: 700; }
.st-fact__val { font-size: 1.5rem; font-weight: 800; margin-top: .2rem; overflow-wrap: anywhere; }
.st-fact__sub { font-size: .85rem; color: var(--st-muted); margin-top: .1rem; }
.st-spark { width: 100%; height: 90px; display: block; }
.st-spark path { fill: none; stroke: var(--st-primary); stroke-width: 2; vector-effect: non-scaling-stroke; }
.st-spark circle { fill: var(--st-primary); }
.st-risk { display: inline-flex; padding: .2rem .8rem; border-radius: 999px; font-weight: 800; font-size: .95rem; }
.st-risk--low { background: #dcfce7; color: #166534; } .st-risk--medium { background: #fef3c7; color: #92400e; } .st-risk--high { background: #fee2e2; color: #991b1b; }
.st-ns { margin: .25rem 0 0; padding-left: 1.2rem; }

@media (max-width: 820px) {
    .st-serp { grid-template-columns: 1fr; }
    .st-form__grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .st-form { padding: 1.1rem; border-radius: 16px; }
    .st-item { flex-wrap: wrap; }
    .st-ol__row--p { padding-left: .5rem; }
    .st-ring { width: 110px; height: 110px; }
    .st-actions .btn--lg { width: 100%; justify-content: center; }
}
