/* IWXA Learn assembled Product visual contract R6.5.
 * Loaded after every native module stylesheet that it corrects.
 * It aligns typography, spacing, surfaces and controls without changing
 * application semantics or storage identifiers. */
:root{
  --iwxa-r65-bg:#f5fafb;
  --iwxa-r65-surface:#ffffff;
  --iwxa-r65-surface-soft:#edf5f5;
  --iwxa-r65-ink:#10282d;
  --iwxa-r65-muted:#5b7075;
  --iwxa-r65-line:#d4e1e3;
  --iwxa-r65-primary:#0b8790;
  --iwxa-r65-primary-hover:#086d75;
  --iwxa-r65-danger:#bd3933;
  --iwxa-r65-radius:12px;
  --iwxa-r65-font:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}
html[data-theme="dark"]{
  --iwxa-r65-bg:#10191b;
  --iwxa-r65-surface:#162326;
  --iwxa-r65-surface-soft:#203135;
  --iwxa-r65-ink:#edf5f5;
  --iwxa-r65-muted:#a6b7ba;
  --iwxa-r65-line:#32464a;
}

/* About is a platform-level page. Neither the static Materials local bar nor
 * the native Materials sub-navigation is a second authority here. */
html[data-iwxa-page="about"] #iwxa-unified-shell .iwxa-r8-local,
html[data-iwxa-page="about"] #root nav[data-testid="materials-subnav"],
html[data-iwxa-page="about"] #root nav[aria-label="Раздел «Материалы»"]{
  display:none!important;
}

/* Study: retain workflow layout while using the common Product visual grammar. */
html[data-iwxa-module="study"] body,
html[data-iwxa-module="study"] #root{
  background:var(--iwxa-r65-bg)!important;
  color:var(--iwxa-r65-ink)!important;
  font-family:var(--iwxa-r65-font)!important;
}
html[data-iwxa-module="study"] #root,
html[data-iwxa-module="study"] #root *{
  --font-sans:var(--iwxa-r65-font)!important;
  --font-serif:var(--iwxa-r65-font)!important;
}
html[data-iwxa-module="study"] #root :where(h1,h2,h3,h4,h5,h6,.font-serif){
  color:var(--iwxa-r65-ink)!important;
  font-family:var(--iwxa-r65-font)!important;
  letter-spacing:-.018em!important;
}
html[data-iwxa-module="study"] #root h1{font-size:clamp(2rem,3.2vw,2.75rem)!important;line-height:1.12!important;font-weight:760!important}
html[data-iwxa-module="study"] #root h2{font-size:clamp(1.55rem,2.4vw,2.1rem)!important;line-height:1.2!important;font-weight:740!important}
html[data-iwxa-module="study"] #root h3{font-size:1.2rem!important;line-height:1.3!important;font-weight:720!important}
html[data-iwxa-module="study"] #root :where(.container,.max-w-6xl){max-width:1180px!important}
html[data-iwxa-module="study"] #root :where(.max-w-3xl){max-width:860px!important}
html[data-iwxa-module="study"] #root :where(.rounded-sm,.rounded-md,.rounded-lg){border-radius:var(--iwxa-r65-radius)!important}
html[data-iwxa-module="study"] #root :where(.border,.border-b,.border-t){border-color:var(--iwxa-r65-line)!important}
html[data-iwxa-module="study"] #root :where(.bg-card,.bg-background){background-color:var(--iwxa-r65-surface)!important}
html[data-iwxa-module="study"] #root :where(.bg-muted,.bg-secondary){background-color:var(--iwxa-r65-surface-soft)!important}
html[data-iwxa-module="study"] #root :where(.text-muted-foreground){color:var(--iwxa-r65-muted)!important}
html[data-iwxa-module="study"] #root :where(button,[role="button"],a[class*="inline-flex"]){
  border-radius:10px!important;
  font-family:var(--iwxa-r65-font)!important;
  font-weight:680!important;
}
html[data-iwxa-module="study"] #root :where(.bg-primary,button[class*="bg-primary"]){
  border-color:var(--iwxa-r65-primary)!important;
  background:var(--iwxa-r65-primary)!important;
  color:#fff!important;
}
html[data-iwxa-module="study"] #root :where(.bg-primary,button[class*="bg-primary"]):hover{
  background:var(--iwxa-r65-primary-hover)!important;
}
html[data-iwxa-module="study"] #root :where(input,textarea,select){
  border-color:var(--iwxa-r65-line)!important;
  border-radius:10px!important;
  background:var(--iwxa-r65-surface)!important;
  color:var(--iwxa-r65-ink)!important;
  font-family:var(--iwxa-r65-font)!important;
}
html[data-iwxa-module="study"] #root main{padding-bottom:4rem}

