/* Temple, the SuperPower FX preset collection in a browser (owner, 2026-10-24). The page of spfx.pro-motion.dev/temple, in the template's
   green (spfx.css). The presets are separate cards, each with its own hairline and a small gap between them (owner, 2026-10-24:
   "separate the cards a little"); the thumbnails are the engine's own (512 x 288, the frame over its checkerboard), shown as they are. One motion: a card
   under the pointer or the keyboard draws the accent line along its top. temple.js fills the page; without it the page says why. */

.tm-page { padding: 48px 0 72px; }
.tm-intro { max-width: 760px; padding: 0 0 30px; }
.sfx .tm-intro h1 { margin: 0 0 16px; font-size: clamp(28px, 3.6vw, 44px); font-weight: 650; line-height: 1.12; letter-spacing: -.035em; }
.tm-lead { max-width: 40em; margin: 0; font-size: 17px; line-height: 1.65; color: var(--text-2); }
/* "not reviewed": the dashed ring of a stage not reached, as on the timeline */
.tm-note { display: flex; align-items: center; gap: 10px; margin: 18px 0 0; font-size: 14px; color: var(--text-3); }
.tm-note::before { content: ""; flex: none; width: 12px; height: 12px; border: 1.5px dashed currentColor; border-radius: 50%; }

