/* PolyBotRank — review-site stylesheet
   Rating-band colours follow the convention users already read fluently from
   review sites: red-to-green across five bands. Everything else is our own. */

:root {
  --brand:        #00875a;
  --brand-ink:    #006644;
  --bg:           #f4f6f8;
  --card:         #ffffff;
  --ink:          #16191d;
  --ink-2:        #4b5563;
  --ink-3:        #77808c;
  --line:         #e0e4e9;
  --line-2:       #eef1f4;
  --shadow:       0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --shadow-lg:    0 4px 6px -1px rgba(16,24,40,.07), 0 10px 22px -6px rgba(16,24,40,.10);
  --radius:       10px;
  --maxw:         1140px;

  --r1: #e2372a;  /* 1 star */
  --r2: #ef7d20;  /* 2 star */
  --r3: #e5b400;  /* 3 star */
  --r4: #62b510;  /* 4 star */
  --r5: #00875a;  /* 5 star */

  --host:  #6d4aff;
  --host-bg: #f1edff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #2bd9a0; --brand-ink: #6ef0c2;
    --bg: #0e1116; --card: #161a21; --ink: #e8ecf1; --ink-2: #a7b0bd; --ink-3: #7d8794;
    --line: #262c36; --line-2: #1e242c;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 10px 26px -8px rgba(0,0,0,.55);
    --r5: #2bd9a0; --r4: #7fd63a; --host: #a690ff; --host-bg: #241d3d;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ── header ───────────────────────────────────────────────── */
.site-head {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.site-head .wrap {
  display: flex; align-items: center; gap: 28px;
  height: 62px;
}
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18px; color: var(--ink); letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 26px; height: 26px; border-radius: 6px; flex: none;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 15px; font-weight: 800;
}
.nav { display: flex; gap: 22px; margin-left: auto; font-size: 14.5px; }
.nav a { color: var(--ink-2); font-weight: 500; }
.nav a:hover { color: var(--brand-ink); }

/* ── disclosure banner ────────────────────────────────────── */
.disclosure-bar {
  background: var(--host-bg);
  border-bottom: 1px solid var(--line);
  font-size: 13.5px; color: var(--ink-2);
}
.disclosure-bar .wrap { padding-top: 10px; padding-bottom: 10px; }
.disclosure-bar strong { color: var(--ink); }

/* ── hero ─────────────────────────────────────────────────── */
.hero { padding: 46px 0 30px; }
.hero h1 {
  margin: 0 0 12px; font-size: 40px; line-height: 1.15;
  letter-spacing: -.03em; font-weight: 800;
}
.hero p { margin: 0; font-size: 17.5px; color: var(--ink-2); max-width: 720px; }
.hero .meta { margin-top: 16px; font-size: 13.5px; color: var(--ink-3); }

/* ── table ────────────────────────────────────────────────── */
.table-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; margin-bottom: 34px;
}
.table-scroll { overflow-x: auto; }
table.rank { width: 100%; border-collapse: collapse; min-width: 880px; }
table.rank thead th {
  text-align: left; font-size: 12px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-3); font-weight: 700;
  padding: 13px 16px; background: var(--line-2);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.rank td { padding: 15px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.rank tbody tr:last-child td { border-bottom: 0; }
table.rank tbody tr:hover { background: var(--line-2); }

.rk { font-size: 19px; font-weight: 800; color: var(--ink-3); width: 44px; text-align: center; }
.rk-1, .rk-2, .rk-3 { color: var(--brand); }

.botcell { display: flex; align-items: center; gap: 12px; min-width: 230px; }
.avatar {
  width: 40px; height: 40px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-ink));
}
.footlogo {
  width: 16px; height: 16px; border-radius: 4px;
  vertical-align: -3px; margin-right: 7px;
}

.avatar-logo {
  /* A real brand logo brings its own shape and colour, so the initials tile's
     gradient has to come off — otherwise it shows through the artwork's corners.
     overflow:hidden re-applies our corner radius to logos that ship square. */
  background: none;
  padding: 0;
  overflow: hidden;
}
.avatar-logo img { width: 100%; height: 100%; display: block; object-fit: contain; }

.botname { font-weight: 700; color: var(--ink); font-size: 15.5px; display: block; letter-spacing: -.01em; }
.botname:hover { color: var(--brand-ink); }
.botdom { font-size: 12.5px; color: var(--ink-3); }

.score-pill {
  display: inline-block; font-weight: 800; font-size: 15px;
  padding: 3px 10px; border-radius: 6px; color: #fff; min-width: 46px; text-align: center;
}
.np { color: var(--ink-3); font-size: 13.5px; font-style: italic; }
.cellnum { font-variant-numeric: tabular-nums; font-size: 14.5px; }

