@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=General+Sans:wght@400;500;600&display=swap') screen and (min-width: 801px);
@import url('mobile.css');

/* Chrome Android Fix */
@supports (-webkit-appearance:none) {
  html {
    -webkit-text-size-adjust: 100% !important;
  }
}

/* Globalny motyw + wspolne komponenty dla czesci publicznej (ranking, header, tabela) */
:root {
  /* Light / Modern / Orange accent palette */
  --bg: #F5F5F5; /* g��wne t�o - jasne szare */
  --card: #FFFFFF; /* karty / sekcje */
  --card-alt: #FAFAFA; /* alternate section */
  --heading: #1A1A1A; /* nag��wki - ciemny */
  --text: #333333; /* tekst g��wny */
  --muted: #666666; /* tekst pomocniczy */
  --placeholder: #999999; /* placeholder / meta */
  --line: #E0E0E0; /* delikatne obramowania */
  --accent: #FF6B35; /* primary - pomara�czowy */
  --accent-hover: #FF5722;
  --accent-subtle: #FFE8E0; /* subtle bg for accent elements */
  --ok-text: #2E7D32; --ok-bg: #E8F5E9;
  --warn-text: #F57C00; --warn-bg: #FFF3E0;
  --bad-text: #C62828; --bad-bg: #FFEBEE;
  --chip: #FFFFFF;
  --glass: rgba(0,0,0,0.03);
  --focus: rgba(255,107,53,0.15);
  --radius: 12px;
  --panel: #FFFFFF;
  --accent-2: #FF8A65;
  --header-height: 120px;
}

* { 
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
  touch-action: manipulation;
}
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', 'General Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
body {
  position: relative;
  min-height: 100%;
  background: radial-gradient(circle at 20% 20%, rgba(255, 198, 164, 0.35), transparent 45%),
              radial-gradient(circle at 80% 0%, rgba(137, 207, 240, 0.25), transparent 50%),
              radial-gradient(circle at 10% 90%, rgba(255, 234, 199, 0.4), transparent 45%),
              var(--bg);
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
/* Prevent any element from breaking viewport width */
img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: linear-gradient(120deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.85) 35%, rgba(255,255,255,0.9) 100%);
  pointer-events: none;
  z-index: -1;
}
a { color: var(--accent); text-decoration: none }

.wrap {
  max-width: min(1400px, 100%);
  width: 100%;
  margin: 0 auto;
  padding: clamp(12px, 4vw, 24px);
  overflow-x: hidden;
}
header {
  border-bottom: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 45px rgba(20,19,43,0.08);
  position: sticky;
  top: 0;
  z-index: 20;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.nav { display:flex; align-items:center; justify-content:space-between; gap:12px; padding: 12px 20px }
.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  letter-spacing: -0.4px;
  font-size: 22px;
  text-decoration: none;
  cursor: pointer;
  color: var(--heading);
  background: linear-gradient(135deg, #FF6B35 0%, #F7931E 50%, #FFC107 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: transform .2s ease, filter .2s ease;
}
.brand--logo,
.brand:has(.logo-img) {
  background: none;
  -webkit-text-fill-color: inherit;
  gap: 0;
}
.brand--logo::before,
.brand:has(.logo-img)::before {
  content: none !important;
  display: none !important;
}
.brand:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 4px 10px rgba(255,107,53,0.4));
}
.brand:active {
  transform: translateY(0);
}
.logo-img {
  height: 52px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  display: block;
  opacity: 0.95;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.brand:hover .logo-img {
  opacity: 1;
  transform: scale(1.02);
}
@media (max-width: 768px) {
  .logo-img {
    height: 44px;
  }
}
.menu { display:flex; gap: 8px; align-items:center; flex-wrap: wrap }
.menu-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-subtle);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
}

.auth-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
  backdrop-filter: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 9998;
}
.auth-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.auth-backdrop[hidden] {
  display: none !important;
}

