.analyzer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 1rem;
  align-items: start;
}

.tool-card,
.info-card,
.results-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--mn-surface-strong), rgba(255,255,255,0.72));
  border: 1px solid rgba(124, 58, 237, 0.12);
  box-shadow: 0 12px 28px rgba(76, 29, 149, 0.08);
  padding: clamp(1rem, 2vw, 1.25rem);
}

.tool-card::before,
.info-card::before,
.results-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #c8a2ff 0%, #8b5cf6 52%, #6d28d9 100%);
}

.analyzer-form {
  display: grid;
  gap: 1rem;
}

.field-group label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0 0 0.35rem;
  color: #2b2140;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
}

.field-hint {
  color: var(--mn-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

textarea,
input[type="number"] {
  width: 100%;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--mn-text);
  font: inherit;
  padding: 0.85rem 0.95rem;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

textarea:focus,
input[type="number"]:focus {
  border-color: var(--mn-border-strong);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

textarea {
  resize: vertical;
  min-height: 210px;
}

.options-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.check-option,
.number-option {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 0.8rem;
  border-radius: 16px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.10);
  color: var(--mn-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.check-option input {
  width: auto;
  accent-color: var(--mn-accent);
}

.number-option {
  align-items: flex-start;
  flex-direction: column;
  gap: 0.4rem;
}

.number-option input {
  max-width: 120px;
  padding: 0.55rem 0.7rem;
}

.mn-button {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 0.82rem 1rem;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, var(--mn-accent), var(--mn-accent-dark));
  box-shadow: 0 12px 22px rgba(109, 40, 217, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.mn-button:hover,
.mn-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(109, 40, 217, 0.24);
  outline: none;
}

.mn-button.secondary {
  color: var(--mn-accent-dark);
  background: rgba(139, 92, 246, 0.11);
  box-shadow: none;
  border: 1px solid rgba(124, 58, 237, 0.14);
}

.mn-button.secondary:hover,
.mn-button.secondary:focus-visible {
  background: rgba(139, 92, 246, 0.16);
  box-shadow: 0 12px 24px rgba(76, 29, 149, 0.08);
}

.info-card h2,
.results-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: #281f37;
  letter-spacing: -0.01em;
}

.info-card p,
.results-heading p {
  margin: 0 0 0.85rem;
  color: var(--mn-muted);
  font-size: 0.95rem;
}

.info-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-list li {
  padding: 0.72rem 0.8rem;
  border-radius: 16px;
  background: rgba(139, 92, 246, 0.08);
  color: var(--mn-muted);
  font-size: 0.92rem;
  border: 1px solid rgba(124, 58, 237, 0.10);
}

.results-card {
  margin-top: 1rem;
}

.results-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.results-heading h2 {
  margin: 0;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.tab {
  border: 1px solid rgba(124, 58, 237, 0.14);
  border-radius: 999px;
  padding: 0.7rem 0.85rem;
  color: var(--mn-accent-dark);
  background: rgba(139, 92, 246, 0.10);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.tab:hover,
.tab:focus-visible {
  transform: translateY(-2px);
  background: rgba(139, 92, 246, 0.16);
  outline: none;
}

.tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--mn-accent), var(--mn-accent-dark));
  box-shadow: 0 12px 22px rgba(109, 40, 217, 0.16);
}

.panel {
  display: none;
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(124, 58, 237, 0.12);
  background: rgba(255, 255, 255, 0.62);
}

.panel.active {
  display: block;
}

table {
  width: 100%;
  border-collapse: collapse;
}

td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid rgba(124, 58, 237, 0.10);
  color: var(--mn-muted);
  font-size: 0.92rem;
  vertical-align: top;
}

tr:last-child td {
  border-bottom: 0;
}

td:first-child {
  color: #2b2140;
  font-weight: 800;
}

td:last-child {
  text-align: right;
  overflow-wrap: anywhere;
}

.copy-view {
  width: auto;
  min-width: 180px;
  margin-top: 1rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  color: var(--mn-accent-dark);
  background: rgba(139, 92, 246, 0.10);
  font-size: 0.88rem;
  font-weight: 800;
}

.back-link:hover,
.back-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
  outline: none;
}

@media (max-width: 900px) {
  .analyzer-layout {
    grid-template-columns: 1fr;
  }

  .options-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-group label {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .copy-view {
    width: 100%;
  }

  td:last-child {
    text-align: left;
  }
}