/* ==========================================================
   All Keyboards – guides (/blog list and /blog/{slug} articles)
   Same identity as the home page: teal ink on cool paper, marigold only for progress and
   "you are here", IBM Plex Sans for headings and text (Plex Devanagari / Arabic inside the guides). The keycap is used where it means something:
   shortcuts in the text and each guide's subject letter.
   ========================================================== */
.bl {
  --ink: #0e2a31;
  --lagoon: #135e6e;
  --paper: #f3f7f8;
  --line: #d3e1e4;
  --muted: #4f6469;
  --marigold: #f2b33d;
  --key: #ffffff;
  --key-edge: #b8cfd4;
  --display: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --text: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;

  font-family: var(--text);
  color: var(--ink);
  background: var(--paper);
  padding: 44px 0 0;
}
.bl a { color: var(--lagoon); }
.bl :focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; border-radius: 4px; }
.bl [lang="hi"] { font-family: "IBM Plex Sans Devanagari", "Noto Sans Devanagari", var(--text); }
.bl [lang="ar"] { font-family: "IBM Plex Sans Arabic", "Noto Naskh Arabic", var(--text); }

.bl-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 600;
  letter-spacing: -.022em;
  line-height: 1.1;
  color: var(--ink);
  text-wrap: balance;
}

/* a keycap: a guide's subject letter */
.bl-cap {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 56px;
  height: 52px;
  border-radius: 10px;
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--key-edge);
  background: var(--key);
  color: var(--lagoon);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
}
.bl-cap--big { width: 112px; height: 104px; border-radius: 16px; border-bottom-width: 4px; font-size: 2.6rem; }

/* ---------- Guide list ---------- */
.bl-index-head { max-width: 720px; margin-bottom: 32px; }
.bl-lead { margin: 14px 0 0; font-size: 1.1rem; line-height: 1.6; color: var(--muted); max-width: 62ch; }

