:root {
  --bench: #161410;
  --bench-edge: #0b0a08;
  --sheet: #e4cfa8;
  --sheet-2: #d7bf96;
  --ink: #0c0b09;
  --ink-soft: #5a5146;
  --rule: rgba(12, 11, 9, 0.28);
  --rule-hard: rgba(12, 11, 9, 0.72);
  --oxide: #8a4226;
  --anvil: #6e541c;
  --anvil-ink: #4e3a12;
  --ave: #6b4456;
  --ave-ink: #4e3140;
  --brass: #8a6a32;
  --amber-led: #e6a23a;
  --filament: #c4842a;
  --font-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --font-body: "Neucha", "Segoe Print", "Comic Sans MS", cursive;
  --font-mono: "Neucha", "Segoe Print", "Comic Sans MS", cursive;
  --pad-x: clamp(1.15rem, 2.8vw, 4rem);
  --frame: clamp(0.5rem, 1.1vw, 0.95rem);
  --sheet-max: 90rem;
  --bench-gap: clamp(0.28rem, 0.75vw, 0.65rem);
  --ui-scale: 1;
  --cut: 11px;
}

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

html {
  scroll-behavior: auto;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: visible;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.35rem);
  font-optical-sizing: auto;
  line-height: 1.55;
  background-color: var(--bench);
  background-image:
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.28) 0 2px,
      transparent 2px 18px
    ),
    radial-gradient(ellipse at 12% 0%, rgba(138, 66, 38, 0.16), transparent 42%),
    radial-gradient(ellipse at 88% 100%, rgba(107, 68, 86, 0.12), transparent 46%),
    linear-gradient(180deg, #2a241c 0%, var(--bench) 38%, var(--bench-edge) 100%);
}

