/* The fee calculators (/fees/): on top of /style.css, the same Ink & Citrus tokens. The calculator is a form beside an
   ink "receipt" of where the money goes; on a phone the receipt comes straight after the form. */

.fees-top { padding: 34px 0 8px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; margin: 0 0 26px; padding: 0; font-size: 14px; color: var(--muted); }
.crumbs li { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.crumbs li + li::before { content: "›"; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs [aria-current] { color: var(--text); font-weight: 600; }
.fees-top h1 { font-size: clamp(38px, 6.4vw, 72px); letter-spacing: -.045em; line-height: 1; max-width: 900px; }
.fees-top .lead { margin-top: 18px; max-width: 700px; color: var(--muted); font-size: clamp(16.5px, 1.6vw, 19px); }
.fees-top .lead strong { color: var(--text); }
.fees-stamp { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 18px; font-size: 14px; color: var(--muted); }
.fees-stamp b { padding: 4px 10px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--ink); font: 750 11.5px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; }

/* ---------- the calculator ---------- */
.calc-sec { padding: 30px 0 70px; }
.calc { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); border: 2px solid var(--edge); border-radius: 20px; background: var(--panel); box-shadow: 8px 8px 0 var(--ink); overflow: hidden; }
.calc-in { padding: 28px; display: grid; gap: 18px; align-content: start; min-width: 0; margin: 0; border: 0; }
.calc-in h2, .calc-out h2 { font: 750 13px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.calc-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fld { display: grid; gap: 6px; min-width: 0; align-content: start; }
.fld > span { font-size: 14.5px; font-weight: 650; }
.fld small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.money { position: relative; }
.money::before { content: "£"; position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--muted); font-weight: 650; pointer-events: none; }
.money.pct::before { content: "%"; left: auto; right: 14px; }
.money input { padding-left: 30px; font-family: inherit; font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.money.pct input { padding-left: 14px; padding-right: 32px; }
.fld select { width: 100%; min-height: 50px; padding: 0 40px 0 14px; border-radius: 10px; border: 1.5px solid var(--line-strong); color: var(--text); font-family: inherit; font-size: 15.5px; font-weight: 600;
  -webkit-appearance: none; appearance: none; text-overflow: ellipsis;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238f8b80' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 15px center; }
.fld select:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px var(--accent); }
.tick { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--bg); cursor: pointer; }
.tick:has(input:checked) { border-color: var(--edge); background: var(--accent-soft); }
.tick input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent-text); }
.tick span { display: grid; gap: 2px; font-size: 14.5px; font-weight: 650; }
.tick small { font-weight: 400; color: var(--muted); font-size: 13px; }
.calc-note { padding: 12px 14px; border-radius: 12px; background: var(--bg-2); color: var(--muted); font-size: 14px; line-height: 1.5; }
.calc-note strong { color: var(--text); }

