/* jafinance.xyz — Crypto Profit Calculator
   Visual identity: mint + coral + warm white, geometric sans 600,
   14px rounded corners, pill-with-arrow brand motif. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.6;
  color: #1f2d27; background: #fbf9f5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: #ee6c5a; text-decoration: none; border-bottom: 2px solid rgba(238, 108, 90, .25); }
a:hover { color: #1a4d3a; border-bottom-color: #1a4d3a; }

h1, h2, h3, h4 {
  font-family: -apple-system, "Inter", "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #1a4d3a; line-height: 1.2; margin: 0 0 .55em;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.8rem); margin-top: 1.6em; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }

code, kbd, samp, .mono {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: .9em; background: #e3f2eb; padding: .12em .4em; border-radius: 6px;
  color: #1a4d3a;
}

:root {
  --mint: #7dd3b8;
  --mint-dim: #5cb89a;
  --mint-soft: #e3f2eb;
  --forest: #1a4d3a;
  --forest-dark: #0f3527;
  --coral: #ee6c5a;
  --coral-dim: #d65644;
  --coral-soft: #fde2dc;
  --cream: #fbf9f5;
  --paper: #f4ede2;
  --line: #e0d8c8;
  --line-dim: #c8c0b0;
  --green-up: #2ea16f;
  --red-down: #d04545;
  --text: #1f2d27;
  --muted: #6c7670;
  --hi: #0f3527;
}

.container { width: min(1080px, 92%); margin: 0 auto; }

/* ---- Header ---- */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 0;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; line-height: 1.05; }
.brand-mark {
  display: inline-flex; align-items: center; gap: .3rem;
  flex-shrink: 0;
}
.brand-mark .pill {
  background: var(--mint); color: var(--forest);
  border-radius: 999px;
  padding: .3rem .65rem;
  font-weight: 800; font-size: .85rem; letter-spacing: -.5px;
}
.brand-mark .arrow {
  color: var(--coral); font-size: 1rem; font-weight: 800;
}
.brand-text { display: inline-flex; flex-direction: column; gap: 1px; }
.brand-name {
  color: var(--forest); font-weight: 800;
  font-size: 1rem; letter-spacing: -.01em;
}
.brand-tagline {
  font-size: .72rem; font-weight: 700; color: var(--coral);
  letter-spacing: .03em; text-transform: uppercase;
}
@media (max-width: 720px) { .brand-tagline { display: none; } }

.nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: center; row-gap: .25rem; }
.nav a {
  font-weight: 600; color: var(--forest);
  font-size: .9rem; padding: .3rem .55rem; white-space: nowrap;
  border-radius: 999px; border-bottom: none;
}
.nav a:hover { background: var(--mint-soft); color: var(--forest-dark); }
.nav-toggle {
  display: none; background: transparent; border: 0; padding: .4rem; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--forest);
  margin: 5px 0;
}

/* ---- Hero ---- */
.hero {
  padding: 3.5rem 0 2.5rem;
  background:
    radial-gradient(800px 360px at 90% 20%, var(--coral-soft), transparent 60%),
    radial-gradient(900px 400px at 10% 80%, var(--mint-soft), transparent 60%),
    var(--cream);
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: 760px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; letter-spacing: .05em;
  color: var(--forest); font-weight: 700;
  background: var(--mint); padding: .35rem .9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: ""; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--coral);
}
.lead { font-size: 1.08rem; color: var(--muted); max-width: 60ch; }

/* ---- Tool ---- */
.tool {
  background: #fff;
  border-radius: 14px;
  padding: 0;
  margin: 2rem 0;
  border: 1px solid var(--line);
  overflow: hidden;
}
.tool-head {
  background: var(--forest); color: var(--cream);
  padding: 1rem 1.6rem;
  display: flex; justify-content: space-between; align-items: center;
}
.tool-head h2 { color: var(--cream); margin: 0; font-size: 1.05rem; }
.tool-head .stamp {
  background: var(--mint); color: var(--forest);
  padding: .25rem .7rem; border-radius: 999px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
}
.tool-body {
  padding: 1.6rem;
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.4rem;
  align-items: stretch;
}
.tool-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.2rem;
}
.tool-card.buy { border-left: 4px solid var(--mint); }
.tool-card.sell { border-left: 4px solid var(--coral); }
.tool-card h3 {
  margin: 0 0 1rem; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); font-weight: 700;
}
.tool-card.buy h3 { color: var(--forest); }
.tool-card.sell h3 { color: var(--coral); }
.tool-arrow {
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; color: var(--coral);
}
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .8rem; }
.field:last-child { margin-bottom: 0; }
.field label { font-size: .82rem; font-weight: 600; color: var(--forest); }
.field input, .field select {
  font: inherit; font-family: "JetBrains Mono", Consolas, monospace;
  padding: .55rem .75rem;
  border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--hi);
  font-weight: 600;
}
.field select { font-family: -apple-system, sans-serif; }
.field input:focus, .field select:focus {
  outline: none; border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(238, 108, 90, .15);
}
.field small { color: var(--muted); font-size: .78rem; }

