/* Crypto Risk Tools by Crypto Renegades. One stylesheet, no framework. */

/* ---------- tokens ---------- */
:root {
  color-scheme: light dark;

  /* brand */
  --green: #45a02f;
  --green-bright: #6bcc50;
  --green-strong: #2f7a22; /* buttons: 5.35:1 with white */
  --green-text: #2b6a1f; /* links and accents on white: 6.6:1 */
  --green-soft: #eef8ea;
  --green-line: #cfe9c5;

  /* neutrals */
  --bg: #f5f7f4;
  --card: #ffffff;
  --ink: #0b120b;
  --ink-2: #263026;
  --muted: #5a615a; /* 6.4:1 on white */
  --line: #e2e7e1;
  --line-strong: #cdd4cc;
  --field: #ffffff;

  /* result panel: dark in both themes */
  --panel: #0f1a0f;
  --panel-2: #172517;
  --panel-ink: #ffffff;
  --panel-muted: #a8b5a7;
  --panel-line: rgb(255 255 255 / 0.1);
  --panel-green: #86dc6b;

  /* status */
  --danger: #b42318;
  --danger-soft: #fdecea;
  --warn: #8a5a00;
  --warn-soft: #fff4dc;

  /* type scale (1.25 ratio, 16px base) */
  --fs-xs: 0.8125rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.75rem;
  --fs-2xl: clamp(2rem, 1.35rem + 2.6vw, 3rem);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* spacing scale (4px base) */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4rem;
  --s9: 6rem;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgb(16 24 16 / 0.05), 0 8px 24px -12px rgb(16 24 16 / 0.14);
  --shadow-lg: 0 2px 4px rgb(16 24 16 / 0.04), 0 24px 48px -24px rgb(16 24 16 / 0.28);
  --focus: 0 0 0 3px var(--bg), 0 0 0 5px var(--green-strong);

  --max: 1140px;
  --prose: 720px;
  --gutter: 16px;
}

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --green-strong: #6bcc50;
    --green-text: #86dc6b;
    --green-soft: #142414;
    --green-line: #24412a;
    --bg: #090e09;
    --card: #111911;
    --ink: #e8ede7;
    --ink-2: #cdd6cc;
    --muted: #9fab9e;
    --line: #223022;
    --line-strong: #314231;
    --field: #0c130c;
    --panel: #152215;
    --panel-2: #1c2c1c;
    --danger: #ff8a8e;
    --danger-soft: #2a1414;
    --warn: #f5b942;
    --warn-soft: #2a2110;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px -12px rgb(0 0 0 / 0.6);
    --shadow-lg: 0 24px 48px -24px rgb(0 0 0 / 0.7);
  }
}

/* ---------- base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--fs-base) / 1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img,
svg {
  display: block;
  max-width: 100%;
}
h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
h1 {
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
h2 {
  font-size: var(--fs-xl);
  font-weight: 750;
}
h3 {
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: -0.01em;
}
p {
  margin: 0;
}
a {
  color: var(--green-text);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2.5px;
}
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 6px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: var(--s4);
  top: -100px;
  z-index: 10;
  background: var(--card);
  color: var(--ink);
  padding: var(--s2) var(--s4);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip:focus {
  top: var(--s3);
}
.num,
.tabular {
  font-variant-numeric: tabular-nums;
}
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.prose-wrap {
  max-width: calc(var(--prose) + 2 * var(--gutter));
}

/* ---------- header ---------- */
.site-head {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  color: var(--ink);
  text-decoration: none;
  line-height: 1.1;
}
.brand-mark {
  width: 32px;
  height: 32px;
  flex: none;
}
.brand b {
  display: block;
  font-size: var(--fs-base);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.brand small {
  display: block;
  font-size: var(--fs-xs);
  color: var(--muted);
  font-weight: 500;
}
.nav-list {
  display: flex;
  gap: var(--s1);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) var(--s3);
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
}
.nav-list a:hover {
  background: var(--bg);
  color: var(--ink);
}
.nav-list a[aria-current="page"] {
  background: var(--green-soft);
  color: var(--green-text);
}
.nav-list svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.menu {
  position: relative;
}
.nav-mob {
  display: none;
}
.chart [hidden] {
  display: none;
}
@media (max-width: 959px) {
  .nav-desk {
    display: none;
  }
  .nav-mob {
    display: block;
  }
  .menu > summary {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    list-style: none;
    cursor: pointer;
    padding: var(--s2) var(--s3);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: var(--fs-sm);
    font-weight: 650;
    color: var(--ink);
    min-height: 40px;
  }
  .menu > summary::-webkit-details-marker {
    display: none;
  }
  .menu > summary svg {
    width: 16px;
    height: 16px;
    transition: transform 0.15s;
  }
  .menu[open] > summary svg {
    transform: rotate(180deg);
  }
  .menu > .nav-list {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 20;
    flex-direction: column;
    width: min(300px, calc(100vw - 2 * var(--gutter)));
    padding: var(--s2);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
  }
  .menu > .nav-list a {
    display: flex;
    border-radius: var(--radius-sm);
    padding: var(--s3);
    font-size: var(--fs-base);
  }
}

