/* Diary, Poetry and Food · /diary, /poetry, /food (the logs) and their entries */

/* ---------- hero ---------- */
.diary-cleo { flex: 0 1 auto; max-width: 100%; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 8px; margin: 0 auto; }
.writing { align-self: flex-start; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 12px; box-shadow: 3px 3px 0 var(--a1); color: var(--a2-text); font-size: 20px; line-height: 1.3; }
.cleo-curl { width: 150px; height: auto; }
.ph-cleo { margin: 0 auto; }
.cleo-writer { width: min(220px, 58vw); height: auto; }
.cleo-chef { width: min(190px, 50vw); height: auto; }

/* Nut, the sky, stretched between the hero and the log (it's Cleo) */
.nut-band { display: flex; justify-content: center; padding: 10px clamp(10px, 3vw, 30px) 0; overflow: hidden; background: linear-gradient(var(--a3-soft), var(--a1-soft)); border-bottom: 3px solid var(--ink); }
.nut-cleo { width: min(500px, 100%); height: auto; }

/* ---------- the log ---------- */
.diary-cols { display: flex; flex-wrap: wrap; align-items: stretch; }
.diary-main { flex: 999 1 520px; min-width: 0; padding: 26px clamp(14px, 3vw, 32px) 32px; display: flex; flex-direction: column; gap: 22px; }
.diary-side { flex: 1 1 260px; min-width: 0; padding: 26px 18px; background: var(--a3-soft); border-left: 3px solid var(--ink); display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 859px) { .diary-side { border-left: none; border-top: 3px solid var(--ink); } }
.filter-line { font-family: var(--f-term); font-size: 21px; color: var(--muted-ink); overflow-wrap: anywhere; }
.entry-list { display: flex; flex-direction: column; gap: 22px; }
.d-entry[hidden] { display: none; }

/* posts */
.post-card, .photo-card, .echo-card { transition: transform 0.2s ease; }
.post-card:hover, .photo-card:hover, .echo-card:hover { transform: translateY(-4px) rotate(-0.4deg); }
.post-card { background: var(--paper-hi); border: 2px solid var(--ink); }
.ps-a1 { box-shadow: 5px 5px 0 var(--a1); } .ps-a2 { box-shadow: 5px 5px 0 var(--a2); } .ps-a3 { box-shadow: 5px 5px 0 var(--a3); } .ps-a4 { box-shadow: 5px 5px 0 var(--a4); }
.ps-a1 .entry-bar i { background: var(--a1); } .ps-a2 .entry-bar i { background: var(--a2); } .ps-a3 .entry-bar i { background: var(--a3); } .ps-a4 .entry-bar i { background: var(--a4); }
.pc-body { position: relative; padding: 18px 20px 12px 22px; }
.pc-body .tape { left: auto; right: 132px; transform: rotate(4deg); }
.ps-a2 .tape { background: color-mix(in srgb, var(--a1) 70%, transparent); }
.ps-a3 .tape { background: color-mix(in srgb, var(--a4) 85%, transparent); }
.pc-body .mood { top: 14px; right: 14px; font-size: 18px; }
.pc-meta { margin-bottom: 4px; font-family: var(--f-term); font-size: 19px; color: var(--muted-ink); }
.pc-body .pc-meta { padding-right: 96px; }
.pc-title { margin-bottom: 8px; padding-right: 110px; font-family: var(--f-cute); font-weight: 500; font-size: 24px; line-height: 1.35; }
.pc-title a { color: var(--ink); text-decoration: none; }
.pc-title a:hover { color: var(--link); text-decoration: underline; }
.pc-excerpt { font-size: 17px; line-height: 1.7; }
.pc-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; margin-top: 10px; }

/* one-line echoes */
.echo-card { padding: 12px 16px; border: 2px solid var(--ink); font-size: 21px; line-height: 1.4; }
.es-a1 { box-shadow: 5px 5px 0 var(--a1); } .es-a2 { box-shadow: 5px 5px 0 var(--a2); } .es-a3 { box-shadow: 5px 5px 0 var(--a3); } .es-a4 { box-shadow: 5px 5px 0 var(--a4); }
.echo-card .mood-pill { transform: rotate(-4deg); }
.echo-text { margin-top: 4px; }

