.q-page,
.q-receipt,
#q-wallet-drawer {
  --q-ink: var(--ink, #272721);
  --q-dim: var(--muted, #64645c);
  --q-rule: var(--line, #dcdad0);
  --q-paper: var(--white, #fffef9);
  --q-accent: var(--orange, #ad492f);
  --q-green: #2c6754;
  --q-blue: #375791;
  color: var(--q-ink);
  font-family: Inter, Arial, sans-serif;
}
.q-page,
.q-receipt {
  width: 100%;
  max-width: 1176px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 74px) 0 32px;
}
.q-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 30px;
}
.q-page-head h1,
.q-receipt h1 {
  font-family: var(--serif, Georgia, serif);
  font-weight: 400;
  font-size: clamp(44px, 5.3vw, 78px);
  line-height: 1.03;
  letter-spacing: -0.055em;
  margin: 0 0 9px;
}
.q-page-head p,
.q-receipt p,
#q-wallet-drawer p {
  line-height: 1.55;
}
.q-page-head p {
  color: var(--q-dim);
  font-size: 15px;
}
.q-actions,
.q-sources,
.q-wallet-actions,
.q-save-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.q-btn,
.q-icon-btn,
.q-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
}
.q-btn,
.q-icon-btn {
  color: var(--q-ink);
  border: 1px solid var(--q-rule);
  border-radius: 7px;
  background: var(--q-paper);
  min-height: 40px;
  padding: 9px 15px;
  text-decoration: none;
}
.q-btn:hover,
.q-icon-btn:hover {
  background: #f0eee5;
}
.q-btn.q-dark {
  background: var(--q-ink);
  color: #fffdf4;
  border-color: var(--q-ink);
}
.q-btn.q-dark:hover {
  background: #434039;
}
.q-btn.q-primary {
  background: var(--q-accent);
  color: white;
  border-color: var(--q-accent);
}
.q-btn.q-plain {
  background: transparent;
  border-color: transparent;
}
.q-btn .icon,
.q-row-action .icon,
.q-icon-btn .icon {
  width: 16px;
  height: 16px;
  flex: none;
}
.q-icon-btn {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
}
.q-overview {
  border-radius: 14px;
  background: #242b26;
  color: #fffef4;
  display: grid;
  grid-template-columns: 1fr minmax(200px, 0.7fr);
  min-height: 180px;
  padding: clamp(22px, 3.1vw, 40px);
  column-gap: clamp(20px, 7vw, 108px);
  align-items: center;
}
.q-value > span,
.q-allocation span,
.q-result {
  font-size: 13px;
  color: #e4e7d9;
}
.q-value > strong {
  display: block;
  font-weight: 520;
  font-size: clamp(45px, 5vw, 72px);
  letter-spacing: -0.075em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.q-value > strong small {
  letter-spacing: 0;
  font-size: 17px;
  font-weight: 500;
  color: #ccd2c4;
}
.q-result {
  margin-top: 4px;
}
.q-allocation > div:not(.q-allocation-track) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.q-allocation b {
  font-size: 13px;
  font-weight: 570;
  font-variant-numeric: tabular-nums;
}
.q-allocation span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.q-allocation span i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #c4d7a7;
}
.q-allocation > div:last-child span i {
  background: #a46c53;
}
.q-allocation-track {
  height: 8px;
  border-radius: 2px;
  background: #a46c53;
  margin: 13px 0;
  overflow: hidden;
}
.q-allocation-track i {
  display: block;
  height: 100%;
  background: #c4d7a7;
}
.q-tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--q-rule);
  margin: 30px 0 0;
}
.q-tab {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 44px;
  padding: 3px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--q-dim);
  font-size: 14px;
  font-weight: 560;
}
.q-tab[aria-pressed='true'] {
  color: var(--q-ink);
  border-bottom-color: var(--q-accent);
}
.q-tab span {
  font:
    11px ui-monospace,
    monospace;
  background: #eeece2;
  padding: 2px 5px;
  border-radius: 3px;
}
.q-empty {
  text-align: center;
  background: var(--q-paper);
  border: 1px solid var(--q-rule);
  border-radius: 12px;
  margin-top: 20px;
  padding: clamp(35px, 4.7vw, 66px) 16px;
}
.q-empty-icon,
.q-wallet-icon {
  display: inline-grid;
  place-items: center;
  background: #ede9d9;
  color: #635b3b;
  border-radius: 12px;
  width: 42px;
  height: 42px;
}
.q-empty h2,
.q-setting label {
  font-weight: 600;
}
.q-empty h2 {
  margin: 15px 0 6px;
  font-size: 22px;
  letter-spacing: -0.045em;
}
.q-empty p {
  font-size: 14px;
  color: var(--q-dim);
  line-height: 1.5;
  margin: 0 auto 18px;
  max-width: 44ch;
}
.q-table-scroll {
  overflow-x: auto;
}
.q-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
.q-table :is(th, td) {
  padding: 17px 10px;
  border-bottom: 1px solid var(--q-rule);
}
.q-table th {
  font-size: 12px;
  font-weight: 550;
  color: var(--q-dim);
  white-space: nowrap;
}
.q-table th:first-child,
.q-table td:first-child {
  padding-left: 0;
}
.q-table td:first-child {
  width: 44%;
  min-width: 170px;
}
.q-table td:last-child,
.q-table th:last-child {
  text-align: right;
  padding-right: 0;
}
.q-table td small {
  display: block;
  margin-top: 5px;
  color: var(--q-dim);
}
.q-market-link {
  padding: 0;
  line-height: 1.4;
  font-weight: 580;
  text-align: left;
  overflow-wrap: anywhere;
}
.q-market-link:hover,
.q-row-action:hover {
  text-decoration: underline;
}
.q-row-action {
  padding: 7px 0;
  color: var(--q-blue);
  background: transparent;
  border: 0;
}
.q-row-action .icon {
  width: 12px;
}
.q-side {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.q-yes {
  color: #29523f;
  background: #e5ede1;
}
.q-no {
  color: #8b422d;
  background: #f6e1d6;
}
.q-gain {
  color: var(--q-green);
}
.q-doc-layout {
  display: grid;
  grid-template-columns: minmax(155px, 235px) minmax(0, 670px);
  gap: clamp(26px, 5.7vw, 94px);
  align-items: start;
}
.q-doc-nav {
  position: sticky;
  top: 25px;
  padding: 16px 0;
  border-top: 1px solid var(--q-rule);
}
.q-doc-nav h2 {
  font-size: 13px;
  margin: 0 0 12px;
  letter-spacing: 0;
}
.q-doc-nav button {
  width: 100%;
  display: block;
  text-align: left;
  padding: 7px 0;
  font-size: 13px;
  color: var(--q-dim);
  background: none;
  border: 0;
}
.q-doc-nav button[aria-current='location'],
.q-doc-nav button:hover {
  color: var(--q-accent);
  font-weight: 600;
}
.q-doc-content article {
  scroll-margin: 30px;
  border-top: 1px solid var(--q-rule);
  padding: 22px 0 27px;
  outline-offset: 5px;
}
.q-doc-content h2,
.q-settings legend,
.q-receipt h2 {
  font-family: var(--serif, Georgia, serif);
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.2;
}
.q-doc-content p {
  margin: 13px 0;
  font-size: 15px;
  line-height: 1.7;
  max-width: 70ch;
}
.q-text-link {
  color: var(--q-blue);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.q-sources {
  gap: 18px;
}
.q-settings form {
  max-width: 810px;
}
.q-settings fieldset {
  border: 0;
  border-top: 1px solid var(--q-rule);
  padding: 0;
  margin: 0 0 24px;
  min-width: 0;
}
.q-settings legend {
  float: left;
  width: 100%;
  padding: 21px 0 9px;
}
.q-setting {
  clear: both;
  display: grid;
  grid-template-columns: minmax(165px, 1fr) minmax(165px, 0.72fr);
  align-items: center;
  gap: 20px;
  padding: 15px 0;
}
.q-setting label {
  font-size: 15px;
}
.q-setting p,
.q-wallet-note,
#q-settings-status {
  margin: 4px 0;
  font-size: 13px;
  color: var(--q-dim);
  line-height: 1.55;
}
.q-setting :is(input:not([type='checkbox']), select) {
  align-self: start;
  width: 100%;
  max-width: 100%;
  min-height: 42px;
  padding: 8px 11px;
  background: var(--q-paper);
  border: 1px solid #bcb9ac;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  color: var(--q-ink);
}
.q-setting .q-toggle {
  justify-self: end;
  appearance: none;
  width: 42px;
  height: 24px;
  margin: 0;
  cursor: pointer;
  border: 1px solid #a29e90;
  border-radius: 20px;
  background: #e8e5da;
  position: relative;
}
.q-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #7c786d;
  border-radius: 50%;
}
.q-toggle:checked {
  background: var(--q-green);
  border-color: var(--q-green);
}
.q-toggle:checked::after {
  background: #fff;
  left: 21px;
}
.q-save-row {
  border-top: 1px solid var(--q-rule);
  padding-top: 18px;
}
#q-wallet-drawer {
  border: 1px solid var(--q-rule);
  border-radius: 0;
  width: min(398px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  padding: 0;
  background: var(--q-paper);
  box-shadow: -12px 0 42px #25251a20;
  overflow: auto;
}
#q-wallet-drawer::backdrop {
  background: #22231f55;
}
.q-drawer {
  padding: clamp(20px, 3vw, 30px);
  min-height: 100%;
}
.q-drawer-head,
.q-address,
.q-wallet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.q-drawer-head {
  margin-bottom: 26px;
}
.q-drawer-head h2 {
  font-family: var(--serif, Georgia, serif);
  font-weight: 400;
  letter-spacing: -0.04em;
  font-size: 36px;
  margin: 0;
}
.q-wallet-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 19px;
  border-bottom: 1px solid var(--q-rule);
}
.q-wallet-profile strong,
.q-wallet-profile small,
.q-address small {
  display: block;
  overflow-wrap: anywhere;
}
.q-wallet-profile small,
.q-address small {
  font-size: 12px;
  color: var(--q-dim);
  margin: 3px 0;
}
.q-address {
  padding: 15px 0;
}
.q-address code {
  overflow-wrap: anywhere;
  font-size: 12px;
}
.q-wallet-row {
  border-bottom: 1px solid var(--q-rule);
  padding: 14px 0;
  font-size: 14px;
}
.q-wallet-row strong {
  font-weight: 570;
}
.q-wallet-actions {
  margin-top: 20px;
}
.q-wallet-actions .q-btn {
  width: 100%;
}
.q-drawer p {
  margin: 14px 0;
}
.q-receipt {
  max-width: 760px;
}
.q-receipt > a {
  display: inline-block;
  margin-bottom: 22px;
}
.q-receipt h1 {
  font-size: clamp(34px, 4.2vw, 54px);
  overflow-wrap: anywhere;
  margin: 10px 0;
}
.q-receipt h2 {
  font-size: 25px;
  margin: 24px 0 7px;
}
.q-receipt .q-private-label {
  font-size: 12px;
  color: var(--q-dim);
  font-weight: 550;
}
.q-receipt .q-choice {
  font-size: 25px;
  line-height: 1.3;
}
.q-receipt .q-status {
  color: var(--q-dim);
  font-size: 14px;
}
.q-receipt .q-check {
  margin: 14px 0;
  font-size: 14px;
  color: var(--q-green);
}
.q-receipt .q-check[data-status='invalid'],
.q-receipt .q-check[data-status='late'] {
  color: #8c3822;
}
.q-receipt .q-check[data-status='pending'] {
  color: var(--q-dim);
}
.q-receipt dl {
  margin: 16px 0;
}
.q-receipt dl > div {
  border-bottom: 1px solid var(--q-rule);
  padding: 10px 0;
  display: grid;
  grid-template-columns: minmax(100px, 0.7fr) minmax(0, 1fr);
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
}
.q-receipt :is(dt, dd) {
  margin: 0;
  overflow-wrap: anywhere;
}
.q-receipt dt {
  color: var(--q-dim);
}
.q-receipt dd {
  text-align: right;
}
.q-receipt details {
  border-block: 1px solid var(--q-rule);
  padding: 16px 0;
  margin: 24px 0;
}
.q-receipt summary {
  cursor: pointer;
  font-weight: 600;
}
.q-receipt details p {
  margin: 10px 0;
  font-size: 14px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.q-receipt code {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.q-receipt .q-actions {
  margin: 13px 0;
}
html[data-reduced-motion] {
  scroll-behavior: auto !important;
}
html[data-reduced-motion] *,
html[data-reduced-motion] *::before,
html[data-reduced-motion] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0s !important;
  scroll-behavior: auto !important;
}
@media (max-width: 720px) {
  .q-doc-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .q-doc-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
  }
  .q-doc-nav h2 {
    flex-basis: 100%;
    margin: 0;
  }
  .q-doc-nav button {
    width: auto;
  }
  .q-page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .q-overview {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  .q-table :is(th, td) {
    padding: 12px 8px;
  }
  .q-table-scroll {
    padding-bottom: 3px;
  }
}
@media (max-width: 480px) {
  .q-overview {
    grid-template-columns: 1fr;
    row-gap: 20px;
  }
  .q-settings .q-setting {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .q-settings .q-setting:has(.q-toggle) {
    grid-template-columns: 1fr auto;
  }
  .q-page-head {
    margin-bottom: 20px;
  }
  .q-doc-content p {
    font-size: 14px;
  }
  .q-table {
    min-width: 530px;
  }
  .q-actions .q-btn {
    padding-inline: 11px;
  }
  .q-receipt dl > div {
    grid-template-columns: minmax(86px, 0.66fr) minmax(0, 1fr);
  }
}

html[data-design='vesper'] :is(.q-page, .q-receipt, #q-wallet-drawer) {
  --q-green: #a5d5b0;
  --q-blue: #a8bffa;
}
html[data-design='vesper'] :is(.q-btn, .q-icon-btn):hover {
  background: #323630;
}
html[data-design='vesper'] .q-btn.q-dark {
  color: #1e231e;
  background: #dfdece;
}
html[data-design='vesper'] .q-btn.q-primary {
  color: #251d18;
}
html[data-design='vesper'] .q-tab span {
  background: #393d36;
}
html[data-design='vesper'] .q-overview {
  border: 1px solid var(--q-rule);
}
