/* Cores e tokens: assets/css/tokens.php (fonte = brand.php). */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--teal-700);
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  color: var(--teal-900);
  text-decoration: underline;
}

.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(var(--teal-500-rgb), 0.28), transparent 55%),
    radial-gradient(900px 500px at 90% 110%, rgba(var(--amber-rgb), 0.18), transparent 50%),
    linear-gradient(160deg, var(--surface-2) 0%, var(--surface) 42%, var(--surface-3) 100%);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.auth-brand {
  position: relative;
  overflow: hidden;
  padding: clamp(1.15rem, 2.5vw, 2rem) clamp(1.15rem, 3vw, 2.5rem);
  background:
    linear-gradient(145deg, rgba(var(--teal-950-rgb), 0.92), rgba(var(--teal-900-rgb), 0.88)),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%237533f9' fill-opacity='0.12'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(160deg, var(--teal-950), var(--teal-900));
  color: var(--on-dark);
  display: flex;
  align-items: flex-end;
}

.brand-glow {
  position: absolute;
  inset: auto -20% -30% auto;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(var(--amber-rgb), 0.35), transparent 65%);
  filter: blur(8px);
  animation: drift 10s ease-in-out infinite alternate;
}

.brand-content {
  position: relative;
  z-index: 1;
  max-width: 34rem;
}

.auth-back-site {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.auth-back-site:hover {
  opacity: 0.85;
}

.auth-back-site-icon {
  flex-shrink: 0;
}

.auth-back-site--brand {
  margin: 0 0 0.55rem;
  color: rgba(244, 251, 249, 0.9);
  border: 1px solid rgba(244, 251, 249, 0.28);
  border-radius: 999px;
  padding: 0.28rem 0.7rem 0.28rem 0.5rem;
  background: rgba(244, 251, 249, 0.08);
  backdrop-filter: blur(4px);
  animation: rise 0.65s ease both;
}

.auth-back-site--brand:hover {
  opacity: 1;
  background: rgba(244, 251, 249, 0.16);
  color: #fff;
}

.auth-title-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0 0 0.4rem;
}

.auth-title-row .auth-title {
  margin: 0;
}

.auth-back-site--card-top {
  color: var(--teal-800);
}

.auth-back-site--card-foot {
  color: var(--teal-800);
  white-space: nowrap;
}

.brand-mark {
  margin: 0 0 0.85rem;
  animation: rise 0.7s ease both;
}

.brand-mark a {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
}

.brand-mark-img {
  display: block;
  height: clamp(5.5rem, 14vw, 8.5rem);
  width: auto;
}

.brand-mark-img--h {
  height: clamp(1.65rem, 3.2vw, 2.15rem);
  width: auto;
  max-width: min(100%, 12.5rem);
}

.brand-headline {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.85rem;
  animation: rise 0.8s 0.08s ease both;
}

.brand-lead {
  margin: 0 0 1.75rem;
  color: rgba(244, 251, 249, 0.82);
  font-size: 1.02rem;
  max-width: 30rem;
  animation: rise 0.8s 0.14s ease both;
}

.brand-flow {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0;
  margin: 0;
  animation: rise 0.8s 0.2s ease both;
}

.brand-flow li {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(244, 251, 249, 0.22);
  background: rgba(244, 251, 249, 0.08);
  backdrop-filter: blur(4px);
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.auth-card {
  width: min(100%, 440px);
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  animation: rise 0.55s ease both;
}

.auth-kicker {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--teal-700);
  letter-spacing: -0.02em;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.4rem;
}

.auth-subtitle {
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.auth-foot {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.8rem;
  margin: 1.25rem 0 0;
}

.form-stack {
  display: grid;
  gap: 0.95rem;
}

.field label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.field textarea {
  display: block;
  min-height: 10rem;
  line-height: 1.5;
  resize: vertical;
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
  font-size: 0.9rem;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(var(--teal-500-rgb), 0.15);
}

.code-input {
  font-size: 1.45rem !important;
  letter-spacing: 0.35em;
  text-align: center;
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 0.95rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn[hidden] {
  display: none !important;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--teal-900), var(--teal-700));
  color: #fff;
  box-shadow: 0 10px 24px rgba(var(--teal-900-rgb), 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--teal-950), var(--teal-900));
}

.btn-accent {
  background: linear-gradient(135deg, var(--amber-deep), var(--amber));
  color: #1a1400;
  box-shadow: 0 10px 24px rgba(196, 133, 10, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--teal-700);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: var(--mint-50);
}

.auth-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.auth-links-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.alert {
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.alert-error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #fecdca;
}

.alert-success {
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid #abefc6;
}

.alert-info {
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid #b2ddff;
}

.hint {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: 0;
}

.timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--teal-700);
}

/* Painel autenticado */
.app-shell {
  min-height: 100vh;
  background:
    radial-gradient(800px 400px at 0% 0%, rgba(var(--teal-500-rgb), 0.12), transparent 50%),
    var(--surface);
}

.app-menu-toggle {
  position: fixed;
  top: 0.45rem;
  left: 0.7rem;
  z-index: 60;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(var(--teal-950-rgb), 0.12);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.app-menu-toggle:hover {
  background: #fff;
  box-shadow: 0 10px 28px rgba(var(--teal-950-rgb), 0.16);
}

.app-menu-toggle:active {
  transform: scale(0.97);
}

.app-menu-bars {
  display: grid;
  gap: 5px;
  width: 1.15rem;
}

.app-menu-bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--teal-900);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

