/*
  Calm Tenure — shared stylesheet
  Visual identity: "tenure-folio" — a steward's printed folio of records.
  Palette (only these values): parchment, quill ink, seal-wax red, vellum grey, card.
  No web fonts, no images, no gradients, no shadows, no rounded corners.
*/

:root {
  --bg: #f2ecdd;
  --text: #2d2a24;
  --accent: #93352c;
  --accent-2: #80786a;
  --card: #faf6ec;
  --display: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Courier New", "SF Mono", Menlo, Consolas, monospace;
  --column: 680px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

/* ---------- Links and focus ---------- */

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.skip {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  background: var(--card);
  color: var(--accent);
  border: 1px solid var(--text);
  padding: 0.5rem 0.75rem;
  z-index: 100;
}

.skip:focus {
  top: 0.5rem;
}

/* ---------- Headings and text ---------- */

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: normal;
  font-style: normal;
  line-height: 1.25;
  color: var(--text);
}

h1 {
  font-size: 2.05rem;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
}

h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.4rem;
}

blockquote {
  font-family: var(--display);
  font-style: italic;
  margin: 1.25rem 0;
  padding: 0 0 0 1rem;
  border-left: 1px solid var(--accent);
}

code,
.mono {
  font-family: var(--mono);
  font-size: 0.95em;
}

address {
  font-style: normal;
}

/* ---------- Header ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--text);
}

.masthead-inner {
  max-width: var(--column);
  margin: 0 auto;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.brand {
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.brand .seal {
  color: var(--accent);
}

.menu-toggle {
  display: none;
  font-family: var(--mono);
  font-size: 0.9rem;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--text);
  padding: 0.35rem 0.8rem;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
}

.site-nav li {
  margin: 0;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.98rem;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

/* The menu collapses only once the script has run, so it always works without JavaScript. */
@media (max-width: 560px) {
  .has-menu .menu-toggle {
    display: inline-block;
  }

  .has-menu .site-nav {
    display: none;
    width: 100%;
  }

  .has-menu .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--accent-2);
    margin-top: 0.4rem;
  }

  .site-nav li {
    border-bottom: 1px solid var(--accent-2);
  }

  .site-nav a {
    display: block;
    padding: 0.55rem 0;
  }
}

/* ---------- Main column ---------- */

