/* Shared typography and shell */
:root {
  --paper: #faf8f3; --white: #fffefa; --ink: #24251f; --muted: #585951;
  --line: #d5d1c8; --orange: #b83a0e; --lime: #ffe1cd; --radius: 12px;
  --max: 1240px;
  --pm-mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}
body {font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;}
:focus-visible {outline: 3px solid #9e3415; outline-offset: 3px;}
.pm-header {position: relative; z-index: 4; background: var(--paper);}
.pm-header .nav {min-height: 76px; gap: 20px;}
.pm-header .logo {display: inline-flex; gap: 0; align-items: center; font-size: 1.33rem; line-height: 1.2;}
.pm-header .logo .pm-symbol {
  width: 2.2rem; height: 2.2rem; margin-right: .65rem; background: #ed642f; color: #201e1b; display: grid; place-items: center;
  border-radius: 8px; font: bold 1.6rem/1 var(--pm-mono); letter-spacing: -.18em; padding-right: .19em;
}
.pm-header .logo {max-width:100%;min-width:0;}
.pm-header .logo .pm-word {min-width:0;margin:0;padding:0;background:transparent;color:var(--ink);white-space:normal;line-height:1.1;}
.pm-header .logo .pm-symbol {padding:0; flex-shrink:0;}
.pm-header .navlinks a {font-size: .96rem;}
.pm-header .navlinks [aria-current] {text-decoration: underline; text-underline-offset: 5px; color: var(--orange);}
.pm-header .navlinks .navstart {background: var(--ink); color: #fff; border-radius: .48rem; padding: .55rem 1.15rem;}
.pm-header .navlinks .navstart:hover {background: #493c32;}
main :is(input,textarea,select) {min-width: 0;}
main pre {max-width: 100%; overflow: auto; font-family: var(--pm-mono);}
main .btn, .consent .btn {border-radius: .48rem;}
main :is(h1,h2,h3), .pm-home p {text-wrap: pretty;}
main .article-body, main .prose {line-height: 1.72;}
main :where(.panel,.filterbox,.article-card,.p-card) {border-radius: var(--radius);}
main article :is(h2,h3) {scroll-margin-top: 1.5rem;}
main article :is(pre,output), main progress {font-variant-numeric: tabular-nums;}
.footer {border-top: 1px solid var(--line);}
.footer .footer-top:has(> div:only-child) {display: none;}
.footer .footer-bottom {margin-top: 0;}
#consent.consent {position: static; width: auto; max-width: var(--max); margin: 0 auto; box-shadow: none; border-radius: 0; border: 0; border-top: 1px solid var(--line); padding: 16px 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #f0ede5; color: var(--ink);}
#consent.consent p {margin: 0;}
#consent .consent-actions {margin: 0; flex-shrink: 0;}
.pm-sr {position:absolute;width:1px;height:1px;margin:-1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap;}
.pm-home {font-size: 1rem; line-height: 1.55;}
.pm-home h1,.pm-home h2,.pm-home h3 {color:var(--ink);font-weight:720;letter-spacing:-.048em;line-height:1.06;}
.pm-home a {text-underline-offset:.25em;}
.pm-hero {padding:clamp(2.2rem,4.5vw,4.7rem) 0;display:grid;grid-template-columns:.93fr 1fr;gap:clamp(2.2rem,6vw,6rem);align-items:center;}
.pm-intro h1 {font-size:clamp(3rem,5.5vw,5.65rem);line-height:1.02;margin:0 0 1.45rem;max-width:12ch;}
.pm-inkmark {display:inline-block;color:#ad370d;}
.pm-inkmark::before,.pm-inkmark::after {content:'‹';color:#da5724;font-weight:500;margin-right:.045em;}
.pm-inkmark::after {content:'›';margin-left:.045em;margin-right:0;}
.pm-intro p {color:var(--muted);max-width:34em;font-size:clamp(1rem,1.35vw,1.21rem);margin-bottom:1.6rem;line-height:1.5;}
.pm-actions {display:flex;gap:.65rem 1.1rem;align-items:center;flex-wrap:wrap;}
.pm-action,.pm-secondary {display:inline-flex;align-items:center;justify-content:center;min-height:46px;font-size:.97rem;font-weight:650;}
.pm-action {padding:.75rem 1.05rem;background:var(--ink);color:#fff;border-radius:.45rem;text-decoration:none;}
.pm-action:hover {background:#483d33;color:#fff;}
.pm-secondary {color:var(--ink);}
.pm-resume {display:inline-block;margin-top:1rem;font-weight:650;color:var(--orange);}
.pm-lab {border:1px solid #c7bfb1;border-radius:1rem;overflow:hidden;background:#fffefa;box-shadow:0 9px 24px -18px #6c6253;}
.pm-photo {background:#24231f;}
.pm-photo img {width:100%;height:auto;display:block;}
.pm-lab-body {padding:clamp(1rem,2vw,1.5rem);}
.pm-lab h2 {font-size:clamp(1.32rem,2.1vw,1.85rem);margin:0 0 .85rem;}
.pm-numbers {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);align-items:start;gap:1rem;}
.pm-numbers label,.pm-total > span {display:block;font-size:.88rem;color:var(--muted);font-weight:550;}
.pm-numbers input {display:block;background:var(--paper);border:1px solid #a9a399;border-radius:.38rem;padding:.31rem .6rem;width:100%;max-width:9.3rem;color:var(--ink);font:600 1.35rem/1.3 var(--pm-mono);margin-top:.24rem;height:2.7rem;}
.pm-total {text-align:right;}
.pm-total output {display:block;min-height:2.7rem;margin-top:.24rem;font:650 clamp(1.55rem,2.6vw,2.15rem)/1.3 var(--pm-mono);color:var(--ink);white-space:nowrap;letter-spacing:-.075em;font-variant-numeric:tabular-nums;}
.pm-math {font: .85rem/1.4 var(--pm-mono);color:var(--muted);margin:.7rem 0 0;text-align:right;min-height:1.4em;}
.pm-error {color:#9b2d10;margin:0;font-size:.96rem;}
.pm-error:not(:empty) {margin:.5rem 0;}
.pm-toggle {display:flex;gap:.65rem;align-items:center;margin:.75rem 0 .15rem;padding:.65rem 0;border-top:1px dashed #c8bcad;cursor:pointer;line-height:1.4;font-size:.94rem;}
.pm-toggle input {appearance:auto;accent-color:var(--orange);min-width:1.15rem;min-height:1.15rem;width:1.15rem;height:1.15rem;margin:0;padding:0;}
.pm-shortcuts {display:flex;align-items:center;flex-wrap:wrap;gap:.4rem .55rem;color:var(--muted);font-size:.86rem;}
.pm-shortcuts button,.pm-controls button {background:transparent;color:inherit;border:1px solid #bcb4a7;border-radius:.35rem;padding:.22rem .65rem;min-height:34px;font-size:.88rem;line-height:1.25;}
.pm-shortcuts button[aria-pressed="true"] {background:#ffe1c9;color:#772510;border-color:#b84b23;}
.pm-scene {background:#292923;color:#fff8eb;border-radius:1.1rem;padding:clamp(1.35rem,4vw,3.55rem);position:relative;}
.pm-scene h2,.pm-scene a,.pm-scene button {color:inherit;}
.pm-scene h2 {font-size:clamp(1.9rem,3.8vw,3.6rem);margin:0 0 .65rem;}
.pm-scene-top,.pm-section-head {display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;}
.pm-scene-top p {color:#d6d2c5;margin:0;}
.pm-controls {display:flex;align-items:center;gap:.85rem;flex-wrap:wrap;margin-top:.25rem;}
.pm-controls button,.pm-controls a {font-size:.9rem;}
.pm-board {margin:1.75rem 0 1rem;}
.pm-board > div {display:grid;grid-template-columns:1.3fr 1fr 1fr;align-items:center;gap:.75rem;padding:.65rem 0;border-bottom:1px solid #535348;}
.pm-board-head {font-size:.88rem;color:#e8e1cd;}
.pm-board-row [role=cell] {font:500 clamp(1.05rem,2vw,1.45rem)/1.3 var(--pm-mono);font-variant-numeric:tabular-nums;}
.pm-board .pm-board-total {border:0;}
.pm-board-total [role=cell] {font-size:clamp(1.32rem,2.7vw,2.45rem);}
.pm-shipping strong,.pm-board-total [role=cell]:last-child,.pm-explain span {color:#ffa478;}
.pm-explain {color:#eee8d9;margin:1.2rem 0 0;max-width:62ch;}
.pm-explain span {font-family:var(--pm-mono);font-weight:700;margin-right:.45rem;}
@keyframes pm-trace {0%{background:rgba(255,158,97,.22);transform:translateY(2px)}100%{background:transparent;transform:translateY(0)}}
@media(prefers-reduced-motion:no-preference) {
 .pm-tracing .pm-board-row,.pm-tracing .pm-explain {animation:pm-trace .72s;}
 .pm-tracing .pm-shipping {animation-delay:.6s;}
 .pm-tracing .pm-board-total {animation-delay:1.2s;}
 .pm-tracing .pm-explain {animation-delay:1.75s;}
}
.pm-section {margin:clamp(3rem,7vw,6rem) 0;}
.pm-section h2 {font-size:clamp(2rem,3.8vw,3.5rem);margin:0 0 1.4rem;}
.pm-section-head {align-items:baseline;}
.pm-section-head > a {white-space:nowrap;}
.pm-cards {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(.8rem,1.8vw,1.45rem);}
.pm-card {display:flex;flex-direction:column;border:1px solid var(--line);border-radius:.85rem;overflow:hidden;background:#fffefa;text-decoration:none;color:var(--ink);}
.pm-card:hover {border-color:#9e654b;color:var(--ink);}
.pm-cardtext {padding:clamp(1rem,2vw,1.5rem);display:flex;flex-direction:column;flex:1;}
.pm-cardtext h3 {font-size:clamp(1.28rem,2.1vw,1.82rem);margin:.5rem 0;}
.pm-cardtext p {font-size:1rem;color:var(--muted);line-height:1.45;margin:0 0 1.25rem;}
.pm-tech {color:#71523e;font:.84rem/1.45 var(--pm-mono);}
.pm-open {margin-top:auto;text-decoration:underline;text-underline-offset:.25em;font-size:.95rem;font-weight:600;}
.pm-art {display:flex;align-items:center;justify-content:center;position:relative;min-height:clamp(8rem,13vw,12rem);overflow:hidden;}
.pm-art-site {background:#e8b096;}
.pm-mocksite {position:relative;background:#fff7e7;width:68%;border:1px solid #803e28;border-radius:4px;padding:1.5rem .75rem .85rem;transform:rotate(-4deg);box-shadow:4px 5px 0 #a95938;}
.pm-mocksite i {position:absolute;top:0;left:0;right:0;height:.65rem;border-bottom:1px solid #a56e51;}
.pm-mocksite b {font:700 clamp(.95rem,1.7vw,1.35rem)/.95 Georgia,serif;color:#4f3429;display:block;width:74%;}
.pm-vase {position:absolute;bottom:12%;right:8%;height:49%;width:18%;border-radius:10% 10% 35% 35% / 35% 35% 60% 60%;background:#ab573c;}
.pm-art-calc {background:#e7e5d9;}
.pm-receipt {width:64%;padding:.7rem .9rem;border-radius:1px;background:#fffaf0;transform:rotate(4deg);box-shadow:2px 4px 7px #9285774d;color:#292923;font:.77rem/1.7 var(--pm-mono);}
.pm-receipt > * {display:flex;align-items:baseline;justify-content:space-between;gap:.5rem;}
.pm-receipt strong {border-top:1px dashed #827967;margin-top:.3rem;padding-top:.2rem;font-size:1.02rem;}
.pm-art-list {background:#353b35;flex-direction:column;}
.pm-array {display:flex;gap:.27rem;}
.pm-array span {background:#535950;color:#faf8ef;border:1px solid #7e8579;border-radius:4px;padding:.2rem .52rem;font:.91rem/1.4 var(--pm-mono);}
.pm-array.clean span {background:#f8d3b5;color:#4f2d1f;border-color:#f8d3b5;}
.pm-connector {height:1.2rem;border-left:1px solid #debd9c;}
.pm-route,.pm-help {display:grid;grid-template-columns:minmax(0,.88fr) minmax(0,1fr);gap:clamp(1.8rem,6vw,6rem);}
.pm-route {padding:clamp(1.3rem,3.7vw,3.3rem);border:1px solid #d5cabc;background:#f0ece2;border-radius:1rem;}
.pm-route p,.pm-further p {color:var(--muted);max-width:44ch;}
.pm-route-lines article+article {margin-top:1.4rem;padding-top:1.3rem;border-top:1px solid #cfc5b6;}
.pm-route-lines h3 {font-size:1.42rem;margin:0 0 .45rem;}
.pm-route-lines p {margin:0 0 .55rem;}
.pm-route-lines a,.pm-questions a,.pm-further a {font-weight:600;}
.pm-search label {display:block;color:var(--muted);margin:0 0 .4rem;}
.pm-search div {display:flex;}
.pm-search input {background:#fffefa;border:1px solid #a9a399;border-right:0;border-radius:.45rem 0 0 .45rem;padding:.6rem .7rem;width:100%;max-width:21rem;min-height:46px;}
.pm-search button {margin:0;background:var(--ink);color:white;border:0;border-radius:0 .45rem .45rem 0;padding:.5rem 1rem;}
.pm-questions a {display:block;padding:.85rem 0;border-bottom:1px solid var(--line);}
.pm-further {border-block:1px solid var(--line);padding:2rem 0;display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:2rem;margin-bottom:1rem;}
.pm-further h2 {font-size:clamp(1.7rem,2.6vw,2.65rem);margin:0;}
.pm-further p {margin:.4rem 0 0;}
.pm-meta {display:flex;flex-wrap:wrap;gap:.6rem 1.5rem;margin:1.3rem 0 2.4rem;color:var(--muted);font-size:.95rem;}
@media(max-width:850px){
 .pm-header .navlinks {gap:1rem;}
 .pm-hero {gap:1.6rem;}
 .pm-numbers {gap:.5rem;}
 .pm-scene-top {flex-wrap:wrap;}
}
@media(max-width:760px){
 .pm-header .nav {position:relative;flex-wrap:wrap;min-height:64px;gap:0;align-content:center;justify-content:space-between;}
 .pm-header .menu {display:block;min-height:40px;border-radius:.45rem;}
 .pm-header .navlinks {display:none;position:static;inset:auto;box-shadow:none;padding:.8rem .2rem;width:100%;border:0;flex-direction:row;flex-wrap:wrap;gap:.35rem 1rem;align-items:center;}
 .pm-header .navlinks.open {display:flex;}
 .pm-header .navlinks a {min-height:36px;display:inline-flex;align-items:center;}
 .pm-home.wrap {padding-inline:1.1rem;}
 .pm-hero {grid-template-columns:minmax(0,1fr);gap:1.35rem;padding:1.55rem 0 2rem;}
 .pm-intro h1 {font-size:clamp(2.6rem,9.5vw,4.2rem);line-height:1.02;max-width:17ch;margin:0 0 .8rem;}
 .pm-intro p {font-size:1rem;margin:0 0 .85rem;}
 .pm-photo img {height:clamp(80px,20vw,130px);object-fit:cover;}
 .pm-actions {gap:.35rem .85rem;}
 .pm-secondary,.pm-action {font-size:.9rem;}
 .pm-lab h2 {font-size:1.4rem;}
 .pm-total output {font-size:1.65rem;}
 .pm-cardtext {padding:1rem;}
 .pm-cards,.pm-route,.pm-help,.pm-further {grid-template-columns:1fr;}
 .pm-art {min-height:9rem;}
 .pm-mocksite,.pm-receipt {width:56%;max-width:13rem;}
 .pm-board > div {grid-template-columns:1fr 1fr 1fr;gap:.45rem;overflow-wrap:anywhere;}
 .pm-board-head {font-size:.82rem;}
 .pm-board [role=rowheader] {font-size:.92rem;}
 .pm-explain {font-size:.96rem;}
 .pm-further {gap:1.15rem;}
 .pm-section-head {align-items:flex-start;flex-wrap:wrap;gap:.2rem;margin-bottom:1rem;}
 .pm-section-head h2 {margin-bottom:.2rem;}
 #consent.consent {display:block;padding:1rem;}
 #consent .consent-actions {margin-top:.6rem;flex-wrap:wrap;}
}
@media(prefers-reduced-motion:reduce){
 *,*::before,*::after {scroll-behavior:auto!important;animation-duration:.001ms!important;transition-duration:.001ms!important;}
}
/* Carry the workshop paper / ink palette into reading and exercise pages. */
main:not(.pm-home) .notice {background:#f0ece2;border-left:3px solid #bd6947;border-radius:.3rem .65rem .65rem .3rem;}
main:not(.pm-home) .page-top h1 {hyphens:manual;text-wrap:balance;}
main:not(.pm-home) .page-top {padding:clamp(1.55rem,3.3vw,3.2rem) 0 clamp(1.25rem,2vw,1.75rem);}
main:not(.pm-home) .page-top .lead:last-child {margin-bottom:0;}
.pm-controls :focus-visible {outline-color:#ffac80;}
@media (max-width:760px) {
  .pm-header .navlinks a {font-size:.95rem;}
  .pm-home .pm-receipt {font-size:.86rem;}
}
.pm-home :is(h1,h2,h3,p,label), .pm-questions a {overflow-wrap:anywhere;hyphens:auto;}
.pm-scene-top > div,.pm-help > div,.pm-route > div {min-width:0;}
.pm-numbers {display:flex;flex-wrap:wrap;}
.pm-numbers label,.pm-total {flex:1 1 7rem;min-width:0;}
.pm-total output {white-space:normal;overflow-wrap:anywhere;line-height:1.25;}
@media(max-width:760px) {
  .pm-home.wrap {padding-inline:clamp(16px,4.5vw,22px);}
  .pm-art :is(.pm-receipt,.pm-array,.pm-mocksite) {font-size:14px;}
  .pm-mocksite b {font-size:clamp(16px,4vw,24px);}
  .pm-receipt strong,.pm-array span {font-size:15px;}
}
