/* a self-contained panel: it sits on its own opaque ground, clear of the page's
   column guides, at the reference block's proportions (944 x 660 at 1024).
   .grid-wrap opens a stacking context at z-index 1, so the section is lifted
   above the fixed guide lines (z-index 6) for the panel to cover them. */
#how > .grid-wrap{ z-index:7; }
.tk-tabs{ position:relative; display:grid; grid-template-columns:1fr 1fr; grid-template-rows:auto 1fr;
  margin:0 var(--gut) 0;
  background:#0d0e11; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }

/* the tabs: one row across the top, number over label, bar counting the turn down */
/* the panel is inset by one gutter each side, so the first and last tabs give
   up half a gutter each for the dividers to land on the page's guide lines */
.tablist{ grid-column:1 / -1; display:grid; border-bottom:1px solid var(--line);
  grid-template-columns:calc(25% - var(--gut)/2) calc(25% + var(--gut)/2) calc(25% + var(--gut)/2) calc(25% - var(--gut)/2); }
.tab{ position:relative; display:flex; flex-direction:column; min-height:104px;
  appearance:none; background:none; border:0; border-top:2px solid rgba(255,255,255,.07); border-right:1px solid var(--line);
  color:inherit; font:inherit; text-align:left; padding:20px 28px 18px; cursor:pointer;
  transition:background .35s ease, border-color .35s ease; }
.tab:last-child{ border-right:0; }
.tab-n{ display:block; font-family:var(--display); font-size:14px; font-weight:700; line-height:1;
  letter-spacing:.06em; color:rgba(255,255,255,.4); transition:color .35s ease; }
.tab-t{ display:block; margin-top:8px; font-family:var(--display); font-size:20px; font-weight:700; line-height:1.2;
  letter-spacing:-.02em; color:rgba(255,255,255,.55); transition:color .35s ease; }
.tab:hover .tab-n,.tab:hover .tab-t{ color:rgba(255,255,255,.8); }
.tab[aria-selected="true"]{ background:linear-gradient(180deg, rgba(31,177,213,.12), rgba(31,177,213,.02)); }
.tab[aria-selected="true"] .tab-n{ color:var(--turquoise); }
.tab[aria-selected="true"] .tab-t{ color:#fff; }
/* the top edge fills across the live tab as its turn runs down */
.tab::before{ content:""; position:absolute; top:-2px; left:0; width:0; height:2px;
  background:linear-gradient(90deg,var(--turquoise),var(--sky)); }
.tab.run::before{ animation:tab-fill var(--dwell,9s) linear forwards; animation-play-state:var(--play,running); }
@keyframes tab-fill{ from{ width:0; } to{ width:100%; } }

/* the copy for the live stage: title, lead, then the detail lines */
.tab-copy{ grid-column:1; position:relative; display:grid; align-content:center; padding:40px; border-right:1px solid var(--line); }
.stage{ grid-area:1 / 1; opacity:0; transform:translateY(10px); pointer-events:none;
  transition:opacity .45s ease, transform .45s ease; }
.stage.is-on{ opacity:1; transform:none; pointer-events:auto; }
.stage-title{ font-family:var(--display); font-weight:400; font-size:clamp(25px,2.4vw,32px); line-height:1.06;
  letter-spacing:-.03em; color:#fff; width:90%; margin-inline:auto; }
.stage-body{ display:flex; flex-direction:column; gap:16px; margin:44px auto 0; width:90%; }
.stage-body p{ font-size:17px; line-height:1.3; letter-spacing:-.01em; color:rgba(255,255,255,.52); }
.stage-body .stage-lead{ color:#f1f1f1; }


/* the scene */
.tab-panel{ grid-column:2; display:grid; align-content:center; padding:0; }
.scene{ position:relative; overflow:hidden; aspect-ratio:1000/620; border:0;
  background:radial-gradient(circle at 55% 50%, rgba(31,177,213,.09), transparent 42%), var(--ink-2); }
.scene svg{ width:100%; height:100%; display:block; }
/* scene geometry — dynamic colours come from the scene script */
.plate{ fill:rgba(12,24,38,.62); stroke:rgba(113,205,222,.2); stroke-width:1.2; }
.plate-in{ fill:rgba(9,19,28,.7); stroke:rgba(43,88,108,.5); stroke-width:.7; }
.col-back{ fill:rgba(13,26,36,.7); stroke:rgba(25,46,59,.9); stroke-width:.8; }
.tower{ fill:rgba(12,35,47,.8); stroke:rgba(29,72,87,.9); stroke-width:.8; }
.cl-back{ fill:rgba(15,30,40,.9); stroke:rgb(29,56,71); stroke-width:.9; }
.tower-dash{ stroke:rgba(28,87,108,.46); stroke-width:15; stroke-dasharray:3.1 9.3; }
.strip{ fill:rgb(36,39,38); stroke:rgb(81,82,66); stroke-width:.6; }
.pdot{ opacity:.88; }
.cell{ fill:rgb(17,43,57); stroke:rgb(34,76,92); stroke-width:.8; }
.res-block{ fill:rgba(10,24,33,.9); stroke:rgba(53,203,218,.32); stroke-width:.9; }
.res-cell{ fill:rgb(38,102,122); fill-opacity:.16; }
.conn{ fill:none; stroke:rgba(113,205,222,.55); stroke-width:1; stroke-linejoin:round; }
.g-edge{ fill:none; stroke:rgba(113,205,222,.6); stroke-width:1.6; }
.g-node{ fill:#101820; stroke:rgba(113,205,222,.85); stroke-width:1.8; }
.io-dot{ fill:rgba(53,203,218,.75); }
.tok rect{ stroke:none; }

/* on wide screens the tabs stand to the side again, the rail ending on the
   first guide line; the countdown runs down the tab's leading edge */
/* @media(min-width:1600px){
  .tk-tabs{ grid-template-columns:calc(25% - var(--gut)/2) 1fr 1fr; grid-template-rows:1fr; }
  .tablist{ grid-column:1; grid-row:1; display:flex; flex-direction:column; align-items:flex-end;
    border-right:1px solid var(--line); border-bottom:0; }
  .tab{ flex:1 1 0; min-height:0; width:calc(50% + var(--gut)/2); justify-content:center; padding:26px 32px;
    border-top:0; border-right:0; border-bottom:1px solid var(--line); border-left:2px solid rgba(255,255,255,.07); }
  .tab:last-child{ border-bottom:0; }
  .tab::before{ top:0; left:-2px; width:2px; height:0; }
  .tab.run::before{ animation-name:tab-fill-y; }
  @keyframes tab-fill-y{ from{ height:0; } to{ height:100%; } }
  .tab-copy{ grid-column:2; grid-row:1; }
  .tab-panel{ grid-column:3; grid-row:1; }
} */

@media(max-width:1000px){
  .tk-tabs{ grid-template-columns:1fr; grid-template-rows:none; margin:0 34px 0; min-height:0; }
  .tablist{ grid-column:1; grid-template-columns:1fr 1fr; }
  .tab{ min-height:0; padding:18px 24px 16px; }
  .tab:nth-child(even){ border-right:0; }
  .tab:nth-child(-n+2){ border-bottom:1px solid var(--line); }
  .tab-copy,.tab-panel{ grid-column:1; }
  .tab-copy{ padding:28px 24px 0; border-right:0; }
  .stage-title,.stage-body{ width:100%; }
  .stage-body{ margin-top:28px; }
  .tab{ padding:18px 24px 16px; }
  .tab-t{ font-size:19px; margin-top:8px; }
  .tab-panel{ padding:0; }
  .tab-panel{ padding:22px 24px 26px; }
}
@media(max-width:600px){ .tablist{ grid-template-columns:1fr; } }

/* ── section 4: what it gives you — four cards between the guide lines ── */
.cons-root{ display:flex; align-items:center; gap:18px; flex-wrap:wrap; margin-top:clamp(34px,4vw,48px); padding:0 var(--gut) 26px;
  font-family:var(--display); font-size:12px; font-weight:600; letter-spacing:.07em; text-transform:uppercase; color:rgba(255,255,255,.62); }
.cons-root i{ width:4px; height:4px; border-radius:50%; background:var(--turquoise); box-shadow:0 0 12px rgba(31,177,213,.75); }
.cons-grid{ display:grid; grid-template-columns:repeat(4,1fr); border-top:1px solid var(--line); }
.cons-card{ position:relative; padding:34px var(--pad) 42px; border-right:1px solid var(--line); transition:background .3s ease; }
.cons-card:first-child{ padding-left:var(--gut); }
.cons-card:last-child{ border-right:none; padding-right:var(--gut); }
