:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --sidebar: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #3b82f6;
  --primary-soft: #eff6ff;
  --primary-dark: #1d4ed8;
  --accent: #0ea5e9;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15,23,42,.06), 0 4px 12px rgba(15,23,42,.04);
  --shadow-lg: 0 4px 24px rgba(15,23,42,.08);
  --font: "Inter", "Noto Sans TC", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* Layout shell - Style B */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; flex-shrink: 0; background: var(--sidebar);
  border-right: 1px solid var(--border); padding: 20px 14px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .logo {
  display: flex; align-items: center; gap: 10px; font-weight: 700;
  font-size: 1.15rem; color: var(--text); padding: 8px 10px 20px;
  text-decoration: none;
}
.sidebar .logo:hover { text-decoration: none; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #0ea5e9);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px;
}
.nav-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 8px; color: var(--muted); font-size: 0.92rem; font-weight: 500;
  text-decoration: none; margin-bottom: 2px; transition: .15s;
}
.nav-item:hover { background: var(--primary-soft); color: var(--primary-dark); text-decoration: none; }
.nav-item.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: rgba(255,255,255,.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); padding: 12px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-weight: 600; font-size: 1rem; }
.lang-switch { display: flex; gap: 4px; }
.lang-switch a {
  padding: 6px 12px; border-radius: 8px; font-size: 0.85rem; color: var(--muted);
  text-decoration: none; font-weight: 500;
}
.lang-switch a.active, .lang-switch a:hover { background: var(--primary-soft); color: var(--primary-dark); }
.content { padding: 28px 32px 48px; max-width: 1100px; width: 100%; margin: 0 auto; }