/* photo entries */
.photo-card { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; padding: 22px 18px 18px; background: var(--paper-hi); border: 2px solid var(--ink); }
.polaroid { position: relative; display: block; flex: 0 0 auto; margin: 0 auto; padding: 10px 10px 38px; background: #FFFFFF; border: 1.5px solid var(--ink); box-shadow: 3px 3px 0 rgba(20, 16, 24, 0.25); color: var(--ink); text-decoration: none; transform: rotate(-3deg); }
.polaroid:hover { color: var(--ink); }
.polaroid .tape { top: -10px; left: 50%; width: 70px; height: 20px; margin-left: -35px; background: color-mix(in srgb, var(--a3) 75%, transparent); transform: rotate(-4deg); }
.pol-img { width: 190px; height: 160px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: radial-gradient(circle at 40% 40%, var(--paper-hi), var(--card-6) 60%, var(--a3)); border: 1px solid var(--ink); }
.pol-img > span, .pol-ph { padding: 1px 6px; background: var(--paper-hi); font-size: 14px; }
.pol-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pol-cap { position: absolute; left: 0; right: 0; bottom: 9px; text-align: center; font-family: var(--f-cute); font-size: 14px; }
.photo-text { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.photo-text .pc-title { margin: 0; padding-right: 0; }

.filter-empty { padding: 30px; background: var(--paper-hi); border: 3px dashed var(--a3); font-family: var(--f-term); font-size: 22px; text-align: center; }
.log-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 14px; padding: 6px 14px; border: 2px solid var(--ink); font-size: 20px; }
.log-end .crumb { display: inline-flex; align-items: center; min-height: 40px; }

/* ---------- sidebar ---------- */
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; font-family: var(--f-term); font-size: 19px; text-align: center; }
.cal caption { margin-bottom: 4px; color: var(--a4-text); font-size: 20px; }
.cal th { padding-bottom: 2px; font-weight: 400; color: var(--muted); }
.cal abbr { text-decoration: none; }
.cal td { padding: 2px 0; }
.cal td > * { display: flex; align-items: center; justify-content: center; height: 28px; margin: 0 2px; border-radius: 999px; color: var(--on-panel); }
.cal .has { background: var(--a1); color: var(--on-a1); text-decoration: none; }
.cal a.has:hover { background: var(--hover); color: var(--on-hover); }
.cal .is-today > * { background: var(--a4); color: var(--on-a4); box-shadow: 0 0 0 2px var(--paper-hi); }
.cal-key { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-family: var(--f-term); font-size: 17px; color: var(--muted); }
.cal-key i { display: inline-block; width: 10px; height: 10px; margin-right: 4px; border-radius: 50%; }
.k-has { background: var(--a1); } .k-today { background: var(--a4); }
.tag-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 12px; background: var(--paper-hi); border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); color: var(--ink); font-family: var(--f-term); font-size: 21px; text-decoration: none; transition: transform 0.12s ease; }
.tag-btn:hover { transform: translate(-2px, -2px); color: var(--ink); }
.tag-btn[aria-current="true"] { background: var(--ink); color: var(--a4-text); }
.uptime { font-size: 20px; line-height: 1.4; }
.archive { padding: 6px 12px 10px; font-family: var(--f-term); font-size: 21px; }
.archive a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 0 4px; color: var(--ink); text-decoration: none; }
.archive a:hover span:first-child { text-decoration: underline; }
.archive a[aria-current="true"] { background: var(--a4-soft); }
.rss { justify-content: center; font-family: var(--f-term); font-size: 21px; text-align: center; }

