:root {
  color-scheme: light;
  --paper: #f6f7ef;
  --ink: #292338;
  --muted: #625a69;
  --line: #d7d4d8;
  --lilac: #daccfa;
  --lime: #e4ec93;
  --heading: Georgia, "Times New Roman", serif;
  --text: system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.6 var(--text);
}

a {
  color: inherit;
  text-underline-offset: .24em;
}

button, input {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid #625296;
  outline-offset: 4px;
}

.shell {
  width: min(100% - 3rem, 68rem);
  margin-inline: auto;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  border-bottom: 1px solid var(--ink);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font: 700 1.65rem/.9 var(--heading);
  letter-spacing: -.05em;
  text-decoration: none;
}

.wordmark-icon {
  width: .69rem;
  height: .69rem;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: .24rem .12rem 0 var(--lilac);
}

.nav-link, .footer a {
  font-size: .9rem;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
  align-items: stretch;
  padding-block: 2rem 3.5rem;
  gap: clamp(2rem, 5vw, 5rem);
}

.intro-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 1rem;
}

.intro h1 {
  margin: 0;
  font: normal clamp(3.35rem, 7.6vw, 7.25rem)/.87 var(--heading);
  letter-spacing: -.072em;
}

.intro p {
  max-width: 24rem;
  margin: 1.55rem 0 0;
  font-size: clamp(1rem, 2vw, 1.16rem);
}

