/* Lab Notebook: one long sheet of engineering paper. Title block on top,
   numbered entries down the page, the projects net as the centrepiece. */
:root {
  --paper: #eaf0de;
  --grid-major: rgba(95, 140, 70, 0.3);
  --grid-minor: rgba(95, 140, 70, 0.13);
  --block: #5f7d4c;
  --ink: #1b1d20;
  --pencil: #4a4f52;
  --faint: #7d8378;
  --hl: #f3e244;
  --hl-soft: rgba(243, 226, 68, 0.78);
  --note: #fbef8a;
  --note-pink: #f6d3c6;
  --note-blue: #d3e5ee;
  /* Feed note colours, one per kind */
  --k-news: #fbef8a;
  --k-video: #f6d3c6;
  --k-podcast: #d3e5ee;
  --k-medium: #e4d9f2;
  --k-talk: #f9d9a8;
  --card: #fbfbf7;

  --hand: "Architects Daughter", "Comic Sans MS", "Segoe Print", cursive;
  --marker: "Permanent Marker", "Architects Daughter", cursive;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  color-scheme: light;
}

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

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  font-family: var(--hand);
  font-size: 18px;
  line-height: 1.6;
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, var(--grid-major) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-major) 1px, transparent 1px),
    linear-gradient(to right, var(--grid-minor) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-minor) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  -webkit-font-smoothing: antialiased;
}

/* paper grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' seed='2'/><feColorMatrix values='0 0 0 0 0.2  0 0 0 0 0.22  0 0 0 0 0.15  0 0 0 0.09 0'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
}

img { max-width: 100%; display: block; }

a { color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { background: var(--hl-soft); }

:focus-visible {
  outline: 2.5px dashed var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

mark {
  color: inherit;
  padding: 0 0.15em;
  background: linear-gradient(100deg, transparent 1%, var(--hl-soft) 3%, rgba(243, 226, 68, 0.68) 97%, transparent 99%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.sheet {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: grid;
}

/* Each entry is a screen, starting below the pinned masthead */
.cover, .entry { min-height: 100svh; }
.cover { display: grid; align-items: center; padding-block: calc(var(--mast-h, 110px) + 12px) 48px; }

/* ===== Masthead: pinned title block + section links ===== */
.masthead {
  position: fixed; top: 0; left: 0; right: 0; z-index: 45;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  padding-bottom: 10px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: rgba(234, 240, 222, 0.9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: padding .3s ease, box-shadow .3s ease;
}
/* torn-paper bottom edge, drawn once scrolled */
.masthead::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; pointer-events: none;
  background: radial-gradient(circle at 6px -2px, rgba(234, 240, 222, 0.9) 6px, transparent 6.5px) 0 0 / 12px 8px repeat-x;
  opacity: 0; transition: opacity .3s ease;
}
.masthead.is-scrolled { padding-top: calc(6px + env(safe-area-inset-top, 0px)); padding-bottom: 6px; box-shadow: 0 10px 18px -16px rgba(40, 50, 20, .55); }
.masthead.is-scrolled::after { opacity: 1; }
.masthead__inner { max-width: 1120px; margin: 0 auto; display: grid; gap: 8px; }
.masthead.is-scrolled .masthead__inner { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; }
.masthead.is-scrolled .tb-label { display: none; }
.masthead.is-scrolled .tb-cell { padding: 2px 10px; }
.masthead.is-scrolled .tb-value { font-size: 15px; }
.nav a[aria-current="true"] {
  background: linear-gradient(100deg, transparent 2%, var(--hl-soft) 5%, rgba(243, 226, 68, .7) 95%, transparent 98%);
}

/* ===== Title block ===== */
.titleblock {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 0.7fr;
  border: 1.5px solid var(--block);
  background: rgba(234, 240, 222, 0.7);
}
.tb-cell {
  display: grid;
  gap: 0;
  padding: 4px 10px 6px;
  border-left: 1px solid var(--block);
  min-width: 0;
}
.tb-cell:first-child { border-left: 0; }
.tb-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--block);
}
.tb-value { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 26px;
  font-size: 20px;
}
.nav a { text-decoration: none; padding: 0 4px; }
.nav a:hover { text-decoration: underline wavy var(--pencil) 1.5px; }

