/* ===================================================================
   Ronin Path — foundation
   tokens.css : colour, type, controls, focus

   Built on bill-checker's foundation (itself Mike's), turned to the
   channel's look: black like the videos, purple as the brand, gold for
   rewards. The buyer is young and on a phone, so the base is 18px, not
   bill-checker's 20px, and there is no A-/A+ control.

   Contrast was measured (test/check-app.js): --ink on --bg and white on
   --brand both clear WCAG AA for body text.
   =================================================================== */

:root{
  color-scheme: dark;

  --bg:      #0E0D12;
  --surface: #18161F;
  --raised:  #221F2B;

  --ink:      #F2EEF8;
  --ink-soft: #B9B2C6;

  --line:   #3A3546;
  --line-2: #2A2633;

  /* purple carries every action; the light one is for text and links */
  --brand:    #7C3AED;
  --brand-dk: #6428D4;
  --brand-ink:#C4A7FF;
  --gold:     #E8B54A;

  --good:    #6FDC93;
  --bad:     #FF8A8A;
  --good-bg: #13291C;
  --bad-bg:  #2E1517;
}

*{ box-sizing: border-box; }

html{
  font-size: 18px;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}

h1, h2, h3, .amount, .brand{
  font-weight: 800;
  letter-spacing: -0.01em;
}

a{ color: var(--brand-ink); }

/* -------------------------------------------------------------------
   Controls. Inputs 3rem and buttons 3.2rem tall: 54px and 58px at the
   18px base, past the 48px touch floor with sweaty hands mid-set.
   ------------------------------------------------------------------- */

input, select, textarea{
  font-family: inherit;
  font-size: 1.05rem;
  min-height: 3rem;
  padding: 0.6rem 0.7rem;
  width: 100%;
  background: var(--raised);
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 10px;
}

.btn{
  display: block;
  width: 100%;
  border-radius: 12px;
  min-height: 3.2rem;
  font-size: 1rem;
  font-weight: 800;
  border: 2px solid var(--brand);
  background: var(--brand);
  color: #fff;
  padding: 0 1rem;
  cursor: pointer;
}
.btn:hover{ background: var(--brand-dk); }
.btn.secondary{ background: transparent; color: var(--brand-ink); }
.btn.secondary:hover{ background: var(--raised); }
.btn:disabled{ opacity: 0.4; cursor: default; }
.btn[hidden]{ display: none; }

.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible{
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* -------------------------------------------------------------------
   The study button. Every rule of ours carries one.
   ------------------------------------------------------------------- */

.src{
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.05em 0.6em;
  margin-left: 0.35em;
  font-size: 0.72rem;
  font-family: inherit;
  font-weight: 700;
  color: var(--brand-ink);
  background: transparent;
  border: 1px solid var(--brand);
  border-radius: 999px;
  cursor: pointer;
  vertical-align: baseline;
}
.src:hover{ background: var(--raised); }

.src-panel{
  border-left: 4px solid var(--brand);
  background: var(--raised);
  padding: 0.8rem 1rem;
  margin: 0.6rem 0;
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
}
.src-panel p{ margin: 0 0 0.3rem; }
.src-panel .body{ font-weight: 700; }
.src-panel .doc,
.src-panel .checked{ color: var(--ink-soft); }
.src-panel a{ word-break: break-all; }