/* Cards grid */
.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: 1.65rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.page-head p { color: var(--muted); font-size: 0.98rem; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tool-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; text-decoration: none; color: inherit; transition: .2s;
  display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow);
}
.tool-card:hover { border-color: #bfdbfe; box-shadow: var(--shadow-lg); transform: translateY(-2px); text-decoration: none; }
.tool-card .icon {
  width: 44px; height: 44px; border-radius: 10px; background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center; font-size: 1.35rem; margin-bottom: 4px;
}
.tool-card h3 { font-size: 1.02rem; font-weight: 600; }
.tool-card p { font-size: 0.86rem; color: var(--muted); line-height: 1.45; }

/* Tool page - Style C */
.tool-hero { text-align: center; margin-bottom: 20px; }
.tool-hero h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 8px; }
.tool-hero p { color: var(--muted); max-width: 520px; margin: 0 auto 12px; }
.badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.badge {
  font-size: 0.78rem; padding: 5px 12px; border-radius: 20px; background: var(--primary-soft);
  color: var(--primary-dark); font-weight: 500;
}
.workspace {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 28px; box-shadow: var(--shadow); margin-bottom: 28px;
}
.dropzone {
  border: 2px dashed #cbd5e1; border-radius: 12px; padding: 36px 20px; text-align: center;
  background: #f8fafc; transition: .2s; cursor: pointer;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--primary); background: var(--primary-soft); }
.dropzone .dz-title { font-weight: 600; margin-bottom: 6px; }
.dropzone .dz-hint { font-size: 0.88rem; color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--primary); color: #fff; border: none; padding: 11px 22px;
  border-radius: 10px; font-weight: 600; font-size: 0.95rem; cursor: pointer;
  transition: .15s; box-shadow: 0 2px 8px rgba(59,130,246,.3);
}
.btn:hover { background: var(--primary-dark); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-outline {
  background: transparent; color: var(--primary-dark); border: 1.5px solid var(--border);
  box-shadow: none;
}
.btn-outline:hover { background: var(--primary-soft); border-color: #bfdbfe; }
.field { margin-bottom: 14px; text-align: left; }
.field label { display: block; font-size: 0.88rem; font-weight: 500; margin-bottom: 6px; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font: inherit; background: #fff;
}
.field input:focus, .field select:focus { outline: 2px solid #bfdbfe; border-color: var(--primary); }
.status { margin-top: 12px; font-size: 0.9rem; color: var(--muted); min-height: 1.4em; }

.lower-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 8px; }
@media (max-width: 800px) { .lower-grid { grid-template-columns: 1fr; } }
.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.panel h2 { font-size: 1.05rem; margin-bottom: 14px; font-weight: 600; }
.steps { list-style: none; }
.steps li { display: flex; gap: 12px; margin-bottom: 14px; font-size: 0.92rem; }
.steps .num {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--primary);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.82rem; font-weight: 700;
}
.faq-item { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
.faq-q { padding: 12px 14px; font-weight: 600; font-size: 0.9rem; cursor: pointer; background: #f8fafc; }
.faq-a { padding: 12px 14px; font-size: 0.88rem; color: var(--muted); display: none; border-top: 1px solid var(--border); }
.faq-item.open .faq-a { display: block; }

.site-footer {
  margin-top: auto; padding: 24px 32px; border-top: 1px solid var(--border);
  background: var(--surface); font-size: 0.85rem; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--primary-dark); }

/* Mobile */
.menu-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; cursor: pointer; }
@media (max-width: 900px) {
  .sidebar { position: fixed; left: -260px; z-index: 100; transition: left .25s; box-shadow: var(--shadow-lg); }
  .sidebar.open { left: 0; }
  .menu-toggle { display: inline-flex; }
  .content { padding: 20px 16px 40px; }
}
.cat-section { margin-bottom: 36px; }
.cat-section h2 { font-size: 1.15rem; margin-bottom: 14px; font-weight: 600; }


/* Ad slot */
.ad-banner-wrap {
  max-width: 728px;
  width: 100%;
  margin: 1.25rem auto 1.5rem;
  text-align: center;
  min-height: 90px;
}
.content .ad-banner-wrap { margin-top: 0.5rem; }


/* Keep language switch clear of floating ads (top-right) */
.topbar {
  padding-right: 200px !important;
  flex-wrap: wrap;
  gap: 8px;
}
.lang-switch {
  flex-wrap: wrap;
  max-width: 420px;
  justify-content: flex-end;
  gap: 4px;
  z-index: 60;
  position: relative;
}
.lang-switch a {
  padding: 4px 8px;
  font-size: 0.82rem;
  border-radius: 6px;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .topbar { padding-right: 16px !important; }
  .lang-switch { max-width: 100%; }
}


/* Language links under logo (avoid floating ad overlap) */
.sidebar-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 10px 14px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  margin-bottom: 8px;
}
.sidebar-langs a {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted, #64748b);
  padding: 3px 7px;
  border-radius: 6px;
  text-decoration: none;
}
.sidebar-langs a:hover {
  background: var(--primary-soft, #eff6ff);
  color: var(--primary-dark, #1d4ed8);
  text-decoration: none;
}
.sidebar-langs a.active {
  background: var(--primary-soft, #eff6ff);
  color: var(--primary-dark, #1d4ed8);
  font-weight: 600;
}
/* Hide topbar language switch (moved to sidebar) */
.topbar .lang-switch { display: none !important; }
.topbar { padding-right: 28px !important; }

/* Force tool pages to match homepage cool gray-blue */
body {
  background: #f4f6f9 !important;
  color: #0f172a !important;
}
.app, .main, .content {
  background: #f4f6f9 !important;
}
.page-v2, .tool-page-a, .workspace-host {
  background: transparent !important;
}
.tool-hero h1 { color: #0f172a !important; }
.tool-hero p { color: #64748b !important; }




/* ===== Q&A / lower blocks only (do not touch upper tool form width) ===== */
.content .tool-lower-a,
.content .faq-panel-a,
.content section.article-block#faq,
.content section.article-block[data-faq],
.content .guide-panel-a,
.content .section-head,
.content .related-grid {
  max-width: 1120px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.content section.article-block#faq,
.content section.article-block[data-faq] {
  padding: 8px 0 24px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.content .tool-lower-a {
  display: grid !important;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) !important;
  gap: 16px !important;
  align-items: start !important;
}
@media (max-width: 900px) {
  .content .tool-lower-a {
    grid-template-columns: 1fr !important;
  }
}


/* Tool page lower content: less crowded, consistent type */
.content .steps-a {
  max-width: 1120px;
  margin: 16px auto 8px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-sizing: border-box;
}
.content .steps-title-a {
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  margin-bottom: 10px !important;
}
.content .step-a, .content .step-text-a {
  font-size: 0.92rem !important;
  color: #475569 !important;
  line-height: 1.55 !important;
}
.content .tip-card {
  max-width: 1120px;
  margin: 12px auto !important;
  box-sizing: border-box;
}
.content .tool-lower-a {
  max-width: 1120px;
  margin: 12px auto 20px !important;
  gap: 14px !important;
}
.content .faq-panel-a .article-block {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px !important;
}
.content .faq-panel-a h2 {
  font-size: 1.05rem !important;
  margin: 0 0 12px !important;
  color: #0f172a !important;
}
.content .faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #f8fafc;
}
.content .faq-q {
  font-weight: 600;
  font-size: 0.92rem !important;
  color: #0f172a !important;
  margin: 0 !important;
}
.content .faq-a {
  font-size: 0.9rem !important;
  color: #64748b !important;
  margin: 6px 0 0 !important;
  line-height: 1.55 !important;
}
.content .section-head,
.content .related-grid {
  max-width: 1120px;
  margin-left: auto !important;
  margin-right: auto !important;
}
.content .section-head h2 {
  font-size: 1rem !important;
  color: #0f172a !important;
}
/* hide leftover SEO filler blocks if any remain */
.content .v19-content-quality,
.content section.article-block[data-value-content] {
  display: none !important;
}


.subcat-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
  margin: 18px 0 10px;
  letter-spacing: 0.02em;
}
.cat-section .subcat-title:first-of-type {
  margin-top: 4px;
}


.cross-site-card {
  margin: 28px auto 8px;
  max-width: 720px;
  padding: 22px 24px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  text-align: center;
  box-shadow: 0 4px 16px rgba(15,23,42,.04);
}
.cross-site-card h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  color: #0f172a;
}
.cross-site-card p {
  margin: 0 auto 14px;
  max-width: 560px;
  color: #64748b;
  line-height: 1.7;
  font-size: 0.95rem;
}
.cross-site-card a {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  background: #0f172a;
  color: #fff;
}
.cross-site-card a:hover {
  background: #1e293b;
  text-decoration: none;
}
