:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --text: #1c2233;
  --muted: #5d6680;
  --border: #e2e6f0;
  --brand: #e5322d;
  --brand-dark: #c4211c;
  --pdf: #e5322d;
  --img: #1f9d55;
  --tool: #6c4ee3;
  --media: #f08a24;
  --office: #2b6fd6;
  --ok: #1f9d55;
  --warn: #c77700;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 30, 60, .06), 0 4px 16px rgba(20, 30, 60, .06);
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151d; --surface: #1b1f2a; --surface-2: #222736; --text: #e8ebf3;
    --muted: #9aa3b8; --border: #2e3446; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; font-size: 16px; }
a { color: inherit; }
img, canvas { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; gap: 16px; height: 60px; }
.logo { font-weight: 800; font-size: 20px; text-decoration: none; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 15px; }
.logo span.accent { color: var(--brand); }
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a { text-decoration: none; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 15px; }
.main-nav a:hover { background: var(--surface-2); color: var(--text); }
@media (max-width: 720px) { .main-nav a.hide-sm { display: none; } .main-nav a { padding: 8px; font-size: 14px; } }

/* Ads */
.ad-slot { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 10px, var(--surface) 10px, var(--surface) 20px);
  border: 1px dashed var(--border); border-radius: 10px; color: var(--muted); font-size: 12px; display: grid; place-items: center; text-align: center; overflow: hidden; }
.ad-top { min-height: 90px; margin: 16px 0; }
.ad-bottom { min-height: 250px; margin: 32px 0; }
.ad-side { width: 160px; min-height: 600px; position: sticky; top: 76px; }
.layout { display: grid; grid-template-columns: 160px minmax(0, 1fr) 160px; gap: 24px; align-items: start; }
@media (max-width: 1180px) { .layout { grid-template-columns: minmax(0, 1fr); } .ad-side { display: none; } }

