:root {
  --ink: #17233d;
  --muted: #677083;
  --line: #dfe3e8;
  --surface: #ffffff;
  --background: #f5f6f7;
  --green: #20bf6b;
  --green-dark: #149654;
  --green-soft: #eaf8f0;
  --danger: #b42318;
  --shell: min(620px, calc(100vw - 32px));
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

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

button,
select {
  cursor: pointer;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.site-header .shell {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: center;
}

.brand {
  display: block;
  width: 174px;
  height: auto;
}

main {
  padding-block: 54px 40px;
}

.tool-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 16px 48px rgb(23 35 61 / 8%);
}

.intro {
  padding: 38px 42px 30px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0;
  font-size: clamp(27px, 5vw, 36px);
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.intro > p:last-child {
  max-width: 460px;
  margin: 13px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

form {
  display: grid;
  gap: 27px;
  padding: 34px 42px 42px;
}

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

.field-group > label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
}

.field-group > label span {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 11px;
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  position: absolute;
  top: 50%;
  right: 18px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  content: "";
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
}

select,
.phone-field {
  width: 100%;
  min-height: 56px;
  border: 1px solid #cbd1d8;
  border-radius: 10px;
  background: white;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

select {
  appearance: none;
  padding: 0 48px 0 16px;
  font-weight: 600;
}

select:focus,
.phone-field:focus-within {
  border-color: var(--green-dark);
  box-shadow: 0 0 0 3px rgb(32 191 107 / 14%);
  outline: 0;
}

.phone-field {
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

.country {
  display: inline-flex;
  min-width: 62px;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--line);
  background: #f7f8f9;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.phone-field input {
  min-width: 0;
  flex: 1;
  padding-inline: 16px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 17px;
}

.field-help,
.error {
  margin: 7px 0 0;
  font-size: 12px;
}

.field-help {
  color: var(--muted);
}

.error {
  min-height: 16px;
  color: var(--danger);
  font-weight: 650;
}

.generate-button,
.copy-button {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 10px;
  background: var(--green);
  color: #092a19;
  font-weight: 800;
  transition: background 140ms ease, transform 140ms ease;
}

.generate-button:hover,
.copy-button:hover {
  background: #28cd75;
}

.generate-button:active,
.copy-button:active {
  transform: translateY(1px);
}

.result {
  padding: 32px 42px 38px;
  border-top: 1px solid var(--line);
  background: var(--green-soft);
}

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

.success > span {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #092a19;
  font-size: 18px;
  font-weight: 800;
}

.success h2,
.success p {
  margin: 0;
}

.success h2 {
  font-size: 19px;
  letter-spacing: -0.02em;
}

.success p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

#generated-link {
  width: 100%;
  min-height: 48px;
  margin-top: 20px;
  padding-inline: 13px;
  overflow: hidden;
  border: 1px solid #cbd1d8;
  border-radius: 8px;
  background: white;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
}

.copy-button {
  margin-top: 11px;
}

.secondary-actions {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-top: 18px;
}

.secondary-actions button,
.secondary-actions a {
  padding: 3px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}

.privacy-note {
  margin: 18px 0 0;
  color: #818895;
  font-size: 11px;
  text-align: center;
}

.toast {
  position: fixed;
  z-index: 10;
  right: 20px;
  bottom: 20px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--ink);
  box-shadow: 0 8px 28px rgb(23 35 61 / 22%);
  color: white;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 620px) {
  :root {
    --shell: min(100% - 24px, 520px);
  }

  .site-header .shell {
    min-height: 68px;
  }

  .brand {
    width: 154px;
  }

  main {
    padding-block: 28px;
  }

  .tool-card {
    border-radius: 14px;
  }

  .intro {
    padding: 28px 22px 24px;
  }

  .intro h1 {
    font-size: 28px;
  }

  .intro > p:last-child {
    font-size: 14px;
  }

  form {
    gap: 22px;
    padding: 26px 20px 30px;
  }

  .result {
    padding: 26px 20px 30px;
  }

  .secondary-actions {
    gap: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