/* ── stars ────────────────────────────────────────────────── */
.stars { display: inline-flex; gap: 2.5px; vertical-align: middle; }
.stars i {
  width: 19px; height: 19px; border-radius: 3px; display: block;
  background: #d7dce2; position: relative;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stars i { background: #2c333d; } }
.stars i::after {
  content: "★"; position: absolute; inset: 0;
  color: #fff; font-size: 12px; line-height: 19px; text-align: center;
}
.stars i.on-1 { background: var(--r1); } .stars i.on-2 { background: var(--r2); }
.stars i.on-3 { background: var(--r3); } .stars i.on-4 { background: var(--r4); }
.stars i.on-5 { background: var(--r5); }
.stars.sm i { width: 15px; height: 15px; }
.stars.sm i::after { font-size: 9.5px; line-height: 15px; }
.stars.lg i { width: 27px; height: 27px; border-radius: 4px; }
.stars.lg i::after { font-size: 17px; line-height: 27px; }

/* ── review page ──────────────────────────────────────────── */
.crumbs { font-size: 13px; color: var(--ink-3); padding: 18px 0 0; }
.crumbs a { color: var(--ink-3); }

.review-head {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 28px; margin: 16px 0 26px;
  display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: center;
}
.review-head .avatar { width: 62px; height: 62px; border-radius: 13px; font-size: 23px; }
.rh-main { display: flex; gap: 18px; align-items: center; }
.rh-main h1 { margin: 0 0 5px; font-size: 30px; letter-spacing: -.025em; font-weight: 800; }
.rh-main .sub { color: var(--ink-2); font-size: 14.5px; }
.rh-score { text-align: center; flex: none; }
.rh-score .num { font-size: 42px; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.rh-score .out { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; }
.rh-score .stars { margin-top: 9px; }

.grid { display: grid; grid-template-columns: 1fr 320px; gap: 26px; align-items: start; }

.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px 26px; margin-bottom: 22px;
}
.panel h2 {
  margin: 0 0 14px; font-size: 19px; letter-spacing: -.02em; font-weight: 750;
  padding-bottom: 11px; border-bottom: 1px solid var(--line-2);
}
.panel h3 { margin: 20px 0 9px; font-size: 15px; font-weight: 700; }
.panel p { margin: 0 0 13px; color: var(--ink-2); }
.panel p:last-child { margin-bottom: 0; }

.verdict { border-left: 3px solid var(--brand); background: color-mix(in srgb, var(--brand) 5%, var(--card)); }

ul.pc { list-style: none; padding: 0; margin: 0; }
ul.pc li { position: relative; padding: 6px 0 6px 27px; color: var(--ink-2); font-size: 14.8px; }
ul.pc li::before {
  position: absolute; left: 0; top: 6px; font-weight: 800; font-size: 14px;
  width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: #fff;
}
ul.pc.pros li::before { content: "✓"; background: var(--r5); }
ul.pc.cons li::before { content: "−"; background: var(--r2); }

.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }

table.stats { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.stats td { padding: 9px 0; border-bottom: 1px solid var(--line-2); }
table.stats tr:last-child td { border-bottom: 0; }
table.stats td:first-child { color: var(--ink-3); }
table.stats td:last-child { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }

.sidebar .panel { padding: 20px 22px; }
.kv { font-size: 14px; }
.kv dt { color: var(--ink-3); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; margin-top: 15px; }
.kv dt:first-child { margin-top: 0; }
.kv dd { margin: 4px 0 0; font-weight: 600; }

.btn {
  display: block; text-align: center; background: var(--brand); color: #fff;
  font-weight: 700; padding: 12px 18px; border-radius: 8px; font-size: 15px; margin-top: 18px;
}
.btn:hover { background: var(--brand-ink); text-decoration: none; color: #fff; }

.bars { margin: 0; }
.bar-row { margin-bottom: 14px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-top { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 5px; }
.bar-top span:first-child { color: var(--ink-2); font-weight: 600; }
.bar-top span:last-child { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bar { height: 7px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: var(--brand); }

/* ── user reviews (empty state, ready for real submissions) ── */
.empty {
  text-align: center; padding: 34px 20px; color: var(--ink-3);
  border: 1px dashed var(--line); border-radius: 8px; font-size: 14.5px;
}
.empty strong { display: block; color: var(--ink-2); font-size: 15.5px; margin-bottom: 6px; }

.note {
  font-size: 13px; color: var(--ink-3); background: var(--line-2);
  border-radius: 7px; padding: 11px 14px; margin-top: 16px; line-height: 1.55;
}

/* ── cards on index ───────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 34px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; display: block; color: inherit;
  transition: box-shadow .16s ease, transform .16s ease;
}
.card:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card .top { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.card h3 { margin: 0; font-size: 17px; letter-spacing: -.015em; }
.card .tag { font-size: 12.5px; color: var(--ink-3); }
.card p { margin: 12px 0 0; font-size: 14.2px; color: var(--ink-2); line-height: 1.55; }

.sec-title { font-size: 23px; font-weight: 750; letter-spacing: -.025em; margin: 0 0 6px; }
.sec-sub { color: var(--ink-2); margin: 0 0 20px; font-size: 15px; }

/* ── footer ───────────────────────────────────────────────── */
.site-foot {
  border-top: 1px solid var(--line); background: var(--card);
  margin-top: 50px; padding: 30px 0; font-size: 13.5px; color: var(--ink-3);
}
.site-foot .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; margin-bottom: 24px; }
.site-foot h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: 7px; }
.site-foot a { color: var(--ink-3); }
.legal { border-top: 1px solid var(--line-2); padding-top: 18px; line-height: 1.6; }

@media (max-width: 900px) {
  .grid, .proscons, .cards, .site-foot .cols { grid-template-columns: 1fr; }
  .review-head { grid-template-columns: 1fr; }
  .rh-score { text-align: left; }
  .hero h1 { font-size: 31px; }
  .nav { gap: 15px; font-size: 13.5px; }
  .site-head .wrap { gap: 14px; }
}
