/* Comb — the inside of a hive.
   Propolis-brown walls, beeswax text, honey for the things that matter.
   Hexagons only ever stand for a player. */

@font-face {
  font-family: 'Fredoka';
  src: url('/static/fonts/fredoka-var-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-stretch: 75% 125%;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow';
  src: url('/static/fonts/barlow-400-latin.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow';
  src: url('/static/fonts/barlow-600-latin.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Semi Condensed';
  src: url('/static/fonts/barlow-sc-500-latin.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Semi Condensed';
  src: url('/static/fonts/barlow-sc-700-latin.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --hive: #1d150c;
  --hive-2: #221910;
  --cell: #2a1f12;
  --cell-2: #33271a;
  --wall: #463421;
  --wall-soft: #34271a;
  --wax: #f6e8c6;
  --wax-2: #cbb791;
  --wax-3: #9e8a6a;
  --honey: #f5a300;
  --honey-hi: #ffc23d;
  --honey-deep: #c98200;
  --on-honey: #231705;
  --red: #ef6248;
  --blue: #5a8fe0;
  --clover: #82d862;
  --discord: #5865f2;
  --discord-hi: #6b77f5;

  /* Achievement tiers, named after bee rarities. */
  --t1: #b39a76;
  --t2: #cfd5dc;
  --t3: #f5c03a;
  --t4: #4fd0e6;
  --t5: #c27cf0;
  --t6: #82d862;

  --f-display: 'Fredoka', 'Trebuchet MS', sans-serif;
  --f-text: 'Barlow', 'Segoe UI', system-ui, sans-serif;
  --f-data: 'Barlow Semi Condensed', 'Barlow', 'Segoe UI', system-ui, sans-serif;

  --fs-0: 0.8125rem;
  --fs-1: 0.9375rem;
  --fs-2: 1.0625rem;
  --fs-3: 1.3125rem;
  --fs-4: 1.6875rem;
  --fs-5: 2.1875rem;
  --fs-6: clamp(2.5rem, 5.4vw, 4rem);

  --r-panel: 14px;
  --r-ctl: 10px;
  --r-chip: 6px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--hive);
  color: var(--wax);
  font: 400 var(--fs-2) / 1.55 var(--f-text);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--honey-hi);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--wax);
}

:focus-visible {
  outline: 2px solid var(--wax);
  outline-offset: 2px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-stretch: 108%;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-5);
}
h2 {
  font-size: var(--fs-4);
}
h3 {
  font-size: var(--fs-3);
}

p {
  margin: 0;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.muted {
  color: var(--wax-2);
}

.num {
  font-family: var(--f-data);
  font-variant-numeric: tabular-nums;
}

.hidden {
  display: none !important;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--honey);
  color: var(--on-honey);
  padding: 8px 14px;
  border-radius: var(--r-chip);
  font-weight: 600;
}
.skip:focus {
  left: 8px;
}

/* ------------------------------ buttons ------------------------------ */

.btn {
  --bg: var(--cell);
  --fg: var(--wax);
  --bd: var(--wall);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--bd);
  border-radius: var(--r-ctl);
  background: var(--bg);
  color: var(--fg);
  font: 600 var(--fs-2) / 1 var(--f-display);
  font-stretch: 104%;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s, transform 0.08s;
}
.btn:hover {
  --bg: var(--cell-2);
  color: var(--fg);
}
.btn:active {
  transform: translateY(1px);
}
.btn[disabled],
.btn[aria-disabled='true'] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.btn-honey {
  --bg: var(--honey);
  --fg: var(--on-honey);
  --bd: var(--honey);
}
.btn-honey:hover {
  --bg: var(--honey-hi);
  --bd: var(--honey-hi);
}

.btn-discord {
  --bg: var(--discord);
  --fg: #fff;
  --bd: var(--discord);
}
.btn-discord:hover {
  --bg: var(--discord-hi);
  --bd: var(--discord-hi);
}

.btn-ghost {
  --bg: transparent;
}
.btn-ghost:hover {
  --bg: var(--cell);
}

.btn-danger {
  --bg: transparent;
  --fg: var(--red);
  --bd: color-mix(in srgb, var(--red) 55%, var(--hive));
}
.btn-danger:hover {
  --bg: color-mix(in srgb, var(--red) 12%, var(--hive));
}

.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: var(--fs-1);
}

.btn-lg {
  min-height: 52px;
  padding: 0 24px;
  font-size: var(--fs-3);
}

