/* The same visible keyboard cue works on academy colors, photography and dark surfaces. */
@media screen {
  html body :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 0 0 6px #232323;
  }
  html body a[data-skip-link] {
    position: fixed;
    inset: .75rem auto auto .75rem;
    z-index: 100;
    width: max-content;
    max-width: calc(100vw - 1.5rem);
    height: auto;
    margin: 0;
    padding: .7rem 1rem;
    transform: translateY(calc(-100% - 1.5rem));
    clip: auto;
    clip-path: none;
    overflow: visible;
    color: #171817;
    background: #fff;
    border-radius: .35rem;
    font: 600 1rem/1.4 system-ui, sans-serif;
    text-decoration: underline;
    text-underline-offset: .18em;
  }
  html body a[data-skip-link]:focus { transform: none; }
  .owner-management main[id], .portal .workspace-pages { scroll-margin-top: var(--bar, 4.5rem); }
  .management .manage-heading > * { min-width: 0; }
  .management .manage-heading h1 { text-wrap: balance; overflow-wrap: anywhere; }
  .management .manage-heading p { max-inline-size: 62ch; text-wrap: pretty; }
  .management .manage-heading :is(label, select) { max-inline-size: 100%; }
}
@media screen and (max-width: 700px) {
  /* A 16px text field keeps iOS from zooming away from the rest of a form. */
  html body:not(.terminal) :is(select, textarea, input:not([type=checkbox], [type=radio], [type=range], [type=file], [type=color], [type=submit], [type=button], [type=image], [type=reset], [type=hidden])) {
    font-size: max(16px, 1em);
  }
}
@media (forced-colors: active) {
  html body :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline-color: Highlight;
    box-shadow: none;
  }
}
@media print {
  html body a[data-skip-link] { display: none; }
}

/* Legal navigation remains available before a visitor signs in or submits a form. */
footer.policy-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  width: min(90%, 72rem);
  margin: 2rem auto;
  padding-block: .75rem;
  gap: .2rem 1.3rem;
  font: inherit;
  font-size: .875rem;
  color: inherit;
}
footer.policy-links a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-underline-offset: .2em; }

/* Let the existing form and navigation layouts reflow at larger text sizes. */
@media screen and (max-width: 700px) {
  html[data-mat-surface="work"] main :is(form, fieldset, label, input, select, textarea) {
    min-inline-size: 0;
    max-inline-size: 100%;
    box-sizing: border-box;
  }
  html[data-mat-surface="work"] main :is(button, summary, .billing-links a) {
    max-inline-size: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  html[data-mat-surface="work"] .billing-links,
  html[data-mat-surface="work"] .mgmt-header { flex-wrap: wrap; }
  html[data-mat-surface="work"] .mgmt-header > .workspace-return {
    min-inline-size: 0;
    max-inline-size: 100%;
    flex: 0 1 auto;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
@media screen and (max-width:700px){
  html:is([data-mat-surface="work"],[data-mat-surface="family"]) main :is(h1,h2,#address),
  html:is([data-mat-surface="work"],[data-mat-surface="family"]) .mgmt-header :is(#school,#back){
    min-width:0;max-inline-size:100%;white-space:normal;overflow-wrap:anywhere;
  }
  html[data-mat-surface="work"] #setup nav.settings-shortcuts a{
    min-width:0;display:block;align-content:center;max-inline-size:100%;overflow-wrap:anywhere;white-space:normal;
  }
}
