/* RoUltimate — the site.
 *
 * Every colour is one the bot already draws with: the constants at the top of
 * rolimons_watcher.py. Poppins is the face rendered onto every card. A card
 * posted into Discord and the page describing it are the same product.
 *
 * Committed to dark. The bot lives in Discord, its output is a dark card, its
 * icon is a dark gem. A light mode would be a second identity for nobody.
 */

:root {
  --ground: #16171a;
  --card: #1c1d21;      /* C_BG */
  --raised: #2e3036;    /* C_PANEL */
  --tile: #3a3d44;      /* C_TILE */
  --line: #545861;      /* C_LINE */
  --text: #f2f4f7;      /* C_TEXT */
  --muted: #c4cad2;     /* C_MUTED */
  --dim: #8b929c;

  --jade: #5ee28a;      /* C_GIVE */
  --amber: #ffaa54;     /* C_WANT */
  --gold: #ffd63d;      /* C_MARK */

  --display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;

  --wrap: 1120px;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
  margin: 0;
}

a { color: var(--jade); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--jade);
  outline-offset: 3px;
  border-radius: 4px;
}

/* No monospace anywhere. Traders are not reading source code, and a face
 * that looks like one makes a command feel like something to be typed
 * carefully rather than a button with a name. Commands and figures use the
 * body face at a heavier weight, with tabular numerals where digits align. */
