/* Lawrence Elliot - site stylesheet. One paper, one ink, large type, hairline rules. */
@font-face {
  font-family: "Geist";
  font-weight: 300 600;
  font-display: swap;
  src: url("../fonts/geist-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/geist-mono-latin.woff2") format("woff2");
}
:root {
  --paper: oklch(0.985 0.003 250);
  --ink: oklch(0.17 0.012 262);
  --grey-1: oklch(0.4 0.012 262);
  --grey-2: oklch(0.52 0.012 262);
  --rule: oklch(0.87 0.005 262);
  --cobalt: oklch(0.42 0.19 264);
  --on-ink: oklch(0.985 0.003 250);
  --on-ink-2: oklch(0.72 0.01 262);
  --rule-ink: oklch(0.32 0.012 262);
  --sans: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --maxw: 82rem;
  --t-giant: clamp(2.75rem, 0.9rem + 8.2vw, 8.5rem);
  --t-huge: clamp(2.25rem, 1rem + 5.6vw, 6rem);
  --t-big: clamp(1.75rem, 1.1rem + 2.9vw, 3.5rem);
  --t-lead: clamp(1.1875rem, 1rem + 0.8vw, 1.625rem);
}
* {
  box-sizing: border-box;
}
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.5;
}
a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: from-font;
}
a:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
}
.ink a:focus-visible {
  outline-color: var(--on-ink);
}
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: var(--gutter);
  top: 0.75rem;
  background: var(--ink);
  color: var(--on-ink);
  padding: 0.5rem 0.75rem;
  z-index: 20;
}
.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  width: 100%;
}
.label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey-2);
  margin: 0;
}
.ink .label {
  color: var(--on-ink-2);
}

/* Header */
.top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
}
.top__in {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.5rem;
}
.mark {
  font-weight: 500;
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
  font-size: 0.9375rem;
}
.nav a {
  text-decoration: none;
  color: var(--grey-1);
  padding-block: 0.5rem;
}
.nav a:hover {
  color: var(--ink);
}
.nav .cta {
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
}
@media (max-width: 34rem) {
  .nav .opt {
    display: none;
  }
}

/* Panels */
.panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(5rem, 13vw, 11rem);
  border-top: 1px solid var(--rule);
}
.panel--full {
  min-height: 100svh;
}
.ink {
  background: var(--ink);
  color: var(--on-ink);
  border-top: 0;
}
.panel + .ink,
.ink + .panel {
  border-top: 0;
}

/* Type */
h1,
h2 {
  font-weight: 400;
  margin: 0;
  text-wrap: balance;
}
.giant {
  font-size: var(--t-giant);
  line-height: 0.98;
  letter-spacing: -0.045em;
  max-width: 11ch;
}
.huge {
  font-size: var(--t-huge);
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 15ch;
}
.big {
  font-size: var(--t-big);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 18ch;
}
.lead {
  font-size: var(--t-lead);
  line-height: 1.38;
  letter-spacing: -0.012em;
  max-width: 32ch;
  margin: 0;
  color: var(--grey-1);
}
.ink .lead {
  color: var(--on-ink-2);
}
.stack > * + * {
  margin-top: clamp(1.75rem, 4vw, 3rem);
}

/* Hero */
.hero {
  position: relative;
  border-top: 0;
  padding-top: clamp(7rem, 16vw, 12rem);
  justify-content: flex-end;
  padding-bottom: clamp(3rem, 8vw, 6rem);
}
.hero__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-top: clamp(2.5rem, 7vw, 6rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--on-ink);
  text-decoration: none;
  padding: 1rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  transition: background-color 0.18s ease;
}
.btn:hover {
  background: var(--cobalt);
}
.btn--paper {
  background: var(--on-ink);
  color: var(--ink);
}
.btn--paper:hover {
  background: var(--on-ink-2);
}
.text-link {
  font-size: 0.9375rem;
  color: var(--grey-1);
}
.ink .text-link {
  color: var(--on-ink-2);
}

/* Lines */
.lines {
  list-style: none;
  margin: clamp(2.5rem, 6vw, 5rem) 0 0;
  padding: 0;
}
.lines li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem;
  align-items: baseline;
  padding-block: clamp(1.25rem, 3vw, 2.25rem);
  border-top: 1px solid var(--rule);
  font-size: var(--t-big);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.ink .lines li {
  border-color: var(--rule-ink);
}
.lines li:last-child {
  border-bottom: 1px solid var(--rule);
}
.ink .lines li:last-child {
  border-color: var(--rule-ink);
}
.lines .n {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--grey-2);
}
.ink .lines .n {
  color: var(--on-ink-2);
}
.lines span.t {
  max-width: 22ch;
  text-wrap: balance;
}
@media (max-width: 34rem) {
  .lines li {
    grid-template-columns: 2.25rem 1fr;
  }
}

/* Method */
.method {
  display: grid;
  gap: 0;
  margin-top: clamp(2.5rem, 6vw, 5rem);
  border-top: 1px solid var(--ink);
}
@media (min-width: 52rem) {
  .method {
    grid-template-columns: repeat(3, 1fr);
  }
}
.method div {
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 52rem) {
  .method div {
    padding-right: 2rem;
    border-bottom: 0;
  }
  .method div + div {
    padding-left: 2rem;
    border-left: 1px solid var(--rule);
  }
}
.method b {
  display: block;
  font-weight: 400;
  font-size: var(--t-huge);
  line-height: 1;
  letter-spacing: -0.04em;
}
.method p {
  margin: 1rem 0 0;
  color: var(--grey-1);
  max-width: 24ch;
}

