/* vantrica.tech — base styles, brand revision 2. Mobile first, no web fonts. */

:root {
  --ink: #12181f;
  --ink-soft: #5a6773;
  --line: #e3e8ee;
  --bg: #ffffff;
  --bg-soft: #ffffff;
  --accent: #1c6ef2;
  --accent-dark: #1557c4;
  --ok: #12805c;
  --warn: #b4341f;
  --radius: 10px;
  --wrap: 1080px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.pw-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
main { position: relative; }

.pw-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 18px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.35;
}

.pw-breadcrumb a { color: var(--ink-soft); }
.pw-breadcrumb [aria-current="page"] { color: var(--ink); }

.pw-editor-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  background: #ffffff;
}

.pw-editor-loading span {
  width: 28px;
  height: 28px;
  border: 3px solid #d7e1ee;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: pw-editor-spin .75s linear infinite;
}

@keyframes pw-editor-spin {
  to { transform: rotate(360deg); }
}

.pw-editor-frame {
  visibility: hidden !important;
  opacity: 0 !important;
}

main.is-editor-ready .pw-editor-frame {
  visibility: visible !important;
  opacity: 1 !important;
}

main.is-editor-ready .pw-editor-loading {
  display: none;
}

/* ---------------------------------------------------------------- header */

.pw-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.pw-header__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 60px;
}

.pw-logo {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}
.pw-logo__word {
  display: inline-flex;
  align-items: baseline;
  color: #06274f;
  font-family: "Arial Black", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.085em;
  line-height: 1;
}
.pw-logo__mint {
  color: #a8e5b9;
}

.pw-header-actions {
  min-width: 0;
  margin-left: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
}

.pw-header-center {
  min-width: 0;
  justify-self: start;
}

.pw-nav-install {
  position: relative;
}

.pw-nav-install__button {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #2f7ff0, #1769d2);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 7px 18px rgba(28, 110, 242, .22);
}

.pw-nav-install__button:hover:not(:disabled) {
  background: linear-gradient(135deg, #3a89f6, #1d73df);
}

.pw-nav-install__button:disabled {
  cursor: wait;
  opacity: .72;
}

.pw-nav-install__button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.pw-nav-install__button span,
.pw-nav-install__button strong,
.pw-nav-install__button small {
  display: block;
}

.pw-nav-install__button strong {
  font-size: 12px;
  line-height: 1.15;
  white-space: nowrap;
}

.pw-nav-install__button small {
  margin-top: 2px;
  color: rgba(255, 255, 255, .72);
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
}

.pw-nav-install__progress {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -4px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce5f0;
}

.pw-nav-install__progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.pw-nav-install__status {
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  z-index: 2;
  max-width: 260px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.35;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(26, 47, 76, .12);
  transform: translateX(-50%);
}

.pw-nav-install__status:empty {
  display: none;
}

.pw-mode-switch {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid #dfe6ef;
  border-radius: 999px;
  background: #ffffff;
}

.pw-mode-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 31px;
  padding: 0 11px;
  border-radius: 999px;
  color: #526176;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: color .12s ease, background-color .12s ease, box-shadow .12s ease;
}

.pw-mode-link svg {
  width: 16px;
  height: 16px;
}

.pw-mode-link:hover {
  color: var(--ink);
  text-decoration: none;
}

.pw-mode-link.is-active {
  background: linear-gradient(135deg, #173d72, #082853);
  color: #fff;
  box-shadow: 0 4px 12px rgba(8, 40, 83, .2);
}

.pw-lang { margin-left: 0; }

/* -------------------------------------------------------------- desktop app */

.pw-desktop-hero {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(360px, 1.08fr);
  gap: 44px;
  align-items: center;
  padding: 42px 0 18px;
}

.pw-desktop-copy,
.pw-desktop-preview { min-width: 0; }

.pw-desktop-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pw-desktop-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5.4vw, 58px);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.pw-desktop-copy h1 span { display: block; }