/* ---------- hero ---------- */
.hero {
  padding: var(--s7) 0 var(--s6);
  background:
    radial-gradient(900px 320px at 12% -10%, color-mix(in srgb, var(--green) 14%, transparent), transparent 70%),
    var(--bg);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s4);
  padding: var(--s1) var(--s3);
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: var(--fs-xs);
  font-weight: 650;
  color: var(--ink-2);
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}
@media (max-width: 639px) {
  .hero {
    padding-top: var(--s6);
  }
  .lede {
    font-size: var(--fs-base);
  }
  .card,
  .panel {
    padding: var(--s5) var(--s4);
  }
}
.lede {
  margin-top: var(--s4);
  max-width: 66ch;
  font-size: var(--fs-md);
  color: var(--muted);
  line-height: 1.55;
}

/* ---------- tool layout ---------- */
.tool {
  display: grid;
  gap: var(--s4);
  margin-top: var(--s6);
}
@media (min-width: 960px) {
  .tool {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    gap: var(--s5);
    align-items: start;
  }
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--s5);
}
@media (min-width: 640px) {
  .card {
    padding: var(--s6);
  }
}
.form-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s5);
}
.form-head h2 {
  font-size: var(--fs-md);
}

/* segmented long/short control: native radios */
.segmented {
  border: 0;
  margin: 0 0 var(--s5);
  padding: 0;
  min-width: 0;
}
.segmented legend {
  font-size: var(--fs-sm);
  font-weight: 650;
  margin-bottom: var(--s2);
  padding: 0;
}
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.seg label {
  position: relative;
}
.seg input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.seg span {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--s2);
  min-height: 40px;
  border-radius: 999px;
  font-weight: 650;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.seg svg {
  width: 16px;
  height: 16px;
}
.seg input:checked + span {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 2px 8px -4px rgb(0 0 0 / 0.2);
}
.seg input[value="long"]:checked + span svg {
  color: var(--green);
}
.seg input[value="short"]:checked + span svg {
  color: var(--danger);
}
.seg input:focus-visible + span {
  box-shadow: var(--focus);
}

/* fields */
.fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s4) var(--s3);
}
@media (min-width: 520px) {
  .fields {
    gap: var(--s4);
  }
}
.field.full {
  grid-column: 1 / -1;
}
.field label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 650;
  margin-bottom: var(--s2);
}
.field .opt {
  font-weight: 500;
  color: var(--muted);
}
.input {
  position: relative;
}
.input input {
  width: 100%;
  height: 48px;
  padding: 0 var(--s4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--field);
  color: var(--ink);
  font: 500 var(--fs-base) / 1 var(--font);
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.input input::placeholder {
  color: var(--muted);
  opacity: 0.75;
}
.input input:hover {
  border-color: var(--muted);
}
.input input:focus {
  outline: none;
  border-color: var(--green-strong);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 28%, transparent);
}
.input input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent);
}
.input .affix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-weight: 500;
}
.input .pre {
  left: var(--s4);
}
.input .suf {
  right: var(--s4);
}
.input.has-pre input {
  padding-left: 2rem;
}
.input.has-suf input {
  padding-right: 2.25rem;
}
.help {
  margin-top: var(--s1);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.error {
  margin-top: var(--s1);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--danger);
}
.error[hidden],
.help[hidden] {
  display: none;
}
.form-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--s3);
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.form-foot p {
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.form-foot svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--green);
}