.drawing {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 17.5rem;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #b2a1d2;
  border-radius: .45rem;
  background:
    linear-gradient(#a691cc40 1px, transparent 1px),
    linear-gradient(90deg, #a691cc40 1px, transparent 1px),
    #d8c8f4;
  background-size: 1.6rem 1.6rem;
  background-position: center;
}

.drawing-sun {
  position: absolute;
  width: 52%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--lime);
  transform: translate(-29%, -2%);
}

.drawing-notebook {
  z-index: 1;
  width: min(52%, 14.5rem);
  aspect-ratio: 1.1;
  padding: .6rem .5rem .3rem .6rem;
  border-radius: .28rem .65rem .65rem .28rem;
  background: #574277;
  box-shadow: .33rem .45rem 0 #382648, .7rem 1rem 1.6rem #36204f46;
  transform: rotate(-15deg) translate(.1rem, -.25rem);
}

.drawing-page {
  height: 100%;
  display: grid;
  align-content: center;
  gap: .65rem;
  border-radius: .08rem .4rem .4rem .08rem;
  background: #fcf8eb;
  box-shadow: inset .6rem 0 .65rem -.5rem #8e739e;
  padding: 1rem 16% 1rem 19%;
}

.drawing-page i {
  height: 1px;
  background: #afa2bc;
}

.drawing-page i:nth-child(2) {
  width: 87%;
}

.drawing-page i:nth-child(4) {
  width: 64%;
}

.drawing-pencil {
  position: absolute;
  z-index: 2;
  left: 55%;
  top: 65%;
  width: 27%;
  height: .47rem;
  border-radius: .12rem 0 0 .12rem;
  background: linear-gradient(180deg, #78558b, #533465);
  box-shadow: .1rem .25rem .25rem #3b295758;
  transform: rotate(28deg);
  transform-origin: left center;
}

.drawing-pencil::after {
  content: "";
  position: absolute;
  left: 100%;
  height: 100%;
  width: .8rem;
  background: linear-gradient(90deg, #d6ba99 66%, #4f355a 66%);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.journal {
  padding-bottom: 3.25rem;
  scroll-margin-top: 1.5rem;
}

.journal-heading, .journal-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.journal-heading h2 {
  margin: 0;
  font: normal clamp(2.4rem, 5vw, 4rem)/1 var(--heading);
  letter-spacing: -.053em;
}

.search {
  display: grid;
  gap: .25rem;
  width: min(100%, 19rem);
}

.search label {
  color: var(--muted);
  font-size: .875rem;
}

.search input {
  width: 100%;
  padding: .56rem .8rem;
  border: 1px solid #aca3b6;
  border-radius: .3rem;
  background: #fff;
  color: var(--ink);
}

.search input::placeholder {
  color: #716779;
}

.journal-bar {
  align-items: center;
  margin-block: 1.25rem .9rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.filter {
  padding: .35rem .78rem;
  border: 1px solid #bab2c5;
  border-radius: 2rem;
  background: transparent;
  color: var(--ink);
  font-size: .875rem;
}

.filter:hover {
  background: #eae2f5;
}

.filter[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.count {
  margin: 0;
  color: var(--muted);
  font-size: .875rem;
  white-space: nowrap;
}

.entry-list {
  border-top: 1px solid var(--ink);
}

.entry {
  border-bottom: 1px solid var(--line);
}

.entry summary {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr) minmax(12rem, .8fr) 2rem;
  align-items: center;
  gap: .9rem;
  padding: 1rem .15rem 1rem 0;
  list-style: none;
  cursor: pointer;
  transition: background-color .15s ease;
}

.entry summary::-webkit-details-marker {
  display: none;
}

.entry summary:hover, .entry details[open] summary {
  background: #eae2f4;
}

.entry summary::after {
  grid-column: 4;
  width: 2rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid #b9aecb;
  border-radius: 50%;
  content: "+";
  font-size: 1.3rem;
  line-height: 1;
}

.entry details[open] summary::after {
  content: "−";
}

.entry-category {
  justify-self: start;
  padding: .12rem .53rem;
  border-radius: 2rem;
  background: #e3dcc7;
  font-size: .87rem;
}

.entry[data-category="photo"] .entry-category {
  background: var(--lilac);
}

.entry[data-category="habits"] .entry-category {
  background: var(--lime);
}

.entry h3 {
  margin: 0;
  font: normal clamp(1.3rem, 3vw, 1.8rem)/1.13 var(--heading);
  letter-spacing: -.02em;
}

.entry-description {
  color: var(--muted);
}

.entry-body {
  max-width: 47rem;
  padding: 1rem 3rem 1.15rem 6.9rem;
  line-height: 1.7;
}

.entry-body p {
  margin: 0 0 .8rem;
}

.entry-body p:last-child {
  margin-bottom: 0;
}

.empty-state {
  padding-block: 1.4rem;
}

.empty-state p {
  margin: 0 0 .4rem;
  font: normal 1.45rem var(--heading);
}

.empty-state button {
  padding: .25rem 0;
  border: 0;
  background: none;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: .25em;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.2rem 1.6rem;
  border-top: 1px solid var(--ink);
}

.footer span {
  font: 700 1.1rem var(--heading);
}

@media (max-width: 46rem) {
  .intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    padding-block: 1.2rem 2.45rem;
  }

  .intro-copy {
    padding-block: .35rem;
  }

  .drawing {
    min-height: clamp(11.5rem, 42vw, 16rem);
  }

  .drawing-sun {
    width: min(46%, 16rem);
  }

  .drawing-notebook {
    width: min(42%, 13rem);
  }

  .drawing-pencil {
    width: min(24%, 8rem);
  }

  .entry summary {
    grid-template-columns: minmax(0, 1fr) 2rem;
    grid-auto-rows: auto;
    gap: .25rem .65rem;
    padding-block: .8rem;
  }

  .entry h3, .entry-description {
    grid-column: 1;
  }

  .entry summary::after {
    grid-column: 2;
    grid-row: 2;
  }

  .entry-body {
    padding-inline: 0 .5rem;
  }
}

@media (max-width: 32rem) {
  .shell {
    width: calc(100% - 2rem);
  }

  .masthead {
    min-height: 3.55rem;
  }

  .journal-heading {
    flex-direction: column;
    align-items: stretch;
    gap: .8rem;
  }

  .search {
    width: 100%;
  }

  .journal-bar {
    flex-wrap: wrap;
    gap: .5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .entry summary {
    transition: none;
  }
}
