/* Knitted pages on kruxlab.com: the Krux Lab paper, ink and accent, with a serif body so long
   policy text reads comfortably. Monospace stays for navigation, labels and small print. */
:root {
  --bg: #f6f4ec;
  --fg: #0e0e0e;
  --muted: #5a554b;
  --rule: #c5bb9d;
  --accent: #2d6a4f;
  --accent-soft: rgba(45, 106, 79, 0.08);
  --card: #fbf9f1;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --serif: "Iowan Old Style", "Hoefler Text", "Charter", "Cambria", "Georgia", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
html, body { margin: 0; padding: 0; }
body {
  color: var(--fg);
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, rgba(45, 106, 79, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(45, 106, 79, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  background-attachment: fixed;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: var(--bg); }

a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--muted); transition: color .15s ease, border-color .15s ease; }
a:hover { color: var(--accent); border-bottom-color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--bg); padding: 6px 10px; }

.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 28px;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav a { border-bottom: 0; }
.nav .brand { color: var(--fg); }
.nav .brand .slash { color: var(--accent); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; flex-wrap: wrap; justify-content: flex-end; }
.nav [aria-current="page"] { color: var(--accent); }

main { max-width: 760px; margin: 0 auto; padding: 0 28px 48px; }

.hero { padding: 72px 0 32px; }
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 20px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }
h1 {
  font-family: var(--mono);
  font-size: clamp(36px, 7vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0;
}
.lede { font-size: clamp(20px, 2.4vw, 23px); line-height: 1.45; margin: 24px 0 0; max-width: 34em; }
.meta { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted); margin: 20px 0 0; }

h2 {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 56px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex; gap: 12px; align-items: baseline;
}
h2 .n {
  font-size: 10px; letter-spacing: 0.04em; color: var(--bg); background: var(--accent);
  padding: 3px 7px; border-radius: 3px; flex: none;
}
h3 { font-size: 19px; line-height: 1.35; margin: 28px 0 8px; font-weight: 700; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 1.3em; }
li { margin: 0 0 8px; }
li::marker { color: var(--accent); }
strong { font-weight: 700; }

.card {
  background: var(--accent-soft);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 24px 28px;
  margin: 32px 0 0;
}
.card h2 { margin-top: 0; padding-top: 0; border-top: 0; }
.card ul { margin-bottom: 0; }

.toc { font-family: var(--mono); font-size: 13px; line-height: 1.5; columns: 2; column-gap: 32px; padding: 0; list-style: none; margin: 32px 0 0; }
.toc li { break-inside: avoid; margin: 0 0 10px; }
.toc a { border-bottom: 0; color: var(--muted); }
.toc a:hover { color: var(--accent); }

table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 16px; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); }
th { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
td:first-child { font-weight: 700; width: 30%; }

.links { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 12px; }
.links a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--card);
  padding: 18px 20px; min-height: 44px;
  transition: border-color .15s ease, transform .15s ease;
}
.links a:hover { border-color: var(--accent); transform: translateY(-1px); }
.links .t { font-family: var(--mono); font-size: 15px; font-weight: 600; letter-spacing: 0.01em; }
.links .d { display: block; font-size: 16px; color: var(--muted); margin-top: 2px; }
.links .arr { font-family: var(--mono); color: var(--muted); }
.links a:hover .arr { color: var(--accent); }

.stores { display: flex; gap: 10px; flex-wrap: wrap; margin: 32px 0 0; }
.badge {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px dashed var(--rule); border-radius: 999px; padding: 8px 16px; color: var(--muted);
}

.email { font-family: var(--mono); font-size: clamp(20px, 3.4vw, 28px); font-weight: 600; margin: 8px 0 24px; }
.email a { border-bottom-width: 2px; }

details { border-bottom: 1px solid var(--rule); padding: 14px 0; }
details:first-of-type { border-top: 1px solid var(--rule); }
summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; min-height: 28px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); color: var(--accent); font-weight: 400; }
details[open] summary::after { content: "–"; }
details > :not(summary) { margin-top: 12px; }
details p:last-child, details ul:last-child, details ol:last-child { margin-bottom: 4px; }

.note { font-size: 16px; color: var(--muted); }

footer {
  max-width: 760px; margin: 24px auto 0; padding: 28px 28px 56px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
}
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { border-bottom: 0; }

@media (max-width: 600px) {
  body { font-size: 17px; background-size: 24px 24px; }
  .nav { padding: 12px 16px; letter-spacing: 0.08em; }
  .nav ul { gap: 14px; }
  main { padding: 0 16px 40px; }
  .hero { padding: 44px 0 20px; }
  h2 { margin-top: 44px; }
  .card { padding: 20px; }
  .toc { columns: 1; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tr { border-bottom: 1px solid var(--rule); padding: 10px 0; }
  td { border: 0; padding: 2px 0; width: auto !important; }
  footer { padding: 24px 16px 48px; }
}
@media (max-width: 380px) {
  .nav .hide-narrow { display: none; }
}
@media print {
  body { background: #fff; font-size: 12pt; }
  .nav, .skip, footer nav, .toc { display: none; }
  a { border: 0; }
}
