/* Swiss Dark storefront. The same rail carries the navigation, storefronts and forms. */
:root { --max: 1440px; --maker-accent: var(--white); }
.site-header { position: sticky; top: 0; z-index: 60; }
.site-header .site-header-inner { grid-template-columns: auto auto minmax(0, 1fr) auto; }
.site-header .header-search { min-width: 0; margin: 0; }
.site-header .header-search input { flex: 1; min-width: 0; font-size: 16px; }
.header-search button, .header-account summary {
  cursor: pointer; border: 0; background: var(--black); color: var(--white); font: 700 14px var(--sans);
  padding-inline: 16px; min-height: 44px;
}
.header-search button { flex: none; white-space: nowrap; border-inline-start: 2px solid var(--white); }
.header-account { position: relative; }
.header-account summary { display: grid; align-items: center; height: 100%; }
.header-account > div { position: absolute; right: 0; top: 100%; min-width: max-content; border: 2px solid var(--white); background: var(--black); }
.header-account a { display: block; padding: 12px 16px; }
.header-account a:hover, .header-search button:hover, .header-account summary:hover { background: var(--white); color: var(--black); }
.site-header :focus-visible { outline-offset: -3px; }

#main > :is(.home, .cat, .product, .deals-page, .maker-head, .maker-story-grid, .catalog, .idx-section, .notes, .door, .page-band, .store-canvas),
#main > .store-editor { width: 100%; max-width: var(--max); margin-inline: auto; }
.storefront :is(.w, .tile-card, .tile-body, .tile-foot, .buy.product-buy, .notes, .story-col, .deal-card, .product-lede, .product .prose) {
  background: var(--black); color: var(--white);
}
.storefront :is(.sec-bar, .tile-card, .tile-foot, .spec-cell, .product .buy, .notes-list li, .deal-card) { border-color: var(--white); }
.storefront .sec-bar { padding: 24px var(--gutter); border-bottom: 2px solid var(--white); }
.storefront .sec-code, .tag, .dir-badge {
  display: inline-flex; align-items: center; width: fit-content; padding: 4px 10px;
  border: 2px solid var(--white); background: var(--black); color: var(--white); font: 700 12px var(--mono);
}
.storefront .sec-title { color: var(--white); }
.storefront .tag.is-hand { color: var(--black); background: var(--hand); border-color: var(--hand); }
.storefront .home-cut { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); border: 2px solid var(--white); border-top: 0; }
.hero-left, .hero-right { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding: 40px var(--gutter); }
.hero-left { padding-top: 48px; border-right: 2px solid var(--white); }
.hero-right { padding-block: 36px; gap: 18px; }
.hero-title { margin-top: 24px; font-size: clamp(36px, 4.6vw, 64px); font-weight: 800; letter-spacing: var(--track-title); line-height: 1; color: var(--hand); }
.hero-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 2px solid var(--white); padding-top: 16px; font: 13px var(--mono); }
.iogen-credit { --maker-accent: var(--hand); }
.potd-head, .potd-foot, .potd-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.potd-head svg { flex: none; }
.potd-frame { border: 2px solid var(--white); }
.potd-media { position: relative; width: 100%; aspect-ratio: 16/9; max-height: 220px; overflow: hidden; border-bottom: 2px solid var(--white); }
.potd-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.potd-body { display: grid; gap: 10px; padding: 18px 20px; }
.potd-body h2 { font-size: 24px; font-weight: 800; }
.potd-actions { justify-content: flex-start; }
.potd-foot { padding: 12px 20px; border-top: 2px solid var(--white); font: 13px var(--mono); }
.home-featured { border-inline: 2px solid var(--white); }
.storefront :is(.tile-desc, .tile-price, .shelf-desc, .maker-link, .creator-block) { color: var(--maker-accent); }
.tile-card .tile-foot { border-top: 2px solid var(--white); }
.storefront .tile-card-link:hover, .maker-link:hover, .soft-link:hover { text-decoration: underline; }
.maker-link, .soft-link { position: relative; z-index: 2; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.btn-maker, .btn-maker-outline {
  display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 12px;
  font: 700 13px var(--mono); border: 2px solid var(--maker-accent); color: var(--maker-accent); background: var(--black);
}
.potd-actions .btn-maker { min-height: 44px; }
.btn-maker, .btn-maker-outline:hover { color: var(--black); background: var(--maker-accent); }
.btn-maker:hover { color: var(--maker-accent); background: var(--black); }
.storefront .tile-badge { background: var(--maker-accent); color: var(--black); }
.tile-card.bare > .tile-badge { position: static; align-self: flex-start; margin: 0 20px 12px; }
.tile-media:has(.store-pin-badge) .tile-badge:not(.store-pin-badge),
.tile-card.bare:has(> .store-pin-badge) > .tile-badge:not(.store-pin-badge) { display: none; }
.storefront .tile-price s { color: var(--white); }

.grouped-directory { scroll-margin-top: 124px; }
.directory-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.catalogue-filters { display: grid; gap: 12px; padding: 16px var(--gutter); border-bottom: 2px solid var(--white); }
.filter-row { display: grid; grid-template-columns: 6.5rem 1fr; gap: 8px; align-items: baseline; }
.filter-row > span, .software-jump { font: 13px var(--mono); }
.filter-row > div { display: flex; flex-wrap: wrap; gap: 6px; }
.storefront .chip-btn { border: 2px solid var(--white); background: var(--black); color: var(--white); font-family: var(--sans); }
.storefront .chip-btn:is(:hover, [aria-current]) { background: var(--white); color: var(--black); }
.dir-columns { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, .75fr) 8rem; align-items: center; gap: 12px; padding: 12px var(--gutter); }
.dir-sort { border-bottom: 2px solid var(--white); font: 700 13px var(--mono); }
.dir-sort a[aria-current] { color: var(--hand); }
.maker-group { border-bottom: 2px solid var(--white); }
.maker-group summary::-webkit-details-marker { display: none; }
.maker-group-bar { cursor: pointer; list-style: none; font-size: 14px; }
.mg-maker { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mg-maker .maker-link { font-size: 16px; }
.mg-toggle { color: var(--maker-accent); font-family: var(--mono); }
.mg-toggle::before { content: '+'; }
.maker-group[open] .mg-toggle::before { content: '−'; }
.dir-badge { padding: 2px 5px; font-size: 10px; }
.dir-count, .mg-price { font: 13px var(--mono); }
.mg-shop { justify-self: end; }
.dir-sort > :last-child { text-align: right; }
.grouped-directory .idx-item { border-top: 2px solid var(--white); }
.grouped-directory :is(.idx-shelf, .shelf-media-col, .shelf-info-col, .idx-trigger) { background: var(--black); color: var(--white); border-color: var(--white); }
.grouped-directory .idx-trigger:hover { background: var(--black); color: var(--white); }
.storefront .maker-story-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.storefront .story-col { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.storefront .maker-name { color: var(--maker-accent); }
.storefront .creator-block .sec-code { color: var(--maker-accent); border-color: var(--maker-accent); }
.storefront .story-col:last-child { border-right: 0; }
.storefront .said { width: 100%; max-width: 62ch; border-left: 4px solid var(--maker-accent); padding-left: 16px; font-size: 18px; line-height: 1.6; }
.storefront .said p + p { margin-top: 1em; }
.storefront .makers-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); background: var(--white); }
.storefront .makers-grid .band, .storefront .makers-grid .band .fld { background: var(--black); color: var(--white); }
.storefront .makers-grid .band .art { order: 0; }
.storefront .notes-list li { border-color: var(--white); }
.storefront .product .product-buy :is(.go, .btn-primary) { background: var(--maker-accent); border-color: var(--maker-accent); color: var(--black); }
.storefront .product .product-buy .btn-secondary { background: var(--black); border-color: var(--maker-accent); color: var(--maker-accent); }
.storefront .product .product-buy :is(.keep, .check-line, .amt) { color: var(--white); }
.storefront .app-store-info { display: grid; gap: 16px; padding: 24px var(--gutter); border-bottom: 2px solid var(--white); }
.app-store-info img, .app-store-info iframe { width: min(100%, 720px); height: auto; aspect-ratio: 16/9; border: 2px solid var(--white); object-fit: cover; }

