/* Shared interaction states. Geometry belongs to each page stylesheet. */
body[data-ui-interactions]{--interaction-focus:#82d9bf;--interaction-amber:#f4cf86;--interaction-soft:#efc47d0c;--interaction-press:#efc47d16}
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,#f0c981,#eabc72) #efc47d;border-color:#f4cf86;color:#09100c;box-shadow:inset 0 1px #ffe3ab55}
body[data-ui-interactions=home] :is(.outline-button,.menu-toggle){background:#050b0e40;border-color:#d6ad65;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:#efc06b;border-color:#d6a452;background:radial-gradient(circle at 40% 32%,#2b21137d,#070d0e 74%);box-shadow:0 0 0 2px #a8792412;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:#efc47d0c;border-color:#b8914c6b}
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:#d8a649}
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:#dca34613;border-color:#e5b858}
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:#b2956059}

/* 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:#f4cf86;border-color:#f5d69d}
  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:#d4af72;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 #efc47d}
  body[data-ui-interactions=home] .memory-node:hover:not(:disabled):not([aria-disabled=true]){border-color:#f4cf86;background:#18170f;box-shadow:0 0 0 2px #c69c4226}
  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:#ba9b5e77}
  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:#cba5689c}
  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:#dca3461c;border-color:#e5b858}
  body[data-ui-interactions=talk] .chat-send:hover:not(:disabled):not([aria-disabled=true]){background:#ffda8e}
}
/* 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:#e6b96f;border-color:#e6b96f}
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:#d4af72;color:var(--interaction-amber)}
body[data-ui-interactions=home] .memory-node:active:not(:disabled):not([aria-disabled=true]){border-color:#f4cf86;background:#242017;box-shadow:0 0 0 2px #c69c4226}
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:#dca34620}
body[data-ui-interactions=talk] .chat-send:active:not(:disabled):not([aria-disabled=true]){background:#eab65e}
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:#695c3f;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}
