:root {
  --main-bg-color: #f0ecdc;
  --secondary-bg-color: #e8e1cd;
  --primary-font-color: #161616;
  --accent-color: #744329;
  --danger-color: #8f332f;
  --page-width: 64rem;
  --page-gutter: clamp(1.25rem, 4vw, 3rem);
  --page-bottom: clamp(5rem, 10vw, 8rem);
}

html {
  background-color: var(--main-bg-color);
}

body {
  color: var(--primary-font-color);
  font-family: "DM Sans", sans-serif;
  line-height: 1.5;
  margin: 0;
}

main {
  min-height: calc(100vh - 12rem);
}

.content-page {
  box-sizing: border-box;
  margin: 0 auto;
  max-width: var(--page-width);
  padding: clamp(2rem, 5vw, 4rem) var(--page-gutter) var(--page-bottom);
}

.content-page--narrow {
  max-width: 40rem;
}

.content-page__back {
  font-size: 0.8rem;
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

.content-page__header {
  border-bottom: 1px solid currentColor;
  margin-bottom: clamp(2rem, 5vw, 3rem);
  padding-bottom: clamp(1.5rem, 4vw, 2rem);
}

.content-page__header h1 {
  font-size: clamp(2.5rem, 7vw, 3.75rem);
  line-height: 1.1;
  margin: 0;
  text-align: left;
}

.content-page__header p {
  line-height: 1.6;
  margin: 0.75rem 0 0;
}

.content-page h2 {
  font-size: clamp(2rem, 5.5vw, 2.8rem);
}

.content-page__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.content-page__list li {
  padding: 1.5rem 0;
}

.content-page__list li + li {
  border-top: 1px solid currentColor;
}

.content-page__list h2 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  line-height: 1.15;
  margin: 0;
}

.content-page__list h2 a {
  text-decoration: none;
}

.content-page__list h2 a:hover {
  text-decoration: underline;
}

.content-page__list p {
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
}

.content-page__empty {
  line-height: 1.6;
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Playfair Display", serif;
}

h1 {
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  line-height: 1.1;
  text-align: center;
}

h2,
.h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.5rem, 7vw, 3.75rem);
  line-height: 1.15;
  text-align: inherit;
}

h3 {
  font-size: clamp(2rem, 6vw, 3rem);
}

.action-button {
  align-items: center;
  background: transparent;
  border: 1px solid currentColor;
  box-sizing: border-box;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.8rem;
  gap: 0.45rem;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.35rem 0.75rem;
  text-decoration: none;
  white-space: nowrap;
}

.action-button:hover {
  background: var(--secondary-bg-color);
  text-decoration: none;
}

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

.action-button img {
  flex: none;
}

.copy-link__button {
  min-width: 8rem;
}

