/* The two directories in the painted lab (inc/directories.php), over the live template's markup and its stylesheet
   (theme/assets/css/directory.css), after the paper skin (skin.css): the kinds as gates on a wash of paint under the
   header, the catalog's rows as cards two abreast with the marks large, a profile's header as one card with its facts as
   a ticket's cells. The founder, 2026-11-29: "the insides are not redone ... under the new paint, the layout especially".
   The gates rise one after another from the first paint, in CSS alone, and stand still with reduced motion. */

.gsp-dir {
  --gsp-ink: #0B0B0F; --gsp-text: #16161A; --gsp-mute: #6C6B74; --gsp-faint: #8E8D96;
  --gsp-card: #FFFDF9; --gsp-tile: #F7F1E8; --gsp-rule: #E7DED2;
  --gsp-sh: 0 1px 2px rgba(70, 50, 36, .06), 0 14px 30px -24px rgba(80, 52, 40, .5);
  --gsp-sh-up: 0 1px 2px rgba(70, 50, 36, .06), 0 22px 40px -22px rgba(80, 52, 40, .45);
}
.gsp-gates .l-data { --c: #4B64FF; --cd: #3346DB; --ct: #EEF0FF; }
.gsp-gates .l-out { --c: #F0432B; --cd: #C2311A; --ct: #FFEFEA; }
.gsp-gates .l-ai { --c: #12995F; --cd: #0B7A4B; --ct: #E7F5EC; }

/* ---------- the gates: the kinds of the directory, on a wash of paint under the header's calls ---------- */
.gsp-gates { position: relative; isolation: isolate; width: min(1120px, 100%); margin: 44px auto 0; padding: 22px 22px 16px; border-radius: 30px 34px 31px 33px / 33px 30px 34px 31px; text-align: left; }
.gsp-gates::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background:
    radial-gradient(70% 120% at 0% 0%, rgba(75, 100, 255, .13), rgba(75, 100, 255, 0) 62%),
    radial-gradient(60% 120% at 100% 100%, rgba(240, 67, 43, .10), rgba(240, 67, 43, 0) 60%),
    radial-gradient(50% 90% at 70% 0%, rgba(18, 153, 95, .08), rgba(18, 153, 95, 0) 60%),
    #F3ECE2;
  box-shadow: inset 0 0 0 1px rgba(120, 90, 60, .08);
}
.gsp-gates ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.gsp-gate { min-width: 0; animation: gsp-gate-in .55s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 80ms + 120ms); }
@keyframes gsp-gate-in { from { opacity: 0; transform: translateY(12px); } }
.gsp-gate a {
  position: relative; display: flex; flex-direction: column; gap: 6px; height: 100%; min-height: 168px; padding: 20px 20px 18px;
  border-radius: 20px 23px 21px 24px / 23px 20px 24px 21px; background: var(--gsp-card); box-shadow: var(--gsp-sh);
  color: var(--gsp-text); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease;
}
.gsp-gate a::before { content: ""; position: absolute; left: 20px; top: 0; width: 44px; height: 4px; border-radius: 0 0 4px 4px; background: var(--c); }
.gsp-gate a:hover { transform: translateY(-3px); box-shadow: var(--gsp-sh-up); }
.gsp-gate a:focus-visible { outline: 2px solid var(--cd); outline-offset: 3px; }
.gsp-gate.is-on a { box-shadow: inset 0 0 0 2px var(--c), var(--gsp-sh); }
.gsp-gate-k { font: 500 11px/1.4 var(--mono, ui-monospace, monospace); letter-spacing: .1em; text-transform: uppercase; color: var(--cd); }
.gsp-gate-n { font: 600 20px/1.22 var(--display, var(--sans)); letter-spacing: -.02em; color: var(--gsp-ink); text-wrap: balance; }
.gsp-gate-p { font: 500 14px/1.4 var(--sans); color: #4A4953; }
.gsp-gate-ms { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 14px; padding-right: 40px; }
.gsp-gate-ms > * { position: relative; display: grid; place-items: center; flex: none; width: 30px !important; height: 30px !important; overflow: hidden; border-radius: 9px; background: #fff; box-shadow: 0 0 0 1px rgba(22, 22, 26, .08), 0 1px 2px rgba(40, 30, 20, .08); }
.gsp-gate-ms > .k-vlogo { --s: 30px !important; }
.gsp-gate-ms img { display: block; width: 84%; height: 84%; object-fit: contain; }
.gsp-gate-ms .is-fill img, .gsp-gate-ms .k-vlogo-fill img { width: 100%; height: 100%; object-fit: cover; }
.gsp-gate-go { position: absolute; right: 16px; bottom: 16px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ct); color: var(--cd); transition: transform .2s ease; }
.gsp-gate-go svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.gsp-gate a:hover .gsp-gate-go { transform: translateX(3px); }
.gsp-gates-note { margin: 12px 6px 0; font: 400 12.5px/1.45 var(--sans); color: var(--gsp-faint); }
/* the gates are the way between the kinds: the row of category chips under the header goes on a listing and a category,
   and the catalog follows the gates closer than a new section would */
.gsp-dir-list .dr-cats { display: none; }
.gsp-dir-list .dr-catalog { padding-top: 56px; }

/* ---------- the catalog: the rows as cards two abreast, the mark large ---------- */
.gsp-dir .dr-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.gsp-dir .dr-row[hidden] { display: none; }
.gsp-dir .dr-row {
  position: relative; grid-template-columns: 56px minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 0 16px; align-content: start;
  height: 100%; padding: 22px 22px 20px; border-radius: 22px 25px 23px 26px / 25px 22px 26px 23px; background: var(--gsp-card); box-shadow: var(--gsp-sh);
  transition: transform .2s ease, box-shadow .2s ease;
}
.gsp-dir .dr-row:hover { transform: translateY(-2px); box-shadow: var(--gsp-sh-up); }
.gsp-dir .dr-row > .dr-tile, .gsp-dir .dr-row > .k-vlogo { --s: 56px !important; grid-row: 1 / span 2; border-radius: 16px; }
.gsp-dir .dr-row > .k-vlogo img { width: 80%; height: 80%; }
.gsp-dir .dr-row > .k-vlogo-fill img { width: 100%; height: 100%; }
.gsp-dir .dr-row-body { grid-column: 2; gap: 8px; }
.gsp-dir .dr-row-head { gap: 6px 10px; }
.gsp-dir .dr-row-name { font-size: 20px; letter-spacing: -.02em; }
/* the name's link covers the card, so the whole card leads to the profile (View profile repeats it, out of the tab order) */
.gsp-dir .dr-row-name a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.gsp-dir .dr-row-name a:focus-visible { outline: none; }
.gsp-dir .dr-row:has(.dr-row-name a:focus-visible) { outline: 2px solid var(--gsp-ink); outline-offset: 3px; }
.gsp-dir .dr-row :is(.dr-pill, .dr-rate a) { position: relative; z-index: 1; }
.gsp-dir .dr-row-p { -webkit-line-clamp: 3; font-size: 14.5px; line-height: 1.55; color: #3F3E46; }
.gsp-dir .dr-row-facts { margin: 2px 0 0 -23px; font-size: 13.5px; color: var(--gsp-mute); }
.gsp-dir .dr-row-rate, .gsp-dir .dr-row-price { order: -1; flex: 0 0 100%; max-width: none; margin-bottom: 2px; padding-left: 23px; overflow: visible; white-space: normal; text-overflow: clip; font: 600 14.5px/1.45 var(--sans); color: var(--gsp-ink); }
.gsp-dir .dr-row-rate::before, .gsp-dir .dr-row-price::before { display: none; }
.gsp-dir .dr-row-read { margin-top: 2px; }
.gsp-dir .dr-row .dr-rate { font-size: 13.5px; }
.gsp-dir .dr-row-go { grid-column: 2; justify-self: start; align-self: end; margin-top: 14px; }

/* the filter beside the cards, a column of the same paper */
.gsp-dir .dr-side { padding: 20px 18px; border-radius: 20px 22px 21px 23px / 22px 20px 23px 21px; background: var(--gsp-card); box-shadow: var(--gsp-sh); }
.gsp-dir .dr-cat { grid-template-columns: 250px minmax(0, 1fr); gap: 0 36px; }

/* ---------- a profile: the header as one card, the facts as a ticket's cells ---------- */
.gsp-dir-profile .dr-top {
  position: relative; isolation: isolate; padding: 36px 40px 34px; border-radius: 30px 34px 31px 33px / 33px 30px 34px 31px; background: var(--gsp-card); box-shadow: var(--gsp-sh-up);
}
.gsp-dir-profile .dr-top::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(60% 90% at 0% 0%, rgba(75, 100, 255, .07), rgba(75, 100, 255, 0) 60%), radial-gradient(50% 80% at 100% 0%, rgba(240, 67, 43, .06), rgba(240, 67, 43, 0) 60%);
}
.gsp-dir-profile .dr-top-id { align-items: center; gap: 22px; }
.gsp-dir-profile .dr-top-id > .dr-tile, .gsp-dir-profile .dr-top-id > .k-vlogo { --s: 84px !important; border-radius: 22px; box-shadow: 0 0 0 1px rgba(22, 22, 26, .08), 0 12px 24px -16px rgba(40, 30, 20, .45); }
.gsp-dir-profile .dr-h1 { font-size: clamp(34px, 3.6vw, 50px); letter-spacing: -.03em; }
.gsp-dir-profile .dr-top-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 8px; margin-top: 28px; padding: 0; border-top: 0; }
.gsp-dir-profile .dr-top-facts > div { padding: 13px 16px 14px; border-radius: 14px 16px 15px 17px / 16px 14px 17px 15px; background: var(--gsp-tile); }
.gsp-dir-profile .dr-top-facts :is(.dr-f-rate, .dr-f-read, .dr-f-serves, .dr-f-lang) { grid-column: span 2; }
.gsp-dir-profile .dr-top-facts dd { font-size: 15px; }
.gsp-dir-profile .dr-top-acts { min-width: 230px; }

/* the profile's cards of similar listings: the same paper as the catalog's */
.gsp-dir .dr-card { border-radius: 22px 25px 23px 26px / 25px 22px 26px 23px; background: var(--gsp-card); box-shadow: var(--gsp-sh); transition: transform .2s ease, box-shadow .2s ease; }
.gsp-dir a.dr-card:hover, .gsp-dir .dr-card:hover { transform: translateY(-2px); box-shadow: var(--gsp-sh-up); }

/* ---------- widths ---------- */
@media (max-width: 1100px) {
  .gsp-gates ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gsp-dir .dr-cat { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .gsp-gates { width: auto; margin: 32px 16px 0; padding: 12px 12px 8px; border-radius: 24px; }
  .gsp-dir-list .dr-catalog { padding-top: 32px; }
  .gsp-gates ol { gap: 10px; }
  .gsp-gate a { min-height: 0; padding: 16px 16px 14px; }
  .gsp-gate-n { font-size: 17px; }
  .gsp-gate-ms > * { width: 26px !important; height: 26px !important; }
  .gsp-dir .dr-row { grid-template-columns: 48px minmax(0, 1fr); padding: 18px; }
  .gsp-dir .dr-row > .dr-tile, .gsp-dir .dr-row > .k-vlogo { --s: 48px !important; border-radius: 14px; }
  .gsp-dir-profile .dr-top { padding: 24px 20px; }
  .gsp-dir-profile .dr-top-id > .dr-tile, .gsp-dir-profile .dr-top-id > .k-vlogo { --s: 64px !important; border-radius: 18px; }
  .gsp-dir-profile .dr-top-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gsp-dir-profile .dr-top-facts :is(.dr-f-rate, .dr-f-read, .dr-f-serves, .dr-f-lang, .dr-f-site) { grid-column: 1 / -1; }
}
/* on a phone each gate is one line of words, its marks left to its page */
@media (max-width: 520px) {
  .gsp-gates ol { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .gsp-gate a { gap: 3px; padding: 14px 56px 13px 16px; }
  .gsp-gate-ms { display: none; }
  .gsp-gate-go { top: 50%; bottom: auto; margin-top: -15px; }
}
@media (prefers-reduced-motion: reduce) {
  .gsp-gate { animation: none; }
  .gsp-gate a, .gsp-dir .dr-row, .gsp-dir .dr-card, .gsp-gate-go { transition: none; }
}
