.polku-gram-wrap { padding: 14px 20px 32px; }
.polku-back-link { display: inline-block; color: #4a5568; font-size: 0.85rem; font-weight: 600; text-decoration: none; padding: 4px 0 10px; }
.polku-back-link:hover { color: #2563eb; text-decoration: none; }
.polku-gram-hdr { padding-bottom: 8px; margin-bottom: 14px; }
.polku-gram-eyebrow { color: #64748b; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; }
.polku-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.polku-pill { display: inline-flex; align-items: center; gap: 5px; background: #fff; padding: 7px 13px; border-radius: 9999px; font-size: 0.82rem; font-weight: 600; color: #4a5568; text-decoration: none; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.polku-pill:hover { background: #f1f5f9; color: #1a1a1a; text-decoration: none; }
.polku-pill-on { background: linear-gradient(135deg, #fb923c, #f97316); color: white !important; box-shadow: 0 2px 6px rgba(249,115,22,0.3); }
.polku-pill-on:hover { color: white !important; }
.polku-pill-icon { font-size: 0.92rem; }
.polku-pill-count { background: rgba(0,0,0,0.06); padding: 1px 7px; border-radius: 9999px; font-size: 0.7rem; margin-left: 2px; }
.polku-pill-on .polku-pill-count { background: rgba(255,255,255,0.25); }
.polku-gram-grid { display: grid; grid-template-columns: 360px 1fr; gap: 16px; align-items: start; }
.polku-rule-list { display: flex; flex-direction: column; gap: 4px; background: #fff; border-radius: 12px; padding: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); max-height: calc(100vh - 220px); overflow-y: auto; position: sticky; top: 16px; }
.polku-rule-item { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 8px; color: #1a1a1a; text-decoration: none; border: 1.5px solid transparent; }
.polku-rule-item:hover { background: #f8fafc; color: #1a1a1a; text-decoration: none; }
.polku-rule-on { border-color: #3b82f6; background: #eff6ff !important; }
.polku-rule-kbadge { background: #fef3c7; color: #92400e; font-size: 0.7rem; font-weight: 800; padding: 4px 7px; border-radius: 5px; flex-shrink: 0; min-width: 26px; text-align: center; }
.polku-rule-info { flex: 1; min-width: 0; }
.polku-rule-title { font-size: 0.86rem; font-weight: 700; line-height: 1.3; color: #1a1a1a; }
.polku-rule-sub { font-size: 0.7rem; color: #718096; margin-top: 1px; }
.polku-rule-lbl { font-size: 0.6rem; font-weight: 800; padding: 3px 7px; border-radius: 4px; letter-spacing: 0.05em; flex-shrink: 0; }
.polku-rule-lbl.lbl-essential { color: #16a34a; background: #dcfce7; }
.polku-rule-lbl.lbl-important { color: #ca8a04; background: #fef9c3; }
.polku-rule-lbl.lbl-advanced { color: #dc2626; background: #fee2e2; }
.polku-rule-preview { background: #fff; border-radius: 12px; padding: 22px 26px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.polku-pv-hdr { padding-bottom: 12px; margin-bottom: 14px; }
.polku-pv-hdr h1, .polku-pv-hdr h2 { font-size: 1.5rem; font-weight: 800; margin: 0; letter-spacing: -0.02em; line-height: 1.25; color: #0a0a0a; }
.polku-pv-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: #4a5568; font-size: 0.82rem; }
.polku-pv-kbadge { background: #fef3c7; color: #92400e; font-size: 0.7rem; font-weight: 800; padding: 3px 8px; border-radius: 5px; }
.polku-pv-meta .sep { color: #cbd5e1; }
.polku-pv-tabs { display: flex; gap: 4px; border-bottom: 1px solid #e2e8f0; margin-bottom: 18px; flex-wrap: wrap; }
.polku-pvt { background: none; border: none; padding: 8px 14px; font-family: inherit; font-size: 0.85rem; font-weight: 600; color: #718096; cursor: pointer; border-bottom: 2px solid transparent; }
.polku-pvt:hover { color: #1a1a1a; }
.polku-pvt-on { color: #2563eb; border-bottom-color: #2563eb; }
.polku-pv-section { margin-bottom: 22px; }
.polku-pv-sectitle { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; color: #4a5568; margin-bottom: 10px; }
.polku-pv-body { color: #1a1a1a; line-height: 1.65; font-size: 0.92rem; }
.polku-pv-body p { margin: 0 0 8px 0; }
.polku-pv-body h3, .polku-pv-body h4 { font-weight: 700; margin: 14px 0 6px; font-size: 1.05rem; }
.polku-pv-body ul, .polku-pv-body ol { margin: 4px 0 12px 22px; }
.polku-pv-body li { margin-bottom: 3px; }
.polku-pv-body strong { font-weight: 700; }
.polku-pv-table { overflow-x: auto; }
.polku-pv-table table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.polku-pv-table th { background: #1e3a8a; color: white; padding: 9px 12px; text-align: left; font-size: 0.78rem; font-weight: 700; }
.polku-pv-table td { padding: 9px 12px; border-bottom: 1px solid #e2e8f0; font-size: 0.88rem; }
.polku-pv-examples { display: flex; flex-direction: column; gap: 6px; }
.polku-pv-example { padding: 9px 14px; background: #f8fafc; border-radius: 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: center; }
.polku-pv-fi { font-weight: 700; color: #1a1a1a; font-size: 0.9rem; }
.polku-pv-vi { color: #2563eb; font-size: 0.85rem; }
@media (max-width: 900px) {
	.polku-gram-grid { grid-template-columns: 1fr; }
	.polku-rule-list { position: static; max-height: 380px; }

	/* TRANG CHI TIẾT RULE (/kielioppi/xxx/): nội dung lên ĐẦU,
	   danh sách rule xuống dưới làm bộ chuyển nhanh. Không đụng archive. */
	.single-ngu-phap .polku-rule-preview { order: -1; }
	.single-ngu-phap .polku-rule-list { order: 2; max-height: 340px; margin-top: 18px; padding-top: 6px; border-top: 1px solid #e2e8f0; }
	.single-ngu-phap .polku-rule-list::before { content: "Ngữ pháp khác"; display: block; padding: 6px 6px 10px; font-size: 12px; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; position: sticky; top: 0; background: #fff; z-index: 1; }
}
@media (max-width: 600px) { .polku-pv-example { grid-template-columns: 1fr; gap: 4px; } }
.polku-pv-cta { display: inline-block; margin-top: 6px; padding: 10px 20px; background: #2563eb; color: white !important; border-radius: 9px; font-weight: 700; font-size: 0.88rem; text-decoration: none; }
.polku-pv-cta:hover { background: #1d4ed8; }
