:root {
  color-scheme: light;
  --ink: #172b2a;
  --green: #136146;
  --line: #d8e1dc;
  --muted: #536761;
  --paper: #fff;
  --bg: #f2f5f1;
  font: 15px/1.6 Inter,"Noto Sans CJK SC","Microsoft YaHei",sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
}

[hidden] {
  display: none!important;
}

.frame {
  width: min(1180px,calc(100% - 72px));
  margin: auto;
}

.bar {
  background: #113b31;
  color: white;
  border-bottom: 3px solid #b4d38a;
}

.mast,.brand,.intro,.toolbar,.foot,.actions,.pages,.dialog-head {
  display: flex;
  align-items: center;
}

.mast {
  height: 68px;
  justify-content: space-between;
}

.brand {
  gap: 18px;
}

.logotype {
  font-family: "Arial Black",Inter,sans-serif;
  font-size: 23px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -1.5px;
}

.product {
  padding-left: 18px;
  border-left: 1px solid #628477;
  font-size: 14px;
  letter-spacing: 1px;
}

button,input,textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
  border-radius: 6px;
  color: inherit;
  background: none;
  font-weight: 600;
}

button:disabled {
  opacity: .45;
  cursor: default;
}

button:focus-visible,a:focus-visible {
  outline: 3px solid #5f9d7b;
  outline-offset: 3px;
}

.quiet {
  color: #e2eee4;
  padding: 7px 12px;
  border: 1px solid #6d8e7d;
  font-size: 13px;
}

.quiet:hover {
  background: #20503f;
}

.intro {
  justify-content: space-between;
  gap: 24px;
  padding: 46px 0 28px;
}

.network {
  margin: 0 0 5px;
  font-size: 13px;
  color: var(--green);
  font-weight: 650;
}

.network span {
  padding: 0 5px;
}

.primary {
  padding: 11px 20px;
  background: var(--green);
  color: white;
  box-shadow: 0 1px 2px #1239241f;
}

.primary:hover {
  background: #0c513a;
}

.wide {
  width: 100%;
}

h1,h2,p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 36px;
  line-height: 1.28;
  letter-spacing: -1.2px;
}

h2 {
  font-size: 23px;
  line-height: 1.35;
  margin-bottom: 0;
}

.muted {
  color: var(--muted);
  font-size: 14px;
  margin: 14px 0 22px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 25px;
  padding: 21px 0;
}

.metrics div {
  padding: 0 27px;
}

.metrics div+div {
  border-left: 1px solid var(--line);
}

.metrics span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metrics strong {
  font-size: 34px;
  line-height: 1.3;
  letter-spacing: -1.1px;
  font-variant-numeric: tabular-nums;
}

.metrics div:first-child strong {
  color: var(--green);
}

.ledger,.login-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.toolbar,.foot {
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
}

.toolbar {
  flex-wrap: wrap;
}

.toolbar nav,.toolbar form {
  display: flex;
  gap: 6px;
  align-items: center;
}

nav button {
  border-radius: 4px;
  padding: 7px 13px;
  color: var(--muted);
}

nav button[aria-pressed=true] {
  color: #114d36;
  background: #e4efe5;
}

.small {
  padding: 6px 11px;
  background: white;
  border: 1px solid #cbd8d0;
  font-size: 13px;
}

.small:hover:enabled {
  border-color: #66937c;
}

input,textarea {
  color: var(--ink);
  border: 1px solid #bfcfc5;
  background: #fff;
  border-radius: 6px;
  padding: 10px 12px;
  max-width: 100%;
  outline-color: #24805a;
}

input[type=search] {
  font-size: 13px;
  width: 220px;
  padding: 7px 10px;
}

label {
  display: block;
  margin: 16px 0 6px;
  font-weight: 650;
  font-size: 14px;
}

form>input,form>textarea {
  width: 100%;
}

textarea {
  resize: vertical;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}

th {
  background: #f6f8f4;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  padding: 11px 16px;
  border-block: 1px solid var(--line);
}

td {
  padding: 13px 16px;
  font-size: 14px;
  border-bottom: 1px solid #e7ece8;
}