/* ---------- one entry ---------- */
.post-head { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 30px clamp(16px, 4vw, 48px) 26px; border-bottom: 3px solid var(--ink); }
.post-ls { max-width: 100%; padding: 2px 10px; background: var(--ink); color: var(--a2-soft); font-family: var(--f-term); font-size: 19px; white-space: pre-wrap; }
.post-title { max-width: 24em; font-family: var(--f-cute); font-weight: 600; font-size: clamp(30px, 4.4vw, 50px); line-height: 1.35; color: var(--ink); }
.post-title .hl { padding: 0 4px; background: linear-gradient(transparent 58%, color-mix(in srgb, var(--a1) 45%, transparent) 58% 92%, transparent 92%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.mood-big { padding: 4px 12px; background: var(--paper-hi); border: 2px solid var(--ink); border-radius: 999px; box-shadow: 2px 2px 0 var(--ink); font-family: var(--f-term); font-size: 22px; transform: rotate(-4deg); }
.pm-line { font-family: var(--f-term); font-size: 21px; color: var(--muted-ink); }

.post-cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 28px; padding: 32px clamp(14px, 3vw, 34px) 30px; }
.post-main { flex: 999 1 520px; min-width: 0; }
.post-side { flex: 1 1 250px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 900px) { .post-side { position: sticky; top: 16px; } }

/* the notebook page: punched holes, a margin line, lined paper */
.sheet { position: relative; padding: 32px clamp(18px, 4vw, 44px) 30px clamp(52px, 8vw, 84px); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--a1); font-size: 19px; line-height: 28px; }
.sheet::before { content: ""; position: absolute; top: 0; bottom: 0; left: clamp(38px, 6vw, 64px); width: 2px; background: color-mix(in srgb, var(--a1) 55%, transparent); }
.holes { position: absolute; top: 0; bottom: 0; left: 8px; width: 18px; background: radial-gradient(circle at 9px 9px, var(--paper) 0 5px, color-mix(in srgb, var(--ink) 70%, transparent) 5.5px 6.8px, transparent 7.2px) 0 34px / 18px 92px repeat-y; }
.sheet .tape { top: -10px; left: 46%; }
.paper-grid.sheet { box-shadow: 6px 6px 0 var(--a2); }
.paper-dots.sheet { box-shadow: 6px 6px 0 var(--a3); }
.sheet > p, .sheet > ul, .sheet > pre, .sheet > figure, .sheet > aside, .sheet > h2 { margin: 0 0 28px; }
.sheet-h { display: flex; align-items: center; gap: 10px; font-family: var(--f-cute); font-weight: 600; font-size: 21px; line-height: 28px; }
.sheet-h .sh-glyph { flex: none; font-family: var(--f-hiero); font-weight: 400; font-size: 24px; line-height: 1; color: var(--a1-deep); }
.sheet-h .sh-text { padding: 0 10px; background: var(--a1-soft); border: 2px solid var(--ink); border-radius: 6px; box-shadow: 2px 2px 0 var(--ink); line-height: 24px; transform: rotate(-1deg); }
.sheet-h .sh-rule { flex: 1 1 16px; min-width: 16px; height: 2px; background-image: repeating-linear-gradient(90deg, var(--a1-deep) 0 6px, transparent 6px 10px); }
.sheet-list li { position: relative; padding-left: 1.5em; }
.sheet a { color: var(--a1-deep); text-decoration: underline; text-underline-offset: 3px; }
.fn-ref { font-size: 0.72em; line-height: 0; }
.fn-ref a { display: inline-block; min-width: 24px; min-height: 24px; padding: 0 2px; text-align: center; text-decoration: none; font-family: var(--f-term); }
.sheet-notes ol { margin: 0; padding-left: 1.6em; font-size: 0.92em; list-style: decimal; }
.sheet-notes li::marker { font-family: var(--f-term); color: var(--a1-deep); }
.sheet-notes li { margin-bottom: 4px; }
.sheet-notes li:target { background: color-mix(in srgb, var(--a4) 45%, transparent); }
.fn-back { display: inline-block; min-width: 24px; min-height: 24px; text-align: center; text-decoration: none; }
.sheet-list li::before { content: "☥"; position: absolute; left: 0.1em; color: var(--a1-deep); }
.sheet-list.check li { padding-left: 0; }
.sheet-list.check li::before { content: none; }
.sheet-list .box { font-family: var(--f-term); font-size: 20px; color: var(--a1-deep); }
.sheet-list .box.done { color: var(--a2-deep); }
.sheet-code { padding: 12px 14px; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--a3); font-size: 20px; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.sheet-code code { font-family: inherit; }
/* ---------- long-form posts: inline code, subsections, contents, listings, tables, figures, embeds ----------
   Code (inline and listings) uses --f-code; change it here to try another monospace. */
