body.slip-page {
  margin: 0;
  background: #e4dccb;
  color: #1c2420;
  font-family: Petrona, Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

body.slip-page h1,
body.slip-page h2,
body.slip-page h3 {
  color: #1c2420;
}

body.slip-page h1 {
  font-family: Petrona, Georgia, serif;
  font-weight: 700;
  font-size: clamp(2rem, 4.4vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0.15rem 0 0.75rem;
}

body.slip-page h2 {
  font-family: "Pathway Extreme", "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: clamp(1.55rem, 2.6vw, 2.05rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin: 0 0 0.7rem;
}

body.slip-page h3 {
  font-family: "Pathway Extreme", "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.25;
  margin: 0 0 0.35rem;
}

body.slip-page p {
  margin: 0 0 0.85rem;
}

body.slip-page a {
  color: #7a2a24;
}

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

[hidden] {
  display: none !important;
}

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

:focus-visible {
  outline: 2px solid #7a2a24;
  outline-offset: 3px;
}

.yard-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #efe7d8;
  border-top: 6px solid #9c2f2a;
  border-bottom: 1px solid #c9bba4;
}

.yard-bar.is-set {
  background: #f7f1e6;
  box-shadow: 0 10px 26px rgba(30, 42, 40, 0.1);
}

.yard-bar-inner,
.page-wrap,
.foot-grid,
.foot-copy {
  width: min(980px, calc(100% - 2.5rem));
  margin-left: auto;
  margin-right: auto;
}

.yard-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.1rem;
  padding: 0.8rem 0 0.85rem;
}

body.slip-page a.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #1c2420;
  text-decoration: none;
  font-family: "Pathway Extreme", "Arial Narrow", sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.18rem;
}

.brand img {
  width: 32px;
  height: 32px;
  display: block;
}

.yard-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
}

body.slip-page .yard-links a {
  color: #1c2420;
  text-decoration: none;
  font-family: "Pathway Extreme", "Arial Narrow", sans-serif;
  font-weight: 600;
  letter-spacing: 0.03em;
  font-size: 0.98rem;
}

body.slip-page .yard-links a:hover {
  color: #9c2f2a;
}

body.slip-page a.yard-login {
  border: 1.5px solid #1e2a28;
  padding: 0.28rem 0.7rem;
}

body.slip-page a.yard-login:hover {
  background: #1e2a28;
  color: #fbf6ec;
}

.yard-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 0.35rem;
  cursor: pointer;
}

.yard-toggle-bars,
.yard-toggle-bars::before,
.yard-toggle-bars::after {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: #1e2a28;
  position: relative;
}

.yard-toggle-bars::before,
.yard-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.yard-toggle-bars::before {
  top: -6px;
}

.yard-toggle-bars::after {
  top: 6px;
}

.page-wrap {
  padding: 2.2rem 0 4.4rem;
}

.slip-kicker {
  margin: 0 0 0.35rem;
  font-family: "Pathway Extreme", "Arial Narrow", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: #5c564c;
}

.slip-sheet,
.plain-sheet,
.count-sheet,
.login-card,
.note-block {
  background: #fbf6ec;
  border: 1px solid #cfc3ae;
  border-top: 6px solid #9c2f2a;
  box-shadow: 8px 8px 0 #24312e;
}

.slip-sheet {
  position: relative;
  padding: 1.4rem 1.35rem 1.5rem 3.15rem;
}

.slip-sheet::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1.85rem;
  background: repeating-linear-gradient(
    180deg,
    rgba(156, 47, 42, 0.55) 0 1px,
    transparent 1px 26px
  );
  border-right: 1px solid #ead4cf;
}

.slip-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.55rem 1rem;
  margin-bottom: 0.35rem;
}

body.slip-page .slip-top .slip-kicker,
body.slip-page .slip-stamp {
  margin: 0;
}

.slip-stamp {
  margin: 0;
  flex: 0 0 auto;
  font-family: "Pathway Extreme", "Arial Narrow", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: #9c2f2a;
  border: 2px solid #9c2f2a;
  padding: 0.28rem 0.45rem;
  transform: rotate(-2deg);
  background: rgba(251, 246, 236, 0.9);
}

.lede {
  font-size: 1.12rem;
}

.slip-facts {
  margin: 1.15rem 0 0;
}

.slip-facts div {
  min-width: 0;
}

.slip-facts dt {
  font-family: "Pathway Extreme", "Arial Narrow", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: #5c564c;
}

.slip-facts dd {
  margin: 0.1rem 0 0;
  font-size: 1.12rem;
}

.margin-note {
  margin: 0 0 0.85rem;
  padding: 0.15rem 0 0.15rem 0.75rem;
  border-left: 2px solid #9c2f2a;
  color: #7a2a24;
  font-style: italic;
}

