@font-face {
  font-family: "Cinzel";
  src: url("../assets/fonts/Cinzel-VariableFont_wght.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("../assets/fonts/Roboto-VariableFont_wdth,wght.ttf") format("truetype");
  font-display: swap;
}

:root {
  --text: #172b36;
  --muted: #526872;
  --accent: #167c78;
  --accent-dark: #0f6562;
  --accent-soft: rgba(22, 124, 120, 0.09);
  --success: #237a52;
  --warning: #8b641d;
  --error: #a13d45;
  --border: rgba(40, 77, 87, 0.16);
  --shadow: 0 18px 44px rgba(37, 68, 73, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Roboto, system-ui, sans-serif;
  background:
    radial-gradient(900px 420px at 12% 0%, rgba(83, 174, 161, 0.18), transparent 58%),
    linear-gradient(180deg, #f7faf8, #edf4f1 45%, #f3f7f5);
}

button,
input {
  font: inherit;
}

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

a {
  color: var(--accent);
}

.container {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(247, 250, 248, 0.92);
  backdrop-filter: blur(12px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav {
  padding: 15px 0;
}

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

.brand-icon {
  width: 42px;
  height: 42px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 13px;
}

.brand-wordmark {
  display: block;
  width: 126px;
  height: auto;
}

.back {
  font-weight: 700;
  text-decoration: none;
}

.main-content {
  padding: 42px 0 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: end;
  gap: clamp(28px, 7vw, 72px);
  margin-bottom: 32px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}

h1,
h2,
h3 {
  font-family: Roboto, "Segoe UI", system-ui, sans-serif;
  font-weight: 760;
  letter-spacing: -0.025em;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.08;
}

h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 32px);
}

h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.lead {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.65;
}

.security-card {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px solid rgba(22, 124, 120, 0.23);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 30px rgba(37, 68, 73, 0.08);
  line-height: 1.5;
}

.security-card span {
  color: var(--muted);
  font-size: 14px;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.stepper li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: var(--muted);
  border-bottom: 3px solid var(--border);
  font-size: 14px;
  font-weight: 700;
}

.stepper span,
.step-number {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--muted);
  background: #e1e9e5;
  font-weight: 800;
}

.stepper li.is-active,
.stepper li.is-complete {
  color: var(--text);
  border-color: var(--accent);
}

.stepper li.is-active span,
.stepper li.is-complete span,
.step-number {
  color: white;
  background: var(--accent);
}

.panel,
.expert-panel {
  margin-top: 18px;
  padding: clamp(22px, 5vw, 40px);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}

.panel-heading p,
.member-heading p,
.expert-panel p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.actions-end {
  justify-content: flex-end;
}

.actions-between {
  justify-content: space-between;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 800;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

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

.button:focus-visible,
input:focus-visible,
.icon-button:focus-visible {
  outline: 3px solid rgba(22, 124, 120, 0.25);
  outline-offset: 2px;
}

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

.button-primary {
  color: white;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(22, 124, 120, 0.2);
}

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

.button-secondary {
  color: var(--accent-dark);
  border-color: rgba(22, 124, 120, 0.25);
  background: white;
}

.button-text {
  min-height: auto;
  padding: 8px 4px;
  color: var(--accent-dark);
  background: transparent;
}

.notice,
.important-hint,
.preview-box {
  margin: 16px 0;
  padding: 15px 17px;
  border: 1px solid rgba(22, 124, 120, 0.22);
  border-radius: 15px;
  background: var(--accent-soft);
  line-height: 1.55;
}

.notice-warning {
  color: #684a14;
  border-color: rgba(139, 100, 29, 0.26);
  background: rgba(219, 173, 77, 0.11);
}

.notice-error {
  color: #7f2730;
  border-color: rgba(161, 61, 69, 0.25);
  background: rgba(161, 61, 69, 0.08);
}

.notice-info {
  margin-top: 26px;
}

.account-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f9fbfa;
}

.saved-setup-card {
  margin: 24px 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f2f8f6;
}

.saved-setup-card p {
  margin: 5px 0 0;
  line-height: 1.5;
}

.saved-member-list {
  display: grid;
  gap: 7px;
  margin: 14px 0 10px;
  padding-left: 21px;
}

.saved-member-list span {
  color: var(--muted);
}

.account-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: white;
  background: #2672ec;
  font-size: 22px;
  font-weight: 900;
}

.account-data {
  display: grid;
  flex: 1;
  gap: 3px;
  min-width: 0;
}

.account-data span,
.account-data small {
  overflow-wrap: anywhere;
  color: var(--muted);
}

.confirmation {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.field {
  display: grid;
  align-content: start;
  gap: 7px;
}

.compact-field {
  max-width: 480px;
}

.field label {
  font-weight: 800;
}

.field label span,
.field-hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.field input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--text);
  border: 1px solid rgba(40, 77, 87, 0.26);
  border-radius: 11px;
  background: white;
}

