/* Router compatibility checker (QuotaSpot colours) - no web fonts, logical properties (RTL-ready), light/dark. */

:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --surface-2: #f3f2ec;
  --text: #0f172a;
  --muted: #4a5568;
  --border: #e3e1d9;
  --accent: #0f766e;
  --accent-hover: #0b5c55;
  --accent-text: #ffffff;
  --accent-soft: #e2f2ef;
  --focus: #2563eb;

  --good: #17703a;   --good-bg: #e5f4e9;   --good-border: #9fd0ae;
  --caution: #8a5300; --caution-bg: #fdf1dc; --caution-border: #e9c27c;
  --no: #b3261e;     --no-bg: #fbe7e5;     --no-border: #eba7a1;
  --unknown: #4a5568; --unknown-bg: #eceff3; --unknown-border: #bcc4cf;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 6px 24px rgb(0 0 0 / 6%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #081312; --surface: #0f201f; --surface-2: #132827; --text: #e7f0ee; --muted: #9db3af;
    --border: #1f3936; --accent: #2dd4bf; --accent-hover: #5eead4; --accent-text: #032421; --accent-soft: #0f2e2b;
    --focus: #8fb4ff;
    --good: #6ed492; --good-bg: #15301f; --good-border: #2e6b44;
    --caution: #f2bd5c; --caution-bg: #33270f; --caution-border: #6f5420;
    --no: #ff8f86; --no-bg: #3a1a18; --no-border: #7a3530;
    --unknown: #b6c2d3; --unknown-bg: #232a33; --unknown-border: #4a5566;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 28px rgb(0 0 0 / 30%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #081312; --surface: #0f201f; --surface-2: #132827; --text: #e7f0ee; --muted: #9db3af;
  --border: #1f3936; --accent: #2dd4bf; --accent-hover: #5eead4; --accent-text: #032421; --accent-soft: #0f2e2b;
  --focus: #8fb4ff;
  --good: #6ed492; --good-bg: #15301f; --good-border: #2e6b44;
  --caution: #f2bd5c; --caution-bg: #33270f; --caution-border: #6f5420;
  --no: #ff8f86; --no-bg: #3a1a18; --no-border: #7a3530;
  --unknown: #b6c2d3; --unknown-bg: #232a33; --unknown-border: #4a5566;
  --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 28px rgb(0 0 0 / 30%);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
