/* Plugins (plugins.js; the Founder, 8 October 2026): rounded lists, rounded tiles, pills, a floating search.
   Every press is 44 px or more; nothing is wider than the page at 390. */
.plugins{display:grid;gap:26px;max-width:760px;min-width:0;padding-bottom:8px}
[data-plug-body]{display:grid;gap:30px;min-width:0}
.plug-section{display:grid;gap:10px;min-width:0}
.plug-section-title{display:inline-flex;align-items:center;gap:4px;margin:0;color:var(--muted);font-size:1.06rem;font-weight:650;letter-spacing:-.005em;min-height:32px;justify-self:start;text-decoration:none}
a.plug-section-title:hover{color:var(--ink)}
.plug-section-title svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.plug-note{margin:-4px 0 0;color:var(--muted);font-size:.86rem;line-height:1.45}
.plug-empty{margin:0;padding:16px 18px;border:1px dashed var(--line);border-radius:18px;color:var(--muted);font-size:.92rem}
.plug-question{padding:16px 18px;border:1px solid var(--line);border-radius:18px;background:var(--surface,#fff)}
.plug-question h3{margin:0 0 6px;font-size:.98rem;font-weight:650;color:var(--ink)}
.plug-question p{margin:0;color:var(--muted);font-size:.92rem;line-height:1.5;overflow-wrap:anywhere}

/* The rounded tile: the plugin's colour, a white glyph. */
.plug-tile{flex:none;display:grid;place-items:center;width:46px;height:46px;border-radius:13px;background:var(--plug,#6d28b5);color:#fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08),0 1px 2px rgba(20,16,32,.12)}
.plug-tile svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.plug-tile-small{width:34px;height:34px;border-radius:10px}
.plug-tile-small svg{width:19px;height:19px}
/* An app's own mark (app-logos.js): filled, white on its colour, or its colour on white (Google's apps). */
.plug-tile .plug-logo{width:22px;height:22px;fill:currentColor;stroke:none}
.plug-tile-light{background:#fff;color:var(--plug);box-shadow:inset 0 0 0 1px rgba(20,16,32,.12),0 1px 2px rgba(20,16,32,.1)}
.plug-tile-initial .plug-logo text{font:700 15px/1 system-ui,-apple-system,"Segoe UI",sans-serif;fill:#fff}
.plug-tile-small .plug-logo{width:18px;height:18px}
.is-coming .plug-tile{filter:saturate(.55);opacity:.82}

.plug-text{display:grid;gap:2px;min-width:0;flex:1}
.plug-text strong{font-size:1rem;font-weight:600;color:var(--ink);line-height:1.3;overflow-wrap:anywhere}
.plug-text span,.plug-text small{color:var(--muted);font-size:.88rem;line-height:1.35;overflow-wrap:anywhere}
.plug-text .plug-in-count{color:var(--green);font-weight:600;font-size:.8rem}

/* Plugged in: one rounded list, rows divided by an inset line. */
.plug-list{list-style:none;margin:0;padding:4px 0;background:var(--surface,#fff);border:1px solid var(--line);border-radius:20px;overflow:hidden}
.plug-list li+li .plug-item::before{content:"";position:absolute;top:0;inset-inline-start:64px;inset-inline-end:16px;border-top:1px solid var(--line)}
.plug-item{position:relative;display:flex;align-items:center;gap:14px;min-height:60px;padding:10px 16px;color:inherit;text-decoration:none}
.plug-item:hover{background:var(--soft)}
.plug-item:focus-visible{outline:3px solid var(--purple);outline-offset:-3px;border-radius:16px}
.plug-item .plug-text span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.plug-count{flex:none;min-width:30px;height:26px;padding:0 9px;display:grid;place-items:center;border-radius:13px;background:color-mix(in srgb,var(--purple) 14%,transparent);color:var(--purple);font-size:.84rem;font-weight:650;font-variant-numeric:tabular-nums}
.plug-chevron{flex:none;width:18px;height:18px;fill:none;stroke:var(--muted);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* Each kind: rows of tile, name and line, and the press at the right. */
.plug-rows{list-style:none;margin:0;padding:0;display:grid;gap:4px}
.plug-row{display:flex;align-items:center;gap:14px;min-height:64px;padding:8px 4px;min-width:0}
.plug-icon-button{flex:none;display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:22px;background:transparent;color:var(--ink);cursor:pointer;text-decoration:none}
.plug-icon-button:hover{background:var(--soft)}
.plug-icon-button:focus-visible{outline:3px solid var(--purple);outline-offset:1px}
.plug-icon-button svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.plug-icon-button[data-plug-open] svg{stroke-width:3.2}
.plug-ask{flex:none;min-height:44px;padding:0 14px;border:1px solid var(--line);border-radius:22px;background:transparent;color:var(--ink);font:inherit;font-size:.86rem;font-weight:600;cursor:pointer;white-space:nowrap}
.plug-ask:hover{background:var(--soft)}
.plug-ask:disabled{opacity:.6;cursor:default}
.plug-asked,.plug-off{flex:none;color:var(--muted);font-size:.86rem;font-weight:600;white-space:nowrap;padding:0 6px}
.plug-done{flex:none;color:var(--green);font-size:.92rem;font-weight:600;white-space:nowrap}

/* Plugins settings: Permissions, the line under it, then the list. */
.plug-permissions{display:flex;align-items:center;gap:10px;min-height:58px;padding:10px 18px;border:1px solid var(--line);border-radius:20px;background:var(--surface,#fff);color:inherit;text-decoration:none}
.plug-permissions:hover{background:var(--soft)}
.plug-permissions strong{flex:1;font-weight:600}
.plug-permissions-said{color:var(--muted);font-size:.95rem;text-align:end}
.plug-permissions-note{margin:-14px 6px 0}

/* The search floats at the bottom of the page while it scrolls. */
.plug-search-wrap{position:sticky;bottom:max(calc(14px + env(safe-area-inset-bottom,0px)),calc(var(--terminal-clearance,0px) + 2px));z-index:3;display:flex;justify-content:center;pointer-events:none;margin-top:4px}
.plug-search{pointer-events:auto;display:flex;align-items:center;gap:10px;width:min(100%,560px);min-height:50px;padding:0 18px;border:1px solid var(--line);border-radius:26px;background:color-mix(in srgb,var(--surface,#fff) 92%,transparent);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);box-shadow:0 10px 30px rgba(20,16,32,.12),0 1px 3px rgba(20,16,32,.08)}
.plug-search svg{flex:none;width:20px;height:20px;fill:none;stroke:var(--ink);stroke-width:2;stroke-linecap:round}
.plug-search input{flex:1;min-width:0;min-height:46px;border:0;background:transparent;color:var(--ink);font:inherit;font-size:1rem;outline:none}
.plug-search input::placeholder{color:var(--muted)}
.plug-search:focus-within{outline:none;border-color:var(--purple);box-shadow:inset 0 0 0 1px var(--purple),0 10px 30px rgba(20,16,32,.12),0 1px 3px rgba(20,16,32,.08)}

/* + at the top right of the heading. */
.plug-round{display:grid;place-items:center;width:46px;height:46px;border:1px solid var(--line);border-radius:23px;background:var(--surface,#fff);color:var(--ink);cursor:pointer;box-shadow:0 1px 3px rgba(20,16,32,.06)}
.plug-round:hover{background:var(--soft)}
.plug-round:focus-visible{outline:3px solid var(--purple);outline-offset:2px}
.plug-round svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* The add sheet. */
dialog.plug-sheet{width:min(560px,100vw);max-width:100vw;height:min(860px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);margin:auto;padding:0;border:0;border-radius:28px;background:var(--canvas,#f7f8fa);color:var(--ink);display:none;flex-direction:column;overflow:hidden;box-shadow:0 30px 80px rgba(20,16,32,.28)}
dialog.plug-sheet[open]{display:flex}
dialog.plug-sheet::backdrop{background:rgba(20,16,32,.36)}
.plug-sheet-head{display:grid;grid-template-columns:46px 1fr 46px;align-items:center;gap:10px;padding:16px 16px 8px}
.plug-sheet-head h2{margin:0;text-align:center;font-size:1.15rem;font-weight:650}
.plug-sheet-body{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:8px 16px 90px}
dialog.plug-sheet .plug-search-wrap{position:absolute;inset-inline-start:16px;inset-inline-end:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px))}
.plug-cards{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.plug-card{display:grid;gap:8px;padding:16px;border-radius:20px;background:var(--surface,#fff);border:1px solid var(--line)}
.plug-card-head{display:flex;align-items:center;gap:12px;min-width:0}
.plug-card p{margin:0;color:var(--ink);font-size:.93rem;line-height:1.45}
.plug-pill{flex:none;min-height:44px;padding:0 20px;border:0;border-radius:22px;background:#15131b;color:#fff;font:inherit;font-size:.92rem;font-weight:650;cursor:pointer;white-space:nowrap}
.plug-pill:hover{background:#2c2838}
.plug-pill:focus-visible{outline:3px solid var(--purple);outline-offset:2px}
.plug-pill-outline{background:transparent;color:var(--ink);border:1px solid var(--line)}
.plug-pill-outline:hover{background:var(--soft)}
[data-theme=dark] .plug-pill:not(.plug-pill-outline){background:#f0f1f5;color:#15131b}
[data-theme=dark] .plug-pill:not(.plug-pill-outline):hover{background:#d9dae2}
[data-theme=dark] .plug-search{box-shadow:0 10px 30px rgba(0,0,0,.4)}

@media (max-width:640px){
  .plugins{gap:22px}
  .plug-row{gap:12px}
  .plug-tile{width:44px;height:44px;border-radius:12px}
  .plug-list li+li .plug-item::before{inset-inline-start:62px}
  dialog.plug-sheet{width:100vw;height:calc(100dvh - 10px);max-height:calc(100dvh - 10px);margin:10px 0 0;border-radius:26px 26px 0 0}
  .plug-ask{padding:0 12px}
}
.plug-github .github-head{display:none}

/* An app plugged in (ADR-043): no page of its own, so its row is not a link; Unplug at the right. */
div.plug-item-app:hover{background:transparent}
.plug-item-app .plug-ask{margin-left:auto}
