/* ForeverRank — skinned on Blizzard's Forever page (.wow-2 scheme):
   flat #0a0a0a surface, #1c1c1c cards with #333 borders, goldenrod accent,
   Poppins SemiBold headings + Archivo body, pill tabs, blue primary.
   One deliberate departure: their #ffbb33 orange highlight is replaced with
   WoW gold #ffd100 (owner's call). WCL bands stay for data only. */

:root {
  --q-common:    #8c8c94;
  --q-uncommon:  #1eff00;
  --q-rare:      #0070ff;
  --q-epic:      #a335ee;
  --q-legendary: #ff8000;
  --q-pink:      #e268a8;
  --q-artifact:  #e5cc80;

  /* Blizzard's own Forever palette: the .wow-2 scheme from their store CSS,
     matching worldofwarcraft.blizzard.com/forever -- dark slate surface,
     petrol-blue panels, cyan accents, parchment gold. */
  --surface:        #1C2325;
  --surface-text:   #F4F0EB;
  --surface-border: rgba(0, 175, 215, .16);
  --card:        #07324A;
  --card-hover:  #0a3f5e;
  --card-text:   #F4F0EB;
  --card-border: rgba(0, 175, 215, .25);
  --subtle: #9cb6be;
  --accent: #007EA6;
  --cyan:   #00AFD7;
  --gold:   #e5cc80;
  --blue:   #007EA6;
  --blue-hover: #00AFD7;
  --sale:   #FE704D;

  --heading: "Poppins", "Segoe UI", sans-serif;
  --display-serif: "Marcellus", "Palatino", serif;
  --body: "Archivo", "Segoe UI", sans-serif;
  --r-panel: .5rem;
  --r-btn: .25rem;
  --shadow: 0px 5px 15px 0px rgba(0, 0, 0, .12);

  --pad: clamp(1rem, 4vw, 2rem);
  --wide: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--surface); color: var(--surface-text);
  font: 500 15px/1.55 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
b, strong { font-weight: 700; }

/* top (sits over the hero art) */
.top { max-width: var(--wide); margin: 0 auto; padding: 1.1rem var(--pad) 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; position: relative; z-index: 30; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; }
.sigil { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--card-border); background: var(--card); font-size: 1.4rem; color: var(--gold); }
.sigil-sm { width: 26px; height: 26px; font-size: .95rem; }
.brand-word { font-family: var(--heading); font-weight: 600; font-size: 1.15rem; letter-spacing: .06em; }
.brand-word b { color: var(--gold); font-weight: 600; }
.top-nav { display: flex; align-items: center; gap: .5rem; }
.phase { font-family: var(--heading); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; color: #000; background: var(--gold); border-radius: var(--r-btn); padding: .3rem .7rem; }
.pill { text-decoration: none; cursor: pointer; background: var(--card); color: var(--card-text); font: 600 .74rem/1 var(--heading); letter-spacing: .04em; border: .5px solid var(--card-border); border-radius: var(--r-btn); padding: .5rem .85rem; transition: background .15s, color .15s, border-color .15s; }
.pill:hover { background: var(--card-hover); color: #f0f0f0; border-color: #444444; }
.settings { position: absolute; right: var(--pad); top: 3.6rem; z-index: 5; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--r-panel); padding: .9rem 1rem; width: min(20rem, 84vw); box-shadow: var(--shadow); }
.settings label { display: flex; gap: .55rem; align-items: center; font-size: .84rem; cursor: pointer; color: var(--card-text); }
.settings p { margin: .5rem 0 0; font-size: .72rem; color: var(--subtle); }

/* countdown */
.countdown { margin: 1.6rem auto 0; text-align: center; }
.count-kick { margin: 0 0 .7rem; font-family: var(--heading); font-weight: 600; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--subtle); }
.count-kick b { color: var(--gold); }
.count-grid { display: inline-flex; gap: .6rem; }
.count-grid div { min-width: 4.6rem; padding: .7rem .5rem .55rem; border: 1px solid rgba(229,204,128,.4); border-radius: var(--r-panel); background: rgba(5,23,32,.62); backdrop-filter: blur(6px); box-shadow: var(--shadow); }
.count-grid b { display: block; font-family: var(--heading); font-weight: 600; font-size: 2rem; line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; }
.count-grid span { display: block; margin-top: .3rem; font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; color: var(--subtle); }
.count-note { margin: .7rem 0 0; font-size: .74rem; color: var(--subtle); }

