/* Aftercare docs — Cobalt Grid atoms */
:root {
  --paper: #f0ebde;
  --paper-2: #e6e0ce;
  --ink: #1f2be0;
  --ink-soft: #5560e5;
  --grid: rgba(31, 43, 224, 0.1);
  --ink-faint: rgba(31, 43, 224, 0.18);
  --serif: "Newsreader", Georgia, serif;
  --sans: "Hanken Grotesk", sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --edge: clamp(24px, 5vw, 80px);
}

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

html {
  background: #0c0c14;
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  opacity: 0.72;
}
a:focus-visible {
  outline: 1.5px solid var(--ink);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: var(--edge);
  top: 8px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  transform: translateY(-120%);
}
.skip:focus {
  transform: none;
}

.serif {
  font-family: var(--serif);
  font-weight: 400;
}
.micro {
  font-family: var(--sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
}
.mono {
  font-family: var(--mono);
  letter-spacing: 0.05em;
}

/* furniture */
.hair-t,
.hair-b {
  position: absolute;
  left: var(--edge);
  right: var(--edge);
  height: 1.5px;
  background: var(--ink);
  z-index: 5;
  pointer-events: none;
}
.hair-t {
  top: 28px;
}
.hair-b {
  bottom: 28px;
}

.glitch {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}
.glitch .step {
  background-image: repeating-linear-gradient(
    90deg,
    var(--ink) 0 2px,
    transparent 2px 8px
  );
  background-color: var(--paper);
}

.qr {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: 1.5px;
  background: var(--paper);
  padding: 4px;
  box-shadow: 0 0 0 1.5px var(--paper);
}
.qr i {
  background: var(--grid);
  display: block;
}
.qr i.on {
  background: var(--ink);
}

/* site nav */
.site-nav {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
  padding: 56px var(--edge) 0;
}
.site-nav .brand {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.site-nav .links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
}
.site-nav .links a {
  text-decoration: none;
}
.site-nav .links a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

/* COVER */
.cover {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cover .top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 64px var(--edge) 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 4;
}
.cover .stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px var(--edge);
  position: relative;
  z-index: 4;
  max-width: 78%;
}
.cover .kick {
  font-family: var(--sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 14px;
  margin-bottom: 28px;
}
.cover h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(52px, 9vw, 128px);
  line-height: 0.92;
  letter-spacing: -0.01em;
}
.cover .ed {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2.4vw, 36px);
  line-height: 1.15;
  color: var(--ink-soft);
  margin-top: 22px;
  max-width: 28em;
}
.cover .foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 0 var(--edge) 64px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 4;
}
.cover .glitch {
  right: 0;
  width: min(30vw, 420px);
  opacity: 0.7;
}
.cover .qrwrap {
  position: absolute;
  top: 124px;
  right: var(--edge);
  width: 88px;
  height: 88px;
  z-index: 5;
}

/* chapter opener band */
.chapter {
  position: relative;
  padding: 100px var(--edge) 64px;
  overflow: hidden;
}
.chapter .ix {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}
.chapter h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  max-width: 14em;
}
.chapter .lede {
  font-family: var(--sans);
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.5;
  max-width: 38em;
  margin-top: 28px;
}
.chapter .glitch {
  left: 0;
  width: min(14vw, 180px);
  opacity: 0.45;
}

/* section head */
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 14px;
  margin: 56px 0 32px;
  flex-wrap: wrap;
}
.sec-head .tag {
  font-family: var(--mono);
  font-size: 13px;
}
.sec-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 0.95;
  letter-spacing: -0.01em;
}
.sec-head .sp {
  flex: 1;
}
.sec-head .lab {
  font-family: var(--sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
}

/* prose */
.page {
  position: relative;
  padding: 0 var(--edge) 96px;
  max-width: calc(720px + 2 * var(--edge));
}
.page.wide {
  max-width: calc(1040px + 2 * var(--edge));
}
.prose p {
  margin: 0 0 1.15em;
  font-size: 16px;
  max-width: 42rem;
}
.prose h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.15;
  margin: 2em 0 0.6em;
}
.prose ul,
.prose ol {
  margin: 0 0 1.25em;
  padding-left: 1.25em;
  max-width: 42rem;
}
.prose li {
  margin-bottom: 0.45em;
  font-size: 16px;
}
.prose strong {
  font-weight: 600;
}
.prose code,
.inline-code {
  font-family: var(--mono);
  font-size: 0.88em;
  letter-spacing: 0.02em;
  background: var(--paper-2);
  padding: 0.08em 0.35em;
  border: 1px solid var(--ink-faint);
}

