/* KitCutz hover tabs: a list of steps beside one framed picture (or the explainer video).
   The active row turns the frame's colour, opens to show its description and joins the frame
   through concave corners; the picture crossfades (or the video jumps to that step).

   ===== CUSTOMISE ===================================================== */
.ht{
  --ht-frame: #e3e4e6;        /* frame + active tab colour */
  --ht-pad: 10px;             /* frame padding around the picture */
  --ht-radius: 18px;          /* frame corners */
  --ht-inner: 12px;           /* picture corners */
  --ht-join: 14px;            /* size of the concave corners where the tab meets the frame */
  --ht-list: minmax(240px, 34%);
  --ht-dur: .45s;
}
/* ===================================================================== */

.ht{display:grid;grid-template-columns:var(--ht-list) minmax(0,1fr);align-items:start;margin-top:clamp(28px,4vw,44px)}
.ht-list{display:flex;flex-direction:column;padding:calc(var(--ht-join) + 8px) 0;position:relative;z-index:1}

.ht-item{position:relative;display:block;width:100%;text-align:left;border:0;margin:0;font:inherit;color:var(--ink,#171a20);cursor:pointer;
  background:transparent;border-radius:var(--ht-inner) 0 0 var(--ht-inner);padding:14px 20px 14px 18px;
  transition:background-color var(--ht-dur) ease}
.ht-item:focus-visible{outline:2px solid var(--ink,#171a20);outline-offset:-2px}
.ht-num{display:inline-block;min-width:2.2em;font-size:12px;font-weight:600;color:var(--muted,#5c5e62);font-variant-numeric:tabular-nums}
.ht-title{font-size:clamp(16px,1.35vw,18px);font-weight:600;letter-spacing:-.01em}
.ht-text{display:block;max-height:0;overflow:hidden;opacity:0;margin-top:0;padding-left:2.6em;font-size:14px;line-height:1.5;color:var(--muted,#5c5e62);
  transition:max-height var(--ht-dur) ease,opacity var(--ht-dur) ease,margin-top var(--ht-dur) ease}

/* the active row becomes a tab of the frame */
.ht-item[aria-pressed="true"]{background:var(--ht-frame)}
.ht-item[aria-pressed="true"] .ht-text{max-height:140px;opacity:1;margin-top:6px}
.ht-item::before,.ht-item::after{content:"";position:absolute;right:0;width:var(--ht-join);height:var(--ht-join);opacity:0;pointer-events:none;transition:opacity var(--ht-dur) ease}
.ht-item::before{top:calc(-1 * var(--ht-join));background:radial-gradient(circle at 0 0,transparent calc(var(--ht-join) - .5px),var(--ht-frame) var(--ht-join))}
.ht-item::after{bottom:calc(-1 * var(--ht-join));background:radial-gradient(circle at 0 100%,transparent calc(var(--ht-join) - .5px),var(--ht-frame) var(--ht-join))}
.ht-item[aria-pressed="true"]::before,.ht-item[aria-pressed="true"]::after{opacity:1}
.ht:not(.is-ready) .ht-text{max-height:none;opacity:1;margin-top:6px}
.ht-item:not([aria-pressed="true"]):hover .ht-title{text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:1px}

.ht-frame{position:relative;background:var(--ht-frame);border-radius:var(--ht-radius);padding:var(--ht-pad)}
.ht-pics{position:relative;aspect-ratio:4 / 3;border-radius:var(--ht-inner);overflow:hidden;background:#d9dadc}
.ht-pics img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .6s ease}
.ht-pics img.is-on{opacity:1}
.ht-frame .sr-explainer{border-radius:var(--ht-inner)}

/* tall step screens (How it works page): a narrower portrait frame, the pair centred */
.ht-thumb{display:none}
.ht--tall{grid-template-columns:minmax(0,1fr) clamp(260px,40vh,400px);max-width:960px;margin-left:auto;margin-right:auto;align-items:center}
.ht--tall .ht-pics{aspect-ratio:800 / 1776;background:#f8f7f4}
.ht--tall .ht-pics img{object-fit:contain}
.ht--tall .ht-item[aria-pressed="true"] .ht-text{max-height:180px}

/* phones: picture first, steps underneath; the open step keeps the frame colour */
@media (max-width:760px){
  .ht{grid-template-columns:1fr}
  .ht-frame{order:-1}
  .ht-list{padding:12px 0 0}
  .ht-item{border-radius:var(--ht-inner);padding:14px 16px}
  .ht-item::before,.ht-item::after{display:none}
  /* tall screens: no separate frame on phones; the open step shows its screen inline */
  .ht--tall .ht-frame{display:none}
  .ht--tall .ht-list{padding-top:0}
  .ht--tall .ht-item[aria-pressed="true"] .ht-thumb{display:block;margin:14px 0 4px;padding:8px;border-radius:var(--ht-radius);background:#fff}
  .ht--tall .ht-thumb img{display:block;width:100%;height:auto;border-radius:var(--ht-inner)}
}
@media (prefers-reduced-motion:reduce){
  .ht-item,.ht-text,.ht-pics img{transition:none}
}
