:root {
  --ink: #243038;
  --wax: #b42318;
  --flute: #d7dde3;
  --pane: #eef1f4;
  --mute: #4d575e;
  --rule: #b7c0c8;
  --radius: 5px;
  --read: 40rem;
  --span: 74rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--flute);
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 13px,
    rgba(36, 48, 56, 0.055) 13px,
    rgba(36, 48, 56, 0.055) 14px
  );
  font-family: "Ibarra Real Nova", "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--wax);
  text-underline-offset: 0.16em;
}

a:hover { color: var(--ink); }

h1, h2, h3, .kicker, .mark-name, .stamp-n, .crate-line {
  font-family: Commissioner, "Segoe UI", sans-serif;
}

h1, h2, h3 {
  font-weight: 650;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.7rem;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h2 { font-size: 1.32rem; }
h3 { font-size: 1.08rem; }

p { margin: 0 0 1rem; }

.skip {
  position: absolute;
  left: -999px;
  top: 0.4rem;
  background: var(--pane);
  padding: 0.35rem 0.65rem;
}

.skip:focus { left: 0.5rem; z-index: 6; }

.lintel {
  background: var(--ink);
  color: var(--flute);
  position: relative;
}

.diecut {
  height: 14px;
  overflow: hidden;
  background: #1a2328;
}

.teeth {
  display: block;
  width: 100%;
  height: 14px;
}

.tooth-path {
  fill: none;
  stroke: #b42318;
  stroke-width: 1.4;
  stroke-dasharray: 1600;
  stroke-dashoffset: 1600;
}

.desk-ready .tooth-path {
  animation: tooth-draw 0.9s ease-out forwards;
}

@keyframes tooth-draw {
  to { stroke-dashoffset: 0; }
}

.lintel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--span);
  margin: 0 auto;
  padding: 0.85rem 1.2rem 1rem;
}

.mark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--flute);
  text-decoration: none;
  min-width: 0;
}

.mark img {
  flex: 0 0 44px;
  border: 1px solid #b42318;
}

.mark-name {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

.gate {
  display: none;
  background: var(--wax);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  padding: 0.45rem 0.7rem;
  font: 650 0.85rem Commissioner, sans-serif;
}

.yard-nav {
  display: flex;
  gap: 1.15rem;
}

.yard-nav a {
  color: var(--flute);
  text-decoration: none;
  font-family: Commissioner, sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.1rem;
}

.yard-nav a[aria-current="page"],
.yard-nav a:hover {
  border-bottom-color: var(--wax);
  color: #fff;
}

.sheet {
  position: relative;
  max-width: var(--span);
  margin: 0 auto;
  padding: 1.6rem 1.2rem 3rem 1.9rem;
}

.flute-tick {
  position: absolute;
  left: 0.55rem;
  top: 1.6rem;
  bottom: 3rem;
  width: 8px;
  background: repeating-linear-gradient(
    to bottom,
    var(--ink) 0 2px,
    transparent 2px 10px
  );
}

.sheet-inner { max-width: 58rem; }

.desk-home .sheet-inner { max-width: none; }

.kicker {
  margin: 0 0 0.35rem;
  color: var(--wax);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.lead { font-size: 1.12rem; }

.bay {
  margin: 0 0 2.4rem;
}

.bay-hero {
  display: grid;
  grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.hero-cut {
  display: flex;
  gap: 0.7rem;
  align-items: stretch;
}

.cut-svg {
  width: 100%;
  max-width: 16rem;
  background: var(--pane);
  border: 1px solid var(--ink);
}

.ticks {
  list-style: none;
  margin: 0;
  padding: 0.2rem 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: Commissioner, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}

.wax,
.ink,
.gate {
  display: inline-block;
  border-radius: var(--radius);
  font-family: Commissioner, sans-serif;
  font-weight: 650;
  text-decoration: none;
  padding: 0.55rem 0.95rem;
}

.wax {
  background: var(--wax);
  color: #fff;
  border: 1px solid var(--wax);
}

.wax:hover { background: #8f1b13; color: #fff; }

.ink {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.stamps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.stamps li {
  background: var(--pane);
  border: 1px solid var(--ink);
  border-top-width: 7px;
  border-top-style: dashed;
  padding: 0.85rem 0.8rem 1rem;
}

.stamp-n {
  display: block;
  color: var(--wax);
  font-size: 0.75rem;
  margin-bottom: 0.35rem;
}

.crate-pair,
.path-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.path-list { grid-template-columns: 1fr; }

.crate,
.path-list .crate,
.ask {
  background: var(--pane);
  border: 1px solid var(--ink);
  padding: 1rem 1.05rem 1.1rem;
  position: relative;
}

.crate::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 8px,
    transparent 8px 16px
  );
}

.crate {
  padding-top: 1.3rem;
  transition: transform 0.16s ease;
}

.crate:hover { transform: translateY(-2px); }

.crate-line {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--mute);
}

.bay-window,
.bay-plate {
  background: var(--pane);
  border-left: 6px solid var(--wax);
  padding: 1.1rem 1.2rem;
}

.page-open { margin-bottom: 1.6rem; }

.plate-list {
  margin: 0 0 1rem;
}

.plate-list div {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.6rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule);
}

.plate-list dt {
  font-family: Commissioner, sans-serif;
  font-size: 0.82rem;
  font-weight: 650;
}

.plate-list dd { margin: 0; }

.ticks-plain {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
}

.note { color: var(--mute); font-size: 0.95rem; }

.post-form {
  display: grid;
  gap: 0.75rem;
  max-width: 28rem;
  margin: 1rem 0;
}

.post-form label { display: grid; gap: 0.25rem; }

.post-form input,
.post-form textarea {
  font: inherit;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 0.45rem 0.55rem;
  background: #fff;
}

.dock {
  background: var(--ink);
  color: var(--flute);
  padding: 0 1.2rem 2rem;
}

.wax-rule {
  height: 4px;
  background: var(--wax);
  margin: 0 -1.2rem 1.4rem;
}

.dock-grid {
  max-width: var(--span);
  margin: 0 auto 1.4rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.dock h2 {
  color: #fff;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dock ul { list-style: none; margin: 0; padding: 0; }
.dock li { margin: 0 0 0.35rem; }
.dock a { color: var(--flute); }
.dock a:hover { color: #fff; }

.dock-legal {
  max-width: var(--span);
  margin: 0 auto;
  font-size: 0.92rem;
}

.dock-line,
.dock-bound { color: #c5ced4; }

@media (max-width: 820px) {
  .bay-hero,
  .stamps,
  .crate-pair,
  .dock-grid,
  .plate-list div {
    grid-template-columns: 1fr;
  }

  .gate { display: inline-block; }

  .yard-nav {
    display: none;
    position: absolute;
    right: 1rem;
    top: 100%;
    flex-direction: column;
    background: #1a2328;
    padding: 0.8rem 1rem;
    border: 1px solid var(--wax);
    z-index: 4;
  }

  .lintel { position: relative; }

  .yard-nav.is-open { display: flex; }

  .flute-tick { display: none; }

  .sheet { padding-left: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tooth-path { stroke-dasharray: none; stroke-dashoffset: 0; }
  .desk-ready .tooth-path { animation: none; }
  .crate { transition: none; }
}
