Skip to content

A local-first multi-agent app development platform, built on PenguinHarness

9.0 KB
Raw Blame
/**
 * Docs site styles: single-file Tailwind CSS 4 entry point sharing the landing page's
 * visual language (GitHub-style simplicity, solid backgrounds + 1px borders + one
 * brand blue accent) minus its marketing effects — doc pages stay calm and readable.
 * Dark theme is toggled via the html.dark class.
 */
@import "tailwindcss";

/* Dark theme toggled via the html.dark class (Tailwind 4 custom variant). */
@custom-variant dark (&:where(.dark, .dark *));

/* Brand color scale (Google blue family), identical to the landing page / Web App. */
@theme {
  --color-brand-25: #f8fbff;
  --color-brand-50: #e8f0fe;
  --color-brand-100: #d2e3fc;
  --color-brand-200: #aecbfa;
  --color-brand-300: #8ab4f8;
  --color-brand-400: #669df6;
  --color-brand-500: #4285f4;
  --color-brand-600: #1a73e8;
  --color-brand-700: #0b57d0;
  --color-brand-800: #0842a0;
  --color-brand-900: #062e6f;
  --color-brand-950: #041e49;
}

@layer base {
  :root {
    color-scheme: light;
  }
  .dark {
    color-scheme: dark;
    /* Pure-black dark base, matching the landing page (true-neutral gray overrides). */
    --color-gray-950: #000000;
    --color-gray-900: #0d0d0d;
    --color-gray-800: #1f1f1f;
    --color-gray-700: #303030;
  }
  html {
    scroll-behavior: smooth;
  }
  body {
    @apply bg-white text-gray-900 antialiased dark:bg-gray-950 dark:text-gray-100;
    font-family:
      ui-sans-serif,
      system-ui,
      -apple-system,
      "Segoe UI",
      Roboto,
      "PingFang SC",
      "Microsoft YaHei",
      sans-serif;
  }
  code,
  pre,
  kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  }
  button:focus-visible,
  a:focus-visible,
  summary:focus-visible {
    outline: 3px solid rgb(107 114 128 / 0.4);
    outline-offset: 2px;
  }
  button:not(:disabled),
  [role="button"]:not(:disabled) {
    cursor: pointer;
  }
  ::selection {
    background: rgb(0 0 0 / 0.1);
  }
  .dark ::selection {
    background: rgb(255 255 255 / 0.18);
  }
  * {
    scrollbar-width: thin;
    scrollbar-color: rgb(60 64 67 / 0.28) transparent;
  }
  .dark * {
    scrollbar-color: rgb(232 234 237 / 0.2) transparent;
  }
}

