
/* ==========================================================
   DOCSHIFT 4.2
   SWISS DOCUMENT WORKSPACE
   COMPLETE STYLESHEET
========================================================== */

/* ==========================================================
   01. DESIGN SYSTEM
========================================================== */

:root {
  color-scheme: light;

  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f7f8fa;
  --surface-hover: #eef1f4;

  --text: #17191d;
  --muted: #69737e;
  --soft-text: #969faa;
  --border: #e6e9ed;

  --accent: #697586;
  --accent-soft: rgba(105, 117, 134, 0.09);

  --success: #238667;
  --danger: #cf4545;

  --button-bg: #191c20;
  --button-text: #ffffff;

  --shadow:
    0 22px 85px rgba(18, 26, 36, 0.055),
    0 2px 8px rgba(18, 26, 36, 0.025);

  --font:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI Variable",
    "Segoe UI",
    "Helvetica Neue",
    Arial,
    sans-serif;
}

/* Dark mode */

html[data-theme="dark"] {
  color-scheme: dark;

  --bg: #111317;
  --surface: #1b1e23;
  --surface-alt: #171a1f;
  --surface-hover: #282d34;

  --text: #f3f5f7;
  --muted: #aeb7c2;
  --soft-text: #8995a2;
  --border: #343a43;

  --accent: #bcc6d2;
  --accent-soft: rgba(188, 198, 210, 0.1);

  --success: #58c69a;
  --danger: #ff8585;

  --button-bg: #f1f3f5;
  --button-text: #15171a;

  --shadow:
    0 24px 85px rgba(0, 0, 0, 0.3);
}

/* ==========================================================
   02. BASE / RESET
========================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 95px;
}

body {
  margin: 0;
  min-width: 320px;

  background: var(--bg);
  color: var(--text);

  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.012em;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  transition:
    background 0.3s ease,
    color 0.3s ease;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button {
  color: inherit;
}

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

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  max-width: 100%;
}

img {
  display: block;
}

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

h1,
h2,
h3 {
  text-wrap: balance;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.shell {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;

  width: 1px;
  height: 1px;

  padding: 0;
  margin: -1px;

  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;

  border: 0;
}

/* ==========================================================
   03. HEADER
========================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: var(--bg);
  background: color-mix(
    in srgb,
    var(--bg) 78%,
    transparent
  );

  backdrop-filter: blur(22px) saturate(155%);
  -webkit-backdrop-filter: blur(22px) saturate(155%);

  border-bottom: 1px solid var(--border);

  transition:
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.3s ease;
}

.site-header.header-hidden {
  transform: translateY(-110%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;

  min-height: 72px;
}

/* Logo */

.logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 11px;

  white-space: nowrap;

  font-size: 21px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.055em;
}

.logo img {
  width: 35px;
  height: 35px;
  object-fit: contain;
}

.logo-text {
  display: inline-block;
}

/* Navigation */

.nav-links {
  display: flex;
  align-items: center;
  gap: 31px;

  margin-left: auto;
}

.nav-links a {
  color: var(--muted);

  font-size: 13px;
  font-weight: 550;

  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

/* Right-side actions */

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  gap: 17px;
}

.language-picker {
  display: inline-flex;
  align-items: center;
}

.language-picker select {
  padding: 8px 5px;

  border: 0;
  border-radius: 6px;

  background: transparent;
  color: var(--text);

  font-size: 12px;
  font-weight: 650;
}

/* Theme switch */

.icon-button,
.theme-toggle {
  display: inline-grid;
  place-items: center;

  width: 38px;
  height: 38px;
  min-width: 38px;

  padding: 0;

  border: 0;
  border-radius: 50%;

  background: transparent;
  color: var(--text);

  opacity: 1;
  visibility: visible;

  transition: background 0.2s ease;
}

.icon-button:hover,
.theme-toggle:hover {
  background: var(--surface-hover);
}

#themeSymbol {
  display: inline-grid;
  place-items: center;

  width: 23px;
  height: 23px;

  color: var(--text);
  font-size: 20px;
  line-height: 1;
}

#themeSymbol svg {
  display: block;

  width: 20px;
  height: 20px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
}

/* Login button */

.account-button {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;

  max-width: 205px;
  padding: 10px 0 !important;

  overflow: hidden;

  border: 0 !important;
  background: transparent !important;
  color: var(--text) !important;

  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;

  box-shadow: none !important;
}

