:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --muted: #515154;
  --subtle: #86868b;
  --hairline: rgba(0, 0, 0, 0.08);
  --blue: #0066cc;
  --green: #1d8348;
  --green-bg: rgba(52, 199, 89, 0.14);
  --amber: #b25000;
  --amber-bg: rgba(255, 149, 0, 0.14);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", sans-serif;
  line-height: 1.48;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Frosted Apple Topbar */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 251, 253, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}

.nav-inner {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 600;
  font-size: 0.96rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.logo:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.8rem;
}

.nav-links a {
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--ink);
  text-decoration: none;
}

.ribbon {
  background: var(--surface);
  border-bottom: 1px solid var(--hairline);
  text-align: center;
  padding: 9px 16px;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Hero */
.hero {
  padding: 76px 0 48px;
  text-align: center;
}

.hero-left {
  text-align: left;
  padding: 56px 0 36px;
}

.eyebrow {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: 10px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.07;
  margin-bottom: 12px;
}

.hero-left h1 {
  font-size: clamp(1.95rem, 4vw, 2.8rem);
}

.sub {
  font-size: 1.14rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
  letter-spacing: -0.01em;
}

.hero-left .sub {
  margin: 0;
}

/* Bento Cards */
.section {
  padding-bottom: 68px;
}

.card {
  background: var(--surface);
  border-radius: 22px;
  padding: 32px;
  margin-bottom: 20px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.025);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.card h2 {
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.card-lead {
  color: var(--muted);
  font-size: 0.94rem;
  margin-bottom: 20px;
}

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

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.meta-tile {
  background: var(--bg);
  border-radius: 14px;
  padding: 16px;
}

.meta-tile-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--subtle);
  margin-bottom: 4px;
}

.meta-tile-val {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

/* Tables */
.table-scroll {
  overflow-x: auto;
}

.rank-list {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.rank-list th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--subtle);
  padding: 0 12px 12px;
  border-bottom: 1px solid var(--hairline);
}

.rank-list td {
  padding: 15px 12px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}

.rank-list tr:last-child td {
  border-bottom: none;
}

.rk {
  font-weight: 600;
  color: var(--subtle);
  width: 44px;
}

.rk-top {
  color: var(--ink);
  font-weight: 700;
}

.v-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  letter-spacing: -0.015em;
}

.v-sub {
  font-size: 0.8rem;
  color: var(--subtle);
  margin-top: 2px;
}

.score-pill {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 980px;
  font-weight: 600;
  font-size: 0.86rem;
  background: var(--bg);
  color: var(--ink);
}

.score-high {
  background: var(--green-bg);
  color: var(--green);
}

.tag-status {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 980px;
  background: var(--bg);
  color: var(--muted);
}

.tag-prov {
  background: var(--amber-bg);
  color: var(--amber);
}

/* Report Bars */
.report-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.big-score {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}

.big-rank {
  font-size: 0.82rem;
  color: var(--subtle);
  margin-top: 6px;
  text-align: right;
}

.bar-row {
  padding: 13px 0;
  border-bottom: 1px solid var(--hairline);
}

.bar-row:last-child {
  border-bottom: none;
}

.bar-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 7px;
}

.bar-head span:last-child {
  font-weight: 600;
}

.track {
  height: 6px;
  background: var(--bg);
  border-radius: 980px;
  overflow: hidden;
}

.fill {
  height: 100%;
  background: var(--ink);
  border-radius: 980px;
}

.clean-ul {
  list-style: none;
}

.clean-ul li {
  padding: 9px 0;
  border-top: 1px solid var(--hairline);
  font-size: 0.92rem;
  color: var(--muted);
}

.clean-ul li:first-child {
  border-top: none;
  padding-top: 0;
}

.pill-cta {
  display: inline-block;
  margin-top: 18px;
  background: var(--ink);
  color: #fff;
  padding: 10px 20px;
  border-radius: 980px;
  font-size: 0.86rem;
  font-weight: 500;
}

.pill-cta:hover {
  opacity: 0.88;
  text-decoration: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  background: var(--bg);
  color: var(--ink);
  padding: 8px 15px;
  border-radius: 980px;
  font-size: 0.84rem;
  font-weight: 500;
}

.chip:hover {
  background: #e8e8ed;
  text-decoration: none;
}

.footer {
  border-top: 1px solid var(--hairline);
  padding: 26px 0;
  font-size: 0.78rem;
  color: var(--subtle);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 760px) {
  .grid-2,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .hide-sm {
    display: none;
  }
}
