/* RankForge SEO Web: client app. Everything is scoped to .rfsw so the site's theme is not affected. */

.rfsw {
	--rf-brand: #3b4bdb;
	--rf-brand-dark: #2c39b3;
	--rf-brand-soft: #eef0fd;
	--rf-text: #1d2327;
	--rf-muted: #5b6470;
	--rf-line: #e2e5ea;
	--rf-bg: #ffffff;
	--rf-soft: #f6f7f9;
	--rf-good: #1a7f37;
	--rf-ok: #b26a00;
	--rf-bad: #c62828;
	--rf-none: #8c939d;
	--rf-radius: 10px;
	box-sizing: border-box;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0;
	color: var(--rf-text);
	background: var(--rf-bg);
	font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	text-align: left;
}
.rfsw *, .rfsw *::before, .rfsw *::after { box-sizing: border-box; }
.rfsw h1, .rfsw h2, .rfsw h3 { font-family: inherit; color: var(--rf-text); letter-spacing: 0; text-transform: none; margin: 0 0 .5em; line-height: 1.25; }
.rfsw h2 { font-size: 18px; font-weight: 650; }
.rfsw h3 { font-size: 15px; font-weight: 650; }
.rfsw p { margin: 0 0 .8em; }
.rfsw a { color: var(--rf-brand); text-decoration: none; }
.rfsw a:hover { text-decoration: underline; }
.rfsw ul, .rfsw ol { margin: 0; padding: 0; list-style: none; }
.rfsw input[type=text], .rfsw input[type=email], .rfsw input[type=password], .rfsw input[type=search], .rfsw select, .rfsw textarea {
	width: 100%; max-width: 100%; padding: 9px 11px; border: 1px solid #c3c8cf; border-radius: 7px; background: #fff; color: var(--rf-text);
	font: inherit; box-shadow: none; margin: 0; height: auto; line-height: 1.4;
}
.rfsw input:focus, .rfsw select:focus, .rfsw textarea:focus { outline: 2px solid var(--rf-brand); outline-offset: 1px; border-color: var(--rf-brand); }
.rfsw .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.rfsw-muted { color: var(--rf-muted); }
.rfsw-small { font-size: 13px; }
.rfsw-loading { padding: 40px; text-align: center; color: var(--rf-muted); }