.auth-drawer {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 6vh 16px 24px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.auth-drawer.open {
  opacity: 1;
  pointer-events: auto;
}
.auth-drawer[hidden] {
  display: none !important;
}

.auth-card {
  width: min(420px, 100%);
  background: var(--card);
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: 0 25px 60px rgba(15,23,42,0.4);
  padding: 26px 26px 30px;
  transform: translateY(-12px);
  opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
}
.auth-drawer.open .auth-card {
  transform: translateY(0);
  opacity: 1;
}

/* Lżejszy widok mobilny (mniej blurów/gradientów) */
@media (max-width: 800px) {
  body {
    background: var(--bg);
    font-size: 15px;
    padding-top: 0 !important; /* header w normalnym flow, bez offsetu */
  }
  body::before {
    display: none;
  }
  header {
    position: relative; /* przewija się razem ze stroną */
    top: auto;
    width: 100%;
    left: auto;
    right: auto;
    z-index: 20;
    background: rgba(255,255,255,0.98);
    backdrop-filter: none;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    padding: 12px 0;
  }
  main {
    min-height: 100vh;
    padding-top: 0 !important;
  }
  .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .menu {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }
  .menu .btn {
    font-size: 14px;
    padding: 8px 14px;
    flex: 0 1 auto;
  }
  .brand {
    font-size: 18px;
    text-align: center;
    padding: 8px 0;
  }
  .auth-backdrop {
    backdrop-filter: none;
  }
  .home-card,
  .card,
  .featured-top-card {
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    border-radius: 12px;
    padding: 14px;
  }
  .home-grid {
    gap: 14px;
    grid-template-columns: 1fr !important;
    grid-template-areas: "center" "left" "right" !important;
    padding: 0;
  }
  .home-left,
  .home-right {
    display: none !important;
  }
  .home-center {
    grid-area: center !important;
    grid-column: 1 / -1 !important;
  }
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table th, .table td {
    font-size: 13px;
    padding: 8px 6px;
    white-space: nowrap;
  }
  .table {
    min-width: 100%;
  }
  /* Ukryj awatary w tabelach na mobile (favikony w kartach rankingu zostają widoczne) */
  .item-row img,
  .avatar-sm,
  .avatar-sm img,
  .avatar-sm--img,
  .avatar-xl,
  .avatar-xl img,
  table .thumb img,
  .table.votes td img {
    display: none !important;
  }
  .site-card__favicon,
  .site-list img.site-card__favicon,
  .highlight-list img,
  .latest-chip img,
  .pulse-item img {
    display: block !important;
  }
  .hide-on-mobile { display: none !important; }

  /* Popraw formularze na mobile */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="url"],
  textarea,
  select {
    font-size: 16px !important;
    padding: 12px 14px;
    border-radius: 10px;
  }

  /* Modals na pełny ekran mobile */
  .auth-modal,
  .addsite-modal {
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    margin: 0 !important;
  }

  /* Przyciski większe na mobile */
  .btn {
    padding: 12px 20px;
    font-size: 15px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Chrome mobile specific fixes */
  * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  html {
    font-size: 100% !important;
  }

  body {
    min-height: 100vh;
    min-height: -webkit-fill-available;
  }

  .wrap {
    width: 100%;
    max-width: 100%;
    padding-left: clamp(12px, 4vw, 20px);
    padding-right: clamp(12px, 4vw, 20px);
  }

  /* Responsywność dla page-banner */
  .page-banner {
    flex-direction: column;
    padding: 24px 20px;
    margin-top: 20px;
  }
  .page-banner h1 {
    font-size: 28px;
  }
  .page-banner .stat-grid {
    grid-template-columns: 1fr;
    width: 100%;
  }

  /* Responsywność dla stat-grid */
  .stat-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .stat-card {
    padding: 16px 14px;
  }
  .stat-card strong {
    font-size: 24px;
  }

  /* Responsywność dla panel */
  .panel {
    padding: 16px 14px;
    border-radius: 12px;
  }

  /* Responsywność dla badge-status */
  .badge-status {
    font-size: 11px;
    padding: 4px 10px;
  }

  /* Responsywność dla domain-cell */
  .domain-cell {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  /* Responsywność dla filter-form */
  .filter-form {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .filter-form button {
    width: 100%;
  }

  /* Responsywność dla tabel - karty na mobile */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table {
    min-width: 600px;
  }
  @media (max-width: 640px) {
    .table {
      min-width: 100%;
    }
    .table thead {
      display: none;
    }
    .table tbody tr {
      display: block;
      margin-bottom: 16px;
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 12px;
      background: var(--card);
    }
    .table tbody td {
      display: block;
      text-align: left;
      padding: 8px 0;
      white-space: normal;
      border: none;
    }
    .table tbody td::before {
      content: attr(data-label);
      font-weight: 700;
      display: block;
      margin-bottom: 4px;
      color: var(--muted);
    }
  }

  /* Responsywność dla badge */
  .category-badge,
  .giant-badge {
    font-size: 10px;
    padding: 2px 6px;
  }

  /* Responsywność dla card-head-inline */
  .card-head-inline {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  /* Responsywność dla dashboard */
  .dashboard-shell {
    flex-direction: column;
  }
  .profile-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .profile-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .profile-meta {
    text-align: left;
  }
  .profile-meta h1 {
    font-size: 20px;
  }
  .badge-row {
    flex-wrap: wrap;
    gap: 6px;
  }
  .chip {
    font-size: 11px;
    padding: 4px 8px;
  }
  .profile-actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
  .profile-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Responsywność dla tabs */
  .tabs-nav {
    flex-wrap: wrap;
    gap: 8px;
  }
  .tabs-nav button {
    flex: 1;
    min-width: 120px;
    padding: 12px 14px;
    font-size: 14px;
  }
  .tab-content {
    padding: 16px 0;
  }

  /* Responsywność dla toast */
  .toast {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 14px;
    gap: 8px;
    min-width: auto;
    max-width: calc(100vw - 40px);
    right: 20px;
    left: 20px;
    top: 20px;
  }
  .toast-close {
    position: absolute;
    top: 8px;
    right: 8px;
  }

  /* Responsywność dla inbox */
  .inbox-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
  }
  .inbox-meta {
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
  }

  /* Responsywność dla settings */
  .settings-form {
    max-width: 100%;
    padding: 16px;
  }
  .settings-section h4 {
    font-size: 15px;
  }
  .form-group input[type="text"],
  .form-group input[type="email"],
  .form-group input[type="password"] {
    font-size: 16px;
    padding: 12px 14px;
  }

  /* Responsywność dla session/login/history items */
  .session-item,
  .login-item,
  .history-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
  }
  .session-item > div:first-child,
  .login-item > div:first-child {
    width: 100%;
  }

  /* Responsywność dla danger-zone */
  .danger-zone {
    padding: 16px;
  }
  .danger-zone h4 {
    font-size: 15px;
  }

  /* Responsywność dla info-card */
  .info-card {
    padding: 12px;
  }
  .info-card strong {
    font-size: 14px;
  }

  /* Responsywność dla checkbox-label */
  .checkbox-label {
    padding: 8px;
  }
  .checkbox-label span {
    font-size: 13px;
  }
}

.auth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.auth-head strong {
  font-size: 20px;
  color: var(--heading);
}
.auth-head .close {
  border: 1px solid var(--line);
  background: var(--card-alt);
  color: var(--text);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}
.auth-head .close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.auth-tabs button {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card-alt);
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}
.auth-tabs button.active {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255,107,53,0.15);
}
.pw-field{position:relative;display:flex;align-items:center}
.pw-field input{padding-right:45px;width:100%;pointer-events:auto;}
.pw-toggle{position:absolute;right:12px;top:50%;transform:translateY(-50%);background:transparent;border:none;border-radius:50%;padding:2px;min-width:24px;min-height:24px;width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;font-size:13px;color:var(--muted);cursor:pointer;transition:color .2s ease,background .2s ease;z-index:2;touch-action:manipulation;flex-shrink:0}
.pw-toggle::before{content:'👁';}
.pw-toggle[data-visible="1"]::before{content:'🙈';}
.pw-toggle:hover{color:var(--accent);background:rgba(0,0,0,0.05)}
@media (max-width:600px){
  .pw-toggle{padding:2px;min-width:22px;min-height:22px;width:22px;height:22px;font-size:12px;right:10px}
  .pw-field input{padding-right:38px}
}
.remember-line{display:inline-flex !important;align-items:center;gap:8px;margin:8px 0 4px;font-size:13px;color:var(--muted);flex-direction:row;font-weight:400}
.remember-line input[type="checkbox"]{width:16px;height:16px;margin:0;cursor:pointer;flex-shrink:0}

