:root {
  font-family:
    system-ui,
    -apple-system,
    "PingFang SC",
    sans-serif;
  color: #173c32;
  background: #f6f8f5;
  font-size: 16px;
  line-height: 1.6;
  accent-color: #19634b;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
header {
  padding: 22px 5%;
  border-bottom: 1px solid #cad8ce;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
}
header span,
.note,
footer {
  color: #50675e;
  font-size: 0.88rem;
}
main {
  max-width: 1260px;
  margin: 40px auto;
  min-height: 75vh;
  padding: 0 28px;
}
h1 {
  font-size: 1.85rem;
  line-height: 1.25;
  font-weight: 650;
  margin: 0 0 18px;
}
h2 {
  font-size: 1.2rem;
  margin-top: 32px;
}
p {
  max-width: 70ch;
}
button,
input,
textarea {
  font: inherit;
}
label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}
input,
textarea {
  border: 1px solid #829b8d;
  border-radius: 6px;
  padding: 10px 12px;
  max-width: 100%;
  background: #fff;
  color: #173c32;
  caret-color: #19634b;
}
input::placeholder,
textarea::placeholder {
  color: #5b7166;
}
input[type="password"] {
  width: 100%;
}
textarea {
  width: 100%;
  resize: vertical;
}
button {
  border: 1px solid transparent;
  background: #19634b;
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 550;
}
button:hover {
  background: #104e3a;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.secondary,
nav button {
  background: transparent;
  color: #173c32;
  border-color: #829b8d;
}
.secondary:hover,
nav button:hover {
  background: #e3ede5;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #a76b11;
  outline-offset: 3px;
}
form {
  margin: 24px 0 32px;
}
form button {
  margin-top: 14px;
}
#login {
  max-width: 480px;
  margin: 80px auto;
}
#workspace {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 45px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
nav button {
  text-align: left;
}
.content {
  min-width: 0;
  background: #fff;
  padding: 30px;
  border: 1px solid #cad8ce;
  border-radius: 12px;
}
.table-wrap {
  overflow: auto;
  margin: 22px 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th,
td {
  text-align: left;
  border-bottom: 1px solid #d7e1d9;
  padding: 14px 10px;
  vertical-align: top;
}
td {
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
th {
  background: #eef3ed;
  white-space: nowrap;
}
.mono {
  font-family: ui-monospace, monospace;
  overflow-wrap: anywhere;
  font-size: 0.85rem;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
summary {
  cursor: pointer;
  font-weight: 600;
  padding: 16px 0;
}
details {
  border-bottom: 1px solid #cad8ce;
  margin-top: 20px;
}
dl {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
}
dt {
  color: #50675e;
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
}
#message {
  position: static;
  background: #e3ede5;
  padding: 14px 20px;
  border-radius: 6px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
#message:empty {
  display: none;
}
#message.error {
  background: #f9e8e1;
  color: #882d18;
}
#review-items article {
  padding: 20px 0;
  border-bottom: 1px solid #cad8ce;
  overflow-wrap: anywhere;
}
footer {
  padding: 24px 5%;
  border-top: 1px solid #cad8ce;
}
::selection {
  background: #cee1d0;
  color: #143b2b;
}
* {
  scrollbar-color: #8fa997 #edf2eb;
}
a {
  color: #19634b;
  text-underline-offset: 3px;
}
@media (max-width: 700px) {
  header {
    flex-direction: column;
  }
  main {
    padding: 0 18px;
    margin: 24px auto;
  }
  #workspace {
    display: block;
  }
  nav {
    flex-direction: row;
    flex-wrap: wrap;
    margin-bottom: 20px;
    gap: 8px;
  }
  nav button {
    padding: 8px 12px;
  }
  .content {
    padding: 20px 14px;
  }
  #login {
    margin: 30px auto;
  }
  dl {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  dd {
    margin-bottom: 16px;
  }
  button {
    min-height: 44px;
  }
  .actions button {
    flex: 1;
  }
  h1 {
    font-size: 1.6rem;
  }
}

@media (max-width: 700px) {
  .actions {
    flex-direction: column;
  }
  .actions button {
    width: 100%;
  }
}

#login input,
#enrollment input,
#security input {
  width: 100%;
}
#login label,
#enrollment label,
#security label {
  margin-top: 16px;
}
#enrollment {
  max-width: 540px;
  margin: 35px auto;
}
#totp-secret {
  overflow-wrap: anywhere;
}
#security {
  max-width: 700px;
}
#totp-qr {
  max-width: 100%;
  object-fit: contain;
}

select {
  font: inherit;
  background: #fff;
  color: #173c32;
  border: 1px solid #829b8d;
  padding: 10px;
  border-radius: 6px;
  width: 100%;
  min-height: 44px;
}
select:focus-visible {
  outline: 3px solid #a76b11;
  outline-offset: 3px;
}
#generation label {
  margin-top: 18px;
}
#generation input[type="number"] {
  width: 160px;
}
#local-wallet-form input,
#local-restore-form input {
  display: block;
  width: min(100%, 560px);
  box-sizing: border-box;
  margin-bottom: 12px;
}
#local-register {
  display: block;
  margin: 16px 0;
}
#local-wallet-status {
  overflow-wrap: anywhere;
}
#settings-treasury {
  display: block;
  width: min(100%, 640px);
}
#wallet-settings-result,
#wallet-settings-info {
  overflow-wrap: anywhere;
}
#local-wallet-form [data-page] {
  margin-bottom: 16px;
}
#group-info,
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
pre {
  font-size: 0.83rem;
  padding: 16px;
  background: #eef3ed;
  max-width: 100%;
}
#mobile-registration,
#mobile-derive {
  max-width: 820px;
  margin: 32px auto;
}
#generation-request {
  margin-bottom: 28px;
}
#generation-qr {
  max-width: 100%;
  object-fit: contain;
}
#local-registration-qr {
  display: block;
  width: 420px;
  max-width: 100%;
  height: auto;
}

#generate-form button {
  display: block;
  margin-top: 14px;
}
