/* ==========================================================================
   can-i-sign-this (guide N2) — on top of the guide kit (pages/_guide.css).
   Only what the document table needs: the five-group index, each group's measure, the verdict chips under the
   document name, the linked row (:target), the law line, and the finder that scripts/pages/can-i-sign-this.js adds.
   Flat colour, crisp edges; chips are words, never ticks.
   ========================================================================== */

/* the five groups: one row of flat index cards, each with its verdict chip and count */
html body .cs-groups {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 30px 0 8px;
}
html body .cs-groups a {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 118px;
  padding: 16px 16px 14px; border-radius: 16px; background: #fff; box-shadow: var(--gd-card);
  color: var(--gd-ink); text-decoration: none; transition: box-shadow 140ms ease, transform 140ms ease;
}
html body .cs-groups a b { display: block; font: 600 14.5px/1.35 var(--font-sans); letter-spacing: -.005em; }
html body .cs-groups a i {
  margin-top: auto; color: var(--gd-mute); font: 500 12.5px/1 var(--font-sans); font-style: normal; font-variant-numeric: tabular-nums;
}
html body .cs-groups a:hover { box-shadow: var(--gd-lift); transform: translateY(-1px); }
html body .cs-groups a:hover b { color: var(--gd-blue); }
html body .cs-groups a:focus-visible { outline: 2px solid var(--gd-blue); outline-offset: 3px; }
html body .cs-groups a[hidden] { display: none; }
@media (max-width: 1240px) { html body .cs-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  html body .cs-groups { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 24px; border-radius: 18px; background: #fff; box-shadow: var(--gd-card); overflow: hidden; }
  html body .cs-groups a {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; min-height: 0;
    padding: 14px 18px; border-radius: 0; box-shadow: none; background: transparent;
  }
  html body .cs-groups a + a { box-shadow: inset 0 1px 0 var(--gd-line); }
  html body .cs-groups a .gd-chip { grid-row: 1; grid-column: 1; justify-self: start; }
  html body .cs-groups a b { grid-row: 2; grid-column: 1; }
  html body .cs-groups a i { grid-row: 1 / span 2; grid-column: 2; margin: 0; }
  html body .cs-groups a:hover { transform: none; }
}

/* each group: its heading and one-line intro keep the article's measure; the table takes the full width */
html body .cs-group { scroll-margin-top: var(--gd-clear); }
html body .cs-group > p { max-width: var(--gd-measure); }
html body .cs-group > h3 { scroll-margin-top: var(--gd-clear); margin-top: 56px; }
html body .cs-group > .gd-table { margin-top: 22px; }
html body .cs-group[hidden], html body .cs-table tbody tr[hidden] { display: none !important; }

/* the table: document (with its verdict) · why (with the law) · what KuduDoc does */
html body .cs-table table { table-layout: fixed; }
html body .cs-table thead th:nth-child(1) { width: 29%; }
html body .cs-table thead th:nth-child(2) { width: 37%; }
html body .cs-table tbody th small { font-family: var(--font-sans); font-weight: 500; }
html body .cs-verdict { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
html body .cs-table td small.cs-law { margin-top: 8px; color: var(--gd-mute); font: 500 13px/1.5 var(--font-sans); }
html body .cs-table td small.cs-law a { color: var(--gd-slate); text-decoration-color: rgba(16, 45, 73, .28); }
html body .cs-table td small.cs-law a:hover { color: var(--gd-blue); }

/* the linked row: a pale ground and the mark's stroke at its edge (redirects and in-body links land here) */
html body .cs-table tbody tr[id] { scroll-margin-top: var(--gd-clear); }
html body .cs-table tbody tr:target > :is(th, td) { background: #eef6fd; }
html body .cs-table tbody tr:target > th { box-shadow: inset 4px 0 0 var(--gd-blue); }

@media (max-width: 640px) {
  html body .cs-table table { table-layout: auto; }
  html body .cs-table thead th { width: auto !important; }
  html body .cs-table tbody th .cs-verdict { margin-top: 10px; }
  html body .cs-table tbody tr:target { box-shadow: inset 0 0 0 2px var(--gd-blue), var(--gd-card); }
  html body .cs-table tbody tr:target > :is(th, td) { background: transparent; box-shadow: none; }
}

/* the finder (added by the page script; the page is complete without it) */
html body .cs-find { max-width: none; margin: 26px 0 0; }
html body .cs-find label { display: block; margin: 0 0 8px; color: var(--gd-ink); font: 600 14.5px/1.4 var(--font-sans); }
html body .cs-find-box {
  display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 8px 0 18px; border-radius: 16px;
  background: #fff; box-shadow: inset 0 0 0 1px rgba(16, 45, 73, .14), 0 1px 2px rgba(16, 45, 73, .04);
  transition: box-shadow 140ms ease;
}
html body .cs-find-box:focus-within { box-shadow: inset 0 0 0 2px var(--gd-blue); }
html body .cs-find-box .icon { flex: none; width: 18px; height: 18px; color: var(--gd-mute); }
html body .cs-find-box input {
  flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0; outline: 0; background: transparent; box-shadow: none;
  color: var(--gd-ink); font: 400 16.5px/1.3 var(--font-sans); appearance: none; -webkit-appearance: none;
}
html body .cs-find-box input::placeholder { color: #8a99aa; }
html body .cs-find-box input::-webkit-search-cancel-button { display: none; }
html body .cs-find-clear {
  flex: none; height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: #eef2f7; color: #3f5470;
  font: 600 13px/1 var(--font-sans); cursor: pointer;
}
html body .cs-find-clear:hover { background: #e3f0fc; color: #0b5cad; }
html body .cs-find-clear[hidden] { display: none; }
html body .cs-find-status { min-height: 1.5em; margin: 10px 0 0 !important; color: var(--gd-slate); font: 500 14px/1.5 var(--font-sans); }
html body .cs-find-status:empty { min-height: 0; margin: 0 !important; }