/* Fronts */
.fronts {
  margin: clamp(2.5rem, 6vw, 5rem) 0 0;
}
.fronts div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.25rem 2rem;
  align-items: baseline;
  padding-block: clamp(1rem, 2.4vw, 1.75rem);
  border-top: 1px solid var(--rule-ink);
}
@media (min-width: 46rem) {
  .fronts div {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
.fronts div:last-child {
  border-bottom: 1px solid var(--rule-ink);
}
.fronts dt {
  font-size: var(--t-huge);
  line-height: 1;
  letter-spacing: -0.04em;
}
.fronts dd {
  margin: 0;
  font-size: var(--t-lead);
  color: var(--on-ink-2);
}

/* Terms */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: clamp(2rem, 5vw, 4rem);
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
}
tr:last-child th,
tr:last-child td {
  border-bottom: 1px solid var(--rule);
}
th {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey-2);
  width: 13rem;
  padding-right: 1.5rem;
  padding-top: 1.5rem;
}
caption {
  caption-side: top;
  text-align: left;
  font-size: var(--t-lead);
  line-height: 1.2;
  letter-spacing: -0.012em;
  padding-bottom: 1.25rem;
}
table + table {
  margin-top: clamp(3rem, 7vw, 5.5rem);
}
th a {
  text-decoration: none;
}
th a:hover {
  text-decoration: underline;
}
td.num {
  font-family: var(--mono);
  font-size: 0.9375rem;
  width: 11rem;
  white-space: nowrap;
  text-align: right;
  padding-left: 1.25rem;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 40rem) {
  caption {
    display: block;
  }
  table,
  tbody,
  tr,
  th,
  td {
    display: block;
    width: auto;
  }
  th {
    padding-bottom: 0;
  }
  td {
    border-top: 0;
    padding-top: 0.4rem;
  }
  td.num {
    width: auto;
    text-align: left;
    padding-left: 0;
    padding-top: 0;
  }
  tr:last-child th {
    border-bottom: 0;
  }
  tr:last-child td:not(:last-child) {
    border-bottom: 0;
  }
}

.foot {
  border-top: 1px solid var(--rule);
  padding-block: 3rem;
  color: var(--grey-1);
  font-size: 0.875rem;
}
.foot p {
  max-width: 68ch;
  margin: 0 0 0.6rem;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1.25rem;
}

/* Reveal: only when scripting runs and motion is welcome */
@media (prefers-reduced-motion: no-preference) {
  .js .rv {
    opacity: 0;
    transform: translateY(14px);
    transition:
      opacity 0.7s cubic-bezier(0.2, 0, 0, 1),
      transform 0.7s cubic-bezier(0.2, 0, 0, 1);
    transition-delay: calc(var(--i, 0) * 90ms);
  }
  .js .rv.in {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Inner pages ---------- */
.nav a[aria-current="page"] {
  color: var(--ink);
}
.hero--page {
  min-height: 72svh;
}
.ink th,
.ink td {
  border-color: var(--rule-ink);
}
.ink th {
  color: var(--on-ink-2);
}
.ink tr:last-child th,
.ink tr:last-child td {
  border-color: var(--rule-ink);
}
td a {
  color: var(--cobalt);
}
.ink td a {
  color: var(--on-ink);
}
.note {
  color: var(--grey-1);
  max-width: 60ch;
  margin: 1.5rem 0 0;
  font-size: 0.9375rem;
}
.ink .note {
  color: var(--on-ink-2);
}
.essays {
  list-style: none;
  padding: 0;
  margin: clamp(2rem, 5vw, 4rem) 0 0;
}
.essays li {
  display: grid;
  gap: 0.5rem;
  padding-block: clamp(1.1rem, 2.6vw, 1.9rem);
  border-top: 1px solid var(--rule);
}
.essays li:last-child {
  border-bottom: 1px solid var(--rule);
}
.essays a {
  font-size: var(--t-big);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-decoration: none;
  max-width: 24ch;
  text-wrap: balance;
}
.essays a:hover {
  color: var(--cobalt);
}
.essays .meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey-2);
}
.doc {
  max-width: 68ch;
}
.doc .lead {
  color: var(--ink);
  max-width: none;
  margin-bottom: 1rem;
}
.doc h2 {
  font-weight: 500;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 2.75rem 0 0.75rem;
  text-wrap: balance;
}
.doc p,
.doc ul {
  margin: 0 0 1rem;
}
.doc ul {
  padding-left: 1.15rem;
}
.doc li + li {
  margin-top: 0.4rem;
}
.doc a {
  color: var(--cobalt);
}
.doc table {
  margin-top: 1rem;
}
.nb {
  white-space: nowrap;
}
.pol-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0 0 clamp(2rem, 5vw, 3.5rem);
  padding: 0 0 1.25rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
}
.pol-nav a[aria-current="page"] {
  text-decoration: none;
  color: var(--grey-2);
}

/* Very narrow phones: keep the header on one line. */
@media (max-width: 22.5rem) {
  .nav a[href$="writing.html"] {
    display: none;
  }
  .nav {
    gap: 1rem;
  }
}