/* board */
.wrap { max-width: var(--wide); margin: 0 auto; padding: 1.6rem var(--pad) 2.2rem; }
.display { font-family: var(--display-serif); font-weight: 400; font-size: clamp(1.9rem, 5vw, 3rem); line-height: 1.1; margin: 0; color: var(--surface-text); }
.display span { color: var(--gold); }
.board-title { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.board-note { margin: 0; font-size: .78rem; color: var(--subtle); }
.board-note b { color: var(--gold); }

.tabs { display: flex; gap: .45rem; flex-wrap: wrap; padding-bottom: .9rem; margin-bottom: .6rem; }
.tab { cursor: pointer; background: var(--card); border: .5px solid var(--card-border); border-radius: var(--r-btn); color: var(--card-text);
  font-family: var(--heading); font-weight: 600; font-size: .92rem; padding: .5rem .95rem; transition: background .15s, color .15s; }
.tab:hover { background: var(--card-hover); color: #f0f0f0; }
.tab.is-active { background: var(--blue); border-color: var(--blue); color: #ffffff; }
.tab.is-active:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.board-sub { margin: 0 0 1rem; color: var(--subtle); font-size: .84rem; max-width: 60rem; }


.ranktable { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ranktable th { text-align: left; font-family: var(--heading); font-weight: 600; font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); padding: .3rem .55rem .5rem; border-bottom: 1px solid var(--card-border); }
.ranktable td { padding: .58rem .55rem; border-bottom: 1px solid var(--surface-border); vertical-align: middle; color: var(--surface-text); }
.ranktable tbody tr { cursor: pointer; animation: rise .35s ease both; }
.ranktable tbody tr:hover { background: var(--card); }
@keyframes rise { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
.ranktable .r { text-align: right; font-variant-numeric: tabular-nums; }
.rank { font-family: var(--heading); font-weight: 600; font-size: 1.05rem; color: var(--subtle); width: 2.8rem; }
tr:nth-child(1) .rank { color: var(--gold); }
.name { font-weight: 600; color: var(--cc, var(--surface-text)); }
.meta { color: var(--subtle); font-size: .7rem; margin-left: .5rem; }
.lvl { font-family: var(--heading); font-weight: 600; font-size: 1rem; }
.barcell { width: 26%; }
.bar { display: block; height: 6px; border-radius: 99px; background: var(--card); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--c); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.is-drawn .bar i { width: var(--w); }
.ranktable td.pct, .pct { font-weight: 700; color: var(--c); }
.dead { color: var(--sale); font-family: var(--heading); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.alive { color: var(--q-uncommon); font-family: var(--heading); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }

.empty { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--r-panel); box-shadow: var(--shadow); padding: 2.4rem 1.4rem; text-align: center; color: var(--card-text); }
.empty h3 { font-family: var(--display-serif); font-weight: 400; font-size: 1.5rem; margin: 0 0 .5rem; color: #ffffff; }
.empty h3 span { color: var(--gold); }
.empty p { margin: .3rem 0 0; font-size: .84rem; }


/* insight */
.insight[hidden] { display: none; }
.insight { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(10,10,10,.8); padding: 1rem; }
.insight-card { position: relative; width: min(44rem, 96vw); max-height: 88vh; overflow: auto; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--r-panel); padding: 1.4rem 1.5rem; box-shadow: var(--shadow); }
.insight-x { position: absolute; top: .6rem; right: .8rem; background: none; border: 0; color: var(--subtle); font-size: 1.5rem; cursor: pointer; }
.insight-x:hover { color: var(--gold); }
.in-name { font-family: var(--display-serif); font-weight: 400; font-size: 1.7rem; margin: 0; color: var(--cc, #ffffff); }
.in-meta { display: flex; gap: .4rem; flex-wrap: wrap; margin: .5rem 0 1rem; align-items: center; }
.chip { font-family: var(--heading); font-weight: 600; font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; padding: .22rem .5rem; border-radius: var(--r-btn); border: 1px solid var(--card-border); color: var(--card-text); }
.in-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr)); gap: .5rem; margin-bottom: 1.1rem; }
.in-stats div { border: 1px solid var(--card-border); border-radius: var(--r-panel); background: rgba(28,35,37,.5); padding: .6rem .7rem .5rem; }
.in-stats b { display: block; font-family: var(--heading); font-weight: 600; font-size: 1.3rem; line-height: 1.15; color: var(--gold); }
.in-stats span { font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--subtle); }
.in-h { font-family: var(--heading); font-weight: 600; font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--subtle); margin: 1rem 0 .5rem; }
.lvlbars { list-style: none; margin: 0; padding: 0; display: grid; gap: .28rem; }
.lvlbars li { display: grid; grid-template-columns: 3.4rem 1fr 4.6rem; gap: .6rem; align-items: center; font-size: .74rem; }
.lvlbars li b { color: var(--subtle); font-weight: 500; }
.lvlbars li i { display: block; height: 7px; border-radius: 3px; background: var(--c); width: var(--w); }
.lvlbars li u { text-decoration: none; text-align: right; color: var(--subtle); }
.in-note { margin: 1rem 0 0; font-size: .74rem; color: var(--subtle); }

/* api note + footer */
.api-note { max-width: var(--wide); margin: 0 auto 2rem; padding: 0 var(--pad); }
.api-note h2 { font-family: var(--heading); font-weight: 600; font-size: 1.15rem; margin: 0 0 .5rem; color: var(--gold); }
.api-note p { margin: 0; color: var(--subtle); font-size: .86rem; max-width: 62rem; }
.api-note { border-top: 1px solid var(--surface-border); padding-top: 2rem; }
footer { max-width: var(--wide); margin: 0 auto; padding: 1.3rem var(--pad) 2.4rem; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; color: var(--subtle); font-size: .74rem; border-top: 1px solid var(--surface-border); }
footer a { margin-left: auto; color: var(--card-text); }

@media (max-width: 820px) {
  .barcell, .ranktable .bandtag { display: none; }
  .count-grid div { min-width: 3.6rem; }
  .board-title { flex-direction: column; gap: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .is-drawn .bar i { width: var(--w); }
}


/* ------------------------------------------------------------- hero art */
.hero { position: relative; overflow: hidden; min-height: min(88vh, 46rem); display: flex; flex-direction: column; border-bottom: 1px solid rgba(229,204,128,.32); }
.hero-art { position: absolute; inset: 0; background: linear-gradient(180deg, #0d2b33, #123a44 45%, #0a2530);
  background-image: url("assets/hero.jpg"); background-size: cover; background-position: center 38%;
  animation: heroDrift 40s ease-in-out infinite alternate; }
@keyframes heroDrift { from { transform: scale(1.02) translateY(0) } to { transform: scale(1.08) translateY(-1.5%) } }
.hero-veil { position: absolute; inset: 0; background:
  radial-gradient(90% 70% at 50% 38%, transparent 30%, rgba(7,21,26,.55) 75%, rgba(6,17,21,.92) 100%),
  linear-gradient(180deg, rgba(8,22,27,.72), rgba(8,22,27,.12) 30%, rgba(9,23,28,.28) 62%, var(--surface) 99%); }
.hero-inner { position: relative; z-index: 2; margin: auto; padding: 3.2rem var(--pad) 4rem; text-align: center; max-width: 52rem; width: 100%; }
.eyebrow { margin: 0 0 .7rem; font-family: var(--heading); font-weight: 600; font-size: .72rem; letter-spacing: .42em; text-transform: uppercase; color: var(--gold); text-shadow: 0 1px 8px rgba(0,0,0,.8); }
.logotype { margin: 0; font-family: var(--display-serif); font-weight: 400; font-size: clamp(2.6rem, 7.5vw, 4.6rem); line-height: 1.04; color: #f6f1e7; text-shadow: 0 2px 22px rgba(0,0,0,.75); }
.logotype span { background: linear-gradient(180deg, #f4e7bd, #e5cc80 55%, #a8925b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin: .9rem auto 0; max-width: 34rem; color: #d8e2e4; font-size: .92rem; text-shadow: 0 1px 10px rgba(0,0,0,.85); }
.hero .count-kick { color: #e7ddc9; text-shadow: 0 1px 8px rgba(0,0,0,.8); }
.hero .count-note { color: #b9c8cb; text-shadow: 0 1px 8px rgba(0,0,0,.8); }

/* filigree + dividers */
.fili { position: absolute; width: 120px; height: 40px; color: var(--gold); opacity: .9; pointer-events: none; }
.fili-tl { top: 0; left: 0; }
.fili-tr { top: 0; right: 0; transform: scaleX(-1); }
.fili-bl { bottom: 0; left: 0; transform: scaleY(-1); }
.fili-br { bottom: 0; right: 0; transform: scale(-1); }
.divider { display: flex; justify-content: center; padding: 1.7rem var(--pad); }
.divider svg { width: min(320px, 70vw); height: 12px; }

/* the board panel gets a frame */
.panel { position: relative; border: 1px solid rgba(229,204,128,.3); border-radius: var(--r-panel); background: linear-gradient(180deg, rgba(7,50,74,.5), rgba(7,50,74,.22)); box-shadow: var(--shadow); padding: 1.1rem 1.1rem 1rem; }
.fili-panel-tl { top: -1px; left: -1px; width: 90px; height: 30px; }
.fili-panel-br { bottom: -1px; right: -1px; width: 90px; height: 30px; transform: scale(-1); }

/* guild rows */
.gtag { color: var(--gold); }
.gbars { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.gbars li { display: grid; grid-template-columns: 9.5rem 1fr 3.2rem; gap: .7rem; align-items: center; font-size: .78rem; }
.gbars li b { color: var(--subtle); font-weight: 600; font-family: var(--heading); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; }
.gbars li i { display: block; height: 8px; border-radius: 3px; background: var(--c); width: var(--w); }
.gbars li u { text-decoration: none; text-align: right; color: var(--c); font-weight: 700; }
.roster { display: flex; flex-wrap: wrap; gap: .3rem .8rem; font-size: .76rem; }
.roster span { color: var(--cc, var(--card-text)); }

@media (max-width: 820px) {
  .fili { width: 84px; height: 28px; }
  .hero { min-height: 70vh; }
  .gbars li { grid-template-columns: 7rem 1fr 2.6rem; }
}

/* search + honours */
.search { margin-left: auto; background: var(--card); border: .5px solid var(--card-border); border-radius: 9999px; color: var(--surface-text); font: 500 .85rem/1 var(--body); padding: .5rem .95rem; min-width: 12rem; outline: none; transition: border-color .15s; }
.search::placeholder { color: var(--subtle); }
.search:focus { border-color: var(--gold); }
.chip-gold { border-color: rgba(229,204,128,.55); color: var(--gold); background: rgba(229,204,128,.1); }
@media (max-width: 820px) { .search { min-width: 100%; margin-top: .3rem; } }

/* segmented control: one choice of a few, e.g. server type or role */
.seg { display: inline-flex; height: 2.2rem; box-sizing: border-box; padding: 3px; gap: 2px; border-radius: 8px; background: rgba(0,0,0,.3); border: 1px solid var(--card-border); }
.seg button { display: inline-flex; align-items: center; gap: .4rem; height: 100%; cursor: pointer; padding: 0 .7rem; border: 0; border-radius: 6px; background: none; font: 600 .72rem/1 var(--heading); color: #b3c1c8; white-space: nowrap; transition: color .15s, background .15s; }
.seg button[class^="rd-"]::before { content: ""; width: .42rem; height: .42rem; border-radius: 50%; background: var(--rc); }
.seg button:hover:not(:disabled):not(.on) { color: #fff; background: rgba(255,255,255,.05); }
.seg button.on { color: #14100a; background: linear-gradient(180deg, #f0dfa8, #d9b96a); box-shadow: 0 1px 6px rgba(0,0,0,.35); }
.seg button.on::before { box-shadow: 0 0 0 1.5px rgba(20,16,10,.45); }
.seg button:disabled { opacity: .28; cursor: not-allowed; }

/* nothing may leave the frame on a phone: wide tables scroll inside the panel */
.board { overflow-x: auto; overscroll-behavior-x: contain; }
@media (max-width: 820px) {
  .ranktable .xs { display: none; }
  .ranktable td, .ranktable th { padding-left: .35rem; padding-right: .35rem; }
  .insight-card { padding: 1.1rem .9rem; }
  .in-stats { grid-template-columns: repeat(3, 1fr); }
  .profbars li { grid-template-columns: 6.8rem 1fr 6.4rem; gap: .45rem; font-size: .7rem; }
  .profbars li u { white-space: normal; }
}

.ranktable .go { width: 1.6rem; text-align: right; color: var(--subtle); font-size: 1.1rem; }
.ranktable tbody tr:hover .go { color: var(--gold); }
th.go { color: transparent; }

/* pager */
.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1rem; }
.pager button { cursor: pointer; background: var(--card); color: var(--surface-text); border: 1px solid rgba(229,204,128,.45); border-radius: 2px; font: 600 .85rem/1 var(--heading); padding: .55rem .95rem; }
.pager button:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.pager button:disabled { opacity: .35; cursor: default; }
.pager span { font-size: .74rem; color: var(--subtle); }

.share { cursor: pointer; background: var(--card); color: var(--gold); border: 1px solid rgba(229,204,128,.45); border-radius: 2px; font: 600 .8rem/1 var(--heading); padding: .62rem .9rem; white-space: nowrap; }
.share:hover { border-color: var(--gold); }
@media (max-width: 820px) { .share { flex: 1 1 auto; } }

/* the wire */
.wire-sec { max-width: var(--wide); margin: 0 auto; padding: 1.6rem var(--pad) .6rem; border-top: 1px solid var(--surface-border); }
.wire { list-style: none; margin: .6rem 0 0; padding: 0; }
.wire li { display: grid; grid-template-columns: 3.4rem 1fr auto; gap: .8rem; align-items: baseline; padding: .5rem 0; border-bottom: 1px solid var(--surface-border); font-size: .86rem; }
.wire li span { color: var(--gold); font: 700 .72rem var(--heading); }
.wire li b { font-weight: 500; color: var(--surface-text); }
.wire li i { font-style: normal; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); }
.donate { color: var(--gold); border-color: rgba(229,204,128,.5); }
.pill.discord { display: inline-flex; align-items: center; gap: .4rem; color: #c9cdfb; border-color: rgba(88,101,242,.55); background: rgba(88,101,242,.12); }
.pill.discord:hover { background: #5865f2; border-color: #5865f2; color: #fff; }
.pill.discord svg { flex: none; }
footer a.ft-discord { color: #c9cdfb; }
footer a.ft-discord + a { margin-left: .8rem; }
.donate:hover { background: rgba(229,204,128,.1); color: var(--gold); }
@media (max-width: 820px) { .wire li { grid-template-columns: 3.2rem 1fr; } .wire li i { display: none; } }

/* wire cards */
.wirecards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin: .8rem 0 .6rem; }
.wirecard { display: grid; grid-template-rows: 9rem auto; text-decoration: none; border: 1px solid var(--card-border); border-radius: var(--r-panel); overflow: hidden; background: var(--card); transition: border-color .15s, transform .15s; }
a.wirecard:hover { border-color: var(--gold); transform: translateY(-2px); }
.wc-img { display: block; background-size: cover; background-position: center; }
.wc-noimg { background: linear-gradient(135deg, rgba(0,126,166,.5), rgba(6,38,56,.9)); }
.wc-body { padding: .6rem .8rem .7rem; display: grid; gap: .25rem; }
.wc-body b { font: 600 .88rem/1.3 var(--heading); color: var(--surface-text); }
.wc-body i { font-style: normal; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); }
#wire-rest { list-style: none; margin: .4rem 0 0; padding: 0; }
#wire-rest li { display: grid; grid-template-columns: 3.4rem 1fr auto; gap: .8rem; align-items: baseline; padding: .45rem 0; border-bottom: 1px solid var(--surface-border); font-size: .86rem; }
#wire-rest li span { color: var(--gold); font: 700 .72rem var(--heading); }
#wire-rest li a { color: var(--surface-text); text-decoration: none; }
#wire-rest li a:hover { color: var(--gold); }
#wire-rest li i { font-style: normal; font-size: .64rem; text-transform: uppercase; color: var(--subtle); }
@media (max-width: 820px) { .wirecards { grid-template-columns: 1fr; } .wirecard { grid-template-rows: 7rem auto; } }

/* Tradesfolk */
.profico { width: 1.05rem; height: 1.05rem; border-radius: 3px; vertical-align: -.2rem; border: 1px solid rgba(229,204,128,.3); }
.profbars li { grid-template-columns: 9.5rem 1fr 8.6rem; }
.profbars li u { white-space: nowrap; }

/* ---- TipKit: hover tips on mouse, bottom sheet on touch ---- */
.tip { pointer-events: none; }
.tsheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; max-height: 62vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: #0a1622; border-top: 1px solid rgba(229,204,128,.55); border-radius: 16px 16px 0 0;
  padding: .55rem 1rem calc(1rem + env(safe-area-inset-bottom)); box-shadow: 0 -14px 40px rgba(0,0,0,.65);
  animation: tsUp .18s ease-out; font-size: .9rem; color: #e8edf0; }
@keyframes tsUp { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }
.tsheet[hidden] { display: none; }
.ts-grip { width: 2.6rem; height: .28rem; border-radius: 999px; background: #3b4a55; margin: 0 auto .55rem; }
.ts-x { position: absolute; right: .55rem; top: .35rem; width: 2.4rem; height: 2.4rem; border: 0; background: none; color: #9fb0bb; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.ts-body { padding-right: 2rem; }
.ts-body > b, .ts-body .cmp-h b { display: block; color: var(--gold, #e5cc80); font-size: 1.05rem; margin-bottom: .3rem; font-family: var(--heading, inherit); }
.ts-body p { margin: .3rem 0 0; line-height: 1.45; }
.ts-body .cmp-cols { grid-template-columns: 1fr; }
.ts-acts { display: grid; grid-template-columns: 1fr auto 1fr; gap: .6rem; margin-top: .9rem; }
.ts-acts[hidden] { display: none; }
.ts-act { min-height: 2.9rem; border-radius: 10px; font: 700 1rem var(--heading, inherit); cursor: pointer; border: 1px solid; }
.ts-act.learn { color: #06131c; background: #3cd35a; border-color: #3cd35a; }
.ts-act.unlearn { color: #ffd9d4; background: rgba(255,90,70,.14); border-color: rgba(255,90,70,.55); }
.ts-act.count { color: #e5cc80; background: none; border-color: transparent; min-width: 4.2rem; }
.ts-act:disabled { opacity: .35; cursor: default; }
.ts-act.count:disabled { opacity: 1; }
.tsheet.lgsheet { background: #0a1220; border-top-color: #5d6b7e; }
.tsheet.lgsheet .ts-body b { color: #fff; }
.tsheet.lgsheet .lt-w { display: block; color: #fff; font-size: .9rem; }
.tsheet.lgsheet .lt-gap { display: block; height: .45rem; }
.tsheet.lgsheet .lt-y { color: #ffd100; }
.tsheet.lgsheet .lt-r { display: block; font-style: normal; color: #ff5a4d; margin-top: .45rem; }
.tsheet.lgsheet .lt-note { font-size: .78rem; color: #8aa0b5; }
html.ts-open body { padding-bottom: 40vh; }
@media (hover: hover) and (pointer: fine) { .tsheet { left: auto; right: 1rem; bottom: 1rem; width: 26rem; border-radius: 12px; border: 1px solid rgba(229,204,128,.45); } html.ts-open body { padding-bottom: 0; } }

.tip .hint, .tsheet .hint { display: block; margin-top: .35rem; font-size: .72rem; color: #9fb0bb; }
.tip .hint.lock, .tsheet .hint.lock { color: #ff7a6b; }
.tsheet .mouse-only, .tip .touch-only { display: none; }
@media (max-width: 480px) {
  .top-nav { gap: .35rem; }
  .top-nav .pill, .top-nav .phase { white-space: nowrap; font-size: .68rem; padding: .45rem .7rem; }
  .top-nav .pill.discord { position: absolute; top: 1.35rem; right: var(--pad, 1rem); padding: .5rem .6rem; }
  .top-nav .pill.discord span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---- No pills, no boxed labels: square buttons, plain text tags ---- */
.search { border-radius: var(--r-btn); }
.bar, .bar i, .ts-grip { border-radius: 1px; }
.chip, .chip-gold { border: 0; background: none; padding: 0; border-radius: 0; }
.chip + .chip::before { content: "\00b7"; margin: 0 .45rem 0 -.1rem; color: var(--subtle); }

/* ---- Top menu sections (nav.js) ---- */
.mdd { position: relative; display: inline-flex; align-items: stretch; }
.mdd > .pill, .mdd > .phase { border-top-right-radius: 0; border-bottom-right-radius: 0; display: inline-flex; align-items: center; }
.mdd-btn { display: inline-grid; place-items: center; width: 1.45rem; margin-left: -1px; cursor: pointer; color: var(--card-text); background: var(--card);
  border: .5px solid var(--card-border); border-radius: 0 var(--r-btn) var(--r-btn) 0; padding: 0; }
.mdd.here .mdd-btn { background: var(--gold); color: #000; border-color: var(--gold); border-left: 1px solid rgba(0,0,0,.25); }
.mdd-btn:hover, .mdd.open .mdd-btn { color: var(--gold); border-color: var(--gold); }
.mdd.here .mdd-btn:hover, .mdd.here.open .mdd-btn { color: #000; }
.mdd-btn svg { transition: transform .15s; }
.mdd.open .mdd-btn svg { transform: rotate(180deg); }
.mdd-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 70; min-width: 12.5rem; margin-top: .35rem; padding: .3rem;
  background: #081721; border: 1px solid var(--card-border); border-radius: var(--r-btn); box-shadow: 0 14px 34px rgba(0,0,0,.6); }
.mdd-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -.45rem; height: .45rem; }
.mdd-menu a { display: block; text-decoration: none; white-space: nowrap; font: 600 .74rem/1 var(--heading); letter-spacing: .03em; color: var(--card-text); padding: .55rem .65rem; border-radius: 2px; }
.mdd-menu a:hover, .mdd-menu a:focus-visible { color: #1a1204; background: var(--gold); outline: none; }
.mdd.open .mdd-menu, .mdd:focus-within .mdd-menu { display: block; }
@media (hover: hover) and (pointer: fine) { .mdd:hover .mdd-menu { display: block; } }
.top-nav .mdd:nth-last-child(-n+2) .mdd-menu { left: auto; right: 0; }
@media (max-width: 480px) {
  .top-nav { flex-wrap: wrap; row-gap: .35rem; }
  .mdd-btn { width: 1.3rem; }
  .mdd-menu { position: fixed; top: auto; left: 1rem; right: 1rem; min-width: 0; }
  .top-nav .mdd:nth-last-child(-n+2) .mdd-menu { left: 1rem; right: 1rem; }
}

.top-nav .pill, .top-nav .phase { white-space: nowrap; }

/* Fact cards: the card language for plain statements. */
.factgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .55rem; margin: .8rem 0 .4rem; }
.factc { background: rgba(0,0,0,.28); border: 1px solid var(--card-border); border-left: 3px solid var(--gold); border-radius: 2px; padding: .6rem .75rem; }
.factc p { margin: 0; font-size: .78rem; line-height: 1.5; color: var(--card-text); }
