/* plugins.omarchy.org — Omarchy site design system, ported 1-1 from
   omacom/omarchy-site src/styles.css ("base" layer).
   Theme tokens (--t-*) live in omarchy-themes.css (all 22 site themes);
   this file maps them to semantic --color-* names and styles every
   component in the site's idiom: Geist/JetBrains Mono, square corners,
   hairline rules, elevation rings, brand accents.
   The layout loads omarchy-themes.css first through the asset helper so both
   stylesheets use fingerprinted URLs in production. */

/* ---------- Fonts ---------- */

@font-face {
  font-display: swap; font-family: "Geist Variable"; font-style: normal; font-weight: 100 900;
  src: url("/assets/Geist-Variable-90ac0fe7.woff2") format("woff2-variations");
}
@font-face {
  font-display: swap; font-family: "JetBrains Mono Variable"; font-style: normal; font-weight: 100 800;
  src: url("/assets/JetBrainsMono-Variable-7c88d0cc.woff2") format("woff2-variations");
}
@font-face {
  font-display: swap; font-family: "JetBrains Mono Variable"; font-style: italic; font-weight: 100 800;
  src: url("/assets/JetBrainsMono-Variable-7c88d0cc.woff2") format("woff2-variations");
}

/* ---------- Semantic tokens (omarchy-site @theme inline) ---------- */

:root {
  --font-sans: "Geist Variable", sans-serif;
  --font-mono: "JetBrains Mono Variable", monospace;

  --color-bg-deep: var(--t-bg-deep);
  --color-bg: var(--t-bg);
  --color-surface: var(--t-surface);
  --color-surface-2: var(--t-surface-2);
  --color-border-subtle: var(--t-border-subtle);
  --color-border-strong: var(--t-border-strong);
  --color-text: var(--t-text);
  --color-text-secondary: var(--t-text-secondary);
  --color-text-muted: var(--t-text-muted);
  --color-brand: var(--t-brand);
  --color-brand-soft: var(--t-brand-soft);
  --color-primary: var(--t-brand);
  --color-primary-foreground: var(--t-brand-ink);
  --color-destructive: oklch(0.723 0.159 10.3);
  --color-ring: var(--t-brand);

  /* Registry accents derived from the site palette */
  --color-success: var(--t-brand);
  --color-warning: oklch(0.787 0.137 50.6);
  --color-info: oklch(0.719 0.132 264.2);
  --success-soft: color-mix(in srgb, var(--t-brand) 14%, transparent);
  --warning-soft: color-mix(in srgb, oklch(0.787 0.137 50.6) 14%, transparent);
  --danger-soft: color-mix(in srgb, var(--color-destructive) 12%, transparent);

  --ease: cubic-bezier(0.19, 1, 0.22, 1);
  --transition: 150ms ease-out;
  --container: 72rem; /* max-w-6xl, like omarchy.org */
  --gutter: 16px;
  --nav-h: calc(3.5rem + env(safe-area-inset-top, 0px));
  --bleed-pad: max(var(--gutter), calc(50% - var(--container) / 2 + var(--gutter)));
}

@media (min-width: 640px) { :root { --gutter: 24px; } }

/* ---------- Reset-ish ---------- */

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

/* Snap on page navigation: no smooth scroll-up animation when Turbo swaps
   pages (e.g. directory pager). In-page jumps that want smoothing opt in
   explicitly (see search-focus scrollIntoView). */
html { scroll-behavior: auto; }

html, body { min-height: 100%; }

body {
  margin: 0;
  padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.55;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  display: flex; flex-direction: column; min-height: 100dvh;
}
body > main { flex: 1; }

img, svg { max-width: 100%; display: block; }

/* No 300ms double-tap-zoom wait on anything you can press */
a, button, input, select, textarea, [role="button"] { touch-action: manipulation; }

input, textarea, select { color: var(--text, var(--color-text)); }
::placeholder { color: var(--color-text-muted); opacity: 1; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance;
}
h1 { font-size: clamp(34px, 5vw, 56px); letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 3vw, 34px); }
h3 { font-size: 21px; line-height: 1.25; }
h4 { font-family: var(--font-mono); font-size: 16px; font-weight: 700; line-height: 1.3; }

/* Keep anchor offsets synchronized with the sticky bar height. */
[id] { scroll-margin-top: var(--nav-h); }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--t-brand); outline-offset: 2px; }

code, pre { font-family: var(--font-mono); }
code {
  font-size: 0.86em; background: var(--color-surface-2);
  padding: 0.15em 0.4em; color: var(--color-text);
}
pre {
  background: var(--color-bg-deep); box-shadow: var(--t-elevation);
  padding: 1em 1.25em; overflow-x: auto; font-size: 13px; line-height: 1.6;
}
pre code { background: none; padding: 0; font-size: 13px; }
pre::-webkit-scrollbar { height: 8px; }
pre::-webkit-scrollbar-thumb { background: var(--t-scroll-thumb); }
/* The markdown renderer inlines its own code background — the brand one wins */
.readme pre { background: var(--color-bg-deep) !important; }

/* Old Omacom classes removed with the chrome rewrite — no shims needed.
   (An earlier draft kept display:contents shims here; they broke layout by
   dissolving structural boxes, so they were deleted outright.) */

::selection { background: var(--t-selection); color: var(--color-text); }

/* Theme switches must not animate: every color would tween independently */
.no-transitions, .no-transitions * { transition: none !important; }

.img-outlined { outline: 1px solid var(--t-img-outline); outline-offset: -1px; }
.ring-elevation { box-shadow: var(--t-elevation); }
.ring-elevation-hover { transition-property: box-shadow, background-color; transition-duration: 150ms; transition-timing-function: ease-out; }
.ring-elevation-hover:hover { box-shadow: var(--t-elevation-hover); }

.readme p, .prose p { text-wrap: pretty; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Skip link: visible on focus only (layout paints it inline). */
body > a[href="#main"]:focus { transform: none !important; background: var(--color-surface); }

/* ---------- Utility ---------- */

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

/* Registry section label. Headings inside .prose keep the site's treatment. */
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--color-brand);
}

.muted { color: var(--color-text-muted); }
.summary { max-width: 60ch; color: var(--color-text-secondary); }
.lede { color: var(--color-text-secondary); margin-bottom: 40px; max-width: 62ch; }
.ns { color: var(--color-text-muted); font-weight: 400; }
.prompt { color: var(--color-brand); }
.hint { font-size: 12px; color: var(--color-text-muted); margin-top: 6px; }

/* Prose links: reserved underline, brand on hover (omarchy-site .prose).
   Scoped to content zones only — footer chrome (.omarchy-footer__link) and
   cards/nav carry their own link treatment and must never inherit this. */
