/* Tessera data archive. Same tiles-on-grout look as tessera-simulations.github.io. */
:root {
  --grout: #f3f5f8;
  --paper: #ffffff;
  --ink: #0f1e38;
  --cobalt: #1e49c9;
  --sky: #3fa9e6;
  --deep: #0a2a7a;
  --night: #061128;
  --muted: #5d6b83;
  --line: #d6dce7;
  --wash: #e6edff;
  --tile-r: 6px;
  --display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --wrap: 1120px;
  --gutter: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--grout); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cobalt); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--deep); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 0.4em; font-weight: 600; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
code, pre { font-family: var(--mono); }
code { font-size: 0.88em; background: #e9edf4; padding: 1px 5px; border-radius: 3px; overflow-wrap: anywhere; }
pre { background: var(--night); color: #dfe7f5; padding: 14px 16px; border-radius: var(--tile-r); overflow: auto; font-size: 0.84rem; line-height: 1.55; margin: 0 0 1em; }
pre code { background: none; padding: 0; color: inherit; font-size: inherit; overflow-wrap: normal; }

/* header */
.site-head { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--muted); font-family: var(--display); font-weight: 600; font-size: 0.95rem; }
.brand img { width: 150px; }
.brand span { padding-left: 12px; border-left: 1px solid var(--line); }
.site-nav { display: flex; gap: 2px; overflow-x: auto; max-width: 100%; }
.site-nav a { font-family: var(--display); font-weight: 600; font-size: 0.96rem; color: var(--ink); text-decoration: none; padding: 8px 11px; border-radius: 4px; border-bottom: 3px solid transparent; white-space: nowrap; }
.site-nav a:hover { background: var(--grout); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--cobalt); color: var(--cobalt); }
.site-nav a.ext::after { content: " ↗"; font-size: 0.8em; color: var(--muted); }
.site-nav .login { margin-left: 8px; align-self: center; font-family: var(--display); font-weight: 600; font-size: 0.92rem; white-space: nowrap; }
.site-nav a.login { padding: 5px 12px; border: 1.5px solid var(--cobalt); color: var(--cobalt); }
.site-nav a.login:hover { background: var(--wash); }
.site-nav .login.is-on { color: var(--muted); padding: 5px 4px; cursor: default; }
@media (max-width: 760px) { .bar { padding: 8px 0 0; } .brand span { display: none; } .site-nav { margin: 0 -10px; } }

/* page */
.page { padding: 40px 0 8px; }
.page h1 { margin-bottom: 20px; }

