:root { --footer-peek: 128px; } 
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1200px 900px at 5% -10%, rgba(34,108,224,.18), transparent 46%),
    radial-gradient(1400px 1000px at 110% -10%, rgba(255,0,0,.16), transparent 48%),
    radial-gradient(1200px 800px at 20% 60%, rgba(95,160,255,.14), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 40%, #f3f7ff 100%);
  color: var(--text);
  font-family: var(--ff);
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.is-hidden { display: none !important; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.container { width: min(100% - 2*var(--gutter), var(--container)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.brand {
  display: inline-flex; align-items: center; gap: .85rem;
  font-weight: 600; letter-spacing: .1px; color: var(--text);
}
.brand-emoji {
  height: calc(var(--header-min-h) - (var(--header-pad-y) * 2));
  width:  calc(var(--header-min-h) - (var(--header-pad-y) * 2));
  border-radius: var(--r-md);
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--yt-red-600), var(--yt-red-500) 55%, var(--yt-red-400));
  color: #fff; box-shadow: var(--shadow-sm);
  font-size: calc((var(--header-min-h) - (var(--header-pad-y) * 2)) * 0.52);
  line-height: 1;
}
.brand--footer .brand-emoji { height: 48px; width: 48px; font-size: 26px; }
.brand-name { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); font-weight: 600; }
.brand-name__keyword { color: var(--yt-black); }
.brand-name__rocket  { color: var(--yt-red); }

.brand-logo {
  height: calc(var(--header-min-h) - (var(--header-pad-y) * 2));
  width: auto; object-fit: contain; display: block;
}
.brand--footer .brand-logo { height: 48px; width: auto; }

.header { position: fixed; top: calc(env(safe-area-inset-top, 0px) + var(--header-offset)); left: 0; right: 0; z-index: 100; background: transparent; pointer-events: none; }
.header.glass .header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: var(--header-pad-y) 26px;
  min-height: var(--header-min-h);
  box-shadow: var(--glass-shadow);
  pointer-events: all; transform: translateZ(0);
  flex-wrap: nowrap;
}

.nav { display: flex; gap: .5rem; align-items: center; flex-wrap: nowrap; }
.nav a {
  padding: 12px 14px; border-radius: var(--r-sm); color: var(--muted);
  font-weight: 600; transition: background .15s ease, color .15s ease, transform .12s ease;
}
.nav a:not(.cta):hover { color: var(--text); background: rgba(0,0,0,.06); }
.nav__google { display:flex; align-items:center; }
.nav__google > * { transform: scale(.96); transform-origin: right center; }

.hero {
  box-sizing: border-box; min-height: calc(100vh - var(--footer-peek));
  padding: calc(var(--header-min-h) + var(--header-offset) + 140px) 0 0;
}
.hero__inner { text-align: center; }
.hero__title { font-size: var(--fs-hero); font-weight: 700; letter-spacing: .05px; margin: 0 0 14px; }
.hero__title .yt { color: var(--yt-red); }
.hero__subtitle { color: var(--muted); font-size: var(--fs-700); margin: 0 auto 34px; max-width: 820px; }

.searchbar {
  display: grid; grid-template-columns: 210px 1fr 170px; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow-lg); align-items: center;
}
.searchbar select,
.searchbar input {
  height: 64px; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); border-radius: var(--r-md); padding: 0 18px; font-size: 1rem;
  outline: none; transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.searchbar input::placeholder { color: var(--muted-2); }
.searchbar select:focus, .searchbar input:focus {
  border-color: var(--blue-500); box-shadow: 0 0 0 5px rgba(34,108,224,.20); background: #fff;
}
.searchbar .limit-input { width: 100%; text-align: center; font-variant-numeric: tabular-nums; background: #fff; }

.btn-primary {
  font-size: 1rem;height: 64px; border: none; border-radius: var(--r-md); font-weight: 700; letter-spacing: .3px; cursor: pointer;
  background: linear-gradient(135deg, var(--yt-red-600), var(--yt-red-500) 55%, var(--yt-red-400));
  color: white; transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.03); }
.btn-primary:active { transform: translateY(0); filter: brightness(.98); }

