/* ==========================================================================
   CSX — search for game servers.

   Rules this file follows:

   1. Radius tops out at 10px. Cards, the search field and the dropdown all
      use it; controls inside them step down to 8px, chips and labels to 6px.
      Nothing is a capsule.
   2. Type is comfortable, not tiny: 15px body, 20px result titles, 13px
      metadata, 12px labels. Line height 1.6 in prose.
   3. Space is generous and rhythmic — an 4px grid, cards breathing at 20px,
      sections separated by 32-40px.
   4. Colour means something. Greyscale plus one accent; paid tiers and
      Tas-IX get a tinted label, never a full fill.
   5. Motion is short (140-220ms), always on transform/opacity, and always
      disabled under prefers-reduced-motion.
   6. One component per job, everywhere: numbers live in .stat tiles
      (.stat--sm inside panels), graphs are .chart (drawn by se.js from
      data-points, spark or bars, same grid and hover readout), section
      captions are .cap, keyword rows are .related. Pages never invent a
      second version of these.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter/inter-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}

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

:root,
:root[data-theme="light"] {
  color-scheme: light;

  --bg:            #e8eaee;
  --bg-2:          #d9dde3;
  --surface:       #f6f7f9;
  --surface-2:     #eef0f3;
  --surface-3:     #e3e6eb;
  --text:          #2a3140;
  --text-2:        #565d6a;
  --text-3:        #808894;
  --border:        #d5d9e0;
  --border-2:      #bcc3cc;
  --border-3:      #a9b0bb;

  --accent:        #1f6fd1;
  --accent-2:      #185fb8;
  --accent-3:      #4f8fe0;
  --accent-wash:   rgba(31, 111, 209, .10);
  --accent-ring:   rgba(31, 111, 209, .18);
  --on-accent:     #ffffff;
  --visited:       #6d4aa8;

  --ok:            #12915a;
  --ok-wash:       rgba(18, 145, 90, .10);
  --warn:          #9a6412;
  --bad:           #c0393f;

  --tier-supervip: #a76a12;
  --tier-top5:     #c0393f;
  --tier-vip:      #2563eb;
  --tasix:         #0d7d72;
  --tier-supervip-wash: rgba(167, 106, 18, .10);
  --tier-top5-wash:     rgba(192, 57, 63, .10);
  --tier-vip-wash:      rgba(37, 99, 235, .10);
  --tasix-wash:         rgba(13, 125, 114, .10);

  --load-lo:       #98a1ae;
  --load-hi:       #12915a;

  --glass:         rgba(246, 247, 249, .82);
  --shadow-1:      0 1px 2px rgba(16, 22, 32, .05);
  --shadow-2:      0 2px 6px rgba(16, 22, 32, .07), 0 10px 24px rgba(16, 22, 32, .06);
  --shadow-3:      0 8px 20px rgba(16, 22, 32, .10), 0 24px 60px rgba(16, 22, 32, .12);
  --skeleton-a:    #e4e7ec;
  --skeleton-b:    #f2f4f7;

  --r-lg: 8px;
  --r-md: 6px;
  --r-sm: 4px;
  /* the "Найти" button and the field frame: the monitoring's blue, not a yellow of its own */
  --find: var(--accent);
  --find-2: var(--accent-2);
  --on-find: var(--on-accent);
  --field: var(--border-2);

  --e-out: cubic-bezier(.22, .68, .36, 1);
  --t-fast: 140ms var(--e-out);
  --t-mid:  200ms var(--e-out);

  --h-sm: 34px;
  --h-md: 40px;
  --h-lg: 54px;

  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-7: 28px; --s-8: 32px; --s-10: 40px; --s-12: 48px;
  --s-14: 56px; --s-18: 72px;

  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: 'Cascadia Code', 'SF Mono', Consolas, 'Liberation Mono', monospace;

  --f-12: 13px; --f-13: 14px; --f-14: 15px; --f-15: 16px;
  --f-16: 17px; --f-18: 19px; --f-20: 22px; --f-24: 26px; --f-30: 32px;

  --page:   1220px;
  --column: 760px;
  --rail:   320px;
  --gutter: 28px;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg:            #121417;
  --bg-2:          #0d0f12;
  --surface:       #1a1d22;
  --surface-2:     #22262c;
  --surface-3:     #2a2f36;
  --text:          #eef0f3;
  --text-2:        #a7adb7;
  --text-3:        #6c7380;
  --border:        #2c3139;
  --border-2:      #3a4049;
  --border-3:      #4f5661;

  --accent:        #3b8ded;
  --accent-2:      #5a9ff0;
  --accent-3:      #2f78cc;
  --accent-wash:   rgba(59, 141, 237, .12);
  --accent-ring:   rgba(59, 141, 237, .22);
  --on-accent:     #ffffff;
  --visited:       #b6a3e8;

  --ok:            #46c78c;
  --ok-wash:       rgba(70, 199, 140, .12);
  --warn:          #e0a445;
  --bad:           #e0686d;

  --tier-supervip: #e0a445;
  --tier-top5:     #e0686d;
  --tier-vip:      #6ea8fe;
  --tasix:         #46cbbb;
  --tier-supervip-wash: rgba(224, 164, 69, .12);
  --tier-top5-wash:     rgba(224, 104, 109, .12);
  --tier-vip-wash:      rgba(110, 168, 254, .12);
  --tasix-wash:         rgba(70, 203, 187, .12);

  --load-lo:       #4b5461;
  --load-hi:       #46c78c;

  --glass:         rgba(14, 17, 22, .82);
  --shadow-1:      0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2:      0 2px 6px rgba(0, 0, 0, .45), 0 10px 26px rgba(0, 0, 0, .4);
  --shadow-3:      0 10px 24px rgba(0, 0, 0, .55), 0 30px 70px rgba(0, 0, 0, .5);
  --skeleton-a:    #1c212a;
  --skeleton-b:    #262d38;
  --find:          var(--accent);
  --find-2:        var(--accent-2);
  --on-find:       #ffffff;
  --field:         var(--border-2);
}

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

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 400 var(--f-15)/1.5 var(--font); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }
/* underline on hover only for plain text links — never under a link that carries an icon */
.res__title a:hover, .results__correction a:hover, .page p a:hover, .page__ex a:hover, .ftr a:hover, .answer a:hover, .card__empty a:hover, .tbl a:hover, .notice a:hover, .sugg__all:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: .92em; }
kbd { display: inline-block; padding: 0 6px; border: 1px solid var(--border-2); border-bottom-width: 2px; border-radius: 5px; font: 500 11px/18px var(--mono); color: var(--text-2); background: var(--surface); }
mark { background: transparent; color: inherit; font-weight: 700; }
.sep { color: var(--text-3); margin: 0 6px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex-shrink: 0; }
.dot--on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-wash); }
main { flex: 1 0 auto; width: 100%; } /* auto margins on a flex item switch off stretch; without a width, nowrap rows would widen the page */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ----------------------------------------------------------------- top bar -- */

