/* AI styles post (10.11.2026): 120 styles of one scene. Builds on ../ai-systems-comparison/page.css
   (colours, type scale, hero, film grain). Sizes and spacing come only from type-scale.css. */

.hero { padding-bottom: var(--space-m); }
.lead a { color: var(--accent-2); text-underline-offset: 3px; }
.how { margin-top: var(--space-xs); max-width: 76ch; display: grid; gap: var(--space-2xs); padding: var(--space-s) var(--space-m); border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.how__t { font-size: var(--t-mid); }
.how__ex { font-size: var(--t-xs); line-height: 1.6; padding: var(--space-xs) var(--space-s); border-radius: 8px; background: var(--card-2); text-align: left; }
.how__style { color: var(--accent-2); }

/* filter + search: stays on screen while scrolling the gallery */
.bar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs) var(--space-s); padding: var(--space-xs) 0; margin-top: var(--space-s); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-3xs); }
.chip { border: 1px solid var(--line-2); background: transparent; padding: var(--space-3xs) var(--space-xs); border-radius: 99px; cursor: pointer; font-size: var(--t-xs); color: var(--muted); min-height: 36px; transition: color .2s, border-color .2s, background .2s; }
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-2-ink); font-weight: 600; }
.find input { min-height: 40px; width: min(260px, 70vw); padding: 0 var(--space-s); border-radius: 99px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font: inherit; font-size: var(--t-xs); }
.find input:focus { outline: none; border-color: var(--accent-2); }
.count { margin-inline-start: auto; font-size: var(--t-xs); }
.empty { padding: var(--space-l) 0; color: var(--muted); }
@media (max-width: 700px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; padding-bottom: 2px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .find { flex: 1; } .find input { width: 100%; }
  .count { display: none; }
}

/* families and cards: the grid fills the whole width and adds columns as the screen grows */
.fam { padding-top: var(--space-l-xl); scroll-margin-top: 120px; }
.fam[hidden] { display: none; }
.fam__head { display: flex; align-items: baseline; gap: var(--space-xs); margin-bottom: var(--space-s); }
.fam__en { color: var(--muted); font-size: var(--t-xs); }
.fam__n { color: var(--muted); font-size: var(--t-xs); margin-inline-start: auto; }
.sts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, clamp(9.5rem, 12vw, 16rem)), 1fr)); gap: var(--space-s) var(--space-xs); }
@media (max-width: 560px) { .sts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xs) var(--space-2xs); } }
.st[hidden] { display: none; }
.st__btn { display: block; width: 100%; padding: 0; border: 0; border-radius: 8px; overflow: hidden; cursor: zoom-in; background: var(--card-2); aspect-ratio: 345 / 480; }
.st__btn img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.16, 1, .3, 1); }
.st__btn:hover img { transform: scale(1.04); }
.st__btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.st__name { margin-top: var(--space-2xs); font-size: var(--t-xs); font-weight: 500; text-align: right; }