.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: var(--honey-hi);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ------------------------------ header ------------------------------ */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--hive) 94%, transparent);
  border-bottom: 1px solid var(--wall-soft);
  backdrop-filter: blur(6px);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--wax);
  text-decoration: none;
  font: 600 1.5rem / 1 var(--f-display);
  font-stretch: 115%;
  letter-spacing: -0.01em;
}
.brand img {
  width: 30px;
  height: 31px;
}
.brand:hover {
  color: var(--wax);
}

.nav {
  display: flex;
  gap: 4px;
}
.nav a {
  padding: 8px 12px;
  border-radius: var(--r-chip);
  color: var(--wax-2);
  text-decoration: none;
  font: 500 var(--fs-2) / 1 var(--f-display);
}
.nav a:hover {
  color: var(--wax);
  background: var(--cell);
}
.nav a[aria-current='page'] {
  color: var(--wax);
  box-shadow: inset 0 -2px 0 var(--honey);
  border-radius: var(--r-chip) var(--r-chip) 0 0;
}

.btn-discord .short {
  display: none;
}
@media (max-width: 820px) {
  .head-actions .btn-discord .short {
    display: inline;
  }
}
@media (max-width: 360px) {
  .head-actions .btn-discord svg {
    display: none;
  }
}
.head-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.acct {
  position: relative;
}
.acct-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  padding: 4px 6px;
  border-radius: var(--r-ctl);
  color: var(--wax);
  font: 500 var(--fs-1) / 1 var(--f-display);
  cursor: pointer;
}
.acct-btn:hover {
  background: var(--cell);
}
.acct-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 210px;
  padding: 6px;
  background: var(--cell);
  border: 1px solid var(--wall);
  border-radius: var(--r-ctl);
  display: grid;
}
.acct-menu a,
.acct-menu button {
  display: block;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--r-chip);
  color: var(--wax);
  background: none;
  border: 0;
  font: 400 var(--fs-1) / 1.2 var(--f-text);
  text-decoration: none;
  cursor: pointer;
}
.acct-menu a:hover,
.acct-menu button:hover {
  background: var(--cell-2);
}
.acct-menu hr {
  border: 0;
  border-top: 1px solid var(--wall-soft);
  margin: 6px 4px;
}

.menu-btn {
  display: none;
}

@media (max-width: 820px) {
  .site-head .wrap {
    gap: 12px;
  }
  .nav {
    display: none;
  }
  .nav.open {
    display: grid;
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    padding: 8px var(--gutter) 16px;
    background: var(--hive);
    border-bottom: 1px solid var(--wall);
  }
  .nav.open a {
    padding: 14px 8px;
    font-size: var(--fs-3);
  }
  .nav.open a[aria-current='page'] {
    box-shadow: inset 3px 0 0 var(--honey);
    border-radius: 0;
  }
  .menu-btn {
    display: inline-flex;
    min-height: 40px;
    padding: 0 10px;
  }
  .head-actions .btn-discord .long,
  .acct-btn .acct-name {
    display: none;
  }
  .head-actions .btn-discord {
    padding: 0 10px;
  }
}

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

.site-foot {
  margin-top: 96px;
  border-top: 1px solid var(--wall-soft);
  background: var(--hive-2);
  font-size: var(--fs-1);
  color: var(--wax-2);
}
.site-foot .wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-top: 40px;
  padding-bottom: 40px;
}
.site-foot h2 {
  font-size: var(--fs-2);
  color: var(--wax);
  margin-bottom: 10px;
}
.site-foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.site-foot a:not(.btn):not(.brand) {
  color: var(--wax-2);
  text-decoration: none;
}
.site-foot a:not(.btn):not(.brand):hover {
  color: var(--wax);
  text-decoration: underline;
}
.foot-join p {
  margin: 8px 0 16px;
  max-width: 38ch;
}
.foot-legal {
  grid-column: 1 / -1;
  padding-top: 20px;
  border-top: 1px solid var(--wall-soft);
  font-size: var(--fs-0);
  color: var(--wax-3);
}
@media (max-width: 720px) {
  .site-foot .wrap {
    grid-template-columns: 1fr 1fr;
  }
  .foot-join {
    grid-column: 1 / -1;
  }
}

/* --------------------------- hex avatars --------------------------- */

