/* The format picker on the work instruction template pages (with pictures,
   Word, Excel, ISO 9001): four small cards in one row, the current page
   marked. Built on the tokens of theme-minimal.css, so it follows the dark
   scheme; the thumbnails are document pages and stay on white. */

.ft-formats {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.ft-formats h2 {
  margin: 0 0 16px;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.ft-formats ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ft-formats li {
  min-width: 0;
  list-style: none;
}

.ft-formats a:not(#tw-noop) {
  display: grid;
  height: 100%;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 16px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s ease;
}

.ft-formats a:not(#tw-noop):hover { border-color: var(--line-strong); }

.ft-formats a[aria-current="page"]:not(#tw-noop) {
  border-color: var(--ink);
  background: var(--paper-2);
}

.ft-formats img {
  display: block;
  width: 84px;
  height: 64px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(10, 10, 11, 0.08);
  object-fit: cover;
  object-position: left top;
}

.ft-formats b {
  display: block;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.ft-formats span {
  display: block;
  min-width: 0;
  color: var(--ink-3);
  font-size: 0.84rem;
  line-height: 1.35;
}

.ft-formats b { color: var(--ink); }

@media (max-width: 1040px) {
  .ft-formats ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .ft-formats ul { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ft-formats a:not(#tw-noop) { grid-template-columns: 72px minmax(0, 1fr); padding: 10px 14px 10px 10px; border-radius: 16px; }
  .ft-formats img { width: 72px; height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  .ft-formats a:not(#tw-noop) { transition: none; }
}

/* Under a full-width hero visual (the Excel page), which has no padding of its own. */
.ft-hero-visual + .ft-formats { margin-top: clamp(44px, 6vw, 64px); }