.top { position: sticky; top: 0; z-index: 40; background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.top--results { border-bottom: 1px solid var(--border); }
/* home only: the header scrolls away with the page instead of following it */
.top--home { position: static; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.top__inner { display: flex; align-items: center; gap: var(--s-5); max-width: var(--page); margin: 0 auto; padding: 10px var(--s-6); }
.top__spacer { flex: 1; }
.top__brand { display: inline-flex; align-items: center; flex-shrink: 0; margin-right: var(--s-2); text-decoration: none; }
.top__brand:hover { text-decoration: none; }
/* the CSX wordmark: text, so it follows the theme and needs no image */
.wordmark { display: inline-block; font-weight: 800; font-size: 26px; line-height: 1; letter-spacing: -0.03em; color: var(--text); }
.wordmark em { font-style: normal; color: var(--accent); }
.home__logo .wordmark { font-size: 64px; letter-spacing: -0.04em; }
.home__logo .wordmark em { color: var(--accent); }
.top__box { flex: 1 1 auto; max-width: 720px; min-width: 0; }
.top__tools { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; flex-shrink: 0; }
.lang-switch, .theme-switch { display: inline-flex; align-items: center; gap: 3px; height: 38px; padding: 3px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.lang-switch__btn, .theme-switch__btn { display: inline-flex; align-items: center; gap: 8px; height: 100%; padding: 0 12px 0 9px; border-radius: 7px; color: var(--text-2); font-size: var(--f-13); font-weight: 600; white-space: nowrap; transition: background var(--t-fast), color var(--t-fast); }
/* theme: one icon button (same idea as the monitor's) */
.theme-toggle { flex-shrink: 0; }
.theme-toggle .fa { font-size: 16px; }
.theme-toggle .fa-sun-o { color: var(--warn); }
.theme-toggle .fa-moon-o { color: var(--accent); }
.theme-toggle:hover { border-color: var(--border-2); }
.lang-switch__btn:hover { color: var(--text); text-decoration: none; }
.lang-switch__btn.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.lang-switch__flag { width: 22px; height: 15px; flex-shrink: 0; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.lang-switch__btn:not(.is-active) .lang-switch__flag { opacity: .7; }
.lang-switch__btn:hover .lang-switch__flag { opacity: 1; }
.lang { display: inline-flex; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.lang__btn { padding: 0 10px; height: 30px; line-height: 30px; font-size: var(--f-12); font-weight: 600; letter-spacing: .04em; color: var(--text-3); }
.lang__btn:hover { text-decoration: none; color: var(--text); background: var(--surface-2); }
.lang__btn.is-active { color: var(--text); background: var(--surface-3); }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text-2); background: var(--surface); }
.iconbtn:hover { text-decoration: none; color: var(--text); border-color: var(--border-2); }
.top__link { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-sm); font-size: var(--f-13); font-weight: 500; color: var(--text-2); background: var(--surface); }
.top__link:hover { text-decoration: none; color: var(--text); border-color: var(--border-2); }
.top__link--user { padding-left: 4px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; }

/* -------------------------------------------------------------- searchbox -- */

.sb { position: relative; }
.sb__field { display: flex; align-items: center; height: 44px; padding: 0 4px 0 14px; border: 2px solid var(--field); border-radius: var(--r-lg); background: var(--surface); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.sb:focus-within .sb__field, .sb.is-open .sb__field { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.sb--lg .sb__field { height: 56px; padding: 0 5px 0 20px; }
.sb__icon { color: var(--text-3); font-size: 15px; margin-right: 10px; }
.sb--lg .sb__icon { font-size: 18px; margin-right: 14px; }
.sb__input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font: inherit; font-size: var(--f-15); color: var(--text); outline: none; }
.sb--lg .sb__input { font-size: var(--f-18); }
.sb__input::placeholder { color: var(--text-3); }
.sb__input::-webkit-search-cancel-button, .sb__input::-webkit-search-decoration { -webkit-appearance: none; }
.sb__clear { display: none; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--text-3); cursor: pointer; }
.sb.has-text .sb__clear { display: inline-flex; }
.sb__clear:hover { background: var(--surface-2); color: var(--text); }
.sb__submit { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 20px; border: 0; border-radius: var(--r-md); background: var(--find); color: var(--on-find); font-size: var(--f-15); font-weight: 600; cursor: pointer; transition: background var(--t-fast); }
.sb__submit:hover { background: var(--find-2); }
.sb--lg .sb__submit { height: 44px; padding: 0 26px; font-size: var(--f-16); }
.sb__drop { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 50; max-height: 480px; overflow: auto; padding: 6px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-3); }
.sb.is-open .sb__drop { display: block; }
.sugg__label { padding: 8px 12px 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.sugg__item, .sugg__all { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--r-md); cursor: pointer; }
.sugg__item.is-active, .sugg__all.is-active, .sugg__item:hover, .sugg__all:hover { background: var(--surface-2); }
.sugg__thumb { width: 48px; height: 27px; flex-shrink: 0; border-radius: 5px; background: var(--surface-3) center/cover; }
.sugg__ico { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex-shrink: 0; border-radius: 8px; background: var(--surface-2); color: var(--text-3); font-size: 13px; }
.sugg__ico img { width: 18px; }
.sugg__body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sugg__title { font-size: var(--f-14); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sugg__meta { font-size: var(--f-12); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sugg__side { display: inline-flex; align-items: center; gap: 6px; font-size: var(--f-12); font-variant-numeric: tabular-nums; color: var(--text-2); }
.sugg__all { color: var(--accent); font-weight: 500; border-top: 1px solid var(--border); border-radius: 0 0 10px 10px; margin-top: 4px; }
.sugg__empty { padding: 14px 12px; font-size: var(--f-13); color: var(--text-3); }

/* ------------------------------------------------------------------ home -- */

.home { display: flex; flex-direction: column; align-items: center; gap: var(--s-6); max-width: var(--page); margin: 0 auto; padding: 2vh var(--s-6) var(--s-8); }
.hm-hero { position: relative; width: 100%; max-width: 720px; display: flex; flex-direction: column; align-items: center; gap: var(--s-4); padding: 5vh 0 var(--s-4); text-align: center; }
.home { overflow-x: clip; }
.hm-hero::before { content: ''; position: absolute; left: 0; right: 0; top: -40px; height: 320px; z-index: -1; background: radial-gradient(70% 70% at 50% 40%, var(--accent-ring) 0%, transparent 70%); pointer-events: none; }
.home__logo { display: inline-block; text-decoration: none; }
.home__logo:hover { text-decoration: none; }
.hm-tagline { margin: 0 0 var(--s-2); max-width: 560px; font-size: var(--f-15); line-height: 1.5; color: var(--text-2); }
.hm-hero .sb { width: 100%; text-align: left; }
.home__hint { margin: 0; font-size: var(--f-13); color: var(--text-3); text-align: center; }
.hm-try { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; font-size: var(--f-13); }
.hm-try__label { color: var(--text-3); margin-right: 2px; }
.hm-try__item { padding: 4px 10px; border-radius: var(--r-md); background: var(--surface-2); color: var(--text-2); transition: background var(--t-fast), color var(--t-fast); }
.hm-try__item:hover { text-decoration: none; background: var(--surface-3); color: var(--text); }
.hm-try kbd { margin-left: 4px; }

.hm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); width: 100%; max-width: 920px; }
.hm-stat { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); color: var(--text-2); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
a.hm-stat:hover { text-decoration: none; border-color: var(--border-2); box-shadow: var(--shadow-1); color: var(--text-2); }
.hm-stat__ico { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: var(--surface-2); color: var(--text-3); font-size: 15px; }
.hm-stat__ico--ok { background: var(--ok-wash); }
.hm-stat__ico--tasix { background: var(--tasix-wash); color: var(--tasix); }
.hm-stat__txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.hm-stat b { font-size: var(--f-18); font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hm-stat__txt span { font-size: var(--f-12); color: var(--text-3); }

/* three columns of equal height — the cards stretch, their lists grow to fill */
.hm-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: var(--s-4); width: 100%; align-items: stretch; }
.hm-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.hm-card > ol, .hm-card > ul { flex: 1; }
.hm-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hm-card__head h2 { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.hm-card__head h2 .fa { font-size: 12px; color: var(--accent); }
.hm-card__head h2 .dot { width: 7px; height: 7px; }
.hm-card__head > a { display: inline-flex; align-items: center; gap: 4px; font-size: var(--f-12); color: var(--accent); }
.hm-card__head--sub { margin-top: 6px; }
.hm-card__hint { font-size: var(--f-12); color: var(--text-3); }
.hm-empty { margin: 0; padding: 12px 0; font-size: var(--f-13); color: var(--text-3); }

.hm-now { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.hm-now__row { display: grid; grid-template-columns: 18px 64px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border); }
.hm-now__row:first-child { border-top: 0; }
.hm-now__n { font-size: var(--f-12); font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; text-align: center; }
.hm-now__thumb { display: block; width: 64px; height: 36px; border-radius: 5px; overflow: hidden; background: var(--surface-3); }
.hm-now__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hm-now__thumb--none { display: inline-flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 14px; }
.hm-now__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hm-now__title { font-size: var(--f-14); font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-now__meta { display: inline-flex; align-items: center; gap: 6px; font-size: var(--f-12); color: var(--text-3); white-space: nowrap; overflow: hidden; }
.hm-now__flag { width: 16px; height: 11px; border-radius: 2px; flex-shrink: 0; }
.hm-now__meta .label { height: 16px; padding: 0 5px; font-size: 10px; }
.hm-now__load { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.hm-now__load b { font-size: var(--f-13); font-variant-numeric: tabular-nums; }
.hm-now__load small { font-weight: 400; color: var(--text-3); }

.hm-q { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.hm-q__item { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border); color: var(--text); }
.hm-q li:first-child .hm-q__item { border-top: 0; }
.hm-q__item:hover { text-decoration: none; color: var(--accent); }
.hm-q__n { font-size: var(--f-12); font-weight: 600; color: var(--text-3); text-align: center; font-variant-numeric: tabular-nums; }
.hm-q__text { font-size: var(--f-14); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-q__count { font-size: var(--f-12); color: var(--text-3); font-variant-numeric: tabular-nums; }

.hm-pills { display: flex; flex-wrap: wrap; gap: 6px; }

.hm-tips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); width: 100%; }
.hm-tip { display: grid; grid-template-columns: 36px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); color: var(--text-2); transition: border-color var(--t-fast); }
.hm-tip:hover { text-decoration: none; border-color: var(--border-2); color: var(--text-2); }
.hm-tip__ico { grid-row: 1 / span 2; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-ring); color: var(--accent); font-size: 15px; }
.hm-tip b { font-size: var(--f-14); color: var(--text); }
.hm-tip > span:last-child { font-size: var(--f-12); line-height: 1.45; color: var(--text-3); }

/* pills — quick links */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); font-size: var(--f-13); color: var(--text-2); transition: border-color var(--t-fast), color var(--t-fast); }
.pill:hover { text-decoration: none; color: var(--text); border-color: var(--border-2); }
.pill .fa { font-size: 12px; color: var(--text-3); }
.pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pill-color, var(--accent)); }
.pill small { color: var(--text-3); font-variant-numeric: tabular-nums; }
.pill--sm { height: 26px; padding: 0 10px; font-size: var(--f-12); }
.pill img { width: 16px; height: 11px; border-radius: 2px; }

