/* =====================================================================
   DOSIK TECHNOLOGY · PAGE CSS · KNOWLEDGE (/knowledge and /knowledge/it-tools)
   The hub: the featured guide, the guide library with a pillar filter that needs no JS (:target + :has), the IT tools teaser.
   IT tools: the legend, the disclaimer, the tool rows with a monogram tile (design, never a vendor logo).
   Load after inner.css, on these two pages only. Built from the shared tokens and card language (surface, hairline, --r-l, --sh-1).
   ===================================================================== */
/* ---------- the featured guide: copy and contents | the cover ---------- */
.kfeat { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.kfeat__body { display: grid; justify-items: start; gap: 16px; min-width: 0; }
.kfeat__title { font-size: clamp(1.7rem, 1.15rem + 1.6vw, 2.55rem); line-height: 1.2; text-wrap: balance; }
.kfeat__title a { color: inherit; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size var(--t-3) var(--e-out); }
.kfeat__title a:hover { background-size: 100% 2px; }
.kfeat__meta, .gcard__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.kfeat__time, .gcard__time { display: inline-flex; align-items: center; gap: 6px; font: var(--fw-medium) var(--fz-xs)/1.3 var(--f-display); color: var(--text-3); }
.kfeat__time .ico, .gcard__time .ico { width: 16px; height: 16px; flex: none; }
.kfeat__lead { max-width: 62ch; color: var(--text-2); }
.kfeat__inside { justify-self: stretch; padding: 18px 20px; border-radius: var(--r-l); background: var(--bg); border: 1px solid var(--line); }
.kfeat__inside-h { margin-bottom: 8px; font: var(--fw-semibold) var(--fz-sm)/1.3 var(--f-display); color: var(--text-3); }
.kfeat__inside ol { counter-reset: kin; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 24px; }
.kfeat__inside li a {
  display: grid; grid-template-columns: 1.8em minmax(0, 1fr); gap: 6px; padding: 6px 0;
  font: var(--fw-medium) .95rem/1.45 var(--f-display); color: var(--text); transition: color var(--t-1);
}
.kfeat__inside li a::before { counter-increment: kin; content: counter(kin, decimal-leading-zero); font: var(--fw-semibold) var(--fz-micro)/1.95 var(--f-display); color: var(--link); }
.kfeat__inside li a:hover { color: var(--link); }
.kfeat__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 4px; }
.kfeat__media { position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 5 / 4; border-radius: var(--r-xl); background: var(--night); box-shadow: var(--sh-3); }
.kfeat__media img { width: 100%; height: 100%; object-fit: cover; }
.kfeat__tag {
  position: absolute; inset-block-end: 18px; inset-inline-start: 18px; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 12px; border-radius: var(--r-pill); background: var(--surface-glass-strong); border: 1px solid rgba(255, 255, 255, .95);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--sh-2);
  font: var(--fw-medium) var(--fz-xs)/1.2 var(--f-display); color: var(--text);
}
.kfeat__tag .ico { width: 18px; height: 18px; color: var(--link); }
/* ---------- the library: the pillar filter (no JS: a chip targets a hidden anchor, :has() hides the other cards) ---------- */
.klib { position: relative; margin-top: clamp(24px, 3vw, 36px); }
.klib__t { position: absolute; top: 0; }
.kfilter ul { display: flex; flex-wrap: wrap; gap: 8px; }
.kchip { min-height: 42px; padding-inline: 16px 8px; gap: 10px; }
.kchip:not(.kchip--all)::before { content: ""; width: 10px; height: 9px; flex: none; background: var(--c, var(--teal-500)); clip-path: polygon(0 0, 100% 0, 50% 100%); border-radius: 2px; }
.kchip__n {
  display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding-inline: 8px; border-radius: var(--r-pill);
  background: var(--bg-2); font: var(--fw-semibold) var(--fz-xs)/1 var(--f-display); color: var(--text-2);
}
/* the current filter */
.klib:not(:has(.klib__t:target)) .kchip--all,
.klib:has(#k-computing:target) .kchip[href="#k-computing"],
.klib:has(#k-cloud:target) .kchip[href="#k-cloud"],
.klib:has(#k-backup:target) .kchip[href="#k-backup"],
.klib:has(#k-cybersecurity:target) .kchip[href="#k-cybersecurity"],
.klib:has(#k-communications:target) .kchip[href="#k-communications"] { background: var(--grad-btn); border-color: transparent; color: var(--text-on-accent); }
.klib:not(:has(.klib__t:target)) .kchip--all .kchip__n,
.klib:has(#k-computing:target) .kchip[href="#k-computing"] .kchip__n,
.klib:has(#k-cloud:target) .kchip[href="#k-cloud"] .kchip__n,
.klib:has(#k-backup:target) .kchip[href="#k-backup"] .kchip__n,
.klib:has(#k-cybersecurity:target) .kchip[href="#k-cybersecurity"] .kchip__n,
.klib:has(#k-communications:target) .kchip[href="#k-communications"] .kchip__n { background: rgba(255, 255, 255, .22); color: inherit; }
.klib:has(#k-computing:target) .gcard:not([data-pillar="computing"]),
.klib:has(#k-cloud:target) .gcard:not([data-pillar="cloud"]),
.klib:has(#k-backup:target) .gcard:not([data-pillar="backup"]),
.klib:has(#k-cybersecurity:target) .gcard:not([data-pillar="cybersecurity"]),
.klib:has(#k-communications:target) .gcard:not([data-pillar="communications"]) { display: none; }
/* ---------- guide cards: the cover on top, the pillar badge, the title link stretched over the card ---------- */
.kgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: clamp(20px, 2.4vw, 28px); }
/* the whole library in three columns: a lone last card sits in the middle, not at the row's start (filters unaffected) */
@media (min-width: 1181px) {
  .klib:not(:has(.klib__t:target)) .kgrid > li:last-child:nth-child(3n + 1) { grid-column: 2; }
}
.gcard {
  position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-l);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1);
  transition: transform var(--t-3) var(--e-out), box-shadow var(--t-3), border-color var(--t-3);
}
.gcard:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: color-mix(in srgb, var(--c, var(--teal-500)) 35%, transparent); }
.gcard__media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--night); }
.gcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-4) var(--e-out); }
/* an older article's stock photo in the brand duotone (#duo-card, as the article hero), beside the glass-icon covers */
.gcard__media--duo img { filter: url(#duo-card); }
.gcard:hover .gcard__media img { transform: scale(1.04); }
.gcard__body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; }
.gcard .badge { align-self: flex-start; }
.gcard__title { font: var(--fw-semibold) 1.13rem/1.4 var(--f-display); color: var(--text); text-wrap: balance; }
.gcard__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.gcard__title a:focus-visible { outline: none; }
.gcard:has(.gcard__title a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.gcard__text { color: var(--text-3); font-size: .97rem; line-height: 1.65; }
.gcard__go { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 6px; font: var(--fw-medium) .95rem/1 var(--f-display); color: var(--link); }
.gcard__go .ico { width: 18px; height: 18px; transition: transform var(--t-2) var(--e-out); }
.gcard:hover .gcard__go .ico { transform: translateX(-4px); }
/* ---------- the IT tools teaser: copy | a shelf of the tools on the page ---------- */
.ktools {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: center;
  margin-top: clamp(48px, 6vw, 80px); padding: clamp(24px, 3.4vw, 44px); border-radius: var(--r-xl);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1);
}
.ktools__copy { display: grid; justify-items: start; gap: 14px; }
.ktools__text { color: var(--text-2); line-height: 1.7; }
.ktools__shelf { padding: clamp(18px, 2.4vw, 26px); border-radius: var(--r-l); background: var(--bg); border: 1px solid var(--line); }
.ktools__label { margin-bottom: 12px; font: var(--fw-semibold) var(--fz-sm)/1.3 var(--f-display); color: var(--text-3); }
.ktools__shelf ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.ktools__shelf li { display: flex; align-items: center; gap: 12px; min-width: 0; font: var(--fw-medium) .98rem/1.3 var(--f-display); color: var(--text); }
/* the monogram tile (the tool's initials: design, not a logo) */
.kmono {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--grad-btn); color: var(--text-on-accent); box-shadow: 0 10px 20px -12px rgba(14, 92, 120, .8);
  font: var(--fw-semibold) .92rem/1 var(--f-display); letter-spacing: .02em; direction: ltr;
}
/* ---------- IT tools: legend, disclaimer, tool rows ---------- */
.tlegend { display: flex; flex-wrap: wrap; gap: 8px; }
.tlegend li { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); font: var(--fw-medium) var(--fz-sm)/1.2 var(--f-display); color: var(--text-2); }
.tlegend .ico { width: 18px; height: 18px; color: var(--link); }
.tnote { margin-top: clamp(20px, 2.6vw, 28px); max-width: 860px; font-size: .98rem; line-height: 1.6; color: var(--text-2); }
.tlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: clamp(20px, 2.6vw, 30px); }
.tlist > li:last-child:nth-child(odd) { grid-column: 1 / -1; }   /* an odd last tool spans the row (one column ≤ 960 px anyway) */
.trow {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 16px;
  padding: 16px 18px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1);
  transition: border-color var(--t-2), box-shadow var(--t-3);
}
.isec--white .trow { background: var(--bg); box-shadow: none; }
.trow:hover { border-color: color-mix(in srgb, var(--teal-500) 40%, transparent); box-shadow: var(--sh-2); }
.trow__txt { display: grid; gap: 3px; min-width: 0; }
.trow__name { font: var(--fw-semibold) 1.04rem/1.35 var(--f-display); color: var(--text); overflow-wrap: anywhere; }
.trow__txt p { font-size: var(--fz-sm); line-height: 1.55; color: var(--text-3); }
.trow__go { flex: none; }
/* ---------- high contrast ---------- */
html.a11y-contrast :is(.kfeat__inside, .gcard, .ktools, .ktools__shelf, .trow, .tlegend li) { background: #fff; border: 2px solid #000; box-shadow: none; }
html.a11y-contrast .kfeat__tag { background: #fff; border: 2px solid #000; -webkit-backdrop-filter: none; backdrop-filter: none; }
html.a11y-contrast .kmono { background: #000; color: #fff; box-shadow: none; }
/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .kgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .kfeat { grid-template-columns: minmax(0, 1fr); }
  .kfeat__media { order: -1; aspect-ratio: 16 / 9; }
  .ktools { grid-template-columns: minmax(0, 1fr); }
  .tlist { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .kfeat__inside ol { grid-template-columns: minmax(0, 1fr); }
  .kgrid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ktools__shelf ul { grid-template-columns: minmax(0, 1fr); }
  .trow { grid-template-columns: auto minmax(0, 1fr); padding: 14px 16px; }
  .trow__go { grid-column: 1 / -1; justify-self: start; }
}
@media (hover: none) {
  .gcard:hover { transform: none; }
  .gcard:hover .gcard__media img { transform: none; }
}