body.is-nav-open .app-menu-bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.is-nav-open .app-menu-bars span:nth-child(2) {
  opacity: 0;
}

body.is-nav-open .app-menu-bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.app-side-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(var(--teal-950-rgb), 0.42);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

body.is-nav-open .app-side-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.app-side {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: min(20rem, 88vw);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, var(--teal-900) 0%, var(--teal-950) 100%);
  color: var(--on-dark);
  transform: translateX(-105%);
  transition: transform 0.28s ease;
  box-shadow: 16px 0 40px rgba(0, 0, 0, 0.2);
}

body.is-nav-open .app-side {
  transform: translateX(0);
}

.app-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem 0.65rem 1rem;
  border-bottom: 1px solid rgba(244, 251, 249, 0.12);
}

.app-side-brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  color: #fff;
  text-decoration: none;
}

.app-side-brand:hover {
  color: #fff;
  text-decoration: none;
}

.app-side-brand .app-brand-img {
  display: block;
  height: 1.55rem;
  width: auto;
  max-width: 8.5rem;
}

.app-side-close {
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.app-side-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.app-side-nav {
  flex: 1;
  overflow: auto;
  padding: 0.75rem 0.7rem;
  display: grid;
  gap: 0.35rem;
  align-content: start;
}

.app-side-link {
  display: grid;
  gap: 0.15rem;
  padding: 0.8rem 0.85rem;
  border-radius: 12px;
  color: rgba(244, 251, 249, 0.88);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.app-side-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
}

.app-side-link.is-active {
  background: rgba(var(--teal-500-rgb), 0.28);
  border-color: rgba(var(--teal-500-rgb), 0.45);
  color: #fff;
}

.app-side-link.is-soon {
  opacity: 0.72;
}

.app-side-label {
  font-size: 0.95rem;
}

.app-side-hint {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(244, 251, 249, 0.62);
}

.app-side-soon {
  justify-self: start;
  margin-top: 0.2rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: rgba(var(--amber-rgb), 0.2);
  color: var(--amber-soft);
}

.app-side-foot {
  padding: 1rem 1.15rem 1.25rem;
  border-top: 1px solid rgba(244, 251, 249, 0.12);
  display: grid;
  gap: 0.45rem;
}

.app-side-user {
  margin: 0;
  font-size: 0.84rem;
  color: rgba(244, 251, 249, 0.7);
}

.app-side-logout {
  color: var(--amber-soft);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.92rem;
}

.app-side-logout:hover {
  color: #fff;
  text-decoration: underline;
}

body.is-nav-open {
  overflow: hidden;
}

.app-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem clamp(0.85rem, 3vw, 1.5rem);
  padding-left: 3.75rem;
  min-height: 3.15rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.app-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  color: var(--teal-900);
  text-decoration: none;
}

.app-logo .app-brand-img {
  display: block;
  height: 1.55rem;
  width: auto;
  max-width: 8.5rem;
}

.app-user {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.app-credits {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--mint-100);
  border: 1px solid rgba(var(--teal-500-rgb), 0.25);
  color: var(--teal-900);
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.app-credits:hover {
  background: var(--mint-200);
  border-color: var(--teal-500);
  color: var(--teal-950);
  text-decoration: none;
}

.app-credits-value {
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.app-credits-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal-700);
}

.app-side-credits {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--amber-soft);
  text-decoration: none;
}

.app-side-credits:hover {
  color: #fff;
  text-decoration: underline;
}

.app-main {
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.app-main-wide {
  max-width: 1100px;
}

.hero-panel {
  background:
    linear-gradient(135deg, rgba(var(--teal-900-rgb), 0.96), rgba(var(--teal-700-rgb), 0.9)),
    var(--teal-900);
  color: var(--on-dark);
  border-radius: 22px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  animation: rise 0.55s ease both;
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -10%;
  top: -30%;
  width: 45%;
  height: 140%;
  background: radial-gradient(circle, rgba(var(--amber-rgb), 0.35), transparent 60%);
}

.hero-panel h1 {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.03em;
}

.hero-panel p {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 36rem;
  color: rgba(244, 251, 249, 0.85);
}

/* ?? Gamifica??o (home) ?? */
.game-home {
  margin-bottom: 1.75rem;
  animation: rise 0.6s 0.05s ease both;
}

.game-profile {
  display: grid;
  grid-template-columns: auto 1fr minmax(160px, 220px);
  gap: 1.15rem;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(var(--teal-900-rgb), 0.96), rgba(var(--teal-700-rgb), 0.92)),
    var(--teal-900);
  color: var(--on-dark);
  border-radius: 20px;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.25rem;
}

.game-avatar {
  position: relative;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--amber), var(--amber-soft));
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.game-avatar-letter {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--teal-950);
}

.game-avatar-level {
  position: absolute;
  bottom: -0.25rem;
  right: -0.25rem;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: #fff;
  color: var(--teal-900);
}

.game-profile-body h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin: 0 0 0.2rem;
  letter-spacing: -0.03em;
}

.game-profile .game-kicker {
  color: rgba(244, 251, 249, 0.65);
}

.game-status-label {
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
  color: var(--amber-soft);
  font-weight: 600;
}

.game-profile-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  font-size: 0.82rem;
  color: rgba(244, 251, 249, 0.78);
}

.game-profile-stats strong {
  color: #fff;
}

.game-ranking {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(244, 251, 249, 0.14);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
}

.game-ranking-title {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244, 251, 249, 0.65);
}

.game-ranking-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.game-ranking-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.78rem;
  color: rgba(244, 251, 249, 0.85);
}

