:root {
  color-scheme: light;
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #18202e;
  --muted: #6b7280;
  --line: #e7e9ee;
  --purple: #6a28b6;
  --purple-dark: #5b2199;
  --orange: #e86c2f;
  --orange-soft: #f8d1b9;
  --green: #1b9a5a;
  --green-soft: #ccead8;
  --yellow: #ffce4b;
  --shadow: 0 12px 28px rgba(24, 32, 46, 0.12);
  --shadow-soft: 0 6px 18px rgba(24, 32, 46, 0.08);
  --header-bg: rgba(255, 255, 255, 0.92);
  --header-border: rgba(24, 32, 46, 0.12);
  --header-text: var(--text);
  --header-muted: var(--muted);
  --header-hover: rgba(24, 32, 46, 0.08);
  --footer-border: rgba(24, 32, 46, 0.12);
  --brand-mark-bg: rgba(106, 40, 182, 0.14);
  --brand-mark-border: rgba(106, 40, 182, 0.32);
  --brand-mark-text: #5b2199;
  --focus-ring: rgba(106, 40, 182, 0.45);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

.page-shell {
  background:
    radial-gradient(circle at 15% 0%, rgba(142, 76, 255, 0.12), transparent 45%),
    radial-gradient(circle at 90% 25%, rgba(255, 141, 64, 0.12), transparent 50%),
    var(--bg);
}

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

.hero {
  background: linear-gradient(120deg, #542099 0%, #7325a3 35%, #b5465a 70%, #d06a34 100%);
  padding: 32px 0 48px;
  position: relative;
  color: #fff;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 40%);
  pointer-events: none;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.hero .brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero .logo {
  width: 66px;
  height: 66px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.hero .logo svg {
  width: 54px;
  height: 54px;
}

.hero .brand-title {
  margin: 0 0 6px;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
}

.hero .brand-subtitle {
  margin: 0;
  opacity: 0.85;
  font-size: 0.98rem;
}

.pill {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  padding: 12px 18px;
  text-align: right;
  min-width: 190px;
  backdrop-filter: blur(6px);
}

.pill span {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 4px;
}

.pill strong {
  font-size: 1.4rem;
  font-weight: 700;
}

.site-main {
  margin-top: -28px;
  padding-bottom: 72px;
}

.controls {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow-soft);
}

.controls-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.notice-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #fff0e6;
  color: var(--orange);
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px #ffd7c2;
}

.notice-title {
  margin: 0;
  font-weight: 600;
}

.notice-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.sort-btn {
  border: none;
  background: #f2f4f7;
  color: #222b39;
  border-radius: 12px;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  background: #1f9b5f;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 18px rgba(31, 155, 95, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 22px rgba(31, 155, 95, 0.34);
}

.sort-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(24, 32, 46, 0.12);
}

.sort-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--purple);
}

.sort-icon svg {
  width: 18px;
  height: 18px;
}

.cards {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 18px 18px 14px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  border: 1px solid #f0f1f4;
}

.card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--accent, var(--purple));
}

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

.card-title {
  font-weight: 700;
  margin: 0;
  font-size: 1.05rem;
}

.badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f2f6;
  color: #5c6470;
}

.badge.mensal {
  background: #fff1e6;
  color: #d75413;
}

.badge.anual {
  background: #e8f6ee;
  color: #1c7b49;
}

.badge.parcelado {
  background: #efe8ff;
  color: #6a28b6;
}

.badge-duration {
  font-size: 0.75rem;
  color: var(--muted);
}

.top-pill {
  background: #1e1e2c;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
}

.highlight-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffeaa3;
  color: #6d4b0f;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
}

.highlight-pill svg {
  width: 14px;
  height: 14px;
}

.card-body {
  margin-top: 18px;
}

.label {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: #7b8290;
  font-weight: 700;
}

.cost-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.cost-main {
  font-size: 1.6rem;
  font-weight: 700;
}

.cost-total {
  text-align: right;
  font-size: 0.95rem;
  color: #444b5a;
}

.stats {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  background: #fafbfc;
  border-radius: 12px;
  padding: 12px;
}

.stat {
  display: flex;
  gap: 10px;
  align-items: center;
}

.stat-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f0e8ff;
  color: #6a28b6;
  display: grid;
  place-items: center;
}

.stat-icon svg {
  width: 16px;
  height: 16px;
}

.stat-value {
  font-weight: 700;
  font-size: 0.95rem;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.flow {
  margin-top: 16px;
  border-top: 1px solid #eef0f3;
  padding-top: 12px;
}

.flow-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: none;
  font-weight: 600;
  color: #6a28b6;
  cursor: pointer;
  padding: 0;
}

.flow-toggle span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.flow-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.flow-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.flow-details {
  display: none;
  margin-top: 10px;
  background: #f7f2ff;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.85rem;
  color: #4a5160;
}

.flow-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.flow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  padding: 8px 10px;
}

.flow-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.flow-label {
  font-weight: 600;
  color: #4a5160;
}

.flow-tag {
  background: #efe0ff;
  color: #6a28b6;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
}

.flow-value {
  font-weight: 600;
  color: #4a5160;
}

.flow-details.is-open {
  display: block;
}

.rules {
  margin-top: 36px;
  background: var(--card);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.rules-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.rules-header h2 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1.1rem;
}

.rules-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f3f4f8;
  display: grid;
  place-items: center;
  color: #5c6470;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.rules-card h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.rules-card ul {
  margin: 0;
  padding-left: 18px;
  color: #4b5261;
}

.rules-card li {
  margin-bottom: 8px;
}

.rules-card li:last-child {
  margin-bottom: 0;
}

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

@media (max-width: 860px) {
  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .pill {
    width: 100%;
    text-align: left;
  }

  .controls {
    align-items: flex-start;
  }

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

@media (max-width: 640px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .brand-title {
    font-size: 1.2rem;
  }

  .hero {
    padding-bottom: 32px;
  }

  main {
    margin-top: -20px;
  }
}
