/* CrateEdit Pro: the blog. Loaded after booth.css on /blog/ pages only; every value comes from booth.css's tokens. */

/* ---------- the index ---------- */
/* the head: the page name, a lead under it, the topic keys in channel four */
.blog-head .lead { grid-column: 1 / span 2; margin-top: 20px; padding-inline: var(--in); background: var(--plate); background-clip: content-box; }
.blog-head .readout { grid-column: 3; grid-row: 2; align-self: end; padding-bottom: 4px; }
.blog-head .filter { grid-column: 4; grid-row: 1 / span 2; }

/* the posts: picture, title, a fine line (topic, kind, date, reading time), one sentence. No card: no fill, no border. */
.posts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 52px; padding-bottom: clamp(56px, 8vw, 112px); }
.post { padding-inline: var(--in); background: var(--plate); background-clip: content-box; }
.post .pic { display: block; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--hair-2); border-radius: 6px; background: #111; }
.post .pic img { width: 100%; height: 100%; object-fit: cover; }
.post h3 { margin-top: 16px; }
.post h3 a { text-decoration-color: var(--hair-2); }
.post h3 a:hover { text-decoration-color: currentColor; }
.post .fine { margin-top: 4px; }
.post .fine + p { margin-top: 6px; font-size: 0.97rem; line-height: 1.45; }
/* the newest post takes two channels and the claim's voice */
.post.first { grid-column: span 2; }
.post.first h3 { font-size: clamp(1.25rem, 2vw, 1.7rem); font-weight: 760; font-stretch: 122%; line-height: 1.15; letter-spacing: -0.012em; margin-top: 18px; }
.post.first .fine + p { font-size: 1.0625rem; line-height: 1.6; max-width: 34em; }
.posts .lg-row { grid-column: 1 / -1; padding-inline: var(--in); margin-bottom: -30px; color: var(--ink-2); }
/* a topic key is pressed: only that topic's posts stay; the newest-post layout is dropped so the grid stays even */
.posts[data-show] .lg-row { display: none; }
.posts[data-show="tech"] .post:not([data-topic="tech"]),
.posts[data-show="production"] .post:not([data-topic="production"]),
.posts[data-show="news"] .post:not([data-topic="news"]),
.posts[data-show="skills"] .post:not([data-topic="skills"]) { display: none; }
.posts[data-show] .post.first { grid-column: span 1; }
.posts[data-show] .post.first h3 { font-size: 1.14rem; font-weight: 680; font-stretch: 110%; line-height: 1.35; letter-spacing: 0; margin-top: 16px; }
.posts[data-show] .post.first .fine + p { font-size: 0.97rem; line-height: 1.45; }

/* ---------- an article ---------- */
/* the document of booth.css, with figures. A wide figure spans channels two to four and carries the plate ground. */
.post-doc .rail .readout { flex-direction: column; gap: 10px; }
.post-doc .rail .readout div { display: flex; justify-content: space-between; gap: 12px; }
.post-doc .rail .readout dd { text-align: right; }
/* the picture under the title: channels two to four, beside the index card; its gap to the opening paragraph lies inside it */
.post-doc .doc-body .hero { grid-column: 2 / span 3; padding-inline: var(--in); background: var(--plate); background-clip: content-box; }
.hero .shot img { width: 100%; }
.hero::after { content: ""; display: block; height: 28px; }
@media (min-width: 1101px) {
  .post-doc .doc-body .hero { grid-row: 1; }
  .post-doc .doc-body .rail { grid-row: 1 / span 3; }
  .post-doc .doc-lead { grid-row: 2; }
  .post-doc .doc-body .prose { grid-row: 3; }
}
@media (max-width: 1100px) { .post-doc .doc-body .hero { grid-column: 1 / -1; max-width: calc(37.5rem + 2 * var(--in)); } }
@media (max-width: 760px) { .post-doc .doc-body .hero { order: -2; } }
.prose > .fig { margin-top: 1.7em; margin-bottom: 0.4em; }
.prose > .fig + * { margin-top: 1.2em; }
.prose > .fig.wide { width: calc(150% + 20px); background: var(--plate); }
.fig figcaption { margin-top: 10px; font-size: 0.82rem; max-width: 75ch; }
.fig figcaption b { color: var(--ink); font-weight: 600; }
.prose > .marks.src li { font-size: 0.92rem; }

