:root {
  color-scheme: light;
  --sheet: #faf7f1;
  --text: #261b2b;
  --secondary: #615462;
  --ink-line: #d8ccd4;
  --accent: #783f76;
  --lilac: #e9daef;
  --petal: #f1c7e8;
  --night: #251a2e;
  --night-line: #5e4861;
  --gutter: clamp(1rem, 4.7vw, 5.25rem);
  --page-width: 86rem;
  --reading-width: 41rem;
  color: var(--text);
  background: var(--sheet);
}

.journal :focus-visible {
  outline: 2px solid #954383;
  outline-offset: 4px;
}
.journal :is(.threads, .achievement, .orchid, .comic) :focus-visible { outline-color: #f8cbe8; }
.journal :is(section[id], article[id], main[id]) { scroll-margin-top: 6rem; }
.sheet { width: min(100%, var(--page-width)); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: fixed; left: 1rem; top: .5rem; z-index: 10; padding: .55rem; color: var(--text); background: var(--sheet); }
.skip:not(:focus) { clip-path: inset(50%); }
.journal-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--ink-line);
  background: var(--sheet);
}
.journal-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: clamp(.9rem, 2vw, 2rem);
  min-height: 4.7rem;
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.journal-brand {
  width: fit-content;
  color: var(--text);
  font: 605 clamp(2.15rem, 3.4vw, 3rem)/.86 var(--display);
  letter-spacing: -.082em;
  text-decoration: none;
}
.journal-brand span { color: #ad6298; }
.journal-byline { font-size: .85rem; font-weight: 790; line-height: 1.33; }
.journal-byline span { display: block; color: var(--secondary); font-size: .78rem; font-weight: 550; }
.journal-header nav { display: flex; gap: clamp(.85rem, 2vw, 1.8rem); }
.journal-header nav a, .journal-social {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
  text-underline-offset: .35em;
  font-size: .88rem;
  font-weight: 740;
  white-space: nowrap;
}
.journal-header a:is(:hover,[aria-current]) { color: var(--accent); text-decoration: underline; }
.journal-social { margin-left: .2rem; padding-left: 1.15rem; border-left: 1px solid var(--ink-line); }

.front-page { padding-top: clamp(2.1rem, 4.8vw, 5rem); padding-bottom: clamp(2.8rem, 5.3vw, 6rem); }
.front-page-grid {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  align-items: center;
  gap: clamp(1.1rem, 4.1vw, 4.3rem);
}
.section-kicker, .note-topic {
  width: fit-content;
  margin: 0 0 .85rem;
  color: var(--accent);
  font-size: .79rem;
  font-weight: 820;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.lead-copy .section-kicker {
  display: flex;
  align-items: center;
  gap: .55rem;
}
.lead-copy .section-kicker::before {
  width: .68rem;
  height: .68rem;
  background: #a45092;
  content: "";
  transform: rotate(45deg) scale(.73);
}
.lead-copy h1, .section-heading h2, .story-head h1 {
  margin: 0;
  font: 570 clamp(3.3rem, 6.0vw, 6.25rem)/.90 var(--display);
  letter-spacing: -.073em;
}
.lead-copy h1 em, .section-heading h2 em, .story-head h1 em {
  color: var(--accent);
  font-weight: 410;
}
.lead-summary {
  max-width: 30ch;
  margin: clamp(1.15rem, 2.7vw, 2rem) 0 0;
  color: var(--secondary);
  font-size: clamp(1.07rem, 1.85vw, 1.32rem);
  line-height: 1.5;
  text-wrap: pretty;
}
.lead-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .3rem .7rem;
  margin-top: 1.15rem;
  color: var(--secondary);
  font-size: .81rem;
  font-weight: 720;
}
.lead-meta time { padding-left: .7rem; border-left: 1px solid var(--ink-line); }
.lead-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem clamp(.8rem, 1.65vw, 1.4rem); margin-top: 1.05rem; }
.ink-button, .ink-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: .88rem;
  font-weight: 780;
}
.ink-button {
  padding: .65rem 1.15rem;
  border: 1px solid var(--text);
  border-radius: .28rem;
  color: var(--sheet);
  background: var(--text);
  text-decoration: none;
}
.ink-button:hover { border-color: var(--accent); background: var(--accent); }
.ink-link { text-underline-offset: .32em; text-decoration-thickness: 1px; }
.ink-link:hover { text-decoration-thickness: 2px; }

