/* Feature pages: /transcribe-handwriting-from-photos/ and
   /photo-location-estimation/ (GSO audit 2026-10-27). Pictures first, few
   words, for a reader who looks rather than reads. Only the site tokens, so
   dark mode needs no rules of its own. Every class starts with fp-; the
   guide kit (gk-) loads after this file and supplies the rest. */

/* ---- Hero picture: the clue on the print, the AI, what came out ---- */
.fp-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.9rem;
  max-width: 860px;
  margin: 2rem auto 0;
  text-align: left;
}
.fp-flow__card {
  margin: 0;
  padding: 0.9rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.fp-flow__label {
  margin: 0 0 0.6rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.fp-flow__card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}
.fp-flow__ai {
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--contrast-light);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--shadow-warm);
}
.fp-flow__ai svg { width: 1.6rem; height: 1.6rem; }
.fp-flow__foot {
  grid-column: 1 / -1;
  justify-self: center;
  margin: 0.4rem 0 0;
}

/* The typed-out transcript: what the AI read, as text. */
.fp-transcript {
  margin: 0 0 0.8rem;
  padding: 0.7rem 0.9rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-warm);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.4;
  color: var(--text-primary);
}
.fp-facts {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--text-primary);
}
.fp-facts li { display: flex; gap: 0.5rem; align-items: baseline; }
.fp-facts b {
  min-width: 3.6rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* The photo the AI looked at, with a ring on the clue it used. */
.fp-spot { position: relative; }
.fp-spot__ring {
  position: absolute;
  border: 3px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--contrast-light) 70%, transparent);
}
/* The OLD FAITHFUL GEYSER sign on images/apps-demo/family-32.webp,
   measured as fractions of the print. */
.fp-spot__ring--sign { left: 32.5%; top: 34%; width: 29%; height: 17.5%; }
.fp-spot__tag {
  position: absolute;
  left: 50%;
  bottom: 0.6rem;
  transform: translateX(-50%);
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--contrast-light);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

/* The place Timeline Scan suggests, drawn like a Locations card. */
.fp-guess { display: flex; flex-direction: column; gap: 0.55rem; }
.fp-guess .fp-flow__label { margin-bottom: 0; }
.fp-guess__name {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}
.fp-guess .fp-place__actions { margin: 0; padding-top: 0.2rem; }

@media (max-width: 640px) {
  .fp-flow {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.6rem;
    margin-top: 1.5rem;
  }
  .fp-flow__ai { justify-self: center; width: 2.8rem; height: 2.8rem; }
  .fp-flow__ai svg { transform: rotate(90deg); }
}

/* ---- Real examples: a back and what came out of it, side by side ---- */
.fp-reads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
  max-width: 1020px;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  list-style: none;
}
.fp-read {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
  padding: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.fp-read img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}
.fp-read__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.fp-read .fp-transcript { margin: 0; font-size: 1.05rem; }
.fp-read__note { margin: 0; font-size: 0.95rem; color: var(--text-secondary); }

