* { box-sizing: border-box; }
body { margin: 0; line-height: 1.65; }
a { color: var(--green); text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, .button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 19px; border: 1px solid var(--green); border-radius: 12px; background: var(--green); color: white; font-weight: 650; cursor: pointer; }
button:hover, .button:hover { filter: brightness(.94); }
.secondary { background: white; color: var(--green); }
button:disabled { opacity: .55; cursor: not-allowed; }
:focus-visible { outline: 3px solid #ba8438; outline-offset: 3px; }
main[tabindex="-1"]:focus { outline: none; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 32px; line-height: 1.3; }
h2 { font-size: 21px; }
p { margin-bottom: 14px; }
.muted, small { color: var(--muted); }
.skip { position: absolute; top: -80px; left: 12px; z-index: 20; padding: 12px; background: white; }
.skip:focus { top: 10px; }
.header { max-width: 1240px; margin: auto; padding: 23px 32px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font-size: 20px; font-weight: 800; white-space: nowrap; }
.brand svg { width: 36px; height: 38px; }
.brand small { display: block; color: var(--green); font-size: 10px; letter-spacing: 2px; }
.top-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; font-size: 13px; }
.top-nav a { color: var(--muted); }
.header-action { margin-left: auto; white-space: nowrap; font-size: 13px; }
.formal-header-actions { position: relative; display: grid; grid-template-columns: auto auto; align-items: center; gap: 12px; margin-left: auto; white-space: nowrap; }
.account-trigger { justify-content: space-between; gap: 16px; padding: 4px 14px 4px 5px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--ink); }
.account-trigger:hover { background: var(--mint); filter: none; }
.account-trigger > svg, .formal-workspace > svg { width: 16px; height: 16px; }
.account-trigger[aria-expanded="true"] > svg { transform: rotate(180deg); }
.account-avatar { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: white; font-weight: 750; }
.account-avatar svg { width: 18px; height: 18px; }
.formal-header-actions .formal-workspace { padding: 8px 18px; border-radius: 999px; color: white; }
.account-panel { position: absolute; grid-area: 1 / 1 / 2 / 2; z-index: 6; top: calc(100% + 14px); right: 0; width: min(336px, calc(100vw - 40px)); max-height: calc(100dvh - 98px); overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 10px 24px rgb(18 38 34 / 14%); }
.account-profile { display: flex; align-items: center; gap: 15px; padding: 14px 10px 18px; border-bottom: 1px solid var(--line); }
.account-profile .account-avatar { width: 46px; height: 46px; font-size: 19px; }
.account-profile .account-avatar svg { width: 23px; height: 23px; }
.account-profile-details { min-width: 0; }
.account-label { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 17px; }
.account-options { padding: 8px 0 0; }
.account-option { display: flex; align-items: center; justify-content: flex-start; gap: 14px; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 10px; background: white; color: var(--ink); font-size: 16px; font-weight: 600; }
.account-option svg { width: 21px; height: 21px; color: var(--muted); }
.account-option:hover { background: var(--mint); filter: none; }
.account-option:focus-visible { outline-offset: -3px; }
.account-divider { border-top: 1px solid var(--line); margin: 7px 0; }
.account-feedback { margin: 6px 12px; white-space: normal; color: var(--muted); font-size: 13px; }
.account-feedback:empty { margin: 0; }
a[aria-current="page"] { color: var(--green); font-weight: 750; }
.frame { max-width: 1240px; margin: auto; padding: 22px 32px 48px; min-height: 58vh; }
.workspace { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 32px; }
main { min-width: 0; overflow-wrap: anywhere; }
.sidebar a { display: block; min-height: 44px; padding: 12px 14px; margin: 4px 0; border-radius: 11px; font-size: 13px; color: var(--muted); }
.sidebar a[aria-current="page"] { background: #deece2; color: var(--green); }
.sidebar .label { font-size: 12px; padding: 14px; color: var(--muted); }
.card { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 24px; min-width: 0; }
.card.mint { background: var(--mint); }
.card.sand { background: var(--sand); }
.card p { color: var(--muted); font-size: 14px; }
.grid { display: grid; gap: 16px; }
.cols2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack > * + * { margin-top: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.state { padding: 30px 24px; }
.state[data-state="empty"] { text-align: center; background: #f6f8f2; border-style: dashed; }
.state[data-state="error"], .state[data-state="forbidden"], .state[data-state="unauthenticated"] { border-color: #e5c8c0; }
.state[data-state="unavailable"] { background: var(--sand); }
.state .actions { justify-content: inherit; }
.amount { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.advanced { border-top: 1px solid var(--line); margin-top: 20px; color: var(--muted); font-size: 12px; }
summary { min-height: 44px; align-content: center; cursor: pointer; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.footer { max-width: 1176px; margin: auto; padding: 24px 0 30px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; font-size: 12px; color: var(--muted); }
.footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.identity-status { max-width: 1176px; margin: auto; }
.identity-status:not(:empty) { padding: 16px; }
.bottom-nav { display: none; }
[hidden] { display: none !important; }
@media (max-width: 1000px) {
  .header { gap: 16px; flex-wrap: wrap; }
  .top-nav { gap: 15px; order: 3; width: 100%; }
  .workspace { grid-template-columns: 170px minmax(0, 1fr); gap: 22px; }
  .footer { margin: 0 32px; }
}
@media (max-width: 767px) {
  body { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .header { padding: 18px 20px; gap: 10px; }
  .brand { font-size: 18px; }
  .brand svg { width: 30px; height: 33px; }
  .top-nav { flex-wrap: nowrap; min-width: 0; overflow-x: auto; gap: 20px; padding: 6px; }
  .top-nav a { display: flex; flex: 0 0 auto; align-items: center; min-height: 44px; white-space: nowrap; }
  .header-action { padding: 10px 12px; font-size: 12px; }
  .formal-header-actions { gap: 8px; }
  .formal-header-actions .formal-workspace { padding-inline: 12px; }
  .account-panel { grid-column: 1 / -1; max-height: calc(100dvh - 146px - env(safe-area-inset-bottom)); }
  .frame { padding: 10px 20px 32px; }
  .workspace { display: block; }
  .sidebar { display: none; }
  h1 { font-size: 27px; }
  .card { padding: 20px; border-radius: 15px; }
  .cols2 { grid-template-columns: 1fr; }
  .footer { margin: 0 20px; }
  .bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: #fffffff5; border-top: 1px solid var(--line); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); z-index: 5; }
  .bottom-nav a { min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 12px; }
  .bottom-nav svg { width: 20px; height: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
