/*
Theme Name:   DC Learn
Theme URI:    https://designcorner.co.ke
Author:       Dulcet Design Corner
Author URI:   https://designcorner.co.ke
Description:  Clean, documentation-style theme for the Design Corner knowledge base. Built to run with the DC Wiki plugin.
Version:      1.6.0
Requires at least: 6.0
Requires PHP: 7.4
License:      GPL-2.0-or-later
Text Domain:  dc-learn
*/

:root {
	--dcl-ink: #0a0a0a;
	--dcl-black: #000000;
	--dcl-text: #262626;
	--dcl-muted: #5c5c5c;
	--dcl-faint: #8a8a8a;
	--dcl-line: #e6e6e6;
	--dcl-soft: #f7f7f5;
	--dcl-white: #ffffff;
	--dcl-yellow: #fcd600;
	--dcl-wa: #25d366;
	--dcl-radius: 8px;
	--dcl-max: 1120px;
	--dcw-sticky-top: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0; background: var(--dcl-white); color: var(--dcl-text);
	font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}
body.dcl-menu-open { overflow: hidden; }
img, svg, video { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { color: var(--dcl-ink); line-height: 1.25; letter-spacing: -0.01em; }
:focus-visible { outline: 2px solid var(--dcl-ink); outline-offset: 2px; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.dcl-skip:focus { clip: auto; width: auto; height: auto; top: 8px; left: 8px; z-index: 1000; background: var(--dcl-yellow); padding: 6px 12px; border-radius: 6px; }

.dcl-container { width: 100%; max-width: var(--dcl-max); margin: 0 auto; padding: 0 20px; }

/* Top strip */
.dcl-strip { background: var(--dcl-black); color: #bdbdbd; font-size: .74rem; }
.dcl-strip .dcl-container { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 30px; }
.dcl-strip a { color: #fff; text-decoration: none; font-weight: 600; }
.dcl-strip a:hover { color: var(--dcl-yellow); }
@media (max-width: 520px) { .dcl-strip span { display: none; } .dcl-strip .dcl-container { justify-content: center; } }

/* Header */
.dcl-header { position: sticky; top: 0; z-index: 100; background: var(--dcl-white); border-bottom: 1px solid var(--dcl-line); }
.dcl-header-inner { display: flex; align-items: center; gap: 24px; min-height: 60px; }
.dcl-logo { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.dcl-brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.dcl-logo img { height: 36px; width: auto; display: block; }
.dcl-logo-fallback { display: none; }
.dcl-logo-failed img { display: none; }
.dcl-logo-failed .dcl-logo-fallback { display: inline-flex; align-items: center; }
.dcl-kb-label { font-size: .72rem; font-weight: 700; color: var(--dcl-ink); text-decoration: none; padding: 3px 8px; border-radius: 4px; background: var(--dcl-yellow); white-space: nowrap; }
.dcl-kb-label:hover { background: #ffdf2e; }
.dcl-brand-light .dcl-logo { background: #fff; padding: 6px 10px; border-radius: 6px; }
.dcl-brand-light .dcl-logo img { height: 30px; }
.dcl-brand-light .dcl-logo-text { color: var(--dcl-ink); }
.dcl-logo-text { font-weight: 800; font-size: 1rem; letter-spacing: -0.02em; gap: 8px; color: var(--dcl-ink); }
.dcl-logo-text small { font-weight: 600; font-size: .72rem; color: var(--dcl-muted); padding-left: 8px; margin-left: 2px; border-left: 1px solid var(--dcl-line); letter-spacing: 0; }
.dcl-dot { width: 10px; height: 10px; border-radius: 2px; background: var(--dcl-yellow); box-shadow: 0 0 0 2px var(--dcl-ink); }
.dcl-logo-light, .dcl-logo-light small { color: var(--dcl-white); }
.dcl-logo-light small { color: #a8a8a8; border-color: #333333; }
.dcl-logo-light .dcl-dot { box-shadow: 0 0 0 2px var(--dcl-white); }

.dcl-nav { margin-left: auto; }
.dcl-menu { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.dcl-menu a { display: block; padding: 6px 12px; border-radius: 6px; text-decoration: none; font-weight: 600; font-size: .84rem; color: var(--dcl-muted); }
.dcl-menu a:hover { color: var(--dcl-ink); background: var(--dcl-soft); }
.dcl-menu .current-menu-item > a, .dcl-menu .current_page_item > a { color: var(--dcl-ink); box-shadow: inset 0 -2px 0 var(--dcl-yellow); border-radius: 0; }
.dcl-actions { display: flex; align-items: center; gap: 8px; }

.dcl-btn { display: inline-flex; align-items: center; gap: 7px; background: var(--dcl-ink); color: #fff !important; padding: 8px 14px; border-radius: 6px; font-weight: 700; font-size: .82rem; text-decoration: none; border: 0; cursor: pointer; white-space: nowrap; }
.dcl-btn:hover { background: #000; }
.dcl-btn svg { width: 15px; height: 15px; }
.dcl-btn-sm { padding: 7px 12px; }
.dcl-btn-yellow { background: var(--dcl-yellow); color: var(--dcl-ink) !important; }
.dcl-btn-yellow:hover { background: #ffdf2e; }

.dcl-burger { display: none; width: 38px; height: 38px; border: 1px solid var(--dcl-line); border-radius: 6px; background: var(--dcl-white); cursor: pointer; padding: 0; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.dcl-burger span { display: block; width: 16px; height: 2px; background: var(--dcl-ink); transition: transform .2s, opacity .2s; }
.dcl-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.dcl-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.dcl-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 759px) {
	.dcl-header-inner { gap: 10px; min-height: 56px; }
	.dcl-burger { display: inline-flex; }
	.dcl-actions { margin-left: auto; }
	.dcl-btn-sm span { display: none; }
	.dcl-btn-sm { padding: 0; width: 38px; height: 38px; justify-content: center; }
	.dcl-logo-text small { display: none; }
	.dcl-nav { position: fixed; inset: var(--dcl-nav-top, 86px) 0 0 0; margin: 0; background: var(--dcl-white); padding: 12px 20px; transform: translateX(100%); transition: transform .25s ease; overflow-y: auto; border-top: 1px solid var(--dcl-line); }
	.dcl-nav.is-open { transform: none; }
	.dcl-menu { flex-direction: column; gap: 0; }
	.dcl-menu a { padding: 14px 4px; font-size: .95rem; border-bottom: 1px solid var(--dcl-line); border-radius: 0; color: var(--dcl-ink); }
	.dcl-menu .current-menu-item > a { box-shadow: inset 3px 0 0 var(--dcl-yellow); padding-left: 12px; }
}

/* Main */
.dcl-main { min-height: 60vh; }
.dcl-page-head { background: var(--dcl-soft); border-bottom: 1px solid var(--dcl-line); }
.dcl-page-head .dcl-container { padding-top: 36px; padding-bottom: 28px; }
.dcl-page-head h1 { font-size: 1.7rem; margin: 0 0 16px; }

/* Article typography (guides, pages) */
.entry-content { font-size: .95rem; }
.entry-content h2 { font-size: 1.15rem; margin: 34px 0 8px; scroll-margin-top: 90px; }
.entry-content h3 { font-size: 1rem; margin: 26px 0 6px; scroll-margin-top: 90px; }
.entry-content p { margin: 0 0 14px; }
.entry-content a:not(.dcw-term):not(.dcw-btn) { color: var(--dcl-ink); text-decoration: underline; text-decoration-color: var(--dcl-yellow); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.entry-content blockquote { margin: 20px 0; padding: 4px 16px; border-left: 3px solid var(--dcl-yellow); color: var(--dcl-muted); }
.entry-content ul, .entry-content ol { padding-left: 20px; margin: 0 0 14px; }
.entry-content li { margin-bottom: 4px; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .86rem; display: block; overflow-x: auto; margin: 0 0 18px; }
.entry-content th, .entry-content td { border: 1px solid var(--dcl-line); padding: 8px 10px; text-align: left; }
.entry-content th { background: var(--dcl-soft); font-weight: 700; color: var(--dcl-ink); }
.entry-content pre, .entry-content code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.entry-content code { font-size: .85em; background: var(--dcl-soft); border: 1px solid var(--dcl-line); border-radius: 4px; padding: 1px 5px; }
.entry-content pre { background: #0f172a; color: #e2e8f0; padding: 14px 16px; border-radius: var(--dcl-radius); overflow-x: auto; font-size: .82rem; }
.entry-content pre code { background: none; border: 0; padding: 0; color: inherit; }
.entry-content img { border-radius: 6px; }
.entry-content figcaption { font-size: .78rem; color: var(--dcl-faint); text-align: center; }
.dcl-cover { margin: 0 0 24px; }
.dcl-cover img { border-radius: var(--dcl-radius); display: block; width: 100%; }

.dcl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; padding: 28px 0; }
.dcl-card { display: block; padding: 16px 18px; border: 1px solid var(--dcl-line); border-radius: var(--dcl-radius); text-decoration: none; }
.dcl-card:hover { border-color: #cccccc; }
.dcl-card h2 { font-size: .95rem; margin: 6px 0 4px; }
.dcl-card p { color: var(--dcl-muted); margin: 0; font-size: .83rem; line-height: 1.55; }
.dcl-badge { font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--dcl-muted); }
.dcl-empty { color: var(--dcl-muted); padding: 40px 0; }

.nav-links { display: flex; gap: 4px; margin: 24px 0; flex-wrap: wrap; }
.page-numbers { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 10px; border: 1px solid var(--dcl-line); border-radius: 6px; text-decoration: none; font-weight: 600; font-size: .82rem; }
.page-numbers.current { background: var(--dcl-ink); color: #fff; border-color: var(--dcl-ink); }

/* Footer */
.dcl-footer { background: var(--dcl-black); color: #a8a8a8; border-top: 4px solid var(--dcl-yellow); margin-top: 56px; padding-top: 44px; font-size: .84rem; }
.dcl-footer a { color: #e5e5e5; text-decoration: none; }
.dcl-footer a:hover { color: var(--dcl-yellow); }
.dcl-footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
.dcl-footer-brand p { margin: 12px 0 16px; max-width: 300px; line-height: 1.6; }
.dcl-footer-title { color: #fff; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; margin: 4px 0 12px; }
.dcl-footer-links { list-style: none; margin: 0; padding: 0; }
.dcl-footer-links li { margin-bottom: 8px; }
.dcl-footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid #262626; margin-top: 40px; padding-top: 16px; padding-bottom: 24px; font-size: .76rem; }
@media (max-width: 899px) { .dcl-footer-grid { grid-template-columns: 1fr 1fr; } .dcl-footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .dcl-footer-grid { grid-template-columns: 1fr; } }

/* Floating WhatsApp */
.dcl-float { position: fixed; right: 16px; bottom: 16px; z-index: 90; width: 48px; height: 48px; border-radius: 50%; background: var(--dcl-wa); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.dcl-float svg { width: 24px; height: 24px; }
body.dcl-menu-open .dcl-float { display: none; }

@media (max-width: 600px) { body { font-size: 14.5px; } .dcl-page-head h1 { font-size: 1.45rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
@media print { .dcl-strip, .dcl-header, .dcl-footer, .dcl-float, .dcw-cta, .dcw-az, .dcw-search, .dcw-doc-side { display: none !important; } .dcw-doc { display: block !important; } }
@media (max-width: 420px) { .dcl-kb-label { display: none; } .dcl-logo img { height: 32px; } }

/* Header search */
.dcl-search-toggle { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--dcl-line); border-radius: 6px; background: var(--dcl-white); color: var(--dcl-ink); cursor: pointer; padding: 0; }
.dcl-search-toggle:hover, .dcl-search-toggle[aria-expanded="true"] { border-color: var(--dcl-ink); background: var(--dcl-yellow); }
.dcl-search-panel { border-top: 1px solid var(--dcl-line); background: var(--dcl-white); padding: 14px 0; box-shadow: 0 10px 24px rgba(0, 0, 0, .06); }
.dcl-search-panel .dcw-search { max-width: 720px; margin: 0 auto; }

/* Refinement: sharper, lighter type */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
.dcl-menu a { font-weight: 500; }
.dcl-btn, .dcl-btn-sm { font-weight: 600; }
.dcl-footer h2, .dcl-footer h3, .dcl-footer h4 { font-weight: 600; }
