/* The capability matrix. Loaded only by /features.
 *
 * 527 rows is a reference document, so the work here is all about scanning:
 * a sticky toolbar that filters without a page load, an area jump list, and
 * a table where the two columns that matter are the two narrow ones on the
 * right. The reasoning behind a difference is one click away rather than in
 * a fourth column that would double the width of every row.
 */

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.feat-head { padding: 3rem 1.25rem 1.5rem; }
.feat-head h1 {
  font-size: clamp(2rem, 4.6vw, 2.9rem); letter-spacing: -.03em;
  margin: 0 0 .7rem; text-wrap: balance;
}
.feat-head .lede {
  font-size: 1.08rem; color: var(--muted); max-width: 58ch; margin: 0 0 1.6rem;
  text-wrap: pretty;
}

.tally { list-style: none; display: flex; flex-wrap: wrap; gap: 2.2rem; padding: 0; margin: 0; }
.tally li { display: grid; gap: .1rem; }
.tally b { font-size: 1.9rem; line-height: 1; letter-spacing: -.03em; }
.tally span { font-size: .85rem; color: var(--muted); }

/* --- the toolbar --------------------------------------------------------- */

.feat-tools {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
html:not(.feat-ready) .feat-tools { display: none; }
.tools-inner {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .75rem 1.25rem;
}
.tools-inner input {
  font: inherit; font-size: .92rem; padding: .45rem .8rem; min-width: 14rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg); color: var(--ink);
}
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chips button {
  font: inherit; font-size: .85rem; cursor: pointer; color: var(--muted);
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: .3rem .8rem;
}
.chips button:hover { color: var(--ink); }
.chips button[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
}
.tools-count { margin: 0; font-size: .85rem; color: var(--muted); margin-left: auto; }

/* --- jump list ----------------------------------------------------------- */

.feat-jump { display: flex; flex-wrap: wrap; gap: .5rem; padding: 1.5rem 1.25rem .5rem; }
.feat-jump a {
  font-size: .85rem; text-decoration: none; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: .25rem .75rem;
  display: inline-flex; gap: .4rem; align-items: center;
}
.feat-jump a:hover { color: var(--ink); border-color: var(--accent); }
.feat-jump b { font-weight: 500; color: var(--accent); }

/* --- the tables ---------------------------------------------------------- */

.feat-body { padding: 1rem 1.25rem 4rem; }
.area { margin: 2.5rem 0 0; scroll-margin-top: 5rem; }
.area h2 {
  font-size: 1.5rem; letter-spacing: -.02em; margin: 0 0 .2rem;
  display: flex; align-items: baseline; gap: .6rem;
}
.area h2 .quiet { font-size: .9rem; font-weight: 400; }
.block { margin-top: 1.4rem; }
.block h3 {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .09em;
  color: var(--muted); margin: 0 0 .4rem; font-weight: 650;
}

.matrix { width: 100%; border-collapse: collapse; }
.matrix th {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 650; text-align: left;
  padding: .4rem .6rem; border-bottom: 1px solid var(--line);
}
.matrix th.c, .matrix td.c { text-align: center; width: 6.5rem; }
.matrix td {
  padding: .55rem .6rem; border-bottom: 1px solid var(--line);
  vertical-align: top; font-size: .95rem;
}
.matrix tr:hover td { background: var(--panel); }
.fname { display: block; }

.mk { font-size: 1.05rem; line-height: 1.3; display: inline-block; }
.mk.ok { color: var(--ok); }
.mk.off { color: var(--muted); opacity: .55; }
.mk.part { color: var(--warn); }
.mk.na { font-size: .72rem; color: var(--muted); opacity: .6; letter-spacing: .02em; }
/* A cell holding a comparison rather than a mark — "rail" against "bottom
   bar + More". Shown as the words it is, because that is the answer. */
.mk.txt { font-size: .8rem; color: var(--muted); line-height: 1.3; }

/* --- the reasoning ------------------------------------------------------- */

.why { margin-top: .3rem; }
.why > summary {
  cursor: pointer; font-size: .74rem; color: var(--muted);
  display: inline-flex; align-items: center; gap: .3rem;
  border: 1px solid transparent; border-radius: 999px; padding: .05rem .3rem;
  list-style: none; width: fit-content;
}
.why.gap > summary, .why.choice > summary, .why.platform > summary {
  border-color: var(--line); padding: .05rem .55rem;
}
.why > summary::-webkit-details-marker { display: none; }
.why > summary::before { content: "▸"; font-size: .6rem; }
.why[open] > summary::before { content: "▾"; }
.why > summary:hover { color: var(--ink); border-color: var(--accent); }
.why.gap > summary { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.why.platform > summary { color: var(--muted); }
.why.choice > summary { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.why > div {
  margin: .5rem 0 .3rem; padding: .6rem .8rem; border-radius: 8px;
  background: var(--panel); border: 1px solid var(--line);
  font-size: .86rem; color: var(--muted); max-width: 70ch;
}
.why > div p { margin: 0 0 .5rem; }
.why > div p:last-child { margin: 0; }
.why code { background: var(--bg); padding: .05rem .3rem; border-radius: 4px; font-size: .92em; }

.feat-empty { text-align: center; color: var(--muted); padding: 3rem 0; font-style: italic; }
.feat-foot { padding: 0 1.25rem 4rem; }

@media (max-width: 44rem) {
  /* Sticky, the toolbar is a search box, five chips and a counter — about a
     fifth of a phone screen held back from the thing being read. */
  .feat-tools { position: static; backdrop-filter: none; }
  .matrix th.c, .matrix td.c { width: 4.2rem; }
  .tools-count { margin-left: 0; width: 100%; }
  .tally { gap: 1.4rem; }
}

/* --- the short version -------------------------------------------------- */

.matrix.plain td { padding: .8rem .6rem; }
.matrix.plain .fname { font-size: 1rem; }
.fnote {
  display: block; color: var(--muted); font-size: .87rem; margin-top: .15rem;
  max-width: 62ch; text-wrap: pretty;
}
.matrix.plain th.c, .matrix.plain td.c { width: 7rem; }
.matrix.plain .mk { font-size: 1.15rem; }
.crumb { margin: 0 0 .8rem; font-size: .9rem; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