/* --------------------------------------------------------------- results -- */

.results { max-width: var(--page); margin: 0 auto; padding: 0 var(--s-6) var(--s-12); }
.chips-row { padding: 10px 0 6px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chips__sep { width: 1px; height: 20px; margin: 0 4px; background: var(--border-2); }
.chips__spacer { flex: 1; }
.chip { position: relative; display: inline-flex; align-items: center; height: 34px; border-radius: var(--r-md); font-size: var(--f-13); color: var(--text-2); }
.chip__btn, .chip--toggle, .chip--reset { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--text-2); cursor: pointer; white-space: nowrap; transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast); }
.chip__btn:hover, .chip--toggle:hover, .chip--reset:hover { text-decoration: none; color: var(--text); border-color: var(--border-2); background: var(--surface-2); }
.chip .fa { font-size: 12px; color: var(--text-3); }
.chip__caret { margin-left: -2px; }
.chip.is-on .chip__btn, .chip--toggle.is-on { color: var(--accent); border-color: var(--accent); background: var(--accent-wash); }
.chip.is-on .fa, .chip--toggle.is-on .fa { color: var(--accent); }
.chip--toggle small, .chip__item small { color: var(--text-3); font-variant-numeric: tabular-nums; }
.chip--reset { color: var(--text-3); border-style: dashed; }
.chip__menu { display: none; position: absolute; left: 0; top: calc(100% + 4px); z-index: 45; min-width: 220px; max-height: 360px; overflow: auto; padding: 6px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-3); }
.chip.is-open .chip__menu { display: block; }
.chip.is-open .chip__btn { border-color: var(--accent); }
.chip__item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-sm); font-size: var(--f-13); color: var(--text); white-space: nowrap; }
.chip__item span { flex: 1; }
.chip__item:hover { text-decoration: none; background: var(--surface-2); }
.chip__item.is-active { color: var(--accent); font-weight: 600; }
.chip__dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.chip__flag { width: 16px; height: 11px; border-radius: 2px; }

