:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1e2432;
  --muted: #5c6678;
  --border: #d9dee8;
  --accent: #5e81ac;
  --accent-justice: #a3be8c;
  --accent-place: #b48ead;
  --accent-neutral: #cbd2dc;
  --shadow: 0 18px 40px rgba(35, 52, 76, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Open Sans", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
}

a:focus,
button:focus,
input:focus,
select:focus {
  outline: 3px solid rgba(94, 129, 172, 0.35);
  outline-offset: 2px;
}

header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

header .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand .meta {
  display: flex;
  flex-direction: column;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-weight: 600;
}

nav a {
  text-decoration: none;
  color: var(--muted);
}

nav a.active,
nav a:hover {
  color: var(--text);
}

main {
  padding: 2rem 0 4rem;
}

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

.hero {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
}

.hero-card {
  background: var(--card);
  border-radius: 5px;
  border: 1px solid var(--border);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(94, 129, 172, 0.12);
  color: #2f3c55;
  padding: 0.35rem 0.75rem;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: 600;
}

.section {
  margin-top: 2.5rem;
}

.section h2 {
  margin-top: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--muted);
}

.card {
  background: var(--card);
  border-radius: 5px;
  border: 1px solid var(--border);
  padding: 1.5rem;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(94, 129, 172, 0.15);
  color: #31435f;
}

.card-icon.check {
  background: rgba(46, 125, 50, 0.15);
  color: #2e7d32;
}

.dimension-card {
  border-left: 4px solid transparent;
}

.dimension-card.time {
  border-left-color: var(--accent);
  background: rgba(94, 129, 172, 0.08);
}

.dimension-card.time .card-icon {
  background: rgba(94, 129, 172, 0.18);
  color: #31435f;
}

.dimension-card.justice {
  border-left-color: var(--accent-justice);
  background: rgba(163, 190, 140, 0.15);
}

.dimension-card.justice .card-icon {
  background: rgba(163, 190, 140, 0.3);
  color: #3e5431;
}

.dimension-card.place {
  border-left-color: var(--accent-place);
  background: rgba(180, 142, 173, 0.15);
}

.dimension-card.place .card-icon {
  background: rgba(180, 142, 173, 0.28);
  color: #5b3f5c;
}

.dimension-card.transversal {
  border-left-color: var(--accent-neutral);
  background: rgba(203, 210, 220, 0.3);
}

.dimension-card.transversal .card-icon {
  background: rgba(203, 210, 220, 0.6);
  color: #49515c;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #1a3a2e;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.cta.secondary {
  background: transparent;
  color: #1a3a2e;
  border: 1px solid #1a3a2e;
}

.cta.ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}

.subtle {
  color: var(--muted);
}

.small {
  font-size: 0.9rem;
}

.icon-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 5px;
  font-weight: 600;
  font-size: 0.85rem;
}

.icon-pill.time {
  background: rgba(94, 129, 172, 0.15);
  color: #31435f;
}

.icon-pill.justice {
  background: rgba(163, 190, 140, 0.2);
  color: #3e5431;
}

.icon-pill.place {
  background: rgba(180, 142, 173, 0.2);
  color: #5b3f5c;
}

.icon-pill.transversal {
  background: rgba(203, 210, 220, 0.4);
  color: #49515c;
}

.questionnaire {
  display: grid;
  gap: 1.5rem;
}

.dimension {
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1.5rem;
  background: var(--card);
}

.dimension-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.dimension-header h3 {
  margin: 0;
}

.question-card {
  border-top: 1px solid var(--border);
  padding: 1rem 0;
}

.question-card:first-of-type {
  border-top: none;
}

.question-card p {
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.scale {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.scale label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.6rem 0.75rem;
  background: #f9fafc;
  cursor: pointer;
}

.scale input {
  accent-color: var(--accent);
}

.progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 5px;
  background: #eef2f7;
  margin-bottom: 1.5rem;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: #d7dde8;
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  width: 0;
}

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

.result-card {
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.25rem;
}

.result-card h4 {
  margin: 0 0 0.75rem;
}

.bar {
  height: 10px;
  background: #dde3ec;
  border-radius: 5px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: 5px;
}

.alert {
  border-left: 4px solid #c26d34;
  background: rgba(251, 230, 212, 0.6);
  padding: 1rem 1.25rem;
  border-radius: 5px;
}

.footer {
  background: #f0f2f7;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer .container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 600;
  color: var(--muted);
}

.language-switch button {
  border: none;
  background: transparent;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}

.language-switch button.active {
  color: var(--text);
}

@media (max-width: 640px) {
  header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    flex-direction: column;
    gap: 0.5rem;
  }

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

@media print {
  header,
  nav,
  .cta,
  .language-switch,
  .footer {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .card,
  .result-card,
  .dimension {
    box-shadow: none;
    border-color: #ccc;
  }
}
