/* PrintKey Knowledge Center — extends landing-page/styles.css */

.kc-body {
  background: var(--bg-surface);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -5%, rgba(201, 154, 60, 0.06), transparent);
}

/* Header */
.kc-header .nav-cta {
  flex-wrap: wrap;
}

.kc-header .nav-link--active {
  color: var(--text-primary);
  font-weight: 600;
}

/* Layout shell */
.kc-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.kc-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}

.kc-layout--article {
  grid-template-columns: 220px minmax(0, 1fr) 200px;
  gap: 40px;
}

@media (max-width: 1024px) {
  .kc-layout,
  .kc-layout--article {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .kc-sidebar,
  .kc-toc {
    position: static;
  }
}

/* Breadcrumbs */
.kc-breadcrumbs {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.kc-breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kc-breadcrumbs li + li::before {
  content: "›";
  color: var(--text-muted);
  font-size: 0.875rem;
}

.kc-breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
}

.kc-breadcrumbs a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.kc-breadcrumbs [aria-current="page"] {
  color: var(--text-primary);
  font-weight: 500;
}

/* Hero / intro */
.kc-hero {
  padding: 48px 0 40px;
  max-width: 720px;
}

.kc-hero--compact {
  padding: 32px 0 24px;
}

.kc-eyebrow {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-hover);
}

.kc-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-primary);
}

.kc-lead {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* Search */
.kc-search {
  margin-top: 32px;
  max-width: 560px;
}

.kc-search-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.kc-search-form {
  display: flex;
  gap: 10px;
}

.kc-search-input {
  flex: 1;
  padding: 12px 16px;
  font-family: var(--font);
  font-size: 0.9375rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kc-search-input:focus {
  outline: none;
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.kc-search-input::placeholder {
  color: var(--text-muted);
}

.kc-search-note {
  margin: 10px 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.kc-search-message {
  margin-top: 12px;
  padding: 12px 14px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: var(--accent-muted);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
}

.kc-search-message.hidden {
  display: none;
}

/* Sidebar navigation */
.kc-sidebar {
  position: sticky;
  top: 88px;
  padding-top: 8px;
}

.kc-sidebar-title {
  margin: 0 0 12px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.kc-nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.kc-nav-list a {
  display: block;
  padding: 8px 12px;
  margin: 0 -12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.kc-nav-list a:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  text-decoration: none;
}

.kc-nav-list a.is-active {
  background: var(--accent-muted);
  color: var(--text-primary);
  font-weight: 600;
}

/* Category cards grid */
.kc-section {
  margin-top: 48px;
}

.kc-section:first-of-type {
  margin-top: 0;
}

.kc-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.kc-section-header h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.kc-section-header a {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

.kc-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.kc-category-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kc-category-card:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.kc-category-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.kc-category-card p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary);
  flex: 1;
}

.kc-category-card .kc-card-meta {
  margin-top: 16px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Guide lists */
.kc-guide-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.kc-guide-list li {
  border-bottom: 1px solid var(--border);
}

.kc-guide-list li:last-child {
  border-bottom: none;
}

.kc-guide-list a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.kc-guide-list a:hover {
  background: var(--bg-elevated);
  text-decoration: none;
}

.kc-guide-list .kc-guide-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.kc-guide-list .kc-guide-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.kc-guide-list .kc-guide-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.kc-placeholder-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border-radius: 4px;
}

/* Category page empty state */
.kc-empty {
  padding: 48px 32px;
  text-align: center;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

.kc-empty h2 {
  margin: 0 0 12px;
  font-size: 1.125rem;
  font-weight: 600;
}

.kc-empty p {
  margin: 0 auto;
  max-width: 420px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Article template */
.kc-article {
  min-width: 0;
}

.kc-article-header {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.kc-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 16px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.kc-article-content {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.kc-article-content h2 {
  margin: 40px 0 16px;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  scroll-margin-top: 96px;
}

.kc-article-content h3 {
  margin: 28px 0 12px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  scroll-margin-top: 96px;
}

.kc-article-content p {
  margin: 0 0 16px;
}

.kc-article-content ul,
.kc-article-content ol {
  margin: 0 0 16px;
  padding-left: 1.35rem;
}

.kc-article-content li {
  margin-bottom: 8px;
}

.kc-article-content a {
  color: var(--accent-hover);
}

.kc-intro {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-primary);
}

/* Table of contents */
.kc-toc {
  position: sticky;
  top: 88px;
}

.kc-toc-inner {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.kc-toc-title {
  margin: 0 0 12px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.kc-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.kc-toc-list a {
  display: block;
  padding: 6px 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-decoration: none;
  line-height: 1.4;
  border-left: 2px solid transparent;
  padding-left: 10px;
  margin-left: -10px;
}

.kc-toc-list a:hover {
  color: var(--accent-hover);
}

.kc-toc-list a.is-active {
  color: var(--text-primary);
  font-weight: 500;
  border-left-color: var(--accent);
}

.kc-toc-list .kc-toc-h3 {
  padding-left: 18px;
  font-size: 0.75rem;
}

/* Callouts */
.kc-tip,
.kc-summary {
  margin: 24px 0;
  padding: 20px 22px;
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}

.kc-tip {
  background: var(--accent-muted);
}

.kc-tip-title,
.kc-summary-title {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.kc-tip p,
.kc-summary p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.kc-summary {
  background: var(--bg-elevated);
  border-left-color: var(--text-muted);
}

/* Figure placeholder */
.kc-figure {
  margin: 28px 0;
}

.kc-figure-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}

.kc-figure figcaption {
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
}

/* Related guides */
.kc-related {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.kc-related h2 {
  margin: 0 0 20px;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.kc-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.kc-related-card {
  display: block;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

.kc-related-card:hover {
  border-color: var(--accent-border);
  text-decoration: none;
}

.kc-related-card .kc-related-cat {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.kc-related-card .kc-related-title {
  display: block;
  margin-top: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Subtle CTA */
.kc-cta {
  margin-top: 48px;
  padding: 28px 32px;
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
}

.kc-cta h2 {
  margin: 0 0 8px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
}

.kc-cta p {
  margin: 0 0 16px;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 52ch;
}

.kc-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.kc-cta .btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

/* Footer */
.kc-footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.kc-footer a {
  color: var(--text-secondary);
}

/* Template notice (author reference only) */
.kc-template-notice {
  margin-bottom: 24px;
  padding: 14px 18px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: #fff8e8;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
}