.account-button:hover {
  background: transparent !important;
  color: var(--accent) !important;
  box-shadow: none !important;
}

/* ==========================================================
   04. BUTTONS
========================================================== */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  min-height: 45px;
  padding: 12px 22px;

  border: 1px solid transparent;
  border-radius: 999px;

  font-family: var(--font);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;

  text-decoration: none;

  transition:
    transform 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease,
    color 0.22s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--button-bg);
  color: var(--button-text);
}

.button-primary:hover:not(:disabled) {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.13);
}

.button-secondary {
  background: var(--surface-alt);
  color: var(--text);
  border-color: transparent;
}

.button-secondary:hover:not(:disabled) {
  background: var(--surface-hover);
}

.full {
  width: 100%;
}

/* ==========================================================
   05. HERO
========================================================== */

.hero {
  padding-top: 51px;
  padding-bottom: 45px;

  text-align: center;
}

.hero-content {
  max-width: 1080px;
  margin-inline: auto;
}

.hero h1 {
  max-width: 980px;
  margin: 0 auto 18px;

  font-size: clamp(48px, 7vw, 86px);
  font-weight: 740;
  line-height: 1.06;
  letter-spacing: -0.074em;
}

/* Silver gradient */

.gradient-text {
  display: inline-block;

  background: linear-gradient(
    110deg,
    var(--text) 5%,
    var(--accent) 105%
  );

  background-clip: text;
  -webkit-background-clip: text;

  color: transparent;
}

/* Swiss identity */

.swiss-hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  margin: 2px auto 24px;
  padding: 8px 14px;

  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;

  color: var(--muted);

  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.swiss-hero-badge svg {
  display: block;

  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

/* Description */

.hero-description {
  max-width: 610px;
  margin: 0 auto;

  color: var(--muted);

  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.7;
}

/* Hero buttons */

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;

  gap: 12px;
  margin-top: 28px;
}

.hero-buttons .button {
  min-width: 185px;
  min-height: 49px;

  padding-inline: 25px;
}

/* Trust points */

.hero-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;

  gap: 12px 23px;
  margin-top: 27px;

  color: var(--muted);
  font-size: 12px;
}

/* ==========================================================
   06. WORKSPACE
========================================================== */

.workspace-section {
  padding-bottom: 95px;
}

.app-window {
  max-width: 1010px;
  margin-inline: auto;

  overflow: hidden;

  background: var(--surface);

  border: 1px solid var(--border);
  border-radius: 22px;

  box-shadow: var(--shadow);
}

/* Toolbar */

.app-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  min-height: 65px;
  padding: 13px 24px;

  border-bottom: 1px solid var(--border);
}

.app-toolbar-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;

  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.toolbar-icon {
  display: grid;
  place-items: center;

  width: 33px;
  height: 33px;

  background: var(--surface-alt);
  border-radius: 9px;

  color: var(--text);
}

.toolbar-icon svg {
  display: block;

  width: 18px;
  height: 18px;
}

.workspace-caption {
  color: var(--soft-text);
  font-size: 11px;
  letter-spacing: 0.02em;
}

/* ==========================================================
   07. FOUR MAIN TOOLS
========================================================== */

/* Keep old tool buttons for the existing app.js,
   but hide the previous seven-button interface. */

.legacy-tools {
  display: none !important;
}

/* Four visible tool categories */

