/* Templates index and Template page: what the design's tpl27.css leaves to the real data
   (screenshots in the cards, the filter row, the live demo frame). Loaded after tpl27. */

/* AA: the design's --ink3 is too light for small text on both themes, so text uses --ink2 here. */
main .mono,.crumb,.tpfacts span,.tpprice span,.tempty,.catc span,.tpnote{color:var(--ink2)}
.crumb{flex-wrap:wrap}
.crumb a:hover{color:var(--ink)}
.th .lead{margin:0}

.th .fresh{font-size:13.5px;color:var(--ink2);margin-top:-6px}
.cats{margin-bottom:0}

/* Toolbar: the one calm bar. Type switch (the item page's segmented switch), industry, price, then search and sort. */
.tx-catalog{padding-top:clamp(56px,6vw,90px)}
.tc-bar{display:flex;align-items:center;gap:10px}
.tc-bar .dvs{margin:0}
.tc-desk,.tc-end{display:flex;align-items:center;gap:10px}
.tc-end{margin-left:auto}
.tc-search{width:min(240px,100%);border:0;border-radius:999px;background:var(--s1);color:var(--ink);font:14px Geist,sans-serif;padding:10px 16px;outline:none}
.tc-search:focus-visible{box-shadow:0 0 0 1.5px var(--blue)}
.tc-meta{display:flex;align-items:center;gap:16px;margin:16px 0 36px;padding-bottom:20px;border-bottom:1px solid var(--line2)}
.tc-meta .mono{padding:0}
.tc-select{appearance:none;border:0;border-radius:999px;background:var(--s1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%238E9198' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 14px center;color:var(--ink);font:14px Geist,sans-serif;padding:10px 34px 10px 16px;cursor:pointer;outline:none}
.tc-select:focus-visible{box-shadow:0 0 0 1.5px var(--blue)}
.tc-clear{font-size:13.5px;color:var(--ink2);text-decoration:underline;text-underline-offset:3px;background:none;border:0;cursor:pointer}
.tc-clear:hover{color:var(--ink)}
.tc-filters{display:none;padding:9px 16px;border-radius:999px;border:0;background:var(--s1);font-size:13.5px;color:var(--ink);cursor:pointer}

/* Cards: a real screenshot in the design's window, scrolled a little on hover. */
.tgrid .tcard{opacity:1;transform:none}
.card .win{aspect-ratio:4/3;padding:14% 9% 0}
.card .win:before{display:none}
/* The frame is a size container: the screenshot is laid out at its real height (never shorter than the frame,
   so no blank strip under a short capture) and on hover slides up by min(its overflow, 80% of the frame):
   100cqh is the frame height, 100% the image's own height, so it never moves past the image bottom. */
.tx-shot{height:100%;container-type:size;background:var(--s2);border-radius:12px 12px 0 0;box-shadow:var(--sh);overflow:hidden}
.tx-shot img{display:block;width:100%;height:auto;min-height:100cqh;object-fit:cover;object-position:left top;transform:translateY(0);transition:transform 2.6s cubic-bezier(.25,.1,.25,1)}
@media(hover:hover){.card:hover .tx-shot img{transform:translateY(min(0px,max(calc(100cqh - 100%),calc(-.8 * 100cqh))))}
.card:hover .tx-shot img.is-ipad{transform:translateY(min(0px,max(calc(100cqh - 100% + 5.5cqw),calc(-.8 * 100cqh))))}}
.tx-shot img.is-ipad{height:auto!important;margin-top:-5.5%}
.tx-ph{display:grid;place-items:center;height:100%;padding:20px;text-align:center;font-size:20px;font-weight:500;letter-spacing:-.03em;color:var(--ink2)}
.card .row h3{transition:color .3s}
.card:hover .row h3{color:var(--blue)}
.card .row p{font-size:14.5px}
.card .row .mono{white-space:nowrap}
.tpv{background:var(--btn);color:var(--btnT)}
.ttag{background:var(--btn);color:var(--btnT)}
@media(prefers-reduced-motion:reduce){.tx-shot img{transition:none}}
.tempty{font-size:16px}

/* Template page: gallery */
.tpimg{display:block;overflow:hidden;position:relative}
.tpimg>img{display:block;width:100%;height:100%;object-fit:cover;object-position:top center}
.tpimg>img.is-ipad{height:auto!important;margin-top:-5.5%}
.tx-noshot{display:grid;place-items:center;height:100%;text-align:center}
.tpths[hidden]{display:none}
.tpth{padding:0;overflow:hidden}
.tpth img{display:block;width:100%;height:100%;object-fit:cover;object-position:top center}
.tpth img.is-ipad{height:auto!important;margin-top:-5.5%}
.tpth:focus-visible,.dv:focus-visible,.qa button:focus-visible{outline:2px solid var(--blue);outline-offset:2px}

/* Template page: buy column */
.tx-kicker{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.tx-new{position:static;font-weight:500}
.tpbuy .dvs{margin:0}
.tpanel{display:flex;flex-direction:column;gap:18px}
.tpanel[hidden]{display:none}
.tpfacts{grid-template-columns:repeat(auto-fit,minmax(0,1fr))}
.tpcta .b{flex:1 1 auto}
.tpinc a,.tpnote a{color:var(--blue);text-decoration:underline;text-underline-offset:3px}
.dv .tbld{color:var(--ink2)}
.dv{white-space:nowrap}

/* Template page: live demo frame (the Headless master, rendered at a real width and scaled to fit) */
.tpdev .tpimg{background:var(--s1)}
.tpframe[data-d="d"] .tpimg{aspect-ratio:16/10}
.tx-live iframe{position:absolute;top:0;left:0;width:var(--fw,1440px);height:calc(100% / var(--scale,1));border:0;transform:scale(var(--scale,1));transform-origin:0 0;background:#fff}
.tpdev .bwb{border-bottom:1px solid var(--line2)}

/* Template page: text sections */
.sec.tx-about{padding-bottom:0}
.tx-desc{display:flex;flex-direction:column;gap:18px;font-size:17px;line-height:1.65}
.inside .mono{padding:0}
.plist[hidden]{display:none}
.plist b{min-width:0;overflow-wrap:anywhere}
.tband .btns{align-self:flex-end}
.tx-btns{align-self:flex-end}
.qa .a[hidden]{display:none}

/* Filters sheet (phones) */
.tc-sheet{display:none}
@media(max-width:760px){
  .tc-bar{flex-direction:column;align-items:stretch}
  .tc-bar .dvs{width:100%;display:grid;grid-template-columns:repeat(3,1fr)}
  .tc-desk{display:none}
  .tc-filters{display:block}
  .tc-end{margin-left:0}
  .tc-end .tc-search{flex:1;width:auto}
  .tc-sheet[open]{display:block;margin:auto 0 0;width:100%;max-width:none;padding:0;border:0;border-radius:22px 22px 0 0;background:var(--bg);color:var(--ink)}
  .tc-sheet::backdrop{background:rgba(0,0,0,.45)}
  .tc-sheet-body{display:flex;flex-direction:column;gap:14px;padding:22px 20px calc(22px + env(safe-area-inset-bottom))}
  .tc-sheet-body b{font-size:17px;font-weight:500}
  .tc-sheet-body label{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--ink2)}
  .tc-sheet-body .tc-select{width:100%}
  .tc-sheet-body .b{justify-content:center;margin-top:6px}
}
@media(max-width:560px){
  .tpcta .b{flex:1 1 100%;justify-content:center}
  .dvs{max-width:100%}
  .dv{padding:8px 14px}
}
[data-theme=dark] .tc-select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%23A2A5AB' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E")}

/* Links inside listing text (the Showing to Closing app) are underlined so they read as links. */
.tx-desc a,.plist a{text-decoration:underline;text-underline-offset:3px;text-decoration-color:var(--line)}
.tx-desc a:hover,.plist a:hover{text-decoration-color:currentColor}
/* Get notified (TemplateNotify): the sign-up opens in the buy panel under the price */
.tpn{display:flex;flex-direction:column;gap:14px;background:var(--s1);border-radius:var(--rl);padding:clamp(18px,2.4vw,24px)}
.tpn label,.tpn fieldset{display:flex;flex-direction:column;gap:8px;font-size:13.5px;color:var(--ink2);border:0;padding:0;margin:0;min-width:0}
.tpn legend{font-size:13.5px;color:var(--ink2);margin-bottom:8px;padding:0}
.tpn input:not([type=checkbox]):not([type=radio]){width:100%;padding:13px 16px;border-radius:14px;border:0;background:var(--s2);box-shadow:inset 0 0 0 1px var(--line2);font:15px Geist,sans-serif;color:var(--ink);outline:none;transition:box-shadow .25s}
.tpn input:not([type=checkbox]):not([type=radio]):focus{box-shadow:0 0 0 1.5px var(--blue)}
.tpn input[aria-invalid=true]:not([type=checkbox]){box-shadow:0 0 0 1.5px #B4281E}
.tpn .tpn-lead{font-size:15px;color:var(--ink);margin:0}
.tpn .chips{display:flex;flex-wrap:wrap;gap:6px}
.tpn .chips label{flex-direction:row;cursor:pointer}
.tpn .chips input{position:absolute;opacity:0;width:1px;height:1px}
.tpn .chips span{padding:9px 15px;border-radius:999px;font-size:13.5px;color:var(--ink2);transition:all .25s}
.tpn .chips input:focus-visible+span{box-shadow:0 0 0 3px var(--blueT)}
.tpn .chips span{background:var(--s2);box-shadow:inset 0 0 0 1px var(--line2);border-color:transparent;white-space:nowrap}
.tpn .chips input:checked+span{background:var(--ink);color:var(--bg);box-shadow:none}
.tpn label.cchk{flex-direction:row;align-items:flex-start;gap:10px;line-height:1.45;cursor:pointer}
.tpn label.cchk input{width:18px;height:18px;padding:0;margin-top:1px;flex:none;accent-color:var(--blue)}
.tpn .clink{color:var(--ink);text-decoration:underline;text-underline-offset:2px}
.tpn .cerr{font-size:13.5px;color:#B4281E;margin:0}
[data-theme=dark] .tpn .cerr{color:#FF8F82}
[data-theme=dark] .tpn input:not([type=checkbox]):not([type=radio]),[data-theme=dark] .tpn .chips span{box-shadow:inset 0 0 0 1px var(--line)}
.tpn .b{justify-content:center}
.tpn button:disabled{opacity:.6;cursor:default}
.tpn-done b{font-size:17px;font-weight:500;color:var(--ink)}
.tpn-done p,.tpn-note{font-size:14.5px;color:var(--ink2);margin:0}