.auth-body label {
  display: block;
  margin: .55rem 0 .35rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.auth-body label.remember-line {
  display: inline-flex !important;
  flex-direction: row;
  margin: 8px 0 4px;
  font-weight: 400;
}
.auth-body input,
.auth-body input[type="number"],
.auth-body input[type="email"],
.auth-body input[type="password"] {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: .65rem .85rem;
  font-size: 14px;
}
.auth-body .addsite-btn {
  width: 100%;
  margin-top: 12px;
}
.auth-body form {
  margin: 0;
}
.turnstile-wrap {
  margin: 12px 0 0;
  display: flex;
  justify-content: center;
}
.auth-pane[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .auth-card {
    padding: 22px 20px 26px;
    width: 100%;
    max-width: 420px;
  }
  .auth-drawer {
    align-items: center;
    padding: 10vh 12px 24px;
  }
  .page-banner {
    padding: 22px;
  }
  .stat-card strong {
    font-size: 24px;
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 24px;
}

.btn {
  display:inline-flex; align-items:center; gap:8px;
  padding: .6rem .9rem; border-radius: 12px;
  border: 1px solid transparent;
  background: var(--accent); color: #ffffff; font-weight: 700;
  cursor: pointer; text-decoration: none; transition: all 0.2s;
}
.btn.outline { background: transparent; border: 1px solid var(--line); color: var(--text) }
.btn.outline:hover { border-color: var(--accent); color: var(--accent) }
.btn.small { padding: .36rem .66rem; border-radius: 10px; font-size: 13px }
.btn.danger { background: var(--bad-bg); color: var(--bad-text); border: 1px solid var(--bad-text) }
.btn:focus, .btn:hover { outline: 2px solid var(--focus); outline-offset: 2px }
.btn:not(.outline):hover { background: var(--accent-hover) }

.input, input[type="text"], input[type="search"], select {
  width: 100%; border-radius: 10px; padding: .6rem .8rem;
  background: var(--chip); border: 1px solid var(--line); color: var(--text);
}
.input::placeholder, input::placeholder, textarea::placeholder { color: var(--placeholder) }
.input:focus, input:focus, select:focus {
  outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--accent);
}

.table-wrap { overflow: auto }
.table { width:100%; border-collapse: collapse; }
.table th, .table td {
  border-bottom: 1px solid var(--line);
  padding: 14px 12px;
}
.vote-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.table thead th { 
  text-align:left; 
  color: var(--muted); 
  font-weight: 700; 
  text-transform: uppercase; 
  font-size: 11px;
  letter-spacing: 0.5px;
}
.table tbody tr:hover { background: var(--card-alt) }

.status-legal {
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--card-alt);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.status-legal strong {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 4px;
}
.status-legal--compact {
  font-size: 11px;
  padding: 10px 12px;
  margin-top: 8px;
}

.comment-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--card-alt);
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}
.comment-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.comment-head .avatar-sm {
  --avatar-size-min: 36px;
  --avatar-size-max: 52px;
  --avatar-size: clamp(var(--avatar-size-min), 9vw, var(--avatar-size-max));
  width: var(--avatar-size);
  height: var(--avatar-size);
  font-size: 13px;
}
.comment-author {
  font-size: 13px;
  flex: 1;
  gap: 4px;
  font-weight: 600;
  text-overflow: ellipsis;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
  width: 28px;
  height: 18px;
  border-radius: 999px;
  background: #fff5ed;
  color: #ff914d;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.2px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  letter-spacing: 0.3px;
  color: var(--muted);
  display: none;
  color: var(--text);
}
.comment-actions {
  display: flex;
  justify-content: flex-end;
}
  width: 14px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  margin-right: 2px;
  background: var(--card);
  color: var(--text);
  width: 14px;
  height: 12px;
  stroke: #ff914d;
  stroke-width: 1.2px;
  fill: #fff5ed;
  display: block;
  font-size: 13px;
}
.comment-btn--bubble {
  display: inline-flex;
  align-items: flex-end;
  text-decoration: none;
  border: none;
  padding: 0;
  color: var(--muted);
  font-weight: 600;
}
.comment-bubble {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 0 16px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff2e7, #ffd9bf);
  border: 1px solid #ffb589;
  color: #b45309;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.2px;
  box-shadow: 0 3px 8px rgba(255, 138, 76, 0.25);
  font-variant-numeric: tabular-nums;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.comment-bubble::before {
  content: '';
  width: 14px;
  height: 14px;
  margin-right: 6px;
  flex: 0 0 auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23ff7b2f' d='M3 2.5A2.5 2.5 0 015.5 0h6A2.5 2.5 0 0114 2.5v4A2.5 2.5 0 0111.5 9H9.2l-2.2 2.6c-.5.6-1.5.1-1.3-.7l.3-1.9H5.5A2.5 2.5 0 013 6.5v-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}
.comment-bubble::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 14px;
  width: 10px;
  height: 10px;
  background: #fff2e7;
  border-left: 1px solid #ffb589;
  border-bottom: 1px solid #ffb589;
  transform: rotate(45deg);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.comment-btn--bubble:hover .comment-bubble,
.comment-count-pill:hover .comment-bubble,
.comments-modal-pill:hover .comment-bubble {
  background: linear-gradient(135deg, #ffe7d2, #ffc9a1);
  border-color: #ffa96c;
  color: #9d3b08;
  box-shadow: 0 4px 10px rgba(255, 138, 76, 0.35);
}
  font-weight: 700;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.comment-reply-cancel:hover { color: var(--accent); }
.preview-comment-replies {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.comment-reply-info.hidden { display: none !important; }
.comment-feedback {
  font-size: 13px;
  margin: 6px 0 12px;
  color: var(--muted);
  min-height: 16px;
}
.comment-feedback.is-error {
  color: var(--bad-text);
}
.comment-feedback.is-success {
  color: var(--ok-text);
}
.comment-feedback[hidden] {
  display: none;
}

.vote-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vote-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--card-alt);
}
.vote-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vote-row-author {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vote-row-meta {
  font-size: 11px;
  color: var(--muted);
}
.vote-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  white-space: nowrap;
}
.vote-chip--up {
  border-color: #4CAF50;
  color: #2E7D32;
  background: rgba(76,175,80,0.08);
}
.vote-chip--down {
  border-color: #C62828;
  color: #B71C1C;
  background: rgba(198,40,40,0.08);
}

.preview-head-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.preview-vote-link {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}
.preview-vote-link:hover,
.preview-vote-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.comment-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.comment-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.comment-btn--bubble {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  padding: 0;
  color: var(--muted);
}
.comment-btn--bubble:hover {
  color: var(--accent);
}
.comment-btn--bubble .comment-icon {
  width: 16px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 3px;
}
.comment-btn--bubble .comment-icon svg {
  width: 16px;
  height: 14px;
  stroke: #8d8d8d;
  stroke-width: 1.4px;
  fill: #ffffff;
  display: block;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.comments-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 30, 0.55);
  backdrop-filter: blur(6px);
  z-index: 2100;
  display: flex;
  transition: opacity 0.2s ease;
  align-items: center;
  justify-content: center;
  padding: 40px 18px;
}
.comments-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.comments-backdrop[hidden] {
  display: none !important;
}
.comments-modal {
  width: min(720px, 100%);
  max-height: 80vh;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  position: relative;
  transform: translateY(10px);
  transition: transform 0.2s ease;
}
.comments-backdrop.open .comments-modal {
  transform: translateY(0);
}
.comments-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--card-alt);
}
.comments-modal-label {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}
.comments-modal-title {
  margin: 6px 0 0;
  font-size: 18px;
  color: var(--heading);
}
.comment-count-pill,
.comments-modal-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  line-height: 1;
}
.comment-count-pill .comment-bubble::after,
.comments-modal-pill .comment-bubble::after {
  display: none;
}
.comment-count-pill-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
  color: var(--muted);
}
.comments-modal-body {
  padding: 16px 18px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.comments-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 10px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}
