/* Brief Lexicon — index-card catalogue stylesheet.
   One file, no web fonts, no external requests. */

:root {
  --bg: #f7f5ef;        /* card ivory */
  --text: #262421;      /* card ink */
  --accent: #a83a32;    /* card-catalog red */
  --accent-2: #7a736a;  /* drawer gray */
  --card: #fcfbf7;      /* card face */
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

.wrap {
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  padding: 0 18px;
}

a { color: var(--accent); text-decoration: underline; }
a:hover { text-decoration: none; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--text);
  padding: 8px 12px;
  z-index: 20;
}
.skip:focus {
  left: 12px;
  top: 12px;
}

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

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

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

.site-name {
  font-family: "Courier New", "SF Mono", Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}

.site-nav a {
  font-family: "Courier New", "SF Mono", Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  margin-left: 16px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--accent); }

.menu-btn {
  display: none;
  font-family: "Courier New", "SF Mono", Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--text);
  border-radius: 0;
  padding: 6px 10px;
  cursor: pointer;
}

@media (max-width: 560px) {
  .menu-btn { display: block; }
  .site-nav {
    display: none;
    width: 100%;
    padding: 8px 0 12px;
    border-top: 1px solid var(--accent-2);
  }
  .site-nav.open { display: block; }
  .site-nav a { display: block; margin: 0 0 8px; }
  .head-inner { flex-wrap: wrap; }
}

/* ---------- headings and type ---------- */

h1, h2, h3, h4 {
  font-family: "Courier New", "SF Mono", Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

h1 { font-size: 25px; margin: 0 0 14px; }
h2 { font-size: 18px; margin: 30px 0 10px; }
h3 { font-size: 15px; margin: 22px 0 8px; }
h4 { font-size: 14px; margin: 18px 0 6px; }

p { margin: 0 0 14px; }

main { padding: 26px 0 40px; }

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

.hero p.lede { font-size: 18px; }

.hero-rule {
  border: 0;
  border-top: 1px solid var(--accent-2);
  margin: 26px 0;
}

.kicker {
  font-family: "Courier New", "SF Mono", Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  margin: 0 0 10px;
}

/* ---------- cards ---------- */

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--text);
  border-radius: 0;
  padding: 30px 20px 20px;
  margin: 0 0 22px;
}

.card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 12px;
  border-top: 1px solid var(--accent-2);
  opacity: 0.45;
}

.drawer {
  position: absolute;
  top: -1px;
  left: 10px;
  font-family: "Courier New", "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent);
  line-height: 13px;
  padding-top: 1px;
}

.card > h2:first-of-type,
.card > h1:first-of-type { margin-top: 0; }

/* ---------- call number strip ---------- */

