/* The public main page (public.html, Lavendar 17 Nov 2026): today's home board for visitors who have not signed in.
   On top of style.css: the switcher open with blurred subtitles, "Training", the French flag, our repositories
   and the "model currently training" window. Developed by AKIKI.AI */

/* The header: the member's chip (gated copy only) and the flag at the far right. The flag is a FIXED box: the same size
   and place in English and in French, so nothing moves when it is pressed (Lavendar 17 Nov 17:57). */
.pub .appheader-top { flex-wrap: nowrap; }
.pub .acct-slot { display: flex; align-items: center; margin-left: auto; min-width: 0; }
.pub-lang {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 34px;
  padding: 0;
  border: var(--hairline) solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 1px 2px rgba(31, 35, 40, .08);
  transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.pub-lang:hover { border-color: #b7c0c9; background: var(--bg-subtle); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 3px 10px -4px rgba(31, 35, 40, .3); }
.pub-lang:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.pub-flag { grid-area: 1 / 1; width: 30px; height: 20px; display: block; border-radius: 3.5px; box-shadow: 0 1px 2px rgba(31, 35, 40, .18); transition: opacity .25s ease, transform .2s ease; }
.pub-lang:hover .pub-flag { transform: scale(1.06); }
.pub-flag-en { opacity: 0; }
html[lang="fr"] .pub-flag-fr { opacity: 0; }
html[lang="fr"] .pub-flag-en { opacity: 1; }

/* "Training": the old "Coming soon" pill, with a small amber light that breathes. */
.pub-training { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pub-training-dot { width: 6px; height: 6px; border-radius: 1.5px; background: #f0a444; animation: pub-breathe 1.8s ease-in-out infinite; }
@keyframes pub-breathe { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: none; } }

/* The switcher's entries are buttons here (no addresses): today's look, plus a button's reset. */
.pub .switch-item.pub-item {
  width: 100%;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.pub .switch-item.pub-item:hover, .pub .switch-item.pub-item:focus-visible, .pub .switch-item.pub-item.is-active { background: var(--bg-subtle); }
.pub .switch-item[hidden] { display: none; }   /* the filter (style.css's display: flex would keep them) */
/* The subtitles: the shape of a line, never its words (the page carries scrambled letters, blurred). */
.pub-blur {
  filter: blur(3.6px);
  opacity: .8;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

/* Phones: the switcher stays a panel under the header (no sheet, no dimmed page), so the board shows under it. */
@media (max-width: 700px) {
  .pub .switch[open] > summary::after { content: none; }
  .pub .switch { position: static; }
  .pub .switch-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 10px;
    bottom: auto;
    left: 10px;
    max-height: min(62vh, 520px);
    padding: 8px;
    border: var(--hairline) solid var(--border);
    border-radius: 14px;
    box-shadow: 0 14px 40px -12px rgba(15, 23, 30, .35);
  }
  .pub .switch-menu::before { content: none; }
  .pub .switch[open] .switch-menu { animation: switch-open .22s cubic-bezier(.2, .8, .2, 1); }
  .pub .switch-head { text-align: left; padding: 4px 8px 8px; font-size: 12px; }
  .pub .switch-item { padding: 10px 10px; }
  .pub .appheader-top { position: relative; gap: 8px; }
  .pub .appheader-top .label.pub-training { display: inline-flex; }
}

/* The board: the tiles still move (home.js) and lead nowhere; a press opens the training window. */
.pub .tile { cursor: pointer; }

/* No scroll at any size (Lavendar 17 Nov 17:57): the board takes the screen's height too, the menu stays on screen. */
body.pub { display: flex; flex-direction: column; height: 100svh; margin: 0; }
.pub .appheader { flex: none; }
.pub .home-main { flex: 1 1 auto; min-height: 0; }
.pub .board-wrap { height: 100%; min-height: 0; padding: 16px var(--gutter); container-type: size; overflow: hidden; }
.pub .board { --cell: min(96px, (100cqw - 2 * var(--pad) - 5 * var(--gap)) / 6, (100cqh - 2 * var(--pad) - 5 * var(--gap)) / 6); }
.pub .switch-menu { max-height: calc(100svh - 80px); overflow-y: auto; overscroll-behavior: contain; }
html:has(> body.pub) { scroll-snap-type: none; scroll-behavior: auto; }

/* The two link tiles: GitHub and Hugging Face, the board's only links, wherever they move. */
.pub .pub-link-tile { cursor: pointer; }
.pub .pub-link-tile:hover { z-index: 5; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--link), 0 10px 22px -10px rgba(31, 35, 40, .5); }

/* THE TRAINING WINDOW: pixel tiles gather where it opens, the window comes up out of them, a row of tiles
   lights one after the other (training, no figure), and it goes back into the place it came from. */
.pub-win { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.pub-win[hidden] { display: none; }
.pub-win-shade { position: absolute; inset: 0; background: rgba(15, 23, 30, .34); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.pub-win-card {
  position: relative;
  width: min(380px, 100%);
  border: var(--hairline) solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  box-shadow: 0 30px 70px -20px rgba(15, 23, 30, .55), 0 2px 6px rgba(15, 23, 30, .08);
  overflow: hidden;
}
.pub-win-card:focus { outline: none; }
.pub-win-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 44px 0 12px;
  border-bottom: var(--hairline) solid var(--border-muted);
  background: var(--bg-subtle);
}
.pub-win-bar i { width: 9px; height: 9px; border-radius: 2.5px; background: #d8dee4; }
.pub-win-bar i:nth-child(1) { background: #e65b56; }
.pub-win-bar i:nth-child(2) { background: #f0a444; }
.pub-win-bar i:nth-child(3) { background: #3aa56f; }
.pub-win-path { margin-left: 8px; overflow: hidden; color: var(--fg-muted); font: 12px/1 var(--mono); white-space: nowrap; text-overflow: ellipsis; }
.pub-win-x {
  position: absolute;
  top: 4px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--fg-muted);
  cursor: pointer;
}
.pub-win-x:hover { background: #e6eaef; color: var(--fg); }
.pub-win-x:focus-visible { outline: 2px solid var(--link); outline-offset: 0; }
.pub-win-x svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.pub-win-body { display: grid; justify-items: center; padding: 26px 26px 24px; text-align: center; }
.pub-win-icon { width: 76px; height: 76px; border-radius: 14px; box-shadow: 0 2px 4px rgba(31, 35, 40, .12), 0 14px 26px -12px rgba(31, 35, 40, .45); animation: pub-float 3.2s ease-in-out infinite; }
.pub-win-icon svg { display: block; width: 100%; height: 100%; border-radius: 14px; }
.pub-win-icon img { display: block; width: 100%; height: 100%; padding: 16px; border-radius: 14px; background: var(--bg-subtle); box-shadow: inset 0 0 0 var(--hairline) var(--border); }
@keyframes pub-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.pub-win-name { margin: 16px 0 4px; color: var(--fg-muted); font: 13px/1.3 var(--mono); }
.pub-win-name strong { color: var(--fg); }
.pub-win-title { margin: 0; color: var(--fg); font: 600 19px/1.3 var(--sans); }
.pub-win-cells { display: flex; gap: 5px; margin: 18px 0 16px; }
.pub-win-cells i { width: 13px; height: 13px; border-radius: 3px; background: #eef1f4; box-shadow: inset 0 0 0 var(--hairline) var(--border); animation: pub-cell 2.4s infinite; animation-delay: calc(var(--i) * .2s); }
@keyframes pub-cell {
  0%, 100% { background: #eef1f4; transform: none; }
  12% { background: var(--c); transform: translateY(-3px); box-shadow: none; }
  30% { background: var(--c); transform: none; }
  52% { background: #eef1f4; }
}
.pub-win-text { margin: 0; max-width: 28ch; color: var(--fg-muted); font-size: 14px; line-height: 1.45; }

/* The pixels the window gathers from and goes back into (public.js puts them on the page). */
.pub-px { position: fixed; z-index: 61; border-radius: 2px; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .pub-training-dot, .pub-win-icon, .pub-win-cells i { animation: none; }
  .pub-win-cells i:nth-child(-n+4) { background: var(--c); }
  .pub-flag { transition: none; }
}
