/* Francois catalog — type only. Black on white; hierarchy from size, weight
   and grey. The hosted applications bring all the colour. Language after
   html.moldandyeast.com. */
:root {
  --color-wall: #ffffff;
  --color-plinth: #f4f4f4;
  --color-table: #ededed;
  --color-line: #eeeeee;
  --color-faint: #c4c4c4;
  --color-muted: #737373;
  --color-text: #1d1d1d;
  --color-ink: #111111;
  --color-warn: #b5603f;
  --color-ok: #2f6f4f;
  --font-sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --text-body: 17px;
  --leading-body: 22px;
  --text-small: 15px;
  --text-caption: 14px;
  --text-heading: 40px;
  --text-display: clamp(32px, 4.72vw, 68px);
  --pad: clamp(20px, 2.8vw, 40px);
  --gap: 40px;
  --label: 300px;
  --hero: clamp(72px, 9vw, 140px);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--color-wall); color: var(--color-text); font: 400 var(--text-body) / var(--leading-body) var(--font-sans); -webkit-font-smoothing: antialiased; }
body.has-window { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .4; }
::selection { background: var(--color-ink); color: var(--color-wall); }
:focus-visible { outline: 1.5px solid var(--color-ink); outline-offset: 3px; }
.mono { font-family: var(--font-mono); font-size: 0.9em; }
.muted { color: var(--color-muted); }
.warn { color: var(--color-warn); }
.small { font-size: var(--text-caption); line-height: 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.page { padding: 0 var(--pad); }
main { min-height: 50vh; }

/* Links that look like links; text buttons are just words. */
.u, .prose a, .foot a, .tlink { color: var(--color-ink); text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--color-faint); text-underline-offset: 4px; transition: text-decoration-color .15s; }
.u:hover, .prose a:hover, .foot a:hover, .tlink:hover { text-decoration-color: var(--color-ink); }
.tlink { border: 0; padding: 0; background: none; white-space: nowrap; }
.tlink.quiet, .tlink.plain { color: var(--color-muted); text-decoration-color: transparent; }
.tlink.quiet:hover, .tlink.plain:hover { color: var(--color-ink); }
.tlink[aria-pressed="true"] { color: var(--color-ink); text-decoration-color: var(--color-ink); }
.tlink.danger:hover { color: var(--color-warn); }

