/**
 * SEO Competitor Intel
 * Scoped under .sci-wrap / .sci-report so it survives any theme.
 */

.sci-wrap,
.sci-report {
	--sci-ink: #16181c;
	--sci-paper: #ffffff;
	--sci-wash: #f0f2ee;
	--sci-rule: #dce0d8;
	--sci-rule-soft: #e9ece5;
	--sci-pine: #2c5545;
	--sci-pine-soft: #e2ebe5;
	--sci-ochre: #9c7616;
	--sci-rust: #a63d1a;
	--sci-rust-soft: #f7e8e2;
	--sci-dim: #6e7377;
	--sci-radius: 4px;
	--sci-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--sci-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

	box-sizing: border-box;
	color: var(--sci-ink);
	font-family: var(--sci-sans);
	font-size: 17px;
	line-height: 1.55;
	max-width: 1180px;
}

.sci-wrap *,
.sci-report * {
	box-sizing: border-box;
}

.sci-mono {
	font-family: var(--sci-mono);
	font-variant-numeric: tabular-nums;
	font-size: 0.92em;
}

.sci-dim {
	color: var(--sci-dim);
}

/* ---------- Page chrome ---------- */

.sci-admin .sci-page-title {
	font-size: 28px;
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0 0 18px;
}

.sci-back {
	display: inline-block;
	font-size: 15px;
	margin-bottom: 6px;
	text-decoration: none;
}

/* ---------- Form panel ---------- */

.sci-panel {
	background: var(--sci-paper);
	border: 1px solid var(--sci-rule);
	border-radius: var(--sci-radius);
	padding: 26px 28px 24px;
}

.sci-panel-form {
	border-top: 3px solid var(--sci-pine);
}

.sci-title {
	font-size: 23px;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.25;
	margin: 0 0 6px;
	padding: 0;
}

.sci-sub {
	color: var(--sci-dim);
	font-size: 15.5px;
	margin: 0 0 4px;
}

.sci-sub-lead {
	margin-bottom: 22px;
	max-width: 60ch;
}

.sci-field {
	margin-bottom: 18px;
}

.sci-label {
	display: block;
	font-size: 15px;
	font-weight: 650;
	letter-spacing: 0.01em;
	margin-bottom: 6px;
}

.sci-hint {
	color: var(--sci-dim);
	display: block;
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0;
	margin-top: 1px;
}

.sci-input {
	background: var(--sci-paper);
	border: 1px solid var(--sci-rule);
	border-radius: var(--sci-radius);
	color: var(--sci-ink);
	display: block;
	font-family: var(--sci-sans);
	font-size: 16px;
	line-height: 1.5;
	padding: 9px 11px;
	transition: border-color 0.12s ease, box-shadow 0.12s ease;
	width: 100%;
}

.sci-input:focus {
	border-color: var(--sci-pine);
	box-shadow: 0 0 0 3px var(--sci-pine-soft);
	outline: none;
}

.sci-textarea {
	font-family: var(--sci-mono);
	font-size: 15px;
	resize: vertical;
}

.sci-help {
	color: var(--sci-dim);
	font-size: 14.5px;
	margin: 7px 0 0;
	max-width: 68ch;
}

.sci-actions-row {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 22px;
}

.sci-btn {
	background: var(--sci-pine);
	border: 1px solid var(--sci-pine);
	border-radius: var(--sci-radius);
	color: #fff;
	cursor: pointer;
	display: inline-block;
	font-family: var(--sci-sans);
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.4;
	padding: 10px 20px;
	text-decoration: none;
	transition: background 0.12s ease;
}

.sci-btn:hover,
.sci-btn:focus {
	background: #22432f;
	color: #fff;
}

.sci-btn:focus-visible {
	outline: 2px solid var(--sci-ink);
	outline-offset: 2px;
}

.sci-btn[disabled] {
	cursor: not-allowed;
	opacity: 0.55;
}

.sci-btn-ghost {
	background: transparent;
	border-color: var(--sci-rule);
	color: var(--sci-ink);
}

.sci-btn-ghost:hover,
.sci-btn-ghost:focus {
	background: var(--sci-wash);
	color: var(--sci-ink);
}

.sci-status {
	color: var(--sci-dim);
	font-size: 15px;
}

.sci-status-err {
	color: var(--sci-rust);
	font-weight: 600;
}

/* ---------- Progress ---------- */

.sci-progress {
	margin-top: 20px;
}