/* ===== Hero ===== */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 32px 48px;
  align-items: center;
  padding-top: 12px;
}
.coffee {
  position: absolute;
  width: 230px;
  height: 230px;
  right: -40px;
  bottom: -70px;
  pointer-events: none;
}
.hero__text { min-width: 0; display: grid; gap: 22px; }
.hero__name {
  margin: 0;
  font-family: var(--marker);
  font-weight: 400;
  font-size: clamp(54px, 10vw, 112px);
  line-height: 0.95;
  letter-spacing: 0.005em;
  transform: rotate(-1.2deg);
  transform-origin: left;
}
.socials {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  font-size: 18px;
}
.socials li + li::before { content: "·"; margin: 0 10px; color: var(--pencil); }
.socials a { overflow-wrap: anywhere; }

.photo {
  position: relative;
  margin: 0 auto;
  width: min(300px, 100%);
  padding: 12px 12px 10px;
  background: var(--card);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08), 0 10px 24px -14px rgba(30, 40, 20, 0.5);
  transform: rotate(3deg);
}
.photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(0.35) contrast(1.05) sepia(0.12);
}
.photo figcaption { font-size: 14px; color: var(--pencil); margin-top: 6px; line-height: 1.3; }
.tape {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 110px;
  height: 28px;
  transform: translateX(-50%) rotate(-5deg);
  background: rgba(226, 216, 172, 0.82);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  clip-path: polygon(2% 0, 98% 6%, 100% 50%, 97% 100%, 1% 94%, 3% 50%);
}

/* ===== Entries ===== */
.entry { display: grid; gap: 18px; min-width: 0; align-content: center; padding-block: calc(var(--mast-h, 110px) + 16px) 64px; }
.entry__head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.entry__num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--block);
  border: 1px solid var(--block);
  padding: 1px 6px;
}
.entry h2 {
  margin: 0;
  font-family: var(--marker);
  font-weight: 400;
  font-size: clamp(32px, 4.6vw, 46px);
  line-height: 1;
  text-decoration: underline;
  text-decoration-color: var(--hl);
  text-decoration-thickness: 10px;
  text-underline-offset: -2px;
  text-decoration-skip-ink: none;
}
.entry__lede { margin: 0; color: var(--pencil); max-width: 62ch; }

.about { position: relative; max-width: 66ch; display: grid; gap: 14px; font-size: 20px; }
.about p { margin: 0; }
/* About: text in the middle, doodles scattered around it by script.js */
#about { position: relative; }
#about .entry__head, #about .about { justify-self: center; width: min(100%, 62ch); }
.doodles { position: absolute; inset: 0; pointer-events: none; }
.doodle { position: absolute; margin: 0; width: var(--w, 130px); pointer-events: auto; transform: rotate(var(--r, 0deg)); }
.doodle svg { display: block; width: 100%; height: auto; overflow: visible; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.doodle:hover svg { transform: rotate(-6deg) scale(1.08); }
/* Phones: room above and below the text for the two rows of doodles */
#about.has-ring .entry__head { margin-top: 110px; }
#about.has-ring .about { margin-bottom: 110px; }
/* Until placed they sit in a row under the text */
.doodles:not(.is-placed) { position: static; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 18px; }
.doodles:not(.is-placed) .doodle { position: static; width: 96px; }
.dl { fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.dl-fill { fill: var(--hl); opacity: .8; stroke: none; }
.dl-text { font-family: var(--hand); font-size: 11px; fill: var(--ink); }
/* Pencil draws each sketch in when About comes into view */
html.doodle-wait .dl { stroke-dashoffset: 1; }
html.doodle-wait .dl-fill, html.doodle-wait .dl-text { opacity: 0; }
.dl { transition: stroke-dashoffset 1.1s cubic-bezier(.55, .1, .35, 1) calc(var(--i) * .18s); }
.dl-fill, .dl-text { transition: opacity .5s ease calc(var(--i) * .18s + .9s); }
.doodle .dl:nth-child(3) { transition-delay: calc(var(--i) * .18s + .25s); }
.doodle .dl:nth-child(4) { transition-delay: calc(var(--i) * .18s + .5s); }
.doodle .dl:nth-child(5) { transition-delay: calc(var(--i) * .18s + .7s); }


/* ===== Projects net ===== */
.net-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 32px;
  align-items: start;
}
.net-wrap { min-width: 0; display: grid; gap: 10px; }
.net-axis {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--block);
}
.net {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(220px, 2.4fr) minmax(0, auto);
  align-items: stretch;
}
.net__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.net__col { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 6px; min-width: 0; }
.net__col--tags { align-items: flex-end; padding-block: 18px; }
.net__col--projects { align-items: flex-start; }

