:root {
  color-scheme: light;
  --bg: #f7f8fc;
  --card: #ffffff;
  --primary: #1e3a8a;
  --secondary: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #38bdf8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--secondary);
  line-height: 1.6;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

.site-header {
  background: linear-gradient(120deg, #0f172a, #1e3a8a);
  color: #fff;
  padding: 36px 0 28px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: #c7d2fe;
  margin-bottom: 8px;
}

.subtitle {
  max-width: 520px;
  color: #e2e8f0;
  margin-top: 8px;
}

.header-badge {
  background: rgba(255, 255, 255, 0.15);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  align-self: center;
}

.lang-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lang-toggle a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-toggle a.active {
  background: rgba(255, 255, 255, 0.2);
}

.main-layout {
  padding: 32px 0 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card,
.wizard-card {
  background: var(--card);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.card h2,
.wizard-card h2 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 12px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-weight: 600;
  font-size: 0.95rem;
}

input,
select,
textarea {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
  font-family: "Inter", sans-serif;
}

textarea {
  resize: vertical;
}

input:disabled {
  background: #f1f5f9;
}

small {
  font-size: 0.78rem;
  color: var(--muted);
}

.loading-text {
  min-height: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0f172a;
}

.loading-text::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #cbd5f5;
  border-top-color: #1e3a8a;
  animation: spin 0.8s linear infinite;
  opacity: 0;
}

.loading-text.is-loading::before {
  opacity: 1;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.module-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.module-card::after,
.has-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(100% + 8px);
  background: #0f172a;
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: pre-line;
  z-index: 10;
}

.module-card.show-tooltip::after,
.has-tooltip.show-tooltip::after {
  opacity: 1;
  transform: translateY(0);
}

.module-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.module-title h4 {
  font-size: 1rem;
}

.module-price {
  font-weight: 700;
  color: var(--primary);
}

.tag {
  background: #e0f2fe;
  color: #0369a1;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.summary-box {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: #f8fafc;
}

.summary-box h4 {
  margin-bottom: 8px;
}

.summary-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

.summary-item strong {
  color: var(--primary);
}

.selected-modules {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.9rem;
}

.selected-modules span {
  background: #e2e8f0;
  border-radius: 8px;
  padding: 6px 10px;
}

.cta-row {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.primary-btn,
.ghost-btn {
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.primary-btn {
  background: var(--primary);
  color: #fff;
}

.primary-btn:hover {
  background: #1d4ed8;
}

.ghost-btn {
  background: #e2e8f0;
  color: #0f172a;
}

.ghost-btn:hover {
  background: #cbd5f5;
}

.toast {
  opacity: 0;
  transition: opacity 0.3s ease;
  color: #16a34a;
  font-weight: 600;
}

.toast.show {
  opacity: 1;
}

.terms-list {
  margin-top: 12px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
}

.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
}

.wizard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.wizard-progress {
  display: flex;
  gap: 8px;
}

.wizard-overview {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.wizard-overview.simple {
  justify-content: center;
}

.wizard-visual {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
  width: min(900px, 100%);
}

.wizard-visual.large {
  width: min(1100px, 100%);
}

.wizard-visual img {
  width: 100%;
  max-width: 980px;
  border-radius: 18px;
  object-fit: cover;
}

.visual-caption {
  font-size: 0.95rem;
  color: var(--muted);
}

.step-indicator {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #475569;
  font-weight: 600;
}

.step-indicator.active {
  background: var(--primary);
  color: #fff;
}

.wizard-step {
  display: none;
  animation: fadeIn 0.2s ease;
}

.wizard-step.active {
  display: block;
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
}

.query-table {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.query-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1.6fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
}

.has-tooltip {
  position: relative;
}

.module-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0369a1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

.query-row input {
  width: 100%;
}

.query-control {
  display: grid;
  gap: 6px;
}

.query-range {
  accent-color: var(--primary);
}

.info-box {
  margin-top: 16px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #1e3a8a;
}

.info-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 14px;
  width: min(520px, 92%);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notice-content {
  width: min(640px, 92%);
  flex-direction: row;
  gap: 18px;
  align-items: center;
}

.notice-visual img {
  width: 180px;
  border-radius: 14px;
}

.notice-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@media (max-width: 900px) {
  .wizard-visual {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
  }
  .header-badge {
    align-self: flex-start;
  }
  .wizard-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .query-row {
    grid-template-columns: 1fr;
  }
  .lang-toggle {
    margin-top: 10px;
  }
  .notice-content {
    flex-direction: column;
    text-align: center;
  }
}
