/* BinClerk — municipal clerk packet. Permit orange, manila, carbon ink. */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=IBM+Plex+Mono:wght@400;600&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600&display=swap");

:root {
  --ink: #1c1612;
  --paper: #f3e6c9;
  --paper-2: #ead9b0;
  --rule: #1c1612;
  --muted: #5a4a38;
  --link: #1c4f8a;
  --warn: #9b1c12;
  --band: #e6d3a8;
  --permit: #d24a12;
  --stamp: #c43b0e;
  --focus: #d24a12;
  --max: 44rem;
}

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

html {
  font-size: 110%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      rgba(28, 22, 18, 0.035) 28px
    ),
    radial-gradient(1200px 500px at 10% -10%, #f7edd6, var(--paper));
  font-family: "Source Serif 4", "Iowan Old Style", Palatino, "Times New Roman", serif;
  line-height: 1.55;
}

body::before {
  content: "";
  display: block;
  height: 10px;
  background: repeating-linear-gradient(
    -45deg,
    var(--permit),
    var(--permit) 10px,
    #b83c0c 10px,
    #b83c0c 14px
  );
}

a {
  color: var(--link);
  text-underline-offset: 0.14em;
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus {
  left: 0.75rem; top: 0.75rem; z-index: 10;
  background: var(--paper); padding: 0.4rem 0.6rem;
  border: 2px solid var(--ink);
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  padding-block: 1.1rem 3.5rem;
}

header.site {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem 1rem;
  align-items: center;
  border-bottom: 3px solid var(--ink);
  padding-bottom: 0.95rem;
  margin-bottom: 1.4rem;
}

.stamp {
  width: 4.4rem;
  height: 4.4rem;
  object-fit: contain;
  transform: rotate(-8deg);
}

.mast-copy { min-width: 0; }
.brand {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.95rem;
  margin: 0;
}
.brand a { color: inherit; text-decoration: none; }

.tagline {
  margin: 0.2rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
  max-width: 28rem;
}

.form-id {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
  margin: 0;
  color: var(--stamp);
  border: 1.5px dashed var(--stamp);
  padding: 0.35rem 0.5rem;
  transform: rotate(3deg);
}

header.site .fine-print,
header.site .draft-banner {
  grid-column: 1 / -1;
  margin: 0.35rem 0 0;
}

.draft-banner {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 0.72rem;
  border: 1.5px solid var(--ink);
  padding: 0.45rem 0.65rem;
  margin: 0.85rem 0 0;
  background: var(--band);
}

h1, h2, h3 {
  font-family: Fraunces, "Iowan Old Style", Palatino, serif;
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 1.85rem;
  line-height: 1.12;
  font-weight: 700;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.22rem;
  line-height: 1.2;
  margin: 2rem 0 0.55rem;
  padding-top: 0.55rem;
  border-top: 2px solid var(--ink);
}

h3 { font-size: 1.05rem; margin: 1.25rem 0 0.4rem; }

p, li { margin: 0 0 0.7rem; }
ul, ol { margin: 0 0 0.9rem; padding-left: 1.2rem; }
li + li { margin-top: 0.25rem; }

.lede { font-size: 1.08rem; }
.note, .fine-print { color: var(--muted); font-size: 0.88rem; }

nav.toc {
  background: var(--band);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 0.8rem 1rem 0.4rem;
  margin: 1.35rem 0 1.6rem;
}
nav.toc p {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.4rem;
  color: var(--stamp);
}
nav.toc ol { margin: 0 0 0.5rem; padding-left: 1.15rem; }
nav.toc li { margin: 0; }

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1rem;
  border: 2px solid var(--ink);
  background: #fbf3dc;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid #d4c29a;
}
th {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 0;
}
tr:last-child td { border-bottom: 0; }

.hero {
  position: relative;
  border: 2px solid var(--ink);
  padding: 1rem 1rem 0.4rem;
  margin: 1.25rem 0;
  background: #fbf3dc;
  box-shadow: 5px 5px 0 var(--ink);
}
.hero h2 { border-top: 0; margin-top: 0; padding-top: 0; }
.hero::after {
  content: "NOT A QUOTE";
  position: absolute;
  right: 0.6rem;
  top: 0.55rem;
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--stamp);
  border: 2px solid var(--stamp);
  padding: 0.2rem 0.4rem;
  transform: rotate(8deg);
  opacity: 0.9;
}

.decision { display: grid; gap: 0.75rem; margin: 1rem 0 1.25rem; }
.card {
  border: 2px solid var(--ink);
  padding: 0.75rem 0.9rem 0.35rem;
  background: #fbf3dc;
}
.card h3 {
  margin-top: 0;
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.yes { box-shadow: 4px 4px 0 var(--permit); }
.no { background: var(--band); }
.warn { color: var(--warn); }

.sheets {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
  display: grid;
  gap: 0.7rem;
}
.sheets a {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 2px solid var(--ink);
  background: #fbf3dc;
  padding: 0.7rem 0.85rem 0.55rem;
  box-shadow: 3px 3px 0 var(--ink);
}
.sheets a:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--permit);
  text-decoration: none;
}
.sheets strong {
  font-family: Fraunces, serif;
  font-size: 1.05rem;
  display: block;
}
.sheets span {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

dl { margin: 0 0 1rem; }
dt { font-weight: 700; margin-top: 0.7rem; }
dd { margin: 0.15rem 0 0; }

footer.site {
  margin-top: 2.5rem;
  padding-top: 0.85rem;
  border-top: 3px solid var(--ink);
  font-size: 0.88rem;
  color: var(--muted);
}

.who { margin: 0 0 1rem; }
.who h3 { margin-bottom: 0.15rem; }
.who p { margin-bottom: 0.85rem; }

@media (max-width: 639px) {
  header.site {
    grid-template-columns: auto 1fr;
  }
  .form-id {
    grid-column: 1 / -1;
    text-align: left;
    justify-self: start;
    transform: none;
  }
  .hero::after { position: static; display: inline-block; margin: 0 0 0.6rem; transform: rotate(-4deg); }
}

@media (min-width: 640px) {
  .decision { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 2.05rem; }
}

@media print {
  html { font-size: 11pt; }
  body { background: #fff; color: #000; }
  body::before, .stamp, .hero::after, .skip, nav.toc, .draft-banner { display: none; }
  a { color: inherit; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #333; }
  .wrap { width: auto; margin: 0; padding: 0; }
  .hero, .card, .table-wrap { break-inside: avoid; box-shadow: none; }
}
