/* The shell: a navigation bar above and a rail below, on every app page. Loaded last.
   The bar holds the brand, a hairline, the destinations in the interface face with a mint
   underline on the current one, and the wallet. The rail holds the connection (network and gateway state), the
   live BTC/USD price, the UTC and local clocks and the Recent activity dock. The landing
   page keeps only the brand and Launch app. */

:root { --status-h: 32px; --shell-h: 56px; }
@media (max-width: 840px) { :root { --status-h: 40px; } }

/* ---------- Context bar ---------- */
.aera-sticky-header { background: var(--ground-fill); }
.aera-sticky-header .site-header {
  position: relative; top: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: nowrap;
  min-height: var(--shell-h); padding: 0 var(--pane-x); border-bottom: 1px solid var(--terminal-rule); background: var(--ground-fill);
}
.site-header .header-left { display: flex; align-items: stretch; align-self: stretch; gap: clamp(20px, 2.6vw, 44px); min-width: 0; min-height: 0; flex: 1 1 auto; position: relative; }
.site-header .logo-area { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; padding: 0; width: auto; }
.site-header .wallet-area { position: relative; display: flex; align-items: center; gap: 16px; flex: 0 0 auto; margin-left: auto; width: auto; }

/* Brand: the Board mark and the signage wordmark. */
.aera-brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--text); text-decoration: none; border-radius: 4px; }
.aera-brand:hover { color: var(--text); text-decoration: none; }
.aera-brand:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.aera-brand-mark { width: 28px; height: 28px; flex: 0 0 28px; color: var(--control-foreground, var(--text)); }
.aera-wordmark { font-family: var(--font-display); font-stretch: 100%; font-weight: 720; font-size: 1.25rem; line-height: 1; letter-spacing: -.03em; white-space: nowrap; }
.aera-wordmark span { margin-left: .3em; font-weight: 500; color: var(--text-muted); }
.lb-footer-brand .aera-wordmark { font-size: 1.125rem; }

/* Destinations: plain interface type after a hairline beside the brand. The current destination is in full
   text with a 2px mint underline on the bar's bottom rule, the same mark the local tabs use; hover brightens
   the label and shows the underline in a quiet rule colour. */
.site-header .header-menu { position: relative; display: flex; align-items: stretch; align-self: stretch; min-height: 0; gap: 4px; margin: 0; padding: 0 0 0 clamp(16px, 2vw, 28px); }
.site-header .header-menu::before { content: ''; position: absolute; left: 0; top: 50%; width: 1px; height: 20px; margin-top: -10px; background: var(--rule-strong); }
.site-header .header-menu-link {
  position: relative; display: flex; align-items: center; height: auto; min-height: var(--shell-h); padding: 0 12px; border: 0; border-radius: 0;
  background: transparent; color: var(--text-soft); font: 500 .875rem/1 var(--font-sans); letter-spacing: 0;
  text-decoration: none; white-space: nowrap; transition: color 160ms ease-out;
}
.site-header .header-menu-link::before { content: none; }
.site-header .header-menu-link::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; top: auto; width: auto; height: 2px; margin: 0; border: 0; border-radius: 2px 2px 0 0;
  transform: none; visibility: visible; background: transparent; transition: background-color 160ms ease-out;
}
.site-header .header-menu-link:is(:hover, :focus-visible) { background: transparent; color: var(--text); text-decoration: none; outline: none; }
.site-header .header-menu-link:hover::after { background: var(--rule-bright); }
.site-header .header-menu-link.is-active { background: transparent; color: var(--text); }
.site-header .header-menu-link.is-active::after { background: var(--positive); }
.site-header .header-menu-link:focus-visible { outline: 2px solid var(--focus); outline-offset: -8px; border-radius: 6px; }
.header-menu-icon { display: none !important; }
.site-header .header-menu-toggle { display: none; }

/* Wallet control: one outlined cluster. Disconnected, a Connect button with the Rootstock mark.
   Connected, the account address (opens the account menu), then one-click Copy and Explorer. */