/* ---- Where the note shows up: the three apps, drawn ---- */
.fp-apps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: 1020px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.fp-app {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.fp-app__name {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.fp-app__name a { color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.fp-app__mark { display: inline-grid; width: 1.7rem; height: 1.7rem; }
.fp-app__mark svg { width: 100%; height: 100%; }
.fp-app__window {
  flex: 0 0 auto;
  overflow: hidden;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.fp-app__photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.fp-app__window--immich .fp-app__photo { aspect-ratio: 2 / 1; object-position: 50% 20%; }
/* Apple Photos is drawn as an iPhone screen: the time and the island
   above the photo, rounder corners, the file name in a gray card. */
.fp-app__window--apple { border-radius: 1.1rem; }
.fp-app__status {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0.35rem 0.9rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
}
.fp-app__island {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3.4rem;
  height: 0.95rem;
  border-radius: 999px;
  background: rgb(20 20 20);
  transform: translate(-50%, -50%);
}
.fp-app__card {
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  background: var(--bg-warm);
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.fp-app__panel {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem 0.8rem 0.9rem;
  font-family: var(--font-ui);
  color: var(--text-primary);
}
.fp-app__panel p { margin: 0; }
.fp-app__title { font-size: 1rem; font-weight: 700; }
.fp-app__box {
  padding: 0.3rem 0.5rem;
  border: 1px dashed var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.fp-app__panel .fp-app__section {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.fp-app__row { font-size: 0.92rem; }
/* The note itself, marked the way the hero marks a clue. */
.fp-app__note {
  position: relative;
  padding: 0.5rem 0.6rem;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-light);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.35;
}
.fp-app__where {
  margin: auto 0 0;
  font-family: var(--font-ui);
  font-size: 1rem;
  text-align: center;
  color: var(--text-secondary);
}
.fp-app__where strong { color: var(--text-primary); }
.fp-apps__more { margin-top: 1.5rem; text-align: center; }

@media (max-width: 860px) {
  .fp-apps { grid-template-columns: minmax(0, 1fr); max-width: 420px; }
}

/* ---- Everything Timeline Scan does, this page's part marked ---- */
.fp-suite {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  max-width: 1020px;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  list-style: none;
}
.fp-suite__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1.25rem 0.9rem 1.1rem;
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.fp-suite__item--here {
  border: 2px solid var(--accent);
  background: var(--accent-light);
}
.fp-suite__badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.1rem 0.7rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--contrast-light);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}
.fp-suite__icon {
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  color: var(--accent);
}
.fp-suite__icon svg { width: 1.6rem; height: 1.6rem; }
.fp-suite__name {
  margin: 0.25rem 0 0;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}
.fp-suite__name a { color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.fp-suite__line { margin: 0; font-size: 0.95rem; color: var(--text-secondary); }

@media (max-width: 760px) {
  .fp-suite { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 0.75rem; }
  .fp-suite__item { padding: 1.2rem 0.6rem 0.9rem; }
  .fp-suite__line { font-size: 0.9rem; }
}

/* ---- The Locations page, drawn: one card per place ----
   Same order as the app's card (SuggestionGroupCard.tsx): map, place,
   count and confidence, a thumbnail strip, then the answers. Every part
   has a fixed height, so the cards in a row come out the same height. */
.gk-example.fp-places-example { max-width: 1020px; }
/* Three across when they fit, like the app's grid, else two, else one. */
.fp-places {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  max-width: 1020px;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  list-style: none;
}
.fp-place {
  display: flex;
  flex-direction: column;
  padding: 0.8rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.fp-place__map {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-warm);
}
.fp-place__map .fp-map-land { fill: var(--bg-warm); }
.fp-place__map .fp-map-water { fill: color-mix(in srgb, var(--green) 38%, var(--card-bg)); }
.fp-place__map .fp-map-road { fill: none; stroke: color-mix(in srgb, var(--accent) 45%, transparent); stroke-width: 2.5; }
.fp-place__map .fp-map-pier { stroke: color-mix(in srgb, var(--text-secondary) 70%, transparent); stroke-width: 3; }
.fp-place__map .fp-map-pin { fill: var(--accent); }
.fp-place__map .fp-map-dot { fill: var(--contrast-light); }
.fp-place__name {
  margin: 0.75rem 0 0;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fp-place__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0.15rem 0 0;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.fp-conf::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.35rem;
  border-radius: 50%;
  background: var(--green);
  vertical-align: 0.05em;
}
/* The app marks Medium and Low alike, with the guess color. */
.fp-conf--medium::before,
.fp-conf--low::before { background: var(--accent); }
.fp-thumbs { display: flex; gap: 0.25rem; margin: 0.75rem 0 0; padding: 0; list-style: none; }
.fp-thumbs li {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 3rem;
  overflow: hidden;
  border-radius: 4px;
}
.fp-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fp-thumbs__more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 0.55);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--contrast-light);
}
.fp-place__actions { display: flex; align-items: center; gap: 0.35rem; margin: auto 0 0; padding-top: 0.75rem; }
.fp-place__actions .fp-btn { flex: 0 0 auto; padding: 0.45rem 0.7rem; }
.fp-place__actions .fp-btn--quiet { margin-left: auto; padding-left: 0.3rem; padding-right: 0.3rem; text-decoration: none; }
.fp-btn {
  flex: 1 1 0;
  white-space: nowrap;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-secondary);
}
.fp-btn--yes { background: var(--accent); border-color: var(--accent); color: var(--contrast-light); }
.fp-btn--quiet { flex: 0 1 auto; border-color: transparent; text-decoration: underline; text-underline-offset: 3px; }
.fp-places__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 0.75rem;
  max-width: 1020px;
  margin: 0 auto 1.1rem;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.fp-places__bar .fp-btn { flex: 0 0 auto; padding: 0.45rem 1rem; }


/* Dark mode: the drawn map keeps its land and water apart. */
[data-theme="dark"] .fp-place__map .fp-map-water { fill: color-mix(in srgb, var(--green) 45%, var(--card-bg)); }
[data-theme="dark"] .fp-flow__ai,
[data-theme="dark"] .fp-spot__tag,
[data-theme="dark"] .fp-suite__badge,
[data-theme="dark"] .fp-btn--yes { color: var(--bg-primary); }

/* The scanner made for this, inside the first step. */
.fp-scanner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0.75rem 0 0;
  padding: 0.6rem 0.9rem 0.6rem 0.6rem;
  border: 1px solid color-mix(in srgb, var(--green) 40%, transparent);
  border-radius: var(--radius-md);
  background: var(--green-light);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
}
.fp-scanner img { flex: 0 0 auto; width: 4rem; height: 4rem; border-radius: var(--radius-sm); }
.fp-scanner strong { display: block; }

/* Spacing and grids the kit leaves to the page. */
.fp-flow { margin-bottom: 2rem; }
.gk-chips.fp-chips { justify-content: center; margin-top: 1.5rem; }
.gk-points.fp-points-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 1.25rem 1.5rem; }