.comments-close:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.votes-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 30, 0.55);
  backdrop-filter: blur(6px);
  z-index: 2100;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 16px 30px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.votes-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.votes-backdrop[hidden] {
  display: none !important;
}
.votes-modal {
  width: min(640px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.28);
  position: relative;
  padding: 22px 24px 26px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transform: translateY(-8px);
  transition: transform 0.2s ease;
}
.votes-backdrop.open .votes-modal {
  transform: translateY(0);
}
.votes-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.votes-modal-label {
  margin: 0 0 4px;
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--muted);
}
.votes-modal-title {
  margin: 0;
  font-size: 22px;
  color: var(--heading);
}
.votes-modal-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card-alt);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.votes-modal-body {
  overflow: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
}
.votes-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 1px solid var(--line);
  background: var(--card-alt);
  color: var(--muted);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}
.votes-close:hover {
  color: var(--accent);
  border-color: var(--accent);
}
@media (max-width: 640px) {
  .votes-modal {
    padding: 18px;
    border-radius: 16px;
  }
  .votes-modal-title {
    font-size: 18px;
  }
}

.badge {
  display:inline-block; padding: .26rem .8rem; border-radius: 999px;
  font-size: 13px; border: 1px solid var(--line); font-weight: 600;
}
.badge-status {
  cursor: pointer;
  user-select: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.badge-status.is-active {
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}
.badge-status:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.badge.zaufane { background: var(--ok-bg); color: var(--ok-text); border-color: var(--ok-text) }
.badge.polecane { background: var(--warn-bg); color: var(--warn-text); border-color: var(--warn-text) }
.badge.niezaufane { background: var(--bad-bg); color: var(--bad-text); border-color: var(--bad-text) }

.status-tooltip {
  position: absolute;
  min-width: 240px;
  max-width: 320px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 25px 60px rgba(20,19,43,0.18);
  padding: 16px 18px;
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease;
}
.status-tooltip::before {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-right: none;
  border-bottom: none;
  top: -6px;
  left: var(--tooltip-caret-left, 32px);
  transform: rotate(45deg);
  box-shadow: -3px -3px 6px rgba(20,19,43,0.08);
}
.status-tooltip--above::before {
  top: auto;
  bottom: -6px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: none;
  border-top: none;
  transform: rotate(225deg);
  box-shadow: 3px 3px 6px rgba(20,19,43,0.08);
}
.status-tooltip.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.status-tooltip__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.status-tooltip__status {
  font-size: 16px;
  font-weight: 700;
  color: var(--heading);
}
.status-tooltip__close {
  border: none;
  background: var(--card-alt);
  color: var(--muted);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.status-tooltip__close:hover {
  color: var(--accent);
}
.status-tooltip__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.status-tooltip__item {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.status-tooltip__icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--card-alt);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.status-tooltip__value {
  font-weight: 700;
  color: var(--heading);
}
.status-tooltip__note {
  margin: 12px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.thumb {
  background: transparent; color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  padding: .42rem .64rem; cursor: pointer; transition: all 0.2s;
  font-weight: 600;
}
.thumb:disabled { opacity: .6; cursor: not-allowed }
.thumb:hover, .thumb:focus { 
  outline: 2px solid var(--focus); 
  border-color: var(--accent); 
  background: var(--accent-subtle) 
}

.thumb.is-selected {
  font-weight: 700;
  color: #fff;
}
.thumb-up.is-selected { 
  background: #4CAF50;
  border-color: #4CAF50;
  box-shadow: 0 0 0 3px rgba(76,175,80,0.2);
  color: #fff;
}
.thumb-down.is-selected { 
  background: #C62828;
  border-color: #C62828;
  box-shadow: 0 0 0 3px rgba(198,40,40,0.2);
  color: #fff;
}

.muted { color: var(--muted) }

.avatar-sm { 
  --avatar-size-min: 36px;
  --avatar-size-max: 52px;
  --avatar-size: clamp(var(--avatar-size-min), 8vw, var(--avatar-size-max));
  display:inline-flex;
  width:var(--avatar-size);
  height:var(--avatar-size);
  max-width:100%;
  max-height:100%;
  border-radius:6px;
  background: transparent;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:700;
  color: #ffffff;
  padding:0;
  border:none;
}
.avatar-sm.avatar-sm--img {
  padding:0;
  background:transparent;
  border:none;
}
.avatar-sm img {
  width:100%;
  height:100%;
  border-radius:inherit;
  object-fit:contain;
  object-position:center;
  display:block;
}

.section { margin-bottom: 48px }

/* Hero section */
.hero {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
  margin: 32px 0;
}
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
}
.hero h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 16px 0;
  color: var(--heading);
}
.hero p {
  font-size: 18px;
  margin: 0 0 24px 0;
}
.searchbar {
  display: flex;
  gap: 12px;
}
.searchbar form {
  flex: 1;
  display: flex;
}
.searchbar form input {
  flex: 1;
}
.searchbar input {
  font-size: 16px;
  padding: .8rem 1rem;
}
.filter-form {
  margin: 24px 0 18px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.filter-form input {
  flex: 1;
}

/* —— Wszystkie strony (/links/index.php) —— */
.filter-form--all-sites {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin: 20px 0 18px;
}

.filter-form__field {
  min-width: 0;
}

.filter-form__label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
  color: #475569;
}

.filter-form--all-sites input,
.filter-form--all-sites select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 15px;
  background: #fff;
  color: #0f172a;
  font-family: inherit;
}

