:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --ink: #111214;
  --muted: #6B7076;
  --line: #E6E7EA;
  --soft: #F4F5F6;
  --acme: #F26B1D;
  --ok: #0B6E35;
  --ok-bg: #E9F9F0;
  --ok-line: #BFEBD2;
  --bad: #B42318;
  --bad-bg: #FEF3F2;
  --bad-line: #FECDCA;
  --focus: #2563EB;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.top { min-height: 64px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; padding: 12px 24px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font: 800 22px/1 var(--display); letter-spacing: -0.02em; text-decoration: none; }
.logo svg { width: 22px; height: 22px; }
.tag { font: 700 11px/1 var(--font); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; }
.tabs { display: flex; gap: 22px; font-size: 15px; color: var(--muted); }
.tabs a { text-decoration: none; }
.tabs a[aria-current] { color: var(--ink); font-weight: 600; }
.user { margin-left: auto; display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; }
.user i { width: 32px; height: 32px; border-radius: 50%; background: #1F2328; color: #fff; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 14px; }
main { flex: 1; width: 100%; }
.card { width: 100%; max-width: 440px; margin: 0 auto; padding: 56px 16px 40px; }
.wrap { width: 100%; max-width: 880px; margin: 0 auto; padding: 32px 16px 48px; }
h1 { margin: 0; font: 700 30px/1.15 var(--display); letter-spacing: -0.02em; text-wrap: balance; }
h2 { margin: 40px 0 12px; font: 650 19px/1.3 var(--display); letter-spacing: -0.01em; }
.sub { color: var(--muted); margin: 8px 0 0; }
.center { text-align: center; }
.nm { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.center .btn { margin-top: 28px; }
.state { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%; background: var(--soft); color: var(--muted); }
.state svg { width: 30px; height: 30px; }
.state.refused { background: var(--bad-bg); color: var(--bad); }
label { display: block; font-size: 14px; font-weight: 600; margin-top: 24px; }
input[type=text] { width: 100%; height: 48px; margin-top: 8px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-size: 17px; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.btn { width: 100%; min-height: 48px; margin-top: 16px; padding: 0 18px; border-radius: 10px; border: 0; display: flex; align-items: center; justify-content: center; gap: 10px; font: inherit; font-size: 17px; font-weight: 650; text-decoration: none; cursor: pointer; }
.btn.dark { background: var(--ink); color: #fff; }
.btn.line { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.small { width: auto; min-height: 40px; font-size: 15px; display: inline-flex; }
.btn svg { width: 26px; height: 22px; flex: none; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.row .btn { flex: 1 1 180px; }
.note { color: var(--muted); font-size: 14px; line-height: 1.45; text-align: center; margin: 12px 0 0; }
.alt { text-align: center; margin-top: 28px; font-size: 15px; color: var(--muted); }
.alt a { color: var(--ink); font-weight: 600; }
.error { margin-top: 20px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--bad-line); background: var(--bad-bg); color: var(--bad); font-size: 15px; }
.toast { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 24px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--ok-line); background: var(--ok-bg); color: var(--ok); }
.toast b { display: block; font-weight: 650; }
.toast span { font-size: 14px; }
.chk { width: 24px; height: 24px; flex: none; border-radius: 50%; background: #3DDC84; display: grid; place-items: center; }
.chk svg { width: 16px; height: 16px; }
.hero { padding: 72px 16px 56px; max-width: 640px; margin: 0 auto; text-align: center; }
.hero h1 { font-size: clamp(32px, 6vw, 46px); }
.hero .sub { font-size: 18px; margin-top: 16px; }
.hero .row { max-width: 420px; margin: 28px auto 0; }
.how { max-width: 880px; margin: 0 auto 56px; padding: 0 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.how div { border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.how b { display: block; margin-bottom: 4px; }
.how span { color: var(--muted); font-size: 15px; }
.mark { display: grid; place-items: center; margin: 28px auto 0; width: 92px; height: 92px; position: relative; }
.mark svg.ring { position: absolute; inset: 0; width: 92px; height: 92px; }
.mark svg.kh { width: 46px; height: 40px; color: var(--ink); }
.ring circle.arc { transform-origin: 46px 46px; animation: turn 1.1s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ring circle.arc { animation: none; } }
[data-state="checking"] .ring circle.arc, [data-state="opened"] .ring circle.arc { stroke: #16A34A; }
.status { margin: 18px 0 0; text-align: center; font-weight: 600; }
.linkbox { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 24px; padding: 14px 12px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); text-align: center; }
.linkbox code { max-width: 100%; font: clamp(12px, 3.5vw, 14px)/1.5 var(--mono); overflow-wrap: anywhere; user-select: all; }
.linkbox code b { font-weight: 700; }
.copy { flex: none; min-width: 112px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.linkbox a { max-width: 100%; font: clamp(12px, 3.5vw, 14px)/1.5 var(--mono); overflow-wrap: anywhere; color: var(--ink); }
.linkbox a b { font-weight: 700; }
.agent { margin-top: 24px; padding: 14px 16px; border-radius: 12px; border: 1px dashed #C9CCD1; font-size: 14px; color: var(--muted); }
.agent b { color: var(--ink); }
.agent code { font: 13px/1.4 var(--mono); color: var(--ink); }
.agent .linkbox { margin: 12px 0; background: #fff; }
table.bill { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-variant-numeric: tabular-nums; }
.bill th { background: var(--soft); color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; text-align: left; padding: 10px 16px; }
.bill td { padding: 14px 16px; border-top: 1px solid var(--line); }
.bill a { font-weight: 600; text-decoration: none; }
.bill a:hover { text-decoration: underline; }
.paid { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-size: 13px; font-weight: 700; }
.keys { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.keys li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.keys li + li { border-top: 1px solid var(--line); }
.keys svg { width: 30px; height: 26px; flex: none; color: var(--ink); }
.keys .what { flex: 1; min-width: 0; }
.keys .what b { display: block; }
.keys .what span { color: var(--muted); font-size: 14px; }
.keys .what .nb { white-space: nowrap; } /* the line breaks only between the key, its making and its last use */
.badge { flex: none; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; white-space: nowrap; }
dl.inv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 28px 0 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; }
dl.inv dt { color: var(--muted); }
dl.inv dd { margin: 0; font-variant-numeric: tabular-nums; }
.back { display: inline-block; margin-bottom: 18px; color: var(--muted); text-decoration: none; font-weight: 600; }
.signout { margin-top: 40px; }
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 18px 24px; text-align: center; }
@media (max-width: 600px) {
  .top { padding: 12px 16px; }
  .tabs { order: 3; width: 100%; }
  .card { padding-top: 36px; }
  .bill th:nth-child(4), .bill td:nth-child(4) { display: none; }
  .keys li { flex-wrap: wrap; }
  .keys .what { flex-basis: calc(100% - 44px); } /* the text takes the row; the badge goes under it */
  .keys .badge { margin-left: 44px; }
}
