/* Extra blocks for the website-design guides: before/after panels and the small
   illustrated mock-ups. Loaded after guide.css on those pages only. No web fonts
   beyond Geist: the serif in the mock-ups is the system serif stack. */
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px 6px; margin: 20px 0 8px; font-size: 15px; }
.toc p { margin: 0 0 4px; font-weight: 650; }
.toc ol { margin: 0 0 8px; columns: 2; column-gap: 28px; }
.toc li { margin: 3px 0; break-inside: avoid; }
h2[id], h3[id] { scroll-margin-top: 16px; }
/* Keep running text near 70 characters a line; tables, code and panels keep the full column. */
main p, main li { max-width: 62ch; }
main td { max-width: 46ch; }

.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 18px; }
.ba > figure, .ba > div { margin: 0; min-width: 0; }
.ba figcaption, .ba .tag { display: inline-block; font-size: 13px; font-weight: 650; margin: 0 0 6px; padding: 2px 8px; border-radius: 6px; }
.ba .is-before figcaption, .ba .is-before .tag { background: #f6e7e4; color: #8a2a17; }
.ba .is-after figcaption, .ba .is-after .tag { background: var(--tint); color: #075c38; }
.ba pre { margin: 0; height: calc(100% - 30px); white-space: pre-wrap; word-break: break-word; }
/* Code pairs stack, so each line keeps its shape instead of wrapping in a half-width column. */
.ba:has(pre) { grid-template-columns: 1fr; gap: 6px; }
.ba:has(pre) pre { height: auto; white-space: pre; word-break: normal; }
.ba:has(pre) .is-after { margin-top: 4px; }
.ba p.say { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 15px; height: calc(100% - 30px); }

/* Illustrated hero mock-ups. Purely visual: the caption under them says what they show. */
.mock { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; font-size: 13px; line-height: 1.4; }
.mock .bar { display: flex; gap: 5px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #f3f2ee; }
.mock .bar i { width: 8px; height: 8px; border-radius: 50%; background: #cfccc3; }
.mock .url { margin-left: 8px; font: 11px/8px ui-monospace, Menlo, Consolas, monospace; color: var(--muted); }

.mock--slop .hero { background: linear-gradient(135deg, #4338ca, #7c3aed); color: #fff; text-align: center; padding: 22px 16px 18px; }
.mock--slop .eyebrow { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 650; opacity: 0.95; }
.mock--slop .h { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; margin: 8px 0 6px; line-height: 1.15; }
.mock--slop .h span { color: #fde68a; }
.mock--slop .sub { font-size: 12px; margin: 0 0 12px; }
.mock--slop .btns { display: flex; gap: 6px; justify-content: center; }
.mock--slop .btns span { border-radius: 999px; padding: 5px 11px; font-size: 11px; font-weight: 650; background: #fff; color: #3730a3; }
.mock--slop .btns span + span { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.8); }
.mock--slop .cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; background: #f5f3ff; }
.mock--slop .cards div { background: #fff; border-radius: 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); padding: 10px 6px; text-align: center; font-size: 11px; color: #312e81; }
.mock--slop .cards b { display: block; font-size: 16px; margin-bottom: 2px; }

.mock--real { --rye: #6b3f14; color: #1d1b16; }
.mock--real .hero { padding: 18px 16px 14px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; align-items: end; }
.mock--real .h { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; font-size: 22px; line-height: 1.12; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }
.mock--real .sub { font-size: 12px; color: #4a463e; margin: 0 0 10px; }
.mock--real .btn { display: inline-block; background: var(--rye); color: #fff; font-size: 11px; font-weight: 650; border-radius: 6px; padding: 6px 10px; }
.mock--real .menu { border-top: 2px solid var(--rye); font-size: 11px; }
.mock--real .menu div { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid #e7e3da; font-variant-numeric: tabular-nums; }
.mock--real .strip { display: flex; justify-content: space-between; gap: 8px; padding: 8px 16px; border-top: 1px solid #e7e3da; font-size: 11px; color: #4a463e; background: #fbfaf7; }
.mock-note { color: var(--muted); font-size: 13px; margin: 6px 0 0; }

.skill-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 14px 0; }
.skill { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.skill h3 { margin: 0 0 2px; }
.skill .by { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.skill pre { margin: 8px 0; }
.skill p:last-child { margin-bottom: 0; }
.skill p code, td code { overflow-wrap: anywhere; }

.checklist { list-style: none; padding-left: 0; }
.checklist li { padding-left: 28px; position: relative; }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 0.42em; width: 12px; height: 12px; border: 1.5px solid var(--green); border-radius: 3px; }

@media (max-width: 640px) {
  .ba { grid-template-columns: 1fr; }
  .ba pre, .ba p.say { height: auto; }
  .ba:has(pre) pre { white-space: pre-wrap; word-break: break-word; }
  main pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  .skill { padding: 12px; }
  .toc ol { columns: 1; }
  .mock--real .hero { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
