/* Matches shayon.work: Space Grotesk, white/black, Tailwind gray + blue-600, one 42rem column. */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(../fonts/space-grotesk-latin.woff2) format('woff2');
}

:root {
  --bg: #fff;
  --text: #111827;        /* gray-900 */
  --text-2: #1f2937;      /* gray-800 */
  --muted: #374151;       /* gray-700 */
  --faint: #4b5563;       /* gray-600 */
  --line: #e5e7eb;        /* gray-200 */
  --line-2: #d1d5db;      /* gray-300 */
  --link: #2563eb;        /* blue-600 */
  --code-bg: #f9fafb;     /* gray-50 */
  --seg-host: #9ca3af;    /* gray-400 */
  --seg-len: #b45309;     /* amber-700 */
  --seg-prog: #2563eb;
  --seg-data: #374151;
  --note-bg: #f5f8ff;
  --note-line: #dbe5fa;
  --note-accent: #2563eb;
  --note-link: #1d4ed8;
  --on-link: #fff;
  --orbit-1: #2563eb1f;
  --orbit-2: #2563ebd9;
  --orbit-3: #93c5fdf2;
  --pick-bg: #eff6ff;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000;
    --text: #f3f4f6;      /* gray-100 */
    --text-2: #e5e7eb;    /* gray-200 */
    --muted: #d1d5db;     /* gray-300 */
    --faint: #9ca3af;     /* gray-400 */
    --line: #1f2937;      /* gray-800 */
    --line-2: #374151;    /* gray-700 */
    --link: #60a5fa;      /* blue-400 */
    --code-bg: #0a0a0a;
    --seg-host: #6b7280;
    --seg-len: #f59e0b;
    --seg-prog: #60a5fa;
    --seg-data: #d1d5db;
    --note-bg: #0c1426;
    --note-line: #253657;
    --note-accent: #60a5fa;
    --note-link: #93c5fd;
    --on-link: #000;
    --orbit-1: #60a5fa1f;
    --orbit-2: #60a5fad9;
    --orbit-3: #dbeafef2;
    --pick-bg: #0c1426;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

.wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

@media (min-width: 768px) {
  .wrap { padding: 8rem 1.5rem; }
}

a { color: var(--link); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }

header { margin-bottom: 4rem; }

h1 {
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 500;
  letter-spacing: .025em;
  margin: 0 0 .5rem;
}

@media (min-width: 768px) {
  h1 { font-size: 2.25rem; line-height: 2.5rem; }
  header { margin-bottom: 5rem; }
}

.kicker {
  margin: 0;
  font-size: .875rem;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
}

@media (min-width: 768px) { .kicker { font-size: 1rem; } }

.byline { margin: 1rem 0 0; font-size: .875rem; color: var(--faint); }

h2 {
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 500;
  margin: 0 0 1.25rem;
}

section { margin-top: 4rem; }
@media (min-width: 768px) { section { margin-top: 6rem; } }

p { margin: 0 0 1.25rem; }

.lead {
  font-size: 1.125rem;
  line-height: 1.75rem;
  color: var(--text-2);
}

@media (min-width: 768px) { .lead { font-size: 1.25rem; line-height: 1.85rem; } }

.body { font-size: 1rem; line-height: 1.7; color: var(--muted); }

.small { font-size: .875rem; color: var(--faint); }

code, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: .875em;
}

/* Hero: the QR code as large as the column allows, its output underneath. */
.hero { margin-bottom: 4rem; }

.qr { margin: 0 0 2.5rem; }

/* 145 modules including the quiet zone; 580px = exactly 4px per module,
   so every module is drawn the same size. Phones use the full width. */
.qr img {
  display: block;
  width: 100%;
  max-width: 580px;
  height: auto;
  image-rendering: pixelated;
  background: #fff;
  border: 1px solid var(--line);
}

.qr figcaption { margin-top: .75rem; font-size: .875rem; color: var(--faint); }

.names-label { margin: 0 0 .75rem; font-size: .875rem; color: var(--faint); }

.names {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  min-height: 12rem;
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 2rem;
}

@media (min-width: 640px) { .names { grid-template-columns: 1fr 1fr; } }

.names li {
  border-bottom: 1px solid var(--line);
  padding: .55rem 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: .95rem;
  color: var(--text);
  overflow-wrap: anywhere;
}

.names li.old { color: var(--faint); }

