/* Paper theme decorators */
@layer decorators {

/* Minimal card — warm border, rounded, no shadow */
.paper-card {
  background: var(--d-surface);
  border: 1px solid var(--d-border);
  border-radius: 6px;
}

/* Entrance fade — opacity only, 180ms */
.paper-fade {
  animation: paper-fade-in 180ms ease both;
}

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

/* Warm input — gray border, teal focus ring */
.paper-input {
  border: 1px solid var(--d-border);
  border-radius: var(--d-radius);
  background: var(--d-surface);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.paper-input:focus {
  border-color: var(--d-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--d-primary) 15%, transparent);
}

/* Reading-optimized prose */
.paper-prose {
  font-size: 1rem;
  line-height: 1.75;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  max-width: 680px;
  color: var(--d-text);
}

.paper-prose h1 { font-size: 2rem; font-weight: 600; margin-top: 2.5rem; margin-bottom: 1rem; }
.paper-prose h2 { font-size: 1.5rem; font-weight: 600; margin-top: 2rem; margin-bottom: 0.75rem; border-bottom: 1px solid var(--d-border); padding-bottom: 0.5rem; }
.paper-prose h3 { font-size: 1.25rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.paper-prose p { margin-bottom: 1rem; }
.paper-prose ul, .paper-prose ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.paper-prose li { margin-bottom: 0.25rem; }
.paper-prose code {
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', monospace;
  font-size: 0.875em;
  background: var(--d-surface-raised);
  padding: 0.125rem 0.375rem;
  border-radius: var(--d-radius-sm);
  border: 1px solid var(--d-border);
}
.paper-prose pre {
  background: var(--d-surface-raised);
  border: 1px solid var(--d-border);
  border-radius: var(--d-radius);
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  line-height: 1.6;
}
.paper-prose pre code {
  background: none;
  padding: 0;
  border: none;
  font-size: inherit;
}
.paper-prose blockquote {
  border-left: 3px solid var(--d-primary);
  padding-left: 1rem;
  margin-bottom: 1rem;
  color: var(--d-text-muted);
  font-style: italic;
}

/* Warm cream canvas */
.paper-canvas {
  background: var(--d-bg);
}

/* Hairline separator */
.paper-divider {
  border: none;
  border-top: 1px solid var(--d-border);
  margin: 1rem 0;
}

/* Clean panel surface for sidebars */
.paper-surface {
  background: var(--d-surface);
}

/* Search highlight */
.paper-highlight {
  background: color-mix(in srgb, var(--d-accent) 20%, transparent);
  padding: 0.0625rem 0.125rem;
  border-radius: 2px;
}

/* Method badges for API */
.paper-method-get { background: color-mix(in srgb, var(--d-success) 15%, transparent); color: #16a34a; }
.paper-method-post { background: color-mix(in srgb, var(--d-info) 15%, transparent); color: #2563eb; }
.paper-method-put { background: color-mix(in srgb, var(--d-warning) 15%, transparent); color: #ca8a04; }
.paper-method-delete { background: color-mix(in srgb, var(--d-error) 15%, transparent); color: #dc2626; }
.paper-method-patch { background: color-mix(in srgb, #8b5cf6 15%, transparent); color: #7c3aed; }

/* Celebratory changelog entry */
.paper-celebration {
  position: relative;
  border-left: 3px solid var(--d-accent);
  padding-left: 1.5rem;
}

.paper-celebration::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 0.5rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--d-accent);
  border: 2px solid var(--d-bg);
}

} /* end @layer decorators */

@media (prefers-reduced-motion: reduce) {
  .paper-fade {
    animation: none !important;
  }
}
