/* The money tools (tools/*.html and tools.html): the site's colours, fonts
   and buttons around a form and a result card. Tokens mirror :root in
   src/styles.css; change both together. The footer is src/footer.css. */

@font-face {
  font-family: 'General Sans';
  src: url('../../assets/fonts/GeneralSans-Latin.woff2') format('woff2');
  font-weight: 200 700;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito Sans';
  src: url('../../assets/fonts/NunitoSans-Latin.woff2') format('woff2');
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --p-clear: #f8f5ff;
  --p-soft: #f0e9ff;
  --p-subtle: #d9c6ff;
  --p-default: #994dfe;
  --p-base: #7c02fd;
  --p-strong: #5b01b9;
  --p-dark: #3c007c;
  --p-inverse: #25004b;
  --ink: #1b1030;
  --ink-2: #4a3f66;
  --coin: #ffd400;
  --ok: #067a52;
  --ok-bg: #e3f7ee;
  --bad: #b42318;
  --bad-bg: #fef3f2;
  --focus: #3c007c;
  --n-ink: #2a2a2a;
  --n-line: #f2f2f2;
  --edge: #e4daf9;
  --gutter: max(16px, 4.5vw);
  --font-head: 'General Sans', 'Nunito Sans', system-ui, sans-serif;
  --font-body: 'Nunito Sans', system-ui, sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--p-clear);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--p-inverse);
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

a {
  color: var(--p-strong);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  inset-inline-start: 12px;
  top: -60px;
  z-index: 50;
  background: var(--p-base);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}
.skip:focus {
  top: 12px;
}

/* ---------- top bar ---------- */

.tool-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) var(--gutter) 8px;
}

.brand {
  display: inline-flex;
  align-items: flex-end;
  color: var(--p-base);
  text-decoration: none;
  border-radius: 10px;
  padding: 4px;
}
.brand-bull,
.brand-word {
  display: block;
  background: currentColor;
  -webkit-mask: var(--m) center / contain no-repeat;
  mask: var(--m) center / contain no-repeat;
}
.brand-bull {
  --m: url('../../assets/img/bull.svg');
  width: 54px;
  height: 32px;
}
.brand-word {
  --m: url('../../assets/img/wordmark.svg');
  width: 52px;
  height: 16px;
  margin-inline-start: -6px;
  margin-bottom: 0.5px;
  color: var(--n-ink);
}

.bar-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: #fff;
  color: var(--p-base);
  box-shadow: 0 3px 0 var(--p-subtle), inset 0 0 0 1.5px var(--p-soft);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}
.bar-link:hover {
  background: var(--p-soft);
}
.bar-link[aria-current='page'] {
  background: var(--p-soft);
  color: var(--p-strong);
}

/* ---------- page ---------- */

.tool-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px var(--gutter) 64px;
}

.tool-hero {
  max-width: 760px;
  margin: clamp(16px, 4vw, 40px) 0 clamp(20px, 3vw, 32px);
}
.tool-hero h1 {
  margin: 0;
  font-size: clamp(31px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.lede {
  margin: 14px 0 0;
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 62ch;
}

/* The form and the result side by side; one column on phones and tablets. */
.calc {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(16px, 2.4vw, 28px);
  align-items: start;
}
.calc-form {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.card {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--p-soft);
  border-radius: 28px;
  box-shadow: 0 6px 0 #e2d4ff, 0 7px 0 var(--p-subtle), 0 30px 60px -30px rgba(60, 0, 124, 0.3);
  padding: clamp(18px, 3.6vw, 32px);
}

fieldset.card {
  margin: 0;
}
.card > legend,
.group-title {
  float: left;
  width: 100%;
  margin: 0 0 4px;
  padding: 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  color: var(--p-inverse);
}
.card > legend + * {
  clear: both;
}
.group-note {
  clear: both;
  margin: 0 0 16px;
  color: var(--ink-2);
  font-size: 15px;
}

.fields {
  clear: both;
  display: grid;
  gap: 18px;
}
.fields-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  column-gap: 20px;
}

/* ---------- a field: label, box, hint, error ---------- */

.field {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}
.field > label,
.field > legend,
.field-label {
  padding: 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.35;
  color: var(--n-ink);
}

.box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 0 18px;
  border-radius: 18px;
  border: 2px solid var(--edge);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.box:hover {
  border-color: var(--p-subtle);
}
.box:focus-within {
  border-color: var(--p-base);
  box-shadow: 0 0 0 4px rgba(124, 2, 253, 0.16);
}
.box input,
.box select {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 14px 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.box input::placeholder {
  color: #a59cbc;
  opacity: 1;
}
.unit {
  flex: none;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

.hint {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink-2);
}
.field-error {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--bad);
}
.field-error[hidden] {
  display: none;
}
.has-error .box {
  border-color: var(--bad);
  background: var(--bad-bg);
}
.has-error .box:focus-within {
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.16);
}

