/* TACIT Journal 1.1.0. Loaded by the Journal page and the Posts template only (page head code).
   Layout and type live in Webflow classes. This file holds only what classes cannot express:
   states keyed to attributes the scripts set, selectors that reach from one element to another, form element resets,
   values that mix a variable into a longer value, and the element styles inside the Rich Text body.
   Colours are the Webflow variables, with their values as fallbacks.
   Moved into Webflow classes in 1.1.0 (edit them in the Designer, not here): the stretched link on journal_row-link and
   featured_link (After state), the icon strokes on journal_row-external-icon, controls_toggle-icon and post_crumb-icon,
   the image corners on featured_image and post_hero-image, the Focused state of controls_search-input, the Empty state of
   subscribe_slot, subscribe_error and post_share-status, the underline that draws on post_kicker-link (and its Hover
   state), and the Focused (keyboard) state of toc_bar on tablet.
   Scripts: journal-index.js (1.1.0, this folder), journal-post.js (1.0.0 folder) and the site scripts tacit-motion.js and tacit.js. */

/* ---- 1. Custom form elements (made in Webflow as custom elements, so they need the resets a Form block would give) ---- */
button[data-journal], button[data-toc-toggle], button[data-share], form[data-tacit="subscribe"] button { border: 0; font-family: inherit; line-height: inherit; }
form[data-tacit="subscribe"] button { cursor: pointer; }
input[data-journal-filter], select[data-journal-filter], form[data-tacit="subscribe"] input { font-family: inherit; line-height: inherit; }
fieldset[class^="controls_"] { min-inline-size: 0; }

