/* Follow first (partials/follow_first*.html): the search, chips, button, preview and confirm tap. Plain by default;
   a niche page sets the tokens below and adds its own look in its own file (f1.css). */
:root {
  --ff-ink: #111317; --ff-soft: #5d616b; --ff-line: #e3e5ea; --ff-field: #fff; --ff-chip: #fff;
  --ff-accent: #0866da; --ff-on-accent: #fff; --ff-radius: 999px;
  --app-ink: #1d1d1f; --app-soft: #585b65; --app-faint: #747781; --app-line: #e7e8ed;
}
[hidden] { display: none !important; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.ff { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; width: min(100%, 640px); }
.ff-add { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 20px; border-radius: var(--ff-radius); background: var(--ff-field); box-shadow: 0 0 0 1px var(--ff-line); color: var(--ff-soft); }
.ff-add:focus-within { box-shadow: 0 0 0 2px var(--ff-accent); }
.ff-add input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ff-ink); font: inherit; font-size: 17px; }
.ff-add input::placeholder { color: var(--ff-soft); opacity: 1; }
.ff-add input::-webkit-search-cancel-button { display: none; }

.ff-results { padding: 6px; border-radius: 18px; background: var(--ff-field); box-shadow: 0 0 0 1px var(--ff-line); }
.ff-results ul { margin: 0; padding: 0; list-style: none; }
.ff-found { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 10px; border: 0; border-radius: 12px; background: none; color: var(--ff-ink); font: inherit; text-align: left; cursor: pointer; }
.ff-found b { font-size: 15px; font-weight: 600; }
.ff-found span:last-child { margin-left: auto; color: var(--ff-soft); font-size: 13px; }
.ff-none { margin: 0; padding: 10px 12px; color: var(--ff-soft); font-size: 15px; }

/* One row: it scrolls sideways on a phone and wraps where there is room. */
.ff-chips { display: flex; gap: 8px; margin: 0 -16px; padding: 2px 16px 6px; overflow-x: auto; list-style: none; scrollbar-width: none; overscroll-behavior-x: contain; }
.ff-chips::-webkit-scrollbar { display: none; }
.ff-chips:not(.is-open) [data-ff-extra] { display: none; }
.ff-chips.is-open .ff-more { display: none; }
.ff-chip { display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 44px; padding: 4px 14px 4px 5px; border: 0; border-radius: var(--ff-radius); background: var(--ff-chip); box-shadow: inset 0 0 0 1px var(--ff-line); color: var(--ff-ink); font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; touch-action: manipulation; transition: background-color .16s ease, color .16s ease, transform .14s cubic-bezier(.23, 1, .32, 1); }
.ff-chip:active { transform: scale(.97); }
.ff-chip[aria-pressed="true"], .ff-chip.is-on { background: var(--ff-accent); box-shadow: none; color: var(--ff-on-accent); }
.ff-more { padding: 0 16px; }
.ff-tick { display: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ff-chip[aria-pressed="true"] .ff-tick { display: block; }
.ff-x { font-size: 17px; line-height: 1; opacity: .8; }
/* A grey disc, not white on a white chip: a face still loading, a letter or a white logo stays visible (#47). */
.ff-face { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--ff-line); color: #33363d; font-size: 14px; font-weight: 700; }
.ff-chip .ff-face { width: 34px; height: 34px; }
.ff-letter { color: var(--ff-ink); }

.ff-go { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; padding: 0 24px; border: 0; border-radius: var(--ff-radius); background: var(--ff-accent); color: var(--ff-on-accent); font: inherit; font-size: 17px; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .14s cubic-bezier(.23, 1, .32, 1); }
.ff-go:active { transform: scale(.97); }
.ff-go[aria-busy="true"] { opacity: .7; }
.ff-go-form { margin: 0; }
.ff-count { margin: 0; color: var(--ff-soft); font-size: 14px; }
/* ownfeed's mark, small, inside the button. */
.ff-mark { display: inline-flex; align-items: center; gap: 2px; height: 16px; transform: rotate(-12deg); }
.ff-mark i { display: block; width: 3.5px; height: 12px; border-radius: 2px; background: currentColor; }
.ff-mark i:nth-child(2) { height: 16px; }
.ff-mark i:nth-child(3) { height: 9px; }

.ff-confirm { width: min(100% - 32px, 420px); padding: 0; border: 0; border-radius: 24px; background: var(--ff-field); color: var(--ff-ink); }
.ff-confirm::backdrop { background: #000a; }
.ff-confirm form { display: grid; gap: 16px; padding: 28px 24px 24px; }
.ff-confirm h2 { margin: 0; padding-right: 40px; font-size: 24px; line-height: 1.15; }
.ff-close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--ff-soft); cursor: pointer; }
.ff-close .icon { transform: rotate(45deg); }
.ff-stack { display: flex; }
.ff-stack > * { width: 40px; height: 40px; margin-left: -10px; box-shadow: 0 0 0 1px var(--ff-line), 0 0 0 3px var(--ff-field); }
.ff-stack > :first-child { margin-left: 0; }
.ff-spots { margin: 0; color: var(--ff-soft); font-size: 15px; }

.ff-preview { display: grid; gap: 16px; }
.ff-preview h2 { margin: 0; }
.ff-lineup { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ff-posts { display: grid; gap: 16px; }

.post-later { margin: 0 0 10px; color: var(--app-soft); font-size: 15px; }
.post-by { display: flex; align-items: center; gap: 10px; padding: 14px 18px 6px; }
.post-by .face { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.post-by .face-letter { display: grid; place-items: center; background: var(--app-line); font-weight: 700; }
.post-by small { display: block; color: var(--app-faint); font-size: 12px; }
.post-later { padding: 0 18px 14px; }
