
/* Breakglass v8.1 — whole-site accessibility polish */
:where(button,a,[role="button"],[role="checkbox"],input,select,textarea):focus-visible{
  outline:2px solid var(--fg)!important;
  outline-offset:3px!important
}
.utility-btn{
  min-width:40px!important;
  height:40px!important;
  padding-inline:11px!important;
  font-size:10.5px!important
}
.mode{
  min-height:44px;
  padding:11px 10px!important;
  font-size:11px!important;
  line-height:1.3!important
}
.clear{min-width:40px;min-height:40px;font-size:10.5px!important}
.quick{min-height:40px;padding:10px 13px!important;font-size:11px!important}
.quick-title,.identity-state,.stamp,.exposure-title,.audit-title{font-size:10px!important}
.person-note,.exposure-status,.note,.micro{font-size:11.5px!important}
.protocol-flow{font-size:9.5px!important;line-height:1.4!important}
.protocol-modes{font-size:10px!important;line-height:1.45!important}
.privacy-link{min-height:38px;display:inline-flex;align-items:center;font-size:10px!important}
.feedback-open,.extension-download{min-height:44px}
@media(max-width:760px){
  .utility-btn{min-width:40px!important;height:40px!important;padding-inline:9px!important}
}
@media(prefers-reduced-motion:reduce){
  html:focus-within{scroll-behavior:auto}
}
@media(forced-colors:active){
  :where(button,a,[role="button"],[role="checkbox"],input,select,textarea){forced-color-adjust:auto}
}


/* ================================================================
   v8.8 · SUBTLE GAME DISCOVERY ACCENT
   GAME remains subordinate to the primary Breakglass action.
   ================================================================ */
.tc-game-btn-wrap{
  position:relative;
  isolation:isolate;
}
.tc-game-btn-wrap .game-mode-btn{
  position:relative;
  overflow:hidden;
  transition:
    color .18s ease,
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease,
    transform .18s ease;
}
.tc-game-btn-wrap .game-mode-btn::before{
  content:"";
  position:absolute;
  z-index:-1;
  inset:-1px;
  border-radius:inherit;
  background:linear-gradient(
    105deg,
    transparent 0%,
    transparent 34%,
    rgba(244,241,234,0) 40%,
    rgba(244,241,234,.12) 49%,
    rgba(118,223,161,.08) 54%,
    rgba(244,241,234,0) 62%,
    transparent 68%,
    transparent 100%
  );
  transform:translateX(-145%);
  opacity:0;
  pointer-events:none;
}
.tc-game-btn-wrap.game-nudge .game-mode-btn{
  color:color-mix(in srgb,var(--fg) 88%,var(--green) 12%);
  border-color:color-mix(in srgb,var(--line2) 82%,var(--green) 18%);
  background:color-mix(in srgb,var(--control) 96%,var(--green) 4%);
  box-shadow:0 0 0 1px rgba(118,223,161,.018),0 7px 22px rgba(0,0,0,.055);
}
.tc-game-btn-wrap.game-nudge .game-mode-btn::before{
  opacity:1;
  animation:gameDiscoveryGlint 1.15s cubic-bezier(.22,.75,.2,1) forwards;
}
@keyframes gameDiscoveryGlint{
  0%{transform:translateX(-145%);opacity:0}
  16%{opacity:.72}
  78%{opacity:.46}
  100%{transform:translateX(145%);opacity:0}
}

/* Active = status, not CTA. */
.tc-game-btn-wrap .game-mode-btn.active{
  color:color-mix(in srgb,var(--fg) 86%,var(--green) 14%)!important;
  border-color:rgba(118,223,161,.22)!important;
  background:
    linear-gradient(180deg,rgba(118,223,161,.035),rgba(118,223,161,.014)),
    var(--control)!important;
  box-shadow:inset 0 0 0 1px rgba(118,223,161,.025);
}
.tc-game-btn-wrap .game-mode-btn.active::after{
  content:"";
  position:absolute;
  right:8px;
  top:8px;
  width:4px;
  height:4px;
  border-radius:50%;
  background:var(--green);
  opacity:.55;
  box-shadow:0 0 7px rgba(118,223,161,.22);
}
.tc-game-btn-wrap .game-mode-btn:hover{
  border-color:color-mix(in srgb,var(--line2) 88%,var(--green) 12%);
}

html[data-theme="light"] .tc-game-btn-wrap .game-mode-btn::before{
  background:linear-gradient(
    105deg,
    transparent 0%,
    transparent 34%,
    rgba(24,22,19,0) 40%,
    rgba(24,22,19,.075) 49%,
    rgba(55,147,97,.07) 54%,
    rgba(24,22,19,0) 62%,
    transparent 68%,
    transparent 100%
  );
}