.prose a:not(.omarchy-footer__link), .readme a, .content-page p a, .comment p a, .sidebar dd a {
  color: var(--color-text);
  text-decoration: underline; text-decoration-color: var(--color-border-strong);
  text-underline-offset: 3px; text-decoration-skip-ink: auto;
  transition: text-decoration-color var(--transition);
}
.prose a:not(.omarchy-footer__link):hover, .readme a:hover, .content-page p a:hover, .comment p a:hover, .sidebar dd a:hover {
  text-decoration-color: var(--color-brand);
}

/* ---------- Buttons (omarchy-site buttonVariants) ---------- */

.button, button.button, input[type="submit"].button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  flex-shrink: 0; user-select: none; white-space: nowrap;
  background: var(--color-primary); color: var(--color-primary-foreground);
  font-family: var(--font-mono); font-size: 14px; font-weight: 500;
  text-decoration: none; line-height: 1;
  border: 1px solid transparent; border-radius: 0; padding: 0 16px; height: 40px; cursor: pointer;
  outline: none;
  transition: background-color var(--transition), border-color var(--transition),
    color var(--transition), transform var(--transition);
}
.button:hover { background: color-mix(in oklch, var(--color-primary), white 14%); color: var(--color-primary-foreground); }
.button:active { transform: scale(0.96); }
.button--ghost, button.button--ghost, input[type="submit"].button--ghost {
  background: transparent; color: var(--color-text);
}
.button--ghost:hover { background: var(--color-surface-2); color: var(--color-text); }
.button--danger, button.button--danger {
  background: color-mix(in srgb, var(--color-destructive) 10%, transparent);
  color: var(--color-destructive);
}
.button--danger:hover {
  background: color-mix(in srgb, var(--color-destructive) 20%, transparent);
  color: var(--color-destructive);
}
.button--small, button.button--small { height: 32px; padding: 0 10px; font-size: 12px; }

/* ---------- Copy button ---------- */

.copy-button {
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; background: transparent; color: inherit;
  border: 1px solid var(--color-border-strong);
  padding: 6px; border-radius: 0; flex-shrink: 0;
  transition: color var(--transition), border-color var(--transition);
}
.copy-button svg { width: 14px; height: 14px; }
.copy-button__check { display: none; }
.copy-button--done .copy-button__copy { display: none; }
.copy-button--done .copy-button__check { display: block; }
.copy-button:hover { color: var(--color-brand); border-color: var(--color-brand); }
.copy-button--done, .copy-button--done:hover { color: var(--color-brand); border-color: var(--color-brand); }
.copy-button--inline { border-color: var(--color-border-subtle); margin-left: 6px; vertical-align: middle; }
.codeblock { position: relative; }
.readme .codeblock { margin-bottom: 1em; }
.readme .codeblock pre { margin-bottom: 0; }
.copy-button--floating {
  position: absolute; top: 8px; right: 8px;
  background: var(--color-bg-deep); color: var(--color-text); opacity: 0.55;
}
.codeblock:hover .copy-button--floating, .copy-button--floating:focus-visible { opacity: 1; }
.copy-button--inline.copy-button--done { color: var(--color-success); border-color: var(--color-success); }

/* ---------- Badges ---------- */

.badge {
  display: inline-block; border-radius: 0; padding: 5px 12px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  background: var(--color-brand-soft); color: var(--color-brand);
}
.badge--ok { background: var(--success-soft); color: var(--color-success); }
.badge--warning { background: var(--warning-soft); color: var(--color-warning); }
.badge--danger { background: var(--danger-soft); color: var(--color-destructive); }

/* ---------- Header (omarchy-site SiteHeader) ---------- */

.omarchy-header { position: sticky; top: 0; z-index: 100; container-type: inline-size; }
.omarchy-bar {
  --pxc: calc(min((100cqw - 48px) * 0.88, 896px) / 81);
  --pxr: calc(var(--pxc) * 50 / 51);
  padding-top: env(safe-area-inset-top);
  background-color: color-mix(in srgb,
    var(--nav-ground, var(--color-bg))
    calc(var(--nav-surface, 0) * var(--nav-fill, 1) * 90%), transparent);
  backdrop-filter: blur(calc(var(--nav-surface, 0) * 12px));
}
/* With the sheet down, the bar wears the sheet ground, not the section's. */
.omarchy-bar--sheet { background-color: color-mix(in srgb, var(--color-bg) 95%, transparent); backdrop-filter: blur(12px); }
.omarchy-bar__inner {
  margin-inline: auto; max-width: var(--container);
  display: flex; align-items: center; gap: 12px;
  height: 56px; height: 3.5rem; padding-inline: var(--gutter);
}
.omarchy-brand { position: relative; display: flex; align-items: center; text-decoration: none; }
.omarchy-brand__mark { width: 22px; height: 22px; flex-shrink: 0; transition: opacity var(--transition); }
.omarchy-brand__wordmark {
  position: absolute; top: 50%; left: 0; translate: 0 -50%; width: 112px;
  aspect-ratio: 4131 / 950; opacity: 0; color: var(--color-brand); background: currentColor;
  mask: url("/brand/omarchy-wordmark.svg") no-repeat center / 100% 100%;
  transition: opacity var(--transition); pointer-events: none;
}
@media (max-width: 639.98px) {
  .omarchy-bar[data-nav-past-hero] .omarchy-brand { width: 112px; }
  .omarchy-bar[data-nav-past-hero] .omarchy-brand__mark { opacity: 0; }
  .omarchy-bar[data-nav-past-hero] .omarchy-brand__wordmark { opacity: 1; }
  html:not([data-nav-menu="open"]) .omarchy-bar[data-nav-past-hero] {
    box-shadow: inset 0 -1px 0 var(--color-border-subtle);
  }
}
@media (min-width: 640px) { .omarchy-brand__wordmark { display: none; } }
@media (min-width: 1024px) {
  .omarchy-brand__mark { width: calc(var(--pxc) * 2); height: calc(var(--pxc) * 2); }
}
.omarchy-nav { display: none; align-items: center; }
.omarchy-nav a {
  padding: 6px 12px; font-size: 14px; line-height: 20px; white-space: nowrap; text-decoration: none;
  color: var(--color-text-secondary);
  transition: background-color var(--transition);
}
.omarchy-nav a:hover { background: var(--color-surface-2); color: var(--color-text); }
.omarchy-nav a[aria-current="page"] { color: var(--color-text); background: var(--color-surface-2); }
@media (min-width: 640px) {
  .omarchy-nav { display: flex; }
}
.omarchy-bar__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.omarchy-bar__icons { display: none; align-items: center; gap: 4px; }
@media (min-width: 640px) {
  .omarchy-bar__icons { display: flex; }
}
.omarchy-iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  position: relative; height: 32px; width: 32px;
  background: transparent; border: 0; border-radius: 0; cursor: pointer;
  color: var(--color-text-secondary);
  transition: background-color var(--transition), transform var(--transition);
  text-decoration: none;
}
.omarchy-iconbtn:hover { color: var(--color-text); }
.omarchy-iconbtn svg { width: 20px; height: 20px; flex-shrink: 0; }
@media (min-width: 1024px) {
  .omarchy-iconbtn { width: calc(var(--pxr) * 3); height: calc(var(--pxr) * 3); }
}
/* Icon tooltips (main-site TooltipContent idiom: dark bubble below the
   button, label + kbd, sideOffset 10). Colors invert with the theme via
   --color-bg/--color-text, same as bg-foreground/text-background. */
