/* AI Systems Finder slide 3: the packages-first list (Kristian, 13 Nov 2026), slide 2's stages (14 Nov 2026), and
   4A's live line and tap answers and 5B's calendar.
   Split from finder-only.css for the 16 KB limit. Design pass, 14 Nov 2026: tokens from finder.css only; the wide
   layouts (packages two up, stages as a row of tiles) are in layout.css. */
.fd-pk { grid-column: 1 / -1; display: grid; align-content: start; min-width: 0; border-radius: var(--fd-r3); background: color-mix(in srgb, var(--fd-surface) 55%, transparent); }
.fd-pk-in { display: block; padding: 0 var(--fd-s5); }
.fd-pk-open {
  display: inline-flex; align-items: center; gap: var(--fd-s2); min-height: var(--fd-tap); padding: 0; border: 0; background: none; border-radius: var(--fd-r1);
  color: var(--fd-accent); font-weight: 600; font-size: var(--fd-t2);
}
.fd-pk-open::after {
  content: ""; width: var(--fd-s2); height: var(--fd-s2); margin-top: calc(-1 * var(--fd-s1)); border: solid var(--fd-accent); border-width: 0 2px 2px 0;
  transform: rotate(45deg); transition: transform var(--dur-ui) var(--ease-out);
}
/* The UI kit marks the open trigger itself (aria-expanded and data-open on the button). */
.fd-pk-open[aria-expanded="true"]::after { transform: translateY(var(--fd-s1)) rotate(225deg); }
.fd-pk-body { display: block; overflow: hidden; height: var(--collapsible-panel-height); transition: height var(--dur-ui) var(--ease-out); }
.fd-pk-body:is([data-starting-style], [data-ending-style]) { height: 0; }
.fd-pk-lead { margin: var(--fd-s1) 0 0; font-size: var(--fd-t1); font-weight: 700; }
.fd-parts { list-style: none; margin: 0; padding: 0 0 var(--fd-s2); display: grid; }
.fd-parts > li + li { border-top: 1px solid var(--fd-line); }
.fd-part-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--fd-s4); align-items: start; }
.fd-part-links {
  display: inline-flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--fd-s1) var(--fd-s4); min-height: var(--fd-tap);
  font-size: var(--fd-t1); font-weight: 600;
}
.fd-part-page { display: inline-flex; align-items: center; min-height: var(--fd-tap); }
.fd-part-links .bd-small { position: static; }
.fd-part {
  display: grid; grid-template-columns: var(--fd-t3) minmax(0, 1fr); gap: var(--fd-s1) var(--fd-s3); align-items: start;
  min-height: var(--fd-tap); padding: var(--fd-s3) 0; cursor: pointer;
}
.fd-part > input { width: var(--fd-t3); height: var(--fd-t3); margin: 1px 0 0; accent-color: var(--fd-accent); cursor: inherit; }
.fd-part > input:focus-visible { outline: var(--fd-focus); outline-offset: 2px; }
.fd-part > :not(input) { grid-column: 2; }
.fd-part .fd-part-t { font-weight: 600; font-size: var(--fd-t2); line-height: var(--fd-lh-head); padding: 0; }
.fd-part:has([aria-disabled="true"]), .fd-part-named { cursor: default; }
.fd-part-named { color: var(--fd-muted); }
.fd-pk-rest { margin: 0; padding: 0 0 var(--fd-s4) calc(var(--fd-t3) + var(--fd-s3)); font-size: var(--fd-t1); }
[data-fd-systems] > .fd-more { margin-top: var(--fd-s4); }
/* Arrived from a library page: the system they were reading, and the package that holds it. */
.fd-arrive { display: grid; gap: var(--fd-s2); margin-bottom: var(--fd-s5); padding: var(--fd-s4) var(--fd-s5); border-radius: var(--fd-r3); background: var(--fd-tint); }
.fd-arrive p { margin: 0; max-width: var(--fd-measure); font-size: var(--fd-t2); }
.fd-arrive-k { display: block; font-size: var(--fd-t1); font-weight: 700; }
.fd-arrive-t strong { font-size: var(--fd-t3); line-height: var(--fd-lh-head); }
.fd-arrive-acts { display: flex; flex-wrap: wrap; gap: var(--fd-s2); margin-top: var(--fd-s1); }
/* Slide 2: the stages a project goes through, as plain tiles; a tapped stage shows its parts in their place
   (Kristian, 14 Nov 2026: no dropdowns). */
