/* Fexio AI Tools. Tokens first, then page layout, then components. */

@font-face {
  font-family: "Libre Franklin";
  src: url("fonts/librefranklin-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #122d42;
  --paper: #f4f7f9;
  --surface: #ffffff;
  --muted: #4a6176;
  --rule: #d3dde5;
  --teal: #3dd2cc;
  --on-teal: #122d42;
  --link: #0a6f6b;
  --focus: #0a6f6b;
  --measure: 68rem;
  --gutter: clamp(1rem, 4vw, 1.5rem);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8f0f5;
    --paper: #0e2233;
    --surface: #14304a;
    --muted: #9db3c3;
    --rule: #27425a;
    --link: #6fe3dd;
    --focus: #3dd2cc;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 "Libre Franklin", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 4px;
}
.skip:focus { top: 0.75rem; }

/* Preview banner, only present on sample builds */
.sample {
  margin: 0;
  padding: 0.55rem var(--gutter);
  background: var(--teal);
  color: var(--on-teal);
  font-size: 0.95rem;
  font-weight: 650;
  text-align: center;
}

/* Top bar */
.top {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.25rem var(--gutter) 0;
}
.brand {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.where { margin: 0; color: var(--muted); font-size: 0.95rem; }
.where a { text-decoration: none; }
.where a:hover { text-decoration: underline; }

/* Page */
main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter) 3rem;
}

.intro { padding: clamp(2rem, 6vw, 4.25rem) 0 1.5rem; }
h1 {
  max-width: 19ch;
  margin: 0;
  font-size: clamp(2.1rem, 5.6vw, 3.9rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.lead {
  max-width: 46ch;
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-size: 1.15rem;
}

/* Finder: search plus the category index */
.finder { display: grid; gap: 1.5rem; margin-top: 0.5rem; }

.search label { display: block; margin-bottom: 0.4rem; font-size: 0.95rem; font-weight: 650; }
.search input {
  width: 100%;
  max-width: 40rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1.2rem;
}
.search input::placeholder { color: var(--muted); opacity: 1; }
.search input:focus-visible { outline-offset: 3px; }

.try { margin: 0.7rem 0 0; color: var(--muted); font-size: 0.95rem; }
.try:empty { display: none; }
.suggest {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  cursor: pointer;
}
.suggest:hover { text-decoration-thickness: 3px; }
.suggest::after { content: ","; color: var(--muted); text-decoration: none; display: inline-block; }
.suggest:last-of-type::after { content: ""; }
.note { max-width: 62ch; margin: 0.5rem 0 0; color: var(--muted); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.index a {
  display: inline-block;
  margin: 0 -0.3rem;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-size: clamp(1.1rem, 0.8rem + 1.2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-decoration: none;
}
.index a:hover {
  text-decoration: underline;
  text-decoration-color: var(--link);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}
.index a[aria-current] { background: var(--teal); color: var(--on-teal); }
/* the three information-only categories: yellow = general platforms with an AI add-on, orange = shut down or not open */
.index a.tone-yellow { background: #ffe27a; color: #122d42; }
.index a.tone-orange { background: #ffb36b; color: #122d42; }
.index a.tone-yellow[aria-current], .index a.tone-orange[aria-current] { box-shadow: 0 0 0 3px var(--ink); }
.searching .index, .searching .try { display: none; }
.empty .chips { margin-top: 1rem; }
.empty .chips a { font-size: 1.1rem; }

.status { margin: 1.75rem 0 0; color: var(--muted); font-size: 0.95rem; }
.status:empty { display: none; }
.related { margin: 0.6rem 0 0; color: var(--muted); font-size: 0.95rem; }
.related a { color: var(--link); font-weight: 650; }
.back { margin: 1.25rem 0 0; font-size: 0.95rem; font-weight: 650; }
.back a { color: var(--link); }

/* Category groups and tool rows */
.group { margin-top: 1.25rem; }
.group h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.cat-title:focus { outline: none; }
.cat-title .count { margin-left: 0.5rem; color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.blurb { max-width: 60ch; margin: 0.35rem 0 0.9rem; color: var(--muted); }

.list { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--rule); }
#listing .list { margin-top: 1.5rem; }
#found .list { margin-top: 1.25rem; }

.row {
  display: grid;
  grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
  gap: 0.25rem 2rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--rule);
}
.who {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 0.55rem;
}
.name {
  font-size: 1.08rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--link);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.name:hover { text-decoration-thickness: 3px; }
.new {
  justify-self: start;
  padding: 0.05rem 0.4rem;
  border-radius: 3px;
  background: var(--teal);
  color: var(--on-teal);
  font-size: 0.75rem;
  font-weight: 700;
}
.host { grid-column: 1 / -1; color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.what { max-width: 62ch; margin: 0; }
.tagged .who { grid-row: 1 / span 2; }
.tagged .what { grid-column: 2; grid-row: 1; }
.tag { grid-column: 2; grid-row: 2; justify-self: start; color: var(--muted); font-size: 0.85rem; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tag:hover { color: var(--link); }

.empty { max-width: 62ch; margin: 1.5rem 0 0; }
.empty p { margin: 0; }

/* Footer */
.foot {
  display: grid;
  gap: 1rem;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem var(--gutter) 3rem;
  border-top: 1px solid var(--rule);
}
.foot p { max-width: 62ch; margin: 0; }
.foot .links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; font-weight: 650; }
.cta {
  display: inline-block;
  padding: 0.7rem 1.1rem;
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
}
.cta:hover { background: var(--link); color: var(--paper); }
.fine { color: var(--muted); font-size: 0.875rem; }

@media (max-width: 700px) {
  .row { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; }
  .tagged .who, .tagged .what, .tag { grid-column: 1; grid-row: auto; }
}
