/*
 * Styly nástroje a reportu. Navazují na proměnné z šablony, ale mají vlastní
 * záložní hodnoty, aby plugin fungoval i v jiném vzhledu.
 */

.report {
	--r-paper:   var(--surface-alt, #f7f8fa);
	--r-surface: var(--surface, #fff);
	--r-ink:     var(--ink, #0d1117);
	--r-soft:    var(--ink-soft, #3d4451);
	--r-muted:   var(--ink-muted, #6b7280);
	--r-rule:    var(--rule, #e3e6ec);
	--r-strong:  var(--rule-strong, #cdd2dc);
	--r-brand:   var(--brand, #1b4de4);
	--r-ok:      var(--ok, #157f4b);
	--r-warn:    var(--warn, #b4690e);
	--r-fail:    var(--fail, #c42b1c);
	--r-locked:  var(--locked, #5b6478);
	--r-ok-graphic:   var(--ok-graphic, #1a9c5c);
	--r-warn-graphic: var(--warn-graphic, #d08307);
	--r-fail-graphic: var(--fail-graphic, #e0402e);
	--r-radius:  var(--radius, 10px);
	--r-mono:    var(--mono, ui-monospace, Menlo, Consolas, monospace);
	--r-serif:   var(--serif, Georgia, serif);

	display: block;
	padding-block: 2rem 4rem;
}

/* ---------------------------------------------------------------- čekání */

.report-pending,
.report-error {
	max-width: 40rem;
	margin: 5rem auto;
	text-align: center;
}

.report-pending__state {
	font-family: var(--r-mono, monospace);
	font-size: 1rem;
	letter-spacing: 0.04em;
	margin-bottom: 0.4rem;
}

.report-pending__hint,
.report-error__note {
	color: var(--r-muted);
	font-size: 0.95rem;
}

.report-error {
	text-align: left;
	border: 1px solid var(--r-strong);
	border-left-width: 4px;
	border-left-color: var(--r-fail);
	background: var(--r-surface);
	padding: 2rem;
}

.report-error__message {
	font-size: 1.1rem;
}

/* --------------------------------------------------------------- hlavička */

.report-head {
	border-bottom: 1px solid var(--r-strong);
	padding-bottom: 2rem;
	margin-bottom: 3rem;
}

.report-head__meta {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	font-family: var(--r-mono);
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--r-muted);
	border-bottom: 1px solid var(--r-rule);
	padding-bottom: 0.6rem;
	margin-bottom: 2rem;
}

.report-head__host {
	color: var(--r-ink);
	font-weight: 700;
}

.report-head__grid {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: clamp(1.5rem, 5vw, 3.5rem);
	align-items: center;
}

.report-head__verdict h1 {
	margin-bottom: 0.5rem;
}

.report-head__percentile {
	font-size: 1.05rem;
	color: var(--r-soft);
	margin-bottom: 0.6rem;
}

.report-head__delta {
	font-family: var(--r-mono);
	font-size: 0.85rem;
	display: inline-block;
	border: 1px solid currentColor;
	padding: 0.15rem 0.45rem;
	margin-bottom: 0.8rem;
}

.report-head__delta--up   { color: var(--r-ok); }
.report-head__delta--down { color: var(--r-fail); }

.report-head__counts {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	margin: 0 0 0.9rem;
	padding: 0;
	font-family: var(--r-mono);
	font-size: 0.78rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--r-muted);
}

.report-head__counts strong {
	font-family: var(--r-serif);
	font-size: 1.5rem;
	letter-spacing: 0;
	display: block;
	color: var(--r-ink);
}

.report-head__counts .is-fail strong { color: var(--r-fail); }
.report-head__counts .is-warn strong { color: var(--r-warn); }
.report-head__counts .is-pass strong { color: var(--r-ok); }

.report-head__scope {
	font-size: 0.9rem;
	color: var(--r-muted);
	margin: 0;
}

.report-cap {
	border-radius: var(--r-radius);
	margin-top: 1.5rem;
	border-left: 3px solid var(--r-fail);
	background: var(--fail-wash, #fdedeb);
	padding: 0.9rem 1.2rem;
	font-size: 0.97rem;
}

.report-cap p { margin: 0; }

.report-cap ul {
	margin: 0.6rem 0 0;
	padding-left: 1.1rem;
	font-size: 0.94rem;
}

.section__note {
	border-left: 3px solid var(--r-rule);
	padding-left: 0.9rem;
	margin-bottom: 1.25rem;
	font-size: 0.92rem;
	color: var(--r-muted);
	max-width: 62ch;
}

/* Kruhový ukazatel. Tenká linka, ne tlustý prstenec. */

.dial {
	position: relative;
	width: clamp(8.5rem, 22vw, 11rem);
	aspect-ratio: 1;
	flex-shrink: 0;
}

.dial svg {
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.dial__track {
	fill: none;
	stroke: var(--r-rule);
	stroke-width: 3;
}

.dial__value {
	fill: none;
	stroke: var(--r-ok-graphic);
	stroke-width: 3;
	stroke-linecap: butt;
	transition: stroke-dashoffset 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.dial--d .dial__value,
.dial--e .dial__value { stroke: var(--r-warn-graphic); }

.dial--f .dial__value { stroke: var(--r-fail-graphic); }

.dial__label {
	position: absolute;
	inset: 0;
	display: grid;
	place-content: center;
	text-align: center;
	line-height: 1;
}

.dial__label strong {
	font-family: var(--r-serif);
	font-size: clamp(2.6rem, 7vw, 3.4rem);
	font-weight: 400;
}

.dial__label span {
	font-family: var(--r-mono);
	font-size: 0.62rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--r-muted);
	margin-top: 0.35rem;
}

.dial__label em {
	position: absolute;
	top: -0.4rem;
	right: -0.6rem;
	font-family: var(--r-mono);
	font-style: normal;
	font-size: 0.8rem;
	font-weight: 700;
	border: 1.5px solid currentColor;
	width: 1.8rem;
	height: 1.8rem;
	display: grid;
	place-items: center;
	transform: rotate(-8deg);
	background: var(--r-paper);
}

/* -------------------------------------------------------------- priority */

.priorities {
	margin-bottom: 3.5rem;
}

.priorities__lead {
	color: var(--r-soft);
	max-width: 60ch;
	margin-bottom: 1.5rem;
}

.priorities__list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--r-strong);
}

.priority {
	display: grid;
	grid-template-columns: 2.5rem minmax(0, 1fr) auto;
	gap: 1rem;
	align-items: start;
	padding: 1.25rem 0;
	border-bottom: 1px solid var(--r-rule);
}

.priority__rank {
	font-family: var(--r-mono);
	font-size: 0.85rem;
	color: var(--r-muted);
	padding-top: 0.2rem;
}

.priority__body h3 {
	font-size: 1.15rem;
	margin: 0 0 0.35rem;
}

.priority__summary {
	margin: 0 0 0.45rem;
	color: var(--r-soft);
}

.priority__fix {
	margin: 0;
	font-size: 0.95rem;
}

.priority__gain {
	font-family: var(--r-mono);
	font-size: 0.85rem;
	white-space: nowrap;
	border: 1px solid var(--r-rule);
	padding: 0.2rem 0.5rem;
	color: var(--r-brand);
}

.priority--fail .priority__rank { color: var(--r-fail); font-weight: 700; }
.priority--warn .priority__rank { color: var(--r-warn); }

/* ------------------------------------------------------------- kategorie */

.categories {
	margin-bottom: 3.5rem;
}

/* Mřížka se kreslí okraji buněk, ne podkladem. Při lichém počtu karet
   by jinak zbylé místo v posledním řádku zůstalo šedé. */
.categories__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
	border-top: 1px solid var(--r-rule);
	border-left: 1px solid var(--r-rule);
}

.cat {
	background: var(--r-paper);
	border-right: 1px solid var(--r-rule);
	border-bottom: 1px solid var(--r-rule);
	padding: 1.1rem;
	text-decoration: none;
	color: var(--r-ink);
	display: grid;
	gap: 0.35rem;
	align-content: start;
}

.cat:hover { background: var(--r-surface); }

.cat__score {
	font-family: var(--r-serif);
	font-size: 2rem;
	line-height: 1;
}

.cat__name {
	font-weight: 600;
	font-size: 0.98rem;
}

.cat__verdict,
.cat__counts {
	font-family: var(--r-mono);
	font-size: 0.66rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--r-muted);
}

.cat__bar {
	display: block;
	height: 3px;
	background: var(--r-rule);
	margin-block: 0.3rem;
}

.cat__bar span {
	display: block;
	height: 100%;
	background: currentColor;
}

.cat--good { color: var(--r-ok); }
.cat--fair { color: var(--r-brand); }
.cat--poor { color: var(--r-warn); }
.cat--bad  { color: var(--r-fail); }

.cat__name,
.cat__score { color: var(--r-ink); }

/* ----------------------------------------------------------------- sekce */

.section {
	margin-bottom: 3.5rem;
	scroll-margin-top: 5rem;
}

.section__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	border-bottom: 1px solid var(--r-strong);
	padding-bottom: 0.7rem;
	margin-bottom: 1rem;
}

.section__head h2 { margin: 0 0 0.2rem; }

.section__claim {
	font-family: var(--r-mono);
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--r-muted);
	margin: 0;
}

.section__score {
	font-family: var(--r-serif);
	font-size: 2rem;
	line-height: 1;
}

.section__score--good { color: var(--r-ok); }
.section__score--fair { color: var(--r-brand); }
.section__score--poor { color: var(--r-warn); }
.section__score--bad  { color: var(--r-fail); }

.section__intro {
	max-width: 68ch;
	color: var(--r-soft);
	margin-bottom: 1.5rem;
}

/* ------------------------------------------------------------ jedna kontrola */

.checks {
	border-radius: var(--r-radius);
	display: grid;
	gap: 1px;
	background: var(--r-rule);
	border: 1px solid var(--r-rule);
}

.check {
	background: var(--r-paper);
	padding: 1.1rem 1.3rem;
	border-left: 3px solid transparent;
}

.check--fail { border-left-color: var(--r-fail); background: var(--r-surface); }
.check--warn { border-left-color: var(--r-warn); background: var(--r-surface); }
.check--pass { border-left-color: var(--r-rule); }
.check--info { border-left-color: var(--r-brand); }

.check__head {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: 0.35rem;
	flex-wrap: wrap;
}

.check__head h3 {
	margin: 0;
	font-family: inherit;
	font-size: 1.02rem;
	font-weight: 700;
	letter-spacing: 0;
}

.check__icon {
	width: 0.7rem;
	height: 0.7rem;
	border: 1.5px solid currentColor;
	flex-shrink: 0;
}

.check--pass .check__icon { background: var(--r-ok); border-color: var(--r-ok); }
.check--warn .check__icon { border-color: var(--r-warn); border-radius: 50%; }
.check--fail .check__icon { background: var(--r-fail); border-color: var(--r-fail); transform: rotate(45deg); }
.check--info .check__icon { border-color: var(--r-brand); border-radius: 50%; }
.check--locked .check__icon { border-color: var(--r-locked); border-style: dashed; }

.check__tag {
	margin-left: auto;
	font-family: var(--r-mono);
	font-size: 0.62rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--r-muted);
	border: 1px solid var(--r-rule);
	padding: 0.1rem 0.4rem;
}

.check--fail .check__tag { color: var(--r-fail); border-color: currentColor; }
.check--warn .check__tag { color: var(--r-warn); border-color: currentColor; }

.check__summary {
	margin: 0;
	color: var(--r-soft);
}

.check--locked {
	position: relative;
}

.check__summary--locked {
	color: var(--r-locked);
	font-style: italic;
}

.check__evidence {
	margin-top: 0.7rem;
	font-size: 0.9rem;
}

.check__evidence summary {
	cursor: pointer;
	font-family: var(--r-mono);
	font-size: 0.7rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--r-brand);
}

.check__evidence ul {
	margin: 0.6rem 0 0;
	padding-left: 1.1rem;
	font-family: var(--r-mono);
	font-size: 0.8rem;
	line-height: 1.5;
	color: var(--r-soft);
	word-break: break-word;
}

.check__advice {
	margin-top: 0.9rem;
	padding-top: 0.8rem;
	border-top: 1px dashed var(--r-rule);
	font-size: 0.95rem;
}

.check__advice p { margin: 0 0 0.45rem; }

.check__advice strong { color: var(--r-ink); }

.check__article a {
	font-family: var(--r-mono);
	font-size: 0.75rem;
	letter-spacing: 0.06em;
}

/* Náhled výsledku hledání */

.serp {
	border-radius: var(--r-radius);
	display: grid;
	gap: 0.15rem;
	background: #fff;
	border: 1px solid var(--r-rule);
	padding: 0.9rem 1.1rem;
	margin-top: 0.8rem;
	max-width: 36rem;
}

.serp__url {
	font-size: 0.8rem;
	color: #4d5156;
}

.serp__title {
	font-size: 1.15rem;
	color: #1a0dab;
	line-height: 1.3;
}

.serp__description {
	font-size: 0.88rem;
	color: #4d5156;
	line-height: 1.45;
}

/* --------------------------------------------------------------- tabulky */

.pages {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
	background: var(--r-surface);
}

.pages th,
.pages td {
	border-bottom: 1px solid var(--r-rule);
	padding: 0.55rem 0.8rem;
	text-align: left;
	white-space: nowrap;
}

.pages thead th {
	font-family: var(--r-mono);
	font-size: 0.66rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--r-muted);
	background: var(--surface-alt, #f7f8fa);
}

.pages td:nth-child(3) {
	white-space: normal;
	max-width: 22rem;
}

/* ------------------------------------------------------------ specialisté */

.experts {
	border-radius: var(--r-radius);
	border: 1px solid var(--r-strong);
	background: var(--r-surface);
	padding: clamp(1.5rem, 4vw, 2.5rem);
	margin-bottom: 3rem;
}

.experts__lead {
	max-width: 62ch;
	color: var(--r-soft);
	margin-bottom: 1.75rem;
}

.experts__note {
	margin: 1.5rem 0 0;
	font-size: 0.9rem;
	color: var(--r-muted);
}

/* --------------------------------------------------------- výzva k akci */

.cta {
	border-radius: var(--r-radius);
	border: 1px solid var(--r-strong);
	border-top-width: 3px;
	background: var(--brand-wash, #eef3ff);
	padding: clamp(1.5rem, 4vw, 2.5rem);
}

.cta h2 { margin-top: 0; }

.cta p { max-width: 62ch; }

.cta__note {
	font-size: 0.88rem;
	color: var(--r-muted);
	margin-bottom: 0;
}

/* ------------------------------------------------------------------ tisk */

@media print {
	.check--pass,
	.check--info { display: none; }

	.checks { border: 0; }

	.check { break-inside: avoid; }

	.report-head__grid { grid-template-columns: auto 1fr; }
}

@media (max-width: 700px) {
	.report-head__grid { grid-template-columns: 1fr; }

	.priority {
		grid-template-columns: 2rem minmax(0, 1fr);
	}

	.priority__gain {
		grid-column: 2;
		justify-self: start;
	}

	.section__head { flex-wrap: wrap; }
}
