/* Product catalog: cards, the /products page (search, filters, featured banner) and product pages.
   Also the few shared pieces public pages borrow from the account area (chips, toasts, icons). */

.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.accent { color: var(--accent); }
.link { color: var(--text); text-decoration: underline; text-decoration-color: var(--strong); text-underline-offset: 3px; }
.link:hover { text-decoration-color: var(--accent); }
.btn { cursor: pointer; font-family: inherit; }
.btn-wide { width: 100%; justify-content: center; }
.btn.is-static { cursor: default; color: var(--muted); }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after { content: ''; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border: 2px solid var(--muted); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-primary.is-busy::after { border-color: #000; border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--text); background: var(--raised); border-color: var(--border); }
.loading { display: flex; gap: 8px; justify-content: center; padding: 96px 0; }
.loading span { width: 8px; height: 8px; background: var(--strong); animation: dots 1s infinite; }
.loading span:nth-child(2) { animation-delay: .15s; } .loading span:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 30% { background: var(--accent); } }

.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid; }
.tone-muted { color: var(--muted); border-color: var(--strong); }
.tone-info { color: #60A5FA; border-color: #1e3a5f; }
.tone-warn { color: #FBBF24; border-color: #5c4710; }
.tone-ok { color: #4ADE80; border-color: #1d5233; }
.tone-bad { color: #F87171; border-color: #5c2a2a; }
.tone-accent { color: var(--accent); border-color: #155e6b; }

#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--raised); border: 1px solid var(--strong); border-radius: 12px; font-size: 14px; max-width: 380px; animation: fade .2s both; }
.toast .i { width: 18px; height: 18px; }
.toast.tone-ok .i { color: #4ADE80; }
.toast.tone-bad { border-color: #5c2a2a; }
.toast.tone-bad .i { color: #F87171; }
.toast.leaving { opacity: 0; transition: opacity .3s; }

/* ---------------------------------------------------------------------------------------------- */
/* Product card */

.pgrid-public { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.latest { margin-top: 48px; }
.pc { position: relative; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: border-color .25s, transform .25s cubic-bezier(.2, .8, .2, 1); animation: fade .5s both; animation-delay: calc(var(--i, 0) * 60ms); }
.pc:hover { border-color: var(--strong); transform: translateY(-4px); }
.pc-cover { aspect-ratio: 16 / 9; background: var(--inset); border-bottom: 1px solid var(--divider); overflow: hidden; }
.pc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.pc:hover .pc-cover img { transform: scale(1.04); }
.pc-cover-empty { display: grid; place-items: center; }
.pc-cover-empty svg { width: 44px; height: 48px; }
.pc-badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.pc-badges-inline { position: static; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 5px; font: 700 10px 'JetBrains Mono', monospace; letter-spacing: .1em; text-transform: uppercase; background: #000; color: var(--text); border: 1px solid var(--strong); }
.badge-sale { color: #FBBF24; border-color: #5c4710; }
.badge-free { color: #4ADE80; border-color: #1d5233; }
.pc-body { display: grid; gap: 8px; padding: 20px 22px 16px; flex: 1; align-content: start; }
.pc-cat { font-size: 10px; color: var(--muted); margin: 0; }
.pc h3 { font-size: 21px; font-weight: 800; margin: 0; }
.pc-sum { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0; }
.pc-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.tag-chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--inset); color: var(--muted); font-size: 12px; font-family: inherit; cursor: pointer; transition: color .15s, border-color .15s; }
a.tag-chip:hover, button.tag-chip:hover { color: var(--text); border-color: var(--strong); }
.tag-chip.on { color: #000; background: var(--text); border-color: var(--text); }
.pc .tag-chip { cursor: inherit; }
.pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--divider); }
.price { font-weight: 800; font-size: 17px; }
.price s { color: var(--muted); font-weight: 400; font-size: .8em; margin-left: 6px; }
.price-tbd { color: var(--muted); font-weight: 600; font-size: 14px; }
.price-big { font-size: 30px; letter-spacing: -.02em; }
.price-big.price-tbd { font-size: 18px; }
.fwrow { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.fw { font-size: 10px; padding: 3px 7px; border: 1px solid var(--strong); border-radius: 4px; color: var(--muted); }

/* ---------------------------------------------------------------------------------------------- */
/* /products */

.catalog-section { padding: 40px 0 104px; }
.cat-bar { display: flex; gap: 12px; align-items: center; margin-bottom: 28px; }
.cat-search { flex: 1; display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 18px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; transition: border-color .15s; }
.cat-search:focus-within { border-color: #4a4a4a; }
.cat-search .i { color: var(--muted); }
.cat-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: inherit; font-size: 16px; }
.cat-search input::placeholder { color: #5c5c5c; }
.cat-sort { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 6px 0 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.cat-sort .mono { font-size: 10px; color: var(--muted); }
.cat-sort select { appearance: none; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238F8F8F' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center / 16px; border: 0; color: var(--text); font: 600 14px 'Sora', sans-serif; padding: 8px 32px 8px 4px; cursor: pointer; outline: none; }
.cat-sort option { background: var(--panel); }
.cat-filter-btn { display: none; height: 52px; }

.feature { display: grid; grid-template-columns: 1.25fr 1fr; margin-bottom: 36px; background: var(--panel); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; transition: border-color .25s; animation: fade .5s both; }
.feature:hover { border-color: var(--strong); }
.feature-cover { aspect-ratio: 16 / 9; background: var(--inset); border-right: 1px solid var(--divider); overflow: hidden; }
.feature-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.feature:hover .feature-cover img { transform: scale(1.03); }
.feature-body { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 36px 40px; }
.feature-label { font-size: 11px; color: var(--muted); margin: 0; }
.feature h2 { font-size: clamp(28px, 3vw, 40px); font-weight: 800; margin: 0; letter-spacing: -.02em; }
.feature-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; flex-wrap: wrap; }
.feature-foot .btn .i { width: 18px; height: 18px; }

.cat-layout { display: grid; grid-template-columns: 240px 1fr; gap: 36px; align-items: start; }
.cat-filters { position: sticky; top: 88px; display: grid; gap: 26px; }
.cat-filters-head { display: none; }
.cat-filters h3 { font-size: 10px; color: var(--muted); margin: 0 0 12px; }
.cat-cats { display: grid; gap: 2px; }
.cat-cat { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: 14px; text-align: left; cursor: pointer; position: relative; }
.cat-cat .mono { font-size: 11px; }
.cat-cat:hover:not(:disabled) { color: var(--text); background: var(--panel); }
.cat-cat.on { color: var(--text); background: var(--raised); }
.cat-cat.on::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: var(--accent); }
.cat-cat:disabled { opacity: .4; cursor: default; }
.cat-checks { display: grid; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); cursor: pointer; }
.check:hover { color: var(--text); }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check span { width: 18px; height: 18px; border: 1px solid var(--strong); border-radius: 5px; background: var(--inset); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.check input:checked + span { background: var(--text); border-color: var(--text); }
.check input:checked + span::after { content: ''; width: 9px; height: 5px; border-left: 2px solid #000; border-bottom: 2px solid #000; transform: rotate(-45deg) translate(1px, -1px); }
.check input:checked ~ * { color: var(--text); }
.check input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; background: var(--inset); border: 1px solid var(--border); border-radius: 10px; }
.seg button { padding: 7px 4px; border: 1px solid transparent; border-radius: 7px; background: none; color: var(--muted); font: 600 13px 'Sora', sans-serif; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--raised); color: var(--text); border-color: var(--strong); }
.cat-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.cat-clear { justify-self: start; }
.cat-count { font-size: 14px; margin: 0 0 16px; }
.cat-results .pgrid-public { grid-template-columns: repeat(3, 1fr); }
.cat-none { grid-column: 1 / -1; display: grid; justify-items: center; gap: 12px; padding: 64px 24px; border: 1px dashed var(--strong); border-radius: 16px; color: var(--muted); }
.cat-none .i { width: 28px; height: 28px; }
.cat-empty { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 80px 24px; border: 1px dashed var(--strong); border-radius: 18px; }
.cat-empty > .i { width: 34px; height: 34px; color: var(--muted); }
.cat-empty h2, .cat-empty h3 { margin: 0; font-size: 24px; }
.cat-empty h3 { font-size: 20px; }
.cat-empty p { max-width: 32em; margin: 0 0 8px; }
.cat-empty-sm { padding: 48px 24px; }

/* ---------------------------------------------------------------------------------------------- */
/* Product page (404.html shows it for /products/<id>) */

.product-route { display: none; }
html.is-product .product-route { display: block; }
html.is-product .notfound-route { display: none; }
.draft-bar { background: #17140b; border-bottom: 1px solid #3d3010; color: #FBBF24; font-size: 14px; }
.draft-bar .wrap { display: flex; align-items: center; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
.draft-bar .i { width: 16px; height: 16px; }
/* Management bar on product pages, and the in-page editor it opens (products/edit.js). */
.admin-bar { background: var(--inset); border-bottom: 1px solid var(--divider); font-size: 14px; }
.admin-bar .wrap { display: flex; align-items: center; gap: 14px; padding-top: 8px; padding-bottom: 8px; }
.admin-bar .mono { font-size: 11px; color: var(--muted); }
.admin-bar-state { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.admin-bar-state .i { width: 16px; height: 16px; }
.admin-bar.is-draft { background: #17140b; border-bottom-color: #3d3010; }
.admin-bar.is-draft .admin-bar-state { color: #FBBF24; }
.admin-bar-sp, .pe-sp { flex: 1; }
.admin-bar .btn .i { width: 16px; height: 16px; }
.pe { padding-bottom: 160px; }
.pe .pp-info { position: static; }
.pe .pp-side { position: static; }
.pe-hero { margin-bottom: 12px; }
.pe-cover { cursor: default; }
button.pe-cover { cursor: pointer; border-style: dashed; color: var(--muted); }
button.pe-cover:hover { border-color: var(--accent); }
.pe-tag { position: absolute; left: 12px; top: 12px; font-size: 10px; padding: 3px 8px; border-radius: 4px; background: rgba(0, 0, 0, .8); color: var(--text); }
.pe-hint { font-size: 13px; margin: 10px 0 0; }
.pe-field { display: grid; gap: 6px; }
.pe-field > span, .pe-label { font-size: 11px; color: var(--muted); }
.pe-field em { font-style: normal; float: right; }
.pe-name, .pe-sum { width: 100%; font-family: inherit; color: var(--text); background: var(--inset); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; outline: 0; transition: border-color .15s; }
.pe-name:focus, .pe-sum:focus { border-color: #4a4a4a; }
.pe-name { font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -.02em; }
.pe-sum { font-size: 15px; line-height: 1.55; resize: vertical; }
.pe-price { display: grid; gap: 12px; padding: 16px 0; border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }
.pe-money { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pe-money[hidden] { display: none; }
.pe-links { display: grid; gap: 12px; }
.pe-add { margin-top: 12px; }
.pe-bar { position: fixed; left: 0; right: 0; bottom: 20px; z-index: 30; display: flex; justify-content: center; padding: 0 16px; pointer-events: none; animation: fade .25s both; }
.pe-bar-in { display: flex; align-items: center; gap: 14px; width: min(760px, 100%); padding: 10px 10px 10px 18px; background: var(--raised); border: 1px solid var(--strong); border-radius: 14px; pointer-events: auto; }
.pe-state { font-size: 11px; color: var(--muted); }
.pe-bar .switch { align-items: center; }
.pe-bar .switch > span { margin-top: 0; }
.pe-bar .switch strong { font-size: 14px; font-weight: 600; }
.pe-bar .switch input:checked + span { background: var(--text); }
.pp { padding-top: 32px; padding-bottom: 104px; }
.crumbs { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-bottom: 24px; }
.crumbs a:hover { color: var(--text); }
.crumbs span:last-child { color: var(--text); }
.pp-top { display: grid; grid-template-columns: 1.45fr 1fr; gap: 36px; align-items: start; }
.pp-main { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--inset); cursor: zoom-in; animation: fade .5s both; }
.pp-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-zoom { position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: rgba(0, 0, 0, .7); border: 1px solid var(--strong); color: var(--text); opacity: 0; transition: opacity .2s; }
.pp-main:hover .pp-zoom { opacity: 1; }
.pp-zoom .i { width: 18px; height: 18px; }
.pp-main-empty { display: grid; place-items: center; align-content: center; gap: 10px; cursor: default; }
.pp-main-empty .i { width: 34px; height: 34px; color: var(--muted); }
.pp-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 12px; }
.pp-thumb { aspect-ratio: 16 / 9; padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--inset); cursor: pointer; opacity: .6; transition: opacity .2s, border-color .2s; }
.pp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-thumb:hover { opacity: 1; }
.pp-thumb.on { opacity: 1; border-color: var(--accent); }
.pp-info { position: sticky; top: 88px; display: grid; gap: 16px; padding: 28px; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; animation: fade .5s .08s both; }
.pp-info h1 { margin: 0; font-size: clamp(30px, 3.4vw, 42px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.pp-sum { color: var(--muted); margin: 0; }
.pp-price { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }
.pp-action .btn .i { width: 18px; height: 18px; }
.pp-meta { display: grid; gap: 10px; margin: 0; }
.pp-meta div { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.pp-meta dt { color: var(--muted); }
.pp-meta dd { margin: 0; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.pp-links { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.pp-links .btn .i { width: 16px; height: 16px; }
.pp-body { display: grid; grid-template-columns: 1fr 260px; gap: 48px; margin-top: 56px; }
.pp-section { padding: 32px 0; border-top: 1px solid var(--divider); }
.pp-section:first-child { border-top: 0; padding-top: 0; }
.pp-section h2, .pp-side h2 { font-size: 11px; color: var(--muted); margin: 0 0 20px; }
.pp-features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pp-features li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; font-size: 15px; }
.pp-features .i { width: 18px; height: 18px; color: var(--accent); margin-top: 2px; }
.pp-issues { display: grid; gap: 10px; }
.pp-issue { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.pp-issue .chip { flex: none; margin-top: 1px; }
.pp-issue strong { display: block; font-weight: 600; }
.pp-issue p { margin: 4px 0 0; font-size: 14px; }
.pp-issue small { display: block; margin-top: 6px; font-size: 11px; }
.pp-video { aspect-ratio: 16 / 9; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--inset); }
.pp-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.pp-changes { display: grid; gap: 14px; }
.pp-changes article { padding: 18px 20px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.pp-changes header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 14px; }
.pp-side { position: sticky; top: 88px; align-self: start; }
.pp-related { margin-top: 72px; padding-top: 48px; border-top: 1px solid var(--divider); }
.pp-related h2 { font-size: 24px; margin: 0 0 24px; }

/* Formatted descriptions */
.prose { color: #cfcfcf; font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--text); line-height: 1.3; margin: 1.6em 0 .5em; font-family: 'Sora', sans-serif; letter-spacing: -.01em; }
.prose h1 { font-size: 26px; } .prose h2 { font-size: 22px; color: var(--text); text-transform: none; letter-spacing: -.01em; } .prose h3 { font-size: 18px; } .prose h4 { font-size: 16px; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose table { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .25em 0; }
.prose li::marker { color: var(--muted); }
.prose a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.prose code { font-family: 'JetBrains Mono', monospace; font-size: .85em; padding: 2px 6px; background: var(--inset); border: 1px solid var(--border); border-radius: 5px; }
.prose pre { padding: 16px 18px; background: var(--inset); border: 1px solid var(--border); border-radius: 12px; overflow-x: auto; }
.prose pre code { padding: 0; border: 0; background: none; }
.prose blockquote { padding: 2px 0 2px 16px; border-left: 2px solid var(--strong); color: var(--muted); }
.prose img { max-width: 100%; border-radius: 12px; border: 1px solid var(--border); }
.prose hr { border: 0; border-top: 1px solid var(--divider); margin: 2em 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.prose.small { font-size: 14px; }

/* Full-screen image viewer */
.lightbox { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 56px 72px; background: rgba(0, 0, 0, .94); animation: fade .2s both; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; border: 1px solid var(--strong); }
.lightbox .icon-btn { position: absolute; width: 44px; height: 44px; color: var(--text); border-color: var(--strong); background: var(--panel); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; translate: 0 -50%; }
.lb-next { right: 16px; top: 50%; translate: 0 -50%; }
.lb-count { position: absolute; bottom: 18px; left: 50%; translate: -50% 0; font-size: 11px; color: var(--muted); }

/* ---------------------------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .cat-results .pgrid-public { grid-template-columns: repeat(2, 1fr); }
  .pp-top { grid-template-columns: 1fr; }
  .pp-info { position: static; }
  .pp-body { grid-template-columns: 1fr; gap: 0; }
  .pp-side { position: static; padding-top: 32px; border-top: 1px solid var(--divider); }
}
@media (max-width: 860px) {
  .pgrid-public, .cat-results .pgrid-public { grid-template-columns: 1fr 1fr; }
  .cat-layout { grid-template-columns: 1fr; }
  .cat-filter-btn { display: inline-flex; }
  .cat-filters { display: none; position: fixed; inset: 0; z-index: 60; overflow-y: auto; padding: 20px 16px 32px; background: var(--bg); align-content: start; }
  .cat-filters.open { display: grid; animation: fade .2s both; }
  .cat-filters-head { display: flex; justify-content: space-between; align-items: center; }
  .cat-filters-head h2 { margin: 0; font-size: 20px; }
  .feature { grid-template-columns: 1fr; }
  .feature-cover { border-right: 0; border-bottom: 1px solid var(--divider); }
  .feature-body { padding: 24px; }
}
@media (max-width: 560px) {
  .pgrid-public, .cat-results .pgrid-public { grid-template-columns: 1fr; }
  .cat-bar { flex-wrap: wrap; }
  .cat-search { flex-basis: 100%; }
  .cat-sort { flex: 1; }
  .pp-features { grid-template-columns: 1fr; }
  .lightbox { padding: 64px 12px; }
  #toasts { left: 16px; right: 16px; bottom: 16px; }
  .admin-bar .wrap { flex-wrap: wrap; gap: 8px 14px; }
  .pe-money { grid-template-columns: 1fr; }
  .pe-bar { bottom: 12px; }
  .pe-bar-in { flex-wrap: wrap; padding: 10px 12px; }
  .pe-state { flex-basis: 100%; }
}

/* ---------------------------------------------------------------------------------------------- */
/* Routes served by 404.html: work projects and docs pages use the product page's switch */
html.is-route .product-route { display: block; }
html.is-route .notfound-route { display: none; }

/* Work (showcase) */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.wk { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; transition: border-color .25s, transform .25s var(--ease); animation: fade .5s both; animation-delay: calc(var(--i, 0) * 60ms); }
.wk:hover { border-color: var(--strong); transform: translateY(-4px); }
.wk .pc-cover { aspect-ratio: 16 / 9; }
.wk:hover .pc-cover img { transform: scale(1.03); }
.wk-body { display: grid; gap: 8px; padding: 22px 24px 24px; align-content: start; }
.wk-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 10px; color: var(--muted); }
.wk h3 { font-size: 22px; font-weight: 800; }
.wk p { color: var(--muted); font-size: 15px; }
.wk-tech { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.wk-feature { grid-column: 1 / -1; display: grid; grid-template-columns: 1.3fr 1fr; }
.wk-feature .pc-cover { border-bottom: 0; border-right: 1px solid var(--divider); aspect-ratio: auto; min-height: 320px; }
.wk-feature .wk-body { align-content: center; padding: 36px; }
.wk-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.quote-card { padding: 24px 26px; background: var(--panel) var(--dots); border: 1px solid var(--border); border-radius: 16px; }
.quote-card blockquote { margin: 10px 0 14px; font-size: 18px; line-height: 1.6; color: var(--text); }
.quote-card cite { font-style: normal; font-size: 13px; color: var(--muted); }
.quotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }

/* Reviews */
.stars { display: inline-flex; gap: 2px; color: var(--text); }
.stars svg { width: 16px; height: 16px; fill: currentColor; }
.stars .off { color: var(--strong); }
.rating-sum { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.rating-sum strong { font-size: 40px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.rating-sum .muted { font-size: 14px; }
.reviews { display: grid; gap: 14px; }
.review { padding: 20px 22px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; }
.review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.review-head img, .review-head .rv-face { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); background: var(--raised); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.review-head > div { flex: 1; display: grid; }
.review-head strong { font-size: 14px; }
.review-head small { font-size: 12px; color: var(--muted); }
.review h4 { margin: 0 0 6px; font-size: 16px; }
.review p { color: #cfcfcf; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.verified { display: inline-flex; align-items: center; gap: 4px; font: 700 9px 'JetBrains Mono', monospace; letter-spacing: .1em; color: #4ADE80; }
.verified svg { width: 12px; height: 12px; }
.review-reply { margin-top: 14px; padding: 12px 14px; border-left: 2px solid var(--accent); background: var(--inset); border-radius: 0 10px 10px 0; font-size: 14px; }
.review-reply .mono { font-size: 9px; color: var(--muted); display: block; margin-bottom: 4px; }
.review-form { display: grid; gap: 14px; padding: 22px; margin-bottom: 18px; background: var(--panel); border: 1px solid var(--strong); border-radius: 14px; }
.review-form input, .review-form textarea { width: 100%; padding: 12px 14px; background: var(--inset); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font: inherit; font-size: 15px; outline: none; }
.review-form textarea { resize: vertical; min-height: 110px; }
.review-form-foot { display: flex; justify-content: flex-end; gap: 10px; }
.star-pick { display: flex; gap: 4px; }
.star-pick button { width: 38px; height: 38px; display: grid; place-items: center; background: none; border: 1px solid var(--border); border-radius: 8px; color: var(--strong); cursor: pointer; }
.star-pick button.on { color: var(--text); border-color: var(--strong); }
.star-pick svg { width: 18px; height: 18px; fill: currentColor; }

/* Docs */
.docs-home { display: grid; gap: 44px; }
.docs-group h2 { font-size: 22px; margin: 0 0 16px; }
.docs-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.doc-card { display: grid; gap: 6px; align-content: start; padding: 18px 20px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; transition: border-color .2s, transform .2s var(--ease); }
.doc-card:hover { border-color: var(--strong); transform: translateY(-2px); }
.doc-card .mono { font-size: 10px; color: var(--muted); }
.doc-card strong { font-size: 16px; }
.doc-card p { font-size: 13px; color: var(--muted); }
.doc-layout { display: grid; grid-template-columns: 240px 1fr 200px; gap: 48px; padding-top: 32px; padding-bottom: 104px; align-items: start; }
.doc-nav { position: sticky; top: 88px; display: grid; gap: 2px; max-height: calc(100vh - 110px); overflow-y: auto; }
.doc-nav .mono { font-size: 10px; color: var(--muted); margin: 14px 0 4px; }
.doc-nav .mono:first-child { margin-top: 0; }
.doc-nav a { padding: 7px 12px; border-left: 1px solid var(--border); font-size: 14px; color: var(--muted); transition: color .15s; }
.doc-nav a:hover { color: var(--text); }
.doc-nav a[aria-current] { color: var(--text); border-left: 2px solid var(--accent); padding-left: 11px; }
.doc-body { min-width: 0; }
.doc-body h1 { font-size: clamp(30px, 3.4vw, 42px); font-weight: 800; letter-spacing: -.02em; margin: 6px 0 24px; line-height: 1.1; }
.doc-body .prose h2, .doc-body .prose h3 { scroll-margin-top: 90px; }
.doc-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--divider); }
.doc-foot a { display: grid; gap: 2px; padding: 14px 18px; border: 1px solid var(--border); border-radius: 12px; min-width: 200px; transition: border-color .2s; }
.doc-foot a:hover { border-color: var(--strong); }
.doc-foot .mono { font-size: 10px; color: var(--muted); }
.doc-foot .next { text-align: right; margin-left: auto; }
.doc-toc { position: sticky; top: 88px; display: grid; gap: 4px; font-size: 13px; }
.doc-toc .mono { font-size: 10px; color: var(--muted); margin-bottom: 6px; }
.doc-toc a { color: var(--muted); padding: 3px 0; }
.doc-toc a:hover { color: var(--text); }
.doc-toc a.sub { padding-left: 12px; }
@media (max-width: 1100px) { .doc-layout { grid-template-columns: 220px 1fr; } .doc-toc { display: none; } .docs-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .doc-layout { grid-template-columns: 1fr; gap: 24px; }
  .doc-nav { position: static; max-height: none; border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
  .work-grid { grid-template-columns: 1fr; }
  .wk-feature { grid-template-columns: 1fr; }
  .wk-feature .pc-cover { border-right: 0; border-bottom: 1px solid var(--divider); min-height: 0; aspect-ratio: 16 / 9; }
  .docs-cards { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------------------------------- */
/* Formatted text extras: code blocks (label, copy, syntax colors in the brand), callouts, checklists */

.code-box { margin: 0 0 1.2em; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--inset); }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 6px 14px; border-bottom: 1px solid var(--divider); background: var(--panel); }
.code-head .mono { font-size: 10px; color: var(--muted); }
.code-copy { padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; background: none; color: var(--muted); font: 600 12px 'Sora', sans-serif; cursor: pointer; }
.code-copy:hover { color: var(--text); border-color: var(--strong); }
.prose .code-box pre { margin: 0; border: 0; border-radius: 0; background: none; }
.prose pre code { font-size: 13.5px; line-height: 1.7; color: #d6d6d6; }
.hljs-keyword, .hljs-built_in, .hljs-literal, .hljs-selector-tag { color: var(--accent); }
.hljs-string, .hljs-regexp, .hljs-attr, .hljs-symbol { color: #EDEDED; }
.hljs-number, .hljs-type { color: #FBBF24; }
.hljs-comment, .hljs-quote, .hljs-meta { color: #5c5c5c; font-style: italic; }
.hljs-title, .hljs-title.function_, .hljs-section { color: #ffffff; font-weight: 700; }
.hljs-variable, .hljs-params, .hljs-property { color: #bdbdbd; }
.hljs-tag, .hljs-name { color: var(--muted); }
.hljs-deletion { color: #F87171; } .hljs-addition { color: #4ADE80; }

.prose blockquote.callout { padding: 14px 18px; border: 1px solid var(--border); border-left: 3px solid var(--muted); border-radius: 0 12px 12px 0; background: var(--panel); color: #cfcfcf; }
.prose blockquote.callout p:last-child { margin-bottom: 0; }
.callout-title { display: block; margin-bottom: 4px; font: 700 10px 'JetBrains Mono', monospace; letter-spacing: .14em; text-transform: uppercase; }
.callout-note { border-left-color: var(--accent) !important; } .callout-note .callout-title { color: var(--accent); }
.callout-tip { border-left-color: #4ADE80 !important; } .callout-tip .callout-title { color: #4ADE80; }
.callout-warning { border-left-color: #FBBF24 !important; } .callout-warning .callout-title { color: #FBBF24; }
.callout-important { border-left-color: #F87171 !important; } .callout-important .callout-title { color: #F87171; }
.prose li:has(> input[type="checkbox"]) { list-style: none; margin-left: -1.3em; }
.prose input[type="checkbox"] { appearance: none; width: 15px; height: 15px; margin: 0 8px -2px 0; border: 1px solid var(--strong); border-radius: 4px; background: var(--inset); vertical-align: baseline; }
.prose input[type="checkbox"]:checked { background: var(--text); border-color: var(--text); }
.prose del { color: var(--muted); }
.prose table { display: block; overflow-x: auto; }
.prose th { background: var(--panel); color: var(--text); font-weight: 700; }

/* Addons and bundles */
.badge-kind { color: var(--accent); border-color: #155e6b; }
.pc-req { margin: -2px 0 2px; font-size: 10px; color: var(--accent); letter-spacing: .1em; }
.pp-req { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--inset); }
.pp-req .mono { font-size: 10px; color: var(--muted); }
.pp-req a { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 600; }
.pp-req a:hover { color: var(--accent); }
.pp-req .ok { color: #4ADE80; font: 700 10px 'JetBrains Mono', monospace; letter-spacing: .1em; }
.pp-req .no { color: var(--muted); font: 700 10px 'JetBrains Mono', monospace; letter-spacing: .1em; }
.bundle-save { display: flex; align-items: baseline; gap: 10px; font-size: 13px; color: #4ADE80; }
.bundle-save s { color: var(--muted); }

/* ---------------------------------------------------------------------------------------------- */
/* Nothing published yet (/work, /docs) */

.soon { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: center; padding: 48px; background: var(--panel); border: 1px solid var(--border); border-radius: 18px; }
.soon-head { display: grid; justify-items: start; gap: 12px; }
.soon-ic { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--strong); border-radius: 12px; background: var(--inset); }
.soon-ic .i { width: 22px; height: 22px; }
.soon-label { margin: 8px 0 0; font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.soon h2 { margin: 0; font-size: 28px; line-height: 1.2; }
.soon-head > p.muted { margin: 0; max-width: 30em; }
.soon-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.soon-grid { display: grid; gap: 12px; }
.soon-tile { display: grid; grid-template-columns: 22px 1fr; column-gap: 14px; row-gap: 2px; padding: 18px 20px; background: var(--inset); border: 1px solid var(--divider); border-radius: 14px; animation: fade .5s both; animation-delay: calc(var(--i, 0) * 80ms); }
.soon-tile .i { grid-row: span 2; width: 20px; height: 20px; color: var(--muted); margin-top: 2px; }
.soon-tile strong { font-size: 15px; }
.soon-tile p { margin: 0; font-size: 14px; color: var(--muted); }
@media (max-width: 860px) {
  .soon { grid-template-columns: 1fr; padding: 28px 22px; gap: 28px; }
  .soon h2 { font-size: 24px; }
  .soon-actions .btn { flex: 1 1 auto; justify-content: center; }
}