.omarchy-tip { position: relative; display: inline-flex; }
.omarchy-tip__bubble {
  position: absolute; top: calc(100% + 10px); left: 50%; translate: -50% 0;
  display: none; align-items: center; gap: 6px; white-space: nowrap;
  background: var(--color-text); color: var(--color-bg);
  font-size: 12px; padding: 6px 12px 6px 12px; border-radius: 6px;
  box-shadow: var(--t-elevation); z-index: 400; pointer-events: none;
}
.omarchy-tip__bubble::before {
  content: ""; position: absolute; top: -4px; left: 50%; translate: -50% 0;
  width: 10px; height: 10px; rotate: 45deg; border-radius: 2px;
  background: var(--color-text);
}
.omarchy-tip__bubble kbd {
  border: 1px solid currentColor; opacity: 0.75; border-radius: 4px;
  padding: 0 4px; font-family: var(--font-mono); font-size: 11px;
}
.omarchy-tip:hover > .omarchy-tip__bubble,
.omarchy-tip:focus-within > .omarchy-tip__bubble { display: inline-flex; }
@media (prefers-reduced-motion: no-preference) {
  .omarchy-tip__bubble { animation: omarchy-tip-in 150ms ease-out; }
  @keyframes omarchy-tip-in { from { opacity: 0; transform: scale(0.95); } }
}
/* Language popover (main-site switcher idiom, server-rendered). */
.omarchy-lang {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 400;
  width: 288px; max-width: calc(100vw - 32px); max-height: 70svh; overflow-y: auto;
  background: var(--color-bg); border: 1px solid var(--color-border-subtle);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.55); padding: 8px;
}
.omarchy-lang__title { display: block; padding: 8px 12px; font-size: 14px; color: var(--color-text-muted); }
.omarchy-lang nav a {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px;
  font-size: 14px; text-decoration: none; color: var(--color-text);
}
.omarchy-lang nav a:hover { background: var(--color-surface-2); }
.omarchy-lang nav a[aria-current] { background: var(--color-surface-2); }
.omarchy-install {
  display: none; align-items: center; height: 32px; padding: 0 16px;
  background: var(--color-primary); color: var(--color-primary-foreground);
  font-size: 14px; font-weight: 500; text-decoration: none;
  transition: background-color var(--transition), transform var(--transition);
}
.omarchy-install:hover { background: color-mix(in oklch, var(--color-primary), white 14%); color: var(--color-primary-foreground); }
.omarchy-install:active { transform: scale(0.96); }
@media (min-width: 900px) {
  .omarchy-install { display: inline-flex; }
}
/* Registry auth lives beside Install: same bar, quieter treatment. */
.omarchy-auth {
  display: none; align-items: center; height: 32px; padding: 0 12px;
  font-size: 13px; text-decoration: none; color: var(--color-text-secondary);
}
.omarchy-auth:hover { background: var(--color-surface-2); color: var(--color-text); }
@media (min-width: 900px) {
  .omarchy-auth { display: inline-flex; }
}
.omarchy-menu-toggle { display: inline-flex; }
.omarchy-bar__icons--mobile { display: flex; align-items: center; gap: 4px; }
@media (min-width: 640px) { .omarchy-bar__icons--mobile { display: none; } }
@media (max-width: 899.98px) { .omarchy-tip--wide { display: none; } }
@media (min-width: 900px) { .omarchy-menu-toggle { display: none; } }
@media (min-width: 1024px) { .omarchy-install { height: calc(var(--pxr) * 3); } }
/* Menu toggle swaps hamburger for a close cross while the sheet is down
   (main-site MenuBarsIcon fold, server-rendered). */
.omarchy-toggle--close { display: none; }
.omarchy-header[data-menu="open"] .omarchy-toggle--menu { display: none; }
.omarchy-header[data-menu="open"] .omarchy-toggle--close { display: inline-flex; }
/* Responsive sheet + scrim (omarchy-site menu) */
.omarchy-scrim {
  position: absolute; inset-inline: 0; top: var(--nav-h); height: 100svh;
  background: rgb(0 0 0 / 0.55); backdrop-filter: blur(4px);
}
.omarchy-menu {
  position: absolute; inset-inline: 0; top: var(--nav-h);
  border-bottom: 1px solid var(--color-border-subtle);
  background: color-mix(in srgb, var(--color-bg) 95%, transparent);
  backdrop-filter: blur(12px);
  max-height: calc(100svh - var(--nav-h)); overflow-y: auto;
}
.omarchy-menu nav {
  margin-inline: auto; max-width: var(--container);
  display: flex; flex-direction: column; padding: 8px var(--gutter);
}
.omarchy-menu nav > a, .omarchy-menu nav > button {
  padding: 12px 0; font-size: 15px; line-height: 22.5px; text-align: left;
  color: var(--color-text-secondary); text-decoration: none;
  background: none; border: 0; font-family: var(--font-mono); cursor: pointer;
}
.omarchy-menu nav > .omarchy-menu__search { margin-top: 8px; border-top: 1px solid var(--color-border-subtle); padding-top: 16px; }
.omarchy-menu nav > a:hover, .omarchy-menu nav > button:hover { color: var(--color-text); }
/* Sheet rows with a leading square icon (main-site rows). */
.omarchy-menu__row { display: flex; align-items: center; gap: 10px; }
.omarchy-menu__row svg { width: 20px; height: 20px; }
.omarchy-menu__actions {
  margin-top: 8px; display: flex; flex-wrap: wrap; gap: 10px;
  border-top: 1px solid var(--color-border-subtle); padding: 16px 0 8px;
}
.omarchy-menu__actions .button { flex: 1; }
.omarchy-menu__actions svg { width: 20px; height: 20px; flex-shrink: 0; }
.button--outline { background: var(--color-surface); border-color: var(--color-border-strong); color: var(--color-text); }
.button--outline:hover { background: var(--color-surface-2); color: var(--color-text); }

