﻿/* XianCut tools runtime: consolidated source. Legacy layout-fixes and duplicate page overrides were removed. */
:root {
  color-scheme: light;
  --page: #f4f7fb;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --soft: #eef3fb;
  --ink: #101520;
  --text: #151b2d;
  --muted: #667287;
  --line: #dce5f0;
  --line-strong: #cbd7e6;
  --primary: #6957ff;
  --primary-strong: #5140dc;
  --cyan: #03a9d9;
  --green: #168dff;
  --orange: #ff7a1a;
  --pink: #ec4899;
  --amber: #f5b329;
  --shadow: 0 28px 74px rgba(17, 25, 40, 0.15);
  --tight-shadow: 0 16px 38px rgba(17, 25, 40, 0.12);
  --sidebar-width: 178px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(115deg, rgba(3, 169, 217, 0.08) 0 18%, transparent 18% 100%),
    linear-gradient(160deg, transparent 0 62%, rgba(245, 179, 41, 0.1) 62% 76%, transparent 76%),
    linear-gradient(180deg, #f9fbff 0%, #eef5fb 56%, #ffffff 56%);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 58px 0 auto var(--sidebar-width);
  height: 1px;
  z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(3, 169, 217, 0.38), rgba(255, 122, 26, 0.28), transparent);
  animation: scanline 4s ease-in-out infinite;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

body.dark-mode {
  --page: #101522;
  --surface: rgba(19, 25, 38, 0.9);
  --surface-solid: #171e2d;
  --soft: #222b3d;
  --ink: #f7f9ff;
  --text: #f7f9ff;
  --muted: #aab5c6;
  --line: #30394c;
  --line-strong: #3d475a;
  background:
    linear-gradient(115deg, rgba(3, 169, 217, 0.11) 0 18%, transparent 18% 100%),
    linear-gradient(160deg, transparent 0 62%, rgba(255, 122, 26, 0.12) 62% 76%, transparent 76%),
    linear-gradient(180deg, #101522 0%, #121a28 56%, #0e1420 56%);
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient span {
  position: absolute;
  left: -12vw;
  width: 46vw;
  height: 2px;
  border-radius: 0;
  opacity: 0.28;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  animation: sweep 8s linear infinite;
}

.ambient span:nth-child(1) {
  top: 22%;
  color: var(--cyan);
}

.ambient span:nth-child(2) {
  top: 45%;
  color: var(--primary);
  animation-delay: -2.8s;
}

.ambient span:nth-child(3) {
  top: 68%;
  color: var(--orange);
  animation-delay: -5.4s;
}

@keyframes sweep {
  from {
    transform: translateX(-20vw) rotate(-8deg);
  }
  to {
    transform: translateX(138vw) rotate(-8deg);
  }
}

@keyframes scanline {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  50% {
    transform: translateY(210px);
    opacity: 0.12;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  display: grid;
  grid-template-columns: minmax(210px, 280px) minmax(430px, 1fr) auto;
  align-items: center;
  min-height: 58px;
  padding: 0 22px 0 30px;
  border-bottom: 1px solid rgba(210, 221, 234, 0.9);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

body.dark-mode .site-header {
  background: rgba(16, 21, 34, 0.84);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  color: var(--text);
  text-decoration: none;
}

.brand-symbol {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #172034, #6957ff 58%, #03a9d9);
  color: #fff;
  box-shadow: 0 12px 28px rgba(81, 64, 220, 0.24);
}

.brand-symbol::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 5px;
}

.brand-symbol svg {
  width: 18px;
  height: 18px;
}

.brand strong {
  display: block;
  overflow: hidden;
  max-width: 188px;
  font-size: 20px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand strong span {
  color: var(--primary);
}

.brand small {
  display: block;
  overflow: hidden;
  max-width: 188px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-nav,
.header-actions {
  display: flex;
  align-items: center;
}

.top-nav {
  justify-content: center;
  gap: 10px;
}

.nav-item {
  position: relative;
}

.nav-trigger,
.header-action,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  font-size: 14px;
}

.nav-trigger:hover,
.nav-trigger.active,
.nav-item.open .nav-trigger,
.header-action:hover {
  color: var(--primary-strong);
  background: rgba(105, 87, 255, 0.09);
}

.nav-trigger svg,
.header-action svg,
.theme-toggle svg {
  width: 16px;
  height: 16px;
}

.nav-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  z-index: 90;
  display: none;
  grid-template-columns: 1fr;
  min-width: 246px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}

.nav-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 8px;
}

.nav-item:hover .nav-menu,
.nav-item:focus-within .nav-menu,
.nav-item.open .nav-menu {
  display: grid;
}

.nav-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  padding: 0 10px;
  text-align: left;
}

.nav-menu button svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--tool-color, var(--primary));
}

.nav-menu button:hover {
  background: var(--soft);
  color: var(--primary-strong);
}

.header-actions {
  justify-content: flex-end;
  gap: 4px;
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--surface-solid);
}

.theme-toggle strong {
  min-width: 38px;
  border-radius: 6px;
  padding: 4px 8px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  text-align: center;
}

.quick-entry {
  position: fixed;
  top: 76px;
  right: 30px;
  z-index: 30;
  width: 320px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  background: var(--surface);
  box-shadow: var(--tight-shadow);
  backdrop-filter: blur(18px);
}

.quick-entry[hidden] {
  display: none;
}

.quick-close,
.popover-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  color: var(--muted);
}

.quick-entry p,
.quick-entry h2,
.quick-entry span {
  display: block;
  margin: 0;
}

.quick-entry p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.quick-entry h2 {
  margin-top: 8px;
  font-size: 26px;
}

.quick-entry > span {
  margin-top: 12px;
  color: var(--muted);
}

#quickActions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

#quickActions button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  color: var(--text);
  font-weight: 800;
}

#quickActions button:hover {
  border-color: rgba(105, 87, 255, 0.45);
  color: var(--primary-strong);
}

.home-mode::before {
  left: 0;
}

.home-mode .tool-sidebar,
.home-mode .hero-tool,
.home-mode .result-section,
.home-mode .quick-entry,
.tool-mode .landing-home {
  display: none;
}

.landing-home {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(560px, 1.1fr);
  align-items: center;
  gap: clamp(36px, 5vw, 72px);
  min-height: calc(100vh - 58px);
  padding: 72px max(6vw, 56px) 88px;
}

.landing-copy {
  min-width: 0;
  width: min(600px, 100%);
  justify-self: end;
}

.landing-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0 0 16px;
  border: 1px solid rgba(105, 87, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--primary-strong);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.landing-copy h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(44px, 4.2vw, 64px);
  line-height: 1.05;
}

.landing-summary {
  max-width: 620px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.7;
}

.landing-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 16px 26px;
  margin-top: 34px;
}

.landing-points span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--tool-color, var(--primary));
  font-size: 20px;
  font-weight: 900;
  white-space: nowrap;
}

.landing-points span:nth-child(1) {
  color: #9b83ff;
}

.landing-points span:nth-child(2) {
  color: #f4bd16;
}

.landing-points span:nth-child(3) {
  color: #168dff;
}

.landing-points span:nth-child(4) {
  color: var(--orange);
}

.landing-points i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.home-picker {
  min-width: 0;
  width: min(720px, 100%);
  justify-self: start;
}

.home-picker h2 {
  margin: 0 0 24px;
  color: var(--ink);
  font-size: clamp(28px, 3vw, 40px);
  text-align: center;
}

.ai-console {
  display: grid;
  gap: 16px;
}

.ai-console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.ai-console-head span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 900;
}

.ai-console-head svg {
  width: 17px;
  height: 17px;
}

.ai-console-head strong {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-upload-preview {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 16px;
  min-width: 0;
  border: 1px solid rgba(105, 87, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(105, 87, 255, 0.14), rgba(3, 169, 217, 0.1), rgba(22, 141, 255, 0.1)),
    rgba(255, 255, 255, 0.78);
  box-shadow: var(--tight-shadow);
  padding: 18px;
}

body.dark-mode .ai-upload-preview {
  background:
    linear-gradient(135deg, rgba(105, 87, 255, 0.18), rgba(3, 169, 217, 0.12), rgba(22, 141, 255, 0.12)),
    rgba(23, 30, 45, 0.82);
}

.ai-upload-preview div {
  min-width: 0;
}

.ai-upload-preview strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
}

.ai-upload-preview p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.ai-upload-preview button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  padding: 0 14px;
  font-weight: 900;
  white-space: nowrap;
}

.ai-flow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ai-flow-grid button {
  display: grid;
  justify-items: start;
  gap: 7px;
  min-width: 0;
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 14px;
  text-align: left;
  box-shadow: 0 10px 28px rgba(17, 25, 40, 0.08);
}

.ai-flow-grid button:hover {
  border-color: rgba(105, 87, 255, 0.36);
  transform: translateY(-1px);
}

.ai-flow-grid svg {
  width: 22px;
  height: 22px;
  color: var(--primary);
}

.ai-flow-grid span {
  font-weight: 900;
}

.ai-flow-grid small {
  color: var(--muted);
  line-height: 1.45;
}

.browser-stack,
.local-engine-panel {
  min-width: 0;
}

.browser-stack {
  margin-top: 2px;
}

.local-engine-panel {
  margin-top: 14px;
}

.engine-panel-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(105, 87, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(105, 87, 255, 0.08), rgba(3, 169, 217, 0.08)),
    var(--surface);
  padding: 14px;
}

body.dark-mode .engine-panel-card {
  background:
    linear-gradient(135deg, rgba(105, 87, 255, 0.14), rgba(3, 169, 217, 0.1)),
    rgba(23, 30, 45, 0.82);
}

.engine-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.engine-panel-head span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.engine-panel-head strong {
  flex: 0 0 auto;
  border-radius: 6px;
  background: rgba(22, 141, 255, 0.12);
  color: var(--green);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
}

.engine-panel-card p,
.engine-panel-card small {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.engine-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.engine-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  color: var(--text);
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
}

.engine-chip i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.engine-chip em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.engine-chip.is-ready {
  border-color: rgba(22, 141, 255, 0.25);
  color: var(--green);
}

.engine-chip.is-muted {
  color: var(--muted);
  opacity: 0.78;
}

.home-picker-shell {
  overflow: hidden;
  min-height: 346px;
  border: 1px solid rgba(105, 87, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(105, 87, 255, 0.12), rgba(3, 169, 217, 0.1), rgba(236, 72, 153, 0.08)),
    rgba(255, 255, 255, 0.68);
  box-shadow: var(--tight-shadow);
}

body.dark-mode .home-picker-shell {
  background:
    linear-gradient(135deg, rgba(105, 87, 255, 0.16), rgba(3, 169, 217, 0.12), rgba(236, 72, 153, 0.1)),
    rgba(23, 30, 45, 0.8);
}

.home-picker-top {
  display: grid;
  grid-template-columns: 1fr minmax(170px, 230px);
  align-items: end;
  border-bottom: 1px solid rgba(105, 87, 255, 0.18);
}

.home-tabs {
  display: flex;
  align-items: end;
  min-width: 0;
}

.home-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 92px;
  min-height: 52px;
  border: 0;
  border-right: 1px solid rgba(105, 87, 255, 0.16);
  background: rgba(255, 255, 255, 0.42);
  color: var(--muted);
  font-weight: 900;
}

.home-tabs button.active {
  background: rgba(255, 255, 255, 0.64);
  color: var(--primary);
  box-shadow: inset 0 2px 0 rgba(105, 87, 255, 0.45);
}

.home-tabs button span {
  width: 4px;
  height: 22px;
  border-radius: 999px;
  background: currentColor;
}

.home-tabs button:nth-child(2) span {
  color: var(--cyan);
}

.home-tabs button:nth-child(3) span {
  color: var(--pink);
}

.home-tabs button:nth-child(4) span {
  color: #9b83ff;
}

.home-search {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 52px;
  padding: 0 14px;
  border-left: 1px solid rgba(105, 87, 255, 0.16);
  background: rgba(255, 255, 255, 0.5);
  color: var(--muted);
}

.home-search svg {
  width: 18px;
  height: 18px;
}

.home-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.home-search span {
  border-radius: 6px;
  background: rgba(21, 27, 45, 0.08);
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.home-tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(118px, 1fr));
  align-content: start;
  gap: 12px;
  min-height: 292px;
  padding: 24px;
}

.home-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  min-height: 52px;
  border: 1px solid rgba(17, 25, 40, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--text);
  box-shadow: inset 0 -1px 0 rgba(17, 25, 40, 0.06);
  font-weight: 900;
}

.home-tool:hover {
  border-color: rgba(105, 87, 255, 0.34);
  background: rgba(255, 255, 255, 0.84);
  transform: translateY(-1px);
}

.home-tool svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--tool-color, var(--primary));
}

.home-tool span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-sidebar {
  position: fixed;
  z-index: 45;
  top: 58px;
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

body.dark-mode .tool-sidebar {
  background: rgba(16, 21, 34, 0.9);
}

.sidebar-scroll {
  height: 100%;
  overflow: auto;
  padding: 16px 8px 26px;
}

.sidebar-group {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.sidebar-title {
  margin: 0 0 4px 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.sidebar-tool {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  text-align: left;
}

.sidebar-tool svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--tool-color, var(--primary));
}

.sidebar-tool span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-tool:hover,
.sidebar-tool.active {
  background: rgba(105, 87, 255, 0.1);
  color: var(--primary-strong);
  font-weight: 900;
}

.sidebar-tool.active {
  box-shadow: inset 3px 0 0 var(--primary);
}

.page {
  margin-left: 0;
}

.tool-mode .page {
  margin-left: var(--sidebar-width);
}

.hero-tool {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(420px, 1fr);
  align-items: center;
  gap: clamp(34px, 5vw, 76px);
  min-height: calc(100vh - 58px);
  padding: 72px max(5vw, 44px) 78px;
}

.tool-intro {
  justify-self: end;
  min-width: 0;
  width: min(560px, 100%);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
}

.badges span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  border: 1px solid rgba(203, 215, 230, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  padding: 0 9px;
  font-size: 13px;
  font-weight: 800;
}

body.dark-mode .badges span {
  background: rgba(23, 30, 45, 0.64);
}

.badges svg {
  width: 15px;
  height: 15px;
}

.badges span:nth-child(1) svg {
  color: var(--primary);
}

.badges span:nth-child(2) svg {
  color: var(--green);
}

.badges span:nth-child(3) svg {
  color: var(--cyan);
}

.badges span:nth-child(4) svg {
  color: var(--orange);
}

.title-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-bubble {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(238, 243, 251, 0.9)),
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(3, 169, 217, 0.08) 10px 12px);
  color: var(--primary);
  box-shadow: var(--tight-shadow);
  overflow: hidden;
}

body.dark-mode .icon-bubble {
  background:
    linear-gradient(180deg, rgba(23, 30, 45, 0.9), rgba(34, 43, 61, 0.88)),
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(3, 169, 217, 0.12) 10px 12px);
}

.icon-bubble::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid currentColor;
  border-radius: 5px;
  opacity: 0.22;
  animation: iconFocus 2.4s ease-in-out infinite;
}

.icon-bubble svg {
  position: relative;
  width: 34px;
  height: 34px;
  z-index: 1;
}

@keyframes iconFocus {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.14;
  }
  50% {
    transform: scale(1);
    opacity: 0.32;
  }
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

.tool-intro h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(44px, 4.4vw, 66px);
  line-height: 1;
}

.lead {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.52;
}

.creator-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 28px;
}

.creator-rail span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

body.dark-mode .creator-rail span {
  background: rgba(23, 30, 45, 0.72);
}

.creator-rail svg {
  width: 16px;
  height: 16px;
}

.creator-rail span:nth-child(1) svg {
  color: var(--orange);
}

.creator-rail span:nth-child(2) svg {
  color: var(--cyan);
}

.creator-rail span:nth-child(3) svg {
  color: var(--green);
}

.upload-card,
.result-panel,
.steps-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.upload-card {
  justify-self: start;
  width: min(560px, 100%);
  min-width: 0;
  overflow: hidden;
  padding: 28px;
}

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 250px;
  border: 1.5px dashed #cbd7e6;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(238, 243, 251, 0.6)),
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(105, 87, 255, 0.04) 28px 29px);
  text-align: center;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

body.dark-mode .dropzone {
  background:
    linear-gradient(180deg, rgba(23, 30, 45, 0.78), rgba(34, 43, 61, 0.56)),
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(3, 169, 217, 0.06) 28px 29px);
}

.dropzone.dragover {
  border-color: var(--primary);
  background: rgba(105, 87, 255, 0.08);
  transform: translateY(-2px);
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.drop-inner {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 20px;
}

.upload-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--primary);
  background: var(--surface-solid);
  animation: uploadBeat 2.6s ease-in-out infinite;
}

.upload-orb::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  height: 2px;
  background: currentColor;
  opacity: 0.2;
}

.upload-orb svg {
  width: 32px;
  height: 32px;
}

@keyframes uploadBeat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.drop-inner strong {
  font-size: 18px;
}

.drop-inner span:last-child {
  color: var(--muted);
  line-height: 1.45;
}

.url-tool {
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.url-tool > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.url-tool > span::before,
.url-tool > span::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.url-tool div {
  display: grid;
  grid-template-columns: 1fr 82px;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
}

.url-tool input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 0 14px;
  text-overflow: ellipsis;
}

.url-tool button {
  min-height: 42px;
  border: 0;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}

.file-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
}

.file-row span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-row span:last-child {
  flex: 0 0 auto;
  color: var(--muted);
  white-space: nowrap;
}

.file-row small {
  grid-column: 1 / -1;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.setting {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.setting label {
  font-size: 13px;
  font-weight: 900;
}

.setting input,
.setting select,
.setting textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  color: var(--text);
  padding: 0 12px;
}

.setting textarea {
  min-height: 110px;
  padding: 11px 12px;
  resize: vertical;
  line-height: 1.5;
}

.setting-wide {
  grid-column: 1 / -1;
}

.setting-check {
  align-content: center;
  grid-template-columns: 20px 1fr;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  padding: 10px 12px;
}

.setting-check input {
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
  accent-color: var(--primary);
}

.setting-check span {
  font-size: 13px;
  font-weight: 900;
}

.setting small {
  grid-column: 1 / -1;
  color: var(--muted);
  line-height: 1.45;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 900;
}

.primary-button {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 14px 30px rgba(105, 87, 255, 0.22);
}

.primary-button:hover {
  background: var(--primary-strong);
}

.ghost-button {
  background: var(--surface-solid);
  border-color: var(--line);
  color: var(--text);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.result-section {
  display: grid;
  gap: 42px;
  padding: 66px max(6vw, 42px) 90px;
  background: #fff;
}

body.dark-mode .result-section {
  background: #0f1521;
}

.result-panel {
  display: grid;
  width: min(920px, 100%);
  justify-self: center;
  gap: 16px;
  padding: 22px;
}

.status-card,
.download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 4px 16px;
  border-bottom: 1px solid var(--line);
}

.status-card h2 {
  margin: 0;
}

#engineStatus {
  color: var(--muted);
  white-space: nowrap;
}

.progress-area {
  display: grid;
  gap: 12px;
}

.progress-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ebf4;
}

body.dark-mode .progress-bar {
  background: #242e40;
}

#progressFill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--green), var(--orange));
  transition: width 0.2s ease;
}

#logOutput {
  min-height: 190px;
  max-height: 320px;
  overflow: auto;
  margin: 0;
  padding: 14px;
  border-radius: 8px;
  background: #10151c;
  color: #d8f5ff;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
}

.download-card {
  padding: 14px 0 0;
  border-bottom: 0;
}

.download-card strong,
.download-card span {
  display: block;
  overflow: hidden;
  max-width: min(62vw, 560px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-card span {
  color: var(--muted);
  margin-top: 4px;
}

.preview-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1117;
}

.preview-card video,
.preview-card img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.preview-card audio {
  width: 100%;
  padding: 16px;
}

.steps-panel {
  width: min(980px, 100%);
  justify-self: center;
  padding: 30px;
  text-align: center;
  box-shadow: none;
}

.section-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(3, 169, 217, 0.1);
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
}

.steps-panel h2 {
  margin: 20px 0 34px;
  font-size: clamp(32px, 3.8vw, 46px);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.steps div {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.steps strong {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 22px;
  box-shadow: 0 14px 30px rgba(105, 87, 255, 0.2);
}

.steps div:nth-child(2) strong {
  background: var(--green);
}

.steps div:nth-child(3) strong {
  background: var(--orange);
}

.steps h3,
.steps p {
  margin: 0;
}

.steps p {
  color: var(--muted);
  line-height: 1.65;
}

.popover {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: start end;
  padding: 76px 34px;
  background: rgba(15, 23, 42, 0.18);
}

.popover[hidden] {
  display: none;
}

.popover-card {
  position: relative;
  width: min(380px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.popover-card h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.popover-card p {
  color: var(--muted);
  line-height: 1.7;
}

.popover-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.popover-actions button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  color: var(--text);
  font-weight: 900;
}

.popover-actions button:hover {
  border-color: rgba(105, 87, 255, 0.55);
  color: var(--primary-strong);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  padding: 24px 18px 30px;
  color: var(--muted);
  font-size: 13px;
  background: rgba(255, 255, 255, 0.72);
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--primary-strong);
}

@media (max-width: 1220px) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 18px;
  }

  .top-nav,
  .header-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .tool-sidebar {
    top: 132px;
  }

  .hero-tool {
    grid-template-columns: 1fr;
  }

  .tool-intro {
    justify-self: start;
  }

  .quick-entry {
    display: none;
  }

  .landing-home {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 56px max(6vw, 28px) 72px;
  }

  .landing-copy {
    width: min(760px, 100%);
    justify-self: center;
  }

  .home-picker {
    width: min(780px, 100%);
    justify-self: center;
  }
}

