:root {
  color-scheme: dark;
  --s0: #17181f;
  --s1: #1c1e26;
  --s2: #25272f;
  --s3: #3e404a;
  --s4: #555762;
  --fg: #fafafa;
  --mu: #a0a3b1;
  --xm: #6f7280;
  --bd: #24262f;
  --accent: #f7b35f;
  --acb: #ffcd75;
  --acf: #1a1c2c;
  --act: #f7b35f29;
  --des: #c64f43;
  --ok: #6cb17b;
  --bad: #d8847b;
  --warn: #c09664;
  --okt: #6cb17b29;
  --badt: #d8847b29;
  --hl: rgba(255, 255, 255, 0.08);
  --dok: #35c264;
  --dwarn: #db932e;
  --dbad: #f7796d;
  --ui: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --pill: 999px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --s0: #fff;
    --s1: #fafafa;
    --s2: #f4f4f5;
    --s3: #e4e4e7;
    --s4: #d4d4d8;
    --fg: #1a1a1e;
    --mu: #71717a;
    --xm: #a1a1aa;
    --bd: #e4e4e7;
    --accent: #ab6318;
    --acb: #c27420;
    --acf: #fff;
    --act: #ab63181f;
    --des: #b04138;
    --ok: #3e704a;
    --bad: #9d433b;
    --warn: #7b5d39;
    --okt: #3e704a1f;
    --badt: #9d433b1f;
    --hl: rgba(0, 0, 0, 0.06);
    --dok: #299f51;
    --dwarn: #b37824;
    --dbad: #f12e2f;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --s0: #fff;
  --s1: #fafafa;
  --s2: #f4f4f5;
  --s3: #e4e4e7;
  --s4: #d4d4d8;
  --fg: #1a1a1e;
  --mu: #71717a;
  --xm: #a1a1aa;
  --bd: #e4e4e7;
  --accent: #ab6318;
  --acb: #c27420;
  --acf: #fff;
  --act: #ab63181f;
  --des: #b04138;
  --ok: #3e704a;
  --bad: #9d433b;
  --warn: #7b5d39;
  --okt: #3e704a1f;
  --badt: #9d433b1f;
  --hl: rgba(0, 0, 0, 0.06);
  --dok: #299f51;
  --dwarn: #b37824;
  --dbad: #f12e2f;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--s0);
  color: var(--fg);
  font: 14px/1.45 var(--ui);
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* Author `display` rules otherwise beat the `hidden` attribute. */
[hidden] {
  display: none !important;
}

.icon {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* Layout */

.flow {
  max-width: 420px;
  margin: 0 auto;
  padding: 56px 24px 40px;
}

.flow.wide {
  max-width: 560px;
}

.flow.top-lg {
  padding-top: 96px;
}

.flow.top-sm {
  padding-top: 36px;
}

.col {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 24px 40px;
}

.lead {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.25;
  margin: 0 0 6px;
  text-align: center;
}

.sub {
  color: var(--mu);
  font-size: 13px;
  text-align: center;
  margin: 0 0 24px;
}

.sub.tight {
  margin-bottom: 12px;
}

.sub.bad {
  color: var(--bad);
  margin-top: 4px;
}

.spaced {
  margin-top: 20px;
}

.hint {
  color: var(--mu);
  font-size: 12px;
  text-align: center;
  margin: 14px 0 0;
  line-height: 1.5;
}

.small {
  font-size: 12px;
  color: var(--mu);
}

.mono {
  font-family: var(--mono);
}

.c {
  text-align: center;
}

.spacer {
  flex: 1;
}

.acts {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.acts.spread {
  justify-content: space-between;
}

.acts-r {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lnk {
  color: var(--mu);
  font-size: 13px;
  text-align: center;
  margin-top: 18px;
}

.lnk button {
  color: var(--fg);
  border: 0;
  background: none;
  padding: 0;
  border-bottom: 1px solid var(--s4);
  font-size: 13px;
}

/* Cards and rows */

.card {
  background: var(--s1);
  border: 1px solid var(--bd);
  border-radius: 8px;
  overflow: hidden;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  width: 100%;
  text-align: start;
  background: none;
  border: 0;
  color: var(--fg);
}

.row + .row {
  border-top: 1px solid var(--bd);
}

.row.click {
  cursor: pointer;
}

.row.click:hover {
  background: var(--hl);
}

.row > .icon {
  stroke: var(--xm);
  width: 14px;
  height: 14px;
}

[dir="rtl"] .row > .icon {
  transform: scaleX(-1);
}

.rc {
  flex: 1;
  min-width: 0;
}

.rt {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rt.muted {
  color: var(--mu);
}

.rh {
  color: var(--mu);
  font-size: 12px;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.rv {
  font-size: 13px;
  white-space: nowrap;
}

.rv.ok {
  color: var(--ok);
}

.rv.mu {
  color: var(--mu);
}

.rv.bad {
  color: var(--bad);
}

.row-tools {
  display: inline-flex;
  gap: 2px;
}

.sec {
  margin-bottom: 22px;
}

.sh {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 10px;
  color: var(--mu);
  font-size: 12px;
}

/* Account header */

.who {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}

.who-name {
  font-family: var(--serif);
  font-size: 22px;
}

/* Vault header */

.vh {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.vt {
  font-family: var(--serif);
  font-size: 22px;
}

.sec-i {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--mu);
}

.sec-i .icon {
  width: 12px;
  height: 12px;
}

.search {
  margin-bottom: 18px;
}

/* Form */

.fd {
  display: block;
  margin-bottom: 14px;
}

.lb {
  font-weight: 500;
  font-size: 13px;
  margin: 0 0 6px;
  display: block;
}

.g2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}

.in {
  width: 100%;
  background: var(--s2);
  border: 1px solid var(--bd);
  color: var(--fg);
  border-radius: var(--pill);
  padding: 11px 16px;
  font: inherit;
  outline: none;
}

.in:focus {
  border-color: var(--s4);
  background: var(--s1);
}

.in::placeholder {
  color: var(--xm);
}

.in:disabled {
  opacity: 0.6;
}

.in.mo {
  font-family: var(--mono);
  font-size: 13px;
}

.iw .in.center {
  text-align: center;
  padding-inline: 44px 120px;
  text-overflow: ellipsis;
}

.in.area {
  border-radius: 12px;
  resize: vertical;
}

select.in {
  appearance: none;
}

.iw {
  position: relative;
}

.iw .in {
  padding-inline-end: 44px;
}

.iw .tl {
  position: absolute;
  inset-inline-end: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mu);
  font-size: 12px;
  display: flex;
  gap: 6px;
  align-items: center;
  background: none;
  border: 0;
  padding: 0;
}

.iw .tl.ok {
  color: var(--ok);
  pointer-events: none;
}

.mt {
  height: 4px;
  background: var(--s2);
  border-radius: 2px;
  overflow: hidden;
  margin: 8px 2px 0;
}

.mt i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.15s;
}

.mt[data-level="low"] i {
  background: var(--bad);
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -4px 0 14px;
  font-size: 13px;
  color: var(--mu);
}

.cmd {
  background: var(--s2);
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 12px 16px;
  font: 13px var(--mono);
  margin: 0 0 14px;
  text-align: center;
  user-select: all;
}

/* Code boxes */

.code {
  position: relative;
  display: flex;
  gap: 8px;
  justify-content: center;
}

.code span {
  width: 44px;
  height: 52px;
  border-radius: 12px;
  background: var(--s2);
  border: 1px solid var(--bd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 22px;
}

.code span.cur {
  border-color: var(--s4);
  background: var(--s1);
}

.code span.cur::after {
  content: "";
  width: 1px;
  height: 22px;
  background: var(--fg);
  animation: blink 1s steps(2) infinite;
}

@keyframes blink {
  to {
    opacity: 0;
  }
}

.code-real {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  border: 0;
  font-size: 22px;
  caret-color: transparent;
}

.code-real:disabled + span,
.code-real:disabled ~ span {
  opacity: 0.6;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--pill);
  border: 1px solid transparent;
  padding: 0 14px;
  height: 32px;
  background: var(--s3);
  color: var(--fg);
  white-space: nowrap;
}

.btn.md {
  height: 44px;
  padding: 0 22px;
}

.btn.xs {
  height: 28px;
  font-size: 12px;
  padding: 0 10px;
}

.btn.pri {
  background: var(--accent);
  color: var(--acf);
}
.btn.pri:hover:not(:disabled) {
  background: var(--acb);
}

.btn.out {
  background: transparent;
  border-color: var(--s3);
}

.btn.gh {
  background: transparent;
  color: var(--mu);
}

.btn.gh:hover {
  color: var(--fg);
  background: var(--hl);
}

.btn.dan {
  background: transparent;
  border-color: var(--s3);
  color: var(--bad);
}

.btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Bits */

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--xm);
  flex: none;
}

.dot.ok {
  background: var(--dok);
}

.dot.warn {
  background: var(--dwarn);
}

.dot.bad {
  background: var(--dbad);
}

.ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--s2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-size: 11px;
  font-weight: 600;
}

