/* Soft Lexicon — sieve-mesh plate
   Palette: mill paper, mesh ink, sift amber, chaff gray, card. */

:root {
  --bg: #f4f1e9;
  --text: #26231d;
  --accent: #ad7c1f;
  --accent-2: #7c7465;
  --card: #fbf8f1;
  --display: "Palatino Linotype", "Iowan Old Style", Georgia, serif;
  --body: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Courier New", "SF Mono", Menlo, Consolas, monospace;
  --mesh-bullet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Crect x='.5' y='.5' width='9' height='9' fill='none' stroke='%23ad7c1f' stroke-width='1'/%3E%3Cpath d='M.5 9.5L9.5 .5' stroke='%23ad7c1f' stroke-width='1'/%3E%3C/svg%3E");
}

*,
*::before,
*::after {
  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: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.2;
}

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

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

h3 {
  font-size: 1.25rem;
  margin: 1.75rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

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

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

:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 2px;
}

/* Skip link */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--card);
  border: 1px solid var(--text);
  padding: 0.5rem 1rem;
  z-index: 30;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
}

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

.head-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.brand {
  font-family: var(--display);
  font-size: 1.3rem;
  text-decoration: none;
}

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

.site-nav li {
  background: none;
  padding: 0;
  margin: 0;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

.menu-btn {
  display: none;
  font: inherit;
  font-family: var(--mono);
  font-size: 0.85rem;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--text);
  border-radius: 0;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
}

@media (max-width: 560px) {
  .js .menu-btn {
    display: inline-block;
  }

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

  .js .site-nav.open {
    display: block;
  }

  .js .site-nav ul {
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.5rem 0;
  }

  h1 {
    font-size: 1.85rem;
  }
}

/* Lists with the mesh glyph bullet */
main ul {
  list-style: none;
  padding-left: 0;
  margin: 0 0 1rem;
}

main ul > li {
  background: var(--mesh-bullet) no-repeat 0 0.5em;
  background-size: 10px 10px;
  padding-left: 1.4rem;
  margin-bottom: 0.4rem;
}

main ol {
  padding-left: 1.5rem;
  margin: 0 0 1rem;
}

main ol > li {
  margin-bottom: 0.4rem;
}

/* Hero */
.hero p {
  font-size: 1.1rem;
}

.steps-list li {
  margin-bottom: 0.6rem;
}

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

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

.label {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.4rem;
}

/* Mesh rows (homepage sections) */
.mesh-row {
  position: relative;
  background: var(--card);
  border: 1px solid var(--text);
  border-top: 2px solid var(--text);
  padding: 0 1.25rem 1rem;
  margin: 2rem 0;
}

.mesh-edge {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--accent-2);
}

.mesh-edge .sieve {
  color: var(--accent);
}

.mesh-edge .mesh {
  color: var(--accent-2);
}

.mesh-row h2 {
  margin-top: 1rem;
}

/* The single margin tick */
.tick::before {
  content: "";
  position: absolute;
  left: -13px;
  top: 2.4rem;
  width: 3px;
  height: 2.6rem;
  background: var(--accent);
}

/* Step pages */
.sift {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  border-top: 1px solid var(--text);
  border-bottom: 1px solid var(--text);
  padding: 0.35rem 0;
  margin-top: 1.5rem;
}

.sift .sift-code {
  color: var(--accent-2);
}

.contents,
.recap,
.callout,
.glossary,
.example,
.checklist-block {
  background: var(--card);
  border: 1px solid var(--text);
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
}

.contents ol {
  margin-bottom: 0;
}

.contents h2,
.recap h2,
.callout h2,
.glossary h2,
.example h2 {
  font-size: 1.3rem;
  margin-top: 0.25rem;
}

.recap ul:last-child,
.callout p:last-child,
.example p:last-child {
  margin-bottom: 0;
}

.glossary dl {
  margin: 0;
}

.glossary dt {
  font-family: var(--mono);
  font-weight: 700;
  margin-top: 0.75rem;
}

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

/* CHAFF box — used on one page only */
.chaff {
  background: var(--card);
  border: 2px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
}

.chaff-head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--accent-2);
  padding-bottom: 0.35rem;
  margin-bottom: 0.75rem;
}

.chaff h2 {
  font-size: 1.3rem;
  margin-top: 0.25rem;
}

/* Checklists: printed boxes, no stored state */
.checklist-block h2,
.checklist-block h3 {
  margin-top: 0.25rem;
}

ol.checklist {
  list-style: none;
  counter-reset: item;
  padding: 0;
  margin: 0 0 1rem;
}

ol.checklist > li {
  counter-increment: item;
  position: relative;
  padding: 0.55rem 0 0.55rem 3.6rem;
  border-bottom: 1px solid var(--accent-2);
  margin: 0;
}

ol.checklist > li:first-child {
  border-top: 1px solid var(--accent-2);
}

ol.checklist > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8rem;
  width: 1.05rem;
  height: 1.05rem;
  border: 1.5px solid var(--text);
  background: var(--bg);
}

ol.checklist > li::after {
  content: counter(item, decimal-leading-zero);
  position: absolute;
  left: 1.65rem;
  top: 0.6rem;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.print-btn {
  display: none;
  font-family: var(--mono);
  font-size: 0.85rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--text);
  border-radius: 0;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
}

.js .print-btn {
  display: inline-block;
}

.print-btn:hover {
  border-color: var(--accent);
}

/* Affiliate link line */
.aff {
  border-top: 1px solid var(--accent-2);
  border-bottom: 1px solid var(--accent-2);
  padding: 0.75rem 0;
  margin: 1.25rem 0;
}

.aff a {
  font-weight: 700;
}

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

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
  background: var(--card);
}

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

th {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
}

/* Definition lists on the Cookie Policy */
.checked dt {
  font-weight: 700;
  margin-top: 1rem;
}

.checked dd {
  margin: 0.2rem 0 0;
  padding-left: 1rem;
  border-left: 1px solid var(--accent-2);
}

.effective {
  font-family: var(--mono);
  font-size: 0.9rem;
}

/* Pager */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--text);
  padding-top: 1rem;
  margin-top: 2.5rem;
}

.pager a {
  max-width: 48%;
}

/* Footer */
.site-foot {
  margin-top: 3rem;
  border-top: 1px solid var(--text);
  background: var(--card);
  padding: 1.5rem 0 2rem;
  font-size: 0.92rem;
}

.site-foot address {
  font-style: normal;
  line-height: 1.5;
  margin-bottom: 1rem;
}

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

.foot-links {
  margin-bottom: 0.75rem;
}

/* Print: the checklists print cleanly on white */
@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .site-head,
  .skip,
  .print-btn,
  .pager,
  .contents,
  .menu-btn {
    display: none !important;
  }

  .mesh-row,
  .recap,
  .callout,
  .glossary,
  .example,
  .chaff,
  .disclosure,
  .checklist-block,
  table,
  .site-foot {
    background: #fff;
    border-color: #000;
  }

  .checklist-block {
    break-inside: avoid-page;
  }

  ol.checklist > li {
    break-inside: avoid;
    border-color: #000;
  }

  ol.checklist > li::before {
    background: #fff;
    border-color: #000;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  .site-foot {
    margin-top: 1.5rem;
    font-size: 9pt;
  }
}
