/* Wideshift — shared stylesheet. Barnyard handbook: warm paper, denim blue, barn wood. */

:root {
  --bg: #f4efe7;
  --text: #33302a;
  --muted: #5d5850;
  --accent: #5b7ea6;      /* denim blue: rules, strokes, large numerals */
  --accent-ink: #3f6189;  /* darker denim for link text, for contrast */
  --accent-2: #b98a5e;    /* barn wood */
  --card: #ffffff;
  --rule: #e2d8c9;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(51, 48, 42, 0.06);
  --display: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --body: Georgia, "Iowan Old Style", serif;
  --col: 740px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.68;
}

.wrap {
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3, h4,
.brandmark,
.step-number,
.nav-list a,
.btn,
.kicker,
th {
  font-family: var(--display);
  font-weight: 600;
}

h1 {
  font-size: 2.05rem;
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
}

h2 {
  font-size: 1.42rem;
  line-height: 1.25;
  margin: 2.4rem 0 0.7rem;
}

h3 {
  font-size: 1.12rem;
  line-height: 1.3;
  margin: 1.8rem 0 0.5rem;
}

p { margin: 0 0 1.1rem; }

a { color: var(--accent-ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent-ink);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--card);
  color: var(--text);
  padding: 10px 16px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  z-index: 50;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
}

.brandmark {
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--text);
}
.brandmark:hover { text-decoration: underline; text-decoration-color: var(--accent-2); }

.menu-toggle {
  display: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 7px 13px;
  cursor: pointer;
}

.nav-list {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  font-size: 0.97rem;
  text-decoration: none;
  color: var(--accent-ink);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-list a:hover { border-bottom-color: var(--accent-2); }

/* ---------- hero band ---------- */

.hero-band {
  background: #efe7db;
  border-bottom: 1px solid var(--rule);
  padding: 30px 0 34px;
  margin-bottom: 30px;
}

.roof {
  display: block;
  width: 112px;
  height: 34px;
  margin: 0 0 14px;
}
.roof line, .roof polyline, .roof path { stroke-width: 1; fill: none; }

.kicker {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}

.lede { font-size: 1.06rem; }

main { padding-bottom: 40px; }

/* ---------- step head ---------- */

.step-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 6px;
}

.step-number {
  font-size: 56px;
  line-height: 1;
  color: var(--accent);
  flex: 0 0 auto;
}

.step-indicator {
  font-family: var(--display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

/* ---------- cards and boxes ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin: 1.6rem 0;
}

.card > :last-child { margin-bottom: 0; }
.card h2, .card h3 { margin-top: 0; }

.disclosure {
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 5px solid var(--accent-2);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 1.6rem 0;
  font-size: 1rem;
}
.disclosure > :last-child { margin-bottom: 0; }

.stitched {
  border: 2px dashed var(--accent-2);
  border-radius: var(--radius);
  background: #fbf7f1;
  padding: 18px 20px;
  margin: 1.8rem 0;
}
.stitched > :last-child { margin-bottom: 0; }
.stitched h3 { margin-top: 0; }

.aff-note {
  display: block;
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 4px;
}

.aff { margin-bottom: 1.4rem; }

/* ---------- lists ---------- */

ul.hoof {
  list-style: none;
  padding-left: 0;
  margin: 0 0 1.1rem;
}

ul.hoof li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 0.6rem;
}

ul.hoof li .shoe {
  position: absolute;
  left: 0;
  top: 5px;
  width: 16px;
  height: 16px;
}

ol.steps-list, ol.proc {
  padding-left: 1.3em;
  margin: 0 0 1.1rem;
}
ol.steps-list li, ol.proc li { margin-bottom: 0.7rem; }

/* ---------- checklists ---------- */

.checklist {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin: 1.8rem 0;
}
.checklist h2, .checklist h3 { margin-top: 0; }

.checklist ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.checklist li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 0.75rem;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--accent-2);
  border-radius: 3px;
  background: #fff;
}

/* ---------- tables ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 0.98rem;
}

caption {
  text-align: left;
  font-family: var(--display);
  font-weight: 600;
  padding-bottom: 8px;
}

th, td {
  border: 1px solid var(--rule);
  padding: 9px 11px;
  text-align: left;
  vertical-align: top;
}

th { background: #faf6f0; }

/* ---------- glossary ---------- */

.glossary {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 1.8rem 0;
}
.glossary dt { font-family: var(--display); font-weight: 600; margin-top: 0.8rem; }
.glossary dt:first-of-type { margin-top: 0; }
.glossary dd { margin: 0.2rem 0 0; }

.checked dt { font-family: var(--display); font-weight: 600; margin-top: 1rem; }
.checked dt:first-of-type { margin-top: 0; }
.checked dd { margin: 0.2rem 0 0; }

/* ---------- contents and pagination ---------- */

.contents {
  background: #fbf7f1;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 1.6rem 0 2rem;
}
.contents p { margin: 0 0 0.5rem; font-family: var(--display); font-weight: 600; font-size: 0.95rem; }
.contents ol { margin: 0; padding-left: 1.2em; }
.contents li { margin-bottom: 0.3rem; }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  padding-top: 18px;
  margin-top: 36px;
  font-family: var(--display);
  font-size: 0.97rem;
}

.divider {
  display: block;
  width: 120px;
  height: 22px;
  margin: 34px auto 10px;
}

.btn {
  display: inline-block;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 0.95rem;
  color: var(--accent-ink);
  cursor: pointer;
}
.btn:hover { border-color: var(--accent-2); }

.addr { font-style: normal; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  background: #efe7db;
  padding: 26px 0 34px;
  font-size: 0.95rem;
}

.site-footer .publisher { margin: 0 0 1rem; line-height: 1.55; }
.site-footer .publisher .name { font-family: var(--display); font-weight: 600; }
.site-footer .footer-links { margin: 0 0 1rem; }
.site-footer .footer-links a { white-space: nowrap; }
.site-footer .notice, .site-footer .reviewed { color: var(--muted); margin: 0 0 0.8rem; }
.site-footer .reviewed { margin-bottom: 0; }

/* ---------- small screens ---------- */

@media (max-width: 620px) {
  body { font-size: 17px; }
  h1 { font-size: 1.68rem; }
  .step-number { font-size: 44px; }
  .menu-toggle { display: inline-block; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 58px;
    background: var(--card);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: block; }
  .nav-list { flex-direction: column; gap: 0; padding: 8px 20px 14px; }
  .nav-list a { display: block; padding: 10px 0; }
  .header-inner { position: relative; }
}

/* ---------- print ---------- */

@media print {
  :root { --bg: #ffffff; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .site-header, .site-nav, .pager, .btn, .skip-link, .divider, .roof, .hero-band { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .card, .checklist, .stitched, .disclosure, .glossary, .contents {
    box-shadow: none;
    border: 1px solid #999;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .checklist li::before { border-color: #000; }
  a { color: #000; text-decoration: underline; }
  .site-footer { background: #fff; border-top: 1px solid #999; }
  h2 { page-break-after: avoid; }
}
