
/*
 INDIEVERSE UNIFIED CONTRAST FOUNDATION V1
 Design-preserving additive stylesheet.
 Both modes use the existing data-iv-theme contract.
*/

html[data-iv-theme="black"] {
  --iv-readable-text:#f2f5ff;
  --iv-readable-muted:#bfcade;
  --iv-readable-placeholder:#aab7ce;
  --iv-readable-border:rgba(222,232,255,.24);
  --iv-readable-focus:#a2dff5;
}

html[data-iv-theme="peach"] {
  --iv-readable-text:#302838;
  --iv-readable-muted:#625465;
  --iv-readable-placeholder:#716273;
  --iv-readable-border:rgba(84,53,73,.27);
  --iv-readable-focus:#17667b;
}

/* Text uses the established theme, never opacity
   as its primary readability mechanism. */

html[data-iv-theme] body {
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

html[data-iv-theme] :is(
  button,input,textarea,select
) {
  font-family:inherit;
}

html[data-iv-theme] :is(
  input,textarea
)::placeholder {
  opacity:1;
}

html[data-iv-theme="black"] :is(
  input,textarea
)::placeholder {
  color:var(--iv-readable-placeholder);
}

html[data-iv-theme="peach"] :is(
  input,textarea
)::placeholder {
  color:var(--iv-readable-placeholder);
}

/* Profile continues using its dedicated theme
   styling; map unified vocabulary to its tokens. */

html[data-iv-theme="black"] {
  --ivp2-readable-text:#f2f5ff;
  --ivp2-readable-muted:#bfcade;
}
html[data-iv-theme="peach"] {
  --ivp2-readable-text:#302838;
  --ivp2-readable-muted:#625465;
}

/* The Moderation page's shared text variables
   were resolving to light text on Peach surfaces. */

html[data-iv-theme="peach"] {
  --iv-text:#302838;
  --iv-muted:#625465;
}

html[data-iv-theme="black"] {
  --iv-text:#f2f5ff;
  --iv-muted:#bfcade;
}

/* Visible focus indicators in either theme. */
html[data-iv-theme] :is(
  input,textarea,select,button,a
):focus-visible {
  outline:2px solid var(--iv-readable-focus);
  outline-offset:2px;
}

html[data-iv-theme="peach"] .ivmp-card
:is(p,small,li,label) {
  color:#dbe4f3 !important;
  opacity:1;
}
html[data-iv-theme="black"] .ivmp-card
:is(p,small,li,label) {
  color:#dbe4f3 !important;
  opacity:1;
}

html[data-iv-theme="peach"] .ivmp-textarea
:is(p,small,li,label) {
  color:#dbe4f3 !important;
  opacity:1;
}
html[data-iv-theme="black"] .ivmp-textarea
:is(p,small,li,label) {
  color:#dbe4f3 !important;
  opacity:1;
}

/*
 IV_SEARCH_FOCUS_UNIFORMITY_V1
 Search focus styling for Glass and Peach.
 Preserve rounded design and keyboard visibility.
*/

html[data-iv-theme] :is(
  .command-bar,
  .iv-command
):focus,
html[data-iv-theme] :is(
  .command-bar,
  .iv-command
):focus-visible {
  outline:none!important;
}

html[data-iv-theme] :is(
  .command-bar input,
  .iv-command input
):focus,
html[data-iv-theme] :is(
  .command-bar input,
  .iv-command input
):focus-visible {
  outline:none!important;
  box-shadow:none!important;
}

/* Rounded focus treatment follows existing search bar. */
html[data-iv-theme] :is(
  .command-bar,
  .iv-command
):focus-within {
  outline:none!important;
  border-radius:999px!important;
}

html[data-iv-theme="peach"] :is(
  .command-bar,
  .iv-command
):focus-within {
  box-shadow:
    0 0 0 2px rgba(167,94,71,.35)!important;
}

html[data-iv-theme="black"] :is(
  .command-bar,
  .iv-command
):focus-within {
  box-shadow:
    0 0 0 2px rgba(160,185,248,.42)!important;
}