@media (max-width: 820px) {
  body::before {
    left: 0;
  }

  .tool-sidebar {
    position: static;
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 14px;
  }

  .sidebar-group {
    min-width: 170px;
    border-bottom: 0;
    margin: 0;
    padding: 0;
  }

  .page {
    margin-left: 0;
  }

  .hero-tool,
  .result-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .settings,
  .steps,
  .creator-rail {
    grid-template-columns: 1fr;
  }

  .landing-home {
    min-height: auto;
    padding: 42px 18px 72px;
  }

  .landing-copy h1 {
    margin-top: 0;
    font-size: clamp(40px, 10vw, 64px);
  }

  .landing-points {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 28px;
  }

  .landing-points span {
    font-size: 17px;
  }

  .landing-summary {
    font-size: 17px;
  }

  .ai-upload-preview {
    grid-template-columns: 58px 1fr;
  }

  .ai-upload-preview button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .ai-flow-grid {
    grid-template-columns: 1fr;
  }

  .home-picker h2 {
    margin-bottom: 18px;
    font-size: 30px;
    text-align: left;
  }

  .home-picker-top {
    grid-template-columns: 1fr;
  }

  .home-tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .home-tabs::-webkit-scrollbar {
    display: none;
  }

  .home-tabs button {
    min-width: 88px;
    flex: 0 0 auto;
  }

  .home-search {
    border-top: 1px solid rgba(105, 87, 255, 0.16);
    border-left: 0;
  }

  .home-tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    min-height: 362px;
    padding: 16px;
  }

  .home-tool {
    min-height: 58px;
    gap: 7px;
    padding: 0 8px;
    font-size: 15px;
  }

  .home-tool svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 560px) {
  body {
    background:
      linear-gradient(115deg, rgba(3, 169, 217, 0.08) 0 28%, transparent 28% 100%),
      linear-gradient(160deg, transparent 0 66%, rgba(245, 179, 41, 0.1) 66% 78%, transparent 78%),
      linear-gradient(180deg, #f9fbff 0%, #eef5fb 52%, #ffffff 52%);
  }

  .top-nav,
  .header-actions {
    display: none;
  }

  .site-header {
    display: flex;
    min-height: 62px;
    justify-content: space-between;
    padding: 10px 14px;
  }

  .tool-intro h1 {
    font-size: 38px;
    line-height: 1.04;
  }

  .title-row,
  .status-card,
  .download-card,
  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .upload-card,
  .result-panel,
  .steps-panel {
    padding: 16px;
  }

  .brand-symbol {
    width: 34px;
    height: 34px;
  }

  .brand strong {
    max-width: 168px;
    font-size: 22px;
  }

  .brand small {
    max-width: 168px;
    font-size: 11px;
  }

  .landing-home {
    gap: 26px;
    padding: 28px 14px 48px;
  }

  .landing-copy,
  .home-picker,
  .tool-intro,
  .upload-card {
    width: 100%;
    justify-self: stretch;
  }

  .landing-copy h1 {
    font-size: clamp(34px, 10.4vw, 44px);
    line-height: 1.08;
  }

  .landing-points {
    grid-template-columns: repeat(2, minmax(0, max-content));
    gap: 10px 14px;
    margin-top: 22px;
  }

  .landing-points span {
    gap: 7px;
    font-size: 14px;
  }

  .landing-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .landing-actions .primary-button,
  .landing-actions .ghost-button {
    width: 100%;
  }

  .ai-console-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ai-upload-preview {
    grid-template-columns: 1fr;
    justify-items: stretch;
    padding: 16px;
  }

  .ai-upload-preview .upload-orb {
    justify-self: start;
  }

  .home-picker h2 {
    margin-bottom: 14px;
    font-size: 24px;
    text-align: center;
  }

  .home-picker-shell {
    border-radius: 8px;
    min-height: 0;
  }

  .home-tabs button {
    min-width: 74px;
    min-height: 48px;
    gap: 7px;
    padding: 0 8px;
    font-size: 14px;
  }

  .home-tabs button span {
    height: 20px;
  }

  .home-search {
    min-height: 48px;
  }

  .home-search span {
    display: none;
  }

  .home-tool-grid {
    gap: 9px;
    min-height: 0;
    padding: 12px;
  }

  .home-tool {
    min-height: 54px;
    flex-direction: column;
    gap: 5px;
    padding: 7px 5px;
    font-size: 13px;
    line-height: 1.15;
  }

  .home-tool span {
    white-space: normal;
  }

  .hero-tool {
    gap: 22px;
    min-height: auto;
    padding: 28px 14px 38px;
  }

  .tool-intro {
    text-align: center;
  }

  .badges {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
  }

  .badges span {
    justify-content: center;
    min-height: 34px;
    padding: 0 8px;
    font-size: 13px;
  }

  .title-row {
    gap: 10px;
  }

  .icon-bubble {
    width: 64px;
    height: 64px;
    align-self: center;
  }

  .icon-bubble svg {
    width: 30px;
    height: 30px;
  }

  .lead {
    margin-top: 14px;
    font-size: 18px;
  }

  .creator-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 20px;
  }

  .creator-rail span {
    min-height: 38px;
    font-size: 13px;
  }

  .dropzone {
    min-height: 188px;
  }

  .upload-orb {
    width: 58px;
    height: 58px;
  }

  .result-section {
    gap: 26px;
    padding-top: 34px;
    padding-bottom: 54px;
  }

  .site-footer {
    padding: 20px 14px 28px;
    font-size: 12px;
  }
}

@media (max-width: 900px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body::before {
    display: none;
  }

  .site-header {
    width: 100%;
    grid-template-columns: 1fr;
    min-height: 62px;
    padding: 10px 14px;
  }

  .top-nav,
  .header-actions,
  .tool-mode .tool-sidebar {
    display: none;
  }

  .brand-symbol {
    width: 34px;
    height: 34px;
  }

  .brand strong {
    max-width: 168px;
    font-size: 22px;
  }

  .brand small {
    max-width: 168px;
    font-size: 11px;
  }

  .page,
  .tool-mode .page {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }

  .hero-tool {
    display: flex;
    width: 100%;
    max-width: 100vw;
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    overflow: hidden;
    padding: 24px 14px 42px;
  }

  .tool-intro,
  .upload-card {
    width: 100%;
    max-width: 100%;
    justify-self: auto;
    margin: 0;
  }

  .tool-intro {
    text-align: left;
  }

  .badges {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
  }

  .badges span {
    justify-content: center;
    min-width: 0;
    min-height: 34px;
    padding: 0 8px;
    font-size: 13px;
  }

  .title-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .title-row > div {
    min-width: 0;
  }

  .icon-bubble {
    width: 58px;
    height: 58px;
  }

  .icon-bubble svg {
    width: 28px;
    height: 28px;
  }

  .tool-intro h1 {
    font-size: clamp(32px, 9vw, 40px);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .lead {
    margin-top: 12px;
    font-size: 17px;
    line-height: 1.45;
  }

  .creator-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
  }

  .creator-rail span {
    min-width: 0;
    min-height: 38px;
    font-size: 13px;
  }

  .upload-card {
    padding: 14px;
  }

  .dropzone {
    min-height: 180px;
  }

  .drop-inner {
    padding: 16px 12px;
  }

  .drop-inner strong {
    font-size: 18px;
    line-height: 1.25;
  }

  .url-tool div {
    grid-template-columns: 1fr;
  }

  .url-tool input {
    min-height: 42px;
  }

  .settings {
    grid-template-columns: 1fr;
  }

  .result-section {
    gap: 24px;
    padding: 32px 14px 54px;
  }
}


/* Active dark workspace theme */
:root {
  color-scheme: light;
  --page: #f6f8ff;
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --surface-tint: #eef3ff;
  --ink: #111827;
  --text: #263348;
  --muted: #65758f;
  --line: #dfe6f5;
  --line-strong: #c7d3ea;
  --primary: #365ee8;
  --primary-strong: #244bd5;
  --violet: #475569;
  --cyan: #0e7490;
  --green: #168dff;
  --orange: #f39b38;
  --pink: #e95c9d;
  --amber: #eab75a;
  --shadow: 0 10px 24px rgba(45, 73, 132, 0.1);
  --soft-shadow: 0 4px 12px rgba(45, 73, 132, 0.08);
  --shell-max-width: 1920px;
  --header-height: 58px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--header-height) + 18px);
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 16% 18%, rgba(214, 225, 255, 0.88), transparent 26rem),
    radial-gradient(circle at 88% 40%, rgba(255, 232, 202, 0.62), transparent 24rem),
    linear-gradient(180deg, #fbfdff 0%, #f3f7ff 48%, #ffffff 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

body.dark-mode {
  --page: #0f1523;
  --surface: #151f32;
  --surface-soft: #101a2c;
  --surface-tint: #1d2a44;
  --ink: #f7faff;
  --text: #edf3ff;
  --muted: #afbdd2;
  --line: rgba(195, 210, 234, 0.17);
  --line-strong: rgba(195, 210, 234, 0.28);
  --primary: #86a0ff;
  --primary-strong: #b2c1ff;
  background:
    radial-gradient(circle at 16% 18%, rgba(61, 88, 155, 0.25), transparent 26rem),
    radial-gradient(circle at 88% 40%, rgba(119, 80, 145, 0.18), transparent 24rem),
    linear-gradient(180deg, #0d1422 0%, #101827 58%, #0b111d 100%);
}

body::before,
.ambient,
.noomo-flow-canvas,
.noomo-pointer-light {
  display: none !important;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

button,
a {
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(54, 94, 232, 0.28);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 200;
  transform: translateY(-150%);
  border-radius: 8px;
  background: var(--ink);
  color: var(--surface);
  padding: 10px 14px;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.tool-sidebar,
.quick-entry,
.page {
  position: relative;
  z-index: 3;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: var(--header-height);
  grid-template-columns: minmax(185px, 280px) minmax(620px, 1fr) minmax(210px, 320px);
  padding: 0 max(24px, calc((100vw - min(var(--shell-max-width), calc(100vw - 64px))) / 2));
  border-bottom: 1px solid rgba(219, 227, 244, 0.9);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
}

body.dark-mode .site-header {
  background: rgba(15, 21, 35, 0.98);
  border-bottom-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand-symbol {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #365ee8, #6957ff 58%, #03a9d9);
  color: #fff;
  box-shadow: 0 6px 12px rgba(54, 94, 232, 0.16);
}

.brand-symbol::after {
  content: none;
}

.image-symbol img {
  width: 34px;
  height: 34px;
}

.brand strong {
  display: block;
  overflow: hidden;
  max-width: 160px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.05;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 1.3vw, 24px);
}

.nav-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--header-height);
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 2px;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
  transition: color 180ms ease, transform 180ms ease;
}

.nav-trigger svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.4;
}

.nav-trigger:hover,
.nav-trigger.active {
  color: var(--primary);
  background: transparent;
}

.nav-trigger:hover {
  transform: translateY(-1px);
}

.nav-trigger.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.theme-toggle,
.header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0 10px;
}

.theme-toggle strong {
  min-width: 38px;
  border-radius: 6px;
  background: var(--surface-tint);
  color: var(--primary);
  padding: 4px 8px;
  font-size: 12px;
  text-align: center;
}

.header-cta {
  border: 0;
  background: linear-gradient(180deg, #f7cd84, #e9a94c);
  color: #271706;
  padding: 0 18px;
  box-shadow: 0 6px 12px rgba(177, 113, 28, 0.14);
}

.header-cta:hover {
  background: linear-gradient(180deg, #ffd899, #efa94b);
}

.quick-entry {
  display: none;
}

.page {
  margin-left: 0;
}

.landing-home {
  display: grid;
  grid-template-columns: 1fr !important;
  align-items: stretch !important;
  gap: 32px;
  width: min(var(--shell-max-width), calc(100vw - 64px)) !important;
  min-height: auto;
  margin-inline: auto !important;
  padding: 0 0 42px !important;
}

.hero-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(560px, 0.8fr) minmax(700px, 1.2fr);
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  min-height: min(520px, calc(100vh - var(--header-height)));
  padding: 42px 0 30px;
}

.hero-band::before {
  content: "";
  position: absolute;
  inset: 0 calc((100vw - min(var(--shell-max-width), calc(100vw - 64px))) / -2);
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(54, 94, 232, 0.15), rgba(255, 255, 255, 0) 48%),
    radial-gradient(circle at 70% 32%, rgba(128, 153, 255, 0.38), transparent 26rem);
}

.landing-copy {
  width: min(710px, 100%);
  min-width: 0;
}

.landing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  margin: 0 0 18px;
  border: 1px solid rgba(54, 94, 232, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 900;
}

body.dark-mode .landing-kicker {
  background: rgba(21, 31, 50, 0.7);
}

.landing-kicker svg {
  width: 16px;
  height: 16px;
}

.landing-copy h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(40px, 3.45vw, 54px);
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
}

.landing-copy h1 span {
  display: block;
}

.landing-copy h1 span:last-child {
  color: var(--primary);
}

.landing-copy h1 .hero-title-nowrap {
  white-space: nowrap;
}

.landing-summary {
  max-width: 56ch;
  margin: 18px 0 0;
  color: #35445c;
  font-size: 16px;
  line-height: 1.8;
  text-wrap: pretty;
}

body.dark-mode .landing-summary {
  color: var(--muted);
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-button,
.ghost-button,
.outline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 8px;
  padding: 0 20px;
  font-weight: 900;
  text-decoration: none;
}

.primary-button {
  border: 1px solid transparent;
  background: linear-gradient(180deg, #4d70f2, #365ee8);
  color: #fff;
  box-shadow: 0 8px 16px rgba(54, 94, 232, 0.2);
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.primary-button:hover {
  background: linear-gradient(180deg, #365ee8, #244bd5);
  box-shadow: 0 10px 18px rgba(54, 94, 232, 0.24);
  transform: translateY(-1px);
}

.ghost-button,
.outline-link {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.ghost-button:hover,
.outline-link:hover {
  border-color: rgba(54, 94, 232, 0.38);
  color: var(--primary);
  transform: translateY(-1px);
}

.landing-points {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.landing-points span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid rgba(226, 233, 247, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: #3a4961;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 850;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.landing-points span:hover {
  border-color: rgba(54, 94, 232, 0.24);
  background: rgba(255, 255, 255, 0.94);
  transform: translateY(-1px);
}

body.dark-mode .landing-points span {
  background: var(--surface);
  color: var(--text);
}

.landing-points svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.hero-media {
  position: relative;
  min-width: 0;
}

.hero-media img {
  width: 100%;
  border-radius: 8px;
  object-fit: contain;
  filter: saturate(1.04) contrast(1.02);
  transform: translateZ(0);
  transition: filter 220ms ease, transform 220ms ease;
}

.hero-media:hover img {
  filter: saturate(1.08) contrast(1.04);
  transform: translateY(-2px);
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  gap: 18px;
}

.about-panel,
.services-panel,
.service-detail-section,
.portfolio-section,
.project-detail-section,
.internal-pages-section,
.toolbox-section,
.trust-strip,
.contact-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--soft-shadow);
}

body.dark-mode .about-panel,
body.dark-mode .services-panel,
body.dark-mode .service-detail-section,
body.dark-mode .portfolio-section,
body.dark-mode .project-detail-section,
body.dark-mode .internal-pages-section,
body.dark-mode .toolbox-section,
body.dark-mode .trust-strip,
body.dark-mode .contact-section {
  background: var(--surface);
}

.about-panel,
.services-panel,
.service-detail-section,
.portfolio-section,
.project-detail-section,
.internal-pages-section,
.toolbox-section,
.contact-section {
  padding: 22px;
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.section-heading-wide {
  margin-bottom: 22px;
}

.section-heading h2,
.toolbox-heading h2,
.portfolio-head h2,
.project-copy h2,
.contact-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.22;
  text-wrap: balance;
}

.section-heading h2::after,
.toolbox-heading h2::after,
.portfolio-head h2::after,
.contact-section h2::after {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  margin-top: 9px;
  border-radius: 999px;
  background: var(--primary);
}

.services-panel .section-heading h2::after {
  background: var(--orange);
}

.section-heading p,
.toolbox-heading p,
.portfolio-head p,
.contact-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.about-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: center;
}

.about-visual {
  width: 100%;
  min-height: 185px;
  border-radius: 8px;
  object-fit: cover;
}

.about-body p {
  margin: 0;
  color: #33445e;
  line-height: 1.76;
}

body.dark-mode .about-body p {
  color: var(--muted);
}

.skill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 18px;
}

.skill-row span {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 60px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.skill-row svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.service-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.service-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 88px;
  border: 1px solid rgba(225, 232, 245, 0.96);
  border-radius: 8px;
  background: #fbfcff;
  color: var(--text);
  padding: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

body.dark-mode .service-card {
  background: var(--surface-soft);
}

.service-card:hover {
  border-color: rgba(54, 94, 232, 0.28);
  background: var(--surface);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(45, 73, 132, 0.08);
}

.service-card svg,
.service-detail-grid svg,
.workflow-row svg,
.trust-strip svg {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #eaf1ff;
  color: var(--primary);
  padding: 10px;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.service-card:hover svg {
  transform: scale(1.06) rotate(-2deg);
}

.service-card:nth-child(2) svg,
.service-card:nth-child(5) svg {
  background: #e8f7ff;
  color: var(--green);
}

.service-card:nth-child(3) svg,
.service-card:nth-child(4) svg {
  background: #fff3e4;
  color: var(--orange);
}

.service-card:nth-child(6) svg {
  background: #e8f7ff;
  color: var(--cyan);
}

.service-card strong,
.service-card small {
  display: block;
  min-width: 0;
}

.service-card strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  white-space: nowrap;
}

.service-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.service-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.service-detail-grid article {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 206px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
}

.service-detail-grid h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
}

.service-detail-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.service-detail-grid a {
  align-self: end;
  width: max-content;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--primary);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.service-detail-feature {
  background: linear-gradient(180deg, #ffffff, #f3f7ff) !important;
}

body.dark-mode .service-detail-feature {
  background: linear-gradient(180deg, var(--surface), var(--surface-soft)) !important;
}

.portfolio-section {
  display: grid;
  gap: 18px;
}

.portfolio-head {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(360px, 1.2fr);
  align-items: end;
  gap: 18px;
}

.portfolio-head-left .portfolio-tabs {
  justify-content: flex-start;
}

.portfolio-head-left {
  grid-template-columns: minmax(0, 1fr);
}

.portfolio-tabs {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.portfolio-tabs button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 850;
}

.portfolio-tabs button.active,
.portfolio-tabs button:hover {
  background: var(--primary);
  color: #fff;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.portfolio-grid article {
  position: relative;
  min-width: 0;
}

.portfolio-grid img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-tint);
}

.portfolio-grid article::after {
  content: "";
  position: absolute;
  top: calc((100vw - 48px) / 12 * 0.35);
  left: 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.55);
  pointer-events: none;
}

.portfolio-grid h3 {
  margin: 9px 0 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-grid p,
.portfolio-grid span {
  color: var(--muted);
  font-size: 12px;
}

.portfolio-grid p {
  margin: 4px 0 0;
}

.portfolio-grid span {
  position: absolute;
  right: 0;
  bottom: 0;
}

.outline-link {
  justify-self: center;
}

.project-detail-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: center;
}

.project-media,
.internal-grid {
  width: 100%;
}

.case-video-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.case-frame {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #101724;
}

.case-frame img,
.thumb-strip img {
  width: 100%;
  border-radius: 8px;
  background: var(--surface-tint);
  object-fit: cover;
}

.case-frame img {
  aspect-ratio: 16 / 9;
}

.case-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
}

.case-play svg {
  width: 26px;
  height: 26px;
}

.thumb-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.thumb-strip img {
  aspect-ratio: 16 / 9;
  min-height: 58px;
}

.internal-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.internal-page-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 168px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 18px;
  text-decoration: none;
}

.internal-page-card:hover {
  border-color: rgba(54, 94, 232, 0.35);
  transform: translateY(-1px);
}

.internal-page-card span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #eaf1ff;
  color: var(--primary);
}

.internal-page-card strong,
.internal-page-card small {
  display: block;
}

.internal-page-card strong {
  color: var(--ink);
  font-size: 17px;
}

.internal-page-card small {
  color: var(--muted);
  line-height: 1.55;
}

.project-copy h2 {
  color: var(--primary);
  font-size: 18px;
}

.project-copy h3 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.25;
}

.project-copy p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.project-copy ul {
  display: grid;
  gap: 10px;
  margin: 18px 0 20px;
  padding: 0;
  list-style: none;
}

.project-copy li {
  color: var(--text);
  line-height: 1.55;
}

.internal-pages-section {
  display: grid;
  gap: 4px;
}

.internal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 22px;
  align-items: stretch;
}

.process-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 20px;
}

.process-panel h3 {
  margin: 0 0 14px;
  color: var(--ink);
}

.process-panel ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  counter-reset: process-step;
  list-style: none;
}

.process-panel li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--muted);
  line-height: 1.55;
  counter-increment: process-step;
}

.process-panel li::before {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  content: counter(process-step, decimal-leading-zero);
}

.process-panel strong,
.process-panel span {
  grid-column: 2;
  display: block;
}

.process-panel strong {
  color: var(--ink);
}

.process-panel span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.toolbox-section {
  display: grid;
  gap: 18px;
}

.toolbox-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.62fr);
  align-items: start;
  gap: 20px;
}

.engine-panel-card {
  border: 1px solid rgba(54, 94, 232, 0.18);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.engine-panel-head span {
  color: var(--ink);
}

.engine-panel-card p,
.engine-panel-card small {
  color: var(--muted);
}

.workflow-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.workflow-row button {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  border: 1px solid rgba(54, 94, 232, 0.16);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  color: var(--text);
  padding: 12px;
  text-align: left;
}

.workflow-row button:hover {
  border-color: rgba(54, 94, 232, 0.35);
  transform: translateY(-1px);
}

.workflow-row svg {
  width: 38px;
  height: 38px;
  padding: 9px;
}

.workflow-row span,
.workflow-row small {
  display: block;
}

.workflow-row span {
  color: var(--ink);
  font-weight: 900;
}

.workflow-row small {
  margin-top: 3px;
  color: var(--muted);
}

.home-picker,
.ai-console {
  width: 100% !important;
  max-width: none;
}

.home-picker-shell {
  overflow: hidden;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
}

.home-picker-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 320px);
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.home-tabs {
  display: flex;
  align-items: stretch;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.home-tabs button {
  flex: 0 0 auto;
  min-width: 108px;
  min-height: 52px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.home-tabs button span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

.home-tabs button.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: inset 0 3px 0 var(--primary);
}

.home-search {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  border-left: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  padding: 0 14px;
}

.home-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.home-search span {
  border-radius: 6px;
  background: var(--surface-tint);
  color: var(--muted);
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 900;
}

.home-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  min-height: 226px;
  padding: 16px;
}

