/* Site chrome around the card. Same palette, same hand-drawn language, but
   fluid — only the card itself is a fixed canvas. */

:root {
  --paper: #FDFBF5;
  --rule: #DAE7F2;
  --ink: #243044;
  --muted: #7C8798;
  --green: #2E7D46;
  --greenHi: #B9E7C4;
  --red: #C6403F;
  --blue: #3B5BC4;
  --purple: #6B4FC4;
  --note: #FDF0A8;
  --edge: rgba(36, 48, 68, .15);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  background-image: repeating-linear-gradient(to bottom, transparent 0 51px, var(--rule) 51px 53px);
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'Patrick Hand', ui-rounded, system-ui, sans-serif;
  font-size: 19px;
  line-height: 1.5;
}

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

.wrap {
  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(-2deg);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .16);
  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(--ink);
  background: rgba(255, 255, 255, .6);
  border: 3px solid var(--ink);
  border-radius: 6px;
  padding: 4px 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform .12s ease;
}

.btn:hover { transform: rotate(-1deg) translateY(-1px); }
.btn.google { border-color: var(--blue); color: var(--blue); }
.btn.facebook { border-color: var(--purple); color: var(--purple); }
.btn.ghost { border-style: dashed; }

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

.btn.primary:hover { background: #26663A; }

.btn:focus-visible {
  outline: 3px solid var(--purple);
  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);
}

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

h1.site-title {
  font-family: 'Permanent Marker', cursive;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1;
  color: var(--green);
  margin: 8px 0 6px;
}

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

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

h2.section::before {
  content: '';
  position: absolute;
  inset: 6px -4px 4px;
  background: var(--greenHi);
  transform: rotate(-1deg);
  border-radius: 3px;
  z-index: -1;
}

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

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

.panel {
  border: 3px dashed var(--ink);
  border-radius: 18px;
  background: rgba(255, 255, 255, .55);
  padding: 20px 22px;
  margin-bottom: 30px;
}

.panel.green { border-color: var(--green); }

.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 dashed 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(--blue);
}

.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:nth-child(even) {
  background: rgba(36, 48, 68, .035);
}

.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: 3px dashed var(--ink);
  border-radius: 12px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, .5);
  min-width: 190px;
}

.chip.open { border-color: var(--green); }
.chip.soon { border-color: var(--purple); }
.chip.closed { border-color: var(--muted); }

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

.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 dashed var(--edge);
}

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

.stance {
  font-family: 'Permanent Marker', cursive;
  font-size: 19px;
  padding: 2px 10px;
  border-radius: 4px;
  border: 2px solid;
  flex: none;
}

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

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

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

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

.note-box {
  background: var(--note);
  padding: 18px 20px;
  transform: rotate(-.8deg);
  box-shadow: 3px 5px 0 rgba(0, 0, 0, .10);
  position: relative;
  margin: 26px 0;
}

.note-box .cap {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 28px;
  color: #8A6A12;
  border-bottom: 3px solid #D9C05A;
  display: inline-block;
  margin-bottom: 6px;
}

footer.site {
  border-top: 3px dashed 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, rgba(0,0,0,.05), rgba(0,0,0,.09), rgba(0,0,0,.05));
  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; }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
  .btn:hover { transform: none; }
}