.margin-note cite {
  display: block;
  margin-top: 0.35rem;
  font-style: normal;
  font-family: "Pathway Extreme", "Arial Narrow", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5c564c;
}

.open-items {
  margin-top: 1.3rem;
  padding-top: 0.9rem;
  border-top: 1px solid #d9cfc0;
}

.open-items ol {
  margin: 0;
  padding-left: 1.2rem;
}

.open-items li {
  margin: 0.7rem 0;
}

.open-items li span {
  display: block;
  color: #5c564c;
  font-family: "Pathway Extreme", "Arial Narrow", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.record-next {
  margin-top: 3.4rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  align-items: center;
  font-family: "Pathway Extreme", "Arial Narrow", sans-serif;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
}

.dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.3rem;
}

.dot-signed { background: #2c4a40; }
.dot-contested { background: #9c2f2a; }
.dot-waiting { background: #8d6b3a; }

.dispute-rail {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0 0 0 0.2rem;
  border-left: 2px solid #1e2a28;
}

.dispute-rail li {
  position: relative;
  padding: 0 0 1.35rem 1.2rem;
}

.dispute-rail li::before {
  content: "";
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: #2c4a40;
  position: absolute;
  left: -0.46rem;
  top: 0.28rem;
  box-shadow: 0 0 0 3px #e4dccb;
}

.dispute-rail li.is-contested::before { background: #9c2f2a; }
.dispute-rail li.is-waiting::before { background: #8d6b3a; }

.when {
  margin: 0;
  font-family: "Pathway Extreme", "Arial Narrow", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: #5c564c;
}

.sign-scroll {
  overflow-x: auto;
  margin-top: 0.8rem;
  background: #fbf6ec;
  border: 1px solid #cfc3ae;
  box-shadow: 8px 8px 0 #24312e;
}

.sign-sheet {
  width: 100%;
  min-width: 44rem;
  border-collapse: collapse;
}

.sign-sheet caption {
  text-align: left;
  caption-side: top;
  padding: 0.9rem 0.9rem 0.4rem;
  font-family: "Pathway Extreme", "Arial Narrow", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: #5c564c;
}

.sign-sheet th,
.sign-sheet td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 0.85rem;
}

.sign-sheet th {
  font-family: "Pathway Extreme", "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-bottom: 2px solid #1e2a28;
}

.sign-sheet td {
  border-bottom: 1px solid #e2d8c8;
}

.sign-sheet td:nth-child(4) {
  white-space: nowrap;
}

.standing-open {
  color: #8d6b3a;
  font-family: "Pathway Extreme", "Arial Narrow", sans-serif;
  letter-spacing: 0.04em;
}

.standing-signed {
  color: #2c4a40;
  font-family: "Pathway Extreme", "Arial Narrow", sans-serif;
  letter-spacing: 0.04em;
}

.standing-fight {
  color: #9c2f2a;
  font-family: "Pathway Extreme", "Arial Narrow", sans-serif;
  letter-spacing: 0.04em;
}

.narrow-hint {
  display: none;
  margin-top: 0.4rem;
  font-size: 0.92rem;
  color: #5c564c;
}

.transmittal {
  margin-top: 1rem;
  background: #fbf6ec;
  border: 1px solid #cfc3ae;
  box-shadow: 8px 8px 0 #24312e;
  padding: 0.3rem 1.1rem 0.4rem;
}

.transmittal-line {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 0.8rem;
  padding: 0.95rem 0;
  border-bottom: 1px dashed #c9bba4;
}

.transmittal-line:last-child {
  border-bottom: 0;
}

.transmittal-no {
  margin: 0;
  font-family: "Pathway Extreme", "Arial Narrow", sans-serif;
  font-weight: 700;
  color: #8d6b3a;
  letter-spacing: 0.08em;
}

.count-sheet {
  margin-top: 1rem;
  padding: 1.15rem 1.2rem 1.25rem;
}

.count-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.4rem 0 0.8rem;
}

.count-table th,
.count-table td {
  text-align: left;
  padding: 0.65rem 0;
  border-bottom: 1px solid #e2d8c8;
  vertical-align: baseline;
}

.count-table th {
  font-family: "Pathway Extreme", "Arial Narrow", sans-serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.78rem;
  width: 46%;
  color: #5c564c;
}

.count-table tr:last-child th,
.count-table tr:last-child td {
  border-bottom: 0;
  font-size: 1.25rem;
}

body.slip-page a.slip-button,
body.slip-page button.slip-button {
  display: inline-block;
  margin-top: 0.4rem;
  background: #1e2a28;
  color: #fbf6ec;
  border: 0;
  text-decoration: none;
  font-family: "Pathway Extreme", "Arial Narrow", sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 1rem;
  padding: 0.7rem 1.05rem;
  cursor: pointer;
}

body.slip-page a.slip-button:hover,
body.slip-page button.slip-button:hover {
  background: #314540;
  color: #fbf6ec;
}

body.slip-page button.slip-button:disabled {
  background: #8a8174;
  color: #fbf6ec;
  cursor: not-allowed;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.desk-form,
.login-card form {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.desk-form label,
.login-card label {
  margin-top: 0.55rem;
  font-family: "Pathway Extreme", "Arial Narrow", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.req {
  color: #9c2f2a;
}

.desk-form input,
.desk-form textarea,
.login-card input {
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #1e2a28;
  border-radius: 0;
  padding: 0.45rem 0 0.4rem;
  color: #1c2420;
  font-family: Petrona, Georgia, serif;
  font-size: 1.05rem;
}

.desk-form textarea {
  border: 1px solid #1e2a28;
  padding: 0.55rem 0.6rem;
  min-height: 7rem;
  resize: vertical;
}

.desk-form input::placeholder,
.desk-form textarea::placeholder,
.login-card input::placeholder {
  color: #8a8174;
}

.desk-pad,
.plain-sheet,
.note-block {
  padding: 1.2rem 1.2rem 1.35rem;
}

.desk-confirm,
.login-fail {
  padding: 0.85rem 0.9rem;
  border-left: 3px solid #2c4a40;
  background: #f3ecdf;
}

.login-fail {
  border-left-color: #9c2f2a;
  color: #7a2a24;
}

.yard-foot {
  background: #efe7d8;
  border-top: 8px solid #9c2f2a;
  padding-bottom: 1.4rem;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr 0.9fr;
  gap: 1.5rem 1.2rem;
  padding: 2rem 0 1rem;
}

.foot-brand p {
  margin: 0.7rem 0 0;
  max-width: 28rem;
}

body.slip-page .yard-foot h2 {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.3;
  margin: 0 0 0.45rem;
}

.yard-foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.yard-foot li {
  margin: 0.32rem 0;
}

body.slip-page .yard-foot a {
  color: #1c2420;
  text-decoration: none;
}

body.slip-page .yard-foot a:hover {
  color: #9c2f2a;
}

.foot-copy {
  border-top: 1px solid #c9bba4;
  padding-top: 0.8rem;
  margin-bottom: 0;
  font-family: "Pathway Extreme", "Arial Narrow", sans-serif;
  font-size: 0.95rem;
}

.plain-sheet + .plain-sheet,
.note-block + .note-block,
.article-slip + .article-slip {
  margin-top: 1.4rem;
}

.article-slip {
  background: #fbf6ec;
  border: 1px solid #cfc3ae;
  border-left: 6px solid #2c4a40;
  padding: 1.15rem 1.2rem 0.6rem;
}

.meta-line {
  margin: 0 0 0.35rem;
  font-family: "Pathway Extreme", "Arial Narrow", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: #5c564c;
}

.toc-list {
  margin: 0.4rem 0 0;
  padding-left: 1.15rem;
}

.toc-list li {
  margin: 0.45rem 0;
}

.code-slip {
  margin: 0.4rem 0 1rem;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  background: #1e2a28;
  color: #f4efe4;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.84rem;
  line-height: 1.45;
}

.job {
  padding-top: 0.35rem;
}

.job + .job {
  margin-top: 1.3rem;
  padding-top: 1.1rem;
  border-top: 1px dashed #c9bba4;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.login-card {
  width: min(26.5rem, 100%);
  padding: 1.35rem 1.3rem 1.4rem;
  box-sizing: border-box;
}

.login-card h1 {
  font-size: clamp(1.8rem, 4vw, 2.3rem);
}

.login-links {
  margin-top: 1rem;
}

.login-links a {
  display: inline-block;
  margin-right: 0.9rem;
  margin-bottom: 0.35rem;
}

@media (max-width: 1040px) {
  .yard-toggle {
    display: inline-flex;
  }

  .yard-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    padding: 0.2rem 0 0.55rem;
  }

  .yard-links.is-open {
    display: flex;
  }

  .yard-links a {
    padding: 0.4rem 0;
  }
}

@media (max-width: 800px) {
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }

}

@media (max-width: 640px) {
  .slip-sheet {
    padding: 1.1rem 0.95rem 1.15rem 2.4rem;
  }

  .slip-sheet::before {
    width: 1.15rem;
  }

  .transmittal-line {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

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

  .narrow-hint {
    display: block;
  }

  .count-table tr:last-child th,
  .count-table tr:last-child td {
    font-size: 1.08rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slip-stamp {
    transform: none;
  }
}
