
:root {
  --bg: #ffffff;
  --bg-subtle: #f7f8fa;
  --bg-elevated: #ffffff;
  --border: #e6e8eb;
  --border-strong: #d0d4d9;
  --text: #1a1d21;
  --text-muted: #5b6470;
  --text-faint: #8a93a0;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #dbeafe;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --warn: #d97706;
  --warn-soft: #fef3c7;
  --error: #dc2626;
  --error-soft: #fee2e2;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16,24,40,0.05);
  --shadow: 0 4px 12px rgba(16,24,40,0.08);
  --shadow-lg: 0 12px 32px rgba(16,24,40,0.12);
  --maxw: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
[data-theme="dark"] {
  --bg: #0f1115;
  --bg-subtle: #16191f;
  --bg-elevated: #1a1e25;
  --border: #2a2f38;
  --border-strong: #3a414c;
  --text: #e8eaed;
  --text-muted: #a3acb8;
  --text-faint: #6b7280;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-soft: #1e3a5f;
  --success: #22c55e;
  --success-soft: #14351f;
  --warn: #f59e0b;
  --warn-soft: #3a2a0a;
  --error: #ef4444;
  --error-soft: #3a1414;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.6; -webkit-font-smoothing: antialiased; font-size: 16px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
h1,h2,h3,h4 { line-height: 1.25; color: var(--text); margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* HEADER */
header.site-header {
  position: sticky; top: 0; z-index: 100; background: var(--bg);
  border-bottom: 1px solid var(--border); backdrop-filter: saturate(180%) blur(8px);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: 60px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-mark { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), #7c3aed); display: flex; align-items: center; justify-content: center; color: white; }
nav#nav-menu { display: flex; gap: 4px; margin-left: 8px; flex: 1; }
nav#nav-menu a {
  padding: 8px 12px; border-radius: var(--radius-sm); color: var(--text-muted); font-weight: 500; font-size: 0.95rem;
}
nav#nav-menu a:hover { background: var(--bg-subtle); color: var(--text); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 38px; height: 38px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--bg-subtle); }
#nav-toggle { display: none; }

/* SEARCH in header */
.header-search { position: relative; }
.header-search input { width: 180px; padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-subtle); color: var(--text); font-size: 0.9rem; }
.header-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* LAYOUT */
main { min-height: 70vh; padding: 28px 0 60px; }
#app { animation: fadein 0.2s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* HERO */
.hero { text-align: center; padding: 36px 0 24px; }
.hero h1 { font-size: 2.4rem; margin-bottom: 12px; }
.hero-sub { font-size: 1.15rem; color: var(--text-muted); max-width: 720px; margin: 0 auto 24px; }
.hero-search { max-width: 560px; margin: 0 auto; position: relative; }
.hero-search input {
  width: 100%; padding: 16px 20px; font-size: 1.1rem; border-radius: var(--radius-lg);
  border: 2px solid var(--border); background: var(--bg-elevated); color: var(--text);
  box-shadow: var(--shadow); transition: border-color 0.15s, box-shadow 0.15s;
}
.hero-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-suggest {
  position: absolute; top: 100%; left: 0; right: 0; margin-top: 6px; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; z-index: 50;
}
.search-suggest a { display: block; padding: 10px 16px; color: var(--text); border-bottom: 1px solid var(--border); }
.search-suggest a:last-child { border-bottom: none; }
.search-suggest a:hover { background: var(--bg-subtle); text-decoration: none; }
.search-suggest .muted { color: var(--text-faint); font-size: 0.85rem; }

/* SECTIONS */
.section { margin-top: 40px; }
.section > h2 { margin-bottom: 16px; }
.lead { font-size: 1.1rem; color: var(--text-muted); }

/* TOOL GRID + CARDS */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tool-card-link { color: var(--text); display: block; }
.tool-card-link:hover { text-decoration: none; }
.tool-card-mini {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; position: relative; height: 100%;
}
.tool-card-mini:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent); }
.tool-icon { width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.tool-card-body h3 { font-size: 1rem; margin: 0 0 4px; color: var(--text); }
.tool-card-body p { font-size: 0.85rem; color: var(--text-muted); margin: 0; line-height: 1.4; }
.bulk-badge { position: absolute; top: 12px; right: 12px; background: var(--success-soft); color: var(--success); font-size: 0.7rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.03em; }
.bulk-badge.lg { position: static; display: inline-block; margin-bottom: 16px; }

/* CATEGORY GRID */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.cat-card {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px;
  color: var(--text); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.cat-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent); }
.cat-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.cat-card p { font-size: 0.88rem; color: var(--text-muted); margin: 0 0 10px; }
.cat-count { font-size: 0.8rem; color: var(--accent); font-weight: 600; }