.sci-progress-track {
	background: var(--sci-wash);
	border-radius: 2px;
	height: 4px;
	overflow: hidden;
}

.sci-progress-fill {
	background: var(--sci-pine);
	height: 100%;
	transition: width 0.25s ease;
	width: 0;
}

.sci-log {
	font-family: var(--sci-mono);
	font-size: 14px;
	list-style: none;
	margin: 12px 0 0;
	max-height: 210px;
	overflow-y: auto;
	padding: 0;
}

.sci-log li {
	border-bottom: 1px solid var(--sci-rule-soft);
	color: var(--sci-dim);
	display: flex;
	gap: 10px;
	margin: 0;
	padding: 5px 0;
}

.sci-log-ok::before {
	color: var(--sci-pine);
	content: "\2713";
	flex: none;
}

.sci-log-err::before {
	color: var(--sci-rust);
	content: "\00d7";
	flex: none;
}

.sci-log-err {
	color: var(--sci-rust);
}

/* ---------- Report ---------- */

.sci-result {
	margin-top: 26px;
}

.sci-meta {
	align-items: baseline;
	border-bottom: 2px solid var(--sci-ink);
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding-bottom: 10px;
}

.sci-meta-num {
	font-family: var(--sci-mono);
	font-size: 32px;
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1;
}

.sci-meta-label {
	color: var(--sci-dim);
	font-size: 15px;
	letter-spacing: 0.02em;
	text-transform: lowercase;
}

.sci-meta-sep {
	color: var(--sci-rule);
}

.sci-meta-url {
	background: var(--sci-wash);
	border-radius: 3px;
	font-family: var(--sci-mono);
	font-size: 14px;
	padding: 2px 6px;
}

.sci-section {
	border-bottom: 1px solid var(--sci-rule-soft);
	padding: 26px 0;
}

.sci-section:last-child {
	border-bottom: 0;
}

.sci-h {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.09em;
	margin: 0 0 4px;
	padding: 0;
	text-transform: uppercase;
}

.sci-h4 {
	font-size: 15px;
	font-weight: 650;
	margin: 18px 0 4px;
}

.sci-section .sci-sub {
	margin-bottom: 14px;
	max-width: 72ch;
}

/* ---------- Action list ---------- */

.sci-actions {
	counter-reset: sci-step;
	list-style: none;
	margin: 0;
	padding: 0;
}

.sci-action {
	border-left: 3px solid var(--sci-rule);
	margin: 0 0 3px;
	padding: 11px 0 11px 15px;
}

.sci-sev-high {
	background: var(--sci-rust-soft);
	border-left-color: var(--sci-rust);
}

.sci-sev-medium {
	border-left-color: var(--sci-ochre);
}

.sci-sev-low,
.sci-sev-info {
	border-left-color: var(--sci-rule);
}

.sci-sev-tag {
	display: block;
	font-family: var(--sci-mono);
	font-size: 12.5px;
	letter-spacing: 0.08em;
	margin-bottom: 3px;
	text-transform: uppercase;
}

.sci-sev-high .sci-sev-tag {
	color: var(--sci-rust);
}

.sci-sev-medium .sci-sev-tag {
	color: var(--sci-ochre);
}

.sci-sev-low .sci-sev-tag,
.sci-sev-info .sci-sev-tag {
	color: var(--sci-dim);
}

.sci-action-title {
	display: block;
	font-size: 17px;
	font-weight: 650;
	letter-spacing: -0.01em;
}

.sci-action-detail {
	color: #3f4448;
	display: block;
	font-size: 15.5px;
	margin-top: 2px;
	max-width: 78ch;
}

/* ---------- Tables ---------- */

.sci-table {
	border-collapse: collapse;
	font-size: 16px;
	width: 100%;
}

.sci-table th {
	border-bottom: 1px solid var(--sci-ink);
	color: var(--sci-dim);
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.08em;
	padding: 0 10px 6px 0;
	text-align: left;
	text-transform: uppercase;
}

.sci-table td {
	border-bottom: 1px solid var(--sci-rule-soft);
	padding: 7px 10px 7px 0;
	vertical-align: middle;
}

.sci-table tr:last-child td {
	border-bottom: 0;
}

.sci-table .sci-col-num {
	text-align: right;
	white-space: nowrap;
	width: 1%;
}

.sci-table .sci-col-bar {
	width: 190px;
}