@media (prefers-reduced-motion: no-preference) {
  .names li.new { animation: arrive .35s ease-out; }
  @keyframes arrive { from { opacity: 0; transform: translateY(-.25rem); } to { opacity: 1; transform: none; } }
}

/* The whole link, coloured by part. */
.link-block {
  margin: 0 0 1rem;
  padding: 1rem;
  background: var(--code-bg);
  border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: .72rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-all;
  max-height: 22rem;
  overflow-y: auto;
}

.seg-host { color: var(--seg-host); }
.seg-len { color: var(--seg-len); font-weight: 500; }
.seg-prog { color: var(--seg-prog); }
.seg-data { color: var(--seg-data); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.25rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
  font-size: .875rem;
  color: var(--faint);
}

.legend li::before {
  content: '';
  display: inline-block;
  width: .65rem;
  height: .65rem;
  margin-right: .45rem;
  vertical-align: baseline;
  background: currentColor;
}

.legend .k-host::before { background: var(--seg-host); }
.legend .k-len::before { background: var(--seg-len); }
.legend .k-prog::before { background: var(--seg-prog); }
.legend .k-data::before { background: var(--seg-data); }

/* The ladder: one row per link size. */
.ladder { list-style: none; margin: 2rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.rung { border-bottom: 1px solid var(--line); padding: 1.5rem 0; }

.rung-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.rung-size { font-size: 1.125rem; font-weight: 500; margin: 0; }
.rung-what { font-size: .875rem; color: var(--faint); text-align: right; }

.bar {
  height: .375rem;
  margin: .75rem 0 1rem;
  background: var(--line);
}

.bar span {
  display: block;
  height: 100%;
  min-width: 2px;
  background: var(--link);
}

.rung-desc { margin: 0 0 1rem; font-size: 1rem; line-height: 1.7; color: var(--muted); }

.story {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border-left: 2px solid var(--line-2);
  min-height: 9rem;
  max-height: 20rem;
  overflow-y: auto;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-2);
  white-space: pre-wrap;
}

.story.waiting { color: var(--faint); }
.story.streaming::after { content: '\2589'; color: var(--faint); margin-left: 1px; }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* Buttons: one filled, one outlined. */
.btn {
  display: inline-block;
  font: inherit;
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.25rem;
  padding: .6rem 1.1rem;
  border: 1px solid var(--line-2);
  border-radius: .375rem;
  background: none;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}

.btn:hover:not(:disabled) { border-color: var(--faint); text-decoration: none; }
.btn:disabled { color: var(--faint); cursor: default; }
.btn.primary { background: var(--link); border-color: var(--link); color: var(--on-link); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); border-color: var(--link); }

button.text {
  font: inherit;
  font-size: .875rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  cursor: pointer;
}

button.text:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 4px; }
button.text:disabled { color: var(--faint); cursor: default; }

.notes { padding-left: 1.1rem; margin: 0; }
.notes li { margin-bottom: 1rem; font-size: 1rem; line-height: 1.7; color: var(--muted); }

/* Same box as the hiring note on shayon.work. */
.work-note {
  margin-top: 4rem;
  padding: 1.5rem;
  background: var(--note-bg);
  border: 1px solid var(--note-line);
  border-left: 3px solid var(--note-accent);
  border-radius: 0 .375rem .375rem 0;
}

@media (min-width: 768px) { .work-note { padding: 2rem; margin-top: 6rem; } }

.work-note h2 { font-size: 1.5rem; line-height: 1.35; letter-spacing: -.01em; margin-bottom: 1.25rem; }
.work-note p { font-size: 1rem; line-height: 1.7; color: var(--muted); margin-bottom: 1rem; }
.work-note .links { display: flex; flex-wrap: wrap; gap: 1rem 1.75rem; margin-top: 1.5rem; font-weight: 500; }
.work-note a { color: var(--note-link); }

footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line-2);
}

footer .links { display: flex; flex-wrap: wrap; gap: .75rem 2rem; margin: 1.5rem 0; }
footer .links a { font-size: .875rem; color: var(--muted); letter-spacing: .05em; }
footer .links a:hover { color: var(--text); }
footer .copy { font-size: .75rem; color: var(--faint); letter-spacing: .025em; margin: 2rem 0 0; }

/* Model engines run in sandboxed frames that stay inside the viewport,
   so WebKit does not throttle their timers. */
