@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ground: #F4F5F7;
  --paper: #FFFFFF;
  --ink: #12151A;
  --muted: #5E6670;
  --accent: #F4B728;
  --rule: #D9DCE1;
  --red: #B42318;
  --green: #067647;
  --curve: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 200ms;
  --enter: 400ms;
  --r-control: 6px;
  --r-panel: 12px;
  --r-stub: 2px;
  --shadow: 0 1px 2px rgba(18, 21, 26, 0.08);
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/24px var(--font);
  font-variant-numeric: tabular-nums;
}
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 4px; }
code, pre { font-family: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 500; }
h1 { font-size: 24px; line-height: 32px; }
h2 { font-size: 24px; line-height: 32px; }
h3 { font-size: 16px; line-height: 24px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.small { font-size: 14px; line-height: 20px; color: var(--muted); }
.label { font-size: 14px; line-height: 20px; color: var(--muted); }

.banner {
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  line-height: 20px;
  padding: 8px 16px;
  text-align: center;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; white-space: nowrap; font-weight: 500; font-size: 16px; text-decoration: none; }
.nav nav { display: flex; gap: 4px; }
.nav nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  line-height: 20px;
  padding: 8px 12px;
  border-radius: var(--r-control);
  color: var(--muted);
  text-decoration: none;
  transition: background-color var(--dur) var(--curve), color var(--dur) var(--curve);
}
@media (hover: hover) { .nav nav a:hover { background: var(--rule); color: var(--ink); } }
.nav nav a[aria-current="page"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }

@media (max-width: 480px) { .nav { gap: 8px; } .nav nav { gap: 0; } .nav nav a { padding: 8px; } }
main { outline: none; }
.screen { max-width: 1120px; margin: 0 auto; padding: 8px 16px 48px; }
.screen > h1 { margin-bottom: 16px; max-width: 640px; }
.lead { color: var(--muted); max-width: 640px; margin-bottom: 24px; }

.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 900px) { .grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; } }

.panel {
  background: var(--paper);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow), inset 0 1px 0 var(--paper);
  padding: 24px;
}
.ticket { animation: rise var(--enter) var(--curve) backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 14px; line-height: 20px; color: var(--muted); margin-bottom: 4px; }
.input {
  display: flex;
  align-items: center;
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
  background: var(--paper);
  transition: border-color var(--dur) var(--curve);
}
@media (hover: hover) { .input:hover { border-color: var(--muted); } }
.input:focus-within { border-color: var(--ink); }
.input input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 400 16px/24px var(--font);
  font-variant-numeric: tabular-nums;
  padding: 12px;
  outline: none;
}
.input .unit { padding-right: 12px; font-size: 14px; color: var(--muted); }
.field .hint { font-size: 14px; line-height: 20px; color: var(--muted); margin-top: 4px; }

.result { margin: 8px 0 24px; }
.result .big { display: block; font-size: clamp(24px, 3vw, 40px); line-height: 1.2; font-weight: 500; }
.result .label { display: block; }

.btn {
  display: inline-block;
  width: 100%;
  border: 0;
  border-radius: var(--r-control);
  background: var(--accent);
  color: var(--ink);
  font: 500 16px/24px var(--font);
  padding: 12px 16px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: filter var(--dur) var(--curve);
}
@media (hover: hover) { .btn:hover { filter: brightness(0.95); } }
.btn[disabled] { background: var(--rule); color: var(--muted); cursor: not-allowed; filter: none; }
.btn.quiet { background: var(--paper); border: 1px solid var(--rule); width: auto; min-height: 44px; padding: 8px 12px; font-size: 14px; line-height: 20px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.lines { margin: 24px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.lines li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; font-size: 14px; line-height: 20px; border-bottom: 1px solid var(--rule); }
.lines li span:first-child { color: var(--muted); }

.error { color: var(--red); font-size: 14px; line-height: 20px; margin: 0 0 16px; min-height: 20px; }
.say { margin-top: 24px; display: grid; gap: 8px; max-width: 720px; }

.stub {
  background: var(--paper);
  border-radius: var(--r-stub);
  box-shadow: var(--shadow);
  padding: 24px 24px 16px;
  border-top: 2px dashed var(--ink);
  font-size: 12px;
  line-height: 16px;
}
.stub h2 { font-size: 24px; margin-bottom: 4px; }
.stub .sub { color: var(--muted); font-size: 14px; line-height: 20px; margin-bottom: 16px; }
.stub dl { margin: 0; }
.stub .row { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; }
.stub dt { color: var(--muted); }
.stub .lead-dots { flex: 1; border-bottom: 1px dotted var(--rule); transform: translateY(-2px); }
.stub dd { margin: 0; font-weight: 500; }
.stub .fields { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
.stub .fields li { border: 1px solid var(--rule); border-radius: var(--r-stub); padding: 2px 6px; }
.stub .note { margin-top: 12px; color: var(--muted); }

.terms { margin-top: 16px; }
.terms pre {
  margin: 8px 0;
  padding: 12px;
  background: var(--ground);
  border-radius: var(--r-control);
  font-size: 12px;
  line-height: 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.terms[hidden] { display: none; }

table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
th { text-align: left; font-weight: 400; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--rule); }
td { padding: 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td a { display: inline-flex; align-items: center; min-height: 44px; }
td .stubline { display: block; font-size: 12px; line-height: 16px; color: var(--muted); margin-top: 4px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: var(--r-control); border: 1px solid var(--rule); font-size: 12px; line-height: 16px; }
.tag.good { color: var(--green); border-color: var(--green); }
.tag.bad { color: var(--red); border-color: var(--red); }
@media (max-width: 700px) {
  thead { display: none; }
  table, tbody, tr, td { display: block; }
  tr { padding: 12px 0; border-bottom: 1px solid var(--rule); }
  td { padding: 4px 0; border: 0; }
  td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
}

.timeline { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.timeline li { display: flex; gap: 8px; align-items: baseline; }
.timeline li::before { content: ""; width: 8px; height: 8px; border-radius: var(--r-stub); background: var(--ink); flex: none; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 900px) { .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
.cols .panel h3 { margin-bottom: 8px; }
.cols .panel ul { margin: 0; padding-left: 16px; display: grid; gap: 8px; }
.stack { display: grid; gap: 16px; }
.back { display: inline-block; margin-bottom: 16px; font-size: 14px; line-height: 20px; }

.foot { border-top: 1px solid var(--rule); padding: 24px 0 48px; }
.cmds { margin: 8px 0; padding: 12px; background: var(--paper); border-radius: var(--r-control); font-size: 14px; line-height: 20px; overflow-x: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
.stub summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--muted); }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.brand .mark { display: block; flex: none; }
