/* GEO Tracker — Corporate Design danleywatson.de
   Tokens und Komponenten folgen design_handoff_danleywatson_site/design/tokens.css */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(/static/fonts/inter-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(/static/fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url(/static/fonts/geistmono-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url(/static/fonts/geistmono-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --ink-900: #0a0a0a; --ink-800: #161618; --ink-700: #2a2c30; --ink-500: #5b6573;
  --ink-400: #8a93a3; --ink-300: #b8bfca; --ink-200: #d9dee5; --ink-100: #eceef2; --ink-50: #f5f6f8;
  --paper: #ffffff; --paper-2: #fbfcfd; --paper-3: #f5f7fa;
  --sky-50: #f0f6ff; --sky-100: #e2eeff; --sky-200: #cfe1ff; --sky-300: #b1ccfb;
  --sky-400: #8ab2f4; --sky-500: #5e93eb; --sky-600: #2563eb; --sky-700: #1d4fc4;
  --warm-sand: #f3e7c8; --soft-coral: #f6a796; --leaf: #9bd09a; --grape: #c7b8ee;
  --sky-grad: linear-gradient(180deg, #d8e8fb 0%, #ecf3fd 45%, #ffffff 100%);
  --sky-grad-page: linear-gradient(180deg, #d8e8fb 0%, #ecf3fd 45%, #fbfcfd 100%); /* endet auf Paper 2, keine Kante */
  --sky-grad-rich: linear-gradient(180deg, #b1ccfb 0%, #d8e8fb 60%, #ecf3fd 100%);

  --r-xs: 8px; --r-sm: 12px; --r-md: 18px; --r-lg: 24px; --r-xl: 32px; --r-pill: 999px;
  --sh-card: 0 1px 0 rgba(15,23,42,.04), 0 12px 28px -10px rgba(15,23,42,.10);
  --sh-card-l: 0 1px 0 rgba(15,23,42,.04), 0 24px 48px -16px rgba(15,23,42,.14);
  --sh-float: 0 30px 60px -20px rgba(20,40,90,.30), 0 8px 18px -8px rgba(20,40,90,.18);
  --sh-button: 0 1px 0 rgba(255,255,255,.08) inset, 0 8px 18px -10px rgba(0,0,0,.55);
  --line: rgba(15,23,42,.07);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 400 15px/1.55 var(--font-sans); color: var(--ink-900);
  letter-spacing: -0.01em; font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  background: var(--paper-2) var(--sky-grad-page) no-repeat top / 100% 520px;
  min-height: 100vh; overflow-x: hidden;
}
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(30px, 4vw, 40px); line-height: 1.1; letter-spacing: -0.025em; font-weight: 500; }
h2 { font-size: 20px; line-height: 1.25; letter-spacing: -0.02em; font-weight: 500; margin-bottom: 6px; }
strong { font-weight: 600; }
code { font-family: var(--font-mono); font-size: .9em; background: var(--ink-50); padding: 1px 6px; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--sky-600); outline-offset: 2px; }

main, .top { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
main { padding-bottom: 80px; }
body:has(.login) main { padding-bottom: 0; }
.muted { color: var(--ink-500); } .small { font-size: 13px; } .err { color: #b4331e; }

.eyebrow, .tabs a.eyebrow { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-500); }

/* ---------- Header ---------- */
.top { display: flex; justify-content: space-between; align-items: center; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; font-size: 17px; letter-spacing: -0.02em; }
.logo img { width: 30px; height: 30px; }
.logo .sep { color: var(--ink-400); font-weight: 400; }
.logo .blue { color: var(--sky-600); }
.logo .chip { margin-left: 6px; }
.top form { margin: 0; }

/* ---------- Buttons / Chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px;
  border: 0; border-radius: var(--r-pill); background: var(--ink-900); color: #fff; box-shadow: var(--sh-button);
  font: 500 14px/1 var(--font-sans); letter-spacing: -0.005em; cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--ink-800); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--ink-900); box-shadow: none; border: 1px solid var(--ink-200); }
.btn.ghost:hover { background: var(--paper-3); }
.link { background: none; border: 0; padding: 0 0 0 14px; font: 500 13px var(--font-sans); color: var(--ink-500); cursor: pointer; }
.top .link { padding: 0; font-size: 14px; }
.link:hover { color: var(--sky-700); }

.chip, .tag {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  background: var(--paper); border: 1px solid var(--ink-200); color: var(--ink-700);
  font: 500 10.5px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
}
.tag { margin-left: 8px; height: 22px; font-size: 9.5px; color: var(--ink-500); }
.tag.own { background: color-mix(in srgb, var(--leaf) 28%, white); border-color: color-mix(in srgb, var(--leaf) 60%, white); color: #25602a; }
.chip.sky { background: var(--sky-100); border-color: var(--sky-200); color: var(--sky-700); }

/* ---------- Cards ---------- */
.card {
  display: block; background: var(--paper); border: 1px solid rgba(15,23,42,.04); border-radius: var(--r-lg);
  box-shadow: var(--sh-card); padding: 24px; margin: 16px 0;
}
.card.flush { padding: 0; overflow-x: auto; }
.card.empty { text-align: center; padding: 56px 24px; }
.card.narrow { max-width: 400px; margin: 0 auto; box-shadow: var(--sh-card-l); border-radius: var(--r-xl); padding: 32px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.proj { display: flex; flex-direction: column; gap: 4px; margin: 0; text-decoration: none; transition: transform .15s ease; }
.proj:hover { transform: translateY(-2px); }
.proj strong { font-weight: 500; font-size: 17px; letter-spacing: -0.015em; }
.proj .muted { font-family: var(--font-mono); font-size: 13px; }

/* ---------- Forms ---------- */
label { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; font-size: 13px; font-weight: 500; color: var(--ink-700); }
input, textarea {
  width: 100%; font: 400 15px/1.4 var(--font-sans); letter-spacing: -0.01em; color: var(--ink-900); background: var(--paper);
  border: 1px solid var(--ink-200); border-radius: var(--r-sm); padding: 11px 14px; transition: border-color .15s, box-shadow .15s;
}
input { height: 44px; padding-top: 0; padding-bottom: 0; }
input::placeholder, textarea::placeholder { color: var(--ink-400); }
input:focus, textarea:focus { outline: 0; border-color: var(--sky-600); box-shadow: 0 0 0 3px var(--sky-100); }
.row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.row > label { flex: 1 1 200px; }
.add { flex-wrap: nowrap; margin-top: 16px; } .add input { flex: 1; } .add .narrow-in { flex: 0 0 200px; }

/* ---------- Seitenkopf + Tabs ---------- */
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding-top: 28px; }
.head h1 { margin-top: 10px; }
.head .sub { margin-top: 6px; font-family: var(--font-mono); font-size: 13px; color: var(--ink-500); }
.runbox { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.runbox .small { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

.tabs { display: flex; gap: 6px; margin: 28px 0 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.tabs a { height: 38px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: var(--r-pill); text-decoration: none; white-space: nowrap;
  font-size: 14px; font-weight: 500; color: var(--ink-500); transition: background .15s, color .15s; }
.tabs a:hover { background: rgba(255,255,255,.7); color: var(--ink-900); }
.tabs a.on { background: var(--ink-900); color: #fff; box-shadow: var(--sh-button); }
.subtabs { display: flex; gap: 8px; margin: 20px 0 4px; flex-wrap: wrap; }
.subtabs a { height: 34px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-pill); text-decoration: none;
  font-size: 13.5px; color: var(--ink-500); border: 1px solid transparent; }
.subtabs a strong { font-family: var(--font-mono); font-weight: 500; color: var(--ink-900); }
.subtabs a.on { background: var(--paper); border-color: var(--ink-200); color: var(--ink-900); }

/* ---------- Kennzahlen (Metric Cards) ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 16px 0; }
.stat { display: flex; flex-direction: column; margin: 0; padding: 18px 20px; border-radius: var(--r-md); box-shadow: var(--sh-float); border-color: rgba(15,23,42,.05); }
.stat > span:first-child { font: 500 10.5px/1.3 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-400); min-height: 2.6em; }
.stat strong { font-size: 36px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; margin-top: 6px; }
.stat > span:last-child { font: 400 11.5px/1.45 var(--font-mono); color: var(--sky-700); margin-top: 6px; }

.bar-row { display: grid; grid-template-columns: 160px 1fr 130px; align-items: center; gap: 16px; margin: 14px 0; }
.bar-row.tight { grid-template-columns: 180px auto; margin: 0; gap: 14px; }
.bar { height: 8px; border-radius: var(--r-pill); background: var(--ink-100); overflow: hidden; min-width: 120px; }
.bar i { display: block; height: 100%; background: var(--sky-600); border-radius: var(--r-pill); }
.bar-row .small { font-family: var(--font-mono); font-size: 12px; }

/* ---------- Tabellen ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--ink-100); vertical-align: middle; }
th { font: 500 11px/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--ink-400); background: var(--paper-2); }
tbody tr:last-child td, table > tr:last-child td { border-bottom: 0; }
.matrix td.cell, .matrix th:not(:first-child) { text-align: center; width: 112px; }
.matrix tr.cat td { background: var(--paper-3); font: 500 11px/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--ink-500); padding: 10px 20px; }
.matrix tbody + tbody tr.cat td { border-top: 1px solid var(--ink-100); }
.qlink { cursor: pointer; transition: color .15s; } .qlink:hover { color: var(--sky-700); }
.actions { text-align: right; white-space: nowrap; } .actions form { display: inline; }

/* Positions-Pillen: Rang 1 = Sky 700, 2–3 = Sky 300, ab 4 = Sand */
.pill { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 26px; padding: 0 10px; border-radius: var(--r-xs);
  font: 500 12px/1 var(--font-mono); letter-spacing: -0.01em; }
.pill.none { background: var(--paper-3); color: var(--ink-400); }
.pill.miss { background: var(--ink-100); color: var(--ink-500); }
.pill.pos.p1 { background: var(--sky-700); color: #fff; }
.pill.pos.p2, .pill.pos.p3 { background: var(--sky-300); color: var(--ink-900); }
.pill.pos.p4 { background: var(--warm-sand); color: var(--ink-700); }
.pill.bad { background: var(--soft-coral); color: var(--ink-900); }

/* ---------- Antwort-Dialog ---------- */
#modal .overlay { position: fixed; inset: 0; z-index: 10; display: flex; justify-content: center; align-items: flex-start; padding: 6vh 16px;
  background: rgba(10,10,10,.42); backdrop-filter: blur(2px); overflow-y: auto; }
.dialog { position: relative; width: 100%; max-width: 780px; background: var(--paper); border-radius: var(--r-xl); box-shadow: var(--sh-float); padding: 32px; }
.dialog h2 { font-size: 22px; margin: 8px 40px 0 0; }
.dialog .close { position: absolute; right: 18px; top: 16px; width: 36px; height: 36px; border-radius: var(--r-pill); border: 0; background: var(--paper-3);
  font-size: 20px; line-height: 1; color: var(--ink-500); cursor: pointer; } .dialog .close:hover { background: var(--ink-100); color: var(--ink-900); }
.caps { font: 500 11px/1 var(--font-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-500); margin: 0; }
.answer { border: 1px solid var(--ink-100); border-radius: var(--r-md); margin-top: 16px; overflow: hidden; }
.answer > header { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 16px; background: var(--paper-2); border-bottom: 1px solid var(--ink-100); }
.answer > header .small { font-family: var(--font-mono); font-size: 11px; margin-left: auto; }
.answer .text { padding: 16px; white-space: pre-wrap; color: var(--ink-700); line-height: 1.6; }
.answer details { padding: 0 16px 14px; } .answer summary { cursor: pointer; font-size: 13px; font-weight: 500; color: var(--ink-500); }
.srcs { margin: 10px 0 0; padding-left: 18px; font-size: 14px; } .srcs li { margin: 4px 0; } .srcs a:hover { color: var(--sky-700); }
mark.brand { background: var(--sky-100); color: var(--sky-700); border-radius: 4px; padding: 0 3px; font-weight: 500; }

/* ---------- Login ---------- */
.login { position: relative; min-height: calc(100vh - 72px); display: flex; align-items: center; justify-content: center; padding: 24px 0 72px; }
.login .card { position: relative; z-index: 2; width: 100%; }
.login h1 { font-size: 30px; margin: 10px 0 20px; }
.login .btn { width: 100%; height: 48px; }
.login .cloud { position: fixed; }
.cloud { position: absolute; z-index: 0; pointer-events: none; background: #fff; border-radius: 999px; filter: blur(.5px);
  box-shadow: 0 20px 40px -20px rgba(60,90,160,.25), inset 0 -10px 24px -10px rgba(120,150,200,.25); }
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 999px; }
.cloud::before { width: 55%; height: 110%; left: 10%; top: -45%; } .cloud::after { width: 40%; height: 85%; right: 14%; top: -28%; }

@media (max-width: 720px) {
  main, .top { padding-left: 16px; padding-right: 16px; }
  .head { align-items: flex-start; } .runbox { align-items: flex-start; }
  .bar-row { grid-template-columns: 1fr; gap: 6px; } .bar-row.tight { grid-template-columns: 1fr; }
  .add { flex-wrap: wrap; } .add .narrow-in { flex: 1 1 100%; }
  th, td { padding: 12px 14px; }
  .matrix td:first-child { min-width: 220px; }
  .matrix td.cell, .matrix th:not(:first-child) { width: 72px; padding-left: 8px; padding-right: 8px; }
  .matrix .pill { min-width: 40px; }
  .dialog { padding: 24px 18px; } .cloud { display: none; }
  .logo .chip { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Phase 1: Tooltips, Hinweise, Prompt-Ansicht ---------- */
h2.lead { font-size: clamp(20px, 2.6vw, 26px); letter-spacing: -0.02em; margin: 20px 0 8px; }
.tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: 4px;
  border-radius: 50%; background: var(--ink-100); color: var(--ink-500); font: 500 10px/1 var(--font-mono); text-transform: none; letter-spacing: 0;
  cursor: help; vertical-align: middle; }
.tip:hover, .tip:focus-visible { background: var(--sky-100); color: var(--sky-700); }
.tip::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); z-index: 20;
  width: max-content; max-width: 280px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--ink-900); color: #fff;
  font: 400 12.5px/1.45 var(--font-sans); letter-spacing: -0.005em; text-transform: none; text-align: left; white-space: normal;
  box-shadow: var(--sh-float); opacity: 0; pointer-events: none; transition: opacity .12s; }
.tip:hover::after, .tip:focus-visible::after { opacity: 1; }
h2 .tip, th .tip { font-size: 10px; }

.banner { display: flex; gap: 12px; align-items: baseline; margin-top: 20px; padding: 12px 16px; border-radius: var(--r-md); font-size: 14px; }
.banner.demo { background: var(--warm-sand); color: var(--ink-900); border: 1px solid color-mix(in srgb, var(--warm-sand) 60%, #8a6d1f); }
.banner strong { font: 500 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }
.note { margin: 12px 0; padding: 12px 16px; border-radius: var(--r-md); background: var(--sky-50); border: 1px solid var(--sky-200); color: var(--ink-700); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.split .card { margin: 16px 0 0; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.mix { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip b { font-weight: 500; color: var(--ink-900); margin-left: 4px; }
.meta { margin-top: 4px; } .meta .tag { margin: 0 6px 0 0; }
select { font: 400 14px var(--font-sans); color: var(--ink-900); background: var(--paper); border: 1px solid var(--ink-200); border-radius: var(--r-pill);
  padding: 6px 12px; height: 34px; cursor: pointer; }
form.inline { display: inline; margin: 0; }
label.check { flex-direction: row; align-items: center; gap: 10px; font-size: 14px; }
label.check input { width: 18px; height: 18px; flex: none; }
td input[type=checkbox] { width: 18px; height: 18px; }
td input[name=model] { height: 36px; min-width: 200px; }

.tag.type-ugc { background: var(--grape); border-color: transparent; color: var(--ink-900); }
.tag.type-editorial { background: var(--sky-100); border-color: var(--sky-200); color: var(--sky-700); }
.tag.type-reference { background: var(--warm-sand); border-color: transparent; color: var(--ink-900); }
.tag.type-corporate { background: var(--ink-100); border-color: transparent; color: var(--ink-700); }
.tag.type-own { background: color-mix(in srgb, var(--leaf) 40%, white); border-color: transparent; color: #25602a; }
.tag.type-competitor { background: color-mix(in srgb, var(--soft-coral) 45%, white); border-color: transparent; color: var(--ink-900); }

.brands { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 0; }
.brandchip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: var(--r-pill); background: var(--paper-3); font-size: 13px; }
.brandchip.own { background: var(--sky-100); color: var(--sky-700); font-weight: 500; }
