/* Site chrome around the card: layout, sizing and typography.
 *
 * Every colour, texture, border and radius here comes from a custom property.
 * The values live in themes.css, which every page loads after this file and
 * which swaps the whole palette off `data-theme` on the document element. If
 * you are adding a rule and reach for a hex code, add a variable instead —
 * a literal colour is a rule that only works in one of the seven themes.
 *
 * The 1080x1080 card is deliberately exempt: card.css scopes its own palette to
 * `.bs-card`, so the published card looks the same whatever the site is wearing. */

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--body-bg);
  background-attachment: var(--body-attach);
  color: var(--ink);
  font-family: 'Patrick Hand', ui-rounded, system-ui, sans-serif;
  font-size: 19px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--blue); }

/* Where the pointer and click effects paint: fixed, inert, behind the content
   but above the paper. Themes fill it via --fx-pointer; fx.js keeps --mx/--my
   on it up to date. */
.fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: var(--fx-pointer, none);
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* --- top bar --------------------------------------------------------------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 0 22px;
}

.topbar .logo {
  height: 62px;
  border-radius: 10px;
  transform: rotate(var(--logo-tilt));
  box-shadow: var(--shadow-hard);
  display: block;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 24px;
  color: var(--btn-ink);
  background: var(--btn-bg);
  border: var(--border-width) solid var(--btn-border);
  border-radius: var(--radius-btn);
  padding: 4px 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.btn:hover { transform: var(--btn-hover-transform); box-shadow: var(--btn-hover-shadow); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn.google { border-color: var(--blue); color: var(--blue); }
.btn.facebook { border-color: var(--purple); color: var(--purple); }
.btn.ghost { border-style: var(--ghost-border-style); }

/* The one filled button on the page, so "Sign up" reads as the primary action
   next to "Sign in". */
.btn.primary {
  background: var(--primary-bg);
  border-color: var(--primary-border);
  color: var(--primary-ink);
}

.btn.primary:hover { box-shadow: var(--primary-hover-shadow); }

.btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

.who {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
}

.who img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--green);
}

/* BullSign Credits, in the header beside the name. Reads as a label rather
   than a control, because there is nothing to click yet. */
.credits {
  font-size: 19px;
  color: var(--muted);
  border: var(--border-width) var(--border-style) var(--edge);
  border-radius: var(--radius-btn);
  padding: 2px 12px;
  white-space: nowrap;
}

.credits b {
  color: var(--ink);
  font-weight: 700;
}

/* The unconfirmed-address reminder. Sits under the top bar, full width, and
   is styled as a note rather than an error — an unverified address is not
   currently stopping anything from working. */
.verify-nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 20px;
  padding: 10px 16px;
  font-size: 19px;
  color: var(--ink);
  border: var(--border-width) var(--border-style) var(--edge);
  border-left: 5px solid var(--blue);
  /* A fixed radius, not --radius-btn. Watercolour makes that a 999px pill,
     which on a full-width bar collapses the 5px left accent into a crescent. */
  border-radius: 8px;
}

.verify-nudge .btn { font-size: 20px; }

/* --- headings -------------------------------------------------------------- */

h1.site-title {
  font-family: 'Permanent Marker', cursive;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1;
  color: var(--title-ink);
  text-shadow: var(--title-shadow);
  background: var(--title-fill);
  -webkit-background-clip: var(--title-clip);
  background-clip: var(--title-clip);
  margin: 8px 0 6px;
  display: inline-block;
}

.site-sub {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: clamp(24px, 3.5vw, 36px);
  color: var(--subtitle-ink);
  margin: 0 0 26px;
}

h2.section {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 38px;
  color: var(--heading-ink);
  margin: 0 0 4px;
  display: inline-block;
  padding: 1px 12px;
  position: relative;
}

/* The mark behind a heading. Themes that want a translucent marker sweep leave
   the default inset and tilt; themes that want a solid block set the inset to
   zero and the tilt to none, and the same element becomes a filled label. */
