:root {
  --terminal-panel: var(--ground);
  /* Panels share the ground colour, so they need the same raster guard; see --ground-fill in main.css. */
  --panel-fill: linear-gradient(transparent, transparent) var(--terminal-panel);
  --terminal-inset: #0c0a09;
  --terminal-rule: #201e1c;
  --terminal-control: #12100f;
  --terminal-raised: #1b1816;
  /* A selected row is the chosen cell's fill; its mint edge marker says "selected", the fill does not. */
  --terminal-selected: var(--terminal-raised);
  --navigation-on-selected: var(--text);
  --radius-panel: 4px;
  --rail-w: 84px;
  --status-h: 30px;
  color-scheme: dark;
}
/* Porcelain Mint's surfaces; the rest of the light theme is beside the dark tokens in main.css. */
:root[data-theme="light"] {
  --terminal-inset: #f6f6f6;
  --terminal-rule: #e3e3e3;
  --terminal-control: #f2f2f2;
  --terminal-raised: #e8e8e8;
}

::selection { background: var(--selection); color: var(--on-selection); }
/* Secondary oracle equivalents share one quiet voice in tables, forms and reviews. */
.aera-bitcoin-amount { display: inline-block; max-width: 100%; vertical-align: top; }
.aera-usd { display: inline-block; margin-inline-start: .5em; color: var(--text-muted); font: 400 .75rem/1.5 var(--fontfam-term); font-variant-numeric: tabular-nums; letter-spacing: normal; white-space: nowrap; }
.aera-usd--stacked { display: block; margin-inline-start: 0; }
.aera-usd[hidden] { display: none; }
.primary-btn .aera-usd { color: inherit; }
input, textarea { caret-color: var(--positive); }
a { text-underline-offset: 3px; }
/* Inline references share the landing description's quiet underline and mint hover. */
a.aera-prose-link { color: var(--text); text-decoration: underline 1px var(--rule-bright); text-underline-offset: 3px; transition: color 160ms ease-out, text-decoration-color 160ms ease-out; }
a.aera-prose-link:hover { color: var(--positive); text-decoration: underline 1px currentColor; }
a.aera-prose-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
button, input, select, textarea { font-family: inherit; }
:is(button, a, summary, input, select, textarea):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
/* Bordered controls use their own edge as the single focus indicator. */
:is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus-visible {
  border-color: var(--focus);
  outline: none;
  box-shadow: none;
}
.form-input-wrapper :is(input, select):focus-visible { outline: none; box-shadow: none; }
.panel { background: var(--panel-fill); border-radius: var(--radius-panel); }
.site-header { min-height: 54px; }
/* Shared secondary navigation for Series Notes and Aera DAO. */
.aera-page-nav { display: flex; flex-direction: column; align-self: stretch; min-width: 0; gap: 0; padding: 8px 0; border-right: 1px solid var(--terminal-rule); }
.aera-page-nav-link { appearance: none; position: relative; display: flex; align-items: center; width: 100%; min-height: 44px; padding: 12px; border: 0; border-radius: 0; background: transparent; color: var(--text-soft); font: inherit; font-size: .875rem; line-height: 1.35; text-align: left; white-space: nowrap; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.aera-page-nav-link:is(:hover, :focus-visible, [aria-pressed="true"], [aria-current="page"]) { background: var(--positive-fill); color: var(--navigation-on-selected); }
.aera-page-nav-link:is([aria-pressed="true"], [aria-current="page"])::after { content: ''; position: absolute; right: -1px; top: 10px; bottom: 10px; width: 2px; background: var(--on-positive); pointer-events: none; }
.aera-page-nav-link:focus-visible { outline: 2px solid var(--on-positive); outline-offset: -3px; }
@media (prefers-reduced-motion: reduce) { .aera-page-nav-link { transition: none; } }
.aera-grant-notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--terminal-rule); background: var(--panel-fill); }
.aera-grant-notice[hidden] { display: none; }
.aera-grant-notice p { margin: 0; color: var(--text); font-size: .8125rem; line-height: 1.5; overflow-wrap: anywhere; }
.aera-grant-notice button { flex-shrink: 0; }
@media (max-width: 440px) { .aera-grant-notice { padding-inline: 12px; flex-wrap: wrap; } }
@media (min-width: 761px) {
  .panel.sn-page, .panel.ad-root { grid-template-columns: 196px minmax(0, 1fr); }
  .aera-page-nav { gap: 4px; padding: 8px 12px 8px 0; }
  .aera-page-nav-link { min-height: 48px; gap: 12px; padding: 12px; border-radius: 6px; font-size: .8125rem; font-weight: 500; }
}
.aera-page-nav-link[data-sn-filter="active"] { --page-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%228%22%2F%3E%3Cpath%20d%3D%22M12%207v5l3%202%22%2F%3E%3C%2Fsvg%3E"); }
.aera-page-nav-link[data-sn-filter="matured"] { --page-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%228%22%2F%3E%3Cpath%20d%3D%22m8%2012%203%203%205-6%22%2F%3E%3C%2Fsvg%3E"); }
.aera-page-nav-link[data-sn-filter="mine"] { --page-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%228%22%20r%3D%223%22%2F%3E%3Cpath%20d%3D%22M5%2021v-2a7%207%200%200%201%2014%200v2%22%2F%3E%3C%2Fsvg%3E"); }
.aera-page-nav-link[data-sn-filter="all"] { --page-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%227%22%20y%3D%223%22%20width%3D%2213%22%20height%3D%2216%22%20rx%3D%222%22%2F%3E%3Cpath%20d%3D%22M4%207v12a2%202%200%200%200%202%202h10M11%208h5m-5%204h5%22%2F%3E%3C%2Fsvg%3E"); }
.aera-page-nav-link[data-sn-tab="liquidations"] { --page-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%207h15m-4-4%204%204-4%204M20%2017H5m4-4-4%204%204%204%22%2F%3E%3C%2Fsvg%3E"); }
.aera-page-nav-link[data-ad-tab="aera"] { --page-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m3%208%209-5%209%205H3Zm2%203v7m7-7v7m7-7v7M3%2021h18%22%2F%3E%3C%2Fsvg%3E"); }
.aera-page-nav-link[data-ad-tab="staking"] { --page-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cellipse%20cx%3D%2212%22%20cy%3D%226%22%20rx%3D%228%22%20ry%3D%223%22%2F%3E%3Cpath%20d%3D%22M4%206v6c0%201.7%203.6%203%208%203s8-1.3%208-3V6M4%2012v6c0%201.7%203.6%203%208%203s8-1.3%208-3v-6%22%2F%3E%3C%2Fsvg%3E"); }
.aera-page-nav-link[data-ad-tab="treasury"] { --page-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%224%22%20width%3D%2218%22%20height%3D%2216%22%20rx%3D%222%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%224%22%2F%3E%3Cpath%20d%3D%22M12%208v8m-4-4h8M6%204v16%22%2F%3E%3C%2Fsvg%3E"); }
.aera-page-nav-link[data-ad-tab="proposals"] { --page-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%225%22%20y%3D%223%22%20width%3D%2214%22%20height%3D%2218%22%20rx%3D%222%22%2F%3E%3Cpath%20d%3D%22M9%207h6M9%2011h6m-6%205%202%202%204-4%22%2F%3E%3C%2Fsvg%3E"); }
.aera-page-nav-link[data-ad-tab="admin"] { --page-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%206h5m4%200h7M4%2012h11m4%200h1M4%2018h1m4%200h11%22%2F%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%226%22%20r%3D%222%22%2F%3E%3Ccircle%20cx%3D%2217%22%20cy%3D%2212%22%20r%3D%222%22%2F%3E%3Ccircle%20cx%3D%227%22%20cy%3D%2218%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E"); }
.aera-page-nav-link[data-sn-tab="risk"] { --page-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19a9 9 0 1 1 16 0M12 12l4-4M5 12h1m12 0h1M12 5v1'/%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3C/svg%3E"); }
.aera-page-nav-link::before { content: ''; width: 18px; height: 18px; flex: 0 0 18px; background: currentColor; -webkit-mask: var(--page-nav-icon) center / contain no-repeat; mask: var(--page-nav-icon) center / contain no-repeat; }
.aera-page-nav-link::after { content: ''; visibility: hidden; width: 6px; height: 10px; flex: 0 0 6px; margin-left: auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.aera-page-nav-link:is([aria-pressed="true"], [aria-current="page"])::after { visibility: visible; position: static; width: 6px; height: 10px; background: transparent; }
@media (max-width: 760px) {
  .aera-page-nav { flex-direction: row; gap: 4px; border-right: 0; border-bottom: 1px solid var(--terminal-rule); padding: 0 0 8px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--rule-bright) var(--terminal-panel); }
  .aera-page-nav-link { flex: 1 0 auto; width: auto; min-width: 128px; min-height: 48px; justify-content: center; gap: 8px; padding: 12px; border-radius: 6px; font-size: .8125rem; font-weight: 500; text-align: center; }
  .aera-page-nav-link::after { margin-left: 2px; }
  .aera-page-nav::-webkit-scrollbar { height: 3px; }
  .aera-page-nav::-webkit-scrollbar-thumb { background: var(--rule-bright); border-radius: 3px; }
}
.btn, .btn.small-btn, .btn.ghost-btn {
  min-height: 36px; border-radius: 6px; padding: 8px 12px;
  border-color: var(--rule-strong); font-size: .8125rem; line-height: 1.25;
  transition: background-color 160ms ease-out, color 160ms ease-out, border-color 160ms ease-out;
}
.btn.ghost-btn { color: var(--text-soft); border-color: var(--terminal-rule); }
/* Navigation uses native links; give them the same box and alignment as buttons. */
a.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; vertical-align: middle; text-decoration: none; }
/* DAO board links share native control styling; figures keep their own scroll surface. */
a.btn.ad-row-link, a.btn.ad-row-figure-link { display: block; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; text-align: left; }
a.btn.ad-row-link { color: var(--text); font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
a.btn.ad-row-link::after { content: ''; position: absolute; inset: 0; }
a.btn.ad-row-link > span { display: block; margin-top: 4px; color: var(--text-muted); font-size: .8125rem; font-weight: 400; line-height: 1.45; }
a.btn.ad-row-figure-link { width: 100%; min-width: 100%; font: inherit; letter-spacing: inherit; }
a.btn:is(.ad-row-link, .ad-row-figure-link):is(:hover, :focus-visible) { background: transparent; color: inherit; text-decoration: none; outline: none; }
.btn.btn-lg { min-height: 44px; padding-inline: 18px; }
/* Landing actions are shared native controls in the app's sentence-case control type and 4px radius. */
.btn.lb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border: 1px solid var(--rule-bright); border-radius: 4px;
  background: transparent; color: var(--text); font: 600 .9375rem/1.2 var(--font-sans);
  letter-spacing: 0; text-transform: none; text-decoration: none;
}
.btn.lb-btn--primary { background: var(--positive-fill); border-color: var(--positive-fill); color: var(--on-positive); }
.btn.lb-btn--primary:hover:not(:disabled) { background: var(--positive-fill-hover); border-color: var(--positive-fill-hover); color: var(--on-positive); }
.btn.lb-btn--outline:hover:not(:disabled) { background: var(--terminal-control); border-color: var(--positive); }
.btn.lb-btn--large { min-height: 56px; padding: 16px 28px; }
.btn.lb-btn--text { justify-content: flex-start; min-width: 44px; min-height: 44px; padding: 10px 0; border-color: transparent; background: transparent; color: var(--positive); }
.btn.lb-btn--text:hover:not(:disabled) { color: var(--positive-soft); border-color: transparent; background: transparent; }
.btn.lb-footer-link { color: var(--text-soft); font-size: .8125rem; }
.btn.lb-book-market { min-height: 44px; padding: 8px 0; color: var(--text); font-size: .8125rem; letter-spacing: .03em; }
.btn.lb-btn:focus-visible:not(:disabled) { outline: 2px solid var(--focus); outline-offset: 4px; }
/* On Home the header's Launch app is outlined, so the hero's filled action is the only filled one in view; it fills on hover. */
body.is-home .btn.landing-launch { min-height: 44px; border-color: var(--rule-bright); border-radius: 4px; background: transparent; color: var(--text); font: 600 .875rem/1.25 var(--font-sans); letter-spacing: 0; text-transform: none; }
@media (max-width: 360px) { body.is-home .btn.landing-launch { padding-inline: 10px; gap: 6px; font-size: .8125rem; } }
.btn.lb-row-link { display: grid; justify-content: normal; text-align: left; min-height: inherit; padding: 0 var(--g); border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; }
.btn.lb-row-link:is(:hover, :focus-visible):not(:disabled) { background: var(--terminal-control); color: inherit; }
.btn.lb-row-link:focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; }
@media (max-width: 640px) { .btn.lb-row-link { padding-block: 20px; } }
.btn.primary-btn.btn-filled { background: var(--positive-fill); border-color: var(--positive-fill); color: var(--on-positive); }
.btn.primary-btn.btn-filled:hover:not(:disabled) { background: var(--positive-fill-hover); border-color: var(--positive-fill-hover); color: var(--on-positive); }
.btn.primary-btn.btn-filled:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.btn.primary-btn.btn-filled:disabled { background: var(--terminal-control); border-color: var(--rule-strong); color: var(--text-muted); }
.btn.primary-btn { border-color: var(--rule-bright); }
.btn:focus-visible:not(:disabled) { border-color: var(--focus); outline: none; box-shadow: none; }
.btn:disabled { opacity: .65; }
.btn.btn-stat { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 0; border: 0; border-radius: 2px; background: transparent; color: var(--text); text-align: left; font-weight: 400; }
.btn.btn-stat:is(:hover, :focus-visible):not(:disabled) { background: transparent; color: var(--text); }
.btn.btn-stat .btn-stat-value { text-decoration: underline; text-decoration-color: var(--terminal-rule); text-underline-offset: 3px; }
.btn.btn-stat:is(:hover, :focus-visible):not(:disabled) .btn-stat-value { text-decoration-color: currentColor; }
.btn.btn-stat:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.btn.btn-stat[aria-disabled="true"] { cursor: default; }
.btn.btn-stat[aria-disabled="true"] .btn-stat-value { text-decoration: none; }
.btn:is(:hover, :focus-visible):not(:disabled) { filter: none; }
/* Compact table actions share sizing and states for native buttons and links. */
/* Theme switch: one shared control, wired by theme.js through data-theme-toggle. It names the theme it leads to:
   a sun while the site is dark, a moon while it is light. The bar carries the icon button, joined to the language
   switch in one outlined cluster (.aera-preferences, shell.css); the phone menu carries the same switch as a
   labelled row. See docs/themes.md. */
.aera-theme-icon { display: block; width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.aera-theme-icon--dark, .aera-theme-name--dark { display: none; }
:root[data-theme="light"] :is(.aera-theme-icon--light, .aera-theme-name--light) { display: none; }
:root[data-theme="light"] .aera-theme-icon--dark { display: block; }
:root[data-theme="light"] .aera-theme-name--dark { display: inline; }
.btn.aera-theme-toggle { display: inline-grid; place-items: center; width: 36px; min-width: 36px; padding: 0; }
.header-menu-theme { display: none; }
/* Menus: one list under its button for every menu in the app (AeraUI.menu, docs/menus.md), in the browser's top layer
   and placed by the script. Each item has a mint check slot, an optional icon and its name; the current one reads in
   full text colour. The chart toolbar's choices and the language list use it. */
.aera-menu {
  position: fixed; inset: auto; box-sizing: border-box; min-width: 176px; max-width: calc(100vw - 16px); margin: 0; padding: 4px; overflow-y: auto;
  border: 1px solid var(--rule-strong); border-radius: 6px; background: var(--terminal-control); color: var(--text-soft); font-family: var(--font-sans);
  box-shadow: 0 16px 40px rgb(var(--shadow-rgb) / calc(.55 * var(--shadow-strength)));
}
/* No backdrop: a transparent full-window layer would shade HiDPI screens while the menu is open. */
.aera-menu::backdrop { display: none; }
.aera-menu:popover-open { opacity: 1; transform: none; transition: opacity 120ms ease-out, transform 180ms cubic-bezier(.16, 1, .3, 1); }
@starting-style {
  .aera-menu:popover-open { opacity: 0; transform: translateY(-4px); }
  .aera-menu[data-side="top"]:popover-open { transform: translateY(4px); }
}
.aera-menu svg { flex: none; }
.aera-menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box; min-height: 32px; padding: 0 16px 0 8px; border: 0; border-radius: 3px;
  background: transparent; color: inherit; font: inherit; font-size: .8125rem; line-height: 1.25; text-align: left; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.aera-menu-item:hover:not([aria-disabled="true"]) { background: var(--terminal-raised); color: var(--text); }
.aera-menu-item:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; background: var(--terminal-raised); color: var(--text); }
.aera-menu-item:is([aria-checked="true"], [aria-current="true"]) { color: var(--text); }
.aera-menu-check { fill: none; stroke: var(--positive); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.aera-menu-item:is([aria-checked="true"], [aria-current="true"]) .aera-menu-check { visibility: visible; }
.aera-menu-rule { height: 1px; margin: 4px 0; background: var(--rule-strong); }
.aera-menu-note { max-width: 240px; margin: 4px 0 0; padding: 8px 8px 4px; border-top: 1px solid var(--rule-strong); color: var(--text-muted); font-size: .75rem; line-height: 1.45; white-space: normal; }
.aera-menu-note[hidden] { display: none; }
/* A button that opens a menu carries this caret; it turns over while the menu is open. */
.aera-menu-caret { flex: none; fill: none; stroke: var(--text-muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
:is(:hover, [aria-expanded="true"]) > .aera-menu-caret { stroke: currentColor; }
[aria-expanded="true"] > .aera-menu-caret { transform: rotate(180deg); }
@media (max-width: 760px), (pointer: coarse) { .aera-menu-item { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .aera-menu:popover-open { transition: none; } }
/* Language switch: one shared control, wired by i18n.js. Every [data-language-switch] is a native link to this location
   in one language, named in that language; the current one carries aria-current. The bar's globe button, joined to
   the theme switch, shows the current code and opens the three as a list (the shared menu); the phone menu and the
   landing footer show them side by side, the current one underlined in mint. While a transaction is being prepared,
   signed or tracked the other languages are aria-disabled and stay on this page. See docs/languages.md. */
.aera-language-icon { display: block; width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.btn.aera-language-switch { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 9px 0 10px; font: 600 .75rem/1 var(--font-sans); letter-spacing: .04em; text-decoration: none; }
[data-language-switch][aria-disabled="true"] { opacity: .48; cursor: not-allowed; }
.aera-language-list { display: flex; align-items: center; flex-wrap: wrap; gap: 0 2px; }
.aera-language-list > a {
  display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 6px; color: var(--text-soft); text-decoration: none;
  text-decoration-line: none; text-underline-offset: 6px; text-decoration-thickness: 2px;
}
/* A dot between names, drawn rather than written so it is never read aloud. */
.aera-language-list > a + a::before { content: ""; width: 3px; height: 3px; margin-right: 10px; border-radius: 50%; background: var(--text-muted); opacity: .7; }
.aera-language-list > a:is(:hover, :focus-visible):not([aria-disabled="true"]) { color: var(--text); }
.aera-language-list > a:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 3px; }
.aera-language-list > a[aria-current="true"] { color: var(--text); }
.aera-language-list > a[aria-current="true"] > span, .aera-language-list > a[aria-current="true"] { text-decoration-line: underline; text-decoration-color: var(--positive-fill); }
.header-menu-language { display: none; }
/* A switch swaps every colour at once. Surfaces carry their own transitions, which would cross-fade at
   different speeds, so theme.js holds this class for two frames. */
:root.theme-switching, :root.theme-switching *, :root.theme-switching *::before, :root.theme-switching *::after { transition: none !important; }
.btn.orders-icon-btn { display: inline-flex; align-items: center; justify-content: center; position: relative; flex: none; width: 36px; height: 36px; min-width: 36px; min-height: 36px; margin: 0; padding: 0; border: 1px solid var(--terminal-rule); border-radius: 6px; background: transparent; color: var(--text-soft); text-decoration: none; }
.btn.orders-icon-btn svg { width: 16px; height: 16px; flex: none; }
.btn.orders-icon-btn:hover:not(:disabled) { color: var(--text); background: var(--terminal-control); border-color: var(--rule-bright); }
.btn.orders-icon-btn--cancel:hover:not(:disabled) { color: var(--danger-soft); background: rgb(var(--danger-rgb) / .09); border-color: var(--danger-soft); }
.btn.orders-icon-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn.orders-icon-btn:disabled { opacity: .45; }
@media (max-width: 760px), (pointer: coarse) {
  .btn.orders-icon-btn { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
}
#connect-wallet-btn { min-height: 40px; padding-inline: 14px; }
.form-input-wrapper {
  border: 1px solid var(--terminal-rule); border-radius: 6px;
  background: var(--terminal-inset); transition: border-color 160ms ease-out;
}
.form-input-wrapper:focus-within { border-color: var(--focus); box-shadow: none; }
.form-row input:not([type="checkbox"]) { height: 44px; padding: 12px; }
.market-stat, .execution-policy-group, .payout-preferences-group { border-radius: 6px; }
.market-stat-value, .balance-value, .orderbook-table, .activity-log { font-variant-numeric: tabular-nums; }

/* Non-trading workspaces keep the same shell with room for dense data. */
.main-layout.main-layout--page { grid-template-columns: minmax(0, 1fr) 280px; }
.main-layout.main-layout--page > .page-shell { grid-column: 1; grid-row: 1; }
.main-layout.main-layout--page > .trade-panel { grid-column: 2; grid-row: 1; max-width: none; }
.main-layout--page .activity { min-height: 100px; }
.balances h2, .activity h2 { margin: 0 0 .4rem; font-size: .85rem; }
/* The empty text comes from the list's data-empty-label, written in the page's language (no copy in CSS). */
.activity-log:not(:has(li))::after {
  content: attr(data-empty-label); display: block; padding: 12px 0 4px;
  color: var(--text-muted); font-family: "Geist", sans-serif; font-size: .8125rem;
}
.main-layout > .page-shell .page-placeholder-card {
  display: block; padding: 16px; min-height: 480px;
}
.terminal-page-header { padding: 2px 4px 18px; }
.page-placeholder-card .terminal-page-header h1 { font-size: 1.5rem; }
.portfolio-workspace { background: var(--terminal-inset); padding: 24px; border-radius: 8px; }
.portfolio-workspace > p { font-size: .875rem; line-height: 1.6; max-width: 65ch; }
.portfolio-workspace .empty-state-actions { display: grid; margin-top: 24px; gap: 0; }
.portfolio-workspace .empty-state-actions .btn {
  position: relative; border: 0; border-top: 1px solid var(--terminal-rule); border-radius: 0;
  padding: 18px 28px 18px 0; text-align: left; min-height: 56px; color: var(--text);
}
.portfolio-workspace .empty-state-actions .btn:hover { background: var(--terminal-control); padding-left: 12px; }
.portfolio-workspace .empty-state-actions .btn::after {
  content: ""; position: absolute; right: 12px; top: calc(50% - 3px);
  width: 6px; height: 6px; border-top: 1px solid currentColor;
  border-right: 1px solid currentColor; transform: rotate(45deg);
}

/* Wallet selection, transfers and reviewed actions share a dialog language. */
.modal-backdrop { padding: 16px; background: rgb(var(--scrim-rgb) / calc(.78 * var(--scrim-strength))); }
.modal, .market-overlay-content {
  background: var(--panel-fill); border-radius: var(--radius-panel);
  box-shadow: 0 24px 70px rgb(var(--shadow-rgb) / calc(.5 * var(--shadow-strength)));
  padding: 24px; max-height: calc(100dvh - 48px); overflow-y: auto;
}
.modal { width: min(480px, 100%); max-width: 480px; }
.modal h3, .market-overlay-title h2 { font-size: 1.125rem; font-weight: 500; }
.modal p, .market-overlay-title p { line-height: 1.5; }
.modal-actions { border-top: 1px solid var(--terminal-rule); padding-top: 16px; margin-top: 20px; flex-wrap: wrap; }
.wallet-overlay-backdrop, .market-overlay-backdrop { background: rgb(var(--scrim-rgb) / calc(.78 * var(--scrim-strength))); }
.market-overlay-content { width: min(640px, calc(100% - 32px)); margin-top: 24px; }
.market-overlay-header { align-items: flex-start; padding-bottom: 16px; border-bottom: 1px solid var(--terminal-rule); }
.market-list-item { padding: 14px 8px; border-color: var(--terminal-rule); }
.market-list-item:hover { background: var(--terminal-control); color: var(--text); }
.ledger-path-card, .ledger-preview, .send-token-card {
  background: transparent; border-radius: 0; border: 0; padding: 0;
}
.send-label input, .ledger-path-label input, .market-filter-input {
  background: var(--terminal-inset); border: 1px solid var(--terminal-rule); border-radius: 6px;
  min-height: 44px; padding: 12px; color: var(--text);
}
/* Wallet connection inherits the shared terminal dialog and control language. */
#wallet-modal { align-items: center; padding: 24px 16px; }
#wallet-modal[hidden], #wallet-modal [hidden] { display: none; }
#wallet-modal .wallet-dialog { display: flex; flex-direction: column; width: min(480px, 100%); max-height: calc(100dvh - 48px); margin: 0; padding: 0; overflow: hidden; }
#wallet-modal .market-overlay-header { flex: 0 0 auto; gap: 12px; margin: 0; padding: 24px 24px 20px; border: 0; }
#wallet-modal .market-overlay-title { min-width: 0; }
#wallet-modal h2 { margin: 0 0 8px; font-size: 1.5rem; line-height: 1.25; font-weight: 500; letter-spacing: -.02em; color: var(--text); }
#wallet-modal h2:focus, #ledger-selection-title:focus { outline: none; }
#wallet-modal .market-overlay-title p { margin: 0; color: var(--text-muted); font-size: .875rem; line-height: 1.5; }
.btn.wallet-dialog-close { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; min-height: 44px; padding: 0; }
#wallet-list { flex: 1 1 auto; min-height: 0; max-height: none; padding: 0 24px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--rule-strong) var(--terminal-panel); }
.wallet-choice-row { margin: 0 0 8px; }
.btn.wallet-choice { display: flex; align-items: center; width: 100%; min-height: 80px; gap: 16px; padding: 16px; text-align: left; white-space: normal; border-color: var(--terminal-rule); background: var(--terminal-control); color: var(--text); }
.btn.wallet-choice:hover:not(:disabled) { background: var(--terminal-raised); border-color: var(--rule-bright); color: var(--text); }
.btn.wallet-choice:focus-visible { border-color: var(--focus); background: var(--terminal-control); }
.wallet-choice-icon { width: 28px; height: 28px; flex: 0 0 28px; color: var(--text-soft); }
img.wallet-choice-icon { object-fit: contain; }
.wallet-choice-icon--mono { filter: invert(var(--mono-invert)); }
.wallet-choice-icon--announced { border-radius: 6px; }
.wallet-choice-copy { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.wallet-choice-name { font-size: .9375rem; font-weight: 500; line-height: 1.4; }
.wallet-choice-description { font-size: .8125rem; font-weight: 400; line-height: 1.4; color: var(--text-muted); }
.wallet-choice-chevron { width: 18px; height: 18px; flex: 0 0 18px; color: var(--text-muted); }
.wallet-empty { display: flex; gap: 16px; padding: 12px 0 20px; color: var(--text-muted); }
.wallet-empty strong { display: block; color: var(--text-soft); font-size: .875rem; font-weight: 500; line-height: 1.5; }
.wallet-empty p { margin: 4px 0 0; font-size: .8125rem; line-height: 1.5; }
.wallet-dialog-network { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex: 0 0 auto; margin: 16px 24px 0; padding: 12px 0; border-top: 1px solid var(--terminal-rule); }
.btn.wallet-brand-link { min-height: 44px; padding: 8px 6px; margin-left: -6px; border-color: transparent; }
.btn.wallet-brand-link:hover { background: var(--terminal-control); }
#wallet-modal .wallet-brand-lockup { height: 22px; filter: brightness(0) invert(var(--lockup-invert)); }
#wallet-modal .wallet-network-badge { font-size: .75rem; line-height: 1.4; color: var(--network-label); }
.wallet-step-actions { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; gap: 12px; padding: 16px 24px 0; }
.wallet-step-actions .btn { min-height: 44px; }
.btn.wallet-connect-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 160px; max-width: 100%; white-space: normal; background: var(--positive-fill); border-color: var(--positive-fill); color: var(--on-positive); font-weight: 500; }
.btn.wallet-connect-action:hover:not(:disabled) { background: var(--positive-fill-hover); border-color: var(--positive-fill-hover); color: var(--on-positive); }
.btn.wallet-connect-action:focus-visible:not(:disabled) { border-color: var(--text); }
#wallet-modal h3 { margin: 0 0 12px; font-size: .9375rem; font-weight: 500; line-height: 1.4; color: var(--text); }
.ledger-instructions { display: grid; gap: 12px; margin: 0; padding-left: 22px; font-size: .875rem; line-height: 1.5; color: var(--text-soft); }
.ledger-instructions li { padding-left: 6px; }
.ledger-instructions li::marker { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ledger-instructions strong { color: var(--text); font-weight: 500; }
.ledger-help { margin: 16px 0 0; font-size: .8125rem; line-height: 1.5; color: var(--text-muted); }
.ledger-selection .ledger-help { margin: 0; }
.ledger-selected-address { margin-top: 16px; padding: 16px; background: var(--terminal-inset); border-radius: 6px; overflow-wrap: anywhere; font-family: var(--fontfam-term); font-size: .875rem; line-height: 1.65; color: var(--text); }
.ledger-selected-path { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin-top: 12px; font-size: .75rem; line-height: 1.5; color: var(--text-muted); }
#ledger-preview-path { font-family: var(--fontfam-term); overflow-wrap: anywhere; color: var(--text-soft); }
.ledger-settings { margin-top: 24px; border-block: 1px solid var(--terminal-rule); }
.ledger-settings summary { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 12px 2px; cursor: pointer; list-style: none; font-size: .8125rem; line-height: 1.5; color: var(--text-soft); }
.ledger-settings summary::-webkit-details-marker { display: none; }
.ledger-settings summary::after { content: ''; width: 6px; height: 6px; margin-left: 4px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.ledger-settings[open] summary::after { transform: translateY(2px) rotate(225deg); }
.ledger-settings summary:focus-visible { outline-offset: -2px; border-radius: 6px; }
.ledger-settings-hint { margin-left: auto; color: var(--text-muted); font-size: .75rem; }
.ledger-settings-body { padding: 0 0 16px; }
.ledger-settings-body > .ledger-help { margin: 0 0 16px; }
#wallet-modal .ledger-path-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
#wallet-modal .ledger-path-label div { margin-bottom: 6px; font-size: .8125rem; }
#wallet-modal .ledger-path-label input { min-width: 0; font-size: 1rem; }
#wallet-modal .ledger-path-preview-wrap { margin-top: 12px; flex-wrap: wrap; }
#wallet-modal .ledger-path-preview { color: var(--text-soft); font-size: .75rem; }
#wallet-modal .ledger-path-actions { margin-top: 16px; gap: 8px; }
#wallet-modal .ledger-path-actions .btn { min-height: 44px; }
.ledger-field-error { margin: 8px 0 0; color: var(--danger); font-size: .8125rem; line-height: 1.5; }
#wallet-modal .ledger-address-list { margin-top: 16px; border: 0; border-radius: 0; }
#wallet-modal .ledger-address-list li + li { border-top: 1px solid var(--terminal-rule); }
.btn.ledger-address-item { display: flex; align-items: center; width: 100%; min-height: 44px; gap: 12px; padding: 10px 12px; border: 1px solid transparent; border-radius: 6px; font-family: var(--fontfam-term); font-size: .8125rem; color: var(--text-soft); background: transparent; }
.btn.ledger-address-item:hover:not(:disabled) { background: var(--terminal-control); color: var(--text); }
.btn.ledger-address-item[aria-pressed="true"] { background: var(--terminal-selected); color: var(--text); box-shadow: inset 2px 0 0 var(--positive-fill); }
.btn.ledger-address-item:focus-visible { border-color: var(--focus); }
.ledger-address-index { width: 16px; text-align: left; color: var(--text-muted); }
.ledger-address-value { flex: 1; text-align: left; }
.ledger-address-check { width: 6px; height: 10px; margin-right: 4px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); visibility: hidden; }
[aria-pressed="true"] > .ledger-address-check { visibility: visible; color: var(--focus); }
#wallet-modal .ledger-status { margin: 12px 0 0; min-height: 0; font-size: .8125rem; line-height: 1.5; }
#wallet-modal .ledger-status:empty { display: none; }
@media (max-width: 520px) {
  #wallet-modal { padding: 12px; }
  #wallet-modal .wallet-dialog { max-height: calc(100dvh - 24px); }
  #wallet-modal .market-overlay-header { padding: 20px 20px 16px; }
  #wallet-list { padding-inline: 20px; }
  .wallet-step-actions { padding: 16px 20px 0; }
  .wallet-dialog-network { margin-inline: 20px; }
  .btn.wallet-choice { gap: 12px; padding: 14px 12px; }
  .wallet-choice-description { font-size: .75rem; }
  .btn.wallet-connect-action { min-width: 0; flex: 1; }
}
@media (max-height: 480px) {
  #wallet-modal .market-overlay-header { padding-block: 12px; }
  .wallet-dialog-network { margin-top: 8px; padding-block: 4px; }
  .wallet-step-actions { padding-top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  #wallet-modal, #wallet-modal .wallet-dialog, #wallet-modal .btn { transition: none; }
}

.aera-review-overlay { z-index: 20000; }
.aera-review { width: min(620px, 94vw); max-height: 90dvh; overflow-y: auto; }
.aera-review h2 { margin-top: 0; font-size: 1.2rem; }
.aera-review dl { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: .6rem; }
.aera-review dt { color: var(--text-soft); }
.aera-review dd { margin: 0; overflow-wrap: anywhere; }
.aera-review li { margin: .65rem 0; overflow-wrap: anywhere; }
.aera-review pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8rem; max-height: 220px; overflow: auto; }
.aera-review summary { cursor: pointer; }
.aera-address { overflow-wrap: anywhere; font-family: var(--fontfam-term); }
.modal.aera-review { width: min(620px, 100%); max-width: 620px; }
.aera-review h2 { margin-bottom: 20px; font-weight: 500; }
.aera-review dl { padding: 16px; background: var(--terminal-inset); border-radius: 6px; font-size: .8125rem; line-height: 1.5; }
.aera-review dd { font-family: var(--fontfam-term); }
.aera-review ul { padding-left: 20px; font-size: .875rem; line-height: 1.55; }
.aera-review details { padding: 12px 0; border-top: 1px solid var(--terminal-rule); border-bottom: 1px solid var(--terminal-rule); font-size: .8125rem; }
@media (max-width: 1100px) {
  .main-layout.main-layout--page { grid-template-columns: minmax(0, 1fr); }
  .main-layout.main-layout--page > .page-shell,
  .main-layout.main-layout--page > .trade-panel { grid-column: 1; grid-row: auto; width: 100%; }
  .main-layout--page > .trade-panel { display: grid; grid-template-columns: 1fr 1fr; }
  .main-layout--page > .trade-panel--activity-only { display: block; }
}
@media (max-width: 768px) {
  .btn, .btn.small-btn, .btn.ghost-btn { min-height: 44px; }
  .main-layout--page > .trade-panel { display: flex; }
  .main-layout > .page-shell .page-placeholder-card { min-height: 420px; }
  .portfolio-workspace { padding: 20px 16px; }
  .modal, .market-overlay-content { padding: 20px 16px; }
  .modal-actions > .btn { flex: 1; }
  .market-overlay-close-btn { flex: 0 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media (max-width: 480px) { .aera-review dl { grid-template-columns: 1fr; gap: .35rem; } .aera-review dd { margin-bottom: .6rem; } }

/* Structured reviews keep the decision and its actions in view. */
.modal:is(.aera-review,.aera-entry).aera-review-compact {
  --review-inset: 24px;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(560px, 100%); max-width: 560px; max-height: calc(100dvh - 32px);
  padding: 0; overflow: hidden;
}
.aera-review-compact .aera-review-header { padding: 20px var(--review-inset) 12px; }
.aera-review-compact h2 { margin: 0; font-weight: 500; font-size: 1.125rem; line-height: 1.4; overflow-wrap: anywhere; }
.aera-review-compact .aera-review-header p { margin: 8px 0 0; color: var(--text-soft); font-size: .875rem; line-height: 1.5; overflow-wrap: anywhere; }
.aera-review-body { min-height: 0; padding: 0 var(--review-inset); overflow-y: auto; overscroll-behavior: contain; }
.aera-review-compact dl.aera-review-rows, .aera-review-compact dl.aera-review-technical {
  display: block; margin: 0; padding: 0; background: transparent; border-radius: 0;
}
.aera-review-rows > div, .aera-review-technical > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: baseline; gap: 8px 16px; padding: 10px 0; border-bottom: 1px solid var(--terminal-rule); }
.aera-review-compact dt { font-size: .8125rem; }
.aera-review-compact dd { margin: 0; font-size: .8125rem; line-height: 1.5; font-variant-numeric: tabular-nums; text-align: right; }
.aera-review-row-primary dd { color: var(--text); font-size: 1rem; font-weight: 500; }
.aera-review-compact ul.aera-review-notes { margin: 16px 0; padding-left: 16px; color: var(--text-soft); font-size: .8125rem; line-height: 1.5; }
.aera-review-notes li { margin: 6px 0; }
.aera-review-compact details { padding: 0; border: 0; }
.aera-review-compact summary { min-height: 44px; padding: 12px 0; color: var(--text-soft); line-height: 1.5; }
.aera-review-compact summary:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 4px; }
.aera-review-compact dl.aera-review-technical { padding-bottom: 8px; }
.aera-review-technical > div { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 8px 0; }
.aera-review-technical dd { text-align: left; color: var(--text-soft); white-space: pre-line; }
.aera-review-compact pre { margin: 0 0 12px; padding: 0; max-height: none; }
.aera-review-compact .aera-review-actions { margin: 0; padding: 16px var(--review-inset) 20px; flex-wrap: nowrap; background: var(--panel-fill); }
.aera-review-actions .btn { min-height: 44px; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.aera-review-actions .primary-btn { background: var(--positive-fill); border-color: var(--positive-fill); color: var(--on-positive); font-weight: 600; }
.aera-review-actions .primary-btn:hover { background: var(--positive-fill-hover); border-color: var(--positive-fill-hover); color: var(--on-positive); }
.aera-review-actions .btn:focus-visible { border-color: var(--focus); outline: none; box-shadow: none; }
@media (max-width: 480px), (max-height: 480px) {
  .modal:is(.aera-review,.aera-entry).aera-review-compact { --review-inset: 16px; }
  .aera-review-compact .aera-review-header { padding-top: 16px; }
  .aera-review-compact .aera-review-actions { padding-top: 12px; padding-bottom: 12px; }
  .aera-review-rows > div { gap: 8px 12px; padding: 8px 0; }
}

/* The public voting notice shares the header's measured sticky boundary. */
:root { --aera-sticky-height: 54px; --aera-trading-nav-height: 0px; }
html { scroll-padding-top: calc(var(--aera-sticky-height) + var(--aera-trading-nav-height) + 12px); }
.aera-sticky-header { position: sticky; top: 0; z-index: 40; background: var(--terminal-inset); }
.aera-sticky-header .site-header { position: relative; top: auto; }
.aera-governance-notice { --governance-attention: #f2d675; --governance-ink: #252214; --governance-rule: #6b581b; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto 44px; grid-template-areas: "icon text review dismiss"; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--governance-rule); background: var(--governance-attention); color: var(--governance-ink); }
.aera-governance-notice[hidden] { display: none; }
.aera-governance-icon { grid-area: icon; }
.aera-governance-notice p { grid-area: text; min-width: 0; margin: 0; color: inherit; font-size: .8125rem; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
#aera-governance-open { grid-area: review; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--governance-ink); color: var(--governance-attention); border-color: var(--governance-ink); font-weight: 500; }
#aera-governance-open:is(:hover, :focus-visible):not(:disabled) { background: var(--governance-rule); border-color: var(--governance-ink); }
#aera-governance-open:focus-visible { outline: 2px solid var(--governance-ink); outline-offset: 3px; }
#aera-governance-dismiss { grid-area: dismiss; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; transition: background-color 160ms ease-out; }
#aera-governance-dismiss:hover { background: rgb(37 34 20 / .1); }
#aera-governance-dismiss:focus-visible { outline: 2px solid var(--governance-ink); outline-offset: -4px; background: rgb(37 34 20 / .1); }
#orders-panel, #orderbook-panel, #order-form, #series-notes-page, #aera-dao-page, #ad-proposal-detail { scroll-margin-top: 0; }
@media (max-width: 768px) {
  .mobile-trading-nav { top: var(--aera-sticky-height); }
  .aera-governance-notice { grid-template-columns: 20px minmax(0, 1fr) 44px; grid-template-areas: "icon text dismiss" ". review ."; gap: 4px 8px; padding: 8px 12px 12px; }
  .aera-governance-icon { align-self: start; margin-top: 12px; }
  #aera-governance-open { justify-self: start; }
  #aera-governance-dismiss { align-self: start; }
}

/* Portfolio's native checkbox is the shared application control. */
input[type="checkbox"] { appearance: auto; -webkit-appearance: checkbox; box-sizing: border-box; flex: 0 0 16px; width: 16px; height: 16px; min-height: 0; padding: 0; margin: 0; accent-color: var(--positive); cursor: pointer; }
input[type="checkbox"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; box-shadow: none; }
input[type="checkbox"]:disabled { cursor: not-allowed; }
label:has(> input[type="checkbox"]) { gap: 8px; }

/* Recipient fields that accept RNS names: the resolved address, an address's verified name, or the field's problem. */
.aera-recipient-hint { margin: -8px 0 0; font-size: .75rem; line-height: 1.5; color: var(--text-muted); overflow-wrap: anywhere; }
.aera-recipient-hint:empty { display: none; }
.aera-recipient-hint code { font-family: var(--fontfam-term); font-size: inherit; color: var(--text); font-variant-numeric: tabular-nums slashed-zero; }
.aera-recipient-hint:is([data-state="invalid"], [data-state="unresolved"], [data-state="failed"]) { color: var(--danger-soft); }
/* Repeated class: outranks each page's own hover and focus border rules, which load later. */
input.aera-recipient-input.aera-recipient-input.aera-recipient-input[aria-invalid="true"] { border-color: var(--danger-soft); }
/* An RNS name leads; the signed address sits beneath it. */
.aera-review-compact .aera-review-name { display: block; color: var(--text); font-family: "Geist", sans-serif; font-weight: 500; }
.aera-review-compact .aera-review-name + .aera-review-address { display: block; color: var(--text-soft); font-size: .6875rem; overflow-wrap: anywhere; }
/* Full-width disclosures use the same native control geometry across workspaces. */
.btn.aera-disclosure-strip {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px;
  margin: 0; padding: 0 20px; border: 0; border-radius: 0;
  background: transparent; color: var(--text-soft); font: var(--colhead);
  letter-spacing: .06em; text-transform: uppercase; text-align: left;
  transition: background-color 140ms ease-out, color 140ms ease-out;
}
.aera-disclosure-strip > svg { flex: none; color: var(--text-muted); }
.aera-disclosure-action { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; color: var(--text-muted); }
.aera-disclosure-chevron { flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform 140ms ease-out; }
.aera-disclosure-strip[aria-expanded="true"] .aera-disclosure-chevron { transform: rotate(180deg); }
.btn.aera-disclosure-strip:hover { background: var(--terminal-raised); color: var(--text); }
.aera-disclosure-strip:hover :is(.aera-disclosure-action, svg) { color: var(--text); }
.btn.aera-disclosure-strip:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) { .aera-disclosure-chevron { transition: none; } }

/* Copy controls share one behavior (AeraUI, [data-aera-copy]; docs/copy-controls.md): the copy icon turns into a
   mint check for a moment. The check carries its own colour so a hovered control still confirms the copy. */
.aera-copy-done { display: none; color: var(--positive); }
[data-aera-copy][data-copied="true"] .aera-copy-icon { display: none; }
[data-aera-copy][data-copied="true"] .aera-copy-done { display: block; animation: aera-copied 240ms cubic-bezier(.16, 1, .3, 1); }
@keyframes aera-copied { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.aera-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Step progress (docs/transaction-progress.md#step-progress): one ruled bar per step, labelled beneath. Done steps
   rule in mint, the current step in the network amber; stale progress mutes its done rules. Bridge transfers,
   MoC withdrawals and the MoC order ticket share it. */
.aera-steps { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 8px; list-style: none; margin: 0 0 12px; padding: 0; }
.aera-steps li { border-top: 3px solid var(--terminal-rule); padding-top: 8px; color: var(--text-muted); font: var(--colhead); letter-spacing: .04em; text-transform: uppercase; line-height: 1.4; transition: border-color 200ms ease-out, color 200ms ease-out; }
.aera-steps li[data-state="done"] { border-color: var(--positive); color: var(--text-soft); }
.aera-steps li[data-state="current"] { border-color: var(--network-label); color: var(--text); }
.is-stale .aera-steps li[data-state="done"] { border-color: var(--text-muted); }
@media (max-width: 760px) { .aera-steps { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .aera-steps li { transition: none; } }

/* Step track (docs/transaction-progress.md#step-track), the DAO lamp grammar: build it with AeraUI.journey(). Lit
   once passed; a mint ring where the move is yours, an amber lamp where the networks are working; the rest unlit.
   Vertical with notes beside an action; `--row` lays the lamps along one line with labels beneath, and
   `--row-narrow` does so at 1199px and below. The Bridge directions and the MoC order ticket use it. */
.aera-journey { display: grid; margin: 0; padding: 0; list-style: none; }
.aera-journey > li { position: relative; display: grid; gap: 3px; min-width: 0; padding: 0 0 22px 26px; }
.aera-journey > li:last-child { padding-bottom: 0; }
.aera-journey > li::before { content: ''; position: absolute; left: 4px; top: 10px; bottom: -6px; width: 1px; background: var(--rule-strong); }
.aera-journey > li:last-child::before { display: none; }
.aera-journey > li[data-state="done"]::before { background: var(--positive); }
.aera-journey-lamp { position: absolute; top: 6px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--rule-bright); box-shadow: 0 0 0 3px var(--ground); }
.aera-journey > li[data-state="done"] .aera-journey-lamp { background: var(--positive); }
.aera-journey > li[data-wait="user"] .aera-journey-lamp { background: var(--positive); box-shadow: 0 0 0 3px var(--ground), 0 0 0 4px var(--positive); }
.aera-journey > li[data-wait="system"] .aera-journey-lamp { background: var(--network-label); box-shadow: 0 0 0 3px var(--ground), 0 0 0 4px var(--network-label); }
.aera-journey-label { color: var(--text-muted); font-size: .875rem; font-weight: 500; line-height: 1.45; }
.aera-journey > li[data-state="done"] .aera-journey-label { color: var(--text-soft); }
.aera-journey > li[data-state="current"] .aera-journey-label { color: var(--text); }
.aera-journey-note { max-width: 42ch; color: var(--text-muted); font-size: .8125rem; line-height: 1.5; }
.aera-journey-note:empty { display: none; }
.aera-journey--row { display: flex; }
.aera-journey--row > li, .aera-journey--row > li:last-child { flex: 1 1 0; padding: 20px 8px 0 0; }
.aera-journey--row > li:last-child { flex: 0 0 auto; padding-right: 0; }
.aera-journey--row > li::before { left: 4px; right: 0; top: 4px; bottom: auto; width: auto; height: 1px; }
.aera-journey--row .aera-journey-lamp { top: 0; }
.aera-journey--row .aera-journey-note { display: none; }
.aera-journey--row .aera-journey-label { font-size: .8125rem; }
@media (max-width: 1199px) {
  .aera-journey--row-narrow { display: flex; }
  .aera-journey--row-narrow > li, .aera-journey--row-narrow > li:last-child { flex: 1 1 0; padding: 20px 8px 0 0; }
  .aera-journey--row-narrow > li:last-child { flex: 0 0 auto; padding-right: 0; }
  .aera-journey--row-narrow > li::before { left: 4px; right: 0; top: 4px; bottom: auto; width: auto; height: 1px; }
  .aera-journey--row-narrow .aera-journey-lamp { top: 0; }
  .aera-journey--row-narrow .aera-journey-note { display: none; }
  .aera-journey--row-narrow .aera-journey-label { font-size: .8125rem; }
}
@media (max-width: 440px) { :is(.aera-journey--row, .aera-journey--row-narrow) .aera-journey-label { font-size: .75rem; } }

/* An address, Copy and View on the explorer joined in one outlined control, the grammar of the header's connected
   wallet. Build it with AeraUI.addressActions(). The compact default prints a shortened label (Trading's contract). */
.aera-address-actions { display: inline-flex; align-items: stretch; max-width: 100%; min-height: 30px; border: 1px solid var(--rule-strong); border-radius: 4px; vertical-align: middle; transition: border-color 160ms ease-out; }
.aera-address-actions:hover, .aera-address-actions:focus-within { border-color: var(--rule-bright); }
.aera-address-actions__label { display: block; align-self: center; min-width: 0; padding: 0 10px; overflow: hidden; color: var(--text-soft); font: 500 .75rem/1 var(--fontfam-term); font-variant-numeric: tabular-nums slashed-zero; white-space: nowrap; text-overflow: ellipsis; }
.aera-address-actions__btn { position: relative; display: grid; place-items: center; flex: none; width: 32px; margin: 0; 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; }
.aera-address-actions__btn:last-child { border-radius: 0 3px 3px 0; }
.aera-address-actions__btn:hover { background: var(--terminal-control); color: var(--text); text-decoration: none; }
.aera-address-actions__btn:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.aera-address-actions__btn svg { width: 15px; height: 15px; }
/* A page's primary address prints in full at reading size, with the header's control size. */
.aera-address-actions--prominent { min-height: 40px; }
.aera-address-actions--prominent .aera-address-actions__label { padding: 8px 12px; color: var(--text); font-size: .875rem; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; user-select: all; }
.aera-address-actions--prominent .aera-address-actions__btn { width: 36px; }
.aera-address-actions--prominent .aera-address-actions__btn svg { width: 16px; height: 16px; }
@media (pointer: coarse) {
  .aera-address-actions { min-height: 36px; }
  .aera-address-actions__btn { width: 38px; }
  .aera-address-actions--prominent { min-height: 44px; }
  .aera-address-actions--prominent .aera-address-actions__btn { width: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .aera-address-actions, .aera-address-actions__btn { transition: none; }
  [data-aera-copy][data-copied="true"] .aera-copy-done { animation: none; }
}