.tool-output {
  background: var(--mint-soft);
  padding: 1.6rem;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem;
}
.tool-output .stat {
  background: #fff;
  border-radius: 10px;
  padding: 1rem 1.2rem;
}
.tool-output .stat.headline { grid-column: 1 / -1; padding: 1.4rem 1.6rem; }
.tool-output .stat .k {
  display: block;
  font-size: .76rem; color: var(--muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: .35rem;
}
.tool-output .stat .v {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 1.2rem; font-weight: 700; color: var(--hi);
}
.tool-output .stat.headline .v { font-size: 2.2rem; }
.tool-output .stat .v.up { color: var(--green-up); }
.tool-output .stat .v.down { color: var(--red-down); }

.tax-preview {
  margin: 0 1.6rem 1.6rem;
  padding: 1rem 1.2rem;
  background: var(--coral-soft);
  border-radius: 10px;
  border-left: 4px solid var(--coral);
}
.tax-preview h4 {
  margin: 0 0 .6rem; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--coral-dim); font-weight: 700;
}
.tax-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .6rem; }
.tax-grid .row {
  background: #fff; padding: .55rem .8rem; border-radius: 6px;
  font-family: "JetBrains Mono", Consolas, monospace; font-size: .85rem;
}
.tax-grid .row .k { color: var(--muted); font-size: .72rem; display: block; }
.tax-grid .row .v { color: var(--hi); font-weight: 700; }

.privacy-note {
  font-size: .85rem; color: var(--muted);
  border-left: 3px solid var(--mint);
  padding: .55rem .9rem; margin: 0 1.6rem 1.6rem;
  background: var(--cream);
  border-radius: 0 8px 8px 0;
}

/* ---- Content ---- */
.content { padding: 1.5rem 0 3rem; }
.content section { margin-bottom: 2rem; }

.author-card {
  display: grid; grid-template-columns: 90px 1fr; gap: 1.4rem;
  align-items: center; padding: 1.6rem;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin: 1.2rem 0;
}
.author-avatar {
  width: 90px; height: 64px;
  background: var(--mint); border-radius: 999px;
  display: grid; place-items: center;
  position: relative;
}
.author-avatar::after {
  content: ""; position: absolute; right: -10px; top: 50%; transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 14px solid var(--coral);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}
.author-avatar span {
  font-family: -apple-system, sans-serif;
  font-size: 1.6rem; font-weight: 800; color: var(--forest);
  letter-spacing: -.02em;
}
.author-meta { color: var(--muted); font-size: .94rem; margin: 0 0 .4rem; }
.cred-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; }
.cred-row span {
  display: inline-block; padding: .2rem .65rem;
  background: var(--mint-soft); border: 1px solid var(--line);
  border-radius: 999px; font-size: .76rem; color: var(--forest);
  font-weight: 600;
}

/* Reference / data tables */
.ref-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.ref-table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 480px; }
.ref-table th, .ref-table td {
  padding: .65rem .85rem; text-align: left;
  border-bottom: 1px solid var(--line);
}
.ref-table thead th {
  background: var(--paper); color: var(--forest);
  font-weight: 700; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .06em;
}
.ref-table tbody tr:hover td { background: var(--mint-soft); }
.ref-table td.num { font-family: "JetBrains Mono", Consolas, monospace; text-align: right; font-size: .9rem; }

.callout {
  border-left: 3px solid var(--coral);
  background: var(--coral-soft);
  padding: 1rem 1.2rem; margin: 1.2rem 0;
  border-radius: 0 12px 12px 0;
  font-size: .95rem;
}
.callout strong { color: var(--coral-dim); }

/* Forms */
.form-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 1.8rem;
  margin: 1rem 0 2rem;
}
.form-card label { display: grid; gap: .35rem; margin-bottom: 1rem; font-size: .88rem; color: var(--forest); font-weight: 700; }
.form-card input, .form-card textarea, .form-card select {
  font: inherit; padding: .65rem .85rem;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--cream);
}
.form-card input:focus, .form-card textarea:focus, .form-card select:focus {
  outline: none; border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(238, 108, 90, .15); background: #fff;
}
.btn {
  display: inline-block; padding: .7rem 1.6rem;
  font: inherit; font-weight: 700; font-size: .95rem;
  border-radius: 999px; cursor: pointer;
  border: none; background: var(--coral); color: var(--cream);
}
.btn:hover { background: var(--coral-dim); }

/* Footer */
.site-footer {
  background: var(--forest-dark); color: rgba(251, 249, 245, .7);
  padding: 2.6rem 0 1.4rem;
}
.site-footer a { color: var(--mint); border-bottom: none; }
.site-footer a:hover { color: var(--cream); }
.site-footer .brand-mark .pill { background: var(--mint); color: var(--forest); }
.site-footer .brand-name { color: var(--cream); }
.site-footer .brand-tagline { color: var(--mint); }
.footer-grid {
  display: grid; gap: 1.6rem;
  grid-template-columns: 2fr 1fr 1fr;
  margin-bottom: 1.4rem;
}
.site-footer h4 {
  color: var(--cream); font-size: .85rem;
  margin-bottom: .8rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: .35rem 0; font-size: .92rem; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .8rem;
  padding-top: 1.2rem; border-top: 1px solid rgba(125, 211, 184, .15);
  font-size: .84rem;
}

/* Responsive */
@media (max-width: 880px) {
  .tool-body { grid-template-columns: 1fr; }
  .tool-arrow { transform: rotate(90deg); padding: .5rem 0; }
  .tool-output { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .author-card { grid-template-columns: 1fr; }
  .author-avatar { width: 90px; height: 50px; }
  .author-avatar::after { display: none; }

  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; right: 4%; left: 4%; z-index: 50;
    background: var(--cream); border: 1px solid var(--line); border-radius: 12px;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .6rem; box-shadow: 0 8px 24px rgba(15, 53, 39, .12);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: .65rem .9rem; }
}