.results__grid { display: grid; grid-template-columns: minmax(0, var(--column)) minmax(0, 1fr); gap: var(--s-10); align-items: start; }
.results__main { min-width: 0; }
.results__panel { position: sticky; top: 76px; min-width: 0; max-width: 380px; }
.results__count { margin: 6px 0 10px; font-size: var(--f-13); color: var(--text-3); }
.results__correction { margin: 0 0 var(--s-4); font-size: var(--f-15); color: var(--text-2); }
.results__correction a { font-weight: 600; font-style: italic; }

/* instant answer */
.answer { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 var(--s-5); padding: 14px 16px; border: 1px solid var(--border); border-left: 3px solid var(--find); border-radius: var(--r-md); background: var(--surface); color: var(--text); }
.answer p { margin: 0; font-size: var(--f-15); line-height: 1.5; }
.answer__icon { color: var(--accent); font-size: 16px; margin-top: 2px; }
.answer--server { align-items: center; }
.answer--server:hover { text-decoration: none; border-color: var(--border-2); }
.answer__thumb { width: 80px; height: 45px; border-radius: 6px; object-fit: cover; }
.answer__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.answer__body small { font-size: var(--f-12); text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.answer__body b { font-size: var(--f-16); }
.answer__body span { display: inline-flex; align-items: center; gap: 6px; font-size: var(--f-13); color: var(--text-2); }

/* recommended strip */
.recs { margin: 0 0 var(--s-6); }
.recs__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.recs__title { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.recs__hint { font-size: var(--f-12); color: var(--text-3); }
.recs__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rec { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--text); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.rec:hover { text-decoration: none; border-color: var(--border-2); box-shadow: var(--shadow-1); }
.rec__thumb { width: 64px; height: 36px; flex-shrink: 0; border-radius: 5px; overflow: hidden; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; color: var(--text-3); }
.rec__thumb img { width: 100%; height: 100%; object-fit: cover; }
.rec__body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rec__tier { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--rec-color); }
.rec__title { font-size: var(--f-14); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec__meta { display: inline-flex; align-items: center; gap: 6px; font-size: var(--f-12); color: var(--text-2); }
.rec__meta b { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- result row -- */

.res-list { display: flex; flex-direction: column; }
.res { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-5); padding: 18px 0 22px; border-bottom: 1px solid var(--border); animation: rise .28s var(--e-out) both; }
/* light theme only: the grey page swallowed the list, so each answer gets a whisper of a surface — no cards */
[data-theme="light"] .res-list { gap: 6px; }
[data-theme="light"] .res { padding: 14px 16px 16px; border: 1px solid rgba(0, 0, 0, .025); border-radius: var(--r-lg); background: rgba(255, 255, 255, .3); }
[data-theme="light"] .res:hover { background: rgba(255, 255, 255, .5); border-color: rgba(0, 0, 0, .04); }
.res:nth-child(2) { animation-delay: 30ms; } .res:nth-child(3) { animation-delay: 60ms; } .res:nth-child(4) { animation-delay: 90ms; } .res:nth-child(5) { animation-delay: 120ms; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.res__body { min-width: 0; }
.res__source { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--f-13); color: var(--text-2); }
.res__game { width: 16px; height: 16px; border-radius: 4px; }
.res__addr { font-family: var(--mono); font-size: var(--f-13); color: var(--text-2); }
.res__flag { width: 16px; height: 11px; border-radius: 2px; margin-left: 2px; }
.res__country { color: var(--text-3); }
.res__copy { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: 0; border-radius: 6px; background: transparent; color: var(--text-3); cursor: pointer; opacity: 0; transition: opacity var(--t-fast), background var(--t-fast); }
.res:hover .res__copy, .kp .res__copy, .res__copy:focus-visible { opacity: 1; }
.res__copy:hover { background: var(--surface-2); color: var(--text); }
.res__copy.is-copied { color: var(--ok); }
.res__title { margin: 4px 0 3px; font-size: var(--f-20); font-weight: 400; line-height: 1.3; }
.res__title a { color: var(--accent); }
.res__title a:visited { color: var(--visited); }
.res__snippet { margin: 0 0 8px; font-size: var(--f-15); line-height: 1.55; color: var(--text); }
.res__facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: var(--f-14); color: var(--text-2); }
.fact { display: inline-flex; align-items: center; gap: 6px; }
.fact .fa { font-size: 12px; color: var(--text-3); }
.fact b { font-variant-numeric: tabular-nums; color: var(--text); }
.fact small { color: var(--text-3); }
.fact--connect, .fact--link { color: var(--accent); font-weight: 500; }
.fact--connect .fa, .fact--link .fa { color: var(--accent); }
.load__bar { display: inline-block; width: 56px; height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.load__fill { display: block; width: var(--load-w, 0); height: 100%; border-radius: 3px; background: var(--load-color, var(--load-lo)); }
.res__thumb { position: relative; display: block; width: 136px; height: 76px; flex-shrink: 0; border-radius: var(--r-md); overflow: hidden; background: var(--surface-3); align-self: start; margin-top: 2px; }
.res__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-mid); }
.res:hover .res__thumb img { transform: scale(1.04); }
.res__thumb-map { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 6px 4px; background: linear-gradient(transparent, rgba(0,0,0,.65)); font: 500 10px/1 var(--mono); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res.is-offline .res__thumb img { filter: grayscale(1); opacity: .6; }

.label { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px; border-radius: var(--r-sm); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.label .fa { font-size: 10px; }
.label--tasix { color: var(--tasix); background: var(--tasix-wash); }
.label--supervip { color: var(--tier-supervip); background: var(--tier-supervip-wash); }
.label--top5 { color: var(--tier-top5); background: var(--tier-top5-wash); }
.label--vip { color: var(--tier-vip); background: var(--tier-vip-wash); }
.label--lock { color: var(--text-3); background: var(--surface-3); }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border: 1px solid var(--border); border-radius: var(--r-sm); font-size: var(--f-12); color: var(--text-2); background: var(--surface); }
.tag:hover { text-decoration: none; border-color: var(--border-2); color: var(--text); }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tag-color, var(--text-3)); }

.btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 1px solid var(--border-2); border-radius: var(--r-md); background: var(--surface); font-size: var(--f-13); font-weight: 500; color: var(--text); cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); }
.btn:hover { text-decoration: none; border-color: var(--border-3); background: var(--surface-2); }
.btn .fa { font-size: 12px; }
.btn--accent { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: var(--accent-2); border-color: var(--accent-2); }

/* -------------------------------------------------------- knowledge panel -- */

.kp { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); overflow: hidden; }
.kp__img { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--surface-3); }
.kp__img img { width: 100%; height: 100%; object-fit: cover; }
.kp__img-map { position: absolute; left: 10px; bottom: 8px; padding: 2px 8px; border-radius: 6px; background: rgba(0,0,0,.6); font: 500 11px/18px var(--mono); color: #fff; }
.kp__body { padding: 14px 16px 16px; }
.kp__kind { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.kp__title { margin: 4px 0 6px; font-size: var(--f-18); font-weight: 600; line-height: 1.25; }
.kp__addr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--f-13); color: var(--text-2); }
.kp__descr { margin: 0 0 10px; font-size: var(--f-13); line-height: 1.5; color: var(--text-2); }
/* stat tiles in the panel: .stats.stats--tight + .stat.stat--sm (defined with the account pages) */
.kp__label { margin: 12px 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.kp__label small { font-weight: 400; letter-spacing: 0; text-transform: none; }
.kp__pulse .kp__label { margin-top: 6px; }
.kp__list { margin: 0; padding: 0 0 0 20px; font-size: var(--f-13); columns: 2; column-gap: 16px; }
.kp__list li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; break-inside: avoid; }
.kp__list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kp__list li b { font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 500; }
.kp__more { display: block; margin-top: 4px; font-size: var(--f-12); color: var(--text-3); }
.kp__none { margin: 0; font-size: var(--f-13); color: var(--text-3); }
.kp__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.kp__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.kp__foot { padding: 10px 16px 14px; border-top: 1px solid var(--border); background: var(--surface-2); }
.kp__foot .kp__label { margin-top: 0; }
.kp__srv { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: var(--f-13); color: var(--text); border-top: 1px dashed var(--border); }
.kp__srv:first-of-type { border-top: 0; }
.kp__srv:hover { text-decoration: none; color: var(--accent); }
.kp__srv-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kp__srv b { font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 500; }

.refine { display: flex; flex-direction: column; gap: 8px; padding: 6px 0; }
.refine__group .kp__label { margin-top: 6px; }
.refine__pills { display: flex; flex-wrap: wrap; gap: 6px; }

/* ----------------------------------------------------- server peek card -- */

