:root {
  --ink: #16211e;
  --muted: #65736e;
  --surface: #ffffff;
  --soft: #f4f8f6;
  --line: #dbe7e2;
  --green: #0d8a68;
  --green-dark: #09674f;
  --blue: #2454a6;
  --gold: #f2b84b;
  --red: #d65f58;
  --shadow: 0 18px 60px rgba(26, 49, 41, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(140deg, rgba(13, 138, 104, 0.12), transparent 30%),
    linear-gradient(320deg, rgba(36, 84, 166, 0.11), transparent 30%),
    var(--soft);
}

img {
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid rgba(219, 231, 226, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover {
  background: #edf5f1;
  color: var(--green-dark);
}

.header-account-actions {
  flex: 0 1 auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  margin-top: 0;
  margin-left: auto;
}

.header-account-actions .secondary-button {
  width: auto;
  min-height: 38px;
  padding-inline: 12px;
}

.header-account-actions .user-chip {
  max-width: 190px;
}

.header-account-actions #creditCounter {
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 42px;
  min-height: calc(100vh - 72px);
  padding: 48px 0 38px;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.45rem, 7vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.hero-text,
.section-heading p,
.info-grid p {
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-link,
.ghost-link,
.primary-button,
.secondary-button,
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  padding: 0 18px;
  border: 0;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.primary-link,
.primary-button,
.download-button {
  background: var(--green);
  color: #fff;
}

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

.ghost-link,
.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.hero-visual {
  position: relative;
  min-height: 440px;
}

.photo-sheet {
  position: absolute;
  inset: 36px 24px 24px 0;
  display: grid;
  grid-template-columns: 45% 1fr;
  gap: 22px;
  align-items: center;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.sample-photo {
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 28%, #f7caa6 0 16%, transparent 17%),
    radial-gradient(circle at 50% 82%, #2454a6 0 35%, transparent 36%),
    linear-gradient(#e7f0ec 0 48%, #cbdad3 49%);
}

.sample-lines {
  display: grid;
  gap: 16px;
}

.sample-lines span {
  display: block;
  height: 18px;
  border-radius: 8px;
  background: #dce8e3;
}

.sample-lines span:nth-child(2) {
  width: 72%;
  background: #bfd8cf;
}

.sample-lines span:nth-child(3) {
  width: 54%;
  background: #f4d78d;
}

.size-badge,
.kb-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.size-badge {
  right: 0;
  top: 12px;
}

.kb-badge {
  left: 22px;
  bottom: 8px;
  background: var(--gold);
  color: #2d230d;
}

.ad-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 34px;
}

.ad-box {
  display: grid;
  place-items: center;
  min-height: 92px;
  border: 1px dashed #9fb5ac;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--muted);
  font-weight: 800;
}

.ad-box.wide {
  grid-column: 1 / -1;
}

.content-band .ad-box {
  min-height: 88px;
  border-style: solid;
  background: #f8fbfa;
  color: var(--text);
  padding: 18px;
  text-align: center;
  line-height: 1.5;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 22px;
}

.section-heading.centered {
  max-width: 960px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-heading.compact {
  margin-bottom: 16px;
}

.tool-message,
.pdf-tool-message {
  display: grid;
  place-items: center;
  min-height: 72px;
  margin-bottom: 18px;
  border: 1px dashed #aebdc6;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.pdf-tool-message {
  margin-top: 18px;
}

.tool-message.is-active,
.pdf-tool-message.is-active {
  border-color: var(--gold);
  background: #fff8e3;
  color: #604a07;
}

[hidden] {
  display: none !important;
}

.tool-section,
.info-grid,
.content-guide,
.pdf-tools {
  padding: 34px 0;
}

.tools-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  margin-bottom: 26px;
}

.feature-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.inline-check {
  align-self: end;
  min-height: 48px;
}

.object-editor {
  min-height: 420px;
}

.object-editor canvas {
  display: block;
  max-width: 100%;
  max-height: 560px;
  border-radius: 8px;
  cursor: crosshair;
  touch-action: none;
}

.tool-progress {
  width: 100%;
  height: 10px;
  margin: 14px 0 4px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #dfe8e4;
}

.tool-progress::-webkit-progress-bar {
  background: #dfe8e4;
}

.tool-progress::-webkit-progress-value {
  background: var(--green);
}

.tool-progress::-moz-progress-bar {
  background: var(--green);
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.account-actions span {
  color: var(--muted);
  font-weight: 800;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
}

.user-chip img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
}

#accountStatus {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#creditCounter {
  color: var(--ink);
  font-weight: 900;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(21, 31, 46, 0.55);
}

.auth-dialog {
  width: min(520px, 100%);
  border-radius: 8px;
  background: #fff;
  padding: 24px;
  box-shadow: var(--shadow);
}

.auth-dialog label {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  font-weight: 800;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
  color: var(--muted);
  font-weight: 800;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.auth-actions,
.premium-benefits {
  display: grid;
  gap: 10px;
}

.facebook-login {
  background: #1877f2;
}

.premium-benefits {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.modal-close {
  float: right;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
}

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

.plans-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.plans-grid article strong {
  display: block;
  color: var(--primary);
  font-size: 1.45rem;
}

.plans-grid article .primary-button {
  width: 100%;
}

.plans-grid article .primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.recommended-plan {
  position: relative;
  border-color: var(--primary) !important;
}

.plan-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
}

.tools-main,
.tools-side {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  padding: 22px;
}

.search-tool {
  display: grid;
  gap: 7px;
  margin-bottom: 22px;
  color: var(--muted);
  font-weight: 800;
}

.search-tool input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
}

.quick-tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 26px;
}

.quick-tool-grid a,
.tools-side a {
  display: grid;
  place-items: center;
  min-height: 54px;
  border: 1px solid #bfc8d2;
  border-radius: 2px;
  padding: 10px;
  background: #fff;
  color: #2e3968;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.quick-tool-grid a:hover,
.tools-side a:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.tools-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: start;
  gap: 6px;
  padding: 0;
  overflow: hidden;
}

.tools-side a {
  min-height: 44px;
  border-width: 0 0 1px 1px;
  border-radius: 0;
}

.tools-side .ad-box {
  grid-column: 1 / -1;
  margin: 10px;
}

.ad-box.tall {
  min-height: 260px;
}

.converter-shell {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
}

.passport-maker {
  margin-bottom: 18px;
  padding: 22px;
}

.passport-layout {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 18px;
}

.inner-controls {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.passport-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.panel,
.info-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 34px rgba(26, 49, 41, 0.08);
}

.controls-panel {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 18px;
}

.upload-box {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 160px;
  border: 2px dashed #9bb8ae;
  border-radius: 8px;
  background: #f8fbf9;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
}

.upload-box.dragging {
  border-color: var(--green);
  background: #eef8f4;
}

.upload-box.has-upload {
  border-color: #178653;
  background: #eefaf4;
  color: #12613e;
}

.upload-box.has-upload .upload-icon {
  background: #178653;
}

.upload-confirmation {
  display: grid;
  gap: 3px;
  max-width: 100%;
  color: #12613e;
  font-size: 0.82rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.upload-confirmation strong {
  font-size: 0.95rem;
}

.upload-box input {
  display: none;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
}

.form-grid,
.form-grid label {
  display: grid;
  gap: 8px;
}

.form-grid {
  gap: 14px;
}

.form-grid label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.three-columns {
  display: grid;
  grid-template-columns: 1fr 1fr 100px;
  gap: 10px;
}

select,
input[type="number"],
input[type="password"],
input[type="color"] {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--ink);
}

input[type="color"] {
  padding: 4px;
}

.check-row {
  display: inline-flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.check-row input {
  accent-color: var(--green);
}

.crop-controls {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.crop-controls label {
  display: grid;
  gap: 6px;
}

.field-title {
  margin-bottom: 0;
  color: var(--ink);
  font-weight: 900;
}

.crop-help {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.primary-button,
.secondary-button {
  width: 100%;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.preview-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.preview-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.preview-head span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.preview-box {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 340px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(45deg, #edf2ef 25%, transparent 25%),
    linear-gradient(-45deg, #edf2ef 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #edf2ef 75%),
    linear-gradient(-45deg, transparent 75%, #edf2ef 75%),
    #fff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.preview-box img {
  display: none;
  max-width: 100%;
  max-height: 340px;
  object-fit: contain;
}

.preview-box.has-image img {
  display: block;
}

.preview-box.has-image span {
  display: none;
}

.crop-editor {
  min-height: 420px;
  padding: 12px;
}

.crop-editor canvas {
  display: none;
  width: min(100%, 390px);
  max-height: 500px;
  border: 1px solid rgba(22, 33, 30, 0.22);
  border-radius: 8px;
  background: #111;
  touch-action: none;
  cursor: grab;
}

.crop-editor.is-dragging canvas {
  cursor: grabbing;
}

.crop-editor.has-image canvas {
  display: block;
}

.preview-box span {
  color: var(--muted);
  font-weight: 800;
}

.result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.result-actions p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.download-button[hidden] {
  display: none;
}

.floating-download {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  box-shadow: var(--shadow);
}

.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 26px;
}

.tool-tabs button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  background: #fff;
  color: #30343b;
  font-weight: 800;
  cursor: pointer;
}

.tool-tabs button.active {
  border-color: #30343b;
  background: #30343b;
  color: #fff;
}

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

.pdf-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 210px;
  border: 1px solid #d6d9e1;
  border-radius: 8px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pdf-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(31, 40, 55, 0.10);
}

.pdf-card[role="button"] {
  cursor: pointer;
}

.pdf-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.processing-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.processing-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.25;
}

.processing-badge.local {
  background: #eaf7ef;
  color: #226b3a;
  border: 1px solid #b7e2c5;
}

.processing-badge.cloud {
  background: #eaf1ff;
  color: #255ca8;
  border: 1px solid #bfd3f7;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 900;
}

.card-icon.red {
  background: #f06454;
}

.card-icon.green {
  background: #6ab46b;
}

.card-icon.blue {
  background: #4d7fc4;
}

.card-icon.orange {
  background: #ff8a58;
}

.card-icon.yellow {
  background: #dbc72e;
  color: #3a3200;
}

.card-icon.purple {
  background: #b0518b;
}

.merge-panel {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 18px;
  align-items: center;
  margin-top: 20px;
  padding: 22px;
}

.merge-panel h2 {
  margin-bottom: 8px;
  font-size: 2rem;
}

.pdf-upload {
  min-height: 150px;
}

.pdf-file-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.pdf-file-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.merge-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 180px 180px minmax(220px, 1fr);
  gap: 12px;
}

.merge-actions.single-action {
  grid-template-columns: repeat(auto-fit, minmax(210px, max-content));
}

.two-upload-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.unlock-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 220px;
  gap: 12px;
  align-items: end;
}

.unlock-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.small-note {
  grid-column: 1 / -1;
  margin-bottom: 0;
  color: var(--muted);
}

.ad-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 13, 16, 0.58);
}

.ad-modal[hidden] {
  display: none;
}

.ad-dialog {
  position: relative;
  width: min(520px, 100%);
  border-radius: 8px;
  padding: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.ad-close {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 58px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.ad-close:disabled {
  cursor: wait;
  opacity: 0.62;
}

.ad-creative {
  display: grid;
  place-items: center;
  min-height: 260px;
  margin: 16px 0;
  border: 1px dashed #b8c5d0;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff7e1, #eef7ff);
  color: var(--muted);
  font-weight: 900;
}

.ad-creative video {
  width: 100%;
  max-height: 260px;
  border-radius: 8px;
  background: #101820;
}

.ad-creative video:not([hidden]) + span {
  margin-top: 10px;
}

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

.info-grid article {
  padding: 20px;
}

.info-grid h2 {
  font-size: 1.35rem;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.guide-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  padding: 20px;
}

.guide-grid h3 {
  margin-bottom: 10px;
  font-size: 1.12rem;
}

.guide-grid p {
  color: var(--muted);
  line-height: 1.65;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(16px, 4vw, 44px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 980px) {
  .site-header {
    gap: 10px;
  }

  .site-nav {
    position: absolute;
    top: 68px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
    order: 4;
  }

  .header-account-actions {
    order: 3;
    flex-wrap: nowrap;
    gap: 6px;
    max-width: min(48vw, 360px);
  }

  .header-account-actions .secondary-button {
    min-height: 36px;
    padding-inline: 10px;
  }

  .header-account-actions #buyCreditsBtn,
  .header-account-actions #logoutBtn {
    display: none;
  }

  .header-account-actions .user-chip {
    max-width: 150px;
  }

  .header-account-actions #creditCounter {
    display: none;
  }

  .hero,
  .converter-shell,
  .preview-grid,
  .tools-layout,
  .merge-panel,
  .passport-layout {
    grid-template-columns: 1fr;
  }

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

  .hero {
    min-height: auto;
  }

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

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

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

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

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

@media (max-width: 620px) {
  .section,
  .ad-band {
    width: min(100% - 24px, 1180px);
  }

  .hero-visual {
    min-height: 360px;
  }

  .photo-sheet {
    inset: 34px 0 28px 0;
    grid-template-columns: 1fr;
  }

  .sample-lines {
    display: none;
  }

  .two-columns,
  .three-columns,
  .ad-band,
  .info-grid,
  .guide-grid,
  .quick-tool-grid,
  .pdf-grid,
  .tools-side {
    grid-template-columns: 1fr;
  }

  .preview-box {
    min-height: 260px;
  }

  .preview-box img {
    max-height: 260px;
  }

  .result-actions,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }
}