.sci-phrase {
	font-weight: 500;
	letter-spacing: -0.005em;
}

.sci-state-under {
	color: var(--sci-rust);
	font-weight: 700;
}

.sci-state-over {
	color: var(--sci-ochre);
	font-weight: 700;
}

.sci-state-ok {
	color: var(--sci-pine);
	font-weight: 700;
}

/* ---------- Signature: coverage readout ---------- */

.sci-bar {
	align-items: center;
	display: inline-flex;
	gap: 2px;
}

.sci-tick {
	background: var(--sci-rule);
	border-radius: 1px;
	display: inline-block;
	height: 13px;
	width: 5px;
}

.sci-tick-on {
	background: var(--sci-pine);
}

.sci-bar-count {
	color: var(--sci-dim);
	font-size: 13px;
	margin-left: 6px;
}

/* ---------- Pills ---------- */

.sci-pill {
	border-radius: 2px;
	display: inline-block;
	font-family: var(--sci-mono);
	font-size: 12.5px;
	letter-spacing: 0.05em;
	padding: 2px 7px;
	text-transform: uppercase;
	white-space: nowrap;
}

.sci-pill-missing {
	background: var(--sci-rust);
	color: #fff;
}

.sci-pill-weak {
	background: #f2e9d2;
	color: var(--sci-ochre);
}

.sci-pill-complete {
	background: var(--sci-pine-soft);
	color: var(--sci-pine);
}

.sci-pill-failed {
	background: var(--sci-rust-soft);
	color: var(--sci-rust);
}

.sci-pill-crawling,
.sci-pill-analyzing,
.sci-pill-pending {
	background: var(--sci-wash);
	color: var(--sci-dim);
}

/* ---------- Chips ---------- */

.sci-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.sci-chip {
	align-items: baseline;
	background: var(--sci-wash);
	border-radius: var(--sci-radius);
	display: inline-flex;
	gap: 7px;
	margin: 0;
	padding: 4px 10px;
}

.sci-chip-phrase {
	font-size: 15px;
}

.sci-chip-owner {
	color: var(--sci-dim);
	font-family: var(--sci-mono);
	font-size: 13px;
}

.sci-chip-have {
	background: var(--sci-pine-soft);
}

.sci-chip-lack {
	background: var(--sci-rust-soft);
}

/* ---------- Page cards ---------- */

.sci-cards {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
}

.sci-card {
	background: var(--sci-paper);
	border: 1px solid var(--sci-rule);
	border-radius: var(--sci-radius);
	padding: 15px 16px;
}

.sci-card-own {
	border-color: var(--sci-pine);
	border-width: 2px;
}

.sci-card-head {
	align-items: center;
	display: flex;
	gap: 8px;
	justify-content: space-between;
	margin-bottom: 2px;
}