.game-ranking-item.is-me {
  color: #fff;
  font-weight: 700;
}

.game-ranking-pos {
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

.game-ranking-pts {
  font-variant-numeric: tabular-nums;
  color: var(--amber-soft);
  font-weight: 700;
}

.game-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  margin: 0 0 0.25rem;
  letter-spacing: -0.03em;
}

.game-seals {
  margin-bottom: 1rem;
}

.seal-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.55rem;
}

.seal-card {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem 0.8rem;
  border-radius: 14px;
  border: 1px dashed var(--line);
  background: #fbfdfc;
}

.seal-card.is-earned {
  border-style: solid;
  border-color: var(--mint-300);
  background: linear-gradient(160deg, var(--mint-150), #fff);
}

.seal-card.is-locked {
  opacity: 0.5;
}

.seal-domain {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-700);
}

.seal-title {
  font-weight: 700;
  font-size: 0.88rem;
}

.seal-desc {
  font-size: 0.74rem;
  color: var(--ink-soft);
  line-height: 1.35;
}

.game-home-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.game-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-700);
}

.game-home-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  margin: 0 0 0.25rem;
  letter-spacing: -0.03em;
}

.game-lead {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.game-points {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  min-width: 4.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff8e8, #fff);
  border: 1px solid #f0d79a;
  box-shadow: 0 8px 20px rgba(196, 133, 10, 0.12);
}

.game-points-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.45rem;
  color: var(--amber-deep);
  line-height: 1;
}

.game-points-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.game-evo {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.15rem 1.25rem 1.25rem;
  margin-bottom: 1rem;
}

.game-evo-main {
  display: flex;
  gap: 1.15rem;
  align-items: center;
  margin-bottom: 1.1rem;
}

.game-level-ring {
  --pct: 0;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 50%;
  background: conic-gradient(var(--teal-500) calc(var(--pct) * 1%), var(--mint-400) 0);
  display: grid;
  place-items: center;
  animation: pulse-soft 3.2s ease-in-out infinite;
}

.game-level-ring-inner {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 0.1rem;
}

.game-level-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--teal-900);
  line-height: 1.1;
}

.game-level-title {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  max-width: 4.5rem;
  margin: 0 auto;
  line-height: 1.2;
}

.game-evo-copy {
  flex: 1;
  min-width: 0;
}

.game-evo-label {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-700);
}

.game-evo-xp {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.game-evo-xp strong {
  color: var(--ink);
}

.game-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--mint-400);
  overflow: hidden;
  margin-bottom: 0.45rem;
}

.game-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal-700), var(--teal-500));
  transition: width 0.45s ease;
}

.game-evo-meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.game-journey {
  list-style: none;
  margin: 0;
  padding: 0.85rem 0 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
  border-top: 1px solid var(--line);
}

.game-journey-item {
  display: grid;
  gap: 0.25rem;
  justify-items: center;
  text-align: center;
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.game-journey-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c9d8d5;
  box-shadow: 0 0 0 3px #eef4f3;
}

.game-journey-item.is-active .game-journey-dot {
  background: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(var(--teal-500-rgb), 0.2);
}

.game-journey-item.is-done .game-journey-dot {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(var(--amber-rgb), 0.22);
}

.game-journey-item.is-done .game-journey-name,
.game-journey-item.is-active .game-journey-name {
  color: var(--ink);
  font-weight: 700;
}

.game-journey-name {
  font-weight: 600;
}

.game-journey-pct {
  font-variant-numeric: tabular-nums;
}

.game-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 1rem;
}

.game-side {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.game-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.1rem 1.15rem 1.2rem;
}

.game-panel-head {
  margin-bottom: 0.85rem;
}

.game-panel-head h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.2rem;
  letter-spacing: -0.02em;
}

.game-panel-head p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.mission-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.mission-item {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.75rem 0.8rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fbfdfc;
  transition: border-color 0.15s, background 0.15s;
}

.mission-item.is-done {
  background: var(--ok-bg);
  border-color: #abefc6;
}

.mission-form {
  margin: 0;
  padding-top: 0.1rem;
}

.mission-check {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.mission-check:disabled {
  cursor: default;
}

.mission-box {
  display: grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 8px;
  border: 2px solid var(--teal-500);
  background: #fff;
  color: var(--ok);
  font-weight: 800;
  font-size: 0.85rem;
  transition: background 0.15s, border-color 0.15s;
}

.mission-item.is-done .mission-box {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}

.mission-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  align-items: center;
  margin-bottom: 0.15rem;
}

.mission-stage {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal-700);
}

.mission-reward {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ok);
}

.mission-reward.is-pending {
  color: var(--amber-deep);
}

.mission-auto {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
}

.mission-title {
  margin: 0 0 0.15rem;
  font-weight: 700;
  font-size: 0.94rem;
}

.mission-item.is-done .mission-title {
  text-decoration: line-through;
  color: var(--ink-soft);
}

.mission-desc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.badge-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}

.badge-card {
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem 0.75rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #f8fbfa;
  min-height: 5.5rem;
}

.badge-card.is-locked {
  opacity: 0.48;
  filter: grayscale(0.35);
}

