/**
 * MONONS browser default style reset
 * Loaded before theme.css so site styles own spacing/typography.
 * Intentionally keeps focus outlines and form usability.
 */

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

/* Document */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  line-height: 1.5;
}

html:focus-within {
  scroll-behavior: smooth;
}

/* Remove default body margin and set a neutral base */
body {
  margin: 0;
  min-height: 100%;
}

/* Typography: kill browser heading/p default margins */
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
figure,
pre,
dl,
dd,
ul,
ol {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

/* Lists */
ul,
ol {
  list-style: none;
}

/* Media */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
  background-color: transparent;
}

/* Form controls inherit font; remove browser chrome where safe */
button,
input,
optgroup,
select,
textarea {
  margin: 0;
  padding: 0;
  font: inherit;
  font-size: 100%;
  line-height: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
  appearance: button;
  cursor: pointer;
  background: none;
  border: 0;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

input,
textarea,
select {
  background-color: transparent;
  border: 0;
  border-radius: 0;
}

textarea {
  resize: vertical;
}

/* Remove search cancel button quirks (WebKit) */
[type="search"] {
  -webkit-appearance: textfield;
  appearance: textfield;
  outline-offset: -2px;
}

[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

/* Tables */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

th,
td {
  padding: 0;
  text-align: left;
  font-weight: inherit;
  vertical-align: top;
}

/* HR */
hr {
  box-sizing: content-box;
  height: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid currentColor;
  overflow: visible;
  color: inherit;
}

/* Hidden attribute */
[hidden] {
  display: none !important;
}

/* Summary / details */
summary {
  display: list-item;
  cursor: pointer;
}

/* Fieldset */
fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

legend {
  padding: 0;
}

/* Address / cite */
address {
  font-style: normal;
}

/* Code */
code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 1em;
}

/* Prevent iOS text size adjust on orientation change already covered; touch action default */
/* Keep accessible focus visible — do not remove outline globally */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Reduced motion: honor system preference */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