.pw-desktop-brand { white-space: nowrap; }

.pw-desktop-product {
  overflow-wrap: break-word;
  text-wrap: balance;
}

.pw-desktop-copy > p {
  max-width: 58ch;
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
}

.pw-desktop-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 13px;
}

.pw-desktop-download {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 21px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 9px 26px rgba(28, 110, 242, .22);
}

.pw-desktop-download:hover:not(:disabled) { background: var(--accent-dark); }
.pw-desktop-download:disabled { opacity: .62; cursor: wait; }

.pw-desktop-meta {
  color: var(--ink-soft);
  font-size: 12px;
}

.pw-desktop-progress {
  width: min(410px, 100%);
  height: 5px;
  margin-top: 15px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-soft);
}

.pw-desktop-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 140ms linear;
}

.pw-desktop-status {
  min-height: 20px;
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.pw-desktop-preview {
  overflow: hidden;
  border: 1px solid #243240;
  border-radius: 14px;
  background: #11151c;
  box-shadow: 0 25px 60px rgba(19, 42, 68, .22);
}

.pw-desktop-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.pw-desktop-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pw-desktop-features li {
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  line-height: 1.55;
}

.pw-desktop-features strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
}

.pw-desktop-steps {
  margin: 0;
  padding-left: 22px;
  color: var(--ink-soft);
  line-height: 1.8;
}

.pw-desktop-warning {
  margin-top: 16px;
  padding: 12px 15px;
  border-left: 3px solid #e2a33a;
  background: #fff9ea;
  color: #70551e;
  font-size: 13px;
  line-height: 1.55;
}

/* ------------------------------------------------------- language switch */

.pw-lang { display: flex; align-items: center; gap: 6px; }

