:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #111827;
  --muted: #687386;
  --line: #dce3ee;
  --accent: #2f80ed;
  --accent-dark: #1f6ed3;
  --green: #37a66b;
  --shadow: 0 22px 55px rgba(34, 47, 72, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -20%, #ffffff 0, #ffffff 35%, transparent 66%),
    linear-gradient(180deg, #fbfcfe 0%, var(--bg) 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar {
  display: none;
}

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

.brand-icon,
.round-icon,
.price-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.brand-icon {
  width: 34px;
  height: 34px;
  color: #536273;
  background: #eef3f8;
  border-radius: 50%;
}

.ghost-button,
.main-button,
.link-button,
.icon-button,
.drop-zone,
.modal-close {
  cursor: pointer;
}

.ghost-button {
  min-height: 40px;
  padding: 0 18px;
  color: #39465a;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

.hero {
  text-align: center;
}

h1 {
  margin: 28px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 7vw, 64px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: 0;
}

.subtitle {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 18px;
}

.panel {
  margin: 0 auto;
  padding: 26px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(221, 228, 238, 0.86);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.trust-item {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #536273;
  font-size: 14px;
}

.trust-item + .trust-item {
  border-left: 1px solid #e8edf4;
}

.round-icon {
  width: 38px;
  height: 38px;
  color: #627188;
  background: #f3f6fa;
  border-radius: 50%;
}

.upload-form {
  display: grid;
  gap: 16px;
}

.drop-zone {
  width: 100%;
  min-height: 245px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #718097;
  background: #fff;
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.drop-zone:hover,
.drop-zone.is-dragover {
  background: #f8fbff;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.drop-zone strong {
  color: #1d2637;
  font-size: 22px;
}

.drop-zone b {
  color: var(--accent);
}

.drop-zone small {
  color: #7c8798;
}

.file-icon {
  font-size: 66px;
  color: #8b99ad;
}

.selected-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  text-align: left;
  background: #f7fbff;
  border: 1px solid #d9e8fb;
  border-radius: var(--radius);
}

.selected-file > div:first-child {
  min-width: 0;
}

.selected-file strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.selected-check {
  min-width: 190px;
}

.label {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 13px;
}

.icon-button,
.modal-close {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #526075;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

.price-card {
  min-height: 104px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.price-card.free {
  background: linear-gradient(135deg, #fbfffd, #f2fbf6);
}

.price-card.paid {
  background: linear-gradient(135deg, #fbfdff, #f5f8ff);
}

.price-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e5ebf4;
  font-size: 28px;
}

.free .price-icon {
  color: var(--green);
}

.paid .price-icon {
  color: #4b82f4;
}

.price-card h2 {
  margin: 0 0 7px;
  font-size: 17px;
  line-height: 1.25;
}

.price-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.link-button {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  background: transparent;
  border: 0;
  padding: 4px 8px;
}

.main-button {
  min-height: 48px;
  padding: 0 22px;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-weight: 700;
  transition: background 0.16s ease, transform 0.16s ease;
}

.main-button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.main-button.full,
.ghost-button.full {
  width: 100%;
}

.security-note p,
.footer p {
  color: var(--muted);
}

.security-note {
  margin: 22px auto 0;
  display: grid;
  gap: 3px;
  color: #233044;
}

.security-note span {
  color: var(--green);
  font-size: 25px;
}

.security-note p {
  margin: 0;
  font-size: 14px;
}

.footer {
  width: min(920px, calc(100% - 32px));
  margin: 30px auto 18px;
  text-align: center;
  font-size: 13px;
}

.footer nav {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer a {
  color: #526075;
}

.modal {
  width: min(520px, calc(100% - 32px));
  padding: 28px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(21, 30, 45, 0.42);
  backdrop-filter: blur(3px);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.modal h2 {
  margin: 0 42px 14px 0;
  font-size: 26px;
  line-height: 1.2;
}

.modal p {
  color: #526075;
  line-height: 1.55;
}

.result-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: #fff8ed;
  border: 1px solid #f2d8ae;
  border-radius: var(--radius);
}

.result-summary strong {
  color: #9a5b00;
}

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

.risk-list article {
  padding: 15px;
  background: #f8fafc;
  border: 1px solid #e6edf5;
  border-radius: var(--radius);
}

.risk-list h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.risk-list p,
.risk-list b {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.chosen-name {
  word-break: break-word;
}

.loader {
  width: 52px;
  height: 52px;
  margin: 4px auto 20px;
  border: 4px solid #e7edf6;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.final-modal {
  text-align: center;
}

.email-form {
  margin-top: 18px;
  display: grid;
  gap: 10px;
  text-align: left;
}

.email-form label {
  font-weight: 700;
}

.email-form div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.email-form input {
  min-height: 48px;
  min-width: 0;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.success-message {
  color: var(--green) !important;
  font-weight: 700;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .topbar {
    padding-top: 14px;
  }

  .brand span:last-child {
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  h1 {
    margin-top: 20px;
    font-size: 42px;
  }

  .subtitle {
    font-size: 16px;
  }

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

  .trust-row,
  .price-grid {
    grid-template-columns: 1fr;
  }

  .trust-item {
    justify-content: flex-start;
    padding: 0;
  }

  .trust-item + .trust-item {
    border-left: 0;
  }

  .drop-zone {
    min-height: 215px;
    padding: 18px;
  }

  .drop-zone strong {
    font-size: 20px;
  }

  .price-card {
    padding: 16px;
  }

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

  .selected-actions {
    width: 100%;
  }

  .selected-check {
    min-width: 0;
    flex: 1;
  }

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