:root {
  color-scheme: light;
  --navy-950: hsl(207 72% 13%);
  --navy-900: hsl(205 66% 19%);
  --navy-800: hsl(202 58% 27%);
  --blue-700: hsl(197 53% 38%);
  --blue-100: hsl(197 42% 92%);
  --blue-050: hsl(198 38% 97%);
  --ink: hsl(205 43% 19%);
  --muted: hsl(203 17% 43%);
  --faint: hsl(201 13% 58%);
  --line: hsl(199 22% 87%);
  --line-strong: hsl(198 25% 77%);
  --paper: hsl(0 0% 100%);
  --canvas: hsl(200 24% 97%);
  --success: hsl(160 47% 30%);
  --warning: hsl(36 66% 33%);
  --radius-sm: 6px;
  --radius-md: 10px;
  --shadow-menu: 0 18px 44px rgba(9, 43, 66, .16);
  --font-sans: Aptos, "Segoe UI Variable", "Segoe UI", sans-serif;
  --font-mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --transition: 160ms ease;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); color: var(--ink); font: 15px/1.5 var(--font-sans); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, select { color: inherit; }
svg { display: block; }
.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; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 10px 14px; background: var(--navy-900); color: #fff; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid rgba(46, 126, 163, .28); outline-offset: 2px; }