/* ---- 2. The post row (index list and related posts) ---- */
/* the whole row is the link: the title's link is stretched over the row (the After state of the two link classes, in Webflow) */
.journal_row-link:focus-visible::after { outline: 2px solid var(--tacit--ink, #0A0A0A); outline-offset: -2px; border-radius: 4px; }
.featured_link:focus-visible::after { outline: 2px solid var(--tacit--ink, #0A0A0A); outline-offset: 4px; border-radius: 6px; }
/* "Pinned" shows only when Pin order is set; "Opens on ..." only when External link is set (both are attributes bound on the item) */
[data-journal="item"]:not([data-journal-pin]) .journal_row-pin,
[data-journal="item"][data-journal-pin=""] .journal_row-pin,
[data-journal="item"][data-journal-pin="0"] .journal_row-pin,
[data-journal="item"]:not([data-journal-external^="http"]) .journal_row-external { display: none; }
/* a post with no hero image: no empty pill */
.journal_row-media:has(.w-dyn-bind-empty), .featured_media:has(.w-dyn-bind-empty), .post_hero:has(img.w-dyn-bind-empty) { display: none; }
/* Webflow's own "No items found" is replaced by the page's empty state or by the script hiding the block */
[data-journal-list] > .w-dyn-empty { display: none; }
@media (max-width: 991px) {
  .journal_row-summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
}
@media (min-width: 992px) {
  /* hover: the row's image opens from a line into a pill and the other titles step back */
  .journal_row:hover .journal_row-media, .journal_row:focus-within .journal_row-media { clip-path: inset(0 0 0 0 round 999px); }
  .journal_rows:hover .journal_row:not(:hover) .journal_row-title { opacity: .38; }
}
@media (min-width: 992px) and (hover: none) {
  /* touch screens at desktop widths cannot hover: the image is simply shown */
  .journal_row-media { clip-path: inset(0 0 0 0 round 999px); }
  .journal_rows:hover .journal_row:not(:hover) .journal_row-title { opacity: 1; }
}

/* ---- 3. Index: featured block and controls ---- */
.featured_component:hover .button { transform: scale(1.035); }
/* once the featured post has stepped aside the controls follow the running head directly */
.section_journal-featured[hidden] + .section_journal-controls { margin-top: 0; }
.section_journal-featured[hidden] + .section_journal-controls .controls_wrap { border-top-color: transparent; }
/* before journal-index.js has run there is nothing to clear, no empty state and no "show more" */
html:not([data-journal-js]) [data-journal="clear"],
html:not([data-journal-js]) [data-journal="empty"],
html:not([data-journal-js]) [data-journal="more-wrap"] { display: none; }
.controls_search-icon { fill: none; stroke: var(--tacit--mute, #6B6B6B); stroke-width: 1.4; stroke-linecap: round; }
.controls_search-input { -webkit-appearance: none; appearance: none; }
.controls_search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; cursor: pointer; background: linear-gradient(45deg, transparent 46%, var(--tacit--ink, #0A0A0A) 46%, var(--tacit--ink, #0A0A0A) 54%, transparent 54%), linear-gradient(-45deg, transparent 46%, var(--tacit--ink, #0A0A0A) 46%, var(--tacit--ink, #0A0A0A) 54%, transparent 54%); }
[aria-expanded="true"] > .controls_toggle-icon { transform: rotate(180deg); }
[data-journal="active-count"] { font-weight: 400; }
[data-journal="active-count"]:empty { display: none; }
/* type: the pill as a toggle. The radio is real but unseen; its label text shows the state. */
.controls_pill { box-shadow: inset 0 0 0 1px var(--tacit--rule, #DEDEDC); }
.controls_option:hover .controls_pill { box-shadow: inset 0 0 0 1.5px var(--tacit--ink, #0A0A0A); }
.controls_option-input:checked + .controls_pill { background-color: var(--tacit--ink, #0A0A0A); color: var(--tacit--paper, #FFFFFF); box-shadow: none; }
.controls_option-input:focus-visible + .controls_pill { outline: 2px solid var(--tacit--ink, #0A0A0A); outline-offset: 3px; }
/* topics: a small box fills when a topic is on, so the state is not colour alone */
.controls_check::before { content: ""; width: 9px; height: 9px; box-shadow: inset 0 0 0 1px var(--tacit--mute, #6B6B6B); transition: background-color .2s, box-shadow .2s; }
.controls_option:hover .controls_check, .controls_option-input:checked + .controls_check { color: var(--tacit--ink, #0A0A0A); }
.controls_option-input:checked + .controls_check::before { background-color: var(--tacit--ink, #0A0A0A); box-shadow: inset 0 0 0 1px var(--tacit--ink, #0A0A0A); }
.controls_option-input:focus-visible + .controls_check { outline: 2px solid var(--tacit--ink, #0A0A0A); outline-offset: 2px; border-radius: 3px; }
.controls_select { -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 3.5 5 7l3.5-3.5' fill='none' stroke='%230A0A0A' stroke-width='1.4'/%3E%3C/svg%3E"); background-position: right center; background-size: 10px; background-repeat: no-repeat; }
[data-journal="empty-query"] { font-weight: 500; color: var(--tacit--ink, #0A0A0A); overflow-wrap: anywhere; }
@media (max-width: 991px) {
  /* narrow: the filters fold behind the Filter button */
  html[data-journal-js] [data-journal="filters-panel"][data-open="false"] { display: none; }
}

/* ---- 4. Newsletter forms. tacit.js sets data-state on the form (idle, submitting, error, done) and the hidden attribute on the error and done texts. ---- */
form[data-tacit="subscribe"] .subscribe_input[data-tacit-field]:hover { border-bottom-color: var(--tacit--faint, #9C9C9A); }
form[data-tacit="subscribe"] .subscribe_input[data-tacit-field]:focus { outline: 0; border-color: currentColor; box-shadow: 0 1px 0 0 currentColor; }
form[data-tacit="subscribe"] .subscribe_input[data-tacit-field][aria-invalid="true"] { border-color: var(--tacit--danger, #9B2C1F); box-shadow: 0 1px 0 0 var(--tacit--danger, #9B2C1F); }
[data-tacit="subscribe"]:not([data-state="done"]) [data-tacit="done"] { display: none; }
[data-tacit="subscribe"] [data-tacit="done"] { outline: 0; }
[data-tacit="subscribe"][data-state="submitting"] button { opacity: .55; pointer-events: none; }
[data-tacit="subscribe"][data-state="done"] .subscribe_row,
[data-tacit="subscribe"][data-state="done"] .subscribe_slot,
[data-tacit="subscribe"][data-state="done"] .subscribe_error { display: none; }
/* on the black band */
.section_newsletter .subscribe_input::placeholder { color: rgba(244, 244, 242, .52); }
.section_newsletter form[data-tacit="subscribe"] .subscribe_input[data-tacit-field]:hover { border-bottom-color: rgba(244, 244, 242, .6); }
.section_newsletter .subscribe_error { color: #F3A89C; }
.section_newsletter form[data-tacit="subscribe"] .subscribe_input[data-tacit-field][aria-invalid="true"] { border-color: #F3A89C; box-shadow: 0 1px 0 0 #F3A89C; }

/* ---- 5. Post: progress, title block, chapter pane ---- */
.post_progress::after { content: ""; position: absolute; inset: 0; background: var(--tacit--ink, #0A0A0A); transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); }
.post_byline-author:has(.w-dyn-bind-empty) { display: none; }   /* no author: no "By" */
/* the chapter links are written by journal-post.js; the current one gets aria-current="location" */
[data-toc-list] li { margin: 0; }
[data-toc-list] a { display: flex; align-items: baseline; padding-block: 6px; font-size: 14px; line-height: 1.35; color: var(--tacit--mute, #6B6B6B); text-decoration: none; transition: color .2s; }
[data-toc-list] a::before { content: ""; flex: none; align-self: center; width: 0; height: 1px; margin-right: 0; background: currentColor; transition: width .4s cubic-bezier(.2, .7, .2, 1), margin-right .4s cubic-bezier(.2, .7, .2, 1); }
[data-toc-list] a:hover, [data-toc-list] a[aria-current] { color: var(--tacit--ink, #0A0A0A); }
[data-toc-list] a[aria-current]::before { width: 18px; margin-right: 10px; }
[data-toc][data-toc-empty="true"] { display: none; }               /* a post with no chapters has no pane */
@media (max-width: 991px) {
  /* narrow: the pane is a bar under the nav that opens */
  .post_rail:has([data-toc-empty="true"]) { display: none; }
  [data-toc-open="true"] .controls_toggle-icon { transform: rotate(180deg); }
  [data-toc-open="true"] .toc_list { display: block; overscroll-behavior: contain; animation: tacit-toc-in .3s cubic-bezier(.2, .7, .2, 1); }
  [data-toc-list] a { min-height: 44px; align-items: center; padding-block: 0; font-size: 15px; line-height: 1.3; }
  [data-toc-list] li + li { border-top: 1px solid var(--tacit--rule, #DEDEDC); }
}
@keyframes tacit-toc-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---- 6. Post: the Rich Text body. Element selectors only, so editors add no classes.
   Reading size and line height are on the Webflow class post_rich-text (20px, 18px on phones, 1.6). ---- */
.post_rich-text > * { margin-top: 1.15em; margin-bottom: 0; }
.post_rich-text > *:first-child { margin-top: 0; }
.post_rich-text p { text-wrap: pretty; }
/* the lead: the first paragraph of the body */
.post_rich-text > p:first-child { font-size: clamp(22px, 1.95vw, 26px); line-height: 1.36; letter-spacing: -.012em; }
.post_rich-text > p:first-child + p { margin-top: 1.4em; }
.post_rich-text h2 { margin-top: 2.1em; font-family: var(--font-family--heading, Archivo, "Arial Narrow", Arial, sans-serif); font-weight: var(--font-weight--display, 820); font-stretch: 62%; font-variation-settings: "wdth" 62; text-transform: uppercase; letter-spacing: var(--letter-spacing--display, -.004em); line-height: .94; font-size: clamp(29px, 2.9vw, 40px); text-wrap: balance; scroll-margin-top: 104px; outline: 0; }
.post_rich-text h2 + * { margin-top: .95em; }
.post_rich-text h3 { margin-top: 1.9em; font-size: clamp(20px, 1.6vw, 23px); font-weight: 500; line-height: 1.26; letter-spacing: -.012em; text-wrap: balance; }
.post_rich-text h3 + * { margin-top: .6em; }
.post_rich-text a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: var(--tacit--faint, #9C9C9A); transition: text-decoration-color .2s; }
.post_rich-text a:hover { text-decoration-color: currentColor; }
.post_rich-text strong, .post_rich-text b { font-weight: 600; }
.post_rich-text ul, .post_rich-text ol { padding-left: 1.5em; list-style: none; overflow: visible; }
.post_rich-text li { position: relative; margin-bottom: 0; }
.post_rich-text li + li { margin-top: .5em; }
.post_rich-text ul > li::before { content: ""; position: absolute; left: -1.3em; top: .72em; width: 5px; height: 5px; background: var(--tacit--ink, #0A0A0A); }
.post_rich-text ol { counter-reset: n; }
.post_rich-text ol > li { counter-increment: n; }
.post_rich-text ol > li::before { content: counter(n); position: absolute; left: -1.5em; top: .16em; font-size: .84em; color: var(--tacit--mute, #6B6B6B); font-variant-numeric: tabular-nums; }
/* pull quote: the Block Quote. Keep it to a sentence or two; it is set in capitals. */
.post_rich-text blockquote { margin: 1.9em 0 0; padding: .62em 0 .66em; border: 0 solid var(--tacit--rule, #DEDEDC); border-width: 1px 0; font-family: var(--font-family--heading, Archivo, "Arial Narrow", Arial, sans-serif); font-weight: var(--font-weight--display, 820); font-stretch: 62%; font-variation-settings: "wdth" 62; text-transform: uppercase; letter-spacing: var(--letter-spacing--display, -.004em); line-height: .94; font-size: clamp(33px, 4.4vw, 58px); text-wrap: balance; }
.post_rich-text blockquote + * { margin-top: 1.9em; }
/* figures. Webflow writes <figure class="w-richtext-figure-type-image w-richtext-align-center|fullwidth"><div><img></div><figcaption>.
   Both alignments fill the column here; "Full width" also steps out on wide screens (below). */
/* max-width is !important because Webflow writes the image's own width inline on the figure */
.post_rich-text figure, div.post_rich-text figure[class] { display: block; width: 100%; max-width: none !important; margin: 2.1em 0 0; }
.post_rich-text figure + * { margin-top: 2.1em; }
.post_rich-text figure > div, div.post_rich-text figure[class] > div { display: block; font-size: inherit; color: inherit; }
.post_rich-text figure img { display: block; width: 100%; height: auto; border-radius: var(--_sizes---border-radius--large, 22px); background: var(--tacit--wash, #F2F2F0); filter: saturate(.92) contrast(1.02); }
.post_rich-text figure.w-richtext-figure-type-video > div { border-radius: var(--_sizes---border-radius--large, 22px); overflow: hidden; background: var(--tacit--wash, #F2F2F0); }
.post_rich-text figcaption, div.post_rich-text figure[class] > figcaption { display: block; margin-top: 12px; font-size: 14px; line-height: 1.45; color: var(--tacit--mute, #6B6B6B); text-align: left; }
.post_rich-text sup { font-size: .64em; line-height: 0; vertical-align: super; font-variant-numeric: tabular-nums; }
.post_rich-text sup a { margin-left: .08em; padding: .5em .1em; text-decoration: none; color: var(--tacit--mute, #6B6B6B); }
.post_rich-text sup a:hover { color: var(--tacit--ink, #0A0A0A); }
.post_rich-text hr { height: 1px; border: 0; background: var(--tacit--rule, #DEDEDC); margin-top: 2.4em; }
.post_rich-text code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: .86em; }
.post_rich-text :not(pre) > code { padding: .12em .36em; border-radius: 6px; background: var(--tacit--wash, #F2F2F0); }
/* code block: a custom code embed in the body holding <pre><code> */
.post_rich-text .w-embed { margin-top: 1.6em; }
.post_rich-text .w-embed + * { margin-top: 1.6em; }
.post_rich-text pre { margin: 0; padding: 20px 22px; border-radius: 16px; background: var(--tacit--wash, #F2F2F0); font-size: 14.5px; line-height: 1.7; overflow-x: auto; white-space: pre; tab-size: 2; }
.post_rich-text pre code { font-size: 1em; }
/* table: a custom code embed in the body holding <div class="tbl"><table> */
.post_rich-text .tbl { overflow-x: auto; }
.post_rich-text table { width: 100%; min-width: 460px; border-collapse: collapse; font-size: 16px; line-height: 1.4; text-align: left; }
.post_rich-text th, .post_rich-text td { padding: 14px 20px 15px 0; vertical-align: top; border-bottom: 1px solid var(--tacit--rule, #DEDEDC); font-weight: 400; }
.post_rich-text thead th { padding-block: 0 10px; font-size: 14px; color: var(--tacit--mute, #6B6B6B); border-bottom-color: var(--tacit--ink, #0A0A0A); }
.post_rich-text tbody th { font-weight: 500; white-space: nowrap; }
.post_rich-text td:last-child, .post_rich-text th:last-child { padding-right: 0; }
/* the inline sign up, once journal-post.js has moved it into the body */
.post_rich-text .post_inline + * { margin-top: 2.4em; }
@media (max-width: 991px) {
  .post_rich-text h2, [data-footnotes] li { scroll-margin-top: 140px; }   /* nav, the chapter bar and a little air */
}
@media (min-width: 992px) {
  /* the pull quote is centred in the column */
  .post_rich-text blockquote { text-align: center; font-size: clamp(33px, 3.4vw, 46px); padding-inline: .4em; }
}
@media (min-width: 1360px) {
  /* a full width image steps out of the column on both sides */
  div.post_rich-text figure.w-richtext-align-fullwidth.w-richtext-figure-type-image { width: auto; margin-inline: -84px; }
  div.post_rich-text figure.w-richtext-align-fullwidth.w-richtext-figure-type-image > figcaption { text-align: center; }
}

/* ---- 7. Post: notes, share, author, previous and next ---- */
/* the notes are a second Rich Text (the Notes field): one numbered list. journal-post.js links each to its superscript and back. */
/* Webflow's clearfix pseudo elements on a Rich Text would become its baseline and push the list down beside its label */
[data-footnotes] .w-richtext::before, [data-footnotes] .w-richtext::after { content: none; }
[data-footnotes] ol { margin: 0; padding-left: 1.5em; list-style: none; counter-reset: n; overflow: visible; }
[data-footnotes] li { position: relative; margin-bottom: 0; counter-increment: n; scroll-margin-top: 104px; }
[data-footnotes] li + li { margin-top: 8px; }
[data-footnotes] li::before { content: counter(n); position: absolute; left: -1.5em; top: .1em; font-size: .86em; font-variant-numeric: tabular-nums; color: var(--tacit--ink, #0A0A0A); }
[data-footnotes] li:target { color: var(--tacit--ink, #0A0A0A); }
[data-footnotes] li a { margin-left: 6px; display: inline-flex; vertical-align: baseline; padding: 4px; color: var(--tacit--ink, #0A0A0A); }
[data-footnotes] li a svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
/* the share block follows the notes directly; without notes it takes their top margin */
.post_read + .post_aside { margin-top: clamp(2.75rem, 5vw, 4rem); }
.post_read:has([data-footnotes]:not([hidden])) + .post_aside { margin-top: 0; }
.post_share-link { background: linear-gradient(currentColor, currentColor) 0 calc(100% - 3px) / 0 1px no-repeat; transition: background-size .4s cubic-bezier(.2, .7, .2, 1); }
.post_share-link:hover { background-size: 100% 1px; }
.post-nav_title { padding-bottom: 2px; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .45s cubic-bezier(.2, .7, .2, 1); }
.post-nav_link:hover .post-nav_title { background-size: 100% 1px; }