:root { --f-code: var(--f-ascii); }
.sheet code, .listing pre { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
.sheet > ol, .sheet > nav, .sheet > h3 { margin: 0 0 28px; }
.sheet h2[id], .sheet h3[id], .sheet .fig[id] { scroll-margin-top: 16px; }
.sheet :not(pre) > code { padding: 0 4px; background: color-mix(in srgb, var(--a3-soft) 70%, transparent); border-radius: 4px; font-family: var(--f-code); font-size: 1.1em; overflow-wrap: anywhere; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.sheet-h3 { font-family: var(--f-cute); font-weight: 600; font-size: 19px; line-height: 28px; }
.sheet-h3::before { content: "☥ "; color: var(--a1-deep); }
.sheet-ol { padding-left: 1.6em; list-style: decimal; }
.sheet-ol li::marker { font-family: var(--f-term); color: var(--a1-deep); }
.sheet-toc { max-width: 30em; }
.sheet-toc ol { margin: 0; padding-left: 1.6em; list-style: decimal; }
.sheet-toc ol ol { list-style: lower-alpha; }
.sheet-toc li::marker { font-family: var(--f-term); color: var(--a1-deep); }
.sheet-toc a { display: inline-block; min-height: 24px; }
.fold-ctl { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.fold-ctl[hidden] { display: none; }

/* the sidebar's contents box (toc: true | side): shown once the sidebar sits beside the post, and sticks */
.post-cols { container: post-cols / inline-size; }
.side-toc { display: none; }
.side-toc-body { overflow-y: auto; overscroll-behavior: contain; padding: 6px 12px 10px; }
.side-toc ol { margin: 0; padding-left: 1.5em; list-style: decimal; font-size: 16px; line-height: 20px; }
.side-toc ol ol { padding-left: 1.3em; list-style: lower-alpha; }
.side-toc li::marker { font-family: var(--f-term); color: var(--a1-deep); }
.side-toc a { display: block; min-height: 32px; padding: 6px 6px; color: var(--ink); text-decoration: none; }
.side-toc a:hover { text-decoration: underline; }
.side-toc a[aria-current] { background: var(--a4-soft); box-shadow: inset 3px 0 0 var(--a1-deep); }
.side-toc .fold-ctl .btn { flex: 1 1 auto; }
@container post-cols (min-width: 798px) {
  .post-side.has-toc { align-self: stretch; position: static; }
  .post-side.has-toc .side-toc { position: sticky; top: 16px; display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
  .toc-narrow { display: none; }
}

/* a section that folds: ## Heading {fold} / {folded} */
.sheet > details.fold { margin: 0; }
.fold-sum { display: block; margin: 0 0 28px; list-style: none; cursor: pointer; }
.fold-sum::-webkit-details-marker { display: none; }
.fold-sum .sheet-h { min-height: 44px; margin: 0; }
.fold-sum:hover .sh-text { text-decoration: underline; text-underline-offset: 3px; }
.sh-fold { flex: none; min-width: 44px; padding: 0 4px; background: var(--paper-hi); border: 2px solid var(--ink); border-radius: 6px; box-shadow: 2px 2px 0 var(--ink); color: var(--a1-deep); font-family: var(--f-term); font-weight: 400; font-size: 20px; line-height: 28px; text-align: center; }
.sh-fold::before { content: "[+]"; }
.fold[open] > .fold-sum .sh-fold::before { content: "[\2212]"; }
.fold-body > p, .fold-body > ul, .fold-body > ol, .fold-body > pre, .fold-body > figure, .fold-body > aside, .fold-body > nav, .fold-body > h3 { margin: 0 0 28px; }
@media print { .fold-body { display: block !important; } .sh-fold, .fold-ctl, .side-toc { display: none !important; } }

/* a plain listing: light, no scanlines, never wraps; long lines scroll inside the box */
.listing { position: relative; min-width: 0; padding-top: 14px; }
.listing-lang { position: absolute; top: 0; left: 12px; z-index: 1; padding: 0 8px; background: var(--ink); color: var(--a2-soft); font-family: var(--f-term); font-size: 17px; line-height: 22px; }
.listing pre { overflow-x: auto; padding: 18px 16px 12px; background: var(--paper-hi); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--a3); font-family: var(--f-code); font-size: 19px; line-height: 24px; white-space: pre; tab-size: 4; }
.listing code { font-family: inherit; }
.listing pre:focus-visible, .table-wrap:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* tables: the table scrolls inside its box, the page never does */
.table-fig { min-width: 0; }
.table-wrap { overflow-x: auto; background: var(--paper-hi); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--a2); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 18px; line-height: 24px; }
.table-wrap th, .table-wrap td { padding: 4px 12px; text-align: left; vertical-align: top; border-bottom: 1px dashed color-mix(in srgb, var(--ink) 30%, transparent); }
.table-wrap th { background: var(--a2-soft); border-bottom: 2px solid var(--ink); font-family: var(--f-cute); font-weight: 600; font-size: 16px; white-space: nowrap; }
.table-wrap tbody tr:last-child td { border-bottom: none; }
.table-wrap .al-r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap .al-c { text-align: center; white-space: nowrap; }
.table-wrap td.al-r, .table-wrap td.al-c { font-family: var(--f-code); font-size: 20px; }

/* wide figures and interactive embeds: the text column's full width, caption underneath */
.fig { min-width: 0; }
.fig-art, .embed-mount { padding: 12px; background: var(--paper-hi); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--a2); color: var(--ink); }
.fig-art svg, .embed-still svg { display: block; width: 100%; height: auto; color: var(--ink); font-family: var(--f-code); }
.fig-art img, .embed-still img { display: block; width: 100%; height: auto; }
.fig-scroll { overflow-x: auto; }
.fig-scroll > svg, .fig-scroll > img { min-width: var(--fig-min); }
.fig-scroll:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.fig-cap { margin-top: 8px; font-size: 17px; line-height: 24px; color: var(--muted-ink); }
.table-fig > .fig-cap { margin: 0 0 8px; }
.embed-note { margin-top: 6px; font-family: var(--f-term); font-size: 17px; line-height: 22px; color: var(--muted-ink); text-align: right; }
.embed-mount input[type="range"] { min-height: 44px; }
.draft-badge { padding: 2px 10px; background: var(--a4); border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); font-family: var(--f-term); font-size: 19px; color: var(--ink); }