.topbar { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.95); }
.topbar__inner { display: flex; width: min(1440px, calc(100% - 48px)); min-height: 64px; align-items: center; justify-content: space-between; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark { display: grid; width: 38px; height: 38px; place-items: center; background: var(--navy-900); color: #fff; border-radius: 9px; }
.brand__logo { display: block; width: 27px; height: 27px; object-fit: contain; }
.brand__copy { display: grid; line-height: 1.05; }
.brand__copy small { color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.brand__copy strong { margin-top: 3px; color: var(--navy-950); font-size: 17px; letter-spacing: -.02em; }
.topbar__label { color: var(--faint); font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }

.shell { width: min(1440px, calc(100% - 48px)); margin: 0 auto; padding-bottom: 48px; }
.page-intro { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding: 30px 0 20px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 5px; color: var(--navy-950); font-size: clamp(30px, 3.1vw, 42px); line-height: 1.05; letter-spacing: -.045em; }
h2 { margin-bottom: 0; color: var(--navy-950); font-size: 19px; line-height: 1.25; letter-spacing: -.02em; }
.page-intro p { margin-bottom: 0; color: var(--muted); font-size: 15px; }
.snapshot-date { flex: 0 0 auto; color: var(--faint) !important; font-size: 11px !important; text-align: right; }

.metric-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); background: rgba(255,255,255,.55); }
.metric { display: flex; min-height: 82px; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 24px; border-right: 1px solid var(--line); }
.metric:first-child { padding-left: 0; }
.metric:last-child { border-right: 0; padding-right: 0; }
.metric span { color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.metric strong { color: var(--navy-900); font-size: clamp(27px, 3vw, 36px); line-height: 1; letter-spacing: -.045em; }

.filters { position: relative; z-index: 10; margin-top: 22px; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius-md); }
.filters__heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 20px 12px; }
.filters__heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.text-button { border: 0; background: transparent; padding: 7px 3px; color: var(--blue-700); font-size: 12px; font-weight: 750; cursor: pointer; }
.text-button:hover { color: var(--navy-900); text-decoration: underline; text-underline-offset: 3px; }
.filter-grid { display: grid; grid-template-columns: minmax(280px, 1.55fr) minmax(190px, .8fr) minmax(210px, .9fr) minmax(220px, .85fr); gap: 12px; padding: 10px 20px 20px; }
.filter-grid--simple { grid-template-columns: minmax(320px, 1.55fr) minmax(230px, .85fr) minmax(240px, .85fr); }
.filter-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.filter-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 780; letter-spacing: .05em; text-transform: uppercase; }
.filter-field select, .filter-menu summary { width: 100%; min-height: 44px; border: 1px solid var(--line-strong); background: #fff; border-radius: var(--radius-sm); }
.filter-field select { padding: 0 34px 0 12px; cursor: pointer; }
.filter-field select:hover, .filter-menu summary:hover { border-color: var(--blue-700); }
.filter-field select:disabled { border-color: var(--line); background: var(--blue-050); color: var(--faint); cursor: not-allowed; }

.filter-menu { position: relative; }
.filter-menu summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; cursor: pointer; list-style: none; user-select: none; }
.filter-menu summary::-webkit-details-marker { display: none; }
.filter-menu summary span { min-width: 0; overflow: hidden; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.filter-menu summary svg { flex: 0 0 auto; width: 16px; fill: none; stroke: var(--muted); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; transition: transform var(--transition); }
.filter-menu[open] summary { border-color: var(--blue-700); box-shadow: 0 0 0 3px rgba(46,126,163,.1); }
.filter-menu[open] summary svg { transform: rotate(180deg); }
.filter-menu__panel { position: absolute; z-index: 40; top: calc(100% + 7px); left: 0; width: min(570px, calc(100vw - 56px)); overflow: hidden; border: 1px solid var(--line-strong); background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-menu); }
.filter-menu__head { display: flex; align-items: center; justify-content: space-between; padding: 13px 14px 10px; border-bottom: 1px solid var(--line); }
.filter-menu__head strong { color: var(--navy-950); font-size: 13px; }
.filter-menu__actions { display: flex; align-items: center; gap: 10px; }
.filter-menu__head button { border: 0; background: transparent; padding: 5px; color: var(--blue-700); font-size: 12px; font-weight: 750; cursor: pointer; }
.filter-menu__head button:hover { color: var(--navy-900); text-decoration: underline; text-underline-offset: 3px; }
.product-options { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; max-height: 390px; overflow: auto; padding: 9px; }
.product-option { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; min-height: 42px; border: 1px solid transparent; background: transparent; border-radius: var(--radius-sm); padding: 7px 8px; text-align: left; cursor: pointer; transition: background var(--transition), border-color var(--transition); }
.product-option:hover { background: var(--blue-050); }
.product-option.is-selected { border-color: hsl(198 38% 78%); background: var(--blue-100); }
.product-option__check { display: grid; width: 18px; height: 18px; place-items: center; border: 1.5px solid var(--line-strong); border-radius: 4px; color: #fff; }
.product-option.is-selected .product-option__check { border-color: var(--blue-700); background: var(--blue-700); }
.product-option__check svg { width: 12px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.3; opacity: 0; }
.product-option.is-selected .product-option__check svg { opacity: 1; }
.product-option__label { min-width: 0; color: var(--ink); font-size: 12px; font-weight: 650; line-height: 1.2; }
.product-option__count { color: var(--faint); font-size: 10px; font-variant-numeric: tabular-nums; }

.platform-options { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.platform-options button { min-height: 44px; border: 1px solid var(--line-strong); background: #fff; border-radius: var(--radius-sm); color: var(--muted); font-size: 13px; font-weight: 750; cursor: pointer; transition: all var(--transition); }
.platform-options button:hover { border-color: var(--blue-700); color: var(--navy-900); }
.platform-options button.is-selected { border-color: var(--navy-800); background: var(--navy-900); color: #fff; }

.results { min-width: 0; margin-top: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius-md); }
.results__top { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 19px 20px; border-bottom: 1px solid var(--line); }
.results__heading { min-width: 0; }
.query-description { margin: 5px 0 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.results__actions { display: flex; flex: 0 1 530px; align-items: center; justify-content: flex-end; gap: 10px; }
.search { display: flex; width: min(340px, 100%); min-height: 42px; align-items: center; gap: 9px; border: 1px solid var(--line-strong); background: var(--blue-050); border-radius: var(--radius-sm); padding: 0 12px; }
.search:focus-within { border-color: var(--blue-700); box-shadow: 0 0 0 3px rgba(46,126,163,.1); }
.search svg { flex: 0 0 auto; width: 17px; fill: none; stroke: var(--faint); stroke-linecap: round; stroke-width: 1.8; }
.search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search input::placeholder { color: var(--faint); }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; padding: 8px 14px; font-weight: 750; cursor: pointer; transition: background var(--transition), border-color var(--transition), transform var(--transition); }
.button:hover { transform: translateY(-1px); }
.button svg { width: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.button[disabled] { opacity: .55; cursor: wait; transform: none; }
.button--email { flex: 0 0 auto; border-color: var(--navy-900); background: var(--navy-900); color: #fff; }
.button--email:hover { border-color: var(--navy-800); background: var(--navy-800); }
.button--email[aria-pressed="true"] { border-color: var(--blue-700); background: #fff; color: var(--navy-900); }

.result-metrics { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--line); background: var(--blue-050); }
.result-metrics > div { display: flex; min-width: 0; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 20px; border-right: 1px solid var(--line); }
.result-metrics > div:last-child { border-right: 0; }
.result-metrics span { color: var(--muted); font-size: 11px; }
.result-metrics strong { color: var(--navy-900); font-size: 21px; letter-spacing: -.035em; }
.metric-note { margin: 0; border-bottom: 1px solid var(--line); background: hsl(39 100% 98%); padding: 9px 20px; color: var(--warning); font-size: 11px; }
.metric-note--info { background: var(--blue-050); color: var(--muted); }
.table-toolbar { display: flex; min-height: 42px; align-items: center; padding: 7px 20px; border-bottom: 1px solid var(--line); }
.table-toolbar p { margin: 0; color: var(--muted); font-size: 11px; }
.table-state { display: grid; min-height: 300px; place-content: center; justify-items: center; gap: 7px; padding: 36px; color: var(--muted); text-align: center; }
.table-state strong { color: var(--navy-900); font-size: 15px; }
.table-state.is-error strong { color: hsl(0 48% 41%); }
.spinner { width: 30px; height: 30px; margin-bottom: 7px; border: 3px solid var(--blue-100); border-top-color: var(--blue-700); border-radius: 999px; animation: spin .8s linear infinite; }
.table-state.is-error .spinner { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th { position: sticky; z-index: 2; top: 0; background: #fff; color: var(--faint); font-size: 10px; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
th, td { padding: 14px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:hover { background: hsl(198 36% 98%); }
.student { display: grid; gap: 3px; min-width: 240px; }
.student strong { color: var(--navy-950); font-size: 13px; }
.student span { color: var(--muted); font-family: var(--font-mono); font-size: 11px; overflow-wrap: anywhere; }
.phone-cell { color: var(--navy-900); font-family: var(--font-mono); font-size: 13px; white-space: nowrap; }
.platforms { display: flex; flex-wrap: wrap; gap: 5px; }
.platform-tag { border: 1px solid var(--line-strong); border-radius: 4px; padding: 3px 7px; color: var(--muted); font-size: 9.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.platform-tag--hotmart { border-color: hsl(24 35% 75%); background: hsl(27 100% 97%); color: hsl(23 46% 41%); }
.platform-tag--looma { border-color: hsl(190 36% 68%); background: hsl(190 50% 97%); color: hsl(190 52% 32%); }
.access-list { display: flex; flex-wrap: wrap; gap: 6px; min-width: 280px; }
.access-tag { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 4px; background: #fff; padding: 4px 7px; color: var(--muted); font-size: 10.5px; }
.access-tag--lifetime { border-color: hsl(198 41% 69%); background: var(--blue-050); color: var(--navy-800); font-weight: 750; }
.access-tag--term { border-color: hsl(207 27% 79%); background: hsl(207 38% 98%); color: var(--navy-800); }
.access-tag--review { border-color: hsl(37 42% 73%); background: hsl(39 100% 97%); color: var(--warning); }
.access-tag svg { width: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 15px; }
.pagination button { min-height: 36px; border: 1px solid var(--line-strong); background: #fff; border-radius: var(--radius-sm); padding: 6px 12px; font-weight: 700; cursor: pointer; }
.pagination button:hover:not(:disabled) { border-color: var(--blue-700); background: var(--blue-050); }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }
.pagination span { color: var(--muted); font-size: 12px; }

@media (max-width: 1080px) {
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .result-metrics { grid-template-columns: repeat(3, 1fr); }
  .result-metrics > div { border-right: 1px solid var(--line); }
  .result-metrics > div:nth-child(3n) { border-right: 0; }
  .result-metrics > div:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .topbar__inner, .shell { width: min(100% - 28px, 1440px); }
  .page-intro { padding-top: 24px; }
  .snapshot-date { max-width: 210px; }
  .metric { display: grid; justify-content: start; gap: 5px; padding: 13px 14px; }
  .metric:first-child { padding-left: 0; }
  .metric:last-child { padding-right: 0; }
  .metric span { font-size: 9.5px; }
  .metric strong { font-size: clamp(23px, 7vw, 30px); }
  .filter-grid { grid-template-columns: 1fr; }
  .results__top { display: grid; }
  .results__actions { width: 100%; max-width: none; justify-content: stretch; }
  .search { flex: 1 1 auto; width: auto; }
}

@media (max-width: 560px) {
  .topbar__label { display: none; }
  .brand__copy small { display: none; }
  .brand__copy strong { margin: 0; font-size: 15px; }
  .page-intro p { font-size: 13px; }
  .page-intro { display: grid; align-items: start; gap: 8px; }
  .snapshot-date { max-width: none; text-align: left; }
  .filters__heading { align-items: flex-start; }
  .filter-menu__panel { width: calc(100vw - 40px); }
  .product-options { grid-template-columns: 1fr; }
  .results__actions { display: grid; }
  .button--email { width: 100%; }
  .result-metrics { grid-template-columns: 1fr 1fr; }
  .result-metrics > div { padding: 10px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .result-metrics > div:nth-child(2n) { border-right: 0; }
  .result-metrics > div:nth-last-child(-n+2) { border-bottom: 0; }
  .query-description { white-space: normal; }
  .table-wrap { overflow: visible; }
  table, tbody { display: block; width: 100%; }
  thead { display: none; }
  tbody tr { display: grid; gap: 10px; padding: 15px 14px; border-bottom: 1px solid var(--line); }
  td { display: block; padding: 0; border: 0; }
  td:nth-child(2)::before, td:nth-child(3)::before, td:nth-child(4)::before { display: block; margin-bottom: 5px; color: var(--faint); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  td:nth-child(2)::before { content: "Telefone"; }
  td:nth-child(3)::before { content: "Plataforma"; }
  td:nth-child(4)::before { content: "Produtos com acesso"; }
  .student, .access-list { min-width: 0; }
  .access-list { display: grid; justify-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .001ms !important; }
}
