/* Brand layer, loaded last. Restyles the site to match the Scout artwork:
   off-white page, near-black bold type, one green, white rounded cards with
   soft shadows, and a pale green wave at the foot of the page. Light is the
   default theme; the dark theme keeps its own tokens and only picks up the
   shape (radii, type) from here. */

:root[data-theme="light"] {
  --bg: #f7f9f7;
  --ink: #0b1a14;
  --ink-soft: #2c3a33;
  --ink-mute: #56655c;
  --ink-faint: #82908a;
  --hairline-ghost: #edf2ee;
  --hairline: #dde6df;
  --hairline-strong: #b9c7bd;

  /* The artwork's green. --accent is the text-safe shade (AA on white);
     --btn-bg is the brighter fill. */
  --accent: #2a7d36;
  --link: #2a7d36;
  --link-hover: #1d5f27;
  --btn-bg: #2e8b3c;
  --btn-ink: #ffffff;
  --btn-hover-bg: #24762f;

  --radius-card: 16px;
  --radius-control: 12px;
  --shadow-card: 0 1px 2px rgba(11, 26, 20, 0.05), 0 12px 32px rgba(20, 60, 30, 0.1);
}

/* Type: heavier, tighter headings, like the banner's headline. */
h1,
h2,
h3 {
  letter-spacing: -0.03em;
}

h1 {
  font-weight: 600;
  line-height: 1.08;
}

.auth__title,
.signup__headline {
  font-weight: 600;
}

/* Pale green wave at the foot of every page. */
body {
  background-color: var(--bg);
  background-image: linear-gradient(to bottom, transparent calc(100% - 22rem), color-mix(in srgb, var(--accent) 7%, transparent));
  background-attachment: scroll;
}

/* Brand mark in the top bar. */
.site-bar__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.site-bar__logo {
  display: block;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 8px;
}

.site-bar__brand-accent {
  color: var(--accent);
}

/* Primary actions: green, rounded, and a touch heavier. */
:root[data-theme="light"] .auth__submit,
:root[data-theme="light"] .site-signup {
  background: var(--btn-bg);
  color: var(--btn-ink);
  box-shadow: 0 6px 16px rgba(46, 139, 60, 0.28);
}

:root[data-theme="light"] .auth__submit:hover,
:root[data-theme="light"] .site-signup:hover {
  background: var(--btn-hover-bg);
}

/* Follow-trades page: the stage's lead copy, mascot, and positions card. */
.signup__lead {
  margin: 0;
  max-width: 34rem;
  color: var(--su-mute);
  font-size: 1rem;
  line-height: 1.5;
}

.signup__lead strong {
  color: var(--su-ink);
}

.signup__mascot {
  display: none;
}

.signup--scout .scout-positions {
  margin-top: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--su-line);
}

.signup--scout .scout-positions__title {
  color: var(--su-ink);
  font-weight: 600;
}

.signup--scout .scout-positions__summary,
.signup--scout .scout-positions__note,
.signup--scout .scout-positions__table thead th,
.signup--scout .scout-positions__closed {
  color: var(--su-mute);
}

.signup--scout .scout-positions__table {
  color: var(--su-ink);
}

.signup--scout .scout-positions__table th,
.signup--scout .scout-positions__table td {
  border-bottom-color: var(--su-line);
}

.signup--scout .scout-positions__table tbody th a,
.signup--scout .scout-positions__note a {
  color: var(--su-green-deep);
}

.signup--scout .scout-positions__gain {
  color: var(--su-green-deep);
}

.signup--scout .scout-positions__loss {
  color: #c81361;
}

@media (min-width: 860px) {
  .signup--scout .signup__mascot {
    display: block;
    align-self: end;
    justify-self: start;
    margin-top: 0.5rem;
    width: 11rem;
    height: auto;
  }
}

/* The stage carries its own palette; point it at the artwork's green. */
.signup {
  --su-green: #2e8b3c;
  --su-green-deep: #2a7d36;
  --su-green-wash: #dcebdd;
  --su-bg: #f8faf8;
}

/* The stage's dark-theme drop shadow reads as grey smudges on a light page. */
:root[data-theme="light"] .signup {
  box-shadow: var(--shadow-card);
}

.signup__header {
  display: grid;
  gap: 1.1rem;
}

.signup__lead a {
  color: var(--su-green-deep);
  font-weight: 600;
}

/* Market Stress Monitor: the bank-failure year strip and recent-failures list. */
.stress-years {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: end;
  gap: 0.6rem;
  height: 7.5rem;
  margin: 0.75rem 0 1rem;
}

.stress-years__col {
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 0.25rem;
  height: 100%;
}

.stress-years__count,
.stress-years__year {
  color: var(--ink-mute);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.stress-years__count {
  color: var(--ink);
  font-weight: 600;
}

.stress-years__bar {
  align-self: end;
  width: 100%;
  max-width: 3rem;
  min-height: 2px;
  border-radius: 6px 6px 2px 2px;
  background: var(--accent);
}

.stress-failures {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.stress-failures th,
.stress-failures td {
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  font-weight: 400;
}

.stress-failures tbody th {
  font-weight: 600;
}

.stress-failures tbody th span {
  display: block;
  color: var(--ink-mute);
  font-size: 0.75rem;
  font-weight: 400;
}

.stress-failures td:last-child,
.stress-failures thead th:last-child {
  text-align: right;
}