.pw-lang__label {
  font-size: 12px;
  color: var(--ink-soft);
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.pw-lang select {
  font: inherit;
  font-size: 14px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  max-width: 165px;
}

.pw-footer__langs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.pw-footer__langs a { color: var(--ink-soft); }
.pw-footer__langs a:hover { color: var(--accent); }

/* ------------------------------------------------------------------- rtl */

[dir="rtl"] .pw-lang { margin-left: 0; margin-right: auto; }
[dir="rtl"] .pw-item__name { text-align: right; }
[dir="rtl"] .pw-cards a { text-align: right; }

/* ------------------------------------------------------------------ hero */

.pw-hero { padding: 44px 0 8px; }

.pw-hero h1 {
  font-size: clamp(26px, 4.4vw, 38px);
  line-height: 1.2;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.pw-hero p {
  margin: 0 0 8px;
  color: var(--ink-soft);
  max-width: 62ch;
}

.pw-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.pw-badges li {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 11px;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------------- app */

.pw-app {
  margin: 28px 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.pw-app__body { padding: 18px; }

/* ------------------------------------------------------------- pdf tools */

.pw-pdf {
  margin: 28px 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.pw-pdf .pw-field,
.pw-audio .pw-field { margin-top: 16px; }
.pw-pdf .pw-field input[type="text"] {
  font: inherit;
  font-size: 15px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: 220px;
}

.pw-result { margin-top: 18px; }
.pw-result__ok {
  color: var(--ok);
  font-weight: 600;
  margin: 0 0 10px;
  font-size: 15px;
}
.pw-result__err {
  color: var(--warn);
  margin: 0;
  font-size: 14px;
}

.pw-drop {
  position: relative;
  border: 2px dashed #c4ced9;
  border-radius: var(--radius);
  padding: 34px 18px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-soft);
  transition: border-color .12s, background .12s;
}

.pw-drop--native > .pw-file-input {
  position: absolute !important;
  inset: 0;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: .001 !important;
  pointer-events: auto !important;
  touch-action: manipulation;
  cursor: pointer;
  z-index: 2;
}

.pw-drop--standalone-picker > .pw-file-input {
  position: static !important;
  inset: auto !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 14px auto 0 !important;
  opacity: 1 !important;
  color: var(--ink-soft);
  font: 13px/1.4 system-ui, sans-serif;
  pointer-events: auto !important;
  z-index: 2;
}

.pw-drop--standalone-picker > .pw-file-input::file-selector-button {
  margin-right: 10px;
  padding: 9px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.pw-drop--standalone-picker > .pw-file-input::-webkit-file-upload-button {
  margin-right: 10px;
  padding: 9px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.pw-drop:hover,
.pw-drop:focus-visible,
.pw-drop.is-over {
  border-color: var(--accent);
  background: #eef4ff;
  outline: none;
}

.pw-drop__title { font-weight: 600; font-size: 17px; }
.pw-drop__hint  { color: var(--ink-soft); font-size: 14px; margin-top: 6px; }

.pw-options {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  /* Labels on one line, controls under them: bottom alignment made the shorter
     slider sit 20px below the two inputs. */
  align-items: flex-start;
  margin-top: 18px;
}

.pw-field { display: flex; flex-direction: column; gap: 6px; }
.pw-field label { font-size: 13px; color: var(--ink-soft); }

.pw-field select,
.pw-field input[type="number"] {
  font: inherit;
  font-size: 15px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  min-width: 120px;
}

.pw-field input[type="range"] { width: 160px; }

/* The three image options share one row. The number input would otherwise keep
   the platform default width (~177px) and push the row onto a second line. */
.pw-options { gap: 16px; }
.pw-options .pw-field input[type="number"] { width: 92px; min-width: 92px; }
.pw-options .pw-field input[type="range"] { width: 104px; }

.pw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.pw-btn {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.pw-btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.pw-btn:disabled { opacity: .55; cursor: default; }

.pw-btn--ghost {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--line);
  font-weight: 500;
}
.pw-btn--ghost:hover { background: var(--bg-soft); border-color: #c4ced9; }

/* ------------------------------------------------------------ file list */

.pw-list { list-style: none; margin: 18px 0 0; padding: 0; }

.pw-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}

.pw-item__name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}

.pw-item__meta { color: var(--ink-soft); font-size: 13px; white-space: nowrap; }
.pw-item--done  .pw-item__meta { color: var(--ok); }
.pw-item--error .pw-item__meta { color: var(--warn); white-space: normal; }
.pw-item--error { border-color: #f0c8c0; background: #fff7f5; }

.pw-item__dl,
.pw-item__share,
.pw-item__rm {
  font: inherit;
  font-size: 13px;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 6px;
  cursor: pointer;
  padding: 5px 12px;
  color: var(--ink);
}
.pw-item__dl:hover { border-color: var(--accent); color: var(--accent); }
.pw-item__share:hover { border-color: var(--accent); color: var(--accent); }
.pw-item__rm { padding: 5px 9px; color: var(--ink-soft); }
.pw-item__rm:hover { color: var(--warn); border-color: #f0c8c0; }

/* The footer share control is a button doing link work, so it has to look like
   the links next to it rather than a form control. */
.pw-footer__share {
  font: inherit;
  font-size: inherit;
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.pw-footer__share:hover { color: var(--ink); }

.pw-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 40;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(18, 26, 35, .92);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 6px 24px rgba(12, 20, 30, .25);
}

/* --------------------------------------------------------------- content */

.pw-section { padding: 40px 0 0; }

/* The four tools sit two to a row so a visitor can see all of them without
   scrolling. Each cell is a normal .pw-section, so the vertical rhythm is
   unchanged when the grid collapses to one column. */
.pw-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 26px;
  align-items: start;
}

@media (max-width: 900px) {
  .pw-tools { grid-template-columns: 1fr; }
  .pw-desktop-hero { grid-template-columns: 1fr; gap: 24px; }
  .pw-desktop-preview { grid-row: 1; }
}

/* The four tools carry different amounts of hint text, so without this the
   shorter ones (PDF) pull their tabs and buttons up out of line with the
   column beside them. */
.pw-tools .pw-drop {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pw-section h2 {
  font-size: 22px;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.pw-section h3 { font-size: 17px; margin: 22px 0 8px; }
.pw-section p, .pw-section li { color: #2c3742; }

/* Homepage conversion columns: one column per source format. */
.pw-cols {
  display: grid;
  /* 180px is the widest min that still fits five columns inside --wrap, so the
     ten source formats land as two even rows of five instead of 6 + 4. */
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px 22px;
  margin-top: 20px;
}

.pw-col h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.pw-col__list { list-style: none; margin: 0; padding: 0; }
.pw-col__list li { margin: 0 0 3px; }
.pw-col__list a { font-size: 14px; }

/* Sits under the converter when a target changes how the batch behaves. */
.pw-note {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}

/* Operation picker inside the PDF widget: every choice stays visible, which a
   dropdown hides behind a click. */
.pw-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  /* The tabs sit under the drop zone, so spacing goes on top. Keeping every
     tool's drop zone first is what lets the four columns line up. */
  margin: 14px 0 0;
}

/* Search sits above the tabs and filters the tiles already in the page: the
   whole gallery is a few hundred names, so there is nothing to fetch. */
.pw-search {
  width: 100%;
  max-width: 340px;
  font: inherit;
  font-size: 14px;
  padding: 9px 12px;
  margin: 4px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
}
.pw-search:focus { outline: none; border-color: var(--accent); }

.pw-tab {
  font: inherit;
  font-size: 14px;
  line-height: 1;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}

.pw-tab:hover { border-color: var(--accent); color: var(--accent); }

.pw-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

@media (max-width: 560px) {
  /* Phones need at least two columns side by side, otherwise the ten source
     formats read as one long list. 124px + a 14px gap fits two inside the
     narrowest wrap we care about (~280px of content). */
  .pw-cols { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 16px 14px; }
}

@media (max-width: 980px) {
  .pw-header__inner {
    flex-wrap: wrap;
    gap: 9px 12px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .pw-logo { order: 1; }
  .pw-header-actions {
    order: 2;
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
    flex-wrap: nowrap;
  }
  .pw-mode-switch { order: 0; }
  .pw-lang { order: 0; margin-left: 0; }
}

.pw-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.pw-cards a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 15px;
  color: var(--ink);
  font-size: 15px;
}
.pw-cards a:hover { border-color: var(--accent); text-decoration: none; }
.pw-cards small { display: block; color: var(--ink-soft); font-size: 13px; margin-top: 2px; }

.pw-faq dt { font-weight: 600; margin-top: 16px; }
.pw-faq dd { margin: 4px 0 0; color: #2c3742; }

/* Template downloads: one row per template, with a file per language. Reuses
   the result-row look from the converters so it feels like the same place. */
.pw-tpl { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; }
.pw-tpl .pw-item { background: var(--bg); }
.pw-tpl .pw-item__name { flex: 1 1 auto; }
.pw-tpl .pw-item__dl { text-decoration: none; }

/* Template gallery: tabs across the top, thumbnail wall under them, and a
   lightbox for the one somebody clicked. */
.pw-grid { list-style: none; margin: 18px 0 0; padding: 0;
           display: grid; gap: 14px;
           grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pw-tile__btn { display: block; width: 100%; padding: 0; border: 1px solid var(--line);
                border-radius: 8px; background: var(--bg); cursor: pointer;
                overflow: hidden; text-align: left; font: inherit; }
.pw-tile__btn:hover { border-color: var(--accent); }
.pw-tile__btn img { display: block; width: 100%; height: 190px;
                    object-fit: cover; object-position: top; background: var(--bg-soft); }
.pw-tile__btn span { display: block; padding: 8px 10px; font-size: 12px;
                     font-weight: 600; color: var(--ink); overflow: hidden;
                     text-overflow: ellipsis; white-space: nowrap; }
/* The original name, small and grey underneath. Generated names describe a
   template accurately but not uniquely — thirty-six spreadsheets all read
   "Spreadsheet templates · multi-page · no photo" — so the real name stays on
   the card. It is not translated on purpose: the document itself is Chinese,
   and a translated label pointing at a Chinese file helps nobody. */
.pw-tile__btn span small { display: block; font-weight: 400; font-size: 11px;
                           color: var(--ink-soft); overflow: hidden;
                           text-overflow: ellipsis; white-space: nowrap; }

.pw-modal { position: fixed; inset: 0; z-index: 50; background: rgba(16, 22, 30, .72);
            display: flex; align-items: center; justify-content: center; padding: 18px; }
.pw-modal__box { background: var(--bg); border-radius: 10px; max-width: 780px;
                 width: 100%; max-height: 92vh; display: flex; flex-direction: column;
                 overflow: hidden; }
.pw-modal__box img { width: 100%; max-height: 72vh; object-fit: contain;
                     background: var(--bg-soft); }
.pw-modal__stage { position: relative; display: flex; justify-content: center;
                   background: var(--bg-soft); }
.pw-modal__nav { position: absolute; top: 50%; transform: translateY(-50%);
                 width: 44px; height: 44px; border-radius: 999px; border: 0;
                 background: rgba(18, 26, 35, .55); color: #fff; font-size: 26px;
                 line-height: 1; cursor: pointer; }
.pw-modal__nav:hover { background: rgba(18, 26, 35, .8); }
.pw-modal__nav:disabled { opacity: .25; cursor: default; }
.pw-modal__nav--prev { left: 12px; }
.pw-modal__nav--next { right: 12px; }
.pw-modal__count { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.pw-modal__bar { display: flex; align-items: center; gap: 12px;
                 padding: 12px 14px; border-top: 1px solid var(--line); }
.pw-modal__bar span { flex: 1 1 auto; font-size: 14px; overflow: hidden;
                      text-overflow: ellipsis; white-space: nowrap; }
.pw-modal__bar .pw-btn { text-decoration: none; padding: 8px 18px; }

@media (max-width: 560px) {
  .pw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pw-tile__btn img { height: 150px; }
}

/* Format comparison table on conversion pages. */
.pw-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 0;
  font-size: 15px;
}

/* A four-column table cannot always fold into a phone screen, and when it
   cannot, the whole page gains a sideways scrollbar and the right-hand column
   gets cut off. Scrolling the table inside its own box keeps that contained.
   The width hint keeps the cells from being crushed into unreadable strips. */
.pw-table-wrap { overflow-x: auto; }
.pw-table-wrap .pw-table { min-width: 430px; }
.pw-table-wrap .pw-table tbody th { width: auto; }

.pw-table th,
.pw-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.pw-table thead th {
  font-size: 14px;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--line);
}

.pw-table tbody th {
  font-weight: 500;
  color: var(--ink-soft);
  width: 32%;
}

[dir="rtl"] .pw-table th,
[dir="rtl"] .pw-table td { text-align: right; }

/* ---------------------------------------------------------------- footer */

.pw-footer {
  margin-top: 52px;
  border-top: 1px solid var(--line);
  padding: 24px 0 40px;
  font-size: 14px;
  color: var(--ink-soft);
}

.pw-footer__links { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 10px; }

/* Reserve space for a display ad so it never shifts the layout (protects CLS). */
.pw-ad-slot {
  margin: 34px 0;
  min-height: 90px;
  border: 1px dashed #dbe2ea;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9aa6b2;
  font-size: 13px;
}

[hidden] { display: none !important; }

.pw-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.pw-file-input {
  position: fixed !important;
  left: -10000px !important;
  top: 0 !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 1360px) {
  .pw-header__inner { gap: 14px; }
  .pw-header-actions { gap: 8px; }
  .pw-mode-link { padding: 0 9px; font-size: 11px; }
  .pw-mode-link svg { display: none; }
  .pw-lang select { max-width: 132px; font-size: 12px; }
}

@media (max-width: 560px) {
  .pw-item { flex-wrap: wrap; }
  .pw-item__name { flex-basis: 100%; }
  /* One scrollable row beats four stacked lines: on a phone the wrapped nav
     was pushing the headline most of the way down the screen. */
  .pw-table { font-size: 14px; }
  .pw-table th, .pw-table td { padding: 8px 9px; }

  /* Phones: the header, the headline and the four tools all have to fit in
     roughly one screen. On desktop a drop box is a tall, square-ish target;
     here it becomes a wide, short rectangle and the vertical spacing around
     everything shrinks. Nothing is removed — the same words are on the page,
     they just stop costing a screen each. */
  .pw-wrap { padding: 0 14px; }
  .pw-breadcrumb { padding-top: 12px; font-size: 11px; gap: 4px; }
  .pw-header__inner {
    display: flex;
    min-height: 46px;
    gap: 9px 12px;
    flex-wrap: wrap;
  }
  .pw-logo__word { font-size: 22px; }
  .pw-lang { order: 0; margin-left: 0; }
  .pw-mode-switch { order: 0; }
  .pw-mode-link { padding: 0 8px; font-size: 11px; }
  .pw-lang select { max-width: 135px; }
  .pw-header-actions { margin-left: auto; }
  .pw-header-center {
    order: 3;
    flex: 1 0 100%;
    display: flex;
    justify-content: flex-start;
  }
  .pw-nav-install__status { position: fixed; top: 54px; white-space: normal; }

  .pw-hero { padding: 18px 0 0; }
  .pw-hero h1 { font-size: 21px; margin-bottom: 6px; }
  .pw-hero p { font-size: 14px; }
  .pw-badges { margin-top: 10px; gap: 6px; font-size: 12px; }
  .pw-badges li { padding: 3px 9px; }

  .pw-app, .pw-pdf, .pw-doc { margin: 12px 0 0; }
  .pw-app__body { padding: 10px; }
  .pw-drop { padding: 12px 10px; }
  .pw-drop__title { font-size: 14px; }
  .pw-drop__hint { font-size: 11px; line-height: 1.35; margin-top: 4px; }
  .pw-options { margin-top: 10px; gap: 10px 14px; }

  .pw-section { padding: 20px 0 0; }
  .pw-section h2 { font-size: 17px; margin-bottom: 8px; }
  .pw-tools .pw-drop { min-height: 0; }

  .pw-ad-slot { margin: 14px 0; min-height: 56px; }
  .pw-cards { gap: 8px; }
  .pw-cards a { padding: 10px 12px; font-size: 14px; }
  .pw-desktop-hero { grid-template-columns: 1fr; gap: 20px; padding-top: 24px; }
  .pw-desktop-preview { grid-row: 1; }
  .pw-desktop-features { grid-template-columns: 1fr; }
  .pw-desktop-copy h1 { font-size: 34px; line-height: 1.06; }
  .pw-desktop-copy > p { font-size: 14px; }
  .pw-desktop-download { width: 100%; justify-content: center; }
}

/* Keep the mobile header ordering after the legacy phone rules above. */
@media (max-width: 760px) {
  .pw-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, .97);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
  .pw-header__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
  }
  .pw-header-actions { display: contents; }
  .pw-lang {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    margin: 0;
  }
  .pw-mode-switch {
    width: 100%;
    max-width: calc(100vw - 28px);
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
  }
  .pw-mode-link {
    min-width: 0;
    min-height: 31px;
    flex: 1 1 0;
    justify-content: center;
    padding: 4px 7px;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    touch-action: manipulation;
  }
  .pw-header-center { display: none !important; }
}
