/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f7f9fc;
  color: #0f172a;
  margin: 0;
  padding: 0;
}

.app-header {
  display: flex;
  justify-content: center;
  padding: 2rem 1.5rem 1rem;
}

.app-header-inner {
  width: 100%;
  max-width: 1080px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
}

.app-logo {
  margin-right: auto;
  display: flex;
  align-items: center;
}

.app-logo-image {
  height: 42px;
  width: auto;
  display: block;
}

.app-main {
  display: flex;
  justify-content: center;
  padding: 0 1.5rem 4rem;
}

.app-main .container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 0;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.language-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.language-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 0.55rem 2.5rem 0.55rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: #ffffff;
  font-weight: 600;
  color: #0f172a;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.language-select:hover {
  border-color: rgba(37, 99, 235, 0.5);
}

.language-select:focus {
  outline: 3px solid rgba(37, 99, 235, 0.2);
  outline-offset: 2px;
}

.language-select-icon {
  position: absolute;
  right: 0.9rem;
  pointer-events: none;
  color: #64748b;
  font-size: 0.75rem;
}

.welcome-card {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 35px 65px rgba(15, 23, 42, 0.10);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.welcome-card__header h1 {
  margin: 0;
  font-size: 2.75rem;
  font-weight: 700;
}

.welcome-card__header p {
  margin: 0.75rem 0 0;
  color: #475569;
  font-size: 1.125rem;
  line-height: 1.8;
}

.welcome-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.welcome-feature {
  background: #f5f7ff;
  border-radius: 18px;
  padding: 1.5rem;
  border: 1px solid rgba(59, 130, 246, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 160px;
}

.welcome-feature__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(99, 102, 241, 0.18));
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.welcome-feature__icon svg {
  width: 24px;
  height: 24px;
}

.welcome-feature h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #111827;
}

.welcome-feature p {
  margin: 0;
  color: #4b5563;
  line-height: 1.6;
}

.welcome-why {
  border-radius: 20px;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0.04));
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.welcome-why h2 {
  margin: 0 0 1.5rem;
  font-size: 1.35rem;
}

.welcome-why__lists {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem 2.5rem;
}

.welcome-why__lists ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.welcome-why__lists li {
  position: relative;
  padding-left: 1.75rem;
  color: #1e293b;
}

.welcome-why__lists li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.45);
}

.welcome-why__lists li::after {
  content: "";
  position: absolute;
  left: 0.32rem;
  top: 0.55rem;
  width: 0.5rem;
  height: 0.3rem;
  border: 2px solid #2563eb;
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg);
}

.welcome-duration {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
}

.welcome-duration h3 {
  margin: 0 0 0.5rem;
  color: #1d4ed8;
  font-size: 1.125rem;
}

.welcome-duration p {
  margin: 0;
  color: #1e293b;
}

.welcome-actions {
  display: flex;
}

.welcome-start-form {
  width: 100%;
  margin: 0;
}

.welcome-start-button {
  width: 100%;
  font-size: 1.05rem;
  padding: 1rem 1.5rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 22px 40px rgba(37, 99, 235, 0.25);
}

.welcome-start-button:hover {
  box-shadow: 0 26px 50px rgba(37, 99, 235, 0.28);
}

.welcome-footnote {
  margin: 0;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .app-header-inner {
    justify-content: space-between;
  }

  .welcome-card {
    padding: 2.25rem 2rem;
  }

  .welcome-card__header h1 {
    font-size: 2.3rem;
  }
}

@media (max-width: 600px) {
  .app-header {
    padding: 1.5rem 1.25rem 0.5rem;
  }

  .app-main {
    padding: 0 1rem 3rem;
  }

  .app-main .container {
    padding: 1.5rem 0 0;
  }

  .welcome-card {
    padding: 1.75rem 1.5rem;
    border-radius: 20px;
  }

  .welcome-card__header h1 {
    font-size: 2rem;
  }

  .welcome-feature {
    min-height: auto;
  }
}

.card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 2rem;
}

.card h1,
.card h2,
.card h3 {
  margin-top: 0;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.question-domain {
  margin: 0;
  font-size: 1.5rem;
}

.question-article {
  margin: 0.25rem 0 0;
  color: #475569;
}

.question-progress {
  margin: 1.5rem 0;
}

.question-index {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #64748b;
}

.question-title {
  margin-top: 1rem;
  color: #0f172a;
}

.actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background-color: #2563eb;
  color: #ffffff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 25px rgba(37, 99, 235, 0.25);
}

.button-secondary {
  background-color: #0f172a;
}

.button-outline {
  background-color: transparent;
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.4);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-group label {
  font-weight: 600;
  color: #1e293b;
}

.form-control,
.form-select,
.form-textarea {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 0.75rem;
  font-size: 1rem;
  color: #1e293b;
  background-color: #ffffff;
}