.engine {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: .01;
  pointer-events: none;
}

/* How it works */
h3 {
  font-size: 1.05rem;
  line-height: 1.6rem;
  font-weight: 500;
  margin: 2.5rem 0 .75rem;
  color: var(--text);
}

pre.code {
  margin: 0 0 1.25rem;
  padding: 1rem;
  background: var(--code-bg);
  border: 1px solid var(--line);
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: .8rem;
  line-height: 1.6;
  color: var(--text-2);
}

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

table.layout {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  color: var(--muted);
}

table.layout th, table.layout td {
  text-align: left;
  padding: .55rem 1rem .55rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.layout th { font-weight: 500; color: var(--text); border-bottom-color: var(--line-2); }
table.layout td:first-child { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace; font-size: .85rem; white-space: nowrap; }

ol.steps { padding-left: 1.25rem; margin: 0 0 1.25rem; }
ol.steps li { margin-bottom: .9rem; font-size: 1rem; line-height: 1.7; color: var(--muted); padding-left: .25rem; }

strong { font-weight: 500; color: var(--text); }

/* Give it a start */
.toy { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0 0 .75rem; }

.toy input {
  flex: 1 1 12rem;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 1rem;
  line-height: 1.25rem;
  padding: .6rem .75rem;
  border: 1px solid var(--line-2);
  border-radius: .375rem;
  background: var(--bg);
  color: var(--text);
}

.toy input:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

.presets { font-size: .875rem; color: var(--faint); margin: 0 0 1.5rem; }
.presets button { margin-left: .6rem; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.presets button:last-child { font-family: inherit; }

.toy-name {
  margin: 0 0 1.25rem;
  min-height: 2.6rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 1.5rem;
  line-height: 2.6rem;
  overflow-wrap: anywhere;
}

@media (min-width: 768px) { .toy-name { font-size: 1.875rem; } }

.toy-name button {
  font: inherit;
  padding: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text);
  cursor: pointer;
}

.toy-name button.given { color: var(--faint); }
.toy-name button.on { border-bottom-color: var(--link); color: var(--link); }
.toy-name .stop { font-size: .75rem; color: var(--faint); letter-spacing: .05em; margin-left: .5em; font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif; }

.odds { margin: 0 0 1rem; padding: 1rem 1.1rem; border: 1px solid var(--line); background: var(--code-bg); }
.odds-title { margin: 0 0 .75rem; font-size: .875rem; color: var(--faint); }
.odds-title code { color: var(--text); }
.odds-rows { list-style: none; margin: 0; padding: 0; }

.odds-rows li {
  display: grid;
  grid-template-columns: 2.5rem 1fr 3.25rem;
  align-items: center;
  gap: .75rem;
  padding: .2rem .4rem;
  margin: 0 -.4rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .875rem;
  color: var(--muted);
}

.odds-rows li.picked { background: var(--pick-bg); color: var(--text); }
.odds-rows .track { height: .5rem; background: var(--line); }
.odds-rows .fill { display: block; height: 100%; min-width: 1px; background: var(--line-2); transition: width .15s ease-out; }
.odds-rows li.picked .fill { background: var(--link); }
.odds-rows .pct { text-align: right; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) { .odds-rows .fill { transition: none; } }

/* Weights -> digits -> one number */
.pack { margin: 0 0 1.5rem; padding: 1rem 1.1rem; border: 1px solid var(--line); background: var(--code-bg); }
.pack-label { margin: 0 0 .4rem; font-size: .875rem; color: var(--faint); }
.pack-row:last-child .pack-label { margin: 0; color: var(--text); }

.pack-cells {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .8rem;
}

.pack-cells span {
  min-width: 2.1rem;
  padding: .2rem .3rem;
  text-align: center;
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--text);
}

.pack-cells span.gap { border-color: transparent; background: none; color: var(--faint); min-width: 0; }

.pack-number {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .8rem;
  color: var(--seg-data);
  overflow-wrap: anywhere;
}

.pack-arrow { margin: .6rem 0; font-size: .8rem; color: var(--faint); }

/* Part labels */
.part { margin: 0 0 .5rem; font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }

