/* App directory (/apps/). On top of tokens.css, chrome.css and site.css. No green, no blue:
   state is shown by words and shape (a solid ink tick for checked, an ochre "!" for a caution);
   the one accent is orange, never as text. Kind is shape too: a program's tile is round, an
   app's is a rounded square with an orange edge. */
.ap { --ap-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

/* ---------- Top band ---------- */
.ap-band { background: var(--card); border-bottom: 1px solid var(--line); padding: 22px 0 18px; }
@media (min-width: 700px) { .ap-band { padding: 34px 0 22px; } }
.ap-band h1 { font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem); overflow-wrap: anywhere; }
.ap-band h1:focus { outline: none; }
.ap-band h1:focus-visible { outline: 3px solid var(--site-focus); outline-offset: 4px; }
.ap-lead { font-size: clamp(1.0625rem, 1.02rem + .2vw, 1.1875rem); line-height: 1.5; max-width: 40em; margin: 10px 0 12px; overflow-wrap: anywhere; }
.ap-band .site-on { margin: 0 0 10px; }
.ap-crumb { margin: 0 0 8px; font-size: .9375rem; }
.ap-crumb a::before { content: "← "; }
.ap-toplinks { margin: 0; font-size: .9375rem; }

.ap-main { padding-top: 14px; padding-bottom: 24px; }
.ap-status { min-height: 1.5em; margin: 0 0 10px; color: var(--dim); font-size: .9375rem; }

/* ---------- Search and filters ---------- */
.ap-search { margin: 0 0 18px; }
.ap-label { display: block; font-weight: 600; font-size: .9375rem; margin-bottom: 6px; }
.ap-row { display: flex; gap: 8px; }
.ap-search input[type="search"], .ap-search input[type="text"] {
  flex: 1 1 auto; min-width: 0; min-height: 48px; padding: 8px 14px; border: 1.5px solid var(--dim);
  border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 1rem; box-sizing: border-box;
}
.ap-search input::placeholder { color: var(--dim); opacity: 1; }
.ap-search input:focus-visible { outline: 3px solid var(--site-focus); outline-offset: 2px; border-color: var(--ink); }
.ap-search .site-btn { min-height: 48px; cursor: pointer; flex: none; }
.site-btn:disabled { opacity: .65; cursor: progress; }
@media (max-width: 420px) { .ap-row { flex-direction: column; } }
.ap-help { color: var(--dim); font-size: .875rem; margin: 8px 0 0; max-width: 46em; }
.ap-out { margin: 6px 0 0; font-size: .9375rem; min-height: 1.4em; }

.ap-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 14px; }
.ap-kinds { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 0; border: 0; min-width: 0; }
.ap-kinds legend { float: left; margin-right: 8px; color: var(--dim); font-size: .9375rem; }
.ap-kinds label { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 4px 14px 4px 10px; border: 1.5px solid var(--line); border-radius: 999px; font-size: .9375rem; font-weight: 500; cursor: pointer; }
.ap-kinds input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.ap-kinds input:focus-visible { outline: 3px solid var(--site-focus); outline-offset: 2px; }
.ap-kinds label:has(input:checked) { border-color: var(--ink); font-weight: 700; }
.ap-check { display: inline-flex; align-items: flex-start; gap: 8px; font-size: .9375rem; cursor: pointer; max-width: 40em; }
.ap-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.ap-check input:focus-visible { outline: 3px solid var(--site-focus); outline-offset: 2px; }

/* ---------- The list ---------- */
.ap-listhead { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 4px 0 10px; }
.ap-listhead h2 { font-size: 1.125rem; margin: 0; }
.ap-small { min-height: 36px; padding: 6px 14px; font-size: .9375rem; cursor: pointer; }