.home-tool {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: start;
  gap: 10px 12px;
  min-height: 142px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 16px;
  box-shadow: none;
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.home-tool:hover {
  border-color: color-mix(in srgb, var(--tool-color, var(--primary)) 38%, var(--line));
  background: var(--surface);
  transform: translateY(-1px);
}

.home-tool svg {
  width: 20px;
  height: 20px;
}

.home-tool-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--tool-color, var(--primary)) 12%, var(--surface));
  color: var(--tool-color, var(--primary));
}

.home-tool-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.home-tool-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-tool-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.home-tool-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-self: end;
  padding-top: 4px;
}

.home-tool-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid color-mix(in srgb, var(--tool-color, var(--primary)) 20%, var(--line));
  border-radius: 999px;
  background: var(--surface);
  color: color-mix(in srgb, var(--tool-color, var(--primary)) 68%, var(--ink));
  padding: 0 8px;
  font-size: 11px;
  font-weight: 900;
}

.tool-empty-state {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 200px;
  align-content: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  text-align: center;
}

.tool-empty-state svg {
  width: 32px;
  height: 32px;
  color: var(--primary);
}

.tool-empty-state strong {
  color: var(--ink);
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(232, 240, 255, 0.95), rgba(246, 239, 255, 0.95));
}

body.dark-mode .trust-strip {
  background: var(--surface);
}

.trust-strip span {
  display: grid;
  grid-template-columns: 38px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  min-width: 0;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}

.trust-strip span:last-child {
  border-right: 0;
}

.trust-strip svg {
  grid-row: 1 / span 2;
  width: 38px;
  height: 38px;
  padding: 9px;
}

.trust-strip strong {
  color: var(--ink);
  font-size: 14px;
}

.trust-strip small {
  margin-top: 3px;
  color: var(--muted);
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.85fr) auto;
  gap: 22px;
  align-items: center;
}

.contact-section ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-section li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.contact-section svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.tool-mode .landing-home,
.tool-mode .site-footer {
  display: none;
}

.home-mode .tool-sidebar,
.home-mode .hero-tool,
.home-mode .result-section {
  display: none;
}

.tool-mode .page {
  margin-left: var(--sidebar-width);
}

