/* Exprezoe Marketplace. One stylesheet, no script: the policy allows 'self' and nothing inline. */
:root {
  --bg: #f7f7f8; --surface: #ffffff; --text: #1d1d1f; --muted: #5f6368; --line: #dcdde1;
  --accent: #0a62c9; --accent-text: #ffffff; --ok: #1a7f37; --warn: #9a6700; --error: #b42318;
  --radius: 10px; --gap: 1rem; --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121315; --surface: #1c1d20; --text: #e8e8ea; --muted: #a0a3a8; --line: #33353a; --accent: #5aa2ff; --accent-text: #0b0c0e; }
}
* { box-sizing: border-box; }
html { color-scheme: light dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); }
a { color: var(--accent); }
code, .digest { font-family: var(--mono); font-size: .9em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gap); }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: var(--gap); top: var(--gap); background: var(--surface); padding: .5rem 1rem; z-index: 10; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 70ch; }
.announce { background: var(--accent); color: var(--accent-text); padding: .4rem 0; font-size: .9rem; }

.masthead { background: var(--surface); border-bottom: 1px solid var(--line); }
.masthead__row { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: var(--gap); }
.brand { font-weight: 650; text-decoration: none; color: var(--text); }
.brand__mark { color: var(--accent); }
.masthead__nav { display: flex; align-items: center; gap: var(--gap); }
.inline-form { display: inline; margin: 0; }
.link-button { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }

main.wrap { padding-top: 1.5rem; padding-bottom: 3rem; min-height: 70vh; }
.footer { border-top: 1px solid var(--line); padding: 1.25rem 0; font-size: .9rem; }
.footer__row { display: flex; flex-wrap: wrap; gap: var(--gap); justify-content: space-between; }

.hero { padding: 1rem 0 1.5rem; }
.hero h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 .5rem; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 1rem; }
.page-head h1 { margin: 0 0 .25rem; }
.search { display: flex; gap: .5rem; margin: 1rem 0; max-width: 640px; }
.search input { flex: 1; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; }
button, .button { display: inline-block; padding: .55rem 1rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font: inherit; text-decoration: none; cursor: pointer; }
.button--primary, .search button { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.card--item { display: flex; gap: .9rem; align-items: flex-start; }
.card__icon { border-radius: 8px; flex: none; }
.card__title { font-size: 1.05rem; margin: 0 0 .2rem; }
.card__title a { color: var(--text); text-decoration: none; }
.card__title a:hover { text-decoration: underline; }
.card__by, .card__meta { font-size: .85rem; color: var(--muted); margin: 0; }
.card p { margin: .25rem 0; }
.badge, .chip { display: inline-block; font-size: .8rem; padding: .05rem .5rem; border: 1px solid var(--line); border-radius: 999px; margin: 0 .3rem .3rem 0; color: var(--muted); text-decoration: none; }
.empty { padding: 2rem; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

.gallery { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; }
.side-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1rem 0 .4rem; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { margin: .2rem 0; }
.gallery__side a[aria-current="page"], .tabs a[aria-current="page"] { font-weight: 650; color: var(--text); }
.pager { display: flex; gap: var(--gap); justify-content: center; margin-top: 1.5rem; }

.item-head { display: flex; gap: 1.25rem; align-items: flex-start; margin-bottom: 1.5rem; }
.item-head h1 { margin: 0; }
.item-head__icon { border-radius: 14px; }
.item-head__by, .item-head__stats { color: var(--muted); margin: .2rem 0; }
.item-head__stats span { margin-right: 1rem; }
.item { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; }
.tabs { display: flex; gap: 1.25rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.tabs a { padding: .5rem 0; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a[aria-current="page"] { border-bottom-color: var(--accent); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: var(--gap); }
.panel h2 { font-size: 1rem; margin: 0 0 .5rem; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .25rem .75rem; margin: 0 0 .75rem; font-size: .92rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.permissions li { font-size: .92rem; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: .5rem; border-bottom: 1px solid var(--line); }
.is-yanked td { color: var(--muted); text-decoration: line-through; }
.prose { max-width: 75ch; }
.prose pre { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; overflow: auto; }
.prose table { border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--line); padding: .3rem .6rem; }

.stack { display: grid; gap: .6rem; max-width: 520px; margin-top: 1rem; }
.stack label { display: grid; gap: .25rem; font-size: .92rem; }
.stack input:not([type="checkbox"]), .inline-form select { padding: .45rem .6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; }
.stack label:has(input[type="checkbox"]) { display: flex; gap: .5rem; align-items: center; }
.stack button { justify-self: start; }
.narrow { max-width: 560px; margin: 2rem auto; }
.error-code { font-size: 3rem; font-weight: 700; color: var(--muted); margin: 0; }
.notice { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; background: var(--surface); }
.notice--error { border-color: var(--error); }

@media (max-width: 820px) {
  .gallery, .item { grid-template-columns: 1fr; }
  .item-head { flex-direction: column; }
}
