/* desktop */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Rajdhani:wght@500;600;700&family=Share+Tech+Mono&display=swap');

  :root {
    --bg: #0c0b0b;
    --surface: #121110;
    --surface2: #1a1817;
    --border: #252220;
    --border-bright: #36322e;
    --accent: #c9a84e;
    --accent-dim: #7a6a30;
    --accent-bg: #1e1a0e;
    --buff: #5cb87a;
    --buff-bg: #152e1e;
    --nerf: #d45454;
    --nerf-bg: #2e1616;
    --text: #bcb5ab;
    --text-dim: #5e5750;
    --text-bright: #e4ded6;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  /* Global focus indicator — keyboard users get a clear accent outline;
     mouse/touch users get nothing (focus-visible only fires for keyboard). */
  :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  :focus:not(:focus-visible) {
    outline: none;
  }

  /* Respect user motion preferences */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    min-height: 100vh;
    padding: 24px;
  }


  .filter-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    flex-wrap: wrap;
  }

  .filter-btn {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 6px 14px;
    border: 1px solid var(--border-bright);
    background: var(--surface);
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.1s;
  }

  .filter-btn:hover, .filter-btn.active {
    background: var(--surface2);
    color: var(--accent);
    border-color: var(--accent-dim);
  }

  .section-header {
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 10px 0 6px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 6px;
  }

  .hero-grid {
    display: flex;
    gap: 3px;
    align-items: flex-start;
  }
  .hero-grid > .grid-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .hero-row {
    border: 1px solid var(--border);
    background: var(--surface);
    overflow: hidden;
    transition: border-color 0.15s;
  }

  .hero-row.net-buff { border-left: 2px solid var(--buff); }
  .hero-row.net-nerf { border-left: 2px solid var(--nerf); }
  .hero-row.net-even { border-left: 2px solid var(--accent-dim); }
  .hero-row:hover { border-color: var(--accent-dim); }
  .hero-row.hidden { display: none; }

  .hero-header {
    display: flex;
    align-items: center;
    padding: 0 10px 0 4px;
    height: 40px;
    cursor: pointer;
    user-select: none;
    gap: 6px;
    /* Reset <button> defaults */
    width: 100%;
    text-align: left;
    font: inherit;
    color: inherit;
    border: none;
    background: none;
  }

  .hero-header:hover { background: #161413; }

  .hero-portrait {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
  }

  .hero-name {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-bright);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .count-badge {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
  }

  .count-badge.buff {
    background: var(--buff-bg);
    color: var(--buff);
    border: 1px solid #2a5a3d;
  }

  .count-badge.nerf {
    background: var(--nerf-bg);
    color: var(--nerf);
    border: 1px solid #5a2a2a;
  }

  .expand-arrow {
    color: var(--text-dim);
    font-family: 'Share Tech Mono', monospace;
    font-variant-emoji: text;
    font-size: 10px;
    transition: transform 0.2s;
    flex-shrink: 0;
    width: 12px;
    text-align: center;
  }

  .hero-row.open .expand-arrow { transform: rotate(90deg); }

  .hero-body {
    display: none;
    border-top: 1px solid var(--border);
    background: #0e0d0c;
  }

  .hero-row.open .hero-body { display: block; }

  .change-list { padding: 6px 0; }

  .change-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 12px 4px 14px;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
  }

  .change-item:hover { background: #141312; }

  .change-arrow {
    font-family: 'Share Tech Mono', monospace;
    font-variant-emoji: text;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
    width: 10px;
  }

  .change-item.up .change-arrow { color: var(--buff); }
  .change-item.down .change-arrow { color: var(--nerf); }
  .change-item.neutral .change-arrow { color: var(--text-dim); }
  .change-item.up .change-text { color: #a0d4ac; }
  .change-item.down .change-text { color: #d8a8a8; }
  .change-item.neutral .change-text { color: var(--text-dim); }

  .page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 24px;
    margin-bottom: 0;
    background: var(--surface);
    border: 1px solid var(--border-bright);
    border-bottom: none;
  }



  .header-left {
    flex: 1;
    min-width: 0;
  }

  .header-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 38px;
    font-weight: 400;
    letter-spacing: 5px;
    color: var(--text-bright);
    line-height: 1;
    margin-bottom: 6px;
    text-transform: uppercase;
  }

  .header-date {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    color: var(--text-dim);
    letter-spacing: 1px;
  }

  .original-link {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 0.5px;
    opacity: 0.8;
    transition: opacity 0.15s;
  }

  .original-link:hover { opacity: 1; text-decoration: underline; }

  .header-notice {
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    color: var(--accent);
    opacity: 0.85;
    margin-top: 4px;
    letter-spacing: 0.5px;
  }
  .header-patches {
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.5px;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(255, 193, 7, 0.08);
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 6px;
    display: inline-block;
    max-width: 100%;
  }
  .header-patches .patch-link,
  .header-patches .patch-link:visited,
  .header-thread .patch-link,
  .header-thread .patch-link:visited {
    color: var(--accent);
    text-decoration: none;
  }
  .header-patches .patch-link:hover,
  .header-thread .patch-link:hover { text-decoration: underline; }
  .header-patches .patch-sep { opacity: 0.6; margin: 0 6px; }
  .header-patches .patch-current,
  .header-thread .patch-current { text-decoration: underline; }
  .patch-thread-btn, .patches-more-btn {
    font: inherit;
    font-size: 11px;
    color: var(--accent-dim);
    background: none;
    border: 1px solid var(--border-bright);
    border-radius: 3px;
    padding: 0 5px;
    cursor: pointer;
    vertical-align: middle;
    line-height: 1.6;
    margin-left: 3px;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
  }
  .patch-thread-btn:hover, .patches-more-btn:hover { color: var(--accent); border-color: var(--accent-dim); }
  .patch-thread-btn.active { color: var(--accent); border-color: var(--accent-dim); background: rgba(255,193,7,0.1); }

  .header-thread {
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.5px;
    margin-top: 4px;
    padding: 6px 12px;
    background: rgba(255, 193, 7, 0.04);
    border: 1px solid rgba(255, 193, 7, 0.15);
    border-radius: 6px;
    max-width: 100%;
  }
  .header-thread:not([hidden]) { display: block; }
  .thread-label { color: var(--text-dim); font-weight: 400; margin-right: 4px; }

  .header-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 320px;
  }

  .stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }

  .stat-box {
    border: 1px solid var(--border-bright);
    background: #0c0b0a;
    padding: 5px 10px;
  }

  .stat-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dim);
    display: block;
    margin-bottom: 2px;
  }

  .stat-value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 1px;
  }

  .stat-value.neutral { color: var(--text-bright); }
  .stat-value.green { color: var(--buff); }
  .stat-value.red { color: var(--nerf); }

  .bar-chart {
    background: #0c0b0a;
    border: 1px solid var(--border-bright);
    padding: 6px 10px;
  }

  .bar-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 8px;
  }

  .bar-track {
    display: flex;
    height: 6px;
    background: #0a0909;
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 6px;
  }

  .bar-fill { height: 100%; }
  .buff-bar { background: var(--buff); }
  .nerf-bar { background: var(--nerf); }

  .bar-legend {
    display: flex;
    justify-content: space-between;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
  }

  .leg.buff { color: var(--buff); }
  .leg.nerf { color: var(--nerf); }

  /* tabs */
  .tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    border-left: 1px solid var(--border-bright);
    border-right: 1px solid var(--border-bright);
    background: var(--surface);
    padding: 0 32px;
    margin-bottom: 16px;
  }

  .tab {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 10px 22px;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: none;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
  }

  .tab:hover { color: var(--text); }
  .tab.active { color: var(--accent); border-bottom-color: var(--accent); }

  .tab-count {
    display: inline-block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    background: var(--surface2);
    color: var(--text-dim);
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
    transition: background 0.15s, color 0.15s;
  }
  .tab.active .tab-count {
    background: var(--accent-bg);
    color: var(--accent);
  }

  .tab-section { display: none; }
  .tab-section.active { display: block; }

  .site-footer {
    margin-top: 32px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--text-dim);
    flex-wrap: wrap;
    gap: 8px;
  }

  .site-footer a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s;
  }

  .site-footer a:hover { color: var(--text-bright); }

  .search-bar {
    position: relative;
    margin-bottom: 14px;
  }

  .search-input {
    width: 100%;
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    letter-spacing: 1px;
    padding: 10px 14px 10px 36px;
    background: var(--surface);
    border: 1px solid var(--border-bright);
    color: var(--text-bright);
    outline: none;
    transition: border-color 0.15s;
  }

  .search-input::placeholder {
    color: var(--text-dim);
    letter-spacing: 1.5px;
    font-size: 11px;
    text-transform: uppercase;
  }

  .search-input:focus {
    border-color: var(--accent-dim);
  }

  .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 13px;
    pointer-events: none;
  }

  .search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 16px;
    cursor: pointer;
    display: none;
    padding: 2px 6px;
    font-family: 'Rajdhani', sans-serif;
  }

  .search-clear:hover { color: var(--accent); }
  .search-clear.visible { display: block; }

  .change-text mark {
    background: var(--accent-bg);
    color: var(--accent);
    padding: 0 1px;
    border-radius: 1px;
  }

  .ability-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 2px;
    margin-top: 2px;
    border-top: 1px solid var(--border);
  }

  .ability-group:first-child {
    border-top: none;
    margin-top: 0;
  }

  .ability-icon {
    width: 24px;
    height: 24px;
    border-radius: 3px;
    flex-shrink: 0;
  }

  .ability-label {
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dim);
  }

  /* tablet */
  @media (max-width: 900px) {
    .hero-grid { flex-direction: column; }
    .hero-grid > .grid-col { display: contents; }
    .page-header { flex-direction: column; gap: 16px; padding: 20px; }
    .header-right { min-width: 0; width: 100%; }
    .header-title { font-size: 38px; letter-spacing: 4px; }
  }

  /* mobile */
  @media (max-width: 600px) {
    body { padding: 0; }
    .page-header { border-radius: 0; border-left: none; border-right: none; padding: 16px; gap: 14px; }
    .header-title { font-size: 28px; letter-spacing: 3px; margin-bottom: 4px; }
    .header-right { min-width: 0; width: 100%; gap: 10px; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 3px; }
    .stat-box { padding: 6px 8px; }
    .stat-label { font-size: 10px; letter-spacing: 1px; }
    .header-patches { max-width: 100%; overflow-x: auto; }
    .stat-value { font-size: 20px; }
    .bar-chart { padding: 8px 10px; }
    .tabs { padding: 0 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; border-left: none; border-right: none; }
    .tab { padding: 10px 14px; font-size: 12px; letter-spacing: 1.5px; white-space: nowrap; }
    .search-bar { padding: 0 10px; }
    .search-input { font-size: 12px; padding: 10px 14px 10px 32px; border-left: none; border-right: none; border-radius: 0; }
    .search-icon { font-size: 12px; left: 20px; }
    .filter-bar { gap: 5px; padding: 0 10px; }
    .filter-btn { padding: 8px 12px; font-size: 11px; letter-spacing: 1px; }
    .section-header { font-size: 12px; letter-spacing: 2px; padding: 10px 10px 6px; }
    .hero-grid { flex-direction: column; gap: 0; align-items: stretch; }
    .hero-grid > .grid-col { display: contents; }
    .hero-row { border-radius: 0; border: none; border-bottom: 1px solid var(--border); }
    .hero-row.net-buff { border-left: 3px solid var(--buff); }
    .hero-row.net-nerf { border-left: 3px solid var(--nerf); }
    .hero-row.net-even { border-left: 3px solid var(--accent-dim); }
    .hero-header { padding: 0 10px 0 6px; height: 44px; }
    .hero-body { word-break: break-word; overflow-wrap: break-word; }
    .hero-portrait { width: 28px; height: 28px; }
    .hero-name { font-size: 13px; letter-spacing: 1px; }
    .count-badge { font-size: 10px; padding: 2px 5px; }
    .change-item { padding: 5px 10px 5px 14px; font-size: 12.5px; }
    .site-footer { padding: 16px 10px; }
  }