.tool-sidebar {
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

body.dark-mode .tool-sidebar {
  background: rgba(15, 21, 35, 0.94);
}

.sidebar-title {
  color: var(--muted);
}

.sidebar-tool {
  border-radius: 8px;
}

.sidebar-tool:hover,
.sidebar-tool.active {
  background: rgba(54, 94, 232, 0.1);
  color: var(--primary);
}

.sidebar-tool.active {
  box-shadow: inset 3px 0 0 var(--primary);
}

.hero-tool {
  background:
    radial-gradient(circle at 10% 8%, rgba(207, 221, 255, 0.65), transparent 24rem),
    linear-gradient(180deg, #fbfdff, #f4f8ff);
}

body.dark-mode .hero-tool {
  background:
    radial-gradient(circle at 10% 8%, rgba(71, 99, 170, 0.22), transparent 24rem),
    linear-gradient(180deg, #0e1524, #101827);
}

.badges span,
.creator-rail span,
.upload-card,
.result-panel,
.steps-panel,
.popover-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  backdrop-filter: none;
}

.tool-intro h1 {
  color: var(--ink);
  letter-spacing: 0;
}

.lead,
.steps p,
.status-card {
  color: var(--muted);
}

.icon-bubble,
.upload-orb,
.steps strong {
  border-radius: 8px;
  background: linear-gradient(180deg, #4d70f2, #365ee8);
  color: #fff;
  box-shadow: 0 8px 16px rgba(54, 94, 232, 0.18);
}

.dropzone {
  border-color: rgba(54, 94, 232, 0.28);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(241, 246, 255, 0.78));
}

body.dark-mode .dropzone {
  background: var(--surface-soft);
}

.dropzone.dragover {
  border-color: var(--primary);
  background: rgba(54, 94, 232, 0.08);
}

.setting input,
.setting select,
.setting textarea,
.setting-check,
.url-tool div,
.file-row {
  border-color: var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.url-tool button {
  background: var(--primary);
  color: #fff;
}

.result-section {
  background: #ffffff;
}

body.dark-mode .result-section {
  background: #0b111d;
}

#logOutput {
  background: #101724;
  color: #d8f6e8;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) repeat(3, minmax(140px, 0.65fr));
  gap: 28px;
  width: min(var(--shell-max-width), calc(100vw - 64px));
  margin: 0 auto;
  padding: 38px 0 34px;
  color: var(--muted);
  background: transparent;
}

.footer-brand {
  display: grid;
  align-content: start;
  gap: 16px;
}

.footer-brand p {
  max-width: 42ch;
  margin: 0;
  line-height: 1.7;
}

.footer-links,
.footer-meta {
  display: grid;
  align-content: start;
  gap: 9px;
}

.footer-links strong,
.footer-meta strong {
  color: var(--ink);
}

.footer-links a,
.footer-links button,
.footer-meta a {
  width: max-content;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  text-align: left;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links button:hover,
.footer-meta a:hover {
  color: var(--primary);
}

.popover {
  background: rgba(15, 23, 42, 0.24);
}

@media (max-width: 1180px) {
  :root {
    --shell-max-width: 960px;
  }

  .site-header {
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 10px;
    padding: 10px 18px;
  }

  .top-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    order: 3;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .nav-trigger {
    min-height: 38px;
  }

  .hero-band,
  .overview-grid,
  .project-detail-section,
  .internal-grid,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero-band {
    min-height: auto;
    padding-top: 38px;
  }

  .landing-copy {
    width: min(760px, 100%);
  }

  .portfolio-head,
  .toolbox-heading {
    grid-template-columns: 1fr;
  }

  .portfolio-tabs {
    justify-content: flex-start;
  }

  .portfolio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .trust-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trust-strip span:nth-child(2) {
    border-right: 0;
  }

  .trust-strip span:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .site-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  :root {
    --header-height: 62px;
  }

  .site-header {
    display: flex;
    flex-wrap: wrap;
    min-height: var(--header-height);
    justify-content: space-between;
    padding: 10px 14px;
  }

  .tool-mode .tool-sidebar {
    display: none;
  }

  .top-nav {
    order: 3;
    display: flex;
    flex: 0 0 100%;
    justify-content: flex-start;
    gap: 18px;
    overflow-x: auto;
    padding-top: 6px;
    scrollbar-width: thin;
  }

  .nav-trigger {
    flex: 0 0 auto;
    min-height: 34px;
    font-size: 13px;
  }

  .header-actions {
    flex: 0 0 auto;
    gap: 8px;
  }

  .theme-toggle {
    width: 42px;
    padding: 0;
  }

  .theme-toggle strong,
  .header-cta span {
    display: none;
  }

  .landing-home {
    width: 100% !important;
    max-width: 100% !important;
    gap: 22px;
    padding: 0 16px 28px !important;
    overflow: hidden !important;
  }

  .landing-home,
  .landing-home * {
    max-width: 100%;
  }

  .landing-copy,
  .hero-band,
  .overview-grid,
  .about-body,
  .about-body > div,
  .service-list,
  .service-detail-grid,
  .portfolio-grid,
  .internal-grid,
  .toolbox-section,
  .trust-strip,
  .contact-section {
    min-width: 0;
  }

  .hero-band {
    gap: 24px;
    padding: 28px 0 8px;
    overflow: hidden;
  }

  .hero-band::before {
    inset-inline: -16px;
  }

  .landing-copy h1 {
    font-size: clamp(30px, 8.2vw, 40px);
    line-height: 1.12;
    overflow-wrap: anywhere;
  }

  .landing-copy h1 .hero-title-nowrap {
    white-space: normal;
  }

  .landing-summary {
    font-size: 16px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .about-panel,
  .services-panel,
  .service-detail-section,
  .portfolio-section,
  .project-detail-section,
  .internal-pages-section,
  .toolbox-section,
  .contact-section {
    padding: 18px;
  }

  .about-body,
  .service-list,
  .service-detail-grid,
  .workflow-row,
  .home-picker-top {
    grid-template-columns: 1fr;
  }

  .about-visual {
    max-height: 240px;
    min-height: 0;
    object-fit: cover;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-search {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .home-tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
  }

  .home-tool {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 74px;
    padding: 10px 8px;
    text-align: center;
  }

  .home-tool span {
    white-space: normal;
    line-height: 1.2;
  }

  .trust-strip,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .trust-strip span,
  .trust-strip span:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .trust-strip span:last-child {
    border-bottom: 0;
  }

  .page,
  .tool-mode .page {
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .brand strong {
    font-size: 18px;
  }

  .brand small {
    max-width: 150px;
    font-size: 10px;
  }

  .landing-kicker {
    align-items: flex-start;
    min-height: 0;
    padding-block: 7px;
    line-height: 1.35;
  }

  .landing-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .landing-actions .primary-button,
  .landing-actions .ghost-button {
    width: 100%;
  }

  .landing-points {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-points span {
    min-width: 0;
    padding-inline: 10px;
    font-size: 12px;
  }

  .hero-media img {
    min-height: 210px;
    object-position: center;
    object-fit: contain;
  }

  .section-heading h2,
  .toolbox-heading h2,
  .portfolio-head h2,
  .project-copy h3,
  .contact-section h2 {
    font-size: 21px;
  }

  .skill-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  .skill-row span {
    min-width: 0;
    font-size: 12px;
  }

  .service-card {
    min-height: 80px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .workflow-row button {
    min-height: 68px;
  }

  .home-tabs button {
    min-width: 86px;
    min-height: 50px;
    font-size: 13px;
  }

  .home-search span {
    display: none;
  }

  .home-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-tool {
    min-height: 70px;
  }

  .trust-strip span {
    padding: 16px;
  }
}

.site-page .page {
  margin-left: 0;
}

.inner-page {
  display: grid;
  gap: 24px;
  width: min(1920px, calc(100vw - 64px));
  margin-inline: auto;
  padding: 42px 0 48px;
}

.page-hero,
.page-section,
.about-page-hero,
.about-capability-grid,
.contact-brief-grid,
.service-page-layout,
.service-page-grid {
  scroll-margin-top: calc(var(--header-height) + 22px);
}

.page-hero,
.about-page-hero {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
  padding: clamp(26px, 4vw, 44px);
}

body.dark-mode .page-hero,
body.dark-mode .about-page-hero {
  background: var(--surface);
}

.page-hero {
  display: grid;
  gap: 16px;
}

.page-hero-split,
.about-page-hero {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  align-items: center;
  gap: clamp(22px, 4vw, 42px);
}

.page-hero h1,
.about-page-hero h1 {
  max-width: 20ch;
  margin: 0;
  color: var(--ink);
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.12;
  text-wrap: balance;
}

.page-hero p:not(.landing-kicker),
.about-page-hero p {
  max-width: 68ch;
  margin: 0;
  color: #33445e;
  font-size: 17px;
  line-height: 1.78;
  text-wrap: pretty;
}

body.dark-mode .page-hero p:not(.landing-kicker),
body.dark-mode .about-page-hero p {
  color: var(--muted);
}

.about-page-hero img {
  width: 100%;
  height: clamp(300px, 28vw, 460px);
  min-height: 0;
  border-radius: 8px;
  object-fit: cover;
}

.service-flow-card,
.contact-card-large {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 20px;
}

.service-flow-card ol,
.contact-card-large ul {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-flow-card ol {
  counter-reset: flow-step;
}

.service-flow-card li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  color: var(--muted);
  line-height: 1.58;
  counter-increment: flow-step;
}

.service-flow-card li::before {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  content: counter(flow-step, decimal-leading-zero);
}

.service-flow-card strong,
.service-flow-card span {
  grid-column: 2;
  display: block;
  min-width: 0;
}

.service-flow-card strong {
  color: var(--ink);
  font-size: 16px;
}

.service-page-grid,
.about-capability-grid,
.contact-brief-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.service-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
  align-items: start;
  gap: 18px;
}

.service-page-layout .service-page-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-page-card,
.about-capability-grid article,
.contact-brief-grid article {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
  padding: 22px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.service-page-card:hover,
.about-capability-grid article:hover,
.contact-brief-grid article:hover {
  border-color: rgba(54, 94, 232, 0.28);
  box-shadow: 0 8px 16px rgba(45, 73, 132, 0.1);
  transform: translateY(-2px);
}

body.dark-mode .service-page-card,
body.dark-mode .about-capability-grid article,
body.dark-mode .contact-brief-grid article {
  background: var(--surface);
}

.service-page-card > svg,
.about-capability-grid article > svg,
.contact-brief-grid article > svg {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #eaf1ff;
  color: var(--primary);
  padding: 10px;
}

.service-page-card h2,
.about-capability-grid h2,
.contact-brief-grid h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.3;
}

.service-page-card p,
.about-capability-grid p,
.contact-brief-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

.service-page-card ul {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.service-page-card li {
  position: relative;
  color: var(--text);
  line-height: 1.5;
  padding-left: 18px;
}

.service-page-card li::before {
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--primary);
  content: "";
}

.service-page-card-feature {
  background: linear-gradient(180deg, #ffffff, #f3f7ff);
}

body.dark-mode .service-page-card-feature {
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
}

.service-page-card .primary-button {
  justify-self: start;
  margin-top: 4px;
}

.service-sticky-panel {
  position: sticky;
  top: calc(var(--header-height) + 22px);
  display: grid;
  gap: 16px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 249, 255, 0.94)),
    radial-gradient(circle at 82% 10%, rgba(54, 94, 232, 0.14), transparent 12rem);
  box-shadow: var(--soft-shadow);
  padding: 22px;
}

body.dark-mode .service-sticky-panel {
  background:
    linear-gradient(180deg, var(--surface), var(--surface-soft)),
    radial-gradient(circle at 82% 10%, rgba(134, 160, 255, 0.14), transparent 12rem);
}

.service-signal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  border: 1px solid rgba(54, 94, 232, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--primary);
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 900;
}

.service-signal svg {
  width: 16px;
  height: 16px;
}

.service-sticky-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.32;
  text-wrap: balance;
}

.service-sticky-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

.service-proof-list {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.service-proof-list span {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.service-proof-list svg {
  width: 18px;
  height: 18px;
  color: var(--green);
}

.service-sticky-panel .outline-link {
  justify-self: start;
  min-height: 40px;
  margin-top: 2px;
}

.motion-ready [data-reveal] {
  opacity: 1;
  transform: translateY(10px);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.motion-ready [data-reveal].is-visible {
  transform: translateY(0);
}

.portfolio-grid-page {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portfolio-grid-page article::after {
  top: 31%;
}

.about-strip {
  margin-top: 0;
}

.contact-card-large li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.contact-card-large svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.contact-card-large a {
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-card-large a:hover {
  color: var(--primary);
}

.page-cta {
  grid-template-columns: minmax(0, 1fr) auto;
}

.page-cta .primary-button {
  white-space: nowrap;
}

@media (min-width: 1181px) {
  .hero-band {
    padding-top: 58px;
  }

  .service-detail-grid {
    grid-template-columns: repeat(3, minmax(300px, 1fr));
  }

  .service-page-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.28fr);
  }

  .service-page-layout .service-page-grid {
    grid-template-columns: repeat(3, minmax(280px, 1fr));
  }
}

@media (max-width: 900px) {
  .inner-page {
    width: 100%;
    max-width: 100%;
    padding: 22px 16px 34px;
  }

  .page-hero-split,
  .about-page-hero,
  .service-page-layout,
  .service-page-grid,
  .about-capability-grid,
  .contact-brief-grid,
  .page-cta {
    grid-template-columns: 1fr;
  }

  .service-page-layout .service-page-grid {
    grid-template-columns: 1fr;
  }

  .service-sticky-panel {
    position: static;
  }

  .page-hero h1,
  .about-page-hero h1 {
    max-width: 100%;
    font-size: clamp(30px, 8.2vw, 40px);
    overflow-wrap: anywhere;
  }

  .about-page-hero img {
    min-height: 230px;
  }

  .internal-preview-grid,
  .thumb-strip {
    grid-template-columns: 1fr;
  }

  .portfolio-grid-page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-cta .primary-button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .page-hero,
  .about-page-hero,
  .service-page-card,
  .about-capability-grid article,
  .contact-brief-grid article,
  .service-flow-card,
  .contact-card-large {
    padding: 18px;
  }

  .portfolio-grid-page {
    grid-template-columns: 1fr;
  }

  .case-play {
    width: 48px;
    height: 48px;
  }
}

@media (min-width: 1181px) {
  :root {
    --shell-max-width: 100vw;
    --site-edge: clamp(24px, 1.7vw, 34px);
  }

  .site-header {
    display: grid;
    grid-template-columns: minmax(210px, 300px) minmax(0, 1fr) max-content;
    align-items: center;
    width: 100%;
    padding-inline: var(--site-edge);
  }

  .site-header > .brand {
    justify-self: start;
  }

  .site-header .top-nav {
    min-width: 0;
    justify-self: center;
    justify-content: center;
    gap: clamp(16px, 1.55vw, 30px);
  }

  .site-header .header-actions {
    justify-self: end;
  }

  .landing-home,
  .inner-page,
  .site-footer {
    width: calc(100vw - var(--site-edge) - var(--site-edge)) !important;
    max-width: none;
    margin-inline: auto !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .motion-ready [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* ProductDesign refresh: restrained, tool-first product UI. */
:root {
  color-scheme: light;
  --page: oklch(0.968 0.018 260);
  --surface: oklch(0.998 0 0);
  --surface-soft: oklch(0.982 0.01 185);
  --surface-tint: oklch(0.948 0.033 260);
  --ink: oklch(0.22 0.035 245);
  --text: oklch(0.34 0.032 245);
  --muted: oklch(0.49 0.03 240);
  --line: oklch(0.88 0.02 205);
  --line-strong: oklch(0.78 0.035 205);
  --primary: #365ee8;
  --primary-strong: #244bd5;
  --green: oklch(0.62 0.15 230);
  --cyan: oklch(0.56 0.105 210);
  --orange: oklch(0.61 0.155 44);
  --amber: oklch(0.75 0.145 74);
  --pink: oklch(0.54 0.13 18);
  --violet: oklch(0.45 0.045 260);
  --accent: oklch(0.75 0.145 74);
  --danger: oklch(0.54 0.16 28);
  --shadow: 0 8px 18px oklch(0.22 0.035 245 / 0.08);
  --soft-shadow: 0 3px 10px oklch(0.22 0.035 245 / 0.06);
  --header-height: 60px;
}

body {
  background:
    linear-gradient(180deg, var(--page) 0%, oklch(0.99 0.006 260) 58%, var(--surface) 100%);
  color: var(--text);
}

body.dark-mode {
  --page: oklch(0.18 0.025 245);
  --surface: oklch(0.22 0.027 245);
  --surface-soft: oklch(0.19 0.025 245);
  --surface-tint: oklch(0.27 0.045 260);
  --ink: oklch(0.96 0.006 180);
  --text: oklch(0.9 0.01 210);
  --muted: oklch(0.7 0.024 220);
  --line: oklch(0.36 0.028 235);
  --line-strong: oklch(0.45 0.032 230);
  --primary: oklch(0.72 0.13 260);
  --primary-strong: oklch(0.82 0.12 260);
  --accent: oklch(0.78 0.13 76);
  background: linear-gradient(180deg, var(--page) 0%, oklch(0.16 0.025 245) 100%);
}

.site-header {
  border-bottom-color: var(--line);
  background: color-mix(in oklch, var(--surface) 96%, transparent);
  box-shadow: none;
}

.brand-symbol {
  background: var(--ink);
  box-shadow: none;
}

.nav-trigger {
  color: var(--text);
}

.nav-trigger:hover,
.nav-trigger.active,
.footer-links a:hover,
.footer-meta a:hover {
  color: var(--primary-strong);
}

.nav-trigger.active::after {
  background: var(--primary);
}

.theme-toggle {
  background: var(--surface);
}

.theme-toggle strong {
  background: var(--surface-tint);
  color: var(--primary-strong);
}

.header-cta {
  border: 1px solid color-mix(in oklch, var(--accent) 70%, var(--line));
  background: var(--accent);
  color: oklch(0.2 0.035 65);
  box-shadow: none;
}

.header-cta:hover {
  background: oklch(0.79 0.15 74);
}

.hero-band::before {
  background:
    linear-gradient(90deg, color-mix(in oklch, var(--surface-tint) 72%, transparent), transparent 62%),
    linear-gradient(180deg, transparent, color-mix(in oklch, var(--primary) 6%, transparent));
}

.landing-kicker,
.service-signal {
  border-color: var(--line);
  background: var(--surface);
  color: var(--primary-strong);
}

.landing-copy h1 span:last-child {
  color: var(--primary-strong);
}

.landing-summary,
.about-body p,
.page-hero p:not(.landing-kicker),
.about-page-hero p {
  color: var(--text);
}

.landing-points span,
.service-card,
.service-detail-grid article,
.internal-page-card,
.service-page-card,
.about-capability-grid article,
.contact-brief-grid article {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: none;
}

.landing-points span svg,
.skill-row svg,
.contact-section svg,
.contact-card-large svg {
  color: var(--primary);
}

.primary-button,
.url-tool button,
.portfolio-tabs button.active,
.portfolio-tabs button:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: none;
}

.primary-button:hover,
.url-tool button:hover {
  background: var(--primary-strong);
}

.ghost-button,
.outline-link,
.portfolio-tabs button {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: none;
}

.section-heading h2::after,
.toolbox-heading h2::after,
.portfolio-head h2::after,
.contact-section h2::after {
  background: var(--primary);
}

.services-panel .section-heading h2::after {
  background: var(--orange);
}

.service-card svg,
.service-detail-grid svg,
.workflow-row svg,
.trust-strip svg,
.service-page-card > svg,
.about-capability-grid article > svg,
.contact-brief-grid article > svg,
.internal-page-card span {
  background: color-mix(in oklch, var(--primary) 12%, var(--surface));
  color: var(--primary-strong);
}

.service-card:nth-child(2) svg,
.service-card:nth-child(5) svg {
  background: color-mix(in oklch, var(--green) 12%, var(--surface));
  color: var(--green);
}

.service-card:nth-child(3) svg,
.service-card:nth-child(4) svg {
  background: color-mix(in oklch, var(--orange) 13%, var(--surface));
  color: var(--orange);
}

.service-card:nth-child(6) svg {
  background: color-mix(in oklch, var(--cyan) 12%, var(--surface));
  color: var(--cyan);
}

.toolbox-section,
.about-panel,
.services-panel,
.portfolio-section,
.service-detail-section,
.project-detail-section,
.internal-pages-section,
.trust-strip,
.contact-section,
.page-hero,
.about-page-hero,
.service-sticky-panel {
  background: color-mix(in oklch, var(--surface) 94%, var(--page));
  border-color: var(--line);
  box-shadow: none;
}

.toolbox-heading {
  gap: 24px;
}

.engine-panel-card {
  border-color: var(--line);
  background: var(--surface-soft);
}

.engine-chip.is-ready {
  border-color: color-mix(in oklch, var(--green) 36%, var(--line));
  color: var(--green);
}

.workflow-row button {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: none;
}

.workflow-row button:hover,
.home-tool:hover,
.service-card:hover,
.internal-page-card:hover,
.service-page-card:hover,
.about-capability-grid article:hover,
.contact-brief-grid article:hover {
  border-color: color-mix(in oklch, var(--primary) 38%, var(--line));
  box-shadow: var(--soft-shadow);
}

.workflow-row button:nth-child(2) svg {
  background: color-mix(in oklch, var(--green) 14%, var(--surface));
  color: var(--green);
}

.workflow-row button:nth-child(3) svg {
  background: color-mix(in oklch, var(--orange) 14%, var(--surface));
  color: var(--orange);
}

.home-picker-shell {
  border-color: var(--line);
  background: var(--surface);
}

.home-picker-top {
  border-bottom-color: var(--line);
  background: var(--surface-soft);
}

.home-tabs button {
  border-right-color: var(--line);
  color: var(--muted);
}

.home-tabs button.active {
  color: var(--primary-strong);
  box-shadow: inset 0 -2px 0 var(--primary);
}

.home-tabs button:nth-child(1) span {
  color: var(--primary);
}

.home-tabs button:nth-child(2) span {
  color: var(--cyan);
}

.home-tabs button:nth-child(3) span {
  color: var(--pink);
}

.home-tabs button:nth-child(4) span {
  color: var(--green);
}

.home-tabs button:nth-child(5) span {
  color: var(--orange);
}

.home-tool {
  border-color: var(--line);
  background: var(--surface-soft);
}

.home-tool:hover {
  border-color: color-mix(in oklch, var(--tool-color, var(--primary)) 48%, var(--line));
  background: var(--surface);
}

.trust-strip {
  background: var(--surface);
}

.toolbox-mode .landing-home {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  width: min(var(--shell-max-width), calc(100vw - 64px)) !important;
  min-height: calc(100vh - var(--header-height));
  padding: 24px 0 40px !important;
}

.toolbox-mode .landing-home > :not(.toolbox-section),
.toolbox-mode .site-footer,
.toolbox-mode .tool-sidebar,
.toolbox-mode .hero-tool,
.toolbox-mode .result-section,
.toolbox-mode .quick-entry {
  display: none !important;
}

.toolbox-mode .page {
  margin-left: 0;
}

.toolbox-mode .toolbox-section {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 18px;
  min-height: calc(100vh - var(--header-height) - 64px);
  padding: 24px;
}

.toolbox-mode .toolbox-heading {
  grid-template-columns: minmax(0, 0.74fr) minmax(340px, 0.5fr);
  align-items: start;
}

.toolbox-mode .toolbox-heading h2 {
  font-size: 28px;
}

.toolbox-mode .home-picker-shell {
  min-height: 430px;
}

.toolbox-mode .home-tool-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-content: start;
  min-height: 340px;
}

.toolbox-mode .home-tool {
  min-height: 146px;
}

.tool-sidebar {
  border-right-color: var(--line);
  background: color-mix(in oklch, var(--surface) 94%, transparent);
}

.sidebar-tool:hover,
.sidebar-tool.active {
  background: color-mix(in oklch, var(--primary) 10%, var(--surface));
  color: var(--primary-strong);
}

.sidebar-tool.active {
  box-shadow: inset 3px 0 0 var(--primary);
}

.hero-tool {
  background: var(--page);
}

.tool-mode .hero-tool {
  grid-template-columns: minmax(300px, 0.5fr) minmax(520px, 0.72fr);
  align-items: start;
  gap: 28px;
  min-height: auto;
  padding: 34px max(4vw, 34px) 28px;
}

.tool-mode .tool-intro {
  justify-self: stretch;
  width: 100%;
}

.badges span,
.creator-rail span,
.upload-card,
.result-panel,
.steps-panel,
.popover-card,
.file-row,
.setting input,
.setting select,
.setting textarea,
.setting-check,
.url-tool div {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: none;
}

.icon-bubble,
.upload-orb,
.steps strong {
  background: var(--primary);
  box-shadow: none;
}

.dropzone {
  border-color: color-mix(in oklch, var(--primary) 32%, var(--line));
  background: var(--surface-soft);
}

.dropzone.dragover {
  background: color-mix(in oklch, var(--primary) 9%, var(--surface));
}

.tool-mode .result-section {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.38fr);
  align-items: start;
  gap: 18px;
  padding: 22px max(4vw, 34px) 52px;
  background: var(--page);
}

.tool-mode .result-panel,
.tool-mode .steps-panel {
  width: 100%;
  justify-self: stretch;
}

.tool-mode .steps-panel {
  text-align: left;
}

.tool-mode .steps {
  grid-template-columns: 1fr;
  gap: 18px;
}

.progress-bar {
  background: color-mix(in oklch, var(--line) 74%, var(--surface));
}

#progressFill {
  background: linear-gradient(90deg, var(--primary), var(--green), var(--accent));
}

#logOutput {
  background: oklch(0.2 0.03 245);
  color: oklch(0.9 0.035 160);
}

@media (max-width: 1180px) {
  .toolbox-mode .toolbox-heading,
  .tool-mode .hero-tool,
  .tool-mode .result-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .toolbox-mode .landing-home {
    width: 100% !important;
    padding: 14px 14px 28px !important;
  }

  .toolbox-mode .toolbox-section {
    min-height: auto;
    padding: 18px;
  }

  .toolbox-mode .toolbox-heading {
    grid-template-columns: 1fr;
  }

  .toolbox-mode .home-tool-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .toolbox-mode .home-tool-grid {
    grid-template-columns: 1fr;
  }

  .toolbox-mode .toolbox-heading h2 {
    font-size: 22px;
  }

  .home-tool-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .home-tool {
    min-height: 132px;
  }

  .tool-mode .result-section {
    padding-inline: 14px;
  }
}

@media (max-width: 900px) {
  .home-tool-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  }

  .home-tool {
    grid-template-columns: 38px minmax(0, 1fr);
    grid-template-rows: auto auto;
    justify-items: stretch;
    min-height: 142px;
    padding: 16px;
    text-align: left;
  }
}

@media (max-width: 560px) {
  .home-tool-grid,
  .toolbox-mode .home-tool-grid {
    grid-template-columns: 1fr;
  }

  .home-tool,
  .toolbox-mode .home-tool {
    min-height: 132px;
  }
}

/* Product Design 2026 alignment: match the app header and wide tool console references. */
html {
  scroll-padding-top: calc(var(--header-height, 58px) + 14px);
}

.site-header {
  display: grid;
  align-items: center;
  height: var(--header-height, 58px);
  min-height: var(--header-height, 58px);
}

body.home-mode.site-page .site-header,
body.toolbox-mode .site-header,
body.tool-mode .site-header {
  padding-inline: max(24px, calc((100vw - min(1920px, calc(100vw - 64px))) / 2)) !important;
  background: rgba(5, 10, 20, 0.94) !important;
}

body.toolbox-mode .nav-trigger,
body.tool-mode .nav-trigger {
  min-height: var(--header-height, 58px);
}

body.toolbox-mode .header-actions {
  min-width: 180px;
}

body.toolbox-mode #toolbox {
  scroll-margin-top: calc(var(--header-height, 58px) + 14px);
}

/* Final tool-only workspace overrides. */
.toolbox-mode .landing-home > :not(.toolbox-section),
.home-mode .site-footer {
  display: none !important;
}

.toolbox-mode .landing-home {
  width: min(1920px, calc(100vw - 64px)) !important;
  min-height: calc(100vh - var(--header-height, 58px));
  padding: 14px 0 26px !important;
}

.toolbox-mode .toolbox-section {
  min-height: calc(100vh - var(--header-height, 58px) - 28px);
  border-radius: 8px;
  padding: clamp(18px, 2.2vw, 42px);
  background:
    radial-gradient(circle at 34% 18%, rgba(47, 121, 255, 0.16), transparent 24rem),
    linear-gradient(180deg, rgba(7, 18, 33, 0.94), rgba(3, 10, 21, 0.96)) !important;
}

.toolbox-mode .toolbox-heading {
  grid-template-columns: minmax(520px, 0.86fr) minmax(480px, 0.64fr);
  align-items: start;
  gap: clamp(28px, 6vw, 150px);
  min-height: 192px;
}

.toolbox-mode .toolbox-heading > div:first-child {
  display: grid;
  align-content: start;
  min-height: 168px;
  padding-top: 8px;
}

.toolbox-mode .toolbox-heading > div:first-child::before {
  content: "工具面板";
  display: inline-flex;
  width: max-content;
  margin-bottom: 8px;
  color: rgba(180, 222, 255, 0.82);
  font-size: 13px;
  font-weight: 800;
}

.toolbox-mode .toolbox-heading h2 {
  max-width: 12em;
  margin: 0;
  font-size: clamp(46px, 4.8vw, 74px);
  line-height: 1.05;
  letter-spacing: 0;
}

.toolbox-mode .toolbox-heading p {
  max-width: 54rem;
  margin-top: 16px;
  color: rgba(205, 222, 239, 0.78);
  font-size: clamp(15px, 1vw, 18px);
  line-height: 1.8;
}

.toolbox-mode .engine-panel-card {
  min-height: 148px;
  padding: 26px 30px;
  border-color: rgba(88, 185, 255, 0.22) !important;
  background: rgba(8, 25, 48, 0.78) !important;
}

.toolbox-mode .engine-panel-head {
  align-items: start;
}

.toolbox-mode .engine-panel-head span {
  font-size: clamp(22px, 1.8vw, 32px);
}

.toolbox-mode .engine-panel-card p {
  max-width: 56rem;
  font-size: 15px;
  line-height: 1.75;
}

.toolbox-mode .engine-chips {
  gap: 8px;
}

.toolbox-mode .engine-chip {
  min-height: 24px;
  border-radius: 6px;
  padding-inline: 10px;
  font-size: 12px;
}

.toolbox-mode .browser-stack {
  width: 100%;
}

.toolbox-mode .home-picker-shell {
  min-height: 0;
}

.toolbox-mode .home-tool-grid {
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: 10px;
  min-height: 0;
  padding: 14px;
}

.toolbox-mode .home-tool {
  min-height: 112px;
  border-radius: 8px;
  background: rgba(8, 26, 50, 0.68) !important;
  padding: 18px 16px;
}

.toolbox-mode .home-tool-copy strong {
  font-size: 17px;
  white-space: normal;
}

.toolbox-mode .home-tool-copy small {
  -webkit-line-clamp: 2;
}

.toolbox-mode .home-tool-icon {
  width: 42px;
  height: 42px;
  background: color-mix(in srgb, var(--tool-color, var(--primary)) 22%, rgba(7, 22, 42, 0.95));
}

.toolbox-mode .workflow-row button,
.toolbox-mode .home-picker-shell,
.toolbox-mode .engine-panel-card {
  border-radius: 8px;
  background: rgba(7, 17, 32, 0.78);
}

.toolbox-mode .workflow-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.toolbox-mode .workflow-row button {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  justify-items: start;
  min-height: 138px;
  padding: 22px;
  border-color: rgba(88, 185, 255, 0.18) !important;
  background: rgba(8, 26, 50, 0.78) !important;
  text-align: left;
}

.toolbox-mode .workflow-row button::after {
  content: "鈫?;
  grid-column: 3;
  grid-row: 1 / 3;
  color: rgba(232, 244, 255, 0.86);
  font-size: 18px;
  font-weight: 900;
}

.toolbox-mode .workflow-row button svg {
  grid-row: 1 / 3;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(47, 121, 255, 0.18);
  color: #8edfff;
  padding: 12px;
}

.toolbox-mode .workflow-row button span,
.toolbox-mode .workflow-row button small {
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.toolbox-mode .workflow-row button span {
  color: #f4f9ff;
  font-size: 20px;
  line-height: 1.25;
}

.toolbox-mode .workflow-row button small {
  margin-top: 6px;
  color: rgba(205, 222, 239, 0.72);
  font-size: 14px;
}

.toolbox-mode .home-picker-shell {
  border-color: rgba(88, 185, 255, 0.16) !important;
  background: rgba(4, 12, 23, 0.82) !important;
}

.toolbox-mode .home-picker-top {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  background: rgba(8, 28, 52, 0.82);
}

.toolbox-mode .home-tabs {
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px 14px;
}

.toolbox-mode .home-tabs button {
  min-width: 88px;
  min-height: 36px;
  border: 0;
  border-radius: 6px;
}

.toolbox-mode .home-tabs button.active {
  background: #2f79ff !important;
  color: #fff !important;
  box-shadow: none;
}

.toolbox-mode .home-search {
  min-height: 58px;
  border-left-color: rgba(88, 185, 255, 0.14);
  background: rgba(3, 13, 26, 0.54);
}

.tool-mode .page {
  display: grid;
  grid-template-columns: minmax(500px, 0.95fr) minmax(360px, 0.55fr);
  gap: 18px;
  align-items: start;
  min-height: calc(100vh - var(--header-height, 58px));
  margin-left: var(--sidebar-width);
  padding: 18px 22px 30px;
}

.tool-mode .hero-tool {
  grid-template-columns: 1fr;
  gap: 14px;
  min-height: 0;
  padding: 0;
  background: transparent;
}

.tool-mode .tool-intro,
.tool-mode .upload-card {
  width: 100%;
  justify-self: stretch;
}

.tool-mode .tool-intro {
  display: grid;
  gap: 12px;
}

.tool-mode .badges {
  margin: 0;
}

.tool-mode .title-row {
  align-items: center;
}

.tool-mode .tool-intro h1 {
  font-size: 40px;
  line-height: 1.08;
}

.tool-mode .lead {
  max-width: 68ch;
  margin: 0;
  font-size: 17px;
}

.tool-mode .creator-rail {
  margin-top: 0;
}

.tool-mode .upload-card {
  padding: 20px;
}

.tool-mode .dropzone {
  min-height: 170px;
}

.tool-mode .settings {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: none;
}

.tool-mode .setting-wide {
  grid-column: 1 / -1;
}

.tool-mode .result-section {
  position: sticky;
  top: calc(var(--header-height, 58px) + 14px);
  grid-template-columns: 1fr;
  gap: 14px;
  height: calc(100vh - var(--header-height, 58px) - 28px);
  overflow: auto;
  padding: 0;
  background: transparent;
}

.tool-mode .result-panel,
.tool-mode .steps-panel {
  width: 100%;
}

.tool-mode .steps-panel {
  padding: 20px;
}

.tool-mode .steps-panel h2 {
  margin: 12px 0 18px;
  font-size: 24px;
}

.tool-mode .steps {
  grid-template-columns: 1fr;
  gap: 12px;
}

.download-card {
  align-items: center;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.primary-button.is-disabled {
  pointer-events: none;
  opacity: 0.58;
  box-shadow: none;
}

@media (max-width: 1180px) {
  .tool-mode .page {
    grid-template-columns: 1fr;
  }

  .tool-mode .result-section {
    position: static;
    height: auto;
    overflow: visible;
  }
}

@media (max-width: 900px) {
  .toolbox-mode .landing-home {
    width: 100% !important;
  }

  .tool-mode .page {
    margin-left: 0;
    padding: 14px;
  }

  .tool-mode .settings {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .toolbox-mode .toolbox-section {
    padding: 14px;
  }

  .toolbox-mode .toolbox-heading {
    grid-template-columns: 1fr;
  }

  .tool-mode .tool-intro h1 {
    font-size: 32px;
  }

  .download-card,
  .download-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Keep single-tool pages in one work surface. The theme layer above resets
   shared layout nodes to relative positioning, so the sidebar must be pinned
   again after all responsive overrides. */
.tool-mode .tool-sidebar {
  position: fixed !important;
  z-index: 45;
  top: var(--header-height, 58px);
  bottom: 0;
  left: 0;
  display: block;
  width: var(--sidebar-width);
}

.tool-mode .page {
  margin-left: var(--sidebar-width);
}

.tool-mode .landing-home,
.tool-mode .site-footer,
.home-mode .tool-sidebar,
.toolbox-mode .tool-sidebar {
  display: none !important;
}

@media (max-width: 900px) {
  .tool-mode .tool-sidebar {
    display: none !important;
  }

  .tool-mode .page {
    margin-left: 0;
  }
}

/* Cyber blue/cyan color guard: keep all status accents out of the green range. */
:root {
  --green: #168dff;
}

body.dark-mode {
  --green: #5ed7ff;
}

.engine-panel-head strong,
.engine-chip.is-ready {
  border-color: color-mix(in oklch, var(--cyan) 38%, var(--line));
  color: var(--cyan);
}

#progressFill {
  background: linear-gradient(90deg, var(--primary), var(--cyan), var(--primary-strong));
}

#logOutput {
  color: oklch(0.9 0.035 220);
}

/* XianCut 2026 visual alignment: deep blue/cyber cyan across static pages and tools. */
:root {
  --page: #020713;
  --surface: rgba(7, 20, 37, 0.84);
  --surface-soft: rgba(5, 16, 31, 0.78);
  --surface-tint: rgba(11, 31, 58, 0.86);
  --ink: #f4f9ff;
  --text: #eaf4ff;
  --muted: #abc0d7;
  --line: rgba(130, 206, 255, 0.17);
  --line-strong: rgba(185, 233, 255, 0.34);
  --primary: #2f79ff;
  --primary-strong: #75d8ff;
  --violet: #5f9cff;
  --cyan: #75d8ff;
  --green: #58b9ff;
  --orange: #9fe5ff;
  --pink: #6ba9ff;
  --amber: #8ec8ff;
  --shadow: none;
  --soft-shadow: none;
}

body.home-mode.site-page,
body.toolbox-mode,
body.tool-mode {
  background:
    radial-gradient(circle at 74% 5%, rgba(58, 143, 255, 0.16), transparent 31rem),
    radial-gradient(circle at 18% 24%, rgba(95, 216, 255, 0.08), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #020617 100%) !important;
  color: var(--text);
}

body.home-mode.site-page .site-header,
body.toolbox-mode .site-header,
body.tool-mode .site-header,
body.home-mode.site-page .site-footer,
body.toolbox-mode .site-footer,
body.tool-mode .site-footer {
  border-color: rgba(130, 206, 255, 0.17) !important;
  background: linear-gradient(180deg, rgba(5, 18, 34, 0.88), rgba(4, 14, 28, 0.76)) !important;
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow: none !important;
}

body.home-mode.site-page .brand strong,
body.toolbox-mode .brand strong,
body.tool-mode .brand strong,
body.home-mode.site-page h1,
body.home-mode.site-page h2,
body.home-mode.site-page h3,
body.toolbox-mode h1,
body.toolbox-mode h2,
body.toolbox-mode h3,
body.tool-mode h1,
body.tool-mode h2,
body.tool-mode h3 {
  color: #f4f9ff;
}

body.home-mode.site-page .brand small,
body.toolbox-mode .brand small,
body.tool-mode .brand small,
body.home-mode.site-page p,
body.toolbox-mode p,
body.tool-mode p {
  color: rgba(205, 222, 239, 0.76);
}

body.home-mode.site-page .nav-trigger,
body.toolbox-mode .nav-trigger,
body.tool-mode .nav-trigger,
body.home-mode.site-page .theme-toggle,
body.toolbox-mode .theme-toggle,
body.tool-mode .theme-toggle,
body.home-mode.site-page .header-action,
body.toolbox-mode .header-action,
body.tool-mode .header-action {
  border-color: rgba(130, 206, 255, 0.16) !important;
  background: rgba(6, 20, 38, 0.6) !important;
  color: rgba(233, 244, 255, 0.86) !important;
}

body.home-mode.site-page .nav-trigger:hover,
body.home-mode.site-page .nav-trigger.active,
body.toolbox-mode .nav-trigger:hover,
body.toolbox-mode .nav-trigger.active,
body.tool-mode .nav-trigger:hover,
body.tool-mode .nav-trigger.active {
  border-color: rgba(185, 233, 255, 0.34) !important;
  background: rgba(24, 89, 180, 0.32) !important;
  color: #fff !important;
}

body.home-mode.site-page .primary-button,
body.toolbox-mode .primary-button,
body.tool-mode .primary-button,
body.home-mode.site-page .header-cta,
body.toolbox-mode .header-cta,
body.tool-mode .header-cta,
body.home-mode.site-page .tool-run-button,
body.toolbox-mode .tool-run-button,
body.tool-mode .tool-run-button {
  background:
    radial-gradient(circle at 30% 18%, rgba(190, 239, 255, 0.34), transparent 34%),
    linear-gradient(135deg, #2474ff, #58b9ff) !important;
  color: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(219, 247, 255, 0.2) !important;
}

body.home-mode.site-page .ghost-button,
body.toolbox-mode .ghost-button,
body.tool-mode .ghost-button,
body.home-mode.site-page .outline-link,
body.toolbox-mode .outline-link,
body.tool-mode .outline-link {
  border-color: rgba(130, 206, 255, 0.18) !important;
  background: rgba(6, 20, 38, 0.58) !important;
  color: #edf8ff !important;
}

body.home-mode.site-page .page-hero,
body.home-mode.site-page .page-hero-split,
body.home-mode.site-page .about-page-hero,
body.home-mode.site-page .portfolio-section,
body.home-mode.site-page .project-detail-section,
body.home-mode.site-page .contact-section,
body.home-mode.site-page .service-flow-card,
body.home-mode.site-page .service-page-card,
body.home-mode.site-page .service-sticky-panel,
body.home-mode.site-page .contact-card-large,
body.home-mode.site-page .contact-brief-grid article,
body.home-mode.site-page .trust-strip,
body.toolbox-mode .hero-band,
body.toolbox-mode .about-panel,
body.toolbox-mode .services-panel,
body.toolbox-mode .service-card,
body.toolbox-mode .service-detail-section,
body.toolbox-mode .service-detail-grid article,
body.toolbox-mode .portfolio-section,
body.toolbox-mode .portfolio-grid article,
body.toolbox-mode .tool-card,
body.toolbox-mode .workspace-panel,
body.toolbox-mode .tool-panel,
body.toolbox-mode .quick-entry {
  border-color: rgba(130, 206, 255, 0.12) !important;
  background: #0b0f19 !important;
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02) !important;
}

body.home-mode.site-page .landing-kicker,
body.toolbox-mode .landing-kicker,
body.home-mode.site-page .service-signal,
body.toolbox-mode .service-signal,
body.home-mode.site-page [class*="success"],
body.toolbox-mode [class*="success"],
body.home-mode.site-page [class*="warning"],
body.toolbox-mode [class*="warning"] {
  background: rgba(88, 185, 255, 0.12) !important;
  color: #8ee3ff !important;
  border-color: rgba(142, 227, 255, 0.22) !important;
}

body.home-mode.site-page .brand-symbol,
body.toolbox-mode .brand-symbol,
body.home-mode.site-page .service-card > i,
body.toolbox-mode .service-card > i,
body.home-mode.site-page .service-page-card > i,
body.toolbox-mode .service-page-card > i,
body.home-mode.site-page .contact-brief-grid i,
body.toolbox-mode .contact-brief-grid i {
  background:
    radial-gradient(circle at 50% 15%, rgba(203, 244, 255, 0.14), transparent 44%),
    linear-gradient(145deg, rgba(11, 39, 74, 0.95), rgba(28, 91, 207, 0.42)) !important;
  color: #f2fbff !important;
}

body.toolbox-mode .toolbox-section,
body.toolbox-mode .landing-home > .toolbox-section,
body.toolbox-mode .hero-tool,
body.toolbox-mode .result-section,
body.tool-mode .hero-tool,
body.tool-mode .result-section,
body.toolbox-mode .upload-card,
body.tool-mode .upload-card,
body.toolbox-mode .result-panel,
body.tool-mode .result-panel,
body.toolbox-mode .steps-panel,
body.tool-mode .steps-panel,
body.toolbox-mode .home-picker-shell,
body.toolbox-mode .engine-panel-card,
body.tool-mode .engine-panel-card,
body.toolbox-mode .workflow-row button,
body.toolbox-mode .home-tool,
body.toolbox-mode .creator-rail span,
body.tool-mode .creator-rail span,
body.toolbox-mode .badges span,
body.tool-mode .badges span,
body.toolbox-mode .setting input,
body.tool-mode .setting input,
body.toolbox-mode .setting select,
body.tool-mode .setting select,
body.toolbox-mode .setting textarea,
body.tool-mode .setting textarea,
body.toolbox-mode .setting-check,
body.tool-mode .setting-check,
body.toolbox-mode .url-tool div,
body.tool-mode .url-tool div,
body.toolbox-mode .file-row,
body.tool-mode .file-row,
body.toolbox-mode .popover-card,
body.tool-mode .popover-card,
body.toolbox-mode .quick-entry,
body.tool-mode .tool-sidebar {
  background: #0b0f19 !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02), 0 0 0 1px rgba(0, 0, 0, 0.28) !important;
}

body.toolbox-mode .toolbox-heading h2,
body.toolbox-mode .hero-tool h1,
body.toolbox-mode .result-section h2,
body.toolbox-mode .steps-panel h2,
body.tool-mode .hero-tool h1,
body.tool-mode .result-section h2,
body.tool-mode .steps-panel h2 {
  color: #f4f9ff;
}

body.toolbox-mode .home-tool:hover,
body.toolbox-mode .workflow-row button:hover,
body.tool-mode .home-tool:hover,
body.tool-mode .workflow-row button:hover,
body.toolbox-mode .service-card:hover,
body.tool-mode .service-card:hover,
body.toolbox-mode .service-page-card:hover,
body.tool-mode .service-page-card:hover,
body.toolbox-mode .internal-page-card:hover,
body.tool-mode .internal-page-card:hover,
body.toolbox-mode .contact-brief-grid article:hover,
body.tool-mode .contact-brief-grid article:hover,
body.toolbox-mode .about-capability-grid article:hover {
  border-color: rgba(88, 185, 255, 0.42) !important;
  background: #111827 !important;
}

body.toolbox-mode .primary-button,
body.tool-mode .primary-button,
body.toolbox-mode .tool-run-button,
body.tool-mode .tool-run-button,
body.toolbox-mode .url-tool button,
body.tool-mode .url-tool button,
body.toolbox-mode .workflow-row button.active {
  background:
    radial-gradient(circle at 30% 18%, rgba(190, 239, 255, 0.34), transparent 34%),
    linear-gradient(135deg, #2474ff, #58b9ff) !important;
  color: #fff !important;
  border-color: rgba(219, 247, 255, 0.18) !important;
  box-shadow: inset 0 0 0 1px rgba(219, 247, 255, 0.14), 0 0 28px rgba(44, 129, 255, 0.22) !important;
}

body.toolbox-mode .ghost-button,
body.tool-mode .ghost-button,
body.toolbox-mode .outline-link,
body.tool-mode .outline-link,
body.toolbox-mode .home-tabs button,
body.toolbox-mode .nav-trigger,
body.tool-mode .nav-trigger,
body.toolbox-mode .theme-toggle,
body.tool-mode .theme-toggle {
  background: rgba(6, 20, 38, 0.72) !important;
  border-color: rgba(130, 206, 255, 0.14) !important;
  color: rgba(233, 244, 255, 0.9) !important;
}

body.toolbox-mode .setting input,
body.tool-mode .setting input,
body.toolbox-mode .setting select,
body.tool-mode .setting select,
body.toolbox-mode .setting textarea,
body.tool-mode .setting textarea,
body.toolbox-mode .url-tool input,
body.tool-mode .url-tool input {
  color: #f4f9ff !important;
}

body.toolbox-mode .setting input::placeholder,
body.tool-mode .setting input::placeholder,
body.toolbox-mode .setting textarea::placeholder,
body.tool-mode .setting textarea::placeholder,
body.toolbox-mode .url-tool input::placeholder,
body.tool-mode .url-tool input::placeholder,
body.toolbox-mode .home-search input::placeholder,
body.tool-mode .home-search input::placeholder {
  color: rgba(159, 181, 204, 0.8) !important;
}

body.tool-mode .progress-bar,
body.toolbox-mode .progress-bar {
  background: rgba(17, 24, 39, 0.96) !important;
}

body.toolbox-mode #logOutput,
body.tool-mode #logOutput {
  background: #070b13 !important;
  color: oklch(0.93 0.03 220) !important;
}

body.toolbox-mode .tool-sidebar,
body.tool-mode .tool-sidebar {
  background: #0b0f19 !important;
  border-right-color: rgba(255, 255, 255, 0.05) !important;
}

body.toolbox-mode .sidebar-tool:hover,
body.toolbox-mode .sidebar-tool.active,
body.tool-mode .sidebar-tool:hover,
body.tool-mode .sidebar-tool.active {
  background: rgba(37, 99, 235, 0.16) !important;
  color: #8ee3ff !important;
}

body.toolbox-mode .site-header,
body.tool-mode .site-header {
  background: rgba(5, 10, 20, 0.94) !important;
}

body.toolbox-mode .site-footer,
body.tool-mode .site-footer {
  display: grid !important;
  grid-column: 1 / -1;
  grid-template-columns: minmax(260px, 0.85fr) repeat(3, minmax(150px, 1fr));
  gap: 18px;
  width: min(1520px, calc(100vw - 48px));
  margin: 18px auto 0;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 8px;
  background: #0b0f19 !important;
  color: rgba(205, 222, 239, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02) !important;
}

body.tool-mode .site-footer {
  width: 100%;
  margin-top: 0;
}

body.tool-mode .download-card {
  align-items: stretch;
  flex-direction: column;
}

body.tool-mode .download-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(132px, 1fr));
  gap: 8px;
  justify-content: stretch;
  width: 100%;
}

body.tool-mode .download-actions .primary-button,
body.tool-mode .download-actions .ghost-button {
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  body.tool-mode .download-actions {
    grid-template-columns: 1fr;
  }
}

body.toolbox-mode .footer-brand,
body.tool-mode .footer-brand,
body.toolbox-mode .footer-links,
body.tool-mode .footer-links,
body.toolbox-mode .footer-meta,
body.tool-mode .footer-meta {
  display: grid;
  align-content: start;
  gap: 9px;
}

body.toolbox-mode .site-footer a,
body.tool-mode .site-footer a {
  color: rgba(222, 236, 248, 0.76);
}

@media (max-width: 900px) {
  body.toolbox-mode .site-footer,
  body.tool-mode .site-footer {
    grid-template-columns: 1fr;
    width: calc(100vw - 28px);
  }
}

body.home-mode.site-page a,
body.toolbox-mode a,
body.tool-mode a {
  color: inherit;
}

/* Final Product Design pass: keep the free workbench identical to the wide reference. */
body.toolbox-mode .landing-home {
  width: min(1920px, calc(100vw - 64px)) !important;
  padding: 14px 0 26px !important;
}

body.toolbox-mode .toolbox-section,
body.toolbox-mode .landing-home > .toolbox-section {
  min-height: calc(100vh - var(--header-height, 58px) - 28px);
  padding: clamp(18px, 2.2vw, 42px) !important;
  background:
    radial-gradient(circle at 34% 18%, rgba(47, 121, 255, 0.16), transparent 24rem),
    linear-gradient(180deg, rgba(7, 18, 33, 0.94), rgba(3, 10, 21, 0.96)) !important;
}

body.toolbox-mode .toolbox-heading {
  grid-template-columns: minmax(520px, 0.86fr) minmax(480px, 0.64fr) !important;
  gap: clamp(28px, 6vw, 150px) !important;
  min-height: 192px;
}

body.toolbox-mode .workflow-row {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px;
}

body.toolbox-mode .home-tool-grid {
  grid-template-columns: repeat(4, minmax(260px, 1fr)) !important;
  gap: 10px;
}

@media (max-width: 1180px) {
  body.toolbox-mode .toolbox-heading,
  body.toolbox-mode .workflow-row {
    grid-template-columns: 1fr !important;
  }

  body.toolbox-mode .home-tool-grid {
    grid-template-columns: repeat(2, minmax(230px, 1fr)) !important;
  }
}

@media (max-width: 620px) {
  body.toolbox-mode .landing-home {
    width: calc(100vw - 24px) !important;
  }

  body.toolbox-mode .home-tool-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Final tool workbench reference alignment: match the supplied compact screenshot. */
body.toolbox-mode .site-header {
  grid-template-columns: minmax(220px, 0.42fr) minmax(540px, 1fr) minmax(110px, 0.42fr) !important;
  padding-inline: clamp(32px, calc((100vw - 1252px) / 2), 260px) !important;
}

body.toolbox-mode .brand-symbol {
  width: 38px;
  height: 38px;
}

body.toolbox-mode .brand strong {
  max-width: none;
  font-size: 18px;
}

body.toolbox-mode .brand small {
  font-size: 12px;
}

body.toolbox-mode .top-nav {
  justify-content: center;
  gap: 34px;
}

body.toolbox-mode .nav-trigger {
  min-height: 58px;
  padding-inline: 0;
  background: transparent !important;
  border-color: transparent !important;
  font-size: 14px;
}

body.toolbox-mode .nav-trigger.active {
  background: rgba(47, 121, 255, 0.16) !important;
  border-color: rgba(47, 121, 255, 0.16) !important;
}

body.toolbox-mode .header-actions {
  min-width: 98px;
}

body.toolbox-mode .landing-home {
  width: min(1252px, calc(100vw - 32px)) !important;
  padding: 34px 0 26px !important;
}

body.toolbox-mode .toolbox-section,
body.toolbox-mode .landing-home > .toolbox-section {
  min-height: auto !important;
  padding: 34px 58px 46px !important;
  background:
    radial-gradient(circle at 17% 16%, rgba(47, 121, 255, 0.13), transparent 20rem),
    radial-gradient(circle at 23% 24%, rgba(117, 216, 255, 0.45), transparent 2px),
    radial-gradient(circle at 34% 30%, rgba(47, 121, 255, 0.42), transparent 2px),
    linear-gradient(180deg, rgba(7, 18, 33, 0.94), rgba(3, 10, 21, 0.96)) !important;
}

body.toolbox-mode .toolbox-heading {
  grid-template-columns: minmax(430px, 0.82fr) minmax(520px, 1fr) !important;
  gap: 48px !important;
  min-height: 220px;
}

body.toolbox-mode .toolbox-heading > div:first-child {
  min-height: 190px;
  padding-top: 24px;
}

body.toolbox-mode .toolbox-heading h2 {
  max-width: 10em;
  font-size: 36px !important;
  line-height: 1.16 !important;
}

body.toolbox-mode .toolbox-heading > div:first-child {
  padding-top: 8px;
}

body.toolbox-mode .toolbox-heading p {
  max-width: 33rem;
  margin-top: 14px;
  font-size: 16px !important;
  line-height: 1.65 !important;
}

body.toolbox-mode .toolbox-heading .toolbox-heading-icon,
body.toolbox-mode .toolbox-heading .hero-tool-icon,
body.toolbox-mode .toolbox-heading [data-toolbox-icon] {
  transform: translateY(8px);
}

body.toolbox-mode .engine-panel-card {
  min-height: 220px;
  padding: 26px 28px;
}

body.toolbox-mode .engine-panel-head span {
  font-size: 23px !important;
}

body.toolbox-mode .engine-panel-card p {
  max-width: 38rem;
  font-size: 16px !important;
}

body.toolbox-mode .workflow-row {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

body.toolbox-mode .workflow-row button {
  grid-template-columns: 48px minmax(0, 1fr) auto !important;
  min-height: 174px !important;
  padding: 20px 18px !important;
}

body.toolbox-mode .workflow-row button svg {
  width: 50px !important;
  height: 50px !important;
}

body.toolbox-mode .workflow-row button small {
  line-height: 1.7;
}

body.toolbox-mode .home-picker-top {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 320px) !important;
}

body.toolbox-mode .home-tabs {
  gap: 22px !important;
}

body.toolbox-mode .home-tabs button {
  min-width: 70px !important;
  min-height: 38px !important;
}

body.toolbox-mode .home-tool-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
  padding: 20px !important;
}

body.toolbox-mode .home-tool {
  min-height: 126px !important;
  padding: 16px !important;
}

body.toolbox-mode .home-tool-copy strong {
  font-size: 16px !important;
}

@media (max-width: 1180px) {
  body.toolbox-mode .site-header {
    padding-inline: 18px !important;
  }

  body.toolbox-mode .toolbox-heading,
  body.toolbox-mode .workflow-row {
    grid-template-columns: 1fr !important;
  }

  body.toolbox-mode .home-tool-grid {
    grid-template-columns: repeat(2, minmax(230px, 1fr)) !important;
  }
}

/* Wide-screen alignment: keep the tool workbench on the same rails as the homepage. */
body.toolbox-mode .site-header {
  grid-template-columns: minmax(220px, 0.42fr) minmax(480px, 1fr) minmax(220px, 0.42fr) !important;
  padding-inline: clamp(20px, 2.8vw, 64px) !important;
}

body.toolbox-mode .header-actions {
  min-width: 220px;
  justify-content: flex-end;
}

body.toolbox-mode .top-nav {
  gap: clamp(22px, 2.8vw, 54px);
}

body.toolbox-mode .landing-home {
  width: min(100vw, calc(100vw - 28px)) !important;
  box-sizing: border-box;
  padding: 18px clamp(16px, 2.1vw, 56px) 26px !important;
}

body.toolbox-mode .toolbox-section,
body.toolbox-mode .landing-home > .toolbox-section {
  width: 100%;
  padding: clamp(24px, 2.2vw, 42px) !important;
}

body.toolbox-mode .toolbox-heading {
  grid-template-columns: minmax(520px, 0.9fr) minmax(520px, 0.7fr) !important;
  gap: clamp(32px, 5vw, 96px) !important;
}

body.toolbox-mode .home-tool-grid {
  grid-template-columns: repeat(4, minmax(260px, 1fr)) !important;
}

@media (max-width: 1180px) {
  body.toolbox-mode .site-header {
    padding-inline: 18px !important;
  }

  body.toolbox-mode .header-actions {
    min-width: 0;
  }

  body.toolbox-mode .landing-home {
    width: calc(100vw - 24px) !important;
    padding-inline: 12px !important;
  }

  body.toolbox-mode .toolbox-heading,
  body.toolbox-mode .workflow-row {
    grid-template-columns: 1fr !important;
  }
}

/* Single-tool workspace pass: scoped to the small tool usage pages only. */
body.tool-mode .site-header {
  grid-template-columns: minmax(220px, 0.42fr) minmax(480px, 1fr) minmax(220px, 0.42fr) !important;
  padding-inline: clamp(20px, 2.8vw, 64px) !important;
}

body.tool-mode .header-actions {
  min-width: 220px;
  justify-content: flex-end;
}

body.tool-mode .top-nav {
  justify-content: center;
  gap: clamp(22px, 2.8vw, 54px);
}

body.tool-mode .nav-trigger {
  min-height: 58px;
  padding-inline: 0;
  background: transparent !important;
  border-color: transparent !important;
  font-size: 14px;
}

body.tool-mode .nav-trigger.active {
  background: rgba(47, 121, 255, 0.16) !important;
  border-color: rgba(47, 121, 255, 0.16) !important;
}

body.tool-mode .page {
  grid-template-columns: minmax(680px, 1fr) minmax(390px, 0.36fr) !important;
  gap: clamp(18px, 1.5vw, 28px) !important;
  width: auto !important;
  max-width: none !important;
  margin-left: var(--sidebar-width) !important;
  padding: 24px clamp(20px, 2.2vw, 48px) 34px !important;
  background: linear-gradient(180deg, rgba(2, 8, 20, 0.96), rgba(2, 6, 18, 0.98)) !important;
}

body.tool-mode .hero-tool {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 18px !important;
  min-width: 0;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.tool-mode .tool-intro {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "icon badges"
    "icon title"
    "icon lead";
  align-items: center;
  column-gap: 24px;
  row-gap: 8px;
  padding: 4px 0 2px;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.tool-mode .tool-intro .badges {
  grid-area: badges;
  justify-content: flex-start;
  margin: 0;
}

body.tool-mode .tool-intro .title-row {
  display: contents;
}

body.tool-mode .tool-intro .icon-bubble {
  grid-area: icon;
  width: 76px;
  height: 76px;
  border-radius: 14px;
  color: #eaf8ff !important;
  background:
    radial-gradient(circle at 28% 18%, rgba(142, 227, 255, 0.28), transparent 46%),
    linear-gradient(135deg, var(--active-tool-color, #2f79ff), #3aa7ff);
  box-shadow: 0 12px 28px rgba(47, 121, 255, 0.28);
}

body.tool-mode .tool-intro .icon-bubble svg {
  width: 38px;
  height: 38px;
}

body.tool-mode .tool-intro .title-row > div {
  grid-area: title;
}

body.tool-mode .tool-intro h1 {
  margin: 0;
  font-size: 36px !important;
  line-height: 1.12 !important;
  letter-spacing: 0;
}

body.tool-mode .tool-intro .eyebrow {
  margin: 0 0 4px;
  color: rgba(185, 217, 241, 0.82);
}

body.tool-mode .tool-intro .lead {
  grid-area: lead;
  max-width: 58rem;
  margin: 0;
  color: rgba(219, 234, 248, 0.76) !important;
  font-size: 17px;
  line-height: 1.6;
}

body.tool-mode .creator-rail {
  display: none !important;
}

body.tool-mode .upload-card {
  display: grid !important;
  gap: 16px !important;
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.tool-mode .tool-input-panel,
body.tool-mode .tool-settings-panel,
body.tool-mode .estimate-card {
  display: grid;
  gap: 16px;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
  padding: 22px;
  border: 1px solid rgba(80, 164, 255, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 0%, rgba(47, 121, 255, 0.12), transparent 19rem),
    linear-gradient(180deg, rgba(8, 18, 35, 0.86), rgba(5, 13, 27, 0.92));
}

body.tool-mode .tool-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

body.tool-mode .tool-panel-heading h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #f5fbff !important;
  font-size: 20px !important;
  line-height: 1.25;
}

body.tool-mode .tool-panel-heading svg {
  width: 22px;
  height: 22px;
  color: #8ee3ff;
}

body.tool-mode #settingsPanelBadge {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid rgba(88, 185, 255, 0.18);
  border-radius: 999px;
  color: #a9e9ff;
  background: rgba(47, 121, 255, 0.13);
  font-size: 12px;
  font-weight: 800;
}

body.tool-mode .dropzone {
  min-height: 238px !important;
  border-radius: 8px !important;
  border-color: rgba(88, 185, 255, 0.46) !important;
  background:
    radial-gradient(circle at 50% 35%, rgba(47, 121, 255, 0.18), transparent 14rem),
    rgba(1, 8, 18, 0.56) !important;
}

body.tool-mode .drop-inner {
  gap: 12px;
}

body.tool-mode .upload-orb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
}

body.tool-mode .drop-inner strong {
  color: #f8fbff;
  font-size: 20px;
}

body.tool-mode .drop-inner span:last-child {
  color: rgba(209, 226, 241, 0.76);
  font-size: 15px;
}

body.tool-mode .url-tool {
  border-radius: 8px;
}

body.tool-mode .local-engine-panel {
  display: block;
}

body.tool-mode .engine-panel-card {
  border-radius: 8px !important;
  background: rgba(5, 15, 30, 0.78) !important;
}

body.tool-mode .settings {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

body.tool-mode main .upload-card,
body.tool-mode main [class*="upload-card"],
body.tool-mode main .tool-input-panel,
body.tool-mode main .tool-settings-panel,
body.tool-mode main .estimate-card,
body.tool-mode main .settings,
body.tool-mode main [class*="settings"] {
  width: 100% !important;
  max-width: none !important;
  justify-self: stretch !important;
}

body.tool-mode .setting {
  display: grid;
  gap: 8px;
  min-width: 0;
}

body.tool-mode .setting label,
body.tool-mode .setting > span {
  color: rgba(238, 247, 255, 0.88);
  font-size: 14px;
  font-weight: 800;
}

body.tool-mode .setting small {
  color: rgba(182, 211, 232, 0.72);
  line-height: 1.45;
}

body.tool-mode .setting input,
body.tool-mode .setting select,
body.tool-mode .setting textarea {
  min-height: 48px;
  border-radius: 8px !important;
  border-color: rgba(113, 184, 255, 0.24) !important;
  background-color: rgba(2, 9, 21, 0.88) !important;
}

body.tool-mode .setting[data-setting-key="format"] select,
body.tool-mode .setting[data-setting-key="targetFormat"] select,
body.tool-mode .setting[data-setting-key="pdfOperation"] select {
  color: #f8fbff !important;
  border-color: rgba(47, 121, 255, 0.64) !important;
  background:
    linear-gradient(180deg, rgba(33, 96, 216, 0.28), rgba(2, 9, 21, 0.92)) !important;
}

body.tool-mode .setting-wide {
  grid-column: 1 / -1;
}

body.tool-mode .estimate-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body.tool-mode .estimate-item {
  display: grid;
  gap: 8px;
  min-height: 88px;
  align-content: center;
  padding: 14px;
  border: 1px solid rgba(80, 164, 255, 0.1);
  border-radius: 8px;
  background: rgba(3, 13, 27, 0.68);
}

body.tool-mode .estimate-item span {
  color: rgba(190, 216, 236, 0.72);
  font-size: 13px;
}

body.tool-mode .estimate-item strong {
  color: #eaf8ff;
  font-size: 17px;
  line-height: 1.35;
}

body.tool-mode .estimate-item:nth-child(3) strong {
  color: #24d4a2;
}

body.tool-mode .actions {
  display: grid !important;
  grid-template-columns: minmax(240px, 1fr) minmax(92px, auto) minmax(92px, auto);
  gap: 12px;
  align-items: center;
}

body.tool-mode .actions .primary-button,
body.tool-mode .actions .ghost-button {
  min-height: 54px;
  border-radius: 8px !important;
}

body.tool-mode .result-section {
  position: sticky !important;
  top: calc(var(--header-height, 58px) + 18px) !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 16px !important;
  height: calc(100vh - var(--header-height, 58px) - 36px) !important;
  overflow: auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.tool-mode .result-panel,
body.tool-mode .steps-panel {
  width: 100%;
  border-radius: 8px !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(47, 121, 255, 0.1), transparent 15rem),
    rgba(8, 15, 27, 0.92) !important;
}

body.tool-mode .result-panel {
  padding: 20px !important;
}

body.tool-mode .progress-area {
  min-height: 164px;
}

body.tool-mode #logOutput {
  min-height: 118px;
}

body.tool-mode .steps-panel {
  padding: 20px !important;
}

body.tool-mode .steps-panel h2 {
  margin: 10px 0 16px;
  font-size: 22px !important;
}

body.tool-mode .steps {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
}

body.tool-mode .steps div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 6px 12px;
  align-items: center;
  min-height: 86px;
  padding: 14px;
  border: 1px solid rgba(80, 164, 255, 0.1);
  border-radius: 8px;
  background: rgba(3, 12, 25, 0.58);
}

body.tool-mode .steps strong {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

body.tool-mode .steps h3,
body.tool-mode .steps p {
  margin: 0;
  text-align: left;
}

@media (max-width: 1320px) {
  body.tool-mode .page {
    grid-template-columns: 1fr !important;
  }

  body.tool-mode .result-section {
    position: static !important;
    height: auto !important;
    overflow: visible !important;
  }
}

@media (max-width: 900px) {
  body.tool-mode .site-header {
    padding-inline: 16px !important;
  }

  body.tool-mode .header-actions {
    min-width: 0;
  }

  body.tool-mode .page {
    margin-left: 0 !important;
    padding: 16px !important;
  }

  body.tool-mode .tool-intro {
    grid-template-columns: 64px minmax(0, 1fr);
    column-gap: 14px;
  }

  body.tool-mode .tool-intro .icon-bubble {
    width: 64px;
    height: 64px;
  }

  body.tool-mode .settings,
  body.tool-mode .estimate-grid,
  body.tool-mode .actions {
    grid-template-columns: 1fr !important;
  }
}

/* Tool workspace desktop refinement: align the single-tool pages with the
   inset desktop composition shown in the landscape reference. */
body.tool-mode {
  --tool-shell-inset: clamp(18px, 1.9vw, 24px);
  --tool-sidebar-width: clamp(214px, 14vw, 232px);
  --tool-sidebar-gap: clamp(14px, 1.4vw, 22px);
}

body.tool-mode .site-header {
  padding-inline: var(--tool-shell-inset) !important;
}

body.tool-mode .tool-sidebar {
  top: calc(var(--header-height, 58px) + 14px) !important;
  bottom: 16px !important;
  left: var(--tool-shell-inset) !important;
  width: var(--tool-sidebar-width) !important;
  border: 1px solid rgba(88, 185, 255, 0.14) !important;
  border-radius: 14px;
  background:
    radial-gradient(circle at 18% 0%, rgba(47, 121, 255, 0.12), transparent 11rem),
    rgba(7, 16, 30, 0.96) !important;
  box-shadow: 0 10px 24px rgba(1, 6, 16, 0.22);
  overflow: hidden;
  scrollbar-width: none;
}

body.tool-mode .tool-sidebar::-webkit-scrollbar,
body.tool-mode .sidebar-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body.tool-mode .sidebar-scroll {
  min-width: 0;
  padding: 18px 10px 22px;
  overflow-x: hidden;
  scrollbar-width: none;
}

body.tool-mode .sidebar-group {
  min-width: 0;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 14px;
}

body.tool-mode .sidebar-title {
  margin: 0 0 2px 10px;
  color: rgba(185, 217, 241, 0.68);
  font-size: 12px;
  font-weight: 900;
}

body.tool-mode .sidebar-tool {
  min-width: 0;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(216, 231, 244, 0.78);
  padding-inline: 12px;
}

body.tool-mode .sidebar-tool span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.tool-mode .sidebar-tool.active,
body.tool-mode .sidebar-tool:hover {
  border-color: rgba(88, 185, 255, 0.18) !important;
  background: rgba(47, 121, 255, 0.16) !important;
  color: #eef8ff !important;
  box-shadow: none !important;
}

body.tool-mode .page {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.34fr) !important;
  gap: clamp(18px, 1.6vw, 26px) !important;
  margin-left: calc(var(--tool-sidebar-width) + var(--tool-shell-inset) + var(--tool-sidebar-gap)) !important;
  padding: 22px clamp(18px, 2vw, 38px) 30px 0 !important;
  min-height: calc(100vh - var(--header-height, 58px));
  align-items: start;
}

body.tool-mode .hero-tool {
  gap: 20px !important;
}

body.tool-mode .tool-intro {
  grid-template-columns: minmax(0, 1.18fr) minmax(170px, 0.62fr);
  grid-template-areas:
    "copy visual"
    "lead visual"
    "badges visual";
  column-gap: clamp(18px, 2.1vw, 34px);
  row-gap: 18px;
  min-height: 260px;
  padding: 26px clamp(24px, 2.4vw, 34px) 24px;
  border: 1px solid rgba(88, 185, 255, 0.14);
  border-radius: 14px;
  background:
    radial-gradient(circle at 84% 24%, rgba(47, 121, 255, 0.18), transparent 8rem),
    linear-gradient(180deg, rgba(9, 19, 36, 0.94), rgba(5, 13, 27, 0.98)) !important;
  overflow: hidden;
}

body.tool-mode .tool-intro .title-row > div {
  padding-top: 4px;
}

body.tool-mode .tool-intro .badges {
  grid-area: badges;
  margin: 0;
  align-self: end;
}

body.tool-mode .tool-intro .title-row {
  display: contents;
}

body.tool-mode .tool-intro .title-row > div {
  grid-area: copy;
  display: grid;
  gap: 6px;
  align-self: end;
}

body.tool-mode .tool-intro .icon-bubble {
  grid-area: visual;
  width: 120px;
  height: 120px;
  justify-self: end;
  align-self: start;
  margin-top: 16px;
  overflow: visible;
}

body.tool-mode .tool-intro .icon-bubble svg {
  width: 54px;
  height: 54px;
}

body.tool-mode .tool-intro .icon-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

body.tool-mode .tool-intro .icon-particles span {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.98), rgba(142, 227, 255, 0.08) 70%);
  box-shadow: 0 0 12px rgba(142, 227, 255, 0.8);
  opacity: 0.9;
  animation: toolParticleFloat 3.8s ease-in-out infinite;
}

body.tool-mode .tool-intro .icon-particles span:nth-child(1) {
  left: 10px;
  top: 14px;
  animation-delay: 0s;
}

body.tool-mode .tool-intro .icon-particles span:nth-child(2) {
  right: 14px;
  top: 18px;
  animation-delay: 0.6s;
}

body.tool-mode .tool-intro .icon-particles span:nth-child(3) {
  left: 18px;
  bottom: 14px;
  animation-delay: 1.2s;
}

body.tool-mode .tool-intro .icon-particles span:nth-child(4) {
  right: 24px;
  bottom: 18px;
  width: 6px;
  height: 6px;
  animation-delay: 1.8s;
}

body.tool-mode .tool-intro .icon-particles span:nth-child(5) {
  left: 50%;
  top: 8px;
  width: 5px;
  height: 5px;
  animation-delay: 2.4s;
}

body.tool-mode .tool-intro .lead {
  grid-area: lead;
  align-self: start;
  max-width: 42rem;
}

body.tool-mode .tool-intro .eyebrow {
  margin-bottom: 2px;
}

body.tool-mode .upload-card {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.76fr) !important;
  grid-template-areas:
    "input settings"
    "engine settings"
    "estimate estimate"
    "actions actions";
  align-items: start;
}

body.tool-mode .tool-input-panel {
  grid-area: input;
}

body.tool-mode .local-engine-panel {
  grid-area: engine;
  min-width: 0;
}

body.tool-mode .tool-settings-panel {
  grid-area: settings;
}

body.tool-mode .tool-settings-panel:has(.settings-empty-state),
body.tool-mode .tool-settings-panel:has(.settings-feature-grid) {
  align-content: center;
  min-height: 280px;
}

body.tool-mode .settings:has(.settings-empty-state),
body.tool-mode .settings:has(.settings-feature-grid) {
  grid-template-columns: 1fr !important;
}

body.tool-mode .settings-empty-state {
  display: grid;
  grid-column: 1 / -1;
  place-items: center;
  gap: 14px;
  min-height: 220px;
  padding: 22px;
  border: 1px dashed rgba(88, 185, 255, 0.18);
  border-radius: 12px;
  background: rgba(3, 11, 23, 0.72);
  text-align: center;
}

body.tool-mode .settings-empty-state__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: rgba(47, 121, 255, 0.16);
  color: #8ee3ff;
}

body.tool-mode .settings-empty-state__icon svg {
  width: 30px;
  height: 30px;
}

body.tool-mode .settings-empty-state strong {
  display: block;
  color: #f5fbff;
  font-size: 20px;
}

body.tool-mode .settings-empty-state p {
  max-width: 28ch;
  margin: 8px 0 0;
  color: rgba(194, 217, 235, 0.76);
  line-height: 1.55;
}

body.tool-mode .settings-feature-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.tool-mode .settings-feature-card {
  display: grid;
  gap: 6px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid rgba(88, 185, 255, 0.12);
  border-radius: 12px;
  background: rgba(5, 15, 30, 0.72);
}

body.tool-mode .settings-feature-card i {
  width: 26px;
  height: 26px;
  color: #8ee3ff;
}

body.tool-mode .settings-feature-card strong {
  color: #f4f9ff;
  font-size: 14px;
}

body.tool-mode .settings-feature-card span {
  color: rgba(194, 217, 235, 0.72);
  line-height: 1.45;
  font-size: 12px;
}

body.tool-mode .estimate-card {
  grid-area: estimate;
}

body.tool-mode .actions {
  grid-area: actions;
}

body.tool-mode .result-section {
  top: calc(var(--header-height, 58px) + 14px) !important;
  height: calc(100vh - var(--header-height, 58px) - 30px) !important;
  padding-bottom: 18px !important;
}

@media (max-width: 1320px) {
  body.tool-mode .tool-sidebar {
    left: var(--tool-shell-inset) !important;
  }

  body.tool-mode .page {
    margin-left: calc(var(--tool-sidebar-width) + var(--tool-shell-inset) + var(--tool-sidebar-gap)) !important;
    padding-right: 16px !important;
  }

  body.tool-mode .upload-card {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "input"
      "engine"
      "settings"
      "estimate"
      "actions";
  }

  body.tool-mode .tool-intro {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "lead"
      "visual"
      "badges";
  }

  body.tool-mode .tool-intro .icon-bubble {
    width: 96px;
    height: 96px;
    justify-self: start;
  }

  body.tool-mode .settings-feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  body.tool-mode .page {
    margin-left: 0 !important;
    padding: 16px !important;
  }

  body.tool-mode .tool-intro,
  body.tool-mode .upload-card {
    padding-inline: 18px !important;
  }

  body.tool-mode .settings-empty-state {
    min-height: 180px;
  }
}

/* 2026 workbench polish: darker material, numbered flow, segmented controls. */
body.tool-mode {
  --tool-card-bg: linear-gradient(180deg, rgba(8, 19, 38, 0.94), rgba(4, 12, 26, 0.98));
  --tool-card-border: rgba(91, 179, 255, 0.18);
  --tool-card-glow: 0 0 0 1px rgba(89, 180, 255, 0.05), 0 0 26px rgba(47, 121, 255, 0.08);
}

body.tool-mode .tool-input-panel,
body.tool-mode .tool-settings-panel,
body.tool-mode .estimate-card,
body.tool-mode .result-panel,
body.tool-mode .steps-panel {
  position: relative;
  border-color: var(--tool-card-border) !important;
  background:
    radial-gradient(circle at 9% 0%, rgba(65, 154, 255, 0.13), transparent 18rem),
    var(--tool-card-bg) !important;
  box-shadow: var(--tool-card-glow) !important;
}

body.tool-mode .tool-input-panel::before,
body.tool-mode .tool-settings-panel::before,
body.tool-mode .estimate-card::before,
body.tool-mode .result-panel::before,
body.tool-mode .steps-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(214, 245, 255, 0.08), transparent 34%, rgba(75, 153, 255, 0.05));
}

