/* Cosmos docs & marketing prose — shares the /me product shell.
   Load: cosmos-v2-tokens → me-shared → cosmos-components → site-nav → cosmos-docs */

@import url('/css/site-nav.css?v=7');

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body.cosmos-docs {
  margin: 0;
  color: var(--ink-1);
  font-family: var(--font-self);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

body.cosmos-docs .bg-shell::after {
  opacity: 0.35;
  animation-duration: 36s;
}

/* Layout */
.docs-main {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: calc(88px + env(safe-area-inset-top, 0px)) 32px 80px;
}

.docs-main--wide { max-width: 880px; }

.docs-head {
  margin: 0 0 48px;
}

.docs-kicker {
  font-family: var(--font-meta);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--kind-observed);
  margin: 0 0 14px;
}

.docs-kicker--muted { color: var(--ink-3); }

.docs-title {
  font-family: var(--font-self);
  font-weight: 400;
  font-size: clamp(30px, 4.5vw, 44px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink-1);
  text-wrap: balance;
  margin: 0;
}

.docs-lede {
  font-family: var(--font-self);
  font-size: clamp(16px, 1.8vw, 18px);
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 20px 0 0;
  max-width: 56ch;
  text-wrap: pretty;
}

.docs-meta {
  font-family: var(--font-meta);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--ink-3);
  margin-top: 16px;
}

/* Prose */
.docs-section {
  margin: 0 0 40px;
}

.docs-section h2 {
  font-family: var(--font-self);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink-1);
  margin: 0 0 14px;
  text-wrap: balance;
}

.docs-section p {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 12px;
  text-wrap: pretty;
}

.docs-section p strong {
  color: var(--ink-1);
  font-weight: 400;
}

.docs-section ul,
.docs-section ol {
  margin: 0 0 14px;
  padding-left: 1.15em;
}

.docs-section li {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 8px;
  text-wrap: pretty;
}

.docs-section li strong {
  color: var(--ink-1);
  font-weight: 400;
}

.docs-section a {
  color: var(--kind-observed);
  text-decoration: none;
  border-bottom: 1px solid rgba(127, 237, 199, 0.22);
  transition: border-color 160ms;
}

.docs-section a:hover { border-bottom-color: var(--kind-observed); }

.docs-section code {
  font-family: var(--font-meta);
  font-size: 0.88em;
  color: var(--ink-1);
  background: rgba(255, 255, 255, 0.04);
  padding: 1px 6px;
  border-radius: 4px;
}

.docs-section pre {
  background: rgba(127, 237, 199, 0.04);
  border: 1px solid var(--ink-line);
  border-radius: var(--r-2, 8px);
  padding: 16px 18px;
  margin: 0 0 16px;
  overflow-x: auto;
  font-family: var(--font-meta);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-1);
}

.docs-section pre code {
  background: transparent;
  padding: 0;
  font-size: inherit;
}

.docs-rule {
  width: 32px;
  height: 1px;
  background: var(--ink-line);
  margin: 40px 0;
  border: 0;
}

.docs-note {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-3);
  margin: 0 0 24px;
  padding-left: 14px;
  border-left: 2px solid var(--ink-line);
}

/* Panels & cards */
.docs-panel {
  padding: 22px 24px;
  margin: 0 0 14px;
  border-radius: var(--r-2, 8px);
  background: var(--whisper-bg, rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 0 0 1px var(--whisper-edge, var(--ink-line));
}

.docs-panel-label {
  font-family: var(--font-meta);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--kind-observed);
  margin: 0 0 12px;
}

.docs-panel-label--warn { color: #ffb86c; }

.docs-panel-title {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink-1);
  margin: 0 0 8px;
}

.docs-panel-status {
  font-family: var(--font-meta);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: #ffb86c;
}

.docs-panel-body {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0;
}

.docs-panel-body strong {
  color: var(--ink-1);
  font-weight: 400;
}

.docs-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.docs-card {
  padding: 18px 20px;
  border-radius: var(--r-2, 8px);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 0 0 1px var(--ink-line);
}

.docs-card-k {
  font-family: var(--font-meta);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--kind-observed);
  margin: 0 0 8px;
}

.docs-card-b {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0;
}

/* Week grid demo */
.docs-week-grid {
  display: grid;
  grid-template-columns: repeat(52, 1fr);
  gap: 2px;
  margin-top: 8px;
}

.docs-week-cell {
  aspect-ratio: 1;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.04);
}

.docs-week-cell.lit {
  background: rgba(127, 237, 199, 0.35);
  box-shadow: 0 0 6px rgba(127, 237, 199, 0.18);
}

.docs-week-cell.recent { background: rgba(127, 237, 199, 0.62); }

.docs-week-caption {
  font-family: var(--font-meta);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--ink-3);
  margin: 12px 0 0;
}

/* Chips row */
.docs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.docs-chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  font-family: var(--font-meta);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--ink-3);
  text-decoration: none;
  border-radius: var(--r-pill, 999px);
  box-shadow: inset 0 0 0 1px var(--ink-line);
  transition: color 160ms, box-shadow 160ms;
}

.docs-chip:hover {
  color: var(--ink-1);
  box-shadow: inset 0 0 0 1px var(--ink-3);
}

/* CTA */
.docs-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
  align-items: center;
}

.docs-cta .btn,
.docs-cta .btn-pill {
  text-decoration: none;
}

.docs-cta-box {
  margin-top: 40px;
  padding: 24px 22px;
  border-radius: var(--r-2, 8px);
  background: rgba(127, 237, 199, 0.04);
  box-shadow: inset 0 0 0 1px rgba(127, 237, 199, 0.22);
}

