/* FoundTag 2.0.2 — contrast and legibility refinement. Purely visual: no flow/API changes. */
:root{
  --ft-muted:#b7c0c9;
  --ft-muted-2:#929daa;
  --ft-border:#39414b;
  --ft-border-strong:#56616d;
  --ft-surface-1:#15191e;
  --ft-surface-2:#1b2026;
  --ft-surface-3:#232a32;
  --ft-surface-elevated:#2b333d;
  --ft-text:#fbfcfd;
  --ft-text-soft:#e5e9ee;
}
html[data-theme="light"]{
  --ft-bg:#f4f6f8;
  --ft-bg-soft:#e9edf1;
  --ft-surface-1:#ffffff;
  --ft-surface-2:#f4f6f8;
  --ft-surface-3:#e9edf1;
  --ft-surface-elevated:#ffffff;
  --ft-text:#11151a;
  --ft-text-soft:#38414b;
  --ft-muted:#5d6874;
  --ft-muted-2:#76818d;
  --ft-border:#cfd6dd;
  --ft-border-strong:#aeb8c2;
}

/* General card and control separation */
.panel,.card,.securityBox,.device,.siteMessage,.v17ShareBlock,.v17ProfileField,
.ft-dashboard-section,.ft-premium-action,.ft-people-summary>div,.ft-people-search,
.modalbox,.loginbox,.ft-theme-selector,.ft-recovery-view .tablewrap{
  border-color:var(--ft-border)!important;
}
.panel,.card.ft-entity-card,.ft-premium-action,.ft-people-summary>div{
  box-shadow:0 10px 28px rgba(0,0,0,.22)!important;
}
html[data-theme="light"] .panel,html[data-theme="light"] .card.ft-entity-card,
html[data-theme="light"] .ft-premium-action,html[data-theme="light"] .ft-people-summary>div{
  box-shadow:0 8px 24px rgba(28,32,38,.09)!important;
}

/* Sidebar and navigation */
.side{border-right-color:var(--ft-border-strong)!important}
.side .logo{padding:10px 12px!important;border:1px solid var(--ft-border)!important;border-radius:16px!important;background:#f7fbfd!important}
.side .foundtag-panel-logo{background:#f7fbfd!important;border-radius:10px!important;padding:4px 6px!important}
.nav button{color:var(--ft-text-soft)!important}
.nav button:hover{background:color-mix(in srgb,var(--ft-text) 7%,transparent)!important;color:var(--ft-text)!important}
.nav button.on{background:color-mix(in srgb,var(--ft-brand-primary) 18%,var(--ft-surface-2))!important;color:var(--ft-text)!important;border-color:color-mix(in srgb,var(--ft-brand-primary) 45%,var(--ft-border))!important}
.ft-external-nav{color:var(--ft-text-soft)!important}

/* Dashboard and secondary text */
.ft-dashboard-sub,.ft-premium-section-head span,.ft-premium-action small,
.ft-theme-panel>small,.ft-people-summary small,.ft-code-label,.ft-recovery-insight small,
.ft-media-pending span,.table th{color:var(--ft-muted)!important}
.ft-premium-action-arrow{color:var(--ft-muted)!important}
#dashboard .stat{border-color:var(--ft-border-strong)!important}
.ft-dashboard-intro{border-color:var(--ft-border-strong)!important}

/* Forms */
.input,.select,.textarea,.field,.ft-site-field input,.ft-site-field select,.ft-site-field textarea{
  border-color:var(--ft-border-strong)!important;
}
.input::placeholder,.textarea::placeholder,.field::placeholder,.ft-site-field input::placeholder,.ft-site-field textarea::placeholder{
  color:var(--ft-muted)!important;
  opacity:1;
}

/* Institutional site */
.ft-site-header{border-bottom-color:var(--ft-border)!important}
.ft-site-links{color:var(--ft-text-soft)!important}
.ft-site-lead,.ft-site-section-head p,.ft-site-copy,.ft-how-step p,.ft-trust-card p,.ft-future-note p{color:var(--ft-text-soft)!important}
.ft-site-micro,.ft-site-footer{color:var(--ft-muted)!important}
.ft-use-stage,.ft-how-step,.ft-trust-card,.ft-site-form,.ft-future-note{border-color:var(--ft-border-strong)!important}
.ft-use-card{border-color:var(--ft-border)!important;background:color-mix(in srgb,var(--ft-surface-1) 88%,#000)!important}
.ft-site-btn-secondary{border-color:var(--ft-border-strong)!important;background:var(--ft-surface-2)!important;color:var(--ft-text)!important}

/* Light theme explicit separation */
html[data-theme="light"] .side .logo,html[data-theme="light"] .side .foundtag-panel-logo{background:#fff!important}
html[data-theme="light"] .ft-use-card{background:#fff!important}
html[data-theme="light"] .ft-site-btn-secondary{background:#fff!important}

/* Focus remains unmistakable */
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{
  outline:3px solid var(--ft-focus)!important;
  outline-offset:3px!important;
}