pre,
.code {
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  padding: 18px 20px;
  overflow-x: auto;
  margin: 0 0 1.5em;
  max-width: 48rem;
}
pre code,
.code code {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  line-height: 1.55;
  background: none;
  border: 0;
  padding: 0;
  white-space: pre;
}

/* ledger / tables */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 14px;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar .h {
  font-family: var(--serif);
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1;
}
.topbar .t {
  font-family: var(--mono);
  font-size: 13px;
}

.ledger {
  margin-top: 0;
}
.lrow {
  display: grid;
  grid-template-columns: 64px minmax(0, 0.85fr) minmax(0, 1.6fr) auto;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--ink-faint);
  align-items: baseline;
  text-decoration: none;
  color: inherit;
}
.lrow.head {
  border-bottom: 1.5px solid var(--ink);
}
.lrow.head span {
  font-family: var(--sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
}
.lrow .num {
  font-family: var(--mono);
  font-size: 14px;
}
.lrow .nm {
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.1;
}
.lrow .ds {
  font-size: 14px;
  line-height: 1.45;
}
.lrow .dl {
  font-family: var(--mono);
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}
a.lrow:hover .nm {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.5em;
  border: 1.5px solid var(--ink);
}
table.doc {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.doc th,
table.doc td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ink-faint);
  vertical-align: top;
}
table.doc th {
  font-family: var(--sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  border-bottom: 1.5px solid var(--ink);
  background: var(--paper-2);
}
table.doc tr:last-child td {
  border-bottom: 0;
}
table.doc td:first-child {
  font-family: var(--mono);
  font-size: 13px;
  white-space: nowrap;
}

/* do / don't */
.dos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1.5px solid var(--ink);
  margin: 0 0 2em;
}
.do-card {
  padding: 32px;
}
.do-card.do {
  border-right: 1.5px solid var(--ink);
}
.do-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  margin: 0 0 20px;
}
.do-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.do-card li {
  font-size: 15px;
  line-height: 1.55;
  padding-left: 24px;
  position: relative;
  margin-bottom: 12px;
}
.do-card li::before {
  position: absolute;
  left: 0;
  font-family: var(--mono);
}
.do-card.do li::before {
  content: "+";
}
.do-card.dont li::before {
  content: "\2715";
  opacity: 0.55;
}

/* quote / manifesto */
.pull {
  margin: 48px 0;
  padding: 32px 0;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  max-width: 36em;
}
.pull .kicker {
  font-family: var(--sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  margin-bottom: 16px;
}
.pull q {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
  quotes: none;
  display: block;
}
.pull .by {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
}

/* site footer */
.site-foot {
  position: relative;
  margin-top: 48px;
  padding: 40px var(--edge) 56px;
  border-top: 1.5px solid var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.site-foot .l {
  font-family: var(--serif);
  font-size: 28px;
}
.site-foot .r {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1.5px solid var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.05em;
}
.pager a {
  text-decoration: none;
}
.pager a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 900px) {
  .cover .stage {
    max-width: 100%;
  }
  .cover .qrwrap,
  .cover .glitch,
  .chapter .glitch {
    display: none;
  }
  .lrow {
    grid-template-columns: 48px 1fr;
  }
  .lrow .ds,
  .lrow .dl {
    grid-column: 2;
  }
  .dos {
    grid-template-columns: 1fr;
  }
  .do-card.do {
    border-right: 0;
    border-bottom: 1.5px solid var(--ink);
  }
}