.wallet-control { display: inline-flex; align-items: stretch; min-height: 36px; border: 1px solid var(--rule-strong); border-radius: 4px; background: transparent; transition: border-color 160ms ease-out; }
.wallet-control:hover, .wallet-control:focus-within { border-color: var(--rule-bright); }
.site-header #connect-wallet-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 14px 0 12px;
  border: 0; border-radius: 3px 0 0 3px; background: transparent; color: var(--text); font: 500 .8125rem/1.2 var(--font-sans); white-space: nowrap;
  transition: background-color 160ms ease-out;
}
.site-header #connect-wallet-btn:not(.is-connected) { border-radius: 3px; }
.site-header #connect-wallet-btn:hover:not(:disabled) { background: var(--terminal-control); color: var(--text); }
.site-header #connect-wallet-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; box-shadow: none; }
.wallet-quick { position: relative; display: grid; place-items: center; width: 36px; min-height: 34px; padding: 0; border: 0; border-left: 1px solid var(--rule-strong); border-radius: 0; background: transparent; color: var(--text-soft); cursor: pointer; text-decoration: none; transition: background-color 160ms ease-out, color 160ms ease-out; }
.wallet-quick:last-child { border-radius: 0 3px 3px 0; }
.wallet-quick[hidden] { display: none; }
.wallet-quick:hover { background: var(--terminal-control); color: var(--text); }
.wallet-quick:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.wallet-quick svg { width: 16px; height: 16px; }
.wallet-quick-done { display: none; color: var(--positive); }
.wallet-quick[data-copied="true"] { color: var(--positive); }
.wallet-quick[data-copied="true"] .wallet-quick-icon { display: none; }
.wallet-quick[data-copied="true"] .wallet-quick-done { display: block; animation: wallet-copied 240ms cubic-bezier(.16, 1, .3, 1); }
@keyframes wallet-copied { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.site-header .connect-wallet-btn__content { display: inline-flex; align-items: center; gap: 8px; }
.site-header #connect-wallet-btn .connect-wallet-btn__logo-wrap { display: block; width: 16px; height: 18px; border-radius: 0; background: currentColor; box-shadow: none; flex: 0 0 auto; mask: url("/assets/fa8f72d73ef2796e7da4edf623f80c7c1a9d8a5a989a81200bf61cada955d539/rsk-logo-colour.svg") center / contain no-repeat; -webkit-mask: url("/assets/fa8f72d73ef2796e7da4edf623f80c7c1a9d8a5a989a81200bf61cada955d539/rsk-logo-colour.svg") center / contain no-repeat; }
.site-header .connect-wallet-btn__logo { display: none; }
/* The mark is a mask over its wrapper, so the wrapper must stay currentColor in every state (main.css tints it on hover). */
.site-header #connect-wallet-btn:not(.is-connected):is(:hover, :focus-visible, :active):not(:disabled) .connect-wallet-btn__logo-wrap { background: currentColor; box-shadow: none; }
.site-header #connect-wallet-btn.is-connected .connect-wallet-btn__logo-wrap { width: 6px; height: 6px; mask: none; -webkit-mask: none; border-radius: 50%; background: var(--positive); box-shadow: none; }
.site-header #connect-wallet-btn.is-connected .connect-wallet-btn__label { font-family: var(--fontfam-term); font-size: .75rem; font-weight: 500; font-variant-numeric: tabular-nums slashed-zero; }
/* An RNS name replaces the short address: set in the interface face, truncated before it crowds the header. */
.site-header #connect-wallet-btn.is-connected.has-name .connect-wallet-btn__label { display: block; max-width: 20ch; overflow: hidden; text-overflow: ellipsis; font-family: "Geist", sans-serif; font-size: .8125rem; font-variant-numeric: normal; }
.site-header #connect-wallet-btn[aria-expanded="true"] { background: var(--terminal-control); }

/* The account menu: the full address, copy, explorer and disconnect, under the wallet control. */
.wallet-account-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; width: 300px; max-width: calc(100vw - 24px); box-sizing: border-box; padding: 14px 16px 16px; border: 1px solid var(--rule-strong); border-radius: 6px; background: var(--terminal-control); color: var(--text-soft); box-shadow: 0 24px 64px rgb(0 0 0 / .6); }
.wallet-account-menu[hidden] { display: none; }
.wallet-account-label { display: block; margin: 0 0 8px; font: var(--colhead); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.wallet-account-name { display: block; margin: 0 0 4px; color: var(--text); font-size: .9375rem; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.wallet-account-name[hidden] { display: none; }
.wallet-account-name:not([hidden]) + .wallet-account-address { color: var(--text-soft); }
.wallet-account-address { display: block; margin: 0 0 14px; color: var(--text); font: .8125rem/1.5 var(--fontfam-term); font-variant-numeric: tabular-nums slashed-zero; overflow-wrap: anywhere; user-select: all; }
.wallet-account-actions { display: grid; gap: 8px; }
.wallet-account-actions .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; margin: 0; padding: 0 12px; border: 1px solid var(--rule-strong); border-radius: 4px; background: transparent; color: var(--text); font-size: .8125rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.wallet-account-actions .btn:hover { background: var(--terminal-raised); border-color: var(--rule-bright); color: var(--text); text-decoration: none; }
.wallet-account-actions .btn:focus-visible { outline: none; border-color: var(--focus); box-shadow: none; }
.wallet-account-actions .wallet-account-disconnect { grid-column: 1 / -1; color: var(--danger-soft); }
.wallet-account-actions .wallet-account-disconnect:hover { color: var(--danger-soft); border-color: rgb(var(--danger-soft-rgb, 255 135 149) / .5); }

/* Middle widths keep every destination on one line. */
@media (min-width: 841px) and (max-width: 1199px) {
  .aera-sticky-header .site-header { gap: 12px; }
  .site-header .header-left { gap: 16px; }
  .site-header .header-menu { gap: 0; padding-left: 14px; }
  .site-header .header-menu-link { padding-inline: 10px; font-size: .8125rem; }
  .site-header .header-menu-link::after { left: 10px; right: 10px; }
  .aera-wordmark span { display: none; }
  .site-header .wallet-area { gap: 12px; }
}

/* ---------- Mobile: the disclosure tier ---------- */
@media (max-width: 840px) {
  .aera-sticky-header .site-header { min-height: 56px; padding: 0 12px; gap: 8px; }
  .site-header .header-left { flex: 1 1 auto; gap: 8px; }
  .site-header .wallet-area { gap: 8px; }
  .wallet-control { min-height: 40px; }
  .site-header #connect-wallet-btn { min-height: 38px; padding: 0 10px; }
  .site-header #connect-wallet-btn.is-connected.has-name .connect-wallet-btn__label { max-width: 13ch; }
  .wallet-quick { min-height: 38px; width: 38px; }
  .site-header .header-menu-toggle { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid transparent; border-radius: 4px; color: var(--text); background: transparent; font: inherit; cursor: pointer; transition: background-color 160ms ease-out, border-color 160ms ease-out; }
  .site-header .header-menu-toggle::before { content: none; }
  .site-header .header-menu-toggle:hover { background: var(--terminal-control); color: var(--text); }
  .site-header .header-menu-toggle:focus-visible { outline: none; border-color: var(--focus); background: transparent; color: var(--text); }
  .site-header.menu-open .header-menu-toggle { background: var(--terminal-control); border-color: var(--rule-strong); color: var(--text); }
  .header-menu-toggle-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .header-menu-toggle-icon { position: relative; display: block; width: 20px; height: 16px; }
  .header-menu-toggle-icon::before, .header-menu-toggle-icon::after { content: ''; position: absolute; left: 0; width: 20px; height: 1.5px; border-radius: 1px; background: currentColor; transition: transform 160ms ease-out; }
  .header-menu-toggle-icon::before { top: 4px; }
  .header-menu-toggle-icon::after { bottom: 4px; }
  .menu-open .header-menu-toggle-icon::before { transform: translateY(3.25px) rotate(45deg); }
  .menu-open .header-menu-toggle-icon::after { transform: translateY(-3.25px) rotate(-45deg); }
  .aera-sticky-header > .header-menu {
    display: none; flex-direction: column; align-items: stretch; position: static; width: 100%; min-width: 0; min-height: 0; max-height: max(80px, calc(100dvh - 200px));
    margin: 0; padding: 0; gap: 0; border: 0; border-bottom: 1px solid var(--terminal-rule); border-radius: 0; background: var(--ground-fill); box-shadow: none;
    overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--rule-strong) var(--ground);
  }
  .aera-sticky-header[data-menu-open="true"] { max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }
  .aera-sticky-header[data-menu-open="true"] > .header-menu { display: flex; animation: main-nav-reveal 160ms ease-out; }
  .aera-sticky-header > .header-menu .header-menu-link {
    position: relative; display: flex; align-items: center; flex: 0 0 auto; min-height: 56px; height: auto; padding: 0 56px 0 var(--pane-x); border: 0; border-top: 1px solid var(--terminal-rule); border-radius: 0;
    background: transparent; color: var(--text-soft); font: 500 1rem/1.2 var(--font-sans); letter-spacing: 0; text-decoration: none;
  }
  .aera-sticky-header > .header-menu .header-menu-link:first-child { border-top: 0; }
  /* The current destination is in full text with a mint dot at the row's end. */
  .aera-sticky-header > .header-menu .header-menu-link::before { content: none; }
  .aera-sticky-header > .header-menu .header-menu-link::after {
    content: ''; position: absolute; left: auto; right: var(--pane-x); top: 50%; bottom: auto; width: 6px; height: 6px; margin-top: -3px; border: 0; border-radius: 50%;
    transform: none; visibility: visible; background: transparent;
  }
  .aera-sticky-header > .header-menu .header-menu-link:is(:hover, :focus-visible) { background: var(--terminal-control); color: var(--text); }
  .aera-sticky-header > .header-menu .header-menu-link.is-active { background: transparent; color: var(--text); }
  .aera-sticky-header > .header-menu .header-menu-link.is-active::after { background: var(--positive); }
  .aera-sticky-header > .header-menu .header-menu-link:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 0; }
}
@media (min-width: 480px) and (max-width: 840px) and (max-height: 480px) {
  .aera-sticky-header[data-menu-open="true"] > .header-menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aera-sticky-header > .header-menu .header-menu-link { min-height: 52px; }
  .aera-sticky-header > .header-menu .header-menu-link:nth-child(2) { border-top: 0; }
  .aera-sticky-header > .header-menu .header-menu-link:nth-child(odd) { border-right: 1px solid var(--terminal-rule); }
}
@media (max-width: 420px) { body:not(.is-home) .aera-wordmark span { display: none; } }
@media (max-width: 360px) { body:not(.is-home) .aera-wordmark { display: none; } }
@keyframes main-nav-reveal { from { clip-path: inset(0 0 10% 0); transform: translateY(-4px); } to { clip-path: inset(0); transform: translateY(0); } }