/* The worked value beside a weight, for example "Worth AED 1,234.00". */
.worth {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--p-strong);
  font-variant-numeric: tabular-nums;
}
.worth:empty {
  display: none;
}

/* A box and a short select on one row (gold grams and carat). */
.pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 8.5em);
  gap: 10px;
}

.box-select {
  position: relative;
  padding: 0;
}
.box-select select {
  appearance: none;
  -webkit-appearance: none;
  padding: 14px 44px 14px 18px;
  font-size: 18px;
  cursor: pointer;
  text-overflow: ellipsis;
}
.box-select::after {
  content: '';
  position: absolute;
  inset-inline-end: 16px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  pointer-events: none;
  background: var(--ink-2);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 9l7 7 7-7' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 9l7 7 7-7' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- choices: pill radios, a check box, a stepper ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  position: relative;
  display: inline-flex;
}
.chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 2px solid var(--edge);
  background: #fff;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  color: var(--n-ink);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.chip:hover span {
  border-color: var(--p-default);
}
.chip input:checked + span {
  background: var(--p-base);
  border-color: var(--p-base);
  color: #fff;
  box-shadow: 0 3px 0 var(--p-dark);
}
.chip input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* Nisab basis: two larger radio cards. */
.options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 10px;
}
.option {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 14px 16px 14px 50px;
  border-radius: 18px;
  border: 2px solid var(--edge);
  background: #fff;
  cursor: pointer;
}
.option input {
  position: absolute;
  inset-inline-start: 16px;
  top: 17px;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--p-base);
  cursor: pointer;
}
.option:has(input:checked) {
  border-color: var(--p-base);
  background: var(--p-clear);
}
.option-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 17px;
  color: var(--n-ink);
}
.option-value {
  font-size: 14.5px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-weight: 600;
  line-height: 1.4;
}
.check input {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--p-base);
  cursor: pointer;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stepper .box {
  width: 7.5em;
  flex: none;
}
.stepper .box input {
  text-align: center;
}
.step {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--p-base);
  cursor: pointer;
  box-shadow: 0 4px 0 var(--p-subtle), inset 0 0 0 2px var(--p-subtle);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.step svg {
  width: 22px;
  height: 22px;
}
.step:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--p-subtle), inset 0 0 0 2px var(--p-subtle);
}
.step[aria-disabled='true'] {
  color: #b9b0cf;
  cursor: default;
  transform: none;
  box-shadow: 0 4px 0 var(--p-soft), inset 0 0 0 2px var(--p-soft);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.2s ease;
}
.btn-ghost {
  color: var(--p-base);
  background: #fff;
  box-shadow: 0 4px 0 var(--p-subtle), inset 0 0 0 2px var(--p-subtle);
}
.btn-ghost:hover {
  background: var(--p-clear);
}
.btn-ghost:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--p-subtle), inset 0 0 0 2px var(--p-subtle);
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ---------- the result card ---------- */

