/* Build page compositions r7 (hub 03.12 after r6b: «композиция мне не нравится»). Only the layout of the row strip, the
   breakdown and «Де клацати» changes; text, pictures, colours and type are the page's own. Variant = class on .tool-sec. */

/* the panel's small label stands on the line of the section heading next to it, the panel on the line of the first row */
@media (min-width:1024px){
  .tool-sec:is(.k-a,.k-b,.k-c) .tool-side{row-gap:1.1rem}
  .tool-sec:is(.k-a,.k-b,.k-c) .tool-side .side-h{margin:0;height:calc(1.7rem * 1.2);display:flex;align-items:center}
}

/* ★A - the strip over its breakdown: the row's sentence on its own line, the options as a table (chip column as wide as the
   widest chip | text column), the remark on the text column; panel at the right (ChatGPT r27: chip column, sentence line) */
.tool-sec.k-a .g2 .g-ra>li{display:block;padding:1.5rem 0}
.tool-sec.k-a .g2 .g-ra>li:first-child{padding-top:0}
.tool-sec.k-a .g2 .g-ra figure{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem 1rem;margin:0 0 1rem}
.tool-sec.k-a .g2 .g-ra figure img{width:369px;max-width:100%;flex:none}
.tool-sec.k-a .g2 .g-ra figcaption{margin:0}
/* from 1024px the row's intro line stands on the same two columns as its options, so every dash is on one vertical (owner 03.12
   ~20:00 on r7 ★A: «вот тут только - съезжает»; C-39). Below 1024px the r7 flow stays: the dash right after the chip (HQ: the
   owner named only the desktop frame) */
@media (min-width:1024px){
  .tool-sec.k-a .g2 .g-what,.tool-sec.k-a .g2 .g-opts>li{display:grid;grid-template-columns:5.25rem minmax(0,1fr);column-gap:.75rem;align-items:baseline}
  .tool-sec.k-a .g2 .g-what .g-chip,.tool-sec.k-a .g2 .g-opts .g-chip{justify-self:start}
  .tool-sec.k-a .g2 .g-opts{gap:.4rem;margin-top:.75rem}
  .tool-sec.k-a .g2 .g-note{padding-left:6rem}
}
@media (max-width:1023.98px){
  .tool-sec.k-a .tool-side,.tool-sec.k-c .tool-side{order:-1;margin-bottom:.5rem}
}

/* B - two columns with no side column next to the rows: strip, caption and the row's sentence at the left, the options table
   at the right, the row's remark under both; the panel moves next to the buttons it shows, the buttons as a list */
@media (min-width:1024px){
  .dl>main .tool-sec.k-b .tool-layout,.tool-sec.k-b .tool-layout{grid-template-columns:minmax(0,1fr) minmax(16.5rem,var(--dl-right,20rem));
    grid-template-areas:"rows rows" "btns side";row-gap:0}
  .tool-sec.k-b .tool-main,.tool-sec.k-b .g2{display:contents}
  .tool-sec.k-b .g2>.g-blk:first-child{grid-area:rows}
  .tool-sec.k-b .g2>.g-blk:nth-child(2){grid-area:btns;margin-bottom:0}
  .dl>main .tool-sec.k-b .tool-layout>.tool-side,.tool-sec.k-b .tool-side{grid-area:side;position:static}
  .tool-sec.k-b .g2 .g-ra>li{grid-template-columns:369px minmax(0,1fr);grid-template-rows:auto auto 1fr;column-gap:3rem;row-gap:.75rem;
    padding:1.5rem 0}
  .tool-sec.k-b .g2 .g-ra>li:first-child{padding-top:0}
  .tool-sec.k-b .g2 .g-ra>li>div{display:contents}
  .tool-sec.k-b .g2 .g-ra figure{grid-column:1;grid-row:1}
  .tool-sec.k-b .g2 .g-ra .g-what{grid-column:1;grid-row:2}
  .tool-sec.k-b .g2 .g-opts{grid-column:2;grid-row:1/span 3;margin:0;gap:.4rem;align-content:start}
  .tool-sec.k-b .g2 .g-note{grid-column:1/-1;grid-row:4;margin:0}
  .tool-sec.k-b .g2 .g-opts>li{display:grid;grid-template-columns:6.75rem minmax(0,1fr);column-gap:.75rem;align-items:baseline}
  .tool-sec.k-b .g2 .g-opts .g-chip{justify-self:start}
  /* the buttons as a list, one line each, next to the panel that shows them */
  .tool-sec.k-b .g2>.g-blk:nth-child(2){align-self:stretch;display:flex;flex-direction:column}
  .tool-sec.k-b .g2 .g-bgrid{grid-template-columns:minmax(0,1fr);grid-auto-rows:1fr;gap:.6rem;flex:1}
  .tool-sec.k-b .g2 .g-bgrid>*{grid-template-columns:28px 10rem minmax(0,1fr) auto;align-items:center;align-content:center;column-gap:1rem;padding:.9rem 1rem}
  .tool-sec.k-b .g2 .g-bgrid img{grid-row:auto}
  .tool-sec.k-b .g2 .g-bgrid .g-rch{margin:0;justify-content:flex-end}
}

/* C - the four rows as cards 2 x 2 (strip on top of each card), the buttons on the same two columns; panel at the right */
.tool-sec.k-c .g2 .g-ra>li{display:block;padding:1rem;border:0;border-radius:14px;background:#fff;box-shadow:inset 0 0 0 1px rgba(31,34,49,.12)}
.tool-sec.k-c .g2 .g-ra>li:first-child{padding-top:1rem}
.tool-sec.k-c .g2 .g-ra figure{margin:0 0 .9rem}
.tool-sec.k-c .g2 .g-ra{display:grid;gap:.75rem}
@media (min-width:1024px){
  .tool-sec.k-c .g2 .g-ra,.tool-sec.k-c .g2 .g-bgrid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