/* Mind: same width, rhythm, typography, cards and controls as the platform. */
html[data-iwxa-module="mind"] body,
html[data-iwxa-module="mind"] #root{
  background:var(--iwxa-r65-bg)!important;
  color:var(--iwxa-r65-ink)!important;
  font-family:var(--iwxa-r65-font)!important;
}
html[data-iwxa-module="mind"] #root :where(h1,h2,h3,p,a,button,input,select,textarea){font-family:var(--iwxa-r65-font)!important}
html[data-iwxa-module="mind"] #root .container{max-width:1180px!important;padding-inline:24px!important}
html[data-iwxa-module="mind"] #root .hero{padding-top:2.5rem!important;padding-bottom:1.75rem!important}
html[data-iwxa-module="mind"] #root .section{padding-top:2rem!important;padding-bottom:2rem!important}
html[data-iwxa-module="mind"] #root h1{font-size:clamp(2rem,3.2vw,2.75rem)!important;line-height:1.12!important;font-weight:760!important;letter-spacing:-.025em!important}
html[data-iwxa-module="mind"] #root h2{font-size:clamp(1.55rem,2.4vw,2.1rem)!important;line-height:1.2!important;font-weight:740!important;letter-spacing:-.018em!important;margin-bottom:.85rem!important}
html[data-iwxa-module="mind"] #root h3{font-size:1.16rem!important;font-weight:720!important;line-height:1.3!important}
html[data-iwxa-module="mind"] #root :where(.lead,.lead-strong){max-width:820px!important}
html[data-iwxa-module="mind"] #root .lead{font-size:1.05rem!important;line-height:1.58!important;color:var(--iwxa-r65-muted)!important}
html[data-iwxa-module="mind"] #root .lead-strong{font-size:1.15rem!important;line-height:1.45!important;color:var(--iwxa-r65-ink)!important}
html[data-iwxa-module="mind"] #root .card,
html[data-iwxa-module="mind"] #root :where(.filters,.note,.result-card,.panel){
  border-color:var(--iwxa-r65-line)!important;
  border-radius:var(--iwxa-r65-radius)!important;
  background:var(--iwxa-r65-surface)!important;
  box-shadow:none!important;
}
html[data-iwxa-module="mind"] #root .card{padding:1.2rem!important}
html[data-iwxa-module="mind"] #root .grid{gap:1rem!important}
html[data-iwxa-module="mind"] #root .btn{
  min-height:42px!important;
  border-color:var(--iwxa-r65-line)!important;
  border-radius:10px!important;
  padding:.65rem 1rem!important;
  background:var(--iwxa-r65-surface)!important;
  color:var(--iwxa-r65-ink)!important;
  font-weight:680!important;
}
html[data-iwxa-module="mind"] #root .btn:hover{background:var(--iwxa-r65-surface-soft)!important;text-decoration:none!important}
html[data-iwxa-module="mind"] #root .btn-primary{
  border-color:var(--iwxa-r65-primary)!important;
  background:var(--iwxa-r65-primary)!important;
  color:#fff!important;
}
html[data-iwxa-module="mind"] #root .btn-primary:hover{border-color:var(--iwxa-r65-primary-hover)!important;background:var(--iwxa-r65-primary-hover)!important;color:#fff!important}
html[data-iwxa-module="mind"] #root :where(input,textarea,select,.choice-btn){border-color:var(--iwxa-r65-line)!important;border-radius:10px!important;font-family:var(--iwxa-r65-font)!important}
html[data-iwxa-module="mind"] #root .site-footer{margin-top:2.5rem!important}

@media(max-width:720px){
  html[data-iwxa-module="mind"] #root .container{padding-inline:16px!important}
  html[data-iwxa-module="mind"] #root .hero{padding-top:1.75rem!important}
  html[data-iwxa-module="study"] #root h1,
  html[data-iwxa-module="mind"] #root h1{font-size:2rem!important}
}