.ico.lg {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.ico.lg .icon {
  width: 28px;
  height: 28px;
  stroke-width: 1.5;
}

.av {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--acf);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 24px;
  flex: none;
}

.av.sm {
  width: 28px;
  height: 28px;
  font-size: 13px;
}

.av.mu {
  background: var(--s3);
  color: var(--fg);
}

.tg {
  appearance: none;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: var(--s3);
  position: relative;
  flex: none;
  margin: 0;
  cursor: pointer;
}

.tg::after {
  content: "";
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fg);
  transition: inset-inline-start 0.12s;
}

.tg:checked {
  background: var(--accent);
}

.tg:checked::after {
  inset-inline-start: 18px;
  background: var(--acf);
}

.ck {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--s4);
  flex: none;
  margin: 0;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
}

.ck:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.ck:checked::after {
  content: "";
  width: 9px;
  height: 5px;
  border: 2px solid var(--acf);
  border-top: 0;
  border-right: 0;
  transform: translateY(-1px) rotate(-45deg);
}

.bigck {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bigck .icon {
  width: 26px;
  height: 26px;
  stroke: var(--acf);
  stroke-width: 2.4;
}

.bio {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: var(--s2);
  border: 0;
}

.bio .icon {
  width: 40px;
  height: 40px;
  stroke-width: 1.5;
}

.bio.go {
  background: var(--accent);
  color: var(--acf);
}

.qrw {
  text-align: center;
  margin: 4px 0 16px;
}

.qrw .qr {
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  box-sizing: content-box;
}

.reveal {
  text-align: center;
  margin-top: 16px;
}

.secret {
  display: inline-block;
  margin-top: 6px;
  font: 14px var(--mono);
  letter-spacing: 0.05em;
  user-select: all;
  overflow-wrap: anywhere;
}

.words {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.words span {
  font-family: var(--serif);
  font-size: 17px;
  padding: 9px 15px;
  border-radius: var(--pill);
  background: var(--s2);
}

.pick {
  display: block;
  width: 100%;
  border: 1px solid var(--bd);
  background: none;
  border-radius: 12px;
  padding: 12px 10px;
  margin-bottom: 10px;
  color: var(--fg);
}

.pick .words {
  gap: 4px;
}

.pick .words span {
  background: transparent;
  font-size: 15px;
  padding: 3px 7px;
}

.pick:hover:not(:disabled) {
  background: var(--hl);
}

.pick.on {
  border-color: var(--accent);
  background: var(--act);
}

.pick.bad {
  border-color: var(--bad);
  opacity: 0.6;
  cursor: default;
}

/* Emergency Kit paper */

.kit {
  background: #fff;
  color: #141414;
  border-radius: 10px;
  padding: 24px 26px;
  font-family: var(--ui);
  text-align: start;
}

.kit h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  margin: 0 0 2px;
}

.kit .kd {
  font-size: 12px;
  color: #777;
}

.kit .k {
  font-size: 11px;
  color: #777;
  margin: 14px 0 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kit .sk {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.kit .two {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: start;
}

.kit .kq {
  text-align: center;
  font-size: 11px;
  color: #777;
  padding-top: 14px;
}

.kit .kq .qr {
  display: block;
  margin: 0 auto 6px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
}

.kit .wr {
  border-bottom: 1px solid #bbb;
  height: 22px;
}

.kit .ft {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #eee;
  font-size: 12px;
  color: #777;
}

.print-kit {
  display: none;
}

/* Status */

.status {
  margin: 16px 4px 0;
  font-size: 13px;
  text-align: center;
}

.status.busy {
  color: var(--mu);
}

.status.error {
  color: var(--bad);
}

.status.ok {
  color: var(--ok);
}

.status-slot {
  max-width: 420px;
  margin: 0 auto;
  padding: 0 24px 24px;
}

/* Signature confirmation (bridge) */

.sheet {
  position: fixed;
  inset: auto 0 0 0;
  padding: 16px;
  background: color-mix(in srgb, var(--s0) 70%, transparent);
  display: flex;
  justify-content: center;
}

.sheet > .card {
  width: min(440px, 100%);
  padding: 16px;
}

.sheet h2 {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 8px;
}

.btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btns.end {
  justify-content: flex-end;
}

.btn.default {
  background: var(--accent);
  color: var(--acf);
}

.btn.ghost {
  background: transparent;
  color: var(--mu);
}

pre {
  max-height: 16rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: var(--mono);
  font-size: 12px;
}

@media (max-width: 560px) {
  .flow,
  .flow.top-lg {
    padding: 36px 16px 28px;
  }

  .g2,
  .kit .two {
    grid-template-columns: 1fr;
  }

  .iw .in.center {
    padding-inline: 16px 100px;
  }
}

@media print {
  @page {
    margin: 16mm;
  }

  html,
  body {
    background: #fff;
  }

  body > :not(.print-kit) {
    display: none !important;
  }

  .print-kit {
    display: block;
  }

  .print-kit .kit {
    border-radius: 0;
    padding: 0;
  }
}

/* Handoff match code, the same on the app and the web */
.match {
  font-family: var(--mono);
  font-size: 28px;
  letter-spacing: 0.18em;
  text-align: center;
  padding: 14px 0;
  margin: 0 0 18px;
  background: var(--s1);
  border: 1px solid var(--bd);
  border-radius: 12px;
}

/* Account section and account web */
.logo {
  fill: currentColor;
  stroke: none;
  flex: none;
}
.lead .logo {
  color: var(--fg);
}
.acts.col {
  flex-direction: column;
  align-items: stretch;
}
.lnk .sep {
  margin: 0 8px;
  color: var(--xm);
}
.ptitle {
  font-size: 22px;
  font-weight: 500;
  margin: 6px 0 18px;
}
.note {
  margin: 12px 4px 0;
}
.bigx {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--badt);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bigx .icon {
  width: 24px;
  height: 24px;
  stroke: var(--bad);
  stroke-width: 2;
}

.crumb {
  margin: -6px 0 6px -8px;
}
.pt-r {
  margin-inline-start: 10px;
  font-weight: 400;
}
.lockrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.lockrow > .in,
.lockrow > .grow {
  flex: 1;
  min-width: 0;
}
.bio.sm {
  width: 40px;
  height: 40px;
  margin: 0;
  border-radius: 12px;
  flex: none;
}
.bio.sm .icon {
  width: 22px;
  height: 22px;
}
.spin {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--s3);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: none;
  padding: 0;
  color: var(--fg);
  border-bottom: 1px solid var(--s4);
  font-size: 12px;
}
.inline-link .icon {
  width: 11px;
  height: 11px;
}
.row > .icon:last-child {
  stroke: var(--xm);
}
.bad {
  color: var(--bad);
}

/* Account web only; vault.css comes first in the bundle. */
.wh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 22px 0;
}
.wm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--fg);
  text-decoration: none;
}
.lnk a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--s4);
}
a.btn {
  text-decoration: none;
}
.col.narrow {
  max-width: 520px;
}
.col.narrow > .btn.gh.xs {
  margin: 6px 0 4px -8px;
}