/* Flat-top hexagon, like the cells in the logo. Width : height = 1 : 0.866 */
.hexav {
  --s: 40px;
  --ring: var(--wall);
  position: relative;
  flex: none;
  width: var(--s);
  height: calc(var(--s) * 0.866);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: var(--ring);
}
.hexav img {
  position: absolute;
  inset: 2px;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  object-fit: cover;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: var(--cell-2);
}
.hexav.is-live {
  --ring: var(--clover);
}
.hexav-lg {
  --s: 104px;
}
.hexav-lg img {
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
}
.hexav-md {
  --s: 56px;
}
.hexav-sm {
  --s: 30px;
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--clover);
  font: 500 var(--fs-0) / 1 var(--f-data);
  white-space: nowrap;
}
.live-dot::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--clover);
}
.live-dot.is-idle {
  color: var(--honey);
}
.live-dot.is-idle::before {
  background: var(--honey);
}

/* ------------------------------ sections ------------------------------ */

.page-head {
  padding: 48px 0 28px;
}
.page-head p {
  margin-top: 10px;
  color: var(--wax-2);
  max-width: 62ch;
}

.section {
  margin-top: 72px;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.section-head p {
  color: var(--wax-2);
  margin-top: 6px;
}

.panel {
  background: var(--cell);
  border: 1px solid var(--wall-soft);
  border-radius: var(--r-panel);
  padding: 22px;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 40px;
}
@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------ stats ------------------------------ */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  border-top: 1px solid var(--wall-soft);
  border-bottom: 1px solid var(--wall-soft);
}
.stat {
  padding: 18px 20px 18px 0;
}
.stat + .stat {
  padding-left: 20px;
  border-left: 1px solid var(--wall-soft);
}
.stat-value {
  font: 700 1.875rem / 1.1 var(--f-data);
  color: var(--wax);
  letter-spacing: -0.01em;
}
.stat-label {
  margin-top: 4px;
  color: var(--wax-2);
  font-size: var(--fs-1);
}
.stat-sub {
  color: var(--wax-3);
  font-size: var(--fs-0);
  margin-top: 2px;
}
@media (max-width: 560px) {
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stat,
  .stat + .stat {
    padding: 14px 12px 14px 0;
    border-left: 0;
  }
  .stat:nth-child(even) {
    padding-left: 12px;
    border-left: 1px solid var(--wall-soft);
  }
  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--wall-soft);
  }
}

/* -------------------------- segmented control -------------------------- */

.seg {
  display: inline-flex;
  padding: 3px;
  background: var(--cell);
  border: 1px solid var(--wall-soft);
  border-radius: var(--r-ctl);
  gap: 2px;
  flex-wrap: wrap;
}
.seg button {
  background: none;
  border: 0;
  border-radius: 7px;
  padding: 8px 14px;
  color: var(--wax-2);
  font: 500 var(--fs-1) / 1 var(--f-display);
  cursor: pointer;
}
.seg button:hover {
  color: var(--wax);
}
.seg button[aria-pressed='true'] {
  background: var(--wax);
  color: var(--hive);
}
@media (max-width: 560px) {
  .seg {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
  }
  .seg button {
    flex: 1 1 auto;
    padding: 9px 6px;
    white-space: nowrap;
  }
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

/* ------------------------------ inputs ------------------------------ */

textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  background: var(--hive);
  color: var(--wax);
  border: 1.5px solid var(--wall);
  border-radius: var(--r-ctl);
  font: 400 var(--fs-2) / 1.45 var(--f-text);
  resize: vertical;
}
textarea:focus-visible {
  outline: none;
  border-color: var(--honey);
}
input[type='text'],
input[type='search'],
input[type='number'],
input[type='url'],
select {
  min-height: 44px;
  padding: 0 14px;
  background: var(--hive);
  color: var(--wax);
  border: 1.5px solid var(--wall);
  border-radius: var(--r-ctl);
  font: 400 var(--fs-2) / 1 var(--f-text);
  width: 100%;
}
input::placeholder {
  color: var(--wax-3);
}
input:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--honey);
}
label {
  font-weight: 600;
}

.field {
  display: grid;
  gap: 6px;
}
.field small {
  color: var(--wax-3);
  font-size: var(--fs-0);
}

