/* myresolutionis.ru v2 - mobile-first, no frameworks */

/* colour tokens (light/dark) and the site header: assets/site/base.css */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 16px/1.55 var(--font);
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }

h1, h2 { line-height: 1.2; margin: 0; }

.wrap {
	width: 100%;
	max-width: 1040px;
	margin: 0 auto;
	padding: 0 16px;
}

/* ---------- hero ---------- */

main.wrap { padding-top: 20px; padding-bottom: 32px; }

.hero {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 22px 18px 18px;
	text-align: center;
}
.hero h1 { font-size: 18px; font-weight: 600; color: var(--muted); }
.big-res {
	margin: 6px 0 4px;
	font-size: clamp(42px, 13vw, 76px);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}
.big-res .unit {
	display: block;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0;
	color: var(--muted);
}
.hero-sub { margin: 4px 0 16px; color: var(--muted); }
.hero-sub b { color: var(--text); }
.dot { margin: 0 8px; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.copy-status { min-height: 1.5em; margin: 8px 0 0; font-size: 14px; color: var(--muted); }

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 16px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }

/* ---------- tiles ---------- */

.tiles {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin: 14px 0;
}
.tile {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 12px 14px;
	min-width: 0;
}
.tile h2 { font-size: 13px; font-weight: 600; color: var(--muted); }
.tile-value {
	margin: 4px 0 2px;
	font-size: 22px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	overflow-wrap: anywhere;
}
.tile-value-sm { font-size: 17px; }
.tile-hint { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.35; }
.tile-wide { grid-column: 1 / -1; }
.mono { font-family: var(--mono); }

/* ---------- cards, notes ---------- */

.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 16px 18px;
	margin: 14px 0;
}
.card h2 { font-size: 19px; margin-bottom: 8px; }
.card p { margin: 0 0 10px; }
.card p:last-child { margin-bottom: 0; }

.details summary { cursor: pointer; font-weight: 600; }
.kv { margin: 12px 0 0; display: grid; gap: 8px; }
.kv div { display: grid; gap: 2px; }
.kv dt { font-size: 13px; color: var(--muted); }
.kv dd { margin: 0; font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }

.note { font-size: 14px; color: var(--muted); margin: 10px 2px; }
.muted { color: var(--muted); font-size: 14px; }
kbd {
	font: 12px var(--mono);
	padding: 1px 6px;
	border: 1px solid var(--border);
	border-bottom-width: 2px;
	border-radius: 5px;
	background: var(--surface);
	color: var(--text);
}

.explain { background: var(--accent-soft); border-color: transparent; }

/* ---------- tools ---------- */

.section-title { font-size: 21px; margin: 28px 2px 12px; }
.tools { display: grid; grid-template-columns: 1fr; gap: 10px; }
.tool {
	display: block;
	padding: 14px 16px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	text-decoration: none;
	color: var(--text);
}
.tool:hover { border-color: var(--accent); }
.tool-name { display: block; font-weight: 650; color: var(--accent); }
.tool-desc { display: block; font-size: 14px; color: var(--muted); }

/* ---------- posts ---------- */

.posts { list-style: none; padding: 4px 18px; }
.posts li {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 2px 12px;
	padding: 11px 0;
	border-bottom: 1px solid var(--border);
}
.posts li:last-child { border-bottom: 0; }
.posts a { text-decoration: none; font-weight: 500; }
.posts a:hover { text-decoration: underline; }
.posts time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.more { margin: 0 2px; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding-top: 14px; padding-bottom: 14px; }
.footer-row p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- wider screens ---------- */

@media (min-width: 640px) {
	.tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hero { padding: 32px 24px 22px; }
}

@media (min-width: 900px) {
	.tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.tile-wide { grid-column: span 2; }
	.tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.kv div { grid-template-columns: 220px 1fr; gap: 12px; }
}

/* ---------- share panel ---------- */

.share-panel {
	margin: 16px auto 0;
	max-width: 620px;
	padding: 16px;
	text-align: left;
	background: var(--surface-2);
	border-radius: var(--radius-sm);
}
.share-intro { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.share-link { display: flex; gap: 8px; }
.share-link input {
	flex: 1;
	min-width: 0;
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--text);
	font: 13px var(--mono);
	text-overflow: ellipsis;
}
.share-targets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.share-targets .btn { flex: 1 1 auto; font-size: 14px; }
.btn-quiet { color: var(--muted); font-weight: 500; }
.share-ip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 12px; font-size: 14px; cursor: pointer; }
.share-ip input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.share-ip-note { color: var(--muted); font-size: 13px; }
.share-status { min-height: 1.4em; margin: 8px 0 0; font-size: 14px; color: var(--good); }

/* ---------- shared device report (/r/) ---------- */

.lang-switch { display: flex; justify-content: flex-end; gap: 6px; margin: 0 0 10px; font-size: 14px; }
.lang-switch a { padding: 3px 10px; border-radius: 999px; text-decoration: none; color: var(--muted); }
.lang-switch a[aria-current="true"] { background: var(--surface-2); color: var(--text); font-weight: 600; }
.report .hero h1 { margin-bottom: 2px; }
.report-time { margin: -6px 0 16px; font-size: 14px; color: var(--muted); }
.report-msg { max-width: 520px; margin: 10px auto 18px; color: var(--muted); }
.ua { margin: 0; font-size: 13px; overflow-wrap: anywhere; }

/* ---------- browser check (homepage and shared report) ---------- */

.check-intro { color: var(--muted); }
.check-summary { min-height: 1.5em; font-weight: 600; }
.check-summary[data-state="ok"] { color: var(--good); }
.check-summary[data-state="bad"] { color: var(--warn); }
.check-list { list-style: none; margin: 4px 0 14px; padding: 0; }
.check-list li {
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr) auto;
	gap: 0 10px;
	align-items: baseline;
	padding: 10px 0;
	border-top: 1px solid var(--border);
}
.check-mark { font-weight: 700; text-align: center; color: var(--muted); }
.check-mark::before { content: "…"; }
[data-state="ok"] > .check-mark::before { content: "✓"; }
[data-state="bad"] > .check-mark::before { content: "✕"; }
[data-state="info"] > .check-mark::before { content: "•"; }
[data-state="ok"] > .check-mark, [data-state="ok"] > .check-value { color: var(--good); }
[data-state="bad"] > .check-mark, [data-state="bad"] > .check-value { color: var(--warn); }
.check-name { font-weight: 600; overflow-wrap: anywhere; }
.check-value { text-align: right; font-weight: 600; }
.check-hint { grid-column: 2 / -1; font-size: 13px; line-height: 1.35; color: var(--muted); }
.check-fix {
	margin: 0 0 12px;
	padding: 12px 14px;
	background: var(--surface-2);
	border-radius: var(--radius-sm);
}
.check-fix h3 { margin: 0 0 6px; font-size: 16px; }
.check-fix p { margin: 0 0 8px; }
.check-alert { margin: 4px 0 0; font-size: 14px; }
.check-alert a { color: var(--warn); font-weight: 600; }
