/* Neon Tunnel site. Tokens come from apps/client/lib/theme/app_colors.dart
   (a test keeps them equal); components come from the agreed mockups.

   Themes:   html[data-theme=light|dark|warm]
   Accents:  html[data-accent=mint|cyan|magenta|amber|lime|violet|red|gold]
   Light-theme accents are the darker variants: html[data-theme=light][data-accent=...]
   PROXY is the accent itself (--a); DIRECT and BLOCK are --direct and --block. */

/* ---------------------------------------------------------------- fonts */

@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/InterTight-400.woff2) format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/InterTight-600.woff2) format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/InterTight-700.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/JetBrainsMono-400.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/JetBrainsMono-600.woff2) format("woff2"); }

/* ---------------------------------------------------------------- tokens */

/* Defaults: dark theme, mint accent. They apply before any attribute is set. */
:root {
  --bg: #07090F; --s1: #0E1118; --s2: #131722; --s3: #1A1F2C;
  --fg: #EEF3FF; --fg2: #B8C2D4; --fg3: #6E7891;
  --line: rgba(120,150,200,0.1); --line2: rgba(120,150,200,0.2);
  --a: #2BF3A3; --a2: #1AD6FF; --soft: rgba(43,243,163,0.14); --glow: rgba(43,243,163,0.55); --afg: #04140D; --ah: #5AF9BD;
  --direct: #F5A623; --block: #FF3D6E;
  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 26px);
  --maxw: 1120px;
  color-scheme: dark;
}

/* Surfaces and text */
html[data-theme=dark] {
  --bg: #07090F; --s1: #0E1118; --s2: #131722; --s3: #1A1F2C;
  --fg: #EEF3FF; --fg2: #B8C2D4; --fg3: #6E7891;
  --line: rgba(120,150,200,0.1); --line2: rgba(120,150,200,0.2);
  color-scheme: dark;
}
html[data-theme=light] {
  --bg: #F6F5F2; --s1: #FFFFFF; --s2: #FBFAF7; --s3: #F0EEE9;
  --fg: #16140E; --fg2: #4A463C; --fg3: #7A7468;
  --line: rgba(20,16,10,0.09); --line2: rgba(20,16,10,0.18);
  /* neon amber and pink do not read on white: the mockup's darker pair */
  --direct: #B86E00; --block: #D42A55;
  color-scheme: light;
}
html[data-theme=warm] {
  --bg: #15140F; --s1: #1D1C17; --s2: #211F1A; --s3: #28261F;
  --fg: #F4F1E8; --fg2: #C9C4B6; --fg3: #8E8878;
  --line: rgba(255,255,255,0.1); --line2: rgba(255,255,255,0.2);
  color-scheme: dark;
}

/* Accents on dark and warm */
html[data-accent=mint] {
  --a: #2BF3A3; --a2: #1AD6FF; --soft: rgba(43,243,163,0.14); --glow: rgba(43,243,163,0.55); --afg: #04140D; --ah: #5AF9BD;
}
html[data-accent=cyan] {
  --a: #1AD6FF; --a2: #7C4DFF; --soft: rgba(26,214,255,0.14); --glow: rgba(26,214,255,0.55); --afg: #001620; --ah: #65E7FF;
}
html[data-accent=magenta] {
  --a: #FF3EB3; --a2: #7C4DFF; --soft: rgba(255,62,179,0.14); --glow: rgba(255,62,179,0.55); --afg: #1A0212; --ah: #FF6EC7;
}
html[data-accent=amber] {
  --a: #FFB648; --a2: #FF5E3A; --soft: rgba(255,182,72,0.14); --glow: rgba(255,182,72,0.55); --afg: #1A0E00; --ah: #FFC878;
}
html[data-accent=lime] {
  --a: #C9FF3D; --a2: #2BF3A3; --soft: rgba(201,255,61,0.14); --glow: rgba(201,255,61,0.55); --afg: #0E1500; --ah: #D8FF6A;
}
html[data-accent=violet] {
  --a: #A76BFF; --a2: #FF5CF3; --soft: rgba(167,107,255,0.16); --glow: rgba(167,107,255,0.6); --afg: #0D0420; --ah: #BF90FF;
}
html[data-accent=red] {
  --a: #FF5577; --a2: #FF3EB3; --soft: rgba(255,85,119,0.14); --glow: rgba(255,85,119,0.55); --afg: #1A0008; --ah: #FF7B97;
}
html[data-accent=gold] {
  --a: #E7C87A; --a2: #FFB648; --soft: rgba(231,200,122,0.14); --glow: rgba(231,200,122,0.55); --afg: #1A1305; --ah: #EFD79A;
}