.field input[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 2px rgba(161, 61, 69, 0.1);
}

.field-error {
  min-height: 18px;
  color: var(--error);
  font-size: 13px;
}

.member-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 34px;
}

.important-hint {
  color: #4e481d;
  border-color: rgba(184, 141, 40, 0.26);
  background: rgba(244, 212, 110, 0.14);
}

.member-rows {
  display: grid;
  gap: 12px;
}

.member-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(240px, 1.4fr) 42px;
  align-items: start;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fbfcfc;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-top: 27px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  cursor: pointer;
  font-size: 24px;
}

.preview-box {
  margin-top: 24px;
  border-color: var(--border);
  background: #f6f9f7;
}

.preview-box ul {
  margin: 10px 0 0;
  padding-left: 22px;
  line-height: 1.7;
}

.progress-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.progress-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfcfc;
}

.progress-list li::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid #aab9b6;
  border-radius: 50%;
}

.progress-list li.is-running::before {
  border-color: var(--accent);
  border-right-color: transparent;
  animation: spin 0.8s linear infinite;
}

.progress-list li.is-success::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: white;
  border: 0;
  background: var(--success);
  font-size: 12px;
}

.progress-list li.is-error::before {
  content: "!";
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: white;
  border: 0;
  background: var(--error);
  font-size: 12px;
  font-weight: 900;
}

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

.success-step {
  background: var(--success);
}

.success-text {
  color: var(--success);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.result-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fbfcfc;
}

.result-card h3 {
  margin-top: 14px;
}

.result-card > p {
  margin: 4px 0 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.result-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--success);
  font-size: 13px;
  font-weight: 800;
}

.result-status span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: white;
  border-radius: 50%;
  background: var(--success);
}

.qr-frame {
  display: grid;
  place-items: center;
  min-height: 232px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: white;
}

.qr-frame img,
.qr-frame canvas {
  max-width: 100%;
  height: auto !important;
}

.result-card ol {
  margin: 18px 0 8px;
  padding-left: 22px;
  line-height: 1.65;
}

.copy-feedback {
  display: block;
  min-height: 18px;
  color: var(--success);
  font-size: 13px;
}

.expert-panel {
  box-shadow: none;
}

.expert-panel h2 {
  font-size: 23px;
}

.expert-panel .button {
  margin-top: 14px;
}

.site-footer {
  padding: 0 0 38px;
  color: var(--muted);
}

.footergrid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: end;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.footer-product-logo {
  display: block;
  width: 168px;
  height: auto;
}

.footer-company-line {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.footer-company-line a {
  display: inline-flex;
}

.footer-company-logo {
  display: block;
  width: 190px;
  height: auto;
}

.tiny {
  font-size: 13px;
}

.muted {
  color: var(--muted);
  line-height: 1.6;
}

.right {
  text-align: right;
}

[hidden] {
  display: none !important;
}

@media (max-width: 860px) {
  .container {
    width: min(100% - 24px, 1040px);
  }

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

  .security-card {
    max-width: 520px;
  }

  .stepper li {
    justify-content: center;
    padding-inline: 6px;
    font-size: 0;
  }

  .stepper span {
    font-size: 14px;
  }

  .member-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .member-row {
    grid-template-columns: 1fr 42px;
  }

  .member-row .field:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .nav {
    align-items: flex-start;
  }

  .back {
    padding-top: 10px;
    font-size: 14px;
  }

  .panel-heading {
    gap: 11px;
  }

  .step-number {
    width: 28px;
    height: 28px;
  }

  .account-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .account-data {
    flex-basis: calc(100% - 62px);
  }

  .member-row {
    grid-template-columns: 1fr;
  }

  .member-row .field:first-child {
    grid-column: auto;
  }

  .icon-button {
    margin-top: 0;
  }

  .actions-between {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .right {
    text-align: left;
  }

  .footer-company-line {
    justify-content: flex-start;
  }
}