/* The header mark draws itself on hover/focus (omarchy-site mark-draw). */
.mark-draw path { stroke-dasharray: 1; }
@keyframes mark-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes mark-draw-back { from { stroke-dashoffset: -1; } to { stroke-dashoffset: 0; } }
.mark-draw-trigger:is(:hover, :focus-visible) .mark-draw path {
  animation: mark-draw 650ms cubic-bezier(0.45, 0, 0.25, 1) both;
}
.mark-draw-trigger:is(:hover, :focus-visible) .mark-draw path:nth-of-type(2) {
  animation-duration: 110ms; animation-delay: 250ms; animation-timing-function: ease-out;
}
.mark-draw-trigger:is(:hover, :focus-visible) .mark-draw path:nth-of-type(3) {
  animation-duration: 470ms; animation-delay: 360ms;
}
.mark-draw-trigger:is(:hover, :focus-visible) .mark-draw path:nth-of-type(4) {
  animation-name: mark-draw-back; animation-duration: 70ms; animation-delay: 540ms;
}
.mark-draw-trigger:is(:hover, :focus-visible) .mark-draw path:nth-of-type(5) {
  animation-name: mark-draw-back; animation-duration: 70ms; animation-delay: 600ms;
}
@media (prefers-reduced-motion: reduce) {
  .mark-draw path { animation: none !important; }
}

/* ---------- Theme picker (omarchy-site ThemePicker deck) ---------- */

.omarchy-theme-overlay {
  position: fixed; inset: 0; z-index: 300; isolation: isolate;
  background: rgb(0 0 0 / 0.55); backdrop-filter: blur(2px);
}
.omarchy-theme-dialog {
  position: fixed; inset: 0; z-index: 300;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  outline: none; touch-action: none; view-transition-name: theme-picker;
}
.omarchy-theme-dismiss { position: absolute; inset: 0; }
.omarchy-theme-deck { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; pointer-events: none; }
.omarchy-theme-card { position: absolute; width: min(68vw, 46rem); }
@media (min-width: 640px) {
  .omarchy-theme-card { width: min(72vw, 46rem); }
}
.omarchy-theme-card__button { --card-dim: 0.55; pointer-events: auto; display: block; width: 100%; cursor: pointer; background: none; border: 0; padding: 0; }
.omarchy-theme-card__button:hover { --card-dim: 0.78; }
.omarchy-theme-card__frame { box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.55); background: var(--color-brand); }
.omarchy-theme-card__frame--back { background: #71717a; }
.omarchy-theme-card__inner { background: #000; }
.omarchy-theme-card__img { width: 100%; height: auto; aspect-ratio: 1800 / 1012; object-fit: cover; user-select: none; }
.omarchy-theme-spacer { visibility: hidden; width: min(68vw, 46rem); aspect-ratio: 1800 / 1012; }
@media (max-width: 639.98px) {
  .omarchy-theme-card__img, .omarchy-theme-spacer { aspect-ratio: 4 / 5; }
}
@media (min-width: 640px) {
  .omarchy-theme-spacer { width: min(72vw, 46rem); }
}
.omarchy-theme-name {
  position: relative; margin-top: 6px; padding: 14px 16px; cursor: pointer;
  background: none; border: 0;
  font-family: var(--font-sans); font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.025em;
  color: var(--t-text); -webkit-text-stroke: 2px var(--t-bg); paint-order: stroke fill;
  transition: filter var(--transition);
}
.omarchy-theme-name:hover { filter: brightness(1.25); }
.omarchy-theme-name--light { color: var(--t-bg); -webkit-text-stroke: 2px var(--t-text); }
.omarchy-theme-arrow {
  position: absolute; top: 50%; translate: 0 -50%;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; cursor: pointer;
  border: 1px solid var(--color-border-subtle); background: var(--color-bg); color: var(--color-text);
  transition: background-color var(--transition);
}
.omarchy-theme-arrow:hover { background: var(--color-surface-2); }
.omarchy-theme-arrow--prev { left: 12px; }
.omarchy-theme-arrow--next { right: 12px; }
@media (min-width: 640px) {
  .omarchy-theme-arrow--prev { left: 24px; }
  .omarchy-theme-arrow--next { right: 24px; }
}
.omarchy-theme-arrow svg { width: 20px; height: 20px; }
/* First-run hint (omarchy-site picker notice) */
.omarchy-hint {
  position: fixed; top: 104px; right: 16px; z-index: 200; width: 288px;
  animation: notice-in 300ms ease-out both;
}
@media (min-width: 640px) {
  .omarchy-hint { top: 68px; }
}
html[data-nav-menu="open"] .omarchy-hint { display: none; }
@media (prefers-reduced-motion: reduce) {
  .omarchy-hint { animation: none; }
}
@keyframes notice-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.omarchy-hint__card { position: relative; background: var(--color-surface); box-shadow: var(--t-elevation); }
.omarchy-hint__open {
  display: flex; align-items: flex-start; gap: 12px; width: 100%;
  padding: 16px 40px 16px 16px; text-align: left; cursor: pointer;
  background: none; border: 0; color: var(--color-text); font-family: var(--font-mono);
  transition: background-color var(--transition);
}
.omarchy-hint__open:hover { background: var(--color-surface-2); }
.omarchy-hint__open svg { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; color: var(--color-brand); }
.omarchy-hint__title { display: block; font-family: var(--font-sans); font-size: 14px; font-weight: 500; }
.omarchy-hint__body { display: block; margin-top: 4px; font-size: 13px; line-height: 1.55; color: var(--color-text-secondary); }
.omarchy-hint__dismiss {
  position: absolute; top: 8px; right: 8px;
  display: flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  background: none; border: 0; cursor: pointer; color: var(--color-text-muted);
  transition: color var(--transition);
}
.omarchy-hint__dismiss:hover { color: var(--color-text); }
.omarchy-hint__dismiss svg { width: 16px; height: 16px; }

/* ---------- Flash + notice banners ---------- */

.flashes { border-bottom: 1px solid var(--color-border-subtle); }
.flash { padding: 12px var(--bleed-pad); font-size: 13px; }
.flash--notice { background: var(--color-surface-2); }
.flash--alert { background: var(--danger-soft); color: var(--color-destructive); }
.notice-banner { padding: 14px var(--bleed-pad); font-size: 13px; border-bottom: 1px solid var(--color-border-subtle); }
.notice-banner--danger { background: var(--danger-soft); color: var(--color-destructive); }
.notice-banner--warning { background: var(--warning-soft); color: var(--color-warning); }

/* ---------- Hero (PageHeading idiom: wordmark + brand subtitle) ---------- */

.hero { padding: 32px 0 40px; }
.hero__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero__wordmark { width: min(59.5%, 26.775rem); margin-bottom: 12px; color: var(--t-field-lit); }
.hero .page-subtitle {
  font-family: var(--font-mono);
  font-size: 12px; line-height: 20px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--color-brand);
}
@media (min-width: 640px) {
  .hero .page-subtitle { font-size: 14px; }
}
.hero__lede { margin-top: 16px; max-width: 42rem; color: var(--color-text-secondary); font-size: 15px; line-height: 1.65; text-wrap: pretty; }
.hero__install {
  margin-top: 28px; display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-width: 0;
  background: var(--color-bg-deep); box-shadow: var(--t-elevation); padding: 6px 6px 6px 16px;
}
.hero__install code {
  min-width: 0; flex: 1; padding: 6px 0; background: none;
  font-size: 14px; white-space: nowrap; text-align: left;
}
.hero__install .copy-button { width: 32px; height: 32px; border: 0; margin-left: 0; }
.hero__install .copy-button svg { width: 20px; height: 20px; }
@media (max-width: 639.98px) {
  .hero__install code { font-size: 11px; white-space: normal; overflow-wrap: anywhere; }
  .hero .hero__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; }
}
.hero__stats { display: flex; gap: 48px; margin-top: 32px; flex-wrap: wrap; justify-content: center; }
.hero__stat b { display: block; font-family: var(--font-sans); font-size: 30px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.hero__stat span { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); }