.form-textarea {
  min-height: 120px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-critical {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

.badge-high {
  background: rgba(245, 158, 11, 0.18);
  color: #b45309;
}

.badge-medium {
  background: rgba(59, 130, 246, 0.15);
  color: #1d4ed8;
}

.badge-low {
  background: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

.question-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar .progress {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #8b5cf6);
  border-radius: 999px;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.8rem;
}

.status-success {
  background: rgba(22, 163, 74, 0.18);
  color: #15803d;
}

.status-warning {
  background: rgba(245, 158, 11, 0.18);
  color: #b45309;
}

.status-danger {
  background: rgba(239, 68, 68, 0.18);
  color: #b91c1c;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.table th,
.table td {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  text-align: left;
}

.table th {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: #475569;
}

.alert {
  border-radius: 12px;
  padding: 1rem 1.25rem;
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  margin-bottom: 1.5rem;
}

.recommendation {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(241, 245, 249, 0.6);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.question-option {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #f8fafc;
  padding: 1.25rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.question-option:hover {
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(241, 245, 255, 0.9);
}

.question-option.selected {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.12);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.15);
}

.option-radio {
  margin-top: 0.2rem;
  flex-shrink: 0;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, 0.8);
  background: #ffffff;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.option-radio:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.option-radio:checked {
  border-color: #2563eb;
}

.option-radio:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
}

.option-content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.option-title {
  font-weight: 600;
  color: #0f172a;
}

.option-description {
  margin: 0;
  color: #475569;
  line-height: 1.45;
}

.notes-field {
  margin-top: 2rem;
}

.notes-field .field-hint {
  color: #94a3b8;
}

.results-page {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.results-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.results-header h1 {
  margin: 0;
  font-size: 2.25rem;
}

.results-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.75rem 0 0;
  color: #64748b;
  font-size: 0.95rem;
}

.results-meta__org {
  font-weight: 600;
  color: #1e293b;
}

.results-meta__dot {
  color: #cbd5f5;
}

.results-entity {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
  font-weight: 600;
}

.results-summary {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.results-metric {
  background: #ffffff;
  border-radius: 22px;
  padding: 1.75rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 25px 45px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.results-metric__icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(59, 130, 246, 0.06));
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.results-metric__icon svg {
  width: 24px;
  height: 24px;
}

.results-metric h2 {
  margin: 0;
  font-size: 1.15rem;
}

.results-metric__subtitle {
  margin: 0.25rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.results-metric__value {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.results-metric__value strong {
  font-size: 2.5rem;
  line-height: 1;
}

.results-metric__value span {
  color: #64748b;
  font-size: 0.95rem;
}

.results-metric__note {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
}

.results-metric__progress {
  width: 100%;
  height: 8px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  overflow: hidden;
}

.results-metric__progress-bar {
  width: var(--metric-value, 0%);
  height: 100%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.results-metric__badge {
  align-self: flex-start;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.results-metric__badge--warning {
  background: rgba(251, 191, 36, 0.18);
  color: #b45309;
}

.results-metric__badge--success {
  background: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

.results-status {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(56, 189, 248, 0.08));
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 20px;
  padding: 1.5rem 1.75rem;
}

.results-status h2 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.results-status__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.results-status__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.results-analytics {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.analytics-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.analytics-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.analytics-card p {
  margin: 0.4rem 0 0;
  color: #64748b;
  font-size: 0.92rem;
}

.analytics-card__body {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.analytics-empty {
  margin: 0;
  color: #64748b;
  font-style: italic;
}

.radar-chart {
  width: 100%;
  max-width: 320px;
  height: auto;
}

.radar-grid {
  fill: rgba(37, 99, 235, 0.05);
  stroke: rgba(37, 99, 235, 0.2);
}

.radar-axis {
  stroke: rgba(15, 23, 42, 0.12);
}

.radar-value {
  fill: rgba(59, 130, 246, 0.25);
  stroke: rgba(37, 99, 235, 0.9);
  stroke-width: 1.6;
}

.radar-center {
  fill: rgba(37, 99, 235, 0.8);
}

.radar-label {
  font-size: 0.62rem;
  fill: #1f2937;
}

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

.gap-item__header {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.gap-item__value {
  color: #dc2626;
}

.gap-item__bar {
  position: relative;
  margin-top: 0.5rem;
  height: 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.gap-item__bar-current {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--gap-score, 0%);
  background: linear-gradient(90deg, #2563eb, #7c3aed);
}

.gap-item__bar-threshold {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--gap-threshold, 0%);
  border-right: 2px dashed rgba(15, 23, 42, 0.35);
}

.results-domains {
  background: #ffffff;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.results-domains header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.results-domains header p {
  margin: 0.3rem 0 0;
  color: #64748b;
}

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

.domain-list__item {
  display: grid;
  grid-template-columns: minmax(200px, 2fr) minmax(200px, 3fr) minmax(160px, 1fr);
  gap: 1rem;
  align-items: center;
}

.domain-list__label {
  font-weight: 600;
  color: #1f2937;
}

.domain-list__bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.domain-list__bar::before {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--domain-score, 0%);
  background: linear-gradient(90deg, #2563eb, #7c3aed);
}

.domain-list__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--domain-threshold, 0%);
  border-right: 2px dashed rgba(15, 23, 42, 0.35);
}

.domain-list__metrics {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  font-weight: 600;
}

.domain-list__gap {
  color: #dc2626;
}

.domain-list__met {
  color: #16a34a;
}

.results-recommendations,
.results-assist,
.results-download {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.results-recommendations header h2,
.results-assist header h2,
.results-download header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.results-recommendations header p,
.results-assist header p,
.results-download header p {
  margin: 0.3rem 0 0;
  color: #64748b;
  font-size: 0.95rem;
}

.recommendation-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.75rem;
}

.assist-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.assist-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  font-weight: 600;
}

.assist-details {
  list-style: none;
  margin: 0;
  padding: 0;
  color: #475569;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.results-download__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

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

  .domain-list__metrics {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .results-header h1 {
    font-size: 1.9rem;
  }

  .results-metric {
    padding: 1.5rem;
  }

  .results-domains {
    padding: 1.5rem;
  }

  .results-recommendations,
  .results-assist,
  .results-download {
    padding: 1.5rem;
  }
}
