/* Project 01 demonstration — slide layout after the Rosa demo; tokens from ../style.css */
:root { --a: #9a7b2c; --ok: #3d7a4a; --warn: #b5651d; --bad: #a63d40; --soft: #f1efe9; --card: #ffffff; }

body.slides { background: var(--ink); color: var(--cream); font-size: 17px; line-height: 1.55; }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 20; background: var(--cream); color: #fff; padding: .5rem .8rem; border-radius: 6px; border: 0; }
.skip:focus { left: .5rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
a { border-bottom: 0; text-decoration: underline; text-decoration-color: rgba(58,110,165,.35); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--cyan); }

/* fixed chrome */
.crumbs { position: fixed; top: 12px; left: 14px; z-index: 6; display: flex; align-items: center; gap: .45rem; background: var(--card); border: 1px solid var(--rule); border-radius: 999px; padding: 4px 12px 4px 5px; font-size: 13.5px; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--cream); }
.crumbs .brand { display: flex; align-items: center; gap: .45rem; color: var(--cream); font-weight: 600; }
.crumbs .mark { width: 24px; height: 24px; font-size: 11px; }
.crumbs .sep { color: var(--rule); } .crumbs .here { color: var(--cream); }
.dots { position: fixed; right: 14px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 9px; z-index: 5; }
.dots a { width: 9px; height: 9px; border-radius: 50%; background: var(--rule); display: block; border: 1px solid transparent; text-decoration: none; }
.dots a:hover { background: var(--muted); }
.dots a.on { background: var(--cyan); }
.pager { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 6px; z-index: 5; background: var(--card); border: 1px solid var(--rule); border-radius: 999px; padding: 5px; box-shadow: 0 2px 10px rgba(36,41,46,.06); }
.pager button { font: inherit; border: none; background: transparent; color: var(--cream); padding: 6px 13px; border-radius: 999px; cursor: pointer; font-size: 15px; }
.pager button:hover:not(:disabled) { background: var(--soft); }
.pager button:disabled { color: #c9c5bc; cursor: default; }
.pager span { align-self: center; font-size: 13.5px; color: var(--muted); padding: 0 6px; min-width: 60px; text-align: center; }
.no-js .pager, .no-js .dots { display: none; }

/* slides */
.slide { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 72px 16px 84px; border-bottom: 0; }
.inner { width: 100%; max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: center; }
.inner > * { min-width: 0; }
.slide .k { color: var(--muted); font-size: 13.5px; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 8px; font-family: var(--sans); display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.slide h1 { font-size: 40px; line-height: 1.1; margin: 0 0 14px; font-weight: 650; letter-spacing: -.02em; }
.slide h2 { font-size: 30px; line-height: 1.15; margin: 0 0 12px; font-weight: 650; letter-spacing: -.015em; }
.slide p { margin: 0 0 12px; max-width: 48ch; color: var(--cream-2); }
.slide p b { color: var(--cream); }
.muted, .slide p.muted { color: var(--muted); font-size: 15.5px; }
.small, .slide p.small { font-size: 13.5px; color: var(--muted); margin: 8px 0 0; }
b.g { color: var(--g); } b.d { color: var(--d); }
code { font-family: var(--code); font-size: .86em; background: var(--soft); padding: 0 .3em; border-radius: 4px; color: var(--cream); }

.tags { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 14px; }
.tag { display: inline-block; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid; line-height: 1.5; white-space: nowrap; font-family: var(--sans); }
.tag.doc { color: var(--cream); border-color: #c9c5bc; background: var(--card); }
.tag.rec { color: var(--c); border-color: rgba(122,106,155,.5); background: rgba(122,106,155,.06); }
.tag.syn { color: var(--cyan); border-color: rgba(58,110,165,.5); background: rgba(58,110,165,.06); }
.tag.plan { color: var(--muted); border-color: #b9b5ad; border-style: dashed; }

.recon { background: rgba(122,106,155,.07); border-left: 4px solid var(--c); border-radius: 10px; padding: 12px 16px; margin: 16px 0 14px; max-width: 48ch; }
.recon p { font-size: 15px; margin: 0; }
.recon .h, .label .h, .ba .h, label.h { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 6px; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.recon .h { color: var(--c); }

.vis { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; justify-content: center; }
.vis svg { width: 100%; height: auto; display: block; max-height: 380px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.label { background: var(--soft); border-radius: 10px; padding: 14px 16px; font-size: 15px; line-height: 1.5; }
.label ul { margin: 0; padding-left: 18px; } .label li { margin: 0 0 5px; }
.label dl { margin: 0; display: grid; gap: 2px 0; }
.label dt { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 8px; }
.label dt:first-child { margin-top: 0; } .label dt.rej { color: var(--warn); }
.label dd { margin: 0; }
.label p { font-size: 15px; margin: 0; max-width: none; }
.legend ul { list-style: none; padding: 0; display: grid; gap: 12px; }
.legend li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 10px; align-items: baseline; }

details.more { margin-top: 10px; max-width: 48ch; border-top: 1px solid var(--rule); padding-top: 10px; }
details.more summary { cursor: pointer; color: var(--cyan); font-size: 15px; }
details.more dl { margin: 10px 0 0; font-size: 15px; }
details.more dt { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 10px; }
details.more dd { margin: 2px 0 0; color: var(--cream-2); }
details.more p { font-size: 15px; margin-top: 10px; }

/* reconstructed exchange */
.convo { margin: 0; border: 1px dashed rgba(122,106,155,.45); border-radius: 12px; background: var(--card); }
.convo figcaption { padding: 8px 14px; border-bottom: 1px dashed rgba(122,106,155,.35); font-size: 13px; color: var(--muted); display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.convo ol { list-style: none; padding: 10px 14px 12px; margin: 0; display: grid; gap: 8px; }
.convo li { display: grid; grid-template-columns: 7.2rem 1fr; gap: 10px; align-items: baseline; font-size: 15px; }
.convo .who { font-size: 13px; font-weight: 600; }
.convo .msg { color: var(--cream); }
.convo .g .who { color: var(--g); } .convo .d .who { color: var(--d); } .convo .a .who { color: var(--a); } .convo .h .who { color: var(--human); }

.access { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.access td { padding: 5px 10px 5px 0; border-bottom: 1px solid var(--rule); }
.access tr:last-child td { border-bottom: 0; }
.yes { color: var(--ok); } .no { color: var(--muted); }

/* buttons, Rosa style */
.row { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.slide button, .pill { font: inherit; cursor: pointer; border-radius: 999px; border: 1px solid var(--rule); background: var(--card); color: var(--cream); padding: 7px 14px; font-size: 15px; text-decoration: none; display: inline-block; }
.slide button:hover, .pill:hover { border-color: var(--muted); }
.slide button[aria-pressed="true"], .slide button.primary, .pill.primary { background: var(--cyan); color: #fff; border-color: var(--cyan); }
.slide button.primary:hover, .pill.primary:hover { background: #2f5c8c; }
.js .pr[hidden], .js .cd[hidden], .js .md[hidden] { display: none; }
.no-js .pr + .pr, .no-js .cd + .cd { margin-top: 12px; }

/* before / after */
.ba { display: grid; gap: 0; border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; background: var(--card); }
.ba > div { padding: 14px 18px; }
.ba .before { background: var(--soft); }
.ba .before .was { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(166,61,64,.55); margin: 0; }
.ba .after .h { color: var(--cyan); }
.ba ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15.5px; color: var(--cream); }
.ba ol li::marker { color: var(--cyan); }

/* check */
.slide select { width: 100%; max-width: 30rem; font: inherit; font-size: 15px; color: var(--cream); background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 8px 10px; }
.slide .fx-note { font-size: 15px; margin: 10px 0 12px; }
.params { width: 100%; max-width: 30rem; border-collapse: collapse; font-family: var(--code); font-size: 13.5px; background: var(--card); }
.params th, .params td { padding: 4px 10px; border-bottom: 1px solid var(--rule); text-align: left; }
.params th { color: var(--muted); font-family: var(--sans); font-weight: 400; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.params td.v { text-align: right; color: var(--cream); }
.params td.kind { color: var(--muted); }
#run { margin-top: 14px; }
.lab-out { min-height: 14rem; }
.placeholder { color: var(--muted); background: var(--soft); border-radius: 10px; padding: 14px 16px; }
.res { display: grid; gap: 10px; }
.res-card { border: 1px solid var(--rule); border-radius: 12px; padding: 10px 14px; background: var(--card); }
.res-card h4 { font-size: 15px; font-weight: 600; color: var(--cream); display: flex; justify-content: space-between; gap: .8rem; flex-wrap: wrap; align-items: baseline; margin: 0; font-family: var(--sans); }
.res-card .gist { font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.res-card .vals { font-family: var(--code); font-size: 12.5px; color: var(--cream-2); margin-top: 6px; display: grid; gap: 1px; }
.res-card .vals span { color: var(--muted); }
.res-card .steps-run { font-size: 13px; color: var(--muted); margin: 6px 0 0; padding-left: 18px; }
.res-card .why { font-size: 14px; margin: 6px 0 0; color: var(--cream); }
.out { font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; padding: 2px 9px; border-radius: 999px; white-space: nowrap; color: #fff; font-weight: 600; }
.out.correct, .out.caught { background: var(--ok); }
.out.stopped { background: var(--cyan); }
.out.false-alarm, .out.missed, .out.silent { background: var(--warn); }
.out.lucky { background: var(--a); }
.tablevis { padding: 12px; }
.tablevis .scroll { overflow-x: auto; }
.matrix { border-collapse: collapse; font-size: 13.5px; min-width: 30rem; width: 100%; }
.matrix th, .matrix td { padding: 7px 8px 7px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.matrix th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 400; }
.matrix th[scope="row"] { text-transform: none; letter-spacing: 0; font-size: 13.5px; color: var(--cream-2); }
.dl ul { list-style: none; padding: 0; } .dl li { font-size: 14px; color: var(--muted); }
.dl a { font-family: var(--code); margin-right: .4rem; }
.readers li { margin-bottom: 10px; }

/* layers & columns (Rosa) */
.layers { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.layer { background: var(--soft); border-radius: 10px; padding: 10px 14px 11px; font-size: 15px; display: grid; gap: 3px; border-left: 4px solid var(--cyan); }
.layer:nth-child(2) { border-left-color: var(--c); } .layer:nth-child(3) { border-left-color: var(--d); }
.layer.no { border-left-color: var(--warn); }
.layer b { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 500; }
.cols3 { display: grid; gap: 10px; }
.cols3 div { background: var(--soft); border-radius: 10px; padding: 12px 14px; font-size: 15px; }
.cols3 b { display: block; font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; font-weight: 500; }
.links { margin-top: 18px; }
.foot { text-align: center; color: var(--muted); font-size: 14px; padding: 0 16px 90px; }
.foot a { color: var(--muted); }

/* illustrations */
.ln { stroke: var(--cream); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ln.dash { stroke-dasharray: 5 6; }
.lt { stroke: var(--rule); fill: none; stroke-width: 2; }
.tx { fill: var(--cream-2); font-size: 13px; font-family: var(--sans); }
.tm { fill: var(--muted); font-size: 12px; font-family: var(--sans); }
.tb { fill: var(--cream); font-size: 13px; font-weight: 600; font-family: var(--sans); }
.hum { fill: var(--human); } .agG { fill: var(--g); } .agD { fill: var(--d); } .agA { fill: var(--a); } .agV { fill: var(--k); } .agN { fill: #a9a59c; }
.icon { color: var(--cream); }
.badline { stroke: var(--bad); } .okt { fill: var(--ok); } .badt { fill: var(--bad); }
.js .draw { stroke-dasharray: 400; stroke-dashoffset: 400; }
.js .draw.dash { stroke-dasharray: 5 6; stroke-dashoffset: 0; opacity: 0; }
.js .pop { opacity: 0; }
.in .draw { animation: draw .9s ease forwards; }
.in .draw.dash { animation: fadein .6s ease forwards; }
.in .pop { animation: fadein .35s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
.in .d1 { animation-delay: .15s; } .in .d2 { animation-delay: .35s; } .in .d3 { animation-delay: .55s; } .in .d4 { animation-delay: .8s; } .in .d5 { animation-delay: 1.05s; }

@media (max-width: 760px) {
  .inner { grid-template-columns: 1fr; gap: 18px; }
  .slide { padding: 64px 16px 76px; min-height: auto; }
  .slide h1 { font-size: 30px; } .slide h2 { font-size: 24px; }
  .dots { display: none; }
  .crumbs { top: 8px; left: 8px; font-size: 12.5px; }
  .crumbs .sep, .crumbs .here, .crumbs a:not(.brand) { display: none; }
  .legend li, .convo li { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .draw, .js .pop { opacity: 1 !important; stroke-dashoffset: 0 !important; animation: none !important; }
}

/* summary slide: wider table side, wrapping badges */
#s13 .inner { grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); }
.matrix { min-width: 0; }
.matrix th[scope="row"] { min-width: 8.5rem; padding-right: 12px; }
.matrix .out { white-space: normal; display: inline-block; line-height: 1.3; padding: 3px 8px; }
@media (max-width: 760px) { #s13 .inner { grid-template-columns: 1fr; } .matrix { min-width: 30rem; } }
