html {
  box-sizing: border-box;
}

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

body {
  font-size: 1.075rem;
  font-weight: 400;
  line-height: 1.68;
  margin: 0;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-overflow-scrolling: touch;
  -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6,
.blog-title,
.post-title {
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.12;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.65rem, 3vw, 2.15rem);
}

h3 {
  font-size: 1.4rem;
}

h4,
h5,
h6 {
  font-size: 1.1rem;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
figure,
table,
pre,
blockquote {
  margin: 1.65rem 0;
}

a,
a:visited {
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}

a:hover,
a:focus-visible {
  text-decoration-color: currentColor;
}

img,
video {
  display: block;
  height: auto;
  max-width: 100%;
}

figure img,
figure video {
  margin-bottom: 0;
}

figure figcaption {
  border-bottom-style: solid;
  border-bottom-width: 1px;
  font-size: 0.88rem;
  margin-top: 0;
  padding: 0.65rem 0;
}

ul,
ol {
  margin-left: 1.5em;
  padding: 0;
}

code,
kbd {
  font-size: 0.88em;
}

code {
  border-style: solid;
  border-width: 1px;
  margin: 0 0.12rem;
  padding: 0.08rem 0.35rem;
}

kbd {
  border-style: solid;
  border-width: 1px 1px 3px;
  padding: 0.08rem 0.35rem;
}

code code {
  background: transparent;
  border: 0;
  margin: 0;
  padding: 0;
}

pre,
pre.highlight {
  border-style: solid;
  border-width: 1px;
  border-radius: 0.2rem;
  font-size: 0.9rem;
  line-height: 1.6;
  overflow: auto;
  padding: 1.2rem;
  tab-size: 4;
}

pre code,
pre.highlight code {
  background: transparent;
  border: 0;
  color: inherit;
  margin: 0;
  padding: 0;
}

blockquote {
  border-left-style: solid;
  border-left-width: 3px;
  font-size: 1.08em;
  font-style: italic;
  margin-left: 0;
  margin-right: 0;
  padding: 0.2rem 0 0.2rem 1.35rem;
}

blockquote > :first-child {
  margin-top: 0;
}

blockquote > :last-child {
  margin-bottom: 0;
}

table {
  border-collapse: collapse;
  table-layout: auto;
  width: 100%;
}

table,
th,
td {
  border-style: solid;
  border-width: 1px;
}

th,
td {
  padding: 0.75rem;
  text-align: left;
}

th {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

hr {
  border: 0;
  height: 1px;
  width: 100%;
}

fieldset {
  border-style: solid;
  border-width: 1px;
  margin: 0;
  padding: 1rem;
}

label {
  display: inline-block;
}

:where(
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  textarea,
  select,
  house-md
) {
  appearance: none;
  border-style: solid;
  border-width: 1px;
  border-radius: 0.15rem;
  box-sizing: border-box;
  font-size: 1rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.8rem;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

:where(
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  select
) {
  height: 2.75rem;
  line-height: 1.2;
}

textarea {
  line-height: 1.5;
  min-height: 7rem;
  resize: vertical;
}

select {
  background-position: calc(100% - 1.1rem) calc(50% - 0.15rem), calc(100% - 0.8rem) calc(50% - 0.15rem);
  background-repeat: no-repeat;
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  padding-right: 2.5rem;
}

:where(
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  textarea,
  select
):focus-visible,
house-md:focus-within {
  outline: none;
}

:where(button:not(house-md-toolbar button):not(.md-close), .btn, input[type="submit"]) {
  align-items: center;
  appearance: none;
  background-color: transparent;
  border-style: solid;
  border-width: 1px;
  border-radius: 0.15rem;
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.92rem;
  font-weight: 600;
  gap: 0.4rem;
  justify-content: center;
  min-height: 2.75rem;
  line-height: 1.2;
  padding: 0.5rem 1rem;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

:where(button:not(house-md-toolbar button):not(.md-close), .btn, input[type="submit"]):focus-visible {
  outline-style: solid;
  outline-width: 2px;
  outline-offset: 2px;
}

:where(button:not(house-md-toolbar button):not(.md-close), .btn, input[type="submit"]):active {
  transform: translateY(1px);
}

.flash-message-text {
  color: inherit;
}

.admin-search-fieldset,
.admin-rich-text-box,
.admin-fieldset,
.signup-fieldset,
.search-fieldset {
  border-radius: 0.15rem;
}

.admin-rich-text-box,
.admin-fieldset,
.signup-fieldset,
.search-fieldset {
  border-style: solid;
  border-width: 1px;
}

.admin-search-fieldset legend,
.signup-fieldset legend,
.search-fieldset legend {
  letter-spacing: 0.05em;
}

@media (max-width: 640px) {
  body {
    font-size: 1rem;
  }
}
