/* cases.css — the Cases sub-site (/spec/cases/). It is laid out by the Rules
   layer (rules.css: sidebar, tiles, cards, verdict colours); this adds only the
   list of rules under each test, and the filter above it. */

.case-sum { font-size: .9rem; color: var(--muted); line-height: 1.55; }

.case-filter {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem;
  margin: 1.1rem 0 1.4rem; padding: .6rem .8rem;
  border: 1px solid var(--border); border-radius: 10px; background: var(--card-bg);
  /* Stays in reach down a page of several hundred rules, under the site bar. */
  position: sticky; top: calc(var(--shell-h, 0px) + .4rem); z-index: 2;
}
.case-filter input[type="search"] {
  flex: 1 1 14rem; min-width: 10rem;
  font: inherit; font-size: .88rem; padding: .32rem .55rem;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); color: var(--fg);
}
.case-filter label { font-size: .82rem; color: var(--muted); display: inline-flex; align-items: center; gap: .35rem; }
.case-count { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: auto; }

/* A linked test or rule lands below the site bar and the sticky filter. */
.case { margin: 0 0 1.5rem; scroll-margin-top: calc(var(--shell-h, 0px) + 4.6rem); }
.case[hidden] { display: none; }

.case-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .7rem;
  padding-bottom: .3rem; border-bottom: 1px solid var(--border);
}
.case-name { text-decoration: none; }
.case-name code { background: none; padding: 0; font-size: .92rem; font-weight: 600; color: var(--fg); }
.case-name:hover code { color: var(--accent); }
.case-verdicts { display: inline-flex; flex-wrap: wrap; gap: .1rem .7rem; }
.case-verdict { font-size: .74rem; font-weight: 600; white-space: nowrap; }
/* A family where Raku++ matches Rakudo on some probes and not all. */
.v-part { color: #b58900; }
.case-meta { font-size: .74rem; color: var(--muted); margin-left: auto; }
.case-meta a { color: var(--muted); }
.case-meta a:hover { color: var(--accent); }

.case-rules { list-style: none; margin: .5rem 0 0; padding: 0; }
.case-rules > li {
  display: flex; align-items: baseline; gap: .65rem;
  padding: .3rem .4rem; border-radius: 6px; scroll-margin-top: calc(var(--shell-h, 0px) + 4.6rem);
}
.case-rules > li[hidden] { display: none; }
.case-rules > li:target { background: var(--rule-bg); outline: 1px solid var(--rule-bd); }
.case-rules .rule-id { min-width: 1.5rem; text-align: center; }
.case-body { flex: 1; min-width: 0; }
.case-body p { margin: 0; line-height: 1.55; }
.case-body .case-ex { margin-top: .2rem; font-size: .85rem; color: var(--muted); }
.case-body .case-ex::before { content: "e.g. "; }
.case-body .case-also { margin-top: .2rem; font-size: .78rem; color: var(--muted); }
.case-also code { background: none; padding: 0; }

.case-inferred, .case-area {
  display: inline-block; margin-left: .3rem; padding: 0 .4rem; border-radius: 999px;
  font-size: .68rem; line-height: 1.6; white-space: nowrap; vertical-align: .08em;
  border: 1px solid var(--border); color: var(--muted); text-decoration: none;
}
.case-inferred { border-style: dashed; cursor: help; }
.case-area:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.case-else { margin: .35rem 0 0 .4rem; font-size: .78rem; color: var(--muted); }

.case-h-n { font-size: .8rem; font-weight: 400; color: var(--muted); margin-left: .3rem; }
table.case-table td code { background: none; padding: 0; }
table.case-table th.num, table.case-table td.num { width: auto; white-space: nowrap; padding-left: 1rem; }

/* The sidebar's area list carries a count on every row. */
body.cases .nav-cat-body li a { display: flex; align-items: baseline; }
body.cases .nav-cat-body li a .nav-count { margin-left: auto; }
body.cases .nav-extra a.active { color: var(--accent); }

@media (max-width: 640px) {
  .case-meta { margin-left: 0; flex-basis: 100%; }
  .case-filter { position: static; }
}
