@font-face {
  font-family: "Alte Haas Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/AlteHaasGroteskRegular.ttf") format("truetype");
}

@font-face {
  font-family: "Alte Haas Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/AlteHaasGroteskBold.ttf") format("truetype");
}

@font-face {
  font-family: "Century Schoolbook";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/CenturySchoolbook-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Minion Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/MinionPro-Regular.otf") format("opentype");
}

:root {
  --paper: #fbfaf1;
  --paper-deep: #f3efe5;
  --ink: #090909;
  --muted: #59564f;
  --line: #22201c;
  --soft-line: #d8d1c4;
  --accent: #7a5b34;
  --warning: #6c1717;
  --focus: #005fcc;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 6rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Alte Haas Grotesk", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

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

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  inset-block-start: 1rem;
  inset-inline-start: 1rem;
  z-index: 1000;
  transform: translateY(-160%);
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  padding: 0.75rem 1rem;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 241, 0.96);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 4.5rem;
}

.brand {
  flex: 0 0 auto;
}

.brand img {
  width: 8.25rem;
}

.top-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.top-nav a {
  display: inline-block;
  padding: 0.35rem 0;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.top-nav a:hover {
  border-bottom-color: currentColor;
}

.mobile-nav {
  display: none;
  position: relative;
}

.mobile-nav summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 8rem;
  min-height: 2.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav summary::after {
  content: "";
  width: 0.9rem;
  height: 0.72rem;
  flex: 0 0 0.9rem;
  background:
    linear-gradient(var(--ink), var(--ink)) top center / 100% 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 100% 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) bottom center / 100% 1px no-repeat;
}

.mobile-nav[open] summary::after {
  height: 0.9rem;
  background:
    linear-gradient(45deg, transparent calc(50% - 0.5px), var(--ink) calc(50% - 0.5px), var(--ink) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(-45deg, transparent calc(50% - 0.5px), var(--ink) calc(50% - 0.5px), var(--ink) calc(50% + 0.5px), transparent calc(50% + 0.5px));
}

.mobile-nav nav {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: min(18rem, calc(100vw - 2rem));
  box-shadow: 0 0.45rem 1rem rgba(34, 32, 28, 0.12);
}

.mobile-nav ul {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--paper);
  list-style: none;
}

.mobile-nav li + li {
  border-top: 1px solid var(--soft-line);
}

