/* Hallmark · genre: playful · page: a single note (post-insight.php) · theme: custom (site tokens) · tone: playful-bold · anchor hue: 265
 * Loaded after insights.css, which brings the journal pieces (.dots, .meta, .entry).
 * idea: reading progress is the three dots filling up; the next note is a page with a folded
 * corner to turn.
 * The body styles plain elements (p, h2, ul, blockquote) so WordPress's the_content() fits.
 */

/* Header -------------------------------------------------------------------------- */

.n-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, var(--page-max));
  justify-content: center;
  gap: var(--space-xl);
  padding: calc(var(--header-h) + var(--promo-h, 2.5rem) + var(--ruler-offset, 0px) + var(--space-xl)) var(--gutter) var(--space-2xl);
}

.n-hero__grid {
  mask-image: linear-gradient(to bottom, var(--color-ink) 50%, transparent);
}

.n-hero > :not(canvas) {
  position: relative;
  z-index: 1;
}

.n-crumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2xs) var(--space-xs);
  padding-block: var(--space-xs);
  border-block: var(--rule-hair) solid var(--color-ink);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.n-crumb__list li + li::before {
  content: "";
  display: inline-block;
  width: 0.3rem;
  height: 0.3rem;
  margin-inline-end: var(--space-xs);
  border-radius: 50%;
  background-color: var(--color-blue);
  vertical-align: middle;
}

.n-crumb__list a {
  display: inline-block;
  padding-block: 0.6rem;
  text-decoration-color: transparent;
  transition: text-decoration-color var(--dur-short) var(--ease-out);
}

@media (hover: hover) {
  .n-crumb__list a:hover {
    text-decoration-color: currentColor;
  }
}

.n-crumb__list [aria-current] {
  color: var(--color-muted);
}

.n-hero__body {
  display: grid;
  gap: var(--space-xl);
  align-items: end;
}

@media (min-width: 56rem) {
  .n-hero__body {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.n-hero__text {
  display: grid;
  justify-items: start;
  gap: var(--space-md);
}

.n-hero__title {
  max-width: 20ch;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.5vw + 0.5rem, 6rem);
  font-weight: 400;
  line-height: 0.98;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.n-hero__standfirst {
  max-width: 40ch;
  color: var(--color-muted);
  font-size: var(--text-xl);
  line-height: 1.35;
}

.n-hero__byline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  font-weight: 650;
}

.n-hero__mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: var(--color-ink);
  color: var(--color-paper);
}

.n-hero__mark svg {
  width: 1.05rem;
  height: auto;
}

/* The topic's three dots, big — they line up while you hover the header. */
.n-hero__dots {
  width: clamp(7rem, 14vw, 12rem);
  border-radius: clamp(1.25rem, 2.4vw, 2rem);
}

.n-hero:hover .n-hero__dots {
  --x1: 25%; --y1: 50%;
  --x2: 50%; --y2: 50%;
  --x3: 75%; --y3: 50%;
}

@media (max-width: 55.99rem) {
  .n-hero__dots {
    display: none;
  }
}

