:root {
  --bg: #16181c;
  --bg-2: #1d2025;
  --bg-3: #252930;
  --line: #2c3037;
  --ink: #e7e9ec;            /* 14.0:1 on --bg */
  --ink-2: #a6acb5;          /*  7.6:1 */
  --ink-3: #8a919b;          /*  5.4:1 */
  --accent: #f08a5d;         /*  7.0:1 */
  --accent-ink: #16181c;
  --good: #6fcf8a;
  --bad: #f2877b;
  --warn: #e3b55b;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 4px;
  --wrap: 1040px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16.5px/1.6 var(--sans); }
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code, kbd, pre { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--bg-3); padding: 0.1em 0.4em; border-radius: var(--radius); }
pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 6.4vw, 3.6rem); letter-spacing: -0.025em; line-height: 1.04; margin: 0 0 20px; max-width: 16ch; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.7rem); margin: 0 0 22px; display: flex; gap: 14px; align-items: baseline; }
h2 .n { font: 0.9rem var(--mono); color: var(--accent); }
h3 { font-size: 1.1rem; margin: 28px 0 10px; }
p { margin: 0 0 1em; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--bg-2); padding: 8px 12px; z-index: 10; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.muted { color: var(--ink-2); }
.small { font-size: 0.88rem; }
.mono { font-family: var(--mono); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.mt { margin-top: 14px; }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }

/* icons (line style) */
.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ic--s { width: 16px; height: 16px; vertical-align: -3px; }

/* header */
.site-head { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line);
  transition: transform 0.2s ease; }
.site-head.is-hidden { transform: translateY(-100%); }
[id] { scroll-margin-top: 80px; }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.12rem; }
.brand img { width: 28px; height: 28px; border-radius: 6px; }
.site-nav { display: flex; gap: 22px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-size: 0.93rem; }
.site-nav a:hover { color: var(--ink); }
@media (max-width: 760px) { .site-nav a:not(.cta) { display: none; } }

/* the single call to action */
.cta {
  display: inline-block; padding: 9px 16px; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink) !important; text-decoration: none !important;
  font-weight: 600; font-size: 0.97rem;
}
.cta:hover { filter: brightness(1.08); }

/* functional buttons */
.btn { font: inherit; font-size: 0.9rem; padding: 7px 13px; border-radius: var(--radius); cursor: pointer;
       background: var(--bg-2); color: var(--ink); border: 1px solid var(--line); }