.node {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 3px 6px;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
  transition: opacity 0.25s ease;
}
.node--tag { flex-direction: row; text-align: right; }
.node__label { min-width: 0; }
.node__count { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-left: 4px; }
.node__dot {
  flex: none;
  width: 22px;
  height: 22px;
  border: 2px solid var(--ink);
  border-radius: 52% 46% 50% 48% / 48% 52% 46% 54%;
  background: var(--paper);
  transition: background-color 0.18s ease, transform 0.18s ease;
}
.node--tag .node__dot { width: 26px; height: 26px; }

.node.is-lit .node__dot { background: var(--hl); transform: scale(1.12); }
.node.is-pinned .node__dot { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink); }
.node.is-selected .node__label { text-decoration: underline wavy var(--ink) 1.5px; text-underline-offset: 4px; }
.net.has-focus .node.is-dim { opacity: 0.32; }

/* forward pulse: projects light when the highlighter reaches them */
.net.fire-fwd .node--project.is-lit .node__dot { transition-delay: 0.38s; }
.net.fire-back .node--tag.is-lit .node__dot { transition-delay: 0.38s; }

.edges-ink path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
  stroke-linecap: round;
  opacity: 0.32;
  transition: opacity 0.25s ease, stroke-width 0.25s ease;
}
.net.has-focus .edges-ink path { opacity: 0.1; }
.net.has-focus .edges-ink path.is-lit { opacity: 0.95; stroke-width: 1.6; }
.edges-hl path {
  fill: none;
  stroke: var(--hl);
  stroke-width: 8;
  stroke-linecap: round;
  opacity: 0;
  mix-blend-mode: multiply;
}
.edges-hl path.is-lit { opacity: 0.85; }

/* Hidden layers */
.edges-mesh path { fill: none; stroke: var(--ink); stroke-width: 0.8; opacity: 0.1; transition: opacity 0.25s ease; }
.edges-mesh.is-quiet path { opacity: 0.04; }
.hnode { fill: var(--paper); stroke: var(--ink); stroke-width: 1.6; transition: fill 0.2s ease, opacity 0.25s ease; }
.hnode.is-lit { fill: var(--hl); }
.net.has-focus .hnode:not(.is-lit) { opacity: 0.35; }

.net-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 32px; }
.readout { margin: 0; font-size: 18px; }
.clear {
  font: inherit;
  font-size: 16px;
  background: none;
  border: 1.5px solid var(--ink);
  border-radius: 14px 10px 13px 11px;
  padding: 0 12px;
  cursor: pointer;
  color: var(--ink);
}
.clear:hover { background: var(--hl-soft); }
.fig-caption { margin: 0; font-size: 14px; color: var(--pencil); }
.fig-caption code { font-family: var(--mono); font-size: 12px; }

/* ===== Sticky notes ===== */
.sticky {
  position: relative;
  background: var(--note);
  padding: 22px 20px 20px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06), 0 14px 22px -16px rgba(40, 40, 0, 0.55);
  min-width: 0;
}
.sticky::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 14px;
  background: rgba(0, 0, 0, 0.035);
}
.sticky--detail {
  position: sticky;
  top: 24px;
  transform: rotate(1.4deg);
  display: grid;
  gap: 10px;
}
.sticky--detail h3 { margin: 0; font-family: var(--marker); font-weight: 400; font-size: 28px; line-height: 1.1; }
.sticky--detail p { margin: 0; line-height: 1.45; }
.sticky__kicker { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pencil); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chips button {
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: none;
  border: 1.5px solid var(--ink);
  border-radius: 12px 9px 11px 10px;
  padding: 0 9px;
  cursor: pointer;
}
.chips button:hover { background: rgba(255, 255, 255, 0.55); }
.links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; font-size: 17px; }
.links .none { color: var(--pencil); font-size: 15px; }