.badge-card.is-earned {
  border-color: #cfe8e3;
  background: linear-gradient(160deg, var(--mint-150), #fff);
  box-shadow: 0 6px 16px rgba(var(--teal-900-rgb), 0.06);
}

.badge-icon {
  font-size: 1.05rem;
  color: var(--teal-700);
  font-weight: 800;
}

.badge-title {
  font-weight: 700;
  font-size: 0.84rem;
}

.badge-desc {
  font-size: 0.74rem;
  color: var(--ink-soft);
  line-height: 1.35;
}

.medal-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.medal-card {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.8rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fbfdfc;
}

.medal-card.is-locked {
  opacity: 0.45;
  filter: grayscale(0.4);
}

.medal-disc {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  flex-shrink: 0;
  border: 3px solid #ccc;
  background: radial-gradient(circle at 35% 30%, #fff, #ddd 55%, #bbb);
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.12);
}

.medal-card.tier-bronze .medal-disc {
  border-color: #b87333;
  background: radial-gradient(circle at 35% 30%, #f3d5b5, #cd7f32 55%, #8a5418);
}

.medal-card.tier-silver .medal-disc {
  border-color: #8a949e;
  background: radial-gradient(circle at 35% 30%, #fff, #c0c0c0 55%, #7a828a);
}

.medal-card.tier-gold .medal-disc {
  border-color: var(--amber-deep);
  background: radial-gradient(circle at 35% 30%, #fff4d0, var(--amber) 55%, #a66f08);
}

.medal-card.is-earned {
  border-color: #f0d79a;
  background: linear-gradient(160deg, #fffaf0, #fff);
}

.medal-title {
  margin: 0 0 0.15rem;
  font-weight: 700;
  font-size: 0.88rem;
}

.medal-desc {
  margin: 0;
  font-size: 0.76rem;
  color: var(--ink-soft);
  line-height: 1.35;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.module-tile {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem;
  animation: rise 0.6s ease both;
}

.module-tile.is-active {
  border-color: var(--mint-300);
  background: linear-gradient(160deg, var(--mint-150), #fff);
}

.module-tile h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0 0 0.35rem;
}

.module-tile p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.module-tile:nth-child(2) { animation-delay: 0.05s; }
.module-tile:nth-child(3) { animation-delay: 0.1s; }
.module-tile:nth-child(4) { animation-delay: 0.15s; }
.module-tile:nth-child(5) { animation-delay: 0.2s; }
.module-tile:nth-child(6) { animation-delay: 0.25s; }

.module-tile a {
  color: inherit;
  text-decoration: none;
}

.module-tile-link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  height: 100%;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.module-tile-link:hover {
  border-color: var(--teal-500);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 24px rgba(var(--teal-900-rgb), 0.08);
}

.module-tile-link:hover h3 {
  color: var(--teal-700);
}

.module-tile-link:focus-visible {
  outline: 3px solid rgba(var(--teal-500-rgb), 0.35);
  outline-offset: 2px;
}

.admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.admin-filters a {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  background: #fff;
}

.admin-filters a.is-active,
.admin-filters a:hover {
  border-color: var(--teal-500);
  color: var(--teal-900);
  background: var(--mint-100);
}

.admin-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.admin-card h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 1rem;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  align-items: end;
}

.admin-form .btn {
  width: auto;
  min-width: 8rem;
}

.admin-form select,
.admin-form textarea,
.admin-row-form input,
.admin-row-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  background: #fff;
}

.admin-form textarea {
  grid-column: 1 / -1;
  resize: vertical;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.7rem 0.55rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.admin-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  white-space: nowrap;
}

.prompt-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.prompt-key {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: #f0f5f4;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
}

.prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.prompt-editor {
  margin-top: 0.35rem;
}

.prompt-textarea {
  display: block;
  width: 100% !important;
  max-width: 100%;
  min-height: 14rem;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink);
  background:
    linear-gradient(180deg, var(--mint-150) 0%, var(--surface) 100%);
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  tab-size: 2;
}

.prompt-textarea--base {
  min-height: 18rem;
}

.prompt-textarea--criterion {
  min-height: 12rem;
}

.prompt-textarea:hover {
  border-color: #b7cbc7;
  background: #fff;
}

.prompt-textarea:focus {
  outline: none;
  border-color: var(--teal-500);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(var(--teal-500-rgb), 0.15);
}

.prompt-default-peek {
  margin-top: 0.85rem;
}

.prompt-default-peek summary {
  cursor: pointer;
  color: var(--teal-700);
  font-weight: 600;
  font-size: 0.9rem;
}

.prompt-default-pre {
  margin: 0.65rem 0 0;
  padding: 0.85rem 1rem;
  background: #f4f8f7;
  border: 1px solid var(--line);
  border-radius: 10px;
  white-space: pre-wrap;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--ink-soft);
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
}

@media (max-width: 720px) {
  .prompt-textarea,
  .prompt-textarea--base,
  .prompt-textarea--criterion {
    min-height: 10rem;
    font-size: 0.86rem;
  }
}

.tag {
  display: inline-flex;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--mint-100);
  color: var(--teal-700);
  font-size: 0.75rem;
  font-weight: 800;
}

.tag-accent {
  background: #fff4d6;
  color: #8a5a00;
}

.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font: inherit;
  background: #fff;
}

.app-nav {
  display: none;
}

.crumb {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0 0 1rem;
}

.track-list {
  display: grid;
  gap: 1rem;
}

.track-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: end;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
  animation: rise 0.5s ease both;
}

.track-card .btn {
  width: auto;
  min-width: 8.5rem;
  padding: 0.75rem 1rem;
}

.track-card h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.track-card h2 a {
  color: var(--ink);
  text-decoration: none;
}

.track-card h2 a:hover {
  color: var(--teal-700);
}