/* quick-pick chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
  margin-top: var(--s5);
}
.chips > span {
  font-size: var(--fs-sm);
  font-weight: 650;
  margin-right: var(--s1);
}
.chip {
  min-height: 36px;
  padding: 0 var(--s3);
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  font: 600 var(--fs-sm) / 1 var(--font);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.chip:hover {
  border-color: var(--green);
  background: var(--green-soft);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 44px;
  padding: 0 var(--s4);
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: 650 var(--fs-sm) / 1 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px);
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.btn-primary {
  background: var(--green-strong);
  color: #fff;
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--green-strong) 88%, #000);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  background: var(--bg);
}
.btn-link {
  min-height: 32px;
  padding: 0 var(--s2);
  background: none;
  border: 0;
  color: var(--green-text);
  font-size: var(--fs-xs);
}
.btn-link:hover {
  text-decoration: underline;
}
@media (prefers-color-scheme: dark) {
  .btn-primary {
    color: #071107;
  }
  .btn-primary:hover {
    background: color-mix(in srgb, var(--green-strong) 85%, #fff);
  }
}

/* ---------- result panel ---------- */
.panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: var(--panel-ink);
  padding: var(--s5);
  box-shadow: var(--shadow-lg);
}
@media (min-width: 640px) {
  .panel {
    padding: var(--s6);
  }
}
.panel::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -140px;
  right: -120px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(107 204 80 / 0.32), transparent);
}
@media (prefers-color-scheme: dark) {
  .panel {
    border: 1px solid var(--line-strong);
  }
}
.panel .label {
  font-size: var(--fs-sm);
  color: var(--panel-muted);
}
.big {
  margin-top: var(--s1);
  font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.big-sub {
  margin-top: var(--s2);
  color: var(--panel-muted);
  font-variant-numeric: tabular-nums;
}
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: var(--s5) 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel-line);
  border: 1px solid var(--panel-line);
}
.stats > div {
  background: var(--panel-2);
  padding: var(--s3) var(--s4);
  min-width: 0;
}
.stats .wide {
  grid-column: 1 / -1;
}
.stats dt {
  font-size: var(--fs-xs);
  color: var(--panel-muted);
}
.stats dd {
  margin: 2px 0 0;
  font-size: var(--fs-md);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stats dd small {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--panel-muted);
}
.alert {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  margin-top: var(--s4);
  padding: var(--s3) var(--s4);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.alert svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 1px;
}
.alert[hidden] {
  display: none;
}
.panel .alert.danger {
  background: rgb(229 72 77 / 0.18);
}
.panel .alert.danger svg {
  color: #ff8a8e;
}
.panel .alert.warn {
  background: rgb(245 185 66 / 0.14);
}
.panel .alert.warn svg {
  color: #f5b942;
}
.panel .alert.ok {
  background: rgb(107 204 80 / 0.14);
}
.panel .alert.ok svg {
  color: var(--panel-green);
}
.panel .empty {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  font-size: var(--fs-md);
}
.panel .empty svg {
  width: 22px;
  height: 22px;
  flex: none;
  margin-top: 3px;
  color: #f5b942;
}
.panel-section {
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--panel-line);
}
.targets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s2);
  margin: var(--s3) 0 0;
  padding: 0;
  list-style: none;
}
.targets li {
  padding: var(--s3);
  border-radius: var(--radius-sm);
  background: rgb(255 255 255 / 0.05);
  min-width: 0;
}
.targets .m {
  font-size: var(--fs-xs);
  color: var(--panel-muted);
}
.targets .p {
  margin-top: 2px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-sm);
}
@media (max-width: 519px) {
  .targets {
    grid-template-columns: 1fr;
  }
  .targets li {
    display: grid;
    grid-template-columns: 2.5rem 1fr auto;
    align-items: baseline;
    gap: var(--s2);
    padding: var(--s2) var(--s3);
  }
  .targets .p {
    margin: 0;
  }
}
.targets .p,
.targets .g {
  white-space: nowrap;
}
.targets .g {
  font-size: var(--fs-xs);
  color: var(--panel-green);
  font-variant-numeric: tabular-nums;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s5);
}
.panel .btn-ghost {
  color: var(--panel-ink);
  border-color: rgb(255 255 255 / 0.22);
}
.panel .btn-ghost:hover {
  background: rgb(255 255 255 / 0.08);
}
.panel .btn-primary {
  background: var(--panel-green);
  color: #071107;
}
.panel .btn-primary:hover {
  background: #9be585;
}
.panel :focus-visible {
  box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--panel-green);
}
.actions .btn {
  flex: 1 1 0;
}
@media (min-width: 520px) {
  .actions .btn {
    flex: 0 0 auto;
  }
}
.copied {
  font-size: var(--fs-xs);
  color: var(--panel-green);
  align-self: center;
  min-width: 6ch;
}
@media (max-width: 519px) {
  .copied {
    flex-basis: 100%;
    min-height: 1.4em;
    text-align: center;
  }
}