/* ===== Experience: revision table ===== */
.revs-scroll { overflow-x: auto; max-width: 100%; }
.revs {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  border: 1.5px solid var(--block);
  background: rgba(234, 240, 222, 0.75);
}
.revs th {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--block);
  text-align: left;
  padding: 5px 12px;
  border-bottom: 1.5px solid var(--block);
  border-left: 1px solid var(--block);
}
.revs td {
  padding: 10px 12px;
  border-left: 1px solid var(--block);
  border-top: 1px solid rgba(95, 125, 76, 0.5);
  vertical-align: top;
}
.revs th:first-child,
.revs td:first-child { border-left: 0; }
.rev-letter {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 2px solid var(--ink);
  border-radius: 50% 44% 52% 46%;
  font-family: var(--marker);
  font-size: 18px;
}
.revs tr.is-current .rev-letter { background: var(--hl); }
.revs .rev-date { white-space: nowrap; font-family: var(--mono); font-size: 13px; color: var(--pencil); padding-top: 14px; }
.revs .rev-role { display: block; }
.revs .rev-org { font-family: var(--marker); font-size: 22px; line-height: 1.1; }

/* ===== Feed notes ===== */
.notes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 30px 26px;
  padding-top: 8px;
}
.note {
  display: grid;
  gap: 6px;
  align-content: start;
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.2s ease;
}
.note[data-kind="news"], [data-kind="news"].legend__item, .kind[data-kind="news"] { --k: var(--k-news); }
.note[data-kind="video"], [data-kind="video"].legend__item, .kind[data-kind="video"] { --k: var(--k-video); }
.note[data-kind="podcast"], [data-kind="podcast"].legend__item, .kind[data-kind="podcast"] { --k: var(--k-podcast); }
.note[data-kind="medium"], [data-kind="medium"].legend__item, .kind[data-kind="medium"] { --k: var(--k-medium); }
.note[data-kind="talk"], [data-kind="talk"].legend__item, .kind[data-kind="talk"] { --k: var(--k-talk); }
.note { background: var(--k, var(--note)); }
.note:hover, .note:focus-within { transform: rotate(0deg) translateY(-4px); box-shadow: 0 1px 1px rgba(0, 0, 0, .06), 0 22px 26px -16px rgba(40, 40, 0, .6); }
.note__meta { display: flex; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pencil); }
.note__title { margin: 0; font-size: 19px; line-height: 1.3; }
/* The title link covers the whole note, so the note is the click target */
.note__title a { text-decoration: none; }
.note__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.note__title a:hover { background: none; }
.note__title a:focus-visible { outline: none; }
.note:focus-within { outline: 2.5px dashed var(--ink); outline-offset: 4px; }
.note p { margin: 0; font-size: 15px; line-height: 1.4; color: var(--pencil); }
.note .note__to {
  display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; padding-top: 8px;
  border-top: 1px dashed rgba(27, 29, 32, .3);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .03em; color: var(--ink);
}
.note:hover .note__to span:first-child { text-decoration: underline; text-underline-offset: 3px; }

.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.legend__item {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  background: var(--k); padding: 2px 9px; box-shadow: 0 1px 1px rgba(0, 0, 0, .08);
}
.more { justify-self: start; font-size: 20px; }

/* ===== Footer ===== */
.footer {
  margin-bottom: 56px;
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
  padding-top: 32px;
  border-top: 1.5px dashed var(--block);
  font-size: 16px;
  color: var(--pencil);
}
.footer p { margin: 0; }


/* ===== Responsive ===== */


@media (max-width: 980px) {
  .net-layout { grid-template-columns: minmax(0, 1fr); }
  .sticky--detail { position: relative; top: 0; max-width: 420px; }
}

@media (max-width: 760px) {
  .masthead.is-scrolled .titleblock { display: none; }
  .masthead .nav { font-size: 17px; gap: 2px 14px; }
  .masthead.is-scrolled .masthead__inner { grid-template-columns: minmax(0, 1fr); }
  .titleblock { grid-template-columns: 1fr 1fr; }
  .tb-cell:nth-child(3) { border-left: 0; }
  .tb-cell:nth-child(n + 3) { border-top: 1px solid var(--block); }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .photo { width: min(240px, 80%); margin-left: 8px; }
  .coffee { right: -70px; bottom: auto; top: 40%; }
}