.workspace-main-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;

  padding: 17px 19px;

  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.main-tool {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  min-width: 0;
  min-height: 51px;

  padding: 11px 14px;

  border: 1px solid transparent;
  border-radius: 11px;

  background: var(--surface-alt);
  color: var(--muted);

  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 630;
  letter-spacing: -0.01em;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.main-tool svg {
  display: block;

  width: 18px;
  height: 18px;

  flex-shrink: 0;

  stroke-width: 1.65;
}

.main-tool:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.main-tool.active,
.main-tool[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
}

.main-tool:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ==========================================================
   08. CONVERSION OPTIONS
========================================================== */

.workspace-body {
  padding: 27px;
}

.conversion-options {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    42px
    minmax(0, 1fr);

  align-items: end;
  gap: 15px;

  margin-bottom: 23px;
}

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

.format-field {
  min-width: 0;
}

.format-field label {
  display: block;

  margin-bottom: 9px;

  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.format-value,
.format-select {
  width: 100%;
  min-height: 54px;

  border: 1px solid var(--border);
  border-radius: 13px;

  background: var(--surface-alt);
  color: var(--text);

  font-size: 13px;
  font-weight: 600;
}

.format-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 0 16px;
}

.format-value span:first-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.format-indicator {
  color: var(--soft-text);

  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.format-select {
  padding: 0 16px;
  cursor: pointer;
}

.format-select:focus {
  border-color: var(--accent);
}

.format-select option {
  background: var(--surface);
  color: var(--text);
}

.format-direction {
  display: grid;
  place-items: center;

  height: 54px;

  color: var(--muted);
}

.format-direction svg {
  display: block;

  width: 20px;
  height: 20px;
}

/* ==========================================================
   09. DROPZONE
========================================================== */

.dropzone {
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-height: 300px;
  padding: 30px 22px;

  background: var(--surface-alt);

  border: 1.5px dashed
    color-mix(in srgb, var(--muted) 48%, transparent);

  border-radius: 17px;

  text-align: center;
  cursor: pointer;

  transition:
    background 0.25s ease,
    border-color 0.25s ease;
}

.dropzone:hover,
.dropzone.over {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.dropzone:focus-within {
  border-color: var(--accent);
}

/* Native file picker is visually hidden */

.dropzone input[type="file"] {
  position: absolute;

  width: 1px;
  height: 1px;

  padding: 0;
  opacity: 0;
  overflow: hidden;
}

/* Upload icon */

.upload-icon {
  display: grid;
  place-items: center;

  width: 60px;
  height: 60px;

  margin-bottom: 22px;

  background: var(--surface);

  border: 1px solid var(--border);
  border-radius: 16px;

  color: var(--text);
}

.upload-icon svg {
  display: block;

  width: 29px;
  height: 29px;
}

/* Upload texts */

.dropzone h2 {
  margin: 0 0 8px;

  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.045em;
}

.dropzone p {
  max-width: 490px;
  margin: 0 0 23px;

  color: var(--muted);
  font-size: 13px;
}

.dropzone .button {
  min-height: 43px;
}

.drop-hint {
  display: block;

  margin-top: 14px;

  color: var(--soft-text);
  font-size: 12px;
}

/* Information underneath dropzone */

.trustline {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;

  gap: 11px 22px;
  margin-top: 19px;

  color: var(--muted);
  font-size: 12px;
}

/* ==========================================================
   10. SELECTED FILES / PROCESSING
========================================================== */

.selection {
  display: none;
  margin-top: 24px;
}

.selection.show {
  display: block;
}

.file {
  display: flex;
  align-items: center;
  gap: 12px;

  margin: 8px 0;
  padding: 12px;

  background: var(--surface);

  border: 1px solid var(--border);
  border-radius: 12px;
}

.file[draggable="true"] {
  cursor: grab;
}

.file[draggable="true"]:active {
  cursor: grabbing;
}

.file.dragging {
  opacity: 0.42;
  border-color: var(--accent);
}

.draghandle {
  color: var(--muted);
  font-size: 15px;

  cursor: grab;
  user-select: none;
}

.filebadge {
  display: grid;
  place-items: center;
  flex-shrink: 0;

  width: 43px;
  height: 43px;

  background: var(--accent-soft);
  color: var(--accent);

  border-radius: 10px;

  font-size: 11px;
  font-weight: 800;
}

.filemeta {
  flex: 1;
  min-width: 0;
}

.filename {
  overflow: hidden;

  white-space: nowrap;
  text-overflow: ellipsis;

  font-size: 13px;
  font-weight: 650;
}

.filesize {
  margin-top: 2px;

  color: var(--muted);
  font-size: 11px;
}

.remove,
.move {
  display: grid;
  place-items: center;

  min-width: 31px;
  height: 31px;

  border: 1px solid var(--border);
  border-radius: 9px;

  background: var(--surface);
  color: var(--muted);

  font-size: 15px;
}

.remove:hover,
.move:hover:not(:disabled) {
  background: var(--surface-hover);
  color: var(--text);
}

.move:disabled {
  opacity: 0.28;
}

.reorder {
  display: flex;
  gap: 4px;
}

.mergehint {
  margin-bottom: 13px;
  padding: 13px 15px;

  background: var(--surface-alt);
  border-radius: 11px;

  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.run {
  width: 100%;
  min-height: 49px;
  margin-top: 17px;
}

/* ==========================================================
   11. NOTICES / STATUS MESSAGES
========================================================== */

.notice {
  display: none;

  margin-top: 14px;
  padding: 13px 15px;

  border-radius: 11px;

  font-size: 13px;
  line-height: 1.6;
}

.notice.show {
  display: block;
}

.notice.error {
  background: rgba(210, 65, 65, 0.09);
  color: var(--danger);
}

.notice.success {
  background: rgba(35, 155, 110, 0.09);
  color: var(--success);
}

.notice.upgrade {
  background: var(--accent-soft);
  color: var(--accent);
}

.notice button {
  padding: 0;
  margin-left: 7px;

  border: 0;
  background: transparent;
  color: inherit;

  font-weight: 750;
  text-decoration: underline;
}

/* ==========================================================
   12. SECTIONS / TYPOGRAPHY
========================================================== */

.section {
  padding: 105px 0;
}

.section-alt {
  background: var(--surface-alt);
}

.section-intro {
  max-width: 790px;
  margin-bottom: 50px;
}

.section-intro.center {
  margin-inline: auto;
  text-align: center;
}

.section h2 {
  margin: 0 0 20px;

  font-size: clamp(36px, 4.8vw, 57px);
  font-weight: 710;
  line-height: 1.13;
  letter-spacing: -0.065em;
}

.section-intro p {
  max-width: 650px;
  margin: 0;

  color: var(--muted);

  font-size: 16px;
  line-height: 1.75;
}

.section-intro.center p {
  margin-inline: auto;
}

/* ==========================================================
   13. FEATURE CARDS
========================================================== */

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

.feature-card {
  min-height: 230px;
  padding: 31px;

  background: var(--surface);

  border: 1px solid var(--border);
  border-radius: 19px;

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.feature-icon {
  display: grid;
  place-items: center;

  width: 45px;
  height: 45px;

  margin-bottom: 26px;

  background: var(--surface-alt);
  color: var(--text);

  border-radius: 13px;
}

.feature-icon svg {
  display: block;

  width: 22px;
  height: 22px;
}

.feature-card h3 {
  margin: 0 0 9px;

  font-size: 17px;
  font-weight: 680;
  letter-spacing: -0.035em;
}

.feature-card p {
  margin: 0;

  color: var(--muted);

  font-size: 13px;
  line-height: 1.8;
}

/* ==========================================================
   14. PRICING
========================================================== */

.pricing-section {
  border-top: 1px solid var(--border);
}

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

  max-width: 830px;
  margin: 53px auto 0;
}

.pricing-card {
  position: relative;

  display: flex;
  flex-direction: column;

  min-height: 490px;
  padding: 35px 31px;

  background: var(--surface);

  border: 1px solid var(--border);
  border-radius: 21px;
}

.pricing-card.featured {
  border: 1.5px solid var(--text);
}

.pricing-card h3 {
  margin: 0;

  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.price {
  margin: 19px 0 6px;

  font-size: 47px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.07em;
}

.price small {
  color: var(--muted);

  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.plan-description {
  min-height: 43px;
  margin: 9px 0 0;

  color: var(--muted);
  font-size: 13px;
}

.plan-features {
  display: grid;
  align-content: start;
  gap: 15px;
  flex: 1;

  margin: 29px 0 35px;
  padding: 0;

  list-style: none;
}

.plan-features li {
  font-size: 13px;
  line-height: 1.5;
}

.plan-features li::before {
  content: "✓";

  display: inline-block;
  margin-right: 9px;

  color: var(--success);
  font-weight: 800;
}

.popular {
  position: absolute;
  top: -13px;
  right: 22px;

  padding: 6px 13px;

  background: var(--text);
  color: var(--bg);

  border-radius: 999px;

  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.055em;
}

.checkout-note {
  margin: 13px 0 0;

  color: var(--muted);

  font-size: 11px;
  text-align: center;
}

.pricing-fineprint {
  max-width: 760px;
  margin: 28px auto 0;

  color: var(--soft-text);

  font-size: 12px;
  text-align: center;
}

/* ==========================================================
   15. FAQ
========================================================== */

.faq-layout {
  max-width: 850px;
}

.faq-heading {
  max-width: 710px;
  margin: 0 auto 47px;

  text-align: center;
}

.faq-heading h2 {
  margin-bottom: 15px;
}

.faq-heading p {
  margin: 0;

  color: var(--muted);
  font-size: 16px;
}

.faq-list {
  max-width: 790px;
  margin-inline: auto;
}

.faq-list details {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.faq-list summary {
  padding: 0;

  list-style: none;
  cursor: pointer;

  font-size: 15px;
  font-weight: 630;
  letter-spacing: -0.015em;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::marker {
  content: "";
}

.faq-list p {
  margin: 15px 0 0;

  color: var(--muted);

  font-size: 13px;
  line-height: 1.8;
}

/* ==========================================================
   16. FOOTER
========================================================== */

.site-footer {
  padding: 69px 0 31px;

  background: var(--surface-alt);

  border-top: 1px solid var(--border);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 50px;
}

.footer-brand {
  flex-shrink: 0;
}

.footer-brand p {
  max-width: 300px;
  margin: 16px 0 0;

  color: var(--muted);

  font-size: 13px;
  line-height: 1.75;
}

.footer-links {
  display: flex;
  align-content: flex-start;
  flex-wrap: wrap;

  max-width: 570px;
  gap: 17px 26px;
}

.footer-links a {
  color: var(--muted);

  font-size: 12px;

  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text);
}

/* Bottom */

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;

  gap: 20px;

  margin-top: 70px;
  padding-top: 26px;

  border-top: 1px solid var(--border);

  color: var(--soft-text);

  font-size: 12px;
}

/* Swiss identity */

.footer-credits {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 23px;
}

.swiss-product {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.swiss-product svg {
  display: block;

  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.footer-credits a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.footer-credits a:hover {
  color: var(--text);
}

/* ==========================================================
   17. LOGIN MODAL
========================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background: rgba(0, 0, 0, 0.56);

  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
}

.modal-backdrop.show {
  display: flex;
}

.modal {
  position: relative;

  width: min(445px, 100%);
  max-height: calc(100vh - 40px);

  overflow-y: auto;

  padding: 34px;

  background: var(--surface);
  color: var(--text);

  border: 1px solid var(--border);
  border-radius: 23px;

  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 19px;

  padding: 0;

  border: 0;
  background: transparent;

  color: var(--muted);

  font-size: 26px;
  line-height: 1.3;
}

.modal h2 {
  margin: 0 0 10px;

  font-size: 26px;
  font-weight: 710;
  letter-spacing: -0.05em;
}

.modal p {
  color: var(--muted);

  font-size: 13px;
  line-height: 1.7;
}

.modal label {
  display: block;
  margin: 20px 0 7px;

  font-size: 13px;
  font-weight: 650;
}

.modal input {
  width: 100%;
  min-height: 48px;

  padding: 12px 14px;

  background: var(--surface);
  color: var(--text);

  border: 1px solid var(--border);
  border-radius: 11px;

  outline: none;
}

.modal input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.modal .button {
  margin-top: 14px;
}

.code-input {
  text-align: center;

  font-size: 22px !important;
  font-weight: 700;
  letter-spacing: 0.33em;
}

.text-link {
  display: inline-block;

  margin-top: 17px;
  padding: 0;

  border: 0;
  background: transparent;

  color: var(--accent);

  font-size: 12px;
  font-weight: 650;
}

.modal-message {
  min-height: 20px;
  margin: 11px 0 0;

  color: var(--danger) !important;
  font-size: 12px;
}

/* Account panel */

.account-panel {
  display: none;
  padding-top: 12px;
}

.account-panel.show {
  display: block;
}

.account-panel > div {
  display: flex;
  justify-content: space-between;
  gap: 13px;

  padding: 13px 0;

  border-bottom: 1px solid var(--border);

  font-size: 12px;
}

.account-panel span {
  color: var(--muted);
}

.account-panel strong {
  overflow-wrap: anywhere;
  text-align: right;
}

/* Toast */

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1300;

  display: none;

  max-width: min(400px, calc(100vw - 35px));

  padding: 15px 19px;

  background: var(--button-bg);
  color: var(--button-text);

  border-radius: 12px;

  box-shadow: var(--shadow);

  font-size: 13px;
}

.toast.show {
  display: block;
}

/* ==========================================================
   18. VISIBILITY / SAFE ANIMATIONS
========================================================== */

/* Content remains visible even if JavaScript fails. */

.reveal,
.reveal.visible {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

/* ==========================================================
   19. RESPONSIVE: TABLET
========================================================== */

@media (max-width: 1000px) {
  .header-inner {
    gap: 16px;
  }

  .nav-links {
    gap: 19px;
  }

  .header-actions {
    gap: 9px;
  }

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

  .footer-top {
    gap: 25px;
  }
}

@media (max-width: 850px) {
  .workspace-main-tabs {
    gap: 7px;
    padding: 13px;
  }

  .main-tool {
    gap: 6px;
    padding: 10px 7px;
    font-size: 11px;
  }
}

/* ==========================================================
   20. RESPONSIVE: MOBILE
========================================================== */

@media (max-width: 760px) {
  .shell {
    width: calc(100% - 30px);
  }

  /* Header */

  .header-inner {
    min-height: 64px;
    gap: 8px;
  }

  .logo {
    gap: 7px;
    font-size: 18px;
  }

  .logo img {
    width: 30px;
    height: 30px;
  }

  .nav-links {
    display: none;
  }

  .header-actions {
    gap: 5px;
  }

  .language-picker select {
    padding: 7px 3px;
  }

  .icon-button,
  .theme-toggle {
    min-width: 34px;
    width: 34px;
    height: 34px;
  }

  .account-button {
    max-width: 110px;

    padding: 8px 0 !important;

    font-size: 11px;
  }

  /* Hero */

  .hero {
    padding-top: 44px;
    padding-bottom: 33px;
  }

  .hero h1 {
    font-size: clamp(40px, 10vw, 61px);
    letter-spacing: -0.067em;
  }

  .swiss-hero-badge {
    margin-bottom: 22px;

    font-size: 11px;
  }

  .hero-description {
    font-size: 15px;
  }

  .hero-buttons {
    gap: 9px;
  }

  .hero-buttons .button {
    min-width: 0;
    padding: 12px 17px;

    font-size: 12px;
  }

  .hero-proof {
    gap: 9px 15px;
    font-size: 11px;
  }

  /* Workspace */

  .workspace-section {
    padding-bottom: 70px;
  }

  .app-window {
    border-radius: 17px;
  }

  .app-toolbar {
    padding: 12px 16px;
  }

  .workspace-main-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 5px;
    padding: 10px;
  }

  .main-tool {
    flex-direction: column;

    min-height: 66px;
    gap: 6px;

    padding: 9px 2px;

    font-size: 10px;
    line-height: 1.2;
  }

  .main-tool svg {
    width: 19px;
    height: 19px;
  }

  .workspace-body {
    padding: 16px;
  }

  /* Conversion */

  .conversion-options {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .format-direction {
    width: 100%;
    height: 24px;
  }

  .format-direction svg {
    transform: rotate(90deg);
  }

  /* Upload */

  .dropzone {
    min-height: 275px;
    padding: 22px 13px;
  }

  .dropzone h2 {
    font-size: 19px;
  }

  .trustline {
    gap: 8px 14px;
    font-size: 11px;
  }

  /* Sections */

  .section {
    padding: 75px 0;
  }

  .section h2 {
    font-size: clamp(34px, 8vw, 45px);
  }

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

  .feature-card {
    min-height: auto;
  }

  /* Pricing */

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

  .pricing-card {
    min-height: auto;
  }

  /* Footer */

  .footer-top {
    flex-direction: column;
    gap: 35px;
  }

  .footer-bottom {
    margin-top: 48px;
  }

  .footer-credits {
    gap: 12px 22px;
  }

  /* Modal */

  .modal {
    padding: 27px 22px;
  }
}

/* ==========================================================
   21. SMALL MOBILE
========================================================== */

@media (max-width: 390px) {
  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .button {
    width: 100%;
  }

  .header-actions {
    gap: 3px;
  }

  .account-button {
    max-width: 92px;
  }

  .workspace-main-tabs {
    padding: 8px;
  }

  .main-tool {
    font-size: 9px;
  }

  .theme-toggle {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }
}

/* ==========================================================
   22. ACCESSIBILITY
========================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* Swiss footer label */

.footer-credits .swiss-product {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
}

.footer-credits .swiss-flag {
  display: block;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  border-radius: 2px;
}

.footer-credits .swiss-product span {
  white-space: nowrap;
}