::selection {
  background: var(--oxide);
  color: var(--sheet);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.45rem 0.7rem;
  background: var(--ink);
  color: var(--sheet);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.skip:focus {
  top: 1rem;
}

.sheet {
  position: relative;
  width: min(calc(100% - clamp(0.4rem, 2vw, 1.5rem)), var(--sheet-max));
  min-height: 0;
  margin: clamp(0.2rem, 1vh, 0.85rem) auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: calc(var(--frame) + 0.2rem)
    max(var(--pad-x), env(safe-area-inset-right, 0px))
    0
    max(var(--pad-x), env(safe-area-inset-left, 0px));
  background-color: var(--sheet);
  background-image:
    radial-gradient(ellipse at 8% 92%, rgba(120, 72, 28, 0.07), transparent 36%),
    radial-gradient(ellipse at 96% 6%, rgba(92, 48, 22, 0.05), transparent 28%),
    linear-gradient(rgba(92, 58, 28, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 58, 28, 0.055) 1px, transparent 1px),
    repeating-linear-gradient(
      0deg,
      transparent 0 2px,
      rgba(90, 58, 28, 0.045) 2px 3px
    );
  background-size: auto, auto, 28px 28px, 28px 28px, auto;
  border: 3px solid var(--ink);
  clip-path: polygon(
    var(--cut) 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    var(--cut) 100%,
    0 calc(100% - var(--cut)),
    0 var(--cut)
  );
  box-shadow:
    0 0 0 1px #c4a574,
    0 0 0 6px var(--ink),
    0 1px 0 rgba(255, 236, 200, 0.1) inset,
    inset 0 0 90px rgba(92, 48, 18, 0.05),
    0 18px 36px rgba(0, 0, 0, 0.42);
}

.scan {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 4;
  background: repeating-linear-gradient(
    to bottom,
    rgba(12, 11, 9, 0.05) 0 1px,
    transparent 1px 4px
  );
}

.drawing-frame {
  pointer-events: none;
  position: absolute;
  inset: var(--frame);
  border: 2px solid var(--ink);
  box-shadow: 0 0 0 4px var(--sheet), 0 0 0 5px var(--rule-hard);
  z-index: 2;
}

.reg {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--ink);
  background: radial-gradient(circle at 35% 30%, #6a655c, #1a1814 62%);
  border-radius: 50%;
}

.reg::before,
.reg::after {
  content: "";
  position: absolute;
  background: var(--ink);
}

.reg::before {
  left: -8px;
  top: 50%;
  width: 28px;
  height: 2px;
  transform: translateY(-50%);
}

.reg::after {
  top: -8px;
  left: 50%;
  width: 2px;
  height: 28px;
  transform: translateX(-50%);
}

.reg.tl {
  top: -8px;
  left: -8px;
}

.reg.tr {
  top: -8px;
  right: -8px;
}

.reg.bl {
  bottom: -8px;
  left: -8px;
}

.reg.br {
  bottom: -8px;
  right: -8px;
}

.edge-scale {
  position: absolute;
  top: 2.5rem;
  right: -2px;
  bottom: 2.5rem;
  width: 11px;
  background: repeating-linear-gradient(
    to bottom,
    var(--ink) 0 2px,
    transparent 2px 8px
  );
  opacity: 0.7;
}

.edge-scale-major {
  position: absolute;
  inset: 0 auto 0 0;
  width: 18px;
  transform: translateX(-7px);
  background: repeating-linear-gradient(
    to bottom,
    var(--ink) 0 2px,
    transparent 2px 36px
  );
}

.mast {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 0.45rem 0 0.75rem;
  border-bottom: 3px solid var(--ink);
  box-shadow: 0 3px 0 var(--sheet), 0 5px 0 var(--ink);
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 0.66rem + 0.2vw, 0.82rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mast-co,
.mast-dwg {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-weight: 600;
}

.led {
  width: 0.7rem;
  height: 0.7rem;
  flex: none;
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: inset 0 -1px 2px rgba(0, 0, 0, 0.45);
}

.led-amber {
  background: radial-gradient(circle at 35% 30%, #ffe08a, var(--amber-led) 42%, #c56a10);
}

.led-green {
  background: radial-gradient(circle at 35% 30%, #f0d7a4, var(--filament) 48%, #7a4e16);
}

@media (prefers-reduced-motion: no-preference) {
  .led-amber {
    animation: led-pulse 1.8s ease-in-out infinite;
  }
}

@keyframes led-pulse {
  0%,
  100% {
    box-shadow:
      inset 0 -1px 2px rgba(0, 0, 0, 0.45),
      0 0 0 0 rgba(255, 176, 58, 0);
  }
  50% {
    box-shadow:
      inset 0 -1px 2px rgba(0, 0, 0, 0.45),
      0 0 7px 1px rgba(255, 176, 58, 0.55);
  }
}

.mast-dwg {
  justify-content: flex-end;
  color: var(--ink-soft);
  font-weight: 400;
}

.mast-dwg span:last-child {
  color: var(--ink);
  font-weight: 600;
}

main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.hero {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding: clamp(0.85rem, 2.2vh, 1.7rem) 0 clamp(0.55rem, 1.4vh, 1.2rem);
}

.graticule {
  pointer-events: none;
  position: absolute;
  inset: 0.4rem 0 0.2rem;
  background:
    linear-gradient(var(--ink) 0 0) 20% 42% / 55% 2px no-repeat,
    linear-gradient(var(--ink) 0 0) 12% 18% / 2px 68% no-repeat;
  opacity: 0.12;
}

.note {
  position: relative;
  margin: 0 0 1.1rem;
  max-width: none;
  font-family: var(--font-mono);
  font-size: clamp(0.78rem, 0.7rem + 0.25vw, 0.95rem);
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero h1 {
  position: relative;
  margin: 0;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-right: 0.12em;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4.2rem, 2rem + 12vw, 12rem);
  line-height: 0.82;
  gap: 0.02em;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--oxide);
}

.brand-line,
.product-name {
  position: relative;
  display: block;
  isolation: isolate;
}

.brand-line {
  line-height: 0.82;
}

.outline {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  color: var(--ink);
  -webkit-text-stroke: clamp(3px, 0.4vw, 5px) var(--ink);
  pointer-events: none;
  user-select: none;
}

.fill {
  position: relative;
  z-index: 1;
  -webkit-text-stroke: 0;
}

.brand .fill {
  color: var(--oxide);
}

.lede {
  position: relative;
  margin: 1.35rem 0 0;
  max-width: min(36ch, 100%);
  color: var(--ink-soft);
  font-size: clamp(1.2rem, 1.05rem + 0.4vw, 1.55rem);
  overflow-wrap: anywhere;
}

.catalog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1 1 auto;
  align-items: stretch;
  border-top: 3px solid var(--ink);
}

.product {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(1.5rem, 3.4vh, 2.6rem) 0;
  scroll-margin-top: 1rem;
}

.product-anvil {
  padding-right: clamp(1.25rem, 3vw, 2.5rem);
  border-right: 3px solid var(--ink);
}

.product-ave {
  padding-left: clamp(1.25rem, 3vw, 2.5rem);
}

.product-fig {
  margin: 0 0 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.product-fig span {
  display: inline-block;
  margin-right: 0.55rem;
  padding: 0.08rem 0.4rem 0.04rem;
  border: 2px solid var(--ink);
  color: var(--ink);
  background: var(--sheet-2);
}

.product-name {
  margin: 0;
  overflow: visible;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 2.2rem + 5vw, 8rem);
  line-height: 0.8;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.product-anvil .fill {
  color: var(--anvil);
}

.product-ave .fill {
  color: var(--ave);
}

.product-issue {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.55rem;
  margin: 0.85rem 0 0;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  width: max-content;
  max-width: 100%;
  margin: 0;
  padding: 0.22rem 0.55rem 0.18rem;
  border: 2px solid var(--ink);
  background: var(--sheet-2);
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.product-price-label,
.product-price-unit {
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.product-price-value {
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1.35rem, 1.15rem + 0.45vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}

.product-price-dot {
  display: inline-block;
  position: relative;
  width: 0.28em;
  color: transparent;
}

.product-price-dot::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.08em;
  width: 0.16em;
  height: 0.16em;
  border-radius: 50%;
  background: var(--ink);
  transform: translateX(-50%);
}

.product-buy {
  appearance: none;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.22rem 0.75rem 0.18rem;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--sheet);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color 120ms linear,
    border-color 120ms linear,
    color 120ms linear;
}

.product-anvil .product-buy:hover,
.product-anvil .product-buy:focus-visible {
  background: var(--anvil-ink);
  border-color: var(--anvil-ink);
  color: var(--sheet);
}

.product-ave .product-buy:hover,
.product-ave .product-buy:focus-visible {
  background: var(--ave-ink);
  border-color: var(--ave-ink);
  color: var(--sheet);
}

.product-notes {
  list-style: none;
  margin: 1.15rem 0 0;
  padding: 0;
  max-width: 62ch;
  display: grid;
  gap: 0.7rem 1.35rem;
  align-content: start;
}

@media (min-width: 1100px) {
  .product-notes {
    max-width: none;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
  }
}

.product-notes li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.05rem, 0.98rem + 0.28vw, 1.22rem);
  line-height: 1.5;
  overflow-wrap: break-word;
}

.product-notes li p {
  margin: 0;
  min-width: 0;
}

.product-notes li span {
  display: inline-block;
  margin-top: 0.18rem;
  padding: 0.06rem 0.32rem 0.02rem;
  border: 2px solid var(--ink);
  background: var(--sheet-2);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.2;
}

.title-block {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1.6fr repeat(5, minmax(0, 0.7fr));
  margin: 0 calc(var(--pad-x) * -1 + var(--frame) + 5px)
    calc(var(--frame) + 0.55rem);
  border: 3px solid var(--ink);
  background: var(--sheet-2);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tb-cell {
  padding: 0.45rem 0.65rem 0.55rem;
  border-right: 2px solid var(--ink);
  min-width: 0;
}

.tb-cell:last-of-type {
  border-right: none;
}

.tb-label {
  margin: 0 0 0.2rem;
  color: var(--ink-soft);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
}

.tb-cell p {
  margin: 0;
}

.tb-co p:last-child,
.tb-title p:last-child {
  font-weight: 600;
}

.tb-legal {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.45rem 0.65rem 0.7rem;
  border-top: 2px solid var(--ink);
  color: var(--ink-soft);
  text-transform: none;
  letter-spacing: 0.02em;
}

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

  .led-amber {
    animation: none;
  }

  .product-buy {
    transition: none;
  }
}

a:focus-visible,
.skip:focus-visible,
.product-buy:focus-visible {
  outline: 2px solid var(--oxide);
  outline-offset: 3px;
}

@media (max-width: 860px) {
  :root {
    --pad-x: 1.7rem;
    --cut: 8px;
  }

  .mast {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .mast-co,
  .mast-dwg {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .sheet {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-width: 0;
    clip-path: none;
    box-shadow: none;
    contain: inline-size;
  }

  main,
  .hero,
  .product,
  .mast,
  .title-block,
  .lede {
    min-width: 0;
    max-width: 100%;
  }

  .catalog {
    grid-template-columns: 1fr;
  }

  .product-anvil,
  .product-ave {
    padding-left: 0;
    padding-right: 0;
    border-right: 0;
  }

  .product-ave {
    border-top: 3px solid var(--ink);
  }

  .lede,
  .note,
  .product-notes,
  .product-notes li,
  .product-notes p {
    min-width: 0;
    max-width: 34ch;
    overflow-wrap: anywhere;
  }

  .mast-co,
  .mast-dwg {
    display: block;
  }

  .led {
    display: inline-block;
    margin-right: 0.35rem;
    vertical-align: -0.12em;
  }

  .note {
    letter-spacing: 0.04em;
    font-size: 0.78rem;
    overflow-wrap: anywhere;
  }

  .lede,
  .product-notes li {
    overflow-wrap: anywhere;
  }

  .title-block {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .tb-co,
  .tb-title {
    grid-column: span 3;
  }

  .tb-legal {
    grid-column: 1 / -1;
  }

  .edge-scale {
    display: none;
  }
}

@media (max-width: 520px) {
  body {
    background-image:
      repeating-linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.28) 0 2px,
        transparent 2px 18px
      ),
      linear-gradient(180deg, #2a241c, var(--bench-edge));
  }

  .sheet {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding-top: calc(var(--frame) + 0.15rem);
  }

  .mast-dwg {
    justify-content: flex-start;
  }

  .brand {
    font-size: clamp(2.15rem, 9.4vw, 3.15rem);
    max-width: 100%;
  }

  .mast {
    font-size: 0.62rem;
    letter-spacing: 0.03em;
  }

  .product-name {
    font-size: clamp(2.8rem, 13vw, 4.2rem);
  }

  .note,
  .lede,
  .product-notes li,
  .product-notes p {
    max-width: 26ch;
    overflow-wrap: anywhere;
  }

  .title-block {
    grid-template-columns: 1fr 1fr;
  }

  .tb-co,
  .tb-title,
  .tb-legal {
    grid-column: 1 / -1;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .brand {
    font-size: clamp(2.2rem, 8vw, 3.8rem);
  }

  .hero {
    padding-block: 0.55rem;
  }
}

@media (min-width: 861px) {
  html {
    font-size: calc(clamp(15px, 0.833vw, 24px) * var(--ui-scale, 1));
  }

  body {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .sheet {
    width: calc(100% - var(--bench-gap) * 2);
    max-width: none;
    min-height: calc(100vh - var(--bench-gap) * 2);
    min-height: calc(100dvh - var(--bench-gap) * 2);
    margin: var(--bench-gap) auto;
  }
}

@media (min-width: 1920px) {
  :root {
    --pad-x: clamp(2.5rem, 3.5vw, 5rem);
  }
}

@media (min-width: 2560px) {
  :root {
    --pad-x: clamp(3rem, 4vw, 6rem);
  }
}

@media print {
  html {
    height: auto;
    font-size: 100%;
  }

  body {
    height: auto;
    min-height: 0;
    overflow: visible;
    background: white;
  }

  .drawing-frame,
  .scan,
  .graticule {
    display: none;
  }

  .sheet {
    width: 100%;
    margin: 0;
    box-shadow: none;
    clip-path: none;
    border: 0;
  }
}