/* ---------- Animations (same tone as the landing page: short ease, slight offset) ---------- */

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.anim-rise {
  animation: rise-in 280ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.anim-fade {
  animation: fade-in 120ms ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Typography for Markdown doc bodies (same voice as the landing blog) ---------- */

.md-body {
  overflow-wrap: break-word;
}
.md-body :is(p, ul, ol, pre, blockquote, table) {
  margin: 0.625rem 0;
}
.md-body li {
  margin: 0.3rem 0;
}
.md-body p,
.md-body li {
  line-height: 1.75;
}
.md-body :is(h1, h2, h3, h4) {
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
}
.md-body h1 {
  font-size: 1.375rem;
}
.md-body h2 {
  font-size: 1.1875rem;
  @apply border-b border-gray-200 pb-1.5 dark:border-gray-800;
}
.md-body h3 {
  font-size: 1.0625rem;
}
.md-body ul {
  list-style: disc;
  padding-left: 1.25rem;
}
.md-body ol {
  list-style: decimal;
  padding-left: 1.25rem;
}
.md-body a {
  @apply text-brand-700 underline decoration-brand-300 underline-offset-2 transition-colors hover:text-brand-600 dark:text-brand-300 dark:decoration-brand-700;
  /* `anywhere` rather than `word-break: break-all`: it only breaks a token that would otherwise
     overflow, so long URLs wrap cleanly (filling each line) while short Latin words in mixed
     CJK/Latin link text never split mid-word; unlike `break-word` it also counts the break
     opportunities toward min-content sizing, so a long link can't blow out flex/table layouts. */
  overflow-wrap: anywhere;
}
/* Font size only, so fenced blocks keep the size they have always had; the visible chrome below
   is scoped to inline code. */
.md-body code {
  @apply text-[0.85em];
}
/* Inline code: a hairline outline over a barely-there brand wash, replacing the solid gray fill
   this used to carry — in prose dense with `code` that fill read as a row of heavy blocks. The
   chrome is scoped to inline code because the `.md-body pre code` reset below strips background,
   color and padding inside fenced blocks but would not strip a border. Prose often holds long
   unbroken paths and identifiers, so inline code gets the same `anywhere` treatment as links.
   Kept identical to the landing site: the site root `/Adelie/` and `/Adelie/docs/` share one
   design language. */
.md-body :not(pre) > code {
  @apply rounded-md border border-brand-200/60 bg-brand-50/40 px-[0.3em] py-[0.1em] text-[0.875em] text-gray-900 dark:border-brand-900/70 dark:bg-brand-950/50 dark:text-gray-100;
  overflow-wrap: anywhere;
}
.md-body pre {
  @apply overflow-x-auto rounded-lg border border-gray-200 bg-gray-50 p-3 text-[13px] leading-6 dark:border-gray-800 dark:bg-gray-900;
}
.md-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* Fenced blocks: .md-code owns the surface (border, radius, fill) and the inner <pre> only
   scrolls and pads, so the plain fallback and Shiki's markup sit in an identical box and
   the swap on highlight causes no reflow. Shiki writes its theme background as an inline
   style, which only !important can drop — hence the reset here rather than on .md-code. */
.md-body .md-code {
  @apply my-2.5 overflow-hidden rounded-lg border border-gray-200 bg-gray-50 dark:border-gray-800 dark:bg-gray-900;
}
.md-body .md-code pre {
  @apply overflow-x-auto p-3 text-[13px] leading-6;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
}
/* Dark mode flips colors through Shiki's dual-theme CSS variables, so switching themes
   never re-highlights: one render carries both palettes. */
html.dark .md-body .shiki,
html.dark .md-body .shiki span {
  color: var(--shiki-dark) !important;
  font-style: var(--shiki-dark-font-style) !important;
  font-weight: var(--shiki-dark-font-weight) !important;
  text-decoration: var(--shiki-dark-text-decoration) !important;
}

/* Callouts (remark-callout). A collapsible one is a <details>, so the arrow and the
   open/closed state are the browser's; the summary carries the whole clickable row. */
.md-body .callout {
  @apply my-3 rounded-lg border px-3.5 py-2.5;
}
.md-body .callout > :first-child {
  margin-top: 0;
}
.md-body .callout > :last-child {
  margin-bottom: 0;
}
.md-body .callout-title {
  @apply font-medium;
}
.md-body details.callout > summary {
  @apply -mx-1 cursor-pointer list-none rounded px-1 select-none;
}
.md-body details.callout > summary::-webkit-details-marker {
  display: none;
}
.md-body details.callout > summary::before {
  content: "";
  @apply mr-2 inline-block h-0 w-0 align-[0.09em] border-y-4 border-l-[6px] border-y-transparent transition-transform;
  border-left-color: currentColor;
}
.md-body details.callout[open] > summary::before {
  transform: rotate(90deg);
}
.md-body details.callout[open] > summary {
  @apply mb-2;
}
.md-body .callout-info {
  @apply border-brand-200 bg-brand-50/50 dark:border-brand-900 dark:bg-brand-950/40;
}
.md-body .callout-info .callout-title {
  @apply text-brand-800 dark:text-brand-200;
}
.md-body :is(.callout-warning, .callout-caution) {
  @apply border-amber-300 bg-amber-50/60 dark:border-amber-900 dark:bg-amber-950/30;
}
.md-body :is(.callout-warning, .callout-caution) .callout-title {
  @apply text-amber-800 dark:text-amber-200;
}

/* Tabbed code groups (remark-tabs): the strip sits on the code surface, so a group reads
   as one object rather than a row of buttons above an unrelated block. */
.md-body .md-tabs-group {
  @apply my-2.5 overflow-hidden rounded-lg border border-gray-200 dark:border-gray-800;
}
.md-body .md-tabs-strip {
  @apply flex flex-wrap gap-1 border-b border-gray-200 bg-gray-50 px-1.5 pt-1.5 dark:border-gray-800 dark:bg-gray-900;
}
.md-body .md-tabs-strip button {
  @apply cursor-pointer rounded-t-md px-2.5 py-1 text-[13px] text-gray-500 transition-colors hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-100;
  border-bottom: 2px solid transparent;
}
.md-body .md-tabs-strip button[aria-selected="true"] {
  @apply border-b-brand-600 font-medium text-brand-700 dark:border-b-brand-400 dark:text-brand-300;
}
/* The group already draws the border and radius the block would otherwise repeat. */
.md-body .md-tabs-group .md-code {
  @apply my-0 rounded-none border-0;
}

.md-body blockquote {
  @apply border-l-2 border-gray-300 pl-3 text-gray-600 dark:border-gray-700 dark:text-gray-400;
}
.md-body table {
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}
.md-body :is(th, td) {
  @apply border border-gray-200 px-2.5 py-1.5 text-sm dark:border-gray-800;
}
.md-body th {
  @apply bg-gray-50 text-left dark:bg-gray-900;
}
.md-body hr {
  @apply my-4 border-gray-200 dark:border-gray-800;
}