/* Buttons */
.rfsw-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border: 1px solid #c3c8cf; border-radius: 7px;
	background: #fff; color: var(--rf-text); font: 600 14px/1.2 inherit; font-family: inherit; cursor: pointer; text-decoration: none; text-transform: none; letter-spacing: 0; box-shadow: none; min-height: 40px;
}
.rfsw-btn:hover { border-color: var(--rf-brand); color: var(--rf-brand); background: #fff; }
.rfsw-btn:disabled { opacity: .6; cursor: default; }
.rfsw-btn.is-primary { background: var(--rf-brand); border-color: var(--rf-brand); color: #fff; }
.rfsw-btn.is-primary:hover { background: var(--rf-brand-dark); color: #fff; }
.rfsw-btn.is-danger { background: var(--rf-bad); border-color: var(--rf-bad); color: #fff; }
.rfsw-btn.is-wide { width: 100%; }
.rfsw-btn.is-small { padding: 4px 10px; min-height: 30px; font-size: 13px; }
.rfsw-link { background: none; border: 0; padding: 0; color: var(--rf-brand); font: inherit; cursor: pointer; text-decoration: underline; box-shadow: none; min-height: 0; text-transform: none; letter-spacing: 0; }
.rfsw-link.is-muted { color: var(--rf-muted); }
.rfsw-x { background: none; border: 0; color: var(--rf-muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 2px 8px; border-radius: 6px; box-shadow: none; min-height: 0; }
.rfsw-x:hover { color: var(--rf-bad); background: #fdecec; }
.rfsw-spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: rfsw-spin .8s linear infinite; }
.rfsw-spin.is-big { width: 34px; height: 34px; border-width: 3px; color: var(--rf-brand); }
@keyframes rfsw-spin { to { transform: rotate(360deg); } }

/* Messages */
.rfsw-msg { padding: 10px 14px; border-radius: 8px; margin: 0 0 14px; border-left: 4px solid; }
.rfsw-msg.is-bad { background: #fdecec; border-color: var(--rf-bad); }
.rfsw-msg.is-good { background: #e9f6ec; border-color: var(--rf-good); }
.rfsw-msg.is-info { background: var(--rf-brand-soft); border-color: var(--rf-brand); }
.rfsw-good-news { color: var(--rf-good); font-weight: 600; }
.rfsw-toast { position: fixed; z-index: 99999; left: 50%; bottom: 28px; transform: translateX(-50%); background: #1d2327; color: #fff; padding: 10px 18px; border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.2); transition: opacity .4s; max-width: calc(100% - 32px); }
.rfsw-toast.is-out { opacity: 0; }

/* Sign up / log in */
.rfsw-auth { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 40px; align-items: center; padding: 40px 16px; }
.rfsw-auth-card { background: #fff; border: 1px solid var(--rf-line); border-radius: 14px; padding: 28px; box-shadow: 0 8px 30px rgba(20, 30, 60, .07); }
.rfsw-auth-card h2 { font-size: 22px; margin-top: 14px; }
.rfsw-auth-foot { margin: 6px 0 0; font-size: 14px; text-align: center; }
.rfsw-auth-points li { position: relative; padding: 0 0 14px 34px; font-size: 17px; }
.rfsw-auth-points li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--rf-brand-soft); color: var(--rf-brand); font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.rfsw-field { margin: 0 0 14px; }
.rfsw-field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 5px; }
.rfsw-hp { position: absolute !important; left: -9999px; }

/* Top bar */
.rfsw-bar { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--rf-line); flex-wrap: wrap; }
.rfsw-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: var(--rf-text); }
.rfsw-brand:hover { text-decoration: none; }
.rfsw-brand.is-big { font-size: 15px; color: var(--rf-muted); }
.rfsw-logo { width: 28px; height: 28px; border-radius: 8px; background: var(--rf-brand); color: #fff; display: inline-grid; place-items: center; font-size: 16px; }
.rfsw-switch { min-width: 220px; }
.rfsw-user { margin-left: auto; display: flex; gap: 14px; align-items: center; font-size: 14px; }
.rfsw-sample-note { background: #fff7e6; border-bottom: 1px solid #f1d9a6; padding: 8px 16px; font-size: 14px; }
.rfsw-main { padding: 22px 16px 40px; }
.rfsw-h1 { font-size: 26px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rfsw-lead { font-size: 16px; color: var(--rf-muted); max-width: 70ch; }
.rfsw-tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--rf-soft); color: var(--rf-muted); border: 1px solid var(--rf-line); vertical-align: middle; white-space: nowrap; }

/* Cards and grids */
.rfsw-card { background: #fff; border: 1px solid var(--rf-line); border-radius: var(--rf-radius); padding: 20px; margin: 0 0 18px; }
.rfsw-card.is-danger { border-color: #f1c4c4; }
.rfsw-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.rfsw-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.rfsw-grid2 > .rfsw-card { margin: 0 0 18px; }
.rfsw-inline-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.rfsw-inline-form > div:first-of-type { display: flex; gap: 8px; }
.rfsw-inline-form > div > input { flex: 1; }
.rfsw-inline-form #rfsw-add-msg, .rfsw-inline-form #rfsw-comp-msg { margin-top: 10px; }

/* Websites */
.rfsw-sites { display: grid; gap: 12px; margin-bottom: 18px; }
.rfsw-site-card { display: flex; align-items: center; gap: 18px; padding: 16px 20px; border: 1px solid var(--rf-line); border-radius: var(--rf-radius); background: #fff; color: var(--rf-text); transition: border-color .15s, box-shadow .15s; }
.rfsw-site-card:hover { text-decoration: none; border-color: var(--rf-brand); box-shadow: 0 4px 18px rgba(59, 75, 219, .12); }
.rfsw-site-card h3 { font-size: 18px; margin: 0 0 4px; }
.rfsw-site-card > div { flex: 1; }
.rfsw-facts { margin: 4px 0 0; color: var(--rf-muted); font-size: 14px; }
.rfsw-go { font-size: 28px; color: var(--rf-muted); }
.rfsw-status { font-size: 14px; color: var(--rf-muted); display: inline-flex; gap: 6px; align-items: center; }
.rfsw-status.is-busy { color: var(--rf-brand); font-weight: 600; }
.rfsw-status.is-bad { color: var(--rf-bad); }

/* Score ring */
.rfsw-ring { position: relative; width: 64px; height: 64px; flex: none; text-align: center; --c: var(--rf-none); }
.rfsw-ring.is-good { --c: var(--rf-good); } .rfsw-ring.is-ok { --c: var(--rf-ok); } .rfsw-ring.is-bad { --c: var(--rf-bad); }
.rfsw-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rfsw-ring circle { fill: none; stroke-width: 3.4; }
.rfsw-ring .bg { stroke: var(--rf-line); }
.rfsw-ring .fg { stroke: var(--c); stroke-linecap: round; stroke-dasharray: calc(var(--v) * 1px) 100px; }
.rfsw-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 19px; font-weight: 700; }
.rfsw-ring span { display: block; font-size: 12px; color: var(--rf-muted); margin-top: 2px; white-space: nowrap; }
.rfsw-ring.is-lg { width: 92px; height: 92px; }
.rfsw-ring.is-lg b { font-size: 28px; }

/* Site page */
.rfsw-site-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.rfsw-site-head .rfsw-h1 { margin-bottom: 2px; }
.rfsw-head-actions { display: flex; gap: 12px; align-items: center; }
.rfsw-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rf-line); margin: 18px 0 20px; overflow-x: auto; }
.rfsw-tabs a { padding: 10px 14px; color: var(--rf-muted); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.rfsw-tabs a:hover { color: var(--rf-text); text-decoration: none; }
.rfsw-tabs a.is-active { color: var(--rf-brand); border-bottom-color: var(--rf-brand); }
.rfsw-count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--rf-brand); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
.rfsw-empty { padding: 40px 0; }
.rfsw-progress { text-align: center; max-width: 520px; margin: 0 auto; }
.rfsw-progress h2 { margin-top: 14px; }

/* Stat tiles */
.rfsw-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 18px; }
.rfsw-tile { background: #fff; border: 1px solid var(--rf-line); border-radius: var(--rf-radius); padding: 16px; display: flex; flex-direction: column; justify-content: center; }
.rfsw-tile b { font-size: 30px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rfsw-tile span { color: var(--rf-muted); font-size: 14px; margin-top: 4px; }
.rfsw-tile em { color: var(--rf-muted); font-size: 12px; font-style: normal; }
.rfsw-tile.is-ring { align-items: center; text-align: center; }

/* Page-score bar */
.rfsw-stack { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; margin: 6px 0 12px; background: var(--rf-soft); }
.rfsw-stack span { display: block; min-width: 4px; }
.rfsw-stack .is-good { background: var(--rf-good); } .rfsw-stack .is-ok { background: var(--rf-ok); } .rfsw-stack .is-bad { background: var(--rf-bad); }
.rfsw-legend li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }

/* Checks and dots */
.rfsw-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 7px; background: var(--rf-none); }
.rfsw-dot.is-good { background: var(--rf-good); } .rfsw-dot.is-ok { background: var(--rf-ok); } .rfsw-dot.is-bad { background: var(--rf-bad); }
.rfsw-legend .rfsw-dot { margin-top: 0; }
.rfsw-checks li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--rf-soft); }
.rfsw-checks li:last-child { border-bottom: 0; }
.rfsw-how { color: var(--rf-muted); font-size: 14px; margin-top: 2px; }

/* Recommendations */
.rfsw-recs > li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rf-line); }
.rfsw-recs > li:last-child { border-bottom: 0; }
.rfsw-recs h3 { margin: 0 0 4px; font-size: 15px; }
.rfsw-recs p { margin: 0 0 4px; color: var(--rf-muted); font-size: 14px; }
.rfsw-level { flex: none; width: 112px; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; text-align: center; height: fit-content; }
.rfsw-level.is-high { background: #fdecec; color: #9c1c1c; }
.rfsw-level.is-high::before { content: "▲▲ "; }
.rfsw-level.is-medium { background: #fff3df; color: #8a5200; }
.rfsw-level.is-medium::before { content: "▲ "; }
.rfsw-level.is-low { background: var(--rf-soft); color: var(--rf-muted); }
.rfsw-level.is-low::before { content: "• "; }
.rfsw-recs details summary { cursor: pointer; color: var(--rf-brand); font-size: 14px; }
.rfsw-pagelist { margin: 6px 0 0 4px; font-size: 14px; max-height: 260px; overflow: auto; }
.rfsw-pagelist li { padding: 2px 0; }
.rfsw-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.rfsw-chip { border: 1px solid var(--rf-line); background: #fff; border-radius: 99px; padding: 6px 14px; font: 600 13px/1.2 inherit; font-family: inherit; color: var(--rf-text); cursor: pointer; box-shadow: none; min-height: 0; text-transform: none; letter-spacing: 0; }
.rfsw-chip:hover { border-color: var(--rf-brand); color: var(--rf-brand); background: #fff; }
.rfsw-chip.is-on { background: var(--rf-brand); border-color: var(--rf-brand); color: #fff; }
.rfsw-chip.is-add { font-weight: 500; }

/* Tables */
.rfsw-table-wrap { overflow-x: auto; }
.rfsw-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; border: 0; }
.rfsw-table th, .rfsw-table td { padding: 10px 12px; border: 0; border-bottom: 1px solid var(--rf-line); text-align: left; vertical-align: middle; background: none; }
.rfsw-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--rf-muted); font-weight: 700; background: var(--rf-soft); }
.rfsw-table .is-num { text-align: right; font-variant-numeric: tabular-nums; }
.rfsw-table select { min-width: 200px; padding: 6px 8px; }
.rfsw-table tr.rfsw-row { cursor: pointer; }
.rfsw-table tr.rfsw-row:hover td { background: #fafbfd; }
.rfsw-table tr.rfsw-row:focus { outline: 2px solid var(--rf-brand); outline-offset: -2px; }
.rfsw-table tr.rfsw-detail > td { background: var(--rf-soft); }
.rfsw-table.is-compact { font-size: 13px; max-width: 360px; }
.rfsw-table.is-compare td.is-me, .rfsw-table.is-compare th.is-me { background: var(--rf-brand-soft); font-weight: 600; }
.rfsw-pill { display: inline-block; min-width: 36px; padding: 2px 8px; border-radius: 6px; font-weight: 700; text-align: center; color: #fff; background: var(--rf-none); }
.rfsw-pill.is-good { background: var(--rf-good); } .rfsw-pill.is-ok { background: var(--rf-ok); } .rfsw-pill.is-bad { background: var(--rf-bad); }
.rfsw-ptitle { font-weight: 600; }
.rfsw-pos { font-weight: 700; font-size: 16px; }
.rfsw-pos.is-top { color: var(--rf-good); }
.rfsw-up { color: var(--rf-good); font-weight: 700; white-space: nowrap; }
.rfsw-down { color: var(--rf-bad); font-weight: 700; white-space: nowrap; }
.rfsw-yes { color: var(--rf-good); font-weight: 600; } .rfsw-no { color: var(--rf-bad); font-weight: 600; }
.rfsw-filters { display: flex; gap: 10px; margin-bottom: 12px; }
.rfsw-filters input { max-width: 320px; } .rfsw-filters select { max-width: 220px; }
.rfsw-detail-box { padding: 6px 4px; }
.rfsw-detail-box dl { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 4px 14px; margin: 0 0 10px; }
.rfsw-detail-box dt { font-weight: 600; color: var(--rf-muted); }
.rfsw-detail-box dd { margin: 0; overflow-wrap: anywhere; }

/* Keywords */
.rfsw-auto-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.rfsw-seed label { display: block; font-size: 13px; color: var(--rf-muted); margin-bottom: 4px; }
.rfsw-auto-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rfsw-auto-opts .rfsw-seed { margin: 0; }
.rfsw-auto-opts .rfsw-small { display: block; margin-top: 4px; }
.rfsw-sugg-list { columns: 2; column-gap: 24px; margin: 0 0 14px; }
.rfsw-sugg-list li { break-inside: avoid; padding: 4px 0; }
.rfsw-sugg-list label { cursor: pointer; }
.rfsw textarea { resize: vertical; }

/* Rankings */
.rfsw-rank-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.rfsw-rank-head p { margin: 0; }
.rfsw-spark { display: block; overflow: visible; }
.rfsw-spark path { fill: none; stroke: var(--rf-brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rfsw-spark circle { fill: var(--rf-brand); stroke: #fff; stroke-width: 1.5; }
.rfsw-chart { background: #fff; border: 1px solid var(--rf-line); border-radius: var(--rf-radius); padding: 14px 16px; }
.rfsw-chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rfsw-chart-plot { position: relative; }
.rfsw-chart svg { width: 100%; height: auto; display: block; }
.rfsw-grid { stroke: var(--rf-line); stroke-width: 1; }
.rfsw-axis { fill: var(--rf-muted); font-size: 11px; font-family: inherit; }
.rfsw-band { fill: #e9f6ec; }
.rfsw-band-label { fill: var(--rf-good); font-size: 11px; font-weight: 700; font-family: inherit; }
.rfsw-line { fill: none; stroke: var(--rf-brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rfsw-mark { fill: var(--rf-brand); stroke: #fff; stroke-width: 2; }
.rfsw-cross { stroke: var(--rf-muted); stroke-width: 1; stroke-dasharray: 3 3; }
.rfsw-hit { fill: transparent; cursor: crosshair; }
.rfsw-tip { position: absolute; pointer-events: none; background: #1d2327; color: #fff; padding: 6px 10px; border-radius: 6px; font-size: 13px; line-height: 1.35; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.rfsw-tip b, .rfsw-tip span { display: block; }

/* Competitors */
.rfsw-comps { margin: 0 0 16px; }
.rfsw-comp { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rf-soft); }
.rfsw-comp .rfsw-status { display: flex; margin-top: 2px; }
.rfsw-comp-actions { display: flex; align-items: center; gap: 8px; }
.rfsw-gaps li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--rf-soft); }
.rfsw-linkhosts li { padding: 4px 0; }

@media (max-width: 860px) {
	.rfsw-auth { grid-template-columns: minmax(0, 1fr); padding: 20px 16px; }
	.rfsw-auth-points { display: none; }
	.rfsw-grid2 { grid-template-columns: minmax(0, 1fr); }
	.rfsw-sugg-list { columns: 1; }
	.rfsw-auto-opts { grid-template-columns: minmax(0, 1fr); }
	.rfsw-user { margin-left: 0; width: 100%; }
	.rfsw-switch { min-width: 0; flex: 1; }
	.rfsw-recs > li { flex-direction: column; gap: 6px; }
	.rfsw-filters { flex-direction: column; }
	.rfsw-inline-form > div:first-of-type { flex-direction: column; }
}