/* trade map bar (risk reward) */
.map {
  margin-top: var(--s5);
}
.map-bar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgb(255 255 255 / 0.08);
}
.map-bar .r {
  background: #e5484d;
}
.map-bar .w {
  background: var(--panel-green);
}
.map-legend {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  margin-top: var(--s2);
  font-size: var(--fs-xs);
  color: var(--panel-muted);
  font-variant-numeric: tabular-nums;
}
.map-legend b {
  color: var(--panel-ink);
  font-weight: 650;
}

/* ---------- content ---------- */
.content {
  padding: var(--s8) 0 var(--s7);
}
.content > .wrap > * + * {
  margin-top: var(--s7);
}
.toolkit-wrap {
  margin-top: var(--s8);
  padding-top: var(--s7);
  border-top: 1px solid var(--line);
}
.section > * + * {
  margin-top: var(--s4);
}
.section h2 + p {
  margin-top: var(--s3);
}
.section h3 {
  margin-top: var(--s5);
}
.section p,
.section li {
  color: var(--ink-2);
}
.section ul,
.section ol {
  padding-left: 1.25rem;
}
.section li + li {
  margin-top: var(--s2);
}
.section li::marker {
  color: var(--green);
  font-weight: 700;
}
.formula {
  margin: 0;
  padding: var(--s4) var(--s5);
  list-style: none;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--ink);
}
.formula li + li {
  margin-top: var(--s2);
}
.formula b {
  color: var(--green-text);
  font-weight: 700;
}
.example {
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  overflow: hidden;
}
.example-head {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s3) var(--s5);
  background: var(--green-soft);
  border-bottom: 1px solid var(--green-line);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--green-text);
}
.example-head svg {
  width: 18px;
  height: 18px;
}
.example ol {
  margin: 0;
  padding: var(--s4) var(--s5) var(--s4) calc(var(--s5) + 1.1rem);
}
.example li {
  padding-left: var(--s1);
  font-variant-numeric: tabular-nums;
}
.example .try {
  padding: 0 var(--s5) var(--s4);
}
.mistakes {
  display: grid;
  gap: var(--s3);
  padding: 0 !important;
  list-style: none;
}
.mistakes li {
  margin: 0 !important;
  padding: var(--s4);
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
}
.mistakes b {
  display: block;
  color: var(--ink);
  margin-bottom: 2px;
}

/* brand callout: the one link to the matching page on cryptorenegades.co */
.callout {
  display: grid;
  gap: var(--s4);
  align-items: center;
  padding: var(--s5);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--green-soft), var(--card) 70%);
  border: 1px solid var(--green-line);
}
@media (min-width: 720px) {
  .callout {
    padding: var(--s6);
    justify-items: start;
  }
}
.callout h2 {
  font-size: var(--fs-lg);
}
.callout p {
  margin-top: var(--s2);
  color: var(--ink-2);
}

