/*
Theme Name: Kí Tự Khoảng Trống
Theme URI: https://kitukhoangtrong.com
Author: Kí Tự Khoảng Trống
Description: Theme tối giản kiểu Google-clean cho công cụ kí tự khoảng trống — không dùng Bootstrap/jQuery. Đi kèm plugin KTKT Tools.
Version: 1.0.0
License: GPLv2 or later
Text Domain: kitukhoangtrong
*/

/* ============================ tokens ============================ */
:root{
	--ink:#202124; --ink2:#3c4043; --muted:#5f6368; --muted2:#80868b; --faint:#9aa0a6;
	--acc:#e8161f; --acc-dark:#c11119; --acc-deep:#9a0d14; --acc-bg:#fdeaea;
	--teal:#f4333b; --teal-dark:#cc1620;
	--border:#e8eaed; --line:#f1f3f4; --line2:#eceff1;
	--dark:#0f172a; --panel:#1e293b; --panel-border:#334155;
	--surface:#f8f9fa; --footer:#f1f3f4;
	--wrap:1160px;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
html,body{margin:0;padding:0;background:#fff;}
body{font-family:'Roboto',system-ui,-apple-system,Arial,sans-serif;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;color:var(--ink);line-height:1.6;}
::selection{background:var(--acc);color:#fff;}
a{text-decoration:none;color:inherit;}
img{max-width:100%;height:auto;display:block;}
h1,h2,h3{margin:0;}
.wrap{max-width:var(--wrap);margin:0 auto;padding-left:24px;padding-right:24px;}
.accent{color:var(--acc);}

/* ============================ header ============================ */
.site-header{position:sticky;top:0;z-index:50;background:#fff;border-bottom:1px solid var(--border);}
.site-header__inner{height:64px;display:flex;align-items:center;gap:24px;}
.brand{display:flex;align-items:center;gap:10px;flex-shrink:0;}
.brand__mark{width:34px;height:34px;border-radius:8px;background:var(--acc);display:flex;align-items:center;justify-content:center;font-weight:900;color:#fff;font-size:15px;letter-spacing:-1px;}
.brand__name{font-weight:700;font-size:18px;color:var(--ink);letter-spacing:-.3px;}
.main-nav{margin-left:8px;}
.main-nav__list{list-style:none;display:flex;align-items:center;gap:4px;margin:0;padding:0;flex-wrap:wrap;}
.main-nav__list--fallback{display:flex;}
.main-nav__list a{padding:8px 12px;border-radius:8px;font-size:14px;font-weight:500;color:var(--ink2);}
.main-nav__list a:hover{background:var(--line);}
.main-nav__list .current-menu-item>a,.main-nav__list .current_page_item>a{color:var(--acc-deep);background:var(--acc-bg);font-weight:700;}
.header-cta{margin-left:auto;background:var(--acc);color:#fff;font-weight:700;font-size:14px;padding:9px 18px;border-radius:999px;flex-shrink:0;}
.header-cta:hover{background:var(--acc-dark);}
.nav-toggle{display:none;margin-left:auto;width:42px;height:42px;border:1px solid var(--border);border-radius:10px;background:#fff;cursor:pointer;flex-direction:column;gap:5px;align-items:center;justify-content:center;}
.nav-toggle span{display:block;width:20px;height:2px;background:var(--ink2);border-radius:2px;}

/* ============================ sections ============================ */
.section{padding:56px 0;}
.band{background:var(--surface);border-top:1px solid var(--border);border-bottom:1px solid var(--border);padding:56px 0;}
.section--dark{background:var(--dark);color:#fff;}
.sec-title{font-size:28px;font-weight:900;letter-spacing:-.6px;color:var(--dark);margin:0 0 6px;}
.sec-title--light{color:#fff;}
.sec-titlerow{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;}
.sec-since{font-size:13px;color:#94a3b8;}
.sec-lead{font-size:15.5px;color:var(--muted);margin:0 0 28px;max-width:660px;}
.sec-lead--light{color:#cbd5e1;}
.sec-note{font-size:13px;color:var(--faint);margin:22px 0 0;line-height:1.55;}

/* ============================ hero ============================ */
.hero{padding:56px 0 40px;}
.hero__inner{display:flex;flex-wrap:wrap;gap:48px;align-items:center;}
.hero__col{flex:1 1 440px;min-width:300px;}
.hero__illus{flex:0 1 360px;min-width:280px;}
.badge{display:inline-block;background:var(--acc-bg);color:var(--acc-deep);font-weight:700;font-size:12.5px;padding:6px 13px;border-radius:999px;letter-spacing:.2px;}
.hero__title{font-size:clamp(30px,4.6vw,50px);line-height:1.1;font-weight:900;letter-spacing:-1.2px;margin:18px 0 16px;color:var(--dark);}
.hero__lead{font-size:17px;line-height:1.6;color:var(--ink2);margin:0 0 26px;max-width:560px;}
.hero__ticks{display:flex;gap:18px;flex-wrap:wrap;margin-top:20px;font-size:13.5px;color:var(--muted);}

.namecard{border:1px solid var(--border);border-radius:16px;overflow:hidden;}
.namecard__head{background:var(--line);padding:10px 16px;font-size:12px;font-weight:600;color:var(--muted);border-bottom:1px solid var(--border);}
.namecard__body{padding:20px;display:flex;flex-direction:column;gap:18px;}
.namecard__label{font-size:12px;color:var(--muted);margin-bottom:6px;}
.namecard__input{border:1px solid #dadce0;border-radius:9px;padding:12px 14px;font-weight:700;font-size:16px;color:var(--ink);min-height:46px;}
.namecard__input--empty{border:2px solid var(--acc);display:flex;align-items:center;gap:5px;}
.namecard__box{display:inline-block;width:16px;height:22px;border:1px dashed #93c5fd;border-radius:3px;background:#fff5f5;}
.namecard__arrow{text-align:center;color:var(--acc);font-size:20px;font-weight:700;}
.namecard__hint{font-size:12px;color:var(--teal-dark);font-weight:600;margin-top:7px;}

/* ============================ prose ============================ */
.prose-wrap{display:block;}
.prose{font-size:16.5px;line-height:1.78;color:var(--ink2);max-width:820px;margin:0 auto;}
.prose-narrow{max-width:820px;margin:0 auto;}
.prose p{margin:0 0 16px;}
.prose h2{font-size:24px;font-weight:900;color:var(--dark);letter-spacing:-.5px;margin:34px 0 14px;}
.prose h3{font-size:19px;font-weight:700;color:var(--dark);margin:26px 0 10px;}
.prose ul,.prose ol{margin:0 0 18px;padding-left:22px;}
.prose li{margin-bottom:10px;}
.prose a{color:var(--acc-deep);text-decoration:underline;}
.prose img{border-radius:12px;margin:18px 0;}
.prose blockquote{border-left:3px solid var(--acc);margin:18px 0;padding:6px 0 6px 18px;color:var(--muted);}

/* -------- original homepage SEO content (light-themed tables/chips) -------- */
.ktkt-home-content table{width:100%;border-collapse:collapse;font-size:15px;margin:18px 0;}
.ktkt-home-content .wp-block-table,.ktkt-home-content div[style*="overflow-x"]{max-width:100%;overflow-x:auto;}
.ktkt-home-content th,.ktkt-home-content td{padding:11px 14px;text-align:left;border-bottom:1px solid var(--line);}
.ktkt-home-content thead th{background:var(--acc-bg);color:var(--acc-deep);border-bottom:2px solid var(--border);font-weight:700;}
.ktkt-home-content td:first-child{font-weight:600;color:var(--ink);}
/* example name chips */
.ktkt-home-content [style*="border-radius:8px"]{font-family:'Roboto Mono',ui-monospace,monospace;}
.ktkt-home-content .wp-block-group{border-radius:12px;}

/* ============================ eeat ============================ */
.eeat{display:flex;flex-wrap:wrap;gap:32px;align-items:center;}
.eeat__id{display:flex;align-items:center;gap:16px;flex:0 0 auto;}
.eeat__mark{width:60px;height:60px;border-radius:14px;background:var(--acc);display:flex;align-items:center;justify-content:center;font-weight:900;color:#fff;font-size:20px;}
.eeat__name{font-size:18px;font-weight:700;color:var(--dark);}
.eeat__role{font-size:13.5px;color:var(--muted);}
.eeat__text{flex:1 1 360px;min-width:280px;font-size:14.5px;line-height:1.65;color:var(--ink2);margin:0;}

/* ============================ page head / breadcrumb ============================ */
.page-head{padding-top:44px;padding-bottom:8px;}
.breadcrumb{font-size:13px;color:var(--muted2);margin-bottom:10px;}
.breadcrumb a{color:var(--acc-deep);}
.page-head__title{font-size:clamp(28px,4vw,40px);font-weight:900;letter-spacing:-1px;color:var(--dark);margin:0 0 10px;}
.page-head__lead{font-size:16px;line-height:1.6;color:var(--muted);margin:0;max-width:680px;}
.page-head__search{margin-top:14px;}

/* ============================ cards / grid ============================ */
.grid-wrap{padding-top:28px;padding-bottom:60px;}
.cardgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:24px;}
.cardgrid--related{grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:20px;}
.cat-label{font-size:11.5px;font-weight:700;letter-spacing:.4px;}
.card{display:flex;flex-direction:column;border:1px solid var(--border);border-radius:14px;overflow:hidden;transition:border-color .15s;}
.card:hover{border-color:var(--acc);}
.card__body{padding:18px;display:flex;flex-direction:column;flex:1;}
.card__title{font-size:18px;font-weight:700;line-height:1.3;margin:7px 0 9px;color:var(--ink);}
.card__title--sm{font-size:16px;margin:6px 0 0;}
.card__excerpt{font-size:14px;line-height:1.55;color:var(--muted);margin:0 0 14px;}
.card__meta{font-size:13px;color:var(--muted2);}
.card__meta--foot{margin-top:auto;font-size:12.5px;}
.card--sm .card__body{padding:15px;}

.ktkt-banner{display:flex;align-items:center;justify-content:center;gap:7px;overflow:hidden;}
.ktkt-banner--grad{}
.ktkt-banner__img{width:100%;height:100%;object-fit:cover;}
.ktkt-banner__box{width:26px;height:34px;border:2px dashed rgba(255,255,255,.75);border-radius:5px;background:rgba(255,255,255,.12);}

/* featured */
.featured-wrap{padding-top:28px;}
.featured{display:flex;flex-wrap:wrap;border:1px solid var(--border);border-radius:16px;overflow:hidden;transition:border-color .15s;}
.featured:hover{border-color:var(--acc);}
.featured__media{flex:1 1 420px;min-height:240px;position:relative;display:flex;align-items:center;justify-content:center;gap:10px;padding:30px;}
.featured__img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
.featured__box{width:42px;height:54px;border:2px dashed rgba(255,255,255,.7);border-radius:7px;background:rgba(255,255,255,.12);}
.featured__flag{position:absolute;top:18px;left:18px;background:rgba(15,23,42,.55);color:#fff;font-size:12px;font-weight:700;padding:5px 12px;border-radius:999px;}
.featured__body{flex:1 1 380px;padding:30px;display:flex;flex-direction:column;justify-content:center;}
.featured__title{font-size:25px;font-weight:900;letter-spacing:-.6px;line-height:1.2;margin:8px 0 12px;color:var(--dark);}
.featured__excerpt{font-size:15px;line-height:1.6;color:var(--muted);margin:0 0 16px;}

.empty-msg{color:var(--faint);font-size:15px;padding:30px 0;}

/* ============================ article (single) ============================ */
.article{padding-top:36px;max-width:1100px;}
.article--page{max-width:900px;padding-bottom:40px;}
.article__title{font-size:clamp(28px,4.4vw,42px);font-weight:900;letter-spacing:-1.2px;line-height:1.14;margin:10px 0 16px;color:var(--dark);}
.article__meta{display:flex;align-items:center;gap:13px;flex-wrap:wrap;padding-bottom:24px;border-bottom:1px solid var(--border);}
.avatar{width:40px;height:40px;border-radius:50%;background:var(--acc);display:flex;align-items:center;justify-content:center;font-weight:900;color:#fff;font-size:13px;}
.article__author{font-size:14px;font-weight:700;color:var(--ink);}
.article__sub{font-size:12.5px;color:var(--muted2);}
.article__banner{margin-top:24px;height:280px;border-radius:16px;overflow:hidden;display:flex;align-items:center;justify-content:center;gap:12px;}
.article__bannerimg{width:100%;height:100%;object-fit:cover;}
.article__box{width:52px;height:66px;border:2px dashed rgba(255,255,255,.8);border-radius:8px;background:rgba(255,255,255,.12);}
.article__layout{display:flex;flex-wrap:wrap;gap:48px;margin-top:36px;align-items:flex-start;}
.article__content{flex:1 1 540px;min-width:300px;max-width:none;margin:0;}
.toc{flex:0 0 250px;position:sticky;top:84px;align-self:flex-start;}
.toc__box{border:1px solid var(--border);border-radius:14px;padding:18px;}
.toc__title{font-size:12.5px;font-weight:700;color:var(--muted2);letter-spacing:.5px;text-transform:uppercase;margin-bottom:12px;}
.toc__link{display:block;font-size:14px;color:var(--ink2);padding:6px 0;}
.toc__link:hover,.toc__link.is-active{color:var(--acc-deep);}

.authorbox{display:flex;gap:16px;align-items:center;background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:20px;margin:32px 0;}
.authorbox__mark{width:54px;height:54px;border-radius:50%;background:var(--acc);display:flex;align-items:center;justify-content:center;font-weight:900;color:#fff;font-size:16px;flex-shrink:0;}
.authorbox__name{font-size:16px;font-weight:700;color:var(--dark);}
.authorbox__text{font-size:14px;line-height:1.6;color:var(--muted);margin:5px 0 0;}

.related{border-top:1px solid var(--border);margin-top:20px;padding:40px 0 56px;}
.related__title{font-size:22px;font-weight:900;color:var(--dark);letter-spacing:-.4px;margin:0 0 20px;}

/* ============================ pagination ============================ */
.pagination{margin-top:36px;display:flex;justify-content:center;}
.pagination .nav-links{display:flex;gap:6px;flex-wrap:wrap;align-items:center;}
.pagination .page-numbers{display:inline-flex;align-items:center;justify-content:center;min-width:40px;height:40px;padding:0 12px;border:1px solid var(--border);border-radius:9px;font-size:14px;font-weight:600;color:var(--ink2);}
.pagination .page-numbers.current{background:var(--acc);color:#fff;border-color:var(--acc);}
.pagination a.page-numbers:hover{border-color:var(--acc);color:var(--acc-deep);}

/* ============================ search form ============================ */
.search-form{display:flex;gap:8px;max-width:420px;}
.search-form .search-field{flex:1;border:1px solid #dadce0;border-radius:999px;padding:11px 18px;font-size:14px;outline:none;font-family:inherit;}
.search-form .search-field:focus{border-color:var(--acc);}
.search-form .search-submit{background:var(--acc);color:#fff;border:none;border-radius:999px;padding:11px 20px;font-weight:700;font-size:14px;cursor:pointer;}
.search-form .search-submit:hover{background:var(--acc-dark);}

/* ============================ 404 ============================ */
.notfound{text-align:center;padding:70px 24px 80px;max-width:680px;}
.notfound__mark{display:inline-flex;width:60px;height:60px;border-radius:14px;background:var(--acc);align-items:center;justify-content:center;font-weight:900;color:#fff;font-size:20px;}
.notfound__code{font-size:64px;font-weight:900;color:var(--dark);margin:18px 0 0;letter-spacing:-2px;}
.notfound__title{font-size:22px;font-weight:700;color:var(--ink);margin:4px 0 10px;}
.notfound__lead{font-size:16px;color:var(--muted);margin:0 auto 22px;max-width:520px;}
.notfound__search{display:flex;justify-content:center;margin-bottom:22px;}
.notfound__actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-bottom:50px;}
.notfound__recent{text-align:left;}
.notfound__recent .sec-title{text-align:center;margin-bottom:24px;}

/* ============================ comments ============================ */
.comments-wrap{border-top:1px solid var(--border);margin-top:20px;padding-top:30px;}
.comments__title{font-size:20px;font-weight:800;color:var(--dark);margin:0 0 18px;}
.comments__list{list-style:none;padding:0;margin:0 0 24px;}
.comments__list .comment-body{padding:14px 0;border-bottom:1px solid var(--line);}
.comment-form input[type=text],.comment-form input[type=email],.comment-form input[type=url],.comment-form textarea{width:100%;border:1px solid #dadce0;border-radius:9px;padding:11px 14px;font-family:inherit;font-size:14px;margin-bottom:12px;}
.comment-form .ktkt-btn{cursor:pointer;}

/* ============================ footer ============================ */
.site-footer{background:var(--footer);border-top:1px solid var(--border);}
.site-footer__top{padding:30px 24px;display:flex;flex-wrap:wrap;gap:18px 28px;align-items:center;justify-content:space-between;}
.brand--sm .brand__mark--sm{width:28px;height:28px;border-radius:7px;font-size:12px;}
.brand--sm .brand__name--sm{font-size:15px;color:var(--ink2);}
.site-footer__nav .site-footer__list{list-style:none;display:flex;flex-wrap:wrap;gap:6px 22px;margin:0;padding:0;font-size:13.5px;}
.site-footer__list a{color:var(--muted);}
.site-footer__list a:hover{color:var(--ink);}
.site-footer__bar{border-top:1px solid #e3e6e8;}
.site-footer__barinner{padding:16px 24px;display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between;font-size:12.5px;color:var(--muted2);}

/* ============================ responsive ============================ */
@media(max-width:860px){
	.nav-toggle{display:flex;}
	.header-cta{display:none;}
	.main-nav{position:absolute;top:64px;left:0;right:0;background:#fff;border-bottom:1px solid var(--border);margin:0;padding:8px 24px 16px;display:none;box-shadow:0 8px 24px rgba(0,0,0,.06);}
	.main-nav.is-open{display:block;}
	.main-nav__list{flex-direction:column;align-items:stretch;gap:2px;}
	.main-nav__list a{padding:11px 12px;}
	.toc{display:none;}
	.article__layout{gap:0;}
}
@media(max-width:560px){
	.section,.band{padding:40px 0;}
	.featured__media{min-height:180px;}
	.article__banner{height:200px;}
}

/* ── brand logo image — replaces old "[ ]" placeholder marks (red favicon logo) ── */
img.ktkt-logo{background:transparent!important;object-fit:contain;color:transparent;font-size:0;display:inline-block;}
.brand__mark.ktkt-logo{width:34px;height:34px;}
.brand__mark--sm.ktkt-logo{width:30px;height:30px;}
.eeat__mark.ktkt-logo{width:60px;height:60px;}
.avatar.ktkt-logo{width:40px;height:40px;}
.authorbox__mark.ktkt-logo{width:54px;height:54px;}
.notfound__mark.ktkt-logo{width:60px;height:60px;}
