/* ================================================================ what's new / feature tour */
#features-page { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.ft-wrap { max-width: 1120px; margin: 0 auto; padding: 4px clamp(16px, 4vw, 40px) calc(56px + env(safe-area-inset-bottom)); animation: rise 0.5s var(--ease) both; }

.ft-intro { padding: 10px 2px 18px; max-width: 640px; }
.ft-intro h2 { margin: 0; font-size: clamp(28px, 4.4vw, 40px); line-height: 1.08; font-weight: 560; }
.ft-sub { margin: 10px 0 0; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.ft-count { margin: 10px 0 0; font-size: 13px; font-weight: 600; color: var(--faint); }

/* the library button, with a dot until the newest feature has been seen */
.ft-entry { position: relative; }
.ft-dot {
  position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%;
  background: #ff4d6d; box-shadow: 0 0 0 2px var(--bg); pointer-events: none;
}
.ft-dot[hidden] { display: none; }

/* filters */
.ft-filters {
  position: sticky; top: var(--ft-top, 64px); z-index: 3; display: flex; gap: 8px; padding: 10px 2px 12px; margin: 0 -2px 6px;
  overflow-x: auto; scrollbar-width: none; background: linear-gradient(var(--bg) 78%, transparent);
}
.ft-filters::-webkit-scrollbar { display: none; }
.ft-chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 99px;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-strong);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.15s var(--ease);
}
.ft-chip:hover { background: var(--surface-2); }
.ft-chip:active { transform: scale(0.96); }
.ft-chip small { font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 1px 6px; border-radius: 99px; background: var(--surface-2); }
.ft-chip[aria-pressed="true"] { background: var(--text); color: var(--bg); box-shadow: none; }
.ft-chip[aria-pressed="true"] small { background: color-mix(in srgb, var(--bg) 20%, transparent); color: inherit; }
.ft-chip.ai[aria-pressed="true"] { background: linear-gradient(120deg, #7b5cf0, #0f62ea); color: #fff; }
.ft-chip:focus-visible { outline: none; box-shadow: var(--focus); }

/* cards */
.ft-list { display: flex; flex-direction: column; gap: 8px; }
.ft-month-title { margin: 26px 2px 12px; font-size: 13px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.ft-list.filtered .ft-month-title { margin-top: 14px; }
.ft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.ft-card {
  display: flex; flex-direction: column; min-width: 0; border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface); box-shadow: 0 0 0 1px var(--border), var(--shadow-xs);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
  animation: rise 0.5s var(--ease) both;
}
.ft-card[hidden] { display: none; }
@media (hover: hover) { .ft-card:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--border-strong), var(--shadow); } }
.ft-card.is-ai { box-shadow: 0 0 0 1px color-mix(in srgb, #7b5cf0 30%, var(--border)), var(--shadow-xs); }

.ft-media {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; padding: 0; border: 0; cursor: pointer;
  background-color: var(--surface-2);
  background-image: radial-gradient(var(--desk-dot) 1px, transparent 1.2px);
  background-size: 14px 14px;
}
.ft-card.is-ai .ft-media {
  background-color: color-mix(in srgb, #7b5cf0 9%, var(--surface-2));
}
.ft-media:focus-visible { outline: none; box-shadow: inset var(--focus); }
.ft-replay {
  position: absolute; right: 10px; bottom: 10px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: 15px; color: var(--text);
  background: var(--glass-solid); box-shadow: var(--shadow-sm); opacity: 0; transition: opacity 0.2s var(--ease);
}
.ft-media:hover .ft-replay, .ft-media:focus-visible .ft-replay { opacity: 1; }
@media (hover: none) { .ft-replay { opacity: 0.85; } }

.ft-svg { display: block; width: 100%; height: 100%; }
.ft-svg text { font-family: var(--font-ui); }
.ft-svg [data-a] { transform-box: fill-box; transform-origin: center; }
.ft-svg [data-a="wipe"], .ft-svg [data-a="type"] { transform-origin: 0 50%; }
.ft-svg [data-a="draw"] { stroke-dasharray: 1 1; }
.ft-svg [data-a="move"], .ft-svg [data-a="pan"] { transform-box: view-box; transform-origin: 0 0; }

.ft-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.ft-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.ft-meta time { margin-left: auto; font-weight: 550; }
.ft-tag, .ft-new, .ft-latest {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 99px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.01em;
}
.ft-tag { background: var(--surface-2); color: var(--muted); }
.ft-tag-ai { background: linear-gradient(120deg, color-mix(in srgb, #7b5cf0 16%, transparent), color-mix(in srgb, #0f62ea 14%, transparent)); color: #6a4ce0; }
.ft-new { background: color-mix(in srgb, #ff4d6d 14%, transparent); color: #d6224a; }
.ft-latest { background: var(--accent); color: var(--accent-ink); }
.ft-body h3 { margin: 2px 0 0; font-size: 18px; line-height: 1.25; font-weight: 680; letter-spacing: -0.01em; }
.ft-body > p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }

.ft-steps { list-style: none; counter-reset: ft; margin: 6px 0 0; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); display: grid; gap: 8px; }
.ft-steps li { counter-increment: ft; position: relative; padding-left: 30px; font-size: 13.5px; line-height: 1.45; }
.ft-steps li::before {
  content: counter(ft); position: absolute; left: 0; top: -1px; width: 21px; height: 21px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 750; color: var(--accent); background: var(--accent-soft);
}
.ft-card.is-ai .ft-steps li::before { color: #6a4ce0; background: color-mix(in srgb, #7b5cf0 15%, var(--surface)); }
.ft-try { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-weight: 650; color: var(--accent); }
.ft-try .i { width: 16px; height: 16px; }

/* the newest feature, large */
.ft-hero { animation-delay: 0.05s; }
@media (min-width: 860px) {
  .ft-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .ft-hero .ft-media { aspect-ratio: auto; min-height: 100%; }
  .ft-hero .ft-body { padding: 26px 28px; justify-content: center; }
}
.ft-hero .ft-body h3 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 580; }
.ft-hero .ft-body > p { font-size: 15.5px; }

:root[data-theme="dark"] .ft-tag-ai, :root[data-theme="dark"] .ft-card.is-ai .ft-steps li::before { color: #b9a6ff; }
:root[data-theme="dark"] .ft-new { color: #ff8aa0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ft-tag-ai, :root:not([data-theme="light"]) .ft-card.is-ai .ft-steps li::before { color: #b9a6ff; }
  :root:not([data-theme="light"]) .ft-new { color: #ff8aa0; }
}

@media (max-width: 560px) {
  .ft-body { padding: 14px 15px 16px; }
  .ft-grid { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .ft-wrap, .ft-card { animation: none; }
  .ft-replay { display: none; }
}