body.tool-mode .tool-intro .icon-bubble {
  border: 1px solid rgba(204, 241, 255, 0.28) !important;
  border-radius: 20px !important;
  background:
    radial-gradient(circle at 28% 16%, rgba(255, 255, 255, 0.72), transparent 22%),
    radial-gradient(circle at 72% 82%, rgba(41, 185, 255, 0.65), transparent 34%),
    linear-gradient(145deg, color-mix(in srgb, var(--active-tool-color, #2f79ff) 76%, #8ee3ff), #2261ff 58%, #8a7cff) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -12px 24px rgba(2, 9, 22, 0.22),
    0 22px 38px rgba(35, 111, 255, 0.28),
    0 0 42px rgba(64, 180, 255, 0.2) !important;
  transform: perspective(720px) rotateX(9deg) rotateY(-12deg) translateY(-2px);
}

body.tool-mode .tool-intro .icon-bubble::before {
  inset: 12px !important;
  border-radius: 15px !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
  opacity: 1 !important;
  animation: none !important;
}

body.tool-mode .tool-intro .icon-bubble::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -18px;
  height: 18px;
  border-radius: 999px;
  background: radial-gradient(ellipse, rgba(37, 99, 235, 0.45), transparent 70%);
  filter: blur(6px);
}

body.tool-mode .tool-intro .icon-bubble svg {
  color: #f8fdff;
  filter: drop-shadow(0 4px 10px rgba(0, 18, 46, 0.34));
  stroke-width: 2.1;
}

body.tool-mode .panel-step {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(180deg, #57b8ff, #2f79ff);
  color: #fff;
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 0 20px rgba(47, 121, 255, 0.24);
}

body.tool-mode .privacy-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(41, 212, 162, 0.18);
  border-radius: 8px;
  background: rgba(14, 165, 150, 0.08);
  color: rgba(210, 244, 236, 0.9);
  font-size: 14px;
  line-height: 1.45;
}

body.tool-mode .privacy-note svg {
  flex: 0 0 auto;
  color: #24d4a2;
}

body.tool-mode .support-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.tool-mode .format-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(91, 179, 255, 0.16);
  border-radius: 8px;
  background: rgba(4, 15, 31, 0.72);
  color: rgba(229, 243, 255, 0.88);
  font-size: 13px;
  font-weight: 850;
}

body.tool-mode .format-chip svg {
  width: 16px;
  height: 16px;
  color: #8ee3ff;
}

body.tool-mode .setting-segmented {
  gap: 10px;
}

body.tool-mode .segmented-control {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
  min-width: 0;
  padding: 5px;
  border: 1px solid rgba(113, 184, 255, 0.18);
  border-radius: 10px;
  background: rgba(2, 9, 21, 0.76);
}

body.tool-mode .segmented-option {
  min-width: 0;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: rgba(141, 175, 220, 0.08);
  color: rgba(223, 238, 250, 0.82);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

body.tool-mode .segmented-option:hover,
body.tool-mode .segmented-option.is-active {
  border-color: rgba(163, 222, 255, 0.28);
  background: linear-gradient(180deg, #3b8dff, #2f79ff);
  color: #fff;
  box-shadow: 0 8px 16px rgba(47, 121, 255, 0.22);
}

body.tool-mode .estimate-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid rgba(91, 179, 255, 0.14);
  border-radius: 8px;
  background: rgba(2, 9, 21, 0.64);
}

body.tool-mode .estimate-table tr + tr th,
body.tool-mode .estimate-table tr + tr td {
  border-top: 1px solid rgba(91, 179, 255, 0.1);
}

body.tool-mode .estimate-table th,
body.tool-mode .estimate-table td {
  padding: 13px 16px;
  text-align: left;
  line-height: 1.35;
}

body.tool-mode .estimate-table th {
  width: 34%;
  color: rgba(186, 213, 234, 0.78);
  font-size: 13px;
  font-weight: 850;
}

body.tool-mode .estimate-table td {
  color: #f1f8ff;
  font-size: 15px;
  font-weight: 900;
}

body.tool-mode .estimate-table tr:nth-child(3) td {
  color: #24d4a2;
}

body.tool-mode .actions {
  grid-template-columns: minmax(180px, 0.72fr) minmax(92px, auto) minmax(92px, auto) !important;
}

body.tool-mode .actions .primary-button {
  display: none !important;
}

body.tool-mode .sidebar-run-button {
  position: sticky;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 68px;
  border: 1px solid rgba(197, 236, 255, 0.26);
  border-radius: 10px;
  background:
    radial-gradient(circle at 32% 16%, rgba(255, 255, 255, 0.28), transparent 28%),
    linear-gradient(180deg, #58b9ff, #2f79ff);
  color: #fff;
  box-shadow: 0 18px 34px rgba(47, 121, 255, 0.36), 0 0 42px rgba(75, 176, 255, 0.18);
  font-size: 19px;
  font-weight: 950;
}

body.tool-mode .sidebar-run-button:hover {
  background:
    radial-gradient(circle at 32% 16%, rgba(255, 255, 255, 0.34), transparent 28%),
    linear-gradient(180deg, #6fc6ff, #347fff);
  transform: translateY(-1px);
}

body.tool-mode .sidebar-run-button svg {
  width: 22px;
  height: 22px;
}

body.tool-mode .result-section .sidebar-run-button {
  margin-top: 6px;
}

@media (max-width: 1320px) {
  body.tool-mode .actions .primary-button {
    display: inline-flex !important;
  }

  body.tool-mode .sidebar-run-button {
    position: static;
  }
}

@media (max-width: 900px) {
  body.tool-mode .segmented-control,
  body.tool-mode .support-formats {
    grid-template-columns: 1fr;
  }

  body.tool-mode .actions .primary-button {
    display: inline-flex !important;
  }
}

@keyframes toolParticleFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(0.92);
    opacity: 0.55;
  }
  50% {
    transform: translate3d(0, -10px, 0) scale(1.08);
    opacity: 1;
  }
}

/* Free tools final scoped fixes. */
body.toolbox-mode .toolbox-heading > div:first-child {
  padding-top: 8px !important;
}

body.toolbox-mode .toolbox-heading > div:first-child::before {
  font-size: 15px !important;
}

body.toolbox-mode .toolbox-heading h2 {
  font-size: 42px !important;
  line-height: 1.12 !important;
}

body.toolbox-mode .toolbox-heading p {
  font-size: 18px !important;
  line-height: 1.6 !important;
}

body.tool-mode .tool-intro {
  grid-template-columns: minmax(0, 1.25fr) minmax(150px, 0.48fr) !important;
  align-items: center;
}

body.tool-mode .tool-intro .title-row > div {
  align-self: center !important;
  padding-top: 0 !important;
}

body.tool-mode .tool-intro h1 {
  font-size: 40px !important;
  line-height: 1.08 !important;
}

body.tool-mode .tool-intro .eyebrow {
  font-size: 14px !important;
}

body.tool-mode .tool-intro .lead {
  font-size: 18px !important;
}

body.tool-mode .tool-intro .icon-bubble {
  align-self: center !important;
  justify-self: center !important;
  margin-top: 18px !important;
  transform: perspective(720px) rotateX(9deg) rotateY(-12deg) translateY(6px) !important;
  animation: toolIconDrift 4.6s ease-in-out infinite;
}

body.tool-mode .tool-intro .icon-bubble::before {
  animation: toolIconHalo 3.2s ease-in-out infinite !important;
}

body.tool-mode .tool-intro .icon-bubble svg {
  animation: toolIconPulse 3.2s ease-in-out infinite;
}

body.tool-mode .result-section {
  align-content: start;
  grid-template-rows: auto auto auto;
  gap: 16px !important;
  overflow: auto !important;
  padding-bottom: 0 !important;
}

body.tool-mode .site-footer {
  grid-column: 1 / 2 !important;
  align-self: start;
  width: 100% !important;
  max-width: none !important;
  z-index: 0;
}

body.tool-mode .sidebar-run-button {
  position: sticky;
  bottom: 0;
  margin-top: 16px !important;
}

@media (min-width: 1321px) {
  body.tool-mode .result-section {
    overflow: hidden !important;
  }
}

@media (max-width: 1320px) {
  body.tool-mode .tool-intro {
    grid-template-columns: 1fr !important;
  }

  body.tool-mode .tool-intro .icon-bubble {
    justify-self: start !important;
    margin-top: 0 !important;
  }
}

@media (max-width: 900px) {
  body.toolbox-mode .toolbox-heading h2,
  body.tool-mode .tool-intro h1 {
    font-size: 34px !important;
  }
}

@keyframes toolIconDrift {
  0%, 100% {
    transform: perspective(720px) rotateX(9deg) rotateY(-12deg) translateY(6px);
  }
  50% {
    transform: perspective(720px) rotateX(7deg) rotateY(-9deg) translateY(-1px);
  }
}

@keyframes toolIconHalo {
  0%, 100% {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42), 0 0 24px rgba(142, 227, 255, 0.16);
  }
}

@keyframes toolIconPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.07);
  }
}