.filter-form__submit {
  height: fit-content;
  padding: 12px 24px;
  white-space: nowrap;
}

.all-sites-body .card {
  padding: 18px 16px;
}

.all-sites-body .site-card--giant {
  border-left: 3px solid #ffd700;
}

.site-card__count--views {
  color: var(--muted);
  font-weight: 600;
}

@media (max-width: 800px) {
  .filter-form--all-sites {
    grid-template-columns: 1fr;
  }
  .filter-form__submit {
    width: 100%;
  }
}


.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.panel strong {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--heading);
}
.panel-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.panel-stack p {
  margin: 0;
}


.page-banner {
  margin-top: 28px;
  padding: 32px;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,0.6);
  background: linear-gradient(120deg, rgba(255,255,255,0.95), rgba(250,246,255,0.9));
  box-shadow: 0 25px 50px rgba(20,19,43,0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}
.page-banner h1 {
  margin: 0 0 8px;
  font-size: 36px;
  color: var(--heading);
}
.page-banner p {
  margin: 0;
  color: var(--muted);
  max-width: 520px;
}
.page-banner .stat-grid {
  flex: 1;
  min-width: 220px;
}
.page-banner .banner-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.04);
  color: var(--muted);
  font-size: 12px;
}
.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.btn-row--end {
  justify-content: flex-end;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-subtle);
  color: var(--accent);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}