/* Accents on light */
html[data-theme=light][data-accent=mint] {
  --a: #1F9D72; --a2: #2563C1; --soft: #D3EFE2; --glow: rgba(31,157,114,0.3); --afg: #FFFFFF; --ah: #178861;
}
html[data-theme=light][data-accent=cyan] {
  --a: #1F97B3; --a2: #2563C1; --soft: #D4EBF1; --glow: rgba(31,151,179,0.3); --afg: #FFFFFF; --ah: #1B839C;
}
html[data-theme=light][data-accent=magenta] {
  --a: #FA32AE; --a2: #2563C1; --soft: #FED8F0; --glow: rgba(250,50,174,0.3); --afg: #FFFFFF; --ah: #DA2C97;
}
html[data-theme=light][data-accent=amber] {
  --a: #BA7F1B; --a2: #2563C1; --soft: #F2E7D4; --glow: rgba(186,127,27,0.3); --afg: #FFFFFF; --ah: #A26E17;
}
html[data-theme=light][data-accent=lime] {
  --a: #75961B; --a2: #2563C1; --soft: #E5EBD4; --glow: rgba(117,150,27,0.3); --afg: #FFFFFF; --ah: #668317;
}
html[data-theme=light][data-accent=violet] {
  --a: #A56DF9; --a2: #2563C1; --soft: #EEE3FE; --glow: rgba(165,109,249,0.3); --afg: #FFFFFF; --ah: #905FD9;
}
html[data-theme=light][data-accent=red] {
  --a: #FA456D; --a2: #2563C1; --soft: #FEDCE3; --glow: rgba(250,69,109,0.3); --afg: #FFFFFF; --ah: #DA3C5F;
}
html[data-theme=light][data-accent=gold] {
  --a: #A9861B; --a2: #2563C1; --soft: #EFE8D4; --glow: rgba(169,134,27,0.3); --afg: #FFFFFF; --ah: #937517;
}

/* ---------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  transition: background .3s, color .3s;
}
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--a); outline-offset: 2px; }
.mono { font-family: var(--mono); }
.up { text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 10; padding: 8px 14px; background: var(--a); color: var(--afg); border-radius: 0 0 8px 0; font-weight: 600; }
.skip:focus { left: 0; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Full-bleed bands keep their content inside --maxw and never closer than --gutter to the edge. */
.band, .site-header, .site-footer, .feat {
  padding-inline: max(var(--gutter), calc((100% - var(--maxw)) / 2));
}

/* ---------------------------------------------------------------- header, footer */

.site-header {
  display: flex; align-items: center; gap: 12px 20px; padding-block: 14px;
  border-bottom: 1px solid var(--line); font-size: 14px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.links { display: flex; align-items: center; gap: 20px; margin-inline-start: auto; color: var(--fg2); }
.links a:hover { color: var(--fg); }
.links a[aria-current=page] { color: var(--a); }
.nav-toggle, .nav-burger { display: none; }

/* The brand mark: three receding rings and a spark. */
.mark { width: 26px; height: 26px; flex: none; overflow: visible; }
.mark .r { fill: none; stroke: var(--a); transform-box: fill-box; transform-origin: center; animation: ring 3.6s ease-in-out infinite; }
.mark .r1 { stroke-opacity: .35; stroke-width: 1.2; }
.mark .r2 { stroke-opacity: .55; stroke-width: 1.1; animation-delay: .3s; }
.mark .r3 { stroke-opacity: .85; stroke-width: 1; animation-delay: .6s; }
.mark .halo { fill: var(--a); fill-opacity: .4; }
.mark .dot { fill: var(--a); }
@keyframes ring { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.07); opacity: .55; } }

/* RU | EN: two real links, the current language is a plain span. */
.lang {
  display: inline-flex; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden;
  font-family: var(--mono); font-size: 11.5px;
}
.lang a, .lang span { padding: 4px 9px; color: var(--fg3); }
.lang a:hover { color: var(--fg); }
.lang .on { background: var(--soft); color: var(--a); }