/* ---------- tables ---------- */
.table-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.table-card > header {
  padding: var(--s5) var(--s5) var(--s4);
}
.table-card > header h2 {
  font-size: var(--fs-lg);
}
.table-card > header p {
  margin-top: var(--s1);
  font-size: var(--fs-sm);
  color: var(--muted);
}
.table-card > footer {
  padding: var(--s3) var(--s5) var(--s4);
  font-size: var(--fs-xs);
  color: var(--muted);
  border-top: 1px solid var(--line);
}
table.data {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-base);
}
.data caption {
  text-align: left;
}
.data th,
.data td {
  padding: var(--s3) var(--s5);
  text-align: right;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data th:first-child,
.data td:first-child {
  text-align: left;
}
.data thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--card);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: normal;
  vertical-align: bottom;
  box-shadow: inset 0 -1px 0 var(--line-strong);
  border-bottom: 0;
}
.data tbody th {
  font-weight: 650;
}
.data tbody tr:last-child > * {
  border-bottom: 0;
}
.data tbody tr:hover > * {
  background: color-mix(in srgb, var(--green) 5%, transparent);
}
.data .hl > * {
  background: var(--green-soft) !important;
  font-weight: 700;
}
.data .yours > * {
  background: var(--green-soft);
  color: var(--green-text);
  font-weight: 700;
}
.data .yours th {
  color: var(--green-text);
}
.data .sub {
  display: block;
  font-size: var(--fs-xs);
  color: var(--muted);
  font-weight: 500;
}
.bar-cell {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--s2);
}
.bar {
  display: inline-block;
  height: 6px;
  border-radius: 99px;
  background: var(--green);
  opacity: 0.7;
}
@media (max-width: 639px) {
  .data th,
  .data td {
    padding: var(--s2) 6px;
    font-size: var(--fs-sm);
  }
  .data th:first-child,
  .data td:first-child {
    padding-left: var(--s3);
  }
  .data th:last-child,
  .data td:last-child {
    padding-right: var(--s3);
  }
  .data thead th {
    font-size: 0.6875rem;
    letter-spacing: 0.02em;
  }
  .table-card > header,
  .table-card > footer {
    padding-inline: var(--s4);
  }
  .hide-sm {
    display: none;
  }
}

/* inline tool row above a table */
.inline-tool {
  display: grid;
  gap: var(--s4);
  align-items: end;
  padding: var(--s4) var(--s5) var(--s5);
  border-top: 1px solid var(--line);
  background: var(--bg);
}
@media (max-width: 639px) {
  .inline-tool {
    padding-inline: var(--s4);
  }
}
@media (min-width: 640px) {
  .inline-tool {
    grid-template-columns: minmax(0, 260px) 1fr;
  }
}
.yours-out {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s2);
  margin: 0;
}
.yours-out div {
  padding: var(--s2) var(--s3);
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--line);
  min-width: 0;
}
.yours-out dt {
  font-size: var(--fs-xs);
  color: var(--muted);
  font-weight: 600;
}
.yours-out dd {
  margin: 0;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-base);
  white-space: nowrap;
}
.select {
  height: 40px;
  padding: 0 2rem 0 var(--s3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--field)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23889188' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 0.7rem center;
  color: var(--ink);
  font: 600 var(--fs-sm) / 1 var(--font);
  -webkit-appearance: none;
  appearance: none;
}
.select:focus {
  outline: none;
  box-shadow: var(--focus);
}

/* ---------- chart ---------- */
.chart-card {
  padding: var(--s5);
}
.chart-card figcaption {
  margin-top: var(--s3);
  font-size: var(--fs-sm);
  color: var(--muted);
}
.chart {
  width: 100%;
  height: auto;
  overflow: visible;
}
.chart-m {
  display: none;
}
@media (max-width: 559px) {
  .chart-d {
    display: none;
  }
  .chart-m {
    display: block;
  }
  .chart-card {
    padding: var(--s4) var(--s3);
  }
}
.chart .grid line {
  stroke: var(--line);
  stroke-width: 1;
}
.chart .axis text {
  fill: var(--muted);
  font: 500 12px var(--font);
  font-variant-numeric: tabular-nums;
}
.chart .axis-title {
  fill: var(--muted);
  font: 600 12px var(--font);
}
.chart .curve {
  fill: none;
  stroke: var(--green);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
}
@media (prefers-color-scheme: dark) {
  .chart .curve {
    stroke: var(--green-bright);
  }
  .chart .you circle {
    fill: var(--green-bright);
  }
}
.chart .area {
  fill: var(--green);
  opacity: 0.08;
}
.chart .ref {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
}
.chart .lbl {
  font: 650 12px var(--font);
}
.chart .lbl-green {
  fill: var(--green-text);
}
.chart .lbl-muted {
  fill: var(--muted);
}
.chart .pt circle {
  fill: var(--card);
  stroke: var(--green-text);
  stroke-width: 2.5;
}
.chart .pt text {
  fill: var(--ink);
  font: 700 12px var(--font);
  font-variant-numeric: tabular-nums;
}
.chart .you line {
  stroke: var(--ink);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0.5;
}
.chart .you circle {
  fill: var(--green);
  stroke: var(--card);
  stroke-width: 3;
}
.chart .you rect {
  fill: var(--ink);
}
.chart .you text {
  fill: var(--bg);
  font: 700 12px var(--font);
  font-variant-numeric: tabular-nums;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
  margin-bottom: var(--s3);
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
}
.legend i {
  display: inline-block;
  width: 22px;
  height: 0;
  border-top: 3px solid var(--green);
}
.legend i.dash {
  border-top: 2px dashed var(--muted);
}