/* ---------- Directory ---------- */

/* padding-block, NOT the shorthand — these classes share an element with
   .container and the shorthand would wipe its inline gutter */
.directory { padding-block: 40px 80px; }
.directory__bar { display: flex; gap: 16px; align-items: center; margin-bottom: 28px; flex-wrap: wrap; }
.directory__search { position: relative; flex: 1 1 280px; min-width: 0; }
.directory__search > svg {
  position: absolute; left: 12px; top: 50%; translate: 0 -50%;
  width: 20px; height: 20px; color: var(--color-text-muted); pointer-events: none;
}
.directory__bar input[type="search"] {
  width: 100%; min-width: 0; font-family: var(--font-mono); font-size: 16px;
  padding: 0 76px 0 40px; height: 40px;
  border: 1px solid var(--color-border-strong); background: var(--color-bg-deep);
  border-radius: 0; color: var(--color-text);
}
.directory__kbd {
  position: absolute; top: 50%; right: 10px; translate: 0 -50%;
  font-family: var(--font-mono); font-size: 11px; color: var(--color-text-muted);
  border: 1px solid var(--color-border-subtle); padding: 2px 5px; white-space: nowrap;
  pointer-events: none;
}
@media (max-width: 639.98px) {
  .directory__kbd { display: none; }
  .directory__bar input[type="search"] { padding-right: 12px; }
}
.directory__sort { display: flex; gap: 8px; flex-wrap: wrap; }
.directory__count { font-size: 13px; margin: -12px 0 20px; }
.directory__sort a {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500;
  text-decoration: none; padding: 8px 12px; color: var(--color-text-secondary);
}
.directory__sort a:hover { color: var(--color-text); background: var(--color-surface-2); }
.directory__sort a.active { background: var(--color-primary); color: var(--color-primary-foreground); }

/* Filter chips: square, hairline, mono caps — the site's square idiom */
.directory__filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.03em;
  text-decoration: none; padding: 7px 12px; border-radius: 0;
  border: 1px solid var(--color-border-strong); color: var(--color-text-secondary);
  transition: border-color var(--transition), color var(--transition), background-color var(--transition);
}
.chip:hover { border-color: var(--color-brand); color: var(--color-brand); }
.chip--active { background: var(--color-primary); color: var(--color-primary-foreground); border-color: var(--color-primary); }
.chip--active:hover { background: color-mix(in oklch, var(--color-primary), white 14%); color: var(--color-primary-foreground); border-color: transparent; }
.chip__count { color: inherit; opacity: 0.6; }

.plugin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px 16px; row-gap: 28px; }
/* ---------- Recently-added band ----------
   Its own band between hero and directory: what's inside it is a showcase,
   NOT part of the searchable/filterable results below. */
.recent-band { background: var(--color-surface); border-block: 1px solid var(--color-border-subtle); padding-block: 22px 26px; }
.recent-band__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.recent-band__more {
  font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; color: var(--color-text-muted);
}
.recent-band__more:hover { color: var(--color-brand); }
/* One row, always — narrow viewports scroll sideways instead of wrapping */
.recent-band__row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(min(260px, 80vw), 1fr);
  gap: 16px; overflow-x: auto; padding-bottom: 4px;
}
.recent-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--color-bg); border: 1px solid var(--color-border-subtle);
  padding: 14px 16px; text-decoration: none; font-size: 13px;
  transition: background-color var(--transition);
}
.recent-card:hover { background: var(--color-surface-2); color: inherit; }
.recent-card__name { font-family: var(--font-sans); font-size: 16px; font-weight: 600; }
.recent-card__summary {
  color: var(--color-text-secondary); overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 1; -webkit-box-orient: vertical;
}
.recent-card__meta { font-size: 12px; color: var(--color-text-muted); }
.directory__pager { justify-content: center; align-items: center; margin-top: 32px; }

/* Directory + publisher cards (omarchy-site PluginCard, 1-1) */
.plugin-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--color-surface); box-shadow: var(--t-elevation); border-radius: 0;
  text-decoration: none;
  transition-property: box-shadow, background-color; transition-duration: 150ms; transition-timing-function: ease-out;
}
.plugin-card:hover { box-shadow: var(--t-elevation-hover); color: inherit; }
.plugin-card__preview {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; height: auto;
  outline: 1px solid var(--t-img-outline); outline-offset: -1px;
  background: var(--color-bg-deep);
}
/* No screenshot yet: a quiet monogram keeps the grid uniform without faking
   variety — one accent, per the design system */