.pol-inline { display: table; margin: 8px auto 36px !important; transform: rotate(2deg); }
.pol-inline .pol-img { width: min(340px, 58vw); height: auto; aspect-ratio: 4 / 3; }
.cleo-note { position: relative; max-width: 380px; margin-left: auto !important; padding: 12px 16px 14px; background: var(--a4-soft); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); font-family: var(--f-cute); font-size: 16px; line-height: 1.6; transform: rotate(1.5deg); }
.cn-head { font-family: var(--f-term); font-size: 18px; color: var(--muted-ink); }
.signoff { margin: 0 !important; font-family: var(--f-cute); font-size: 18px; text-align: right; }
.post-end { margin-top: 18px; font-family: var(--f-term); font-size: 21px; color: var(--muted-ink); text-align: center; }

.editor { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 12px 12px; text-align: center; }
.editor svg { width: 140px; height: auto; }
.editor .cute { font-size: 17px; line-height: 1.4; }
.editor .term { font-size: 18px; color: var(--muted-ink); }
.more-list { padding: 6px 12px 10px; font-size: 16px; line-height: 1.35; }
.more-list a { display: flex; align-items: baseline; gap: 8px; min-height: 40px; padding: 6px 0; border-bottom: 1px dashed color-mix(in srgb, var(--ink) 25%, transparent); color: var(--ink); text-decoration: none; }
.more-list li:last-child a { border-bottom: none; }
.more-list a:hover span:last-child { text-decoration: underline; }
.more-list .fn { flex: 0 0 auto; font-family: var(--f-term); font-size: 19px; color: var(--a1-deep); }

/* ---------- poems ---------- */
.poem-peek { margin: 2px 0 4px; font-family: var(--f-cute); font-size: 17px; line-height: 1.8; }
.poem-card .pc-body { padding-left: 26px; }
.poem-sheet { position: relative; padding: 42px clamp(22px, 6vw, 72px) 30px; border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--a3); }
.poem-sheet .tape { top: -10px; left: 44%; background: color-mix(in srgb, var(--a3) 75%, transparent); }
.stanza { margin: 0 0 1.7em; font-family: var(--f-cute); font-size: clamp(18px, 2.4vw, 21px); line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.poem-note { margin: 0 0 22px; padding: 6px 14px; border-left: 3px solid var(--a3); font-size: 16px; line-height: 1.6; color: var(--muted-ink); }

/* ---------- recipes ---------- */
.recipe-box { margin: 0 0 28px; padding: 14px 18px 4px; background: var(--paper-hi); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--a2); }
.rb-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 10px; font-family: var(--f-term); font-size: 19px; line-height: 1.3; color: var(--muted-ink); }
.rb-meta .hiero { color: #8A5E00; }
.recipe-box .sheet-list, .recipe-box .steps { margin: 0 0 18px; }
.steps { padding-left: 1.7em; list-style: decimal; }
.steps li { margin-bottom: 6px; padding-left: 0.3em; }
.steps li::marker { font-family: var(--f-term); color: var(--a1-deep); }