.track-card p {
  margin: 0 0 0.6rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.track-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--mint-100);
  color: var(--teal-700);
  font-size: 0.75rem;
  font-weight: 700;
}

.progress-bar {
  height: 8px;
  background: var(--mint-400);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal-700), var(--teal-500));
  border-radius: inherit;
}

.track-progress-head {
  margin-bottom: 1.25rem;
}

.enroll-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.enroll-form .btn {
  width: auto;
  min-width: 10rem;
}

.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.item-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.item-row.is-done {
  border-color: #abefc6;
  background: #f7fffb;
}

.item-row-link {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem;
  color: inherit;
  text-decoration: none;
  font-weight: inherit;
}

.item-row-link:hover {
  text-decoration: none;
  color: inherit;
}

.item-row:hover {
  border-color: var(--teal-500);
  box-shadow: 0 10px 28px rgba(var(--teal-900-rgb), 0.1);
}

.item-row:hover .item-title {
  color: var(--teal-700);
}

.item-type {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal-700);
  padding-top: 0.2rem;
}

.item-main {
  display: grid;
  gap: 0.2rem;
}

.item-title {
  color: var(--ink);
  font-size: 1rem;
}

.item-summary {
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 400;
}

.item-main .hint {
  margin-top: 0.1rem;
}

.item-status {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}

.content-head h1 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.03em;
}

.content-head p {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: var(--teal-950);
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-missing {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.5rem;
  padding: 1.5rem;
  color: var(--on-dark);
  text-align: center;
}

.video-missing a {
  color: var(--amber);
}

.watch-timer {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.15rem;
  margin-bottom: 1.15rem;
  box-shadow: 0 8px 24px rgba(var(--teal-950-rgb), 0.06);
}

.watch-timer.is-counting {
  border-color: #8fd4cb;
  background: linear-gradient(160deg, var(--mint-150), #fff);
}

.watch-timer.is-paused:not(.is-done) {
  border-style: dashed;
}

.watch-timer.is-done {
  border-color: #abefc6;
  background: #f7fffb;
}

.watch-timer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}

.watch-timer-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.2rem;
}

.watch-timer-bar {
  margin-bottom: 0.55rem;
}

.watch-timer .hint {
  margin: 0;
}

.forum-compose {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem;
  margin-bottom: 1.25rem;
  display: grid;
  gap: 0.75rem;
}

.forum-compose label {
  font-size: 0.84rem;
  font-weight: 600;
}

.forum-compose textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font: inherit;
  resize: vertical;
  min-height: 110px;
}

.forum-compose textarea:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(var(--teal-500-rgb), 0.15);
}

.forum-compose .btn {
  width: auto;
  justify-self: start;
  min-width: 8rem;
}

.visibility-pick {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.visibility-pick legend {
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0;
  margin-right: 0.35rem;
}

.radio-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
}

.radio-chip:has(input:checked) {
  border-color: var(--teal-500);
  background: var(--mint-100);
  color: var(--teal-900);
}

.forum-feed {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.forum-post {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}

.forum-post.is-private {
  border-style: dashed;
  background: #fbfaf6;
}

.forum-post header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.forum-post header strong {
  color: var(--ink);
}

.forum-post header time {
  margin-left: auto;
  font-size: 0.78rem;
}

.forum-post p {
  margin: 0;
}

@media (max-width: 700px) {
  .track-card {
    grid-template-columns: 1fr;
  }

  .item-row-link {
    grid-template-columns: 1fr;
  }

  .app-top {
    flex-wrap: wrap;
    gap: 0.65rem;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-8%, -4%) scale(1.08); }
}

@keyframes pulse-soft {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    min-height: 0;
    align-items: flex-start;
    padding: 0.75rem 1rem 0.85rem;
  }

  .brand-mark {
    margin: 0;
  }

  .brand-mark-img--h {
    height: 1.55rem;
  }

  .auth-back-site--brand {
    margin: 0 0 0.4rem;
    font-size: 0.78rem;
    padding: 0.22rem 0.6rem 0.22rem 0.45rem;
  }

  .brand-headline,
  .brand-lead {
    display: none;
  }

  .brand-flow {
    display: none;
  }

  .game-grid {
    grid-template-columns: 1fr;
  }

  .game-profile {
    grid-template-columns: auto 1fr;
  }

  .game-ranking {
    grid-column: 1 / -1;
  }

  .game-journey {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem 0.4rem;
  }

  .game-evo-main {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .game-journey {
    grid-template-columns: repeat(2, 1fr);
  }

  .badge-grid {
    grid-template-columns: 1fr;
  }
}

/* ?? Diagn?stico ?? */
.diag-form {
  display: grid;
  gap: 1rem;
  max-width: 36rem;
}

.diag-form .field input[type="file"] {
  padding: 0.65rem 0.75rem;
  background: var(--surface);
}

.diag-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.prose-diag {
  margin-top: 1rem;
  line-height: 1.65;
  color: var(--ink);
}

.admin-card > .prose-diag:first-child {
  margin-top: 0;
}

.prose-diag > :first-child {
  margin-top: 0;
}

.prose-diag h2,
.prose-diag h3,
.prose-diag h4 {
  font-family: var(--font-display);
  margin: 1.25rem 0 0.45rem;
  letter-spacing: -0.02em;
  color: var(--teal-900);
}

.prose-diag h2 { font-size: 1.25rem; }
.prose-diag h3 { font-size: 1.1rem; }
.prose-diag h4 { font-size: 1rem; }

.prose-diag p {
  margin: 0.45rem 0;
}