.fd-stages { display: grid; gap: var(--fd-s4); }
.fd-stage-all { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--fd-s3); }
.fd-stage-open {
  flex: 1 1 14rem; max-width: 17rem; display: grid; justify-items: center; align-content: start; gap: var(--fd-s2);
  padding: var(--fd-s4) var(--fd-s3); border: 2px solid transparent; border-radius: var(--fd-r3); background: var(--fd-surface);
  box-shadow: var(--fd-shadow); color: var(--fd-ink); font: inherit; text-align: center; cursor: pointer;
  transition: border-color var(--dur-press) var(--ease-out), transform var(--dur-press) var(--ease-out);
}
.fd-stage-open:active { transform: scale(0.97); }
.fd-stage-open[data-picked] { border-color: var(--fd-accent); }
.fd-stage-open[data-picked] .fd-ico { background: var(--fd-accent); color: var(--fd-surface); }
.fd-stage-n { font-weight: 700; font-size: var(--fd-t2); line-height: var(--fd-lh-head); }
.fd-stage-l { font-size: var(--fd-t1); line-height: var(--fd-lh-head); }
.fd-stage-pick { font-size: var(--fd-t1); font-weight: 600; color: var(--fd-accent); }
.fd-stage-view { display: grid; gap: var(--fd-s3); justify-items: center; }
.fd-stage-view > .fd-tiles { width: 100%; }
.fd-stage-h { margin: 0; font-size: var(--fd-t3); line-height: var(--fd-lh-head); text-align: center; }
.fd-stage-back::before { content: "\2190"; margin-right: var(--fd-s2); }
@media (max-width: 559px) {
  .fd-stage-open { flex-basis: 100%; max-width: none; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--fd-s3); justify-items: start; text-align: left; }
  .fd-stage-open > .fd-ico { grid-row: 1 / span 3; }
}
/* One line for a picked package's parts, said once over the list (Kristian, 14 Nov 2026). */
.fd-pk-held { margin: var(--fd-s1) 0 0; font-size: var(--fd-t1); font-weight: 600; color: var(--fd-muted); }
/* Moved from controls.css (14 Nov 2026, 16 KB limit); the scorecard and the opportunity assessment never use them. */
/* Live hours line */
.fd-live {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--fd-s2) var(--fd-s3); margin: 0; padding: var(--fd-s3) var(--fd-s4); border-radius: var(--fd-r3);
  background: var(--fd-surface); box-shadow: var(--fd-shadow); font-size: var(--fd-t2);
}
.fd-live-n { font-family: var(--font-mono); font-weight: 500; font-size: var(--fd-t4); font-variant-numeric: tabular-nums; }

/* 4A's tap answers (rework, 22 Oct 2026): chips, Not sure ticked at the start, and the link to the exact slider. */
.fd-pick-q { display: grid; gap: var(--fd-s3); min-width: 0; }
.fd-chip-unsure:has(input:checked) { box-shadow: inset 0 0 0 2px var(--fd-accent); }
.fd-exact {
  justify-self: start; display: inline-flex; align-items: center; min-height: var(--fd-tap); padding: 0; border: 0; background: none;
  color: var(--fd-accent); font-weight: 600; font-size: var(--fd-t2); text-decoration: underline; text-underline-offset: 3px;
}

