/* Free tools, templates and checklist pages.
   Built on the intent-page layout in theme-minimal.css: same type, colours,
   buttons and dark scheme. One idea per block, short copy, large visuals;
   the long reference text sits in accordions. */

.ft-page main { overflow: clip; }

/* ---------- Hero ---------- */

.ft-hero {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 64px;
  text-align: center;
}

.ft-hero h1 {
  margin: 0 auto;
  max-width: 980px;
  font-size: clamp(2.5rem, 5.6vw, 4.6rem);
  letter-spacing: -0.052em;
  line-height: 1;
}

.ft-hero__lead {
  max-width: 640px;
  margin: 24px auto 0;
  color: var(--ink-2);
  font-size: clamp(1.08rem, 1.9vw, 1.3rem);
  line-height: 1.55;
}

.ft-hero .intent-actions { justify-content: center; }

/* Left-aligned hero with a visual, for the template pages. */
.ft-hero--split {
  width: min(1180px, calc(100% - 40px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
  text-align: left;
}

.ft-hero--split h1 { margin: 0; font-size: clamp(2.5rem, 5vw, 4.4rem); }
.ft-hero--split .ft-hero__lead { margin-left: 0; }
.ft-hero--split .intent-actions { justify-content: flex-start; }

/* ---------- Bento tiles ---------- */

.ft-bento {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.ft-tile {
  position: relative;
  grid-column: span 6;
  display: flex;
  min-width: 0;
  min-height: 540px;
  flex-direction: column;
  padding: 44px 44px 0;
  overflow: hidden;
  border-radius: 28px;
  background: var(--paper-2);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* Whole-tile links: no in-copy underline (same :not(#tw-noop) lift as the navbar). */
a.ft-tile:not(#tw-noop),
a.ft-tile:not(#tw-noop):visited,
a.ft-tile:not(#tw-noop):hover,
.ft-picker a:not(#tw-noop),
.ft-picker a:not(#tw-noop):visited,
.ft-picker a:not(#tw-noop):hover {
  color: var(--ink);
  text-decoration: none;
}

a.ft-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px -28px rgba(10, 10, 11, 0.35);
}

a.ft-tile:hover .ft-tile__more { text-decoration: underline; text-underline-offset: 3px; }

.ft-tile--7 { grid-column: span 7; }
.ft-tile--5 { grid-column: span 5; }
.ft-tile--4 { grid-column: span 4; }
.ft-tile--8 { grid-column: span 8; }
.ft-tile--12 { grid-column: span 12; }

.ft-tile__label {
  margin: 0 0 12px;
  color: var(--ink-3);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.ft-tile h2,
.ft-tile h3 {
  max-width: 520px;
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  letter-spacing: -0.042em;
  line-height: 1.04;
}

.ft-tile p {
  max-width: 440px;
  margin: 12px 0 0;
  color: var(--ink-2);
  font-size: 1.05rem;
  line-height: 1.5;
}

.ft-tile__more {
  display: inline-block;
  margin-top: 18px;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 600;
}

.ft-tile__more::after { content: " ›"; }

.ft-tile__media {
  position: relative;
  display: flex;
  margin: auto -44px 0;
  padding-top: 32px;
  align-items: flex-end;
  justify-content: center;
}

.ft-tile__media img {
  display: block;
  width: 100%;
  height: auto;
}

/* The wide tile: copy on the left, the render bleeding off the right. */
.ft-tile--wide {
  grid-column: span 12;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  align-items: center;
  padding: 40px 0 40px 56px;
}

.ft-tile--wide .ft-tile__media { margin: 0; padding: 0; }

/* Renders sit on their own light ground; fade its edges into the tile. */
.ft-tile__media--fade img {
  -webkit-mask-image: radial-gradient(ellipse 58% 56% at 52% 50%, #000 52%, transparent 100%);
  mask-image: radial-gradient(ellipse 58% 56% at 52% 50%, #000 52%, transparent 100%);
}

/* App screenshots: framed like a window rising from the tile's edge. */
.ft-tile__media--shot { padding: 32px 44px 0; }
.ft-tile__media--shot img {
  border-radius: 14px 14px 0 0;
  box-shadow: 0 0 0 1px rgba(10, 10, 11, 0.08), 0 24px 48px -24px rgba(10, 10, 11, 0.45);
}

/* Dark tile, the same band colour as the closing call to action. */
a.ft-tile--ink:not(#tw-noop),
a.ft-tile--ink:not(#tw-noop):visited,
a.ft-tile--ink:not(#tw-noop):hover { background: var(--surface-inverse); color: var(--on-surface-inverse); }
.ft-tile--ink h2,
.ft-tile--ink h3 { color: var(--on-surface-inverse); }
.ft-tile--ink .ft-tile__label,
.ft-tile--ink p { color: var(--on-surface-inverse-2); }
.ft-tile--ink .ft-tile__more { color: #71b5ff; }

/* Three template pages fanned out. */
.ft-fan {
  position: relative;
  width: 100%;
  height: 360px;
}

.ft-fan img {
  position: absolute;
  bottom: -70px;
  left: 50%;
  width: 37%;
  height: auto;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 18px 40px -18px rgba(10, 10, 11, 0.4), 0 0 0 1px rgba(10, 10, 11, 0.06);
  transform-origin: 50% 100%;
}

.ft-fan img:nth-child(1) { transform: translateX(-112%) rotate(-8deg); }
.ft-fan img:nth-child(2) { z-index: 2; transform: translateX(-50%) translateY(-18px); }
.ft-fan img:nth-child(3) { transform: translateX(12%) rotate(8deg); }

/* The 2027 date, set large. */
.ft-year {
  margin: auto 0 0;
  padding: 36px 0 44px;
}

.ft-year strong {
  display: block;
  background: linear-gradient(100deg, #6cb6ff 0%, #b28cff 55%, #ff8fc7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(5rem, 11vw, 9rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.ft-year span {
  display: block;
  margin-top: 14px;
  color: var(--on-surface-inverse-2);
  font-size: 0.95rem;
}

/* ---------- Sections ---------- */

.ft-section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(80px, 10vw, 140px) 0 0;
}

.ft-section__header {
  max-width: 760px;
  margin: 0 0 40px;
}

.ft-section__header--center {
  margin-inline: auto;
  text-align: center;
}

.ft-section__header h2 {
  margin: 0;
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  letter-spacing: -0.048em;
  line-height: 1.02;
}

.ft-section__header h2 .ft-quiet { color: var(--ink-3); }

.ft-section__header p {
  margin: 18px 0 0;
  color: var(--ink-2);
  font-size: 1.12rem;
  line-height: 1.6;
}

.ft-section__header--center p { margin-inline: auto; max-width: 620px; }

/* Rows of "I want to … → tool". */
.ft-picker {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.ft-picker li { list-style: none; border-bottom: 1px solid var(--line); }

.ft-picker a {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1.1fr) 28px;
  gap: 24px;
  align-items: center;
  padding: 26px 4px;
  color: var(--ink);
  text-decoration: none;
}

.ft-picker a:hover { background: var(--paper-2); }

.ft-picker__job { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; }
.ft-picker__tool { color: var(--accent); font-weight: 600; }
.ft-picker__out { color: var(--ink-2); font-size: 0.95rem; }
.ft-picker__go { color: var(--ink-3); font-size: 1.3rem; text-align: right; }

/* ---------- FAQ, related, closing ---------- */

.ft-faq {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(80px, 10vw, 140px) 0 0;
}

.ft-faq .intent-faq { width: 100%; }

.ft-related {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(72px, 9vw, 120px) 0 0;
}

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

.ft-page .intent-final-cta { width: min(1180px, calc(100% - 40px)); margin-top: clamp(80px, 10vw, 140px); }
.ft-page .intent-final-cta .intent-actions { flex-wrap: wrap; }
.ft-cta-note { margin: 18px 0 0; color: var(--on-surface-inverse-2); font-size: 0.92rem; }
.ft-cta-note a:not(#tw-noop),
.ft-cta-note a:not(#tw-noop):visited,
.ft-cta-note a:not(#tw-noop):hover { color: var(--on-surface-inverse); text-decoration-color: rgba(255, 255, 255, 0.5); }

.ft-page .intent-related a:not(#tw-noop),
.ft-page .intent-related a:not(#tw-noop):hover { text-decoration: none; }
.ft-page .intent-related a:not(#tw-noop):hover { border-color: var(--line-strong); }

.ft-updated {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 2.5rem;
  color: var(--ink-3);
  font-size: 0.875rem;
}

/* ---------- Documents on a stage ---------- */

/* A document preview sitting on the grey stage, like a product shot. */
.ft-stage {
  position: relative;
  display: grid;
  margin: 0;
  padding: clamp(28px, 5vw, 56px);
  place-items: center;
  border-radius: 28px;
  background: var(--paper-2);
}

.ft-stage img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 560px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(10, 10, 11, 0.06), 0 30px 60px -30px rgba(10, 10, 11, 0.45);
}

.ft-stage--wide img { max-height: none; width: 100%; }

a.ft-stage:not(#tw-noop) { text-decoration: none; }
a.ft-stage img { transition: transform 0.35s ease; }
a.ft-stage:hover img { transform: translateY(-4px); }

.ft-stage figcaption,
.ft-caption {
  margin: 16px 0 0;
  color: var(--ink-3);
  font-size: 0.88rem;
  line-height: 1.5;
  text-align: center;
}

/* Five template pages on one shelf (templates hub hero). */
.ft-shelf {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(32px, 5vw, 64px) clamp(20px, 4vw, 56px) 0;
  overflow: hidden;
  border-radius: 28px;
  background: var(--paper-2);
}

.ft-shelf ul {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(10px, 2vw, 24px);
  align-items: end;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ft-shelf li { list-style: none; }

.ft-shelf a:not(#tw-noop) {
  display: block;
  color: var(--ink);
  text-decoration: none;
}

.ft-shelf img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 0.78;
  object-fit: cover;
  object-position: left top;
  border-radius: 6px 6px 0 0;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(10, 10, 11, 0.06), 0 24px 48px -26px rgba(10, 10, 11, 0.45);
  transition: transform 0.35s ease;
}

.ft-shelf a:hover img { transform: translateY(-8px); }

.ft-shelf span {
  display: block;
  margin: 0 0 12px;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
}

/* ---------- Template cards ---------- */

.ft-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ft-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: 28px;
  background: var(--paper-2);
  list-style: none;
}

.ft-card__stage:not(#tw-noop) {
  display: flex;
  height: 280px;
  padding: 36px 36px 0;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  text-decoration: none;
}

.ft-card__stage img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px 6px 0 0;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(10, 10, 11, 0.06), 0 20px 40px -24px rgba(10, 10, 11, 0.45);
  transition: transform 0.35s ease;
}

/* Wide spreadsheets: show the top-left corner at a readable size. */
.ft-card__stage--sheet img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }

.ft-card__stage:hover img { transform: translateY(-6px); }
.ft-card__stage--render img { border-radius: 14px 14px 0 0; }

.ft-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 26px 30px 30px;
}

.ft-card h3 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.ft-card h3 a:not(#tw-noop) { color: var(--ink); text-decoration: none; }
.ft-card h3 a:not(#tw-noop):hover { text-decoration: underline; }

.ft-card p {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 0.98rem;
  line-height: 1.5;
}

.ft-card .intent-actions { margin-top: auto; padding-top: 22px; }

/* ---------- Parts of a document ---------- */

.ft-parts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: part;
}

.ft-parts li {
  min-width: 0;
  padding: 26px 24px;
  border-radius: 22px;
  background: var(--paper-2);
  list-style: none;
  counter-increment: part;
}

.ft-parts li::before {
  display: inline-grid;
  width: 30px;
  height: 30px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-fill);
  content: counter(part);
  font-size: 0.78rem;
  font-weight: 700;
}

.ft-parts strong { display: block; margin-bottom: 6px; font-size: 1.05rem; letter-spacing: -0.01em; }
.ft-parts span { display: block; color: var(--ink-2); font-size: 0.93rem; line-height: 1.5; }

/* ---------- Horizontal strip of step pictures ---------- */

.ft-strip {
  display: grid;
  grid-auto-columns: minmax(260px, 30%);
  grid-auto-flow: column;
  gap: 16px;
  margin: 28px 0 0;
  padding: 0 0 16px;
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  overscroll-behavior-inline: contain;
}

.ft-strip li {
  min-width: 0;
  list-style: none;
  scroll-snap-align: start;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.4;
}

.ft-strip img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 12px;
  border-radius: 18px;
  background: var(--paper-2);
}

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

/* ---------- Tips ---------- */

.ft-tips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 36px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: tip;
}

.ft-tips li {
  min-width: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  list-style: none;
  counter-increment: tip;
}

.ft-tips li::before {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  content: counter(tip, decimal-leading-zero);
  font-size: 0.85rem;
  font-weight: 700;
}

.ft-tips strong { display: block; margin-bottom: 6px; font-size: 1.12rem; letter-spacing: -0.02em; }
.ft-tips span { display: block; color: var(--ink-2); font-size: 0.97rem; line-height: 1.55; }

/* ---------- Two columns: words and a visual ---------- */

.ft-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.ft-split .ft-section__header { margin-bottom: 0; }

.ft-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

/* ---------- Dark band with a phone ---------- */

.ft-band {
  width: min(1180px, calc(100% - 40px));
  margin: clamp(80px, 10vw, 140px) auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  padding: clamp(40px, 6vw, 72px) clamp(28px, 6vw, 72px) 0;
  overflow: hidden;
  border-radius: 28px;
  background: var(--surface-inverse);
  color: var(--on-surface-inverse);
}

.ft-band > div:first-child { padding-bottom: clamp(40px, 6vw, 72px); }
.ft-band h2 { margin: 0; color: var(--on-surface-inverse); font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -0.045em; line-height: 1.04; }
.ft-band p { margin: 18px 0 0; color: var(--on-surface-inverse-2); font-size: 1.08rem; line-height: 1.6; }
.ft-band .intent-actions { margin-top: 28px; }
.ft-band .button-primary { background: var(--on-surface-inverse); color: var(--surface-inverse); border-color: var(--on-surface-inverse); }
.ft-band .button-secondary { color: var(--on-surface-inverse); border-color: #696970; }
.ft-band img { display: block; width: min(300px, 100%); height: auto; margin: 0 auto; border-radius: 28px 28px 0 0; }
.ft-band a:not(#tw-noop):not(.button-primary):not(.button-secondary) { color: var(--on-surface-inverse); text-decoration-color: rgba(255, 255, 255, 0.5); }

/* ---------- Diagrams, tables and signal words ---------- */

.ft-diagram-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ft-diagram-wrap:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.ft-page .tpl-diagram { display: block; width: 100%; height: auto; }
.ft-page .tpl-diagram .d-box { fill: var(--paper); stroke: var(--line); stroke-width: 1.5; }
.ft-page .tpl-diagram .d-fill { fill: var(--paper-2); stroke: var(--line); stroke-width: 1.5; }
.ft-page .tpl-diagram .d-accent { fill: var(--accent); }
.ft-page .tpl-diagram .d-accent-line { stroke: var(--accent); fill: none; stroke-width: 2; }
.ft-page .tpl-diagram .d-line { stroke: var(--ink-3); fill: none; stroke-width: 1.5; }
.ft-page .tpl-diagram .d-title { fill: var(--ink); font: 700 15px Inter, Arial, sans-serif; }
.ft-page .tpl-diagram .d-text { fill: var(--ink-2); font: 500 12.5px Inter, Arial, sans-serif; }
.ft-page .tpl-diagram .d-small { fill: var(--ink-3); font: 600 11px Inter, Arial, sans-serif; letter-spacing: 0.06em; }
.ft-page .tpl-diagram .d-on-accent { fill: #fff; font: 700 15px Inter, Arial, sans-serif; }
.ft-stage > .ft-diagram-wrap { width: 100%; }
.ft-stage .tpl-diagram { width: 100%; max-width: 960px; margin: 0 auto; }
.ft-split + .ft-tips,
.ft-split + .ft-parts { margin-top: 56px; }

.ft-page .intent-table { min-width: 0; }
.ft-page .intent-table td img { display: block; width: 150px; max-width: 100%; height: auto; border-radius: 6px; }

.ft-signal { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ft-signal li { display: grid; grid-template-columns: 150px minmax(0, 1fr); margin: 0; overflow: hidden; border-radius: 12px; background: var(--paper); list-style: none; font-size: 0.95rem; line-height: 1.45; }
.ft-signal b { display: flex; align-items: center; justify-content: center; padding: 12px; font-size: 0.85rem; letter-spacing: 0.04em; }
.ft-signal span { padding: 12px 16px; color: var(--ink-2); }
.ft-signal .s-danger { background: #c8102e; color: #fff; }
.ft-signal .s-warning { background: #f68d2e; color: #111827; }
.ft-signal .s-caution { background: #ffd100; color: #111827; }
.ft-signal .s-notice { background: #005eb8; color: #fff; }

@media (max-width: 960px) {
  .ft-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ft-parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ft-tips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ft-split,
  .ft-band { grid-template-columns: 1fr; }
  .ft-shelf ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ft-shelf li:nth-child(n+4) { display: none; }
}

@media (max-width: 640px) {
  .ft-cards,
  .ft-parts,
  .ft-tips,
  .ft-pair { grid-template-columns: 1fr; }
  .ft-card__stage:not(#tw-noop) { height: 230px; }
  .ft-strip { grid-auto-columns: 78%; }
  .ft-signal li { grid-template-columns: 1fr; }
  .ft-shelf span { font-size: 0.8rem; }
  .ft-diagram-wrap .tpl-diagram { min-width: 640px; }
}

/* ---------- Small screens ---------- */

@media (max-width: 960px) {
  .ft-tile,
  .ft-tile--7,
  .ft-tile--5,
  .ft-tile--4,
  .ft-tile--8 { grid-column: span 12; }
  .ft-tile--wide { grid-template-columns: 1fr; padding: 40px 0 0 32px; }
  .ft-tile--wide .ft-tile__media { margin: 28px 0 0 -32px; }
  .ft-hero--split { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .ft-hero { padding-bottom: 44px; }
  .ft-bento { gap: 14px; }
  .ft-tile { min-height: 0; padding: 32px 26px 0; border-radius: 22px; }
  .ft-tile__media { margin: auto -26px 0; padding-top: 24px; }
  .ft-tile--wide { padding: 32px 0 0 26px; }
  .ft-tile--wide .ft-tile__media { margin: 24px 0 0 -26px; }
  .ft-fan { height: 230px; }
  .ft-picker a { grid-template-columns: minmax(0, 1fr) 20px; gap: 6px 12px; padding: 20px 2px; }
  .ft-picker__job { grid-column: 1; }
  .ft-picker__tool { grid-column: 1; }
  .ft-picker__out { grid-column: 1; }
  .ft-picker__go { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  .ft-tile { transition: none; }
  a.ft-tile:hover { transform: none; }
}

/* ---------- Assembly and BOM template pages (main.ft-tpl-pages) ---------- */

.ft-tpl-pages .ft-hero-visual { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.ft-tpl-pages .ft-pages {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 2.5vw, 32px);
  align-items: start;
}
.ft-tpl-pages .ft-pages img { width: 100%; max-height: none; }
.ft-tpl-pages .ft-stage + .ft-parts { margin-top: 20px; }
.ft-tpl-pages .ft-strip--3 { grid-auto-columns: minmax(240px, 1fr); }
.ft-tpl-pages .ft-strip--3 + .ft-caption { margin-top: 8px; text-align: left; }
.ft-tpl-pages .ft-band p + p { margin-top: 12px; font-size: 0.98rem; }
.ft-tpl-pages .ft-band .ft-band__render {
  width: 100%;
  max-width: 480px;
  margin: 0 auto clamp(40px, 6vw, 72px);
  border-radius: 18px;
}
.ft-tpl-pages .ft-band .ft-band__render--tall { max-width: 340px; }
.ft-tpl-pages .ft-example-table { width: 100%; margin-top: 24px; }
.ft-tpl-pages .ft-example-table details[open] { padding-bottom: 22px; }
.ft-tpl-pages .ft-table--wide { min-width: 720px; }

@media (max-width: 640px) {
  .ft-tpl-pages .ft-strip--3 { grid-auto-columns: 78%; }
}

/* ---------- SOP and user manual template pages (main.ft-doc) ---------- */

.ft-doc .ft-pages {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2.6vw, 32px);
  align-items: start;
}

.ft-doc .ft-pages:not(.ft-pages--3) { max-width: 820px; margin-inline: auto; }
.ft-doc .ft-pages--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ft-doc .ft-pages img { width: 100%; max-height: none; }
.ft-doc .ft-stage + .ft-parts,
.ft-doc .ft-stage + .ft-strip,
.ft-doc .ft-stage + .intent-table-wrap { margin-top: 28px; }

.ft-doc .ft-steps3 { grid-auto-columns: minmax(260px, calc((100% - 32px) / 3)); }
.ft-doc .ft-steps3 p { margin: 0 0 10px; color: var(--ink); font-weight: 600; line-height: 1.45; }
.ft-doc .ft-steps3 dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 0.9rem; }
.ft-doc .ft-steps3 dt { color: var(--ink-3); font-weight: 600; }
.ft-doc .ft-steps3 dd { margin: 0; color: var(--ink-2); }

.ft-doc .ft-stage .ft-signal { width: 100%; }
.ft-doc .ft-signal li { grid-template-columns: 184px minmax(0, 1fr); }
.ft-doc .ft-split .intent-checklist { margin-top: 22px; }
.ft-doc .ft-split .intent-checklist li { padding-block: 12px; }
.ft-doc .ft-tile { min-height: 440px; }
.ft-doc .ft-split > .ft-tile { grid-column: auto; }
.ft-doc .ft-section > .ft-caption { max-width: 760px; margin-inline: auto; }

.ft-doc .ft-band ul { margin: 18px 0 0; padding-left: 1.1em; }
.ft-doc .ft-band li { margin: 6px 0; color: var(--on-surface-inverse-2); line-height: 1.5; }
.ft-doc .ft-band--shot > a { align-self: end; }
.ft-doc .ft-band--shot img { width: 100%; border-radius: 14px 14px 0 0; }

@media (max-width: 640px) {
  .ft-doc .ft-pages--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ft-doc .ft-pages--3 img:nth-child(3) { display: none; }
  .ft-doc .ft-steps3 { grid-auto-columns: 82%; }
  .ft-doc .ft-tile { min-height: 0; }
  .ft-doc .ft-signal li { grid-template-columns: 1fr; }
  .ft-doc .ft-parts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ft-doc .ft-parts li { padding: 18px 16px; border-radius: 18px; }
  .ft-doc .ft-parts li::before { margin-bottom: 12px; }
  .ft-doc .ft-parts span { font-size: 0.86rem; }
}

/* Renders shot on a light ground stay on a light tile in the dark scheme,
   like a product photographed on its own backdrop. */
@media (prefers-color-scheme: dark) {
  .ft-tile--light {
    --ink: #0a0a0b;
    --ink-2: #52525b;
    --ink-3: #67676f;
    --paper-2: #f6f6f4;
    --accent: #0069d8;
    color-scheme: light;
  }
}


/* ---------- Glossary entries (main.ft-gl): glossary.css figures on ft- stages ---------- */

.ft-gl .ft-stage--flow { display: block; place-items: normal; justify-items: normal; }
.ft-gl .ft-stage--flow > * + * { margin-top: 18px; }
.ft-gl .ft-stage--flow figcaption { text-align: left; }
.ft-gl .ft-stage .gl-figure__label { margin: 0 0 14px; }
.ft-gl .ft-stage .gl-code {
  padding: 22px 24px;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(10, 10, 11, 0.06), 0 30px 60px -30px rgba(10, 10, 11, 0.35);
  font-size: 0.8rem;
}
.ft-gl .ft-stage .gl-table { font-size: 0.9rem; }
.ft-gl .ft-stage .gl-table th,
.ft-gl .ft-stage .gl-table td { padding: 9px 12px; }
.ft-gl .ft-stage--render img,
.ft-gl .ft-stage .gl-split img {
  width: 100%;
  max-height: none;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
}
.ft-gl .ft-stage .gl-split { gap: 28px; }
.ft-gl .ft-hero .ft-stage--render { padding: 20px 20px 28px; }
.ft-gl .ft-hero .ft-stage--render img {
  -webkit-mask-image: radial-gradient(ellipse 62% 60% at 50% 50%, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 62% 60% at 50% 50%, #000 55%, transparent 100%);
}
.ft-gl .ft-band .ft-more summary { color: #71b5ff; }
.ft-gl .ft-stage + .intent-checklist { margin-top: 28px; }
/* Wide code and tables scroll inside their stage instead of widening the grid. */
.ft-gl .ft-split > *,
.ft-gl .ft-hero--split > * { min-width: 0; }
.ft-gl .ft-stage--flow { min-width: 0; overflow-x: auto; }
@media (max-width: 640px) {
  .ft-gl .ft-stage--flow { padding: 22px 16px; }
  .ft-gl .ft-stage .gl-table th,
  .ft-gl .ft-stage .gl-table td { padding: 6px 7px; }
}
@media (min-width: 961px) {
  .ft-gl .ft-section > .intent-checklist { columns: 2; column-gap: 48px; }
  .ft-gl .ft-section > .intent-checklist li { break-inside: avoid; }
}
@media (min-width: 961px) {
  .ft-gl .ft-split { align-items: start; }
  .ft-gl .ft-split > .ft-section__header { position: sticky; top: 120px; }
}
.ft-gl .ft-stage .gl-tree { max-width: 620px; margin-inline: auto; }
.ft-gl .ft-stage .gl-map { text-align: left; }
.ft-gl .ft-stage .gl-svg--wide { max-width: 760px; }
.ft-gl .ft-hero--split .ft-stage .gl-svg--wide { max-width: 100%; }

/* "More detail": long explanations stay on the page, folded. */
.ft-gl .ft-more { margin-top: 26px; }
.ft-gl .ft-more summary {
  display: inline-flex;
  gap: 6px;
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.ft-gl .ft-more summary::-webkit-details-marker { display: none; }
.ft-gl .ft-more summary::after { content: "+"; }
.ft-gl .ft-more[open] summary::after { content: "−"; }
.ft-gl .ft-more > :not(summary) { max-width: 760px; color: var(--ink-2); line-height: 1.65; }
.ft-gl .ft-more p { margin: 14px 0 0; }
.ft-gl .ft-more ul,
.ft-gl .ft-more ol { margin: 14px 0 0; padding-left: 20px; }
.ft-gl .ft-more li { margin: 6px 0; }

.ft-gl .intent-card-grid .intent-card h3 { margin-top: 0; }
.ft-gl .ft-section .intent-table-wrap { margin-top: 0; }
.ft-gl .ft-section .ft-caption { max-width: 760px; margin: 18px 0 0; text-align: left; }

@media (max-width: 960px) {
  .ft-gl .intent-card-grid { grid-template-columns: 1fr; }
}


/* ---------- Glossary: SOP, standard work, Machinery Regulation (main.ft-gl-core) ---------- */

/* Dark stat tiles that are not links, and the 2027 tile in a split hero. */
.ft-gl-core .ft-tile--ink { background: var(--surface-inverse); color: var(--on-surface-inverse); }
.ft-gl-core .ft-tile--stat { min-height: 0; padding-bottom: 0; }
.ft-gl-core .ft-tile--stat .ft-year { padding: 32px 0 40px; }
.ft-gl-core .ft-bento .ft-tile--stat .ft-year strong { font-size: clamp(3.4rem, 6vw, 5rem); }
.ft-gl-core .ft-hero .ft-tile { grid-column: auto; min-height: 440px; }
.ft-gl-core .ft-bento + .ft-caption { width: min(1180px, calc(100% - 40px)); margin: 18px auto 0; }

/* glossary.css figures sitting on a stage */
.ft-gl-core .ft-stage + .ft-stage,
.ft-gl-core .ft-stage + .intent-table-wrap { margin-top: 20px; }
.ft-gl-core .ft-stage .gl-pyramid { max-width: 560px; margin: 0 auto; }
.ft-gl-core .ft-stage .gl-pyramid li { padding: 14px 18px; border-radius: 14px; }
.ft-gl-core .ft-stage .gl-pyramid strong { font-size: 1rem; }
.ft-gl-core .ft-stage .gl-doc {
  max-width: 640px;
  margin: 0 auto;
  padding: 26px 30px;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(10, 10, 11, 0.06), 0 30px 60px -30px rgba(10, 10, 11, 0.45);
  font-size: 0.92rem;
}
.ft-gl-core .ft-stage .gl-cards { gap: 18px; }
.ft-gl-core .ft-stage .gl-cards > li { padding: 28px 24px; border: 0; border-radius: 20px; text-align: center; }
.ft-gl-core .ft-stage .gl-cards .gl-svg { max-width: 120px; margin-bottom: 18px; }
.ft-gl-core .ft-stage .gl-cards h3 { font-size: 1.1rem; letter-spacing: -0.02em; }
.ft-gl-core .ft-stage .gl-cards p { font-size: 0.95rem; }
.ft-gl-core .ft-stage .gl-timeline { max-width: 560px; }
.ft-gl-core .ft-stage .gl-timeline li { margin-bottom: 18px; color: var(--ink-2); }
.ft-gl-core .ft-stage .gl-timeline strong { color: var(--ink); font-size: 1.02rem; }
.ft-gl-core .ft-stage .gl-facts { margin-bottom: 22px; }
.ft-gl-core .ft-stage .gl-svg--wide { margin-block: 8px 4px; }

/* Article 10(7) conditions in two columns, the pending amendment as a note. */
.ft-gl-core .ft-section > .intent-checklist { columns: 2; column-gap: 48px; margin-top: 40px; }
.ft-gl-core .ft-section > .intent-checklist li { break-inside: avoid; }
.ft-gl-core .ft-section > .intent-limit { max-width: 860px; margin: 32px 0 0; }
.ft-gl-core .ft-parts + .intent-microcopy { max-width: 860px; margin-top: 24px; }
.ft-gl-core .ft-stage .gl-phone { max-height: 460px; border-radius: 0; background: transparent; box-shadow: none; }

@media (max-width: 960px) {
  .ft-gl-core .ft-hero .ft-tile { min-height: 320px; }
}
@media (max-width: 640px) {
  .ft-gl-core .ft-section > .intent-checklist { columns: 1; }
  .ft-gl-core .ft-stage .gl-doc { padding: 20px; }
}

/* STEP file sample: wrap long entity lines inside the box instead of cutting them off. */
.ft-gl .gl-code { white-space: pre-wrap; overflow-wrap: anywhere; }

/* A grid of Community machines, each on its own square backdrop. */
.ft-tile__media--mosaic { margin: auto 0 0; padding: 32px 0 44px; }
.ft-mosaic {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ft-mosaic li { list-style: none; }
.ft-mosaic img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 18px;
  background: #efefef;
  transition: transform 0.35s ease;
}
a.ft-tile:hover .ft-mosaic li:nth-child(odd) img { transform: translateY(-4px); }
@media (max-width: 640px) {
  .ft-tile__media--mosaic { padding: 24px 0 28px; }
  .ft-mosaic { gap: 8px; }
  .ft-mosaic img { border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  a.ft-tile:hover .ft-mosaic li img { transform: none; }
}

/* User manual software page (main.ft-ums). */
.ft-ums .ums-duo { display: block; min-height: 0; padding: 44px 40px 40px; overflow: hidden; }
.ft-ums .ums-duo__page { display: block; width: 64%; max-height: none; margin: 0 0 0 6%; transform: rotate(-2.5deg); }
.ft-ums .ums-duo__phone { position: absolute; right: 9%; bottom: 8%; width: 29%; max-height: none; border-radius: 22px; background: transparent; box-shadow: 0 30px 60px -28px rgba(10, 10, 11, 0.55); }
.ft-ums .ums-photo { margin: auto -44px 0; padding-top: 28px; }
.ft-ums .ums-photo img { aspect-ratio: 4 / 3.3; object-fit: cover; }
.ft-ums .ft-section .ft-bento { width: 100%; }
.ft-ums .ft-bento .ft-tile { min-height: 0; }
.ft-ums .ums-phone { height: 330px; padding: 28px 0 0; overflow: hidden; align-items: flex-start; }
.ft-ums .ums-phone img { width: 58%; height: auto; border-radius: 0; background: transparent; box-shadow: none; }
.ft-ums .ft-tile h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
@media (max-width: 640px) {
  .ft-ums .ums-duo { padding: 28px 20px; }
  .ft-ums .ums-photo { margin: auto -26px 0; }
}

/* Glossary: engineering change management. Six terms read as two rows of three;
   on phones the seven-step flow keeps a readable size and scrolls in its stage. */
@media (min-width: 961px) {
  .ft-gl-ecm .ft-parts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .ft-gl-ecm .ft-ecm-flow { min-width: 760px; }
}

/* SOP software page (sop-software.html), scoped to main.ft-sop. */
main.ft-sop .ft-sop__flow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 28px; }
main.ft-sop .ft-section .ft-bento { width: 100%; }
main.ft-sop .ft-sop__compare th[scope="row"] { width: 52%; color: var(--ink); font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; text-transform: none; }
main.ft-sop .ft-sop__compare thead th:not(:first-child),
main.ft-sop .ft-sop__compare td { text-align: center; }
main.ft-sop .ft-sop__compare td:last-child { color: var(--accent); font-weight: 700; }
@media (max-width: 640px) {
  main.ft-sop .ft-sop__flow { grid-template-columns: minmax(0, 1fr); }
  main.ft-sop .ft-sop__compare th[scope="row"] { width: auto; font-size: 0.92rem; }
}

/* Templates hub: six pages on the shelf, and the Animate card across the last row of the grid. */
.ft-shelf--6 ul { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ft-shelf--6 span { display: flex; min-height: 2.6em; align-items: flex-end; justify-content: center; font-size: 0.86rem; line-height: 1.25; }
.ft-cards .ft-card--wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.ft-card--wide .ft-card__stage:not(#tw-noop) { height: 300px; padding: 36px 0 0 36px; justify-content: flex-start; }
.ft-card--wide .ft-card__stage img { width: 100%; height: 100%; max-height: none; object-fit: cover; object-position: left top; }
.ft-card--wide .ft-card__body { justify-content: center; padding: 36px 40px; }
.ft-card--wide .intent-actions { margin-top: 0; }
@media (max-width: 960px) { .ft-shelf--6 ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .ft-cards .ft-card--wide { grid-template-columns: 1fr; }
  .ft-card--wide .ft-card__stage:not(#tw-noop) { height: 230px; padding: 36px 36px 0; justify-content: center; }
  .ft-card--wide .ft-card__body { padding: 26px 30px 30px; }
}

/* ---------- Augmented reality page ---------- */
.ft-ar .ft-ar__film { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: clamp(16px, 3vw, 36px); background: #f7f7f8; color-scheme: light; }
.ft-ar .ft-ar__film video { display: block; width: 100%; height: auto; border-radius: 12px; background: #f7f7f8; }
.ft-ar .ft-ar__film figcaption { color: #67676f; }
.ft-ar__devices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ft-ar__devices li {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px 26px 30px;
  border-radius: 22px;
  background: var(--paper-2);
  list-style: none;
}
.ft-ar__devices svg { width: 44px; height: 44px; margin-bottom: 18px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ft-ar__devices strong { font-size: 1.15rem; letter-spacing: -0.02em; }
.ft-ar__devices span { margin-top: 6px; color: var(--ink-2); font-size: 0.95rem; line-height: 1.5; }
.ft-ar .ft-ar__sdk { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); padding-bottom: clamp(40px, 6vw, 72px); }
.ft-ar .ft-ar__sdk > div:first-child { padding-bottom: 0; }
.ft-ar .ft-ar__sdk img { width: 100%; max-width: none; aspect-ratio: 1 / 1; border-radius: 18px; background: #f7f7f8; object-fit: cover; object-position: 100% 50%; }
.ft-ar .ft-section .ft-bento { width: 100%; }
.ft-ar .ft-split .ft-stage img { max-height: 520px; }
@media (max-width: 960px) {
  .ft-ar__devices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ft-ar .ft-ar__sdk { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .ft-ar__devices { grid-template-columns: 1fr; }
}

/* SOP software: keep the steps list clear of the two-line heading above it. */
main.ft-sop .ft-section__header + .ft-sop__flow { margin-top: 40px; }

/* AR page: the phone recording beside three short beats. */
.ft-ar .ft-ar__film--phone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(28px, 4vw, 56px) clamp(24px, 5vw, 72px) clamp(20px, 3vw, 32px);
  background: linear-gradient(180deg, #f0f3f4 0%, #e9ecee 100%);
}
.ft-ar .ft-ar__phone { justify-self: center; width: min(300px, 100%); }
.ft-ar .ft-ar__film--phone video { width: 100%; height: auto; border-radius: 0; background: transparent; }
.ft-ar__beats { margin: 0; padding: 0; list-style: none; counter-reset: beat; }
.ft-ar__beats li { position: relative; padding: 22px 0 22px 52px; border-top: 1px solid rgba(10, 10, 11, 0.1); list-style: none; counter-increment: beat; color: #29282c; }
.ft-ar__beats li:first-child { border-top: 0; }
.ft-ar__beats li::before {
  position: absolute; top: 20px; left: 0;
  display: grid; width: 32px; height: 32px; place-items: center;
  border-radius: 50%; background: #0a0a0b; color: #fff;
  content: counter(beat); font-size: 0.8rem; font-weight: 700;
}
.ft-ar__beats strong { display: block; font-size: clamp(1.3rem, 2.2vw, 1.75rem); letter-spacing: -0.03em; line-height: 1.15; }
.ft-ar__beats span { display: block; margin-top: 6px; color: #52525b; font-size: 1.02rem; line-height: 1.5; }
.ft-ar .ft-ar__film--phone figcaption { grid-column: 1 / -1; margin-top: 8px; }
@media (max-width: 860px) {
  .ft-ar .ft-ar__film--phone { grid-template-columns: minmax(0, 1fr); }
  .ft-ar .ft-ar__phone { width: min(280px, 80%); }
}
.ft-ar .ft-ar__film--phone video {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 3%, #000 97%, transparent 100%), linear-gradient(to bottom, #000 0, #000 95%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 3%, #000 97%, transparent 100%), linear-gradient(to bottom, #000 0, #000 95%, transparent 100%);
  mask-composite: intersect;
}
/* AR page: the web browser comes first and stands out. */
.ft-ar__devices li.ft-ar__device--web { background: var(--surface-inverse); color: var(--on-surface-inverse); }
.ft-ar__devices li.ft-ar__device--web svg { stroke: #71b5ff; }
.ft-ar__devices li.ft-ar__device--web strong { color: var(--on-surface-inverse); }
.ft-ar__devices li.ft-ar__device--web span { color: var(--on-surface-inverse-2); }
