/* App chrome shared by every screen: bar, brand, language switch, buttons, shell, footer.
   Ported from .design/a/chrome.css; colours only through tokens.css. */

/* ---- App bar ---- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--bar-h);
  background: var(--bar-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.appbar__in {
  height: 100%;
  max-width: calc(var(--col) + var(--rail) + var(--s-8) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.appbar--narrow .appbar__in { max-width: calc(var(--col) + 2 * var(--gutter)); }

.brand {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  line-height: 0;
}
.brand:hover { text-decoration: none; }
/* The owner's logo, white on transparent: it sits straight on the bar, no tile behind it. */
.brand__logo { display: block; width: auto; height: 30px; }

/* ---- Language switch (segmented) ---- */
.lang {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}
.lang__btn {
  position: relative;
  min-width: 40px;
  height: 32px;
  padding: 0 var(--s-2);
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-2);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.lang__btn::after { content: ""; position: absolute; inset: -6px -1px; }
.lang__btn:hover { color: var(--text); }
.lang__btn[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: var(--tap);
  padding: 0 var(--s-5);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--secondary { background: var(--surface-2); border-color: var(--line-strong); color: var(--text); }
.btn--secondary:hover { background: var(--surface-3); }
.btn--outline { background: transparent; border-color: var(--accent-line); color: var(--accent); }
.btn--outline:hover { background: var(--accent-soft); }
.btn--ghost { background: transparent; color: var(--text-2); padding: 0 var(--s-3); }
.btn--ghost:hover { color: var(--text); background: var(--surface-2); }
.btn--block { display: flex; width: 100%; }
.btn--lg { min-height: 52px; font-size: var(--fs-lg); }
.btn--sm { min-height: 36px; padding: 0 var(--s-3); font-size: var(--fs-sm); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
}
.icon-btn:hover { background: var(--surface-2); }

/* ---- Small chips ---- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 var(--s-3);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
}
.chip--ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.chip--accent { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.chip--warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }

/* Verified rosette */
.tick { width: 18px; height: 18px; flex: none; }
.tick__seal { fill: var(--accent); }
.tick__check { fill: none; stroke: var(--accent-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Shell ---- */
.shell {
  max-width: calc(var(--col) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.shell--wide { max-width: calc(var(--col) + var(--rail) + var(--s-8) + 2 * var(--gutter)); }
.main { min-width: 0; }
.rail { display: none; }

@media (min-width: 1080px) {
  .shell--wide {
    display: grid;
    grid-template-columns: minmax(0, var(--col)) var(--rail);
    gap: var(--s-8);
    align-items: start;
  }
  .rail { display: block; position: sticky; top: calc(var(--bar-h) + var(--s-6)); padding-top: var(--s-6); }
}

/* Main column edges on desktop: hairlines like a timeline */
@media (min-width: 700px) {
  .main--col { padding: 0 var(--gutter); border-left: 1px solid var(--line); border-right: 1px solid var(--line); min-height: 100vh; }
}

/* ---- Footer ---- */
.foot {
  padding: var(--s-8) 0 var(--s-10);
  text-align: center;
  color: var(--text-3);
  font-size: var(--fs-xs);
}
/* Spec part 12: while <html> carries .is-loading (written in every shell, dropped by the page
   module's first real render) the joke line must not be read before the page itself. Hidden,
   not removed, so nothing jumps when it appears. Never on a clock: a slow load with working JS
   must keep it hidden. Without JS noscript.css shows it, and boot.js does if the module fails. */
.is-loading .foot { visibility: hidden; }
.foot__row { display: flex; justify-content: center; gap: var(--s-4); margin-bottom: var(--s-2); }
.foot__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap);
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.foot__link:hover { color: var(--text); }

/* Spec part 18: "More from HA Group", the four products above the not-affiliated line.
   Quiet: small logos and names, two by two on a phone, one row from 560px. */
.foot__more { max-width: 560px; margin: 0 auto var(--s-6); }
.foot__more-title {
  margin: 0 0 var(--s-3);
  color: var(--text-3);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.foot__products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
.foot__product {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-height: var(--tap);
  padding: var(--s-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-align: left;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}
.foot__product:hover { text-decoration: none; color: var(--text); background: var(--surface-2); border-color: var(--line-strong); }
.foot__product-logo { flex: none; width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.foot__product-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 560px) {
  .foot__products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