/* Toggle switch: a real checkbox, styled. */
.switch {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  font-weight: 400;
}
.switch input {
  appearance: none;
  flex: none;
  width: 46px;
  height: 26px;
  margin: 2px 0 0;
  border-radius: 13px;
  background: var(--wall);
  position: relative;
  cursor: pointer;
  transition: background-color 0.15s;
}
.switch input::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--wax);
  transition: transform 0.15s;
}
.switch input:checked {
  background: var(--honey);
}
.switch input:checked::after {
  transform: translateX(20px);
  background: var(--on-honey);
}
.switch strong {
  display: block;
  font-weight: 600;
}
.switch span span {
  display: block;
  color: var(--wax-2);
  font-size: var(--fs-1);
}

/* ---------------------------- leaderboard ---------------------------- */

.board {
  width: 100%;
  border-collapse: collapse;
}
.board th {
  text-align: left;
  font: 500 var(--fs-0) / 1 var(--f-data);
  color: var(--wax-3);
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--wall-soft);
}
.board td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--wall-soft);
  vertical-align: middle;
}
.board tr:last-child td {
  border-bottom: 0;
}
.board .c-rank {
  width: 56px;
  font: 700 var(--fs-2) / 1 var(--f-data);
  font-variant-numeric: tabular-nums;
  color: var(--wax-3);
}
.board .c-value,
.board th.c-value {
  text-align: right;
  white-space: nowrap;
}
.board td.c-value {
  font: 700 var(--fs-3) / 1 var(--f-data);
  font-variant-numeric: tabular-nums;
}
.board .c-value small {
  font: 500 var(--fs-0) / 1 var(--f-data);
  color: var(--wax-3);
  margin-left: 2px;
}
.board th.c-extra {
  text-align: right;
}
.board td.c-extra {
  text-align: right;
  color: var(--wax-2);
  font: 500 var(--fs-1) / 1 var(--f-data);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.board tr.is-you td {
  background: color-mix(in srgb, var(--honey) 8%, transparent);
}
.board tr.is-you .c-rank {
  box-shadow: inset 3px 0 0 var(--honey);
}
@media (max-width: 640px) {
  .board .c-extra {
    display: none;
  }
  .board td,
  .board th {
    padding-left: 6px;
    padding-right: 6px;
  }
  .board .c-rank {
    width: 40px;
  }
}

.player {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--wax);
  text-decoration: none;
}
.player:hover .player-name {
  text-decoration: underline;
}
.player-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-text {
  display: grid;
  min-width: 0;
  gap: 2px;
}

/* Rank 1-3: little hex plates in the tier colours. */
.rank-plate {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 26px;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  color: var(--hive);
  font: 700 var(--fs-1) / 1 var(--f-data);
}
.rank-1 {
  background: var(--t3);
}
.rank-2 {
  background: var(--t2);
}
.rank-3 {
  background: var(--t1);
}

.empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--wax-2);
  border: 1.5px dashed var(--wall);
  border-radius: var(--r-panel);
}
.empty strong {
  display: block;
  color: var(--wax);
  font: 600 var(--fs-3) / 1.2 var(--f-display);
  margin-bottom: 6px;
}
.empty .btn {
  margin-top: 16px;
}

/* ------------------------------ feed ------------------------------ */

.feed {
  list-style: none;
  margin: 0;
  padding: 0;
}
.feed li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--wall-soft);
}
.feed li:last-child {
  border-bottom: 0;
}
.feed p {
  line-height: 1.35;
}
.feed a {
  color: var(--wax);
  font-weight: 600;
  text-decoration: none;
}
.feed a:hover {
  text-decoration: underline;
}
.feed b {
  font-weight: 600;
  color: var(--honey-hi);
}
.feed time {
  color: var(--wax-3);
  font: 500 var(--fs-0) / 1 var(--f-data);
  white-space: nowrap;
}
.feed li.is-new {
  animation: feed-in 0.6s ease-out;
}
@keyframes feed-in {
  from {
    background: color-mix(in srgb, var(--honey) 14%, transparent);
  }
}

/* ------------------------------ charts ------------------------------ */