.docs-cta-box h2 {
  margin-top: 0;
  font-size: 18px;
}

.docs-email {
  font-family: var(--font-meta);
  font-size: 14px;
  color: var(--kind-observed);
  text-decoration: none;
  border-bottom: none;
}

.docs-email:hover { text-decoration: underline; }

/* Footer */
.docs-footer {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 32px calc(48px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-meta);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--ink-4);
  border-top: 1px solid var(--ink-line);
}

.docs-footer a {
  color: var(--ink-3);
  text-decoration: none;
  border-bottom: none;
  transition: color 160ms;
}

.docs-footer a:hover { color: var(--kind-observed); }

@media (max-width: 720px) {
  .docs-main,
  .docs-footer {
    padding-left: 22px;
    padding-right: 22px;
  }

  .docs-main {
    padding-top: calc(80px + env(safe-area-inset-top, 0px));
    padding-bottom: 64px;
  }

  .docs-week-grid { grid-template-columns: repeat(26, 1fr); }

  .docs-footer {
    flex-direction: column;
    text-align: center;
  }

  body.cosmos-docs nav.site-nav.cosmos-nav {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Bare prose children (privacy, terms) */
.docs-main > h2 {
  font-family: var(--font-self);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink-1);
  margin: 40px 0 14px;
}

.docs-main > h2:first-of-type { margin-top: 0; }

.docs-main > p,
.docs-main > ul,
.docs-main > ol {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 12px;
  text-wrap: pretty;
}

.docs-main > p strong,
.docs-main > ul li strong,
.docs-main > ol li strong {
  color: var(--ink-1);
  font-weight: 400;
}

.docs-main > ul,
.docs-main > ol {
  padding-left: 1.15em;
}

.docs-main > ul li,
.docs-main > ol li {
  margin: 0 0 8px;
}

.docs-main > a,
.docs-main p a,
.docs-main li a {
  color: var(--kind-observed);
  text-decoration: none;
  border-bottom: 1px solid rgba(127, 237, 199, 0.22);
}

.docs-main > a:hover,
.docs-main p a:hover,
.docs-main li a:hover {
  border-bottom-color: var(--kind-observed);
}

.docs-main code {
  font-family: var(--font-meta);
  font-size: 0.88em;
  color: var(--ink-1);
  background: rgba(255, 255, 255, 0.04);
  padding: 1px 6px;
  border-radius: 4px;
}

.docs-lede a {
  color: var(--kind-observed);
  text-decoration: none;
  border-bottom: 1px solid rgba(127, 237, 199, 0.22);
}

/* Changelog */
.docs-changelog .cl-head {
  padding: 48px 0 40px;
}

.docs-changelog .cl-kicker {
  font-family: var(--font-meta);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--kind-observed);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.docs-changelog .cl-kicker::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--kind-observed);
}

.docs-changelog h1 {
  font-family: var(--font-self);
  font-weight: 400;
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 16px 0 14px;
}

.docs-changelog .cl-intro {
  font-size: 17px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 48ch;
}

.docs-changelog .entry {
  padding: 32px 0;
}

.docs-changelog .entry:first-child { padding-top: 8px; }

.docs-changelog .entry + .entry {
  border-top: 1px solid var(--ink-line);
}

.docs-changelog .entry-date {
  font-family: var(--font-meta);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}

.docs-changelog .entry-date.hidden-date {
  visibility: hidden;
  height: 0;
  margin: 0;
}

.docs-changelog .entry-body {
  font-size: clamp(17px, 2vw, 19px);
  font-weight: 300;
  line-height: 1.55;
  color: var(--ink-1);
  max-width: 56ch;
  margin: 0 0 14px;
}

.docs-changelog .entry-changes {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  max-width: 56ch;
}

.docs-changelog .entry-changes li {
  padding: 10px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.docs-changelog .entry-changes li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.docs-changelog .change-tag {
  flex-shrink: 0;
  margin-top: 6px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  box-shadow: 0 0 8px currentColor;
}

.docs-changelog .change-tag.feature { color: var(--kind-observed); background: var(--kind-observed); }
.docs-changelog .change-tag.enhancement { color: var(--kind-cosmos); background: var(--kind-cosmos); }
.docs-changelog .change-tag.fix { color: var(--kind-person); background: var(--kind-person); }

.docs-changelog .change-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-1);
  margin: 0 0 4px;
}

.docs-changelog .change-title .change-kind {
  font-family: var(--font-meta);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--ink-3);
  margin-left: 8px;
  font-weight: 400;
}

.docs-changelog .change-desc {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
}

.docs-changelog .entry-links {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.docs-changelog .entry-links a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  color: var(--kind-observed);
  text-decoration: none;
  border: 1px solid rgba(127, 237, 199, 0.22);
  padding: 7px 12px;
  font-family: var(--font-meta);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: lowercase;
}

.docs-changelog .cl-section-label {
  font-family: var(--font-meta);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 48px;
}

.docs-changelog .cl-section-label::before,
.docs-changelog .cl-section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--ink-line);
}

.docs-changelog #extensions .entry:first-child {
  padding-top: 24px;
}

.docs-changelog .entry-body,
.docs-changelog .cl-intro {
  text-wrap: pretty;
}

.docs-changelog .reveal {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  transition: opacity 560ms var(--ease-soft), transform 560ms var(--ease-soft);
}

.docs-changelog .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  body.cosmos-docs .bg-shell::after { animation: none; }
  .docs-changelog .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