.bl-feature {
  display: flex;
  gap: 28px;
  align-items: center;
  padding: 28px 32px;
  margin-bottom: 40px;
  border-radius: 20px;
  background: var(--lagoon);
  color: #fff !important;
  text-decoration: none;
  box-shadow: none;
}
.bl-feature .bl-cap { border-color: #0f4c59; border-bottom-color: #8fc3cf; }
.bl-feature-text { display: grid; gap: 8px; max-width: 64ch; }
.bl-feature-cat { font-size: .9rem; color: #bfe3eb; }
.bl-feature strong { font-family: var(--display); font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-weight: 600; line-height: 1.2; letter-spacing: -.012em; }
.bl-feature-text > span:not(.bl-feature-cat):not(.bl-feature-go) { color: #d9eef3; line-height: 1.6; }
.bl-feature-go { justify-self: start; margin-top: 4px; padding-bottom: 2px; font-weight: 700; border-bottom: 2px solid var(--marigold); }
.bl-feature:hover .bl-feature-go { color: var(--marigold); }

/* topic filter: small keycaps, like the home page regions */
.bl-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.bl-chip {
  padding: 7px 14px;
  border-radius: 9px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  background: var(--key);
  color: var(--ink);
  font: 500 .9rem var(--text);
  cursor: pointer;
  transition: transform .1s, border-bottom-width .1s;
}
.bl-chip:hover { border-color: var(--key-edge); }
.bl-chip:active { transform: translateY(2px); border-bottom-width: 1px; }
.bl-chip.is-active { background: var(--lagoon); border-color: var(--lagoon); border-bottom-color: var(--ink); color: #fff; }

.bl-rows { margin: 0; padding: 0; list-style: none; }
.bl-rows li { border-bottom: 1px solid var(--line); }
.bl-rows li[hidden] { display: none; }
.bl-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 20px 12px;
  margin: 0 -12px;
  border-radius: 12px;
  color: var(--ink) !important;
  text-decoration: none;
  transition: background-color .15s;
}
.bl-row:hover { background: var(--key); }
.bl-row:hover .bl-cap { border-bottom-color: var(--marigold); }
.bl-row-text { display: grid; gap: 4px; }
.bl-row-text strong { font-family: var(--display); font-size: 1.18rem; font-weight: 600; line-height: 1.3; letter-spacing: -.008em; }
.bl-row-text span { color: var(--muted); line-height: 1.55; max-width: 72ch; }
.bl-row-cat { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.bl-none { padding: 24px 0; color: var(--muted); }
.bl > .container-xl:last-child { padding-bottom: 72px; }

/* ---------- Article ---------- */
.bl-progress { position: fixed; z-index: 1030; top: 0; left: 0; right: 0; height: 4px; pointer-events: none; }
.bl-progress span { display: block; height: 100%; background: var(--marigold); transform: scaleX(0); transform-origin: left; }

.bl-head { max-width: 820px; margin-bottom: 32px; }
.bl-crumbs { display: flex; gap: 8px; margin-bottom: 14px; font-size: .92rem; color: var(--muted); }
.bl-crumbs a { font-weight: 700; text-decoration: none; }
.bl-crumbs a:hover { text-decoration: underline; }
.bl-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 18px 0 0; font-size: .92rem; color: var(--muted); }
.bl-meta a { font-weight: 700; }

.bl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 56px; align-items: start; padding-bottom: 72px; }
.bl-main { max-width: 720px; min-width: 0; }

/* the quick answer: a keycap-edged box */
.bl-answer {
  margin-bottom: 36px;
  padding: 20px 24px;
  border-radius: 14px;
  background: var(--key);
  border: 1px solid var(--line);
  border-left: 4px solid var(--marigold);
}
.bl-answer h2 { margin: 0 0 6px; font-family: var(--text); font-size: .95rem; font-weight: 700; color: var(--lagoon); }
.bl-answer p { margin: 0; font-size: 1.1rem; line-height: 1.65; color: var(--ink); }

.bl-body { font-size: 1.0625rem; line-height: 1.7; color: #24393f; }
.bl-body > :first-child { margin-top: 0; }
.bl-body h2 {
  margin: 44px 0 12px;
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.2vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.2;
  color: var(--ink);
  scroll-margin-top: 24px;
}
.bl-body h3 { margin: 28px 0 8px; font-size: 1.15rem; font-weight: 600; color: var(--ink); }
.bl-body p { margin: 0 0 16px; }
.bl-body ul, .bl-body ol { margin: 0 0 18px; padding-left: 24px; }
.bl-body li { margin-bottom: 8px; }
.bl-body li::marker { color: var(--lagoon); font-weight: 700; }
.bl-body a { font-weight: 600; text-decoration-color: rgba(19, 94, 110, .4); text-underline-offset: 3px; }
.bl-body a:hover { text-decoration-color: var(--marigold); }
.bl-body strong { color: var(--ink); }
.bl-body code { padding: 1px 6px; border-radius: 5px; background: #e6eff1; color: var(--lagoon); font-size: .9em; }
.bl-body [lang]:not([lang="en"]) { font-size: 1.05em; }

/* shortcuts in the text are drawn as keycaps */
.bl kbd {
  display: inline-block;
  min-width: 1.9em;
  padding: 1px 7px 0;
  border-radius: 6px;
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--key-edge);
  background: var(--key);
  color: var(--ink);
  font: 500 .82em/1.6 var(--text);
  text-align: center;
  vertical-align: .08em;
  box-shadow: none;
}

/* tables scroll inside their box on small screens */
.bl-body .table-wrap { overflow-x: auto; margin: 6px 0 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--key); }
.bl-body table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: .95rem; line-height: 1.5; }
.bl-body th { padding: 10px 14px; background: #e6eff1; color: var(--ink); text-align: left; font-weight: 700; }
.bl-body td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.bl-body td[lang], .bl-body th[lang] { font-size: 1.2rem; }

/* try it now */
.bl-try {
  margin: 40px 0 0;
  padding: 24px 26px;
  border-radius: 16px;
  background: var(--lagoon);
  color: #fff;
}
.bl-try h2 { margin: 0 0 12px; font-family: var(--display); font-size: 1.3rem; font-weight: 600; color: #fff; }
.bl-try ul { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.bl-try a {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 10px;
  background: var(--key);
  border-bottom: 2px solid #8fc3cf;
  color: var(--ink) !important;
  font-weight: 600;
  text-decoration: none;
  transition: transform .1s, border-bottom-width .1s;
}
.bl-try a:hover { border-bottom-color: var(--marigold); }
.bl-try a:active { transform: translateY(2px); border-bottom-width: 1px; }

/* FAQ (guide.css) inside the article */
.bl .guide-faq { margin-top: 40px; padding: 0; border: 0; background: transparent; }
.bl .guide-faq h2 { font-family: var(--display); font-size: clamp(1.4rem, 2.2vw, 1.7rem); font-weight: 600; letter-spacing: -.02em; scroll-margin-top: 24px; }
.bl .faq-item { border-color: var(--line); }

/* on this page */
.bl-toc { position: sticky; top: 28px; padding-left: 18px; border-left: 2px solid var(--line); }
.bl-toc h2 { margin: 0 0 12px; font-size: .95rem; font-weight: 700; color: var(--muted); }
.bl-toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.bl-toc a { position: relative; display: block; font-size: .92rem; line-height: 1.4; color: var(--muted); text-decoration: none; }
.bl-toc a:hover { color: var(--ink); }
.bl-toc a.is-current { color: var(--ink); font-weight: 700; }
.bl-toc a.is-current::before { content: ""; position: absolute; left: -20px; top: 0; bottom: 0; width: 2px; background: var(--marigold); }

/* more guides */
.bl-next { padding: 56px 0 72px; border-top: 1px solid var(--line); background: var(--key); }
.bl-next h2 { margin: 0 0 12px; font-family: var(--display); font-size: clamp(1.45rem, 2.4vw, 1.85rem); font-weight: 600; letter-spacing: -.02em; }
.bl-next .bl-row:hover { background: var(--paper); }

.bl-missing { padding: 40px 0 96px; }
.bl-missing p { margin-top: 14px; font-size: 1.1rem; }

/* footer runs edge to edge under the guides, like on the home page */
.page-blog .site-footer { max-width: none; margin-top: 0; padding-inline: max(26px, calc((100% - 1100px) / 2 + 26px)); }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .bl-layout { grid-template-columns: 1fr; gap: 0; }
  .bl-toc { display: none; }
  .bl-main { max-width: none; }
}
@media (max-width: 767.98px) {
  .bl { padding-top: 32px; }
  .bl-feature { flex-direction: column; align-items: flex-start; gap: 18px; padding: 22px; }
  .bl-cap--big { width: 84px; height: 78px; font-size: 2rem; border-bottom-width: 5px; }
  .bl-row { grid-template-columns: auto minmax(0, 1fr); gap: 14px; }
  .bl-row-cat { display: none; }
  .bl-cap { width: 46px; height: 44px; font-size: 1.15rem; }
  .bl-row-text strong { font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .bl-chip, .bl-try a, .bl-row { transition: none; }
}
