/* =====================================================================
 * Landing page overrides (html/<lang>/index.html).
 *
 * The landing pages are hand-written and do not load custom.css, whose rules
 * are scoped to the docs body anyway. Linked right after theme.min.css so
 * these rules win over the vendored Around theme without editing it.
 * ===================================================================== */

/* --- Per-language type ---------------------------------------------- */
/* Inter has no CJK glyphs, so without a named fallback ja/zh-cn/ko headings
   fell back to whatever `sans-serif` resolves to. Same stacks as custom.css
   uses for the docs, so the two halves of the site set CJK the same way. */
html[lang="ja"] {
  --ar-font-sans-serif: "Inter", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", "Noto Sans JP", "Meiryo", sans-serif;
}
html[lang="zh-cn"] {
  --ar-font-sans-serif: "Inter", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
html[lang="ko"] {
  --ar-font-sans-serif: "Inter", "Apple SD Gothic Neo", "Malgun Gothic",
    "Noto Sans KR", sans-serif;
}

/* Even out multi-line headings instead of leaving one word on the last line. */
h1, h2, h3, .h1, .display-3 { text-wrap: balance; }

/* Japanese has no spaces, so a heading breaks at any character: "…サー" /
   "バー」です。" and "インデッ" / "クス化" on the live page. auto-phrase breaks
   between phrases instead (Chromium; other engines ignore it and keep the old
   behaviour). Also on the short centred card texts, which broke the same way;
   not on running text, where any-character breaking is normal Japanese. */
html[lang="ja"] :is(h1, h2, h3, h4, .display-3, .card-text, .text-center > p) { word-break: auto-phrase; }
html[lang="ja"], html[lang="zh-cn"] { line-break: strict; }

/* Korean is written with spaces between words; breaking inside a word is
   wrong, not just ugly. keep-all breaks at the spaces only. */
html[lang="ko"] body { word-break: keep-all; overflow-wrap: break-word; }

/* --- Header ------------------------------------------------------------ */
/* Never break a label. At 992px the German row (the longest support label)
   overflowed by 10px; tighten the links and drop the button's icon there. */
header.navbar .navbar-nav .nav-link { white-space: nowrap; }
@media (min-width: 992px) and (max-width: 1199.98px) {
  header.navbar .navbar-nav .nav-link { padding-left: 0.6rem; padding-right: 0.6rem; }
  header.navbar .btn > .ai-external-link { display: none; }
}

/* --- Hero: copyable Docker quick start ------------------------------ */
.landing-qs {
  max-width: 760px;
  border-radius: 1rem;
  background: #0f1216;
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.25);
  overflow: hidden;
  /* The box is dark in both themes, so its scrollbar must be too. */
  color-scheme: dark;
}
.landing-qs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.875rem;
  font-weight: 600;
}
.landing-qs-copy {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.375rem;
  background: transparent;
  color: #fff;
  font-size: 0.8125rem;
  padding: 0.2rem 0.7rem;
  cursor: pointer;
}
.landing-qs-copy:hover { background: rgba(255, 255, 255, 0.1); }
.landing-qs-copy:focus-visible { outline: 2px solid #7fd4b4; outline-offset: 2px; }
.landing-qs-code {
  margin: 0;
  padding: 1rem 1.25rem;
  color: #e6edf3;
  font-size: 0.8125rem;
  line-height: 1.75;
  white-space: pre;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
  background: transparent;
  border: 0;
  border-radius: 0;
}
/* The prompt is generated content, so it is neither copied by the button
   (innerText skips it) nor selected by hand. */
.landing-qs-line::before {
  content: "$ ";
  color: #7fd4b4;
  user-select: none;
}
.landing-qs-note {
  margin: 0;
  padding: 0 1.25rem 1rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}
.landing-qs-note code {
  color: #e6edf3;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
}
.landing-qs-note a { color: #7fd4b4; }
.landing-qs-note a:hover { color: #9ce0c6; }
