:root {
  color-scheme: light;
  --blue-900: #08245c;
  --blue-700: #0d64e8;
  --blue-500: #1e9bff;
  --sky: #36b8ff;
  --blue-100: #e9f6ff;
  --ink: #0d1b3d;
  --muted: #61708f;
  --line: rgba(106, 180, 255, 0.22);
  --card: rgba(255, 255, 255, 0.9);
  --shadow: 0 28px 70px rgba(18, 117, 225, 0.18);
  --soft-shadow: 0 16px 34px rgba(30, 155, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --home-content-width: 1180px;
  background: #eaf7ff;
  color: var(--ink);
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  background:
    linear-gradient(180deg, rgba(30, 155, 255, 0.08) 0%, rgba(54, 184, 255, 0.05) 42%, rgba(246, 252, 255, 0.98) 86%, #ffffff 100%),
    url("/site/assets/sky-cloud-bg.png") top center / cover no-repeat fixed,
    #eaf7ff;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.62) 88%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.site-header [hidden] {
  display: none !important;
}

.site-header {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 275px) minmax(0, 1fr) auto;
  left: 0;
  margin: 0 auto;
  max-width: 1500px;
  padding: 24px 28px 12px;
  position: sticky;
  right: 0;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: 0 20px 45px rgba(15, 88, 184, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  color: #071a43;
  display: inline-flex;
  font-size: 22px;
  font-weight: 800;
  gap: 10px;
  min-height: 62px;
  padding: 0 24px 0 20px;
  text-decoration: none;
  white-space: nowrap;
}

.brand-name {
  display: inline-block;
  flex: 0 0 auto;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  font-stretch: normal;
  letter-spacing: 0;
  line-height: 1;
  transform: none;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(145deg, #5ab5ff, #086ff2);
  border-radius: 15px;
  box-shadow: inset 0 4px 9px rgba(255, 255, 255, 0.45), 0 12px 24px rgba(13, 100, 232, 0.28);
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.mega-nav {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: center;
  min-width: 0;
}

.mega-item,
.nav-trigger,
.ghost-button,
.login-button,
.member-button,
.quota-button,
.user-entry {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.mega-item,
.nav-trigger {
  background: transparent;
  color: rgba(255, 255, 255, 0.98);
  font-size: 15px;
}

.public-service-link {
  text-decoration: none;
}

.nav-trigger::after {
  content: "⌄";
  font-size: 14px;
  margin-left: 6px;
}

.mega-item:hover,
.nav-trigger:hover,
.mega-item.active,
.nav-pill.active {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 17px 34px rgba(19, 105, 219, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  color: #096eea;
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown::after {
  content: "";
  height: 18px;
  left: -10px;
  position: absolute;
  right: -10px;
  top: 100%;
  z-index: 1;
}

.dropdown-panel {
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  box-shadow: 0 18px 46px rgba(17, 75, 155, 0.18);
  display: grid;
  gap: 16px;
  left: 50%;
  min-width: 240px;
  opacity: 0;
  padding: 18px;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 8px);
  transform: translate(-50%, 8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 2;
}

.dropdown-panel.two-col {
  grid-template-columns: repeat(2, 230px);
  min-width: 500px;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.nav-dropdown.menu-closing .dropdown-panel {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
}

.mega-nav.menu-selection-locked .dropdown-panel {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
}

.dropdown-panel .mega-item {
  border-radius: 10px;
  color: #17305f;
  justify-content: flex-start;
  min-height: 44px;
  padding: 0 10px;
}

.dropdown-panel .mega-item:hover,
.dropdown-panel .mega-item.active {
  background: #eaf4ff;
  box-shadow: none;
}

.dropdown-group {
  display: grid;
  gap: 4px;
}

.dropdown-title {
  color: #61708f;
  font-size: 13px;
  font-weight: 900;
  padding: 0 10px 6px;
}

.mini-icon {
  align-items: center;
  border-radius: 5px;
  color: #ffffff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  height: 20px;
  justify-content: center;
  margin-right: 10px;
  width: 20px;
}

.mini-icon.word,
.mini-icon.blue {
  background: #4b9dff;
}

.mini-icon.excel,
.mini-icon.green {
  background: #22c55e;
}

.mini-icon.ppt {
  background: #ffa332;
}

.mini-icon.pdf {
  background: #ef4444;
}

.mini-icon.image {
  background: #7c5cff;
}

.mini-icon.merge {
  background: #22a6f2;
}

.header-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.ghost-button,
.login-button,
.member-button,
.quota-button,
.user-entry {
  box-shadow: 0 16px 30px rgba(15, 82, 177, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.ghost-button,
.login-button,
.quota-button,
.user-entry {
  background: rgba(255, 255, 255, 0.82);
  color: #0b67df;
}

.member-button {
  background: linear-gradient(135deg, #23a7ff, #0874ec);
  color: #ffffff;
}

.progress-bar {
  background: rgba(16, 185, 129, 0.16);
  height: 4px;
  left: 0;
  overflow: hidden;
  position: sticky;
  right: 0;
  top: 0;
  z-index: 30;
}

.progress-bar[hidden] {
  display: none;
}

.progress-bar-fill {
  animation: progress-slide 1.1s ease-in-out infinite;
  background: #16a34a;
  height: 100%;
  transform-origin: left center;
  width: 42%;
}

@keyframes progress-slide {
  0% {
    transform: translateX(-110%) scaleX(0.5);
  }
  45% {
    transform: translateX(80%) scaleX(1);
  }
  100% {
    transform: translateX(260%) scaleX(0.55);
  }
}

.app-shell {
  margin: 0 auto;
  max-width: 1660px;
  padding: 34px 34px 56px;
  position: relative;
  z-index: 1;
}

.hero-section {
  display: grid;
  gap: 42px;
  grid-template-columns: 214px minmax(390px, 0.95fr) minmax(420px, 1.05fr);
  margin-left: auto;
  margin-right: auto;
  max-width: var(--home-content-width);
  min-height: 650px;
}

.tool-rail {
  align-self: start;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 36px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  display: grid;
  gap: 12px;
  margin-top: 90px;
  padding: 18px 16px;
}

.feature-card {
  color: inherit;
}

.rail-item {
  align-items: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(229, 246, 255, 0.88));
  border-radius: 999px;
  box-shadow: var(--soft-shadow);
  display: grid;
  gap: 12px;
  grid-template-columns: 42px 1fr;
  min-height: 66px;
  padding: 10px 15px;
  text-align: left;
}

.rail-item strong {
  font-size: 17px;
}

.rail-item.active,
.rail-item:hover {
  background: linear-gradient(145deg, #58c8ff, #0878f1);
  box-shadow: 0 18px 36px rgba(9, 104, 226, 0.28), inset 0 2px 0 rgba(255, 255, 255, 0.32);
  color: #ffffff;
}

.tool-icon {
  align-items: center;
  border-radius: 17px;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  letter-spacing: 0;
  width: 44px;
  box-shadow: inset 0 3px 7px rgba(255, 255, 255, 0.36), 0 10px 18px rgba(13, 105, 230, 0.2);
}

.tool-icon.blue,
.tool-icon.outline {
  background: rgba(14, 113, 239, 0.1);
  border: 1px solid rgba(14, 113, 239, 0.22);
  color: #0b66dc;
}

.rail-item.active .tool-icon,
.rail-item:hover .tool-icon {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.tool-icon.word {
  background: linear-gradient(145deg, #5aa9ff, #126df5);
  color: #ffffff;
}

.tool-icon.excel {
  background: linear-gradient(145deg, #48d37d, #0ba354);
  color: #ffffff;
}

.tool-icon.ppt {
  background: linear-gradient(145deg, #ffbc4a, #ff6c14);
  color: #ffffff;
}

.tool-icon.image {
  background: linear-gradient(145deg, #b87dff, #7448e8);
  color: #ffffff;
}

.tool-icon.pdf {
  background: linear-gradient(145deg, #ff7d67, #ee3434);
  color: #ffffff;
}

.tool-icon.merge {
  background: linear-gradient(145deg, #45c7ff, #0a95d6);
  color: #ffffff;
}

.hero-content {
  align-self: center;
  padding-top: 40px;
}

.eyebrow {
  color: #0c66d9;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 12px;
}

.hero-copy h1 {
  color: #071c48;
  font-size: clamp(50px, 4.6vw, 80px);
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0 0 22px;
  text-shadow: 0 8px 18px rgba(255, 255, 255, 0.35);
}

.hero-copy p {
  color: #12305f;
  font-size: 22px;
  line-height: 1.72;
  margin: 0;
  max-width: 760px;
}

.benefit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin: 32px 0 34px;
}

.benefit-chips span {
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 26px;
  color: #52617d;
  display: grid;
  gap: 3px;
  box-shadow: var(--soft-shadow);
  min-width: 170px;
  padding: 16px 24px;
}

.benefit-chips b {
  color: #122b5c;
  font-size: 15px;
}

.hero-art {
  align-self: center;
  margin: 0 -24px 0 -24px;
  min-width: 0;
  pointer-events: none;
}

.hero-art img {
  animation: none;
  border-radius: 0;
  display: block;
  filter: blur(0.2px) saturate(0.92) drop-shadow(0 28px 34px rgba(10, 90, 195, 0.1));
  -webkit-mask-composite: source-in;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 18%, #000 84%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%);
  mask-composite: intersect;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 18%, #000 84%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%);
  max-width: none;
  object-fit: contain;
  transform-origin: center bottom;
  width: min(780px, 120%);
}

@keyframes float-soft {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.hero-upload-panel {
  max-width: 650px;
}

.hero-tool-bench {
  max-width: 650px;
  min-height: 300px;
}

.hero-tool-bench .hero-upload-panel {
  max-width: none;
}

.hero-tool-bench .workspace-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  margin: 0;
  padding: 0;
}

.hero-tool-bench .tool-heading {
  margin: 0 0 16px;
  max-width: none;
  text-align: left;
}

.hero-tool-bench .tool-heading h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.hero-tool-bench .tool-heading p:not(.eyebrow) {
  font-size: 15px;
  line-height: 1.55;
}

.upload-zone {
  align-items: center;
  backdrop-filter: blur(18px);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(235, 249, 255, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 42px;
  box-shadow: 0 36px 90px rgba(17, 117, 225, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.96);
  color: var(--ink);
  display: grid;
  gap: 18px;
  justify-items: center;
  min-height: 330px;
  padding: 38px;
  position: relative;
  text-align: center;
}

.upload-zone[hidden],
.tool-flow-form[hidden],
.download-form[hidden] {
  display: none !important;
}

.upload-zone::before {
  border: 2px dashed rgba(66, 169, 255, 0.62);
  border-radius: 32px;
  content: "";
  inset: 22px;
  pointer-events: none;
  position: absolute;
}

.upload-zone.compact {
  min-height: 170px;
}

.hero-tool-bench .upload-zone {
  border-radius: 32px;
  gap: 14px;
  min-height: 240px;
  padding: 26px;
}

.hero-tool-bench .upload-zone.compact {
  min-height: 150px;
  padding: 22px;
}

.hero-tool-bench .upload-zone::before {
  border-radius: 24px;
  inset: 16px;
}

.hero-tool-bench .upload-visual {
  border-radius: 24px;
  font-size: 44px;
  height: 78px;
  width: 96px;
}

.hero-tool-bench #convert-form {
  align-items: center;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  justify-items: start;
  min-height: 240px;
  text-align: left;
}

.hero-tool-bench #convert-form .upload-visual {
  grid-row: 1 / span 3;
}

.hero-tool-bench #convert-form > div:not(.upload-visual) {
  grid-column: 2 / span 2;
}

.hero-tool-bench #convert-form .file-picker {
  grid-column: 2;
}

.hero-tool-bench #convert-form .mode-picker {
  grid-column: 3;
}

.hero-tool-bench #convert-form .primary-action {
  grid-column: 2 / span 2;
  justify-self: start;
}

.selected-file {
  background: rgba(231, 246, 255, 0.85);
  border: 1px solid rgba(67, 164, 255, 0.18);
  border-radius: 14px;
  color: #61708f;
  font-size: 14px;
  grid-column: 2 / span 2;
  padding: 10px 12px;
}

.selected-file.has-file {
  color: #0b66dc;
  font-weight: 800;
}

.convert-mode-grid {
  display: grid;
  gap: 12px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
}

.mode-card {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(67, 164, 255, 0.18);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(30, 155, 255, 0.08);
  color: #17305f;
  display: grid;
  gap: 5px;
  min-height: 92px;
  padding: 14px;
  text-align: left;
}

.mode-card.active,
.mode-card:hover {
  background: linear-gradient(145deg, #ffffff, #e5f5ff);
  border-color: rgba(30, 155, 255, 0.46);
  box-shadow: 0 14px 32px rgba(18, 117, 225, 0.16), inset 0 0 0 2px rgba(30, 155, 255, 0.12);
}

.mode-card small {
  color: var(--muted);
  line-height: 1.45;
}

.quality-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  grid-column: 1 / -1;
}

.quality-checks span {
  background: rgba(22, 163, 74, 0.09);
  border: 1px solid rgba(22, 163, 74, 0.16);
  border-radius: 999px;
  color: #15803d;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
}

.tool-workbench .panel.active.tool-runner-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  align-items: start;
}

.tool-runner-layout > .tool-heading {
  grid-column: 1 / -1;
}

.tool-runner-layout > form,
.tool-runner-layout > .grid,
.tool-runner-layout > .tool-panel-grid {
  grid-column: 1;
}

.result-panel {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(232, 247, 255, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 28px;
  box-shadow: 0 24px 56px rgba(18, 117, 225, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.98);
  display: grid;
  gap: 14px;
  grid-column: 2;
  min-height: 260px;
  padding: 24px;
}

.result-step {
  align-items: center;
  background: linear-gradient(145deg, #58c8ff, #0878f1);
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.result-panel h3 {
  color: #071c48;
  font-size: 24px;
  margin: 0;
}

.result-copy,
.result-meta {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.result-progress {
  background: rgba(13, 100, 232, 0.1);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.result-progress-fill {
  background: linear-gradient(90deg, #16a34a, #38d67a);
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 0.25s ease;
  width: 0;
}

.result-panel.ready .result-progress-fill {
  background: linear-gradient(90deg, #16a34a, #22c55e);
}

.result-panel.error .result-progress-fill {
  background: #ef4444;
  width: 100%;
}

.result-status-slot .status {
  padding-top: 0;
}

.result-download,
.result-share {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 48px;
  text-decoration: none;
}

.result-download {
  background: linear-gradient(135deg, #23a7ff, #0874ec);
  color: #ffffff;
}

.result-share {
  background: rgba(30, 155, 255, 0.12);
  color: #0b66dc;
}

.result-download[hidden],
.result-share[hidden] {
  display: none;
}

.hero-tool-bench .grid,
.hero-tool-bench .tool-panel-grid {
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-tool-bench .file-picker {
  min-width: 150px;
}

.hero-tool-bench .status {
  margin-top: 12px;
}

.upload-zone h2 {
  font-size: 24px;
  margin: 0 0 8px;
}

.upload-zone p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.upload-visual {
  align-items: center;
  background: linear-gradient(145deg, #82c9ff, #0c76f1);
  border-radius: 32px;
  box-shadow: inset 0 5px 13px rgba(255, 255, 255, 0.5), 0 22px 38px rgba(10, 105, 225, 0.28);
  color: #ffffff;
  display: inline-flex;
  font-size: 62px;
  height: 106px;
  justify-content: center;
  width: 126px;
}

.file-picker {
  align-items: center;
  background: linear-gradient(135deg, #23a7ff, #0874ec);
  border-radius: 999px;
  box-shadow: 0 14px 28px rgba(11, 112, 231, 0.25);
  color: #ffffff;
  cursor: pointer;
  display: inline-grid;
  font-weight: 800;
  gap: 8px;
  justify-items: center;
  min-width: 180px;
  overflow: hidden;
  padding: 16px 34px;
  position: relative;
}

.file-picker input {
  cursor: pointer;
  inset: 0;
  opacity: 0;
  position: absolute;
  width: 100%;
}

.mode-picker,
label {
  color: #33476d;
  display: grid;
  font-size: 14px;
  gap: 7px;
  text-align: left;
}

input,
select,
textarea {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(95, 168, 235, 0.26);
  border-radius: 16px;
  color: #0d1b3d;
  font: inherit;
  min-height: 42px;
  min-width: 0;
  padding: 8px 12px;
}

textarea {
  resize: vertical;
}

.primary-action,
.upload-zone button,
.toolbar button,
.scan-tools button {
  background: linear-gradient(135deg, #23a7ff, #0874ec);
  border-radius: 999px;
  box-shadow: 0 16px 30px rgba(11, 112, 231, 0.24), inset 0 2px 0 rgba(255, 255, 255, 0.24);
  color: #ffffff;
  font-weight: 800;
  min-height: 50px;
  padding: 0 26px;
}

.status {
  color: #435477;
  font-size: 14px;
  line-height: 1.45;
  min-height: 22px;
  padding-top: 10px;
}

.status.error {
  color: #d92626;
}

.feature-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 38px 4px 32px;
}

.tool-card {
  align-items: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(233, 248, 255, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  box-shadow: 0 24px 54px rgba(22, 105, 198, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  color: var(--ink);
  display: grid;
  gap: 8px 14px;
  grid-template-columns: 62px 1fr 28px;
  min-height: 126px;
  padding: 22px 18px 22px 22px;
  position: relative;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tool-card:hover,
.tool-card.active {
  box-shadow: 0 30px 68px rgba(18, 117, 225, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transform: translateY(-3px);
}

.tool-card::after {
  align-items: center;
  background: rgba(30, 155, 255, 0.11);
  border-radius: 999px;
  color: #1e9bff;
  content: "›";
  display: flex;
  font-size: 26px;
  font-weight: 900;
  grid-column: 3;
  grid-row: 1 / span 2;
  height: 32px;
  justify-content: center;
  place-self: center;
  width: 32px;
}

.tool-card strong {
  align-self: end;
  font-size: 16px;
}

.tool-card small {
  color: #627391;
  grid-column: 2 / 3;
  line-height: 1.4;
}

.tool-card .tool-quota {
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 700;
}

.hero-section {
  align-items: center;
  gap: 34px;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.75fr);
  max-width: var(--home-content-width);
  min-height: 420px;
}

.tool-rail {
  display: none;
}

.hero-content {
  padding-top: 0;
}

.hero-copy h1 {
  font-size: 58px;
}

.hero-copy p {
  font-size: 20px;
  max-width: 680px;
}

.benefit-chips,
.hero-section .hero-tool-bench {
  display: none;
}

.hero-art {
  opacity: 0.3;
}

.hero-art img {
  width: min(520px, 100%);
}

.workflow-steps {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 30px 0 24px;
  max-width: 760px;
}

.workflow-steps article {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
  display: grid;
  gap: 6px;
  padding: 18px;
}

.workflow-steps span {
  align-items: center;
  background: linear-gradient(145deg, #58c8ff, #0878f1);
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.workflow-steps strong {
  color: #071c48;
  font-size: 17px;
}

.workflow-steps small {
  color: var(--muted);
  line-height: 1.4;
}

.hero-actions {
  display: flex;
}

.hero-primary {
  background: linear-gradient(135deg, #23a7ff, #0874ec);
  border-radius: 999px;
  box-shadow: 0 18px 34px rgba(11, 112, 231, 0.22);
  color: #ffffff;
  font-weight: 900;
  min-height: 54px;
  padding: 0 34px;
}

.tool-selector-section,
.tool-workbench {
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 34px;
  box-shadow: 0 24px 60px rgba(18, 117, 225, 0.12);
  margin: 24px 4px;
  padding: 28px;
  scroll-margin-top: 110px;
}

body:not(.tool-page) .tool-workbench {
  display: none;
}

body.tool-page .hero-section,
body.tool-page .tool-selector-section,
body.tool-page > .app-shell > .trust-strip {
  display: none;
}

body.tool-page .app-shell {
  max-width: 1280px;
  padding-top: 22px;
}

body.tool-page .site-header {
  background: transparent;
  border-bottom: 0;
  padding-bottom: 18px;
}

body.tool-page .tool-workbench {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 28px;
  margin: 8px auto 42px;
  max-width: var(--home-content-width);
  padding: 28px;
}

.tool-page-top {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.back-home {
  background: rgba(30, 155, 255, 0.1);
  border-radius: 999px;
  color: #0b66dc;
  font-weight: 900;
  min-height: 42px;
  padding: 0 18px;
}

.runner-section-label {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.runner-section-label span,
.runner-section-label strong {
  border-radius: 999px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  padding: 8px 12px;
}

.runner-section-label span {
  background: rgba(30, 155, 255, 0.12);
  color: #0b66dc;
}

.runner-section-label strong {
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
}

.runner-section-label small {
  color: var(--muted);
}

.section-heading,
.workbench-heading {
  margin: 0 0 20px;
  max-width: 760px;
}

.section-heading h2,
.workbench-heading h2 {
  color: #071c48;
  font-size: 34px;
  line-height: 1.15;
  margin: 0 0 10px;
}

.workbench-heading p:not(.eyebrow),
.workbench-helper {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.workbench-helper {
  background: rgba(231, 246, 255, 0.78);
  border: 1px solid rgba(67, 164, 255, 0.16);
  border-radius: 18px;
  margin: 0 0 18px;
  padding: 12px 16px;
}

.tool-selector-grid.feature-grid {
  gap: 20px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.tool-selector-grid .tool-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(233, 248, 255, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  box-shadow: 0 24px 54px rgba(22, 105, 198, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  grid-template-columns: 62px 1fr 28px;
  min-height: 126px;
  padding: 22px 18px 22px 22px;
}

.tool-selector-grid .tool-card.active {
  background: linear-gradient(145deg, #ffffff, #f1f9ff);
  border-color: rgba(30, 155, 255, 0.38);
  box-shadow: 0 22px 50px rgba(18, 117, 225, 0.22), inset 0 0 0 2px rgba(30, 155, 255, 0.16);
}

.tool-selector-grid .tool-card:hover {
  box-shadow: 0 30px 68px rgba(18, 117, 225, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transform: translateY(-3px);
}

.tool-selector-grid .tool-card::after {
  display: flex;
}

.tool-selector-grid .tool-card small {
  grid-column: 2 / 3;
}

.tool-selector-section {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 34px;
  box-shadow: 0 24px 60px rgba(18, 117, 225, 0.12);
  margin-left: auto;
  margin-right: auto;
  max-width: var(--home-content-width);
  overflow: visible;
  padding: 28px;
}

.tool-selector-section .section-heading {
  padding: 0;
}

.tool-category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 4px;
}

.tool-category-filter button {
  background: rgba(230, 247, 255, 0.86);
  border: 1px solid rgba(80, 173, 255, 0.18);
  border-radius: 999px;
  color: #0b66dc;
  font-size: 14px;
  font-weight: 800;
  min-height: 38px;
  padding: 0 16px;
}

.tool-category-filter button.active,
.tool-category-filter button:hover {
  background: linear-gradient(145deg, #ffffff, #dff3ff);
  box-shadow: 0 12px 26px rgba(30, 155, 255, 0.14);
}

.tool-workbench .hero-tool-bench,
.tool-workbench .hero-upload-panel {
  max-width: none;
}

.tool-workbench .hero-tool-bench {
  min-height: 0;
}

.tool-workbench .panel > .tool-heading {
  display: none;
}

.tool-workbench .upload-zone {
  box-shadow: 0 22px 56px rgba(17, 117, 225, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.tool-page #convert-form {
  grid-template-columns: 96px minmax(0, 1fr);
  min-height: 260px;
}

.tool-page #convert-form .mode-picker,
.tool-page #convert-form .convert-mode-grid,
.tool-page #convert-form .quality-checks {
  display: none;
}

.tool-page #convert-form.tool-flow-form .mode-picker {
  display: grid;
}

.tool-page #convert-form .primary-action {
  grid-column: 2;
}

.tool-flow-form {
  align-items: stretch;
  border-radius: 28px;
  gap: 18px;
  justify-items: stretch;
  min-height: 0;
  padding: 28px;
  text-align: left;
}

.tool-flow-form.has-upload-box {
  grid-template-columns: 96px minmax(0, 1fr);
}

.tool-flow-form.has-upload-box::before {
  border-radius: 22px;
  inset: 14px;
}

.tool-flow-form .upload-visual {
  grid-row: 1 / span 2;
}

.tool-flow-form .upload-copy {
  display: grid;
  gap: 6px;
}

.tool-flow-form .upload-copy h2 {
  color: #071c48;
  font-size: 22px;
  letter-spacing: 0;
  margin: 0;
}

.tool-flow-form .upload-copy p {
  color: var(--muted);
  margin: 0;
}

.tool-flow-form .file-picker,
.tool-flow-form .selected-file {
  grid-column: 2;
  justify-self: start;
}

.tool-flow-form .parameter-panel {
  background: rgba(238, 249, 255, 0.72);
  border: 1px solid rgba(106, 180, 255, 0.18);
  border-radius: 22px;
  display: grid;
  gap: 14px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  padding: 18px;
}

.tool-flow-form .parameter-panel:empty {
  display: none;
}

.tool-flow-form.no-file-task {
  display: block;
}

.tool-flow-form.no-file-task .parameter-panel {
  margin: 0 auto;
  max-width: 520px;
}

.tool-flow-form label {
  color: #17305f;
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
}

.tool-flow-form input:not([type="file"]),
.tool-flow-form select {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(67, 164, 255, 0.26);
  border-radius: 14px;
  color: #071c48;
  min-height: 42px;
  padding: 0 12px;
}

.tool-flow-form button[type="submit"],
.task-actions .primary-mini,
.task-actions a.primary-mini {
  align-items: center;
  background: linear-gradient(145deg, #36b8ff, #0878f1);
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(17, 117, 225, 0.2);
  color: #ffffff;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  text-decoration: none;
}

.tool-flow-form button[type="submit"]:disabled,
.task-actions button:disabled {
  background: #aeb9c8;
  box-shadow: none;
  cursor: not-allowed;
}

.tool-flow-form.has-upload-box .parameter-panel > button[type="submit"] {
  display: none;
}

.tool-flow-form.no-file-task .parameter-panel > button[type="submit"] {
  display: inline-flex;
  justify-self: start;
}

.file-task-list {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(106, 180, 255, 0.18);
  border-radius: 26px;
  box-shadow: 0 20px 48px rgba(17, 117, 225, 0.1);
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 20px;
}

.file-task-list[hidden] {
  display: none;
}

.task-list-heading {
  align-items: end;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.task-list-heading h3 {
  color: #071c48;
  font-size: 18px;
  margin: 0;
}

.task-list-heading span {
  color: var(--muted);
  font-size: 13px;
}

.task-items {
  display: grid;
  gap: 12px;
}

.file-task-item {
  align-items: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(235, 249, 255, 0.86));
  border: 1px solid rgba(106, 180, 255, 0.2);
  border-radius: 20px;
  display: grid;
  gap: 12px;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  padding: 14px;
}

.file-badge {
  align-items: center;
  background: linear-gradient(145deg, #5ab5ff, #086ff2);
  border-radius: 16px;
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.task-file-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.task-file-main strong {
  color: #071c48;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-file-main small {
  color: var(--muted);
}

.task-result-meta {
  color: #15803d !important;
  font-weight: 800;
}

.task-status {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
}

.task-status.ready {
  background: rgba(30, 155, 255, 0.1);
  color: #0b66dc;
}

.task-status.processing {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.task-status.success {
  background: rgba(22, 163, 74, 0.14);
  color: #15803d;
}

.task-status.error {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 2 / -1;
  justify-content: flex-end;
}

.task-actions button {
  background: rgba(30, 155, 255, 0.1);
  border-radius: 999px;
  color: #0b66dc;
  font-weight: 800;
  min-height: 36px;
  padding: 0 12px;
}

.task-progress {
  background: rgba(13, 100, 232, 0.1);
  border-radius: 999px;
  grid-column: 2 / -1;
  height: 9px;
  overflow: hidden;
}

.task-progress span {
  animation: task-progress 1.2s ease-in-out infinite;
  background: linear-gradient(90deg, #16a34a, #38d67a);
  border-radius: inherit;
  display: block;
  height: 100%;
  width: 38%;
}

@keyframes task-progress {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(260%);
  }
}

.task-error {
  color: #dc2626;
  grid-column: 2 / -1;
  margin: 0;
}

.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

.tool-tabs button {
  background: rgba(230, 247, 255, 0.86);
  border: 1px solid rgba(80, 173, 255, 0.18);
  border-radius: 999px;
  color: #0b66dc;
  font-weight: 900;
  min-height: 40px;
  padding: 0 18px;
}

.tool-tabs button.active {
  background: linear-gradient(145deg, #36b8ff, #0878f1);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(17, 117, 225, 0.2);
}

.grid.tabbed-tools,
.tool-panel-grid.tabbed-tools {
  grid-template-columns: minmax(0, 1fr);
}

.tool-help-footer {
  border-top: 1px solid rgba(106, 180, 255, 0.22);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  margin-top: 28px;
  padding-top: 24px;
}

.tool-help-footer article {
  background: rgba(239, 250, 255, 0.72);
  border: 1px solid rgba(106, 180, 255, 0.16);
  border-radius: 22px;
  padding: 20px;
}

.tool-help-footer h3 {
  color: #071c48;
  margin: 0 0 10px;
}

.tool-help-footer p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

.footer-tool-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-tool-links button {
  background: rgba(30, 155, 255, 0.1);
  border-radius: 999px;
  color: #0b66dc;
  font-weight: 800;
  min-height: 38px;
  padding: 0 14px;
}

.upload-zone.drag-over {
  border-color: rgba(30, 155, 255, 0.55);
  box-shadow: 0 24px 64px rgba(17, 117, 225, 0.2), inset 0 0 0 2px rgba(30, 155, 255, 0.16);
}

.upload-zone button:disabled {
  background: #aeb9c8;
  box-shadow: none;
}

.workspace-panel {
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 34px;
  box-shadow: var(--shadow);
  margin: 28px 4px;
  padding: 28px;
}

.tool-heading {
  margin: 0 auto 24px;
  max-width: 760px;
  text-align: center;
}

.tool-heading h1 {
  color: #071c48;
  font-size: 38px;
  letter-spacing: 0;
  margin: 0 0 10px;
}

.tool-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
  margin: 0;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tool-panel-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool-panel-grid .upload-zone {
  min-height: 210px;
}

.toolbar {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
}

.page-list {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  margin-top: 18px;
}

.page-item {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.page-item.removed {
  opacity: 0.45;
}

.page-item img {
  background: #eef7ff;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: block;
  width: 100%;
}

.page-title {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.page-actions {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(4, 1fr);
}

.page-actions button {
  background: #eef7ff;
  border-radius: 9px;
  color: #135fc7;
  min-height: 34px;
  padding: 6px;
}

.scan-upload {
  grid-template-columns: minmax(0, auto) 180px;
  justify-content: center;
  min-height: 150px;
}

.scan-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: 280px minmax(0, 1fr) 150px;
  margin-top: 18px;
}

.scan-channel-switch {
  background: rgba(240, 248, 255, 0.86);
  border: 1px solid rgba(92, 176, 255, 0.28);
  border-radius: 999px;
  display: inline-grid;
  gap: 6px;
  grid-template-columns: 1fr 1fr;
  margin-top: 14px;
  padding: 6px;
}

.scan-channel-switch button {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: #1562b7;
  cursor: pointer;
  font-weight: 800;
  min-height: 38px;
  padding: 0 18px;
}

.scan-channel-switch button.active {
  background: linear-gradient(135deg, #35b8ff, #147df5);
  box-shadow: 0 12px 28px rgba(20, 125, 245, 0.22);
  color: #fff;
}

.scan-tools {
  align-self: start;
  background: rgba(247, 252, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 20px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.tool-section-title {
  color: #071c48;
  font-size: 16px;
  font-weight: 800;
}

.scan-channel-note,
.scan-runninghub-panel p {
  color: #547095;
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
}

.scan-shared-fields,
.scan-channel-panel {
  display: grid;
  gap: 12px;
}

.scan-channel-panel[hidden] {
  display: none !important;
}

.scan-control-group {
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(92, 176, 255, 0.24);
  border-radius: 14px;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.scan-control-group summary {
  color: #0b4f9f;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.scan-control-group:not([open]) > *:not(summary) {
  display: none;
}

.scan-control-group > *:not(summary) {
  margin-top: 8px;
}

.scan-toggle-row {
  align-items: center;
  color: #24466d;
  display: flex;
  flex-direction: row;
  font-size: 13px;
  gap: 8px;
}

.scan-toggle-row input {
  height: 16px;
  width: 16px;
}

.scan-density-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.scan-density-actions button {
  min-height: 36px;
}

.scan-runninghub-panel {
  background: linear-gradient(180deg, rgba(230, 245, 255, 0.94), rgba(255, 255, 255, 0.95));
  border: 1px solid rgba(92, 176, 255, 0.35);
  border-radius: 18px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.scan-runninghub-panel[hidden] {
  display: none !important;
}

.ai-result-picker {
  background: #fff;
  border: 1px dashed rgba(24, 144, 255, 0.55);
  border-radius: 14px;
  color: #1562b7;
  cursor: pointer;
  font-weight: 800;
  padding: 10px;
}

.ai-result-picker input {
  margin-top: 8px;
}

.tool-row {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.scan-font-candidates {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.scan-font-candidates:empty {
  display: none;
}

.scan-font-candidates button {
  background: #ffffff;
  border: 1px solid rgba(31, 111, 235, 0.34);
  border-radius: 6px;
  color: #174f8f;
  font-size: 12px;
  min-height: 32px;
  overflow: hidden;
  padding: 5px 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scan-font-candidates button.active {
  background: #e8f3ff;
  border-color: #1f6feb;
  color: #0b4f9f;
  font-weight: 700;
}

.scan-workspace {
  min-width: 0;
}

.scan-stage {
  background: #eef7ff;
  border: 1px solid var(--line);
  border-radius: 18px;
  cursor: crosshair;
  display: block;
  max-height: 74vh;
  max-width: 100%;
  min-height: 520px;
  overflow: auto;
  position: relative;
  touch-action: none;
  user-select: none;
  width: 100%;
}

.scan-stage img {
  display: block;
  min-width: 720px;
  -webkit-user-drag: none;
  user-select: none;
  width: 100%;
}

.scan-overlays {
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.scan-stage.scan-comparing .scan-overlays {
  display: none;
}

.scan-marker {
  align-items: center;
  background: rgba(31, 111, 235, 0.14);
  border: 2px solid #1f6feb;
  color: #18212f;
  display: flex;
  font-size: 13px;
  justify-content: center;
  overflow: hidden;
  pointer-events: auto;
  position: absolute;
  text-align: center;
  z-index: 3;
}

.scan-marker.selected {
  border-color: #13a10e;
  box-shadow: 0 0 0 2px rgba(19, 161, 14, 0.22);
}

.scan-marker.image {
  background: rgba(201, 137, 4, 0.18);
  border-color: #c98904;
}

.scan-marker.erase {
  background: rgba(211, 231, 247, 0.96);
  border: 2px dashed #b42318;
  color: transparent;
  z-index: 2;
}

.scan-overlays.scan-editor-v2-selection-muted .scan-marker.erase:not(.selected) {
  background: rgba(211, 231, 247, 0.16);
  border-color: rgba(180, 35, 24, 0.28);
  box-shadow: none;
}

.scan-marker.text {
  align-items: center;
  background: transparent;
  border: 0;
  color: #111111;
  cursor: move;
  display: flex;
  font-family: inherit;
  font-weight: 400;
  justify-content: flex-start;
  letter-spacing: 0;
  line-height: 0.95;
  padding: 0 2px;
  text-align: left;
  text-rendering: geometricPrecision;
  touch-action: none;
  white-space: nowrap;
  z-index: 4;
}

.scan-marker.preview-applied {
  background: transparent;
  border: 1px solid transparent;
  color: transparent;
}

.scan-marker.preview-applied:hover,
.scan-marker.preview-applied.selected {
  background: rgba(31, 111, 235, 0.04);
  border-color: rgba(31, 111, 235, 0.55);
}

.scan-marker.applied-edit {
  background: rgba(31, 111, 235, 0.03);
  border: 1px dashed rgba(31, 111, 235, 0.38);
  color: transparent;
  cursor: pointer;
  z-index: 5;
}

.scan-marker.applied-edit:hover,
.scan-marker.applied-edit.selected {
  background: rgba(31, 111, 235, 0.08);
  border-color: rgba(19, 161, 14, 0.75);
}

.scan-word-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(31, 111, 235, 0.85);
  color: transparent;
  cursor: pointer;
  min-height: 10px;
  pointer-events: auto;
  position: absolute;
}

.scan-word-box.ghost {
  background: transparent;
  border-color: transparent;
}

.scan-word-box.selected {
  background: rgba(31, 111, 235, 0.16);
  border-color: rgba(31, 111, 235, 0.85);
  color: #1f6feb;
}

.scan-drag-box {
  background: rgba(31, 111, 235, 0.12);
  border: 2px dashed #1f6feb;
  display: none;
  position: absolute;
  will-change: left, top, width, height;
}

.scan-inline-editor {
  background: #ffffff;
  border: 1px solid #1f6feb;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(18, 31, 52, 0.18);
  display: grid;
  gap: 8px;
  min-width: 260px;
  padding: 10px;
  pointer-events: auto;
  position: absolute;
  z-index: 6;
}

.scan-inline-editor[hidden] {
  display: none;
}

.inline-actions {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr 1fr 1fr;
}

.inline-actions button {
  border-radius: 9px;
  min-height: 32px;
  padding: 5px 8px;
}

.scan-page-strip {
  align-self: stretch;
  background: rgba(247, 252, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  gap: 10px;
  max-height: 74vh;
  overflow: auto;
  padding: 10px;
}

.scan-page-strip button {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  display: grid;
  gap: 6px;
  min-height: 0;
  padding: 7px;
}

.scan-page-strip button.active {
  border-color: #1f6feb;
  box-shadow: inset 0 0 0 1px #1f6feb;
}

.scan-page-strip img {
  background: #eef7ff;
  display: block;
  width: 100%;
}

.scan-page-strip span {
  font-size: 12px;
  text-align: center;
}

.trust-strip {
  align-items: center;
  backdrop-filter: blur(18px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(239, 250, 255, 0.82)),
    rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 34px;
  box-shadow: 0 30px 70px rgba(18, 117, 225, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.98);
  display: grid;
  gap: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 28px 4px 0;
  overflow: hidden;
  padding: 24px 26px;
}

.trust-strip article {
  align-items: center;
  background: transparent;
  border-right: 1px solid rgba(106, 180, 255, 0.24);
  display: grid;
  gap: 5px 16px;
  grid-template-columns: 58px 1fr;
  min-height: 78px;
  padding: 4px 26px;
  position: relative;
}

.trust-strip article:last-child {
  border-right: 0;
}

.trust-strip.inline-info {
  margin: 0;
}

.trust-strip strong {
  color: #12305f;
  font-size: 17px;
  line-height: 1.1;
}

.trust-strip small {
  color: #627391;
  font-size: 14px;
  grid-column: 2;
}

.trust-strip .tool-icon {
  background: linear-gradient(145deg, #f8fdff, #d9f1ff);
  border: 1px solid rgba(127, 197, 255, 0.38);
  border-radius: 20px;
  box-shadow:
    0 16px 28px rgba(30, 155, 255, 0.16),
    inset 0 4px 8px rgba(255, 255, 255, 0.82),
    inset 0 -6px 12px rgba(30, 155, 255, 0.1);
  color: #1479ea;
  font-size: 15px;
  height: 50px;
  width: 50px;
}

.toast {
  background: rgba(24, 33, 47, 0.92);
  border-radius: 12px;
  bottom: 24px;
  color: #ffffff;
  left: 50%;
  opacity: 0;
  padding: 10px 14px;
  pointer-events: none;
  position: fixed;
  transform: translateX(-50%);
  transition: opacity 0.18s ease;
  z-index: 40;
}

.toast.show {
  opacity: 1;
}



/* Phase one: account state, tool availability, help center, and centered upload. */
.quota-button,
.user-entry {
  border: 1px solid rgba(255, 255, 255, 0.58);
}

.quota-button {
  font-size: 13px;
}

.user-entry {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-tool-code] {
  position: relative;
}

.tool-status-badge {
  align-items: center;
  background: #ff9f1c;
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(142, 83, 0, 0.2);
  color: #ffffff;
  display: inline-flex;
  font-size: 10px;
  font-weight: 900;
  justify-content: center;
  line-height: 1;
  min-height: 22px;
  padding: 0 7px;
  position: absolute;
  right: -8px;
  top: -10px;
  white-space: nowrap;
  z-index: 3;
}

.tool-state-maintenance .tool-status-badge {
  background: #f97316;
}

.tool-state-unavailable {
  cursor: not-allowed;
  opacity: 0.72;
}

.tool-state-unavailable:hover {
  transform: none;
}

.dropdown-panel .mega-item .tool-status-badge {
  margin-left: auto;
  position: static;
}

.tool-card .tool-status-badge,
.rail-item .tool-status-badge {
  right: 10px;
  top: 10px;
}

.help-center-panel {
  max-width: none;
}

.help-center-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.help-center-grid article {
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(67, 164, 255, 0.18);
  border-radius: 22px;
  box-shadow: 0 16px 38px rgba(17, 117, 225, 0.08);
  display: flex;
  gap: 14px;
  min-height: 126px;
  padding: 20px;
}

.help-center-grid article > div {
  display: grid;
  gap: 8px;
}

.help-center-grid strong {
  color: #0a2454;
  font-size: 16px;
}

.help-center-grid small {
  color: #61708f;
  font-size: 14px;
  line-height: 1.65;
}

.help-center-grid .membership-help-card {
  align-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(221, 242, 255, 0.94));
  grid-column: 1 / -1;
  min-height: 112px;
}

.membership-help-card > div {
  flex: 1;
}

.public-membership-cta {
  align-items: center;
  background: linear-gradient(145deg, #1e9bff, #0d64e8);
  border-radius: 999px;
  box-shadow: 0 14px 28px rgba(13, 100, 232, 0.2);
  color: #ffffff;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  text-decoration: none;
  white-space: nowrap;
}

.public-site-footer {
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(67, 164, 255, 0.18);
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(17, 117, 225, 0.1);
  color: #61708f;
  display: grid;
  font-size: 13px;
  gap: 24px;
  grid-template-columns: 1.2fr 0.8fr 1.25fr;
  margin: 26px auto 42px;
  max-width: var(--home-content-width);
  padding: 24px;
  position: relative;
  z-index: 1;
}

.public-footer-company,
.public-site-footer nav,
.public-footer-contact {
  align-content: start;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.public-footer-company strong {
  color: #0d1b3d;
  font-size: 15px;
}

.public-site-footer a {
  color: #0d64e8;
  overflow-wrap: anywhere;
  text-decoration: none;
}

/* Phase one: keep the PDF-to-Word task controls in one centered visual column. */
.hero-tool-bench #convert-form.phase-one-centered-upload.tool-flow-form.has-upload-box {
  align-content: center;
  grid-template-columns: minmax(0, 580px);
  justify-content: center;
  justify-items: center;
  text-align: center;
}

.hero-tool-bench #convert-form.phase-one-centered-upload.tool-flow-form.has-upload-box > .upload-visual,
.hero-tool-bench #convert-form.phase-one-centered-upload.tool-flow-form.has-upload-box > .upload-copy,
.hero-tool-bench #convert-form.phase-one-centered-upload.tool-flow-form.has-upload-box > .file-picker,
.hero-tool-bench #convert-form.phase-one-centered-upload.tool-flow-form.has-upload-box > .selected-file,
.hero-tool-bench #convert-form.phase-one-centered-upload.tool-flow-form.has-upload-box > .parameter-panel,
.hero-tool-bench #convert-form.phase-one-centered-upload.tool-flow-form.has-upload-box > .primary-action {
  grid-column: 1;
  justify-self: center;
}

.hero-tool-bench #convert-form.phase-one-centered-upload.tool-flow-form.has-upload-box > .upload-visual {
  grid-row: auto;
}

.hero-tool-bench #convert-form.phase-one-centered-upload.tool-flow-form.has-upload-box > .upload-copy {
  max-width: 520px;
  text-align: center;
}

.hero-tool-bench #convert-form.phase-one-centered-upload.tool-flow-form.has-upload-box > .file-picker,
.hero-tool-bench #convert-form.phase-one-centered-upload.tool-flow-form.has-upload-box > .selected-file {
  width: min(100%, 220px);
}

.hero-tool-bench #convert-form.phase-one-centered-upload.tool-flow-form.has-upload-box > .selected-file {
  min-width: 0;
  text-align: center;
}

.hero-tool-bench #convert-form.phase-one-centered-upload.tool-flow-form.has-upload-box > .parameter-panel {
  grid-template-columns: minmax(0, 360px);
  justify-content: center;
  justify-items: stretch;
  max-width: 580px;
  width: 100%;
}

.hero-tool-bench #convert-form.phase-one-centered-upload.tool-flow-form.has-upload-box > .parameter-panel > .mode-picker {
  grid-column: 1;
  justify-self: stretch;
  width: 100%;
}

@media (max-width: 700px) {
  .help-center-grid {
    grid-template-columns: 1fr;
  }

  .help-center-grid article {
    min-height: 0;
  }

  .help-center-grid .membership-help-card {
    align-items: flex-start;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .membership-help-card .public-membership-cta {
    grid-column: 1 / -1;
    width: 100%;
  }

  .public-site-footer {
    grid-template-columns: 1fr;
    margin: 20px 12px 104px;
  }

  #convert-form.phase-one-centered-upload.tool-flow-form.has-upload-box {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1320px) {
  .site-header {
    grid-template-columns: 1fr;
    justify-items: center;
    position: static;
  }
}

@media (max-width: 1160px) {
  .hero-section {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .hero-art {
    display: none;
  }

  .feature-grid {
    margin-left: 0;
  }
}

@media (max-width: 900px) {
  .site-header {
    gap: 12px;
    padding: 16px;
  }

  .brand {
    font-size: 21px;
    min-height: 62px;
    padding: 0 20px;
  }

  .mega-nav,
  .header-actions,
  .feature-grid {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    width: 100%;
  }

  .mega-nav::-webkit-scrollbar,
  .header-actions::-webkit-scrollbar,
  .feature-grid::-webkit-scrollbar {
    display: none;
  }

  .hero-section {
    display: block;
    min-height: 0;
  }

  .tool-rail {
    display: flex;
    gap: 10px;
    margin: 4px 0 18px;
    overflow-x: auto;
    padding: 10px;
    scrollbar-width: none;
  }

  .tool-rail::-webkit-scrollbar {
    display: none;
  }

  .rail-item {
    min-width: 142px;
  }

  .hero-content {
    padding-top: 10px;
  }

  .hero-copy h1 {
    font-size: 44px;
  }

  .feature-grid {
    display: flex;
    gap: 12px;
  }

  .tool-card {
    min-width: 210px;
  }

  .trust-strip {
    grid-template-columns: 1fr;
  }

  .trust-strip article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px 4px;
  }

  .trust-strip article:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 12px;
  }

  .dropdown-panel,
  .dropdown-panel.two-col {
    left: 0;
    min-width: 260px;
    transform: translate(0, 8px);
  }

  .nav-dropdown:hover .dropdown-panel,
  .nav-dropdown:focus-within .dropdown-panel {
    transform: translate(0, 0);
  }

  .hero-copy h1,
  .tool-heading h1 {
    font-size: 34px;
  }

  .hero-copy p,
  .tool-heading p:not(.eyebrow) {
    font-size: 15px;
  }

  .benefit-chips {
    gap: 10px;
  }

  .benefit-chips span {
    min-width: 0;
    width: calc(50% - 5px);
  }

  .upload-zone,
  .scan-upload {
    grid-template-columns: 1fr;
    min-height: 180px;
    padding: 22px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .tool-panel-grid {
    grid-template-columns: 1fr;
  }

  .tool-flow-form.has-upload-box {
    grid-template-columns: 1fr;
  }

  .tool-flow-form .upload-visual,
  .tool-flow-form .upload-copy,
  .tool-flow-form .file-picker,
  .tool-flow-form .selected-file {
    grid-column: 1;
  }

  .tool-flow-form .parameter-panel {
    grid-template-columns: 1fr;
  }

  .file-task-item {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .file-task-item .task-status,
  .task-actions,
  .task-progress,
  .task-error {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .hero-tool-bench .grid,
  .hero-tool-bench .tool-panel-grid {
    grid-template-columns: 1fr;
  }

  .hero-tool-bench .upload-zone {
    min-height: 180px;
    padding: 22px;
  }

  .hero-tool-bench #convert-form {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .hero-tool-bench #convert-form .upload-visual,
  .hero-tool-bench #convert-form > div:not(.upload-visual),
  .hero-tool-bench #convert-form .file-picker,
  .hero-tool-bench #convert-form .mode-picker,
  .hero-tool-bench #convert-form .primary-action {
    grid-column: auto;
    grid-row: auto;
    justify-self: center;
  }

  .selected-file,
  .convert-mode-grid,
  .quality-checks {
    grid-column: auto;
  }

  .convert-mode-grid {
    grid-template-columns: 1fr;
  }

  .tool-workbench .panel.active.tool-runner-layout {
    grid-template-columns: 1fr;
  }

  .result-panel {
    grid-column: 1;
    min-height: 220px;
  }

  .workspace-panel {
    border-radius: 20px;
    padding: 18px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .scan-layout {
    grid-template-columns: 1fr;
  }

  .scan-workspace {
    order: 1;
  }

  .scan-page-strip {
    display: flex;
    max-height: none;
    order: 2;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .scan-page-strip button {
    min-width: 92px;
  }

  .bottom-sheet {
    order: 3;
    position: sticky;
    bottom: 0;
    z-index: 10;
  }

  .scan-stage {
    max-height: 62vh;
    min-height: 420px;
  }

  .scan-stage img {
    min-width: 0;
  }

  .scan-inline-editor {
    left: 8px !important;
    min-width: calc(100% - 16px);
    right: 8px;
  }
}

@media (max-width: 520px) {
  .brand {
    width: 100%;
  }

  .benefit-chips span {
    width: 100%;
  }

  .tool-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1160px) {
  .hero-section {
    grid-template-columns: 1fr;
  }

  .hero-art {
    display: none;
  }

  .tool-selector-grid.feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header {
    position: static;
  }

  .app-shell {
    padding: 16px;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .workflow-steps {
    grid-template-columns: 1fr;
    margin: 22px 0;
  }

  .tool-selector-grid.feature-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    padding-bottom: 0;
  }

  .tool-selector-section,
  .tool-workbench {
    border-radius: 24px;
    margin: 18px 0;
    padding: 18px;
  }

  .section-heading h2,
  .workbench-heading h2 {
    font-size: 26px;
  }

  .tool-selector-grid .tool-card {
    align-content: start;
    gap: 9px;
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 154px;
    min-width: 0;
    padding: 16px 12px;
    text-align: center;
  }

  .tool-selector-grid .tool-card::after {
    display: none;
  }

  .tool-selector-grid .tool-card strong,
  .tool-selector-grid .tool-card small {
    grid-column: 1;
  }

  .tool-selector-grid .tool-card strong {
    align-self: auto;
    font-size: 15px;
    line-height: 1.35;
  }

  .tool-selector-grid .tool-card small {
    display: -webkit-box;
    font-size: 12px;
    line-height: 1.4;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .tool-help-footer {
    grid-template-columns: 1fr;
  }

  .tool-help-footer article {
    padding: 16px;
  }
}

/* Desktop account controls and the independent mobile tool center. */
.desktop-header-actions {
  align-items: center;
  min-width: 0;
  position: relative;
}

.desktop-header-actions > .user-entry:not(.account-menu-toggle) {
  display: none !important;
}

.account-menu {
  position: relative;
}

.account-menu-toggle {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  max-width: 164px;
  min-width: 0;
  overflow: hidden;
  padding: 0 12px 0 8px;
}

.account-avatar {
  align-items: center;
  background: linear-gradient(135deg, #39aaff, #0b70e8);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 30px;
  font-size: 13px;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.account-label,
.mobile-account-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-panel {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(64, 154, 240, 0.24);
  border-radius: 14px;
  box-shadow: 0 18px 38px rgba(12, 79, 160, 0.2);
  display: grid;
  gap: 4px;
  min-width: 190px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
}

.account-menu-panel[hidden] {
  display: none;
}

.account-menu-panel a,
.account-menu-panel button,
.account-menu-quota {
  background: transparent;
  border-radius: 9px;
  color: var(--ink);
  display: block;
  font-size: 14px;
  padding: 10px 12px;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
}

.account-menu-panel a:hover,
.account-menu-panel button:hover {
  background: var(--blue-100);
}

.account-menu-quota {
  color: var(--muted);
  cursor: default;
}

.account-menu-logout {
  color: #b42318 !important;
}

.mobile-app-shell,
.mobile-bottom-nav,
.mobile-upload-sheet {
  display: none;
}

.mobile-app-shell {
  margin: 0 auto;
  max-width: 680px;
  padding: 12px 16px 104px;
}

.mobile-topbar,
.mobile-tool-heading,
.mobile-section-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.mobile-brand {
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  color: var(--ink);
  display: inline-flex;
  gap: 9px;
  max-width: calc(100% - 76px);
  min-height: 54px;
  padding: 6px 14px 6px 8px;
  text-decoration: none;
}

.mobile-brand .brand-mark {
  border-radius: 12px;
  font-size: 13px;
  height: 40px;
  width: 40px;
}

.mobile-brand-name {
  font-size: 18px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-account-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  color: var(--blue-700);
  display: inline-flex;
  flex: 0 0 auto;
  gap: 5px;
  max-width: 82px;
  min-height: 42px;
  padding: 5px 8px 5px 5px;
}

.mobile-account-button .account-avatar {
  flex-basis: 30px;
  height: 30px;
  width: 30px;
}

.mobile-tool-search {
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 15px;
  box-shadow: var(--soft-shadow);
  color: var(--muted);
  display: flex;
  gap: 8px;
  margin: 16px 0 12px;
  padding: 0 14px;
}

.mobile-tool-search input {
  background: transparent;
  border: 0;
  color: var(--ink);
  min-width: 0;
  outline: 0;
  padding: 13px 0;
  width: 100%;
}

.mobile-category-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 8px;
  scrollbar-width: none;
}

.mobile-category-list::-webkit-scrollbar {
  display: none;
}

.mobile-category-list button {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 13px;
  padding: 8px 13px;
}

.mobile-category-list button.active {
  background: var(--blue-700);
  color: #fff;
}

.mobile-tool-heading {
  margin: 18px 0 10px;
}

.mobile-tool-heading h1,
.mobile-section-heading h2 {
  color: var(--ink);
  margin: 0;
}

.mobile-tool-heading h1 {
  font-size: 25px;
}

.mobile-tool-heading .eyebrow {
  margin: 0 0 4px;
}

.mobile-quota-label {
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.mobile-tool-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mobile-tool-card {
  align-content: start;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  box-shadow: 0 12px 25px rgba(22, 111, 199, 0.1);
  color: var(--ink);
  display: grid;
  gap: 6px;
  min-height: 142px;
  padding: 14px;
  position: relative;
  text-align: left;
}

.mobile-tool-card:hover {
  transform: translateY(-2px);
}

.mobile-tool-card strong {
  font-size: 15px;
}

.mobile-tool-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.mobile-tool-icon {
  align-items: center;
  background: linear-gradient(135deg, #60c2ff, #0874ec);
  border-radius: 11px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.mobile-tool-state {
  color: #1c8b52;
  font-size: 11px;
  font-weight: 700;
}

.mobile-tool-card.tool-state-coming-soon .mobile-tool-state,
.mobile-tool-card.tool-state-maintenance .mobile-tool-state {
  color: #d97706;
}

.mobile-tool-card[hidden] {
  display: none;
}

.mobile-recent-section {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  margin-top: 18px;
  padding: 16px;
}

.mobile-section-heading h2 {
  font-size: 18px;
}

.mobile-section-heading button {
  background: transparent;
  color: var(--blue-700);
  font-size: 13px;
  padding: 4px;
}

.mobile-jobs-status {
  color: var(--muted);
  font-size: 13px;
  margin: 10px 0 0;
}

.mobile-job-list {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.mobile-job-row {
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 11px;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
  padding: 10px;
}

.mobile-job-row > div {
  min-width: 0;
}

.mobile-job-row strong,
.mobile-job-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-job-row strong {
  font-size: 13px;
}

.mobile-job-row small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.mobile-job-row a {
  color: var(--blue-700);
  flex: 0 0 auto;
  font-size: 12px;
  text-decoration: none;
}

.mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(111, 181, 241, 0.25);
  bottom: 0;
  box-shadow: 0 -8px 26px rgba(23, 111, 195, 0.12);
  grid-template-columns: repeat(5, minmax(0, 1fr));
  left: 0;
  padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
  position: fixed;
  right: 0;
  z-index: 50;
}

.mobile-bottom-nav button {
  align-items: center;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  font-size: 11px;
  gap: 3px;
  min-width: 0;
  padding: 3px 2px;
}

.mobile-bottom-nav button > span {
  font-size: 20px;
  line-height: 1;
}

.mobile-bottom-nav button.active,
.mobile-bottom-nav button:hover {
  color: var(--blue-700);
}

.mobile-bottom-nav .mobile-upload-button > span {
  align-items: center;
  background: linear-gradient(135deg, #4bb9ff, #0874ec);
  border: 4px solid rgba(232, 247, 255, 0.96);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 24px;
  height: 48px;
  justify-content: center;
  margin-top: -24px;
  width: 48px;
}

.mobile-upload-sheet[hidden] {
  display: none;
}

.mobile-upload-sheet:not([hidden]) {
  display: block;
}

.mobile-upload-sheet {
  inset: 0;
  position: fixed;
  z-index: 70;
}

.mobile-sheet-backdrop {
  background: rgba(8, 36, 92, 0.32);
  inset: 0;
  position: absolute;
}

.mobile-sheet-panel {
  background: #f7fcff;
  border-radius: 22px 22px 0 0;
  bottom: 0;
  box-shadow: 0 -20px 50px rgba(7, 75, 157, 0.2);
  display: grid;
  gap: 9px;
  left: 0;
  padding: 20px 16px calc(22px + env(safe-area-inset-bottom));
  position: absolute;
  right: 0;
}

.mobile-upload-option {
  background: #fff;
  border: 1px solid rgba(104, 177, 238, 0.22);
  border-radius: 12px;
  color: var(--ink);
  display: flex;
  font-weight: 700;
  justify-content: space-between;
  padding: 13px;
  text-align: left;
}

.mobile-upload-option span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

/* Keep every desktop tool page in the same centered work column. */
@media (min-width: 901px) {
  body.tool-page .tool-workbench-body {
    width: 100%;
  }

  body.tool-page .tool-workbench-body > .hero-tool-bench {
    margin: 0 auto;
    max-width: 1120px;
    width: 100%;
  }

  body.tool-page .tool-workbench-body .panel.active {
    margin-left: auto;
    margin-right: auto;
    max-width: 1120px;
    width: 100%;
  }

  body.tool-page .tool-workbench-body .panel.active > .tool-flow-form,
  body.tool-page .tool-workbench-body .panel.active > .upload-zone,
  body.tool-page .tool-workbench-body .panel.active > .scan-layout,
  body.tool-page .tool-workbench-body .panel.active > .toolbar,
  body.tool-page .tool-workbench-body .panel.active > .page-list,
  body.tool-page .tool-workbench-body .panel.active > .file-task-list {
    margin-left: auto;
    margin-right: auto;
    max-width: 1120px;
    width: 100%;
  }

  body.tool-page .tool-workbench-body .tool-flow-form.has-upload-box:not(.phase-one-centered-upload) {
    align-content: center;
    grid-template-columns: minmax(0, 760px);
    justify-content: center;
    justify-items: center;
    text-align: center;
  }

  body.tool-page .tool-workbench-body .tool-flow-form.has-upload-box:not(.phase-one-centered-upload) > .upload-visual,
  body.tool-page .tool-workbench-body .tool-flow-form.has-upload-box:not(.phase-one-centered-upload) > .upload-copy,
  body.tool-page .tool-workbench-body .tool-flow-form.has-upload-box:not(.phase-one-centered-upload) > .file-picker,
  body.tool-page .tool-workbench-body .tool-flow-form.has-upload-box:not(.phase-one-centered-upload) > .selected-file,
  body.tool-page .tool-workbench-body .tool-flow-form.has-upload-box:not(.phase-one-centered-upload) > .parameter-panel,
  body.tool-page .tool-workbench-body .tool-flow-form.has-upload-box:not(.phase-one-centered-upload) > .primary-action {
    grid-column: 1;
    grid-row: auto;
    justify-self: center;
  }

  body.tool-page .tool-workbench-body .tool-flow-form.has-upload-box:not(.phase-one-centered-upload) > .upload-copy {
    max-width: 700px;
  }

  body.tool-page .tool-workbench-body .tool-flow-form.has-upload-box:not(.phase-one-centered-upload) > .file-picker,
  body.tool-page .tool-workbench-body .tool-flow-form.has-upload-box:not(.phase-one-centered-upload) > .selected-file {
    width: min(100%, 240px);
  }

  body.tool-page .tool-workbench-body .tool-flow-form.has-upload-box:not(.phase-one-centered-upload) > .parameter-panel {
    grid-template-columns: minmax(0, 1fr);
    max-width: 640px;
    width: 100%;
  }

  body.tool-page .tool-help-footer {
    margin-left: auto;
    margin-right: auto;
    max-width: 1120px;
    width: 100%;
  }
}

@media (min-width: 901px) and (max-width: 1299px) {
  .site-header {
    gap: 12px;
    grid-template-columns: minmax(220px, 1fr) auto;
    padding: 16px 18px 12px;
  }

  .mega-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
    min-width: 0;
    width: 100%;
  }

  .desktop-header-actions {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }
}

@media (min-width: 901px) and (max-width: 1050px) {
  .desktop-header-actions .ghost-button {
    display: none;
  }

  .mega-nav .nav-dropdown:nth-of-type(n + 3) {
    display: none;
  }
}

@media (max-width: 900px) {
  html,
  body {
    min-width: 0;
    overflow-x: hidden;
  }

  .site-header,
  body:not(.tool-page) .app-shell {
    display: none;
  }

  .mobile-app-shell,
  .mobile-bottom-nav {
    display: block;
  }

  .mobile-bottom-nav {
    display: grid;
  }

  body.tool-page .app-shell {
    display: block;
    padding: 12px 12px 100px;
  }

  body.tool-page .mobile-app-shell {
    display: none;
  }

  body.tool-page .tool-workbench {
    display: block;
    margin: 0;
    padding: 16px;
  }

  .mobile-app-shell.mobile-files-mode .mobile-tool-search,
  .mobile-app-shell.mobile-files-mode .mobile-category-list,
  .mobile-app-shell.mobile-files-mode .mobile-tool-heading,
  .mobile-app-shell.mobile-files-mode .mobile-tool-grid {
    display: none;
  }

  .mobile-app-shell.mobile-files-mode .mobile-recent-section {
    margin-top: 16px;
  }

  .mobile-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-selector-section,
  .tool-workbench {
    max-width: 100%;
  }
}

@media (max-width: 390px) {
  .mobile-app-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .mobile-tool-card {
    padding: 11px;
  }

  .mobile-tool-card strong {
    font-size: 14px;
  }
}

.scan-editor-v2 {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: none;
}

.scan-editor-v2:not([hidden]) {
  display: block;
}

.scan-editor-v2-inspect-region {
  position: absolute;
  z-index: 29;
  border: 2px solid rgba(196, 58, 48, 0.9);
  background: rgba(196, 58, 48, 0.08);
  pointer-events: none;
}

.scan-editor-v2-inspect-region[hidden] {
  display: none;
}

.scan-editor-v2-card__common[hidden],
.scan-editor-v2-card__advanced[hidden],
.scan-editor-v2-card__advanced-toggle[hidden],
.scan-editor-v2-card__line-rewrite[hidden] {
  display: none;
}

.scan-editor-v2-card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  max-height: min(640px, calc(100vh - 24px));
  min-width: 320px;
  max-width: 380px;
  position: fixed;
  z-index: 30;
  width: 340px;
  border: 1px solid rgba(50, 70, 90, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 36px rgba(25, 45, 65, 0.2);
  color: #1f2a33;
  overflow-y: auto;
  pointer-events: auto;
}

.scan-editor-v2-card__header,
.scan-editor-v2-card__lock-row,
.scan-editor-v2-card__actions,
.scan-editor-v2-card__actions-aux,
.scan-editor-v2-card__actions-primary {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scan-editor-v2-card__header {
  justify-content: space-between;
  padding: 11px 13px 9px;
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.98);
  cursor: move;
  touch-action: none;
}

.scan-editor-v2-card__body {
  display: grid;
  gap: 9px;
  min-height: 0;
  padding: 0 13px 13px;
}

.scan-editor-v2-card__field,
.scan-editor-v2-card__common label,
.scan-editor-v2-card__advanced label {
  display: grid;
  gap: 4px;
  font-size: 12px;
}

.scan-editor-v2-card__field textarea,
.scan-editor-v2-card__common input,
.scan-editor-v2-card__advanced input,
.scan-editor-v2-card__advanced select {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid rgba(50, 70, 90, 0.22);
  border-radius: 6px;
  padding: 6px 8px;
  background: #fff;
}

.scan-editor-v2-card__lock-row {
  font-size: 11px;
  color: #657482;
}

.scan-editor-v2-card__common {
  display: grid;
  gap: 8px;
}

.scan-editor-v2-card__parameter-grid,
.scan-editor-v2-card__advanced {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.scan-editor-v2-card__stepper > span:last-child {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) 25px;
  gap: 3px;
}

.scan-editor-v2-card button,
.scan-editor-v2-card input,
.scan-editor-v2-card select,
.scan-editor-v2-card textarea {
  font: inherit;
}

.scan-editor-v2-card button {
  border: 1px solid rgba(50, 70, 90, 0.2);
  border-radius: 6px;
  background: #fff;
  color: #263845;
  cursor: pointer;
  padding: 5px 8px;
}

.scan-editor-v2-card button:hover {
  background: #f0f6fa;
}

.scan-editor-v2-card__stepper button {
  padding: 3px 0;
}

.scan-editor-v2-card__lock-row button,
.scan-editor-v2-card__advanced-toggle {
  flex: 0 0 auto;
  color: #246b91;
  font-size: 11px;
}

.scan-editor-v2-card__advanced-toggle {
  justify-self: start;
}

.scan-editor-v2-card__fixed-note,
.scan-editor-v2-card__message {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: #657482;
}

.scan-editor-v2-card__line-rewrite {
  width: 100%;
  border-color: #c87b37;
  color: #9a551f;
}

.scan-editor-v2-card__message.error {
  color: #b33b36;
}

.scan-editor-v2-card__actions {
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 2px;
}

.scan-editor-v2-card__actions-aux,
.scan-editor-v2-card__actions-primary {
  flex-wrap: wrap;
}

.scan-editor-v2-card__actions-primary button:last-child {
  border-color: #1769aa;
  background: #1769aa;
  color: #fff;
}

.scan-editor-v2-confirm[hidden] {
  display: none;
}

.scan-editor-v2-confirm {
  inset: 0;
  position: fixed;
  z-index: 65;
  pointer-events: auto;
}

.scan-editor-v2-confirm__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 32, 45, 0.22);
}

.scan-editor-v2-confirm__dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(360px, calc(100vw - 32px));
  box-sizing: border-box;
  transform: translate(-50%, -50%);
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(50, 70, 90, 0.22);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(18, 32, 45, 0.24);
  color: #1f2a33;
}

.scan-editor-v2-confirm__dialog p {
  margin: 0;
  color: #657482;
  font-size: 12px;
}

.scan-editor-v2-confirm__actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
