/* Marking Gauge — board to the right of a 12px brass stem.
   Palette is fence / brass / steel / ink / paper / night.
   Not a card grid, not a two-column hero, not 01/02/03. */

:root {
  --fence: #d7c19a;
  --brass: #b08d4a;
  --brass-lit: #c9a45c;
  --brass-dark: #8a6c38;
  --steel: #44505c;
  --ink: #6a2b3a;
  --paper: #f6f0e4;
  --board: #ede4d4;
  --night: #1e242c;
  --stem: 12px;
  --sheet: 46rem;
  --display: "DM Serif Display", "Palatino Linotype", Palatino, serif;
  --body: Outfit, "Segoe UI", sans-serif;
  --data: "Share Tech Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0 0 0 var(--stem);
  min-height: 100vh;
  background: var(--paper);
  color: var(--night);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

/* Vertical brass stem — the page's marking-gauge beam */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--stem);
  background:
    linear-gradient(90deg, var(--brass-lit) 0 3px, var(--brass) 3px 9px, var(--brass-dark) 9px 12px);
  z-index: 40;
}

/* Steel pin head sitting on the stem */
body::after {
  content: "";
  position: fixed;
  top: 1.15rem;
  left: 3px;
  width: 6px;
  height: 1.35rem;
  background: var(--steel);
  border-radius: 1px 1px 50% 50%;
  z-index: 41;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--ink);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--brass-dark);
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: calc(var(--stem) + 0.75rem);
  top: -3.5rem;
  z-index: 50;
  padding: 0.4rem 0.7rem;
  background: var(--night);
  color: var(--paper);
  text-decoration: none;
}

.skip:focus {
  top: 0.5rem;
}

.sheet {
  width: min(var(--sheet), calc(100% - 2.5rem));
  margin-inline: auto;
}

/* Header rides the board, with an ink scribe under it */
.mast {
  background: var(--night);
  color: var(--paper);
  border-bottom: 3px solid var(--brass);
}

.mast__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.5rem;
  padding: 0.85rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--paper);
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}

.brand__gauge {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.nav {
  display: flex;
  gap: 1.15rem;
  font-family: var(--data);
  font-size: 0.82rem;
}

.nav a {
  color: var(--fence);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--paper);
  border-bottom-color: var(--brass);
}

/* Hero: gauge drawing ON TOP of the headline, one column */
.hero {
  padding: 1.75rem 0 2.4rem;
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 47px,
      rgba(176, 141, 74, 0.07) 47px,
      rgba(176, 141, 74, 0.07) 48px
    );
}

.gauge-fig {
  margin: 0 0 1.4rem;
  background: var(--board);
  border: 1px solid var(--fence);
  border-left: 10px solid var(--fence);
  box-shadow: 0 10px 0 -6px var(--brass);
}

.gauge-fig svg {
  width: 100%;
  height: auto;
}

.hero h1 {
  margin: 0 0 0.7rem;
  font-family: var(--display);
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--night);
}

.lede {
  margin: 0 0 1.25rem;
  max-width: 38rem;
  font-size: 1.12rem;
  color: var(--steel);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
}

.scribe {
  display: inline-block;
  padding: 0.55rem 1.05rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-family: var(--data);
  font-size: 0.84rem;
  border: 1px solid var(--ink);
}

.scribe:hover {
  background: var(--night);
  color: var(--paper);
}

.scribe--ghost {
  background: transparent;
  color: var(--night);
  border-color: var(--steel);
}

.scribe--ghost:hover {
  background: var(--fence);
  color: var(--night);
}

/* Fence / stem / pin stack — vertical, not numbered */
.parts {
  padding: 0 0 2.4rem;
}

.parts h2 {
  margin: 0 0 0.9rem;
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 400;
}

.part {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.75rem 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--fence);
}

.part:last-child {
  border-bottom: 1px solid var(--fence);
}

.part dt {
  margin: 0;
  font-family: var(--data);
  font-size: 0.78rem;
  color: var(--ink);
}

.part dd {
  margin: 0;
  color: var(--steel);
}

/* Cut-list table, workshop aesthetic */
.cut {
  padding: 0 0 3rem;
}

.cut h2 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 400;
}

.cut__hint {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--steel);
}

.cutlist {
  width: 100%;
  border-collapse: collapse;
  background: var(--board);
}

.cutlist caption {
  caption-side: bottom;
  padding-top: 0.55rem;
  text-align: left;
  font-family: var(--data);
  font-size: 0.75rem;
  color: var(--steel);
}

.cutlist th,
.cutlist td {
  padding: 0.8rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--fence);
}

.cutlist thead th {
  font-family: var(--data);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--paper);
  background: var(--steel);
  border-bottom: 2px solid var(--brass);
}

.cutlist tbody tr:hover td {
  background: rgba(215, 193, 154, 0.35);
}

.cutlist td:first-child {
  font-weight: 600;
}

.cutlist td:nth-child(2) {
  font-family: var(--data);
  font-size: 0.82rem;
  color: var(--ink);
  white-space: nowrap;
}

.cutlist a {
  color: var(--night);
  text-decoration-color: var(--brass);
}

.cutlist a:hover {
  color: var(--ink);
}

/* Inner pages */
.pagehead {
  padding: 2rem 0 0.4rem;
}

.pagehead h1 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-size: clamp(1.85rem, 3.4vw, 2.6rem);
  font-weight: 400;
  line-height: 1.2;
}

.pagehead p {
  margin: 0;
  max-width: 38rem;
  color: var(--steel);
}

.prose {
  padding: 1.1rem 0 3rem;
}

.prose p,
.prose li {
  max-width: 40rem;
}

.prose h2 {
  margin: 1.6rem 0 0.55rem;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 400;
}

.prose ul,
.prose ol {
  padding-left: 1.15rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.foot {
  background: var(--night);
  color: var(--fence);
  border-top: 12px solid var(--brass);
  padding: 1.6rem 0 1.2rem;
}

.foot a {
  color: var(--paper);
}

.foot__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.2rem 2rem;
}

.foot__brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.4rem;
  color: var(--paper);
  font-family: var(--display);
  font-size: 1.15rem;
}

.foot__lead {
  margin: 0;
  max-width: 22rem;
  font-size: 0.92rem;
}

.foot__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  font-family: var(--data);
  font-size: 0.78rem;
}

.foot__nav a {
  text-decoration: none;
  border-bottom: 1px solid var(--brass-dark);
}

.foot__base {
  margin-top: 1.2rem;
  padding-top: 0.85rem;
  border-top: 1px solid #2c343e;
  font-size: 0.82rem;
}

.foot__base p {
  margin: 0.2rem 0;
}

@media (max-width: 640px) {
  .part {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .cutlist th:nth-child(2),
  .cutlist td:nth-child(2) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
