/* Canonical theme.js supplies bilingual accessible-name suffixes. Clip the
   suffix visually while keeping it available to assistive technology. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
/* All three pages are English; expose only the matching suffix. */
html[lang|="en"] .lang-it, html[lang|="it"] .lang-en { display: none; }

/* These faint chapter numbers are decoration. Generated content retains their
   appearance without exposing low-contrast text nodes to contrast checks. */
.jk-ct > .jk-deco[aria-hidden="true"]::before { content: attr(data-n); }

/* Keep Pommidoro’s 760px reading column and top bar aligned; ultrawide
   dashboard columns would split its sequential support/privacy chapters. */
.jk-top { width: min(calc(100% - 20px), var(--jk-measure)); }
.jk-chs,
.jk-chs.solo {
  width: 100%;
  max-width: var(--jk-measure);
  margin-inline: auto;
}
@media (min-width: 1920px) {
  .jk-chs,
  .jk-chs.solo { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
  .jk-chs > .jk-ch:nth-child(n) {
    border-left: 0;
    padding-left: 0;
    margin-left: 0;
  }
  .jk-ch + .jk-ch {
    border-top: 1px solid var(--jk-hair);
    padding-top: calc(var(--jk-chapter-gap) / 2);
  }
}
@media (min-width: 2560px) {
  .jk-chs,
  .jk-chs.solo { grid-template-columns: minmax(0, 1fr); }
  .jk-chs > .jk-ch:nth-child(n) {
    border-left: 0;
    padding-left: 0;
    margin-left: 0;
  }
  .jk-chs > .jk-ch:nth-child(n+2) {
    border-top: 1px solid var(--jk-hair);
    padding-top: calc(var(--jk-chapter-gap) / 2);
  }
}

/* Semibold questions, stacked under the eyebrow. The 900px side-by-side title is a dashboard habit. */
.jk-ct .jk-eb,
.jk-ct .jk-eb b { color: var(--jk-accent-text); }
.jk-ct .jk-q { font-weight: 650; }
@media (min-width: 900px) {
  .jk-ct { display: block; }
  .jk-ct .jk-lede { margin: var(--jk-s2) 0 0; font-size: var(--jk-fs-lede); }
}

/* The app icon and wordmark need a shared baseline and a comfortable link target. */
.jk-top .jk-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}
.jk-top .jk-mark img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex: none;
}
/* At 320–380px, compact the icon and wordmark so the canonical theme
   switch remains inside the bar. Its canonical button targets stay intact. */
@media (max-width: 380px) {
  .jk-top .jk-mark { gap: 6px; font-size: 17px; }
  .jk-top .jk-mark img { width: 24px; height: 24px; }
}
/* Keep desktop page links comfortably clickable and identify the current page. */
.jk-top a.jk-sw {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}
.jk-top a.jk-sw[aria-current="page"] {
  font-weight: 650;
  background: var(--jk-accent-wash);
  color: var(--jk-accent-text);
}
/* Tie the selected theme to the site’s tomato wash without a raised shadow. */
.jk-thsw button[aria-pressed="true"] {
  background: var(--jk-accent-wash);
  color: var(--jk-accent-text);
  box-shadow: none;
}

/* Phase rows retain a dot, a wrapping label and a right-aligned time. */
.jk-rows.phases { --jk-cols: 16px minmax(0, 1fr) auto; }
.jk-rows.phases li > span { white-space: normal; }
@container (max-width: 520px) {
  .jk-rows.phases { --jk-cols: 16px minmax(0, 1fr) auto !important; }
}

/* Support links and prose lists need wrapping, single-column shared rows. */
.jk-rows.stack { --jk-cols: minmax(0, 1fr); }
.jk-rows.stack li > span,
.jk-rows.stack li > a { white-space: normal; }
@container (max-width: 520px) {
  .jk-rows.stack { --jk-cols: minmax(0, 1fr) !important; }
}
.jk-rows.links a {
  display: flex;
  align-items: center;
  min-height: 40px;
  margin: calc(var(--jk-row-pad) * -1) 0;
  padding: var(--jk-row-pad) 0;
  color: var(--jk-ink);
  font-weight: 650;
  text-decoration: none;
}
.jk-rows.links a.primary { color: var(--jk-accent-text); }
.jk-rows.links a:hover,
.jk-rows.links a:focus-visible { text-decoration: underline; text-underline-offset: .18em; }

/* The mobile page dock uses links rather than the shared button indicator;
   keep its flat surface and current-page treatment. On desktop the top bar
   supplies navigation, so the dock and its footer clearance are unnecessary. */
.site-nav .jk-pill {
  background: var(--jk-surface-2);
  border: 1px solid var(--jk-hair);
  box-shadow: none;
}
.site-nav .jk-pill a {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 16px;
  border-radius: var(--jk-r-pill);
  color: var(--jk-ink-2);
  font: 500 15px/1 var(--jk-font);
  text-decoration: none;
  white-space: nowrap;
}
.site-nav .jk-pill a[aria-current="page"] {
  background: var(--jk-accent-wash);
  color: var(--jk-accent-text);
  font-weight: 600;
}
@media (max-width: 640px) {
  /* 56px top bar + 10px offset; reserve 70px plus a 14px content gap.
     Allow 96px for the 54px bottom pill, its line box and 16px offset. */
  .jk-page {
    padding-top: calc(70px + env(safe-area-inset-top) + 14px);
    padding-bottom: 0;
  }
  /* Keep the footer directly after the final link, above the dock reserve. */
  .jk-end { padding: 12px 16px calc(96px + env(safe-area-inset-bottom) + 14px); }
  .jk-end p { margin: 0; }

  /* Fit the home links and footer above the fixed pill at 390 × 844. */
  #focus {
    --jk-hero-gap: 12px;
    --jk-group-gap: 12px;
    --jk-row-pad: 8px;
  }
  #focus .jk-lede { font-size: 18px; line-height: 1.5; }
  #focus .jk-cmp { font-size: 15px; line-height: 1.5; }
  #focus .jk-rows.links a { min-height: 44px; }
}
@media (min-width: 641px) {
  .site-nav { display: none; }
  .jk-end { padding-bottom: calc(var(--jk-s10) + env(safe-area-inset-bottom)); }
}