/* FEATURES grid (homepage) */
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.feature { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.feature h3 { color: var(--accent); font-size: 1rem; margin-bottom: 6px; }
.feature p { font-size: 0.9rem; color: var(--text-muted); margin: 0; }

/* FAQ */
.faq details { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--text); }
.faq details[open] summary { margin-bottom: 8px; }

/* BLOG */
.blog-list { list-style: none; padding: 0; }
.blog-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.blog-list-lg { list-style: none; padding: 0; }
.blog-list-lg li { padding: 16px 0; border-bottom: 1px solid var(--border); }
.blog-list-lg h3 { margin-bottom: 4px; }

/* BREADCRUMB */
.breadcrumb { font-size: 0.85rem; color: var(--text-faint); margin-bottom: 16px; padding: 0; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb span { color: var(--text); }

/* TOOL PAGE */
.tool-page { max-width: 860px; margin: 0 auto; }
.tool-mount { margin: 24px 0; }

/* TOOL CARD (interactive) */
.tool-card {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-sm);
}
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 36px 20px; text-align: center;
  cursor: pointer; transition: border-color 0.15s, background 0.15s; color: var(--text-muted); background: var(--bg-subtle);
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.dropzone svg { display: block; margin: 0 auto 8px; }
.dropzone p { margin: 4px 0; }
.dropzone-sub { font-size: 0.8rem; color: var(--text-faint); }