.chart {
  position: relative;
}
.chart svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.chart .grid line {
  stroke: var(--wall-soft);
  stroke-width: 1;
}
.chart .axis text {
  fill: var(--wax-3);
  font: 500 12px var(--f-data);
  font-variant-numeric: tabular-nums;
}
.chart .bar {
  fill: var(--honey);
}
.chart .bar.is-hot,
.chart .bar:hover {
  fill: var(--honey-hi);
}
.chart .line {
  fill: none;
  stroke: var(--honey);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.chart .area {
  fill: var(--honey);
  opacity: 0.1;
}
.chart .cross {
  stroke: var(--wax-3);
  stroke-width: 1;
}
.chart .dot {
  fill: var(--honey);
  stroke: var(--cell);
  stroke-width: 2;
}
.chart .hit {
  fill: transparent;
}
.chart-tip {
  position: absolute;
  pointer-events: none;
  z-index: 5;
  min-width: 120px;
  padding: 8px 10px;
  background: var(--hive);
  border: 1px solid var(--wall);
  border-radius: var(--r-chip);
  font-size: var(--fs-0);
  color: var(--wax-2);
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 10px));
}
.chart-tip strong {
  display: block;
  color: var(--wax);
  font: 700 var(--fs-2) / 1.2 var(--f-data);
}
.chart-tip .key {
  display: inline-block;
  width: 12px;
  height: 2px;
  margin-right: 6px;
  vertical-align: middle;
}
.chart-empty {
  display: grid;
  place-items: center;
  min-height: 160px;
  color: var(--wax-3);
  border: 1.5px dashed var(--wall-soft);
  border-radius: var(--r-panel);
  font-size: var(--fs-1);
}
.legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: var(--fs-1);
  color: var(--wax-2);
  margin-bottom: 10px;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.legend i {
  width: 14px;
  height: 3px;
  border-radius: 2px;
}

/* --------------------------- achievements --------------------------- */

.achs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}
.ach {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--wall-soft);
  border-radius: var(--r-ctl);
  background: var(--hive-2);
}
.ach-badge {
  --tier: var(--wall);
  position: relative;
  width: 62px;
  height: 54px;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: var(--tier);
  display: grid;
  place-items: center;
}
.ach-badge::before {
  content: '';
  position: absolute;
  inset: 3px;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: color-mix(in srgb, var(--tier) 22%, var(--hive));
}
.ach-badge svg {
  position: relative;
  width: 26px;
  height: 26px;
  color: var(--tier);
}
.ach.is-locked .ach-badge {
  --tier: var(--wall);
}
.ach.is-locked .ach-badge svg {
  color: var(--wax-3);
}
.ach[data-tier='1'] .ach-badge {
  --tier: var(--t1);
}
.ach[data-tier='2'] .ach-badge {
  --tier: var(--t2);
}
.ach[data-tier='3'] .ach-badge {
  --tier: var(--t3);
}
.ach[data-tier='4'] .ach-badge {
  --tier: var(--t4);
}
.ach[data-tier='5'] .ach-badge {
  --tier: var(--t5);
}
.ach[data-tier='6'] .ach-badge {
  --tier: var(--t6);
}
.ach h3 {
  font-size: var(--fs-2);
  font-stretch: 100%;
}
.ach-tier {
  font: 500 var(--fs-0) / 1.2 var(--f-data);
  color: var(--wax-2);
  margin-top: 2px;
}
.ach-tier b {
  font-weight: 700;
  color: var(--wax);
}
.ach-tier span {
  margin-left: 8px;
}
.meter {
  height: 6px;
  margin-top: 8px;
  border-radius: 3px;
  background: var(--wall-soft);
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--honey);
}
.ach-next {
  margin-top: 5px;
  font-size: var(--fs-0);
  color: var(--wax-3);
}
.tier-pips {
  display: flex;
  gap: 3px;
  margin-top: 6px;
}
.tier-pips i {
  width: 10px;
  height: 9px;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: var(--wall);
}
.tier-pips i.on:nth-child(1) {
  background: var(--t1);
}
.tier-pips i.on:nth-child(2) {
  background: var(--t2);
}
.tier-pips i.on:nth-child(3) {
  background: var(--t3);
}
.tier-pips i.on:nth-child(4) {
  background: var(--t4);
}
.tier-pips i.on:nth-child(5) {
  background: var(--t5);
}
.tier-pips i.on:nth-child(6) {
  background: var(--t6);
}

/* ------------------------------ toast ------------------------------ */

