@font-face {
  font-family: 'Instrument Serif';
  src: url(/assets/fonts/instrument-serif.woff2) format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url(/assets/fonts/jetbrains-mono.woff2) format('woff2');
  font-weight: 100 800;
  font-display: swap;
}
:root {
  --bg: #000;
  --ink: #f5f5ed;
  --dim: #f5f5eda6;
  --line: #f5f5ed2e;
  --go: #84f800;
  --go-ink: #000;
  --ws: #f5f5ed;
  --ws-2: #eaeae1;
  --ws-ink: #0b0b0b;
  --ws-dim: #55554f;
  --ws-line: #0b0b0b26;
  --ws-line-strong: #0b0b0b;
  --go-tint: #84f8001f;
  --go-text: #84f800;
  --focus: #84f800;
  --ws-focus: #2d6e00;
  --panel: #0c0c0c;
  --chip-line: #66665f;
  --ok: #2f7a00;
  --err: #b7310b;
  --err-on-dark: #ff6b4a;
  --warn: #8a5a00;
  --font-display: 'Instrument Serif', ui-serif, serif;
  --font-ui: 'JetBrains Mono', ui-monospace, monospace;
  --font-prose: system-ui, sans-serif;
  --fs-h1: clamp(2.5rem, 1.6rem + 3.6vw, 5.5rem);
  --fs-h2: clamp(1.75rem, 1.4rem + 1.4vw, 2.75rem);
  --fs-h3: 1.125rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-micro: 0.75rem;
  --lh-tight: 1.05;
  --lh-ui: 1.45;
  --lh-prose: 1.6;
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 96px;
  --gutter: 16px;
  --container: 1200px;
  --tool-max: 1040px;
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;
  --shadow-float: 0 8px 24px #0006;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 120ms;
  --t-med: 200ms;
}
/* Light theme (finance pages open in it; the header toggle saves a choice in
   localStorage 'zt:theme', applied before first paint by /tools/zt/theme.js).
   Page surfaces turn near-white; the black header and footer frame stays. */
:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f4f4f2;
  --ink: #0b0b0b;
  --dim: #0b0b0bb3;
  --line: #0b0b0b29;
  --ws: #ffffff;
  --ws-2: #efefeb;
  --ws-ink: #0b0b0b;
  --ws-dim: #55554f;
  --ws-line: #0b0b0b2e;
  --go-tint: #84f80038;
  --go-text: #2d6e00;
  --focus: #2d6e00;
  --panel: #ffffff;
  --err-on-dark: #b7310b;
  --shadow-float: 0 8px 24px #0b0b0b29;
}
/* The site frame stays black in both themes. */
.zt-head,
.zt-foot {
  --bg: #000;
  --ink: #f5f5ed;
  --dim: #f5f5eda6;
  --line: #f5f5ed2e;
  --focus: #84f800;
  background: var(--bg);
  color: var(--ink);
}
/* Outlines drawn over a cream/white work surface use a dark green that passes 3:1. */
.zt-surface,
.zt-faq details,
.zt-toast {
  --focus: var(--ws-focus);
}
* {
  box-sizing: border-box;
}
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.45 var(--font-ui);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
[hidden] {
  display: none !important;
}
input,
button,
select,
textarea {
  font: inherit;
  color: inherit;
}
a {
  color: inherit;
  text-underline-offset: 0.2em;
}
button,
summary {
  cursor: pointer;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button:disabled {
  cursor: default;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.zt-container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
h1,
h2,
h3,
p,
ol,
ul {
  margin: 0;
}
h1,
h2,
.zt-index h3 {
  font: 400 var(--fs-h1) / 1.02 var(--font-display);
  letter-spacing: -0.026em;
}
h2 {
  font-size: var(--fs-h2);
  margin-bottom: 20px;
}
.zt-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.zt-sprite,
.zt-sr,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.zt-skip {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 20;
  background: var(--go);
  color: #000;
  padding: 10px;
}
.zt-skip:focus {
  top: 6px;
}
.zt-head {
  border-bottom: 1px solid var(--line);
}
.zt-head .zt-container,
.zt-nav,
.zt-brand,
.zt-launch {
  display: flex;
  align-items: center;
}
.zt-head .zt-container {
  height: 56px;
  gap: 32px;
}
.zt-brand {
  gap: 10px;
  text-decoration: none;
  font: 28px var(--font-display);
}
.zt-brand img {
  width: 45px;
  height: 45px;
  object-fit: contain;
}
.zt-nav {
  margin-left: auto;
  gap: 20px;
  font-size: 0.875rem;
}
.zt-nav a {
  display: grid;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.zt-nav a:hover {
  text-decoration: underline;
}
.zt-launch {
  margin-left: auto;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  min-height: 40px;
  padding: 7px 12px;
  color: var(--dim);
  width: min(30vw, 360px);
  text-align: left;
  font-size: 0.875rem;
}
.zt-launch + .zt-nav {
  margin-left: 0;
}
.zt-theme {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  margin-left: -8px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
}
.zt-theme:hover {
  border-color: var(--dim);
}
.zt-theme .zt-icon {
  width: 20px;
  height: 20px;
}
.zt-theme .zt-moon,
:root[data-theme='light'] .zt-theme .zt-sun {
  display: none;
}
:root[data-theme='light'] .zt-theme .zt-moon {
  display: inline-block;
}
kbd {
  font: 12px var(--font-ui);
  padding: 1px 6px;
  border: 1px solid currentColor;
  border-radius: 4px;
  margin-left: auto;
}
.zt-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--dim);
  margin: 24px 0 8px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.zt-crumb > * { min-width: 0; }
.zt-crumb a {
  text-decoration: none;
}
.zt-crumb a:hover {
  text-decoration: underline;
}
.zt-tool-page {
  max-width: var(--tool-max);
}
.zt-sub {
  color: var(--dim);
  font-size: clamp(0.86rem, 1.3vw, 1rem);
  margin: 10px 0 24px;
}
.zt-section {
  margin-top: 64px;
}
.zt-facts { max-width: 68ch; margin: 0; }
.zt-facts > div { display: grid; grid-template-columns: minmax(80px, 1fr) 2fr; gap: 16px; border-top: 1px solid var(--line); padding: 10px 0; }
.zt-facts dd { margin: 0; overflow-wrap: anywhere; color: var(--dim); }
.zt-method-body { max-width: 100%; overflow-x: auto; }
.zt-method table { border-collapse: collapse; margin: 1em 0; width: 100%; }
.zt-method td, .zt-method th { border: 1px solid var(--line); padding: 8px 12px; text-align: left; overflow-wrap: anywhere; }
.zt-answer p + p, .zt-method p + p, .zt-about p + p { margin-top: .8em; }
.zt-about p, .zt-about li { max-width: 68ch; color: var(--dim); line-height: 1.6; }
.zt-presets .zt-variants { margin-top: 0; gap: 8px; }
.zt-presets a { display: inline-flex; align-items: center; min-height: 44px; }
.zt-variants a { padding: 0 12px; border: 1px solid var(--line); border-radius: 100px; }
.zt-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0;
  gap: 32px;
  counter-reset: steps;
  list-style: none;
}
.zt-steps li {
  padding-left: 46px;
  position: relative;
  counter-increment: steps;
}
.zt-steps li:before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  background: var(--ws);
  color: var(--ws-ink);
  box-shadow: inset 0 0 0 1px var(--ws-line);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-weight: 650;
}
.zt-steps p,
.zt-prose,
.zt-faq p {
  font: 1rem/1.6 var(--font-prose);
  color: var(--dim);
  max-width: 68ch;
}
.zt-steps p {
  margin-top: 6px;
  font-size: 0.95rem;
}
.zt-faq details {
  background: var(--ws);
  color: var(--ws-ink);
  border: 1px solid var(--ws-line);
  border-radius: var(--r-md);
  margin: 8px 0;
}
.zt-faq summary {
  min-height: 56px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  list-style: none;
}
.zt-faq summary::-webkit-details-marker {
  display: none;
}
.zt-faq summary:after {
  content: '';
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  width: 9px;
  height: 9px;
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.zt-faq details[open] summary:after {
  transform: rotate(225deg);
}
.zt-faq p {
  color: var(--ws-dim);
  padding: 0 20px 20px;
}
.zt-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.zt-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  background: var(--ws);
  color: var(--ws-ink);
  border: 1px solid var(--ws-line);
  border-radius: var(--r-md);
  padding: 20px;
  text-decoration: none;
  min-height: 168px;
}
.zt-card:hover {
  background: var(--ws-2);
}
.zt-card:hover strong {
  text-decoration: underline;
}
.zt-card > .zt-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
}
.zt-card strong {
  font-size: 1.125rem;
  line-height: 1.25;
}
.zt-card small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.8rem;
  color: var(--ws-dim);
}
.zt-tag {
  margin-top: auto;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  color: var(--ws-dim);
}
.zt-related .zt-card {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-content: center;
  align-items: center;
  min-height: 112px;
  gap: 6px 10px;
}
.zt-related .zt-card > .zt-icon {width: 24px; height: 24px; margin: 0}
.zt-related .zt-card small, .zt-related .zt-tag {grid-column: 2}
.zt-related .zt-card strong {overflow-wrap: anywhere}
@media (max-width: 620px) {
  .zt-cards.zt-related { grid-template-columns: 1fr; }
  .zt-related .zt-card { min-height: 72px; }
}
.zt-variants,
.zt-recent {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.zt-variants {
  margin-top: 32px;
}
.zt-foot {
  margin-top: 96px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.8rem;
}
.zt-foot .zt-container,
.zt-foot nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.zt-foot .zt-container {
  justify-content: space-between;
  padding-block: 24px;
}
.zt-foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.zt-dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  background: var(--bg);
  color: var(--ink);
  width: min(560px, 96vw);
  max-height: 80vh;
}
.zt-dialog::backdrop {
  background: #000b;
}
.zt-dialog label {
  display: block;
  margin-bottom: 8px;
}
.zt-dialog button {
  background: transparent;
  color: inherit;
  border: 1px solid var(--line);
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 6px;
}
.zt-dialog input {
  background: var(--ws);
  color: #000;
  padding: 12px;
  width: 100%;
  border-radius: 8px;
  border: 1px solid;
}
.zt-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.zt-hit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 48px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding: 8px;
}
.zt-hit-copy { min-width: 0; }
.zt-hit mark { background: var(--go-tint); color: inherit; border-radius: 3px; box-shadow: 0 0 0 2px var(--go-tint); }
.zt-hit-copy small { display: block; margin-top: .2rem; }
.zt-hit small {
  font-size: 0.7rem;
  color: var(--dim);
}
.zt-hit:hover,
.zt-hit.active {
  background: var(--ws-2);
  color: #000;
}
.zt-hit:hover small,
.zt-hit.active small {
  color: var(--ws-dim);
}
.zt-hit .zt-market {
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 1px 8px;
}
.zt-hit.active {
  border-left: 6px solid var(--go);
}
.zt-request-tool {
  background: transparent; color: inherit; font: inherit; border: 1px solid currentColor;
  border-radius: .4rem; min-height: 44px; padding: .5rem .8rem; cursor: pointer;
}
.zt-miss-label {
  margin: 18px 0 6px;
  font: 600 0.75rem var(--font-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.zt-toast {
  position: fixed;
  z-index: 12;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(420px, 92vw);
  background: var(--ws);
  color: var(--ws-ink);
  border: 1px solid;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: var(--shadow-float);
}
.zt-full-window {
  position: fixed !important;
  inset: 0;
  z-index: 40;
  width: 100%;
  height: 100dvh;
  overflow: auto;
}
@media (min-width: 768px) {
  :root {
    --gutter: 24px;
  }
  .zt-head .zt-container {
    height: 64px;
  }
}
@media (min-width: 1280px) {
  :root {
    --gutter: 32px;
  }
}
@media (min-width: 1920px) {
  :root {
    --container: 1320px;
  }
}
@media (max-width: 1000px) {
  .zt-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .zt-head .zt-container {
    gap: 8px;
  }
  .zt-brand { min-width: 0; font-size: 24px; gap: 6px; }
  .zt-brand img { width: 36px; height: 36px; flex: none; }
  .zt-nav {
    gap: 10px;
    min-width: 0;
  }
  .zt-theme {
    margin-left: -4px;
  }
  .zt-launch {
    width: 44px;
    height: 44px;
    justify-content: center;
    padding: 0;
  }
  .zt-launch span,
  .zt-launch kbd {
    display: none;
  }
  .zt-crumb {
    margin-top: 16px;
  }
  .zt-steps {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .zt-section {
    margin-top: 44px;
  }
  .zt-sub {
    margin-bottom: 18px;
  }
  .zt-toast {
    bottom: 118px;
  }
  .zt-related {
    gap: 8px;
  }
  .zt-related .zt-card {
    padding: 12px;
  }
  .zt-dialog {
    margin: 0;
    max-width: none;
    max-height: none;
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
@media (forced-colors: active) {
  :focus-visible {
    outline-color: Highlight;
  }
  .zt-card,
  button {
    border: 1px solid ButtonText;
  }
}

.zt-key-help { background: none; color: inherit; font: inherit; min-height: 44px; padding: 0; border: 0; text-decoration: underline; cursor: pointer; }
.zt-key-list > div { display: flex; justify-content: space-between; gap: 1rem; padding-block: .4rem; }
.zt-siblings { margin-block: 1rem; }
.zt-siblings summary { cursor: pointer; min-height: 44px; padding-block: .6rem; }
.zt-sibling-links { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.zt-sibling-links a { display: inline-flex; align-items: center; min-height: 44px; }

/* Site sections in the tool header; the two extra links drop out on narrow phones. */
@media (max-width: 420px) {
  /* Logo only on small phones: the wordmark repeats the Tools link and crowded the controls. */
  .zt-head .zt-brand { font-size: 0; gap: 0; }
  .zt-head .zt-container { gap: 10px; }
  .zt-head .zt-launch { margin-left: auto; }
  .zt-head .zt-nav { gap: 6px; margin-left: 0; margin-right: 6px; }
  .zt-head .zt-nav a { min-width: 40px; justify-items: center; }
  .zt-head .zt-theme { margin-left: 0; }
}
@media (max-width: 480px) {
  .zt-nav .zt-nav-wide { display: none; }
}