/* ---------- toolkit (related tools) ---------- */
.toolkit {
  display: grid;
  gap: var(--s3);
  margin-top: var(--s5);
  padding: 0 !important;
  list-style: none;
}
.toolkit li {
  margin: 0 !important;
}
@media (min-width: 640px) {
  .toolkit {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 960px) {
  .toolkit {
    grid-template-columns: repeat(4, 1fr);
  }
}
.toolkit a {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  height: 100%;
  padding: var(--s4);
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.toolkit a:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.toolkit .ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green-text);
}
.toolkit .ico svg {
  width: 22px;
  height: 22px;
}
.toolkit b {
  font-weight: 700;
  line-height: 1.3;
}
.toolkit span.d {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.45;
}
.toolkit a[aria-current="page"] {
  border-style: dashed;
  pointer-events: none;
}
.toolkit .here {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--green-text);
}

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: var(--s6) 0 var(--s7);
  font-size: var(--fs-sm);
  color: var(--muted);
}
.foot-grid {
  display: grid;
  gap: var(--s5);
}
@media (min-width: 800px) {
  .foot-grid {
    grid-template-columns: 1.4fr 1fr;
  }
}
.foot-grid p + p {
  margin-top: var(--s2);
}
.site-foot .disclaimer {
  color: var(--ink);
  font-weight: 650;
}
.foot-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s2) var(--s4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.foot-links a {
  color: var(--ink-2);
  text-decoration: none;
}
.foot-links a:hover {
  color: var(--green-text);
  text-decoration: underline;
}

/* ---------- 404 ---------- */
.notfound {
  padding: var(--s9) 0;
  text-align: center;
}
.notfound .lede {
  margin-inline: auto;
}
.notfound .toolkit {
  margin-top: var(--s6);
  text-align: left;
}

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

/* ---------- print ---------- */
@media print {
  :root {
    --bg: #fff;
    --card: #fff;
    --ink: #000;
    --ink-2: #111;
    --muted: #444;
    --line: #bbb;
    --line-strong: #888;
    --green-soft: #eef6eb;
    --green-text: #1f5418;
  }
  @page {
    margin: 14mm 12mm;
  }
  body {
    font-size: 11pt;
    background: #fff;
    color: #000;
  }
  .site-head nav,
  .no-print,
  .tool,
  .inline-tool,
  .skip,
  .toolkit,
  .actions,
  .chart-card .you {
    display: none !important;
  }
  .site-head,
  .site-foot {
    border: 0;
    background: none;
  }
  .hero {
    background: none;
    padding: 0 0 8mm;
  }
  .content {
    padding: 0;
  }
  .content > .wrap > * + * {
    margin-top: 8mm;
  }
  .card,
  .table-card,
  .example,
  .formula,
  .mistakes li,
  .callout {
    box-shadow: none;
    border-color: #999;
    background: #fff;
  }
  .table-card,
  .chart-card,
  .example,
  .callout,
  .mistakes li,
  .formula {
    break-inside: avoid;
  }
  h2,
  h3 {
    break-after: avoid;
  }
  .data thead {
    display: table-header-group;
  }
  .data thead th {
    position: static;
    color: #000;
  }
  .data tr {
    break-inside: avoid;
  }
  .data th,
  .data td {
    padding: 4pt 8pt;
    font-size: 10pt;
  }
  .hide-sm {
    display: table-cell !important;
  }
  a {
    color: #000;
  }
  .callout a.btn::after {
    content: " (" attr(href) ")";
    font-weight: 400;
  }
  .callout a.btn {
    background: none !important;
    color: #000 !important;
    padding: 0;
    min-height: 0;
    border: 0;
    white-space: normal;
  }
}
