/* LynkBite Grader — shared by /grader and /grader/r/{token} */
:root {
    --green: #1F5E4B;
    --green2: #2A7A60;
    --ink: #0b1220;
    --muted: #64748b;
    --line: rgba(15,23,42,.08);
    --paper: #f3f8f5;
    --card: #fff;
    --bad: #dc2626;
    --warn: #d97706;
    --ok: #16a34a;
    --radius: 22px;
}

html, body { font-family: Inter, system-ui, -apple-system, sans-serif; color: var(--ink); background: var(--paper); }
body { padding-top: 64px; }
a { text-decoration: none; }

.g-nav {
    position: fixed; inset: 0 0 auto 0; height: 64px; z-index: 50;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 0 16px; background: rgba(255,255,255,.9); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}
.g-brand { display: flex; align-items: center; gap: 10px; font-weight: 900; color: var(--ink); letter-spacing: -.02em; }
.g-brand img { height: 32px; width: auto; }
.g-brand small { font-weight: 700; color: var(--green); background: rgba(31,94,75,.08); border-radius: 999px; padding: 3px 9px; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.g-nav-status { color: var(--muted); font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn-main {
    border-radius: 999px; padding: 10px 18px; font-weight: 800; color: #fff;
    background: linear-gradient(180deg, var(--green2), var(--green)); border: 0;
    box-shadow: 0 8px 20px rgba(31,94,75,.25);
}
.btn-main:hover, .btn-main:focus { color: #fff; filter: brightness(1.05); }
.btn-main:disabled { opacity: .6; }
.btn-ghost { border-radius: 999px; padding: 10px 18px; font-weight: 800; color: var(--ink); background: #fff; border: 1px solid var(--line); }

.eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
    color: var(--green); background: rgba(31,94,75,.08); border: 1px solid rgba(31,94,75,.16);
    border-radius: 999px; padding: 6px 12px;
}

.g-wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 140px; }
.g-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 18px 50px rgba(2,6,23,.06); }
.g-card + .g-card, .g-section + .g-section { margin-top: 16px; }
.g-card h2 { font-size: 1.35rem; font-weight: 900; letter-spacing: -.03em; margin: 0 0 6px; }
.g-sub { color: var(--muted); font-size: .95rem; margin: 0 0 14px; line-height: 1.5; }

/* ── Search (landing) ─────────────────────────────────── */
.g-search { position: relative; margin-top: 22px; }
.g-search-box {
    display: flex; gap: 8px; align-items: center; padding: 8px 8px 8px 18px;
    background: #fff; border: 1px solid rgba(15,23,42,.14); border-radius: 999px;
    box-shadow: 0 18px 50px rgba(2,6,23,.10);
}
.g-search-box i { color: var(--muted); }
.g-search-box input { flex: 1; border: 0; outline: 0; font-size: 1.05rem; min-width: 0; background: transparent; }
.g-suggest {
    position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 20;
    background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
    box-shadow: 0 18px 50px rgba(2,6,23,.14);
}
.g-suggest button { display: block; width: 100%; text-align: left; border: 0; background: #fff; padding: 12px 18px; }
.g-suggest button:hover, .g-suggest button.active { background: var(--paper); }
.g-suggest strong { display: block; font-weight: 800; }
.g-suggest span { color: var(--muted); font-size: .88rem; }
.g-error { color: var(--bad); font-weight: 600; margin-top: 10px; font-size: .92rem; }

/* ── Scan feed ────────────────────────────────────────── */
.g-step { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.05rem; margin: 22px 0 10px; }
.g-step .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: .8rem; }
.g-step.pending { color: #94a3b8; }
.g-step.pending .dot { border: 2px solid #cbd5e1; }
.g-step.running .dot { border: 2px solid var(--green); border-right-color: transparent; animation: g-spin .8s linear infinite; }
.g-step.done .dot { background: var(--green); color: #fff; }
.g-step.skipped { color: #94a3b8; }
.g-step.skipped .dot { background: #e2e8f0; color: #94a3b8; }
@keyframes g-spin { to { transform: rotate(360deg); } }
.g-feed-card { animation: g-rise .35s ease both; }
@keyframes g-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Score ────────────────────────────────────────────── */
.g-hero-card { background: linear-gradient(180deg, #fff8eb, #fdf0d5); border-color: rgba(217,119,6,.18); }
.g-hero-card.great, .g-hero-card.good { background: linear-gradient(180deg, #f0fbf4, #def5e6); border-color: rgba(22,163,74,.18); }
.g-hero-card.poor { background: linear-gradient(180deg, #fff1f1, #fde0e0); border-color: rgba(220,38,38,.18); }
.g-biz { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.g-biz-logo { width: 64px; height: 64px; border-radius: 16px; object-fit: contain; background: #fff; border: 1px solid var(--line); flex: none; }
.g-biz-logo.placeholder { display: grid; place-items: center; font-size: 1.6rem; color: var(--muted); }
.g-biz h1 { font-size: 1.4rem; font-weight: 900; letter-spacing: -.03em; margin: 0; }
.g-biz .meta { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.g-score-row { display: flex; gap: 18px; align-items: center; }
.g-ring { position: relative; width: 104px; height: 104px; flex: none; }
.g-ring svg { transform: rotate(-90deg); }
.g-ring .num { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2rem; font-weight: 900; letter-spacing: -.04em; }
.g-grade-lbl { color: var(--muted); font-weight: 600; font-size: .9rem; }
.g-grade { font-size: 1.6rem; font-weight: 900; letter-spacing: -.03em; }
.g-headline { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; margin: 18px 0 10px; }
.g-problem { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; margin: 8px 0; }
.g-problem i { color: var(--bad); margin-top: 2px; }

.g-cats { display: grid; gap: 12px; }
.g-cat-top { display: flex; justify-content: space-between; font-weight: 700; font-size: .92rem; margin-bottom: 5px; }
.g-bar { height: 8px; background: #eef2f6; border-radius: 99px; overflow: hidden; }
.g-bar > span { display: block; height: 100%; border-radius: 99px; }

/* ── Competitors ──────────────────────────────────────── */
.g-comp { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; }
.g-comp.you { background: var(--paper); border: 1px solid rgba(31,94,75,.18); }
.g-comp .ico { width: 40px; height: 40px; border-radius: 12px; background: #f1f5f9; display: grid; place-items: center; color: #94a3b8; flex: none; }
.g-comp.you .ico { background: var(--green); color: #fff; }
.g-comp .name { font-weight: 700; }
.g-comp .sub { color: var(--muted); font-size: .85rem; }
.g-comp .rank { margin-left: auto; font-weight: 800; color: var(--muted); }
.g-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.g-stat { background: var(--paper); border-radius: 16px; padding: 12px; text-align: center; }
.g-stat b { display: block; font-size: 1.35rem; font-weight: 900; letter-spacing: -.03em; }
.g-stat span { color: var(--muted); font-size: .8rem; font-weight: 600; }

/* ── To-do ────────────────────────────────────────────── */
.g-todo { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.g-todo:first-of-type { border-top: 0; }
.g-todo .chk { width: 24px; height: 24px; border-radius: 7px; flex: none; display: grid; place-items: center; margin-top: 1px; }
.g-todo.fail .chk { border: 2px solid #cbd5e1; }
.g-todo.fail.critical .chk { border-color: var(--bad); }
.g-todo.pass .chk { background: #e8f5ee; color: var(--green); }
.g-todo.pass .title { color: var(--muted); }
.g-todo .title { font-weight: 700; }
.g-todo .fix { color: var(--muted); font-size: .9rem; margin-top: 3px; line-height: 1.5; }
.g-tag { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; border-radius: 99px; padding: 2px 8px; margin-left: 6px; vertical-align: 2px; }
.g-tag.critical { color: var(--bad); background: rgba(220,38,38,.08); }
.g-tag.warning { color: var(--warn); background: rgba(217,119,6,.10); }
.g-gate { margin-top: 12px; padding: 18px; border-radius: 18px; background: var(--paper); border: 1px dashed rgba(31,94,75,.3); }
.g-gate input { border-radius: 12px; }

/* ── Reviews / copy ───────────────────────────────────── */
.g-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.g-chip { background: #e8f5ee; color: var(--green); font-weight: 700; font-size: .88rem; border-radius: 99px; padding: 6px 12px; }
.g-chip.bad { background: #fdecec; color: var(--bad); }
.g-quote { font-size: 1.05rem; line-height: 1.55; }
.g-palette { display: flex; height: 64px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.g-palette span { flex: 1; }
.g-logo-box { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: grid; place-items: center; min-height: 90px; }
.g-logo-box img { max-height: 90px; max-width: 100%; object-fit: contain; }

.g-phone {
    width: min(300px, 100%); margin: 0 auto; border: 10px solid #111; border-radius: 38px;
    overflow: hidden; background: #fff; box-shadow: 0 24px 60px rgba(2,6,23,.18);
}
.g-phone img { display: block; width: 100%; }
.g-phone-hero { padding: 34px 18px 26px; color: #fff; }
.g-phone-hero h3 { font-size: 1.45rem; font-weight: 900; letter-spacing: -.03em; line-height: 1.1; margin: 0 0 8px; }
.g-phone-hero p { font-size: .9rem; opacity: .9; margin: 0 0 16px; }
.g-phone-hero .cta { display: inline-block; background: #fff; font-weight: 800; border-radius: 99px; padding: 9px 16px; font-size: .9rem; }
.g-phone-body { padding: 18px; font-size: .86rem; color: #334155; line-height: 1.55; }
.g-phone-body h4 { font-size: 1rem; font-weight: 800; color: var(--ink); }

.g-serp { border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.g-serp .url { color: #202124; font-size: .82rem; overflow-wrap: anywhere; }
.g-serp .t { color: #1a0dab; font-size: 1.1rem; margin: 2px 0; }
.g-serp .d { color: #4d5156; font-size: .88rem; line-height: 1.45; }
.g-serp-lbl { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 12px 0 6px; }

/* ── Commission calculator ────────────────────────────── */
.g-calc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.g-calc label { font-size: .8rem; font-weight: 700; color: var(--muted); }
.g-calc input { border-radius: 12px; font-weight: 700; }
.g-calc-out { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.g-calc-out > div { border-radius: 16px; padding: 14px; }
.g-calc-out .loss { background: #fdecec; }
.g-calc-out .save { background: #e8f5ee; }
.g-calc-out b { display: block; font-size: 1.6rem; font-weight: 900; letter-spacing: -.03em; }
.g-calc-out span { font-size: .85rem; font-weight: 600; color: #475569; }
.g-assume { color: var(--muted); font-size: .8rem; margin-top: 10px; }

/* ── Sticky CTA ───────────────────────────────────────── */
.g-sticky {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(243,248,245,0), var(--paper) 30%);
}
.g-sticky-inner { max-width: 760px; margin: 0 auto; display: flex; gap: 8px; }
.g-sticky .btn-main { flex: 1; padding: 14px 18px; font-size: 1.02rem; }

@media (max-width: 575px) {
    .g-card { padding: 18px; }
    .g-calc { grid-template-columns: 1fr 1fr; }
    .g-calc > div:last-child { grid-column: 1 / -1; }
    .g-ring { width: 88px; height: 88px; }
    .g-ring .num { font-size: 1.7rem; }
    .g-nav-status { display: none; }
}