/* Narrow: the net rotates so categories sit on top and projects below */
@media (max-width: 699px) {
  .net-axis { flex-direction: column; gap: 0; }
  .net-axis span:last-child { display: none; }
  .net { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 190px auto; }
  .net__col { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px 6px; }
  .net__col--tags { align-items: center; padding-block: 0; }
  .net__col--projects { align-items: flex-start; }
  .node { flex-direction: column-reverse; gap: 4px; font-size: 15px; text-align: center; padding: 2px 4px; }
  .node--tag { flex-direction: column; }
  .node--project { flex-direction: column; max-width: 31%; }
  .node__dot { width: 18px; height: 18px; }
  .node--tag .node__dot { width: 22px; height: 22px; }
  .node__count { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}

/* ===== Feed page (feed/) ===== */
.feedpage { gap: 22px; padding-block: 20px 0; }
.entry.entry--flow { min-height: 0; align-content: start; padding-block: 24px 40px; }
.kinds { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.kind {
  font: inherit; font-size: 16px; color: var(--ink); cursor: pointer;
  background: transparent; border: 1.5px solid var(--ink); border-radius: 50% 44% 52% 46% / 60% 50% 55% 48%;
  padding: 2px 14px;
}
.kind { background: var(--k, transparent); }
.kind:hover { box-shadow: 2px 2px 0 var(--ink); }
.kind[aria-pressed="true"] { border-width: 2.5px; box-shadow: 2px 2px 0 var(--ink); font-weight: 700; }
.kind[data-kind="all"][aria-pressed="true"] { background: var(--hl); }
.year { display: grid; gap: 14px; padding-top: 18px; }
.year__label {
  margin: 0; font-family: var(--marker); font-weight: 400; font-size: 34px; line-height: 1;
  border-bottom: 1.5px dashed var(--block); padding-bottom: 6px;
}
.year .notes { padding-top: 6px; }
.feedpage [hidden] { display: none !important; }

/* ===== Pull tab: shows while the page is pulled toward another entry ===== */
.pull-tab {
  --p: 0;
  position: fixed; z-index: 55; left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: grid; grid-template-columns: auto auto; align-items: center; gap: 2px 14px;
  min-width: 250px; padding: 10px 18px 8px;
  background: var(--card); border: 2px dashed var(--ink); border-radius: 4px;
  box-shadow: 0 14px 26px -14px rgba(0, 0, 0, .45);
  opacity: calc(.35 + var(--p) * .65);
  transform: translate(-50%, calc((1 - var(--p)) * 26px)) rotate(-1deg);
  pointer-events: none;
}
.pull-tab[hidden] { display: none; }
.pull-tab.is-leaving { opacity: 0; transition: opacity .3s ease; }
.pull-tab.is-up { bottom: auto; top: calc(var(--mast-h, 110px) + 10px); transform: translate(-50%, calc((var(--p) - 1) * 26px)) rotate(1deg); }
.pull-tab__arrow { grid-row: span 2; font-family: var(--marker); font-size: 30px; line-height: 1; }
.pull-tab.is-up .pull-tab__arrow { transform: rotate(180deg); }
.pull-tab__text { display: flex; align-items: baseline; gap: 10px; }
.pull-tab__num { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--block); border: 1px solid var(--block); padding: 0 5px; }
.pull-tab__name { font-family: var(--marker); font-size: 22px; line-height: 1.1; }
.pull-tab__hint { font-size: 14px; color: var(--pencil); }
.pull-tab__meter { grid-column: 1 / -1; width: 100%; height: 12px; margin-top: 4px; overflow: visible; }
.pull-tab__track { fill: none; stroke: rgba(27, 29, 32, .18); stroke-width: 3; stroke-linecap: round; }
.pull-tab__line { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
/* Past the line: it's obvious that letting go will turn the page */
.pull-tab.is-ready, .pull-tab.is-turning { background: var(--hl); border-style: solid; opacity: 1; }
.pull-tab.is-ready { transform: translate(-50%, 0) rotate(-1deg) scale(1.08); transition: transform .18s cubic-bezier(.3, 1.8, .5, 1); }
.pull-tab.is-up.is-ready { transform: translate(-50%, 0) rotate(1deg) scale(1.08); }
.pull-tab.is-ready .pull-tab__hint { color: var(--ink); font-weight: 700; }
.pull-tab.is-ready .pull-tab__arrow { animation: nudge .5s ease-in-out infinite alternate; }
.pull-tab.is-up.is-ready .pull-tab__arrow { animation-name: nudge-up; }
.pull-tab.is-ready .pull-tab__line { stroke: var(--ink); stroke-width: 4; }
@keyframes nudge { to { transform: translateY(5px); } }
@keyframes nudge-up { from { transform: rotate(180deg); } to { transform: rotate(180deg) translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .pull-tab.is-ready .pull-tab__arrow { animation: none; } }
