/* Journal page — post cards; a post's own page (/journal/<slug>, views/journal-post.js) is further down */

.journal{padding-block:44px 72px}

.journal-head{text-align:center;margin-bottom:30px}
.journal-head .eyebrow{line-height:normal}
.journal-head__title{margin-top:6px;line-height:normal}

.journal-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:22px}
.journal-card{position:relative;background:var(--paper);border:1px solid var(--hairline);border-radius:16px;overflow:hidden;min-width:0}
.journal-card article{display:flex;flex-direction:column;height:100%}
.journal-card__media{position:relative;overflow:hidden;flex:none} /* clips a zoomed-in crop */
.journal-card__img{width:100%;height:220px;object-fit:cover;background:var(--blush-soft)}
.journal-grid.is-square .journal-card__img{height:auto!important;aspect-ratio:1 / 1}
.journal-card__body{padding:18px 20px 22px}
.journal-card__date{font:500 9px/normal var(--sans);letter-spacing:.22em;text-transform:uppercase;color:var(--blush)}
.journal-card__title{margin-top:6px;font-family:var(--serif);font-weight:400;font-size:21px;line-height:1.25;color:var(--plum)}
.journal-card__title em{color:var(--lilac)}
.journal-card__excerpt{margin-top:8px;font:13.5px/1.7 var(--sans);color:var(--stone);text-wrap:pretty}

/* a post with a story: the whole card opens it */
.journal-card__open{color:inherit;text-decoration:none}
.journal-card__open::after{content:"";position:absolute;inset:0;z-index:1;border-radius:16px}
.journal-card__open:focus-visible{outline:none}
.journal-card__open:focus-visible::after{outline:2px solid var(--violet);outline-offset:-2px}
.journal-card.is-linked{transition:box-shadow .2s ease,transform .2s ease}
.journal-card.is-linked:hover{box-shadow:0 18px 34px -24px rgba(46,36,64,.55);transform:translateY(-2px)}
.journal-card.is-linked:hover .journal-card__title{color:var(--violet)}
@media (prefers-reduced-motion:reduce){.journal-card.is-linked:hover{transform:none}}

/* edit mode */
.journal-card.is-draft{border-style:dashed;border-color:var(--lilac)}
.journal-card__draft{position:absolute;top:12px;left:12px;line-height:normal}
.journal-card__edit{display:inline-block;margin-top:14px}
.journal-card__state{display:block;margin-top:8px;font:12px/1.5 var(--sans);color:var(--stone)}
.ed-list.journal-grid[data-ed-add-at="start"]{margin-top:48px;margin-bottom:0}

.journal-empty{text-align:center;padding:48px 20px;background:var(--paper);border:1px dashed var(--lilac-line);border-radius:16px}
.journal-empty[hidden]{display:none}
.ed-note.journal-ednote{margin-bottom:22px}
.journal-ednote__empty{display:block;margin-top:6px}
.journal-ednote__tell{display:block;margin-top:6px}
.journal-ednote__tell--due{font-weight:500;color:var(--plum)} /* this month's entry is still to do (lib/journal-month.js) */
.journal-ednote__link{font-weight:600;color:var(--violet);text-decoration:underline;text-underline-offset:2px}
/* drafts the Mac job made from her notes, waiting for her to check them */
.ed-note.journal-ready{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 14px;margin-bottom:24px;background:var(--blush-soft);border-color:var(--blush);font-size:14px}
.journal-ready__link{font-weight:600;color:var(--violet);text-decoration:underline;text-underline-offset:2px}
.journal-ready__link:hover{color:var(--plum)}

@media (max-width:900px){
  .journal-grid{grid-template-columns:repeat(2,1fr);gap:20px}
}
/* two-up grid: a lone last post spans the row as a side-by-side card instead of leaving a hole */
@media (min-width:621px) and (max-width:900px){
  .journal-card:last-child:nth-child(odd){grid-column:1 / -1}
  .journal-card:last-child:nth-child(odd) article{flex-direction:row}
  .journal-card:last-child:nth-child(odd) .journal-card__media{width:calc(50% - 10px)}
  .journal-card:last-child:nth-child(odd) .journal-card__img{height:260px}
  .journal-card:last-child:nth-child(odd) .journal-card__body{flex:1;align-self:center;padding:22px 26px}
}
@media (max-width:760px){
  .journal{padding-block:32px 56px}
  .journal-head{margin-bottom:24px}
}
@media (max-width:620px){
  .journal-grid{grid-template-columns:1fr;gap:16px}
  .journal-card__img{height:240px}
}