/* Search, sort and the count on one hairline band */
.tm-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 0; padding: 14px 0; border-block: 1px solid var(--line); }
.tm-bar[hidden] { display: none; }
.tm-search { position: relative; flex: 1 1 300px; max-width: 460px; }
.tm-search svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; margin-top: -9px; fill: none; stroke: var(--text-3); stroke-width: 1.6; stroke-linecap: round; pointer-events: none; }
.tm-search input { width: 100%; min-height: 44px; margin: 0; padding: 10px 14px 10px 40px; border: 1px solid var(--line); border-radius: 7px 0 7px 7px; background: #191919; color: var(--text); font: inherit; font-size: 15px; }
.tm-search input::placeholder { color: var(--text-3); }
.tm-search input:hover { border-color: var(--tick); }
.tm-search input:focus { border-color: var(--accent); outline: none; }
.tm-search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tm-search input::-webkit-search-cancel-button { filter: grayscale(1) brightness(1.6); cursor: pointer; }

.tm-sort { display: flex; margin: 0; padding: 0; border: 0; }
.tm-sort label { position: relative; display: block; }
.tm-sort input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tm-sort span { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-left-width: 0; font-size: 14px; line-height: 1.2; white-space: nowrap; color: var(--text-2); }
.tm-sort label:first-child span { border-left-width: 1px; border-radius: 7px 0 0 7px; }
.tm-sort label:last-child span { border-radius: 0 0 7px 0; }
.tm-sort input:hover + span { color: var(--text); background: #1c1c1c; }
.tm-sort input:checked + span { color: var(--accent); background: #1a2119; box-shadow: inset 0 -2px 0 var(--accent); }
.tm-sort input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; position: relative; z-index: 1; }
.tm-count { flex: 1 0 auto; margin: 0; text-align: right; font-size: 14px; color: var(--text-3); white-space: nowrap; }
.tm-quota { margin-left: 16px; color: var(--grow-text); }
.tm-quota.full { color: var(--danger); }

/* All presets or mine (owner, 2026-10-24): two words above the band, the current one underlined in the accent, as the header's menu */
.tm-views { display: flex; gap: 26px; margin: 0 0 6px; }
.tm-views[hidden] { display: none; }
.tm-views button { position: relative; min-height: 44px; margin: 0; padding: 0; border: 0; background: none; color: var(--text-2); font: inherit; font-size: 16px; font-weight: 520; cursor: pointer; }
.tm-views button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.tm-views button:hover { color: var(--text); }
.tm-views button[aria-pressed="true"] { color: var(--text); }
.tm-views button[aria-pressed="true"]::after { transform: scaleX(1); }
.tm-views button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* in My presets the band shows which of one's presets instead of the sort */
.tm-parts { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-parts[hidden], .tm-sort[hidden] { display: none; }
.tm-parts .tm-chip { min-height: 44px; padding: 4px 16px; border-radius: 22px; border-color: var(--line); color: var(--text-2); }
.tm-parts .tm-chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: #1a2119; }

/* The active tag, with the way back to every tag */
.tm-tagline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 0; font-size: 14px; color: var(--text-2); }
.tm-tagline[hidden] { display: none; }
.tm-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; margin: 0; padding: 4px 12px; border: 1px solid var(--grow); border-radius: 16px; background: none; color: var(--grow-text); font: inherit; font-size: 13.5px; line-height: 1.2; cursor: pointer; }
.tm-chip:hover { border-color: var(--accent); color: var(--accent); }
.tm-chip.on { border-color: var(--accent); color: var(--accent); }
.tm-chip.on::after { content: ""; width: 9px; height: 9px; background: linear-gradient(45deg, transparent 43%, currentColor 43% 57%, transparent 57%), linear-gradient(-45deg, transparent 43%, currentColor 43% 57%, transparent 57%); }

/* The cards */
/* separate cards (owner, 2026-10-24: "separate the cards a little"): each with its own hairline, a small gap between them */
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 248px), 1fr)); gap: 14px; margin: 26px 0 0; padding: 0; list-style: none; }
.tm-grid[hidden] { display: none; }
.tm-grid > li { display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: 6px 0 6px 6px; background: #171717; transition: border-color .2s; }
.tm-grid > li:hover { border-color: var(--tick); }
.tm-card { position: relative; display: flex; flex-direction: column; width: 100%; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.tm-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; z-index: 1; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .28s cubic-bezier(.2, .7, .2, 1); }
.tm-card:hover::before, .tm-card:focus-visible::before { transform: scaleX(1); }
.tm-card:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tm-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #1b1d21; }
.tm-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tm-meta { display: grid; gap: 6px; padding: 12px 14px 15px; }
.tm-title { overflow: hidden; font-size: 15.5px; font-weight: 560; line-height: 1.3; letter-spacing: -.01em; white-space: nowrap; text-overflow: ellipsis; }
.tm-card:hover .tm-title { color: var(--accent-2); }
.tm-sub { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: 13.5px; line-height: 1.3; color: var(--text-3); }
.tm-nick { overflow: hidden; min-width: 0; margin-right: auto; color: var(--grow-text); white-space: nowrap; text-overflow: ellipsis; }
.tm-stat { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tm-stat svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tm-stat.star svg { fill: currentColor; stroke: none; }
.tm-mine { color: var(--accent); }
.tm-thumb { position: relative; }
.tm-added { position: absolute; right: 8px; top: 8px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 3px rgba(20, 20, 20, .55); }
.tm-added svg, .tm-in svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* a preset its author deleted: still the person's, shown quieter */
.tm-grid > li.removed .tm-thumb img { opacity: .55; filter: grayscale(.6); }

.tm-more-row { margin: 28px 0 0; text-align: center; }
.tm-more-row[hidden] { display: none; }
.sfx .tm-more { margin: 0; min-height: 44px; }

/* Loading, empty, signed out, not active, restricted, unreachable */
.tm-state:empty { display: none; }
.tm-loading { margin: 26px 0 0; font-size: 15px; color: var(--text-3); }
.tm-panel { max-width: 640px; margin: 26px 0 0; padding: 30px 32px 28px; border: 1px solid var(--line); border-left: 2px solid var(--accent); background: #171717; }
.tm-panel h2 { margin: 0 0 10px; font-size: 22px; font-weight: 600; line-height: 1.25; letter-spacing: -.02em; }
.tm-panel p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text-2); }
.sfx .tm-panel .button { margin: 20px 0 0; min-height: 44px; }
.tm-noscript { margin: 26px 0 0; color: var(--text-2); }

/* One preset, larger: the thumbnail at its own size beside what is known about it */
.tm-detail { width: min(1000px, calc(100% - 32px)); max-height: calc(100% - 32px); margin: auto; padding: 0; border: 1px solid var(--tick); border-radius: 10px 0 10px 10px; background: #171717; color: var(--text); overflow: auto; }
.tm-detail::backdrop { background: rgba(8, 8, 8, .78); }
.tm-detail[open] { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.tm-d-thumb { align-self: start; background: #1b1d21; }
.tm-d-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.tm-d-body { position: relative; padding: 26px 28px 28px; }
.tm-d-body h2 { margin: 0 44px 6px 0; font-size: 26px; font-weight: 620; line-height: 1.2; letter-spacing: -.025em; overflow-wrap: anywhere; }
.tm-d-by { margin: 0 0 18px; font-size: 15px; color: var(--text-3); }
.tm-d-by a { color: var(--grow-text); }
.tm-d-by a:hover { color: var(--accent); }
.tm-close { position: absolute; right: 14px; top: 14px; display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: none; color: var(--text-2); cursor: pointer; }
.tm-close:hover { border-color: var(--accent); color: var(--accent); }
.tm-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
/* Add to my presets, or: in my presets, Remove */
.tm-act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 18px; }
.sfx .tm-add { margin: 0; min-height: 44px; }
.tm-in { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; font-weight: 560; color: var(--accent); }
.tm-in svg { width: 16px; height: 16px; }
.tm-link { min-height: 44px; margin: 0; padding: 0; border: 0; background: none; color: var(--text-2); font: inherit; font-size: 14.5px; text-decoration: underline; text-underline-offset: .25em; cursor: pointer; }
.tm-link:hover { color: var(--accent); }
.tm-act-note { flex: 1 0 100%; margin: 0; font-size: 14px; color: var(--danger); }
.tm-act-note:empty { display: none; }
.tm-removed { margin: 0 0 16px; padding: 10px 12px; border: 1px dashed var(--tick); font-size: 14px; line-height: 1.5; color: var(--text-2); }
.tm-facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0 0 18px; padding: 14px 0; border-block: 1px solid var(--line); font-size: 14.5px; }
.tm-facts dt { color: var(--text-3); }
.tm-facts dd { margin: 0; color: var(--text); font-variant-numeric: tabular-nums; }
.tm-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.tm-desc { margin: 0 0 22px; font-size: 15.5px; line-height: 1.65; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.tm-use { margin: 0; padding: 14px 16px; border-left: 2px solid var(--accent); background: #1a2119; }
.tm-use h3 { margin: 0 0 6px; font-size: 14.5px; font-weight: 600; color: var(--accent); }
.tm-use p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-2); }

@media (max-width: 780px) {
  .tm-page { padding-top: 34px; }
  .tm-bar { gap: 12px; }
  .tm-search { flex-basis: 100%; max-width: none; }
  .tm-sort { flex: 1 1 auto; }
  .tm-sort label { flex: 1 1 auto; }
  .tm-sort span { justify-content: center; padding: 0 10px; font-size: 13.5px; }
  .tm-count { flex: 0 0 100%; text-align: left; }
  .tm-detail[open] { grid-template-columns: 1fr; }
  .tm-d-thumb { border-bottom: 1px solid var(--line); }
  /* two columns of smaller cards on phones: more presets at a glance; the numbers go under the nickname */
  .tm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tm-meta { padding: 10px 10px 12px; }
  .tm-title { font-size: 14.5px; }
  .tm-sub { flex-wrap: wrap; gap: 4px 10px; font-size: 13px; }
  .tm-nick { flex: 1 0 100%; }
  .tm-d-body { padding: 20px 18px 22px; }
  .tm-d-body h2 { font-size: 22px; }
  .tm-close { right: 10px; top: 10px; }
  .tm-panel { padding: 24px 20px 22px; }
}
@media (max-width: 400px) {
  .tm-sort span { padding: 0 8px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .tm-card::before { transition: none; }
}
