/* home.css: the map of the site. Shared parts live in assets/base.css.
   IDEA    a Bauhaus poster for a cabinet of small machines: the emblem, a metamorphosis strip,
           then one card per page, each with a live figure that carries that page's message
   PICTURE Borromean rings of circle, square, triangle (impossible as flat layers, Escher);
           circle → square → triangle → circle across the strip; the triangle tessellation below */

/* ---- header ---- */
.hgrid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:24px 48px;padding-block:30px 28px;align-items:start}
.trow{display:flex;gap:22px;align-items:center}
#emblem{flex:none;display:block;line-height:0}
.emb{width:118px;height:auto;display:block}
.tag{font-size:clamp(21px,2.2vw,27px);font-weight:500;line-height:1.2;margin:18px 0 0;letter-spacing:-.01em}
.lede{font-size:18px;max-width:34em;margin:14px 0 16px}
.mnote{margin:0;max-width:34em;font-size:16px;color:var(--mute)}
.side{border:3px solid var(--ink);padding:18px 20px;display:grid;gap:14px;box-shadow:8px 8px 0 var(--yellow)}
.quote{margin:0;border-left:8px solid var(--blue);padding:2px 0 2px 16px}
.quote p{font-size:clamp(21px,2vw,25px);font-weight:600;line-height:1.2;margin:0 0 6px;letter-spacing:-.01em}
.quote cite{font-style:normal;font-size:14px;color:var(--mute)}
.why{margin:0;font-size:16px}
.rules{list-style:none;margin:0;padding:12px 0 0;display:grid;gap:9px;border-top:2px solid var(--rule)}
.rules li{display:grid;grid-template-columns:18px minmax(0,1fr);gap:12px;align-items:start;font-size:15px;line-height:1.4}
.rules .g{margin-top:2px}

/* ---- metamorphosis strip ---- */
.meta{position:relative;height:92px;border-bottom:3px solid var(--ink)}
.meta svg{position:absolute;inset:0;width:100%;height:100%}
.meta text{font:14px var(--sans);fill:var(--mute)}

/* ---- the map: one card per page ---- */
#map h2{max-width:30em}
.deck{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,520px),1fr));gap:30px;margin-top:8px}
.card{border:3px solid var(--ink);display:grid;grid-template-rows:auto 1fr;background:var(--bg);transition:box-shadow .15s,transform .15s}
.card:hover{box-shadow:8px 8px 0 var(--acc);transform:translate(-2px,-2px)}
.thumb{margin:0;border-bottom:3px solid var(--ink);display:grid}
.tfig{padding:14px 14px 4px;border-bottom:2px solid var(--rule);display:grid;place-items:center;min-height:250px}
.tfig svg{display:block;width:100%;height:auto}
.tfig text{font:15px var(--sans);fill:var(--mute)}
.thumb figcaption{font-size:15px;color:var(--mute);padding:10px 14px 14px;line-height:1.45}
.thumb figcaption b{color:var(--ink)}
/* the staircase: primes (ink) and the curve built from zeros (red) */
.stair{max-width:620px}
.stair .gr{stroke:var(--rule)}.stair .ax{stroke:var(--ink);stroke-width:2}
.stair .dl{stroke:var(--mute);stroke-dasharray:4 4}
.stair .pt{stroke:var(--red);stroke-width:2}
.stair .psi{fill:none;stroke:var(--ink);stroke-width:2.4}
.stair .ef{fill:none;stroke:var(--red);stroke-width:2}
.stair .lb{font-weight:600;fill:var(--ink)}.stair .lb.r{fill:var(--red)}
/* attention, before and after: darker = more attention, checked = the future */
.atts{max-width:560px}
.atts text{font-size:13px}
.atts .gt{font-size:14px;font-weight:600;fill:var(--ink)}
.atts .c{fill:var(--ink);stroke:var(--rule);stroke-width:1}
.atts .mk{fill:url(#chk);stroke:var(--rule);stroke-width:1}
.atts .ck{fill:var(--rule)}
.atts .hl{fill:var(--yellow)}.atts .hlt{fill:#111;font-weight:600}
.atts .key{fill:none;stroke:var(--red);stroke-width:3}
/* each page's own emblem, beside its title, so you recognise it when you arrive */
.pmark{width:.9em;height:.9em;vertical-align:-.08em;margin-right:.32em;display:inline-block}
.cbody{padding:16px 18px 20px;display:flex;flex-direction:column;align-items:flex-start;gap:10px}
.cbody h3{font-size:clamp(26px,2.4vw,32px);letter-spacing:-.02em;line-height:1.05}
.cbody h3 a{text-decoration:none}
.cbody p{margin:0}
.msg{font-size:19px;font-weight:500;line-height:1.35;border-left:6px solid var(--acc);padding-left:12px}
.go{margin-top:auto}

/* chapter strip: the page's own overview, as deep links */
.route{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));border:2px solid var(--ink);width:100%;margin:4px 0 6px}
.route a{padding:8px 8px 9px;font-size:13px;line-height:1.2;text-decoration:none;border-right:1px solid var(--rule)}
.route a:last-child{border-right:0}
.route a b{display:block;font-size:22px;line-height:1;margin-bottom:3px}
.route a:hover{background:var(--ink);color:var(--bg)}

/* 2 × 2 map of the transformer page: model × mode */
.views{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) minmax(0,1fr);border:2px solid var(--ink);width:100%;margin:4px 0 6px;font-size:14px}
.views>*{padding:7px 10px;border-top:1px solid var(--rule)}
.views>:nth-child(-n+3){border-top:0}
.views .vh{font-weight:600;border-left:1px solid var(--rule)}
.views .vr{font-weight:500;color:var(--mute)}
.views a{text-decoration:none;border-left:1px solid var(--rule);font-weight:500}
.views a:hover{background:var(--ink);color:var(--bg)}

/* the empty slot: dashed, like a token that hasn't been written */
.card.next{grid-column:1/-1;border-style:dashed;border-color:var(--mute);display:flex;gap:22px;align-items:center;padding:16px 20px;grid-template-rows:none}
.card.next:hover{box-shadow:none;transform:none}
.card.next h3{font-size:24px;margin-bottom:4px}
.card.next p{margin:0;color:var(--mute);max-width:46em}
.qmark{flex:none;width:72px;height:72px;display:grid;place-items:center;border:2px dashed var(--mute);font-size:40px;font-weight:700;color:var(--mute)}

@media(max-width:900px){.hgrid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px){
 .emb{width:76px}.trow{gap:14px}
 .route{grid-template-columns:repeat(3,minmax(0,1fr))}
 .route a:nth-child(3){border-right:0}.route a:nth-child(-n+3){border-bottom:1px solid var(--rule)}
 .views{font-size:13px}.views>*{padding:6px 7px}
 .tfig{min-height:0;padding:10px 8px 2px}
 .stair text{font-size:24px}.stair .lb{font-size:21px}.stair .lb.r{transform:translateY(9px)}
 .atts text{font-size:16px}.atts .gt{font-size:18px}
 .card.next{flex-direction:column;align-items:flex-start}
}