/* ---------- a post's own page ---------- */

.jp{padding-block:22px 40px}

.jp-crumbs ol{display:flex;flex-wrap:wrap;align-items:center;gap:4px 0;margin:0 0 20px;padding:0;list-style:none;font:13px/1.5 var(--sans);color:var(--stone)}
.jp-crumbs li{display:flex;align-items:center;min-width:0}
.jp-crumbs li + li::before{content:"›";margin:0 9px;color:var(--lilac)}
.jp-crumbs a{color:var(--violet);text-decoration:none;padding:6px 0}
.jp-crumbs a:hover{text-decoration:underline}
.jp-crumbs [aria-current]{color:var(--plum-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* photo on the left, date / title / intro beside it */
.jp-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:48px;align-items:center}
.jp-head__media{grid-column:1;grid-row:1;border-radius:22px;overflow:hidden;background:var(--blush-soft)}
.jp-head__img{display:block;width:100%;height:auto;aspect-ratio:4 / 5;object-fit:cover;background:var(--blush-soft)}
.jp-head__text{grid-column:2;grid-row:1;min-width:0}
.jp-date{font-size:11px}
.jp-title{margin-top:10px;font:600 44px/1.1 var(--serif);color:var(--plum);text-wrap:balance}
.jp-title em{color:var(--lilac)}
.jp-intro{margin-top:16px;font:17px/1.7 var(--sans);color:var(--plum-ink);text-wrap:pretty}
.jp-byline{margin-top:14px;font:500 13px/1.5 var(--sans);color:var(--stone)}
.jp-byline a{color:var(--violet)}

/* the story: paragraphs, headings and lists (the same rules apply inside the edit-mode field) */
.jp-story{max-width:680px;margin:48px auto 0;font-size:16px;line-height:1.8;color:var(--plum-ink)}
.jp-story :is(p, h2, h3, ul, ol) + :is(p, ul, ol){margin-top:1.1em}
.jp-story :is(p, h2, h3, ul, ol) + :is(h2, h3){margin-top:1.7em}
.jp-story h2{font:600 27px/1.25 var(--serif);color:var(--plum);text-wrap:balance}
.jp-story h3{font:600 21px/1.3 var(--serif);color:var(--plum);text-wrap:balance}
.jp-story :is(h2, h3) + :is(p, ul, ol){margin-top:.55em}
.jp-story ul,.jp-story ol{margin:0;padding-left:1.35em}
.jp-story ul{list-style:disc}
.jp-story ol{list-style:decimal}
.jp-story li + li{margin-top:.4em}
.jp-story li::marker{color:var(--lilac)}
.jp-story ol li::marker{color:var(--plum);font-weight:600}
.jp-story a{color:var(--violet)}
.jp-story em{color:var(--plum)}
.jp-story > .ed{display:block;min-height:7.2em}

.jp-photos{max-width:920px;margin:40px auto 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.jp-photo{margin:0;aspect-ratio:4 / 5;border-radius:18px;overflow:hidden;background:var(--lilac-soft)}
.jp-photo:last-child:nth-child(odd){grid-column:1 / -1;aspect-ratio:3 / 2}
.jp-photo__img{width:100%;height:100%;object-fit:cover}
.is-editing .jp-photos{min-height:24px}

.jp-back{max-width:680px;margin:44px auto 0}

.jp-more{padding-block:28px 72px;border-top:1px solid var(--hairline)}
.jp-more__title{text-align:center;margin-bottom:24px}
.jp-more__grid{grid-template-columns:repeat(2,minmax(0,340px));justify-content:center}

/* signed-in only */
.jp-hidden{margin:0 0 18px;padding:12px 16px;border-radius:12px;background:var(--blush-soft);border:1px dashed var(--blush);font:14px/1.5 var(--sans);color:var(--plum-ink)}
.ed-note.jp-ednote{display:flex;align-items:center;justify-content:space-between;gap:10px 16px;flex-wrap:wrap;margin-bottom:18px}
.ed-note.jp-ednote.is-draft{background:var(--blush-soft);border-color:var(--blush)}
.ed-note.jp-ednote .btn{margin:0}
.ed-note.jp-words{display:block;margin:0 0 40px;padding:14px 16px 16px}
.jp-words .jp-words__title{margin-bottom:12px}
.jp-words__list{margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px 22px}
.jp-words__list > div{min-width:0}
.jp-words__list dt{font:500 10px/1.4 var(--sans);letter-spacing:.12em;text-transform:uppercase;color:var(--stone)}
.jp-words__list dd{margin:3px 0 0;color:var(--plum-ink);overflow-wrap:anywhere}

/* the Mac job's review note on a draft it made from one of her notes */
.ed-note.jp-review{margin-bottom:18px;padding:13px 16px 14px;font-size:14px;line-height:1.6}
.jp-review > p + p,.jp-review > p + ul,.jp-review > ul + p{margin-top:8px}
.jp-review summary{cursor:pointer}
.jp-review summary + *{margin-top:10px}
.jp-review__list{margin:6px 0 0;padding-left:1.3em;list-style:disc}
.jp-review__list li + li{margin-top:3px}
.jp-review__list li::marker{color:var(--lilac)}
.jp-review a{font-weight:600;color:var(--violet);text-decoration:underline;text-underline-offset:2px}
.jp-review .jp-review__foot{margin-top:10px}

/* "For Google": the short update for her Business Profile */
.jp-google-wrap{padding-bottom:40px;scroll-margin-top:90px}
.ed-note.jp-google{max-width:680px;margin:0 auto;padding:18px 20px 20px;font-size:14px;line-height:1.6}
.jp-google__head{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:4px 14px}
.jp-google__title{font:600 22px/1.2 var(--serif);color:var(--plum)}
.ed-note .jp-google__status{font:500 13px/1.5 var(--sans);color:var(--stone)}
.jp-google__status::before{content:"";display:inline-block;width:8px;height:8px;margin-right:7px;border-radius:50%;background:var(--stone);vertical-align:1px}
.jp-google__status[data-status="waiting"]::before,.jp-google__status[data-status="asked"]::before{background:var(--marigold)}
.jp-google__status[data-status="posted"]::before{background:var(--sage)}
.jp-google__status[data-status="failed"]{color:#A3324F}
.jp-google__status[data-status="failed"]::before{background:var(--cherry)}
.ed-note .jp-google__hint{margin-top:4px;color:var(--stone)}
.jp-google__field{margin-top:12px;padding:12px 14px;background:var(--paper);border:1px solid var(--lilac-line);border-radius:10px}
.jp-google__text{display:block;min-height:4.8em;font:15px/1.6 var(--sans);color:var(--plum-ink)}
.ed-note .jp-google__count{margin-top:6px;font-size:12.5px;color:var(--stone);text-align:right}
.jp-google__count.is-over{color:#A3324F;font-weight:600}
.ed-note .jp-google__warn{margin-top:8px;padding:9px 12px;border-radius:10px;background:var(--blush-soft);border:1px solid var(--blush);color:#7A2944}
.jp-google__row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 16px;margin-top:14px}
.jp-google__photo{display:flex;align-items:center;gap:12px;min-width:0;flex:1 1 260px}
.jp-google__img{flex:none;width:72px;height:72px;object-fit:cover;border-radius:10px;background:var(--blush-soft)}
.jp-google__photo-text a{font-weight:600;color:var(--violet);text-decoration:underline;text-underline-offset:2px}
.ed-note.jp-google .btn{margin:0;min-height:40px}
.jp-google__wanted{display:flex;align-items:center;gap:10px;margin-top:16px;padding-top:14px;border-top:1px dashed var(--lilac);font-weight:500;cursor:pointer;min-height:32px}
.jp-google__wanted input{flex:none;width:20px;height:20px;margin:0;accent-color:var(--violet)}

@media (max-width:900px){
  .jp-head{gap:32px}
  .jp-title{font-size:36px}
}
@media (max-width:760px){
  .jp{padding-block:14px 32px}
  .jp-crumbs ol{margin-bottom:12px}
  .jp-head{grid-template-columns:1fr;gap:22px}
  .jp-head__media,.jp-head__text{grid-column:1;grid-row:auto}
  .jp-head__media{border-radius:16px}
  .jp-title{font-size:32px}
  .jp-intro{font-size:16px}
  .jp-story{margin-top:32px;font-size:15.5px}
  .jp-story h2{font-size:24px}
  .jp-story h3{font-size:19px}
  .jp-more{padding-block:24px 56px}
}
@media (max-width:620px){
  .jp-photos{grid-template-columns:1fr;gap:12px}
  .jp-photo,.jp-photo:last-child:nth-child(odd){aspect-ratio:4 / 5}
  .jp-photo{border-radius:14px}
  .jp-more__grid{grid-template-columns:1fr}
}
