/*
   The /examples showcase and its three example page layouts (profile · channel · board). Pages: scripts/build-examples-v0.mjs.
   Phone first (390px), light and dark (prefers-color-scheme), logical properties, 44px tap targets.
   Example PAGES are themed only through the page model's theme variables (--hub-*, lib/nlo-hub-theme-v0.cjs);
   nothing here reads a colour a person typed. */
:root {
  --ex-bg: #fafafa; --ex-surface: #ffffff; --ex-text: #0a0a0a; --ex-muted: #52525b; --ex-line: #e4e4e7;
  --ex-accent: #3573b8; --ex-on-accent: #ffffff; --ex-badge-bg: #fff3c4; --ex-badge-fg: #5c4400; --ex-banner: #fff8e1; --ex-banner-line: #e8c547;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ex-bg: #10141c; --ex-surface: #1a202b; --ex-text: #eef1f6; --ex-muted: #a9b3c3; --ex-line: #323b4b;
    --ex-accent: #7fb2ec; --ex-on-accent: #0d1420; --ex-badge-bg: #4a3a00; --ex-badge-fg: #ffe9a3; --ex-banner: #2a2410; --ex-banner-line: #8a7420;
  }
}
.ex-body { margin: 0; background: var(--ex-bg); color: var(--ex-text); font: 400 16px/1.5 "Geist", system-ui, sans-serif; }
.ex-main { max-inline-size: 1240px; margin-inline: auto; padding: 16px clamp(12px, 4vw, 40px) 24px; }
.ex-main h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.1; margin: 20px 0 8px; }
.ex-main h2 { font-size: 20px; margin: 28px 0 12px; }
.ex-lead, .ex-p-lead { color: var(--ex-muted); max-inline-size: 60ch; margin: 0 0 8px; }
.ex-meta { color: var(--ex-muted); font-size: 14px; margin: 6px 0 0; }
.ex-sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ex-main a { color: var(--ex-accent); }
.ex-main :focus-visible { outline: 3px solid var(--ex-accent); outline-offset: 2px; }
img { max-inline-size: 100%; block-size: auto; }

/* the badge + banner */
.ex-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: var(--ex-badge-bg); color: var(--ex-badge-fg); font: 700 12px/1.4 "Geist", system-ui, sans-serif; letter-spacing: .02em; text-transform: uppercase; vertical-align: middle; }
.ex-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0 0; padding: 12px 16px; border: 2px dashed var(--ex-banner-line); border-radius: 12px; background: var(--ex-banner); color: var(--ex-text); }
.ex-banner p { margin: 0; flex: 1 1 18rem; }
.ex-banner .ex-banner-links { flex: 0 0 auto; display: flex; gap: 12px; }
.ex-banner a { display: inline-flex; align-items: center; min-block-size: 44px; font-weight: 600; }

/* buttons + chips */
.ex-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-block-size: 44px; min-inline-size: 44px; padding: 0 14px; border: 1.5px solid var(--ex-line); border-radius: 999px; background: var(--ex-surface); color: var(--ex-text); font: 600 14px/1 "Geist", system-ui, sans-serif; cursor: pointer; text-decoration: none; }
.ex-btn:hover { border-color: var(--ex-accent); }
.ex-btn-solid { background: var(--ex-accent); color: var(--ex-on-accent); border-color: var(--ex-accent); }
.ex-main a.ex-btn-solid { color: var(--ex-on-accent); }
.ex-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.ex-chip { display: inline-flex; align-items: center; gap: 6px; min-block-size: 44px; padding: 0 14px; border: 1.5px solid var(--ex-line); border-radius: 999px; background: var(--ex-surface); color: var(--ex-text); font: 600 14px/1 "Geist", system-ui, sans-serif; cursor: pointer; }
.ex-chip[aria-pressed="true"] { background: var(--ex-text); color: var(--ex-bg); border-color: var(--ex-text); }
.ex-n { font-weight: 400; opacity: .8; }
.ex-count { color: var(--ex-muted); font-size: 14px; margin: 0 0 12px; }
.ex-empty { padding: 24px; border: 2px dashed var(--ex-line); border-radius: 12px; text-align: center; }

