/* Phase one: small feedback atoms, using the established Quantline palette. */
:root { --motion-fast: 160ms; --motion-state: 350ms; --motion-ease: cubic-bezier(.22,1,.36,1); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tile, .token-shell { transition: transform var(--motion-fast) var(--motion-ease); }
.tile, .token { transition: border-color var(--motion-fast), transform var(--motion-fast) var(--motion-ease); }
@media (hover: hover) {
  .tile:hover, .token-shell:hover { transform: translateY(-2px); }
  .token-shell:hover .token { border-color: var(--accent); }
}
.tile:focus-visible, .token-shell:focus-within { transform: translateY(-2px); }
.token-shell { position: relative; display: grid; min-width: 0; }
.token-shell .token { height: 100%; padding-bottom: 62px; }
.token-save { position: absolute; right: 14px; bottom: 12px; }
.coin-head-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.watch-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-width: 34px; min-height: 34px; padding: 4px 8px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
  color: var(--muted); font-size: 12px; cursor: pointer;
  transition: border-color var(--motion-fast), color var(--motion-fast);
}
.watch-button [data-watch-star] { font-size: 19px; line-height: 1; }
.watch-button.labelled { padding: 5px 11px; }
.watch-button:hover { border-color: var(--accent); color: var(--text); }
.watch-button[aria-pressed="true"] { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.saved-panel { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; max-width: 1100px; background: var(--panel); }
.saved-panel summary { cursor: pointer; font-size: 13px; }
.saved-panel summary .muted { margin-left: 9px; font-size: 11px; }
.saved-list { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.saved-list > p { margin: 0; font-size: 12px; }
.saved-market { display: flex; align-items: center; gap: 5px; background: var(--panel-2); border-radius: 8px; padding: 3px 3px 3px 12px; }
.saved-market a { font-size: 12px; text-decoration: none; color: var(--text); }
.saved-market a:hover { color: var(--accent); }
.saved-market .watch-button { border-color: transparent; background: none; }
.motion-control { margin-left: auto; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: none; color: var(--muted); cursor: pointer; font-size: 11px; white-space: nowrap; }
.motion-control[aria-pressed="true"] { color: var(--accent); }
.motion-control:disabled { opacity: 1; }
.feedback-toast {
  position: fixed; z-index: 40; bottom: 52px; left: 264px;
  display: flex; align-items: center; gap: 10px; width: min(450px, calc(100vw - 32px));
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 11px;
  box-shadow: 0 8px 30px #0005; padding: 12px 14px; font-size: 12px;
  animation: feedback-in var(--motion-state) var(--motion-ease);
}
.feedback-symbol { display: grid; place-items: center; width: 25px; height: 25px; flex: none; border-radius: 50%; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.feedback-toast[data-tone="error"] .feedback-symbol { display: none; }
.feedback-toast[data-tone="error"] { border-color: var(--alert-line); }
.feedback-toast button { border: 0; background: none; color: var(--muted); font-size: 20px; cursor: pointer; margin-left: auto; padding: 1px 5px; }
.settlement-receipt { display: grid; gap: 5px; margin-top: 18px; padding: 4px 0 4px 12px; border-left: 2px solid var(--muted); font-size: 12px; animation: feedback-in var(--motion-state) var(--motion-ease); }
.settlement-receipt strong { font-weight: 600; }
.settlement-receipt span { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.settlement-receipt a { color: var(--muted); margin-top: 3px; width: fit-content; }
.chart-status { display: inline-flex; align-items: center; gap: 8px; }
.chart-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex: none; }
.chart-status[data-feed-state="live"]::before { background: var(--accent); animation: live-presence 1s ease-out 2; }
.chart-status[data-feed-state="stale"]::before, .chart-status[data-feed-state="reconnecting"]::before { background: var(--warn); }
.dot[data-feed-state] { background: var(--muted); }
.dot[data-feed-state="live"] { background: var(--long); animation: live-presence 1s ease-out 2; }
.dot[data-feed-state="stale"], .dot[data-feed-state="reconnecting"] { background: var(--warn); }
[data-price-direction] { border-radius: 4px; }
.price-tick[data-price-direction="up"] { animation: price-tick-up 400ms ease-out; }
.price-tick[data-price-direction="down"] { animation: price-tick-down 400ms ease-out; }
.voice-playback { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
.voice-playback-text { font-size: 11px; }
.voice-playback > span:first-child { display: inline-flex; height: 20px; gap: 2px; align-items: center; color: var(--accent); }
.voice-playback i { display: block; height: 9px; width: 3px; border-radius: 2px; background: currentColor; animation: coach-wave 500ms ease-in-out infinite alternate; }
.voice-playback i:nth-child(2n) { height: 17px; animation-delay: 120ms; }
.voice-playback i:nth-child(3n) { height: 13px; animation-delay: 220ms; }
@keyframes live-presence { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent); } 100% { box-shadow: 0 0 0 6px transparent; } }
@keyframes feedback-in { from { opacity: .3; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes price-tick-up { from { background: color-mix(in srgb, var(--long) 20%, transparent); } to { background: transparent; } }
@keyframes price-tick-down { from { background: color-mix(in srgb, var(--short) 20%, transparent); } to { background: transparent; } }
@keyframes coach-wave { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
html.motion-off *, html.motion-off *::before, html.motion-off *::after { animation: none !important; transition: none !important; }
html.motion-off .tile, html.motion-off .token-shell { transform: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .tile, .token-shell { transform: none !important; }
}
@media (max-width: 859px) { .feedback-toast { left: 16px; } }
@media (max-width: 559px) {
  .coin-head-actions { gap: 7px; }
  .coin-head { gap: 10px; }
  .coin-ends { font-size: 11px; padding: 6px 9px; }
  .saved-panel summary .muted { display: block; margin: 3px 0 0 15px; }
  .user-btn { display: none; }
  .user-btn span { overflow: hidden; text-overflow: ellipsis; }
}
@media (pointer: coarse) {
  .watch-button, .motion-control, .feedback-toast button { min-height: 44px; min-width: 44px; }
  .token-shell .token { padding-bottom: 74px; }
}
