/* Yappy — https://github.com/OperatingSystem-1/Yappy
   Copyright (C) 2026 ProxialGn. All rights reserved.
   SPDX-License-Identifier: LicenseRef-Proprietary

   This source is proprietary and confidential. Unauthorized copying,
   distribution, or modification of this file, via any medium, is strictly
   prohibited without the express written permission of ProxialGn. */

/* Documentation pages. Rides on site.css for the palette and the wallpaper,
   and adds the one thing a marketing page never needs: comfortable prose. */

body.doc { line-height: 1.7; }

.doc .wrap { max-width: 860px; }

nav.doc-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 22px 0; flex-wrap: wrap;
}
nav.doc-nav .logo {
  display: flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em;
}
nav.doc-nav .links a {
  color: var(--muted); margin-left: 22px; font-weight: 500; font-size: .92rem;
}
nav.doc-nav .links a:hover { color: var(--text); }

/* site.css styles bare <nav> as a space-between flex row for the site header.
   The breadcrumb and the table of contents are navs too, and neither wants it. */
nav.crumbs, nav.toc { display: block; }

.crumbs { font-size: .84rem; color: var(--muted); padding-bottom: 26px; }
.crumbs a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current="page"] { color: var(--text); }

main { display: block; padding-bottom: 70px; }

article h1 {
  font-size: clamp(2.1rem, 5vw, 3rem);
  font-weight: 800; letter-spacing: -0.035em; line-height: 1.08;
  margin: 6px 0 26px;
}
/* site.css centres every <h2> for the marketing page. Documentation is prose:
   it reads left, and so does everything else on these pages. */
body.doc article h2,
body.doc article h3,
body.doc .toc .toc-h { text-align: left; }

article h2 {
  font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em;
  margin: 46px 0 14px; padding-top: 12px; border-top: 1px solid var(--line);
}
article h3 { font-size: 1.13rem; font-weight: 650; margin: 30px 0 10px; }
article p  { margin: 0 0 17px; color: #ddd9e6; }
article ul, article ol { margin: 0 0 18px 22px; }
article li { margin-bottom: 8px; color: #ddd9e6; }
article a  { color: #ffb3c8; text-decoration: underline; text-underline-offset: 3px; }
article a:hover { color: #ff9b3d; }
article strong { color: var(--text); }
article hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }

article blockquote {
  margin: 0 0 18px; padding: 12px 18px;
  border-left: 3px solid var(--accent-a);
  background: var(--card); border-radius: 0 10px 10px 0;
}
article blockquote p { margin: 0; }

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: .875em; background: rgba(255,255,255,.07);
  border: 1px solid var(--line); border-radius: 6px; padding: .12em .38em;
}
pre {
  background: rgba(0,0,0,.42); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 18px; overflow-x: auto; margin: 0 0 20px;
}
pre code { background: none; border: 0; padding: 0; font-size: .84rem; line-height: 1.6; }

.table-wrap { overflow-x: auto; margin: 0 0 22px; border-radius: 12px; border: 1px solid var(--line); }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.table-wrap th, .table-wrap td {
  text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table-wrap th { color: var(--text); font-weight: 650; background: rgba(255,255,255,.04); }
.table-wrap td { color: var(--muted); }
.table-wrap tr:last-child td { border-bottom: 0; }

.toc {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 20px; margin: 0 0 34px;
}
.toc .toc-h {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted); margin: 0 0 8px; border: 0; padding: 0; font-weight: 600;
}
.toc ul { margin: 0; list-style: none; columns: 2; column-gap: 26px; }
.toc li { margin: 0 0 5px; break-inside: avoid; }
.toc a { font-size: .88rem; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--text); }

.md-note {
  margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: .82rem; color: var(--muted);
}

.doc-search {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin: 0 0 26px;
}
.doc-search input[type="search"] {
  flex: 1 1 260px; min-width: 0;
  background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 14px; font: inherit; font-size: .95rem;
}
.doc-search input[type="search"]:focus-visible { outline: 2px solid var(--accent-a); outline-offset: 2px; }
.doc-search button {
  background: var(--grad); color: #1b0b14; font: inherit; font-weight: 700;
  border: 0; border-radius: 12px; padding: 11px 20px; cursor: pointer;
}

footer.doc-footer {
  border-top: 1px solid var(--line); padding: 26px 24px 60px;
  text-align: center; color: var(--muted); font-size: .85rem;
}
footer.doc-footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
footer.doc-footer a:hover { color: var(--text); }

:where(a, button, input, summary):focus-visible {
  outline: 2px solid var(--accent-a); outline-offset: 3px; border-radius: 4px;
}

@media (max-width: 620px) {
  .toc ul { columns: 1; }
  nav.doc-nav .links a { margin: 0 16px 0 0; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* the homepage borrows the search field and the link row from the doc pages */
.foot-search { max-width: 520px; margin: 0 auto 22px; }
.foot-links {
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center;
  margin: 0 auto 26px; max-width: 720px; font-size: .85rem;
}
.foot-links a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.foot-links a:hover { color: var(--text); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--grad); color: #1b0b14; font-weight: 700;
  padding: 10px 18px; border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

/* homepage FAQ */
.faq-list { display: grid; gap: 14px; margin-top: 26px; }
.faq-item {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 22px;
}
.faq-item h3 { font-size: 1.02rem; font-weight: 650; margin: 0 0 7px; letter-spacing: -0.01em; }
.faq-item p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.65; }
.faq-item a { color: #ffb3c8; text-decoration: underline; text-underline-offset: 3px; }
.faq-item code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .87em;
  background: rgba(255,255,255,.07); border: 1px solid var(--line);
  border-radius: 5px; padding: .1em .35em;
}
@media (min-width: 780px) { .faq-list { grid-template-columns: 1fr 1fr; } }

/* homepage developer section */
.dev-grid { display: grid; gap: 14px; margin-top: 30px; }
@media (min-width: 780px) { .dev-grid { grid-template-columns: 1fr 1fr; } }
.dev-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; text-align: left;
  transition: border-color .2s, transform .2s;
}
.dev-card:hover { border-color: rgba(255,92,138,.45); transform: translateY(-2px); }
.dev-card h3 { font-size: 1.02rem; font-weight: 650; margin: 0 0 8px; letter-spacing: -0.01em; }
.dev-card p { margin: 0 0 10px; color: var(--muted); font-size: .93rem; line-height: 1.6; }
.dev-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86em;
  background: rgba(255,255,255,.07); border: 1px solid var(--line);
  border-radius: 5px; padding: .1em .35em; color: #ffd0dd;
}
.dev-more { font-size: .85rem; font-weight: 600; color: #ffb3c8; }
.dev-snippet {
  margin: 20px 0 0; text-align: left; overflow-x: auto;
  background: rgba(0,0,0,.42); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 18px;
}
.dev-snippet code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .82rem; line-height: 1.75; color: var(--muted);
  background: none; border: 0; padding: 0; white-space: pre;
}
