/* MaycombHQ: the same tokens as the Atticus site (maycombhq.com/atticus), so the two read as one
   place. Light by default, dark when the system asks, and whichever the Atticus site's theme
   switch was last set to (it shares this origin; see the script in each page's head). Every text
   colour keeps 4.5:1 on its ground in both themes. */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --ink: #f5f8fa;
  --panel: #ffffff;
  --line: #d3dde4;
  --text: #13202a;
  --muted: #4a5d6c;
  --cite: #006872;
  --cite-strong: #00525a;
  --on-cite: #ffffff;
  --cite-wash: rgba(0, 104, 114, 0.09);
  --no: #a3232e;
  --no-wash: rgba(163, 35, 46, 0.08);
  --code-bg: #f9fbfc;
  --glow: rgba(0, 150, 160, 0.13);
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --gutter: 56px;
}
:root.dark {
  color-scheme: dark;
  --ink: #0e1820;
  --panel: #13212b;
  --line: #253642;
  --text: #e3edf2;
  --muted: #a3b5c2;
  --cite: #5ce1ee;
  --cite-strong: #9ff0f7;
  --on-cite: #06262a;
  --cite-wash: rgba(92, 225, 238, 0.1);
  --no: #ff9aa2;
  --no-wash: rgba(255, 120, 130, 0.1);
  --code-bg: #0f1c25;
  --glow: rgba(92, 225, 238, 0.09);
}
@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    color-scheme: dark;
    --ink: #0e1820;
    --panel: #13212b;
    --line: #253642;
    --text: #e3edf2;
    --muted: #a3b5c2;
    --cite: #5ce1ee;
    --cite-strong: #9ff0f7;
    --on-cite: #06262a;
    --cite-wash: rgba(92, 225, 238, 0.1);
    --no: #ff9aa2;
    --no-wash: rgba(255, 120, 130, 0.1);
    --code-bg: #0f1c25;
    --glow: rgba(92, 225, 238, 0.09);
  }
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background:
    radial-gradient(60rem 36rem at 88% -8%, var(--glow), transparent 70%),
    var(--ink);
  color: var(--text);
  font-family:
    "IBM Plex Sans",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}
a {
  color: var(--cite);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--cite-strong);
}
:focus-visible {
  outline: 2px solid var(--cite);
  outline-offset: 3px;
}