/* Match free-tool headers to the homepage header sizing. */
body.toolbox-mode,
body.tool-mode {
  --header-height: 68px;
}

body.toolbox-mode .site-header,
body.tool-mode .site-header {
  grid-template-columns: 320px minmax(0, 1fr) 240px !important;
  min-height: 68px !important;
  padding-inline: 64px !important;
}

body.toolbox-mode .brand,
body.tool-mode .brand {
  gap: 12px !important;
  min-height: 42px !important;
}

body.toolbox-mode .brand-symbol,
body.tool-mode .brand-symbol {
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
}

body.toolbox-mode .brand-symbol img,
body.tool-mode .brand-symbol img {
  width: 40px !important;
  height: 40px !important;
}

body.toolbox-mode .brand strong,
body.tool-mode .brand strong {
  font-size: 20px !important;
  line-height: 1.05 !important;
}

body.toolbox-mode .brand small,
body.tool-mode .brand small {
  font-size: 12px !important;
  line-height: 15px !important;
}

body.toolbox-mode .top-nav,
body.tool-mode .top-nav {
  gap: 34px !important;
}

body.toolbox-mode .nav-trigger,
body.tool-mode .nav-trigger {
  min-height: 68px !important;
  font-size: 15px !important;
  gap: 8px !important;
}