.callno {
  font-family: "Courier New", "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-top: 1px solid var(--text);
  border-bottom: 1px solid var(--text);
  padding: 6px 0;
  margin: 0 0 18px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.callno .mono-step { color: var(--accent); }

/* ---------- lists with file-tab bullets ---------- */

ul.tabs, ol.tabs { padding-left: 0; }

ul.tabs {
  list-style: none;
  margin: 0 0 16px;
}

ul.tabs li {
  position: relative;
  padding-left: 26px;
  margin: 0 0 9px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='12' viewBox='0 0 14 12'%3E%3Cpath d='M0.5 11.5V0.5h5l1.6 2h6.4v9z' fill='none' stroke='%23a83a32' stroke-width='1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0 6px;
}

ol { padding-left: 22px; margin: 0 0 16px; }
ol li { margin: 0 0 9px; }

/* ---------- step list on the homepage ---------- */

ol.steplist { counter-reset: none; }
ol.steplist li { margin-bottom: 12px; }
ol.steplist a { font-weight: 600; }

/* ---------- disclosure box ---------- */

.disclosure {
  border: 1px solid var(--accent);
  border-radius: 0;
  background: var(--card);
  padding: 16px 18px;
  margin: 20px 0;
  font-size: 17px;
}
.disclosure p:last-child { margin-bottom: 0; }
.disclosure .kicker { color: var(--accent); }

.linknote {
  font-size: 15px;
  color: var(--text);
  border-left: 1px solid var(--accent-2);
  padding-left: 12px;
  margin: 0 0 16px;
}

/* ---------- callout and withdrawn ---------- */

.callout {
  border: 1px solid var(--accent-2);
  background: var(--bg);
  padding: 14px 16px;
  margin: 18px 0;
}
.callout p:last-child { margin-bottom: 0; }

.withdrawn {
  border: 1px solid var(--accent);
  padding: 14px 16px;
  margin: 20px 0;
}
.withdrawn .stamp {
  font-family: "Courier New", "SF Mono", Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  color: var(--accent);
  display: block;
  margin-bottom: 6px;
}
.withdrawn .stamp .call {
  color: var(--text);
}

/* ---------- checklist blocks ---------- */

.checklist {
  border: 1px solid var(--text);
  background: var(--card);
  padding: 18px 20px;
  margin: 22px 0;
}
.checklist h2, .checklist h3 { margin-top: 0; }

ul.boxes {
  list-style: none;
  margin: 0;
  padding: 0;
}
ul.boxes li {
  position: relative;
  padding-left: 30px;
  margin: 0 0 11px;
  line-height: 1.6;
}
ul.boxes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 15px;
  height: 15px;
  border: 1px solid var(--text);
  background: var(--bg);
}

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

dl.glossary { margin: 16px 0; }
dl.glossary dt {
  font-family: "Courier New", "SF Mono", Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  margin-top: 12px;
  border-bottom: 1px solid var(--accent-2);
  display: inline-block;
}
dl.glossary dd { margin: 4px 0 0; padding: 0; }

dl.checked dt {
  font-family: "Courier New", "SF Mono", Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  margin-top: 14px;
}
dl.checked dd { margin: 3px 0 0; padding: 0; }

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

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 16px;
}
th, td {
  border: 1px solid var(--text);
  padding: 7px 9px;
  text-align: left;
  vertical-align: top;
}
th {
  font-family: "Courier New", "SF Mono", Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  background: var(--card);
}

/* ---------- in-page contents ---------- */

.contents {
  border-top: 1px solid var(--accent-2);
  border-bottom: 1px solid var(--accent-2);
  padding: 12px 0;
  margin: 0 0 22px;
}
.contents ul { list-style: none; margin: 0; padding: 0; }
.contents li { margin: 0 0 6px; }
.contents li:last-child { margin-bottom: 0; }

/* ---------- step navigation ---------- */

.stepnav {
  border-top: 1px solid var(--text);
  padding-top: 14px;
  margin-top: 30px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-family: "Courier New", "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.printbtn {
  font-family: "Courier New", "SF Mono", Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--text);
  border-radius: 0;
  padding: 9px 14px;
  cursor: pointer;
  margin: 10px 0 20px;
}

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

.site-foot {
  border-top: 1px solid var(--text);
  background: var(--bg);
  padding: 22px 0 36px;
  font-size: 15px;
}
.site-foot .pub {
  font-style: normal;
  margin: 0 0 12px;
  line-height: 1.55;
}
.site-foot .pub .name {
  font-family: "Courier New", "SF Mono", Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.site-foot .foot-links { margin: 0 0 12px; }
.site-foot .tm { margin: 0 0 10px; }
.site-foot .rev {
  font-family: "Courier New", "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}

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

@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  .site-head, .site-nav, .menu-btn, .printbtn, .skip, .stepnav, .contents { display: none !important; }
  .card, .checklist, .callout, .disclosure, .withdrawn {
    background: #fff;
    border: 1px solid #000;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .card::after { display: none; }
  a { color: #000; text-decoration: none; }
  .wrap { max-width: 100%; padding: 0; }
  ul.boxes li::before { border: 1px solid #000; background: #fff; }
  ul.tabs li { background-image: none; padding-left: 14px; }
  ul.tabs li::before { content: "\2014"; position: absolute; left: 0; }
  .site-foot { border-top: 1px solid #000; font-size: 9pt; }
}