/* ---------- The notice tier ---------- */
/* Governance and grant notices sit under the bar as quiet ruled bands: a mint icon, the message and an outlined
   action, so each page's own primary action stays the only filled one in view. */
.aera-sticky-header .aera-governance-notice { --governance-attention: transparent; --governance-ink: var(--text); --governance-rule: var(--terminal-rule); min-height: 44px; background: var(--ground-fill); border-bottom: 1px solid var(--terminal-rule); color: var(--text); }
.aera-governance-notice p, .aera-grant-notice p { color: var(--text-soft); font-weight: 400; }
.aera-governance-notice[data-stale="true"] p { text-decoration: underline dotted var(--network-label); text-decoration-thickness: 1px; text-underline-offset: 4px; }
#aera-governance-open { min-height: 32px; padding-inline: 12px; border: 1px solid var(--rule-strong); border-radius: 4px; background: transparent; color: var(--text); font-weight: 500; }
#aera-governance-open:is(:hover, :focus-visible):not(:disabled) { background: var(--terminal-control); border-color: var(--rule-bright); color: var(--text); }
#aera-governance-open:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.aera-grant-notice { min-height: 44px; }
#aera-grant-open { min-height: 32px; padding-inline: 12px; }

/* ---------- The rail ---------- */
.aera-statusbar {
  position: fixed; z-index: 34; left: 0; right: 0; bottom: 0; height: var(--status-h); box-sizing: border-box;
  display: flex; align-items: stretch; padding-right: 400px; margin: 0;
  border-top: 1px solid var(--terminal-rule); background: var(--ground-fill); color: var(--text-muted); font: .75rem/1 var(--font-sans);
}
.aera-statusbar > * { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 14px; border-right: 1px solid var(--terminal-rule); white-space: nowrap; }
.aera-statusbar > [hidden] { display: none; }
.aera-statusbar strong { color: var(--text); font-weight: 500; font-family: var(--fontfam-term); font-variant-numeric: tabular-nums slashed-zero; }