/* people + layouts */
.ex-people, .ex-layouts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.ex-person { display: flex; gap: 12px; padding: 14px; background: var(--ex-surface); border: 1px solid var(--ex-line); border-radius: 14px; }
.ex-person p { margin: 0; }
.ex-person-n { font-weight: 700; font-size: 17px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ex-person-n a { display: inline-flex; align-items: center; min-block-size: 44px; }
.ex-handle { color: var(--ex-muted); font-size: 14px; }
.ex-layout { background: var(--ex-surface); border: 1px solid var(--ex-line); border-radius: 14px; overflow: hidden; }
.ex-layout a { display: block; text-decoration: none; color: inherit; }
.ex-layout img { display: block; inline-size: 100%; aspect-ratio: 400 / 260; object-fit: cover; }
.ex-layout-t { display: block; padding: 10px 14px 0; font-weight: 700; color: var(--ex-accent); text-decoration: underline; min-block-size: 34px; }
.ex-layout p { margin: 4px 14px 14px; color: var(--ex-muted); font-size: 14px; }
.ex-av { display: inline-flex; align-items: center; justify-content: center; flex: none; inline-size: var(--sz); block-size: var(--sz); border-radius: 50%; background: var(--av); color: #fff; font-weight: 800; font-size: calc(var(--sz) * .45); }

/* phone: people and layouts stay short so the wall is near the top */
@media (max-width: 639px) {
  .ex-people { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ex-person { flex-direction: column; gap: 6px; padding: 10px; }
  .ex-person > div > p:not(.ex-person-n):not(.ex-handle) { display: none; }
  .ex-layouts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .ex-layout-t { padding: 6px 8px 8px; font-size: 14px; min-block-size: 44px; }
  .ex-layout p { display: none; }
}
/* the wall: CSS columns masonry (DOM order = reading + tab order) */
.ex-wall { list-style: none; margin: 0; padding: 0; columns: 1; column-gap: 14px; }
@media (min-width: 640px) { .ex-wall { columns: 2; } }
@media (min-width: 980px) { .ex-wall { columns: 3; } }
@media (min-width: 1240px) { .ex-wall { columns: 4; } }
.ex-card { break-inside: avoid; margin: 0 0 14px; background: var(--ex-surface); border: 1px solid var(--ex-line); border-radius: 14px; overflow: hidden; }
.ex-card[hidden] { display: none; }
.ex-card article { padding: 12px 14px 8px; }
.ex-card img { display: block; inline-size: calc(100% + 28px); max-inline-size: none; margin: 4px -14px 8px; }
.ex-k-creative img { inline-size: auto; max-inline-size: 100%; margin: 4px 0 8px; border-radius: 8px; image-rendering: auto; }
.ex-card h3 { font-size: 17px; margin: 6px 0 4px; line-height: 1.3; }
.ex-card p { margin: 0 0 6px; }
.ex-card-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ex-kind { font-size: 13px; color: var(--ex-muted); font-weight: 600; }
.ex-draft { font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--ex-line); color: var(--ex-muted); }
.ex-by { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ex-muted); margin-block-start: 8px !important; }
.ex-dl { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 4px 0 6px; }
.ex-dl div { min-inline-size: 6rem; }
.ex-dl dt { font-size: 12px; color: var(--ex-muted); text-transform: uppercase; letter-spacing: .03em; }
.ex-dl dd { margin: 0; font-weight: 600; }
.ex-file { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px dashed var(--ex-line); border-radius: 10px; }
.ex-file-ic { font-size: 22px; }
.ex-ladder { inline-size: 100%; border-collapse: collapse; font-size: 14px; margin: 4px 0 6px; }
.ex-ladder th, .ex-ladder td { text-align: start; padding: 6px 4px; border-block-end: 1px solid var(--ex-line); }
.ex-ladder td:last-child, .ex-ladder th:last-child { text-align: end; }
.ex-pin-type { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.ex-poll { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 6px; }
.ex-poll li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 14px; }
.ex-poll-bar { grid-column: 1 / -1; block-size: 8px; border-radius: 4px; background: linear-gradient(to right, var(--ex-accent) var(--pct), var(--ex-line) var(--pct)); }
.ex-poll-n { color: var(--ex-muted); }

/* Borrow this */
.ex-borrow { margin: 6px 0 4px; }
.ex-borrow > summary { display: inline-flex; align-items: center; min-block-size: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--ex-accent); color: var(--ex-accent); font-weight: 600; cursor: pointer; list-style: none; }
.ex-borrow > summary::-webkit-details-marker { display: none; }
.ex-borrow[open] > summary { background: var(--ex-accent); color: var(--ex-on-accent); }
.ex-borrow-in { padding: 10px 0 4px; display: grid; gap: 8px; }
.ex-borrow-in p { margin: 0; font-size: 14px; color: var(--ex-muted); }
.ex-field { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.ex-field input, .ex-field textarea { inline-size: 100%; box-sizing: border-box; min-block-size: 44px; padding: 8px 10px; border: 1px solid var(--ex-line); border-radius: 8px; background: var(--ex-bg); color: var(--ex-text); font: 400 13px/1.4 ui-monospace, "Geist Mono", Consolas, monospace; resize: vertical; }
.ex-copy-status:empty { display: none; }

/* ---------------------------------------------------------------- example PAGES (themed by --hub-* only) */
.ex-page { --hub-bg: #f6f7f9; margin-block-start: 16px; padding: clamp(12px, 3vw, 28px); border-radius: 18px; background: var(--hub-bg); color: var(--hub-text); }
.ex-page a { color: var(--hub-link); }
.ex-page .ex-meta, .ex-page .ex-handle, .ex-page .ex-p-lead { color: var(--hub-muted); }
.ex-page :focus-visible { outline: 3px solid var(--hub-accent); outline-offset: 2px; }
.ex-page .ex-borrow > summary { border-color: var(--hub-accent); color: var(--hub-link); }
.ex-page .ex-borrow[open] > summary { background: var(--hub-accent); color: var(--hub-on-accent); }
.ex-page .ex-btn { background: var(--hub-surface); color: var(--hub-text); border-color: var(--hub-border); }
.ex-page .ex-field input, .ex-page .ex-field textarea { background: var(--hub-surface); color: var(--hub-text); border-color: var(--hub-border); }
.ex-page .ex-borrow-in p { color: var(--hub-muted); }
.ex-p-head { display: flex; gap: 14px; align-items: center; }
.ex-p-head h1 { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ex-p-head p { margin: 2px 0 0; }
.ex-box, .ex-panel { background: var(--hub-surface); border: 2px solid var(--hub-border); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; position: relative; }
.ex-box h2, .ex-panel h2, .ex-panel h3 { margin: 0 0 8px; font-size: 18px; padding-inline-end: 5.5rem; }
.ex-slot { position: absolute; inset-block-start: 10px; inset-inline-end: 10px; font: 500 11px/1.4 ui-monospace, "Geist Mono", Consolas, monospace; color: var(--hub-muted); border: 1px dashed var(--hub-border); border-radius: 6px; padding: 1px 6px; }

/* (a) profile */
.ex-profile .ex-p-head h1 { font-size: clamp(28px, 7vw, 44px); }
.ex-profile .ex-box > h2 { background: var(--hub-accent); color: var(--hub-on-accent); margin: -12px -14px 10px; padding: 8px 14px; border-radius: 10px 10px 0 0; }
.ex-profile .ex-slot { inset-block-start: 8px; background: var(--hub-surface); }
.ex-colours { margin: 8px 0 16px; }
.ex-colours h2 { font-size: 16px; margin: 0 0 4px; }
.ex-colours p { margin: 0 0 8px; color: var(--hub-muted); font-size: 14px; max-inline-size: 60ch; }
.ex-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.ex-swatch { display: inline-flex; align-items: center; gap: 8px; min-block-size: 44px; padding: 0 12px 0 6px; border-radius: 999px; border: 2px solid var(--hub-border); background: var(--hub-surface); color: var(--hub-text); font: 600 14px/1 "Geist", system-ui, sans-serif; cursor: pointer; text-transform: capitalize; }
.ex-swatch span { inline-size: 30px; block-size: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--sw-bg) 50%, var(--sw-ac) 50%); border: 1px solid var(--hub-border); }
.ex-swatch[aria-pressed="true"] { border-color: var(--hub-accent); box-shadow: 0 0 0 2px var(--hub-accent); }
.ex-profile-grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .ex-profile-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } }
.ex-friends { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ex-friends a, .ex-friend { display: flex; flex-direction: column; align-items: center; gap: 4px; min-block-size: 44px; text-align: center; font-size: 13px; text-decoration: none; color: var(--hub-text); overflow-wrap: anywhere; }
.ex-friends a span:last-child { text-decoration: underline; color: var(--hub-link); }
.ex-tracks { list-style: none; margin: 0; padding: 0; }
.ex-tracks li { display: grid; grid-template-columns: 1.5rem 1fr auto; gap: 8px; padding: 8px 0; border-block-end: 1px solid var(--hub-border); }
.ex-tracks small { color: var(--hub-muted); display: block; }
.ex-tr-n, .ex-tr-l { color: var(--hub-muted); font-variant-numeric: tabular-nums; }
.ex-comments { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ex-comments li { padding: 8px 10px; border-radius: 8px; background: var(--hub-bg); border: 1px solid var(--hub-border); }
.ex-comments p { margin: 0; }
.ex-c-h { font-size: 13px; color: var(--hub-muted); }

/* (b) channel */
.ex-ch-top { display: grid; gap: 12px; }
@media (min-width: 900px) { .ex-ch-top { grid-template-columns: minmax(0, 1fr) 300px; } }
.ex-player { position: relative; margin: 0; }
.ex-player figure { margin: 0; position: relative; border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.ex-player img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.ex-player figcaption { position: absolute; inset-block-start: 10px; inset-inline-end: 10px; }
.ex-player .ex-slot { inset-block-start: auto; inset-block-end: 10px; background: #000; color: #fff; border-color: #fff; }
.ex-live { display: inline-block; padding: 3px 10px; border-radius: 6px; background: #0a0a0a; color: #fff; font-weight: 700; font-size: 13px; }
.ex-chat { display: flex; flex-direction: column; background: var(--hub-surface); border: 2px solid var(--hub-border); border-radius: 12px; padding: 10px 12px; max-block-size: 420px; }
.ex-chat h2 { font-size: 16px; margin: 0 0 6px; }
.ex-chat ul { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: grid; gap: 6px; font-size: 14px; }
.ex-ch-below { display: grid; gap: 12px; margin-block-start: 12px; }
@media (min-width: 760px) { .ex-ch-below { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } }
.ex-panels { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.ex-panels .ex-panel { margin: 0; }
.ex-panel p { margin: 0 0 6px; }
.ex-clips { position: relative; }
.ex-clips > .ex-slot { inset-block-start: 4px; }
.ex-clip-row { list-style: none; margin: 0; padding: 4px 2px 10px; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; }
.ex-clip-row li { flex: 0 0 min(70%, 240px); scroll-snap-align: start; }
.ex-clip-row a { display: grid; gap: 6px; text-decoration: none; color: var(--hub-text); font-weight: 600; font-size: 14px; }
.ex-clip-row img { inline-size: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }

/* (c) notice board */
.ex-boardpage { background: var(--hub-bg); }
.ex-board { list-style: none; margin: 0; padding: 14px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); border-radius: 14px; background: #b98d55 radial-gradient(#a57a44 1px, transparent 1.5px) 0 0 / 10px 10px; box-shadow: inset 0 0 0 8px #8a5f2e; }
.ex-pin { position: relative; padding: 18px 14px 10px; color: #1d1a14; background: #fffdf2; border-radius: 4px; box-shadow: 0 3px 6px rgba(0, 0, 0, .3); }
.ex-pin a { color: #8a3519; }
.ex-pin-c1 { background: #fff7c2; transform: rotate(-1deg); }
.ex-pin-c2 { background: #e0f4e8; transform: rotate(1deg); }
.ex-pin-c3 { background: #ffe4da; transform: rotate(-.6deg); }
.ex-pin-c4 { background: #e6ebff; transform: rotate(.8deg); }
.ex-pin:focus-visible { outline: 4px solid #1d1a14; outline-offset: 3px; transform: none; }
.ex-tack { position: absolute; inset-block-start: 6px; inset-inline-start: 50%; inline-size: 14px; block-size: 14px; margin-inline-start: -7px; border-radius: 50%; background: #9a3d1f; box-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.ex-pin h3 { margin: 4px 0 4px; font-size: 17px; }
.ex-pin p { margin: 0 0 6px; }
.ex-pin .ex-by { color: #4a4234; }
.ex-pin .ex-poll-n { color: #4a4234; }
.ex-pin .ex-poll-bar { background: linear-gradient(to right, #2c6b3a var(--pct), #d5ccb4 var(--pct)); }
.ex-pin .ex-pin-type { color: #6b2a12; }
.ex-pin .ex-slot { position: static; display: inline-block; color: #4a4234; border-color: #8a7a5a; }
.ex-pin-foot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ex-pin .ex-badge { background: #1d1a14; color: #fff3c4; }
.ex-move { display: flex; gap: 6px; inline-size: 100%; }
.ex-move .ex-btn { flex: 1; padding: 0 8px; font-size: 13px; background: #fff; color: #1d1a14; border-color: #8a7a5a; }
.ex-move .ex-btn[disabled] { opacity: .45; cursor: default; }

@media (prefers-reduced-motion: reduce) { .ex-pin { transform: none !important; } }