/* buttons */
.cat-btn { font: inherit; font-family: var(--display); font-weight: 600; font-size: 0.92rem; padding: 7px 14px; border-radius: 4px; border: 1.5px solid var(--cobalt); background: #fff; color: var(--cobalt); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.cat-btn:hover { background: var(--wash); color: var(--cobalt); }
.cat-btn.primary { background: var(--cobalt); color: #fff; }
.cat-btn.primary:hover { background: var(--deep); }
.cat-btn:disabled { opacity: 0.45; cursor: default; }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 28px; }
@media (max-width: 760px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile { background: var(--cobalt); color: #fff; border-radius: 3px; padding: 16px 16px 12px; min-height: 108px; display: flex; flex-direction: column; justify-content: flex-end; }
.tile:nth-child(2) { background: var(--deep); }
.tile:nth-child(3) { background: var(--sky); color: var(--night); }
.tile:nth-child(4) { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.tile .num { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1; letter-spacing: -0.02em; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.tile .lab { font-size: 0.86rem; line-height: 1.3; opacity: 0.92; }

/* ---------- run table (every design point, with downloads for the runs in the archive) ---------- */
.lede { max-width: 50em; color: var(--muted); margin: -6px 0 24px; }
.archive { padding: 4px 0 8px; font-size: 0.95rem; }
.archive .muted { color: var(--muted); }
.cat-query { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--paper); border: 1px solid var(--line); border-radius: var(--tile-r); padding: 10px 12px; }
.cat-query label { font-family: var(--display); font-weight: 600; }
.cat-query input[type=text] { flex: 1 1 280px; min-width: 0; font: inherit; font-family: var(--mono); font-size: 0.9rem; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: #fff; }
.cat-query select, .cat-controls select, .cat-controls input { font: inherit; font-size: 0.92rem; padding: 7px 8px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); max-width: 100%; }
.cat-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.cat-chips .sep { margin-left: 10px; }
.cat-chip { font: inherit; font-size: 0.86rem; padding: 4px 10px 4px 8px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.cat-chip small { color: var(--muted); }
.cat-chip[aria-pressed="true"] { border-color: var(--cobalt); background: var(--wash); color: var(--deep); }
.cat-chip i, .cat-status i, .cat-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex: 0 0 auto; }
.cat-chip i.online { background: var(--cobalt); border-radius: 50%; }
.cat-status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cat-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0 12px; }
.cat-toolbar .spacer { flex: 1; }
.cat-count { font-family: var(--display); font-weight: 600; }
.cat-error { color: #a4231c; font-size: 0.9rem; }
.cat-cols { position: relative; }
.cat-cols summary { list-style: none; cursor: pointer; font-family: var(--display); font-weight: 600; font-size: 0.92rem; padding: 7px 14px; border-radius: 4px; border: 1.5px solid var(--cobalt); color: var(--cobalt); background: #fff; }
.cat-cols summary::-webkit-details-marker { display: none; }
.cat-cols[open] summary { background: var(--wash); }
.cat-cols-grid { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; background: var(--paper); border: 1px solid var(--line); border-radius: var(--tile-r); box-shadow: 0 8px 24px rgba(6,17,40,0.12); padding: 12px 14px; display: grid; grid-template-columns: repeat(3, max-content); gap: 10px 22px; max-width: min(90vw, 760px); max-height: 60vh; overflow: auto; font-size: 0.88rem; }
.cat-cols-grid fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.cat-cols-grid legend { font-family: var(--display); font-weight: 600; color: var(--cobalt); padding: 0; margin-bottom: 4px; }
.cat-cols-grid legend::first-letter { text-transform: uppercase; }
.cat-cols-grid label { display: block; white-space: nowrap; }
@media (max-width: 700px) { .cat-cols-grid { grid-template-columns: repeat(2, max-content); left: 0; right: auto; } }
.cat-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.cat-tab { font: inherit; font-family: var(--display); font-weight: 600; font-size: 0.98rem; background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 14px; color: var(--ink); cursor: pointer; }
.cat-tab[aria-selected="true"] { color: var(--cobalt); border-bottom-color: var(--cobalt); }
.table-wrap { overflow-x: auto; }
.cat-table { border-collapse: collapse; width: 100%; font-size: 0.86rem; background: var(--paper); border: 1px solid var(--line); }
.cat-table th, .cat-table td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.cat-table th { font-family: var(--display); font-weight: 600; background: #eaeef5; cursor: pointer; user-select: none; }
.cat-table th.num, .cat-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.cat-table th.sorted { color: var(--cobalt); }
.cat-table th .arrow { font-size: 0.7em; }
.cat-table tbody tr { cursor: pointer; }
.cat-table tbody tr:hover { background: #f0f4fb; }
.cat-table tbody tr:focus-visible { outline-offset: -3px; }
.cat-table th.pick, .cat-table td.pick { width: 1%; padding-right: 2px; cursor: default; }
.cat-table input[type=checkbox] { accent-color: var(--cobalt); width: 16px; height: 16px; margin: 0; vertical-align: middle; cursor: pointer; }
.cat-table tbody tr.is-picked { background: var(--wash); }
.cat-table tbody tr.is-picked td.pick { box-shadow: inset 3px 0 var(--cobalt); }
.cat-plain th, .cat-plain tbody tr, .cat-pivot th { cursor: default; }
.cat-plain tbody tr:hover { background: none; }
.cat-pivot td.total, .cat-pivot tr.total td, .cat-pivot tr.total th { font-weight: 600; background: var(--grout); }
.cat-pager { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 14px 0 6px; font-size: 0.9rem; }
.cat-controls { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.cat-controls label { font-family: var(--display); font-weight: 600; font-size: 0.9rem; }
.cat-controls input[type=number] { width: 64px; }
.cat-legend { display: inline-flex; gap: 12px; flex-wrap: wrap; font-size: 0.84rem; margin-left: auto; }
.cat-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cat-canvas { width: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: var(--tile-r); display: block; }

/* run record and download-script pop-ups */
.cat-dialog, .ar-dialog { border: 0; border-radius: var(--tile-r); padding: 0; max-height: 88vh; box-shadow: 0 20px 60px rgba(6,17,40,0.3); color: var(--ink); }
.cat-dialog { width: min(960px, 94vw); }
.ar-dialog { width: min(820px, 94vw); }
.cat-dialog::backdrop, .ar-dialog::backdrop { background: rgba(6,17,40,0.45); }
.cat-close { position: sticky; top: 10px; float: right; margin: 10px 12px 0 0; z-index: 2; }
.cat-detail { padding: 22px 26px 26px; font-size: 0.92rem; }
.cat-detail h2 { margin: 0 0 4px; font-size: 1.3rem; word-break: break-all; }
.cat-detail h3 { margin: 1.4em 0 0.4em; font-size: 0.98rem; color: var(--cobalt); }
.cat-detail h3::first-letter { text-transform: uppercase; }
.cat-detail dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 18px; margin: 0; }
.cat-detail dl > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dotted var(--line); padding: 2px 0; }
.cat-detail dt { color: var(--muted); }
.cat-detail dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.cat-env .env-controls { display: flex; gap: 8px 16px; flex-wrap: wrap; align-items: center; margin: 2px 0 8px; font-size: 0.9rem; }
.cat-env select { font: inherit; font-size: 0.9rem; padding: 5px 8px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); max-width: 100%; }
.env-r { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.env-r label { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; }
.env-r input[type=range] { width: min(240px, 46vw); accent-color: var(--cobalt); }
.env-r output { font-variant-numeric: tabular-nums; min-width: 6.5em; }
.cat-btn.small { font-size: 0.82rem; padding: 3px 10px; }
.env-plot { position: relative; }
.env-canvas { width: 100%; display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--tile-r); cursor: crosshair; }
.env-tip { position: absolute; pointer-events: none; background: var(--night); color: #fff; font-size: 0.8rem; padding: 4px 8px; border-radius: 4px; white-space: nowrap; transform: translate(-50%, -100%); }
.env-note { margin: 8px 0 0; }
.env-files { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.env-files p { margin: 0 0 8px; }
.cat-env h3 + .env-files { margin-top: 0; padding-top: 0; border-top: 0; }
.cat-archive { background: #f7f9fc; border: 1px solid var(--line); border-radius: var(--tile-r); padding: 2px 16px 16px; margin-top: 14px; }
.ar-prods { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin-bottom: 12px; }
.ar-prod { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 9px 12px; text-decoration: none; color: var(--ink); display: block; }
a.ar-prod:hover { border-color: var(--cobalt); color: var(--ink); }
.ar-prod b { font-family: var(--display); display: block; }
.ar-prod span { color: var(--muted); font-size: 0.85rem; }
.ar-prod.is-missing { opacity: 0.5; border-style: dashed; }
.ar-links { display: flex; gap: 8px; flex-wrap: wrap; }
.ar-dialog .body { padding: 22px 24px 24px; font-size: 0.95rem; }
.ar-dialog h2 { font-size: 1.4rem; margin: 0 0 6px; }
.ar-dialog ol { padding-left: 1.3em; margin: 0 0 1em; }
.ar-dialog li { margin-bottom: 12px; }
.ar-dialog .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ar-dialog details { margin: 4px 0 12px; }
.ar-dialog summary { cursor: pointer; font-family: var(--display); font-weight: 600; color: var(--cobalt); margin-bottom: 8px; }
.ar-dialog details pre { max-height: 40vh; }
.ar-products { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 4px 0 18px; }
.ar-products > span { font-family: var(--display); font-weight: 600; margin-right: 4px; }
.ar-products > span.at { margin: 0 0 0 6px; font-weight: 500; color: var(--muted); }
.ar-products > span.small { font-family: inherit; font-weight: 400; margin-left: 4px; }
.ar-products select { font: inherit; font-size: 0.88rem; padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); max-width: 100%; }
.ar-chip { font: inherit; font-size: 0.88rem; padding: 4px 12px 4px 8px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.ar-chip::before { content: ""; width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid var(--line); background: #fff; flex: 0 0 auto; }
.ar-chip[aria-pressed="true"] { border-color: var(--cobalt); background: var(--wash); color: var(--deep); }
.ar-chip[aria-pressed="true"]::before { border-color: var(--cobalt); background: var(--cobalt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2'/%3E%3C/svg%3E") center / 12px no-repeat; }

/* download bar, shown once runs are ticked */
.ar-bar { position: sticky; bottom: 12px; z-index: 5; margin-top: 12px; display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; background: var(--night); color: #fff; border-radius: var(--tile-r); padding: 12px 14px 12px 18px; box-shadow: 0 10px 30px rgba(6,17,40,0.28); }
.ar-bar .sum { flex: 1 1 260px; }
.ar-bar .sum b { font-family: var(--display); }
.ar-bar .sum span { color: #b9c6dd; font-size: 0.9rem; display: block; }
.ar-bar .cat-btn { border-color: rgba(255,255,255,0.6); background: transparent; color: #fff; }
.ar-bar .cat-btn:hover { background: rgba(255,255,255,0.12); }
.ar-bar .cat-btn.primary { background: var(--sky); border-color: var(--sky); color: var(--night); }
.ar-bar .cat-btn.primary:hover { background: #7cc4ee; }
.notice { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--sky); border-radius: 4px; padding: 12px 16px; }
.help { max-width: 46em; margin-top: 36px; }
.help h2 { font-size: 1.4rem; }

/* ---------- file listings (Apache autoindex between header.html and footer.html) ---------- */
.ls-head { background: var(--paper); border-bottom: 1px solid var(--line); padding: 28px 0 22px; }
.ls-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 6px; overflow-wrap: anywhere; }
.ls-head p { margin: 0; }
.ls-crumbs { font-size: 0.9rem; margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 2px 0; }
.ls-crumbs a, .ls-crumbs span { text-decoration: none; padding: 1px 0; }
.ls-crumbs a:hover { text-decoration: underline; }
.ls-crumbs > * + *::before { content: "/"; color: var(--line); margin: 0 8px; }
.ls-run { margin-top: 12px; }
.ls-wrap { padding: 20px 0 8px; }
.ls-tools { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.ls-tools input { flex: 0 1 320px; min-width: 0; font: inherit; font-size: 0.92rem; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); }
.ls-tools .ls-sum { color: var(--muted); font-size: 0.9rem; }
.ls-body table { border-collapse: collapse; width: 100%; font-size: 0.9rem; background: var(--paper); border: 1px solid var(--line); }
.ls-body th, .ls-body td { padding: 7px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; vertical-align: middle; }
.ls-body th { font-family: var(--display); font-weight: 600; background: #eaeef5; }
.ls-body th[data-sort] { cursor: pointer; user-select: none; }
.ls-body th.sorted { color: var(--cobalt); }
.ls-body td[align=right], .ls-body th.num { text-align: right; font-variant-numeric: tabular-nums; }
.ls-body td:last-child { white-space: normal; color: var(--muted); }
.ls-body tr:hover td { background: #f7f9fc; }
.ls-body td a { text-decoration: none; font-weight: 500; }
.ls-body td a:hover { text-decoration: underline; }
.ls-body tr.is-dir td:first-child a { font-family: var(--display); font-weight: 600; }
.ls-body tr.is-dir td:first-child a::before { content: ""; display: inline-block; width: 15px; height: 11px; margin-right: 8px; border-radius: 2px; background: var(--sky); vertical-align: -1px; }
.ls-body tr.is-parent td { background: #f7f9fc; }
.ls-body tr.is-parent td:first-child a::before { content: "↑"; display: inline-block; margin-right: 8px; color: var(--muted); }
.ls-body table.no-desc th:last-child, .ls-body table.no-desc td:last-child { display: none; }
@media (max-width: 640px) { .ls-body .c-date, .ls-body .c-desc { display: none; } }
.ls-body img { display: inline; }
.ftype { font-family: var(--display); font-size: 0.72rem; font-weight: 600; padding: 1px 6px; border-radius: 3px; background: #e9edf4; color: var(--muted); margin-left: 8px; vertical-align: 1px; }
.ftype.hdf5 { background: var(--wash); color: var(--deep); }
.ls-get { margin-top: 22px; }
.ls-get h2 { font-size: 1.15rem; margin-bottom: 6px; }
address { color: var(--muted); font-size: 0.8rem; font-style: normal; margin-top: 10px; }

/* footer */
.site-foot { background: var(--paper); border-top: 1px solid var(--line); margin-top: 56px; padding: 32px 0 26px; font-size: 0.92rem; }
.foot-grid { display: flex; gap: 16px 32px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.foot-grid img { width: 110px; }
.foot-grid p { margin: 0; color: var(--muted); }
.partners { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.partners img { height: 44px; width: auto; }
.partners .badge { border-radius: 4px; }