main {
  max-width: var(--column);
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.hero {
  padding: 0.5rem 0 1.5rem;
}

.hero-lede {
  font-size: 1.1rem;
}

.divider {
  border: 0;
  border-top: 1px solid var(--accent-2);
  margin: 1.75rem 0 2rem;
}

/* ---------- Folio entries (cards) ---------- */

.folio {
  position: relative;
  background: var(--card);
  border: 1px solid var(--text);
  padding: 2.2rem 1.4rem 1.2rem;
  margin: 0 0 1.75rem;
}

.folio.first {
  outline: 1px solid var(--text);
  outline-offset: -9px;
  padding: 2.6rem 1.9rem 1.6rem;
}

.folio-mark {
  position: absolute;
  top: 0.6rem;
  right: 0.9rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.folio.first .folio-mark {
  top: 1rem;
  right: 1.3rem;
}

.entry-title {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.seal {
  flex: 0 0 auto;
  width: 0.9em;
  height: 0.9em;
  color: var(--accent);
  position: relative;
  top: 0.05em;
}

.folio > :last-child {
  margin-bottom: 0;
}

/* ---------- Disclosure ---------- */

.disclosure {
  border: 1px solid var(--accent);
  background: var(--card);
  padding: 1rem 1.2rem;
  margin: 1.25rem 0 1.5rem;
  font-size: 1.0625rem;
}

.disclosure p:last-child {
  margin-bottom: 0;
}

.disclosure-label {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.35rem;
}

.affiliate {
  border-left: 1px solid var(--accent);
  padding: 0.25rem 0 0.25rem 0.9rem;
  margin: 1rem 0;
}

.affiliate-note {
  display: block;
  font-size: 0.95rem;
  margin-top: 0.3rem;
}

/* ---------- Step list on the homepage ---------- */

.step-list {
  list-style: none;
  padding: 0;
  counter-reset: step;
  border-top: 1px solid var(--text);
}

.step-list li {
  counter-increment: step;
  border-bottom: 1px solid var(--text);
  padding: 0.7rem 0 0.7rem 3rem;
  margin: 0;
  position: relative;
}

.step-list li::before {
  content: "0" counter(step);
  position: absolute;
  left: 0;
  top: 0.7rem;
  font-family: var(--mono);
  color: var(--accent);
}

.step-list a {
  font-family: var(--display);
  font-size: 1.1rem;
}

.step-list span {
  display: block;
  font-size: 0.97rem;
}

/* ---------- Step pages ---------- */

.year-strip {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--text);
  border-top: 1px solid var(--text);
  border-bottom: 1px solid var(--text);
  padding: 0.4rem 0;
  margin: 0 0 1.25rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.step-indicator {
  font-family: var(--mono);
  color: var(--accent);
}

.contents {
  background: var(--card);
  border: 1px solid var(--text);
  padding: 1rem 1.2rem 0.6rem;
  margin: 1.5rem 0 2rem;
}

.contents h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.contents ol {
  margin-bottom: 0.4rem;
}

.step-nav {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 1px solid var(--text);
  padding-top: 1rem;
  margin-top: 2rem;
}

.step-nav a {
  font-family: var(--display);
}

.step-nav .next {
  margin-left: auto;
  text-align: right;
}

/* ---------- Body units ---------- */

.callout {
  border: 1px solid var(--accent);
  padding: 0.9rem 1.1rem;
  margin: 1.25rem 0;
  background: var(--bg);
}

.callout-label,
.unit-label {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.35rem;
}

.callout p:last-child {
  margin-bottom: 0;
}

.example {
  border-top: 1px solid var(--text);
  border-bottom: 1px solid var(--text);
  padding: 0.9rem 0;
  margin: 1.25rem 0;
}

.procedure {
  counter-reset: proc;
  list-style: none;
  padding-left: 0;
}

.procedure > li {
  counter-increment: proc;
  position: relative;
  padding-left: 2.6rem;
  margin-bottom: 0.8rem;
}

.procedure > li::before {
  content: counter(proc) ".";
  position: absolute;
  left: 0;
  font-family: var(--mono);
  color: var(--accent);
}

.summary {
  border: 1px solid var(--text);
  border-left: 3px solid var(--accent);
  background: var(--card);
  padding: 0.9rem 1.1rem 0.3rem;
  margin: 1.5rem 0;
}

.glossary {
  border-top: 1px solid var(--text);
  margin: 1.25rem 0;
}

.glossary div {
  border-bottom: 1px solid var(--accent-2);
  padding: 0.55rem 0;
}

.glossary dt {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.95rem;
}

.glossary dd {
  margin: 0.15rem 0 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
}

th,
td {
  border: 1px solid var(--text);
  padding: 0.5rem 0.6rem;
  text-align: left;
  vertical-align: top;
}

th {
  font-family: var(--display);
  font-weight: normal;
  background: var(--card);
}

.table-wrap {
  overflow-x: auto;
}

/* ---------- Checklists: printed boxes, nothing stored ---------- */

.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.checklist li {
  position: relative;
  padding: 0.45rem 0 0.45rem 2rem;
  border-bottom: 1px dotted var(--accent-2);
  margin: 0;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.72rem;
  width: 0.95rem;
  height: 0.95rem;
  border: 1px solid var(--text);
  background: var(--card);
}

.print-button {
  font-family: var(--mono);
  font-size: 0.9rem;
  background: var(--card);
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  margin: 0.25rem 0 1rem;
}

.print-button:hover {
  background: var(--bg);
}

.folio-box {
  display: inline-block;
  border: 2px solid var(--accent);
  font-family: var(--mono);
  color: var(--accent);
  padding: 0.6rem 1rem;
  margin: 0 0 1.25rem;
  letter-spacing: 0.08em;
  text-align: center;
}

/* ---------- Legal pages ---------- */

.effective {
  font-family: var(--mono);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--accent-2);
  padding-bottom: 0.6rem;
  margin-bottom: 1.5rem;
}

.legal h2 {
  margin-top: 2rem;
}

.legal dl.checked div {
  border-bottom: 1px solid var(--accent-2);
  padding: 0.6rem 0;
}

.legal dl.checked dt {
  font-family: var(--display);
  font-size: 1.08rem;
}

.legal dl.checked dd {
  margin: 0.2rem 0 0;
}

.company-block {
  background: var(--card);
  border: 1px solid var(--text);
  padding: 0.9rem 1.1rem;
  margin: 1rem 0 1.5rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--text);
  background: var(--card);
  font-size: 0.93rem;
}

.footer-inner {
  max-width: var(--column);
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
}

.publisher {
  line-height: 1.5;
  margin-bottom: 1rem;
}

.publisher .footer-site {
  font-family: var(--display);
  font-size: 1.1rem;
}

.footer-links {
  margin-bottom: 0.8rem;
}

.footer-reviewed {
  font-family: var(--mono);
  font-size: 0.85rem;
  margin-bottom: 0;
}

/* ---------- Small screens ---------- */

@media (max-width: 420px) {
  body {
    font-size: 1rem;
  }

  h1 {
    font-size: 1.65rem;
  }

  .folio {
    padding: 2.2rem 1rem 1rem;
  }

  .folio.first {
    padding: 2.6rem 1.3rem 1.3rem;
  }
}

/* ---------- Print: clean, white, checklists first ---------- */

@media print {
  :root {
    --bg: #ffffff;
    --card: #ffffff;
  }

  body {
    background: #ffffff;
    color: #000000;
    font-size: 11pt;
  }

  .masthead,
  .skip,
  .print-button,
  .step-nav,
  .contents,
  .menu-toggle {
    display: none !important;
  }

  main {
    max-width: none;
    padding: 0;
  }

  .folio,
  .callout,
  .summary,
  .disclosure {
    border-color: #000000;
    background: #ffffff;
  }

  .checklist li::before {
    border-color: #000000;
    background: #ffffff;
  }

  .print-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  a {
    color: #000000;
  }

  .site-footer {
    background: #ffffff;
    border-top: 1px solid #000000;
  }
}