.site-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px;
  padding-block: 34px; border-top: 1px solid var(--line); color: var(--fg2); font-size: 14px;
}
.site-footer p { margin: 0; flex: 1 1 320px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot-links a:hover { color: var(--fg); }

/* ---------------------------------------------------------------- type and small parts */

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 17px; border-radius: 10px;
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
}
.btn.pri { background: var(--a); color: var(--afg); border: 1px solid var(--a); box-shadow: 0 0 26px var(--glow); }
.btn.pri:hover { background: var(--ah); border-color: var(--ah); }
.btn.sec { border: 1px solid var(--line2); color: var(--fg); background: none; }
.btn.sec:hover { border-color: var(--a); }

.eyebrow { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--a); margin: 0 0 12px; }
.h2 { font-size: clamp(25px, 4.6vw, 30px); line-height: 1.1; font-weight: 700; letter-spacing: -.025em; margin: 0 0 12px; }
.p { color: var(--fg2); font-size: 15px; line-height: 1.55; margin: 0 0 16px; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.facts li { font-size: 13.5px; color: var(--fg2); padding-left: 18px; position: relative; }
.facts li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--a); box-shadow: 0 0 8px var(--glow); }
.footnote { margin: 12px 0 0; font-size: 12px; color: var(--fg3); }
.card { background: var(--s1); border: 1px solid var(--line); border-radius: 12px; }
.lbl { font-family: var(--mono); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; color: var(--fg3); font-weight: 600; }
.chip {
  display: inline-block; font-family: var(--mono); font-size: 11px; padding: 4px 8px; border-radius: 6px;
  border: 1px solid var(--line2); color: var(--fg2); margin: 0 6px 6px 0;
}
.chip.a { border-color: color-mix(in srgb, var(--a) 45%, transparent); color: var(--a); background: var(--soft); }

/* ---------------------------------------------------------------- feature blocks */