/* the spectrogram pair: two plots at their own aspect, a kHz scale at the left of each, the ceiling drawn by the page */
.sg-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.sg-name { display: flex; align-items: center; gap: 0; color: var(--ink); font-weight: 600; font-size: 0.92rem; margin-bottom: 8px; }
.sg-plot { position: relative; display: grid; grid-template-columns: 3.1em minmax(0, 1fr); }
.sg-plot .shot { grid-column: 2; position: relative; border-radius: 4px; box-shadow: none; }
.sg-plot .shot img { width: 100%; }
.khz { grid-column: 1; grid-row: 1; position: relative; }
.khz li { position: absolute; right: 8px; top: calc((1 - var(--f) / 22.05) * 100%); transform: translateY(-50%); color: var(--ink-3); font-size: 0.75rem; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; }
.ceil { position: absolute; left: 0; right: 0; top: calc((1 - var(--f) / 22.05) * 100%); height: 0; border-top: 2px dashed var(--ok); }
.ceil.poor { border-color: var(--poor); }
.ceil.below span { bottom: auto; top: 6px; }
.ceil span { position: absolute; right: 8px; bottom: 6px; padding: 1px 6px; border-radius: 3px; background: var(--plate); color: var(--ink); font-size: 0.78rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* a bar chart written as rows: the name, the bar on a kHz scale, the value and a lamp with its word */
.bars { font-size: 0.9rem; }
.bars .bars-group { padding: 18px 0 6px; color: var(--ink-2); }
.bars .bars-group:first-child { padding-top: 0; }
.bar-row { display: grid; grid-template-columns: minmax(0, 13.5em) minmax(0, 1fr) 4.6em 5.4em; align-items: center; column-gap: 12px; padding-block: 6px; border-top: 1px solid var(--hair); }
.bar-row .name { color: var(--ink); line-height: 1.3; }
.bar-track { position: relative; height: 12px; background: var(--plate-lo); border-radius: 2px; }
.bar-track .bar { position: absolute; left: 0; top: 0; bottom: 0; width: calc((var(--mid) - 16) / 6.05 * 100%); background: var(--lamp-off, #6b6b6b); border-radius: 2px 0 0 2px; }
.bar-track .span { position: absolute; top: 50%; height: 2px; margin-top: -1px; left: calc((var(--lo) - 16) / 6.05 * 100%); width: calc((var(--hi) - var(--lo)) / 6.05 * 100%); background: var(--ink); }
.bar-row[data-v="ok"] .bar { background: var(--ok); }
.bar-row[data-v="suspect"] .bar { background: var(--review); }
.bar-row[data-v="fake"] .bar { background: var(--poor); }
.bar-row .val { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.bar-row .v { color: var(--ink-2); white-space: nowrap; }
.bars-axis { display: grid; grid-template-columns: minmax(0, 13.5em) minmax(0, 1fr) 4.6em 5.4em; column-gap: 12px; padding-top: 6px; border-top: 1px solid var(--hair-2); }
.bars-axis ol { grid-column: 2; position: relative; height: 1.4em; }
.bars-axis li { position: absolute; left: calc((var(--f) - 16) / 6.05 * 100%); transform: translateX(-50%); color: var(--ink-3); font-size: 0.75rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bars-axis li:first-child { transform: none; }

/* a stacked bar: one row, segments in lamp colours, a legend of lamps with counts under it */
.stack { display: flex; height: 22px; border-radius: 3px; overflow: hidden; background: var(--plate-lo); }
.stack span { display: block; height: 100%; }
.stack .ok { background: var(--ok); } .stack .poor { background: var(--poor); } .stack .review { background: var(--review); }
.stack-legend { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px; color: var(--ink); font-size: 0.92rem; }
.stack-legend li { display: flex; align-items: center; }
.stack-legend .num { font-weight: 600; margin-right: 0.3em; }

@media (max-width: 1100px) {
  .blog-head .lead { grid-column: 1 / -1; }
  .blog-head .readout { grid-column: 1 / -1; grid-row: auto; margin-top: 18px; }
  .blog-head .filter { grid-column: 1 / span 2; grid-row: auto; margin-top: 26px; }
  .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post.first { grid-column: 1 / -1; }
  .prose > .fig.wide { width: 100%; }
}
@media (max-width: 760px) {
  .blog-head .filter { grid-column: 1 / -1; }
  .posts { grid-template-columns: minmax(0, 1fr); row-gap: 40px; }
  .posts[data-show] .post.first { grid-column: auto; }
  .sg-pair { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .bar-row, .bars-axis { grid-template-columns: minmax(0, 1fr) 4.4em 4.8em; row-gap: 4px; }
  .bar-row .name { grid-column: 1 / -1; }
  .bars-axis ol { grid-column: 1; }
  .bars-axis li:nth-child(even) { display: none; }
}

/* ---------- figures added for the photo round ---------- */
.fig .credit { margin-top: 3px; font-size: 0.75rem; color: var(--ink-3); }
.fig .credit a { color: var(--ink-2); }
.fig.photo .shot img { width: 100%; }
/* drawn strips stacked under a lamp and a label */
.strips { display: grid; gap: 14px; }
.strip-name { display: flex; align-items: center; color: var(--ink); font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.strips .shot { border-radius: 4px; box-shadow: none; }
.strips .shot img, .fig.diagram .shot img { width: 100%; }
/* a ruled table in the sheet's manner */
.tablewrap { overflow-x: auto; }
.sheet-t { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.sheet-t th, .sheet-t td { padding: 9px 12px 9px 0; text-align: left; vertical-align: top; border-top: 1px solid var(--hair); }
.sheet-t thead th { padding-top: 0; border-top: 0; border-bottom: 1px solid var(--hair-2); font-weight: 640; font-stretch: 70%; letter-spacing: 0.075em; text-transform: uppercase; color: var(--ink-3); font-size: 0.82rem; }
.sheet-t tbody th { color: var(--ink); font-weight: 600; }
.sheet-t td { color: var(--ink-2); }
.sheet-t th:last-child, .sheet-t td:last-child { padding-right: 0; }
.sheet-t tbody tr:first-child th, .sheet-t tbody tr:first-child td { border-top: 0; }
/* a timeline: years in tabular figures, a line each */
.timeline li { display: grid; grid-template-columns: 4.2em minmax(0, 1fr); column-gap: 14px; padding-block: 9px; border-top: 1px solid var(--hair); }
.timeline .y { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.timeline li:first-child { border-top: 0; }
/* a histogram written as columns: a bar per bin, its count over it, the bin under it */
.hist .cols { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); align-items: end; gap: 4px; height: 190px; border-bottom: 1px solid var(--hair-2); }
.hist .cols li { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.hist .cols .bar { display: block; height: calc(var(--n) / var(--top) * 150px); background: var(--ink-3); border-radius: 2px 2px 0 0; }
.hist .cols .med .bar { background: var(--ink); }
.hist .cols .c { position: absolute; left: 0; right: 0; bottom: calc(var(--n) / var(--top) * 150px + 4px); text-align: center; color: var(--ink); font-size: 0.78rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.hist .cols .x { position: absolute; left: 0; right: 0; top: calc(100% + 6px); text-align: center; color: var(--ink-3); font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.hist .axis-lab { margin-top: 30px; color: var(--ink-3); font-size: 0.82rem; }
@media (max-width: 760px) { .hist .cols li:nth-child(even) .x { display: none; } }
@media (max-width: 760px) { .sheet-t { font-size: 0.84rem; } .sheet-t th, .sheet-t td { padding-right: 8px; } .sheet-t thead th { letter-spacing: 0.04em; } }
/* settings written out as legend and value rows */
.settings { display: grid; gap: 0; max-width: 26rem; border: 1px solid var(--hair-2); border-radius: 6px; background: var(--plate-lo); padding: 4px 16px; }
.settings div { display: flex; justify-content: space-between; gap: 16px; padding-block: 10px; border-top: 1px solid var(--hair); }
.settings div:first-child { border-top: 0; }
.settings dd { color: var(--ink); font-weight: 600; text-align: right; }
/* the gain knob pair: the site's two Serato deck crops side by side, as on Home */
.knob-pair { display: flex; flex-wrap: wrap; gap: 20px 32px; }
.knob-pair .knob { margin-top: 0; }
.knob-pair .knob figcaption { margin-top: 8px; font-size: 0.9rem; }
