
/* Homepage layout */
.collection-home .opening { padding-block:clamp(34px,3.6vw,56px) 36px; }
.collection-home .intro h1 { font-size:clamp(57px,5.7vw,77px); }
.collection-home .intro p { max-width:51ch; font-size:clamp(16px,1.36vw,18px); margin-top:16px; }
.collection-home .reading { padding-left:clamp(20px,2.5vw,37px); }
.collection-home nav { gap:clamp(12px,2vw,27px); }
.experiments { border-top:1px solid var(--ink); padding-top:23px; }
.experiments>h2 { font:400 clamp(35px,3.2vw,46px)/1.05 var(--serif); letter-spacing:-.045em; margin-bottom:17px; }
.shelf { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0 clamp(12px,1.3vw,19px); }
.experiment-card {
  --accent:#944329; --tint:#f2ece1; grid-row:1; align-self:stretch;
  min-width:0; display:flex; flex-direction:column; color:var(--ink);
  background:#fffefa; border:1px solid #c9cdc3; border-radius:6px; overflow:hidden;
  text-decoration:none; text-align:left; position:relative;
  transition:box-shadow .16s ease, border-color .16s ease, transform .16s ease;
}
.experiment-card[data-experiment="density"] { --accent:#266479; --tint:#eaf0ef; }
.experiment-card[data-experiment="forces"] { --accent:#376656; --tint:#edf0e6; }
.experiment-card:hover,.experiment-card[aria-expanded="true"] { color:var(--ink); border-color:var(--accent); }
.experiment-card[aria-expanded="true"] { box-shadow:inset 0 -3px var(--accent); }
@media(hover:hover){.experiment-card:hover { box-shadow:0 3px 12px #1f393315; transform:translateY(-2px); }}
.experiment-card:focus-visible { outline-offset:3px; }
.card-figure { color:var(--ink); min-height:142px; height:clamp(142px,12vw,159px); overflow:hidden; background:var(--tint); border-bottom:1px solid #ced2c7; display:flex; align-items:center; }
.austen-art { display:grid; grid-template-columns:.95fr 1.05fr; gap:0; padding:12px 12px 12px 17px; }
.austen-art img { width:100%; max-height:100%; object-fit:contain; }
.card-quote { font:400 clamp(19px,1.76vw,26px)/1.04 var(--serif); letter-spacing:-.035em; }
.card-source { display:block; margin-top:8px; color:#843e28; font:600 11px/1.3 system-ui,sans-serif; }
.card-source::before { content:""; display:inline-block; width:6px; height:6px; border-radius:50%; background:#a45230; margin-right:4px; vertical-align:1px; }
.density-art { display:grid; grid-template-columns:1fr 1fr; padding:13px 9px; }
.fit { display:flex; flex-direction:column; align-items:center; justify-content:center; min-width:0; font:600 12px/1.2 system-ui,sans-serif; }
.fit+ .fit { border-left:1px solid #bdccc9; }
.fit img { display:block; width:100%; max-height:70px; object-fit:contain; margin:2px 0; }
.fit small { font:500 13px/1.15 var(--serif); color:#39545a; }
.card-body { padding:16px 17px 14px; display:flex; flex-direction:column; flex:1; }
.card-title { font:500 clamp(23px,2.15vw,29px)/1.08 var(--serif); letter-spacing:-.034em; }
.card-summary { margin:9px 0 15px; font:15px/1.48 system-ui,sans-serif; color:var(--body); }
.card-action { margin-top:auto; display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--accent); font:600 14px/1.2 system-ui,sans-serif; }
.toggle-mark { border:1px solid currentColor; border-radius:50%; height:24px; width:24px; display:grid; place-content:center; }
.toggle-mark::before,.toggle-mark::after { content:""; display:block; height:1.5px; width:10px; background:currentColor; grid-area:1/1; }
.toggle-mark::after { transform:rotate(90deg); transition:transform .18s ease; }
[aria-expanded="true"] .toggle-mark::after { transform:rotate(0deg); }
.reveal { grid-column:1/-1; grid-row:2; min-width:0; border-top:1px solid var(--line); margin-top:22px; padding:21px 0 0; }
.reveal[hidden],.exhibit-content[hidden],.load-state[hidden] { display:none; }
.reveal .feature,.reveal .mini { border:0; padding:0; margin:0; }
.reveal .feature h2,.reveal .mini h2 { font-size:clamp(28px,2.8vw,39px); }
.reveal .feature-intro { margin:0 0 15px; }
.reveal .feature-intro p,.reveal .dek { max-width:76ch; }
.reveal h2:focus { outline:0; }
.reveal .top-actions { display:flex; align-items:center; justify-content:space-between; gap:15px; margin-bottom:12px; }
.study-close { color:var(--link); background:transparent; border:1px solid #b7c3b9; border-radius:4px; padding:5px 9px; font:500 13px/1.3 system-ui,sans-serif; cursor:pointer; }
.study-close:hover { background:#eaf0e6; }
.study-close span { font:19px/12px system-ui,sans-serif; vertical-align:-1px; padding-left:3px; }
.reveal .source-link { color:var(--link); font:500 14px/1.4 system-ui,sans-serif; }
.back-row { margin:14px 0 0; }
.back-row a { font:500 14px/1.5 system-ui,sans-serif; }
.load-state { font:15px/1.6 system-ui,sans-serif; padding:22px; border:1px solid var(--line); background:#f5f6ef; }
.collection-home .software { margin-top:34px; }
@media(min-width:761px) and (max-width:920px) {
  .austen-art { padding:9px; }.card-body { padding:14px 12px; }
}
@media(max-width:760px){
  .collection-home .intro h1 {font-size:clamp(43px,8vw,60px);}
  .collection-home .opening {padding:32px 0 25px;}
  .collection-home .reading {padding-left:0;}
  .shelf {display:flex;flex-direction:column;gap:12px;}
  .experiment-card {display:grid;grid-template-columns:minmax(138px,.78fr) minmax(0,1.4fr);}
  .card-figure {border-bottom:0;border-right:1px solid #ced2c7;height:100%; min-height:145px;}
  .card-body {padding:15px;}.card-summary {margin:6px 0 12px;}
  .reveal {margin:2px 0 10px;padding-top:16px;}
  .card-quote {font-size:19px;}
  .collection-home nav {gap:12px;}
}
@media(max-width:540px){
  .collection-home .masthead {flex-wrap:wrap;justify-content:flex-start;gap:6px 17px;min-height:auto;padding:13px 0;}
  .collection-home nav {flex-wrap:wrap;gap:8px 15px;}
  .experiment-card {display:flex;}
  .card-figure {height:115px;min-height:115px;border-right:0;border-bottom:1px solid #ced2c7;}
  .austen-art {grid-template-columns:1fr .95fr;padding:5px 18px;}
  .austen-art img {height:105px;}
  .card-quote {font-size:23px;max-width:13ch;}
  .density-art {padding:5px 10px;}
  .fit img {max-height:53px;}
  .card-body {padding:14px 16px 12px;}
  .card-title {font-size:26px;}.card-summary {font-size:15px;}
}
@media(prefers-reduced-motion:reduce){.experiment-card,.toggle-mark::after {transition:none;} .experiment-card:hover {transform:none;}}
@media(prefers-reduced-motion:no-preference){.reveal.is-opening {animation:show-study .18s ease-out;} @keyframes show-study {from{opacity:.3;}to{opacity:1;}}}

.austen-art {grid-template-rows:minmax(0,1fr);align-content:center;}
.austen-art img {height:auto; min-width:0; max-height:126px; align-self:center;}
.compact-art-caption {display:none;}
@media (max-width:760px) {
  .experiment-card {display:grid; grid-template-columns:clamp(76px,24vw,110px) minmax(0,1fr);}
  .card-figure {height:100%;min-height:0;border:0;border-right:1px solid #ced2c7;}
  .card-body {padding:12px 12px 11px;}
  .card-title {font-size:clamp(21px,5.7vw,27px);}
  .card-summary {font-size:14px;line-height:1.45;margin:6px 0 9px;}
  .card-action {font-size:13px;}
  .toggle-mark {width:21px;height:21px;flex:none;}
  .austen-art {display:flex;flex-direction:column;justify-content:center;padding:5px;}
  .austen-art .card-quote {display:none;}
  .austen-art img {height:auto;width:100%;max-height:100px;}
  .compact-art-caption {display:block;text-align:center;color:#77412c;font:600 11px/1.3 system-ui,sans-serif;margin-top:7px;}
  .density-art {display:flex;flex-direction:column;justify-content:center;gap:7px;padding:6px;}
  .fit {width:100%;font-size:11px;line-height:1.3;}
  .fit+ .fit {border:0;border-top:1px solid #bdccc9;padding-top:5px;}
  .fit img {height:32px;width:100%;margin:0;}
  .fit small {display:none;}
}
.screen-reader {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;white-space:nowrap;clip-path:inset(50%);border:0;}

.crossover-art { flex-direction:column; justify-content:center; padding:10px 15px; }
.crossover-art img { width:100%; height:auto; max-height:105px; }
.crossover-caption { font:600 12px/1.3 system-ui,sans-serif; align-self:flex-start; }
.crossover-compact { display:none; }
.crossover-grid { display:grid; grid-template-columns:minmax(0,1.85fr) minmax(225px,1fr); }
.crossover-plot,.hybrid-result { padding:clamp(16px,2.2vw,27px); min-width:0; }
.crossover-plot h3 { font-size:clamp(21px,2vw,27px); }
.crossover-key { display:flex; flex-wrap:wrap; gap:16px; margin:9px 0 14px; font:14px/1.3 system-ui,sans-serif; }
.crossover-key span::before { content:""; display:inline-block; vertical-align:middle; width:22px; border-top:3px solid var(--teal); margin-right:6px; }
.crossover-key span+span::before { border-top:3px dashed #934021; }
#crossover-chart { width:100%; height:194px; display:block; cursor:crosshair; }
#crossover-chart text { fill:#475d55; font:12px system-ui,sans-serif; }
#crossover-chart .switch-label { fill:var(--ink); font-weight:600; }
#crossover-chart .gridline { stroke:#d9dfd6; }
#crossover-chart .scale-guide { stroke:#526760; }
#crossover-chart .switch-line { stroke:#71877a; stroke-dasharray:3 4; }
#crossover-chart .series { fill:none; stroke-width:2.5; stroke-linejoin:round; }
#crossover-chart .fft { stroke:var(--teal); }
#crossover-chart .tree { stroke:#934021; }
#crossover-chart .series.tree { stroke-dasharray:6 4; }
#crossover-chart .marker { fill:#fffefa; stroke-width:2.7; }
.scale-heading,.scale-ends { display:flex; justify-content:space-between; align-items:baseline; }
.scale-heading { border-top:1px solid var(--line); padding-top:12px; margin-top:8px; font:600 15px/1.3 system-ui,sans-serif; }
#scale-value { font-variant-numeric:tabular-nums; color:var(--ink); }
#layout-scale { width:calc(100% - 27px); display:block; margin:0 4px 0 23px; height:32px; accent-color:var(--teal); cursor:pointer; }
.scale-ends { color:var(--muted); font:13px/1.4 system-ui,sans-serif; }
.hybrid-result { border-left:1px solid var(--line); background:var(--wash); }
.hybrid-result h3 { margin:7px 0; font-size:clamp(30px,3vw,40px); }
#grid-reason { color:var(--body); font:15px/1.5 system-ui,sans-serif; max-width:29ch; }
.crossover-times { margin:20px 0; }
.crossover-times div { border-top:1px solid #cbd4c6; padding:8px 0; display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.crossover-times dt,.crossover-times dd { font:15px/1.4 system-ui,sans-serif; }
.crossover-times dd { color:var(--ink); font-weight:600; font-variant-numeric:tabular-nums; }
.exhibit #jump-switch { padding:5px 0; border:0; background:none; color:var(--link); text-align:left; text-decoration:underline; text-underline-offset:3px; font:600 14px/1.4 system-ui,sans-serif; }
.force-inspector { margin-top:17px; border-block:1px solid var(--line); }
.force-inspector>summary { padding:15px 2px; font:500 clamp(20px,2vw,25px)/1.22 var(--serif); cursor:pointer; }
.force-inspector[open] { padding-bottom:16px; }
.force-inspector[open]>summary { padding-bottom:0; }
@media(max-width:760px) {
  .crossover-art img,.crossover-caption { display:none; }
  .crossover-art { padding:4px; }
  .crossover-compact { display:block; text-align:center; color:#365d4d; font:500 clamp(15px,3.5vw,20px)/1.2 var(--serif); }
}
@media(max-width:650px) {
  .crossover-grid { grid-template-columns:1fr; }
  .hybrid-result { border-left:0; border-top:1px solid var(--line); }
  .hybrid-result h3 { font-size:28px; }
  #grid-reason { max-width:none; }
  .crossover-times { margin:12px 0 5px; }
}
