/* Shared typography and interaction baseline for every HOCTAP page. */
:root {
  color-scheme: light;
  --site-font: system-ui, "Segoe UI", Arial, Tahoma, sans-serif;
  --site-ink: #172033;
  --site-muted: #5c6b86;
  --site-focus: #3165e8;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--site-font);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  color: var(--site-ink);
  font-family: var(--site-font);
  font-size: 15px;
  line-height: 1.55;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

body,
:root body *:not(code):not(pre):not(kbd):not(samp):not(.material-icons):not(.fa):not([class*="icon"]):not(.MathJax):not([class*="mjx"]):not(.katex),
button,
input,
select,
textarea,
optgroup,
table {
  font-family: var(--site-font) !important;
}

:where(main, section, article, aside, nav, header, footer, [role="main"], .layout, .page, .page-shell, .workspace, .main-area, .main-content, .content-shell, .panel, .card) {
  min-width: 0;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

pre,
.table-responsive,
.table-wrap,
.table-container,
.data-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

[role="dialog"],
dialog,
.dialog-window {
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  overscroll-behavior: contain;
}

/* Keep application text on one locally available font stack. Preserve code typography. */
code,
pre,
kbd,
samp,
:root code,
:root pre,
:root kbd,
:root samp {
  font-family: Consolas, "Cascadia Mono", "Courier New", monospace !important;
}

input[type="password"],
input[type="email"],
input[type="text"],
textarea,
select,
option,
::placeholder {
  font-family: var(--site-font) !important;
  font-synthesis: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--site-ink);
  font-family: var(--site-font) !important;
  line-height: 1.25;
  text-wrap: pretty;
}

p,
li,
label,
small,
button,
input,
select,
textarea {
  line-height: 1.5;
}

button,
[role="button"],
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

:focus-visible {
  outline: 3px solid rgba(49, 101, 232, 0.72);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  input,
  select,
  textarea {
    max-width: 100%;
    font-size: 16px !important;
  }

  .table-responsive,
  .table-wrap,
  .table-container,
  .data-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