.mobile-nav a {
  display: block;
  padding: 0.8rem 0.85rem;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.mobile-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.toc-list {
  display: block;
  max-width: 23rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-list li {
  border-top: 1px solid var(--soft-line);
}

.toc-list li:last-child {
  border-bottom: 1px solid var(--soft-line);
}

.toc-list a {
  display: block;
  padding: 0.45rem 0;
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.18em;
}

.toc-list a:hover {
  text-decoration-thickness: 0.12em;
}

.hero {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.hero-inner {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 42rem) minmax(17rem, 23rem);
  grid-template-areas:
    "title product"
    "intro product";
  align-items: start;
  justify-content: space-between;
  gap: 2rem clamp(3rem, 6vw, 5rem);
  padding: clamp(3rem, 5vw, 4.4rem) 0 clamp(3rem, 4.5vw, 4rem);
}

.hero h1 {
  max-width: 42rem;
  margin: 0;
  font-family: "Century Schoolbook", Georgia, serif;
  font-size: clamp(4rem, 5.35vw, 5.2rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0;
}

.keep-together {
  white-space: nowrap;
}

.manual-title-line {
  display: block;
}

.hero-title-row {
  grid-area: title;
  align-self: end;
  max-width: 100%;
}

.hero-tagline {
  margin: 1.35rem 0 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.intro-grid {
  grid-area: intro;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(10rem, 0.85fr);
  gap: 2.5rem;
  align-items: start;
  max-width: 42rem;
}

.intro-grid h2,
.intro-grid h3,
.toc h2 {
  margin: 0 0 0.8rem;
  font-size: 1rem;
  line-height: 1.2;
}

.intro-grid p {
  max-width: 28rem;
  margin: 0;
}

.hero-product {
  grid-area: product;
  align-self: center;
  justify-self: center;
  margin: 0;
}

.hero-product img {
  width: min(100%, 23rem);
  max-height: min(68vh, 38rem);
  object-fit: contain;
  margin-inline: auto;
}

.hero-product figcaption {
  max-width: 19rem;
  margin: 1.5rem auto 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.thank-you {
  border-bottom: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
}

.thank-you .inner {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 2rem 0;
  text-align: center;
  font-size: 1.35rem;
  line-height: 1.35;
}

.manual-section {
  border-bottom: 1px solid var(--line);
}

.manual-section > .section-inner {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(12rem, 20rem) minmax(0, 1fr);
  gap: 3rem;
  padding: 5rem 0;
}

.manual-section h2 {
  position: sticky;
  top: 6rem;
  align-self: start;
  margin: 0;
  font-family: "Alte Haas Grotesk", Arial, sans-serif;
  font-size: 2.45rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0;
}

.mixed-title span:first-child {
  font-family: "Alte Haas Grotesk", Arial, sans-serif;
  font-weight: 700;
}

.mixed-title span + span {
  font-family: "Century Schoolbook", Georgia, serif;
  font-weight: 400;
}

.mixed-subtitle span:first-child {
  font-family: "Alte Haas Grotesk", Arial, sans-serif;
  font-weight: 700;
}

.mixed-subtitle span + span {
  font-family: "Century Schoolbook", Georgia, serif;
  font-weight: 400;
}

.content > *:first-child,
.subsection > *:first-child {
  margin-top: 0;
}

.content,
.manual-section > .section-inner > * {
  min-width: 0;
}

.content > *:last-child,
.subsection > *:last-child {
  margin-bottom: 0;
}

.subsection {
  margin-top: 2.75rem;
}

h3 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  line-height: 1.2;
}

h4 {
  margin: 1.75rem 0 0.7rem;
  font-size: 1rem;
  line-height: 1.25;
  text-transform: uppercase;
}

p {
  margin: 0 0 1rem;
}

.lede {
  max-width: 42rem;
  font-size: 1.15rem;
  line-height: 1.45;
}

.rule-list,
.plain-list,
.warranty-list,
.regulatory-list {
  margin: 0;
  padding-inline-start: 1.2rem;
}

.rule-list li,
.plain-list li,
.warranty-list li,
.regulatory-list li {
  margin: 0.45rem 0;
}

.tip-list,
.step-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: item;
}

.tip-list li,
.step-list li {
  counter-increment: item;
  position: relative;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--soft-line);
}

.tip-list li::before,
.step-list li::before {
  content: counter(item);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-weight: 700;
  line-height: 1;
}

.callout {
  border: 1px solid var(--line);
  border-left: 0.5rem solid var(--line);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: #fff;
}

.callout.warning {
  border-color: var(--warning);
  border-left-color: var(--warning);
}

.callout strong {
  display: block;
  margin-bottom: 0.25rem;
}

.callout .plain-list {
  margin-top: 0.5rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.feature-box {
  border-top: 2px solid var(--line);
  padding-top: 1rem;
}

.manual-figure {
  margin: 1.5rem 0 0;
}

.manual-figure img {
  width: 100%;
  border: 1px solid var(--soft-line);
  background: var(--paper);
  padding: 1rem;
}

.shelf-guide-figure img {
  padding-bottom: 0;
}

.manual-figure figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.figure-stack {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.wide-figure {
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.wide-figure img {
  width: max(43rem, 100%);
  max-width: none;
}

.control-panel-figure {
  margin-top: 1.2rem;
}

.control-panel-figure img {
  border: 0;
  background: transparent;
  padding: 0;
}

.paired {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.paired > div {
  border: 1px solid var(--soft-line);
  padding: 1rem;
  background: #fff;
}

.table-scroll {
  overflow-x: auto;
  margin: 1.25rem 0 2rem;
  border: 1px solid var(--line);
  background: #fff;
}

table {
  width: 100%;
  min-width: 43rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.shelf-table {
  min-width: 50rem;
}

.troubleshooting-table {
  min-width: 50rem;
}

.shelf-number-col {
  width: 9%;
}

.shelf-largest-col {
  width: 27%;
}

.shelf-other-col {
  width: 32%;
}

caption {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-weight: 700;
}

th,
td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--soft-line);
  vertical-align: top;
  text-align: left;
}

th {
  font-weight: 700;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

.control-panel-row th {
  text-align: center;
  background: var(--paper-deep);
}

.cell-list {
  margin: 0;
  padding-inline-start: 1rem;
}

.cell-list li {
  margin: 0.2rem 0;
}

.cell-value {
  display: block;
  line-height: 1.18;
}

.cell-note {
  display: block;
  margin-top: 0.08rem;
  color: var(--ink);
  font-size: 0.78em;
  line-height: 1.18;
}

.definition-list {
  margin: 0;
}

.definition-list div {
  border-top: 1px solid var(--soft-line);
  padding: 1rem 0;
}

.definition-list dt {
  margin: 0 0 0.25rem;
  font-weight: 700;
}

.definition-list dd {
  margin: 0;
}

.control-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.control-list li {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr);
  gap: 1.15rem;
  padding: 1rem 0;
}

.control-number {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border: 1px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1;
}

.control-list strong,
.door-alarm-note strong {
  font-weight: 700;
}

.control-list p {
  margin: 0.2rem 0 0;
}

.door-alarm-note {
  margin-top: 1.35rem;
}

.do-dont {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
  margin: 1.25rem 0;
}

.do-dont > div {
  border-top: 2px solid var(--line);
  padding-top: 1rem;
}

.legal {
  font-family: "Alte Haas Grotesk", Arial, sans-serif;
}

.legal h3 {
  margin-top: 2.25rem;
  text-transform: uppercase;
}

.legal h3:first-child {
  margin-top: 0;
}

.legal p {
  max-width: 48rem;
}

.site-footer {
  background: var(--ink);
  color: var(--paper);
}

.site-footer .inner {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 2rem 0;
}

.site-footer p {
  margin: 0;
}

@media (min-width: 981px) and (max-width: 1212px) {
  .manual-section > .section-inner {
    grid-template-columns: minmax(10.5rem, 11.25rem) minmax(0, 1fr);
    gap: clamp(1rem, 1.4vw, 1.25rem);
  }

  .manual-section h2 {
    font-size: 1.35rem;
    line-height: 1.08;
  }

  table {
    font-size: 0.9rem;
  }

  th,
  td {
    padding: 0.75rem 0.8rem;
  }

  .shelf-table,
  .troubleshooting-table {
    min-width: 47rem;
  }

  .wide-figure img {
    width: max(39rem, 100%);
  }
}

@media (min-width: 861px) and (max-width: 980px) {
  .manual-section > .section-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .manual-section h2 {
    position: static;
    font-size: 2rem;
  }
}

@media (max-width: 900px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 0;
  }

  .top-nav {
    width: 100%;
  }

  .hero {
    background: var(--paper);
  }

  .hero-inner,
  .manual-section > .section-inner,
  .intro-grid,
  .feature-grid,
  .paired,
  .do-dont {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "product"
      "intro";
    gap: 2rem;
    padding: 3rem 0;
  }

  .hero-copy {
    min-height: 0;
  }

  .hero h1 {
    max-width: 12.5ch;
    font-size: 3rem;
  }

  .manual-section > .section-inner {
    gap: 2rem;
    padding: 3.5rem 0;
  }

  .manual-section h2 {
    position: static;
    font-size: 2rem;
  }
}

@media (max-width: 860px) {
  .table-scroll {
    overflow-x: visible;
    border: 0;
    background: transparent;
  }

  table,
  .shelf-table,
  .troubleshooting-table {
    display: block;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
  }

  colgroup {
    display: none;
  }

  caption {
    display: block;
    border: 1px solid var(--soft-line);
    border-bottom: 0;
    background: var(--paper);
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  thead tr,
  thead th {
    width: 1px;
    padding: 0;
    border: 0;
  }

  tbody,
  tr,
  th,
  td {
    display: block;
    width: 100%;
  }

  tbody tr {
    margin-bottom: 0.9rem;
    border: 1px solid var(--soft-line);
    background: var(--paper);
  }

  tbody th,
  tbody td {
    border-bottom: 1px solid var(--soft-line);
    padding: 0.75rem 1rem;
  }

  tbody tr > :last-child {
    border-bottom: 0;
  }

  .shelf-table tbody td:empty {
    display: none;
  }

  .control-panel-row {
    border-color: var(--line);
  }

  .control-panel-row th {
    border-bottom: 0;
  }

  .shelf-table tbody th[scope="row"]::before,
  .shelf-table tbody td::before,
  .troubleshooting-table tbody th[scope="row"]::before,
  .troubleshooting-table tbody td::before {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .shelf-table tbody th[scope="row"]::before {
    content: "Shelf";
  }

  .shelf-table tbody td:nth-of-type(1)::before {
    content: "Largest bottle that fits";
  }

  .shelf-table tbody td:nth-of-type(2)::before,
  .shelf-table tbody td:nth-of-type(3)::before {
    content: "Everything else that fits too";
  }

  .troubleshooting-table tbody th[scope="row"]::before {
    content: "Problem";
  }

  .troubleshooting-table tbody td:nth-of-type(1)::before {
    content: "Possible Causes";
  }

  .troubleshooting-table tbody td:nth-of-type(2)::before {
    content: "What To Do";
  }

  .control-panel-row th::before {
    content: none;
  }

  .control-panel-figure img {
    width: max(43rem, 100%);
  }
}

@media (max-width: 700px) {
  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: nowrap;
  }

  .top-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
    flex: 0 0 auto;
    width: auto;
    margin-left: auto;
  }
}

@media (max-width: 560px) {
  .brand img {
    width: 6.5rem;
  }

  .toc-list {
    display: block;
  }

  .toc-list li {
    border-top: 1px solid var(--soft-line);
  }

  .toc-list a {
    display: block;
    padding: 0.65rem 0;
  }

  .hero h1 {
    font-size: clamp(2.25rem, 11vw, 2.45rem);
  }

  .thank-you .inner {
    font-size: 1.15rem;
  }

  .tip-list li,
  .step-list li {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .tip-list li::before,
  .step-list li::before {
    width: 1.75rem;
    height: 1.75rem;
  }
}

@media print {
  .site-header,
  .skip-link {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .hero,
  .manual-section,
  .thank-you {
    break-inside: avoid;
    border-color: #000;
  }

  .hero-inner,
  .manual-section > .section-inner {
    width: auto;
    display: block;
    padding: 1.5rem 0;
  }

  a {
    text-decoration: none;
  }
}