h2.section::before {
  content: '';
  position: absolute;
  inset: var(--heading-hi-inset);
  background: var(--heading-hi);
  transform: rotate(var(--heading-hi-tilt));
  border-radius: var(--heading-hi-radius);
  box-shadow: var(--heading-hi-shadow);
  z-index: -1;
}

.section-note {
  color: var(--muted);
  font-size: 18px;
  margin: 0 0 16px;
}

/* A banner slot can sit directly after any section. Without this the slot's
   "Sponsored" tag, which hangs above the banner, lands on top of the panel
   above it. */
section { margin-bottom: 30px; }

/* --- layout ---------------------------------------------------------------- */

.panel {
  border: var(--border-width) var(--border-style) var(--panel-border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transform: rotate(var(--panel-tilt));
  padding: 20px 22px;
  margin-bottom: 30px;
  position: relative;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.panel.green { border-color: var(--green); background: var(--surface-up); }
.panel.red { border-color: var(--red); background: var(--surface-down); }
.panel.green { transform: rotate(var(--panel-tilt-up)); }
.panel.red { transform: rotate(var(--panel-tilt-down)); }

.panel:hover {
  transform: var(--card-hover-transform);
  box-shadow: var(--shadow-card-hover);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 26px;
}

@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); }
}

.card-hold {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

/* --- movers tables --------------------------------------------------------- */

.movers { width: 100%; border-collapse: collapse; }

.movers caption {
  font-family: 'Permanent Marker', cursive;
  font-size: 28px;
  text-align: left;
  padding-bottom: 10px;
}

.movers.up caption { color: var(--green); }
.movers.down caption { color: var(--red); }

.movers th {
  text-align: left;
  font-weight: 400;
  font-size: 16px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 0 8px 6px 0;
  border-bottom: 2px solid var(--edge);
}

.movers td {
  padding: 9px 8px 9px 0;
  border-bottom: 1px var(--border-style) var(--edge);
  vertical-align: baseline;
}

.movers tbody tr:last-child td { border-bottom: 0; }

.movers .rank { color: var(--muted); width: 2.2em; font-size: 16px; }

.movers .sym {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 27px;
  color: var(--key-ink);
}

.movers .co {
  color: var(--muted);
  font-size: 16px;
  display: block;
  max-width: 22ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movers .px { text-align: right; font-variant-numeric: tabular-nums; }

.movers .pct {
  text-align: right;
  font-family: 'Permanent Marker', cursive;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.movers.up .pct { color: var(--green); }
.movers.down .pct { color: var(--red); }

/* --- compact movers -------------------------------------------------------
   The full-size table above is kept for any wider view that wants it, but the
   front page uses this: same ten rows in roughly a third of the height. The
   company name moves into a `title` tooltip rather than a second line, which is
   what was costing most of the vertical space. */

.panel.compact { padding: 12px 14px; }

.movers.dense caption {
  font-size: 21px;
  padding-bottom: 6px;
}

.movers.dense thead { display: none; }

.movers.dense td {
  padding: 3px 6px 3px 0;
  border-bottom: 0;
  font-size: 17px;
  line-height: 1.3;
}

.movers.dense tbody tr { transition: background .12s ease; }
.movers.dense tbody tr:nth-child(even) { background: var(--row-alt); }
.panel.green .movers.dense tbody tr:nth-child(even) { background: var(--row-alt-up); }
.panel.red .movers.dense tbody tr:nth-child(even) { background: var(--row-alt-down); }
.movers.dense tbody tr:hover { background: var(--row-hover); }

.movers.dense .rank {
  width: 1.9em;
  font-size: 14px;
  text-align: right;
  padding-right: 8px;
}

.movers.dense .sym {
  font-size: 20px;
  display: inline;
}

.movers.dense .co { display: none; }

.movers.dense .px {
  font-size: 16px;
  color: var(--muted);
}

.movers.dense .pct {
  font-size: 17px;
  width: 4.6em;
}

.movers-split { gap: 18px; }

/* --- status strip ---------------------------------------------------------- */

.status-strip {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.chip {
  border: var(--border-width) var(--border-style) var(--panel-border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  min-width: 190px;
  position: relative;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.chip.open { border-color: var(--green); background: var(--surface-up); transform: rotate(var(--chip-tilt-open)); }
.chip.soon { border-color: var(--purple); background: var(--surface-soon); transform: rotate(var(--chip-tilt-soon)); }
.chip.closed { border-color: var(--muted); }

.chip:hover { transform: var(--card-hover-transform); box-shadow: var(--shadow-card-hover); }

.chip .k { font-size: 17px; color: var(--key-ink); }

.chip .v {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 30px;
  line-height: 1.1;
}

.chip .sub { font-size: 15px; color: var(--muted); }

/* --- signals --------------------------------------------------------------- */

.signal {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px var(--border-style) var(--edge);
}

.signal:last-child { border-bottom: 0; }

/* Themes choose between outlined and filled stance pills by setting
   --stance-fill to a colour (filled) or to `transparent` (outlined). */
.stance {
  font-family: 'Permanent Marker', cursive;
  font-size: 19px;
  padding: 2px 10px;
  border-radius: var(--radius-pill-sm);
  border: 2px solid;
  flex: none;
}

.stance.buy { color: var(--stance-buy-ink); border-color: var(--green); background: var(--stance-buy-bg); }
.stance.sell { color: var(--stance-sell-ink); border-color: var(--red); background: var(--stance-sell-bg); }
.stance.hold, .stance.watch { color: var(--stance-watch-ink); border-color: var(--purple); background: var(--stance-watch-bg); }

.signal .body { min-width: 0; }
.signal .body b { font-family: 'Caveat', cursive; font-size: 25px; color: var(--key-ink); }
.signal .why { color: var(--muted); font-size: 17px; }

/* --- misc ------------------------------------------------------------------ */

.empty {
  color: var(--muted);
  font-size: 18px;
  padding: 14px 0;
}

.note-box {
  background: var(--note);
  color: var(--note-ink);
  padding: 18px 20px;
  transform: rotate(-.8deg);
  box-shadow: var(--shadow-hard);
  position: relative;
  margin: 26px 0;
}

.note-box .cap {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 28px;
  color: var(--note-cap-ink);
  border-bottom: 3px solid var(--note-cap-rule);
  display: inline-block;
  margin-bottom: 6px;
}

footer.site {
  border-top: 3px var(--border-style) var(--edge);
  margin-top: 40px;
  padding-top: 18px;
  color: var(--muted);
  font-size: 17px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.handle-ink {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 26px;
  color: var(--ink);
  position: relative;
}

.skeleton {
  background: linear-gradient(90deg, var(--row-alt), var(--row-hover), var(--row-alt));
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
  border-radius: 6px;
  height: 1em;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* --- click ripple ----------------------------------------------------------
   fx.js appends one of these at the pointer and removes it when the animation
   ends. Geometry and timing are shared; the fill, ring and size are the
   theme's, so a click looks like an ink bloom on paper and like a neon flare
   at night. */

.ripple {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%) scale(0);
  background: var(--ripple-fill);
  border: var(--ripple-ring, 0);
  animation: ripple-out var(--ripple-ms, 620ms) cubic-bezier(.22, .8, .3, 1) forwards;
}

@keyframes ripple-out {
  from { transform: translate(-50%, -50%) scale(.15); opacity: 1; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* Motion is decoration here, never information: with it suppressed the page
   loses the ripple, the pointer glow and every hover shift, and reads exactly
   the same. fx.js checks the same query before it spawns anything. */
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
  .ripple, .fx-layer { display: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .btn:hover, .panel:hover, .chip:hover { transform: none; }
}
