:root {
  --bg: #f2f1ec; --surface: #fbfaf6; --ink: #151514; --muted: #6d6b64; --line: #d9d6cc;
  --ticket: #151514; --ticket-ink: #f2f1ec; --ticket-muted: #9c9a92; --ticket-line: #34332f;
  --live: #1f9d55; --warn: #b4541a;
  --sans: "IBM Plex Sans", system-ui, sans-serif; --mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211; --surface: #1a1a18; --ink: #ebe9e2; --muted: #9a978e; --line: #2e2d29;
    --ticket: #20201d; --ticket-ink: #ebe9e2; --ticket-muted: #8f8d85; --ticket-line: #3a3934;
    --live: #3fbf75; --warn: #e08a4f; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
a { color: inherit; text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }
.wrap { width: min(100% - 32px, 1000px); margin: 0 auto; }
.mono { font-family: var(--mono); }

.top { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.mark { font: 500 15px var(--mono); text-decoration: none; letter-spacing: -0.01em; }
.top nav { display: flex; gap: 20px; align-items: center; font: 14px var(--mono); }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--ink); }
.status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.status[data-state="live"] i { background: var(--live); }
.status[data-state="down"] i { background: var(--warn); }

.intro { padding: 44px 0 30px; max-width: 640px; }
h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.12; font-weight: 600; margin: 0 0 14px; letter-spacing: -0.015em; }
.intro p { margin: 0; color: var(--muted); font-size: 17px; }

.desk { display: grid; grid-template-columns: 1fr 380px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); scroll-margin-top: 16px; }
.form { padding: 26px; display: grid; gap: 26px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend, .label { display: block; font: 500 13px var(--mono); color: var(--muted); margin-bottom: 10px; padding: 0; }
.networks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.net { position: relative; display: grid; gap: 2px; padding: 14px 14px 13px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; background: var(--bg); }
.net input { position: absolute; opacity: 0; pointer-events: none; }
.net:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--surface); }
.net:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.net-name { font-weight: 600; font-size: 17px; }
.net-price { font: 14px var(--mono); }
.net-meta, .net-stock { font-size: 13px; color: var(--muted); }
.net-stock:empty { display: none; }

.stepper { display: grid; grid-template-columns: 44px 1fr 44px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--bg); }
.stepper button { border: 0; background: transparent; font-size: 20px; cursor: pointer; color: var(--muted); }
.stepper button:hover { color: var(--ink); background: var(--surface); }
.stepper input { border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font: 500 20px var(--mono); padding: 10px 0; background: transparent; min-width: 0; }
.presets { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.presets button { border: 1px solid var(--line); background: transparent; border-radius: 4px; padding: 4px 10px; font: 13px var(--mono); cursor: pointer; color: var(--muted); }
.presets button:hover, .presets button[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }
.text { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 11px 12px; background: var(--bg); font: 15px var(--mono); }
.text:focus, .stepper input:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

.ticket { background: var(--ticket); color: var(--ticket-ink); padding: 26px; border-radius: 0 5px 5px 0; display: flex; flex-direction: column; gap: 18px; font-family: var(--mono); }
.ticket dl { margin: 0; display: grid; gap: 10px; }
.ticket dl div { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.ticket dt { color: var(--ticket-muted); }
.ticket dd { margin: 0; text-align: right; }
.ticket .total dd { font-size: 26px; font-weight: 500; line-height: 1.1; }
.ticket .total { align-items: baseline; padding-bottom: 12px; border-bottom: 1px solid var(--ticket-line); }
.url { font-size: 13px; line-height: 1.5; word-break: break-all; color: var(--ticket-ink); background: rgba(255,255,255,0.06); border: 1px solid var(--ticket-line); border-radius: 4px; padding: 10px 12px; }
.ticket .label { color: var(--ticket-muted); margin-bottom: 8px; }
.copy { border: 0; border-radius: 4px; padding: 12px; background: var(--ticket-ink); color: var(--ticket); font: 500 14px var(--mono); cursor: pointer; }
.copy:hover { opacity: 0.9; }
.ticket .hint { color: var(--ticket-muted); margin: 0; font-family: var(--sans); }
.error { margin: 0; font-size: 13px; color: #f0a070; }

section.block { padding: 56px 0 0; }
h2 { font-size: 20px; font-weight: 600; margin: 0 0 16px; }
.track form { display: flex; gap: 8px; max-width: 560px; }
.track button { border: 1px solid var(--ink); background: var(--ink); color: var(--bg); border-radius: 6px; padding: 0 18px; font: 500 14px var(--mono); cursor: pointer; }
.order { margin-top: 14px; font: 14px var(--mono); color: var(--muted); }
.order strong { color: var(--ink); font-weight: 500; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 500 13px var(--mono); color: var(--muted); width: 28%; }
td { font-family: var(--mono); }
thead th { color: var(--ink); }

details { border-bottom: 1px solid var(--line); padding: 14px 0; }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); color: var(--muted); }
details[open] summary::after { content: "−"; }
details p { margin: 10px 0 0; color: var(--muted); max-width: 680px; }

footer { margin-top: 72px; padding: 22px 0 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font: 13px var(--mono); color: var(--muted); }
footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

@media (max-width: 820px) {
  .desk { grid-template-columns: 1fr; }
  .ticket { border-radius: 0 0 5px 5px; }
  .form, .ticket { padding: 20px; }
  .top nav a.hide-sm { display: none; }
}
@media (max-width: 420px) { .networks { grid-template-columns: 1fr; } }

/* product pages */
.price { font: 500 clamp(34px, 6vw, 48px)/1 var(--mono); margin: 8px 0 18px; }
.price .unit { font-size: 15px; color: var(--muted); font-weight: 400; }
.cta { display: inline-block; text-decoration: none; background: var(--ink); color: var(--bg); border-radius: 6px; padding: 12px 18px; font: 500 14px var(--mono); }
.cta:hover { opacity: 0.9; }
.prose { max-width: 680px; }
.prose p, .prose li { color: var(--muted); }
.prose ol { padding-left: 20px; margin: 0; display: grid; gap: 8px; }
.crumbs { font: 13px var(--mono); color: var(--muted); margin: 0 0 14px; }
.crumbs a { text-decoration: none; }
