/* Since you left (away.js): the app's one modal pattern (a native <dialog>, as the wallet list), a sheet from the
   bottom on a phone. The moves as a short ledger, the headlines as links out, Borro's own tape under them. Tokens
   only, so dark mode follows. */
dialog.away { width: min(620px, calc(100vw - 32px)); max-height: min(760px, calc(100vh - 48px)); padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -30px rgba(13, 13, 15, .45); overflow: hidden; }
dialog.away[open] { display: flex; flex-direction: column; }
dialog.away:focus { outline: none; }
dialog.away::backdrop { background: rgba(13, 13, 15, .42); backdrop-filter: blur(3px); }
.aw-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 18px 14px 24px; border-bottom: 1px solid var(--line); }
.aw-head h2 { font: 650 22px/1.2 var(--display); letter-spacing: -.02em; }
.aw-badge { display: inline-flex; margin-top: 6px; padding: 3px 10px; border-radius: 999px; background: var(--sunk); font-size: 13px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.aw-x { display: grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 999px; background: var(--sunk); color: var(--ink); cursor: pointer; }
.aw-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.aw-x:hover { background: var(--line); }
.aw-body { padding: 4px 24px 22px; overflow: auto; overscroll-behavior: contain; }
.aw-sum { display: flex; flex-wrap: wrap; gap: 2px 6px; padding: 14px 0 4px; font-size: 15px; line-height: 1.5; color: var(--text-2); }
.aw-sum span:first-child { color: var(--ink); font-weight: 600; }

.aw-sec { margin-top: 16px; }
.aw-sec h3 { padding-bottom: 8px; border-bottom: 1px solid var(--line); font: 650 13px var(--ui); letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }

/* Moves: logo, symbol and name, price now, change since. */
.aw-moves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.aw-move { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
a.aw-move { border-radius: 10px; transition: background .15s; }
a.aw-move:hover { background: var(--sunk); }
.aw-logo { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); object-fit: cover; }
.aw-mono { display: grid; place-items: center; background: var(--sunk); font: 700 9px/1 var(--ui); color: var(--text-2); }
.aw-sym { min-width: 0; }
.aw-sym b { display: block; font-weight: 650; font-size: 15px; }
.aw-sym small { display: block; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-r { display: grid; justify-items: end; gap: 2px; }
.aw-px { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums lining-nums; }
.aw-ch { min-width: 70px; padding: 4px 6px; border-radius: 8px; font-weight: 650; font-size: 13px; text-align: center; font-variant-numeric: tabular-nums lining-nums; }
.aw-ch.up { background: color-mix(in srgb, var(--up) 13%, transparent); color: var(--up); }
.aw-ch.down { background: color-mix(in srgb, var(--down) 13%, transparent); color: var(--down); }
.aw-ch.flat { background: var(--sunk); color: var(--text-2); }
.aw-more { margin-top: 8px; padding: 6px 0; border: 0; background: none; font: 650 14px var(--ui); color: var(--act-ink); cursor: pointer; }
.aw-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Headlines: source and time, the title as a link out, its tickers. */
.aw-news li { padding: 11px 0; border-bottom: 1px solid var(--line); }
.aw-news small { display: block; font-size: 12px; color: var(--text-3); }
.aw-hl { display: block; margin-top: 3px; font-weight: 600; font-size: 15px; line-height: 1.4; color: var(--ink); text-decoration: none; }
.aw-hl:hover { color: var(--act-ink); text-decoration: underline; text-underline-offset: 3px; }
.aw-tks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.aw-tk { padding: 2px 8px; border-radius: 999px; background: var(--sunk); font: 650 12px var(--ui); color: var(--text-2); text-decoration: none; }
a.aw-tk { background: color-mix(in srgb, var(--act) 12%, transparent); color: var(--act-ink); }
a.aw-tk:hover { background: color-mix(in srgb, var(--act) 22%, transparent); }

/* On Borro: a line of counts, then each event with its Blockscout link. */
.aw-line { padding: 10px 0 2px; font-size: 14px; font-weight: 600; }
.aw-ev { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.aw-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.aw-dot.open { background: var(--act); }
.aw-dot.close { background: var(--ink); }
.aw-dot.burn { background: var(--red); }
.aw-what b { display: block; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.aw-what small { display: block; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.aw-tx { font-size: 13px; font-weight: 650; color: var(--act-ink); text-decoration: none; }
.aw-tx:hover { text-decoration: underline; text-underline-offset: 3px; }

:root[data-theme="dark"] dialog.away { box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9); }
:root[data-theme="dark"] dialog.away::backdrop { background: rgba(0, 0, 0, .6); }

@media (max-width: 980px), (pointer: coarse) {
  .aw-x { width: var(--tap, 44px); height: var(--tap, 44px); }
  .aw-more, .aw-tx { min-height: 32px; }
}
/* A phone: a sheet from the bottom, in reach of the thumb, as the wallet list. */
@media (max-width: 640px) {
  dialog.away { width: 100%; max-width: 100%; margin: auto 0 0; max-height: calc(100dvh - 32px - var(--safe-t, 0px)); border-width: 1px 0 0; border-radius: var(--r-xl, 20px) var(--r-xl, 20px) 0 0; padding-bottom: var(--safe-b, 0px); }
  dialog.away[open] { animation: sheet-up .42s var(--ease-sheet, cubic-bezier(.22, .84, .24, 1)); }
  .aw-head { padding: 20px 12px 12px 18px; }
  .aw-body { padding: 2px 18px 20px; }
  .aw-moves { grid-template-columns: minmax(0, 1fr); }
  .aw-ch { min-width: 64px; }
}
@media (prefers-reduced-motion: reduce) { dialog.away[open] { animation: none; } }