h1, h2, h3, h4 { line-height: 1.2; margin-block: 0 0.5em; }
p { margin-block: 0 0.75em; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: none; }
img { max-inline-size: 100%; }
.visually-hidden {
  position: absolute !important; inline-size: 1px; block-size: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.wrap { max-inline-size: 60rem; margin-inline: auto; padding-inline: 16px; }
.small { font-size: 0.9rem; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.92rem; margin-block: 0.4em 0; }

.icon { inline-size: 1.25em; block-size: 1.25em; flex: none; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon .icon-frame { fill: currentColor; stroke: none; }
.icon-good path:not(.icon-frame), .icon-caution path:not(.icon-frame),
.icon-no path:not(.icon-frame), .icon-unknown path:not(.icon-frame) { stroke: var(--surface); stroke-width: 2.4; }

.skip-link {
  position: absolute; inset-inline-start: 8px; inset-block-start: -60px; z-index: 10;
  background: var(--accent); color: var(--accent-text); padding: 0.6em 1em; border-radius: var(--radius-sm);
}
.skip-link:focus { inset-block-start: 8px; }

.sample-banner {
  background: repeating-linear-gradient(-45deg, #ffd23f, #ffd23f 14px, #ffe27a 14px, #ffe27a 28px);
  color: #2b2100; font-weight: 700; text-align: center; padding: 0.55em 16px; letter-spacing: 0.02em;
}

/* Header */
.site-header { background: var(--surface); border-block-end: 1px solid var(--border); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-block-size: 60px; padding-block: 8px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.logo-mark { inline-size: 34px; block-size: 34px; flex: none; }
.lm-bg { fill: var(--accent); }
.lm-arc { fill: none; stroke: var(--accent-text); stroke-width: 4; stroke-linecap: round; }
.lm-track { fill: none; stroke: var(--accent-text); stroke-opacity: 0.3; stroke-width: 4; stroke-linecap: round; }
.lm-fill { fill: none; stroke: #f59e0b; stroke-width: 4; stroke-linecap: round; }
.lm-dot { fill: var(--accent-text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-block-size: 48px; padding: 0.6em 1.15em; border-radius: 999px;
  font: inherit; font-weight: 650; text-decoration: none; text-align: center; line-height: 1.25;
  border: 2px solid transparent; cursor: pointer;
}
.btn-small { min-block-size: 40px; padding: 0.35em 0.95em; font-size: 0.95rem; }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-text); }
.btn-secondary { background: var(--surface); color: var(--accent); border-color: var(--accent); }
.btn-secondary:hover { background: var(--accent-soft); }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); }
.link-button {
  background: none; border: 0; padding: 0.4em 0; font: inherit; color: var(--accent);
  text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.4em; min-block-size: 44px;
}

/* Hero */
.hero { padding-block: 36px 20px; }
.eyebrow { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; margin: 0 0 0.6em; }
.hero h1 { font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.75rem); max-inline-size: 22ch; letter-spacing: -0.01em; }
.lead { font-size: 1.12rem; color: var(--muted); max-inline-size: 46rem; }
.hero-points { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.hero-points li { display: flex; align-items: center; gap: 0.5em; font-weight: 600; }
.hero-points .icon { color: var(--good); }

/* Checker card */
.checker { padding-block: 8px 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.checker-card h2 { font-size: 1.45rem; }
.steps { list-style: none; padding: 0; margin: 0 0 1.1rem; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 0.95rem; }
.steps li { display: flex; align-items: center; gap: 0.45em; }
.step-n { display: inline-grid; place-items: center; inline-size: 1.6em; block-size: 1.6em; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 0.85rem; }
.search-label { display: block; font-weight: 700; margin-block-end: 0.35em; }
.search-box { position: relative; }
.search-icon { position: absolute; inset-inline-start: 14px; inset-block-start: 50%; translate: 0 -50%; inline-size: 22px; block-size: 22px; color: var(--muted); pointer-events: none;
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
#search {
  inline-size: 100%; min-block-size: 56px; padding-block: 0.7em; padding-inline: 48px 14px;
  font: inherit; font-size: 1.15rem; color: var(--text); background: var(--bg);
  border: 2px solid var(--border); border-radius: 12px; appearance: none;
}
#search:focus { border-color: var(--accent); outline: 3px solid var(--focus); outline-offset: 1px; }
#search::placeholder { color: var(--muted); opacity: 0.85; }
#search:disabled { opacity: 0.6; }

.view { margin-block-start: 18px; scroll-margin-block-start: 12px; }
.loading { color: var(--muted); }

/* Empty state examples */
.empty { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.examples-label { color: var(--muted); }
.examples { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.chip { display: inline-flex; align-items: center; min-block-size: 40px; padding: 0.3em 0.95em; border-radius: 999px;
  background: var(--surface-2); color: var(--text); text-decoration: none; border: 1px solid var(--border); font-weight: 600; font-size: 0.95rem; }
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* Results */
.count { color: var(--muted); font-size: 0.95rem; margin-block-end: 0.5em; }
.results, .versions { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.result-row, .version-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-block-size: 60px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  color: var(--text); text-decoration: none;
}
.result-row:hover, .version-row:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.result-name { display: flex; flex-direction: column; flex: 1; min-inline-size: 0; }
.result-brand { font-size: 0.85rem; color: var(--muted); }
.result-model { font-weight: 700; font-size: 1.08rem; }
.result-count { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; color: var(--muted); font-size: 0.88rem; text-align: end; }
.dots { display: inline-flex; gap: 3px; }
.dots .icon { inline-size: 1em; block-size: 1em; }
.chev { color: var(--muted); }
[dir="rtl"] .chev, [dir="rtl"] .back .icon { transform: scaleX(-1); }

/* Badges: icon shape + word, never colour alone */
.badge { display: inline-flex; align-items: center; gap: 0.4em; padding: 0.25em 0.75em 0.25em 0.5em; padding-inline: 0.5em 0.75em;
  border-radius: 999px; border: 1px solid; font-weight: 700; font-size: 0.92rem; white-space: nowrap; }
.badge-small { font-size: 0.85rem; }
.badge-good, .icon-good, .reason-good .icon { color: var(--good); }
.badge-caution, .icon-caution, .reason-caution .icon { color: var(--caution); }
.badge-no, .icon-no, .reason-no .icon { color: var(--no); }
.badge-unknown, .icon-unknown, .reason-unknown .icon { color: var(--unknown); }
.badge-good { background: var(--good-bg); border-color: var(--good-border); }
.badge-caution { background: var(--caution-bg); border-color: var(--caution-border); }
.badge-no { background: var(--no-bg); border-color: var(--no-border); }
.badge-unknown { background: var(--unknown-bg); border-color: var(--unknown-border); }
.badge .icon-good path:not(.icon-frame), .badge .icon-caution path:not(.icon-frame),
.badge .icon-no path:not(.icon-frame), .badge .icon-unknown path:not(.icon-frame) { stroke: var(--bg); }

/* Messages */
.message { padding: 16px; border-radius: 12px; background: var(--surface-2); }
.message h3 { font-size: 1.15rem; }
.message.error { background: var(--no-bg); border: 1px solid var(--no-border); }

.back { display: inline-flex; align-items: center; gap: 0.3em; min-block-size: 44px; font-weight: 600; text-decoration: none; margin-block-end: 6px; }
.back:hover { text-decoration: underline; }
.view-title { font-size: 1.35rem; }

/* Version picker */
.picker > p { color: var(--muted); }
.version-name { flex: 1; font-weight: 700; font-size: 1.12rem; min-inline-size: 0; }
.where { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); margin-block: 12px; }
.where summary, .missing summary { cursor: pointer; font-weight: 700; color: var(--accent); padding: 12px 14px; min-block-size: 44px; }
.where-body { padding: 0 14px 14px; display: grid; gap: 14px; grid-template-columns: minmax(0, 300px) 1fr; align-items: start; }
.where-list { margin: 0; padding-inline-start: 1.25em; }
.where-list li { margin-block-end: 0.4em; }
.label-sketch { inline-size: 100%; block-size: auto; }
.sk-case { fill: var(--surface); stroke: var(--border); stroke-width: 2; }
.sk-label { fill: #fbfbf7; stroke: #a9b0ab; stroke-width: 1.5; }
.sk-text { font: 13px var(--font); fill: #2a2f2c; }
.sk-bold { font-weight: 700; }
.sk-small { font-size: 10.5px; }
.sk-hl { fill: #ffe27a; stroke: #c48a00; stroke-width: 2; }
.sk-bar { fill: #2a2f2c; }
.sk-box { fill: none; stroke: #2a2f2c; stroke-width: 1.5; stroke-dasharray: 3 3; }
.sk-arrow { stroke: #c48a00; stroke-width: 2.5; }
.warn { display: flex; gap: 0.6em; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  background: var(--caution-bg); border: 1px solid var(--caution-border); color: var(--text); font-weight: 600; }
.warn .icon { color: var(--caution); margin-block-start: 0.1em; }
.missing { margin-block-start: 10px; }
.missing summary { padding-inline: 0; font-weight: 600; }
.missing p { color: var(--muted); }

/* Result card */
.result { display: grid; gap: 18px; }
.result > .back { justify-self: start; margin: 0; }
.result-top { display: grid; gap: 18px; }
.result-top.has-photo { grid-template-columns: 1fr minmax(0, 220px); align-items: start; }
.device-title { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 1.9rem); margin-block-end: 0.15em; }
.device-brand { color: var(--muted); font-weight: 600; }
.device-version { margin-block-end: 0.8em; }
.verdict { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--radius); border: 2px solid; }
.verdict-icon { inline-size: 3rem; block-size: 3rem; }
.verdict-word { font-size: 1.5rem; font-weight: 800; margin: 0; line-height: 1.2; }
.verdict-text { margin: 0.15em 0 0; }
.verdict-good { background: var(--good-bg); border-color: var(--good-border); }
.verdict-good .verdict-word { color: var(--good); }
.verdict-caution { background: var(--caution-bg); border-color: var(--caution-border); }
.verdict-caution .verdict-word { color: var(--caution); }
.verdict-no { background: var(--no-bg); border-color: var(--no-border); }
.verdict-no .verdict-word { color: var(--no); }
.verdict-unknown { background: var(--unknown-bg); border-color: var(--unknown-border); }
.verdict-unknown .verdict-word { color: var(--unknown); }
.verdict .icon path:not(.icon-frame) { stroke: var(--bg); stroke-width: 2.6; }

.photo { margin: 0; border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: 8px; display: grid; gap: 6px; }
.photo img { display: block; inline-size: 100%; block-size: auto; max-block-size: 200px; object-fit: contain; }
.photo.is-loading img { min-block-size: 120px; background: linear-gradient(90deg, #eee, #f6f6f6, #eee); }
.photo figcaption { font-size: 0.8rem; text-align: center; }
.photo figcaption a { color: #3d4a45; }

.result-main { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.result-main > .block:first-child { grid-column: 1 / -1; }
.block { border-block-start: 1px solid var(--border); padding-block-start: 14px; min-inline-size: 0; }
.block h4 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.reason { display: flex; gap: 0.6em; align-items: flex-start; }
.reason .icon { margin-block-start: 0.15em; }
.install-ease { display: flex; align-items: center; gap: 0.5em; font-size: 1.1rem; margin-block-end: 0.4em; }
.specs { margin: 0; display: grid; gap: 6px; }
.specs div { display: grid; grid-template-columns: minmax(7.5em, 40%) 1fr; gap: 10px; padding-block: 4px; border-block-end: 1px dashed var(--border); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; }
.tech { margin-block-start: 10px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cta { background: var(--accent-soft); border-radius: var(--radius); padding: 18px; border: 1px solid var(--border); }
.cta h4 { font-size: 1.2rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 8px; }
.contact-link { display: inline-flex; align-items: center; gap: 0.45em; min-block-size: 44px; font-weight: 600; }
.recs { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 10px; }
.rec { display: grid; gap: 4px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.rec-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 1.05rem; }
.rec-note { color: var(--muted); font-size: 0.95rem; }
.rec-links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-weight: 600; }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; }
.share-msg { color: var(--good); font-weight: 600; }
.share-input { font: inherit; inline-size: min(100%, 28rem); padding: 0.3em 0.5em; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); }

/* Not listed */
.notlisted-wrap { margin-block-start: 14px; border-block-start: 1px solid var(--border); padding-block-start: 6px; }
.notlisted { padding-block: 8px 4px; scroll-margin-block-start: 12px; }
.notlisted h3 { font-size: 1.2rem; }
.tips { margin: 0 0 0.8em; padding-inline-start: 1.25em; }
.tips li { margin-block-end: 0.4em; }
.notlisted-cta { background: var(--surface-2); border-radius: 12px; padding: 14px; }

.risk-notice { display: flex; gap: 0.6em; align-items: flex-start; margin-block: 14px 0; color: var(--muted); font-size: 0.95rem; }
.risk-notice .icon { color: var(--caution); margin-block-start: 0.15em; }

/* Kit section */
.kit { padding-block: 40px 32px; }
.kit:focus { outline: none; }
.kit h2 { font-size: 1.6rem; }
.kit-lead { color: var(--muted); }
.features { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; border-block-start: 4px solid var(--accent); }
.feature h3 { font-size: 1.1rem; }
.feature p { color: var(--muted); margin: 0; }
.recommend { margin-block-start: 18px; }
.recommend h3 { font-size: 1.15rem; }

/* Footer */
.site-footer { border-block-start: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 0.9rem; padding-block: 22px 32px; }
.site-footer p { margin-block-end: 0.5em; }
.noscript { padding: 16px; text-align: center; }

/* Phone */
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .card { padding: 16px; border-radius: 12px; }
  .hero { padding-block: 24px 14px; }
  .result-top.has-photo { grid-template-columns: 1fr; }
  .result-top.has-photo .photo { order: -1; justify-self: center; inline-size: min(100%, 240px); }
  .result-main { grid-template-columns: 1fr; }
  .where-body { grid-template-columns: 1fr; }
  .verdict { padding: 14px; }
  .verdict-icon { inline-size: 2.5rem; block-size: 2.5rem; }
  .verdict-word { font-size: 1.3rem; }
  .actions .btn, .cta-row .btn { inline-size: 100%; }
  .result-count span:last-child { font-size: 0.8rem; }
  .header-row .btn-small { padding-inline: 0.75em; }
}

@media (prefers-reduced-motion: no-preference) {
  .result-row, .version-row, .btn, .chip { transition: background-color 0.15s, border-color 0.15s; }
}

@media print {
  .site-header, .search-form, .notlisted-wrap, .kit, .actions, .share-row { display: none; }
}

/* ---- QuotaSpot site shell (header nav, theme button, footer links) ---- */
.logo-text { font-size: 1.15rem; letter-spacing: -0.02em; font-weight: 800; }
.logo-sub { color: var(--muted); font-weight: 600; font-size: 0.95rem; letter-spacing: 0; }
.header-nav { display: flex; align-items: center; gap: 8px; }
.header-link { color: var(--muted); font-weight: 600; text-decoration: none; padding: 0.4em 0.6em; }
.header-link:hover { color: var(--text); }
.theme-btn { inline-size: 40px; block-size: 40px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; padding: 0; }
.theme-btn:hover { border-color: var(--accent); }
.theme-btn .icon { inline-size: 19px; block-size: 19px; }
.theme-icon-dark { display: none; }
[aria-pressed="true"] .theme-icon-dark { display: block; }
[aria-pressed="true"] .theme-icon-light { display: none; }
.btn-primary { background: #f59e0b; color: #1c1206; }
.btn-primary:hover { background: #d97706; color: #1c1206; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-block-end: 14px; font-weight: 600; }
.footer-links a { color: var(--text); text-decoration: none; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 560px) { .header-link, .logo-sub { display: none; } }
