/* Shared interaction states. Geometry belongs to each page stylesheet. */
body[data-ui-interactions]{--interaction-focus:#82d9bf;--interaction-amber:#99f486;--interaction-soft:#95ef7d0c;--interaction-press:#95ef7d16}
body[data-ui-interactions] :is(.button,.outline-button,.header-talk,.menu-toggle,.expand-chat,.terminal-form button,.mobile-panel-tabs button,.project-tabs button,.archive-navigation button,.dialog-close,.motion-control,.feature-card[href],.header-nav a,.panel-corner-link,.wallet-view,.text-link,.thought-text a,.new-chat,.history-item,.rail-utilities button,.mobile-toolbar button,.message-actions button,.message-citations a,.message-trace summary,.context-action,.context-source a,.chat-send,.dialog-header button,.drawer-close,.dialog-button,.dialog-body a){transform:none;filter:none;box-shadow:none;transition:color .14s ease,border-color .14s ease,background-color .14s ease;}
body[data-ui-interactions] :is(a,button,summary):focus-visible{outline:2px solid var(--interaction-focus);outline-offset:3px}
body[data-ui-interactions] :is(a,button):active:not(:disabled):not([aria-disabled=true]){filter:none;transform:none}
body[data-ui-interactions] :is(a,button,summary):disabled,
body[data-ui-interactions] [aria-disabled=true]{cursor:default;box-shadow:none;filter:none;}

/* Hero controls keep their position and restrained amber treatment. */
body[data-ui-interactions=home] .button-primary{background:linear-gradient(115deg,#96f081,#8cea72) #95ef7d;border-color:#99f486;color:#09100c;box-shadow:inset 0 1px #b9ffab55}
body[data-ui-interactions=home] :is(.outline-button,.menu-toggle){background:#050b0e40;border-color:#7bd665;color:var(--paper)}
body[data-ui-interactions=home] .header-nav a{color:var(--paper);background:transparent}
body[data-ui-interactions=home] .button-secondary{color:var(--paper);background:transparent;box-shadow:0 1px #9fb2b054}
body[data-ui-interactions=home] .panel-corner-link{color:#8fa3a8;background:transparent}
body[data-ui-interactions=home] .wallet-view{color:#99acb1;background:transparent}
body[data-ui-interactions=home] :is(.text-link,.thought-text a){color:var(--gold);background:transparent}
body[data-ui-interactions=home] .memory-node{transform:translate(-50%,-50%);color:#84ef6b;border-color:#6ed652;background:radial-gradient(circle at 40% 32%,#192b137d,#070d0e 74%);box-shadow:0 0 0 2px #3da82412;transition:color .14s ease,border-color .14s ease,background-color .14s ease}
body[data-ui-interactions=home] .memory-node:is(:hover:not(:disabled):not([aria-disabled=true]),:active:not(:disabled):not([aria-disabled=true]),:focus-visible){transform:translate(-50%,-50%);filter:none}
body[data-ui-interactions=home] .terminal-form:focus-within{border-color:#82d9bf8c;box-shadow:none}
body[data-ui-interactions=home] .terminal-form input:focus-visible{outline:0}
body[data-ui-interactions=home] .terminal-form button{color:#e1e8e2;background:transparent}
body[data-ui-interactions=home] .expand-chat{color:#8a9c9f;background:transparent;opacity:.6;transition:color .14s ease,background-color .14s ease}
body[data-ui-interactions=home] .terminal-panel:hover:not(:disabled):not([aria-disabled=true]) .expand-chat{opacity:.6}
body[data-ui-interactions=home] .expand-chat:focus-visible{opacity:1}
body[data-ui-interactions=home] :is(.dialog-close,.archive-navigation button){color:#d2dcd7;border-color:#839b914b;background:#071013}
body[data-ui-interactions=home] .motion-control{color:#96a19b;background:#03090bcc;opacity:.7}
body[data-ui-interactions=home] .motion-control:is(:hover:not(:disabled):not([aria-disabled=true]),:focus-visible){opacity:.7}
body[data-ui-interactions=home] :is(.project-tabs button,.mobile-panel-tabs button){color:#a7b9b6;background:transparent;border-color:#839b913b}
body[data-ui-interactions=home] .project-tabs button[aria-current=page],
body[data-ui-interactions=home] .mobile-panel-tabs button[aria-selected=true]{color:var(--gold);background:#95ef7d0c;border-color:#61b84c6b}
body[data-ui-interactions=home] .feature-card[href]{border-color:#81aa9c3d}
body[data-ui-interactions=home] .thought-card .thought-image img{transform:none;transition:none}

/* Talk controls use the same palette; the selected history remains distinct. */
body[data-ui-interactions=talk] .header-talk{background:transparent;color:var(--paper);border-color:#63d849}
body[data-ui-interactions=talk] .header-nav a{background:transparent;color:var(--paper)}
body[data-ui-interactions=talk] .new-chat{background:transparent;color:#eef3f0;border-color:#77888e65}
body[data-ui-interactions=talk] .history-item{background:transparent;color:#f1f3ef;border-color:transparent}
body[data-ui-interactions=talk] .history-item:is(.is-active,[aria-current=true],[aria-selected=true]){background:#66dc4613;border-color:#6ee558}
body[data-ui-interactions=talk] .rail-utilities button{color:#f1f3ef;background:transparent}
body[data-ui-interactions=talk] .mobile-toolbar button{color:#bac9c8;background:#03090b;border-color:#849c973e}
body[data-ui-interactions=talk] .message-actions button{color:#b1bdcc;background:transparent}
body[data-ui-interactions=talk] :is(.message-citations a,.dialog-body a){color:var(--gold);background:transparent}
body[data-ui-interactions=talk] .message-trace summary{color:#c5d0d1;background:transparent}
body[data-ui-interactions=talk] .context-action{color:#e6ece9;background:transparent}
body[data-ui-interactions=talk] .context-source a{color:#bdcbd3;background:transparent}
body[data-ui-interactions=talk] .chat-form:focus-within{border-color:#82d9bf8c;box-shadow:none}
body[data-ui-interactions=talk] .chat-form textarea:focus-visible{outline:0}
body[data-ui-interactions=talk] .chat-send{color:#111711;background:var(--gold)}
body[data-ui-interactions=talk] :is(.dialog-header button,.drawer-close){color:#c8d6d4;background:transparent;border-color:#8a9b984f}
body[data-ui-interactions=talk] .dialog-button{color:var(--gold);background:transparent;border-color:#6fb26059}

/* Hover feedback applies only to devices with a real hover pointer. */
@media(hover:hover:not(:disabled):not([aria-disabled=true])) and (pointer:fine){
  body[data-ui-interactions=home] .button-primary:hover:not(:disabled):not([aria-disabled=true]){background:#99f486;border-color:#adf59d}
  body[data-ui-interactions=home] :is(.outline-button,.menu-toggle,.dialog-close,.archive-navigation button):hover:not(:disabled):not([aria-disabled=true]),
  body[data-ui-interactions=talk] :is(.header-talk,.new-chat,.mobile-toolbar button,.dialog-header button,.drawer-close,.dialog-button):hover:not(:disabled):not([aria-disabled=true]){color:var(--interaction-amber);border-color:#87d472;background:var(--interaction-soft)}
  body[data-ui-interactions=home] :is(.header-nav a,.button-secondary,.panel-corner-link,.wallet-view,.text-link,.thought-text a):hover:not(:disabled):not([aria-disabled=true]),
  body[data-ui-interactions=talk] :is(.header-nav a,.rail-utilities button,.message-actions button,.message-citations a,.message-trace summary,.context-action,.context-source a,.dialog-body a):hover:not(:disabled):not([aria-disabled=true]){color:var(--interaction-amber);background:transparent}
  body[data-ui-interactions=home] .button-secondary:hover:not(:disabled):not([aria-disabled=true]){box-shadow:0 1px #95ef7d}
  body[data-ui-interactions=home] .memory-node:hover:not(:disabled):not([aria-disabled=true]){border-color:#99f486;background:#0f1810;box-shadow:0 0 0 2px #56c64226}
  body[data-ui-interactions=home] :is(.terminal-form button,.expand-chat):hover:not(:disabled):not([aria-disabled=true]){color:var(--interaction-focus);background:#82d9bf08}
  body[data-ui-interactions=home] .motion-control:hover:not(:disabled):not([aria-disabled=true]){color:var(--interaction-amber);border-color:#6eba5e77}
  body[data-ui-interactions=home] :is(.project-tabs button,.mobile-panel-tabs button):hover:not(:disabled):not([aria-disabled=true]){color:var(--interaction-amber);background:var(--interaction-soft)}
  body[data-ui-interactions=home] .feature-card[href]:hover:not(:disabled):not([aria-disabled=true]){border-color:#7ecb689c}
  body[data-ui-interactions=talk] .history-item:hover:not(:disabled):not([aria-disabled=true]){background:var(--interaction-soft)}
  body[data-ui-interactions=talk] .history-item:is(.is-active,[aria-current=true],[aria-selected=true]):hover:not(:disabled):not([aria-disabled=true]){background:#66dc461c;border-color:#6ee558}
  body[data-ui-interactions=talk] .chat-send:hover:not(:disabled):not([aria-disabled=true]){background:#a0ff8e}
}
/* Pressed states change shades, never coordinates, scale or border width. */
body[data-ui-interactions=home] .button-primary:active:not(:disabled):not([aria-disabled=true]){background:#88e66f;border-color:#88e66f}
body[data-ui-interactions=home] :is(.outline-button,.menu-toggle,.dialog-close,.archive-navigation button,.project-tabs button,.mobile-panel-tabs button):active:not(:disabled):not([aria-disabled=true]),
body[data-ui-interactions=talk] :is(.header-talk,.new-chat,.mobile-toolbar button,.dialog-header button,.drawer-close,.dialog-button):active:not(:disabled):not([aria-disabled=true]){background:var(--interaction-press);border-color:#87d472;color:var(--interaction-amber)}
body[data-ui-interactions=home] .memory-node:active:not(:disabled):not([aria-disabled=true]){border-color:#99f486;background:#192417;box-shadow:0 0 0 2px #56c64226}
body[data-ui-interactions=home] :is(.terminal-form button,.expand-chat):active:not(:disabled):not([aria-disabled=true]){color:var(--interaction-focus);background:#82d9bf12}
body[data-ui-interactions=talk] .history-item:active:not(:disabled):not([aria-disabled=true]){background:#66dc4620}
body[data-ui-interactions=talk] .chat-send:active:not(:disabled):not([aria-disabled=true]){background:#7bea5e}
body[data-ui-interactions] :is(.header-nav a,.button-secondary,.panel-corner-link,.wallet-view,.text-link,.thought-text a,.rail-utilities button,.message-actions button,.message-citations a,.message-trace summary,.context-action,.context-source a,.dialog-body a):active:not(:disabled):not([aria-disabled=true]){color:var(--interaction-amber)}

/* Disabled capabilities and pending sends never advertise an action. */
body[data-ui-interactions] :is(button:disabled,button[aria-disabled=true]):is(:hover,:active,:focus-visible){box-shadow:none;outline:none;filter:none}
body[data-ui-interactions=talk] .chat-send:disabled{background:#45693f;color:#c5c4b8;border-color:transparent}
body[data-ui-interactions=talk] .feature-control:disabled{color:#a4aeb2;background:transparent;border-color:transparent;box-shadow:none;opacity:.65}
@media(prefers-reduced-motion:reduce){body[data-ui-interactions] :is(a,button,summary){transition:none}}
body[data-ui-interactions] :is(button:disabled,button[aria-disabled=true]){opacity:.65}
body[data-ui-interactions=home] .terminal-form button:disabled{color:#7e9790;background:transparent}
