:root {
  --background: #f7f9fc;
  --text: #18202a;
  --muted: #5f6b7a;
  --primary: #0ea5a4;
  --primary-dark: #087f7f;
  --accent: #ffb020;
  --danger: #e11d48;
  --panel: #ffffff;
  --line: #dbe4ee;
  --soft: #eef5f8;
  --shadow: 0 18px 48px rgba(24, 32, 42, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--background);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 0 28px;
  background: rgba(247, 249, 252, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #ffffff;
  background: var(--primary);
  border-radius: var(--radius);
}

.site-nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.93rem;
}

.site-nav a,
.site-footer a {
  text-decoration: none;
}

.site-nav a:hover,
.site-footer a:hover {
  color: var(--primary-dark);
}

.workspace-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(560px, 1.28fr);
  gap: 32px;
  align-items: center;
  max-width: 1180px;
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  padding: 42px 28px 34px;
}

.hero-copy {
  min-width: 0;
  max-width: 460px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: 4.5rem;
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-lede {
  margin: 22px 0 6px;
  font-size: 1.35rem;
  font-weight: 800;
}

.hero-proof {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.tool-shell {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.tool-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  background: #eef3f7;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  min-width: 0;
  min-height: 52px;
  padding: 12px 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.tab-button:last-child {
  border-right: 0;
}

.tab-button.is-active {
  color: var(--text);
  background: var(--panel);
  box-shadow: inset 0 -3px 0 var(--primary);
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.75fr);
  min-height: 420px;
}

.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  padding: 34px;
  text-align: center;
  background:
    linear-gradient(0deg, rgba(14, 165, 164, 0.06), rgba(14, 165, 164, 0.06)),
    var(--panel);
  border-right: 1px solid var(--line);
  outline: 0;
  transition:
    background 160ms ease,
    box-shadow 160ms ease;
}

.drop-zone.is-dragging,
.drop-zone:focus-visible {
  background:
    linear-gradient(0deg, rgba(255, 176, 32, 0.12), rgba(255, 176, 32, 0.12)),
    var(--panel);
  box-shadow: inset 0 0 0 3px rgba(14, 165, 164, 0.28);
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.drop-icon {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  margin-bottom: 18px;
  color: #ffffff;
  background: var(--primary);
  border-radius: 50%;
  font-size: 2.4rem;
  font-weight: 300;
}

.drop-zone h2 {
  width: 100%;
  max-width: 100%;
  margin: 0 0 8px;
  font-size: 2rem;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.drop-zone p {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
}

.secondary-button,
.primary-button,
.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.secondary-button {
  margin-top: 22px;
  color: var(--primary-dark);
  background: #ffffff;
  border: 1px solid rgba(14, 165, 164, 0.42);
}

.secondary-button:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(14, 165, 164, 0.14);
}

.file-meta {
  margin-top: 18px !important;
  color: var(--text) !important;
  font-weight: 800;
}

.selected-file-list {
  display: grid;
  gap: 7px;
  width: min(100%, 520px);
  max-height: 260px;
  margin-top: 14px;
  overflow: auto;
  padding: 10px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
}

.selected-file-list-heading {
  color: var(--primary-dark);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.selected-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 28px;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  padding: 7px 9px;
  background: #ffffff;
  border: 1px solid #e6edf4;
  border-radius: var(--radius);
}

.selected-file-row span {
  min-width: 0;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-file-row strong,
.selected-file-overflow {
  color: var(--muted);
  font-size: 0.8rem;
}

.selected-file-remove {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  line-height: 1;
}

.selected-file-remove:hover,
.selected-file-remove:focus-visible {
  color: #ffffff;
  background: var(--danger);
  border-color: var(--danger);
  outline: 0;
}

.selected-file-overflow {
  padding: 4px 2px 0;
}

.preview-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  margin: 0;
  padding: 16px;
  background: #f8fbfd;
  border-top: 1px solid var(--line);
}

.preview-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
}

.preview-label {
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.preview-card img {
  display: block;
  width: 100%;
  height: 180px;
  max-height: 180px;
  object-fit: contain;
  background:
    linear-gradient(45deg, #eef3f7 25%, transparent 25%),
    linear-gradient(-45deg, #eef3f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef3f7 75%),
    linear-gradient(-45deg, transparent 75%, #eef3f7 75%),
    #ffffff;
  background-position:
    0 0,
    0 8px,
    8px -8px,
    -8px 0;
  background-size: 16px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.preview-card p {
  min-height: 34px;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: left;
  overflow-wrap: anywhere;
}

.options-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  background: #fbfdff;
}

.field-group {
  display: grid;
  gap: 8px;
}

label {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 800;
}

select,
input[type="range"],
input[type="number"] {
  min-width: 0;
  width: 100%;
}

select,
input[type="number"] {
  min-height: 44px;
  padding: 0 12px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
}

input[type="range"] {
  accent-color: var(--primary);
}

.policy-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.primary-button {
  width: 100%;
  margin-top: auto;
  color: #ffffff;
  background: var(--primary);
  border: 1px solid var(--primary);
}

.primary-button:disabled {
  color: #7d8b99;
  background: #d7e0e8;
  border-color: #d7e0e8;
  cursor: not-allowed;
}

.primary-button:not(:disabled):hover {
  background: var(--primary-dark);
}

.progress-shell {
  overflow: hidden;
  height: 8px;
  background: #e7edf3;
  border-radius: 999px;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 180ms ease;
}

.progress-stats {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(78px, 0.7fr) minmax(96px, 0.8fr);
  gap: 8px;
}

.progress-stats div {
  min-width: 0;
  padding: 9px 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.progress-stats span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.progress-stats strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-line {
  min-height: 44px;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.status-line[data-tone="error"] {
  color: var(--danger);
  font-weight: 800;
}

.result-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.result-label,
.result-size {
  margin: 0;
}

.result-label {
  font-size: 0.78rem;
  font-weight: 900;
  color: var(--primary-dark);
  text-transform: uppercase;
}

.result-size {
  color: var(--muted);
  font-size: 0.92rem;
}

.download-link {
  width: 100%;
  min-height: 40px;
  color: #ffffff;
  background: var(--text);
  font-size: 0.9rem;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-link:hover {
  background: #27313d;
}

.download-link.is-disabled {
  color: #7d8b99;
  background: #e6edf4;
  cursor: not-allowed;
  pointer-events: none;
}

.result-list {
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow: auto;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.result-list-heading {
  display: grid;
  gap: 2px;
  padding: 2px 2px 4px;
}

.result-list-heading strong {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 900;
}

.result-list-heading span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.download-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfd;
}

.download-file-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.download-file-info strong {
  min-width: 0;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-file-info span {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  color: #ffffff;
  background: var(--primary);
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.download-file-button:hover {
  background: var(--primary-dark);
}

.queue-failed {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  color: var(--danger);
  font-size: 0.88rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  border: 1px solid rgba(225, 29, 72, 0.24);
  border-radius: var(--radius);
  background: rgba(225, 29, 72, 0.06);
}

.queue-failed strong {
  color: var(--danger);
}

.queue-failed span {
  color: #8f1230;
  font-size: 0.78rem;
}

.content-band,
.guide-band,
.faq-band,
.page-main {
  padding: 66px 28px;
}

.content-band {
  background: #ffffff;
  border-block: 1px solid var(--line);
}

.content-grid,
.guide-list,
.faq-list,
.page-content,
.tool-card-grid {
  max-width: 1040px;
  margin: 0 auto;
}

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

.content-grid h2,
.section-heading h2,
.page-content h1,
.page-content h2 {
  margin: 0 0 12px;
  letter-spacing: 0;
}

.content-grid p,
.page-content p,
.page-content li {
  color: var(--muted);
}

.section-heading {
  max-width: 1040px;
  margin: 0 auto 24px;
}

.section-heading h2 {
  font-size: 2.5rem;
}

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

.guide-item,
.tool-card {
  display: grid;
  gap: 10px;
  min-height: 148px;
  padding: 20px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
}

.guide-item:hover,
.tool-card:hover {
  border-color: rgba(14, 165, 164, 0.55);
  box-shadow: 0 12px 28px rgba(24, 32, 42, 0.08);
}

.guide-item span,
.tool-card span {
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.guide-item strong,
.tool-card strong {
  font-size: 1.12rem;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
}

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

.faq-band {
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.faq-list {
  display: grid;
  gap: 12px;
}

details {
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

summary {
  cursor: pointer;
  font-weight: 900;
}

details p {
  margin: 12px 0 0;
  color: var(--muted);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 28px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
  color: var(--text);
  font-weight: 900;
}

.page-main {
  min-height: calc(100vh - 128px);
}

.page-content {
  padding: 34px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.page-content h1 {
  font-size: 3.25rem;
}

.page-content h2 {
  margin-top: 32px;
}

.page-content a {
  color: var(--primary-dark);
  font-weight: 800;
}

.not-found-page {
  display: grid;
  gap: 18px;
}

.not-found-page h1 {
  margin-bottom: 0;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 8px;
}

.primary-link-button,
.secondary-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius);
  font-weight: 900;
  text-decoration: none;
}

.primary-link-button {
  color: #ffffff !important;
  background: var(--primary);
  border: 1px solid var(--primary);
}

.primary-link-button:hover {
  background: var(--primary-dark);
}

.secondary-link-button {
  color: var(--primary-dark) !important;
  background: #ffffff;
  border: 1px solid rgba(14, 165, 164, 0.42);
}

.secondary-link-button:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(14, 165, 164, 0.14);
}

.not-found-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.tool-page-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(560px, 1.28fr);
  gap: 32px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 28px 34px;
}

.tool-page-copy {
  max-width: 470px;
  padding-top: 10px;
}

.tool-page-copy h1 {
  font-size: 3.6rem;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 940px) {
  .workspace-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  h1 {
    font-size: 3.5rem;
  }

  .hero-copy {
    max-width: 760px;
  }

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

  .drop-zone {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .content-grid,
  .guide-list,
  .tool-card-grid,
  .not-found-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
  }

  .site-nav,
  .site-footer nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 12px 16px;
  }

  .workspace-hero {
    padding-inline: 16px;
  }

  .hero-copy,
  .tool-page-copy,
  .tool-shell,
  .tool-grid,
  .drop-zone,
  .options-panel {
    width: 100%;
    min-width: 0;
  }

  h1 {
    font-size: 2.55rem;
  }

  .hero-lede {
    font-size: 1.12rem;
  }

  .hero-proof,
  .hero-lede,
  .tool-page-copy p,
  .drop-zone p {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .drop-zone h2,
  .section-heading h2 {
    font-size: 1.75rem;
  }

  .page-content h1 {
    font-size: 2.25rem;
  }

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

  .tab-button {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-inline: 8px;
    font-size: 0.92rem;
  }

  .drop-zone,
  .options-panel,
  .page-content {
    padding: 22px;
  }

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

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

  .content-band,
  .guide-band,
  .faq-band,
  .page-main,
  .tool-page-hero {
    padding-inline: 16px;
  }

  .tool-page-copy h1 {
    font-size: 2.25rem;
  }
}