.result {
  position: sticky;
  top: 16px;
  color: #fff;
  background: linear-gradient(160deg, #8f2bff 0%, var(--p-base) 45%, var(--p-strong) 100%);
  border-color: transparent;
  box-shadow: 0 6px 0 var(--p-dark), 0 30px 60px -24px rgba(60, 0, 124, 0.55);
  --focus: var(--coin);
}
.result h2 {
  margin: 0;
  color: #e6dbff;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
}
.figure {
  margin: 6px 0 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(34px, 4.4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.figure.is-long {
  font-size: clamp(25px, 3.2vw, 32px);
}
.status {
  margin: 12px 0 0;
  color: #f3edff;
  font-size: 16px;
  line-height: 1.5;
}
.status strong {
  color: #fff;
}
.rows {
  display: grid;
  margin: 18px 0 0;
}
.rows > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.rows dt {
  color: #e6dbff;
  font-size: 15.5px;
}
.rows dd {
  margin: 0;
  text-align: end;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  min-width: 0;
}
.rows .is-total {
  border-top: 2px solid rgba(255, 255, 255, 0.5);
}
.rows .is-total dt,
.rows .is-total dd {
  color: #fff;
  font-weight: 700;
}
.result-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #f3edff;
  font-size: 15px;
  line-height: 1.5;
}
.result-note[hidden],
.status[hidden] {
  display: none;
}
.result a {
  color: #fff;
}

/* The 50/30/20 bars on the budget card. JavaScript sets --w (the share
   of income) and the dashed mark sits at the guide's share. */
.bars {
  display: grid;
  gap: 14px;
  margin: 20px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.bars h3 {
  margin: 0;
  color: #fff;
  font-size: 16px;
}
.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: baseline;
  font-size: 15px;
}
.bar-name {
  color: #f3edff;
}
.bar-value {
  font-family: var(--font-head);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.bar {
  grid-column: 1 / -1;
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}
.bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w, 0%);
  max-width: 100%;
  border-radius: inherit;
  background: var(--coin);
  transition: width 0.3s ease;
}
.bar b {
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: var(--g, 50%);
  width: 0;
  border-left: 2px dashed rgba(255, 255, 255, 0.9);
}
.bar .guide-50 {
  --g: 50%;
}
.bar .guide-30 {
  --g: 30%;
}
.bar .guide-20 {
  --g: 20%;
}
.bars[hidden] {
  display: none;
}
.bar-guide {
  grid-column: 1 / -1;
  margin-top: -2px;
  color: #d9c6ff;
  font-size: 13.5px;
}

/* On phones the result card comes after the form, so a slim bar keeps
   the main figure in sight while the visitor types. It ends with the
   form, so it never covers the result card. */
.mini {
  display: none;
}
@media (max-width: 899px) {
  .calc {
    grid-template-columns: minmax(0, 1fr);
  }
  .result {
    position: static;
  }
  .mini {
    position: sticky;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 12px;
    padding: 12px 18px;
    border-radius: 18px;
    background: var(--p-strong);
    color: #fff;
    box-shadow: 0 4px 0 var(--p-dark), 0 16px 30px -12px rgba(37, 0, 75, 0.6);
  }
  .mini-label {
    color: #e6dbff;
    font-size: 15px;
  }
  .mini-value {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 19px;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
  }
}

/* ---------- currency converter ---------- */

.convert-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}
.swap {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 2px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--p-base);
  cursor: pointer;
  box-shadow: 0 4px 0 var(--p-subtle), inset 0 0 0 2px var(--p-subtle);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.swap svg {
  width: 24px;
  height: 24px;
}
.swap:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--p-subtle), inset 0 0 0 2px var(--p-subtle);
}
@media (max-width: 560px) {
  .convert-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .swap {
    justify-self: center;
    margin: -2px 0;
  }
  .swap svg {
    transform: rotate(90deg);
  }
}
.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.quick button {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 2px solid var(--edge);
  background: #fff;
  color: var(--p-strong);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.quick button:hover {
  border-color: var(--p-default);
}
.quick button[aria-current='true'] {
  background: var(--p-soft);
  border-color: var(--p-base);
}

.rates-line {
  margin: 14px 0 0;
  color: #f3edff;
  font-size: 15px;
}
.rate-lines {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.load-error {
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bad-bg);
  color: var(--bad);
  font-weight: 700;
}
.load-error[hidden] {
  display: none;
}

/* ---------- reading sections under the calculator ---------- */

.explain {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(16px, 2.4vw, 28px);
  margin-top: clamp(28px, 4vw, 48px);
}
.prose h2 {
  margin: 0 0 10px;
  font-size: 22px;
}
.prose h3 {
  margin: 20px 0 6px;
  font-size: 18px;
}
.prose p,
.prose ul {
  margin: 0 0 12px;
}
.prose ul {
  padding-inline-start: 1.3em;
}
.prose li {
  margin-bottom: 6px;
}
.prose li::marker {
  color: var(--p-base);
}
.prose > :last-child {
  margin-bottom: 0;
}

/* A note from Toro: his face in a round badge, as on the home page quiz. */
.toro-tip {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin: 16px 0 0;
  padding: 16px;
  border-radius: 20px;
  background: var(--p-clear);
  border: 1px solid var(--p-soft);
}
.toro-tip::before {
  content: '';
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: url('../../assets/img/toro-face.svg') 52% 58% / 30px no-repeat, linear-gradient(135deg, #efe5ff, #fff);
  box-shadow: inset 0 0 0 1.5px var(--p-subtle);
}
.toro-tip p {
  margin: 0;
}
.toro-tip strong {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--p-base);
}

/* The religious guidance note on the zakat page. */
.guidance {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: #fff8db;
  border: 1px solid #f3df8d;
  color: #4f3d00;
  font-size: 15.5px;
}
.guidance svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: #8a6a00;
}
.guidance p {
  margin: 0;
}