code, .cmd, .num {
  font-family: var(--body);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
code, .cmd { font-size: 0.9em; }

.cmd {
  color: var(--jade);
  background: rgba(94, 226, 138, 0.09);
  border: 1px solid rgba(94, 226, 138, 0.22);
  border-radius: 5px;
  padding: 0.08em 0.4em;
  white-space: nowrap;
}
.h-cmd { font-size: 0.6em; vertical-align: middle; }

.eyebrow {
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

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

header.top {
  border-bottom: 1px solid var(--tile);
  position: sticky;
  top: 0;
  background: rgba(22, 23, 26, 0.94);
  backdrop-filter: blur(8px);
  z-index: 20;
}

.topbar { display: flex; align-items: center; gap: 1rem; padding: 0.8rem 0; }

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.brand img { width: 28px; height: 28px; border-radius: 7px; display: block; }

.topnav { display: flex; gap: 1.3rem; align-items: center; }
.topnav a { color: var(--muted); text-decoration: none; font-size: 0.93rem; }
.topnav a:hover { color: var(--text); }
/* .topnav a outranks .btn-primary on specificity and was painting the
 * header's button text in the muted nav colour. Stated explicitly. */
.topnav a.btn-primary, .topnav a.btn-primary:hover { color: #10241a; }

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

.btn {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.93rem;
  padding: 0.66rem 1.2rem;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid transparent;
  display: inline-block;
  line-height: 1.2;
}
.btn-sm { font-size: 0.85rem; padding: 0.5rem 0.9rem; }
.btn-primary { background: var(--jade); color: #10241a; }
.btn-primary:hover { background: #74e89b; }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); background: var(--card); }
.btn-gold { background: var(--gold); color: #2a2205; }
.btn-gold:hover { background: #ffe066; }
.btn[aria-disabled="true"] { background: var(--raised); color: var(--dim); cursor: default; border-color: var(--tile); }

/* ------------------------------------------------------------------ hero -- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 3rem;
  align-items: center;
  padding: 3.5rem 0 3.5rem;
}

.hero h1 { font-size: clamp(1.9rem, 3.8vw, 2.6rem); letter-spacing: -0.015em; margin-top: 0.7rem; }
.lede { color: var(--muted); font-size: 1.04rem; max-width: 48ch; margin: 1rem 0 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }

/* The figures a trader would ask about first, set as a data strip rather than
 * a slogan. Tabular numerals so the column of digits holds still. */
.stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 1.6rem;
  margin: 2rem 0 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--tile);
}
.stats div { display: grid; gap: 0.15rem; }
.stats dt { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); font-family: var(--display); font-weight: 600; }
.stats dd { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- shots -- */

.shot {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--tile);
  border-radius: var(--radius);
  overflow: hidden;
}
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption {
  padding: 0.7rem 0.9rem;
  font-size: 0.86rem;
  color: var(--muted);
  border-top: 1px solid var(--tile);
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
}
.hero-shot { box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.9); }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }

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

section { padding: 3.6rem 0; border-top: 1px solid var(--tile); }
.section-head { max-width: 60ch; margin-bottom: 2rem; }
.section-head h2 { font-size: clamp(1.45rem, 2.8vw, 1.9rem); margin-top: 0.45rem; letter-spacing: -0.01em; }
.section-head p { color: var(--muted); margin: 0.6rem 0 0; }

/* A real sequence, so the numbers carry information. */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.steps li {
  counter-increment: step;
  background: var(--card);
  border: 1px solid var(--tile);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem 1.3rem;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--body);
  font-size: 0.8rem;
  color: var(--jade);
  margin-bottom: 0.5rem;
}
.steps h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.steps p { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* ------------------------------------------------------------- compare --- */

.table-wrap { overflow-x: auto; border: 1px solid var(--tile); border-radius: var(--radius); background: var(--card); }
.compare { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.compare th, .compare td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--tile); vertical-align: middle; }
.compare thead th { font-family: var(--display); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.compare thead th.paid { color: var(--gold); }
.compare tbody th { font-weight: 400; color: var(--muted); }
.compare td { font-family: var(--body); text-align: center; width: 9rem; color: var(--jade); }
.compare td:last-child { color: var(--gold); }
.compare tbody tr.soon th, .compare tbody tr.soon td { color: var(--dim); }
.compare tbody tr.soon em { font-style: normal; color: var(--dim); }
.compare tfoot th { color: var(--dim); font-weight: 400; border-bottom: 0; }
.compare tfoot td { border-bottom: 0; }
.compare td.price { font-family: var(--display); font-weight: 600; font-size: 1.25rem; color: var(--text); }
.compare td.price.paid { color: var(--gold); }
.compare td.price span { font-size: 0.8rem; font-weight: 400; color: var(--dim); font-family: var(--body); }
.fine { margin-top: 0.9rem; font-size: 0.85rem; color: var(--dim); }

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

footer { border-top: 1px solid var(--tile); padding: 2.2rem 0 3rem; color: var(--dim); font-size: 0.88rem; }
.foot-row { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; }
.foot-row nav { display: flex; gap: 1.2rem; margin-left: auto; }
.foot-row a { color: var(--muted); text-decoration: none; }
.foot-row a:hover { color: var(--text); }
.disclaimer { margin-top: 1.2rem; max-width: 74ch; font-size: 0.82rem; line-height: 1.55; }

/* ----------------------------------------------------------------- prose -- */

.prose { padding: 3rem 0 4rem; max-width: 68ch; }
.prose h1 { font-size: 1.9rem; margin-bottom: 0.4rem; }
.prose h2 { font-size: 1.18rem; margin: 2.2rem 0 0.6rem; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 1.1rem; }
.prose li { margin-bottom: 0.35rem; }
.prose strong { color: var(--text); }
.prose .updated { color: var(--dim); font-size: 0.86rem; }
.prose code { background: var(--raised); border-radius: 5px; padding: 0.08em 0.38em; }

/* ------------------------------------------------------------------ docs -- */

.docs { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 2.5rem; padding: 2rem 0 4rem; align-items: start; }

.sidebar {
  position: sticky;
  top: 4.2rem;
  max-height: calc(100vh - 5rem);
  overflow-y: auto;
  font-size: 0.9rem;
  padding-right: 0.5rem;
}

.tier-block { margin-bottom: 1.4rem; }
.tier-block > .tier-name {
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tier-block.free > .tier-name { color: var(--jade); }
.tier-block.premium > .tier-name { color: var(--gold); }

.sidebar details { border-left: 2px solid var(--tile); margin-bottom: 0.2rem; }
.sidebar details[open] { border-left-color: var(--line); }
.sidebar summary {
  cursor: pointer;
  list-style: none;
  padding: 0.42rem 0.6rem;
  color: var(--text);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  user-select: none;
}
.sidebar summary::-webkit-details-marker { display: none; }
.sidebar summary::before {
  content: "";
  width: 0.4rem; height: 0.4rem;
  border-right: 1.5px solid var(--dim);
  border-bottom: 1.5px solid var(--dim);
  transform: rotate(-45deg);
  transition: transform 0.15s;
  flex: none;
}
.sidebar details[open] summary::before { transform: rotate(45deg); }
.sidebar summary .count { margin-left: auto; font-family: var(--body); font-size: 0.72rem; color: var(--dim); }

.sidebar ul { list-style: none; margin: 0 0 0.35rem; padding: 0; }
.sidebar li a {
  display: block;
  padding: 0.28rem 0.6rem 0.28rem 1.65rem;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.88rem;
  border-radius: 0 6px 6px 0;
}
.sidebar li a:hover { color: var(--text); background: var(--card); }
.sidebar li a.active { color: var(--jade); background: rgba(94, 226, 138, 0.08); }

.sidebar-toggle { display: none; }

.doc-content { min-width: 0; }
.doc-intro { margin-bottom: 2rem; max-width: 62ch; }
.doc-intro h1 { font-size: 1.8rem; }
.doc-intro p { color: var(--muted); margin: 0.6rem 0 0; }

.cat-head { margin: 2.6rem 0 1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--tile); }
.cat-head:first-of-type { margin-top: 0; }
.cat-head h2 { font-size: 1.3rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.cat-head p { color: var(--muted); margin: 0.3rem 0 0; font-size: 0.93rem; }

.badge {
  font-family: var(--display);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.18em 0.5em;
  border-radius: 4px;
  vertical-align: middle;
}
.badge.free { color: var(--jade); background: rgba(94, 226, 138, 0.12); }
.badge.premium { color: var(--gold); background: rgba(255, 214, 61, 0.12); }

.command {
  background: var(--card);
  border: 1px solid var(--tile);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem 1.4rem;
  margin-bottom: 1rem;
  scroll-margin-top: 4.6rem;
}
.command h3 { font-family: var(--display); font-weight: 600; font-size: 1.1rem; color: var(--jade); display: flex; align-items: center; gap: 0.6rem; }
.command h3 a { color: inherit; text-decoration: none; }
.command h3 a:hover { text-decoration: underline; }
.command .desc { color: var(--text); margin: 0.35rem 0 0.9rem; font-size: 0.97rem; }

.command .label {
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 1rem 0 0.4rem;
}
.command .label:first-of-type { margin-top: 0; }

.params { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.params th, .params td { text-align: left; padding: 0.4rem 0.6rem 0.4rem 0; border-bottom: 1px solid var(--tile); vertical-align: top; }
.params th { font-family: var(--body); font-weight: 600; color: var(--text); white-space: nowrap; width: 8rem; }
.params td { color: var(--muted); }
.params td.req { font-family: var(--body); font-size: 0.74rem; color: var(--dim); white-space: nowrap; width: 5.5rem; text-align: right; padding-right: 0; }
.params td.req.yes { color: var(--amber); }
.params tr:last-child th, .params tr:last-child td { border-bottom: 0; }

.command .how { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.93rem; }
.command .how li { margin-bottom: 0.3rem; }
.command .how li:last-child { margin-bottom: 0; }

.example {
  display: block;
  background: var(--ground);
  border: 1px solid var(--tile);
  border-radius: 7px;
  padding: 0.6rem 0.8rem;
  font-family: var(--body);
  font-size: 0.86rem;
  color: var(--jade);
  overflow-x: auto;
  white-space: pre;
}

.command .shot { margin-top: 1rem; max-width: 560px; }
.command .note { margin: 0.8rem 0 0; padding-left: 0.9rem; border-left: 2px solid var(--amber); color: var(--muted); font-size: 0.88rem; }

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 2.2rem; padding-top: 2.4rem; }
  .stats { grid-template-columns: repeat(2, auto); }
  .topnav a:not(.btn) { display: none; }

  .docs { grid-template-columns: 1fr; gap: 1.2rem; }
  .sidebar { position: static; max-height: none; display: none; }
  .sidebar.open { display: block; }
  .sidebar-toggle {
    display: inline-block;
    margin-bottom: 0.4rem;
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--text);
    font-family: var(--display);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.55rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------------- pnl -- */

.pnl-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 1.6rem; align-items: start; }
.pnl-defs { margin: 0; display: grid; gap: 1.1rem; }
.pnl-defs div { border-left: 2px solid var(--tile); padding-left: 0.95rem; }
.pnl-defs div:first-child { border-left-color: var(--jade); }
.pnl-defs dt { font-family: var(--display); font-weight: 600; font-size: 0.98rem; color: var(--text); }
.pnl-defs dd { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.92rem; }

@media (max-width: 900px) {
  .pnl-split { grid-template-columns: 1fr; }
}