.plugin-card__preview--fallback {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 16 / 9; background: var(--color-bg-deep);
  font-family: var(--font-mono); font-size: 30px; font-weight: 600; color: var(--color-text-muted);
}
.plugin-card__body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 16px; }
.plugin-card__head { display: flex; align-items: center; gap: 6px; }
.plugin-card h3 { font-size: 14px; font-weight: 500; font-family: var(--font-sans); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plugin-card p {
  font-size: 13px; line-height: 1.55; color: var(--color-text-secondary); text-wrap: pretty;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.plugin-card__meta {
  margin-top: auto; padding-top: 6px;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 12px; color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.plugin-card__meta svg { width: 12px; height: 12px; }
.plugin-card__stat { display: inline-flex; align-items: center; gap: 4px; }
.plugin-card__verified { width: 16px; height: 16px; flex-shrink: 0; color: var(--color-brand); }

/* ---------- Showcase sections (omarchy.org homepage idiom) ----------
   SectionHeading: 24-28px semibold tracking-tight title, 15px secondary
   description, underline action link; same rail geometry as the directory. */
.showcase { border-top: 1px solid var(--color-border-subtle); padding-block: 48px; }
.showcase__head { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 16px; }
.showcase__title { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
@media (min-width: 640px) {
  .showcase__title { font-size: 28px; }
}
.showcase__desc { margin-top: 8px; max-width: 36rem; font-size: 15px; line-height: 1.6; color: var(--color-text-secondary); text-wrap: pretty; }
.showcase__action {
  display: none; flex-shrink: 0; align-items: center; gap: 8px; min-height: 40px; padding-block: 8px;
  font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--color-text);
  text-decoration: underline; text-underline-offset: 4px;
  transition: color var(--transition);
}
.showcase__action:hover { color: var(--color-brand); }
@media (min-width: 640px) {
  .showcase__action { display: inline-flex; }
}
.showcase__grid { margin-top: 24px; }
@media (min-width: 1024px) {
  .showcase__grid { margin-top: 40px; }
}
.showcase__actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 640px) {
  .showcase__actions { display: none; }
}

/* ---------- Plugin install strip (above the readme, no scroll needed) --- */
.install-strip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--color-bg-deep); border: 1px solid var(--color-border-subtle);
  padding: 12px 12px 12px 16px; margin-bottom: 28px; font-size: 13px;
}
.install-strip__text { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; }
.install-strip .prompt { color: var(--color-brand); }
@media (max-width: 639.98px) {
  .install-strip__text { font-size: 11px; white-space: normal; overflow-wrap: anywhere; }
}

/* ---------- Plugin page ---------- */

.page-head { padding: 48px 0 32px; border-bottom: 1px solid var(--color-border-subtle); }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); margin: 8px 0 10px; overflow-wrap: anywhere; }
.page-head__chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.page-head__row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; }

.plugin-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 64px; padding-block: 40px 80px; }
/* Readme + community stay readable when the container stretches */
.plugin-layout article { max-width: 75ch; min-width: 0; }
@media (max-width: 900px) {
  .plugin-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  /* A wide readme table scrolls inside itself instead of stretching the column */
  .readme table { display: block; overflow-x: auto; }
}

/* ---------- Plugin preview + lightbox ---------- */

.plugin-preview {
  display: block; width: 100%; padding: 0; margin-bottom: 28px;
  border: 0; background: var(--color-surface); box-shadow: var(--t-elevation);
  cursor: zoom-in;
}
.plugin-preview img { width: 100%; height: auto; outline: 1px solid var(--t-img-outline); outline-offset: -1px; }
.plugin-preview--static { cursor: default; max-width: 640px; max-height: 480px; overflow-y: auto; }

.lightbox {
  border: 0; padding: 0; box-shadow: var(--t-elevation);
  background: var(--color-surface); max-width: min(92vw, 1400px); max-height: 88vh;
  /* The global margin-0 reset kills the <dialog> UA centering — restore it */
  margin: auto; position: fixed; inset: 0; color: var(--color-text);
}
.lightbox::backdrop { background: rgb(0 0 0 / 0.55); backdrop-filter: blur(2px); }
.lightbox img { max-width: 100%; max-height: calc(88vh - 2px); object-fit: contain; }
.lightbox__close {
  position: absolute; top: 8px; right: 8px; z-index: 1;
  width: 36px; height: 36px; line-height: 1; font-size: 22px; font-family: var(--font-mono);
  background: var(--color-bg-deep); color: var(--color-text); border: 1px solid var(--color-border-subtle);
  cursor: pointer;
}
.lightbox__close:hover { background: var(--color-surface-2); }

/* ---------- Readme (omarchy-site .prose, 1-1) ---------- */

.readme, .prose { font-size: 15px; line-height: 1.65; color: var(--color-text-secondary); }
.prose { max-width: 720px; }
.readme h1, .readme h2, .readme h3, .prose h2, .prose h3 {
  color: var(--color-text); font-weight: 600; letter-spacing: -0.01em; margin: 2em 0 0.6em;
}
.readme h1:first-child, .readme h2:first-child { margin-top: 0; }
.prose h2 { font-size: 20px; }
.prose h3, .readme h3 { font-size: 17px; }
.readme p, .readme ul, .readme ol, .readme pre, .readme table, .prose p, .prose ul, .prose ol { margin-bottom: 1em; }
.readme ul, .prose ul { padding-left: 1.4em; list-style: square; }
.readme ol, .prose ol { padding-left: 1.6em; list-style: decimal; }
.readme li, .prose li { margin-bottom: 0.35em; }
.readme li::marker, .prose li::marker { color: var(--color-text-muted); }
.readme img, .readme video { max-width: 100%; height: auto; margin: 1.25em 0; }
.readme blockquote, .prose blockquote {
  border-left: 2px solid var(--color-brand); margin: 1.25em 0;
  padding: 0.25em 0 0.25em 1.25em; color: var(--color-text-muted);
}
.readme hr, .prose hr { border: 0; border-top: 1px solid var(--color-border-subtle); margin: 2em 0; }
.readme table, .prose table { border-collapse: collapse; width: 100%; font-size: 13px; }
.readme th, .readme td, .prose th, .prose td { border: 1px solid var(--color-border-subtle); padding: 8px 10px; text-align: left; }
.prose th { color: var(--color-text); font-family: var(--font-sans); font-weight: 600; background: var(--color-surface); }
.prose h2 { margin: 1.6em 0 0.5em; }
.prose .statement { line-height: 2.2; font-size: 17px; margin: 1.5em 0; }
.term {
  text-decoration: none; padding-bottom: 0.15em;
  border-bottom: 1px dotted var(--color-brand);
}

/* ---------- Sidebar ---------- */

.sidebar { display: flex; flex-direction: column; gap: 16px; font-size: 13px; }
.sidebar section { background: var(--color-surface); border: 1px solid var(--color-border-subtle); padding: 14px 16px; }
.sidebar h4 { text-transform: uppercase; font-size: 12px; letter-spacing: 0.08em; margin-bottom: 10px; }
/* Legacy sidebar install block — kept for cached HTML only; the command now
   lives in .install-strip above the readme. */