.prose-diag ul {
  margin: 0.4rem 0 0.8rem;
  padding-left: 1.25rem;
}

.prose-diag li {
  margin: 0.25rem 0;
}

.prose-diag a {
  color: var(--teal-700, #0f6b57);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.prose-diag a:hover {
  color: var(--teal-900, #0a3d34);
}

.diag-progress {
  margin: 0.25rem 0 0.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--surface) 0%, #fff 100%);
}

.diag-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  font-size: 0.92rem;
}

.diag-progress-head strong {
  color: var(--teal-900);
}

.diag-progress-head span {
  font-weight: 800;
  color: var(--teal-700);
  font-variant-numeric: tabular-nums;
}

.diag-progress-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--mint-400);
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.diag-progress-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal-900), var(--teal-500));
  transition: width 0.35s ease;
}

.diag-progress-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.diag-step {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.diag-step-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--line);
  flex-shrink: 0;
}

.diag-step.is-active {
  color: var(--teal-900);
  font-weight: 700;
}

.diag-step.is-active .diag-step-dot {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(var(--amber-rgb), 0.25);
}

.diag-step.is-done {
  color: var(--ink);
}

.diag-step.is-done .diag-step-dot {
  background: var(--teal-500);
}

.diag-credits-badge {
  position: relative;
  z-index: 1;
  margin: 0.85rem 0 0;
  font-size: 0.92rem;
  color: rgba(244, 251, 249, 0.9);
}

.diag-credits-badge strong {
  color: #fff;
  font-size: 1.05rem;
}

/* Overlay de carregamento ? Diagn?stico + AI Copilot */
body.analysis-overlay-open {
  overflow: hidden;
}

.analysis-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(var(--teal-950-rgb), 0.78);
  backdrop-filter: blur(6px);
}

.analysis-overlay[hidden] {
  display: none !important;
}

.analysis-overlay-card {
  width: min(420px, 100%);
  padding: 1.75rem 1.5rem 1.35rem;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 32px 80px rgba(var(--teal-950-rgb), 0.35);
  text-align: center;
}

.analysis-overlay-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
  color: var(--teal-900);
}

.analysis-overlay-label {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.analysis-overlay-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--mint-400);
  overflow: hidden;
  margin-bottom: 0.45rem;
}

.analysis-overlay-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal-900), var(--teal-500));
  transition: width 0.35s ease;
}

.analysis-overlay-pct {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--teal-700);
  font-variant-numeric: tabular-nums;
}

.analysis-overlay-steps {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  text-align: left;
  display: grid;
  gap: 0.3rem;
}

.analysis-overlay-hint {
  margin: 0;
  font-size: 0.8rem;
}

.analysis-spinner {
  width: 46px;
  height: 46px;
  margin: 0 auto 0.85rem;
  border: 4px solid var(--mint-400);
  border-top-color: var(--teal-500);
  border-radius: 50%;
  animation: analysis-spin 0.85s linear infinite;
}

@keyframes analysis-spin {
  to { transform: rotate(360deg); }
}

.analysis-progress-panel {
  margin: 0.5rem 0 1rem;
}

.analysis-pending {
  margin-top: 1.25rem;
  padding: 2rem 1rem;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.analysis-pending .analysis-spinner {
  margin-bottom: 1rem;
}

.copilot-import {
  margin-bottom: 1.5rem;
}

.copilot-import .diag-form .field {
  margin-bottom: 1rem;
}

/* AI Copilot ? projetos */
.copilot-list-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
}

.copilot-new-form {
  margin: 0;
}

.copilot-edit-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  margin: 0 0 0.25rem;
  letter-spacing: -0.03em;
}

.copilot-edit-head {
  align-items: center;
}

.copilot-save-status .tag-ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.copilot-save-status .tag-err {
  background: var(--danger-bg);
  color: var(--danger);
}

.copilot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1rem;
}

.copilot-grid .field-span-2 {
  grid-column: 1 / -1;
}

.copilot-grid .field input,
.copilot-grid .field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font: inherit;
  background: #fff;
}

.copilot-grid .field input:focus,
.copilot-grid .field select:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(var(--teal-500-rgb), 0.18);
}

.copilot-rich-block {
  margin-bottom: 1.35rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.copilot-rich-block:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.copilot-rich-label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  color: var(--ink);
}

.copilot-grid .field .hint,
.copilot-rich-block .hint {
  margin-bottom: 0.35rem;
}

.copilot-example {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 0 0 0.65rem;
  padding: 0.5rem 0.7rem;
  background: #f4f9f8;
  border-left: 3px solid var(--teal-500);
  border-radius: 0 8px 8px 0;
  line-height: 1.5;
}

.copilot-example-label {
  font-weight: 700;
  color: var(--teal-700);
  margin-right: 0.25rem;
}

.copilot-grid .field .copilot-example {
  margin-bottom: 0.5rem;
}

.copilot-quill {
  background: #fff;
  border-radius: 0 0 12px 12px;
  min-height: 140px;
}

.copilot-quill .ql-editor {
  min-height: 140px;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  line-height: 1.55;
}

.copilot-rich-block .ql-toolbar.ql-snow {
  border: 1px solid var(--line);
  border-radius: 12px 12px 0 0;
  background: #f4f9f8;
}

.copilot-rich-block .ql-container.ql-snow {
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 12px 12px;
}

@media (max-width: 720px) {
  .copilot-grid {
    grid-template-columns: 1fr;
  }

  .copilot-grid .field-span-2 {
    grid-column: auto;
  }
}