th:first-child,td:first-child {
  padding-left: 24px;
}

td:last-child {
  padding-right: 22px;
}

tbody tr:hover {
  background: #fbfcfa;
}

code,.full,.mono {
  font-family: "IBM Plex Mono","SFMono-Regular",Consolas,monospace;
}

.mono {
  font-size: 13px;
}

.link {
  font-size: 13px;
  color: var(--green);
  padding: 3px 2px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.empty {
  padding: 45px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.foot {
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.pages,.actions {
  gap: 8px;
}

.address-btn {
  font: inherit;
  color: #155541;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}

.ok {
  color: #156442;
}

.hold {
  color: #925316;
}

.login-card {
  max-width: 440px;
  margin: 12vh auto 0;
  padding: 30px;
}

.login-card h1 {
  font-size: 28px;
}

.error:not(:empty) {
  color: #9b342e;
  font-size: 14px;
  margin: 12px 0;
}

.error:empty {
  margin: 15px 0 0;
}

#notice {
  color: var(--green);
  font-size: 14px;
  margin: 12px 0 36px;
}

dialog {
  color: var(--ink);
  padding: 24px;
  width: min(475px,calc(100% - 28px));
  border: 1px solid #c7d5cd;
  border-radius: 10px;
  box-shadow: 0 24px 80px #102b2533;
  max-height: 90dvh;
}

dialog::backdrop {
  background: #10292375;
}

.dialog-head {
  justify-content: space-between;
  gap: 12px;
}

.close {
  font-size: 25px;
  line-height: 1;
  width: 32px;
  height: 32px;
  color: var(--muted);
}

.full {
  overflow-wrap: anywhere;
  white-space: normal;
  background: #f3f6f2;
  border-radius: 5px;
  padding: 9px 11px;
  font-size: 13px;
  user-select: all;
}

dt {
  font-size: 12px;
  color: var(--muted);
  margin-top: 13px;
}

dd {
  margin: 3px 0 10px;
}

.actions {
  flex-wrap: wrap;
  margin-top: 18px;
}

#export-address {
  margin-top: 17px;
}

@media (max-width: 720px) {
  .frame {
    width: calc(100% - 28px);
  }

  .mast {
    height: 56px;
  }

  .intro {
    padding: 28px 0 20px;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
  }

  h1 {
    font-size: 29px;
  }

  .primary {
    padding: 9px 13px;
  }

  .metrics {
    padding: 14px 0;
    margin-bottom: 16px;
  }

  .metrics div {
    padding: 0 12px;
  }

  .metrics strong {
    font-size: 26px;
  }

  .metrics span {
    font-size: 12px;
  }

  .toolbar,.foot {
    padding: 12px;
  }

  .toolbar form {
    flex: 1;
  }

  .toolbar input[type=search] {
    flex: 1;
    min-width: 130px;
  }

  .toolbar nav {
    width: 100%;
  }

  th:first-child,td:first-child {
    padding-left: 14px;
  }

  .login-card {
    padding: 24px;
  }
}

.settings-dialog { width: min(600px, calc(100% - 24px)); }
.settings-dialog .tabs, .channel-row, .service-state { display: flex; align-items: center; }
.tabs { gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.tabs button { border-radius: 5px; padding: 6px 10px; color: var(--muted); }
.tabs button[aria-pressed=true] { background: #e4efe5; color: var(--green); }
.channel-row { justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 14px 0; }
.channel-row small { display: block; color: var(--muted); }
.settings-dialog fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 14px 0; padding: 12px; }
.settings-dialog fieldset input, .settings-dialog select, #share-url { width: 100%; }
.settings-dialog select { font: inherit; border: 1px solid var(--line); background: white; padding: 9px; }
.check { font-weight: 400; }
.service-state { font-size: 14px; color: var(--green); margin: -8px 0 18px; }
#share-box { margin-top: 12px; border-top: 1px solid var(--line); }
#share-box a { color: var(--green); font-size: 13px; }
#details-dialog .actions, .intro .actions { flex-wrap: wrap; }
#share-notice, #backup-note { font-size: 13px; }