.feature-map { margin: 0; min-width: 0; }
.feature-image {
  position: relative;
  isolation: isolate;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #d3b9e7;
}
.feature-image > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.feature-image::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 35% 38% at var(--light-x,56%) var(--light-y,68%), #f9dafc3b, transparent 92%);
  mix-blend-mode: screen;
  content: "";
}
.map-pins { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.pin {
  position: absolute;
  top: var(--pin-y);
  left: var(--pin-x);
  display: grid;
  place-items: center;
  width: 2.85rem;
  height: 2.85rem;
  padding: 0;
  border: 1px solid #fbf0eac2;
  border-radius: 50%;
  background: #27192d69;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  transition: background .2s ease, border-color .2s ease;
}
.pin-trajet { --pin-x: 78%; --pin-y: 53%; }
.pin-obstacle { --pin-x: 45%; --pin-y: 51%; }
.pin-piste { --pin-x: 13%; --pin-y: 24%; }
.pin > span:first-child {
  width: .7rem;
  height: .7rem;
  border-radius: 50%;
  background: #fff3e7;
  box-shadow: 0 0 0 .26rem #f6d2e780;
}
.pin[aria-pressed="true"], .pin:hover { background: #4a254dda; border-color: #fff3e7; }
.pin[aria-pressed="true"] > span:first-child { background: #f7c9ed; box-shadow: 0 0 0 .34rem #efafdf74; }
.journal .pin:focus-visible { outline-color: #fff5e8; }
.feature-notes {
  display: grid;
  grid-template-columns: 8.2rem minmax(0,1fr);
  gap: .55rem 1.12rem;
  min-height: 6.2rem;
  padding: .83rem 1rem;
  border-top: 1px solid #b99db7;
  background: #efe3ee;
}
.feature-notes-label { margin: 0; font-size: .82rem; font-weight: 790; line-height: 1.35; }
.feature-notes-label span { display: block; color: var(--secondary); font-weight: 545; }
.map-notes { list-style: none; margin: 0; padding: 0; font-size: .88rem; line-height: 1.44; }
.map-notes:not(.has-selection) li + li { margin-top: .35rem; }
.map-notes b { color: var(--accent); }

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.2rem;
  margin-bottom: clamp(1.2rem, 3vw, 2.5rem);
}
.section-heading h2 { font-size: clamp(2.8rem, 6vw, 6.1rem); }
.section-heading > p { max-width: 31ch; margin: 0; color: var(--secondary); }
.threads {
  color: #fbebf4;
  background: radial-gradient(ellipse at 95% 102%, #553354, transparent 60%), var(--night);
  padding-block: clamp(2.6rem, 5.9vw, 6rem);
}
.threads .section-heading h2 em, .threads .section-kicker { color: var(--petal); }
.threads .section-heading > p { color: #e1cddf; }
.thread-selector {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--night-line);
}
.thread-selector button, .thread-stops button {
  min-height: 2.75rem;
  color: inherit;
  font-weight: 750;
  font-size: .89rem;
}
.thread-selector button { padding: .55rem .9rem; border: 1px solid #907492; border-radius: 2rem; background: transparent; }
.thread-selector button:is([aria-pressed="true"], :hover) { border-color: var(--petal); }
.thread-selector button[aria-pressed="true"] { color: var(--night); background: var(--petal); }
.thread-panel { padding-top: 1.25rem; }
.thread-panel > h3 { margin: 0 0 1.2rem; font: 500 clamp(1.5rem, 2.65vw, 2.2rem)/1.1 var(--display); letter-spacing: -.035em; }
.thread-layout { display: grid; grid-template-columns: minmax(11rem, .64fr) minmax(0, 1.36fr); gap: 1rem clamp(1.5rem, 5.2vw, 6rem); }
.thread-layout:has(.thread-stops[hidden]) { display: block; }
.thread-stops {
  --route-fill: 0%;
  position: relative;
  display: grid;
  align-content: start;
  gap: .58rem;
  list-style: none;
  margin: .08rem 0 0;
  padding: 0;
}
.thread-stops::before {
  position: absolute;
  top: 1.35rem;
  bottom: 1.35rem;
  left: .52rem;
  width: 2px;
  background: linear-gradient(var(--petal), var(--petal)) top / 100% var(--route-fill) no-repeat, #8b708d;
  transition: background-size .35s ease-out;
  pointer-events: none;
  content: "";
}
.thread-stops li { position: relative; }
.thread-stops button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: .1rem .25rem .1rem .1rem;
  gap: .65rem;
  border: 0;
  background: transparent;
  text-align: left;
}
.thread-stops button::before {
  width: .92rem;
  height: .92rem;
  flex: none;
  border: 2px solid #c9a7c7;
  border-radius: 50%;
  background: var(--night);
  content: "";
  transition: background .2s ease, box-shadow .2s ease;
}
.thread-stops button:hover::before, .thread-stops button[aria-pressed="true"]::before {
  background: var(--petal);
  box-shadow: 0 0 0 .23rem #f0c6e331;
}
.thread-stops button[aria-pressed="true"] { color: var(--petal); }
.thread-notes { min-height: 12.25rem; padding: .55rem 0 0 clamp(.85rem, 3vw, 2.2rem); border-left: 1px solid var(--night-line); }
.thread-article { min-width: 0; }
.thread-article + .thread-article:not([hidden]) { margin-top: 1rem; }
.thread-notes.has-selection .thread-article { margin: 0; }
.thread-article .thread-meta { margin: 0 0 .55rem; font-size: .81rem; color: #e1bedf; }
.thread-article h4 { margin: 0; font: 500 clamp(1.36rem, 2.5vw, 2.15rem)/1.12 var(--display); letter-spacing: -.034em; }
.thread-article p { max-width: 57ch; margin: .55rem 0 .12rem; color: #eddfeb; line-height: 1.56; }

.notebook-section, .press { padding-block: clamp(2.9rem, 6.7vw, 6.65rem); }
.notebook-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 1.35rem clamp(1.5rem, 6vw, 6rem); }
.notebook-main {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-content: center;
  min-height: 17rem;
  padding: clamp(1.1rem, 4vw, 3.4rem);
  background: linear-gradient(146deg, #eecfdf, #e9d7f0 60%, #d8c2ee);
}
.notebook-grid h3 { margin: 0; font: 550 clamp(1.8rem, 3.5vw, 3.9rem)/.96 var(--display); letter-spacing: -.05em; }
.notebook-grid h3 a { text-decoration: none; }
.notebook-grid h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .16em; }
.notebook-grid article p:not(.note-topic) { max-width: 32ch; margin: .7rem 0 .4rem; color: #534155; line-height: 1.46; }
.notebook-aside { display: grid; align-content: center; }
.notebook-aside article { padding: 1rem 0; border-top: 1px solid var(--ink-line); }
.notebook-aside article:last-child { border-bottom: 1px solid var(--ink-line); }
.notebook-aside h3 { font-size: clamp(1.45rem, 2.6vw, 2.75rem); }
.note-glyph {
  position: absolute;
  z-index: -1;
  bottom: -.13em;
  right: .03em;
  color: #42284526;
  pointer-events: none;
  transform: rotate(-8deg);
  font-size: clamp(8rem, 20vw, 18rem);
  line-height: 1;
  letter-spacing: -.13em;
}

.achievement, .orchid { color: var(--snow); color-scheme: dark; }
.journal .achievement { min-height: 0; }
.journal .achievement-stage {
  --digit: clamp(4.55rem, min(26vw, 23svh), 14.4rem);
  --figure-center: 40%;
  position: relative;
  height: max(30rem, 70svh);
  max-height: 44rem;
  background: radial-gradient(ellipse at 51% 37%, #4d3457, #2c203b 61%, #21172e);
}
.orchid { min-height: min(100svh, 45rem); }

.press-fields { display: grid; grid-template-columns: 1.3fr 1fr auto; align-items: end; gap: .65rem; }
.press-fields label { display: grid; gap: .32rem; min-width: 0; font-weight: 750; font-size: .88rem; }
.press-fields input, .press-fields select, .outline-button {
  min-height: 2.85rem;
  border: 1px solid #a590a2;
  border-radius: .3rem;
  color: var(--text);
  background: #fffaf7;
}
.press-fields input, .press-fields select { width: 100%; font: inherit; padding: .55rem .75rem; }
.press-fields select {
  appearance: none;
  padding-right: 1.9rem;
  background-image: linear-gradient(45deg, transparent 50%, #684a67 52%), linear-gradient(135deg, #684a67 50%, transparent 52%);
  background-position: calc(100% - 17px) 54%, calc(100% - 12px) 54%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.outline-button { padding: .55rem 1rem; background: transparent; font-size: .88rem; font-weight: 750; }
.outline-button:hover:not(:disabled) { background: var(--lilac); }
.outline-button:disabled { opacity: .55; cursor: default; }
.article-status { color: var(--secondary); margin: .85rem 0; min-height: 1.5rem; font-size: .9rem; }
.press-list { margin: 0; padding: 0; list-style: none; }
.press-list li { border-top: 1px solid var(--ink-line); }
.press-list li:last-child { border-bottom: 1px solid var(--ink-line); }
.press-list a {
  display: grid;
  grid-template-columns: minmax(6.5rem, .23fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: .45rem clamp(.45rem, 2vw, 1.5rem);
  min-height: 4.15rem;
  padding: .9rem .2rem;
  text-decoration: none;
}
.press-list a:hover, .press-list a:focus-visible { background: #f1e6f1; }
.press-list a:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.press-list .article-topic, .press-list .article-open { color: var(--accent); font-size: .82rem; font-weight: 750; }
.press-list .article-name { font: 515 clamp(1.02rem, 1.65vw, 1.38rem)/1.24 var(--display); overflow-wrap: anywhere; }
#more-articles { margin-top: 1rem; }
.press-pick { margin-bottom: 1.2rem; background: #f0e2f0; }
.press-pick a { padding-inline: .55rem; }
.journal-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .8rem; min-height: 5rem; padding-block: 1.35rem; }
.journal-footer a:last-child { font-size: .9rem; text-underline-offset: .3em; }

.story { padding-block: clamp(2.4rem, 6.1vw, 6rem); }
.story-head, .story-body { max-width: var(--reading-width); margin-inline: auto; }
.story-head h1 { font-size: clamp(3.25rem, 7.2vw, 6.4rem); text-wrap: balance; }
.story-intro { margin: 1.15rem 0 1.6rem; color: var(--secondary); font: 435 clamp(1.16rem, 2.5vw, 1.5rem)/1.45 var(--display); }
.story-body { font-size: 1.07rem; line-height: 1.68; }
.story-body h2 { margin: 2.35rem 0 .55rem; font: 550 clamp(1.55rem, 3.1vw, 2.55rem)/1.1 var(--display); letter-spacing: -.046em; }
.story-body p { margin: .65rem 0 1.15rem; }
.story-body ol { padding-left: 1.4rem; }
.story-body li { margin-bottom: .55rem; padding-left: .2rem; }
.story-body li::marker { color: var(--accent); font-weight: 750; }
.story-image {
  float: right;
  width: min(36%, 12rem);
  margin: .55rem 0 .9rem 1.4rem;
}
.story-image img { display: block; width: 100%; height: auto; }
.story-image figcaption { padding-top: .32rem; color: var(--secondary); font-size: .78rem; line-height: 1.35; }
.story-related { clear: both; margin-top: 2.3rem; padding-top: .8rem; border-top: 1px solid var(--ink-line); }
.story-related p { margin: 0; font-size: .88rem; font-weight: 750; }
.story-related a + a { margin-left: 1rem; }
.story-progress {
  position: fixed;
  z-index: 6;
  top: 0;
  width: 100%;
  height: 3px;
  background: none;
  appearance: none;
}
.story-progress::-webkit-progress-bar { background: transparent; }
.story-progress::-webkit-progress-value { background: #b367a3; }
.story-progress::-moz-progress-bar { background: #b367a3; }
.comic {
  margin: 2.1rem 0;
  padding: clamp(1rem, 4vw, 1.7rem);
  color: #faecf7;
  background: radial-gradient(ellipse at 96% 5%, #5d3a5d, transparent 74%), var(--night);
}
.comic .note-topic { margin: 0 0 .7rem; color: var(--petal); font-size: .75rem; }
.comic-line { display: flex; align-items: center; gap: .95rem; }
.comic-line img { flex: none; width: 3.65rem; height: 3.65rem; object-fit: cover; object-position: 47% 36%; border: 1px solid #f5c7e9; border-radius: 50%; }
.comic .comic-line p { margin: 0; font: 500 clamp(1.2rem, 2.6vw, 1.85rem)/1.13 var(--display); }
.comic .comic-trigger { margin-top: .8rem; padding: .5rem .7rem; min-height: 2.75rem; border: 1px solid #d0a7cf; border-radius: .3rem; color: var(--petal); background: transparent; font-size: .87rem; font-weight: 760; }
.comic .comic-trigger:hover { color: var(--night); background: var(--petal); }
.comic-reply { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem 1rem; margin: .85rem 0 0; }
.comic-reply img { display: block; width: min(10.6rem, 100%); height: auto; }
.comic-reply strong { display: block; font: 530 1.36rem/1.15 var(--display); }
.comic-reply small { color: #e2c7df; font-size: .81rem; }

@media (max-width: 820px) {
  .journal-header-inner { grid-template-columns: auto 1fr auto; gap: .35rem 1rem; padding-block: .65rem .18rem; }
  .journal-header nav { grid-row: 2; grid-column: 1 / -1; gap: clamp(.7rem, 4vw, 2rem); }
  .journal-social { grid-column: 3; grid-row: 1; border: 0; padding-left: 0; margin-left: 0; }
  .journal :is(section[id], article[id], main[id]) { scroll-margin-top: 7.3rem; }
  .front-page-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .front-page { padding-top: 1.8rem; }
  .lead-copy h1 { max-width: 12ch; font-size: clamp(3rem, 8.7vw, 5.5rem); }
  .lead-summary { margin-top: .95rem; }
  .lead-meta { margin-top: .55rem; }
  .lead-actions { margin-top: .55rem; }
  .section-heading { align-items: start; flex-direction: column; gap: .55rem; }
}

@media (max-width: 610px) {
  .thread-layout, .notebook-grid { grid-template-columns: 1fr; }
  .thread-stops { gap: .12rem; }
  .thread-notes { min-height: 0; padding: .75rem 0 0; border: 0; border-top: 1px solid var(--night-line); }
  .notebook-main { min-height: 13.8rem; }
  .press-list a { grid-template-columns: minmax(0, 1fr) auto; }
  .press-list .article-topic { grid-column: 1 / -1; }
}

@media (max-width: 430px) {
  .journal-header-inner { gap: .14rem .65rem; }
  .journal-header nav { width: 100%; justify-content: space-between; gap: .48rem; }
  .journal-byline span { font-size: .72rem; }
  .journal-header nav a, .journal-social { font-size: .8rem; }
  .feature-notes { grid-template-columns: 1fr; padding: .72rem .75rem; min-height: 0; }
  .feature-notes-label span { display: inline; }
  .press-fields { grid-template-columns: 1fr auto; }
  .press-fields label:first-child { grid-column: 1 / -1; }
  .story-image { width: 40%; margin-left: .7rem; }
}

@media (prefers-reduced-motion: reduce) {
  .feature-image::after { display: none; }
  .pin, .thread-stops::before, .thread-stops button::before { transition: none; }
}