.fact--more { border: 0; background: transparent; padding: 0; font: inherit; font-size: var(--f-14); color: var(--text-2); cursor: pointer; }
.fact--more:hover, .fact--more[aria-expanded="true"] { color: var(--accent); }
.fact--more[aria-expanded="true"] .fa { color: var(--accent); }
.peek { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); font-size: var(--f-13); color: var(--text-2); }
.peek--pop { position: absolute; z-index: 70; width: 560px; max-width: calc(100vw - 16px); box-shadow: var(--shadow-3); animation: rise .16s var(--e-out) both; }
.peek__left, .peek__right { min-width: 0; }
.peek .chart { max-width: 100%; }
.res__peek { margin-top: 12px; }
.res__peek .peek { grid-template-columns: 180px minmax(0, 1fr); }
.peek__img { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-3); }
.peek__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.peek__img span { position: absolute; left: 6px; bottom: 5px; padding: 1px 6px; border-radius: 4px; background: rgba(0,0,0,.6); font: 500 11px/16px var(--mono); color: #fff; }
.peek__meta { margin-top: 8px; line-height: 1.5; }
.peek__meta b { color: var(--text); }
.peek__meta img { display: inline-block; vertical-align: -1px; margin-right: 4px; }   /* the flag stays on the country's line */
/* the title may be a long hostname: two lines at most, the address under it */
.peek__title { display: flex; flex-direction: column; gap: 2px; margin: 0 0 8px; font-size: var(--f-14); font-weight: 600; color: var(--text); }
.peek__title > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.peek__title code { font-weight: 400; font-size: var(--f-12); color: var(--text-3); }
.peek__label { margin: 8px 0 3px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.peek__players { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0; padding: 0; list-style: none; }
.peek__players li { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; }
.peek__players li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; color: var(--text); }
.peek__players li small { color: var(--text-3); font-variant-numeric: tabular-nums; }
.peek__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.peek__actions .btn { white-space: nowrap; }
.peek__loading { padding: 14px; font-size: var(--f-13); color: var(--text-3); }
@media (max-width: 767px) {
  .peek, .res__peek .peek { grid-template-columns: 1fr; }
  .peek__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ----------------------------------------------------------- subscribe -- */

.results__count { display: flex; align-items: center; gap: 14px; }
.sub { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); font: 500 var(--f-12)/1 var(--font); color: var(--text-2); cursor: pointer; transition: border-color var(--t-fast), color var(--t-fast); }
.sub:hover { color: var(--text); border-color: var(--border-2); text-decoration: none; }
.sub.is-on { color: var(--accent); border-color: var(--accent); background: var(--accent-wash); }
.sub .fa { font-size: 11px; }
.sub:disabled { opacity: .6; cursor: default; }

/* ------------------------------------------------------------ sponsored -- */

.rec--ad { border-style: dashed; }
.rec--ad .rec__tier { color: var(--text-3); }

/* --------------------------------------------------- account & admin UI -- */

.page__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-6); }
.page__head h1 { margin-bottom: 4px; }
.page__head .page__lead { margin-bottom: 0; font-size: var(--f-15); }
.page__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.is-active { border-color: var(--accent); color: var(--accent); background: var(--accent-wash); }
.btn--sm { height: 30px; padding: 0 10px; font-size: var(--f-12); }
.btn--lg { height: 44px; padding: 0 22px; font-size: var(--f-15); }
.notice { margin: 0 0 var(--s-5); padding: 10px 14px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--r-sm); background: var(--surface); font-size: var(--f-14); }
.notice--ok { border-left-color: var(--ok); }
.notice--warn { border-left-color: var(--tier-top5, #d97706); }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.card { padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.card--wide { grid-column: 1 / -1; }
.card h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: var(--f-16); font-weight: 600; }
.card h2 .fa { font-size: 14px; color: var(--text-3); }
.card h2 small { font-size: var(--f-12); font-weight: 500; color: var(--text-3); }
.card__hint { margin: 0 0 12px; font-size: var(--f-13); color: var(--text-2); line-height: 1.5; }
.card__empty { margin: 0; font-size: var(--f-14); color: var(--text-3); }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--f-14); }
.tbl th { padding: 6px 10px; border-bottom: 1px solid var(--border); text-align: left; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl--compact td { padding: 5px 8px; }
.tbl .right { text-align: right; }
.tbl .nowrap { white-space: nowrap; }
.tbl tr.is-off td { opacity: .55; }
.muted { color: var(--text-3); }
.small { font-size: var(--f-12); }
.inline { display: inline; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.input { height: 36px; padding: 0 12px; border: 1px solid var(--border-2); border-radius: var(--r-sm); background: var(--surface); font: inherit; font-size: var(--f-14); color: var(--text); min-width: 0; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.input--grow { flex: 1 1 240px; }
select.input { padding-right: 28px; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: var(--f-12); color: var(--text-2); }
.form-grid label .input { width: 100%; }
.form-grid__actions { grid-column: 1 / -1; }
.switch { position: relative; width: 36px; height: 20px; padding: 0; border: 1px solid var(--border-2); border-radius: 10px; background: var(--surface-3); cursor: pointer; vertical-align: middle; transition: background var(--t-fast); }
.switch span { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left var(--t-fast); }
.switch.is-on { background: var(--accent); border-color: var(--accent); }
.switch.is-on span { left: 18px; }
.iconbtn--plain { border-color: transparent; background: transparent; width: 28px; height: 28px; }
code.key { padding: 2px 6px; border-radius: var(--r-sm); background: var(--surface-2); cursor: pointer; }
/* ---- the stat tile: one component for every number on the site ---- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 var(--s-6); }
.stats--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats--tight { gap: 6px; margin: 12px 0 10px; }
.stat { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.stat b { display: block; font-size: var(--f-24); font-weight: 600; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.stat b small { font-size: var(--f-13); font-weight: 500; color: var(--text-3); }
.stat b.is-on { color: var(--ok); }
.stat span { display: block; margin-top: 4px; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat--sm { padding: 7px 6px; border: 0; border-radius: var(--r-sm); background: var(--surface-2); text-align: center; }
.stat--sm b { font-size: var(--f-18); }
.stat--sm b small { font-size: var(--f-12); }
.stat--sm span { margin-top: 2px; letter-spacing: .04em; }

/* ---- the chart: drawn by se.js, same everywhere ---- */
.chart { position: relative; width: 100%; }
.chart__svg { display: block; width: 100%; height: 60px; }
.chart--tall .chart__svg { height: 120px; }
.chart[data-h="48"] .chart__svg { height: 48px; }
.chart[data-h="56"] .chart__svg { height: 56px; }
.chart__grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart__area { fill: var(--accent); opacity: .14; }
.chart__line { fill: none; stroke: var(--accent); stroke-width: 1.8; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.chart__dot { fill: var(--accent); }
.chart__bar { fill: var(--accent-wash); stroke: var(--accent-ring); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart__bar2 { fill: var(--accent); }
.chart__guide { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.chart__x { display: flex; justify-content: space-between; margin-top: 2px; font-size: 10px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.chart__tip { position: absolute; top: -4px; padding: 2px 7px; border-radius: var(--r-sm); background: var(--text); color: var(--bg); font-size: 11px; font-weight: 600; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.legend { display: inline-block; width: 10px; height: 10px; margin: 0 4px 0 8px; vertical-align: -1px; border-radius: 2px; }
.legend--shows { background: var(--accent-wash); border: 1px solid var(--accent-ring); }
.legend--clicks { background: var(--accent); }

/* ---- related searches under the results ---- */
.related { margin: var(--s-8) 0 0; padding-top: var(--s-5); border-top: 1px solid var(--border); }
.related__title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: var(--f-14); font-weight: 600; }
.related__title .fa { color: var(--text-3); font-size: 12px; }
.related__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.related__item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--text); font-size: var(--f-14); }
.related__item .fa { color: var(--text-3); font-size: 12px; }
.related__item:hover { border-color: var(--border-2); background: var(--surface-2); text-decoration: none; color: var(--accent); }
@media (max-width: 600px) { .related__row { grid-template-columns: 1fr; } }

/* login */
.login { margin: 0 0 var(--s-8); padding: 20px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.login__wait { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; font-size: var(--f-14); color: var(--text-2); }
.login__spin { width: 14px; height: 14px; border: 2px solid var(--border-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login__steps { margin: 0; padding-left: 20px; font-size: var(--f-14); color: var(--text-2); line-height: 1.7; }

/* console */
.console { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--s-6); align-items: start; }
.console__list { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.console__srv { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--border); font-size: var(--f-13); color: var(--text); }
.console__srv:last-child { border-bottom: 0; }
.console__srv:hover { background: var(--surface-2); text-decoration: none; }
.console__srv.is-active { background: var(--accent-wash); color: var(--accent); }
.console__srv-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console__srv small { color: var(--text-3); font-variant-numeric: tabular-nums; }
.console__main { padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.console__title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.console__title h2 { margin: 0; font-size: var(--f-18); font-weight: 600; }
.console__title code { color: var(--text-2); }
.console__main h3 { margin: var(--s-6) 0 var(--s-3); font-size: var(--f-14); font-weight: 600; }

@media (max-width: 900px) {
  .cards, .form-grid { grid-template-columns: 1fr; }
  .stats, .stats--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .console { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ 404 -- */

.is-err .top__box { visibility: hidden; }   /* the page has its own big box */
.err { text-align: center; padding-top: var(--s-10); }
.err__code { font-size: 96px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; color: var(--accent); opacity: .9; }
.err h1 { margin: var(--s-2) 0 var(--s-2); }
.err .page__lead { margin-bottom: var(--s-6); }
.err__box { max-width: 560px; margin: 0 auto var(--s-6); text-align: left; }
.err__links { display: flex; justify-content: center; gap: var(--s-6); font-size: var(--f-14); }
.err__links a:hover { text-decoration: underline; }

/* ------------------------------------------------------------ text page -- */

/* One standard for every secondary page: the width of the header, a page head,
   and the content inside surface cards — the same material as the home blocks.
   Long text keeps a readable measure instead of stretching to 1220px. */
.page { max-width: var(--page); margin: 0 auto; padding: var(--s-8) var(--s-6) var(--s-12); }
.page--narrow { max-width: 560px; }   /* login, 404 — a single column of controls */
.page--wide { max-width: var(--page); }
.page h1 { margin: 0 0 var(--s-2); font-size: var(--f-30); font-weight: 600; line-height: 1.2; }
.page__lead { margin: 0 0 var(--s-8); font-size: var(--f-18); color: var(--text-2); line-height: 1.5; }

.page h2 { margin: var(--s-8) 0 var(--s-3); font-size: var(--f-20); font-weight: 600; }
/* every block is a card; one gap value between them all (page__body owns the rhythm) */
.page__body { display: grid; gap: var(--s-4); }
.page__sec { display: flex; flex-direction: column; gap: var(--s-3); margin: 0; padding: 18px 20px 20px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.page__sec > h2 { display: flex; align-items: center; gap: 8px; margin: 0; padding-bottom: var(--s-3); border-bottom: 1px solid var(--border); font-size: var(--f-16); font-weight: 600; letter-spacing: .01em; }
.page__sec > h2 .ico { color: var(--accent); font-size: 15px; line-height: 1; flex-shrink: 0; }
.page__sec > p { max-width: 78ch; margin: 0; }
.page__sec > .page__ex { margin-top: 2px; }
.page__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: var(--s-4); align-items: stretch; }
.page__grid--wide { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
@media (max-width: 900px) { .page__grid--wide { grid-template-columns: minmax(0, 1fr); } }
.page__sec .page__ex { flex: 1; }

/* ---------------------------------------------------------------- /me -- */
.me-id { gap: var(--s-4); }
.me-id__who { display: flex; align-items: center; gap: 14px; }
.me-id__avatar { flex-shrink: 0; width: 56px; height: 56px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: linear-gradient(135deg, hsl(var(--h, 210) 60% 52%), hsl(calc(var(--h, 210) + 36) 65% 42%)); color: #fff; font-size: 24px; font-weight: 700; }
.me-id__text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.me-id__text b { font-size: var(--f-20); font-weight: 600; }
.me-id__text > span { font-size: var(--f-13); color: var(--text-3); }
.me-id__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.me-id__tags .tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: var(--f-12); font-style: normal; font-weight: 600; text-decoration: none; }
.me-id__tags a.tag:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.me-id__tags .tag .fa { font-size: 11px; opacity: .8; }
.me-id__tags .tag--admin { border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn); }
.me-id__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--border); }
.me-id__stats > div { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: var(--r-md); background: var(--surface-2); }
.me-id__stats b { font-size: var(--f-20); font-weight: 600; font-variant-numeric: tabular-nums; }
.me-id__stats b small { font-size: var(--f-13); font-weight: 500; color: var(--text-3); }
.me-id__stats span { font-size: var(--f-12); color: var(--text-3); }
.me-cols { align-items: start; }
.me-col { display: grid; gap: var(--s-4); align-content: start; }
.page__sec > h2 small { margin-left: auto; font-size: var(--f-12); font-weight: 500; color: var(--text-3); }
.me-empty { display: flex; align-items: center; gap: 8px; padding: 12px; border: 1px dashed var(--border); border-radius: var(--r-md); color: var(--text-3); font-size: var(--f-14); }
.me-empty .fa { color: var(--text-3); }
@media (max-width: 700px) { .me-id__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .me-id__avatar { width: 46px; height: 46px; font-size: 20px; } }
.page p { margin: 0 0 var(--s-4); font-size: var(--f-15); line-height: 1.65; }
.page__ex { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 0; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.page__ex > div { padding: 9px 12px; border-bottom: 1px solid var(--border); font-size: var(--f-14); line-height: 1.5; }
.page__ex > div:nth-last-child(-n+2) { border-bottom: 0; }
.page__ex > div:nth-child(odd) { background: var(--surface-2); color: var(--text-2); }
.page__ex > div:nth-child(even) { color: var(--text-2); }
.page__ex a, .page__ex code { font-family: var(--mono); font-size: var(--f-13); color: var(--accent); }
.page__ex code { color: var(--text); }
@media (max-width: 560px) { .page__ex { grid-template-columns: minmax(0, 1fr); } .page__ex > div:nth-child(odd) { border-bottom: 0; padding-bottom: 2px; } }
.page__stats { display: flex; flex-wrap: wrap; gap: var(--s-6); margin: var(--s-4) 0; }
.page__stats b { display: block; font-size: var(--f-24); font-weight: 600; font-variant-numeric: tabular-nums; }
.page__stats span { font-size: var(--f-13); color: var(--text-3); }

/* ----------------------------------------------------------------- empty -- */

.empty { padding: var(--s-12) 0; text-align: center; color: var(--text-2); }
.empty__icon { font-size: 34px; color: var(--text-3); }
.empty__title { margin: 10px 0 4px; font-size: var(--f-18); font-weight: 600; color: var(--text); }
.empty__text { margin: 0 auto; max-width: 460px; font-size: var(--f-14); }

/* ------------------------------------------------------------ pagination -- */

.pager { display: flex; justify-content: center; align-items: center; gap: 4px; margin: var(--s-8) 0 0; }
.pager__btn { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: var(--r-md); font-size: var(--f-14); color: var(--text-2); }
.pager__btn:hover { text-decoration: none; background: var(--surface-2); color: var(--text); }
.pager__btn.is-active { background: var(--find); color: var(--on-find); font-weight: 600; }
.pager__btn.is-disabled { opacity: .35; pointer-events: none; }
.pager__sep { color: var(--text-3); padding: 0 4px; }

/* -------------------------------------------------------------- skeleton -- */

.sk { display: block; border-radius: 6px; background: linear-gradient(90deg, var(--skeleton-a) 25%, var(--skeleton-b) 50%, var(--skeleton-a) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.sk-line { height: 13px; margin: 6px 0; }
.sk-line.is-title { height: 18px; width: 60%; }
.w-35 { width: 35%; } .w-50 { width: 50%; } .w-70 { width: 70%; } .w-90 { width: 90%; }
.sk-sugg { display: flex; align-items: center; gap: 12px; padding: 8px 12px; }
.sk-sugg__thumb { width: 48px; height: 27px; flex-shrink: 0; }
.sk-sugg__body { flex: 1; }
.sk-res { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.sk-res__thumb { height: 68px; border-radius: 8px; }
.sk-chips { display: flex; gap: 6px; margin-top: 8px; }
.sk-chip { width: 64px; height: 20px; }
.is-loading .results__grid { opacity: .55; pointer-events: none; transition: opacity var(--t-fast); }

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

.ftr { border-top: 1px solid var(--border); background: var(--surface); }
.ftr__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s-5); max-width: var(--page); margin: 0 auto; padding: 14px var(--s-6); font-size: var(--f-13); color: var(--text-3); }
.ftr__brand { font-weight: 700; letter-spacing: .1em; color: var(--text-2); }
.ftr__spacer { flex: 1; }
.ftr a { color: var(--text-2); }
.is-home .ftr { background: transparent; border-top: 0; }

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 1099px) {
  .hm-grid { grid-template-columns: 1fr 1fr; }
  .hm-grid .hm-card:first-child { grid-column: 1 / -1; }
  .results__grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .results__panel { position: static; max-width: none; order: -1; }
  .refine { display: none; }
}
@media (max-width: 767px) {
  /* two rows: the brand and the tools, then the search field full width */
  .top__inner { flex-wrap: wrap; gap: 8px 10px; padding: 8px 12px; }
  .top__brand { order: 1; margin: 0; }
  .top__tools { order: 2; }
  .top__box { order: 3; flex: 1 1 100%; max-width: none; }
  .top__link span { display: none; }
  .top__link--user { padding: 0 6px; }
  .results__count { flex-wrap: wrap; gap: 8px; }
  .wordmark { font-size: 22px; }
  .results { padding: 0 12px var(--s-8); }
  /* the thumbnail stays small on the right: the source image is tiny and looks bad blown up */
  .res { gap: 12px; }
  [data-theme="light"] .res { padding: 12px 12px 14px; }
  .res__thumb { width: 96px; height: 54px; }
  .res__title { font-size: var(--f-18); }
  .recs__row { grid-template-columns: minmax(0, 1fr); }
  .home { padding: 2vh 12px var(--s-7); gap: var(--s-4); }
  .home__logo .wordmark { font-size: 48px; }
  .hm-hero { padding-top: 4vh; }
  .hm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-grid, .hm-tips { grid-template-columns: minmax(0, 1fr); }
  .sb--lg .sb__field { height: 48px; padding-left: 12px; }
  .sb--lg .sb__submit { height: 38px; padding: 0 14px; font-size: var(--f-14); }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .chip__menu { position: fixed; left: 8px; right: 8px; top: auto; bottom: 8px; z-index: 60; max-height: 60vh; box-shadow: var(--shadow-3); }
  .chip.is-open::after { content: ''; position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.35); }
  .chip.is-open .chip__menu { display: block; }
  /* phone: labels off, everything keeps its place — the login button stays visible */
  .lang-switch__label { display: none; }
  .lang-switch__btn { padding: 0 8px; }
  .top__tools { gap: 6px; min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
  .top__link { padding: 0 10px; }
  .chips::-webkit-scrollbar { display: none; }
  .chips__spacer { display: none; }
  .kp__list { columns: 1; }
  .kp__img { aspect-ratio: auto; max-height: 190px; }
  .kp__img img { height: 190px; }
}
