/* EyePost Messenger — Familiar First kit (2026-11-19).
   Same tokens, top bar, pill buttons, cards and display-options bar
   as every other John Whitehouse Solutions service. */

:root{
  --bg:#F0F2F5; --card:#FFFFFF; --ink:#202124; --muted:#5F6368;
  --brand:#1A73E8; --brand-dark:#174EA6; --soft:#E8F0FE; --line:#DADCE0;
}
html[data-theme="dark"]{
  --bg:#202124; --card:#303134; --ink:#E8EAED; --muted:#9AA0A6;
  --brand:#8AB4F8; --brand-dark:#AECBFA; --soft:#3C4043; --line:#4D5156;
}
html{ font-size:16px; }
html[data-size="large"]{ font-size:19px; }
html[data-size="xl"]{ font-size:22px; }

*{ box-sizing:border-box; }
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size:1rem; line-height:1.55;
}
a{ color:var(--brand-dark); }
a:hover{ text-decoration:underline; }
.hidden{ display:none !important; }
.sr-only{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }

/* --- top bar --- */
.ff-topbar{
  background:var(--card); border-bottom:1px solid var(--line);
  position:sticky; top:0; z-index:10;
}
.ff-topbar-row{
  max-width:960px; margin:0 auto; padding:10px 16px;
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
}
.wordmark{ font-weight:700; font-size:1.15rem; }
.wordmark-thin{ font-weight:400; color:var(--muted); }
.displaybar{ display:flex; gap:6px; align-items:center; }
.displaybar .db-btn{
  background:var(--card); color:var(--ink); border:1px solid var(--line);
  border-radius:999px; min-height:30px; padding:3px 12px; font-size:.85rem; cursor:pointer;
}
.displaybar .db-btn[aria-pressed="true"]{
  background:var(--soft); border-color:var(--brand); color:var(--brand-dark); font-weight:700;
}

/* --- layout --- */
.column{ max-width:960px; margin:0 auto; padding:8px 16px 32px; }
h1{ font-size:1.6rem; margin:20px 0 4px; }
h2{ font-size:1.2rem; margin:0 0 8px; }
.tagline{ color:var(--muted); margin:0 0 8px; }
.card{
  background:var(--card); border:1px solid var(--line); border-radius:8px;
  box-shadow:0 1px 2px rgba(60,64,67,.15);
  padding:20px 24px; margin:16px 0;
}
.note{ color:var(--muted); font-size:.92rem; }
.notice{
  background:var(--soft); border:1px solid var(--line); border-radius:8px;
  padding:10px 14px; margin:0 0 14px;
}
.err{ color:#B3261E; min-height:1.2em; margin:8px 0; }
html[data-theme="dark"] .err{ color:#F28B82; }

/* --- forms (kit pattern: label above, helper below) --- */
label{ display:block; font-weight:600; margin:14px 0 6px; }
input[type="email"], input[type="password"], input[type="text"]{
  width:100%; background:var(--card); color:var(--ink);
  border:1px solid var(--line); border-radius:8px; padding:10px 12px; font-size:1rem;
}
input:focus{ outline:none; border-color:var(--brand); }

/* --- buttons --- */
.btn-primary{
  background:var(--brand); color:#fff; border:1px solid var(--brand);
  border-radius:999px; padding:10px 22px; font-weight:700; font-size:1rem;
  min-height:40px; cursor:pointer;
}
html[data-theme="dark"] .btn-primary{ color:#202124; }
.btn-primary:disabled{ opacity:.6; cursor:default; }
.btn-secondary{
  background:var(--card); color:var(--ink); border:1px solid var(--line);
  border-radius:999px; padding:8px 18px; font-size:.95rem; min-height:36px; cursor:pointer;
}
.btn-wide{ width:100%; margin-top:14px; }
.row-actions{ display:flex; gap:10px; margin-top:16px; flex-wrap:wrap; }

/* --- conversation list --- */
.conv-row{
  display:flex; justify-content:space-between; align-items:baseline; gap:12px;
  width:100%; text-align:left; background:none; border:none; border-bottom:1px solid var(--line);
  padding:14px 4px; cursor:pointer; color:var(--ink); font-size:1rem;
}
.conv-row:last-child{ border-bottom:none; }
.conv-main{ min-width:0; }
.conv-name{ font-weight:700; display:block; }
.conv-preview{
  color:var(--muted); display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  max-width:60vw;
}
.conv-time{ color:var(--muted); font-size:.85rem; white-space:nowrap; }

/* --- chat thread --- */
.chat-head{ display:flex; align-items:center; gap:12px; margin-top:12px; }
.chat-title{ flex:1; margin:0; font-size:1.3rem; }
.chat-card{ padding:16px; }
.msg-list{ display:flex; flex-direction:column; gap:8px; max-height:60vh; overflow-y:auto; padding:4px; }
.bubble{
  background:var(--soft); color:var(--ink); border-radius:14px;
  padding:8px 14px; max-width:82%; align-self:flex-start; overflow-wrap:anywhere;
}
.bubble.mine{ background:var(--brand); color:#fff; align-self:flex-end; }
html[data-theme="dark"] .bubble.mine{ color:#202124; }
.bubble .who{ display:block; font-size:.78rem; font-weight:700; opacity:.75; }
.bubble .when{ display:block; font-size:.72rem; opacity:.65; margin-top:2px; }
.composer{ display:flex; gap:10px; margin-top:12px; }
.composer input{ flex:1; }
.composer .btn-primary{ white-space:nowrap; }

/* --- footer --- */
.footer{ margin-top:24px; }
.footer .doors{ display:flex; gap:16px; flex-wrap:wrap; }
.footer .doors a{ text-decoration:none; }
.footer .doors a:hover{ text-decoration:underline; }

@media (max-width:560px){
  .card{ padding:16px; }
  .composer{ flex-direction:column; }
  .composer .btn-primary{ width:100%; }
}