body.toolbox-mode .nav-trigger svg,
body.tool-mode .nav-trigger svg {
  width: 16px !important;
  height: 16px !important;
}

body.toolbox-mode .theme-toggle,
body.tool-mode .theme-toggle {
  min-height: 40px !important;
  font-size: 13px !important;
}

@media (max-width: 1180px) {
  body.toolbox-mode .site-header,
  body.tool-mode .site-header {
    padding-inline: 18px !important;
  }
}

/* Final single-tool workspace sizing: keep the tool function pages aligned with
   the main site header while preserving responsive workbench columns. */
body.tool-mode {
  --header-height: 76px;
  --tool-shell-inset: clamp(18px, 1.5vw, 30px);
  --tool-sidebar-width: clamp(220px, 11.5vw, 250px);
  --tool-sidebar-gap: clamp(16px, 1.2vw, 24px);
}

body.tool-mode .site-header {
  grid-template-columns: minmax(360px, 0.42fr) minmax(520px, 1fr) minmax(220px, 0.34fr) !important;
  min-height: var(--header-height) !important;
  padding-inline: clamp(24px, 2.6vw, 56px) !important;
}

body.tool-mode .brand {
  gap: 14px !important;
  min-height: 48px !important;
}

body.tool-mode .brand-symbol,
body.tool-mode .brand-symbol img {
  width: 42px !important;
  height: 42px !important;
}

body.toolbox-mode .brand-symbol,
body.tool-mode .brand-symbol {
  background: transparent !important;
  box-shadow: none !important;
}

body.toolbox-mode .brand-symbol::after,
body.tool-mode .brand-symbol::after {
  content: none !important;
}

body.toolbox-mode .brand-symbol img,
body.tool-mode .brand-symbol img {
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(103, 203, 255, 0.18));
}

body.tool-mode .brand strong {
  max-width: none !important;
  font-size: 19px !important;
}

body.tool-mode .brand small {
  font-size: 13px !important;
  line-height: 16px !important;
}

body.tool-mode .top-nav {
  gap: clamp(22px, 1.8vw, 40px) !important;
}

body.tool-mode .nav-trigger {
  min-height: var(--header-height) !important;
  font-size: 16px !important;
  gap: 9px !important;
}

body.tool-mode .nav-trigger svg {
  width: 17px !important;
  height: 17px !important;
}

body.tool-mode .theme-toggle {
  min-height: 44px !important;
  padding-inline: 14px !important;
  font-size: 14px !important;
}

body.tool-mode .setting-segmented .segmented-control {
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)) !important;
}

body.tool-mode .tool-sidebar {
  top: calc(var(--header-height) + 14px) !important;
  left: var(--tool-shell-inset) !important;
  width: var(--tool-sidebar-width) !important;
}

body.tool-mode .page {
  grid-template-columns: minmax(760px, 1fr) minmax(360px, clamp(390px, 23vw, 500px)) !important;
  gap: clamp(16px, 1.2vw, 28px) !important;
  margin-left: calc(var(--tool-sidebar-width) + var(--tool-shell-inset) + var(--tool-sidebar-gap)) !important;
  padding: clamp(18px, 1.4vw, 28px) clamp(18px, 1.7vw, 36px) 30px 0 !important;
  min-width: 0;
}

body.tool-mode .upload-card {
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.8fr) !important;
}

body.tool-mode .result-section {
  top: calc(var(--header-height) + 14px) !important;
  height: calc(100vh - var(--header-height) - 30px) !important;
}

@media (max-width: 1600px) {
  body.tool-mode .site-header {
    grid-template-columns: minmax(320px, 0.38fr) minmax(500px, 1fr) minmax(180px, 0.3fr) !important;
    padding-inline: clamp(20px, 2vw, 36px) !important;
  }

  body.tool-mode .top-nav {
    gap: clamp(18px, 1.6vw, 30px) !important;
  }

  body.tool-mode .page {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.34fr) !important;
  }
}