.install-cmd {
  background: var(--color-bg-deep); color: var(--color-text);
  border: 1px solid var(--color-border-subtle);
  padding: 10px 10px 10px 14px; font-size: 13px;
  display: flex; align-items: center; gap: 10px; max-width: 560px;
}
.install-cmd__text { flex: 1; overflow-x: auto; white-space: nowrap; }
.install-cmd .prompt { color: var(--color-brand); }
.sidebar dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.sidebar dt { color: var(--color-text-muted); }
.sidebar dd { text-align: right; overflow-wrap: anywhere; }
.sidebar .source-link { display: inline-flex; align-items: center; gap: 6px; vertical-align: bottom; }
.sidebar .source-link svg { width: 14px; height: 14px; flex-shrink: 0; }

.capability-rows { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.capability-rows__label { display: block; color: var(--color-text-muted); margin-bottom: 2px; }
.capability-rows__items { list-style: none; }
.capability-rows__items li { overflow-wrap: anywhere; padding: 1px 0; }
.capability-rows__more summary { cursor: pointer; color: var(--color-text-muted); font-size: 12px; padding: 2px 0; }
.capability-rows__more summary:hover { color: var(--color-brand); }
.capabilities__note { margin-top: 12px; font-size: 12px; }

.version-list { list-style: none; }
.version-list .v { text-decoration: none; font-weight: 700; }
a.v:hover { color: var(--color-brand); }
.version-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--color-border-subtle); }

/* ---------- Community ---------- */

.community { margin-top: 48px; border-top: 1px solid var(--color-border-subtle); padding-top: 20px; }
.community h3 { margin-bottom: 18px; }
.rate-widget { display: flex; align-items: center; gap: 6px; margin-bottom: 24px; }
.rate-widget .eyebrow { margin-right: 8px; }
.rate-diamond { background: none; border: 0; cursor: pointer; font-size: 20px; color: var(--color-border-strong); transition: color var(--transition); padding: 2px; }
.rate-diamond.active, .rate-diamond:hover { color: var(--color-brand); }
.comment { border-bottom: 1px solid var(--color-border-subtle); padding: 14px 0; font-size: 14px; }
.comment__head { display: flex; align-items: center; gap: 4px 10px; margin-bottom: 6px; font-size: 13px; flex-wrap: wrap; }
.comment__actions { margin-left: auto; display: flex; gap: 10px; }
.linklike { background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--font-mono); font-size: 12px; color: var(--color-text-muted); text-decoration: underline; }
.linklike:hover { color: var(--color-brand); }
.code-chip { font-family: var(--font-mono); background: var(--color-surface-2); padding: 2px 8px; }
.u-gap-top { margin-top: 24px; }
.u-gap-top-sm { margin-top: 14px; }
.u-gap-bottom-sm { margin-bottom: 10px; }
.u-gap-bottom-lg { margin-bottom: 24px; }
.u-max-field { max-width: 260px; }
.u-full-width { width: 100%; }
.u-gap-bottom { margin-bottom: 18px; }
.u-max-narrow { max-width: 640px; }
.u-max-mid { max-width: 560px; }

/* ---------- Forms ---------- */

.form-page { max-width: 460px; margin: 64px auto 96px; padding-inline: 24px; }
.form-page h1 { font-size: 32px; margin-bottom: 8px; }
.form-page > p { color: var(--color-text-secondary); margin-bottom: 28px; font-size: 14px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.field input[type="text"], .field input[type="email"] {
  width: 100%; font-family: var(--font-mono); font-size: 15px; padding: 12px 16px;
  border: 1px solid var(--color-border-strong); background: var(--color-surface);
  border-radius: 0; outline: none; color: var(--color-text);
}
.field input[type="text"]:focus-visible, .field input[type="email"]:focus-visible {
  outline: 2px solid var(--t-brand); outline-offset: 2px;
}
.field .hint { font-size: 12px; color: var(--color-text-muted); margin-top: 6px; }
.field-errors { color: var(--color-destructive); font-size: 13px; margin-bottom: 18px; }
.code-input { letter-spacing: 0.5em; font-size: 24px !important; text-align: center; }

/* ---------- Dashboard / admin tables ---------- */

.content-page { padding-block: 48px 96px; }
.content-page h1 { margin-bottom: 8px; }
.content-page .lede { color: var(--color-text-secondary); margin-bottom: 40px; max-width: 62ch; }
.content-page section { margin-bottom: 48px; }
.content-page section > h2 { border-top: 1px solid var(--color-border-subtle); padding-top: 14px; margin-bottom: 18px; font-size: 22px; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--color-text-muted); padding: 8px 10px; border-bottom: 1px solid var(--color-border-strong);
}
.table td { padding: 10px; border-bottom: 1px solid var(--color-border-subtle); vertical-align: middle; }
.table .actions { display: flex; gap: 8px; justify-content: flex-end; }

.form-inline { display: flex; gap: 16px; align-items: end; flex-wrap: wrap; margin-top: 18px; }
.form-inline .field { margin: 0; }
.select, .field select, .field textarea {
  font-family: var(--font-mono); font-size: 14px; padding: 12px;
  border: 1px solid var(--color-border-strong); background: var(--color-surface);
  border-radius: 0; outline: none; color: var(--color-text);
}
.field textarea { width: 100%; }
.select:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--t-brand); outline-offset: 2px;
}