.page {
  margin: 0 auto;
  max-width: 1080px;
  padding: 96px 24px 56px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
@media (max-width: 640px) {
  .page {
    padding: 48px 16px 40px;
  }
  :root {
    --gutter: 34px;
  }
  .source li::before {
    font-size: 0.75rem;
  }
}

.masthead h1,
.lost h1 {
  margin: 0;
  font-weight: 600;
  line-height: 1;
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
}

/* The artwork: files, one line cited, a thread to the map it builds. Drawn in the page's own
   colours so it follows the theme. */
.art {
  width: 100%;
  height: auto;
  max-width: 470px;
  justify-self: end;
  overflow: visible;
}
.art .card {
  fill: var(--panel);
  stroke: var(--line);
}
.art .back1 {
  opacity: 0.85;
}
.art .back2 {
  opacity: 0.6;
}
.art .gutter,
.art .edge {
  stroke: var(--line);
  stroke-width: 1.2;
  fill: none;
}
.art .num {
  font: 400 10px var(--mono);
  fill: var(--muted);
}
.art .bar {
  fill: var(--line);
}
.art .bar.faint {
  opacity: 0.9;
}
.art .cited-wash {
  fill: var(--cite-wash);
}
.art .cited-edge,
.art .cited-bar,
.art .node.cited {
  fill: var(--cite);
}
.art .bracket,
.art .thread,
.art .ring {
  fill: none;
  stroke: var(--cite);
  stroke-width: 2;
}
.art .thread {
  stroke-width: 1.5;
  stroke-dasharray: 4 5;
}
.art .ring {
  stroke-width: 1.2;
  opacity: 0.6;
}
.art .node {
  fill: var(--panel);
  stroke: var(--muted);
  stroke-width: 1.4;
}
.art .node.cited {
  stroke: var(--cite);
}
@media (max-width: 760px) {
  .masthead {
    grid-template-columns: minmax(0, 1fr);
  }
  .art {
    justify-self: start;
    max-width: 340px;
    margin-left: var(--gutter);
  }
}

/* The masthead as the first three lines of a file, numbered in a gutter. */
.source {
  list-style: none;
  counter-reset: line;
  margin: 0;
  padding: 0;
  position: relative;
}
.source::before {
  /* the gutter's rule */
  content: "";
  position: absolute;
  top: 0.2em;
  bottom: 0.2em;
  left: calc(var(--gutter) - 14px);
  border-left: 1px solid var(--line);
}
.source li {
  counter-increment: line;
  position: relative;
  padding-left: var(--gutter);
}
.source li::before {
  content: counter(line);
  position: absolute;
  left: 0;
  width: calc(var(--gutter) - 28px);
  text-align: right;
  font: 400 0.875rem/1 var(--mono);
  color: var(--muted);
}
.source .l-name::before {
  top: calc(0.5em + 0.4rem);
}
.source .l-name h1 {
  font-size: clamp(3rem, 1.4rem + 6vw, 6rem);
  letter-spacing: -0.045em;
  padding: 0.04em 0 0.12em;
}
.source .l-claim {
  margin-top: 18px;
}
.source .l-claim::before,
.source .l-detail::before {
  top: 0.55em;
}
.source .l-claim p {
  margin: 0;
  font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.015em;
  max-width: 22em;
}
.source .l-detail {
  margin-top: 12px;
}
.source .l-detail p {
  margin: 0;
  max-width: 44ch;
  font-size: 1.1875rem;
  color: var(--muted);
}

.projects {
  margin: 88px 0 0;
}
.projects h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* A project's entry, in the corner brackets the Atticus app uses for what has been checked. */
.project {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 32px 40px;
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.project::before,
.project::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 0 solid var(--cite);
  pointer-events: none;
}
.project::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}
.project::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}
.project .title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.project .badge {
  padding: 2px 9px;
  border: 1px solid var(--cite);
  border-radius: 999px;
  color: var(--cite);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
}
.project .mark {
  width: 44px;
  height: 44px;
  flex: none;
  color: var(--cite);
}
.project h3 {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.project h3 a {
  color: var(--text);
  text-decoration: none;
}
.project h3 a:hover {
  color: var(--cite-strong);
  text-decoration: underline;
  text-decoration-color: var(--cite);
}
.project .about p {
  margin: 0 0 12px;
  max-width: 54ch;
}
.project .about .pitch {
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.01em;
  max-width: 30ch;
  margin-bottom: 14px;
}
.project .about p:not(.pitch):not(.links) + p:not(.links) {
  color: var(--muted);
}
.project .links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin-top: 22px !important;
  font-size: 0.9375rem;
}
.project .links a.primary {
  display: inline-block;
  padding: 9px 16px;
  background: var(--cite);
  color: var(--on-cite);
  font-weight: 600;
  text-decoration: none;
}
.project .links a.primary:hover {
  background: var(--cite-strong);
  color: var(--on-cite);
}

/* The one moment of motion: the verifier's cursor checks line 8, rejects it, moves to line 11
   and keeps it. With reduced motion it shows the result. */