.toasts {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 90;
  display: grid;
  gap: 8px;
  width: min(440px, calc(100vw - 32px));
}
.toast {
  padding: 12px 16px;
  border-radius: var(--r-ctl);
  background: var(--wax);
  color: var(--hive);
  font-weight: 600;
  animation: toast-in 0.2s ease-out;
}
.toast.is-bad {
  background: var(--red);
  color: #fff;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ------------------------------ dialog ------------------------------ */

dialog {
  background: var(--cell);
  color: var(--wax);
  border: 1px solid var(--wall);
  border-radius: var(--r-panel);
  padding: 26px;
  width: min(480px, calc(100vw - 32px));
}
dialog::backdrop {
  background: rgba(15, 10, 5, 0.72);
}
dialog h2 {
  font-size: var(--fs-3);
  margin-bottom: 10px;
}
dialog p {
  color: var(--wax-2);
}
.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* ------------------------- login/message page ------------------------- */

.message-page {
  display: grid;
  place-items: center;
  padding: 24px;
}
.message {
  max-width: 440px;
  text-align: center;
}
.message .brand {
  justify-content: center;
  margin-bottom: 28px;
}
.message h1 {
  font-size: var(--fs-4);
  margin-bottom: 10px;
}
.message.is-bad h1 {
  color: var(--red);
}
.message p {
  color: var(--wax-2);
}
.message .btn {
  margin-top: 22px;
}

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

/* ------------------------------ the hive ------------------------------ */

.hive {
  position: relative;
}
.hive svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.hive-cell {
  fill: var(--cell);
  stroke: var(--wall-soft);
  stroke-width: 1.5;
}
.hive-ring {
  fill: var(--clover);
}
.hive-bee image {
  transition: opacity 0.3s;
}
.hive-bee.is-idle .hive-ring {
  fill: var(--honey);
}
.hive-bee.is-idle image {
  opacity: 0.55;
}
.hive-bee:hover .hive-ring,
.hive-bee:focus-visible .hive-ring {
  fill: var(--wax);
}
.hive-bee:focus {
  outline: none;
}
.hive-bee.is-new {
  animation: bee-in 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.25);
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes bee-in {
  from {
    transform: scale(0.3);
    opacity: 0;
  }
}
.hive-more {
  fill: var(--wax-2);
  font: 600 17px var(--f-display);
}
.hive-empty {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: 82%;
  padding: 12px 16px;
  background: var(--hive);
  border: 1px solid var(--wall);
  border-radius: var(--r-ctl);
  text-align: center;
  color: var(--wax-2);
  font: 500 var(--fs-1) / 1.4 var(--f-text);
}
.hive-empty.hidden {
  display: none;
}

/* ---------------------------- hex calendar ---------------------------- */

.cal-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 4px;
  font-size: var(--fs-0);
  color: var(--wax-3);
}
.cal-legend i {
  width: 13px;
  height: 11px;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}
.cal-legend span {
  margin: 0 4px;
}
.cal polygon:focus {
  outline: none;
  stroke: var(--wax);
  stroke-width: 2;
}

/* ---------------------------- report a problem ---------------------------- */

.foot-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--wax-2);
  font: inherit;
  cursor: pointer;
}
.foot-link:hover {
  color: var(--wax);
  text-decoration: underline;
}
.report-dialog form {
  display: grid;
  gap: 14px;
}
.report-dialog h2 {
  margin-bottom: 0;
}
.rep-count {
  justify-self: end;
  color: var(--wax-3);
  font-size: var(--fs-0);
}
.rep-error {
  color: var(--red) !important;
  font-size: var(--fs-1);
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* Report button in the header: always visible, red flag so it stands out. */
.btn-report {
  --bd: color-mix(in srgb, var(--red) 55%, var(--hive));
  --bg: color-mix(in srgb, var(--red) 10%, var(--hive));
}
.btn-report:hover {
  --bg: color-mix(in srgb, var(--red) 20%, var(--hive));
  --bd: var(--red);
}
.btn-report svg {
  color: var(--red);
}
@media (max-width: 1060px) and (min-width: 821px) {
  .btn-report .long {
    display: none;
  }
  .btn-report {
    padding: 0 10px;
  }
}
@media (max-width: 820px) {
  .btn-report .long {
    display: none;
  }
  .btn-report {
    padding: 0 10px;
  }
}
@media (max-width: 480px) {
  .site-head .wrap {
    gap: 8px;
  }
  .brand {
    font-size: 1.25rem;
    gap: 7px;
  }
  .brand img {
    width: 25px;
    height: 26px;
  }
  .head-actions {
    gap: 6px;
  }
  .head-actions .btn {
    padding: 0 9px;
  }
  .head-actions .btn-discord svg {
    display: none;
  }
  .menu-btn {
    padding: 0 8px;
  }
}