/* For?a 0?10 por campo (AI Copilot an?lise) */
.strength-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 1rem 0 1.25rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.strength-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.strength-dot.is-green { background: var(--ok); }
.strength-dot.is-yellow { background: #ca8a04; }
.strength-dot.is-orange { background: #ea580c; }
.strength-dot.is-red { background: var(--danger); }

.strength-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
}

.strength-pillar-title {
  font-family: Montserrat, system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 1.45rem 0 0.75rem;
}

.prompt-pillar-title {
  font-family: Montserrat, system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 1.75rem 0 0.35rem;
}

.strength-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  background: #fff;
}

.strength-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.strength-card-head h3 {
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.35;
  color: var(--ink);
}

.strength-tier-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.strength-card-green .strength-tier-label { color: var(--ok); }
.strength-card-yellow .strength-tier-label { color: #a16207; }
.strength-card-orange .strength-tier-label { color: #c2410c; }
.strength-card-red .strength-tier-label { color: var(--danger); }

.strength-bar {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 0.45rem;
}

.strength-seg {
  flex: 1;
  max-width: 14px;
  height: 16px;
  border-radius: 3px;
  background: #e8eceb;
}

.strength-seg.is-on.is-green { background: var(--ok); }
.strength-seg.is-on.is-yellow { background: #eab308; }
.strength-seg.is-on.is-orange { background: #f97316; }
.strength-seg.is-on.is-red { background: #ef4444; }

.strength-value {
  margin-left: 0.45rem;
  font-size: 0.82rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  min-width: 2.5rem;
}

.strength-feedback {
  margin: 0;
  line-height: 1.45;
}

.copilot-analise-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 2rem;
}

/* Começando do zero — CTA + wizard */
.wizard-zero-cta {
  border: 1px solid color-mix(in srgb, var(--teal, #0d7377) 35%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--teal, #1a9b8e) 12%, transparent), transparent 55%),
    var(--surface, #fff);
  margin-bottom: 1.25rem;
}

.wizard-zero-cta-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft, #6b635a);
}

.wizard-zero-cta h2 {
  margin-top: 0;
}

.wizard-zero-cta .btn {
  margin-top: 0.5rem;
}

.wizard-zero.is-disabled {
  opacity: 0.72;
  pointer-events: none;
}

.wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.wizard-step {
  border: 1px solid var(--line, #e2ddd6);
  background: var(--surface-2, #f7f4ef);
  color: var(--ink-soft, #6b635a);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.wizard-step.is-active {
  background: var(--ink, #1c1916);
  color: #fff;
  border-color: var(--ink, #1c1916);
}

.wizard-step.is-done:not(.is-active) {
  border-color: color-mix(in srgb, var(--accent, #c45c26) 45%, transparent);
  color: var(--ink, #1c1916);
}

.wizard-pane h2 {
  margin-top: 0;
}

.wizard-subheading {
  margin: 1.25rem 0 0.65rem;
  font-size: 1rem;
}

.wizard-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.wizard-choice {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line, #e2ddd6);
  border-radius: 12px;
  background: var(--surface-2, #f7f4ef);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wizard-choice:has(input:checked) {
  border-color: var(--accent, #c45c26);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent, #c45c26) 40%, transparent);
  background: #fff;
}

.wizard-choice input {
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.wizard-choice-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.wizard-choice-body strong {
  color: var(--ink, #1c1916);
}

.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line, #e2ddd6);
}

.wizard-inline-error {
  color: var(--danger, #9a4b3a);
}

.wizard-form textarea {
  width: 100%;
  min-height: 10rem;
  resize: vertical;
  border: 1px solid var(--line, #e2ddd6);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font: inherit;
  line-height: 1.45;
  background: #fff;
}

.wizard-form textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--accent, #c45c26) 45%, transparent);
  outline-offset: 1px;
}

.ideacao-banner-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.ideacao-banner-head h2 {
  margin: 0 0 0.35rem;
}

.ideacao-score-badge {
  margin: 0;
  text-align: right;
}

.ideacao-score-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--ink, #1c1916);
}

.ideacao-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.ideacao-summary {
  margin: 0 0 0.85rem;
  line-height: 1.5;
}

.ideacao-alerts,
.ideacao-suggestions {
  margin-bottom: 0.85rem;
}

.ideacao-alerts ul,
.ideacao-suggestions ul {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
}

.ideacao-dims {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.ideacao-dim {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: var(--surface-2, #f7f4ef);
  border: 1px solid var(--line, #e2ddd6);
  font-size: 0.9rem;
}

.ideacao-dim-score {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.admin-table .admin-actions {
  flex-direction: column;
  align-items: stretch;
}

.admin-table .admin-actions .btn {
  text-align: center;
}

/* Funding Match */
.fm-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.fm-stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.fm-stat strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--teal-900);
  line-height: 1.1;
}

.fm-stat span {
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.fm-stat.is-expired {
  border-color: #f3c0bc;
  background: var(--danger-bg);
}

.fm-stat.is-expired strong {
  color: var(--danger);
}

.fm-expired-banner {
  margin-bottom: 1.1rem;
}

.fm-expired-banner a {
  color: var(--danger);
  text-decoration: underline;
}

.fm-filters-card h2 {
  margin-bottom: 0.85rem;
}

.fm-filters {
  align-items: end;
}

.fm-field-search {
  grid-column: span 2;
}

.fm-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.fm-list {
  display: grid;
  gap: 1rem;
}

.fm-card {
  margin-bottom: 0;
  animation: rise 0.45s ease both;
}

.fm-card.is-expired {
  border-color: #f0b4af;
  background: linear-gradient(180deg, #fff8f7 0%, #fff 55%);
  opacity: 0.92;
}

.fm-card.is-expired .fm-card-head h2 {
  color: var(--ink-soft);
}

.fm-card.is-expired .fm-entity {
  color: #9b3a34;
}

.fm-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.65rem;
}

.fm-card-head h2 {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.fm-entity {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal-700);
}

.fm-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: flex-start;
}

.fm-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f3f8f7;
  color: var(--ink-soft);
  white-space: nowrap;
}

.fm-badge-deadline {
  border-color: #f0d59a;
  background: #fff8e8;
  color: #8a5a00;
}

.fm-badge-deadline.is-year {
  border-color: var(--mint-300);
  background: var(--mint-100);
  color: var(--teal-900);
}

.fm-badge-deadline.is-expired,
.fm-badge-status.is-expired {
  border-color: #f0b4af;
  background: var(--danger-bg);
  color: var(--danger);
}

.fm-expired-note {
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #f0b4af;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.4;
}

.aderencia-expired-note {
  margin: 0.35rem 0 0;
  padding: 0.35rem 0.55rem;
  display: inline-block;
}

.aderencia-rank-item.is-expired {
  border-color: #f0b4af;
  background: linear-gradient(180deg, #fff8f7 0%, #fff 60%);
}

.fm-summary {
  margin: 0 0 0.9rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.fm-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin: 0 0 1rem;
}

.fm-meta dt {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 0.2rem;
}

.fm-meta dd {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.fm-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.fm-disclaimer {
  margin: 1.25rem 0 0.5rem;
}

@media (max-width: 900px) {
  .fm-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .fm-stats {
    grid-template-columns: 1fr;
  }

  .fm-field-search {
    grid-column: 1 / -1;
  }
}

/* ?? Ader?ncia ?? */
.aderencia-rank {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.aderencia-rank-item {
  border: 1px solid var(--line, #d9e2df);
  border-radius: 12px;
  padding: 1rem 1.1rem 1.05rem;
  background: #fff;
}

.aderencia-rank-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: start;
}

.aderencia-rank-pos {
  font-family: Montserrat, system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink-soft);
  min-width: 2.2rem;
}

.aderencia-rank-titles h3 {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.aderencia-rank-score {
  text-align: right;
  min-width: 11rem;
}

.aderencia-rank-score .strength-bar {
  justify-content: flex-end;
}

.aderencia-reason {
  margin: 0.75rem 0 0;
  line-height: 1.45;
  color: var(--ink);
}

.aderencia-tags {
  margin: 0.55rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.aderencia-meta {
  margin-top: 0.85rem;
}

.aderencia-rank-foot {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.aderencia-summary h2 {
  margin: 0 0 0.55rem;
  font-size: 1.1rem;
}

.aderencia-summary-body {
  line-height: 1.55;
}

.aderencia-summary-body ul {
  margin: 0.4rem 0 0.6rem;
  padding-left: 1.2rem;
}

.aderencia-summary-body p {
  margin: 0 0 0.55rem;
}

@media (max-width: 720px) {
  .aderencia-rank-head {
    grid-template-columns: auto 1fr;
  }

  .aderencia-rank-score {
    grid-column: 1 / -1;
    text-align: left;
    min-width: 0;
  }

  .aderencia-rank-score .strength-bar {
    justify-content: flex-start;
  }
}

/* Matriz SuperADM Constructos × Editais */
.matrix-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.matrix-filters .field {
  min-width: 12rem;
  margin: 0;
}

.matrix-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  align-items: center;
  margin: 0 0 1rem;
}

.matrix-pill {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.matrix-pill.is-core {
  background: #d8f0e6;
  color: #1a5c45;
}

.matrix-pill.is-sec {
  background: #f3ead4;
  color: #6a5420;
}

.matrix-pill.is-off {
  background: #eceff1;
  color: #546e7a;
}

.matrix-wrap {
  max-height: 70vh;
  overflow: auto;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
}

.matrix-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 100%;
}

.matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f7faf8;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.matrix-sticky-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  min-width: 14rem;
  max-width: 18rem;
  box-shadow: 1px 0 0 rgba(0, 0, 0, 0.06);
}

.matrix-table thead .matrix-sticky-col {
  z-index: 4;
  background: #f7faf8;
}

.matrix-opp-col {
  min-width: 9.5rem;
  max-width: 11rem;
  vertical-align: bottom;
}

.matrix-opp-title {
  font-size: 0.82rem;
  line-height: 1.3;
}

.matrix-construct {
  font-weight: 600;
  font-size: 0.86rem;
}

.matrix-construct .prompt-key {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.7rem;
  font-weight: 400;
  opacity: 0.65;
}

.matrix-group-row td {
  background: #eef5f1;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.matrix-cell {
  text-align: center;
  padding: 0.35rem 0.4rem;
}

.matrix-weight {
  width: 5.4rem;
  padding: 0.28rem 0.3rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 0.8rem;
  background: #fff;
}

.matrix-weight[data-weight="core"] {
  background: #d8f0e6;
  border-color: #8ecbb0;
}

.matrix-weight[data-weight="secondary"] {
  background: #f3ead4;
  border-color: #d2bc7a;
}

.matrix-weight[data-weight="off"] {
  background: #f4f6f7;
  color: #78909c;
}

.matrix-clear-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.matrix-clear-form select {
  min-width: 16rem;
  max-width: 100%;
}