.options-panel { margin: 16px 0; display: flex; flex-direction: column; gap: 10px; }
.opt { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; color: var(--text); flex-wrap: wrap; }
.opt input[type=number], .opt input[type=text], .opt select { padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 0.9rem; }
.opt input[type=color] { width: 36px; height: 30px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); padding: 2px; }
.opt input[type=range] { flex: 1; min-width: 120px; }
.opt-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.opt-row label { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; }
.opt-hint { font-size: 0.82rem; color: var(--text-faint); margin: 0; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid transparent; font-size: 0.92rem; font-weight: 600; cursor: pointer; transition: background 0.12s, border-color 0.12s, opacity 0.12s; font-family: var(--font); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-subtle); color: var(--text); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--bg-elevated); border-color: var(--border-strong); }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-subtle); color: var(--text); }
.btn-mini { padding: 5px 10px; font-size: 0.82rem; background: var(--bg-subtle); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.btn-mini:hover { background: var(--bg-elevated); border-color: var(--border-strong); }

/* FILE LIST */
.file-list { list-style: none; padding: 0; margin: 16px 0 0; }
.file-row {
  display: grid; grid-template-columns: 1fr 90px 90px 110px auto; gap: 10px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 6px; background: var(--bg); font-size: 0.88rem;
}
.file-row.reorder { grid-template-columns: 24px 1fr 90px auto; }
.file-row .grip { cursor: grab; color: var(--text-faint); user-select: none; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: var(--text-muted); font-size: 0.82rem; text-align: right; }
.file-status { font-size: 0.8rem; font-weight: 600; text-transform: capitalize; padding: 2px 8px; border-radius: 999px; text-align: center; }
.file-status.pending { background: var(--bg-subtle); color: var(--text-faint); }
.file-status.processing { background: var(--accent-soft); color: var(--accent); }
.file-status.done { background: var(--success-soft); color: var(--success); }
.file-status.failed { background: var(--error-soft); color: var(--error); }
.file-extra { font-size: 0.8rem; color: var(--text-muted); text-align: right; }
.file-extra .err { color: var(--error); }
.file-actions { display: flex; gap: 4px; }

/* PROGRESS */
.overall-progress { margin: 12px 0; height: 24px; background: var(--bg-subtle); border-radius: var(--radius-sm); position: relative; overflow: hidden; border: 1px solid var(--border); }
.overall-progress .bar { height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.overall-progress .lbl { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 600; color: var(--text); }

/* RESULT AREA */
.result-area { margin-top: 16px; }
.result-area .success { color: var(--success); font-weight: 600; margin-bottom: 10px; }
.result-area .err { color: var(--error); }
.result-area .muted { color: var(--text-muted); }

/* THUMB GRID (PDF) */
.preview-area { margin: 16px 0; }
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.thumb-cell { border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 8px; text-align: center; background: var(--bg); cursor: pointer; position: relative; }
.thumb-cell.selected { border-color: var(--accent); background: var(--accent-soft); }
.thumb-img { display: flex; align-items: center; justify-content: center; height: 160px; overflow: hidden; }
.thumb-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.thumb-num { display: block; font-size: 0.78rem; color: var(--text-muted); margin-top: 6px; }
.thumb-cell .btn-mini { margin-top: 4px; }

/* CROP EDITOR */
.crop-editor { margin: 16px 0; }
.crop-stage { position: relative; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: crosshair; max-width: 100%; }
.crop-stage img { display: block; pointer-events: none; }
.crop-box { position: absolute; border: 2px solid var(--accent); background: rgba(37,99,235,0.15); cursor: move; box-shadow: 0 0 0 9999px rgba(0,0,0,0.4); }

/* META TABLE */
.meta-area { margin: 16px 0; }
.meta-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.meta-table th { text-align: left; padding: 8px 12px; background: var(--bg-subtle); border: 1px solid var(--border); width: 40%; color: var(--text-muted); font-weight: 600; }
.meta-table td { padding: 8px 12px; border: 1px solid var(--border); color: var(--text); word-break: break-word; }

/* NOTICE */
.notice { border-radius: var(--radius); padding: 16px 20px; margin: 12px 0; }
.notice h3 { margin-top: 0; }
.notice-warn { background: var(--warn-soft); border: 1px solid var(--warn); color: var(--text); }
.notice code { background: var(--bg); padding: 2px 6px; border-radius: 4px; font-family: var(--mono); font-size: 0.85rem; }

/* CALCULATOR */
.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.calc-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--text-muted); }
.calc-grid input, .calc-grid select { padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 0.95rem; }
.calc-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.stat { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.stat.big { grid-column: 1 / -1; background: var(--accent-soft); border-color: var(--accent); }
.stat-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-val { font-size: 1.4rem; font-weight: 700; color: var(--text); }
.stat.big .stat-val { font-size: 1.8rem; color: var(--accent); }
.formula { grid-column: 1 / -1; font-size: 0.82rem; color: var(--text-faint); margin: 4px 0 0; font-family: var(--mono); }

/* TEXT TOOLS */
.text-tool textarea { width: 100%; min-height: 160px; padding: 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg); color: var(--text); font-family: var(--mono); font-size: 0.9rem; resize: vertical; }
.text-tool textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.text-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; align-items: center; }
.text-actions select { padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.code-output { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; font-family: var(--mono); font-size: 0.88rem; overflow: auto; max-height: 360px; white-space: pre-wrap; word-break: break-word; margin: 12px 0; color: var(--text); }
.validate-status { padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 600; margin: 12px 0; }
.validate-status.valid { background: var(--success-soft); color: var(--success); }
.validate-status.invalid { background: var(--error-soft); color: var(--error); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.case-buttons { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }

/* SEO SECTIONS on tool page */
.seo-section { margin-top: 28px; }
.seo-section ul, .seo-section ol { padding-left: 20px; }
.seo-section li { margin-bottom: 6px; }
.privacy-box { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.privacy-box h2 { margin-top: 0; }

/* STATIC PAGE / BLOG */
.static-page, .blog-post { max-width: 760px; margin: 0 auto; }
.static-page h2, .blog-post h2 { margin-top: 24px; }

/* 404 */
.not-found { text-align: center; padding: 60px 20px; max-width: 560px; margin: 0 auto; }

/* TOAST */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg); padding: 12px 20px; border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 1000; opacity: 0; transition: opacity 0.2s, transform 0.2s; font-size: 0.9rem; max-width: 90vw; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.warn { background: var(--warn); color: white; }
.toast.err { background: var(--error); color: white; }

/* ADS placeholder (disabled until configured) */
.ad-slot { display: none; }

/* FOOTER */
footer.site-footer { border-top: 1px solid var(--border); background: var(--bg-subtle); padding: 32px 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; }
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); margin-bottom: 10px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 6px; }
.footer-col a { color: var(--text-muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 0.82rem; color: var(--text-faint); text-align: center; }

/* RESPONSIVE */
@media (max-width: 860px) {
  h1 { font-size: 1.7rem; }
  .hero h1 { font-size: 1.9rem; }
  .hero-sub { font-size: 1rem; }
  #nav-toggle { display: flex; }
  nav#nav-menu { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); flex-direction: column; padding: 8px; box-shadow: var(--shadow); margin: 0; }
  nav#nav-menu.open { display: flex; }
  nav#nav-menu a { padding: 12px 16px; }
  .header-search input { width: 120px; }
  .file-row { grid-template-columns: 1fr 70px 80px auto; font-size: 0.82rem; }
  .file-row .file-extra { display: none; }
  .file-row.reorder { grid-template-columns: 20px 1fr 70px auto; }
  .stat-val { font-size: 1.2rem; }
  .stat.big .stat-val { font-size: 1.5rem; }
}
@media (max-width: 520px) {
  .header-search { display: none; }
  .hero h1 { font-size: 1.6rem; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
}


/* ============ BRAND LOGO MARK (ATW monogram) ============ */
.logo-mark {
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.5px;
  min-width: 32px; min-height: 32px; line-height: 1; text-transform: uppercase;
}
/* ============ MULTI-PAGE BREADCRUMB (enhanced) ============ */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; padding: 0; margin: 0 0 18px; }
.breadcrumb li { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-faint); }
.breadcrumb li + li::before { content: "/"; color: var(--text-faint); margin-right: 2px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); text-decoration: none; }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 600; }