/* Header: brand, address, nav. */
.bar { position: relative; z-index: 5; background: var(--color-wall); }
.bar-inner { display: flex; align-items: center; gap: 28px; padding-top: 36px; line-height: 22px; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.addr { display: flex; align-items: center; flex: 1; min-width: 0; color: var(--color-ink); }
.addr-host:hover { color: var(--color-muted); }
.addr-path { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; align-items: center; gap: 28px; color: var(--color-ink); }
.nav a { text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: transparent; text-underline-offset: 4px; }
.nav a:hover { text-decoration-color: var(--color-faint); }
.nav a[aria-current="page"] { text-decoration-color: var(--color-ink); }
@media (max-width: 639px) {
  .bar-inner { flex-wrap: wrap; gap: 12px 10px; padding-top: 20px; font-size: 16px; }
  .nav { width: 100%; gap: 20px; flex-wrap: wrap; }
}

/* Hero and intros — a sentence, set big. */
.hero { padding: var(--hero) 0 0; }
.hero h1, .intro h1, .lost h1, .stats-head h1, .h-display { margin: 0; max-width: 1240px; font-weight: 500; font-size: var(--text-display); line-height: 1.03; letter-spacing: -0.035em; color: var(--color-ink); overflow-wrap: anywhere; }
.hero h1 .muted, .intro h1 span { color: var(--color-muted); }
.intro { padding: var(--hero) 0 72px; }
.lead-actions { display: flex; align-items: baseline; gap: 24px; flex-wrap: wrap; margin: 40px 0 0; }
.lost { padding: var(--hero) 0 120px; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
@media (max-width: 639px) { .hero, .intro, .lost { padding-top: 64px; } .hero h1, .intro h1, .lost h1 { font-size: 34px; letter-spacing: -0.03em; } }

/* Controls — sort, count, tags as a grey sentence. */
.controls { display: flex; flex-direction: column; gap: 28px; padding: 64px 0 56px; }
.views { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 20px; color: var(--color-muted); }
.views a, .tag { text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: transparent; text-underline-offset: 4px; }
.views a:hover, .tag:hover { color: var(--color-ink); }
.views a[aria-current="page"] { color: var(--color-ink); text-decoration-color: var(--color-ink); }
.sort { border: 0; padding: 0; background: none; color: var(--color-muted); cursor: pointer; appearance: none; }
.sort:hover { color: var(--color-ink); }
.tags { display: flex; flex-wrap: wrap; gap: 4px 0; max-width: 1100px; color: var(--color-muted); }
.tag { border: 0; padding: 0; background: none; color: var(--color-muted); white-space: nowrap; }
.tags .tag:not(:last-child)::after { content: "·"; display: inline-block; padding: 0 8px; }
.tag[aria-pressed="true"] { color: var(--color-ink); }
.tag[aria-pressed="true"] .tag-label { text-decoration: underline; text-decoration-color: var(--color-ink); text-underline-offset: 4px; }

/* Catalog rows: thumbnail plinth, big title, grey description, actions. */
.rows { border-top: 1px solid var(--color-ink); margin-bottom: 120px; }
.ri { display: flex; gap: 40px; padding: 24px 0 32px; border-bottom: 1px solid var(--color-line); }
.ri-thumb { flex-shrink: 0; width: clamp(200px, 26vw, 380px); aspect-ratio: 4 / 3; background: var(--color-plinth); overflow: hidden; display: block; }
.mono-thumb { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 18px; transition: background .3s; }
.ri-thumb:hover .mono-thumb { background: var(--color-line); }
.mono-letters { font-weight: 500; font-size: clamp(56px, 7vw, 104px); line-height: .9; letter-spacing: -0.05em; color: var(--color-ink); }
.mono-caps { font: var(--text-caption) var(--font-mono); color: var(--color-muted); }
.ri-text { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.ri-head { display: flex; flex-direction: column; gap: 10px; }
.ri-title { margin: 0; font-weight: 500; font-size: var(--text-heading); line-height: 42px; letter-spacing: -0.03em; color: var(--color-ink); overflow-wrap: anywhere; }
.ri-title a:hover { color: var(--color-muted); }
.ri-desc { margin: 0; color: var(--color-muted); max-width: 720px; }
.ri-foot { display: flex; flex-direction: column; gap: 14px; }
.ri-tags { margin: 0; color: var(--color-muted); }
.ri-actions { margin: 0; display: flex; align-items: baseline; gap: 24px; flex-wrap: wrap; }
.ri-path { color: var(--color-muted); }
@media (max-width: 767px) {
  .ri { flex-direction: column; gap: 14px; }
  .ri-thumb { width: 100%; }
  .ri-title { font-size: 26px; line-height: 30px; }
  .ri-text { gap: 18px; }
}

/* Buttons — square: ink or soft. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; padding: 9px 16px; border-radius: 0; font-weight: 400; font-size: var(--text-small); white-space: nowrap; }
.btn-ink { background: var(--color-ink); color: var(--color-wall); }
.btn-ink:hover:not(:disabled) { background: #333; }
.btn-soft { background: var(--color-plinth); color: var(--color-ink); }
.btn-soft:hover:not(:disabled) { background: var(--color-line); }
.seg { display: flex; gap: 20px; flex-wrap: wrap; }
.seg button { border: 0; padding: 0; background: none; color: var(--color-muted); text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: transparent; text-underline-offset: 4px; }
.seg button:hover { color: var(--color-ink); }
.seg button[aria-pressed="true"] { color: var(--color-ink); text-decoration-color: var(--color-ink); }
.seg.small { gap: 12px; font-size: var(--text-caption); }

/* Label + content rows. */
.row { display: flex; gap: var(--gap); }
.section { padding: 20px 0 40px; }
.ruled { border-top: 1px solid var(--color-ink); }
.row-label { width: var(--label); flex-shrink: 0; display: flex; flex-direction: column; }
.row-label > :first-child { color: var(--color-ink); }
.row-label > :not(:first-child) { color: var(--color-muted); }
.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.row-body p { margin: 0; }
@media (max-width: 899px) { .row { flex-direction: column; gap: 16px; } .row-label { width: auto; } }
.sheet { padding: 72px 0 40px; display: flex; flex-direction: column; }
.sheet > .stats-head { margin-bottom: 40px; }
.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.status { font-size: var(--text-small); color: var(--color-muted); }
.status.on { color: var(--color-ink); text-decoration: underline; text-underline-offset: 4px; }

/* Key/value lists. */
.v-list { display: flex; flex-direction: column; border-top: 1px solid var(--color-ink); }
.v-list > div, .kv { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--color-line); }
.v-list > div > span:first-child, .kv > span:first-child { color: var(--color-muted); flex-shrink: 0; }
.v-list > div > span:last-child, .kv > span:last-child { text-align: right; overflow-wrap: anywhere; }

/* Release lines. */
.lines { display: flex; flex-direction: column; border-top: 1px solid var(--color-ink); }
.line { display: flex; gap: 40px; padding: 18px 0 22px; border-bottom: 1px solid var(--color-line); }
.line > :first-child { width: var(--label); flex-shrink: 0; display: flex; flex-direction: column; color: var(--color-ink); }
.line > :first-child strong { font-weight: 500; font-size: 28px; line-height: 32px; letter-spacing: -0.02em; }
.release-body { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; }
.release-body p { margin: 0; }
.changelog { white-space: pre-wrap; max-width: 760px; }
@media (max-width: 899px) { .line { flex-direction: column; gap: 6px; } .line > :first-child { width: auto; } }
.prose { max-width: 760px; padding: 72px 0 0; }
.prose h2 { margin: 0 0 10px; font-weight: 500; font-size: var(--text-body); color: var(--color-ink); }
.prose p { margin: 0 0 12px; color: var(--color-muted); }
.code-inline { margin: 0; padding: 14px 0; border-top: 1px solid var(--color-ink); font: 15px/22px var(--font-mono); overflow-x: auto; white-space: pre; }

/* Notices and toasts. */
.notice { margin: 0 0 20px; padding: 12px 0; border-top: 1px solid var(--color-ink); }
.notice.bad { color: var(--color-warn); }
.toast { position: fixed; right: var(--pad); bottom: 24px; z-index: 30; max-width: 440px; padding: 14px 18px; background: var(--color-ink); color: var(--color-wall); cursor: pointer; animation: sheet-in .2s; }
.toast.bad { background: var(--color-warn); }
.empty { padding: 24px 0 120px; color: var(--color-muted); margin: 0; }

/* Library lists (instances, releases, users). */
.library { padding-bottom: 120px; }
.lib-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 64px 0 16px; }
.lib-head h2 { margin: 0; font-weight: 500; font-size: var(--text-heading); line-height: 42px; letter-spacing: -0.03em; color: var(--color-ink); }
.lib-search input { border: 0; border-bottom: 1px solid var(--color-faint); outline: none; width: 260px; padding: 4px 0; background: none; }
.lib-search input:focus { border-bottom-color: var(--color-ink); }
.lib-list { display: flex; flex-direction: column; border-top: 1px solid var(--color-ink); }
.lib-row { display: flex; align-items: center; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--color-line); }
.lib-row.is-unlisted .lib-thumb, .lib-row.is-unlisted .lib-main { opacity: .45; }
.lib-thumb { width: 64px; height: 48px; flex-shrink: 0; background: var(--color-plinth); }
.mono-mini { display: grid; place-items: center; font-weight: 500; font-size: 20px; letter-spacing: -0.04em; color: var(--color-ink); }
.lib-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lib-main strong { font-weight: 500; color: var(--color-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-main a:hover strong { color: var(--color-muted); }
.lib-tags { width: 140px; flex-shrink: 0; font-size: var(--text-caption); color: var(--color-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-size, .lib-added { flex-shrink: 0; font: 14px var(--font-mono); color: var(--color-muted); }
.lib-size { width: 72px; text-align: right; } .lib-added { width: 110px; text-align: right; }
.lib-status { width: 160px; flex-shrink: 0; font-size: var(--text-caption); color: var(--color-muted); }
.lib-status.on { color: var(--color-ink); }
.lib-status.bad { color: var(--color-warn); }
.lib-actions { flex-shrink: 0; display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.lib-actions .btn { padding: 6px 10px; font-size: var(--text-caption); }
@media (max-width: 1023px) { .lib-tags, .lib-added { display: none; } .lib-head { flex-direction: column; align-items: flex-start; } }
@media (max-width: 639px) { .lib-size, .lib-status { display: none; } .lib-search input { width: 180px; } .lib-row { flex-wrap: wrap; } }

/* Admin. */
.admin { padding-top: 48px; }
.admin-nav { padding-bottom: 8px; }
.stats { display: flex; flex-direction: column; gap: 40px; padding: 56px 0 120px; }
.stats-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; flex-wrap: wrap; }
.stat-tiles { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--color-ink); }
.stat-tiles.three { grid-template-columns: repeat(3, 1fr); }
.stat-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 16px 16px 0; min-width: 0; }
.stat-n { font-weight: 500; font-size: 40px; line-height: 42px; letter-spacing: -0.03em; color: var(--color-ink); overflow-wrap: anywhere; }
.stat-label { color: var(--color-muted); font-size: var(--text-small); }
@media (max-width: 900px) { .stat-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .stat-tiles, .stat-tiles.three { grid-template-columns: repeat(2, 1fr); } }
.stats-block { display: flex; flex-direction: column; gap: 0; min-width: 0; overflow-x: auto; }
.stats-block h2 { margin: 0 0 12px; font-weight: 400; font-size: var(--text-body); color: var(--color-ink); }
.srow { display: flex; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--color-line); font-size: var(--text-small); min-width: 720px; }
.shead { color: var(--color-muted); border-bottom-color: var(--color-ink); }
.sname { flex: 1; min-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scol { width: 150px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snum { width: 72px; flex-shrink: 0; text-align: right; font: 14px var(--font-mono); }
.meter { height: 6px; background: var(--color-plinth); }
.meter > div { height: 100%; background: var(--color-ink); }

/* Publish page. */
.publish { display: flex; gap: 64px; padding: 56px 0 24px; }
.publish-left { width: 420px; flex-shrink: 0; display: flex; flex-direction: column; gap: 24px; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; height: 240px; border: 1px dashed var(--color-faint); text-align: center; cursor: pointer; padding: 16px; }
.drop:hover, .drop.is-over { border-color: var(--color-ink); border-style: solid; }
.drop-icon { font-size: 28px; color: var(--color-ink); }
.queue { display: flex; flex-direction: column; border-top: 1px solid var(--color-ink); }
.qrow { display: flex; align-items: baseline; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--color-line); }
.qname { flex: 1; min-width: 0; }
.qstatus { width: 64px; flex-shrink: 0; font-size: var(--text-caption); color: var(--color-muted); }
.qstatus.warn { color: var(--color-warn); }
.form { flex: 1; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.form.tight { gap: 14px; }
.form.tight > .btn { align-self: flex-start; }
.v-list .tlink { margin-left: 12px; }
.v-list .mono { word-break: break-all; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label, .field > span { color: var(--color-muted); }
.field input, .field textarea, .field select, .inline-form input, .model-opts input, .lib-search input { border: 0; border-bottom: 1px solid var(--color-ink); padding: 8px 0; background: none; outline: none; border-radius: 0; }
.field select { appearance: none; cursor: pointer; }
.field input:focus, .field textarea:focus, .inline-form input:focus { border-bottom-width: 2px; padding-bottom: 7px; }
.field textarea { resize: vertical; }
.slug { font-family: var(--font-mono); font-size: 15px; }
.row2 { display: flex; gap: 16px; } .row2 > :first-child { flex: 1; } .row2 > :last-child { width: 240px; }
.check { display: flex; align-items: baseline; gap: 10px; color: var(--color-text); }
.check input { accent-color: var(--color-ink); }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 8px; }
.form-foot .btn { padding: 12px 24px; }
.form-foot.sticky { position: sticky; bottom: 0; background: var(--color-wall); padding: 16px 0; border-top: 1px solid var(--color-ink); z-index: 2; }
@media (max-width: 1023px) { .publish { flex-direction: column; } .publish-left { width: auto; } .row2 { flex-direction: column; } .row2 > :last-child { width: auto; } }
.inline-form { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.inline-form input { min-width: 180px; flex: 1; }
.inline-form input.num, .model-opts input.num { width: 80px; min-width: 0; flex: 0 0 auto; }
.grid-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px 32px; }
.model-table { display: flex; flex-direction: column; border-top: 1px solid var(--color-ink); }
.model-line { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--color-line); flex-wrap: wrap; }
.model-line:not(.on) { color: var(--color-muted); }
.model-opts { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.model-opts input:not(.num) { width: 200px; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 760px) { .tiers { grid-template-columns: 1fr; } }
.code-area { width: 100%; border: 1px solid var(--color-line); padding: 14px; font: 14px/20px var(--font-mono); background: var(--color-plinth); resize: vertical; }
.settings-mode { padding: 0 0 20px; }

/* Viewer — the instance on a grey table, like opening an artefact. */
@keyframes fade-in { from { opacity: 0; } }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } }
.viewer { position: fixed; inset: 0; z-index: 11; display: flex; flex-direction: column; background: var(--color-table); animation: fade-in .18s; }
.v-top { display: flex; justify-content: space-between; align-items: baseline; gap: 32px; flex-shrink: 0; padding: 22px var(--pad) 18px; }
.v-title { display: flex; align-items: baseline; gap: 16px; min-width: 0; }
.v-title strong { font-weight: 500; font-size: 28px; line-height: 32px; letter-spacing: -0.02em; color: var(--color-ink); white-space: nowrap; }
.v-desc { color: var(--color-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-actions { display: flex; align-items: baseline; gap: 24px; white-space: nowrap; }
.v-table { flex: 1; min-height: 0; position: relative; display: flex; padding: 0 var(--pad) var(--pad); }
.v-device { flex: 1; min-width: 0; background: var(--color-wall); }
.v-device iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--color-wall); }
.v-blocked { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--color-warn); text-align: center; max-width: 520px; }
.v-denied { position: absolute; left: var(--pad); bottom: calc(var(--pad) + 12px); margin: 0; padding: 10px 14px; background: var(--color-warn); color: #fff; }
.v-info { position: absolute; right: var(--pad); bottom: var(--pad); z-index: 2; width: 440px; max-height: calc(100% - 24px - var(--pad)); overflow-y: auto; display: flex; flex-direction: column; gap: 22px; padding: 24px 24px 28px; background: var(--color-wall); box-shadow: 0 -12px 40px rgba(0,0,0,.12); animation: sheet-in .22s cubic-bezier(.2,.7,.2,1); }
.v-info-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.v-info-head strong { font-weight: 500; font-size: 28px; line-height: 32px; letter-spacing: -0.025em; color: var(--color-ink); }
.v-info p { margin: 0; color: var(--color-muted); }
@media (max-width: 1023px) { .v-desc { display: none; } }
@media (max-width: 599px) {
  .v-top { padding: 14px 16px; flex-wrap: wrap; gap: 8px; background: var(--color-wall); border-bottom: 1px solid var(--color-line); }
  .v-title strong { font-size: 20px; line-height: 24px; }
  .v-table { padding: 0; }
  .v-info { left: 0; right: 0; bottom: 0; width: auto; }
}

/* Footer — For people | For machines. */
.foot { display: flex; padding: 120px 0 48px; line-height: 24px; }
.foot-half { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.foot-half + .foot-half { padding-left: var(--gap); margin-left: var(--gap); border-left: 1px solid var(--color-line); }
.foot h2 { margin: 0; font-weight: 500; font-size: var(--text-body); color: var(--color-ink); }
.foot-cols { display: flex; flex-wrap: wrap; gap: 24px 40px; }
.foot-cols > div { width: 220px; display: flex; flex-direction: column; align-items: flex-start; }
.foot-cols > div > span:first-child { color: var(--color-muted); }
.foot .path { font-family: var(--font-mono); font-size: 15px; }
.foot-note { color: var(--color-muted); }
@media (max-width: 767px) { .foot { flex-direction: column; gap: 48px; padding-top: 96px; } .foot-half + .foot-half { padding-left: 0; margin-left: 0; border-left: 0; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