/* Start calendar (slide 5B) */
.fd-cal {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--fd-s1); padding: var(--fd-s4) var(--fd-s5);
  border-radius: var(--fd-r3); border: 2px solid transparent; background: var(--fd-surface); box-shadow: var(--fd-shadow); text-align: center;
}
.fd-cal > :is(.fd-cal-head, .fd-cal-week, .fd-cal-grid) { grid-column: 1 / -1; }
.fd-cal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--fd-s2); }
.fd-cal-week, .fd-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--fd-s1); }
.fd-cal-m { margin: 0; align-self: center; font-weight: 700; font-size: var(--fd-t3); }
:is([data-fd-cal-prev], [data-fd-cal-next]) {
  width: var(--fd-tap); height: var(--fd-tap); justify-self: center; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: var(--fd-r2); background: var(--fd-surface); box-shadow: var(--fd-shadow); font-weight: 600;
}
:is([data-fd-cal-prev], [data-fd-cal-next]):disabled { cursor: not-allowed; color: var(--fd-muted); box-shadow: none; background: transparent; outline: 2px dashed var(--fd-line); outline-offset: -2px; }
.fd-cal-dow { padding: var(--fd-s1) 0; font-size: var(--fd-t1); }
.fd-day {
  width: 100%; min-height: var(--fd-s7); padding: 0; border: 0; border-radius: var(--fd-r2); background: transparent;
  font-family: var(--font-mono); font-size: var(--fd-t2); font-weight: 500; color: var(--fd-ink); font-variant-numeric: tabular-nums;
}
.fd-day:disabled { cursor: not-allowed; color: var(--fd-muted); font-weight: 400; }
.fd-day[aria-pressed="true"] { background: var(--fd-accent); color: var(--fd-surface); }
/* 5B: an error line shows, under its field or the weeks below a day. On a phone the page's scroll padding (finder.css)
   already clears the sticky footer, so this margin holds only the line. */
.fd-cal-week:nth-last-child(2) { --fd-wb: 1; }
.fd-cal-week:nth-last-child(3) { --fd-wb: 2; }
.fd-cal-week:nth-last-child(4) { --fd-wb: 3; }
.fd-cal-week:nth-last-child(5) { --fd-wb: 4; }
.fd-cal-week:nth-last-child(6) { --fd-wb: 5; }
:is(.fd-field:has(> .fd-err:not([hidden])) > :is(input, select), .fd-q:has(> .fd-err:not([hidden])) .fd-day) {
  scroll-margin-bottom: calc(var(--fd-foot-h) + var(--fd-wb, 0) * var(--fd-s7));
}
@media (hover: hover) and (pointer: fine) {
  .fd-day:not(:disabled):not([aria-pressed="true"]):hover { background: var(--fd-ground); }
  :is([data-fd-cal-prev], [data-fd-cal-next]):not(:disabled):hover { box-shadow: inset 0 0 0 2px var(--fd-ink); }
}
@media (max-width: 820px) {
  /* 44px tap targets */
  .fd-cal { padding: var(--fd-s3) var(--fd-s1); gap: 2px; }
  .fd-cal-week, .fd-cal-grid { gap: 2px; }
  .fd-day { min-height: var(--fd-tap); }
}
/* Narrow phones: no calendar gaps, so days stay 44px wide. The month row keeps an inset from the box's edge. */
@media (max-width: 400px) {
  .fd-cal { padding: var(--fd-s3) 0; column-gap: 0; }
  .fd-cal-head { padding-inline: var(--fd-s2); }
  .fd-cal-week, .fd-cal-grid { column-gap: 0; }
  .fd-day:focus-visible { outline-offset: -2px; }
}
/* 320px to 363px: the calendar runs edge to edge, so seven days fit at 44px (308px). */
@media (max-width: 363px) {
  .fd .fd-slide .fd-q > .fd-cal { width: auto; margin-inline: calc(-1 * var(--fd-s4)); border-radius: 0; }
}

@media (hover: hover) and (pointer: fine) { .fd-stage-open:hover .fd-stage-n { color: var(--fd-accent); } }
@media (max-width: 720px) {
  .fd-part-row { grid-template-columns: minmax(0, 1fr); }
  .fd-part-links { justify-content: flex-start; padding-left: calc(var(--fd-t3) + var(--fd-s3)); margin-top: calc(-1 * var(--fd-s2)); }
}
@media (forced-colors: active) { .fd-pk, .fd-arrive, .fd-stage-open { border: 1px solid CanvasText; } }
/* "On their own" opens and closes; Something else is a card among the first cards (Kristian, 14 Nov 2026). */
.fd-sys-sec[data-closed] > :not(.fd-sec-t) { display: none; }
.fd-sec-open { font-size: var(--fd-t3); font-weight: 700; color: var(--fd-ink); }
.fd-sec-open::after { border-color: var(--fd-ink); }
.fd-oth { align-content: start; gap: var(--fd-s3); }
.fd-oth .fd-sys-other { text-align: left; justify-items: start; height: 100%; }
.fd-oth .fd-other { text-align: left; }
.fd-sys-sec[data-sec="package"] > .fd-oth { max-width: none; }