/* A block: text on one side, a framed picture on the other; .rev swaps them. */
.feat {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 34px; align-items: center;
  padding-block: 54px; border-top: 1px solid var(--line);
}
/* The picture is the wider column on either side. */
.feat.rev { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.feat.rev .frame { order: -1; }
.feat .txt { min-width: 0; }

/* The uniform illustration frame: gradient surface, 1 px line, three dots and a mono caption. */
.frame {
  min-width: 0; max-width: 100%;
  background: linear-gradient(180deg, var(--s1), color-mix(in srgb, var(--s1) 55%, var(--bg)));
  border: 1px solid var(--line2); border-radius: 16px; padding: 0 16px 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25), 0 0 0 1px color-mix(in srgb, var(--a) 6%, transparent);
}
.fhead { display: flex; align-items: center; gap: 6px; margin: 0 -16px 16px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.fhead i { width: 8px; height: 8px; border-radius: 50%; background: var(--s3); display: block; }
.fhead span { margin-left: 8px; font-family: var(--mono); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; color: var(--fg3); font-weight: 600; }
.frame .card, .frame .pt, .frame .ct, .frame .tt, .frame .ac { background: var(--s2); }
.frame .card .card { background: var(--s3); }
.frame [style*="background:var(--s2)"] { background: var(--s3) !important; }

/* 01 protocols */
.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pg h3 { margin: 0 0 8px; font-size: 10.5px; letter-spacing: .09em; color: var(--fg3); font-family: var(--mono); font-weight: 600; }
.pt { background: var(--s1); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.pt b { font-size: 14.5px; display: block; }
.pt span { font-family: var(--mono); font-size: 10.5px; color: var(--fg3); }
.pt.hot { border-color: color-mix(in srgb, var(--a) 55%, transparent); box-shadow: 0 0 18px color-mix(in srgb, var(--a) 18%, transparent); }
.pt.hot b { color: var(--a); }
.engine {
  margin-top: 6px; padding: 12px 14px; border-radius: 10px; border: 1px dashed color-mix(in srgb, var(--a) 50%, transparent);
  display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; gap: 8px; flex-wrap: wrap;
}

/* 03 compatibility */
.cgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ct { background: var(--s1); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start; }
.ct .ok {
  flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--soft); border: 1px solid var(--a); color: var(--a);
  font-size: 11px; display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.ct b { font-size: 14px; display: block; }
.ct span { font-family: var(--mono); font-size: 10.5px; color: var(--fg3); }

/* 08 activity */
.arow { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 14px; border-top: 1px solid var(--line); animation: fadein .5s both; }
.cat { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .05em; }
.cat.px { color: var(--a); text-shadow: 0 0 10px var(--glow); }
.cat.dr { color: var(--direct); }
.cat.bl { color: var(--block); }
.host { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.rule { font-family: var(--mono); font-size: 10.5px; color: var(--fg3); margin-top: 2px; overflow-wrap: anywhere; }
.bytes { font-family: var(--mono); font-size: 11px; color: var(--fg2); text-align: right; }
.bytes small { display: block; color: var(--fg3); font-size: 10px; }
@keyframes fadein { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* 04 routing */
.rrow { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line); }
.kind { font-family: var(--mono); font-size: 9.5px; padding: 3px 6px; border-radius: 5px; background: var(--s3); color: var(--fg2); text-align: center; }
.kind.gs { color: var(--a); }
.kind.gi { color: var(--a2); }
.act { font-size: 11.5px; padding: 4px 9px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.act.bl { color: var(--block); background: color-mix(in srgb, var(--block) 14%, transparent); border: 1px solid color-mix(in srgb, var(--block) 35%, transparent); }
.act.dr { color: var(--direct); background: color-mix(in srgb, var(--direct) 14%, transparent); border: 1px solid color-mix(in srgb, var(--direct) 35%, transparent); }
.act.px { color: var(--a); background: var(--soft); border: 1px solid color-mix(in srgb, var(--a) 35%, transparent); }

/* 05, 06 diagrams: shapes and text are classes, so the theme and the accent recolour them */
.diagram { display: block; width: 100%; max-width: 460px; height: auto; margin: 0 auto 10px; }
.ks-line { fill: none; stroke-width: 2; }
.ks-line.px { stroke: var(--a); }
.ks-line.bl { stroke: var(--block); stroke-dasharray: 5 5; }
.ks-line.lan { stroke: var(--fg3); }
.ks-line.dev { stroke: var(--a); stroke-opacity: .7; stroke-dasharray: 4 4; }
.d-box { fill: var(--s2); stroke: var(--line2); }
.d-dev { fill: var(--s1); stroke: var(--line2); }
.d-hub { fill: var(--s2); stroke: var(--a); }
.d-pill { fill: var(--soft); stroke: var(--a); }
.d-pill.mute { fill: var(--s2); stroke: var(--line2); }
.d-x { fill: color-mix(in srgb, var(--block) 18%, transparent); stroke: var(--block); }
.hub-in { stop-color: var(--a); stop-opacity: .25; }
.hub-out { stop-color: var(--a); stop-opacity: 0; }
.d-t { font-family: var(--font); font-size: 12px; fill: var(--fg); }
.d-t.a { fill: var(--a); font-weight: 600; }
.d-t.b { font-weight: 600; }
.d-t.dim { fill: var(--fg2); }
.d-t.bl { fill: var(--block); }
.d-t.x { font-size: 14px; font-weight: 700; }
.d-t.sm { font-size: 11.5px; }
.d-t.mono { font-family: var(--mono); font-size: 10.5px; fill: var(--a); }

/* the app's settings cards (kill switch, LAN proxy, the console's proxy page) */
.setc { padding: 12px 14px; }
.setc.gap { margin-bottom: 10px; }
.setc-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.setc-row.wrap { flex-wrap: wrap; }
/* the text takes what the pill leaves; only when it gets narrower than this does the pill drop below */
.setc-row.wrap > div { flex: 1 1 200px; min-width: 0; }
.setc-row.sep { flex-wrap: wrap; gap: 8px 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.setc-title { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13.5px; font-weight: 600; }
.setc-sub { font-size: 12.5px; }
.setc-note { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 11px; line-height: 1.4; color: var(--fg3); }
.ico { flex: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.setc-title .ico { color: var(--a); }
.toggle { position: relative; flex: none; width: 36px; height: 20px; border-radius: 999px; background: var(--a); }
.toggle i { position: absolute; right: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--afg); }
.dd { display: inline-block; margin-left: 6px; padding: 3px 8px; border: 1px solid var(--line2); border-radius: 6px; font-family: var(--mono); font-size: 11px; white-space: nowrap; }
.dd.on { flex: none; margin: 0; border-color: var(--a); color: var(--a); background: var(--soft); }
.setc-addr { margin-top: 8px; font-family: var(--mono); font-size: 11.5px; color: var(--fg2); overflow-wrap: anywhere; }
.ps .lbl { margin-bottom: 6px; }
.ps-vals { display: flex; flex-wrap: wrap; gap: 4px 18px; font-family: var(--mono); font-size: 12px; }
.ps-vals em { font-style: normal; color: var(--fg3); }

/* 07 appearance: the previews inside the tiles do not follow the current theme */
.themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.tt, .ac { font: inherit; color: inherit; text-align: left; cursor: pointer; }
.tt { border: 1px solid var(--line2); border-radius: 10px; padding: 8px; background: var(--s1); }
.tt.on { border: 1.4px solid var(--a); box-shadow: 0 0 16px var(--glow); }
.tt .win { display: block; height: 52px; border-radius: 6px; padding: 7px; }
.tt .win i { display: block; height: 5px; border-radius: 3px; margin-top: 6px; }
.tt .win i:first-child { width: 60%; background: var(--a); }
.tt .win i:nth-child(2) { width: 85%; }
.tt .win i:nth-child(3) { width: 65%; }
.tt[data-theme-pick=light] .win { background: #FAF8F3; }
.tt[data-theme-pick=light] .win i:nth-child(n+2) { background: #D9D5CB; }
.tt[data-theme-pick=dark] .win { background: #0C1218; }
.tt[data-theme-pick=dark] .win i:nth-child(n+2) { background: #2A3140; }
.tt[data-theme-pick=dark] .win i:first-child { box-shadow: 0 0 8px var(--glow); }
.tt[data-theme-pick=warm] .win { background: #15140F; }
.tt[data-theme-pick=warm] .win i:nth-child(n+2) { background: #34312A; }
.tt b { display: block; font-size: 12.5px; margin-top: 7px; }
.sys { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fg2); margin-bottom: 14px; cursor: pointer; }
.sys input { width: 15px; height: 15px; margin: 0; accent-color: var(--a); cursor: pointer; }
/* as many columns as fit: four in a wide picture, two in a narrow one, so a long name ("Ультрафиолет") never spills out of its tile */
.accents { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 8px; }
.ac { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line2); border-radius: 9px; font-size: 12px; background: var(--s1); line-height: 1.2; }
.ac em { font-style: normal; min-width: 0; overflow-wrap: anywhere; }
.ac .sw { width: 18px; height: 18px; border-radius: 5px; flex: none; }
.ac.on { border-color: var(--a); background: var(--soft); }
.ac[data-accent-pick=mint] .sw { background: #2BF3A3; box-shadow: 0 0 10px rgba(43,243,163,.5); }
.ac[data-accent-pick=cyan] .sw { background: #1AD6FF; box-shadow: 0 0 10px rgba(26,214,255,.5); }
.ac[data-accent-pick=magenta] .sw { background: #FF3EB3; box-shadow: 0 0 10px rgba(255,62,179,.5); }
.ac[data-accent-pick=amber] .sw { background: #FFB648; box-shadow: 0 0 10px rgba(255,182,72,.5); }
.ac[data-accent-pick=lime] .sw { background: #C9FF3D; box-shadow: 0 0 10px rgba(201,255,61,.5); }
.ac[data-accent-pick=violet] .sw { background: #A76BFF; box-shadow: 0 0 10px rgba(167,107,255,.5); }
.ac[data-accent-pick=red] .sw { background: #FF5577; box-shadow: 0 0 10px rgba(255,85,119,.5); }
.ac[data-accent-pick=gold] .sw { background: #E7C87A; box-shadow: 0 0 10px rgba(231,200,122,.5); }

/* 08 activity: the card around the feed, and the throughput chart under it */
.feed-card { overflow: hidden; }
.feed-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 12px; padding: 11px 14px; }
.feed-title { font-size: 11.5px; color: var(--fg3); }
.feed-title b { margin-right: 4px; font-size: 13.5px; color: var(--fg); }
.feed-count { font-family: var(--mono); font-size: 11px; color: var(--fg3); }
.arow .rule { margin-top: 2px; }
.feed .arow:nth-child(1) { animation-delay: .1s; }
.feed .arow:nth-child(2) { animation-delay: .5s; }
.feed .arow:nth-child(3) { animation-delay: .9s; }
.feed .arow:nth-child(4) { animation-delay: 1.3s; }
.feed .arow:nth-child(5) { animation-delay: 1.7s; }
.thr { padding: 10px 14px; border-top: 1px solid var(--line); }
.thr-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.thr-rate { font-family: var(--mono); font-size: 10.5px; color: var(--fg3); }
.thr-rate .rx { color: var(--a2); }
.thr-rate .tx { color: var(--a); }
.spark { display: block; width: 100%; height: 44px; margin-top: 4px; }
.spark path { fill: none; vector-effect: non-scaling-stroke; }
.spark .rx { stroke: var(--a2); stroke-width: 1.6; }
.spark .tx { stroke: var(--a); stroke-width: 1.4; }

/* 09 feedback: the form, the honeypot (for bots), and the status line (filled by script) */
.fb { display: grid; gap: 12px; padding: 16px; }
.f-type { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.seg { position: relative; display: inline-block; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg .chip { margin: 0; padding: 6px 11px; font-size: 11.5px; }
.seg input:checked + .chip { border-color: color-mix(in srgb, var(--a) 45%, transparent); color: var(--a); background: var(--soft); }
.seg input:focus-visible + .chip { outline: 2px solid var(--a); outline-offset: 2px; }
.f-field { display: block; min-width: 0; }
.f-field .lbl { display: block; margin-bottom: 5px; }
.f-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.f-in { display: block; width: 100%; min-width: 0; padding: 9px 11px; border: 1px solid var(--line2); border-radius: 8px; background: var(--s3); color: var(--fg); font: inherit; font-size: 13px; line-height: 1.4; }
.f-in::placeholder { color: var(--fg3); opacity: 1; }
.f-in:focus-visible { border-color: var(--a); }
.f-in[aria-invalid=true] { border-color: var(--block); }
textarea.f-in { min-height: 110px; resize: vertical; }
.f-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; }
.f-hint { flex: 1 1 200px; font-size: 11.5px; color: var(--fg3); }
.fb .btn { padding: 9px 15px; font-size: 13px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.4em; margin: 8px 0 0; font-size: 12.5px; color: var(--fg2); }
.form-status[data-state=sent] { color: var(--a); }
.form-status[data-state=error] { color: var(--block); }

/* ---------------------------------------------------------------- changelog and text pages */

.page-head { padding-block: 40px 10px; }
.page-head h1 { font-size: clamp(28px, 6vw, 36px); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; margin: 0; }
.page-head .p { max-width: 620px; margin-top: 12px; }
.page-body { padding-block: 0 30px; }
.prose { max-width: 68ch; }
.prose h2 { font-size: 20px; letter-spacing: -.015em; margin: 28px 0 8px; }
.prose p { color: var(--fg2); line-height: 1.6; margin: 0 0 12px; }
.prose a { color: var(--a); }
.prose a:hover { text-decoration: underline; }

/* the 404 and the feedback result pages: a short message and one way on */
.result { padding-block: 64px 90px; }
.result .p { font-size: 16px; }
.result-actions { margin: 22px 0 0; }

.rel { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 26px; padding-block: 30px; border-top: 1px solid var(--line); }
.rel:first-of-type { border-top: none; }
.rel-head, .rel-body { min-width: 0; }
.ver { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin: 0; }
.date { font-family: var(--mono); font-size: 11.5px; color: var(--fg3); margin: 4px 0 0; }
.badge { display: inline-block; margin-top: 10px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; padding: 3px 8px; border-radius: 6px; }
.badge.cur { color: var(--a); background: var(--soft); border: 1px solid color-mix(in srgb, var(--a) 45%, transparent); }
.badge.exp { color: var(--fg3); border: 1px solid var(--line2); }
.grp { font-family: var(--mono); font-size: 10.5px; letter-spacing: .09em; font-weight: 600; margin: 0 0 8px; }
.grp.new { color: var(--a); }
.grp.fix { color: var(--a2); }
.notes { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 7px; }
.notes li { font-size: 14px; color: var(--fg2); padding-left: 22px; position: relative; line-height: 1.45; }
.notes li::before { content: "—"; position: absolute; left: 0; color: var(--fg3); }
.pending { font-family: var(--mono); font-size: 10.5px; color: var(--fg3); margin: 0 0 12px; }
.dl { display: flex; gap: 14px 18px; flex-wrap: wrap; align-items: flex-start; }
.dlb { display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line2); background: var(--s1); min-width: min(200px, 100%); }
.dlb b { font-size: 13.5px; }
.dlb span { font-family: var(--mono); font-size: 10.5px; color: var(--fg3); }
a.dlb:hover { border-color: var(--a); }
.dlb.pri { border-color: color-mix(in srgb, var(--a) 55%, transparent); box-shadow: 0 0 18px color-mix(in srgb, var(--a) 16%, transparent); }
.dlb.pri b { color: var(--a); }
.until { font-family: var(--mono); font-size: 11px; margin-top: 10px; color: var(--fg3); }
.until b { color: var(--direct); font-weight: 600; }
.rel[data-state=expired] .ver, .rel[data-state=expired] .notes li, .dlb[data-state=expired] { opacity: .55; }
/* a release's builds are the same cards as the download block's; the link to the sums sits under them */
.sums { margin: 14px 0 0; }
.sums a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line2); border-radius: 8px; font-family: var(--mono); font-size: 11px; color: var(--fg2); }
.sums a:hover { border-color: var(--a); color: var(--fg); }

/* ---------------------------------------------------------------- main page: hero, blocks 01 to 04, download */

/* Text inside a picture is set by class; the paragraphs there carry no default margin. */
.frame p { margin: 0; }

/* hero: three one-app tiles merge into the Neon Tunnel tile */
.hero { text-align: center; padding-block: 40px 44px; }
.hero-title { font-size: clamp(30px, 7vw, 40px); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; margin: 0; }
.hero-sub { max-width: 540px; margin: 12px auto 24px; }
.hero-pic { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 16px; }
.zoo { display: grid; gap: 8px; }
.zoo-tile { width: min(200px, 100%); padding: 8px 12px; border: 1px dashed var(--line2); border-radius: 9px; font-size: 13px; text-align: left; }
.zoo-tile b { color: var(--fg2); font-weight: 600; }
.hero-lines { width: 70px; height: 120px; flex: none; }
.hero-lines path { stroke: var(--a); stroke-opacity: .5; stroke-width: 1.5; }
.merged {
  width: min(230px, 100%); padding: 16px 18px; border: 1px solid var(--a); border-radius: 13px; text-align: left;
  background: var(--soft); box-shadow: 0 0 30px color-mix(in srgb, var(--a) 22%, transparent);
}
.merged b { display: block; font-weight: 600; font-size: 16px; }
.merged span { display: block; margin-top: 8px; font-family: var(--mono); font-size: 11px; line-height: 1.7; color: var(--fg2); }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

/* 01 protocols */
.engine .flow { font-family: var(--mono); font-size: 12px; color: var(--a); }

/* 02 import: the app's dialog */
.imp { overflow: hidden; }
.imp-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.imp-sub { font-size: 11.5px; line-height: 1.4; color: var(--fg3); }
.imp-head .btn { flex: none; padding: 7px 12px; font-size: 12.5px; box-shadow: none; }
.imp-src { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px 14px; }
.src { min-width: 0; padding: 9px; border: 1px solid var(--line2); border-radius: 9px; }
.src.on { border: 1.4px solid var(--a); box-shadow: 0 0 14px color-mix(in srgb, var(--a) 25%, transparent); }
.src b { font-size: 13px; }
.src span { display: block; margin-top: 3px; font-family: var(--mono); font-size: 9.5px; line-height: 1.4; color: var(--fg3); overflow-wrap: anywhere; }
.imp-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px; padding: 0 14px 14px; }
.imp-url, .imp-prev { min-width: 0; border-radius: 8px; padding: 10px; background: var(--s3); }
.imp-url { font-family: var(--mono); font-size: 10.5px; line-height: 1.5; color: var(--fg2); word-break: break-all; }
.imp-prev .chip { margin-bottom: 8px; }
.imp-stats { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0 8px; }
.imp-n { font-size: 22px; font-weight: 700; line-height: 1.3; color: var(--a); }
.imp-mix { margin-top: 6px; font-family: var(--mono); font-size: 11px; color: var(--fg2); }
.imp-quota { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 5px; }
.qbar { flex: none; width: 60px; height: 5px; border-radius: 3px; background: var(--s1); }
.qbar i { display: block; width: 12%; height: 100%; border-radius: 3px; background: var(--a); box-shadow: 0 0 8px var(--glow); }
.imp-gib { font-family: var(--mono); font-size: 10.5px; color: var(--fg2); }
.chips { margin-top: 12px; }

/* 03 compatibility */
ul.cgrid { list-style: none; margin: 0; padding: 0; }
/* an odd last tile takes the whole row instead of leaving a hole */
ul.cgrid .ct:last-child:nth-child(odd) { grid-column: 1 / -1; }
.lbl.sub { margin: 0 0 8px; }
.lbl.sub.gap { margin-top: 14px; }

/* 04 routing: the preset card, the address check and the rules */
.preset { margin-bottom: 10px; padding: 14px; }
.preset .lbl { color: var(--a); }
.preset .preset-name { margin: 4px 0; font-size: 19px; font-weight: 700; color: var(--a); text-shadow: 0 0 14px var(--glow); }
.preset-cnt { font-family: var(--mono); font-size: 11px; }
.cnt.bl { color: var(--block); }
.cnt.dr { color: var(--direct); }
.cnt.px { color: var(--a); }
.rules { overflow: hidden; }
.check-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.search { display: flex; flex: 1; align-items: center; gap: 7px; min-width: 0; padding: 8px 10px; border: 1px solid var(--line2); border-radius: 8px; background: var(--s3); font-family: var(--mono); font-size: 11.5px; }
.search-ico { flex: none; stroke: var(--fg3); stroke-width: 1.4; stroke-linecap: round; }
.check-bar .btn { flex: none; padding: 7px 11px; font-size: 12px; }
.rules .hit-bar {
  margin: 0 12px 10px; padding: 9px 11px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--direct);
  background: color-mix(in srgb, var(--direct) 13%, transparent); border: 1px solid color-mix(in srgb, var(--direct) 55%, transparent);
}
.pat { font-family: var(--mono); font-size: 11.5px; overflow-wrap: anywhere; }
.rrow.hit { outline: 2px solid var(--direct); outline-offset: -2px; border-radius: 6px; }
.rrow.rest { display: block; font-size: 12px; color: var(--fg3); }

/* the download block */
.dl-sec { text-align: center; padding-block: 44px; border-top: 1px solid var(--line); }
.dl-sec .h2 { font-size: 22px; margin-bottom: 18px; }
.dlcards { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.dlcard { display: flex; flex-direction: column; width: min(300px, 100%); }
.dlcard .dlb { gap: 5px; padding: 14px 18px; text-align: left; }
.dlcard .dlb b { font-size: 16px; }
.dlcard .dlb span { font-size: 11px; }
.dlcard .until { margin: 10px 0 0; }
/* an expired build: the build's name dims, the line saying so stays readable */
.dlcard[data-state=expired] .dlb { opacity: .55; }
.dlcard[data-state=expired] .until { color: var(--fg2); }
.dl-none { max-width: 520px; margin: 0 auto 18px; color: var(--fg2); }
.dl-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.install { max-width: 620px; margin: 30px auto 0; text-align: left; }
.install .lbl { margin: 0 0 10px; }
.prev { margin: 22px 0 0; }
.prev-link { color: var(--a); font-weight: 600; font-size: 14px; }
.prev-link:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .hero { padding-block: 32px 36px; }
  /* the three lines turn to run downwards between the stacked tiles */
  .hero-pic { flex-direction: column; gap: 0; }
  .hero-lines { transform: rotate(90deg); margin-block: -14px; }
}
@media (max-width: 520px) {
  .imp-body { grid-template-columns: minmax(0, 1fr); }
  /* an activity row: the sizes and the age move under the host instead of squeezing it */
  .arow { grid-template-columns: 50px minmax(0, 1fr); }
  .arow .bytes { grid-column: 2; text-align: left; }
  .arow .bytes small { display: inline; margin-left: 8px; }
}

/* ---------------------------------------------------------------- narrow screens */

@media (max-width: 760px) {
  .feat { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-block: 40px; }
  .feat.rev { grid-template-columns: minmax(0, 1fr); }
  .feat.rev .frame { order: 0; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cgrid { grid-template-columns: minmax(0, 1fr); }
  .rel { grid-template-columns: minmax(0, 1fr); gap: 16px; }

  /* The header links fold into a menu opened by a checkbox; the RU | EN switch stays in the bar. */
  .site-header { flex-wrap: wrap; }
  .lang { order: 1; margin-inline-start: auto; }
  .nav-toggle { display: block; position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
  .nav-burger {
    order: 2; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 32px;
    border: 1px solid var(--line2); border-radius: 8px; cursor: pointer;
  }
  .nav-burger span { display: block; width: 16px; height: 2px; background: var(--fg2); box-shadow: 0 -5px 0 var(--fg2), 0 5px 0 var(--fg2); }
  .nav-toggle:checked + .nav-burger { border-color: var(--a); }
  .nav-toggle:focus-visible + .nav-burger { outline: 2px solid var(--a); outline-offset: 2px; }
  .links { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; margin: 0; order: 3; }
  .links a { padding: 11px 0; border-top: 1px solid var(--line); }
  .nav-toggle:checked ~ .links { display: flex; }
}

/* ---------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  .mark .r { animation: none; }
  .arow { animation: none; }
  body { transition: none; }
}