:focus-visible { outline: 2px solid var(--hand); outline-offset: 2px; box-shadow: none; }
#main :is(input:not([type=hidden],[type=radio],[type=checkbox],[type=color]), textarea, select) {
  background: var(--black); color: var(--white); border: 2px solid var(--white); border-radius: 0;
}
#main :is(input, textarea)::placeholder { color: color-mix(in srgb, var(--white) 65%, transparent); opacity: 1; }
#main :is(input, textarea, select):focus-visible { background: var(--black); color: var(--white); outline: 2px solid var(--hand); outline-offset: 2px; }
#main select option { background: var(--black); color: var(--white); }

@media (max-width: 780px) {
  .site-header .site-header-inner { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; }
  .site-header .logo-cell { grid-area: 1 / 1; }
  .site-header .logo-cell .logo { margin: 0; padding: 8px; min-height: 44px; }
  .site-header .logo-cell .logo svg { height: 23px; }
  .site-header .main-nav { grid-area: 1 / 2; overflow: visible; }
  .site-header .main-nav a, .site-header .header-action, .header-account summary { min-height: 44px; padding-inline: 7px; font-size: 13px; }
  .site-header :is(.header-action, .header-account) { grid-area: 1 / 3; }
  .site-header .header-search { display: flex; grid-area: 2 / 1 / 3 / -1; width: auto; border-top: 2px solid var(--white); border-right: 0; }
  .site-header .header-search input { min-height: 44px; padding-inline: 12px; }
  .storefront .home-cut { grid-template-columns: 1fr; }
  .hero-left { border-right: 0; border-bottom: 2px solid var(--white); }
  .hero-left, .hero-right { padding: 24px var(--gutter); }
  .filter-row { grid-template-columns: 1fr; }
  .dir-sort { display: flex; flex-wrap: wrap; gap: 8px 16px; }
  .dir-sort > :last-child { display: none; }
  .maker-group-bar { grid-template-columns: minmax(0, 1fr) minmax(0, .65fr) auto; gap: 8px; }
  .mg-maker { grid-area: 1 / 1 / 2 / 3; }
  .mg-price { grid-area: 1 / 3; text-align: right; }
  .mg-cat { grid-area: 2 / 1; }
  .mg-app { grid-area: 2 / 2; }
  .mg-shop { grid-area: 2 / 3; }
  .storefront .story-col { border-right: 0; }
}
.store-editor-bar {
  position: sticky; top: 60px; z-index: 50; min-height: 48px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 4px var(--gutter); border-bottom: 2px solid var(--white); background: var(--black); color: var(--white);
}
.store-editor-bar :is(button, a), .canvas-tool-controls :is(button, a) {
  padding: 4px 8px; min-height: 34px; background: var(--black); color: var(--white); border: 2px solid var(--white); font: 700 13px var(--sans); cursor: pointer;
}
.store-editor-bar button:is([aria-pressed=true], [type=submit]), .canvas-tool-controls button[aria-pressed=true] { color: var(--black); background: var(--white); }
.store-editor-bar [role=status] { margin-inline-end: auto; font-size: 13px; }
.store-editor .maker-name, .story-col { position: relative; }
.store-editor .inline-maker-name, .store-editor .creator-field {
  position: absolute; inset: 0; width: 100%; height: 100%; font: inherit; letter-spacing: inherit; color: inherit;
}
#main.storefront .inline-maker-name { border: 0; padding: 0; color: inherit; }
#main.storefront .creator-field {
  border: 0; border-left: 4px solid var(--maker-accent); color: inherit;
  padding: 0 0 0 16px; margin: 0; resize: none; font: inherit; font-size: 18px; line-height: 1.6;
}
.store-editor .story-col { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: 'badge' 'bio' 'credit'; }
.store-editor .story-col .sec-code { grid-area: badge; }
.store-editor .story-col > .said { grid-area: bio; }
.store-editor .story-col .credit { grid-area: credit; }
.store-editor [data-public-bio]:empty { min-height: 58px; }
.store-editor [data-store-mode=edit] :is([data-public-name], [data-public-bio]) { visibility: hidden; }
.store-editor [data-store-mode=preview] :is(.inline-maker-name, .creator-field, [data-editor-control]) { display: none; }
.store-editor:has([data-store-mode=preview]) > [data-editor-control] { display: none; }
.store-editor [data-store-mode=preview] [data-store-hidden] { display: none; }
.store-editor [data-store-mode=edit] [data-store-hidden] :is(.tile-media, .tile-body) { opacity: .45; }
.canvas-pop { position: relative; width: fit-content; }
.canvas-pop summary { cursor: pointer; list-style: none; }
.canvas-pop-body { position: absolute; z-index: 8; top: 100%; right: 0; width: min(430px, 88vw); max-height: 55vh; overflow: auto; padding: 16px; border: 2px solid var(--white); background: var(--black); }
.maker-side { position: relative; }
.maker-side .canvas-pop { position: absolute; right: 0; bottom: 100%; }
.canvas-tool-controls { position: absolute; inset: 8px 8px auto auto; z-index: 4; display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; max-width: calc(100% - 16px); }
.canvas-cover { margin: 24px var(--gutter); padding: 16px; }
@media (max-width: 780px) { .store-editor-bar { top: 92px; } .maker-side .canvas-pop { bottom: 0; } }
.dir-tool-row { cursor: pointer; list-style: none; font-size: 14px; }
.dir-tool-row::-webkit-details-marker { display: none; }
.dir-tool-row .mg-maker { padding-inline-start: 18px; }
.dir-tool-row .mg-shop { display: flex; align-items: center; gap: 8px; }
.dir-tool-row .idx-toggle-ind { position: static; }
.idx-item[open] .dir-tool-row .idx-toggle-ind::before { content: '−'; }
@media (max-width: 780px) {
  .dir-tool-row { grid-template-columns: minmax(0, 1fr) minmax(0, .65fr) auto; gap: 8px; }
  .header-account > div { max-width: 100vw; }
}

.storefront .door { align-items: start; }
.storefront .door-in { justify-self: start; }

@media (max-width: 360px) {
  .site-header .main-nav a, .site-header .header-action, .header-account summary { padding-inline: 4px; font-size: 12px; }
  .site-header .logo-cell .logo svg { height: 20px; }
}