/* the viewer: picture on one side, the style's prompt and a copy button on the other */
html.sv-open { overflow: hidden; }
.sv { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: var(--space-s-m); }
.sv[hidden] { display: none; }
.sv__bg { position: fixed; inset: 0; background: rgba(5, 5, 6, .97); }
.sv__box { position: relative; width: min(1100px, 100%); max-height: 100%; display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: var(--space-m); align-items: center; }
.sv__fig { margin: 0; display: grid; place-items: center; }
.sv__fig img { max-height: min(84svh, 720px); width: auto; max-width: min(46vw, 520px); border-radius: 10px; }
.sv__side { display: grid; gap: var(--space-xs); align-content: center; color: #f2efe9; max-height: 84svh; overflow: auto; }
.sv__fam { color: #a19d95; font-size: var(--t-xs); }
.sv__title { font-family: var(--body); font-size: var(--t-m); font-weight: 600; line-height: 1.2; text-align: right; }
.sv__label { color: #a19d95; font-size: var(--t-xs); margin-top: var(--space-2xs); }
.sv__prompt { font-size: var(--t-xs); line-height: 1.65; text-align: left; padding: var(--space-s); border-radius: 10px; background: #141416; border: 1px solid rgba(242, 239, 233, .12); max-height: 40svh; overflow: auto; }
.sv__acts { display: flex; align-items: center; gap: var(--space-s); }
.sv__copy { min-height: 44px; padding: 0 var(--space-m); border-radius: 99px; border: 1px solid #1d9cc3; background: #1d9cc3; color: #0b0b0c; font-weight: 600; font-size: var(--t-xs); cursor: pointer; }
.sv__copy:hover { background: #48b7df; border-color: #48b7df; }
.sv__copy.is-done { background: transparent; color: #1d9cc3; }
.sv__n { color: #a19d95; font-size: var(--t-xs); margin-inline-start: auto; }
.sv__btn { position: absolute; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(20, 20, 22, .75); color: #fff; font-size: var(--t-s); cursor: pointer; display: grid; place-items: center; }
.sv__btn:hover { background: #1d9cc3; color: #0b0b0c; border-color: #1d9cc3; }
.sv__close { top: calc(-1 * var(--space-2xs)); left: calc(-1 * var(--space-2xs)); }
.sv__prev { right: calc(-1 * var(--space-s)); top: 50%; translate: 0 -50%; }
.sv__next { left: calc(-1 * var(--space-s)); top: 50%; translate: 0 -50%; }
@media (max-width: 820px) {
  .sv { padding: var(--space-xs); align-items: start; overflow: auto; background: #050506; }
  .sv__box { grid-template-columns: 1fr; gap: var(--space-xs); padding-top: 52px; }
  .sv__fig img { max-width: 100%; max-height: 56svh; }
  .sv__side { max-height: none; }
  .sv__prompt { max-height: none; }
  .sv__close { top: 0; left: 0; }
  .sv__prev, .sv__next { top: 0; translate: none; }
  .sv__prev { right: 0; } .sv__next { left: 52px; }
}
@media (prefers-reduced-motion: reduce) { .st__btn img { transition: none; } }

/* intro on the right, a collage of styles on the left: the top fills the width on any screen
   (every computer screen shows 4 x 2 styles, level with the text); phones get a strip of 4 under the text */
.hero--split { grid-template-columns: minmax(0, 1fr); align-items: start; gap: var(--space-l); }
.hero__text { display: grid; gap: var(--space-s); align-content: center; }
.art { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-xs); }
.art__i:nth-child(n + 5) { display: none; }
.art__i .st__btn { border-radius: 10px; }
.art__name { display: block; margin-top: var(--space-3xs); font-size: var(--t-xxs); color: var(--muted); text-align: right; }
@media (min-width: 1000px) {
  .hero--split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-l-xl); }
  .hero--split .how { margin-top: 0; }
  .art__i:nth-child(n + 5) { display: block; }
}
@media (max-width: 560px) { .art__name { display: none; } .art { gap: var(--space-2xs); } }
/* the comparison page's base styles pin every hero child to column 1; here the collage gets its own column */
.hero--split > .hero__text { grid-column: 1; grid-row: 1; }
@media (min-width: 1000px) { .hero--split > .art { grid-column: 2; grid-row: 1; } }
@media (max-width: 999px) { .hero--split > .art { grid-column: 1; grid-row: 2; } }
/* wide but short screens: the collage never gets taller than the screen leaves room for (keeps its 4 x 2 shape, hugs the left edge) */
@media (min-width: 1000px) {
  .hero--split > .art { width: min(100%, calc((100svh - 330px) * 1.44 + 3 * var(--space-xs))); justify-self: end; }
}

/* centred families (try, 10.11.2026): heading with its English subtitle in the middle, and each gallery centred,
   with cards at a fixed size so a family of 6 sits as one centred row instead of filling from the right */
.fam__head { flex-direction: column; align-items: center; gap: var(--space-3xs); text-align: center; margin-bottom: var(--space-m); }
.fam__n { display: none; }
.sts { grid-template-columns: repeat(auto-fit, clamp(9.5rem, 12vw, 16rem)); justify-content: center; }
@media (max-width: 560px) { .sts { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; } }
.st__name { text-align: center; }
/* at most 6 per row: every family is whole rows of 6 (like the original sheets), centred */
.sts { max-width: calc(6 * clamp(9.5rem, 12vw, 16rem) + 5 * var(--space-xs)); margin-inline: auto; }
@media (min-width: 561px) and (max-width: 1100px) { .sts { max-width: calc(3 * clamp(9.5rem, 12vw, 16rem) + 2 * var(--space-xs)); } }

/* ---------- side navigation with a track (same idea as the regular posts) ----------
   Fixed on the right, below the filter bar; shows once the gallery is reached. The red line is how far
   through the gallery you are; the family you are looking at is highlighted. Where there is no room
   beside the centred gallery, only the red line stays, on the screen's right edge. */
.fnav { position: fixed; z-index: 15; top: var(--fnav-top, 120px); bottom: 28px; right: var(--space-s-m); width: 10.5rem; display: flex; gap: var(--space-xs); transition: opacity .35s ease; }
.fnav.is-hidden { opacity: 0; pointer-events: none; }
.fnav__track { flex: none; position: relative; width: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.fnav__track i { position: absolute; inset: 0; background: var(--accent); transform: scaleY(var(--p, 0)); transform-origin: top; }
.fnav__list { list-style: none; margin: 0; padding: 0; display: grid; align-content: start; gap: 2px; font-size: var(--t-xs); line-height: 1.35; overflow-y: auto; scrollbar-width: none; }
.fnav__list li[hidden] { display: none; }
.fnav__list a { display: block; padding: var(--space-3xs) 0; color: var(--muted); text-decoration: none; text-align: right; transition: color .2s; }
.fnav__list a:hover { color: var(--ink); }
.fnav__list a.is-on { color: var(--ink); font-weight: 600; }
.fnav__list a:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.fnav.is-thin { top: 0; bottom: 0; right: 0; width: 3px; gap: 0; pointer-events: none; }
.fnav.is-thin .fnav__track { width: 3px; border-radius: 0; }
.fnav.is-thin .fnav__list { display: none; }

/* room for the side menu on the right from 1200px up; each gallery centres in the space that is left */
@media (min-width: 1200px) { .fam { padding-inline-start: calc(10.5rem + var(--space-l)); } }

/* bigger viewer (10.11.2026): the picture fills most of the screen height, even though it is upscaled; the prompt panel sits beside it */
.sv { padding: var(--space-s); }
.sv__box { width: min(1700px, 100%); grid-template-columns: auto minmax(16rem, 28rem); justify-content: center; gap: var(--space-l); }
.sv__fig img { height: min(90svh, 1200px); width: auto; max-width: min(62vw, 100%); max-height: none; object-fit: contain; }
.sv__side { max-height: 90svh; }
.sv__prompt { max-height: 50svh; }
.sv__prev { right: calc(-1 * var(--space-2xs)); } .sv__next { left: calc(-1 * var(--space-2xs)); }
@media (max-width: 820px) {
  .sv__box { grid-template-columns: 1fr; gap: var(--space-xs); }
  .sv__fig img { width: 100%; height: auto; max-width: 100%; max-height: 72svh; }
  .sv__side { max-height: none; } .sv__prompt { max-height: none; }
  .sv__prev { right: 0; } .sv__next { left: 52px; }
}

/* no top filter row (the side menu is the navigation): the bar holds only the search, on the right */
.bar { justify-content: flex-start; }
@media (max-width: 700px) { .find { flex: 1; } }