.stat-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.9);
  padding: 16px 18px;
  box-shadow: 0 14px 35px rgba(20,19,43,0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-card .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
}
.stat-card strong {
  font-size: 28px;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.1;
}
.stat-card small {
  font-size: 12px;
  color: var(--muted);
}
.stat-card.accent {
  background: linear-gradient(125deg, #1E1B4B, #4C1D95);
  color: #FDF7FF;
  border-color: transparent;
  box-shadow: 0 20px 40px rgba(36,27,77,0.35);
}
.stat-card.accent .label,
.stat-card.accent small {
  color: rgba(255,255,255,0.7);
}
.stat-card.accent strong {
  color: #FFFFFF;
}

/* --- Mobile/responsive tweaks --- */
@media (max-width: 900px) {
  .wrap { padding: 16px; }
  .nav { flex-direction: column; align-items: flex-start; gap: 10px; }
  .menu { width: 100%; flex-wrap: wrap; gap: 8px; }
  .menu .btn { flex: 1 1 calc(50% - 8px); justify-content: center; }
  .menu .btn.outline, .menu .btn { width: auto; }
  .hero { gap: 18px; margin: 22px 0; }
  .hero h1 { font-size: 34px; }
  .hero p { font-size: 16px; }
  .searchbar { flex-direction: column; }
  .searchbar form { width: 100%; }
  .searchbar .input, .searchbar button { width: 100%; }
  .page-banner { flex-direction: column; align-items: flex-start; }
  .page-banner h1 { font-size: 28px; }
  .table th, .table td { padding: 12px 10px; font-size: 14px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .vote-row { flex-direction: column; align-items: flex-start; }
  .vote-chip { align-self: flex-start; }
  .preview-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .preview-head-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .wrap { padding: 12px; }
  .menu .btn { flex: 1 1 100%; }
  .hero h1 { font-size: 30px; }
  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .page-banner { padding: 22px; }
  .page-banner .banner-actions { width: 100%; }
  .btn { justify-content: center; }
  .btn.outline { text-align: center; }
  .comment-card { padding: 10px 12px; }
  .vote-row { gap: 8px; }
  .status-tooltip { max-width: 90vw; }
  /* Prevent Chrome Android auto-zoom on inputs */
  input, input[type="text"], input[type="email"], input[type="password"], 
  input[type="number"], input[type="url"], input[type="search"], 
  textarea, select {
    font-size: 16px !important;
  }
  /* Force word wrap on mobile to prevent overflow */
  * {
    word-wrap: break-word;
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphens: auto;
  }
  /* Prevent specific elements from causing horizontal scroll */
  .nav, .menu, .hero, .searchbar, .page-banner, 
  .table-wrap, .card, .btn, .input, header, footer {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
}

@media (max-width: 760px) {
  #topTableWrap { overflow: visible; }
  .table.votes, #rankingTable { display: block; border-collapse: separate; border-spacing: 0; }
  .table.votes thead, #rankingTable thead { display: none; }
  .table.votes tbody, #rankingTable tbody { display: flex; flex-direction: column; gap: 12px; }
  .table.votes tr, #rankingTable tr {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border: 1px solid #e9edf3;
    border-radius: 18px;
    padding: 14px;
    background: linear-gradient(180deg,#ffffff 0%,#fbfbfd 100%);
    box-shadow: 0 12px 24px rgba(20,19,43,0.08);
  }
  .table.votes td, #rankingTable td {
    padding: 0;
    border: 0;
    flex: 1 1 100%;
  }
  .table.votes td[data-label]::before, #rankingTable td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }
  .table.votes td[data-label="Domena"],
  #rankingTable td[data-label="Domena"] { order: 1; }
  .table.votes td[data-label="Status"],
  #rankingTable td[data-label="Status"] { order: 2; }
  .table.votes td[data-label="👍"],
  #rankingTable td[data-label="👍"] { order: 3; }
  .table.votes td[data-label="👎"],
  #rankingTable td[data-label="👎"] { order: 4; }
  .table.votes td[data-label="Akcje"],
  #rankingTable td[data-label="Akcje"] { order: 5; }
  .table.votes td[data-label="Status"],
  #rankingTable td[data-label="Status"] { flex: 0 0 auto; }
  .table.votes td[data-label="👍"],
  .table.votes td[data-label="👎"],
  #rankingTable td[data-label="👍"],
  #rankingTable td[data-label="👎"] {
    flex: 1 1 calc(50% - 6px);
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-weight: 700;
    padding: 10px 12px;
    border: 1px solid #eef1f6;
    border-radius: 12px;
    background: #f8fafc;
    min-width: 120px;
  }
  .table.votes td[data-label="👍"]::before,
  .table.votes td[data-label="👎"]::before,
  #rankingTable td[data-label="👍"]::before,
  #rankingTable td[data-label="👎"]::before {
    margin-bottom: 0;
  }
  .table.votes td[data-label="Status"] .badge,
  #rankingTable td[data-label="Status"] .badge {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 999px;
  }
  .table.votes td .comment-btn--bubble,
  #rankingTable td .comment-btn--bubble { margin-right: 8px; }
  .vote-actions { gap: 8px; }
  .vote-actions .thumb { flex: 1 1 48%; min-height: 40px; }
  .vote-actions .btn { flex: 1 1 100%; min-height: 42px; font-size: 14px; padding: 10px 12px; }
}

  /* --- Trust help (strona główna, lista stron) --- */
  .trust-help {
    margin: 0 0 24px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--card);
    padding: 12px 16px;
  }
  .trust-help summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--heading);
    list-style: none;
  }
  .trust-help summary::-webkit-details-marker { display: none; }
  .trust-help-body {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
  }
  .trust-help-body p { margin: 0 0 8px; }
  .top-rankings-note {
    font-size: 13px;
    margin: 0 0 12px;
    line-height: 1.45;
  }

  /* --- Footer --- */
  .site-footer { margin-top: 36px; background: rgba(255,255,255,0.92); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(20,19,43,0.06); backdrop-filter: blur(12px); }
  .footer-wrap { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 20px; flex-wrap:wrap; }
  .footer-main { display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-weight:600; color: var(--text); }
  .footer-label { color: var(--muted); font-size:14px; font-weight:700; letter-spacing:0.01em; text-transform:uppercase; }
  .footer-links { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
  .footer-link { color: var(--accent); font-weight:700; }
  .footer-link:hover { opacity:0.85; }
  .footer-sep { color: var(--muted); }

/* —— Skip link (a11y) —— */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 10001;
  padding: 12px 20px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border-radius: 0 0 12px 0;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  overflow: visible;
}

/* —— Downvote modal —— */
.downvote-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 16px;
}
.downvote-modal__panel {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.downvote-modal__title {
  margin: 0 0 16px;
  font-size: 18px;
  color: #334155;
}
.downvote-modal__options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.downvote-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px;
  border-radius: 8px;
  transition: background 0.2s;
}
.downvote-option:hover {
  background: #f8fafc;
}
.downvote-option input {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #C62828;
}
.downvote-option span {
  font-size: 14px;
  color: #475569;
}
.downvote-modal__textarea {
  display: none;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
  width: 100%;
}
.downvote-modal__error {
  display: none;
  margin-top: 6px;
  padding: 8px 12px;
  background: #fee2e2;
  border-left: 3px solid #ef4444;
  border-radius: 6px;
  font-size: 13px;
  color: #991b1b;
  font-weight: 500;
}
.downvote-modal__actions {
  display: flex;
  gap: 8px;
}
.downvote-modal__submit {
  flex: 1;
  padding: 10px 16px;
  background: #C62828;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.downvote-modal__submit:hover {
  background: #991f1f;
}
.downvote-modal__cancel {
  padding: 10px 16px;
  background: #f1f5f9;
  color: #475569;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.downvote-modal__cancel:hover {
  background: #e2e8f0;
}