/* The connection cell: the network tag, then the link and its state. Two lamps joined by a hairline:
   this browser on the left, Aera's gateway on the right. Connected, both lamps are lit and the link is
   solid; connecting, the far lamp is dark and the link dashed; offline, the link is cut. Healthy stays
   quiet; an interruption tints the whole cell and lights its top edge so it reads from the corner of the eye. */
.aera-statusbar .gateway-status {
  --gw: var(--text-muted); --gw-near: var(--text-soft); --gw-far: transparent; --gw-text: var(--text-muted); --gw-wash: transparent;
  position: relative; flex: none; padding: 0;
}
.gateway-status[data-state=connected] { --gw: var(--positive); --gw-near: var(--positive); --gw-far: var(--positive); --gw-text: var(--text-soft); }
.gateway-status[data-state=reconnecting] { --gw: var(--network-label); --gw-near: var(--network-label); --gw-text: var(--network-label); --gw-wash: rgb(245 176 86 / .08); }
.gateway-status[data-state=offline] { --gw: var(--danger); --gw-near: var(--danger); --gw-text: var(--danger); --gw-wash: rgb(255 90 110 / .09); }
.gateway-status > summary {
  position: relative; display: flex; align-items: center; gap: 10px; height: 100%; min-height: var(--status-h); width: auto; padding: 0 14px; box-sizing: border-box;
  border-radius: 0; list-style: none; cursor: pointer; background: var(--gw-wash); color: var(--gw-text); font-size: .75rem; line-height: 1;
  transition: background-color 200ms ease-out, color 200ms ease-out;
}
.gateway-status > summary::-webkit-details-marker { display: none; }
.gateway-status > summary::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--gw); opacity: 0; transition: opacity 200ms ease-out; }
.gateway-status:is([data-state=reconnecting], [data-state=offline]) > summary::before { opacity: 1; }
.gateway-status > summary:hover, .gateway-status[open] > summary { background: var(--terminal-control); }
.gateway-status > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.gateway-network { padding: 3px 5px 2px; border: 1px solid rgb(245 176 86 / .45); border-radius: 3px; background: rgb(245 176 86 / .06); color: var(--network-label); font: 500 .6875rem/1 var(--fontfam-term); letter-spacing: 0; }
.gateway-network[hidden] { display: none; }
.gateway-link { width: 24px; height: 10px; flex: none; overflow: visible; }
.gateway-lamp { stroke-width: 1.2; transition: fill 200ms ease-out, stroke 200ms ease-out; }
.gateway-lamp-near { fill: var(--gw-near); stroke: var(--gw-near); }
.gateway-lamp-far { fill: var(--gw-far); stroke: var(--gw); }
.gateway-link-line, .gateway-link-break { fill: none; stroke: var(--gw); stroke-width: 1.5; stroke-linecap: round; transition: stroke 200ms ease-out, opacity 200ms ease-out; }
.gateway-link-line { stroke-dasharray: 1.5 2.5; }
.gateway-link-break { opacity: 0; }
.gateway-status[data-state=offline] .gateway-link-line { opacity: 0; }
.gateway-status[data-state=offline] .gateway-link-break { opacity: 1; }
/* The signature moment: when the link comes up, the line draws toward the gateway and then its lamp lights. */
.gateway-status[data-state=connected] .gateway-link-line { stroke-dasharray: 9 0; animation: gateway-link-draw 280ms cubic-bezier(.16, 1, .3, 1) both; }
.gateway-status[data-state=connected] .gateway-lamp-far { transition-delay: 180ms; }
@keyframes gateway-link-draw { from { stroke-dasharray: 0 9; } to { stroke-dasharray: 9 0; } }
/* Every state word shares one box, so the rail never shifts when the state changes. */
.gateway-label { display: inline-grid; }
.gateway-label > span { grid-area: 1 / 1; visibility: hidden; }
.gateway-status:is([data-state=connecting], :not([data-state])) [data-label=connecting],
.gateway-status[data-state=connected] [data-label=connected],
.gateway-status[data-state=reconnecting] [data-label=reconnecting],
.gateway-status[data-state=offline] [data-label=offline] { visibility: visible; }
.gateway-popover { position: absolute; bottom: calc(100% + 8px); top: auto; left: 0; right: auto; z-index: 40; width: 288px; max-width: calc(100vw - 24px); box-sizing: border-box; padding: 16px; border: 1px solid var(--rule-strong); border-radius: 6px; background: var(--terminal-control); color: var(--text-soft); box-shadow: 0 24px 64px rgb(0 0 0 / .6); }
.gateway-popover h2 { margin: 0 0 8px; color: var(--text); font-size: .875rem; font-weight: 500; line-height: 1.5; }
.gateway-popover p { margin: 0; font-size: .8125rem; line-height: 1.5; }
.gateway-facts { display: grid; gap: 8px; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--rule); font-size: .75rem; line-height: 1.4; }
.gateway-facts > div { display: flex; justify-content: space-between; gap: 16px; }
.gateway-facts > div[hidden] { display: none; }
.gateway-facts dt { color: var(--text-muted); }
.gateway-facts dd { margin: 0; color: var(--text); text-align: right; }
.gateway-status[data-state=reconnecting] .gateway-state-name { color: var(--network-label); }
.gateway-status[data-state=offline] .gateway-state-name { color: var(--danger); }
.gateway-announcement { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* BTC/USD from the Razor feed. A reconnecting feed keeps the last price, dimmed, with an amber Stale. */
.aera-status-price strong { transition: color 200ms ease-out; }
.aera-status-price:is([data-state=waiting], [data-state=unavailable]) strong { color: var(--rule-bright); }
.aera-status-price[data-state=stale] strong { color: var(--text-muted); }
.aera-status-price-note { color: var(--network-label); font: 500 .6875rem/1 var(--fontfam-term); }
.aera-status-price-note[hidden] { display: none; }

/* Clocks at the right: UTC, then the viewer's zone, split by a hairline. */
.aera-status-clock { gap: 7px; }
.aera-status-zone { color: var(--text-muted); }
.aera-status-utc { margin-left: auto; border-left: 1px solid var(--terminal-rule); }
.aera-status-utc:has(+ .aera-status-local[hidden]), .aera-status-local { border-right: 0; }
@media (max-width: 1023px) { .aera-status-clock { display: none; } }

/* The Recent activity console docks into the rail's right end at every width. */
#activity-console, #activity-console.is-open {
  left: auto; right: 0; bottom: 0; width: 400px; box-sizing: border-box; padding: 0; border-radius: 0; box-shadow: none;
  background: var(--ground-fill); border-left: 1px solid var(--terminal-rule); border-top: 1px solid var(--terminal-rule);
}
#activity-console.is-open { width: min(560px, 100vw); box-shadow: 0 -24px 64px rgb(0 0 0 / .55); }
#activity-console .activity-console-toggle, #activity-console.is-open .activity-console-toggle { min-height: calc(var(--status-h) - 1px); padding: 0 14px; gap: 10px; border-radius: 0; font-size: .75rem; }
#activity-console .activity-console-icon { width: 16px; height: 16px; }
#activity-console .activity-console-toggle:hover { background: var(--terminal-control); }
#activity-console.is-open .activity-console-toggle { border-top: 1px solid var(--terminal-rule); }
@media (max-width: 840px) {
  .aera-statusbar { padding-right: 184px; font-size: .75rem; }
  .aera-statusbar > * { padding: 0 12px; gap: 7px; }
  .gateway-status > summary { padding: 0 12px; gap: 8px; }
  .gateway-label { display: none; }
  .gateway-popover { position: fixed; left: 12px; right: auto; bottom: calc(var(--status-h) + 8px); width: min(280px, calc(100vw - 24px)); }
  #activity-console, #activity-console.is-open { width: auto; max-width: 184px; }
  #activity-console.is-open { width: 100vw; max-width: 100vw; left: 0; }
  #activity-console .activity-console-title { display: none; }
  #activity-console.is-open .activity-console-title { display: inline; }
  #activity-console .activity-console-toggle { padding: 0 12px; gap: 8px; }
  #activity-console .activity-console-summary { margin-left: 0; }
  #activity-console.is-open .activity-console-summary { margin-left: auto; }
  /* The compact dock is too narrow to read a notice in: notices span the phone above the rail instead. */
  #activity-console:not(.is-open) #activity-transactions {
    position: fixed; left: 0; right: 0; bottom: var(--status-h); max-height: min(260px, 40dvh); box-sizing: border-box;
    border: 0; border-top: 1px solid var(--terminal-rule); border-radius: 0; background: var(--ground-fill); box-shadow: 0 -16px 48px rgb(0 0 0 / .5);
  }
}
@media (max-width: 480px) {
  .aera-statusbar { padding-right: 168px; }
  .aera-statusbar > * { padding: 0 10px; gap: 6px; }
  .aera-status-price-label { display: none; }
  #activity-console, #activity-console.is-open { max-width: 168px; }
  #activity-console.is-open { width: 100vw; max-width: 100vw; }
  #activity-console .activity-console-toggle { padding: 0 10px; gap: 6px; }
}
@media (max-width: 360px) {
  .aera-statusbar { padding-right: 150px; }
  .aera-statusbar > *, .gateway-status > summary { padding: 0 8px; }
  .aera-status-price strong { font-size: .6875rem; }
  .aera-status-cents { display: none; }
  #activity-console, #activity-console.is-open { max-width: 150px; }
  #activity-console.is-open { width: 100vw; max-width: 100vw; }
}

/* ---------- Landing shell ---------- */
body.is-home :is(.aera-statusbar, .wallet-account-menu, .wallet-control) { display: none !important; }
body.is-home .aera-sticky-header .site-header { border-bottom-color: transparent; }

@media (prefers-reduced-motion: reduce) {
  .site-header .header-menu-link, .site-header .header-menu-link::before, .site-header .header-menu-link::after, .aera-sticky-header > .header-menu .header-menu-link::before,
  .gateway-status > summary, .gateway-status > summary::before, .gateway-lamp, .gateway-link-line, .gateway-link-break, .aera-status-price strong, .site-header #connect-wallet-btn, .wallet-control, .wallet-quick, .site-header .header-menu-toggle, .header-menu-toggle-icon::before, .header-menu-toggle-icon::after { transition: none; }
  .wallet-quick[data-copied="true"] .wallet-quick-done { animation: none; }
  .aera-sticky-header[data-menu-open="true"] > .header-menu { animation: none; }
  .gateway-status[data-state=connected] .gateway-link-line { animation: none; }
  .gateway-status[data-state=connected] .gateway-lamp-far { transition-delay: 0s; }
}