@media (max-width: 1320px) {
  body.tool-mode .site-header {
    grid-template-columns: minmax(300px, auto) minmax(0, 1fr) auto !important;
  }

  body.tool-mode .top-nav {
    justify-content: flex-start !important;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body.tool-mode .top-nav::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  body.tool-mode .page {
    grid-template-columns: 1fr !important;
    margin-left: calc(var(--tool-sidebar-width) + var(--tool-shell-inset) + var(--tool-sidebar-gap)) !important;
    padding-right: 18px !important;
  }

  body.tool-mode .upload-card {
    grid-template-columns: 1fr !important;
  }

  body.tool-mode .result-section {
    position: static !important;
    height: auto !important;
    overflow: visible !important;
  }
}

@media (max-width: 980px) {
  body.tool-mode {
    --header-height: 116px;
  }

  body.tool-mode .site-header {
    display: flex !important;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    min-height: var(--header-height) !important;
    padding-block: 8px !important;
    padding-inline: 16px !important;
  }

  body.tool-mode .brand-symbol,
  body.tool-mode .brand-symbol img {
    width: 40px !important;
    height: 40px !important;
  }

  body.tool-mode .brand strong {
    font-size: 18px !important;
  }

  body.tool-mode .brand small {
    font-size: 12px !important;
  }

  body.tool-mode .top-nav {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    gap: 18px !important;
    padding-bottom: 4px;
  }

  body.tool-mode .nav-trigger {
    min-height: 44px !important;
    font-size: 14px !important;
  }

  body.tool-mode .tool-sidebar {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: auto !important;
    margin: 14px 14px 0 !important;
  }

  body.tool-mode .page {
    margin-left: 0 !important;
    padding: 16px !important;
  }
}

@media (max-width: 620px) {
  body.tool-mode {
    --header-height: 108px;
  }

  body.tool-mode .site-header {
    gap: 7px 10px;
    align-content: start;
    padding-block: 10px 6px !important;
    padding-inline: 12px !important;
  }

  body.tool-mode .brand {
    flex: 1 1 auto;
    gap: 10px !important;
  }

  body.tool-mode .brand-symbol,
  body.tool-mode .brand-symbol img {
    width: 38px !important;
    height: 38px !important;
  }

  body.tool-mode .brand strong {
    max-width: 140px !important;
    font-size: 17px !important;
  }

  body.tool-mode .brand small {
    display: none;
  }

  body.tool-mode .header-actions {
    flex: 0 0 auto;
    min-width: 0 !important;
  }

  body.tool-mode .theme-toggle {
    min-height: 34px !important;
    padding-inline: 9px !important;
    font-size: 12px !important;
  }

  body.tool-mode .theme-toggle svg {
    width: 14px !important;
    height: 14px !important;
  }

  body.tool-mode .top-nav {
    flex-wrap: nowrap;
    gap: 14px !important;
    overflow-x: auto;
    padding-left: 0;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  body.tool-mode .top-nav::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  body.tool-mode .nav-trigger {
    flex: 0 0 auto;
    min-height: 38px !important;
    font-size: 13px !important;
  }

  body.tool-mode .nav-trigger svg {
    width: 14px !important;
    height: 14px !important;
  }

  body.tool-mode .tool-intro h1 {
    font-size: 30px !important;
  }

  body.tool-mode,
  body.tool-mode .page,
  body.tool-mode .hero-tool,
  body.tool-mode .tool-intro,
  body.tool-mode .upload-card,
  body.tool-mode .tool-input-panel,
  body.tool-mode .tool-settings-panel,
  body.tool-mode .estimate-card,
  body.tool-mode .result-section {
    max-width: 100vw !important;
    overflow-x: clip;
  }

  body.tool-mode .tool-intro {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.tool-mode .tool-intro .lead,
  body.tool-mode .tool-intro h1,
  body.tool-mode .drop-inner strong,
  body.tool-mode .drop-inner span,
  body.tool-mode .setting label,
  body.tool-mode .setting > span {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  body.tool-mode .tool-intro .icon-bubble {
    justify-self: start !important;
  }

  body.tool-mode .badges,
  body.tool-mode .support-formats {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.tool-mode .badges span,
  body.tool-mode .format-chip {
    justify-content: center;
    min-width: 0;
    white-space: normal;
  }

  body.tool-mode .setting-segmented .segmented-control {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.tool-mode .segmented-option {
    min-width: 0 !important;
    padding-inline: 8px !important;
  }
}

/* Unified root-page top fold for the static free-tools workbench. */
body.toolbox-mode .landing-home {
  width: calc(100vw - 20px) !important;
  max-width: none !important;
  padding: 14px 0 24px !important;
}

body.toolbox-mode .toolbox-section,
body.toolbox-mode .landing-home > .toolbox-section {
  display: grid !important;
  gap: 16px !important;
  padding: clamp(20px, 2vw, 32px) !important;
  border-radius: 16px !important;
}

body.toolbox-mode .page,
body.toolbox-mode .landing-home,
body.toolbox-mode .toolbox-section,
body.toolbox-mode .landing-home > .toolbox-section {
  margin-left: auto !important;
  margin-right: auto !important;
}

body.toolbox-mode .home-picker,
body.toolbox-mode .ai-console,
body.toolbox-mode .home-picker-shell {
  width: 100% !important;
  max-width: none !important;
}

body.toolbox-mode .toolbox-heading {
  grid-template-columns: minmax(520px, 0.9fr) minmax(520px, 1.1fr) !important;
  align-items: center !important;
  gap: clamp(24px, 3vw, 56px) !important;
  min-height: 210px !important;
}

body.toolbox-mode .toolbox-heading > div:first-child {
  min-height: 0 !important;
  padding-top: 0 !important;
}

body.toolbox-mode .toolbox-heading h2 {
  max-width: 12em !important;
  margin: 0 !important;
  font-size: clamp(3rem, 3vw, 3.75rem) !important;
  line-height: 1.06 !important;
  letter-spacing: -0.03em !important;
}

body.toolbox-mode .toolbox-heading p {
  max-width: 42rem !important;
  margin-top: 14px !important;
  font-size: 1.04rem !important;
  line-height: 1.72 !important;
}

body.toolbox-mode .engine-panel-card {
  min-height: 210px !important;
  align-content: center !important;
  padding: clamp(18px, 1.8vw, 24px) !important;
}

body.toolbox-mode .engine-panel-head span {
  font-size: 22px !important;
}

body.toolbox-mode .engine-panel-card p {
  font-size: 1.04rem !important;
  line-height: 1.72 !important;
}

body.toolbox-mode .workflow-row {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

body.toolbox-mode .workflow-row button {
  min-height: 152px !important;
  padding: 16px 18px !important;
}

body.toolbox-mode .workflow-row button svg {
  width: 42px !important;
  height: 42px !important;
}

@media (max-width: 1180px) {
  body.toolbox-mode .toolbox-heading,
  body.toolbox-mode .workflow-row {
    grid-template-columns: 1fr !important;
  }
}

/* Align the static tools header and canvas with the Next.js root pages. */
body.toolbox-mode .site-header {
  min-height: 76px !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  padding-inline: max(24px, calc((100vw - min(1920px, calc(100vw - 64px))) / 2)) !important;
  background: rgba(5, 10, 20, 0.94) !important;
  border-bottom-color: rgba(130, 206, 255, 0.17) !important;
}

body.toolbox-mode .brand {
  gap: 14px !important;
}

body.toolbox-mode .brand-symbol,
body.toolbox-mode .image-symbol img {
  width: 42px !important;
  height: 42px !important;
}

body.toolbox-mode .brand strong {
  font-size: 19px !important;
  line-height: 1 !important;
}

body.toolbox-mode .brand small {
  font-size: 13px !important;
}

body.toolbox-mode .top-nav {
  gap: clamp(18px, 2.5vw, 42px) !important;
}

body.toolbox-mode .nav-trigger {
  position: relative !important;
  min-height: 76px !important;
  padding-inline: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-size: 16px !important;
  font-weight: 800 !important;
}

body.toolbox-mode .nav-trigger svg {
  display: none !important;
}

body.toolbox-mode .nav-trigger::after {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 14px !important;
  height: 2px !important;
  border-radius: 999px !important;
  background: #69d2ff !important;
  transform: scaleX(0) !important;
  transform-origin: center !important;
  transition: transform 180ms ease !important;
}

body.toolbox-mode .nav-trigger:hover,
body.toolbox-mode .nav-trigger.active {
  background: transparent !important;
  color: #fff !important;
}

body.toolbox-mode .nav-trigger:hover::after,
body.toolbox-mode .nav-trigger.active::after {
  transform: scaleX(1) !important;
}

body.toolbox-mode .header-actions {
  min-width: 160px !important;
}

body.toolbox-mode .theme-toggle {
  min-height: 38px !important;
  border-radius: 8px !important;
  background: rgba(7, 24, 48, 0.72) !important;
}

body.toolbox-mode .landing-home {
  width: min(1920px, calc(100vw - 64px)) !important;
  padding-top: 14px !important;
}

body.toolbox-mode .toolbox-section,
body.toolbox-mode .landing-home > .toolbox-section {
  padding: clamp(22px, 2vw, 34px) !important;
}

body.toolbox-mode .home-picker {
  width: 100% !important;
}

/* Request follow-up: widen the static tool canvas and align the logo with the rest of the site. */
@media (min-width: 1280px) {
  body.toolbox-mode .site-header {
    padding-inline: clamp(20px, 1.6vw, 32px) !important;
  }

  body.toolbox-mode .landing-home {
    width: calc(100vw - 32px) !important;
    max-width: none !important;
  }

  body.toolbox-mode .toolbox-section,
  body.toolbox-mode .landing-home > .toolbox-section {
    padding-inline: clamp(24px, 2vw, 40px) !important;
  }
}

/* Request follow-up: keep static-page navigation matched to the Next.js header. */
body.home-mode.site-page .nav-trigger,
body.toolbox-mode .nav-trigger,
body.tool-mode .nav-trigger {
  font-size: 16px !important;
  font-weight: 850 !important;
}

/* Request follow-up: keep the static header logo visually aligned with the larger nav. */
body.toolbox-mode .brand,
body.tool-mode .brand {
  gap: 12px !important;
}

body.toolbox-mode .brand-symbol,
body.toolbox-mode .brand-symbol img,
body.tool-mode .brand-symbol,
body.tool-mode .brand-symbol img {
  width: 40px !important;
  height: 40px !important;
}

body.toolbox-mode .brand strong,
body.tool-mode .brand strong {
  font-size: 18px !important;
}

body.toolbox-mode .brand small,
body.tool-mode .brand small {
  font-size: 12px !important;
}

/* Centered stage rebuild: keep the tool runtime inside the same desktop canvas. */
:root {
  --tool-stage-max: 1168px;
  --tool-stage-gutter: clamp(48px, 16vw, 440px);
  --tool-stage-width: min(var(--tool-stage-max), calc(100vw - var(--tool-stage-gutter)));
  --tool-stage-pad: clamp(18px, 2.1vw, 34px);
}

body.toolbox-mode .site-header,
body.tool-mode .site-header {
  width: var(--tool-stage-width) !important;
  max-width: var(--tool-stage-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-inline: var(--tool-stage-pad) !important;
  border-right: 1px solid rgba(130, 206, 255, 0.12) !important;
  border-left: 1px solid rgba(130, 206, 255, 0.12) !important;
}

body.toolbox-mode .landing-home {
  width: var(--tool-stage-width) !important;
  max-width: var(--tool-stage-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body.toolbox-mode .toolbox-section,
body.toolbox-mode .landing-home > .toolbox-section {
  padding-inline: clamp(22px, 2.8vw, 38px) !important;
}

body.toolbox-mode .toolbox-heading {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr) !important;
}

body.toolbox-mode .workflow-row {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body.tool-mode .page {
  width: var(--tool-stage-width) !important;
  max-width: var(--tool-stage-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body.tool-mode .tool-sidebar {
  left: calc((100vw - var(--tool-stage-width)) / 2) !important;
}

body.tool-mode .hero-tool,
body.tool-mode .result-section {
  margin-left: var(--tool-sidebar-width, 280px) !important;
}

body.tool-mode .hero-tool {
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr) !important;
  min-height: calc(100vh - 76px) !important;
  padding-inline: clamp(24px, 3vw, 44px) !important;
}

@media (min-width: 901px) and (max-width: 1280px) {
  :root {
    --tool-stage-gutter: 48px;
  }

  body.toolbox-mode .top-nav,
  body.tool-mode .top-nav {
    gap: 16px !important;
  }

  body.toolbox-mode .nav-trigger,
  body.tool-mode .nav-trigger {
    font-size: 13px !important;
  }

  body.toolbox-mode .toolbox-heading,
  body.toolbox-mode .workflow-row,
  body.tool-mode .hero-tool {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 900px) {
  :root {
    --tool-stage-width: 100%;
    --tool-stage-gutter: 0px;
    --tool-stage-pad: 14px;
  }

  body.toolbox-mode .site-header,
  body.tool-mode .site-header,
  body.toolbox-mode .landing-home,
  body.tool-mode .page {
    width: 100% !important;
    max-width: none !important;
    border-right: 0 !important;
    border-left: 0 !important;
  }

  body.tool-mode .hero-tool,
  body.tool-mode .result-section {
    margin-left: 0 !important;
  }
}

@media (min-width: 901px) {
  body.tool-mode .tool-sidebar {
    left: calc((100% - var(--tool-stage-width)) / 2) !important;
  }

  body.tool-mode .page {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.4fr) !important;
    gap: clamp(18px, 1.6vw, 26px) !important;
    width: var(--tool-stage-width) !important;
    max-width: var(--tool-stage-max) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 22px 0 30px calc(var(--tool-sidebar-width, 236px) + var(--tool-sidebar-gap, 22px)) !important;
  }

  body.tool-mode .hero-tool,
  body.tool-mode .result-section {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin-left: 0 !important;
  }

  body.tool-mode .hero-tool {
    grid-template-columns: 1fr !important;
    padding-inline: 0 !important;
  }

  body.tool-mode .upload-card {
    width: 100% !important;
    grid-template-columns: 1fr !important;
  }
}

/* Desktop stage refinements: prevent the narrowed tool workbench from crowding controls. */
@media (min-width: 901px) {
  body.toolbox-mode .site-header,
  body.tool-mode .site-header {
    display: grid !important;
    grid-template-columns: minmax(248px, auto) minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: clamp(14px, 1.4vw, 22px) !important;
  }

  body.toolbox-mode .top-nav,
  body.tool-mode .top-nav {
    display: flex !important;
    justify-content: center !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    gap: clamp(16px, 1.7vw, 28px) !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  body.toolbox-mode .nav-trigger,
  body.tool-mode .nav-trigger {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: max-content !important;
    min-height: 58px !important;
    padding-inline: 0 !important;
    white-space: nowrap !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    line-height: 1 !important;
    font-size: 14px !important;
  }

  body.toolbox-mode .nav-trigger svg,
  body.tool-mode .nav-trigger svg {
    flex: 0 0 auto !important;
    width: 14px !important;
    height: 14px !important;
  }

  body.tool-mode .header-actions {
    min-width: 0 !important;
  }

  body.tool-mode .theme-toggle {
    min-height: 38px !important;
    padding-inline: 12px !important;
    white-space: nowrap !important;
  }

  body.tool-mode .tool-sidebar {
    left: calc((100vw - var(--tool-stage-width)) / 2) !important;
    width: 214px !important;
  }

  body.tool-mode .page {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr) !important;
    gap: 18px !important;
    width: var(--tool-stage-width) !important;
    max-width: var(--tool-stage-max) !important;
    margin-inline: auto !important;
    padding: 18px 0 28px 232px !important;
    overflow: visible !important;
  }

  body.tool-mode .hero-tool,
  body.tool-mode .result-section {
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
    margin-left: 0 !important;
  }

  body.tool-mode .hero-tool {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    min-height: 0 !important;
    padding: 0 !important;
  }

  body.tool-mode .tool-intro {
    min-width: 0 !important;
  }

  body.tool-mode .tool-intro h1 {
    font-size: clamp(2.15rem, 3.1vw, 3rem) !important;
  }

  body.tool-mode .upload-card {
    display: grid !important;
    grid-template-columns: minmax(122px, 0.46fr) minmax(0, 1fr) !important;
    gap: 14px !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  body.tool-mode .tool-input-panel,
  body.tool-mode .tool-settings-panel,
  body.tool-mode .estimate-card {
    min-width: 0 !important;
  }

  body.tool-mode .tool-input-panel {
    padding: 14px 12px !important;
  }

  body.tool-mode .tool-settings-panel {
    padding: 16px !important;
  }

  body.tool-mode .estimate-card,
  body.tool-mode .local-engine-panel,
  body.tool-mode .actions {
    grid-column: 1 / -1 !important;
  }

  body.tool-mode .settings {
    min-width: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
    overflow: visible !important;
  }

  body.tool-mode .setting-segmented .segmented-control {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)) !important;
    gap: 8px !important;
    min-width: 0 !important;
  }

  body.tool-mode .segmented-option {
    min-width: 0 !important;
    padding-inline: 8px !important;
    white-space: nowrap !important;
  }

  body.tool-mode .result-section {
    position: sticky !important;
    top: calc(var(--tool-header-height, 72px) + 18px) !important;
    align-self: start !important;
    height: auto !important;
    max-height: calc(100vh - var(--tool-header-height, 72px) - 36px) !important;
    overflow: auto !important;
  }

  body.tool-mode .download-actions {
    grid-template-columns: 1fr !important;
  }

  body.tool-mode .steps-panel {
    padding: 14px !important;
  }
}

@media (min-width: 901px) and (max-width: 1280px) {
  body.toolbox-mode .site-header,
  body.tool-mode .site-header {
    grid-template-columns: minmax(210px, auto) minmax(0, 1fr) auto !important;
    gap: 12px !important;
  }

  body.toolbox-mode .top-nav,
  body.tool-mode .top-nav {
    gap: 12px !important;
  }

  body.toolbox-mode .nav-trigger,
  body.tool-mode .nav-trigger {
    font-size: 12px !important;
  }

  body.toolbox-mode .nav-trigger svg,
  body.tool-mode .nav-trigger svg {
    display: none !important;
  }

  body.tool-mode .page {
    grid-template-columns: minmax(0, 1fr) !important;
    padding-left: 232px !important;
  }

  body.tool-mode .result-section {
    position: static !important;
    max-height: none !important;
  }
}

/* Final centered workbench: match the reference site's non-fullscreen stage. */
:root {
  --tool-stage-max: 1216px;
  --tool-stage-gutter: clamp(32px, 18vw, 520px);
  --tool-stage-width: min(var(--tool-stage-max), calc(100vw - var(--tool-stage-gutter)));
  --tool-stage-pad: clamp(16px, 2vw, 32px);
  --tool-sidebar-width: clamp(204px, 17vw, 236px);
  --tool-sidebar-gap: clamp(14px, 1.5vw, 22px);
}

body.toolbox-mode .site-header,
body.tool-mode .site-header,
body.toolbox-mode .landing-home,
body.tool-mode .page {
  width: var(--tool-stage-width) !important;
  max-width: var(--tool-stage-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body.toolbox-mode .site-header,
body.tool-mode .site-header {
  padding-inline: var(--tool-stage-pad) !important;
  border-right: 1px solid rgba(130, 206, 255, 0.12) !important;
  border-left: 1px solid rgba(130, 206, 255, 0.12) !important;
}

body.toolbox-mode .landing-home {
  padding-top: 18px !important;
  padding-bottom: 34px !important;
}

body.toolbox-mode .landing-home > .toolbox-section {
  min-height: calc(100vh - var(--header-height, 58px) - 52px) !important;
  border-radius: 8px !important;
}

body.tool-mode .tool-sidebar {
  left: calc((100vw - var(--tool-stage-width)) / 2) !important;
  width: var(--tool-sidebar-width) !important;
}

body.tool-mode .page {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr) !important;
  gap: clamp(16px, 1.5vw, 22px) !important;
  padding: 18px 0 30px calc(var(--tool-sidebar-width) + var(--tool-sidebar-gap)) !important;
}

body.tool-mode .hero-tool,
body.tool-mode .result-section {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  margin-left: 0 !important;
}

body.tool-mode .hero-tool {
  min-height: 0 !important;
  padding: 0 !important;
}

body.tool-mode .upload-card {
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: 1fr !important;
  gap: 16px !important;
}

body.tool-mode .upload-card.has-media-preview > :not(.media-upload-preview):not(input) {
  display: grid !important;
}

body.tool-mode .tool-input-panel,
body.tool-mode .tool-settings-panel,
body.tool-mode .estimate-card,
body.tool-mode .local-engine-panel,
body.tool-mode .actions {
  grid-column: 1 / -1 !important;
}

.dropzone {
  cursor: pointer;
}

.dropzone:focus-within {
  outline: 2px solid rgba(133, 220, 255, 0.72);
  outline-offset: 3px;
}

.dropzone input[type="file"] {
  cursor: pointer;
  z-index: 3;
}

@media (max-width: 900px) {
  :root {
    --tool-stage-width: 100%;
    --tool-stage-gutter: 0px;
    --tool-stage-pad: 14px;
  }

  body.toolbox-mode .site-header,
  body.tool-mode .site-header,
  body.toolbox-mode .landing-home,
  body.tool-mode .page {
    width: 100% !important;
    max-width: none !important;
    border-right: 0 !important;
    border-left: 0 !important;
  }

  body.tool-mode .page {
    padding: 14px !important;
  }
}

/* Follow-up UI fixes: keep upload affordance visible and compact the active tool workspace. */
body.tool-mode .dropzone.has-media-preview {
  align-content: start !important;
  gap: 12px !important;
  min-height: 0 !important;
  padding: 14px !important;
}

body.tool-mode .dropzone.has-media-preview .drop-inner {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  width: 100%;
  padding: 0;
  text-align: left;
}

body.tool-mode .dropzone.has-media-preview .upload-orb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

body.tool-mode .dropzone.has-media-preview .upload-orb svg {
  width: 22px;
  height: 22px;
}

body.tool-mode .dropzone.has-media-preview .drop-inner strong {
  font-size: 15px;
  line-height: 1.2;
}

body.tool-mode .dropzone.has-media-preview .drop-inner span:last-child {
  grid-column: 2;
  font-size: 12px;
  line-height: 1.35;
}

body.tool-mode .dropzone.has-media-preview .media-upload-preview {
  position: relative;
  z-index: 4;
}

body.tool-mode .media-upload-stage {
  aspect-ratio: 16 / 8.6;
  border-radius: 8px;
}

body.tool-mode .media-upload-meta {
  gap: 8px;
  color: rgba(188, 209, 228, 0.8);
  font-size: 12px;
}

body.tool-mode .media-upload-name {
  color: #f4f9ff;
}

body.tool-mode .media-upload-replace {
  min-height: 28px;
  border-color: rgba(133, 220, 255, 0.28);
  background: rgba(7, 24, 48, 0.88);
  color: #bdeeff;
  font-size: 12px;
}

body.tool-mode .tool-input-panel,
body.tool-mode .tool-settings-panel,
body.tool-mode .estimate-card,
body.tool-mode .local-engine-panel .engine-panel-card,
body.tool-mode .result-panel,
body.tool-mode .steps-panel {
  padding: 16px !important;
}

body.tool-mode .tool-panel-heading h2 {
  font-size: 17px !important;
}

body.tool-mode .tool-panel-heading svg {
  width: 18px;
  height: 18px;
}

body.tool-mode .settings {
  gap: 10px !important;
}

body.tool-mode .setting input,
body.tool-mode .setting select,
body.tool-mode .setting textarea {
  min-height: 40px;
  font-size: 13px;
}

body.tool-mode .setting label,
body.tool-mode .setting > span,
body.tool-mode .setting small {
  font-size: 12px;
}

body.tool-mode .actions {
  grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(76px, auto)) !important;
  gap: 8px !important;
}

body.tool-mode .actions .primary-button,
body.tool-mode .actions .ghost-button {
  min-height: 44px;
  font-size: 13px;
}

body.tool-mode .status-card {
  gap: 10px;
  padding: 0 0 12px;
}

body.tool-mode .status-card h2 {
  font-size: 18px;
  line-height: 1.2;
}

body.tool-mode #engineStatus {
  max-width: 11em;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
}

body.tool-mode .progress-area {
  min-height: 0;
  gap: 10px;
}

body.tool-mode #logOutput {
  min-height: 92px !important;
  max-height: 190px;
  padding: 12px;
  font-size: 12px;
  line-height: 1.45;
}

body.tool-mode .download-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

body.tool-mode .download-card strong,
body.tool-mode .download-card span {
  max-width: 100%;
  font-size: 13px;
}

body.tool-mode .download-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

body.tool-mode .download-actions .primary-button,
body.tool-mode .download-actions .ghost-button {
  min-height: 40px;
  font-size: 13px;
}

body.tool-mode .steps-panel {
  display: grid;
  gap: 10px;
}

body.tool-mode .steps-panel h2 {
  margin: 0;
  font-size: 18px !important;
}

body.tool-mode .steps {
  gap: 8px;
}

body.tool-mode .steps div {
  grid-template-columns: 40px minmax(0, 1fr);
  justify-items: start;
  gap: 8px 10px;
  text-align: left;
}

body.tool-mode .steps strong {
  grid-row: span 2;
  width: 40px;
  height: 40px;
  font-size: 18px;
}

body.tool-mode .steps h3 {
  font-size: 14px;
}

body.tool-mode .steps p {
  font-size: 12px;
  line-height: 1.45;
}

body.toolbox-mode .site-footer,
body.tool-mode .site-footer {
  display: flex !important;
  width: var(--tool-stage-width) !important;
  max-width: var(--tool-stage-max) !important;
  margin: 0 auto 18px !important;
  padding: 22px var(--tool-stage-pad) 24px !important;
  border: 1px solid rgba(130, 206, 255, 0.12) !important;
  border-radius: 8px !important;
  background: rgba(8, 15, 27, 0.92) !important;
}

body.tool-mode .site-footer {
  display: none !important;
}

@media (min-width: 901px) {
  body.tool-mode .result-section {
    scrollbar-width: thin;
  }
}

@media (max-width: 900px) {
  body.toolbox-mode .site-footer {
    width: calc(100% - 20px) !important;
    padding-bottom: 84px !important;
  }

  body.tool-mode .actions {
    grid-template-columns: 1fr !important;
  }
}

/* Final order guard: upload must remain the first visible work area on every tool. */
body.tool-mode .upload-card {
  grid-template-columns: 1fr !important;
  grid-template-areas:
    "input"
    "engine"
    "settings"
    "estimate"
    "actions" !important;
}

body.tool-mode .tool-input-panel {
  grid-area: input !important;
}

body.tool-mode .local-engine-panel {
  grid-area: engine !important;
}

body.tool-mode .tool-settings-panel {
  grid-area: settings !important;
}

body.tool-mode .estimate-card {
  grid-area: estimate !important;
}

body.tool-mode .actions {
  grid-area: actions !important;
}

@media (max-width: 900px) {
  body.tool-mode {
    --tool-stage-width: 100%;
  }

  body.tool-mode .page {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 12px 14px 88px !important;
    overflow: visible !important;
  }

  body.tool-mode .hero-tool,
  body.tool-mode .result-section {
    width: 100% !important;
    margin: 0 !important;
  }

  body.tool-mode .hero-tool {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  body.tool-mode .tool-intro,
  body.tool-mode .upload-card {
    padding-inline: 0 !important;
    width: 100% !important;
    max-width: none !important;
  }

  body.tool-mode .dropzone {
    width: 100% !important;
    min-height: 188px !important;
  }

  body.tool-mode .upload-card {
    grid-template-columns: 1fr !important;
  }

  body.tool-mode .tool-input-panel,
  body.tool-mode .tool-settings-panel,
  body.tool-mode .estimate-card,
  body.tool-mode .local-engine-panel,
  body.tool-mode .actions {
    grid-column: 1 / -1 !important;
  }

  body.tool-mode .result-section {
    position: static !important;
    display: grid !important;
    gap: 14px !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 14px 0 0 !important;
  }

  body.tool-mode .sidebar-run-button {
    position: sticky !important;
    bottom: 12px !important;
    width: 100% !important;
    margin-top: 4px !important;
  }
}


/* Next.js workspace integration */

  body.tool-runtime-page {
    --tool-stage-width: var(--xc-stage);
    --tool-sidebar-width: 236px;
    --tool-sidebar-gap: 22px;
    --tool-stage-pad: 0px;
  }

  body.tool-runtime-page {
    padding-top: var(--xc-nav-height);
    background:
      radial-gradient(circle at 68% 4%, rgba(31, 117, 255, 0.12), transparent 34rem),
      linear-gradient(180deg, #030a18 0%, #020817 42%, #010611 100%);
  }

  body.tool-runtime-page .site-header {
    position: absolute !important;
    inset: 0 auto auto 0 !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  body.tool-runtime-page .page,
  body.toolbox-mode .landing-home,
  body.tool-mode .page {
    width: var(--tool-stage-width) !important;
    max-width: var(--tool-stage-width) !important;
    margin-inline: auto !important;
  }

  body.toolbox-mode .landing-home,
  body.tool-mode .page {
    padding-top: 22px;
  }

  body.tool-runtime-page .toolbox-section,
  body.tool-runtime-page .hero-tool,
  body.tool-runtime-page .result-section {
    border-color: rgba(78, 176, 255, 0.22);
    background: linear-gradient(180deg, rgba(6, 21, 42, 0.88), rgba(3, 13, 29, 0.82));
  }

  body.tool-runtime-page .toolbox-heading h2,
  body.tool-runtime-page .hero-tool h1,
  body.tool-runtime-page .result-section h2 {
    letter-spacing: 0;
  }

  body.tool-runtime-page .toolbox-heading h2,
  body.tool-runtime-page .hero-tool h1 {
    font-size: var(--xc-page-title-size) !important;
    line-height: 1.08 !important;
  }

  body.tool-runtime-page .xc-footer-frame {
    display: none !important;
  }

  body.toolbox-mode .landing-home {
    padding: 22px 0 48px !important;
  }

  body.toolbox-mode .landing-home > .toolbox-section {
    min-height: auto !important;
  }

  body.toolbox-mode .workflow-row {
    grid-template-columns: repeat(3, minmax(240px, 1fr)) !important;
  }

  body.toolbox-mode .workflow-row button {
    min-width: 0 !important;
  }

  body.toolbox-mode .workflow-row button small {
    max-width: 24ch !important;
    white-space: normal !important;
  }

  body.tool-mode .tool-sidebar {
    left: calc((100vw - var(--tool-stage-width)) / 2) !important;
    width: var(--tool-sidebar-width) !important;
  }

  body.tool-mode .page {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr) !important;
    gap: 22px !important;
    padding: 18px 0 48px calc(var(--tool-sidebar-width) + var(--tool-sidebar-gap)) !important;
  }

  body.tool-mode .hero-tool,
  body.tool-mode .result-section {
    width: auto !important;
    max-width: none !important;
    margin-left: 0 !important;
  }

  body.tool-mode .hero-tool {
    padding: 0 !important;
  }

  body.tool-mode .upload-card {
    grid-template-columns: 1fr !important;
  }

  @media (max-width: 820px) {
    body.tool-runtime-page {
      --tool-stage-width: var(--xc-stage);
      --tool-sidebar-width: 0px;
      --tool-sidebar-gap: 0px;
    }

    body.tool-runtime-page .page,
    body.toolbox-mode .landing-home,
    body.tool-mode .page {
      width: var(--tool-stage-width) !important;
      max-width: var(--tool-stage-width) !important;
      padding-inline: 0 !important;
    }

    body.tool-mode .tool-sidebar {
      position: static !important;
      width: 100% !important;
    }

    body.tool-mode .page {
      display: block !important;
      padding: 14px 0 36px !important;
    }
  }

/* Narrow screens need a single, legible catalogue flow rather than a clipped desktop grid. */
@media (max-width: 820px) {
  body.tool-mode .privacy-note {
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
  }

  body.toolbox-mode .landing-home {
    padding: 12px 0 28px !important;
  }

  body.toolbox-mode .landing-home > .toolbox-section {
    gap: 16px !important;
    padding: 24px 22px !important;
  }

  body.toolbox-mode .toolbox-heading {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    min-height: 0 !important;
    gap: 0 !important;
  }

  body.toolbox-mode .toolbox-heading > div:first-child {
    min-height: 0 !important;
  }

  body.toolbox-mode .toolbox-heading h2 {
    max-width: 100% !important;
    overflow-wrap: anywhere;
    white-space: normal !important;
    font-size: clamp(2rem, 10vw, 2.75rem) !important;
    line-height: 1.12 !important;
    text-wrap: balance;
  }

  body.toolbox-mode .toolbox-heading p {
    margin-top: 12px !important;
    font-size: 1rem !important;
    line-height: 1.65 !important;
  }

  body.toolbox-mode .browser-stack {
    display: none !important;
  }

  body.toolbox-mode .workflow-row {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  body.toolbox-mode .workflow-row button {
    grid-template-columns: 44px minmax(0, 1fr) 20px !important;
    grid-template-rows: auto auto !important;
    min-height: 96px !important;
    padding: 16px !important;
  }

  body.toolbox-mode .workflow-row button svg {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    width: 44px !important;
    height: 44px !important;
  }

  body.toolbox-mode .workflow-row button span {
    grid-column: 2 !important;
    grid-row: 1 !important;
    font-size: 1.05rem !important;
    white-space: nowrap !important;
  }

  body.toolbox-mode .workflow-row button small {
    grid-column: 2 !important;
    grid-row: 2 !important;
    font-size: 0.88rem !important;
  }

  body.toolbox-mode .workflow-row button::after {
    grid-column: 3 !important;
    grid-row: 1 / span 2 !important;
  }
}

/* Selected media preview and file actions. Existing workspace tracks stay unchanged. */
body.tool-mode .media-upload-preview {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-rows: auto auto auto;
  width: 100%;
  height: auto;
  min-height: 0;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

body.tool-mode .dropzone.has-media-preview {
  align-content: stretch !important;
  place-items: stretch !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 10px !important;
}

body.tool-mode .dropzone.has-media-preview .drop-inner {
  display: none !important;
}

body.tool-mode .media-upload-stage {
  display: grid;
  place-items: center;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #020914;
}

body.tool-mode .media-upload-stage video,
body.tool-mode .media-upload-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

body.tool-mode .media-upload-stage audio {
  width: min(100%, 520px);
}

body.tool-mode .media-upload-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: rgba(188, 209, 228, 0.8);
  font-size: 12px;
}

body.tool-mode .media-upload-name {
  min-width: 0;
  overflow: hidden;
  color: #f4f9ff;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.tool-mode .media-upload-actions,
body.tool-mode .file-row-actions {
  display: flex;
  gap: 8px;
}

body.tool-mode .media-upload-replace,
body.tool-mode .media-upload-remove,
body.tool-mode .file-row-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(133, 220, 255, 0.28);
  border-radius: 8px;
  background: rgba(7, 24, 48, 0.88);
  color: #bdeeff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

body.tool-mode .media-upload-remove,
body.tool-mode .file-row-actions [data-file-remove] {
  border-color: rgba(255, 111, 126, 0.28);
  color: #ffabb5;
}

body.tool-mode .media-upload-detail {
  overflow: hidden;
  color: rgba(171, 197, 222, 0.76);
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.tool-mode .file-row-actions {
  grid-column: 1 / -1;
  justify-self: end;
}

/* Mobile-only containment for the tools catalogue. */
@media (max-width: 820px) {
  body.toolbox-mode .home-picker,
  body.toolbox-mode .ai-console,
  body.toolbox-mode .home-picker-shell,
  body.toolbox-mode .home-picker-top,
  body.toolbox-mode .home-tabs,
  body.toolbox-mode .home-search,
  body.toolbox-mode .home-tool-grid,
  body.toolbox-mode .home-tool {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body.toolbox-mode .home-picker-shell {
    width: 100% !important;
    overflow: hidden !important;
  }

  body.toolbox-mode .home-picker-top {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
  }

  body.toolbox-mode .home-tabs {
    width: 100% !important;
    overflow-x: auto !important;
  }

  body.toolbox-mode .home-search {
    width: 100% !important;
    border-left: 0 !important;
    border-top: 1px solid var(--line) !important;
  }

  body.toolbox-mode .home-tool-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    padding: 12px !important;
    overflow: visible !important;
  }

  body.toolbox-mode .home-tool {
    width: 100% !important;
  }
}