.btn:hover { border-color: var(--ink-3); }
.btn[disabled] { cursor: progress; opacity: 0.7; }
.btn--strong { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
.btn--strong:hover { background: #ffffff; }

/* hero */
.hero { padding: 64px 0 48px; }
.tag { font: 0.8rem/1 var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 22px; }
.lead { color: var(--ink-2); font-size: 1.15rem; max-width: 60ch; margin: 0 0 28px; }
.status { font: 0.85rem var(--mono); color: var(--ink-2); display: inline-flex; gap: 8px; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); display: inline-block; }
.dot--up { background: var(--good); }
.dot--down { background: var(--bad); }
.shot { margin: 40px 0 0; border: 1px solid var(--line); background: var(--bg-2); padding: 14px; border-radius: var(--radius); }
.shot img { display: block; width: 100%; height: auto; }
figcaption { font-size: 0.85rem; color: var(--ink-3); margin-top: 10px; }

/* sections */
.sec { border-top: 1px solid var(--line); padding: 52px 0; }
.intro { max-width: 64ch; color: var(--ink-2); margin-bottom: 24px; }

/* icon rows: icon | name | text, all on the same left edge */
.rows { margin: 0; padding: 0; list-style: none; }
.rows > li { display: grid; grid-template-columns: 28px 150px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.rows > li:first-child { border-top: 1px solid var(--line); }
.rows .ic { color: var(--accent); margin-top: 2px; }
.rows b { font-weight: 600; }
.rows span { color: var(--ink-2); }
ol.rows { counter-reset: s; }
ol.rows > li { counter-increment: s; }
ol.rows > li::before { content: counter(s, decimal-leading-zero); font: 0.88rem var(--mono); color: var(--accent); padding-top: 3px; }
@media (max-width: 700px) {
  .rows > li { grid-template-columns: 28px minmax(0, 1fr); gap: 4px 14px; }
  .rows > li > span { grid-column: 2; }
}

/* tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--line); }
thead th { font: 0.75rem var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); font-weight: 400; }
td { color: var(--ink-2); }
td:first-child { color: var(--ink); }
td.num { font-family: var(--mono); white-space: nowrap; color: var(--ink); }

.result { display: flex; flex-direction: column; }
.result-empty { color: var(--ink-3); }
.verdict { font-size: 1.35rem; font-weight: 700; margin: 0 0 2px; display: flex; gap: 10px; align-items: center; }
.verdict--bad { color: var(--bad); }
.verdict--good { color: var(--good); }
.meter { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) 3.2em; gap: 10px; align-items: center; margin: 8px 0; font-size: 0.92rem; color: var(--ink-2); }
.meter__track { height: 6px; background: var(--bg-3); border-radius: 3px; overflow: hidden; }
.meter__fill { display: block; height: 100%; width: 0; background: var(--good); }
.meter__fill--mid { background: var(--warn); }
.meter__fill--high { background: var(--bad); }
.meter__v { font-family: var(--mono); text-align: right; color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; padding: 0; list-style: none; }
.tags li { font-size: 0.8rem; padding: 2px 8px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink-2); }
.tags .bad { color: var(--bad); border-color: currentColor; }
.tags .good { color: var(--good); border-color: currentColor; }
.tags .warn { color: var(--warn); border-color: currentColor; }
.tok { font-family: var(--mono); font-size: 0.85rem; padding: 1px 6px; border-radius: var(--radius); display: inline-block; margin: 0 4px 4px 0; color: var(--ink); }
.tok--p { background: color-mix(in srgb, var(--bad) calc(var(--a, 0.25) * 100%), transparent); }
.tok--s { background: color-mix(in srgb, var(--good) calc(var(--a, 0.25) * 100%), transparent); }

/* loading indicator */
.spinner { display: inline-block; width: 0.9em; height: 0.9em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -0.1em; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* prose pages (privacy, terms, 404) */
.prose { max-width: 760px; padding: 48px 0 64px; }
.prose h1 { font-size: clamp(2rem, 5vw, 2.8rem); max-width: none; }
.prose h2 { display: block; font-size: 1.3rem; margin-top: 2em; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose table { margin: 0.6em 0 1.4em; }
.prose ul { padding-left: 1.2em; }

/* footer */
.site-foot { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 0.88rem; color: var(--ink-3); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-foot a { color: var(--ink-2); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* stat strips */
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.strip .cell { padding: 22px 22px 20px; border-left: 1px solid var(--line); }
.strip .cell:first-child { border-left: 0; }
.big { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; min-height: 1.1em; }
.big.off { color: var(--ink-3); }
.lbl { color: var(--ink-2); font-size: 0.9rem; margin-top: 6px; }
.note { color: var(--ink-3); font-size: 0.88rem; margin: 12px 0 0; }
.sub { display: flex; align-items: center; gap: 10px; margin: 40px 0 14px; font-size: 1.15rem; }
@media (max-width: 760px) {
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip .cell:nth-child(3) { border-left: 0; }
  .strip .cell:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* rows next to the popup, attachment strip below */
.pair { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start; }
.frame { margin: 0; border: 1px solid var(--line); background: var(--bg-2); padding: 12px; border-radius: var(--radius); }
.frame img { display: block; width: 100%; height: auto; }
.frame.wide { margin-top: 28px; }
@media (max-width: 860px) { .pair { grid-template-columns: minmax(0, 1fr); } .pair .frame { max-width: 340px; margin: 0 auto; } }

/* features */
.feats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.feats li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.feats .ic { color: var(--accent); margin-top: 2px; }
.feats b { display: block; margin-bottom: 2px; }
.feats span { color: var(--ink-2); }
@media (max-width: 760px) { .feats { grid-template-columns: minmax(0, 1fr); } }

/* try it: two panels of the same height */
.demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
@media (max-width: 860px) { .demo { grid-template-columns: minmax(0, 1fr); } }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); padding: 16px; }
.tabs { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.tab { font: inherit; font-size: 0.9rem; padding: 6px 14px; border: 0; border-radius: 3px; background: transparent; color: var(--ink-2); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--bg-3); color: var(--ink); }
.pane[hidden] { display: none; }
.pane { display: flex; flex-direction: column; height: 330px; }
.pane > textarea, .pane > .drop { flex: 1; min-height: 0; }
textarea, .drop { display: block; width: 100%; }
textarea { font: inherit; font-size: 0.95rem; line-height: 1.5; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; resize: none; }
textarea:focus { outline: none; border-color: var(--ink-3); }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 20px; background: var(--bg); color: var(--ink-2); border: 1px dashed var(--ink-3); border-radius: var(--radius); cursor: pointer; }
.drop .ic { color: var(--accent); width: 28px; height: 28px; }
.drop { min-width: 0; }
.drop strong { color: var(--ink); max-width: 100%; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex-shrink: 0; }
.drop small { color: var(--ink-3); }
.drop-size { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.drop-size[hidden] { display: none; }
.drop--over, .drop:focus-within { border-color: var(--accent); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tools { display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; height: 38px; margin-top: 10px; overflow: hidden; }
.tools .btn { white-space: nowrap; }
.error-msg { color: var(--bad); font-size: 0.9rem; margin: 6px 0 0; min-height: 1.4em; }
.foot { margin-top: 6px; }
.result { min-height: 100%; }

/* install */
.install { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }
.install h3 { margin-top: 0; }
.install pre { margin: 12px 0; }
ol.steps { margin: 0; padding-left: 1.3em; color: var(--ink-2); }
ol.steps li { margin-bottom: 8px; padding-left: 4px; }
ol.steps b { color: var(--ink); }
@media (max-width: 860px) { .install { grid-template-columns: minmax(0, 1fr); } }

/* honeypot: present for bots, invisible and unreachable for people */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* mobile: nothing may be wider than the screen */
pre { max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
main, section, .wrap > * { min-width: 0; }
@media (max-width: 600px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 40px 0 32px; }
  .lead { font-size: 1.05rem; }
  .big { font-size: 1.6rem; }
  .strip .cell { padding: 16px; }
  .pane { height: auto; }
  .pane > textarea, .pane > .drop { height: 220px; flex: none; }
  .tools { flex-wrap: wrap; height: auto; }
  .site-foot .wrap { flex-direction: column; }
}
/* mobile: centred hero and figures, so the page does not lean to the left */
@media (max-width: 600px) {
  .hero .wrap { text-align: center; }
  .hero h1, .hero .lead { margin-left: auto; margin-right: auto; }
  .hero .row { justify-content: center; }
  .tag { line-height: 1.5; }
  .strip .cell { text-align: center; }
  h2 { justify-content: center; }
  .intro { text-align: center; margin-left: auto; margin-right: auto; }
  .site-foot .wrap { align-items: center; text-align: center; }
  .site-foot nav { justify-content: center; }
}

/* language menu (header) and suggestion bar */
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; cursor: pointer; font: 0.85rem var(--mono); color: var(--ink-2);
  padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--radius); }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { color: var(--ink); border-color: var(--ink-3); }
.lang-menu ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; margin: 0; padding: 6px 0;
  list-style: none; min-width: 160px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
.lang-menu li a { display: block; padding: 6px 14px; color: var(--ink-2); text-decoration: none; font-size: 0.93rem; }
.lang-menu li a:hover { color: var(--ink); background: var(--bg-3); }
.lang-menu li a[aria-current="page"] { color: var(--accent); }
.site-nav .lang-menu a { display: block; }
.lang-suggest { margin: 0; padding: 8px 28px; text-align: center; font-size: 0.93rem;
  background: var(--bg-2); border-bottom: 1px solid var(--line); }
.legal-note { font-size: 0.9rem; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); }

/* back to top */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 25; display: none; padding: 8px 14px;
  font: 600 0.9rem var(--sans); color: var(--ink); background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); cursor: pointer; }
.to-top.is-visible { display: inline-block; }
.to-top:hover { border-color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .site-head { transition: none; } }

/* detected language and "wrong verdict?" report under a result */
.fb { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.fb__lang { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; }
.fb-btn, .fb-select { font: inherit; font-size: 0.85rem; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: var(--radius); padding: 2px 10px; cursor: pointer; }
.fb-select { background: var(--bg); padding: 2px 6px; }
.fb-btn:hover { border-color: var(--ink-3); }
.fb-btn:disabled { opacity: 0.5; cursor: default; }
.fb-btn--strong { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.fb-link { font: inherit; font-size: 0.9rem; padding: 0; border: 0; background: none; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.fb-report { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.fb-report__title { font-weight: 600; margin: 0 0 4px; }
.fb-report__text { margin: 8px 0; font-family: var(--mono); font-size: 0.82rem; resize: vertical; }
.fb-report__check { display: flex; gap: 8px; align-items: flex-start; }
.fb-report__actions { display: flex; gap: 8px; margin-top: 10px; }
.fb-report p:empty { display: none; }
.fb-ref { font-family: var(--mono); font-size: 0.85rem; padding: 2px 8px; border: 1px solid var(--line); border-radius: var(--radius); user-select: all; }
