/* R100 — FINAL LIGHT MODE CONTRAST CONTRACT.
   Loaded last. Scoped to HypatiaOS light mode only. Wallpaper is untouched. */
[data-hyos-host][data-theme=light]{
  --hy-light-ink:#102238;
  --hy-light-sub:#334d66;
  --hy-light-muted:#4c647b;
  --hy-light-line:#a9bdd1;
  --hy-light-surface:#f7fbff;
  --hy-light-panel:#e7f0f9;
  --hy-light-panel-2:#d7e5f2;
  --hy-light-accent:#0b6078;
  --hy-light-accent-2:#173b57;
}

/* Window chrome */
[data-hyos-host][data-theme=light] .os-window{
  color:var(--hy-light-ink)!important;
  background:linear-gradient(155deg,#f9fcff,#e6eff8)!important
}
[data-hyos-host][data-theme=light] .titlebar{
  color:#172b40!important;
  background:linear-gradient(180deg,#f8fbff,#e9f1f9)!important;
  border-bottom-color:#b8c9da!important
}
[data-hyos-host][data-theme=light] .window-title{
  color:#172b40!important;
  opacity:1!important
}
[data-hyos-host][data-theme=light] .window-body{
  color:var(--hy-light-ink)!important;
  background:linear-gradient(180deg,#f7fbff,#edf4fb)!important
}
[data-hyos-host][data-theme=light] .window-body :is(p,small,label,.muted,[class*="-status"],[class*="-hint"],[class*="-meta"]){
  color:var(--hy-light-sub)!important;
  opacity:1!important
}
[data-hyos-host][data-theme=light] .window-body :is(h1,h2,h3,h4,h5,strong,legend){
  color:var(--hy-light-ink)!important
}
[data-hyos-host][data-theme=light] .window-body :is(input,textarea,select){
  color:#13263b!important;
  -webkit-text-fill-color:#13263b!important;
  background:#f9fcff!important;
  border-color:#9fb7cc!important;
  opacity:1!important
}
[data-hyos-host][data-theme=light] .window-body :is(input,textarea)::placeholder{
  color:#617a92!important;
  opacity:1!important
}
[data-hyos-host][data-theme=light] .window-body :is(button,.hyhub-btn,.hyedit-btn,.hycal-btn,.hytk-button,.hytm-button,.hycrm-btn,.hywh-btn,.hyof-button,.hydr-new-toggle,.hytvl-btn,.hyvox-btn,.hydd-button){
  color:#17324b!important;
  background:linear-gradient(145deg,#f9fcff,#dfeaf5)!important;
  border-color:#8fb1c8!important;
  opacity:1!important
}
[data-hyos-host][data-theme=light] .window-body :is(button,.hyhub-btn,.hyedit-btn,.hycal-btn,.hytk-button,.hytm-button,.hycrm-btn,.hywh-btn,.hyof-button,.hydr-new-toggle,.hytvl-btn,.hyvox-btn,.hydd-button):hover{
  color:#102238!important;
  background:linear-gradient(145deg,#fff,#cfdfec)!important;
  border-color:#348dab!important
}
[data-hyos-host][data-theme=light] .window-body button:disabled{
  color:#6a7f91!important;
  background:#e0e8f0!important;
  opacity:.82!important
}

/* Generic light app shells */
[data-hyos-host][data-theme=light] :is(.hyhub-app,.hycrm-os,.hywh-os,.hycal-lite,.hytm-app,.hytk-app,.hyof-app,.hydr-app,.hyedit,.hyvox-lite-native,.hydd-lite){
  color:var(--hy-light-ink)!important;
  background:linear-gradient(160deg,#f8fbff,#e7f0f9)!important
}
[data-hyos-host][data-theme=light] :is(
  .hyhub-header,.hyhub-bar,.hyhub-list,.hyhub-detail,
  .hycrm-detail,.hycrm-card,
  .hywh-content,.hywh-card,.hywh-table,
  .hycal-head,.hycal-toolbar,.hycal-create,.hycal-event,
  .hytm-head,.hytm-bar,.hytm-list,.hytm-detail,.hytm-card,.hytm-member,
  .hytk-header,.hytk-toolbar,.hytk-list,.hytk-detail,.hytk-ticket,.hytk-message,
  .hyof-head,.hyof-toolbar,.hyof-list,.hyof-file,.hyof-editor,
  .hydr-side,.hydr-head,.hydr-bar,.hydr-tile,.hydr-new,
  .hyedit-top,.hyedit-toolbar,.hyedit-side,.hyedit-library,.hyedit-media-item,
  .hyvox-native-head,.hyvox-side,.hyvox-turn,
  .hydd-hero,.hydd-toolbar,.hydd-metric,.hydd-row
){
  color:var(--hy-light-ink)!important;
  background:linear-gradient(145deg,#f7fbff,#e4edf6)!important;
  border-color:#a7bfd2!important
}
[data-hyos-host][data-theme=light] :is(
 .hycrm-card,.hywh-card,.hycal-event,.hytm-card,.hytm-member,.hytk-ticket,.hytk-message,
 .hyof-file,.hydr-tile,.hyedit-media-item,.hyvox-turn,.hydd-metric,.hydd-row,.hyhub-item,.hyhub-msg,.hyhub-ai-card
):hover{
  background:linear-gradient(145deg,#fff,#dae7f2)!important;
  border-color:#5d9fbd!important
}

/* Chat: complete light treatment */
[data-hyos-host][data-theme=light] .hyos-native-chat{
  color:#102238!important;
  background:#eef5fb!important
}
[data-hyos-host][data-theme=light] .hyos-chat-top{
  background:linear-gradient(95deg,#f8fbff,#e5eef7)!important;
  border-bottom-color:#a7bfd2!important
}
[data-hyos-host][data-theme=light] .hyos-chat-top strong{
  color:#102238!important;
  -webkit-text-fill-color:#102238!important;
  background:none!important
}
[data-hyos-host][data-theme=light] .hyos-chat-top small,
[data-hyos-host][data-theme=light] .hyos-chat-state{
  color:#36526b!important;
  opacity:1!important
}
[data-hyos-host][data-theme=light] .hyos-chat-new{
  color:#f7fdff!important;
  background:linear-gradient(135deg,#0d6078,#173b57)!important;
  border-color:#29a9bf!important
}
[data-hyos-host][data-theme=light] .hyos-chat-sidebar-head,
[data-hyos-host][data-theme=light] .hyos-chat-threads{
  color:#163049!important;
  background:#dce8f2!important;
  border-right-color:#a5bbce!important
}
[data-hyos-host][data-theme=light] .hyos-chat-sidebar-head strong{
  color:#163049!important
}
[data-hyos-host][data-theme=light] .hyos-chat-search{
  color:#13263b!important;
  background:#f8fbff!important;
  border-color:#9ab3c8!important
}
[data-hyos-host][data-theme=light] .hyos-chat-thread{
  color:#334d66!important;
  background:transparent!important;
  border-color:transparent!important
}
[data-hyos-host][data-theme=light] .hyos-chat-thread:hover{
  color:#132b42!important;
  background:#c7dbe8!important;
  border-color:#75a6bf!important
}
[data-hyos-host][data-theme=light] .hyos-chat-thread[data-active=true]{
  color:#f7fdff!important;
  background:linear-gradient(145deg,#0d6078,#173b57)!important;
  border-color:#31c1d6!important;
  box-shadow:0 6px 18px rgba(25,75,99,.18)!important
}
[data-hyos-host][data-theme=light] .hyos-chat-center{
  color:#102238!important;
  background:#f5f9fd!important
}
[data-hyos-host][data-theme=light] .hyos-chat-toolstrip{
  background:#e0ebf4!important;
  border-bottom-color:#adc2d4!important
}
[data-hyos-host][data-theme=light] .hyos-chat-mode,
[data-hyos-host][data-theme=light] .hyos-chat-tool{
  color:#17324b!important;
  background:#edf4fa!important;
  border-color:#92b1c7!important
}
[data-hyos-host][data-theme=light] .hyos-chat-mode[data-active=true]{
  color:#fff!important;
  background:linear-gradient(120deg,#0b6078,#50427e)!important;
  border-color:#33bed2!important
}
[data-hyos-host][data-theme=light] .hyos-chat-messages{
  color:#102238!important;
  background:radial-gradient(ellipse at 60% 20%,rgba(105,150,190,.09),transparent 64%)!important
}
[data-hyos-host][data-theme=light] .hyos-chat-messages .hy-message-bubble,
[data-hyos-host][data-theme=light] .hyos-chat-messages .hy-bubble{
  color:#102238!important;
  background:linear-gradient(145deg,#fbfdff,#e4edf6)!important;
  border-color:#a6bfd2!important;
  box-shadow:0 8px 24px rgba(45,67,93,.10)!important
}
[data-hyos-host][data-theme=light] .hyos-chat-messages .hy-message.user :is(.hy-message-bubble,.hy-bubble){
  background:linear-gradient(145deg,#dceef9,#dfe6fb)!important
}
[data-hyos-host][data-theme=light] .hyos-chat-messages :is(p,li,td,.hy-prose,.hy-user-text,.hy-message-text){
  color:#14283d!important;
  opacity:1!important
}
[data-hyos-host][data-theme=light] .hyos-chat-messages .hy-speaker{
  color:#0b6078!important
}
[data-hyos-host][data-theme=light] .hyos-chat-messages :is(pre,code){
  color:#153548!important;
  background:#e3edf5!important
}
[data-hyos-host][data-theme=light] .hyos-chat-messages blockquote{
  color:#203b54!important;
  background:#dce9f4!important;
  border-left-color:#238aa6!important
}
[data-hyos-host][data-theme=light] .hyos-chat-prompt-tools{
  background:#f5f9fd!important
}
[data-hyos-host][data-theme=light] .hyos-chat-composer{
  color:#102238!important;
  background:linear-gradient(145deg,#e8f1f8,#d7e5f0)!important;
  border-color:#83a9c0!important;
  box-shadow:0 8px 24px rgba(35,61,86,.14)!important
}
[data-hyos-host][data-theme=light] .hyos-chat-composer textarea{
  color:#13263b!important;
  -webkit-text-fill-color:#13263b!important;
  background:#f9fcff!important;
  border-color:#92aec4!important
}
[data-hyos-host][data-theme=light] .hyos-chat-actions button,
[data-hyos-host][data-theme=light] .hyos-chat-send,
[data-hyos-host][data-theme=light] .hyos-chat-stop{
  color:#f8fdff!important;
  background:linear-gradient(135deg,#0d6078,#173b57)!important;
  border-color:#2db2c9!important
}
[data-hyos-host][data-theme=light] .hyos-chat-foot,
[data-hyos-host][data-theme=light] .hyos-chat-disclaimer{
  color:#46627a!important;
  opacity:1!important
}
[data-hyos-host][data-theme=light] .hyos-chat-foot a{
  color:#0b6078!important
}
[data-hyos-host][data-theme=light] .hyos-chat-context-panel{
  color:#17324b!important;
  background:#e6f0f8!important;
  border-color:#89abc1!important
}
[data-hyos-host][data-theme=light] .hyos-chat-call-controls:not([hidden]){
  color:#17324b!important;
  background:#dceaf4!important;
  border-color:#80a9bf!important
}
[data-hyos-host][data-theme=light] .hyos-chat-approval{
  background:rgba(42,58,76,.42)!important
}
[data-hyos-host][data-theme=light] .hyos-chat-approval-card{
  color:#102238!important;
  background:#f7fbff!important;
  border-color:#319ab3!important;
  box-shadow:0 20px 60px rgba(33,49,70,.25)!important
}
[data-hyos-host][data-theme=light] .hyos-chat-approval-card :is(strong,p,pre){
  color:#102238!important
}

/* Service hub / AI primitives */
[data-hyos-host][data-theme=light] .hyhub-terminal{
  color:#143e4a!important;
  background:#e1ebf2!important;
  border-color:#9bb8c9!important
}
[data-hyos-host][data-theme=light] :is(.hy-ui-loader,.hy-ui-trace,.hy-ui-approval,.hy-code-block,.hy-ui-code-body){
  color:#17324b!important;
  background:#e8f1f8!important;
  border-color:#9fb9cc!important
}
[data-hyos-host][data-theme=light] .hy-ui-trace-row{
  color:#17324b!important;
  background:#dbe8f2!important
}
[data-hyos-host][data-theme=light] .hy-ui-tool-chip{
  color:#17324b!important;
  background:#dfeaf3!important;
  border-color:#90aec3!important
}
[data-hyos-host][data-theme=light] .hyhub-live{
  color:#0d5c4f!important;
  background:#d8f0e8!important;
  border-color:#75bba8!important
}
[data-hyos-host][data-theme=light] .hyhub-badge{
  color:#23455d!important;
  background:#dce8f2!important
}

/* App-specific controls and panels that were still hard-dark */
[data-hyos-host][data-theme=light] :is(.hycal-search,.hycal-create input,.hycal-create textarea,.hytk-filter,.hytk-search,.hytk-compose,.hydr-search,.hyof-search,.hytvl-search,.hytvl-source,.hydd-select,.hycrm-search,.hycrm-select,.hywh-search,.hyedit-input,.hyedit-select,.hyvox-input,.hyvox-lang){
  color:#13263b!important;
  background:#f9fcff!important;
  border-color:#98b4c8!important
}
[data-hyos-host][data-theme=light] .hycrm-detail{
  color:#102238!important;
  background:#f5f9fd!important;
  box-shadow:0 16px 48px rgba(36,54,77,.24)!important
}
[data-hyos-host][data-theme=light] .hycrm-avatar{
  color:#0b5268!important;
  background:#c8e9ee!important
}
[data-hyos-host][data-theme=light] .hydr-side{
  background:#dce8f2!important;
  border-right-color:#a6bccf!important
}
[data-hyos-host][data-theme=light] .hydr-new{
  background:#edf4fa!important;
  box-shadow:0 14px 32px rgba(38,55,77,.18)!important
}
[data-hyos-host][data-theme=light] .hywh-table{
  background:#e6eff7!important
}
[data-hyos-host][data-theme=light] .hywh-row strong{
  color:#17324b!important
}
[data-hyos-host][data-theme=light] .hyedit-side{
  background:#e3edf6!important
}
[data-hyos-host][data-theme=light] .hyedit-control{
  color:#29455e!important
}
[data-hyos-host][data-theme=light] .hyvox-side{
  background:#e3edf6!important
}
[data-hyos-host][data-theme=light] .hyvox-turn p{
  color:#243f58!important
}
[data-hyos-host][data-theme=light] .hydd-status{
  color:#145b50!important;
  background:#d9eee8!important;
  border-color:#87bcae!important
}
[data-hyos-host][data-theme=light] .hydd-metric small,
[data-hyos-host][data-theme=light] .hydd-row :is(span,small),
[data-hyos-host][data-theme=light] .hydd-empty{
  color:#3e5870!important
}

/* Media/TV: keep picture/visualizer stages dark, make controls readable */
[data-hyos-host][data-theme=light] .hymedia-lite{
  color:#102238!important;
  background:#0b111b!important
}
[data-hyos-host][data-theme=light] :is(.hymedia-head,.hymedia-controls,.hymedia-library,.hymedia-eq,.hymedia-panel-tabs){
  color:#102238!important;
  background:rgba(229,239,247,.94)!important;
  border-color:#99b5c9!important
}
[data-hyos-host][data-theme=light] .hymedia-btn{
  color:#17324b!important;
  background:#f5f9fd!important;
  border-color:#88a9bf!important
}
[data-hyos-host][data-theme=light] .hymedia-stage,
[data-hyos-host][data-theme=light] .hymedia-video,
[data-hyos-host][data-theme=light] .hymedia-viz{
  background:#02050d!important
}
[data-hyos-host][data-theme=light] .hytvl-app{
  color:#102238!important;
  background:#eef5fb!important
}
[data-hyos-host][data-theme=light] :is(.hytvl-head,.hytvl-nav,.hytvl-strip,.hytvl-body,.hytvl-detail,.hytvl-card){
  color:#102238!important;
  background:#e7f0f8!important;
  border-color:#9fb8cc!important
}
[data-hyos-host][data-theme=light] .hytvl-player,
[data-hyos-host][data-theme=light] .hytvl-frame{
  color:#eaf8ff!important;
  background:#030712!important
}

/* Menus, overlays, dialogs */
[data-hyos-host][data-theme=light] :is(.hyos-profile-menu,.hyos-profile-popover,.notification-center,.hyos-app-options,.hyos-launcher-popover,dialog:not(.hyos-launcher-r17)){
  color:#102238!important;
  background:linear-gradient(145deg,#f8fbff,#e4eef8)!important;
  border-color:#8eacc2!important;
  box-shadow:0 18px 50px rgba(34,52,75,.24)!important
}
[data-hyos-host][data-theme=light] :is(.hyos-profile-menu,.hyos-profile-popover,.notification-center,.hyos-app-options,.hyos-launcher-popover,dialog:not(.hyos-launcher-r17)) :is(p,span,small,label,strong,summary,button){
  opacity:1!important
}
[data-hyos-host][data-theme=light] .hyos-app-more summary{
  color:#f8fdff!important;
  background:#173b57!important;
  border-color:#2aa9c1!important
}
[data-hyos-host][data-theme=light] .hyos-header-controls{
  color:#102238!important;
  background:#e7f0f8!important;
  border-color:#8daac0!important
}
[data-hyos-host][data-theme=light] .notification-center::backdrop,
[data-hyos-host][data-theme=light] dialog::backdrop{
  background:rgba(31,43,59,.34)!important
}

/* Never wash meaningful text in light mode */
[data-hyos-host][data-theme=light] :is(.window-body,.drawer,.notification-center,.hyos-profile-menu,.hyos-profile-popover) :where(p,small,label,span,strong,button,a,li,td,th){
  text-shadow:none
}
