/* The app as three plain tabs (tabs.js). The same shape on each: a sentence, one box to put a file in (or none), the
 * counts, and one list of answers. Each answer is a row: its colour with a mark and a word, who or what, why, and
 * a link or two buttons. White rows on the cool ground, hairlines between them, nothing else. Loaded last. */

/* ---- the bar: the three tabs, on every page ---- */
.topbar { gap: var(--s-3); }
.tabs3 { display: flex; align-self: stretch; gap: var(--s-1); margin-right: auto; margin-left: var(--s-4); }
.tabs3 a { position: relative; display: flex; align-items: center; padding: 0 var(--s-3); color: var(--grey); font-size: 1rem; font-weight: 500; text-decoration: none; white-space: nowrap; transition: color var(--dur) var(--ease); }
.tabs3 a::after { content: ""; position: absolute; inset: auto var(--s-3) 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--ink); scale: 0 1; transition: scale var(--dur) var(--ease); }
.tabs3 a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.tabs3 a[aria-current="page"]::after { scale: 1 1; }
.tabs3 a:focus-visible { outline: 2px solid var(--blue); outline-offset: -4px; border-radius: 8px; }
@media (hover: hover) { .tabs3 a:hover { color: var(--ink); text-decoration: none; } }
@media (max-width: 599.98px) {
  .topbar { padding: 0 var(--s-2) 0 var(--s-3); gap: 0; }
  .topbar .brand > span { display: none; }
  .tabs3 { flex: 1; margin-left: var(--s-2); gap: 0; }
  .tabs3 a { flex: 1; justify-content: center; padding: 0 var(--s-1); font-size: 0.9375rem; }
  .tabs3 a::after { inset-inline: var(--s-2); }
}
@media (prefers-reduced-motion: reduce) { .tabs3 a, .tabs3 a::after { transition: none; } }

/* No chat box: the message box belongs to the chat (#/chat) only. */
body:not(.on-chat) .foot { display: none; }
body:not(.on-chat) .page { padding-bottom: var(--s-7); }

/* ---- a tab ---- */
.page.plain { gap: var(--s-5); max-width: 60rem; margin-inline: auto; }
.ahead { display: grid; gap: var(--s-2); }
.ahead h1 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); font-weight: 600; }
.ahead p { color: var(--grey); max-width: 62ch; }
.ah2 { margin-top: var(--s-3); font-size: var(--t-sm); font-weight: 500; color: var(--grey); }
.afoot { font-size: var(--t-sm); }
.anone { color: var(--grey); }
.alink { display: inline-flex; align-items: center; gap: 4px; color: var(--blue); font-size: var(--t-sm); white-space: nowrap; text-underline-offset: 0.25em; }
.alink svg { flex: none; }

/* the one thing to put in */
.adrop { gap: var(--s-3); padding: var(--s-5); background: var(--panel); border-radius: var(--r-xl); color: var(--grey); }
.adrop > svg { rotate: 90deg; }
.adrop-t { color: var(--ink); font-weight: 500; max-width: none; }
.adrop-s { display: grid; justify-items: center; gap: var(--s-2); width: 100%; padding-top: var(--s-3); border-top: 1px solid var(--line); color: var(--ink); font-size: var(--t-sm); }
.adrop-s p { max-width: none; }
.adrop-b { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); }
.afile { display: inline-block; max-width: 100%; padding: 2px 10px; border-radius: 6px; background: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.asheets { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.asheets li { display: flex; align-items: center; gap: 6px; color: var(--grey); }
.asheets li.is-in > span:first-of-type { color: var(--ink); font-weight: 500; }

/* the counts */
.acounts { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.acount { display: grid; gap: 2px; min-width: 7rem; padding: var(--s-3) var(--s-4); border: 1px solid transparent; border-radius: var(--r-xl); background: var(--panel); color: var(--ink); font: inherit; text-align: left; }
.acount-n { font-size: 1.75rem; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.acount-l { display: flex; align-items: center; gap: 6px; font-size: var(--t-sm); color: var(--grey); }
button.acount { cursor: pointer; transition: border-color var(--dur) var(--ease); }
button.acount[aria-pressed="true"] { border-color: var(--ink); }
button.acount:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (hover: hover) { button.acount:hover { border-color: var(--inb); } button.acount[aria-pressed="true"]:hover { border-color: var(--ink); } }

/* the answers: one row each */
.alist { list-style: none; margin: 0; padding: 0; background: var(--panel); border-radius: var(--r-xl); }
.arow { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) auto; gap: var(--s-1) var(--s-4); align-items: start; padding: var(--s-3) var(--s-4); }
.arow + .arow { border-top: 1px solid var(--line); }
.arow-s { padding-top: 2px; }
.arow-s .state { font-size: var(--t-sm); font-weight: 500; white-space: normal; }
.arow-m { display: grid; gap: 2px; min-width: 0; }
.arow-n { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s-3); font-weight: 600; overflow-wrap: anywhere; max-width: none; }
.arow-n a { color: inherit; text-underline-offset: 0.25em; }
.arow-c { font-size: var(--t-sm); font-weight: 400; color: var(--grey); }
.arow-k { color: var(--grey); font-weight: 500; font-variant-numeric: tabular-nums; }
.arow-y { font-size: var(--t-sm); color: color-mix(in srgb, var(--ink) 78%, var(--panel)); line-height: 1.55; overflow-wrap: anywhere; max-width: 70ch; }
.arow-x { display: flex; align-items: center; gap: var(--s-2); justify-self: end; }
.awarn { display: block; margin-top: 2px; }
.awarn .mk { vertical-align: -2px; }
.afold > summary { padding: 0 var(--s-1); }
.afold[open] > summary { margin-bottom: var(--s-1); }
.apages { display: flex; align-items: center; justify-content: center; gap: var(--s-4); }
@media (max-width: 699.98px) {
  .arow { grid-template-columns: minmax(0, 1fr); gap: var(--s-2); }
  .arow-x { justify-self: start; }
  .acount { flex: 1 1 0; min-width: 0; padding: var(--s-2) var(--s-3); }
  .acount-n { font-size: 1.375rem; }
}

/* the questions the factory answers once (Find buyers) */
.aq { display: grid; gap: var(--s-3); padding: var(--s-4); background: var(--panel); border-radius: var(--r-xl); }
.aq h2 { font-size: var(--t-lg); font-weight: 600; }
.aq-s { font-size: var(--t-sm); color: var(--grey); max-width: 70ch; }
.aq-list { list-style: none; margin: 0; padding: 0; }
.aq-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-2) var(--s-4); align-items: center; padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.aq-m { display: grid; gap: 2px; min-width: 0; }
.aq-t { font-weight: 500; max-width: none; overflow-wrap: anywhere; }
.aq-t b { font-weight: 600; }
.aq-y { font-size: var(--t-sm); color: var(--grey); overflow-wrap: anywhere; max-width: none; }
.aq .afold > summary { padding: 0; }
@media (max-width: 699.98px) { .aq-row { grid-template-columns: minmax(0, 1fr); } }