/* the receipt */
.calc-out { position: relative; padding: 28px; background: var(--ink); color: #efeee6; display: flex; flex-direction: column; gap: 18px; min-width: 0; border-left: 1px solid var(--band-edge); }
.calc-out h2 { color: var(--accent); }
.out-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.out-big { padding: 16px; border-radius: 14px; border: 1.5px solid #3a392f; min-width: 0; }
.out-big span { display: block; font-size: 13.5px; color: #a9a69b; }
.out-big b { display: block; margin-top: 6px; font: 800 clamp(30px, 4vw, 44px)/1 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.out-big.profit { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.out-big.profit span { color: var(--accent-ink); opacity: .78; }
.out-big.loss { background: #f2766a; border-color: #f2766a; color: #16150f; }
.out-big.loss span { color: #16150f; opacity: .78; }
.out-big em { display: block; margin-top: 8px; font: 650 13.5px/1.2 inherit; font-style: normal; }
.lines { list-style: none; margin: 0; padding: 0; display: grid; font-size: 15px; }
.lines li { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #3a392f; }
.lines li > span { flex: 1; min-width: 0; color: #cfcdc3; }
.lines li > span small { display: block; color: #8f8b80; font-size: 12.5px; line-height: 1.35; margin-top: 2px; }
.lines li > b { flex: none; font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.lines li.fee > b { color: #f6b3aa; }
.lines li.sum { border-bottom: 0; padding-top: 12px; font-weight: 700; }
.lines li.sum > span { color: #fffdf8; }
.lines li.sub > span { padding-left: 14px; }
.lines li.info > span, .lines li.info > b { color: #8f8b80; font-weight: 500; }
.out-foot { margin-top: auto; font-size: 13px; color: #8f8b80; line-height: 1.5; }
.out-foot a { color: var(--accent); }

/* ---------- explainer, FAQ, the call to action, other calculators ---------- */
.fees-prose > * { max-width: 780px; }
.fees-prose > .table-scroll, .fees-prose > .fee-table { max-width: 860px; }
.fees-prose h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.035em; margin-bottom: 18px; }
.fees-prose h3 { font-size: 20px; margin: 28px 0 10px; letter-spacing: -.02em; }
.fees-prose p, .fees-prose li { color: var(--muted); font-size: 16.5px; }
.fees-prose p + p { margin-top: 12px; }
.fees-prose ul { padding-left: 22px; display: grid; gap: 7px; margin: 12px 0; }
.fees-prose strong { color: var(--text); }
.fee-table { width: 100%; border-collapse: collapse; margin: 16px 0 8px; font-size: 15px; }
.fee-table th, .fee-table td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line-strong); vertical-align: top; }
.fee-table th { font: 700 12.5px/1.2 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--text); }
.fee-table td:last-child, .fee-table th:last-child { padding-right: 0; }
.fee-table td b { color: var(--text); font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
.source { margin-top: 22px; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--panel); font-size: 14.5px; color: var(--muted); }
.source a { overflow-wrap: anywhere; }
.caveat { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--warn-soft); color: var(--text); font-size: 15px; border: 1.5px solid color-mix(in srgb, var(--warn) 35%, transparent); }

.fees-cta { padding: 64px 0; }
.fees-cta .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px 48px; align-items: center; }
.fees-cta h2 { color: #fffdf8; font-size: clamp(32px, 4.6vw, 54px); letter-spacing: -.045em; }
.fees-cta p { margin-top: 14px; color: #a9a69b; font-size: 17px; max-width: 560px; }
.fees-cta .acts { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; justify-self: end; }
.fees-cta .acts small { color: #a9a69b; font-size: 14px; }
.fees-cta .btn.primary { box-shadow: 4px 4px 0 #fffdf8; }
.fees-cta .btn.primary:hover { box-shadow: 5px 5px 0 #fffdf8; }
.fees-cta .btn.ghost { background: transparent; color: #efeee6; border-color: #3a392f; }
.fees-cta .btn.ghost:hover { border-color: #efeee6; }

.calc-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.calc-links a { display: flex; align-items: center; gap: 12px; height: 100%; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--panel); color: var(--text); text-decoration: none; font-weight: 650; transition: border-color .15s, box-shadow .15s, transform .12s; }
.calc-links a:hover { border-color: var(--edge); box-shadow: 4px 4px 0 var(--ink); transform: translate(-1px, -1px); }
.calc-links a[aria-current] { border-color: var(--edge); background: var(--accent-soft); }
.calc-links i { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; font: 800 13px/1 var(--display); font-style: normal; }
.calc-links i.dk { color: #16150f; }
.calc-links span { display: grid; min-width: 0; }
.calc-links small { color: var(--muted); font-weight: 500; font-size: 13px; }

/* ---------- the hub: one price, every marketplace ---------- */
.cmp-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 22px; border: 2px solid var(--edge); border-radius: 18px 18px 0 0; background: var(--panel); }
.cmp-wrap { border: 2px solid var(--edge); border-top: 0; border-radius: 0 0 18px 18px; box-shadow: 8px 8px 0 var(--ink); background: var(--panel); overflow: hidden; }
.cmp-box { box-shadow: none; }
.cmp { width: 100%; border-collapse: collapse; font-size: 15px; }
.cmp th, .cmp td { padding: 12px 14px; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.cmp th:first-child, .cmp td:first-child { text-align: left; }
.cmp thead th { background: var(--ink); color: #efeee6; font: 700 12px/1.2 var(--display); letter-spacing: .06em; text-transform: uppercase; }
.cmp td:first-child a { color: var(--text); font-weight: 650; text-decoration: none; }
.cmp td:first-child a:hover { text-decoration: underline; }
.cmp td:first-child small { display: block; color: var(--muted); font-size: 12.5px; }
.cmp td.pos { color: var(--ok); font-weight: 700; }
.cmp td.neg { color: var(--err); font-weight: 700; }
.cmp tr:last-child td { border-bottom: 0; }
.cmp-note { margin-top: 14px; color: var(--muted); font-size: 14px; }

@media (max-width: 900px) {
  .calc { grid-template-columns: minmax(0, 1fr); }
  .calc-out { border-left: 0; border-top: 2px solid var(--edge); }
  .fees-cta .wrap { grid-template-columns: minmax(0, 1fr); }
  .fees-cta .acts { justify-self: start; }
  .cmp-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .fees-top { padding-top: 22px; }
  .crumbs ol { margin-bottom: 18px; }
  .calc { box-shadow: 5px 5px 0 var(--ink); border-radius: 16px; }
  .calc-in, .calc-out { padding: 20px 16px; }
  .calc-pair { gap: 10px; }
  .out-big { padding: 13px; }
  .fees-cta { padding: 52px 0; }
  .fees-cta .acts { align-items: stretch; width: 100%; }
  .cmp-form { padding: 16px; gap: 10px; }
  .cmp-wrap { box-shadow: 5px 5px 0 var(--ink); }
  /* the comparison as stacked rows: marketplace on top, its numbers under it */
  .cmp thead { display: none; }
  .cmp, .cmp tbody, .cmp tr, .cmp td { display: block; width: 100%; }
  .cmp tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .cmp tr:last-child { border-bottom: 0; }
  .cmp td { padding: 0; border: 0; text-align: left; }
  .cmp td:first-child { grid-column: 1 / -1; margin-bottom: 6px; }
  .cmp td[data-l]::before { content: attr(data-l); display: block; color: var(--muted); font: 600 11.5px/1.3 inherit; text-transform: uppercase; letter-spacing: .04em; }
  .fee-table { font-size: 14px; }
}
@media (max-width: 380px) {
  .calc-pair { grid-template-columns: minmax(0, 1fr); }
  .out-top { grid-template-columns: minmax(0, 1fr); }
}