.demo {
  --row: 30px;
  margin: 0;
  align-self: start;
  background: var(--code-bg);
  border: 1px solid var(--line);
  font: 400 0.8125rem/var(--row) var(--mono);
  min-width: 0;
}
.demo figcaption {
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.6;
}
.demo .code {
  position: relative;
  padding: 8px 0;
  overflow-x: auto;
}
.demo .row {
  position: relative;
  z-index: 1;
  display: flex;
  height: var(--row);
  white-space: pre;
}
.demo .n {
  flex: none;
  width: 44px;
  padding-right: 14px;
  text-align: right;
  color: var(--muted);
}
.demo code {
  font: inherit;
  color: var(--text);
  padding-right: 14px;
}
.demo .cursor {
  position: absolute;
  left: 0;
  right: 0;
  top: 8px;
  height: var(--row);
  border-left: 3px solid var(--cite);
  background: var(--cite-wash);
  animation: check 3.2s cubic-bezier(0.65, 0, 0.35, 1) 0.6s both;
}
.demo .row:nth-child(1) code {
  animation: reject 3.2s linear 0.6s both;
}
.demo .row:nth-child(1) .n {
  animation: reject-n 3.2s linear 0.6s both;
}
@keyframes check {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  8%,
  38% {
    opacity: 1;
    transform: translateY(0);
    border-color: var(--cite);
    background: var(--cite-wash);
  }
  44% {
    border-color: var(--no);
    background: var(--no-wash);
    transform: translateY(0);
  }
  58% {
    border-color: var(--no);
    background: var(--no-wash);
    transform: translateY(0);
  }
  80%,
  100% {
    opacity: 1;
    transform: translateY(calc(var(--row) * 3));
    border-color: var(--cite);
    background: var(--cite-wash);
  }
}
@keyframes reject {
  0%,
  44% {
    text-decoration: line-through transparent;
  }
  48%,
  100% {
    text-decoration: line-through var(--no);
    color: var(--muted);
  }
}
@keyframes reject-n {
  0%,
  44% {
    color: var(--muted);
  }
  48%,
  100% {
    color: var(--no);
  }
}
.demo .verdicts {
  list-style: none;
  margin: 0;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
  font:
    400 0.8125rem/1.55 "IBM Plex Sans",
    system-ui,
    sans-serif;
  color: var(--muted);
}
.demo .verdicts li + li {
  margin-top: 4px;
}
.demo .verdicts b {
  font-weight: 600;
  margin-right: 6px;
}
.demo .verdicts .no b {
  color: var(--no);
}
.demo .verdicts .ok b {
  color: var(--cite);
}
.demo .verdicts .no {
  animation: appear 0.4s ease 2.1s both;
}
.demo .verdicts .ok {
  animation: appear 0.4s ease 3.4s both;
}
@keyframes appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .demo .cursor,
  .demo .row code,
  .demo .row .n,
  .demo .verdicts li {
    animation-duration: 1ms !important;
    animation-delay: 0s !important;
  }
}

.screen {
  grid-column: 1 / -1;
  margin: 8px 0 0;
}
.screen a {
  display: block;
  border: 1px solid var(--line);
  box-shadow: 0 28px 60px -34px rgba(0, 40, 50, 0.5);
}
.screen img {
  display: block;
  width: 100%;
  height: auto;
}
.screen figcaption {
  margin-top: 12px;
  font-size: 0.9375rem;
  color: var(--muted);
}
.screen figcaption a {
  display: inline;
  border: 0;
  box-shadow: none;
  margin-left: 6px;
}

@media (max-width: 860px) {
  .project {
    grid-template-columns: minmax(0, 1fr);
    padding: 24px;
  }
}
@media (max-width: 480px) {
  .project {
    padding: 20px 16px;
  }
  .demo {
    font-size: 0.75rem;
  }
}

.foot {
  margin-top: auto;
  padding-top: 72px;
  font-size: 0.9375rem;
  color: var(--muted);
}
.foot .maker {
  justify-content: flex-start;
  gap: 6px 24px;
  margin-bottom: 10px;
  color: var(--text);
}
.foot .maker a[rel="author"] {
  font-weight: 600;
}
.foot p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  justify-content: space-between;
}

.lost h1 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3rem);
  letter-spacing: -0.02em;
}
.lost p {
  margin: 16px 0 0;
  max-width: 52ch;
}
