/* Both language names stay in their own language in either edition. */
.ace-language-switch {
  position: sticky;
  top: .35rem;
  z-index: 15;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 .25rem auto;
  display: flex;
  border: 1px solid #b1bfce;
  border-radius: .3rem;
  background: #fff;
  box-shadow: 0 2px 7px #1836530e;
}
.ace-language-switch > * {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: .25rem .85rem;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
}
.ace-language-switch > :first-child {border-radius: .22rem 0 0 .22rem}
.ace-language-switch > :last-child {border-radius: 0 .22rem .22rem 0}
.ace-language-switch [aria-current] {background: #173956; color: #fff}
.ace-language-switch a {color: #173956}
.ace-language-switch a:hover {background: #f6f1e4; text-decoration: underline}
.ace-language-switch a:focus-visible {outline: 3px solid #53779a; outline-offset: 2px}
.ace-day .ace-reader-control {top: 3rem}
.ace-day :is(section, article, aside, h2, h3, h4)[id], .ace-research-page [id] {scroll-margin-top: 4rem}
.ace-day .ace-scene, .ace-day .ace-habit {scroll-margin-top: 7.75rem}
html:lang(en) :is(.ace-day,.ace-research-page) {letter-spacing: normal; overflow-wrap: break-word; hyphens: manual}
html:lang(en) .ace-day .ace-chooser-heading .ace-hero-words h1 {font-size: clamp(2rem,4vw,3.5rem); line-height: 1.12; text-wrap: balance; letter-spacing: -.025em}
html:lang(en) .ace-day .ace-hero-words h1 span {margin-top: .3em; font-size: .61em; line-height: 1.25; letter-spacing: normal}
html:lang(en) .ace-day .ace-hero-scale {flex-wrap: wrap; column-gap: .45em}
html:lang(en) .ace-day .ace-hero-scale strong {font-size: clamp(1.65rem,3vw,2.65rem)}
html:lang(en) .ace-day .ace-hero-evidence-note {flex-basis: 100%; font-size: 1rem}
html:lang(en) .ace-day :is(.ace-keep,.ace-intro-bridge h2 span,.ace-intro-layers p,.ace-book-summary-title span) {white-space: normal}
html:lang(en) :is(.ace-day,.ace-research-page) :is(h2,h3,h4) {line-height: 1.25; text-wrap: balance}
html:lang(en) :is(.ace-day,.ace-research-page) :is(p,li,dd,dt) {line-height: 1.55}
html:lang(en) .ace-day :is(.ace-page-guide,.ace-external-research) a {min-width: 0}
html:lang(en) .ace-day .ace-overview-flow {flex-wrap:wrap}
html:lang(en) .ace-day :is(select,button) {max-width:100%; min-width:0}
html:lang(en) .site-header .corporate-brand {font-size: clamp(14px,2vw,22px)}
@media(max-width:680px) {
  .ace-language-switch > * {min-height:44px}
  .ace-day .ace-reader-control {top: 3.25rem}
  .ace-day .ace-scene, .ace-day .ace-habit {scroll-margin-top: 10rem}
  html:lang(en) .ace-day .ace-overview-flow {gap:.35em}
  html:lang(en) .ace-day .ace-hero-day figcaption strong{font-size:1rem}
  html:lang(en) .ace-day .ace-chooser-heading .ace-hero-words h1{font-size:clamp(2rem,8vw,2.8rem)}
}
@media print {.ace-language-switch {display: none!important}}

/* English qualifiers and units need independent wrapping opportunities. */
html:lang(en) .ace-day .ace-hook-measure {min-width: 0}
html:lang(en) .ace-day .ace-research-hook-number {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: .12em;
  max-width: 100%;
  white-space: normal;
}
html:lang(en) .ace-day .ace-research-hook-number > small {
  flex: 0 0 100%;
  margin: 0;
  line-height: 1.45;
}
html:lang(en) .ace-day .ace-research-hook-number > span {
  margin-left: 0;
  white-space: nowrap;
}
html:lang(en) .ace-day .ace-hero-scale > strong {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  max-width: 100%;
  white-space: normal;
}
html:lang(en) .ace-day .ace-reader-control {flex-wrap: wrap}
html:lang(en) .ace-day .ace-reader-select {min-width: 0; max-width: 100%}
html:lang(en) .ace-day .ace-reader-select select {min-width: 0; max-width: 100%}
@media(max-width:680px) {
  html:lang(en) .ace-day .ace-quick-fields {grid-template-columns: minmax(0,1fr)}
  html:lang(en) .ace-day .ace-quick-fields label {grid-template-columns: minmax(0,1fr)}
}