/* ---------- other tools and the closing line ---------- */

.more {
  margin-top: clamp(32px, 5vw, 56px);
}
.more h2 {
  margin: 0 0 14px;
  font-size: 22px;
}
.tool-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tool-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 4px 14px;
  align-items: center;
  height: 100%;
  padding: 18px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--p-soft);
  box-shadow: 0 4px 0 var(--p-subtle);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--p-subtle);
}
.tool-card:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--p-subtle);
}
.tool-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--p-soft);
  color: var(--p-base);
}
.tool-icon svg {
  width: 26px;
  height: 26px;
}
.tool-name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.3;
  color: var(--p-inverse);
}
.tool-desc {
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-2);
}
.tool-list-lg .tool-card {
  padding: 22px;
  grid-template-columns: 56px minmax(0, 1fr);
}
.tool-list-lg .tool-icon {
  width: 56px;
  height: 56px;
}

.launch {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: clamp(28px, 4vw, 44px) 0 0;
  padding: 16px 20px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--p-soft);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.45;
  color: var(--n-ink);
}
.launch img {
  flex: none;
  width: 36px;
  height: 36px;
}
.launch p {
  margin: 0;
}
.launch a {
  font-weight: 600;
  white-space: nowrap;
}

.privacy {
  margin: 14px 0 0;
  color: var(--ink-2);
  font-size: 14.5px;
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }
  .card {
    border-radius: 22px;
  }
  .box input {
    font-size: 20px;
  }
  .launch {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .box,
  .chip span,
  .step,
  .swap,
  .btn,
  .tool-card,
  .bar i {
    transition: none;
  }
}

@media (forced-colors: active) {
  .box:focus-within {
    outline: 3px solid CanvasText;
  }
  .chip input:checked + span {
    border-color: Highlight;
  }
}