.copy-link__status {
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.edition-status {
  border: 1px solid currentColor;
  color: var(--accent-color);
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 0.4rem 0.55rem;
  text-transform: uppercase;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration: underline;
}

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

.skip-link {
  background: var(--primary-font-color);
  color: var(--main-bg-color);
  left: 1rem;
  padding: 0.75rem 1rem;
  position: fixed;
  top: 1rem;
  z-index: 1000;
}

.skip-link:not(:focus) {
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  padding: 0;
  white-space: nowrap;
  width: 1px;
}

.flash {
  box-sizing: border-box;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  padding: 0.5rem 1.5rem;
  position: sticky;
  text-align: center;
  top: 0;
  width: 100%;
  z-index: 100;
}

.flash[role="alert"] {
  background-color: #e52020;
  color: #fff;
}

.flash[role="status"] {
  background-color: var(--primary-font-color);
  color: var(--main-bg-color);
}

.flash__action-form {
  display: inline;
}

.flash__action {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  font-weight: inherit;
  padding: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

footer {
  background-color: var(--secondary-bg-color);
  border-top: 1px solid currentColor;
  padding: 2rem clamp(1.25rem, 4vw, 3rem);
  text-align: center;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  justify-content: center;
}

footer p {
  font-size: 0.8rem;
  margin: 1.25rem 0 0;
}

.site-header__layout {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr auto 1fr;
  margin: 0 auto;
  max-width: 80rem;
  padding: 1rem clamp(1.25rem, 4vw, 3rem);
}

.site-header__logo {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  font-family: "BBH Bartle", sans-serif;
  font-size: 1.15rem;
  gap: 0.5rem;
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  z-index: 1;
}

.site-header__logo:hover {
  text-decoration: none;
}

.site-header__logo img {
  flex: none;
}

.site-header__menu {
  grid-column: 1 / -1;
  grid-row: 1;
  min-width: 0;
}

.site-header__menu-content {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr auto 1fr;
}

.site-header__menu-toggle {
  display: none;
}

.site-header__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.site-header__nav--primary {
  grid-column: 2;
  justify-content: center;
}

.site-header__nav--account {
  grid-column: 3;
  justify-self: end;
}

.site-header__control {
  color: inherit;
  cursor: pointer;
  font-size: 0.85rem;
  position: relative;
  text-decoration: none;
}

.site-header__control:hover {
  text-decoration: none;
}

.site-header__control:hover::after,
.site-header__control:focus-visible::after,
.site-header__control:active::after,
.site-header__control[aria-current="page"]::after {
  background: currentColor;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  content: "";
  height: 5px;
  left: 50%;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 4px);
  transform: translateX(-50%);
  width: 8px;
}

.site-header__control--button {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

.site-header__control--button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

@media (max-width: 54rem) {
  .site-header__layout {
    display: flex;
    justify-content: space-between;
    position: relative;
  }

  .site-header__menu {
    display: block;
  }

  .site-header__menu-toggle {
    align-items: center;
    cursor: pointer;
    display: flex;
    font-size: 0.85rem;
    gap: 0.6rem;
    min-height: 2.5rem;
    padding: 0 0.15rem;
  }

  .site-header__menu-toggle::after {
    border-bottom: 1px solid currentColor;
    border-right: 1px solid currentColor;
    content: "";
    height: 0.4rem;
    margin-top: -0.2rem;
    transform: rotate(45deg);
    transition: transform 120ms ease;
    width: 0.4rem;
  }

  .site-header__menu-toggle::-webkit-details-marker {
    display: none;
  }

  .site-header__menu-toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
  }

  .site-header__menu[open] .site-header__menu-toggle::after {
    margin-top: 0.2rem;
    transform: rotate(225deg);
  }

  .site-header__menu-content {
    background: var(--main-bg-color);
    border: 1px solid currentColor;
    box-sizing: border-box;
    display: block;
    left: var(--page-gutter);
    padding: 0.5rem;
    position: absolute;
    right: var(--page-gutter);
    top: calc(100% - 0.5rem);
    z-index: 10;
  }

  .site-header__menu:not([open]) .site-header__menu-content {
    display: none;
  }

  .site-header__nav {
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    justify-content: flex-start;
  }

  .site-header__nav--account {
    border-top: 1px solid currentColor;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
  }

  .site-header__control {
    align-items: center;
    box-sizing: border-box;
    display: flex;
    min-height: 2.75rem;
    padding: 0.5rem 0.75rem;
    width: 100%;
  }

  .site-header__control:hover,
  .site-header__control[aria-current="page"] {
    background: var(--secondary-bg-color);
  }

  .site-header__control:hover::after,
  .site-header__control:focus-visible::after,
  .site-header__control:active::after,
  .site-header__control[aria-current="page"]::after {
    content: none;
  }

  .site-header__control--button {
    text-align: left;
  }
}

@media (max-width: 22rem) {
  .site-header__layout {
    padding-inline: 1rem;
  }

  .site-header__logo span {
    display: none;
  }

  .site-header__control {
    font-size: 0.8rem;
  }
}
