/* WebTech360 File Viewer — styles. Mobile-first, simple, fast. */
:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-soft2: #f1f5f9;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --wrap: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; color: var(--ink); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 18px; }
.sr-only, .skip-link {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: 8px; left: 8px; width: auto; height: auto;
  clip: auto; background: #fff; padding: 10px 16px; border-radius: 8px; z-index: 99;
}

/* ---- buttons ---- */
.btn {
  display: inline-block; cursor: pointer;
  background: var(--blue); color: #fff;
  border: 1px solid var(--blue); border-radius: 10px;
  padding: 11px 20px; font-size: 16px; font-weight: 600;
  font-family: inherit; line-height: 1;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); text-decoration: none; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); font-weight: 500; }
.btn-ghost:hover { background: var(--bg-soft2); }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: saturate(180%) blur(10px); backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 10px 14px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }

/* header search */
.header-search { position: relative; flex: 1 1 200px; min-width: 130px; max-width: 420px; display: flex; align-items: center; }
.search-ico { position: absolute; left: 10px; font-size: 13px; opacity: .6; pointer-events: none; }
.header-search input { width: 100%; padding: 9px 12px 9px 30px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 14px; font-family: inherit; background: var(--bg-soft); color: var(--ink); }
.header-search input:focus { outline: none; border-color: var(--blue); background: #fff; }
.search-results { position: absolute; top: 112%; left: 0; right: 0; list-style: none; margin: 0; padding: 5px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  max-height: 60vh; overflow: auto; z-index: 30; }
.search-results li a { display: block; padding: 8px 10px; border-radius: 7px; color: var(--ink); font-size: 14px; }
.search-results li a:hover { background: var(--bg-soft2); text-decoration: none; }
.search-results .s-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.search-results .s-ext { color: var(--blue); font-family: ui-monospace, monospace; font-size: 12px; white-space: nowrap; }
.search-results .s-apps { display: block; margin-top: 1px; font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-empty { padding: 10px; color: var(--muted); font-size: 14px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.footer-brand .brand-mark { vertical-align: -5px; }
.brand-text { font-size: 16px; }
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a { color: var(--ink); padding: 8px 12px; border-radius: 8px; font-size: 15px; font-weight: 500; }
.main-nav a:hover { background: var(--bg-soft2); text-decoration: none; }

.lang-switch { position: relative; }
.lang-current {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 34px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.lang-switch:hover .lang-current, .lang-switch:focus-within .lang-current { border-color: var(--blue); }
.lang-menu {
  position: absolute; right: 0; top: 100%; margin-top: 8px; list-style: none; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); min-width: 160px; display: none; z-index: 40;
}
/* transparent bridge over the gap so moving the cursor to the menu keeps it open */
.lang-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.lang-switch:hover .lang-menu, .lang-switch:focus-within .lang-menu { display: block; }
.lang-menu a { display: block; padding: 8px 12px; border-radius: 7px; color: var(--ink); font-size: 15px; }
.lang-menu a:hover { background: var(--bg-soft2); text-decoration: none; }
.lang-menu a[aria-current] { color: var(--blue); font-weight: 600; }

/* ---- hero ---- */
.hero { padding: 40px 0 8px; }
.hero-home { padding: 56px 0 12px; text-align: center; background: linear-gradient(180deg, var(--bg-soft), #fff); }
.hero h1 { font-size: clamp(28px, 6vw, 44px); margin: 0 0 12px; letter-spacing: -.02em; }
.lede { font-size: clamp(17px, 2.4vw, 20px); color: var(--muted); margin: 0 auto; max-width: 60ch; }
.format-caps { margin: 4px 0 22px; padding: 12px 16px; font-size: clamp(15px, 2vw, 16.5px);
  color: var(--ink); background: var(--bg-soft); border-left: 3px solid var(--blue); border-radius: 8px; }
.hero-home .lede { margin: 0 auto; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }

/* ---- the viewer ---- */
.viewer-section { padding-top: 24px; padding-bottom: 24px; }
.viewer { max-width: 920px; margin: 0 auto; }
.vw-drop {
  border: 2px dashed #cbd5e1; border-radius: 18px; background: var(--bg-soft);
  padding: 48px 24px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.vw-drop:hover, .vw-drop:focus, .vw-drop.is-over { border-color: var(--blue); background: #eff6ff; outline: none; }
.vw-icon { color: var(--blue); margin-bottom: 10px; }
.vw-drop-title { font-size: 20px; font-weight: 700; margin: 4px 0; }
.vw-drop-sub { color: var(--muted); margin: 0 0 18px; }
.vw-choose { margin-top: 6px; }
.vw-privacy { text-align: center; color: var(--muted); font-size: 14px; margin: 14px 0 0; }

.vw-stage { position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.vw-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; background: var(--bg-soft); border-bottom: 1px solid var(--line);
}
.vw-filename { font-weight: 600; font-size: 14px; word-break: break-all; }
.vw-spacer { flex: 1; }
.vw-tools { display: flex; gap: 6px; }
.vw-status { padding: 14px; text-align: center; color: var(--muted); background: var(--bg-soft); }
.vw-status::before {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px;
  border: 2px solid var(--line); border-top-color: var(--blue); border-radius: 50%;
  vertical-align: -2px; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.vw-content { background: #fff; max-height: 80vh; overflow: auto; }

/* full-screen toggle button */
.vw-iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 34px; padding: 0; cursor: pointer;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
  transition: background .12s, border-color .12s;
}
.vw-iconbtn:hover { background: var(--bg-soft2); border-color: var(--blue); }
.vw-iconbtn .vw-fs-exit { display: none; }
.vw-iconbtn.is-on .vw-fs-enter { display: none; }
.vw-iconbtn.is-on .vw-fs-exit { display: inline; }
/* flex buttons need this or the [hidden] attribute is overridden by display:inline-flex */
.vw-iconbtn[hidden], .vw-md-navbtn[hidden] { display: none; }

/* "Open another file" — text on desktop, icon-only on mobile (see media query) */
.vw-reset { display: inline-flex; align-items: center; gap: 6px; }
.vw-reset-ico { display: none; }

/* full-screen layout — native Fullscreen API + CSS-overlay fallback (e.g. iOS) */
.viewer.is-fullscreen { position: fixed; inset: 0; z-index: 2000; margin: 0; padding: 0; background: var(--bg-soft); }
.vw-stage:fullscreen, .vw-stage:-webkit-full-screen, .viewer.is-fullscreen .vw-stage {
  display: flex; flex-direction: column;
  width: 100vw; height: 100vh; max-width: none; border: 0; border-radius: 0; box-shadow: none;
}
.vw-stage:fullscreen .vw-content, .vw-stage:-webkit-full-screen .vw-content, .viewer.is-fullscreen .vw-content {
  flex: 1 1 auto; max-height: none; height: auto;
}
.vw-stage:fullscreen .vw-3d, .vw-stage:fullscreen .vw-map,
.vw-stage:-webkit-full-screen .vw-3d, .vw-stage:-webkit-full-screen .vw-map,
.viewer.is-fullscreen .vw-3d, .viewer.is-fullscreen .vw-map { height: 100%; }
.viewer.is-fullscreen .vw-privacy { display: none; }

/* renderers */
.vw-img-wrap, .vw-comic { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px; background: #fbfbfd; }
.vw-img { max-width: 100%; border-radius: 6px; box-shadow: var(--shadow); }
.vw-media { padding: 24px; text-align: center; background: #0b1220; }
.vw-media audio { width: 100%; }
.vw-media video { width: 100%; max-height: 70vh; border-radius: 8px; }
.vw-code { margin: 0; padding: 16px; font-size: 13.5px; line-height: 1.55; overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #fff; }
.vw-hex { font-size: 12px; line-height: 1.45; white-space: pre; }
.vw-3d { width: 100%; height: 520px; background: #0f1729; }
.vw-3d canvas { display: block; }
.vw-map { width: 100%; height: 520px; }
.vw-map a { color: inherit; }
/* email */
.vw-email { background: #fff; }
.vw-email-head { width: 100%; border-collapse: collapse; }
.vw-email-head th, .vw-email-head td { border-bottom: 1px solid var(--line); padding: 8px 14px; text-align: left; font-size: 14px; vertical-align: top; }
.vw-email-head th { width: 90px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.vw-email-frame { width: 100%; height: 560px; border: 0; background: #fff; }
.vw-email-text { white-space: pre-wrap; }
/* notebook */
.vw-nb { padding: 8px 18px 18px; background: #fff; }
.vw-nb .nb-cell { margin: 12px 0; }
.nb-prompt { color: #94a3b8; font-family: ui-monospace, monospace; font-size: 12px; margin-bottom: 2px; }
.nb-out, .nb-html { margin: 0 0 6px; padding: 8px 12px; background: var(--bg-soft); overflow: auto; font-size: 13px; }
.nb-out { white-space: pre-wrap; font-family: ui-monospace, monospace; }
.nb-err { background: #fef2f2; color: #b91c1c; }
.nb-img { display: block; margin: 6px 0; max-width: 100%; }
.nb-html table { border-collapse: collapse; }
.nb-html th, .nb-html td { border: 1px solid var(--line); padding: 4px 8px; font-size: 13px; }
.vw-code code { font-family: inherit; }
.vw-md { padding: 22px 26px; }
/* markdown editor: Preview / Edit / Split with save-back (.md stays in-browser) */
.vw-md-wrap { display: flex; flex-direction: column; }
.vw-md-toolbar { position: sticky; top: 0; z-index: 6;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 12px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.vw-md-modes { display: inline-flex; gap: 2px; padding: 3px; background: var(--bg-soft2); border-radius: 9px; }
.vw-md-mode { border: 0; cursor: pointer; font-family: inherit; font-size: 13px;
  padding: 6px 12px; border-radius: 7px; background: transparent; color: var(--muted); }
.vw-md-mode.is-active { background: var(--bg); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
/* clicking a control shouldn't select its own label text */
.btn, .vw-md-mode, .vw-md-navbtn, .vw-iconbtn { -webkit-user-select: none; user-select: none; }
.vw-md-spacer { flex: 1; }
.vw-md-dirty { font-size: 12px; color: var(--muted); }
.vw-md-body { display: flex; align-items: stretch; min-height: 60vh; }
/* editor + highlight backdrop share identical text metrics so marks line up */
.vw-md-editor-wrap { position: relative; display: flex; min-width: 0; overflow: hidden; }
.vw-md-editor, .vw-md-highlights {
  margin: 0; padding: 18px 22px; box-sizing: border-box; tab-size: 2; letter-spacing: normal;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; line-height: 1.6;
  white-space: pre-wrap; overflow-wrap: break-word; word-break: break-word; }
.vw-md-editor { flex: 1 1 auto; min-width: 0; border: 0; outline: none; resize: none;
  position: relative; z-index: 1; overflow: auto; background: transparent; color: var(--ink); }
.vw-md-highlights { position: absolute; inset: 0; z-index: 0; overflow: hidden;
  color: transparent; pointer-events: none; background: var(--bg); }
.vw-md-mark { background: rgba(250, 204, 21, .45); border-radius: 2px; }
.vw-md-mark-cur { background: rgba(37, 99, 235, .5); border-radius: 2px; }
.vw-md-body .vw-md-preview { min-width: 0; overflow: auto; background: var(--bg); }
.vw-ed-error { padding: 16px 20px; color: #b91c1c; white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
/* drag handle between editor and preview (split mode) */
.vw-md-gutter { display: none; flex: 0 0 7px; cursor: col-resize; background: var(--line); position: relative; }
.vw-md-gutter::before { content: ""; position: absolute; inset: 0 -4px; }
.vw-md-gutter:hover { background: var(--blue); }
body.vw-md-dragging { cursor: col-resize; -webkit-user-select: none; user-select: none; }
/* per-mode pane visibility + sizing */
.vw-md-wrap[data-md-mode="preview"] .vw-md-editor-wrap,
.vw-md-wrap[data-md-mode="preview"] .vw-md-gutter { display: none; }
.vw-md-wrap[data-md-mode="preview"] .vw-md-body .vw-md-preview { flex: 1 1 auto; }
.vw-md-wrap[data-md-mode="edit"] .vw-md-body .vw-md-preview,
.vw-md-wrap[data-md-mode="edit"] .vw-md-gutter { display: none; }
.vw-md-wrap[data-md-mode="edit"] .vw-md-editor-wrap { flex: 1 1 auto; }
.vw-md-wrap[data-md-mode="split"] .vw-md-editor-wrap { flex: 0 0 var(--md-split, 50%); }
.vw-md-wrap[data-md-mode="split"] .vw-md-gutter { display: block; }
.vw-md-wrap[data-md-mode="split"] .vw-md-body .vw-md-preview { flex: 1 1 0; }
/* find & replace popup */
.vw-md-find { position: absolute; top: 100%; right: 8px; margin-top: 6px; z-index: 20;
  display: flex; flex-direction: column; gap: 6px; padding: 8px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.vw-md-find[hidden] { display: none; }
.vw-md-find-row { display: flex; align-items: center; gap: 6px; }
.vw-md-find-replace { display: none; }
.vw-md-find.show-replace .vw-md-find-replace { display: flex; }
.vw-md-rep-toggle { transition: transform .12s; }
.vw-md-find.show-replace .vw-md-rep-toggle { transform: rotate(90deg); }
.vw-md-find-input { width: 240px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px;
  font-family: inherit; font-size: 13px; background: var(--bg-soft); color: var(--ink); }
.vw-md-find-input:focus { outline: none; border-color: var(--blue); }
.vw-md-find-count { font-size: 12px; color: var(--muted); min-width: 36px; text-align: center; }
.vw-md-find-msg { font-size: 12px; color: var(--muted); white-space: nowrap; }
.vw-md-navbtn { display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--ink); cursor: pointer; font-size: 13px; line-height: 1; }
.vw-md-navbtn:hover { border-color: var(--blue); }
@media (max-width: 720px) {
  .vw-md-wrap[data-md-mode="split"] .vw-md-body { flex-direction: column; }
  .vw-md-wrap[data-md-mode="split"] .vw-md-editor-wrap { flex: 1 1 auto; border-bottom: 1px solid var(--line); min-height: 40vh; }
  .vw-md-wrap[data-md-mode="split"] .vw-md-gutter { display: none; }
  .vw-md-find-input { width: 150px; }
}
.vw-doc, .vw-pdf { padding: 16px; background: #f1f5f9; }
.vw-textdoc { max-width: 800px; margin: 0 auto; padding: 24px 28px; background: #fff; box-shadow: var(--shadow);
  white-space: pre-wrap; word-wrap: break-word; line-height: 1.6; }
.vw-doc-frame { width: 100%; height: 600px; border: 0; background: #fff; }
.vw-pdf { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.vw-pdf-page { box-shadow: var(--shadow); background: #fff; border-radius: 2px; max-width: 100%; }
.docx { background: #fff; box-shadow: var(--shadow); margin: 0 auto; }
.vw-epub-bar { display: flex; gap: 8px; justify-content: center; padding: 10px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.vw-epub { padding: 8px; background: #fff; }
.vw-tabs { display: flex; gap: 4px; padding: 8px 10px 0; background: var(--bg-soft); overflow-x: auto; }
.vw-tab { border: 1px solid var(--line); border-bottom: none; background: #fff; padding: 7px 14px;
  border-radius: 8px 8px 0 0; cursor: pointer; font-size: 14px; white-space: nowrap; font-family: inherit; }
.vw-tab.is-active { color: var(--blue); font-weight: 600; border-color: var(--blue); }
.vw-sheet { overflow: auto; }
.vw-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.vw-table td, .vw-table th { border: 1px solid var(--line); padding: 6px 10px; text-align: left; white-space: nowrap; }
.vw-table th, .vw-table tr:first-child td { background: var(--bg-soft2); font-weight: 600; }
.vw-unsupported { padding: 40px 24px; text-align: center; }
.vw-unsupported-title { font-size: 18px; font-weight: 700; margin: 0 0 8px; }

/* archive viewer: per-file open / download + inline preview */
.btn-sm { padding: 5px 11px; font-size: 13px; border-radius: 8px; line-height: 1.2; }
.vw-archive { background: #fff; }
.vw-arch-top { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.vw-arch-status { margin-right: auto; font-size: 13px; color: var(--muted); }
.vw-arch-top .btn[disabled] { opacity: .6; cursor: default; }
.vw-arch-table td, .vw-arch-table th { white-space: normal; }
.vw-arch-name { word-break: break-all; }
.vw-arch-actions { white-space: nowrap; display: flex; gap: 6px; justify-content: flex-end; }
.vw-arch-table .note { padding: 0 14px; }
.vw-arch-preview { border-top: 3px solid var(--blue); }
.vw-arch-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; background: var(--bg-soft); border-bottom: 1px solid var(--line); position: sticky; top: 0; }
.vw-arch-bar strong { font-size: 14px; word-break: break-all; }
.vw-arch-host { background: #fff; }

/* snapshot + annotate overlay */
.vw-snap { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column; background: rgba(2, 6, 23, .72); }
.vw-snap-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 8px 10px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.vw-snap-tool { display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; font-size: 15px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--ink); }
.vw-snap-tool.is-active { border-color: var(--blue); color: var(--blue); background: var(--bg-soft2); }
.vw-snap-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.vw-snap-swatch { width: 22px; height: 22px; border-radius: 5px; border: 1px solid var(--line); cursor: pointer; padding: 0; }
.vw-snap-color { width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: none; cursor: pointer; }
.vw-snap-width { width: 90px; }
.vw-snap-spacer { flex: 1; }
.vw-snap-stage { flex: 1; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 14px; }
.vw-snap-canvas { max-width: 100%; max-height: 100%; background: #fff; box-shadow: var(--shadow); cursor: crosshair; touch-action: none; }
.vw-snap-textinput { position: fixed; z-index: 100; min-width: 40px; font-family: sans-serif;
  border: 1px dashed var(--blue); background: rgba(255, 255, 255, .92); color: #111; padding: 1px 4px; outline: none; }

/* ---- features ---- */
.features { display: grid; gap: 16px; grid-template-columns: 1fr; padding-top: 24px; padding-bottom: 8px; }
.feature { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature-icon { font-size: 26px; }
.feature h2 { font-size: 18px; margin: 8px 0 4px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---- format cards ---- */
.section-title { font-size: 24px; margin: 36px 0 6px; }
.cat-block { margin: 28px 0; }
.cat-title { font-size: 20px; margin: 0 0 2px; }
.cat-sub { color: var(--muted); margin: 0 0 14px; font-size: 15px; }
.card-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.card {
  display: flex; flex-direction: column; gap: 4px;
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  background: #fff; color: var(--ink); transition: border-color .12s, transform .12s, box-shadow .12s;
}
.card:hover { border-color: var(--blue); box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.card-ext { font-size: 13px; font-weight: 700; color: var(--blue); font-family: ui-monospace, monospace; }
.card-name { font-size: 14px; color: var(--ink); line-height: 1.3; overflow-wrap: anywhere; word-break: break-word; }
.card-all { justify-content: center; align-items: center; background: var(--bg-soft); font-weight: 600; color: var(--blue); }

/* ---- prose ---- */
.prose { max-width: 760px; margin: 0 auto; padding-top: 18px; padding-bottom: 8px; }
.prose h2 { font-size: 24px; margin: 34px 0 10px; }
.prose h3 { font-size: 19px; margin: 24px 0 8px; }
.prose p, .prose li { color: #1e293b; }
.prose .note { color: var(--muted); font-size: 15px; }
.steps { padding-left: 20px; }
.steps li { margin: 8px 0; }
.lib-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.lib-list li a {
  display: inline-block; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; background: var(--bg-soft); font-size: 14px; font-weight: 500;
}
.facts-table { width: 100%; border-collapse: collapse; margin: 8px 0 4px; font-size: 15px; }
.facts-table th, .facts-table td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.facts-table th { width: 38%; background: var(--bg-soft); font-weight: 600; color: var(--ink); white-space: nowrap; }
.facts-table td code { font-size: 13px; word-break: break-all; background: var(--bg-soft2); padding: 1px 5px; border-radius: 4px; }
.facts-table td code + code { margin-left: 4px; }
.prose h2[id] { scroll-margin-top: 76px; }
.cat-block { scroll-margin-top: 76px; }

.faq details { border: 1px solid var(--line); border-radius: 10px; padding: 4px 16px; margin: 10px 0; background: #fff; }
.faq summary { cursor: pointer; font-weight: 600; padding: 10px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "＋"; color: var(--blue); margin-right: 8px; font-weight: 700; }
.faq details[open] summary::before { content: "－"; }
.faq p { margin: 0 0 12px; color: #334155; }

/* ---- footer ---- */
.site-footer { margin-top: 56px; border-top: 1px solid var(--line); background: var(--bg-soft); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; padding: 36px 18px 24px; }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 34ch; }
.footer-col h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 10px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 6px 0; }
.footer-col a { color: var(--ink); font-size: 15px; }
.footer-base {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between;
  padding: 16px 18px 28px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line);
}

/* ---- responsive ---- */
@media (min-width: 480px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 620px) {
  .features { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
@media (max-width: 560px) {
  .header-search { order: 5; flex-basis: 100%; max-width: none; }
  /* collapse the reset button to an icon and keep it clear of the full-screen icon */
  .vw-reset { width: 36px; height: 34px; padding: 0; justify-content: center; border-radius: 8px; margin-left: 6px; }
  .vw-reset .vw-reset-label { display: none; }
  .vw-reset .vw-reset-ico { display: block; }
  .vw-reset:hover { border-color: var(--blue); }
}
/* desktop/tablet: center the search box between the logo and the nav */
@media (min-width: 561px) {
  .header-search { flex: 0 1 460px; max-width: 460px; margin-left: auto; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .header-inner { gap: 8px 8px; }
  .main-nav { gap: 0; }
  .main-nav a { padding: 8px 7px; font-size: 14px; }
  .brand { gap: 6px; }
  .brand-text { font-size: 14px; }
  .brand-suffix { display: none; }
  .lang-current { min-width: 34px; height: 32px; }
  .vw-drop { padding: 36px 16px; }
  .hero { padding: 28px 0 4px; }
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8edf5; --muted: #94a3b8; --line: #233044;
    --bg: #0b1220; --bg-soft: #0f1729; --bg-soft2: #16213a;
  }
  body { background: var(--bg); }
  .site-header { background: rgba(11, 18, 32, .85); }
  .btn-ghost, .card, .vw-stage, .feature, .faq details, .lang-menu, .search-results { background: #0f1729; }
  .header-search input:focus { background: #0f1729; }
  .vw-content, .vw-code, .vw-md, .docx, .vw-img-wrap, .vw-comic, .vw-doc, .vw-pdf { background: #0f1729; color: var(--ink); }
  .vw-table th, .vw-table tr:first-child td { background: #16213a; }
  .lib-list li a, .vw-tab { background: #16213a; color: var(--ink); }
}

/* ============================================================================
   converter.cloudo3.com theme — a soft, calm look (gentle indigo + lavender),
   distinct from the viewer's blue. Kept as an override block at the end.
   ============================================================================ */
:root {
  --blue: #0071ff;        /* primary blue (recolours buttons, links, accents) */
  --blue-dark: #005ce6;   /* darker blue for hover/text */
  --accent2: #4da3ff;     /* lighter blue for gentle gradients */
}

/* Barely-tinted hero, centered */
.hero, .hero-home {
  text-align: center;
  padding-top: 44px; padding-bottom: 30px;
  background: linear-gradient(135deg, #f2f8ff 0%, #f7fbff 100%);
  border-bottom: 1px solid var(--line);
}
.hero .wrap, .hero-home .wrap { max-width: 860px; }
.hero .lede, .hero-home .lede { margin-left: auto; margin-right: auto; }
.section-title { text-align: center; }

/* Soft-gradient headline (safe fallback where background-clip:text is unsupported) */
.hero h1, .hero-home h1 { color: var(--blue-dark); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero h1, .hero-home h1 {
    background: linear-gradient(90deg, #0071ff, #4da3ff);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
  }
}

/* Conversion cards → soft "chip" with FROM → TO */
.card-grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.card { border-radius: 12px; padding: 16px 14px; text-align: center; }
.card:hover { border-color: #b8d8ff; box-shadow: 0 8px 20px rgba(0, 113, 255, .12); transform: translateY(-2px); }
.card-ext {
  display: inline-block; margin: 0 0 6px; padding: 4px 11px; border-radius: 999px;
  font-family: var(--font); font-weight: 700; font-size: 13px;
  color: var(--blue-dark); background: #e8f2ff;
}
.card-name { display: block; font-size: 12.5px; color: var(--muted); }

/* Brand accent (soft, no heavy header border) */
.brand-suffix { color: var(--blue-dark); font-weight: 600; }

@media (prefers-color-scheme: dark) {
  .hero, .hero-home { background: linear-gradient(135deg, #0b1526 0%, #0d1a30 100%); border-bottom-color: #233044; }
  .card-ext { color: #bcd9ff; background: #10243f; }
  .card:hover { border-color: #274a72; }
}

/* ---- conversion tool ---- */
.ct { max-width: 640px; margin: 0 auto; }
.ct-drop { border: 2px dashed #bcd0ea; border-radius: 16px; background: var(--bg-soft); padding: 34px 18px; text-align: center; cursor: pointer; transition: border-color .12s, background .12s; }
.ct-drop:hover, .ct-drop.is-over { border-color: var(--blue); background: #f0f6ff; }
.ct-drop:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.ct-drop .vw-icon { color: var(--blue); }
.ct-drop-title { font-weight: 700; font-size: 17px; margin: 8px 0 4px; }
.ct-drop-sub { color: var(--muted); margin: 0 0 14px; font-size: 14px; }
.ct-choose { pointer-events: none; }
.ct-panel { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ct-list { list-style: none; margin: 0; padding: 0; }
.ct-file { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ct-file-name { flex: 1; word-break: break-all; }
.ct-file-size { color: var(--muted); font-size: 13px; white-space: nowrap; }
.ct-x { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 14px; padding: 2px 4px; }
.ct-x:hover { color: #ef4444; }
.ct-actions { display: flex; align-items: center; gap: 14px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 14px; background: var(--bg-soft); }
.ct-qwrap { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-right: auto; }
.ct-qwrap input[type="range"] { accent-color: var(--blue); }
.ct-results { margin-top: 18px; }
.ct-results-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ct-out { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ct-res { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ct-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; background: var(--bg-soft2); flex: none; }
.ct-thumb-doc { display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--blue); }
.ct-res-name { flex: 1; font-size: 14px; word-break: break-all; }
.ct-res-size { color: var(--muted); font-size: 13px; white-space: nowrap; }
@media (prefers-color-scheme: dark) {
  .ct-drop { background: #0f1729; border-color: #274a72; }
  .ct-drop:hover, .ct-drop.is-over { background: #10243f; }
  .ct-res, .ct-panel { background: #0f1729; }
}

/* JPG/JPEG-equivalence note shown under the About paragraph on jpeg pairs */
.conv-note {
  margin-top: 12px; padding: 11px 15px;
  background: #f0f6ff; border-left: 3px solid var(--blue);
  border-radius: 8px; font-size: 14.5px; color: var(--muted);
}
@media (prefers-color-scheme: dark) {
  .conv-note { background: #10243f; border-left-color: var(--blue); }
}

/* Home & converters — richer content blocks */
.block { margin-top: 46px; }
.section-sub { text-align: center; color: var(--muted); margin: -6px auto 20px; max-width: 640px; }
.feat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px;
}
.feat {
  border: 1px solid var(--line); border-radius: 14px; padding: 20px 18px;
  background: var(--bg-soft);
}
.feat h3 { margin: 0 0 7px; font-size: 16px; color: var(--blue-dark); }
.feat p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.conv-group { margin-top: 40px; }
.conv-group .section-title { margin-bottom: 16px; }
@media (prefers-color-scheme: dark) {
  .feat { background: #0f1729; border-color: #233044; }
}