/* Preset starts */
.presets { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.presets button { margin-left: 0; }
.chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .8125rem;
  line-height: 1.25rem;
  padding: .2rem .6rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.chip.plain { font-family: inherit; }
.chip:hover { border-color: var(--link); color: var(--link); }

/* The link, taken apart */
.anatomy { display: flex; flex-wrap: wrap; gap: 1rem .5rem; margin: 0 0 1.25rem; }
.anatomy > div { min-width: 0; }
.anatomy code { display: block; font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-bottom: .35rem; }
.anatomy span {
  display: block;
  padding-top: .3rem;
  border-top: 2px solid currentColor;
  font-size: .75rem;
  white-space: nowrap;
}
.anatomy .part-host { color: var(--seg-host); }
.anatomy .part-len { color: var(--seg-len); }
.anatomy .part-prog { color: var(--seg-prog); }
.anatomy .part-data { color: var(--seg-data); }

details.whole { margin: 0 0 1.25rem; }
details.whole summary { cursor: pointer; font-size: .875rem; color: var(--link); margin-bottom: .75rem; }
details.whole .link-block { margin-bottom: 0; }

/* Worked example */
table.worked { border-collapse: collapse; font-size: .9rem; color: var(--muted); }
table.worked th { text-align: left; font-weight: 400; color: var(--faint); padding: .45rem 1.5rem .45rem 0; }
table.worked td {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .875rem;
  color: var(--text);
  padding: .45rem .9rem;
  border: 1px solid var(--line-2);
  text-align: center;
  white-space: nowrap;
}
table.worked tr:last-child td { text-align: left; background: var(--code-bg); }

.pack-number { margin: 0 0 1.25rem; padding: .75rem 1rem; border: 1px solid var(--line); background: var(--code-bg); }

/* The network, left to right */
.flow { display: grid; grid-template-columns: 1fr; gap: 1.6rem; margin: 0 0 1.5rem; }
.flow-box { position: relative; padding: .8rem .9rem; border: 1px solid var(--line-2); background: var(--code-bg); }
.flow-box.out { border-color: var(--link); }
.flow-box + .flow-box::before {
  content: '\2193';
  position: absolute;
  top: -1.45rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--faint);
  font-size: .9rem;
}
.flow-big { margin: 0 0 .3rem; font-size: 1.25rem; font-weight: 500; color: var(--text); white-space: nowrap; }
.flow-label { margin: 0; font-size: .8125rem; line-height: 1.35; color: var(--faint); }
kbd {
  display: inline-block;
  min-width: 1.5em;
  margin-right: .2em;
  padding: 0 .3em;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1rem;
  border: 1px solid var(--line-2);
  background: var(--bg);
}
.flow-box.out kbd { border-color: var(--link); color: var(--link); }

@media (min-width: 640px) {
  .flow { grid-template-columns: repeat(5, 1fr); gap: 1.4rem; }
  .flow-box + .flow-box::before { content: '\2192'; top: 50%; left: -1.15rem; transform: translateY(-50%); }
}

