* {
  box-sizing: border-box;
}
html {
  color-scheme: dark;
}
body {
  margin: 0;
  background: #101316;
  color: #e8e9e6;
  font:
    16px/1.45 Inter,
    Arial,
    sans-serif;
}
.wrap {
  max-width: 1220px;
  width: calc(100% - 64px);
  margin: auto;
}
header {
  border-bottom: 1px solid #343a3e;
}
.nav,
.cataloghead,
footer,
.cardhead,
.cardbottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: clamp(12px, 1.4vw, 22px);
  padding: 16px 0;
}
.brand {
  color: #f6f7f1;
  text-decoration: none;
  font-weight: 700;
  font-size: 21px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand i {
  width: 26px;
  height: 20px;
  background: repeating-linear-gradient(
    110deg,
    #ceec91 0 5px,
    transparent 5px 9px
  );
  transform: skew(-10deg);
}
.wordmark { margin: 0; font: inherit; }
.brand { white-space: nowrap; letter-spacing: -.04em; }
.tagline { margin: 3px 0 0; font-size: 13px; line-height: 1.45; }
#wallet-control { position: relative; justify-self: end; }
#connect { white-space: nowrap; }
#connect[aria-expanded]::after { content: " ▾"; }
#connect[aria-expanded="true"]::after { content: " ▴"; }
#wallet-options { position: absolute; right: 0; top: calc(100% + 5px); z-index: 5; min-width: 100%; padding: 3px; background: #202628; border: 1px solid #464f4e; border-radius: 7px; }
#disconnect { width: 100%; text-align: left; background: transparent; color: #f0f2eb; }
#disconnect:hover, #disconnect:focus-visible { background: #313b37; }
#run-links a, #rent-terms a { color: #c6d6b5; text-underline-offset: 3px; }
button {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  background: #c9e796;
  color: #1b2512;
  border: 0;
  padding: 11px 17px;
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.6;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #d2e9a7;
  outline-offset: 3px;
}
.intro {
  padding: 55px 0 23px;
}
.eyebrow,
small {
  font:
    600 11px/1.5 ui-monospace,
    monospace;
  letter-spacing: 0.12em;
  color: #b9bcac;
}
.eyebrow {
  color: #c9e796;
}
h1 {
  font-size: clamp(42px, 5.5vw, 72px);
  line-height: 1.04;
  margin: 13px 0;
  letter-spacing: -0.06em;
  font-weight: 550;
}
p {
  color: #b5bbbd;
}
.intro p {
  line-height: 1.55;
}
.tariff {
  display: grid;
  grid-template-columns: repeat(3, auto);
  align-items: start;
}
.tariff span { padding: 0 clamp(10px, 1.15vw, 18px); }
.tariff span + span { border-left: 1px solid #373d40; }
.tariff span:first-child { padding-left: 0; }
.tariff span:last-child { padding-right: 0; }
.tariff small, .tariff strong { white-space: nowrap; }
.tariff small,
.tariff strong {
  display: block;
}
.tariff small {
  text-transform: uppercase;
}
.tariff strong {
  font-size: 27px;
  margin-top: 5px;
  font-weight: 520;
}
.tariff em {
  font-size: 14px;
  font-style: normal;
  color: #b3b9b4;
}
.cataloghead { margin-top: 24px; }
h2 { font-size: 24px; letter-spacing: -.035em; }
.cataloghead h2 { margin: 0; }
#filters { display: flex; flex-wrap: wrap; gap: 4px; }
#filters button {
  background: transparent;
  color: #adb5b7;
  border-radius: 20px;
  padding: 6px 12px;
}
#filters [aria-pressed="true"] { background: #30382e; color: #d3e8b1; }
.catalog-note { font-size: 12px; color: #acb6b0; margin: 6px 0 14px; }
#cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid #383e40;
  border-radius: 9px;
  background: #191d20;
  padding: 14px 16px;
}
.card h3 { font-size: 17px; margin: 0; letter-spacing: -.025em; line-height: 1.3; }
.metrics { display: flex; align-items: end; justify-content: space-between; gap: 6px; margin: 12px 0 10px; }
.metrics small { display: block; color: #a6b1aa; font-size: 10px; letter-spacing: .035em; }
.metrics strong, .chart-caption strong, .chart-dates { font-variant-numeric: tabular-nums; }
.num { display: block; font-size: 29px; line-height: 1.12; font-weight: 550; letter-spacing: -.05em; }
.num.up { color: #c9e796; }
.num.down { color: #f2aba2; }
.annual { text-align: right; }
.annual strong { font-size: 14px; font-weight: 550; }
.history { margin: 0; }
.chart-caption, .chart-dates { display: flex; justify-content: space-between; gap: 6px; }
.chart-caption { font-size: 11px; color: #a7b2ae; }
.chart-caption strong { color: #d4dcd5; font-weight: 500; }
.chart { width: 100%; height: 54px; display: block; margin: 2px 0; }
.chart-dates { font: 11px/1.35 ui-monospace, monospace; color: #a6afab; }
.empty { min-height: 86px; display: grid; align-items: center; color: #a7b2ae; font-size: 12px; }
.cardbottom { position: relative; justify-content: flex-end; margin-top: auto; padding-top: 9px; }
.cardbottom button { background: transparent; color: #d9e7c6; border: 1px solid #57644c; padding: 5px 10px; font-size: 12px; }
.cardbottom button:hover:not([aria-disabled="true"]) { background: #293128; }
.cardbottom button[aria-disabled="true"] { background: #25292c; border-color: #494e51; color: #a7adae; cursor: not-allowed; }
.rent-tooltip { display: none; position: absolute; z-index: 2; right: 0; bottom: calc(100% - 6px); width: max-content; max-width: 100%; padding: 7px 10px; background: #303639; border: 1px solid #5b6467; border-radius: 5px; color: #eef0ec; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.cardbottom:not([data-dismissed]) .rent[aria-disabled="true"]:is(:hover, :focus) + .rent-tooltip,
.cardbottom:not([data-dismissed]) .rent[aria-disabled="true"] + .rent-tooltip:hover { display: block; }
.rent-tooltip::after { content: ""; position: absolute; inset: 100% 0 -6px; }
#model-note { margin: 16px 0 28px; color: #acb5b0; font-size: 12px; }
#model-note summary { cursor: pointer; width: fit-content; }
#model-note p { max-width: 76ch; }
.rent-feedback { margin: 8px 0 0; color: #c0c9c0; font-size: 12px; line-height: 1.4; }
footer {
  border-top: 1px solid #343a3e;
  color: #a2aaa8;
  font-size: 13px;
  padding: 22px 0 35px;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
}
input[type="search"] {
  background: #222a2a;
  color: white;
  border: 1px solid #535e59;
  padding: 10px;
}
@media (max-width: 900px) {
  .nav { grid-template-columns: minmax(0, 1fr) auto; row-gap: 15px; }
  .tariff { grid-row: 2; grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
  .tariff span { padding: 0 20px; }
  #wallet-control { grid-row: 1; grid-column: 2; }
}
@media (max-width: 1040px) {
  #cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .wrap { width: calc(100% - 32px); }
  #cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tariff span { padding: 0 12px; }
}
@media (max-width: 600px) {
  .nav { gap: 4px 8px; }
  .brand-block { display: contents; }
  .wordmark { grid-row: 1; grid-column: 1; }
  .tagline { grid-row: 2; grid-column: 1 / -1; margin: 0; }
  .tariff { grid-row: 3; grid-template-columns: auto auto 1fr; margin-top: 8px; }
  .tariff span { padding: 0 7px; }
  .tariff strong { font-size: 21px; }
  .tariff small { font-size: 10px; letter-spacing: .04em; }
  .cataloghead { align-items: flex-start; flex-direction: column; gap: 8px; margin-top: 18px; }
  #filters { gap: 1px; }
  #filters button { padding: 6px 9px; }
}
@media (max-width: 380px) {
  .brand { font-size: 18px; gap: 6px; }
  #connect { font-size: 13px; padding: 9px 10px; }
  .tariff span { padding-inline: 4px; }
  .tariff small { font-size: 9px; letter-spacing: 0; }
  .tariff strong { font-size: 18px; }
  .tariff em { font-size: 12px; }
}
@media (max-width: 510px) {
  #cards { grid-template-columns: 1fr; gap: 10px; }
}

[hidden] { display: none !important; }
#risk-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 4px 6px 4px 14px;
  border: 1px solid #ba5459;
  border-left: 4px solid #ff757a;
  border-radius: 6px;
  background: #3b1c21;
}
#risk-warning p { margin: 6px 0; color: #ffbabe; font-size: 14px; }
#risk-warning strong { color: #ffe1e3; }
#dismiss-risk-warning {
  flex: 0 0 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  color: #ffbabe;
  font: 24px/1 Arial, sans-serif;
}
#dismiss-risk-warning:hover, #dismiss-risk-warning:focus-visible { background: #572a31; color: #fff; }
#dismiss-risk-warning:focus-visible { outline: 2px solid #ffbabe; outline-offset: -2px; }
.view-tabs { display: flex; gap: 24px; border-bottom: 1px solid #343a3e; margin-top: 6px; }
.view-tabs a { color: #aab3af; text-decoration: none; font-size: 14px; font-weight: 600; padding: 12px 2px 10px; border-bottom: 2px solid transparent; }
.view-tabs a[aria-selected="true"] { color: #d5e8b6; border-color: #bfdf93; }
.view-tabs a:hover { color: #ecf2e6; }
.dashboard-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 24px 0 10px; }
.dashboard-heading h2 { margin: 0; }
#rental-status, #checkout-notice, #wallet-notice { font-size: 14px; }
#rental-status:empty { display: none; }
#checkout-notice { color: #d2e9a7; }
.detail-toggle, #history-pages button { background: transparent; color: #ccdfb6; font-size: 13px; padding: 5px 0; }
.detail-toggle:hover, #history-pages button:hover:enabled { text-decoration: underline; }
.table-wrap { overflow-x: auto; border: 1px solid #373e40; border-radius: 9px; }
.table-wrap table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 14px; line-height: 1.4; }
.table-wrap thead { background: #202628; color: #b9c4bf; font-size: 12px; }
.table-wrap td, .table-wrap th { text-align: left; padding: 12px 15px; vertical-align: top; }
.table-wrap .amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rental-return > * { display: block; }
.rental-return > small, .rental-return > time { color: #a9b3ad; font-size: 11px; }
.rental-return > small { margin-top: 3px; }
.rental-row { background: #181c1e; }
.rental-row:not(:first-child), .details-row { border-top: 1px solid #323a3b; }
.strategy-cell { min-width: 138px; }
.detail-toggle { display: block; font-weight: 500; font-size: 12px; }
.detail-toggle::after { content: " ▾"; }
.detail-toggle[aria-expanded="true"]::after { content: " ▴"; }
.rental-state { font-weight: 600; }
.rental-state.pending { color: #e2d5a2; }
.rental-state.settled { color: #c6e3aa; }
.rental-state.declined { color: #f0b6ac; }
.fail-reason { display: block; margin-top: 4px; max-width: 32ch; color: #b9c1bf; font-size: 12px; }
.rental-row time { color: #c3ccc7; }
.receipt-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 32px; font-size: 13px; }
.detail-summary { grid-column: 1 / -1; margin: 0 0 4px; color: #d4dcd6; }
.receipt-facts { margin: 0; display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 4px 12px; align-content: start; }
.receipt-facts dt, .receipt-events time { color: #a9b3ad; }
.receipt-facts dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.receipt-events { margin: 0; padding-left: 22px; }
.receipt-events li { padding-bottom: 3px; }
.receipt-events time, .receipt-events a { margin-left: 8px; font-size: 12px; }
.receipt-events a { color: #c8dea9; }
#history-pages { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin: 12px 0; font-size: 13px; }
@media (max-width: 700px) {
  .table-wrap td, .table-wrap th { padding: 10px; }
  .receipt-detail { grid-template-columns: 1fr; max-width: calc(100vw - 64px); }
  .fail-reason { max-width: 21ch; }
}

.payout-timing { display: block; color: #bac4bd; font: 400 12px/1.45 Inter, Arial, sans-serif; max-width: 35ch; margin-top: 4px; }

#admin-panel { max-width: 860px; padding: 18px 0 36px; }
#admin-panel details { margin: 14px 0; }
#admin-panel pre { overflow: auto; max-height: 320px; white-space: pre-wrap; overflow-wrap: anywhere; }
#admin-settings { padding: 18px; background: #202628; border: 1px solid #373e40; border-radius: 8px; }
#admin-settings h3 { margin-top: 0; }
#admin-settings label { display: inline-flex; align-items: center; gap: 8px; margin: 0 16px 8px 0; }
#admin-panel select, #admin-panel input { font: inherit; color: #e3e9df; background: #171c1d; border: 1px solid #59645e; border-radius: 4px; padding: 6px; }
#admin-changes, #admin-current { overflow-wrap: anywhere; }