.n-figure {
  max-width: var(--page-max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.n-figure img {
  width: 100%;
  height: auto; /* else the height attribute wins over the ratio, and phones get a tall crop */
  aspect-ratio: 16 / 8;
  border-radius: var(--radius-lg);
  object-fit: cover;
}

/* Text + side column ----------------------------------------------------------------- */

.n-layout {
  display: grid;
  gap: var(--space-xl);
  max-width: var(--page-max);
  margin-inline: auto;
  padding: var(--space-3xl) var(--gutter);
}

@media (min-width: 64rem) {
  .n-layout {
    grid-template-columns: minmax(12rem, 16rem) minmax(0, 44rem);
    justify-content: center;
    gap: var(--space-3xl);
  }

  .n-aside__inner {
    position: sticky;
    inset-block-start: calc(var(--header-h) + var(--ruler-offset, 0px) + var(--space-xl));
  }
}

.n-aside__inner {
  display: grid;
  gap: var(--space-xl);
}

.n-aside__title {
  margin-block-end: var(--space-xs);
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Reading progress: three rings that fill one after another (insight.js sets --f, 0–1). */
.reading {
  display: none;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  font-weight: 650;
}

@media (min-width: 64rem) {
  .reading {
    display: flex;
  }
}

.reading__dots {
  display: inline-flex;
  gap: 0.35rem;
}

.reading__dots i {
  position: relative;
  width: 0.95rem;
  height: 0.95rem;
  border: 2px solid var(--color-blue);
  border-radius: 50%;
}

.reading__dots i::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  background-color: var(--color-blue);
  scale: var(--f, 0);
}

.reading__left {
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
}

.toc__list {
  display: grid;
  border-inline-start: var(--rule-hair) solid var(--color-rule);
}

.toc__link {
  position: relative;
  display: block;
  padding: 0.45rem 0 0.45rem var(--space-md);
  color: var(--color-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transition: color var(--dur-short) var(--ease-out);
}

/* The section you're reading: a blue dot on the line. */
.toc__link::before {
  content: "";
  position: absolute;
  inset-block-start: 0.85rem;
  inset-inline-start: calc(-0.3rem - 0.5px);
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background-color: var(--color-blue);
  scale: 0;
  transition: scale var(--dur-short) var(--ease-out);
}

.toc__link[aria-current="true"] {
  color: var(--color-ink);
}

.toc__link[aria-current="true"]::before {
  scale: 1;
}

@media (hover: hover) {
  .toc__link:hover {
    color: var(--color-ink);
  }
}

.share__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.share__link {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 var(--space-md);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-pill);
  background-color: var(--color-paper);
  color: var(--color-ink);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}

.share__link.is-copied {
  border-color: var(--color-lime);
  background-color: var(--color-lime);
}

@media (hover: hover) {
  .share__link:hover {
    border-color: var(--color-ink);
  }
}

/* The text ----------------------------------------------------------------------------- */

.prose {
  min-width: 0;
  font-size: 1.125rem;
  line-height: 1.7;
}

.prose > * + * {
  margin-block-start: 1.1em;
}

.prose > p:first-child {
  font-size: 1.25rem;
  line-height: 1.6;
}

/* Drop cap: the first letter in Anton, in blue. */
.prose > p:first-child::first-letter {
  float: left;
  margin: 0.08em 0.12em 0 0;
  color: var(--color-blue);
  font-family: var(--font-display);
  font-size: 3.6em;
  line-height: 0.8;
}

.prose h2 {
  margin-block-start: 2.2em;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: var(--leading-tight);
  text-transform: uppercase;
  scroll-margin-top: calc(var(--header-h) + var(--ruler-offset, 0px) + var(--space-lg));
}

.prose h2::before {
  content: "";
  display: inline-block;
  width: 0.28em;
  height: 0.28em;
  margin-inline-end: 0.35em;
  border-radius: 50%;
  background-color: var(--color-blue);
  vertical-align: 0.12em;
}

.prose a {
  color: var(--color-blue-deep);
  font-weight: 650;
}

.prose ul:not([class]) {
  display: grid;
  gap: 0.5em;
  padding-inline-start: 0;
  list-style: none; /* the blue dot below is the marker */
}

.prose ul:not([class]) li {
  position: relative;
  padding-inline-start: 1.4em;
}

.prose ul:not([class]) li::before {
  content: "";
  position: absolute;
  inset-block-start: 0.68em;
  inset-inline-start: 0.2em;
  width: 0.4em;
  height: 0.4em;
  border-radius: 50%;
  background-color: var(--color-blue);
}

/* Steps: numbered in blue, like the dots above. */
.prose ol:not([class]) {
  display: grid;
  gap: 0.5em;
  padding-inline-start: 0;
  list-style: none;
  counter-reset: step;
}

.prose ol:not([class]) li {
  position: relative;
  padding-inline-start: 1.8em;
  counter-increment: step;
}

.prose ol:not([class]) li::before {
  content: counter(step) ".";
  position: absolute;
  inset-inline-start: 0;
  color: var(--color-blue);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* A question under "Questions people ask", or a smaller step inside a section. */
.prose h3 {
  margin-block-start: 1.6em;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
}

.prose h3 + * {
  margin-block-start: 0.4em;
}

.prose strong {
  font-weight: 700;
}

.pullquote {
  margin-block: 2em;
  padding: var(--space-md) 0 var(--space-md) var(--space-lg);
  border-inline-start: 4px solid var(--color-blue);
}

.pullquote p {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: var(--leading-tight);
  text-transform: uppercase;
  text-wrap: balance;
}

.callout {
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  background-color: color-mix(in oklch, var(--color-lime) 42%, var(--color-paper));
}

.callout p + p {
  margin-block-start: var(--space-xs);
}

.callout__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.callout__dots {
  display: inline-flex;
  gap: 0.18rem;
}

.callout__dots i {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background-color: var(--color-ink);
}

/* Checklist: each item is a dot to fill. Ticks are kept in the browser (insight.js). */
.checklist {
  padding: var(--space-md) var(--space-lg);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-md);
  background-color: var(--color-paper);
}

.checklist__list {
  display: grid;
}

.checklist__list li + li {
  border-block-start: var(--rule-hair) solid var(--color-rule);
}

.checklist__item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding-block: 0.7rem;
  font-size: 1rem;
  line-height: 1.5;
  cursor: pointer;
}

.checklist__item input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.checklist__item span {
  display: flex;
  gap: var(--space-sm);
  transition: color var(--dur-short) var(--ease-out);
}

.checklist__item span::before {
  content: "";
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-block-start: 0.1rem;
  border: 2px solid var(--color-blue);
  border-radius: 50%;
  background-color: var(--color-paper);
  box-shadow: inset 0 0 0 0.6rem var(--color-paper);
  transition: box-shadow var(--dur-long) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}

.checklist__item input:checked + span {
  color: var(--color-muted);
}

/* Checked: the ring closes into a dot. */
.checklist__item input:checked + span::before {
  background-color: var(--color-blue);
  box-shadow: inset 0 0 0 0.15rem var(--color-paper);
}

.checklist__item input:focus-visible + span::before {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.checklist__count {
  margin-block-start: var(--space-xs);
  color: var(--color-muted);
  font-size: var(--text-sm);
  font-weight: 650;
}

/* End: turn the page, more notes ------------------------------------------------------ */

.n-end {
  padding: var(--space-3xl) var(--gutter) var(--space-4xl);
  background-color: var(--color-paper-2);
}

.n-end__inner {
  display: grid;
  gap: var(--space-xl);
  max-width: var(--page-max);
  margin-inline: auto;
}

.turn {
  --color-focus: var(--color-blue-soft);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: var(--space-md);
  min-height: 16rem;
  padding: var(--space-xl) var(--space-xl) var(--space-2xl);
  padding-inline-end: clamp(var(--space-xl), 16vw, 16rem);
  border-radius: var(--radius-lg);
  background-color: var(--color-ink);
  color: var(--color-paper);
  text-decoration: none;
}

.turn:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 3px;
}

.turn__kicker {
  color: var(--color-lime);
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.turn__kicker span {
  display: inline-block;
  transition: translate var(--dur-long) var(--ease-out);
}

.turn__title {
  max-width: 22ch;
  font-family: var(--font-display);
  font-size: var(--text-display);
  line-height: var(--leading-tight);
  text-transform: uppercase;
  text-wrap: balance;
}

.turn .meta {
  color: var(--color-muted-dark);
}

.turn .meta__topic {
  color: var(--color-blue-soft);
}

.turn__dots {
  position: absolute;
  inset-block-start: var(--space-xl);
  inset-inline-end: var(--space-xl);
  width: clamp(4rem, 8vw, 6.5rem);
}

/* The folded corner: grows when you point at the card, as if you'd lifted it. */
.turn__corner {
  position: absolute;
  inset-block-end: 0;
  inset-inline-end: 0;
  width: 3.5rem;
  height: 3.5rem;
  border-start-start-radius: 0.6rem;
  background-image: linear-gradient(315deg, var(--color-paper-2) 0 50%, var(--color-ink-3) 50%);
  box-shadow: -0.3rem -0.3rem 0.8rem -0.4rem color-mix(in oklch, var(--color-ink) 70%, transparent);
  transition: width var(--dur-reveal) var(--ease-out), height var(--dur-reveal) var(--ease-out);
}

@media (hover: hover) {
  .turn:hover .turn__corner {
    width: 7rem;
    height: 7rem;
  }

  .turn:hover .turn__kicker span {
    translate: 0.3rem 0;
  }

  .turn:hover .turn__dots {
    --x1: 25%; --y1: 50%;
    --x2: 50%; --y2: 50%;
    --x3: 75%; --y3: 50%;
  }
}

.n-end__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-md);
}

.n-end__links .text-link {
  display: inline-block;
  padding-block: 0.5rem;
}

.related {
  display: grid;
  gap: var(--space-lg);
  margin-block-start: var(--space-xl);
}

.related .section-title {
  font-size: var(--text-2xl);
}

.related__list {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 56rem) {
  .related__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.related .entry {
  padding: var(--space-md);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-md);
  background-color: var(--color-paper);
  transition: border-color var(--dur-short) var(--ease-out);
}

.related .entry:last-child {
  border-block-end: var(--rule-hair) solid var(--color-rule);
}

@media (hover: hover) {
  .related .entry:hover {
    border-color: var(--color-ink);
  }
}

/* Not found */
.n-missing {
  display: grid;
  justify-items: start;
  gap: var(--space-lg);
  max-width: var(--page-max);
  margin-inline: auto;
  padding: calc(var(--header-h) + var(--promo-h, 2.5rem) + var(--ruler-offset, 0px) + var(--space-3xl)) var(--gutter) var(--space-4xl);
}

.n-missing .dots {
  width: 7rem;
}