.results { margin-top: 44px; text-align: left; }
.table-wrap {
  overflow: auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--shadow-md);
}
.table { width: 100%; border-collapse: collapse; min-width: 860px; }
.table thead th {
  position: sticky; top: 0;
  background:
    linear-gradient(0deg, rgba(0,0,0,.04), rgba(0,0,0,.04)),
    linear-gradient(180deg, #ffffff 0%, #f6f8ff 100%);
  font-size: 1rem; text-transform: uppercase; letter-spacing: .45px;
  padding: 18px 20px; color: var(--muted); border-bottom: 1px solid var(--border);
}
.table tbody td { padding: 18px 20px; border-top: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:first-child td { border-top: none; }
.table tbody tr:hover { background: rgba(0,0,0,.04); }

.th-sortable { user-select: none; }
.sort-indicator {
  display: inline-block; width: 10px; height: 10px; margin-left: 6px;
  mask: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 10 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 2l3 3H2l3-3Zm0 6L2 5h6L5 8Z' fill='%23000'/%3E%3C/svg%3E") no-repeat center / contain;
  background: var(--muted-2);
}

.tag { display:inline-flex; align-items:center; justify-content:center; padding:6px 10px; min-width:52px; border-radius:8px; font-size:.92rem; font-weight:600; letter-spacing:.02em; line-height:1; border:none; box-shadow:none; white-space:nowrap; }
.tag--green { background: var(--green-500); color:#fff; }
.tag--yellow{ background: var(--yellow-500); color:#fff; }
.tag--red   { background: var(--yt-red-600); color:#fff; }
.tag--neutral{ background: var(--gray-200); color: var(--gray-800); }

.site-footer { margin-top: 80px; border-top: 1px solid var(--border);
  background: radial-gradient(900px 600px at 100% -20%, rgba(255,0,0,.10), transparent 60%), linear-gradient(180deg, #fbfcff 0%, #f4f7ff 100%);
}
.footer__grid { display: grid; gap: 32px; grid-template-columns: 2fr repeat(4, 1fr); padding: 44px 0; }
.footer__col h4 { margin: 0 0 12px; font-size: 1.02rem; color: var(--text); }
.footer__col a { display: block; color: var(--muted); padding: 6px 0; font-size: 1rem; }
.footer__col a:hover { color: var(--text); }
.footer__blurb { color: var(--muted); margin: 12px 0 0; max-width: 380px; }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; padding: 18px 0 34px; color: var(--muted-2); font-size: 1rem; }

@media (max-width: 1120px) { .nav a:not(:first-child) { display: none; } }
@media (max-width: 720px) {
  :root { --header-min-h: 100px; --header-offset: 10px; }
  .nav__google > * { transform: scale(.90); }
}
@media (max-width: 560px) {
  .searchbar { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
}

/* ---- Locked/Blurred rows ---- */
/* Gentle blur for gated metric cells */
/* Stronger, readable-proof blur ONLY on metric cells */
.blurred {
  filter: blur(3.6px) saturate(0.8);
  opacity: .65;
  transition: filter .12s ease, opacity .12s ease;
  user-select: none;
}
.lock-overlay { position: relative; }
.lock-overlay::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.0), rgba(255,255,255,0.28), rgba(255,255,255,0.0));
  pointer-events: none;
}

/* Inline upsell row (before blurred items) */
.upsell-row td {
  padding: 0;
  border-top: none;
  background: transparent;
}

.upsell-card {
  margin: 10px 12px;
  padding: 16px 16px;
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}

.upsell-card__bar {
  height: 100%;
  border-radius: var(--r-sm);
  background: linear-gradient(180deg, var(--green-300), var(--green-700));
}

.upsell-card__text {
  display: grid;
  gap: 4px;
}
.upsell-card__title {
  font-weight: 800;
  letter-spacing: .2px;
}
.upsell-card__desc {
  color: var(--muted);
  font-size: var(--fs-400);
}

/* Button aus auth.js passt automatisch (.btn-google).
   Für die Tabellenzeile etwas kompakter: */
.upsell-card .btn-google {
  height: 42px;
  padding: .5rem .9rem;
}