.ap-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 900px) { .ap-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ap-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.ap-card.is-app { border-left: 3px solid var(--orange); }
.ap-card p { margin: 0; }
.ap-card-main { min-width: 0; display: grid; gap: 4px; }
.ap-card-name { font-family: var(--font-head); font-weight: 700; font-size: 1.125rem; line-height: 1.3; overflow-wrap: anywhere; }
.ap-card-name a { color: var(--ink); }
.ap-ver { font-family: var(--font); font-weight: 500; font-size: .9375rem; color: var(--dim); }
.ap-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 1.5px solid var(--line); font-family: var(--font-head); font-weight: 700; font-size: .875rem; color: var(--ink); }
.ap-icon.is-app { border-radius: 11px; border-color: var(--orange); }
.ap-desc { overflow-wrap: anywhere; }
.ap-desc-big { font-size: 1.0625rem; max-width: 46em; margin: 0 0 12px; }
.ap-meta { color: var(--dim); font-size: .875rem; overflow-wrap: anywhere; }
.ap-meta b, .ap-meta a { color: var(--ink); }
.ap-dim { color: var(--dim); }
.ap-marks { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 2px; }
.ap-tag { display: inline-block; padding: 0 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--dim); font-family: var(--font); font-size: .8125rem; font-weight: 600; line-height: 1.6; vertical-align: middle; margin-right: 4px; }
.ap-tag.is-app { border-color: var(--orange-text); color: var(--ink); }
.ap-mark { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; font-weight: 600; color: var(--dim); }
.ap-mark.is-good { color: var(--ink); }
.ap-mark.is-warn { color: var(--warn); }
.ap-tick { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: .75rem; line-height: 1; border: 1.5px solid currentColor; }
.is-good > .ap-tick { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ap-mono, .ap-code code { font-family: var(--ap-mono); font-size: .875em; overflow-wrap: anywhere; word-break: break-all; }
code.ap-mono { background: none; border: 0; padding: 0; }
.ap-sep { color: var(--dim); }
.ap-empty { color: var(--dim); font-size: .9375rem; padding: 6px 0; }

.ap-invite { margin: 16px 0 4px; padding: 18px 20px; border: 1.5px dashed var(--line); border-radius: var(--radius); max-width: 46rem; }
.ap-invite h3 { margin: 0 0 6px; font-size: 1.125rem; }
.ap-invite-go { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.ap-invite-go a:not(.site-btn) { display: inline-block; padding: 8px 0; }

.ap-alert { background: var(--warn-bg); border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: var(--radius); padding: 14px 16px; margin: 14px 0; max-width: 46rem; }
.ap-alert p { margin: 0 0 .6em; }
.ap-alert p:last-child { margin-bottom: 0; }
.ap-alert .site-btn { margin-top: 6px; cursor: pointer; }

/* ---------- Detail views ---------- */
.ap-verdict { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 4px 0 14px; max-width: 52rem; background: var(--card); }
.ap-verdict.is-good { border-left: 4px solid var(--ink); }
.ap-verdict.is-warn { border-left: 4px solid var(--warn); background: var(--warn-bg); }
.ap-verdict p { margin: 0 0 .5em; }
.ap-verdict p:last-child { margin-bottom: 0; }
.ap-verdict-head { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; }
.ap-verdict.is-good .ap-tick { background: var(--ink); color: var(--paper); border-color: var(--ink); width: 24px; height: 24px; font-size: .875rem; }
.ap-verdict.is-warn .ap-verdict-head { color: var(--warn); }
.ap-verdict.is-warn .ap-tick { width: 24px; height: 24px; font-size: .875rem; }

.ap-sec { padding: 22px 0 6px; }
.ap-sec h2 { font-size: 1.25rem; margin-bottom: 10px; }
.ap-main > .ap-sec { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 26px; }
.ap-grid { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px; }
.ap-grid > div { display: grid; gap: 2px 16px; padding: 9px 0; border-top: 1px solid var(--line); }
.ap-grid > div:first-child { border-top: 0; }
@media (min-width: 640px) { .ap-grid > div { grid-template-columns: 13em minmax(0, 1fr); } }
.ap-grid dt { color: var(--dim); font-size: .9375rem; }
.ap-grid dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ap-plain { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.ap-calls { margin: 8px 0 0; padding-left: 1.2em; display: grid; gap: 2px; font-size: .9375rem; }
.ap-details summary { cursor: pointer; font-weight: 600; margin-top: 8px; }

.ap-cmd { position: relative; margin: 8px 0; }
.ap-code { margin: 8px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font-size: .8125rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; box-sizing: border-box; }
.ap-code code { background: none; border: 0; padding: 0; font-size: 1em; }
.ap-code:focus-visible { outline: 3px solid var(--site-focus); outline-offset: 2px; }
.ap-copy { display: inline-flex; align-items: center; min-height: 32px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); font: inherit; font-size: .8125rem; font-weight: 600; cursor: pointer; vertical-align: middle; }
.ap-copy:hover { border-color: var(--ink); }
.ap-copy:focus-visible { outline: 3px solid var(--site-focus); outline-offset: 2px; }
.ap-share { color: var(--dim); font-size: .875rem; margin: 14px 0 0; overflow-wrap: anywhere; }

/* ---------- Find, register, legend ---------- */
.ap-find .ap-search { max-width: 40rem; }
.ap-steps { margin: 12px 0; padding-left: 1.3em; display: grid; gap: 18px; max-width: 52rem; }
.ap-steps h3 { margin: 0 0 4px; }
.ap-legend { margin: 0; display: grid; gap: 10px; max-width: 52rem; }
.ap-legend dt { font-weight: 700; }
.ap-legend dd { margin: 2px 0 0; color: var(--ink); }
.ap-verdict.is-warn .ap-help, .ap-alert .ap-help { color: var(--ink); }
.ap-note { max-width: 46em; margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: .9375rem; }

/* LNS copy of the directory (apps-src/static.mjs): one plain block per app. */
.ap-lns-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.ap-lns-list code { overflow-wrap: anywhere; }

/* One-line search (2026-11-26): box, kind, "checked only" and the button on one row. */
.ap-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ap-oneline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ap-oneline input[type="search"] { flex: 1 1 14rem; min-width: 0; min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
.ap-oneline select { min-height: 40px; padding: 4px 8px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--card, transparent); color: var(--ink); font: inherit; font-size: .9375rem; }
.ap-oneline select:focus-visible { outline: 3px solid var(--site-focus); outline-offset: 2px; }
.ap-oneline .ap-check { align-items: center; white-space: nowrap; }
.ap-oneline .ap-check input { margin: 0; }
.ap-oneline .site-btn { min-height: 40px; }