/* ============ MARKETPLACE OPTIMIZER ============ */
.marketplace-card { padding: 18px; }
.mp-selector { margin-bottom: 14px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg-subtle); color: var(--text-muted); font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: background 0.12s, border-color 0.12s, color 0.12s; font-family: var(--font); }
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.selected { background: var(--accent); border-color: var(--accent); color: white; }
.mp-req { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.mp-req-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mp-req-head h3 { margin: 0; font-size: 1.05rem; }
.mp-badge { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 10px; border-radius: 999px; }
.mp-badge.verified { background: var(--success-soft); color: var(--success); }
.mp-badge.unverified { background: var(--warn-soft); color: var(--warn); }
.mp-req-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 14px 0; }
.mp-stat { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.mp-stat .stat-label { font-size: 0.72rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.mp-stat .stat-val { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.mp-bg { font-size: 0.88rem; color: var(--text-muted); margin: 8px 0 12px; }
.mp-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.mp-cols h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); margin: 0 0 6px; }
.mp-list { list-style: none; padding: 0; margin: 0; font-size: 0.86rem; }
.mp-list li { padding: 3px 0; color: var(--text-muted); }
.mp-source { font-size: 0.8rem; color: var(--text-faint); margin: 12px 0 0; word-break: break-all; }
.mp-source a { color: var(--accent); }
.mp-row { display: block; padding: 10px 12px; }
.mp-row-main { display: grid; grid-template-columns: 1fr 90px 90px 130px auto; gap: 10px; align-items: center; }
.mp-issues { list-style: none; padding: 6px 0 0 18px; margin: 6px 0 0; font-size: 0.82rem; }
.mp-issues li { padding: 2px 0; }
.mp-issues li.lvl-fail { color: var(--error); }
.mp-issues li.lvl-warn { color: var(--warn); }
.mp-issues li.lvl-info { color: var(--text-muted); }
.validate-status.valid { background: var(--success-soft); color: var(--success); }
.validate-status.warn { background: var(--warn-soft); color: var(--warn); }
.validate-status.invalid { background: var(--error-soft); color: var(--error); }

/* ============ LANDING-PAGE LAYOUT ============ */
.tool-page-full { max-width: 900px; margin: 0 auto; }
.tool-mount { margin: 20px 0 28px; }
.page-intro { font-size: 1.08rem; color: var(--text-muted); margin-bottom: 18px; }
.preset-banner { display: inline-flex; align-items: center; gap: 8px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 6px 14px; font-size: 0.82rem; font-weight: 600; margin-bottom: 16px; }
.related-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 8px; }
.related-pages a { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; color: var(--text); font-size: 0.9rem; transition: border-color 0.12s, transform 0.12s; }
.related-pages a:hover { border-color: var(--accent); transform: translateY(-1px); text-decoration: none; }

/* ============ DIRECTORY SEARCH BAR (category / all-tools) ============ */
.dir-search-wrap { margin-bottom: 18px; }
.dir-search-wrap input { width: 100%; max-width: 480px; padding: 12px 16px; font-size: 1rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text); }
.dir-search-wrap input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ============ BEFORE/AFTER COMPARE (reserved for future image tools) ============ */
.compare-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.compare-pair figure { margin: 0; }
.compare-pair figcaption { font-size: 0.8rem; color: var(--text-faint); text-align: center; margin-top: 4px; }
.compare-pair img { max-width: 100%; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.checker { background: conic-gradient(var(--bg-subtle) 90deg, var(--bg-elevated) 90deg 180deg, var(--bg-subtle) 180deg 270deg, var(--bg-elevated) 270deg); background-size: 16px 16px; }

/* ============ ACCESSIBILITY ============ */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ============ MULTI-PAGE HEADER SEARCH (clean URL nav) ============ */
.header-search input { width: 200px; }

/* ============ RESPONSIVE TWEAKS ============ */
@media (max-width: 860px) {
  .mp-row-main { grid-template-columns: 1fr 70px 80px auto; font-size: 0.82rem; }
  .mp-row-main .file-extra { display: none; }
  .mp-req-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .mp-req-grid { grid-template-columns: 1fr; }
  .mp-cols { grid-template-columns: 1fr; }
  .compare-pair { grid-template-columns: 1fr; }
}