/* Hero / home */
.hero { text-align: center; padding: 40px 0 16px; }
.hero h1 { font-size: clamp(26px, 4vw, 40px); margin: 0 0 8px; line-height: 1.25; }
.hero p { color: var(--muted); margin: 0 auto 20px; max-width: 680px; }
.search { max-width: 560px; margin: 0 auto; position: relative; }
.search input { width: 100%; padding: 14px 18px 14px 46px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 16px; box-shadow: var(--shadow); outline: none; }
.search input:focus { border-color: var(--brand); }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 20px 0 8px; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); }
.chip.active { background: var(--text); color: var(--surface); border-color: var(--text); }
.cat-title { font-size: 20px; margin: 32px 0 12px; display: flex; align-items: center; gap: 10px; }
.cat-title .dot { width: 12px; height: 12px; border-radius: 50%; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-decoration: none; display: flex; flex-direction: column; gap: 8px; transition: transform .15s, box-shadow .15s, border-color .15s; position: relative; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--c, var(--brand)); }
.card .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--c, var(--brand)); font-size: 22px; }
.card h3 { margin: 0; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.card.soon { opacity: .6; pointer-events: none; }
.badge { position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.badge.new { background: #fff1e6; color: #c25a00; border-color: #ffd9b8; }
.c-pdf { --c: var(--pdf); } .c-img { --c: var(--img); } .c-tool { --c: var(--tool); } .c-media { --c: var(--media); } .c-office { --c: var(--office); }
.empty-search { text-align: center; color: var(--muted); padding: 40px 0; display: none; }

/* Tool page */
.breadcrumb { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); }
.tool-head { text-align: center; margin: 8px 0 20px; }
.tool-head h1 { font-size: clamp(24px, 3.4vw, 34px); margin: 0 0 6px; line-height: 1.3; }
.tool-head p { color: var(--muted); margin: 0 auto; max-width: 720px; }
.tool-box { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); }

.dropzone { border: 2px dashed var(--border); border-radius: 16px; padding: 40px 16px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; background: var(--surface-2); }
.dropzone:hover, .dropzone.drag { border-color: var(--c, var(--brand)); background: color-mix(in srgb, var(--c, var(--brand)) 6%, var(--surface)); }
.dropzone .big-btn { display: inline-flex; align-items: center; gap: 8px; }
.dropzone .hint { color: var(--muted); margin-top: 10px; font-size: 14px; }
.privacy { display: flex; justify-content: center; align-items: center; gap: 6px; color: var(--ok); font-size: 13px; margin-top: 12px; font-weight: 600; text-align: center; }

.btn { border: 0; border-radius: 12px; padding: 12px 22px; font-weight: 700; cursor: pointer; background: var(--c, var(--brand)); color: #fff; font-size: 16px; transition: filter .15s, transform .05s; display: inline-flex; align-items: center; gap: 8px; justify-content: center; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.lg { padding: 16px 32px; font-size: 18px; }
.btn.ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn.sm { padding: 6px 12px; font-size: 14px; border-radius: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }

.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-weight: 600; font-size: 14px; }
.field input[type=text], .field input[type=number], .field input[type=url], .field select, .field textarea, .field input[type=password] {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); width: 100%; }
.field input[type=color] { width: 100%; height: 42px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 3px; }
.field input[type=range] { width: 100%; accent-color: var(--c, var(--brand)); }
.field small { color: var(--muted); font-size: 12px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid var(--border); background: var(--surface); padding: 8px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px; }
.seg button.active { background: var(--c, var(--brand)); color: #fff; border-color: transparent; }

.file-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 18px; }
.file-item { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px; position: relative; text-align: center; font-size: 13px; user-select: none; }
.file-item[draggable=true] { cursor: grab; }
.file-item.dragging { opacity: .4; }
.file-item.drop-target { outline: 2px solid var(--c, var(--brand)); }
.file-item .thumb { height: 150px; display: grid; place-items: center; background: var(--surface); border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.file-item .thumb img, .file-item .thumb canvas { max-height: 150px; max-width: 100%; object-fit: contain; box-shadow: 0 1px 4px rgba(0,0,0,.15); transition: transform .2s; }
.file-item .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.file-item .meta { color: var(--muted); font-size: 12px; }
.file-item .x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow); cursor: pointer; font-size: 16px; line-height: 1; z-index: 2; }
.file-item .tools { display: flex; gap: 6px; justify-content: center; margin-top: 6px; }
.file-item.deleted { opacity: .35; }
.file-item.deleted .thumb::after { content: "Sẽ xóa"; position: absolute; inset: 10px 10px auto; background: var(--brand); color: #fff; border-radius: 6px; font-weight: 700; padding: 2px; }
.file-item .num { position: absolute; top: 6px; left: 6px; background: var(--text); color: var(--surface); border-radius: 6px; padding: 0 6px; font-size: 12px; font-weight: 700; z-index: 2; }
.add-more { border: 2px dashed var(--border); border-radius: 12px; display: grid; place-items: center; cursor: pointer; color: var(--muted); font-weight: 700; min-height: 200px; background: none; }
.add-more:hover { border-color: var(--c, var(--brand)); color: var(--c, var(--brand)); }

.status { margin-top: 16px; text-align: center; font-weight: 600; min-height: 1.6em; }
.status.err { color: var(--brand); }
.status.ok { color: var(--ok); }
.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 10px auto 0; max-width: 480px; display: none; }
.progress > div { height: 100%; width: 0; background: var(--c, var(--brand)); transition: width .2s; }
.result { margin-top: 18px; padding: 18px; border-radius: 14px; background: color-mix(in srgb, var(--ok) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 30%, var(--border)); text-align: center; display: none; }
.result.show { display: block; }
.result h3 { margin: 0 0 6px; }
.result .sub { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 14px; text-align: center; }
.result-grid a { text-decoration: none; font-size: 12px; color: var(--muted); }
.result-grid img { width: 100%; height: 140px; object-fit: contain; background: var(--surface); border-radius: 8px; border: 1px solid var(--border); }
.hidden { display: none !important; }
.preview-wrap { margin-top: 16px; text-align: center; }
.preview-wrap canvas, .preview-wrap img { max-height: 520px; border-radius: 8px; border: 1px solid var(--border); background: repeating-conic-gradient(#ddd 0 25%, #fff 0 50%) 50% / 16px 16px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 800px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
textarea.big { width: 100%; min-height: 320px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); resize: vertical; font-size: 15px; line-height: 1.6; }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 14px; margin-top: 12px; }
.checks label { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.checks input { margin-top: 4px; accent-color: var(--c, var(--brand)); }
.stats { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* SEO content */
.content { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 28px; margin-top: 28px; }
.content h2 { font-size: 22px; margin: 0 0 16px; }
.content h2:not(:first-child) { margin-top: 32px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; padding: 0; margin: 0; list-style: none; counter-reset: s; }
.steps li { background: var(--surface-2); border-radius: 14px; padding: 18px; counter-increment: s; position: relative; padding-top: 52px; }
.steps li::before { content: counter(s); position: absolute; top: 14px; left: 18px; width: 30px; height: 30px; border-radius: 50%; background: var(--c, var(--brand)); color: #fff; font-weight: 800; display: grid; place-items: center; }
.steps strong { display: block; margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: 15px; }
.faq details { border-bottom: 1px solid var(--border); padding: 14px 0; }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 10px 0 0; }
.related { margin-top: 28px; }
.related h2 { font-size: 20px; }
.prose p, .prose li { color: var(--muted); }
.prose h2 { color: var(--text); }

/* Footer */
.site-footer { margin-top: 48px; background: var(--surface); border-top: 1px solid var(--border); padding: 32px 0; font-size: 14px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 24px; }
.footer-grid h4 { color: var(--text); margin: 0 0 10px; font-size: 15px; }
.footer-grid a { display: block; text-decoration: none; padding: 3px 0; }
.footer-grid a:hover { color: var(--brand); }
.copy { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); text-align: center; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

.crop-stage { position: relative; display: inline-block; max-width: 100%; touch-action: none; user-select: none; }
.crop-stage img { display: block; max-height: 520px; max-width: 100%; }
.crop-box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.45); cursor: move; }
.crop-box .h { position: absolute; width: 14px; height: 14px; background: #fff; border: 2px solid var(--c, var(--brand)); border-radius: 3px; right: -8px; bottom: -8px; cursor: nwse-resize; }
.crop-stage { overflow: hidden; border-radius: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--surface); padding: 10px 18px; border-radius: 10px; font-weight: 600; z-index: 99; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }

/* ===== Font nhúng PDF (hỗ trợ tiếng Việt) ===== */
@font-face { font-family: 'PE Sans'; src: url(/assets/fonts/BeVietnamPro-Regular.ttf); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'PE Sans'; src: url(/assets/fonts/BeVietnamPro-Bold.ttf); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'PE Sans'; src: url(/assets/fonts/BeVietnamPro-Italic.ttf); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'PE Sans'; src: url(/assets/fonts/BeVietnamPro-BoldItalic.ttf); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'PE Serif'; src: url(/assets/fonts/Tinos-Regular.ttf); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'PE Serif'; src: url(/assets/fonts/Tinos-Bold.ttf); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'PE Serif'; src: url(/assets/fonts/Tinos-Italic.ttf); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'PE Serif'; src: url(/assets/fonts/Tinos-BoldItalic.ttf); font-weight: 700; font-style: italic; font-display: swap; }

/* ===== Trang rộng (trình chỉnh sửa) ===== */
.layout.wide { grid-template-columns: minmax(0, 1fr); }

/* ===== Trình chỉnh sửa PDF ===== */
.pe-bar { position: sticky; top: 60px; z-index: 30; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 8px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; box-shadow: var(--shadow); }
.pe-bar .sep { width: 1px; align-self: stretch; background: var(--border); margin: 0 4px; }
.pe-tool { border: 1px solid transparent; background: none; border-radius: 10px; padding: 6px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 56px; font-size: 11px; font-weight: 600; color: var(--muted); }
.pe-tool b { font-size: 18px; line-height: 1; color: var(--text); font-weight: 700; }
.pe-tool:hover { background: var(--surface-2); }
.pe-tool.active { background: color-mix(in srgb, var(--c, var(--brand)) 12%, var(--surface)); border-color: var(--c, var(--brand)); color: var(--c, var(--brand)); }
.pe-props { display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; padding: 8px 4px 2px; width: 100%; font-size: 13px; min-height: 46px; overflow-x: auto; white-space: nowrap; border-top: 1px solid var(--border); margin-top: 4px; }
.pe-props > * { flex: none; }
.pe-props .empty { color: var(--muted); }
.pe-props label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; }
.pe-props select, .pe-props input[type=number] { padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.pe-props input[type=number] { width: 64px; }
.pe-props input[type=color] { width: 34px; height: 30px; border: 1px solid var(--border); border-radius: 8px; padding: 2px; background: var(--surface); }
.pe-props .tog { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; width: 32px; height: 30px; cursor: pointer; }
.pe-props .tog.on { background: var(--text); color: var(--surface); }
.pe-right { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pe-right .zoom { font-size: 13px; min-width: 44px; text-align: center; color: var(--muted); }
.pe-hint { font-size: 13px; color: var(--muted); text-align: center; margin: 10px 0 0; height: 1.5em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pe-pages { background: var(--surface-2); border-radius: 14px; padding: 20px 8px; margin-top: 12px; overflow: auto; max-height: 78vh; }
.pe-page { position: relative; margin: 0 auto 18px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.pe-page canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pe-page .pno { position: absolute; left: -2px; top: -22px; font-size: 12px; color: var(--muted); }
.pe-layer { position: absolute; inset: 0; overflow: hidden; }
.pe-layer.draw { cursor: crosshair; touch-action: none; }
.pe-obj { position: absolute; touch-action: none; cursor: move; }
.pe-obj.sel { outline: 1.5px dashed #2b7cff; outline-offset: 2px; }
.pe-obj .hd { position: absolute; width: 12px; height: 12px; right: -8px; bottom: -8px; background: #fff; border: 2px solid #2b7cff; border-radius: 3px; cursor: nwse-resize; display: none; }
.pe-obj.sel .hd { display: block; }
.pe-obj svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.pe-obj img { width: 100%; height: 100%; display: block; pointer-events: none; user-select: none; }
.pe-text { white-space: pre; line-height: 1.25; outline: none; padding: 0; margin: 0; min-width: 6px; min-height: 1em; }
.pe-text[contenteditable]:not([contenteditable=false]) { cursor: text; background: rgba(43,124,255,.06); }
.pe-tc { position: absolute; border: 1px dashed rgba(43,124,255,.35); background: rgba(43,124,255,.04); cursor: text; border-radius: 2px; }
.pe-tc:hover { border-color: #2b7cff; background: rgba(43,124,255,.15); }
.pe-modal { position: fixed; inset: 0; background: rgba(10,14,25,.55); z-index: 100; display: grid; place-items: center; padding: 16px; }
.pe-modal > div { background: var(--surface); border-radius: 18px; padding: 20px; width: min(620px, 100%); max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.pe-modal h3 { margin: 0 0 12px; }
.sig-pad { width: 100%; height: 200px; border: 2px dashed var(--border); border-radius: 12px; background: #fff; touch-action: none; cursor: crosshair; display: block; }
.sig-saved { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.sig-saved > div { position: relative; border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 6px; cursor: pointer; }
.sig-saved img { height: 44px; display: block; }
.sig-saved button { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; cursor: pointer; font-size: 13px; line-height: 1; }
.sig-type { font-size: 44px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: #111; cursor: pointer; text-align: center; white-space: nowrap; overflow: hidden; }
.sig-type.on { outline: 2px solid var(--c, var(--brand)); }
.form-field { position: absolute; border: 1px solid rgba(43,124,255,.6); background: rgba(219,234,254,.55); font-size: 12px; padding: 0 3px; color: #111; border-radius: 2px; }
.form-field:focus { outline: 2px solid #2b7cff; background: rgba(255,255,255,.95); }
input.form-field[type=checkbox], input.form-field[type=radio] { margin: 0; accent-color: #2b7cff; }
.print-area { display: none; }

/* Thẻ nổi bật trang chủ */
.featured { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 24px 0 8px; }
.feat { display: flex; gap: 18px; align-items: center; text-decoration: none; padding: 22px; border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 14%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 35%, var(--border)); transition: transform .15s, box-shadow .15s; }
.feat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.feat .icon { width: 64px; height: 64px; flex: none; border-radius: 16px; background: var(--c); color: #fff; display: grid; place-items: center; font-size: 30px; }
.feat h2 { margin: 0 0 4px; font-size: 21px; }
.feat p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.feat .btn { padding: 8px 16px; font-size: 14px; }
.pe-tools { display: flex; flex-wrap: wrap; gap: 4px; }
@media (max-width: 720px) {
  .pe-bar { top: 56px; padding: 6px; }
  .pe-tools { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; scrollbar-width: thin; }
  .pe-tool { min-width: 52px; padding: 4px 6px; flex: none; }
  .pe-right { margin-left: 0; width: 100%; justify-content: flex-end; }
  .pe-right .btn.sm { padding: 6px 9px; }
  .pe-right > .btn:last-child { padding: 8px 12px; font-size: 14px; }
  .pe-pages { max-height: 70vh; padding: 12px 4px; }
  .pe-hint { display: none; }
}
@media (max-width: 440px) {
  .site-header .container { gap: 8px; }
  .logo { font-size: 17px; }
  .logo-mark { width: 26px; height: 26px; }
  .main-nav a.hide-xs { display: none; }
}
.main-nav a { white-space: nowrap; }
@media (max-width: 440px) { .main-nav a { padding: 8px 6px; font-size: 13px; } }
