/* The profile pages and their table (/tjm/…) as leaves of the tear-off
   calendar: the day rate where the date would be, then one ruled block per
   question. White page, black rules, calendar red. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
:root {
  color-scheme: light;
  --page: #fff;
  --ink: #141414;
  --muted: #6a6a6a;
  --hair: #e4e4e4;
  --wash: #f5f5f5;
  --red: #e1251b;
  --sans: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --side: 320px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 56px 28px 80px;
  font: 16px/1.55 var(--sans);
  color: var(--ink);
  background: var(--page);
  font-variant-numeric: tabular-nums;
}
main {
  max-width: 1120px;
  margin: 0 auto;
}
a {
  color: inherit;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
a:hover {
  color: var(--red);
}
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
.crumbs {
  margin: 0 0 26px;
  font-size: 15px;
  color: var(--muted);
}
h1 {
  margin: 0;
  font-size: clamp(38px, 6.2vw, 68px);
  font-weight: 800;
  font-stretch: 90%;
  line-height: 1;
  letter-spacing: -0.015em;
}
h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
p {
  max-width: 68ch;
  margin: 0 0 12px;
  color: var(--muted);
}
.warning {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--red);
}

/* Shared two-column grid: the question on the left, the figures on the right. */
.hero,
section {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  column-gap: 56px;
  align-items: start;
}
.hero {
  margin-top: 40px;
}
/* Without a published rate there is no leaf, and the words take the full width. */
.hero > :only-child {
  grid-column: 1 / -1;
}
.lede {
  font-size: 21px;
  line-height: 1.45;
  color: var(--ink);
}
.lede strong {
  color: var(--red);
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: none;
  margin-top: 22px;
}
.links a {
  padding: 10px 18px;
  border-radius: 6px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  box-shadow: inset 0 0 0 2px var(--ink);
}
.links a:hover {
  color: var(--red);
  box-shadow: inset 0 0 0 2px var(--red);
}
.links a:first-child {
  background: var(--ink);
  color: #fff;
}
.links a:first-child:hover {
  background: var(--red);
  color: #fff;
}

/* The leaf */
.pad {
  position: relative;
  isolation: isolate;
  padding-bottom: 12px;
}
.pad::before,
.pad::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 40px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--page);
  z-index: -1;
}
.pad::before {
  bottom: 0;
}
.pad::after {
  bottom: 6px;
}
.leaf {
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--page);
  overflow: hidden;
  text-align: center;
}
.leaf p {
  max-width: none;
  margin: 0;
}
.leaf .binding {
  display: grid;
  place-items: center;
  min-height: 58px;
  padding: 14px 52px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  background:
    radial-gradient(circle at 26px 50%, #fff 6.5px, transparent 7px),
    radial-gradient(
      circle at calc(100% - 26px) 50%,
      #fff 6.5px,
      transparent 7px
    ),
    var(--red);
}
.leaf .binding::first-letter {
  text-transform: uppercase;
}
.leaf .kicker {
  padding-top: 18px;
  font-size: 15px;
}
.leaf .figure {
  font-size: clamp(88px, 27vw, 116px);
  font-weight: 800;
  font-stretch: 75%;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--red);
  white-space: nowrap;
}
.leaf .unit {
  padding: 6px 0 20px;
  font-weight: 600;
  color: var(--ink);
}
.leaf dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border-top: 2px solid var(--ink);
}
.leaf dl > div {
  padding: 12px 10px 14px;
}
.leaf dl > div + div {
  border-left: 2px solid var(--ink);
}
.leaf dt {
  font-size: 13.5px;
  font-stretch: 88%;
  color: var(--muted);
  white-space: nowrap;
}
.leaf dd {
  margin: 0;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

section {
  /* The second row takes the table's extra height, so the text stays under its question. */
  grid-template-rows: auto 1fr;
  margin-top: 52px;
  padding-top: 16px;
  border-top: 3px solid var(--ink);
}
section > h2,
section > p {
  grid-column: 1;
  font-size: 14.5px;
}
section > h2 {
  font-size: 24px;
}
/* The figures start level with the question, whatever sits under it. */
section > table,
section > ul,
section > ul + p {
  grid-column: 2;
}
section > table:first-of-type,
section > ul,
section > h2 + p:last-child {
  grid-row: 1 / span 2;
}
/* A block with only words puts them where the figures would be. */
section > h2 + p:last-child {
  grid-column: 2;
  font-size: 16px;
}
table + table {
  margin-top: 28px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
th,
td {
  padding: 7px 14px 7px 0;
  text-align: right;
  border-bottom: 1px solid var(--hair);
  white-space: nowrap;
}
th:last-child,
td:last-child {
  padding-right: 0;
}
th:first-child {
  text-align: left;
  white-space: normal;
}
thead th {
  padding-top: 0;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--muted);
  border-bottom-color: var(--ink);
}
tbody th {
  font-weight: 400;
}
tbody th a {
  font-weight: 600;
  text-decoration: none;
}
tbody th a:hover {
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
}
td:nth-child(2) {
  font-weight: 700;
}
tbody tr:hover > * {
  background: var(--wash);
}

.skills,
.others {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 26px;
  margin: 2px 0 14px;
  padding: 0;
  list-style: none;
  font-size: 17px;
  font-weight: 600;
}
.skills span {
  font-weight: 400;
  color: var(--muted);
}
.others li {
  font-weight: 400;
  color: var(--muted);
}
.others a {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.others a:hover {
  color: var(--red);
}

footer {
  margin-top: 52px;
  padding-top: 16px;
  border-top: 3px solid var(--ink);
  font-size: 14.5px;
}
footer p {
  max-width: none;
}

@media (max-width: 860px) {
  body {
    padding: 28px 16px 56px;
  }
  .hero,
  section {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 6px;
  }
  .hero {
    row-gap: 24px;
    margin-top: 28px;
  }
  .pad {
    max-width: 360px;
  }
  section > * {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
  .lede {
    font-size: 19px;
  }
  table {
    font-size: 14.5px;
  }
  th,
  td {
    padding-right: 10px;
  }
  /* The count columns give way so the rates stay readable. */
  th:nth-child(n + 4),
  td:nth-child(n + 4) {
    display: none;
  }
}