.token-reveal { background: var(--color-bg-deep); border: 1px solid var(--color-border-subtle); color: var(--color-text); padding: 16px 20px; margin-bottom: 24px; }
.token-reveal code { background: none; color: var(--color-brand); font-size: 15px; }
.token-reveal__row { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.token-reveal__row code { flex: 1; overflow-x: auto; }

.backup-codes { columns: 2; font-size: 15px; background: var(--color-surface-2); padding: 16px 24px; max-width: 340px; }
.backup-codes li { margin-left: 1em; }

.qr-box { background: #ffffff; border: 1px solid var(--color-border-subtle); display: inline-block; padding: 12px; margin: 16px 0; }
.qr-box svg { width: 180px; height: 180px; }

/* ---------- Audit log ---------- */

.audit-list { list-style: none; font-size: 13px; }
.audit-list li { display: flex; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--color-border-subtle); }
.audit-list time { color: var(--color-text-muted); white-space: nowrap; }
.audit-list .action { font-weight: 700; min-width: 130px; }
/* Metadata can hold shas and ids with no break points */
.audit-list li > span:not(.action) { min-width: 0; overflow-wrap: anywhere; }

/* ---------- Footer (omarchy-site SiteFooter, 1-1) ---------- */

.omarchy-footer {
  position: relative; isolation: isolate; overflow: hidden;
  border-top: 1px solid var(--color-border-subtle);
  background: var(--t-field-bg);
  padding-bottom: env(safe-area-inset-bottom);
}
.omarchy-footer__field { position: absolute; inset: 0; pointer-events: none; user-select: none; }
.omarchy-footer__field canvas { display: block; width: 100%; height: 100%; }
.omarchy-footer__inner {
  position: relative; margin-inline: auto; max-width: var(--container);
  padding: 56px var(--gutter);
}
.omarchy-footer__top { display: flex; flex-direction: column; gap: 40px; }
@media (min-width: 1024px) {
  .omarchy-footer__top { flex-direction: row; justify-content: space-between; }
}
.omarchy-footer__brand { display: flex; flex-direction: column; width: 100%; flex-shrink: 0; }
@media (min-width: 640px) {
  .omarchy-footer__brand { width: max-content; }
}
@media (min-width: 1024px) {
  .omarchy-footer__brand { width: 24rem; }
}
/* Flat currentColor over the field — the field behind it carries the color.
   (The pre-redesign footer wore the gradient-banded wordmark here; the live
   site's footer mark is flat brand ink.) */
.omarchy-footer__wordmark {
  height: 24px; width: calc(24px * 4131 / 950); aspect-ratio: 4131 / 950;
  color: var(--color-brand);
  background-color: currentColor;
  mask-image: url("/brand/omarchy-wordmark.svg"); mask-repeat: no-repeat; mask-size: 100% 100%;
  -webkit-mask-image: url("/brand/omarchy-wordmark.svg"); -webkit-mask-repeat: no-repeat; -webkit-mask-size: 100% 100%;
  transition: color var(--transition);
}
a:hover > .omarchy-footer__wordmark, a:focus-visible > .omarchy-footer__wordmark { color: var(--t-field-hover); }
.omarchy-footer__tagline { margin-top: 16px; font-size: 14px; line-height: 1.625; color: var(--color-text-muted); text-wrap: pretty; }
.omarchy-footer__tagline-line { display: block; }
.omarchy-footer__nowrap { white-space: nowrap; }
.omarchy-footer__credits { margin-top: 16px; display: flex; flex-direction: column; font-size: 14px; line-height: 1.625; color: var(--color-text-muted); text-wrap: pretty; }
/* Keep the credit links inline to preserve the paragraph baseline. */
.omarchy-footer__credits svg { display: inline-block; flex-shrink: 0; }
.omarchy-footer__credits-37s { margin-right: 3px; width: 16px; height: 16px; vertical-align: -0.28em; }
.omarchy-footer__credits-do { margin-right: 5px; width: 16px; height: 16px; vertical-align: -0.2em; }
.omarchy-footer__credits-cf { margin-right: 5px; height: 12px; width: auto; vertical-align: -0.15em; }
.omarchy-footer__cols {
  display: grid; min-width: 0; flex: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 24px;
}
@media (min-width: 640px) {
  .omarchy-footer__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .omarchy-footer__cols { column-gap: 40px; }
}
.omarchy-footer__cols h2 {
  font-family: var(--font-sans); font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--color-text-muted); font-weight: 400; line-height: 16px;
}
.omarchy-footer__cols ul { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; list-style: none; }
.omarchy-footer__cols { font-size: 14px; line-height: 24px; }
.omarchy-footer__bottom {
  margin-top: 48px; display: flex; flex-direction: column; gap: 8px;
  border-top: 1px solid var(--color-border-subtle); padding-top: 24px;
  font-size: 13px; color: var(--color-text-muted);
}
@media (min-width: 640px) {
  .omarchy-footer__bottom { flex-direction: row; align-items: center; justify-content: space-between; }
}
/* Shared footer link treatment (tagline, credits, columns, languages). */
.omarchy-footer__link {
  color: var(--color-text-secondary); text-decoration: underline; text-decoration-color: transparent;
  text-underline-offset: 4px; transition: color var(--transition), text-decoration-color var(--transition);
}
.omarchy-footer__link:hover { color: var(--color-brand); text-decoration-color: currentColor; }
.omarchy-footer__lang {
  margin-top: 48px; display: flex; flex-wrap: wrap; column-gap: 16px; row-gap: 8px;
  font-size: 14px; line-height: 20px;
}

/* Review evidence uses the same rules, type and status colors as the site. */
.review-checks__timestamp { margin-bottom: 24px; font-size: 13px; overflow-wrap: anywhere; }
.review-checks__group { border-block-start: 1px solid var(--color-border-subtle); padding-block: 20px; }
.review-checks__group > summary { cursor: pointer; font-family: var(--font-sans); font-size: 20px; font-weight: 500; }
.review-checks__group > summary .muted { margin-left: 12px; font-family: var(--font-mono); font-size: 13px; font-weight: 400; }
.review-checks__heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.review-checks__heading h3 { margin: 0; font-size: 20px; }
.review-checks__model, .review-checks__coverage, .review-checks__reason { margin-top: 12px; font-size: 13px; overflow-wrap: anywhere; }
.review-checks__list { list-style: none; margin-top: 16px; padding: 0; }
.review-checks__list li { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--color-border-subtle); }
.review-checks__list li > div { min-width: 0; overflow-wrap: anywhere; }
.review-checks__list strong { font-size: 14px; font-weight: 500; }
.review-checks__list p { margin-top: 4px; font-size: 13px; }
.review-checks__list .badge { flex-shrink: 0; font-size: 10px; padding: 4px 8px; }
@media (max-width: 639.98px) {
  .review-checks__group > summary .muted { display: block; margin: 6px 0 0; }
}

/* ---------- Small screens ---------- */

@media (max-width: 700px) {
  .hero { padding: 32px 0; }
  .hero__stats { gap: 24px 40px; margin-top: 28px; }
  .hero__stat b { font-size: 26px; }
  .hero__install { margin-top: 24px; }

  .page-head { padding: 32px 0 24px; }
  .directory { padding-block: 32px 56px; }
  .directory__bar { margin-bottom: 24px; }
  .plugin-layout { padding-block: 28px 56px; }
  .content-page { padding-block: 32px 64px; }
  .content-page .lede { margin-bottom: 28px; }
  .form-page { margin: 40px auto 64px; }

  /* Wide tables scroll inside themselves instead of stretching the page */
  .table { display: block; overflow-x: auto; }

  .audit-list li { flex-wrap: wrap; gap: 4px 16px; }
  .audit-list .action { min-width: 0; }
}

/* Touch targets: the small icon buttons get room */
@media (pointer: coarse) {
  .omarchy-iconbtn { min-height: 32px; min-width: 32px; }
  .linklike { padding: 6px 2px; }
}