.sci-card-host {
	font-family: var(--sci-mono);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.sci-tag-own {
	background: var(--sci-pine);
	border-radius: 2px;
	color: #fff;
	font-size: 12px;
	letter-spacing: 0.06em;
	padding: 2px 6px;
	text-transform: uppercase;
}

.sci-card-url {
	color: var(--sci-dim);
	display: block;
	font-size: 13.5px;
	margin-bottom: 10px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sci-kv {
	margin: 0 0 10px;
}

.sci-kv dt {
	color: var(--sci-dim);
	font-family: var(--sci-mono);
	font-size: 12px;
	letter-spacing: 0.07em;
	margin-top: 7px;
	text-transform: uppercase;
}

.sci-kv dd {
	font-size: 15px;
	line-height: 1.4;
	margin: 1px 0 0;
}

.sci-stats {
	border-top: 1px solid var(--sci-rule-soft);
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	list-style: none;
	margin: 0;
	padding: 9px 0 0;
}

.sci-stats li {
	color: var(--sci-dim);
	font-size: 13.5px;
	margin: 0;
}

.sci-stats .sci-mono {
	color: var(--sci-ink);
	font-size: 15px;
	font-weight: 600;
}

.sci-details {
	margin-top: 10px;
}

.sci-details summary {
	color: var(--sci-pine);
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
}

.sci-outline {
	border-left: 2px solid var(--sci-rule);
	font-size: 14.5px;
	list-style: none;
	margin: 8px 0 0;
	padding: 0 0 0 11px;
}

.sci-outline li {
	color: #40454a;
	margin: 0 0 3px;
}

.sci-card-schema {
	font-size: 13.5px;
	margin: 9px 0 0;
}

/* ---------- Misc ---------- */

.sci-empty {
	background: var(--sci-wash);
	border-radius: var(--sci-radius);
	padding: 34px;
	text-align: center;
}

.sci-notice {
	text-align: center;
}

.sci-list .sci-link-danger {
	color: var(--sci-rust);
	text-decoration: none;
}

.sci-export-row {
	display: flex;
	gap: 10px;
	margin-top: 18px;
}

/* ---------- Responsive ---------- */

@media (max-width: 782px) {
	.sci-panel {
		padding: 20px 16px;
	}

	.sci-table .sci-col-bar {
		width: 120px;
	}

	.sci-tick {
		width: 3px;
	}

	.sci-meta-num {
		font-size: 26px;
	}

	.sci-cards {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sci-wrap *,
	.sci-report * {
		transition: none !important;
	}
}

/* ==================================================================
   Tabs
   ================================================================== */

.sci-tabbar {
	border-bottom: 1px solid var(--sci-rule);
	display: flex;
	gap: 2px;
	margin: 0 0 4px;
	overflow-x: auto;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.sci-tab {
	align-items: center;
	background: transparent;
	border: 0;
	border-bottom: 2px solid transparent;
	color: var(--sci-dim);
	cursor: pointer;
	display: inline-flex;
	font-family: var(--sci-sans);
	font-size: 15px;
	font-weight: 600;
	gap: 6px;
	letter-spacing: -0.01em;
	margin: 0;
	padding: 10px 13px;
	white-space: nowrap;
}

.sci-tab:hover {
	background: var(--sci-wash);
	color: var(--sci-ink);
}

.sci-tab.is-active {
	background: var(--sci-pine);
	border-bottom-color: var(--sci-pine);
	color: #fff;
}

.sci-tab.is-active:hover {
	background: var(--sci-pine);
	color: #fff;
}

/* Quiet badges need lifting off the filled tab. */
.sci-tab.is-active .sci-badge-quiet {
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
}

.sci-tab:focus-visible {
	outline: 2px solid var(--sci-pine);
	outline-offset: -2px;
}

.sci-tab-badge {
	border-radius: 9px;
	font-family: var(--sci-mono);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	min-width: 16px;
	padding: 3px 5px;
	text-align: center;
}

.sci-badge-alert {
	background: var(--sci-rust);
	color: #fff;
}

.sci-badge-quiet {
	background: var(--sci-rule);
	color: var(--sci-dim);
}

.sci-panel-tab {
	display: none;
}

.sci-panel-tab.is-active {
	display: block;
}

.sci-tab-intro {
	border-bottom: 1px solid var(--sci-rule-soft);
	color: var(--sci-dim);
	font-size: 15.5px;
	margin: 0;
	max-width: 74ch;
	padding: 16px 0;
}

/* ---------- Verdict banner ---------- */

.sci-verdict {
	border-left: 3px solid var(--sci-rule);
	margin: 18px 0 0;
	padding: 13px 16px;
}

.sci-verdict strong {
	display: block;
	font-size: 17px;
	font-weight: 650;
	letter-spacing: -0.01em;
}

.sci-verdict span {
	color: #3f4448;
	display: block;
	font-size: 15.5px;
	margin-top: 3px;
	max-width: 76ch;
}

.sci-verdict-ok {
	background: var(--sci-pine-soft);
	border-left-color: var(--sci-pine);
}

.sci-verdict-warn {
	background: #f7f1df;
	border-left-color: var(--sci-ochre);
}

.sci-verdict-bad {
	background: var(--sci-rust-soft);
	border-left-color: var(--sci-rust);
}

.sci-verdict-quiet {
	background: var(--sci-wash);
}

/* ---------- Callouts ---------- */

.sci-callout {
	background: var(--sci-wash);
	border-radius: var(--sci-radius);
	color: #3f4448;
	font-size: 15px;
	line-height: 1.6;
	margin: 18px 0 0;
	max-width: 82ch;
	padding: 13px 15px;
}

.sci-callout strong {
	color: var(--sci-ink);
}

.sci-callout-warn {
	background: #f7f1df;
}

.sci-callout-strong {
	border-left: 3px solid var(--sci-ink);
}

/* ---------- Check list ---------- */

.sci-checks {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sci-check {
	border-left: 3px solid var(--sci-rule);
	margin: 0 0 3px;
	padding: 10px 0 10px 14px;
}

.sci-check-ok {
	border-left-color: var(--sci-pine);
}

.sci-check-warn {
	background: #faf6ea;
	border-left-color: var(--sci-ochre);
}

.sci-check-blocker {
	background: var(--sci-rust-soft);
	border-left-color: var(--sci-rust);
}

.sci-check-head {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
}

.sci-check-head strong {
	font-size: 16px;
	font-weight: 650;
}

.sci-check-value {
	background: rgba(0, 0, 0, 0.05);
	border-radius: 2px;
	font-family: var(--sci-mono);
	font-size: 13.5px;
	overflow-wrap: anywhere;
	padding: 1px 6px;
}

.sci-check-detail {
	color: #3f4448;
	font-size: 15px;
	margin: 3px 0 0;
	max-width: 78ch;
}

/* ---------- Density and state colouring ---------- */

.sci-dens-heavy {
	color: var(--sci-rust);
	font-weight: 700;
}

.sci-dens-light,
.sci-dens-absent {
	color: var(--sci-dim);
}

.sci-dens-ok {
	color: var(--sci-pine);
}

.sci-row-own td {
	background: var(--sci-pine-soft);
}

/* ---------- Confidence pills ---------- */

.sci-pill-conf-high {
	background: var(--sci-pine-soft);
	color: var(--sci-pine);
}

.sci-pill-conf-medium {
	background: var(--sci-wash);
	color: var(--sci-ink);
}

.sci-pill-conf-low,
.sci-pill-conf-unclear {
	background: #f2e9d2;
	color: var(--sci-ochre);
}

/* ---------- Score display ---------- */

.sci-scorerow {
	display: flex;
	gap: 34px;
	margin: 20px 0 4px;
}

.sci-score {
	display: flex;
	flex-direction: column;
}

.sci-score-num {
	font-family: var(--sci-mono);
	font-size: 42px;
	font-weight: 700;
	letter-spacing: -0.04em;
	line-height: 1;
}

.sci-score-quiet .sci-score-num {
	color: var(--sci-dim);
}

.sci-score-label {
	color: var(--sci-dim);
	font-size: 13.5px;
	letter-spacing: 0.03em;
	margin-top: 5px;
}

.sci-scorebar {
	background: var(--sci-wash);
	border-radius: 2px;
	display: block;
	height: 8px;
	overflow: hidden;
	width: 100%;
}

.sci-scorebar-fill {
	display: block;
	height: 100%;
}

.sci-scorebar-good {
	background: var(--sci-pine);
}

.sci-scorebar-mid {
	background: var(--sci-ochre);
}

.sci-scorebar-low {
	background: var(--sci-rust);
}

/* ---------- Notes, prose, timeline ---------- */

.sci-notes {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sci-note {
	border-left: 2px solid var(--sci-rule);
	color: #3f4448;
	font-size: 15.5px;
	line-height: 1.6;
	margin: 0 0 9px;
	max-width: 80ch;
	padding-left: 12px;
}

.sci-note-warn {
	border-left-color: var(--sci-ochre);
}

.sci-prose {
	color: #3f4448;
	font-size: 16px;
	line-height: 1.65;
	margin: 0;
	max-width: 76ch;
}

.sci-timeline {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sci-timeline li {
	align-items: baseline;
	border-bottom: 1px solid var(--sci-rule-soft);
	color: #3f4448;
	display: flex;
	font-size: 15.5px;
	gap: 16px;
	margin: 0;
	padding: 9px 0;
}

.sci-timeline .sci-mono {
	color: var(--sci-ink);
	flex: none;
	font-weight: 600;
	min-width: 104px;
}

.sci-empty-tab {
	background: var(--sci-wash);
	border-radius: var(--sci-radius);
	color: var(--sci-dim);
	font-size: 15.5px;
	margin-top: 18px;
	padding: 26px;
	text-align: center;
}

.sci-sev-critical {
	background: var(--sci-rust);
	border-left-color: #7d2c11;
}

.sci-sev-critical .sci-sev-tag,
.sci-sev-critical .sci-action-title,
.sci-sev-critical .sci-action-detail {
	color: #fff;
}

@media (max-width: 782px) {
	.sci-tab {
		font-size: 14.5px;
		padding: 10px 11px;
	}

	.sci-scorerow {
		gap: 22px;
	}

	.sci-score-num {
		font-size: 34px;
	}
}