@media(prefers-reduced-motion:reduce){
  .tc-game-btn-wrap.game-nudge .game-mode-btn::before{
    animation:none!important;
    opacity:0!important;
  }
  .tc-game-btn-wrap.game-nudge .game-mode-btn{
    border-color:color-mix(in srgb,var(--line2) 86%,var(--green) 14%);
    background:color-mix(in srgb,var(--control) 97%,var(--green) 3%);
  }
}


/* ================================================================
   v8.9 · FRIENDLIER CONTRAST
   Deliberately incremental: retain the dark editorial aesthetic while
   moving secondary information away from near-invisible greys.
   ================================================================ */

/* Inline page CSS is declared after this stylesheet, hence !important
   on the shared custom properties is intentional. */
:root{
  --muted:rgba(244,241,234,.64)!important;
  --dim:rgba(244,241,234,.43)!important;
  --line:rgba(244,241,234,.14)!important;
  --line2:rgba(244,241,234,.22)!important;
  --control:rgba(255,255,255,.048)!important;
  --control2:rgba(255,255,255,.09)!important;
  --protocolText:rgba(244,241,234,.70)!important;
}
html[data-theme="light"]{
  --muted:rgba(23,21,18,.69)!important;
  --dim:rgba(23,21,18,.48)!important;
  --line:rgba(23,21,18,.15)!important;
  --line2:rgba(23,21,18,.24)!important;
  --control:rgba(23,21,18,.05)!important;
  --control2:rgba(23,21,18,.09)!important;
  --protocolText:rgba(23,21,18,.72)!important;
}

/* A handful of old hard-coded low-contrast values do not use variables. */
.mode{color:rgba(244,241,234,.64)!important}
.searchbox::placeholder,.custom-input::placeholder{color:rgba(244,241,234,.43)!important}
.protocol-disclaimer{color:rgba(244,241,234,.45)!important}
.corner{color:rgba(244,241,234,.34)!important}
.no-results{color:rgba(244,241,234,.53)!important}
html[data-theme="light"] .mode{color:rgba(23,21,18,.66)!important}
html[data-theme="light"] .searchbox::placeholder,
html[data-theme="light"] .custom-input::placeholder{color:rgba(23,21,18,.48)!important}
html[data-theme="light"] .protocol-disclaimer{color:rgba(23,21,18,.52)!important}
html[data-theme="light"] .corner{color:rgba(23,21,18,.43)!important}

/* Keep unavailable game content visibly unavailable, but still readable. */
.tc-overlay .tc-store-row:disabled,
.tc-overlay .tc-upgrade:disabled,
.tc-overlay .tc-prestige-upgrade:disabled:not(.owned),
.tc-overlay .tc-research-item:disabled{
  opacity:.64!important
}

/* GAME/GRA gets one degree more persistent discoverability than v8.8,
   while remaining visually below the main Materializuje się action. */
.tc-game-btn-wrap .game-mode-btn{
  color:color-mix(in srgb,var(--fg) 91%,var(--green) 9%)!important;
  border-color:color-mix(in srgb,var(--line2) 88%,var(--green) 12%)!important;
  background:
    linear-gradient(180deg,rgba(118,223,161,.026),rgba(118,223,161,.008)),
    var(--control)!important;
  box-shadow:
    inset 0 0 0 1px rgba(118,223,161,.018),
    0 4px 14px rgba(0,0,0,.035);
}
.tc-game-btn-wrap .game-mode-btn:hover{
  color:color-mix(in srgb,var(--fg) 86%,var(--green) 14%)!important;
  border-color:rgba(118,223,161,.25)!important;
  background:
    linear-gradient(180deg,rgba(118,223,161,.045),rgba(118,223,161,.014)),
    var(--control)!important;
}

/* Optional OS-level higher-contrast request gets a stronger step without
   changing the default art direction for everyone else. */
@media(prefers-contrast:more){
  :root{
    --muted:rgba(244,241,234,.78)!important;
    --dim:rgba(244,241,234,.60)!important;
    --line:rgba(244,241,234,.23)!important;
    --line2:rgba(244,241,234,.34)!important;
  }
  html[data-theme="light"]{
    --muted:rgba(23,21,18,.80)!important;
    --dim:rgba(23,21,18,.63)!important;
    --line:rgba(23,21,18,.25)!important;
    --line2:rgba(23,21,18,.36)!important;
  }
}

/* v9.0 · Story Mode accessibility */
.tc-story-choice{min-height:48px}
.tc-story-card :where(button):focus-visible{outline:2px solid var(--fg);outline-offset:3px}
@media(prefers-contrast:more){.tc-story-card,.tc-story-choice,.tc-token-economy{border-color:var(--line2)!important}.tc-story-body{color:var(--fg)}}