/* What the server sees */
.split { display: grid; grid-template-columns: 1fr; margin: 0 0 1.5rem; border: 1px solid var(--line-2); }
.split > div { padding: .8rem 1rem; min-width: 0; }
.split .kept { background: var(--pick-bg); border-top: 1px dashed var(--line-2); }
.split-label { margin: 0 0 .25rem; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.split-code { margin: 0; overflow-wrap: anywhere; color: var(--text); }
@media (min-width: 640px) {
  .split { grid-template-columns: auto 1fr; }
  .split .kept { border-top: 0; border-left: 1px dashed var(--line-2); }
}

/* Link sizes to scale */
.scale { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.scale li { display: grid; grid-template-columns: 8.5rem 1fr 3.5rem; align-items: center; gap: .75rem; padding: .3rem 0; font-size: .875rem; color: var(--muted); }
.scale-bar { height: .5rem; background: var(--line); }
.scale-bar i { display: block; height: 100%; min-width: 2px; background: var(--link); }
.scale li:nth-child(n+3) .scale-bar i { background: var(--seg-len); }
.scale-size { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
@media (max-width: 420px) { .scale li { grid-template-columns: 6.5rem 1fr 3.25rem; font-size: .8125rem; } }

/* Story demos */
.run-all { margin: 0 0 .5rem; }
.btn.big { font-size: 1rem; padding: .75rem 1.4rem; }
.rung-size { font-size: 1.5rem; }
.rung-head { margin-bottom: .5rem; }
.rung-link {
  margin: 0 0 .9rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .72rem;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rung-link b { font-weight: 400; color: var(--seg-prog); }
.speed { margin-left: auto; font-size: .8125rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.story { background: var(--code-bg); border: 1px solid var(--line); border-left: 2px solid var(--link); }

@media (min-width: 640px) {
  .anatomy { flex-wrap: nowrap; }
  .anatomy .part-prog, .anatomy .part-data { flex: 1 1 0; }
}

.rung-link { display: flex; gap: .4em; overflow: visible; }
.rung-link b { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rung-link span { flex: none; }

/* Networks drawn from their links */
.net { margin: 0 0 1.5rem; }
.net-scroll { overflow-x: auto; border: 1px solid var(--line); background: var(--code-bg); }
.net svg { display: block; width: 100%; min-width: 520px; height: auto; }
.net figcaption { margin-top: .6rem; font-size: .875rem; line-height: 1.5; color: var(--faint); }
.net text { paint-order: stroke; stroke: var(--code-bg); stroke-width: 3px; stroke-linejoin: round; font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif; font-size: 9px; fill: var(--faint); }
.net text.ch { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 8px; fill: var(--muted); text-anchor: middle; }
.net text.mid { text-anchor: middle; }
.net .pos { stroke: var(--seg-prog); }
.net .neg { stroke: var(--seg-len); }
.net circle, .net rect { fill: var(--bg); stroke: var(--faint); stroke-width: 1; }
.net circle.hid { stroke: var(--text); }

/* Transformers, block by block */
.tf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; margin: 0 0 1rem; }
.tf { display: grid; gap: 1.1rem; min-width: 0; }
.tf-title { margin: 0; font-size: 1.125rem; font-weight: 500; color: var(--text); }
.tf-box, .tf-layer { position: relative; }
.tf-box { padding: .5rem .65rem; border: 1px solid var(--line-2); background: var(--code-bg); font-size: .8125rem; line-height: 1.35; }
.tf-box b { display: block; font-weight: 500; color: var(--text); }
.tf-box span { color: var(--faint); }
.tf-box i, .tf-layer p i { float: right; font-style: normal; font-variant-numeric: tabular-nums; color: var(--faint); font-size: .75rem; }
.tf-box.out { border-color: var(--link); }
.tf-layer { display: grid; gap: .4rem; padding: .5rem; border: 1px dashed var(--line-2); }
.tf-layer p { margin: 0; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.tf > .tf-box + .tf-box::before, .tf > .tf-box + .tf-layer::before, .tf > .tf-layer + .tf-layer::before, .tf > .tf-layer + .tf-box::before {
  content: '\2193';
  position: absolute;
  top: -1.2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--faint);
  font-size: .8rem;
}
.tf-total { margin: -.4rem 0 0; font-size: .875rem; font-weight: 500; color: var(--text); }
@media (max-width: 420px) { .tf-cols { gap: .6rem; } .tf-box { padding: .45rem .5rem; font-size: .75rem; } .tf-layer { padding: .35rem; } }

.aside-hire { margin: 4rem 0 0; padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 1rem; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* The pointer to the hiring note: centred, with an arrow that nods. */
.aside-hire { text-align: center; padding: 1.25rem 0; }
.aside-hire a { font-weight: 500; }
.aside-hire a:hover { text-decoration: none; }
.aside-hire .bob { display: inline-block; margin-left: .25em; }

/* A slow light travelling round the hiring note while it is on screen. */
@property --note-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.work-note { position: relative; isolation: isolate; border-left-width: 1px; border-radius: .375rem; }
.work-note::after {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: conic-gradient(from var(--note-angle), transparent 0deg 285deg, var(--orbit-1) 305deg, var(--orbit-2) 338deg, var(--orbit-3) 348deg, transparent 360deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: .55;
}

@media (prefers-reduced-motion: no-preference) {
  .aside-hire .bob { animation: bob 1.8s ease-in-out infinite; }
  @keyframes bob { 0%, 100% { transform: translateY(-1px); } 50% { transform: translateY(4px); } }
  .work-note::after { opacity: 1; animation: note-orbit 14s linear infinite paused; }
  .work-note.in-view::after { animation-play-state: running; }
  @keyframes note-orbit { to { --note-angle: 360deg; } }
}

.discuss { margin: 2.5rem 0 0; font-size: 1rem; font-weight: 500; }
